Hurd: fix mode type for openat
[glibc.git] / nptl / ChangeLog
blob905a6beb643bd068f9a047cb4fcee3e55c02c035
1 2012-05-10  Thomas Schwinge  <thomas@schwinge.name>
3         [BZ #3748]
4         * sysdeps/pthread/bits/libc-lockP.h (__libc_once_get): New macro.
6 2012-05-09  Chung-Lin Tang  <cltang@codesourcery.com>
8         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
9         (__pthread_cond_timedwait): Use CFI directives.
10         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
11         (__pthread_cond_wait): Likewise.
12         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait): Likewise.
13         * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
15 2012-05-03  David S. Miller  <davem@davemloft.net>
17         * sysdeps/sparc/sparc64/pthread_spin_unlock.S: Fix thinko, we
18         always have to return 0, especially for the pthread_spin_init
19         alias.
20         * sysdeps/sparc/sparc32/pthread_spin_lock.S: Add missing trailing
21         newline.
22         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.S: Likewise.
23         * sysdeps/sparc/sparc64/pthread_spin_lock.S: Likewise.
25 2012-05-02  David S. Miller  <davem@davemloft.net>
27         * sysdeps/sparc/sparc64/pthread_spin_lock.S: New.
28         * sysdeps/sparc/sparc64/pthread_spin_lock.c: Delete.
29         * sysdeps/sparc/sparc64/pthread_spin_unlock.S: New.
30         * sysdeps/sparc/sparc64/pthread_spin_unlock.c: Delete.
31         * sysdeps/sparc/sparc64/pthread_spin_trylock.S: New.
32         * sysdeps/sparc/sparc64/pthread_spin_trylock.c: Delete.
33         * sysdeps/sparc/sparc64/pthread_spin_init.c: New.
34         * sysdeps/sparc/sparc32/pthread_spin_lock.S: New.
35         * sysdeps/sparc/sparc32/pthread_spin_lock.c: Delete.
36         * sysdeps/sparc/sparc32/pthread_spin_trylock.S: New.
37         * sysdeps/sparc/sparc32/pthread_spin_trylock.c: Delete.
38         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.S: New.
39         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: Delete.
40         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.S: New.
41         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: Delete.
42         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.S: New.
43         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: Delete.
44         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_init.c: New.
46 2012-05-02  Allan McRae  <allan@archlinux.org>
48         * Makefile: (LDFLAGS-tst-tls5): Use $(no-as-needed).
49         (LDFLAGS-tst-cancel24): Likewise.
51 2012-05-02  Paul Pluzhnikov  <ppluzhnikov@google.com>
53         * sysdeps/i386/pthread_spin_lock.S: New.
54         * sysdeps/i386/pthread_spin_lock.c: Delete.
55         * sysdeps/x86_64/pthread_spin_lock.S: New.
56         * sysdeps/x86_64/pthread_spin_lock.c: Delete.
58 2012-04-28  Andreas Schwab  <schwab@linux-m68k.org>
60         * Makefile ($(objpfx)tst-stack3-mem, $(objpfx)tst-tls6.out): Don't
61         run when cross-compiling.
63 2012-04-26  Siddhesh Poyarekar  <siddhesh@redhat.com>
65         * sysdeps/pthread/unwind-forcedunwind.c: Include gnu/lib-names.h
66         instead of libgcc_s.h.
68 2012-04-20  Paul Pluzhnikov  <ppluzhnikov@google.com>
70         * sysdeps/x86_64/tls.h (TLS_GET_FS, TLS_SET_FS): Delete.
72 2012-03-27  David S. Miller  <davem@davemloft.net>
74         * tst-cond16.c (do_test): Use a thread stack size which is either
75         PTHREAD_STACK_MIN or the page size, whichever is larger.
76         * tst-cond18.c (do_test): Likewise.
78 2012-03-19  H.J. Lu  <hongjiu.lu@intel.com>
80         * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Use
81         register char * __asm__("rsp") to get stack frame.
83 2012-03-19  H.J. Lu  <hongjiu.lu@intel.com>
85         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (SYS_futex): Use
86         __NR_futex directly.
88 2012-03-19  H.J. Lu  <hongjiu.lu@intel.com>
90         * unwind.c (unwind_stop): Cast _Unwind_GetCFA return to
91         _Unwind_Ptr first.
93 2012-03-16  David S. Miller  <davem@davemloft.net>
95         [BZ #13844]
96         * sysdeps/unix/sysv/linux/libc-lowlevellock.c: Include using <..>
97         instead of "...".
98         * sysdeps/unix/sysv/linux/sparc/sparc32/libc-lowlevellock.c:
99         Delete, not needed.
101 2012-03-15  David S. Miller  <davem@davemloft.net>
103         [BZ #13844]
104         * sysdeps/unix/sysv/linux/sparc/sparc32/libc-lowlevellock.c: New file.
106 2012-03-09  Paul Eggert  <eggert@cs.ucla.edu>
108         [BZ #13673]
109         * pt-crti.S: Replace FSF snail mail address with URL.
111 2012-03-09  Joseph Myers  <joseph@codesourcery.com>
113         * sysdeps/pthread/pthread.h (__need_clockid_t, __need_timespec):
114         Do not define before including <time.h>.
116 2012-03-08  David S. Miller  <davem@davemloft.net>
118         * sysdeps/unix/sysv/linux/sparc/sem_post.c: Update copyright year.
120 2012-03-08  Thomas Schwinge  <thomas@codesourcery.com>
122         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
123         Check for timestamp before the Epoch.
125         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait): Fix
126         updating nwaiters.
128         * tst-sem13.c (do_test): Add another test case.
129         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
130         Fix updating nwaiters.
132 2012-03-07  Joseph Myers  <joseph@codesourcery.com>
134         [BZ #10545]
135         * sysdeps/pthread/configure.in (libc_cv_forced_unwind): Change
136         link test to a compile test.
137         (libc_cv_c_cleanup): Likewise.  Declare puts rather than including
138         <stdio.h>.
139         * sysdeps/pthread/configure: Regenerated.
141 2012-03-07  Ulrich Drepper  <drepper@gmail.com>
143         * Makefile (distribute): Remove variable.
145 2012-01-23  Thomas Schwinge  <thomas@codesourcery.com>
147         * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Get rid of
148         superfluous assignment.
149         * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c (sem_timedwait):
150         Likewise.
151         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c
152         (sem_timedwait): Likewise.
154 2012-03-06  Ulrich Drepper  <drepper@gmail.com>
156         * sysdeps/pthread/bits/libc-lock.h: Move information not needed in
157         installed headers to...
158         * sysdeps/pthread/bits/libc-lockP.h: ...here.  New file.
160 2012-03-06  David S. Miller  <davem@davemloft.net>
162         * sysdeps/unix/sysv/linux/sparc/sem_post.c (__new_sem_post): Use
163         atomic_increment and remove unused local variable.
164         (__old_sem_post): Likewise.
166 2012-02-27  David S. Miller  <davem@davemloft.net>
168         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Don't refer to
169         non-existing __pthread_attr.
170         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
171         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
172         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
173         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
174         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
176 2012-02-26  Ulrich Drepper  <drepper@gmail.com>
178         * sysdeps/pthread/pthread.h: Define __need_clockid_t for __USE_XOPEN2K.
180         * sysdeps/pthread/pthread.h: Define __need_timespec before including
181         <time.h>.
182         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Name pthread_attr_t
183         union.
184         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
185         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
186         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
187         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
188         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
190 2012-02-21  Joseph Myers  <joseph@codesourcery.com>
192         [BZ #13695]
193         * Makefile (generated): Remove crti.S, crtn.S, defs.h and
194         pt-initfini.s.
195         [crti.S not in sysdirs] (omit-deps): Do not append.
196         [crti.S not in sysdirs] (CFLAGS-pt-initfini.s): Remove variable.
197         [crti.S not in sysdirs] (pt-initfini.c): Remove vpath directive.
198         [crti.S not in sysdirs] ($(objpfx)crti.S): Remove rule.
199         [crti.S not in sysdirs] ($(objpfx)crtn.S): Likewise.
200         [crti.S not in sysdirs] ($(objpfx)defs.h): Likewise.
201         [crti.S not in sysdirs] ($(objpfx)crti.o): Likewise.
202         [crti.S not in sysdirs] ($(objpfx)crtn.o): Likewise.
203         [crti.S in sysdirs] (extra-objs): Append unconditionally.
204         [crti.S in sysdirs] ($(objpfx)crti.o): Define rule
205         unconditionally.
206         * sysdeps/pthread/pt-initfini.c: Remove file.
208 2012-02-16  Richard Henderson  <rth@twiddle.net>
210         * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: Remove file.
211         * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: Remove file.
213 2012-02-15  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
215         * sysdeps/unix/sysv/linux/sh/pt-initfini.c: Remove file.
217 2012-02-16  David S. Miller  <davem@davemloft.net>
219         * sysdeps/sparc/Makefile: Add -fPIC when building pt-crti.S and crtn.S
221 2012-02-15  Marek Polacek  <polacek@redhat.com>
223         * sysdeps/unix/sysv/linux/x86_64/Makefile: Remove file.
225 2012-02-09  Paul Eggert  <eggert@cs.ucla.edu>
227         Replace FSF snail mail address with URLs, as per GNU coding standards.
229 2012-02-08  Andreas Schwab  <schwab@linux-m68k.org>
231         * Makefile (extra-objs) [crti.S in sysdirs]: Add pt-crti.o.
233 2012-02-08  Joseph Myers  <joseph@codesourcery.com>
235         Support crti.S and crtn.S provided directly by architectures.
236         * Makefile [crti.S in sysdirs] (omit-deps): Do not append.
237         [crti.S in sysdirs] (CFLAGS-pt-initfini.s): Do not define variable.
238         [crti.S in sysdirs] ($(objpfx)pt-initfini.s): Disable rule.
239         [crti.S in sysdirs] ($(objpfx)crti.S): Likewise.
240         [crti.S in sysdirs] ($(objpfx)crtn.S): Likewise.
241         [crti.S in sysdirs] ($(objpfx)defs.h): Likewise.
242         [crti.S in sysdirs] ($(objpfx)crti.o): Likewise.
243         [crti.S in sysdirs] ($(objpfx)crtn.o): Likewise.
244         [crti.S in sysdirs] (pt-initfini.c): Remove vpath directive.
245         [crti.S in sysdirs] ($(objpfx)crti.o): New rule.
246         * pt-crti.S: New file.
247         * sysdeps/unix/sysv/linux/i386/Makefile: Remove file.
249 2012-02-03  Joseph Myers  <joseph@codesourcery.com>
251         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
252         macros for PIC register setup.
253         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
254         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
255         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
256         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
257         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
259 2012-01-11  Marek Polacek  <polacek@redhat.com>
261         * forward.c (FORWARD_NORETURN): Define macro.
262         (__pthread_unwind): Use FORWARD_NORETURN macro to avoid warning.
263         (__pthread_exit): Likewise.
265 2012-01-10  Ulrich Drepper  <drepper@gmail.com>
267         * sysdeps/pthread/pthread.h: Add const attribute to pthread_equal.
269         * pthreadP.h: Add noreturn to __pthread_exit.
270         * sysdeps/pthread/pthread-functions.h: Likewise for ptr___pthread_exit.
272 2011-12-30  Adhemerval Zanella  <azanella@linux.vnet.ibm.com>
274         * sysdeps/unix/sysv/linux/aio_misc.h (__aio_create_helper_thread):
275         Call pthread_attr_setstacksize() with result of
276         __pthread_get_minstack() to account for application TLS usage.
278 2012-01-08  Marek Polacek  <polacek@redhat.com>
280         * sysdeps/unix/sysv/linux/mq_notify.c: Include <nptl/pthreadP.h>.
282 2012-01-07  Ulrich Drepper  <drepper@gmail.com>
284         [BZ #13553]
285         * pthreadP.h: Use const instead of __const.
286         * semaphore.h: Likewise.
287         * sysdeps/pthread/bits/libc-lock.h: Likewise.
288         * sysdeps/pthread/bits/sigthread.h: Likewise.
289         * sysdeps/pthread/pthread.h: Likewise.
291         * Makefile: Remove elf=yes test, only ELF is supported.
293         * shlib-versions: Remove entries for ports architectures.
295         In case anyone cares, the IA-64 architecture could move to ports.
296         * sysdeps/ia64/*: Removed.
297         * sysdeps/unix/sysv/linux/ia64/*: Removed.
299 2011-12-22  Ulrich Drepper  <drepper@gmail.com>
301         * sysdeps/pthread/gai_misc.h (__gai_create_helper_thread): Use
302         __pthread_get_minstack.
303         * sysdeps/unix/sysv/linux/mq_notify.c (init_mq_netlink): Likewise.
305         [BZ #13088]
306         * sysdeps/unix/sysv/linux/timer_routines.c: Get minimum stack size
307         through __pthread_get_minstack.
308         * nptl-init.c (__pthread_initialize_minimal_internal): Get page size
309         directly from _rtld_global_ro.
310         (__pthread_get_minstack): New function.
311         * pthreadP.h: Declare __pthread_get_minstack.
312         * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_get_minstack.
314 2011-12-21  Ulrich Drepper  <drepper@gmail.com>
316         [BZ #13515]
317         * sysdeps/unix/sysv/linux/pthread_getname.c (pthread_getname_np):
318         Correct reading name from file.
320 2011-12-14  Carlos O'Donell  <carlos@systemhalted.org>
322         * allocatestack.c (allocate_stack): Return errno on failure.
324 2011-12-14  Jeff Law  <law@redhat.com>
326         [BZ #5245]
327         * pthread_create.c (__pthread_create_2_1): Translate ENOMEM to EAGAIN.
329 2011-11-28  Andreas Schwab  <schwab@redhat.com>
331         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Handle
332         EAGAIN from FUTEX_WAIT_REQUEUE_PI.
333         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
335 2011-11-15  Ulrich Drepper  <drepper@gmail.com>
337         * pthread_getattr_np.c (pthread_getattr_np): Set FD_CLOEXEC for
338         /proc/self/maps.
340 2011-10-29  Ulrich Drepper  <drepper@gmail.com>
342         [BZ #13358]
343         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
344         (__pthread_cond_timedwait): Initialize %r15 correctly also for code
345         path for kernels with FUTEX_CLOCK_REALTIME.
346         Debugged by H.J. Lu <hjl.tools@gmail.com>.
348 2011-10-27  Andreas Schwab  <schwab@redhat.com>
350         [BZ #13344]
351         * sysdeps/pthread/pthread.h: Use __THREADNL instead of __THREAD
352         for memory synchronization functions.
353         * semaphore.h: Likewise.
355 2011-10-24  Ulrich Drepper  <drepper@gmail.com>
357         * tst-cancel7.c: Avoid warning.
358         * tst-mutex6.c: Likewise.
359         * tst-mutex9.c: Likewise.
360         * tst-mutexpi6.c: Likewise.
362 2011-10-23  Ulrich Drepper  <drepper@gmail.com>
364         * sysdeps/i386/tls.h: Remove #include <list.h>.
366 2011-10-15  Ulrich Drepper  <drepper@gmail.com>
368         * pthread_create.c (start_thread): Call __ctype_init.
370 2011-09-15  Andreas Schwab  <schwab@redhat.com>
372         * sysdeps/pthread/list.h: Define only list_t if __need_list_t is
373         defined.
374         (list_add): Add atomic_write_barrier.
375         * descr.h: Define __need_list_t before including <list.h>.
376         * nptl-init.c: Include <list.h>
377         * allocatestack.c: Likewise.
379 2011-09-11  Ulrich Drepper  <drepper@gmail.com>
381         * sysdeps/i386/tls.h: Remove HAVE_TLS_SUPPORT test.
382         * sysdeps/ia64/tls.h: Likewise.
383         * sysdeps/powerpc/tls.h: Likewise.
384         * sysdeps/s390/tls.h: Likewise.
385         * sysdeps/sh/tls.h: Likewise.
386         * sysdeps/sparc/tls.h: Likewise.
387         * sysdeps/x86_64/tls.h: Likewise.
389 2011-09-10  Ulrich Drepper  <drepper@gmail.com>
391         * sysdeps/pthread/malloc-machine.h: Define MUTEX_INITIALIZER.
393         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Don't handle
394         !USE___THREAD.
395         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
396         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
397         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
398         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
399         * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
400         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
401         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
402         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
403         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
404         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
405         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
406         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
408         * tst-tls1.c: Support for __thread is now mandatory.
409         * tst-tls2.c: Likewise.
410         * tst-tls3.c: Likewise.
411         * tst-tls3mod.c: Likewise.
412         * tst-tls4.c: Likewise.
413         * tst-tls4moda.c: Likewise.
414         * tst-tls4modb.c: Likewise.
415         * tst-tls5.h: Likewise.
417 2011-09-08  Ulrich Drepper  <drepper@gmail.com>
419         [BZ #12403]
420         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
421         (pthread_rwlock_timedwrlock): Use correct macro in test.
422         Patch by H.J. Lu <hongjiu.lu@intel.com>.
424 2011-09-06  Ulrich Drepper  <drepper@gmail.com>
426         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait): Don't
427         use gettimeofday vsyscall, just call gettimeofday.
428         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
429         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
430         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
431         Likewise.
432         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
433         Likewise.
434         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
435         Simplify __vdso_clock_gettime use.
437 2011-09-05  David S. Miller  <davem@davemloft.net>
439         * sysdeps/unix/sysv/linux/sem_timedwait.c (do_futex_timed_wait):
440         New function.
441         (sem_timedwait): Call it to force an exception region around
442         the async cancel enable and the futex operation.
443         * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c: Likewise.
444         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: Likewise.
445         * sysdeps/unix/sysv/linux/sem_wait.c (do_futex_wait): New function.
446         (__new_sem_wait): Call it to force an exception region around
447         the async cancel enable and the futex operation.
448         * sysdeps/unix/sysv/linux/sparc/sem_wait.c: Likewise.
449         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: Likewise.
451 2011-08-31  Andreas Schwab  <schwab@redhat.com>
453         * allocatestack.c (setxid_mark_thread): Ensure that the exiting
454         thread is woken up.
456 2011-08-20  David S. Miller  <davem@davemloft.net>
458         * Makefile (tst-cleanup0.out): Fix typo in output redirection.
460 2011-08-14  Roland McGrath  <roland@hack.frob.com>
462         * sysdeps/i386/pthreaddef.h (TCB_ALIGNMENT): Set to 64, optimal on Atom.
463         * sysdeps/x86_64/pthreaddef.h (TCB_ALIGNMENT): Likewise.
465 2011-08-08  Andreas Schwab  <schwab@redhat.com>
467         * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Maintain aligned
468         stack.
469         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
470         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
472 2011-07-22  Ulrich Drepper  <drepper@gmail.com>
474         * sysdeps/pthread/unwind-forcedunwind.c (_Unwind_Resume): Add read
475         barrier.
476         (__gcc_personality_v0): Likewise.
477         (_Unwind_ForcedUnwind): Likewise.
478         (_Unwind_GetCFA): Likewise.
480 2011-07-14  Roland McGrath  <roland@hack.frob.com>
482         * allocatestack.c (__reclaim_stacks): Use uintptr_t cast rather than
483         UINTMAX_C.
485 2011-06-30  Ulrich Drepper  <drepper@gmail.com>
487         * nptl-init.c (__nptl_set_robust): New function.
488         (pthread_functions): Add reference.
489         * npthreadP.h: Declare __nptl_set_robust.
490         * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
491         ptr_set_robust member.
492         * sysdeps/unix/sysv/linux/fork.c: Call set_robust_list syscall in
493         child if threads are used.
495 2011-06-14  Andreas Jaeger  <aj@suse.de>
497         * pthread_rwlock_init.c: Include <string.h> for memset declaration.
499 2011-05-11  Ulrich Drepper  <drepper@gmail.com>
501         [BZ #386]
502         * allocatestack.c (allocate_stack): Convert ENOMEM error to EAGAIN.
504 2011-04-10  Ulrich Drepper  <drepper@gmail.com>
506         [BZ #12650]
507         * allocatestack.c (get_cached_stack): Deallocate DTV entries before
508         clearing memory.
509         Patch partly by Robert Rex <robert.rex@exasol.com>.
511 2011-01-19  Roland McGrath  <roland@redhat.com>
513         * pthread_cond_wait.c (__pthread_cond_wait): Fix comment typo.
514         * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
515         * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Likewise.
516         * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
517         * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock): Likewise.
518         * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock): Likewise.
520 2011-01-16  Andreas Schwab  <schwab@linux-m68k.org>
522         * Makefile (test-extras): Add tst-cleanup4aux.
524 2011-01-14  Ulrich Drepper  <drepper@gmail.com>
526         [BZ #10563]
527         * sysdeps/pthread/setxid.h (__SETXID_1): Add cast to assignment.
528         (__SETXID_2): Likewise.
529         (__SETXID_3): Likewise.
531 2011-01-13  Ulrich Drepper  <drepper@gmail.com>
533         [BZ #10484]
534         * Versions [libc] (GLIBC_PRIVATE): Export __libc_alloca_cutoff.
535         * alloca_cutoff.c: Add libc_hidden_def.
537 2010-10-13  H.J. Lu  <hongjiu.lu@intel.com>
539         [BZ #12113]
540         * sysdeps/x86_64/pthreaddef.h (TCB_ALIGNMENT): Changed to 32.
541         * sysdeps/x86_64/tls.h (TLS_TCB_ALIGN): Defined with alignment
542         of "struct pthread".
544 2010-09-21  Andreas Schwab  <schwab@redhat.com>
546         * sysdeps/pthread/pthread.h (pthread_cleanup_push)
547         [!__EXCEPTIONS]: Mangle local variable not_first_call.
548         (pthread_cleanup_push_defer_np): Likewise.
550 2010-09-03  Ulrich Drepper  <drepper@redhat.com>
552         * sysdeps/pthread/allocalim.h (__libc_use_alloca): Expect blocks are
553         small.
555 2010-08-10  Dinakar Guniguntala  <dino@in.ibm.com>
556             Stefan Hajnoczi  <stefanha@linux.vnet.ibm.com>
558         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: If
559         FUTEX_WAKE_OP fails make sure to call FUTEX_WAKE instead.
561 2010-08-12  H.J. Lu  <hongjiu.lu@intel.com>
563         * sysdeps/unix/sysv/linux/i386/Makefile: New file.
565 2010-05-01  Alan Modra  <amodra@gmail.com>
567         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
568         (PSEUDO): Use correct cr save.  Don't use wrong parm save area
569         to save temps.  Correct cfi for possible later frame manipulation.
570         (DOCARGS_1, UNDOCARGS_1): Use the correct parm save area.
571         (DOCARGS_2, UNDOCARGS_2, DOCARGS_3, UNDOCARGS_3): Likewise.
572         (DOCARGS_4, UNDOCARGS_4, DOCARGS_5, UNDOCARGS_5): Likewise.
573         (DOCARGS_6, UNDOCARGS_6): Likewise.
574         (CENABLE, CDISABLE): Add nops for non-shared calls.
576 2010-07-06  Andreas Schwab  <schwab@redhat.com>
578         * sysdeps/unix/sysv/linux/pthread_getname.c (pthread_getname_np):
579         Fix type mismatch.
581 2010-07-03  Ulrich Drepper  <drepper@redhat.com>
583         * tst-abstime.c (do_test): Some more cleanups
585 2010-07-02  Ulrich Drepper  <drepper@redhat.com>
587         * tst-abstime.c: Correct testing and add test for sem_timedwait.
589 2010-07-01  Andreas Schwab  <schwab@redhat.com>
590             Ulrich Drepper  <drepper@redhat.com>
592         * Makefile (tests): Add tst-abstime.
593         * tst-abstime.c: New file.
594         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
595         (__lll_timedlock_wait): Check for timestamp before the Epoch.
596         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
597         (__lll_timedlock_wait): Likewise.
598         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
599         (__lll_robust_timedlock_wait): Likewise.
600         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
601         (__pthread_cond_timedwait): Likewise.
602         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
603         (pthread_rwlock_timedrdlock): Likewise.
604         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
605         (pthread_rwlock_timedwrlock): Likewise.
606         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
607         Likewise.
609 2010-07-01  Ulrich Drepper  <drepper@redhat.com>
611         * Makefile (tst-_res1): Add tst-_res1mod1 to dependency list.
613 2010-06-01  Takashi Yoshii  <takashi.yoshii.zj@renesas.com>
615         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Fix incorrect
616         location of ifndef __ASSUME_FUTEX_CLOCK_REALTIME.
618 2010-04-09  Ulrich Drepper  <drepper@redhat.com>
620         [BZ #11390]
621         * sysdeps/unix/sysv/linux/pthread_getname.c: New file.
622         * sysdeps/unix/sysv/linux/pthread_setname.c: New file.
623         * nptl/sysdeps/pthread/pthread.h: Declare pthread_getname and
624         pthread_setname.
625         * Makefile (libpthread-routines): Add pthread_getname and
626         pthread_setname.
627         * Versions: Export pthread_getname and pthread_setname for GLIBC_2.12.
629 2010-04-05  Thomas Schwinge  <thomas@schwinge.name>
631         * sysdeps/pthread/unwind-resume.c: Moved to main tree sysdeps/gnu/.
632         * sysdeps/pthread/rt-unwind-resume.c: Likewise.
633         * sysdeps/pthread/Makefile: Remove csu section and rt section's
634         unwind-resume bits, now in main tree sysdeps/gnu/Makefile instead.
636 2010-03-23  Luis Machado  <luisgpm@br.ibm.com>
638         * pthread_cond_timedwait.c: Add check for
639         HAVE_CLOCK_GETTIME_VSYSCALL to use VDSO whenever possible.
640         (pthread_cond_timedwait): Use INTERNAL_VSYSCALL instead of
641         INTERNAL_SYSCALL.
643 2010-03-09  Ulrich Drepper  <drepper@redhat.com>
645         * pthread_create.c (__pthread_create_2_1): If priorities are incorrect
646         and the call fails wake eventually waiting setxid threads.  Don't free
647         stack here if we try starting a thread.
648         * sysdeps/pthread/createthread.c (do_clone): Only wake setxid waiter
649         if the clone call failed.
651 2010-03-08  Andreas Schwab  <schwab@redhat.com>
653         * pthread_create.c (__pthread_create_2_1): Don't set setxid_futex.
654         * allocatestack.c (get_cached_stack): Set setxid_futex.
655         (allocate_stack): Likewise.
657 2010-03-05  Andreas Schwab  <schwab@redhat.com>
658             Ulrich Drepper  <drepper@redhat.com>
660         * allocatestack.c (setxid_mark_thread): Delay handling of thread if
661         it is creating a thread or it is just being created.
662         * pthread_create.c (start_thread): Wake setxid thread if it is
663         waiting.
664         (__pthread_create_2_1): Initialize setxid_futex.
665         * sysdeps/pthread/createthread.c (do_clone): Wake setxid thread if it
666         is waiting.
668 2010-01-15  Ulrich Drepper  <drepper@redhat.com>
670         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
671         Fix unwind info.
672         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
674 2010-01-15  Michal Schmidt  <mschmidt@redhat.com>
676         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
677         Fix pthread_cond_timedwait with requeue-PI.
678         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
679         Fix pthread_cond_wait with requeue-PI.
681 2010-01-14  Ulrich Drepper  <drepper@redhat.com>
683         * Versions: Add pthread_mutex_consistent, pthread_mutexattr_getrobust,
684         and pthread_mutexattr_setrobust for GLIBC_2.12.
685         * pthread_mutex_consistent.c: Define alias pthread_mutex_consistent.
686         * pthread_mutexattr_getrobust.c: Define alias
687         pthread_mutexattr_getrobust.
688         * pthread_mutexattr_setrobust.c: Define alias
689         pthread_mutexattr_setrobust.
691 2010-01-12  Ulrich Drepper  <drepper@redhat.com>
693         * sysdeps/pthread/pthread.h: Cleanup.  Fix up for XPG7.
695 2010-01-08  Ulrich Drepper  <drepper@redhat.com>
697         * sysdeps/pthread/pthread.h: Fix pthread_mutex_consistent declaration.
699 2009-12-18  Thomas Schwinge  <thomas@codesourcery.com>
701         * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c (_init): Don't
702         call __gmon_start__.
703         * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c (_init): Likewise.
705 2009-12-17  Ulrich Drepper  <drepper@redhat.com>
707         * pthread_rwlock_init.c (__pthread_rwlock_init): Simplify code by
708         using memset.
710 2009-12-01  Dinakar Guniguntala  <dino@in.ibm.com>
712         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.h: Define
713         FUTEX_WAIT_REQUEUE_PI and FUTEX_CMP_REQUEUE_PI.
714         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: If mutex
715         is a non robust PI mutex, then use FUTEX_CMP_REQUEUE_PI.
716         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
717         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: If mutex
718         is a non robust PI mutex, then use FUTEX_WAIT_REQUEUE_PI.
719         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
721 2009-12-12  Ulrich Drepper  <drepper@redhat.com>
723         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
724         Don't update nwaiters after invalid timeout is recognized.
726 2009-11-27  Thomas Schwinge  <thomas@codesourcery.com>
728         * sysdeps/unix/sysv/linux/sh/pt-initfini.c (_init): Don't call
729         __gmon_start__.
731 2009-11-27  Andreas Schwab  <schwab@redhat.com>
733         * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Reload
734         THREAD_SELF->cancelhandling after returning from futex call.
736 2009-11-24  Ulrich Drepper  <drepper@redhat.com>
738         * tst-sem13.c: New file.
739         * Makefile (tests): Add tst-sem13.
741 2009-11-22  Roland McGrath  <roland@redhat.com>
743         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: # include "i686/dl-sysdep.h"
744         instead of recapitulating its contents.
746 2009-11-18  Ulrich Drepper  <drepper@redhat.com>
748         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Minor
749         optimizations and cleanups.
751 2009-11-18  Dinakar Guniguntala  <dino@in.ibm.com>
753         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
754         Remove redundant code. Fix cfi offsets.
755         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
756         Fix cfi offsets.
758 2009-11-17  Ulrich Drepper  <drepper@redhat.com>
760         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Minimally
761         reduce size of unwind info.
763         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Convert to use
764         cfi directives.
765         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
766         Based on a patch by Dinakar Guniguntala <dino@in.ibm.com>.
768 2009-11-03  Andreas Schwab  <schwab@linux-m68k.org>
770         [BZ #4457]
771         * sysdeps/pthread/unwind-resume.c: Include <libgcc_s.h> and use
772         LIBGCC_S_SO.
773         * sysdeps/pthread/unwind-forcedunwind.c: Likewise.
775 2009-10-30  Ulrich Drepper  <drepper@redhat.com>
777         * tst-sem11.c (main): Rewrite to avoid aliasing problems.
779         [BZ #3270]
780         * allocatestack.c (__nptl_setxid): Perform the operation in multiple
781         steps to avoid races with creation and terminations.
782         * nptl-init.c (sighandler_setxid): Adjust.
783         Patch by Daniel Jacobowitz.
785 2009-09-07  Andreas Schwab  <schwab@redhat.com>
787         * sysdeps/pthread/bits/libc-lock.h (BP_SYM): Remove space before paren.
789 2009-09-02  Suzuki K P  <suzuki@in.ibm.com>
790             Joseph Myers  <joseph@codesourcery.com>
792         [BZ #7094]
793         * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
794         Initialize the sigev_notify field for newly created timer to make sure
795         the timer gets deleted from the active timer's list upon timer_delete.
797 2009-08-27  Andrew Stubbs  <ams@codesourcery.com>
799         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
800         Correct a logic error.
802 2009-08-25  Ulrich Drepper  <drepper@redhat.com>
804         * sysdeps/x86_64/tls.h (RTLD_ENABLE_FOREIGN_CALL): Store old value
805         of the field in local variables.
806         (RTLD_FINALIZE_FOREIGN_CALL): Restore rtld_must_xmm_save from local
807         variable and don't unconditionally clear it.
809 2009-08-24  Ulrich Drepper  <drepper@redhat.com>
811         * pthread_create.c (start_thread): Hint to the kernel that memory for
812         the stack can be reused.  We do not mark all the memory.  The part
813         still in use and some reserve are kept.
815 2009-08-23  Ulrich Drepper  <drepper@redhat.com>
817         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Clean up namespace.
819 2009-08-11  Ulrich Drepper  <drepper@redhat.com>
821         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Add CFI
822         directives.
824 2009-08-10  Ulrich Drepper  <drepper@redhat.com>
826         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Add CFI
827         directives.
828         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
830 2009-08-10  Andreas Schwab  <schwab@redhat.com>
832         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
833         (__pthread_cond_signal): Don't clobber register used for syscall
834         number.
836 2009-08-08  Ulrich Drepper  <drepper@redhat.com>
838         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
839         Optimize code path used when FUTEX_CLOCK_REALTIME is supported.
841         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
842         (__pthread_cond_wait): Optimize by avoiding use of callee-safe
843         register.
845 2009-08-07  Ulrich Drepper  <drepper@redhat.com>
847         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Little optimizations
848         enabled by the special *_asynccancel functions.
849         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
850         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
852         * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Include lowlevellock.h.
854 2009-08-04  Ulrich Drepper  <drepper@redhat.com>
856         * sysdeps/unix/sysv/linux/x86_64/cancellation.S: New file.
857         * sysdeps/unix/sysv/linux/x86_64/libc-cancellation.S: New file.
858         * sysdeps/unix/sysv/linux/x86_64/librt-cancellation.S: New file.
859         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Optimize
860         since we can assume the special __*_{en,dis}able_asynccancel
861         functions.
862         (PUSHARGS_*, POPARGS_*, SAVESTK_*, RESTSTK_*): Removed.
863         * sysdeps/x86_64/tcb-offsets.sym: Add cancellation-related bits
864         and PTHREAD_CANCELED.
866 2009-07-31  Ulrich Drepper  <drepper@redhat.com>
868         * descr.h: Better definition of *_BITMASK macros for cancellation.
870 2009-07-29  Ulrich Drepper  <drepper@redhat.com>
872         * sysdeps/x86_64/tls.h (TLS_TCB_ALIGN): Define explicitly to 32.
874         * sysdeps/x86_64/tls.h (tcbhead_t): Add room for SSE registers the
875         dynamic linker might have to save.
876         Define RTLD_CHECK_FOREIGN_CALL, RTLD_ENABLE_FOREIGN_CALL,
877         RTLD_PREPARE_FOREIGN_CALL, and RTLD_FINALIZE_FOREIGN_CALL.  Pretty
878         printing.
880         * sysdeps/x86_64/tcb-offsets.sym: Add RTLD_SAVESPACE_SSE.
882 2009-07-28  Ulrich Drepper  <drepper@redhat.com>
884         * pthread_mutex_lock.c [NO_INCR] (__pthread_mutex_cond_lock_adjust):
885         New function.
886         * pthreadP.h: Declare __pthread_mutex_cond_lock_adjust.
887         * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: Add ROBUST_BIT.
888         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Don't use
889         requeue_pi for robust mutexes.
890         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
891         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
892         Don't only skip __pthread_mutex_cond_lock.  Call instead
893         __pthread_mutex_cond_lock_adjust.
894         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
896         * pthread_mutex_unlock.c (__pthread_mutex_unlock_full): Minor
897         optimization of PI mutex handling.
899 2009-07-27  Ulrich Drepper  <drepper@redhat.com>
901         [BZ #10418]
902         * pthread_mutex_unlock.c (__pthread_mutex_unlock_full): Use _rel
903         instead of of _acq variants of cmpxchg.
905 2009-07-23  Ulrich Drepper  <drepper@redhat.com>
907         * sysdeps/x86_64/configure.in: New file.
909         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix error
910         path when not using absolute timeout futex.
912 2009-07-20  Ulrich Drepper  <drepper@redhat.com>
914         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Minor
915         optimizations of last changes.
916         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
918 2009-07-19  Ulrich Drepper  <drepper@redhat.com>
920         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
921         FUTEX_WAIT_REQUEUE_PI and FUTEX_CMP_REQUEUE_PI.
922         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: If mutex
923         is a PI mutex, then use FUTEX_CMP_REQUEUE_PI.
924         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
925         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: If mutex
926         is a PI mutex, then use FUTEX_WAIT_REQUEUE_PI.
927         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
929         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
930         (__pthread_cond_timedwait): Make more robust.
932 2009-07-18  Ulrich Drepper  <drepper@redhat.com>
934         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
935         (__lll_robust_timedlock_wait): If possible use FUTEX_WAIT_BITSET to
936         directly use absolute timeout.
938         * tst-sem5.c (do_test): Add test for premature timeout.
939         * Makefile: Linu tst-sem5 with librt.
941         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
942         (pthread_rwlock_timedwrlock): If possible use FUTEX_WAIT_BITSET to
943         directly use absolute timeout.
944         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
945         (pthread_rwlock_timedrdlock): Likewise.
947         * tst-cond11.c (run_test): Add test to check that the timeout is
948         long enough.
950         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
951         (__pthread_cond_timedwait): If possible use FUTEX_WAIT_BITSET to
952         directly use absolute timeout.
954         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
955         (__pthread_cond_wait): Convert to using exception handler instead of
956         registered unwind buffer.
957         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
958         (__pthread_cond_timedwait): Likewise.
960 2009-07-17  Ulrich Drepper  <drepper@redhat.com>
962         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
963         If possible use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME to directly
964         use absolute timeout.
966         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Optimize
967         handling of uncontested semaphore.
969         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
970         (__condvar_cleanup): Rewrite to use cfi directives instead of
971         hand-coded unwind tables.
972         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S (__pthread_once):
973         Likewise.
974         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
975         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
976         Likewise.
978 2009-06-12  Ulrich Drepper  <drepper@redhat.com>
980         * Makefile (libpthread-routines): Add pthread_sigqueue.
981         * Versions: Add pthread_sigqueue for GLIBC_2.11.
982         * sysdeps/pthread/bits/sigthread.h: Declare pthread_sigqueue.
983         * sysdeps/unix/sysv/linux/pthread_sigqueue.c: New file.
985 2009-06-11  Ulrich Drepper  <drepper@redhat.com>
987         [BZ #10262]
988         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
989         (LOAD_FUTEX_WAIT_ABS): Fix futex parameter in case private futexes
990         cannot be assumed.
991         Patch by Bryan Kadzban <bz-glibc@kdzbn.homelinux.net>.
993 2009-05-16  Ulrich Drepper  <drepper@redhat.com>
995         * libc-cancellation.c: Move __libc_cleanup_routine to...
996         * libc-cleanup.c: ...here.  New file.
997         * Makefile (routines): Add libc-cleanup.
999         * cancellation.c (__pthread_disable_asynccancel): Remove unnecessary
1000         test.
1001         * libc-cancellation.c: Use <nptl/cancellation.c: to define the code.
1002         * sysdeps/pthread/librt-cancellation.c: Likewise.
1004         [BZ #9924]
1005         * nptl-init.c: Renamed from init.c.
1006         * Makefile: Change all occurences of init.c to nptl-init.c.
1008 2009-05-15  Ulrich Drepper  <drepper@redhat.com>
1010         * cancellation.c (__pthread_disable_asynccancel): Correct the bits
1011         to test when deciding on the delay.
1012         * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
1013         * pthread_cancel.c: Close race between deciding on sending a signal
1014         and setting the CANCELING_BIT bit.
1016         * cancellation.c (__pthread_disable_asynccancel): Don't return if
1017         thread is canceled.
1018         * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
1020 2009-04-27  Ulrich Drepper  <drepper@redhat.com>
1022         * cancellation.c (__pthread_disable_asynccancel): Use THREAD_ATOMIC_AND
1023         is available.
1024         * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
1025         * sysdeps/x86_64/tls.h: Define THREAD_ATOMIC_AND.
1026         * sysdeps/i386/tls.h: Likewise.
1027         (tcbhead_t): Add __private_tm member.
1029 2009-04-26  Ulrich Drepper  <drepper@redhat.com>
1031         * sem_open.c (sem_open): Rewrite initialization of initsem to
1032         avoid warnings.
1034         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
1035         Avoid warning by using may_alias attribute on ptrhack.
1037 2009-04-22  Ulrich Drepper  <drepper@redhat.com>
1039         [BZ #10090]
1040         * pthread_attr_setschedparam.c (__pthread_attr_setschedparam):
1041         Check policy and priority for validity.
1042         Patch mostly by Zhang Xiliang <zhangxiliang@cn.fujitsu.com>.
1044 2009-03-15  Ulrich Drepper  <drepper@redhat.com>
1046         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1047         (__pthread_cond_timedwait): Change to use cfi directives instead of
1048         hand-coded unwind sections.
1050 2009-03-10  Ulrich Drepper  <drepper@redhat.com>
1052         * init.c (nptl_freeres): Compile only for SHARED.
1054 2009-03-09  Jakub Jelinek  <jakub@redhat.com>
1056         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Define
1057         FUTEX_WAIT_BITSET, FUTEX_WAKE_BITSET, FUTEX_CLOCK_REALTIME and
1058         FUTEX_BITSET_MATCH_ANY.
1060 2009-02-27  Roland McGrath  <roland@redhat.com>
1062         * init.c (__nptl_initial_report_events): Mark __attribute_used__.
1063         * pthread_create.c (__nptl_threads_events, __nptl_last_event): Likewise.
1065 2009-02-26  Ulrich Drepper  <drepper@redhat.com>
1067         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
1068         _POSIX_THREAD_ROBUST_PRIO_INHERIT and
1069         _POSIX_THREAD_ROBUST_PRIO_PROTECT.  Reset value of macros from
1070         200112L to 200809L.
1072 2009-02-25  Ulrich Drepper  <drepper@redhat.com>
1074         * sysdeps/pthread/pthread.h: The robust mutex functions are in
1075         POSIX 2008.
1077 2009-02-24  Ulrich Drepper  <drepper@redhat.com>
1079         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_BITS_POSIX_OPT_H):
1080         Unify name of include protector macro.
1082 2009-02-14  SUGIOKA Toshinobu  <sugioka@itonet.co.jp>
1084         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
1085         LOAD_FUTEX_WAIT_ABS even if (FUTEX_WAIT == 0).
1087 2009-01-29  Ulrich Drepper  <drepper@redhat.com>
1089         * sysdeps/pthread/unwind-forcedunwind.c: Encrypt all function
1090         pointer variables.
1092         * allocatestack.c (__free_stacks): Renamed from free_stacks.
1093         (__free_stack_cache): Removed.  Change callers to call __free_stacks.
1094         * init.c (nptl_freeres): New function.
1095         (pthread_functions): Initialize ptr_freeres to nptl_freeres.
1096         * pthreadP.h: Don't declare __free_stack_cache.  Declare __free_stacks.
1097         * sysdeps/pthread/unwind-forcedunwind.c (libgcc_s_handle): New
1098         variable.
1099         (pthread_cancel_init): Depend in libgcc_s_handle for decision to
1100         load DSO.  Assign last.
1101         (__unwind_freeres): New function.
1103         * allocatestack.c (__reclaim_stacks): Reset in_flight_stack later
1104         for better debugging.  No need to use stack_list_add here.
1106 2009-01-14  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1108         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
1109         (__lll_timedlock_wait): Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME
1110         instead of computing relative timeout.
1111         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
1112         FUTEX_CLOCK_REALTIME and FUTEX_BITSET_MATCH_ANY.
1114 2009-01-25  Ulrich Drepper  <drepper@redhat.com>
1116         * pthread_mutex_lock.c (__pthread_mutex_lock): Remove unused label out.
1118 2009-01-08  Ulrich Drepper  <drepper@redhat.com>
1120         * sysdeps/pthread/list.h (list_add): Initialize new element first.
1121         (list_add_tail): Removed.
1123 2009-01-07  Ulrich Drepper  <drepper@redhat.com>
1125         * (in_flight_stack): New variable.
1126         (stack_list_del): New function.  Use instead of list_del.
1127         (stack_list_add): New function.  Use instead of list_add when adding to
1128         stack_cache and stack_used lists.
1129         (__reclaim_stacks): Complete operations on stack_cache and stack_used lists
1130         when the fork call interrupted another thread.
1132 2009-01-04  Ulrich Drepper  <drepper@redhat.com>
1134         * init.c (__pthread_initialize_minimal_internal): Optimize test
1135         FUTEX_CLOCK_REALTIME a bit.
1137 2009-01-03  Ulrich Drepper  <drepper@redhat.com>
1139         * init.c (__pthread_initialize_minimal_internal): Cheat a bit by
1140         only passing five parameters to FUTEX_WAIT_BITSET call.
1142         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
1143         (__lll_timedlock_wait): Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME
1144         instead of computing relative timeout.
1146 2009-01-02  Ulrich Drepper  <drepper@redhat.com>
1148         * init.c (__pthread_initialize_minimal_internal): Check for
1149         FUTEX_CLOCK_REALTIME flag.
1150         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
1151         Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME instead of computing
1152         relative timeout.
1154         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
1155         FUTEX_CLOCK_REALTIME and FUTEX_BITSET_MATCH_ANY.
1156         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
1157         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
1158         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
1159         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
1161 2008-12-09  Ulrich Drepper  <drepper@redhat.com>
1163         * sysdeps/pthread/pthread.h (pthread_cleanup_pop): Use { } as empty
1164         loop body instead of ; to avoid gcc warnings.
1165         (pthread_cleanup_pop_restore_np): Likewise.
1166         Patch by Caolán McNamara <caolanm@redhat.com>.
1168 2008-12-09  Jakub Jelinek  <jakub@redhat.com>
1170         * pthread_mutex_lock.c (__pthread_mutex_lock): Handle only the
1171         fast path here, for robust/PI/PP mutexes call
1172         __pthread_mutex_lock_full.  Don't use switch, instead use a series
1173         of ifs according to their probability.
1174         (__pthread_mutex_lock_full): New function.
1175         * pthread_mutex_unlock.c: Include assert.h.
1176         (__pthread_mutex_unlock_usercnt): Handle only the
1177         fast path here, for robust/PI/PP mutexes call
1178         __pthread_mutex_unlock_full.  Don't use switch, instead use a series
1179         of ifs according to their probability.
1180         (__pthread_mutex_unlock_full): New function.
1181         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c
1182         (__pthread_mutex_lock_full): Define.
1184 2008-12-08  Ulrich Drepper  <drepper@redhat.com>
1186         * sysdeps/x86_64/tls.h (tcbhead_t): Add fields reserved for TM
1187         implementation.  Add necessary padding and.
1188         * descr.h (struct pthread): Increase padding for tcbhead_t to 24
1189         words.
1191 2008-12-04  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1193         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define FUTEX_WAIT_BITSET
1194         and FUTEX_WAKE_BITSET.
1196 2008-12-02  Ulrich Drepper  <drepper@redhat.com>
1198         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_WAIT_BITSET
1199         and FUTEX_WAKE_BITSET.
1200         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
1201         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
1202         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
1203         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
1205 2008-11-25  Roland McGrath  <roland@redhat.com>
1207         * sysdeps/alpha, sysdeps/unix/sysv/linux/alpha:
1208         Subdirectories moved to ports repository as
1209         sysdeps/.../nptl subdirectories.
1211 2008-11-12  Jakub Jelinek  <jakub@redhat.com>
1213         [BZ #7008]
1214         * pthread_condattr_setclock.c (pthread_condattr_setclock): Fix masking
1215         of old value.
1216         * pthread_cond_init.c (__pthread_cond_init): Fix
1217         cond->__data.__nwaiters initialization.
1218         * Makefile (tests): Add tst-cond23.
1219         * tst-cond23.c: New test.
1221 2008-11-07  Jakub Jelinek  <jakub@redhat.com>
1223         * sysdeps/pthread/malloc-machine.h (MALLOC): Adjust __libc_tsd_define
1224         arguments.
1225         (tsd_setspecific, tsd_getspecific): Adjust __libc_tsd_{set,get}
1226         arguments.
1228 2008-11-01  Ulrich Drepper  <drepper@redhat.com>
1230         [BZ #6955]
1231         * pthread_mutex_lock.c: Add support for private PI mutexes.
1232         * pthread_mutex_timedlock.c: Likewise.
1233         * pthread_mutex_trylock.c: Likewise.
1234         * pthread_mutex_unlock.c: Likewise.
1235         Patch mostly by Ben Jackson <ben@ben.com>.
1237 2008-10-31  Ulrich Drepper  <drepper@redhat.com>
1239         [BZ #6843]
1240         * sysdeps/pthread/gai_misc.h (__gai_create_helper_thread):
1241         Increase stack size for helper thread.
1243 2008-10-06  Martin Schwidefsky  <schwidefsky@de.ibm.com>
1245         * sysdeps/s390/tls.h (THREAD_SET_STACK_GUARD): Add empty inline
1246         assembly with a clobber list for access registers a0 and a1.
1248 2008-09-11  Martin Schwidefsky  <schwidefsky@de.ibm.com>
1250         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Add memory barrier
1251         to force runp->refcntr to be read from memory.
1253 2008-09-08  Richard Guenther  <rguenther@suse.de>
1255         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_lock,
1256         lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
1257         lll_timedlock, lll_robust_timedlock, lll_unlock,
1258         lll_robust_unlock): Promote private to int.
1260 2008-08-15  Ulrich Drepper  <drepper@redhat.com>
1262         * sysdeps/x86_64/pthreaddef.h: Remove ARCH_MAP_FLAGS and
1263         ARCH_RETRY_MMAP definitions.
1264         * allocatestack.c: Remove definition of ARCH_MAP_FLAGS.
1265         Define MAP_STACK when not defined.
1266         (allocate_stack): Use MAP_STACK instead of ARCH_MAP_FLAGS.  Remove
1267         handling of ARCH_RETRY_MMAP.
1269 2008-07-30  Ulrich Drepper  <drepper@redhat.com>
1271         * tst-align2.c (f): Print message that f is reached.
1273 2008-04-28  Hiroki Kaminaga  <kaminaga@sm.sony.co.jp>
1275         [BZ #6740]
1276         * sysdeps/powerpc/tcb-offsets.sym (PRIVATE_FUTEX_OFFSET): Guard symbol
1277         definition with #ifndef __ASSUME_PRIVATE_FUTEX.
1279 2008-07-25  Ulrich Drepper  <drepper@redhat.com>
1281         * sysdeps/unix/sysv/linux/mq_notify.c (init_mq_netlink): Use
1282         SOCK_CLOEXEC if possible.
1284 2008-05-29  Ulrich Drepper  <drepper@redhat.com>
1286         * Makefile (tests): Add tst-rwlock2a.
1287         * tst-rwlock2.c: Use TYPE macro to decide what rwlock type to use.
1288         * tst-rwlock2a.c: New file.
1290 2008-06-12  Ulrich Drepper  <drepper@redhat.com>
1292         * sysdeps/pthread/pthread.h: Remove inadvertant checkin.
1294 2008-05-17  Samuel Thibault  <samuel.thibault@ens-lyon.org>
1296         * sysdeps/pthread/pthread.h: Fix typo in comment.
1298 2008-05-28  Ulrich Drepper  <drepper@redhat.com>
1300         * sysdeps/pthread/createthread.c (do_clone): Pass accurate length
1301         of CPU set to the kernel.
1303 2008-05-23  Paul Pluzhnikov  <ppluzhnikov@google.com>
1305         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Add
1306         cfi directives.
1307         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
1308         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
1309         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
1310         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
1311         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
1312         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
1314 2008-05-22  Paul Pluzhnikov  <ppluzhnikov@google.com>
1316         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S: Add
1317         cfi directives.
1318         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1319         Likewise.
1320         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
1321         Likewise.
1322         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1323         Likewise.
1325 2008-05-26  Ulrich Drepper  <drepper@redhat.com>
1327         * tst-typesizes.c: Explicitly check __SIZEOF_PTHREAD_* constants.
1329 2008-05-20  Jakub Jelinek  <jakub@redhat.com>
1331         David S. Miller  <davem@davemloft.net>
1333         * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: New file.
1335 2008-05-10  Ulrich Drepper  <drepper@redhat.com>
1337         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Access
1338         __pshared correctly.
1339         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1340         Likewise.
1341         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1342         Likewise.
1343         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
1344         Likewise.
1345         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
1346         Likewise.
1347         Reported by Clemens Kolbitsch <clemens.kol@gmx.at>.
1349 2008-04-14  David S. Miller  <davem@davemloft.net>
1351         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
1352         (__old_sem_wait): Fix argument to lll_futex_wait().
1354 2007-11-26  Daniel Jacobowitz  <dan@codesourcery.com>
1356         * pthread_create.c: Require pthread_mutex_trylock and
1357         pthread_key_delete for libgcc.
1359 2008-04-08  Jakub Jelinek  <jakub@redhat.com>
1361         [BZ #6020]
1362         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h
1363         (lll_futex_wake_unlock): Add private argument to the pre-v9 macro.
1364         Patch by Sunil Amitkumar Janki <devel.sjanki@gmail.com>.
1366 2008-03-27  Ulrich Drepper  <drepper@redhat.com>
1368         * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine ARG_MAX if
1369         <linux/limits.h> has defined it.
1370         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
1371         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
1372         * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
1373         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
1375 2008-03-18  Jakub Jelinek  <jakub@redhat.com>
1377         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Use __ASSEMBLER__ instead
1378         of ASSEMBLER.
1379         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
1380         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Likewise.
1382 2008-03-14  Ulrich Drepper  <drepper@redhat.com>
1384         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
1385         HAVE_DL_DISCOVER_OSVERSION.
1386         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
1387         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Likewise.
1389 2008-03-07  Ulrich Drepper  <drepper@redhat.com>
1391         [BZ #5778]
1392         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Change
1393         _POSIX_CHOWN_RESTRICTED value to zero.
1395 2008-01-31  Roland McGrath  <roland@redhat.com>
1397         * Makefile (omit-deps): Variable removed.
1399 2008-01-30  Ulrich Drepper  <drepper@redhat.com>
1401         * sysdeps/unix/sysv/linux/x86_64/sem_post.S (sem_post): Avoid
1402         unnecessary addr32 prefix.
1404 2008-01-29  Roland McGrath  <roland@redhat.com>
1406         * Makeconfig (ptw-CPPFLAGS, sysd-rules-patterns): New variables.
1408 2008-01-22  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1410         * sysdeps/unix/sysv/linux/sh/sem_post.S: Don't overflow value field.
1412 2008-01-21  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1414         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XADD): Use
1415         a scratch register.
1416         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
1417         (__lll_lock_wait_private): Fix typo.
1418         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
1419         (pthread_barrier_wait): Likewise.  Adjust XADD use.
1420         * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
1421         Adjust XADD use.
1422         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S
1423         (pthread_rwlock_timedrdlock): Return correct return value.
1424         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S
1425         (pthread_rwlock_timedwrlock): Likewise.
1427 2008-01-15  Ulrich Drepper  <drepper@redhat.com>
1429         * tst-eintr2.c (do_test): make sure that if mutex_lock in main
1430         thread returns the program exits with an error code.
1432 2008-01-10  Ulrich Drepper  <drepper@redhat.com>
1434         * pthread-errnos.sym: Add EOVERFLOW.
1435         * sysdeps/unix/sysv/linux/structsem.sym: Add SEM_VALUE_MAX.
1436         * sysdeps/unix/sysv/linux/sem_post.c: Don't overflow value field.
1437         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
1438         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
1440 2007-12-14  Ulrich Drepper  <drepper@redhat.com>
1442         * sysdeps/x86_64/pthreaddef.h (ARCH_RETRY_MMAP): Take additional
1443         parameter.  Passed it as permission to mmap.
1444         * allocatestack.c (allocate_stack): Pass prot as second parameter
1445         to ARCH_RETRY_MMAP.
1447 2007-12-12  Ulrich Drepper  <drepper@redhat.com>
1449         * tst-basic7.c: Allocate memory for the stack.
1451         [BZ #5465]
1452         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S [!SHARED]
1453         (__pthread_cond_timedwait): Don't use VDSO.
1454         Patch by Michal Januszewski.
1456 2007-12-07  Ulrich Drepper  <drepper@redhat.com>
1458         [BZ #5455]
1459         * sysdeps/pthread/pthread.h [!__EXCEPTIONS] (pthread_cleanup_pop):
1460         Allow label before pthread_cleanup_pop.
1461         (pthread_cleanup_pop_restore_np): Likewise.
1463 2007-12-04  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1465         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
1466         Store 2 before returning ETIMEDOUT.
1468 2007-11-23  Ulrich Drepper  <drepper@redhat.com>
1470         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
1471         Store 2 before returning ETIMEDOUT.
1472         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise
1473         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
1474         (__lll_lock_wait_private): Optimize.
1475         (__lll_lock_wait): Likewise.
1477 2007-11-20  Jakub Jelinek  <jakub@redhat.com>
1479         * sysdeps/pthread/pthread.h (pthread_cleanup_push,
1480         pthread_cleanup_push_defer_np): Add extra (void *) cast to shut up
1481         g++ 4.1 and 4.2 -Wstrict-aliasing warnings.
1483 2007-11-08  Ulrich Drepper  <drepper@redhat.com>
1485         [BZ #5240]
1486         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
1487         If we time out, try one last time to lock the futex to avoid
1488         losing a wakeup signal.
1489         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
1490         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
1492         [BZ #5245]
1493         * sysdeps/pthread/createthread.c (do_clone): Translate clone error
1494         if necessary.
1496 2007-11-07  Ulrich Drepper  <drepper@redhat.com>
1498         [BZ #5245]
1499         * allocatestack.c (allocate_stack): Change ENOMEM error in case
1500         mmap failed to EAGAIN.
1501         * Makefile (tests): Add tst-basic7.
1502         * tst-basic7.c: New file.
1504 2007-11-05  Ulrich Drepper  <drepper@redhat.com>
1506         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
1507         Use __linkin_atfork.
1509 2007-11-03  Mike Frysinger  <vapier@gentoo.org>
1511         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (LOAD_FUTEX_WAIT): Add
1512         missing line continuations.
1513         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S (LOAD_FUTEX_WAIT,
1514         LOAD_FUTEX_WAKE): Likewise.  Also add missing 3rd parameter.
1516 2007-10-28  Ulrich Drepper  <drepper@redhat.com>
1518         [BZ #5220]
1519         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Declare
1520         __active_timer_sigev_thread and __active_timer_sigev_thread_lock.
1521         (struct timer): Add next element.
1522         * sysdeps/unix/sysv/linux/timer_create.c: For SIGEV_THREAD timers,
1523         enqueue timer structure into __active_timer_sigev_thread list.
1524         * sysdeps/unix/sysv/linux/timer_delete.c: For SIGEV_THREAD timers,
1525         remove timer struct from __active_timer_sigev_thread.
1526         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
1527         Before using timer structure make sure it is still on the
1528         __active_timer_sigev_thread list.  Keep lock until done.
1529         Define __active_timer_sigev_thread and
1530         __active_timer_sigev_thread_lock.
1532 2007-10-27  Ulrich Drepper  <drepper@redhat.com>
1534         * sysdeps/pthread/malloc-machine.h: Define ATFORK_MEM.
1535         Redefine thread_atfork for use of ATFORK_MEM.
1536         * sysdeps/unix/sysv/linux/fork.h: Define __linkin_atfork.
1537         * sysdeps/unix/sysv/linux/register-atfork.c (__linkin_atfork): New
1538         function.
1539         * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
1540         Use atomic operation when removing first element of list.
1542 2007-10-17  Jakub Jelinek  <jakub@redhat.com>
1544         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__old_sem_post): New
1545         routine instead of an alias to __new_sem_post.
1547 2007-10-15  Jakub Jelinek  <jakub@redhat.com>
1549         * init.c (__pthread_initialize_minimal): Initialize word to appease
1550         valgrind.
1552 2007-10-10  Jakub Jelinek  <jakub@redhat.com>
1554         * sysdeps/pthread/bits/libc-lock.h (__libc_rwlock_init): Inside of
1555         libc.so just clear NAME.
1556         (__libc_rwlock_fini): Nop inside of libc.so.
1557         * tst-initializers1.c (main): Test if PTHREAD_RWLOCK_INITIALIZER is
1558         all zeros.
1560 2007-09-02  Ulrich Drepper  <drepper@redhat.com>
1562         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
1563         (__pthread_cond_wait): Fix unlocking of internal lock after mutex
1564         unlocking failed.
1565         Patch by Luca Barbieri <luca.barbieri@gmail.com>.
1567 2007-08-21  Ulrich Drepper  <drepper@redhat.com>
1569         [BZ #4938]
1570         * allocatestack.c (__reclaim_stacks): Clear the TSD in the
1571         reclaimed stack if necessary.
1572         * Makefile (tests): Add tst-tsd6.
1573         * tst-tsd6.c: New file.
1575 2007-08-21  Jakub Jelinek  <jakub@redhat.com>
1577         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_dead):
1578         Add private argument.
1580 2007-08-20  Ulrich Drepper  <drepper@redhat.com>
1582         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1583         (__pthread_cond_timedwait): Use clock_gettime from VDSO if possible.
1585 2007-08-16  Jakub Jelinek  <jakub@redhat.com>
1587         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h
1588         (__lll_robust_timedlock): Pass private as last argument to
1589         __lll_robust_timedlock_wait.
1590         (__lll_unlock): Fix a pasto.
1592 2007-08-15  Jakub Jelinek  <jakub@redhat.com>
1594         * sysdeps/unix/sysv/linux/sparc/internaltypes.h (sparc_new_sem,
1595         sparc_old_sem): New structs.
1596         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
1597         (__sem_wait_cleanup): New function.
1598         (__new_sem_wait): Use sparc_new_sem structure.  Bump and afterwards
1599         decrease nwaiters.  Register __sem_wait_cleanup as cleanup handler.
1600         Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
1601         lll_futex_wait.
1602         (__old_sem_wait): New function.
1603         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: Include
1604         nptl/sysdeps/unix/sysv/linux/sparc version.
1605         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c:
1606         Likewise.
1607         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: Likewise.
1608         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c
1609         (__new_sem_trywait): Use sparc_old_sem structure.
1610         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c
1611         (sem_timedwait): Use sparc_new_sem structure.  Bump and afterwards
1612         decrease nwaiters.  Register __sem_wait_cleanup as cleanup handler.
1613         Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
1614         lll_futex_timed_wait.
1615         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c (__new_sem_post):
1616         Use sparc_new_sem structure.  Only wake if nwaiters > 0.  Pass
1617         isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
1618         lll_futex_wake.
1619         (__old_sem_post): New function.
1620         * sysdeps/unix/sysv/linux/sparc/sem_wait.c: New file.
1621         * sysdeps/unix/sysv/linux/sparc/sem_init.c: New file.
1622         * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c: New file.
1623         * sysdeps/unix/sysv/linux/sparc/sem_post.c: New file.
1624         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: Remove.
1625         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: Remove.
1627 2007-08-14  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1629         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
1630         (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
1631         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
1632         Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
1633         * sysdeps/unix/sysv/linux/shpthread_cond_signal.S
1634         (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
1635         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
1636         Use FUTEX_WAKE_OP.
1637         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
1638         kernel-features.h and tcb-offsets.h.
1639         (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
1640         lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
1641         process private.
1642         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
1643         tcb-offsets.h.
1644         (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE
1645         to lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
1646         process private.
1647         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use #ifdef
1648         __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
1649         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
1650         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
1651         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
1652         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
1653         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
1655 2007-08-14  Jakub Jelinek  <jakub@redhat.com>
1657         * sysdeps/unix/sysv/linux/lowlevellock.c: Comment fix.
1658         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
1659         (__lll_timedwait_tid): Pass LLL_SHARED as 4th argument to
1660         lll_futex_timed_wait.
1662         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (__lll_unlock,
1663         __lll_robust_unlock): Rewrite as macros instead of inline functions.
1664         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_unlock,
1665         __lll_robust_unlock, __lll_wait_tid): Likewise.
1667 2007-08-13  Jakub Jelinek  <jakub@redhat.com>
1669         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
1670         Fix a pasto.
1671         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
1672         (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
1673         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
1674         Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
1675         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
1676         (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
1677         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
1678         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Include
1679         kernel-features.h.
1680         (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
1681         lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
1682         process private.  Switch DW_CFA_advance_loc1 and some
1683         DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
1684         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
1685         (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE to
1686         lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
1687         process private.  Switch DW_CFA_advance_loc{1,2} and some
1688         DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
1689         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use
1690         #ifdef __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
1691         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1692         Likewise.
1693         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
1694         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
1695         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1696         Likewise.
1697         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
1698         (__pthread_cond_broadcast): Compare %r8 instead of
1699         dep_mutex-cond_*(%rdi) with $-1.
1700         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
1701         (__pthread_cond_signal): Xor FUTEX_WAKE_OP with FUTEX_WAKE instead
1702         of oring.
1704 2007-08-13  Ulrich Drepper  <drepper@redhat.com>
1706         * sysdeps/unix/sysv/linux/i386/i786/Implies: New file.
1708 2007-08-13  Jakub Jelinek  <jakub@redhat.com>
1710         * allocatestack.c: Include kernel-features.h.
1711         * pthread_create.c: Likewise.
1712         * pthread_mutex_init.c: Likewise.
1713         * init.c: Likewise.
1714         * pthread_cond_timedwait.c: Likewise.
1715         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
1716         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
1717         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
1718         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
1719         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
1720         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1721         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1722         Likewise.
1723         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1724         Likewise.
1725         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
1726         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
1727         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
1728         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
1730 2007-08-12  Jakub Jelinek  <jakub@redhat.com>
1732         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
1733         [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
1734         byte elements.  One of them is the new __shared element.
1735         [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
1736         adjust names of other padding elements.
1737         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
1738         [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
1739         byte elements.  One of them is the new __shared element.
1740         [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
1741         adjust names of other padding elements.
1742         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_rwlock_t):
1743         Renamed __pad1 element to __shared, adjust names of other padding
1744         elements.
1745         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
1746         (pthread_rwlock_t): Likewise.
1747         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock): Fix a
1748         typo.
1750 2007-08-09  Anton Blanchard  <anton@samba.org>
1752         * sysdeps/unix/sysv/linux/powerpc/pthread_spin_unlock.c: New file.
1754 2007-08-12  Ulrich Drepper  <drepper@redhat.com>
1756         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Include
1757         <kernel-features.h>.
1758         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1760 2007-08-11  Ulrich Drepper  <drepper@redhat.com>
1762         * pthreadP.h (PTHREAD_ROBUST_MUTEX_PSHARED): Define.
1763         * pthread_mutex_lock.c: Use it instead of PTHREAD_MUTEX_PSHARED when
1764         dealing with robust mutexes.
1765         * pthread_mutex_timedlock.c: Likewise.
1766         * pthread_mutex_trylock.c: Likewise.
1767         * pthread_mutex_unlock.c: Likewise.
1768         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
1770 2007-08-06  Jakub Jelinek  <jakub@redhat.com>
1772         * pthreadP.h (PTHREAD_MUTEX_PSHARED_BIT): Define.
1773         (PTHREAD_MUTEX_TYPE): Mask __kind with 127.
1774         (PTHREAD_MUTEX_PSHARED): Define.
1775         * pthread_mutex_init.c (__pthread_mutex_init): Set
1776         PTHREAD_MUTEX_PSHARED_BIT for pshared or robust
1777         mutexes.
1778         * pthread_mutex_lock.c (LLL_MUTEX_LOCK): Take mutex as argument
1779         instead of its __data.__lock field, pass PTHREAD_MUTEX_PSHARED
1780         as second argument to lll_lock.
1781         (LLL_MUTEX_TRYLOCK): Take mutex as argument
1782         instead of its __data.__lock field.
1783         (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
1784         __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
1785         to lll_robust_lock.
1786         (__pthread_mutex_lock): Update LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
1787         LLL_ROBUST_MUTEX_LOCK users, use PTHREAD_MUTEX_TYPE (mutex)
1788         instead of mutex->__data.__kind directly, pass
1789         PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock and lll_futex_wait.
1790         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Use
1791         PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
1792         directly, pass PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock.
1793         (pthread_mutex_timedlock): Pass PTHREAD_MUTEX_PSHARED (mutex)
1794         to lll_timedlock, lll_robust_timedlock, lll_unlock and
1795         lll_futex_timed_wait.  Use PTHREAD_MUTEX_TYPE (mutex) instead
1796         of mutex->__data.__kind directly.
1797         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Pass
1798         PTHREAD_MUTEX_PSHARED (mutex) to lll_timedlock,
1799         lll_robust_timedlock, lll_unlock and lll_futex_timed_wait.  Use
1800         PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind directly.
1801         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Pass
1802         PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock, lll_robust_unlock
1803         and lll_futex_wake.
1804         * pthread_mutex_setprioceiling.c (pthread_mutex_setprioceiling): Pass
1805         PTHREAD_MUTEX_PSHARED (mutex) to lll_futex_wait and lll_futex_wake.
1806         Use PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
1807         directly.
1808         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK):
1809         Take mutex as argument instead of its __data.__lock field, pass
1810         PTHREAD_MUTEX_PSHARED as second argument to lll_cond_lock.
1811         (LLL_MUTEX_TRYLOCK): Take mutex as argument instead of its
1812         __data.__lock field.
1813         (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
1814         __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
1815         to lll_robust_cond_lock.
1816         * pthread_cond_broadcast.c (__pthread_cond_broadcast): Add pshared
1817         variable, pass it to lll_lock, lll_unlock, lll_futex_requeue and
1818         lll_futex_wake.  Don't use lll_futex_requeue if dependent mutex
1819         has PTHREAD_MUTEX_PSHARED_BIT bit set in its __data.__kind.
1820         * pthread_cond_destroy.c (__pthread_cond_destroy): Add pshared
1821         variable, pass it to lll_lock, lll_unlock, lll_futex_wake and
1822         lll_futex_wait.
1823         * pthread_cond_signal.c (__pthread_cond_signal): Add pshared
1824         variable, pass it to lll_lock, lll_unlock, lll_futex_wake_unlock and
1825         lll_futex_wake.
1826         * pthread_cond_timedwait.c (__pthread_cond_wait): Add
1827         pshared variable, pass it to lll_lock, lll_unlock,
1828         lll_futex_timedwait and lll_futex_wake.
1829         * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait): Add
1830         pshared variable, pass it to lll_lock, lll_unlock, lll_futex_wait
1831         and lll_futex_wake.
1832         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_requeue,
1833         lll_futex_wake_unlock): Add private argument, use __lll_private_flag
1834         macro.
1835         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue,
1836         lll_futex_wake_unlock): Likewise.
1837         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_requeue):
1838         Likewise.
1839         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_futex_requeue,
1840         lll_futex_wake_unlock): Likewise.
1841         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_requeue):
1842         Likewise.
1843         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue,
1844         lll_futex_wake_unlock): Likewise.
1845         (lll_futex_wake): Fix a typo.
1846         * sysdeps/unix/sysv/linux/pthread-pi-defines.sym (PS_BIT): Add.
1847         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
1848         (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
1849         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
1850         Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
1851         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
1852         (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
1853         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
1854         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1855         (__pthread_cond_timedwait): Likewise.
1856         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
1857         (__condvar_cleanup, __pthread_cond_wait): Likewise.
1859 2007-08-05  Jakub Jelinek  <jakub@redhat.com>
1861         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
1862         Don't use CGOTSETUP and CGOTRESTORE macros.
1863         (CGOTSETUP, CGOTRESTORE): Remove.
1864         <IS_IN_rtld> (CENABLE, CDISABLE): Don't use JUMPTARGET, branch to
1865         @local symbol.
1867 2007-08-01  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1869         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Remove
1870         definitions for private futexes.
1871         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Include
1872         kernel-features.h and lowlevellock.h.  Use private futexes if
1873         they are available.
1874         (__lll_lock_wait_private, __lll_unlock_wake_private): New.
1875         (__lll_mutex_lock_wait): Rename to
1876         (__lll_lock_wait): ... this.  Don't compile in for libc.so.
1877         (__lll_mutex_timedlock_wait): Rename to ...
1878         (__lll_timedlock_wait): ... this.  Use __NR_gettimeofday.
1879         Don't compile in for libc.so.
1880         (__lll_mutex_unlock_wake): Rename to ...
1881         (__lll_unlock_wake): ... this.  Don't compile in for libc.so.
1882         (__lll_timedwait_tid): Use __NR_gettimeofday.
1883         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Allow including
1884         the header from assembler.  Renamed all lll_mutex_* resp.
1885         lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
1886         Renamed all LLL_MUTEX_LOCK_* macros to LLL_LOCK_*.
1887         (FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE):
1888         Define.
1889         (__lll_lock_wait_private): Add prototype.
1890         (__lll_lock_wait, __lll_timedlock_wait, __lll_robust_lock_wait,
1891         __lll_robust_timedlock_wait, __lll_unlock_wake_private,
1892         __lll_unlock_wake): Likewise.
1893         (lll_lock): Add private argument.  Call __lll_lock_wait_private
1894         if private is constant LLL_PRIVATE.
1895         (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
1896         lll_timedlock, lll_robust_timedlock): Add private argument.
1897         (lll_unlock): Add private argument.  Call __lll_unlock_wake_private
1898         if private is constant LLL_PRIVATE.
1899         (lll_robust_unlock, lll_robust_dead): Add private argument.
1900         (lll_lock_t): Remove.
1901         (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
1902         __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
1903         lll_cond_wake, lll_cond_broadcast): Remove.
1904         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: Include
1905         kernel-features.h and lowlevellock.h.
1906         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
1907         (LOAD_FUTEX_WAIT): Define.
1908         (__lll_robust_mutex_lock_wait): Rename to ...
1909         (__lll_robust_lock_wait): ... this.  Add private argument.
1910         Use LOAD_FUTEX_WAIT macro.
1911         (__lll_robust_mutex_timedlock_wait): Rename to ...
1912         (__lll_robust_timedlock_wait): ... this.    Add private argument.
1913         Use __NR_gettimeofday.  Use LOAD_FUTEX_WAIT macro.
1914         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Include
1915         lowlevellock.h.
1916         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
1917         (pthread_barrier_wait): Use __lll_{lock,unlock}_* instead of
1918         __lll_mutex_{lock,unlock}_*.
1919         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Include
1920         lowlevellock.h and pthread-errnos.h.
1921         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
1922         FUTEX_CMP_REQUEUE, EINVAL): Remove.
1923         (__pthread_cond_broadcast): Use __lll_{lock,unlock}_* instead of
1924         __lll_mutex_{lock,unlock}_*.
1925         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Include
1926         lowlevellock.h and pthread-errnos.h.
1927         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE, EINVAL): Remove.
1928         (__pthread_cond_signal): Use __lll_{lock,unlock}_* instead of
1929         __lll_mutex_{lock,unlock}_*.
1930         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
1931         lowlevellock.h.
1932         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE): Remove.
1933         (__pthread_cond_timedwait): Use __lll_{lock,unlock}_* instead of
1934         __lll_mutex_{lock,unlock}_*.  Use __NR_gettimeofday.
1935         (__condvar_tw_cleanup): Likewise.
1936         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
1937         lowlevellock.h.
1938         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
1939         (__pthread_cond_wait): Use __lll_{lock,unlock}_* instead of
1940         __lll_mutex_{lock,unlock}_*.
1941         ( __condvar_w_cleanup): Likewise.
1942         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Include lowlevellock.h.
1943         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
1944         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Include
1945         lowlevellock.h.
1946         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
1947         (__pthread_rwlock_rdlock): Use __lll_{lock,unlock}_* instead of
1948         __lll_mutex_{lock,unlock}_*.
1949         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Include
1950         lowlevellock.h.
1951         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
1952         FUTEX_PRIVATE_FLAG): Remove.
1953         (pthread_rwlock_timedrdlock): Use __lll_{lock,unlock}_* instead of
1954         __lll_mutex_{lock,unlock}_*.  Use __NR_gettimeofday.
1955         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Include
1956         lowlevellock.h.
1957         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
1958         FUTEX_PRIVATE_FLAG): Remove.
1959         (pthread_rwlock_timedwrlock): Use __lll_{lock,unlock}_* instead of
1960         __lll_mutex_{lock,unlock}_*.  Use __NR_gettimeofday.
1961         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Include
1962         lowlevellock.h.
1963         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
1964         (__pthread_rwlock_unlock): Use __lll_{lock,unlock}_* instead of
1965         __lll_mutex_{lock,unlock}_*.
1966         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Include
1967         lowlevellock.h.
1968         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
1969         (__pthread_rwlock_wrlock): Use __lll_{lock,unlock}_* instead of
1970         __lll_mutex_{lock,unlock}_*.
1971         * sysdeps/unix/sysv/linux/sh/sem_post.S: Include lowlevellock.h.
1972         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
1973         (__new_sem_post): Use standard initial exec code sequences.
1974         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Include
1975         lowlevellock.h.
1976         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
1977         FUTEX_PRIVATE_FLAG): Remove.
1978         (sem_timedwait): Use __NR_gettimeofday.  Use standard initial
1979         exec code sequences.
1980         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Include lowlevellock.h.
1981         (__new_sem_trywait): Use standard initial exec code sequences.
1982         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Include lowlevellock.h.
1983         (__new_sem_wait): Use standard initial exec code sequences.
1985 2007-07-31  Anton Blanchard  <anton@samba.org>
1987         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
1988         Use __asm __volatile (__lll_acq_instr ::: "memory") instead of
1989         atomic_full_barrier.
1991 2007-07-31  Jakub Jelinek  <jakub@redhat.com>
1993         * allocatestack.c (stack_cache_lock): Change type to int.
1994         (get_cached_stack, allocate_stack, __deallocate_stack,
1995         __make_stacks_executable, __find_thread_by_id, __nptl_setxid,
1996         __pthread_init_static_tls, __wait_lookup_done): Add LLL_PRIVATE
1997         as second argument to lll_lock and lll_unlock macros on
1998         stack_cache_lock.
1999         * pthread_create.c (__find_in_stack_list): Likewise.
2000         (start_thread): Similarly with pd->lock.  Use lll_robust_dead
2001         macro instead of lll_robust_mutex_dead, pass LLL_SHARED to it
2002         as second argument.
2003         * descr.h (struct pthread): Change lock and setxid_futex field
2004         type to int.
2005         * old_pthread_cond_broadcast.c (__pthread_cond_broadcast_2_0): Use
2006         LLL_LOCK_INITIALIZER instead of LLL_MUTEX_LOCK_INITIALIZER.
2007         * old_pthread_cond_signal.c (__pthread_cond_signal_2_0): Likewise.
2008         * old_pthread_cond_timedwait.c (__pthread_cond_timedwait_2_0):
2009         Likewise.
2010         * old_pthread_cond_wait.c (__pthread_cond_wait_2_0): Likewise.
2011         * pthread_cond_init.c (__pthread_cond_init): Likewise.
2012         * pthreadP.h (__attr_list_lock): Change type to int.
2013         * pthread_attr_init.c (__attr_list_lock): Likewise.
2014         * pthread_barrier_destroy.c (pthread_barrier_destroy): Pass
2015         ibarrier->private ^ FUTEX_PRIVATE_FLAG as second argument to
2016         lll_{,un}lock.
2017         * pthread_barrier_wait.c (pthread_barrier_wait): Likewise and
2018         also for lll_futex_{wake,wait}.
2019         * pthread_barrier_init.c (pthread_barrier_init): Make iattr
2020         a pointer to const.
2021         * pthread_cond_broadcast.c (__pthread_cond_broadcast): Pass
2022         LLL_SHARED as second argument to lll_{,un}lock.
2023         * pthread_cond_destroy.c (__pthread_cond_destroy): Likewise.
2024         * pthread_cond_signal.c (__pthread_cond_singal): Likewise.
2025         * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
2026         * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait):
2027         Likewise.
2028         * pthread_getattr_np.c (pthread_getattr_np): Add LLL_PRIVATE
2029         as second argument to lll_{,un}lock macros on pd->lock.
2030         * pthread_getschedparam.c (__pthread_getschedparam): Likewise.
2031         * pthread_setschedparam.c (__pthread_setschedparam): Likewise.
2032         * pthread_setschedprio.c (pthread_setschedprio): Likewise.
2033         * tpp.c (__pthread_tpp_change_priority, __pthread_current_priority):
2034         Likewise.
2035         * sysdeps/pthread/createthread.c (do_clone, create_thread):
2036         Likewise.
2037         * pthread_once.c (once_lock): Change type to int.
2038         (__pthread_once): Pass LLL_PRIVATE as second argument to
2039         lll_{,un}lock macros on once_lock.
2040         * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Use
2041         lll_{,un}lock macros instead of lll_mutex_{,un}lock, pass
2042         rwlock->__data.__shared as second argument to them and similarly
2043         for lll_futex_w*.
2044         * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock):
2045         Likewise.
2046         * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock):
2047         Likewise.
2048         * pthread_rwlock_tryrdlock.c (__pthread_rwlock_tryrdlock): Likewise.
2049         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Likewise.
2050         * pthread_rwlock_unlock.c (__pthread_rwlock_unlock): Likewise.
2051         * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
2052         * sem_close.c (sem_close): Pass LLL_PRIVATE as second argument
2053         to lll_{,un}lock macros on __sem_mappings_lock.
2054         * sem_open.c (check_add_mapping): Likewise.
2055         (__sem_mappings_lock): Change type to int.
2056         * semaphoreP.h (__sem_mappings_lock): Likewise.
2057         * pthread_mutex_lock.c (LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
2058         LLL_ROBUST_MUTEX_LOCK): Use lll_{,try,robust_}lock macros
2059         instead of lll_*mutex_*, pass LLL_SHARED as last
2060         argument.
2061         (__pthread_mutex_lock): Use lll_unlock instead of lll_mutex_unlock,
2062         pass LLL_SHARED as last argument.
2063         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK,
2064         LLL_MUTEX_TRYLOCK, LLL_ROBUST_MUTEX_LOCK): Use
2065         lll_{cond_,cond_try,robust_cond}lock macros instead of lll_*mutex_*,
2066         pass LLL_SHARED as last argument.
2067         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
2068         lll_{timed,try,robust_timed,un}lock instead of lll_*mutex*, pass
2069         LLL_SHARED as last argument.
2070         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Similarly.
2071         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt):
2072         Similarly.
2073         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_lock,
2074         __libc_lock_lock_recursive, __libc_lock_unlock,
2075         __libc_lock_unlock_recursive): Pass LLL_PRIVATE as second
2076         argument to lll_{,un}lock.
2077         * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_lock,
2078         _IO_lock_unlock): Likewise.
2079         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Don't use
2080         compound literal.
2081         * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
2082         Pass LLL_PRIVATE as second argument to lll_{,un}lock macros on
2083         __fork_lock.
2084         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork,
2085         free_mem): Likewise.
2086         (__fork_lock): Change type to int.
2087         * sysdeps/unix/sysv/linux/fork.h (__fork_lock): Likewise.
2088         * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Pass
2089         isem->private ^ FUTEX_PRIVATE_FLAG as second argument to
2090         lll_futex_wake.
2091         * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
2092         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Likewise.
2093         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait_private):
2094         New function.
2095         (__lll_lock_wait, __lll_timedlock_wait): Add private argument and
2096         pass it through to lll_futex_*wait, only compile in when
2097         IS_IN_libpthread.
2098         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
2099         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): Add private
2100         argument and pass it through to lll_futex_*wait.
2101         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Renamed all
2102         lll_mutex_* resp. lll_robust_mutex_* macros to lll_* resp.
2103         lll_robust_*.  Renamed all __lll_mutex_* resp. __lll_robust_mutex_*
2104         inline functions to __lll_* resp. __lll_robust_*.
2105         (LLL_MUTEX_LOCK_INITIALIZER): Remove.
2106         (lll_mutex_dead): Add private argument.
2107         (__lll_lock_wait_private): New prototype.
2108         (__lll_lock_wait, __lll_robust_lock_wait, __lll_lock_timedwait,
2109         __lll_robust_lock_timedwait): Add private argument to prototypes.
2110         (__lll_lock): Add private argument, if it is constant LLL_PRIVATE,
2111         call __lll_lock_wait_private, otherwise pass private to
2112         __lll_lock_wait.
2113         (__lll_robust_lock, __lll_cond_lock, __lll_timedlock,
2114         __lll_robust_timedlock): Add private argument, pass it to
2115         __lll_*wait functions.
2116         (__lll_unlock): Add private argument, if it is constant LLL_PRIVATE,
2117         call __lll_unlock_wake_private, otherwise pass private to
2118         __lll_unlock_wake.
2119         (__lll_robust_unlock): Add private argument, pass it to
2120         __lll_robust_unlock_wake.
2121         (lll_lock, lll_robust_lock, lll_cond_lock, lll_timedlock,
2122         lll_robust_timedlock, lll_unlock, lll_robust_unlock): Add private
2123         argument, pass it through to __lll_* inline function.
2124         (__lll_mutex_unlock_force, lll_mutex_unlock_force): Remove.
2125         (lll_lock_t): Remove.
2126         (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
2127         __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
2128         lll_cond_wake, lll_cond_broadcast): Remove.
2129         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2130         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2131         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2132         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
2133         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Allow including
2134         the header from assembler.  Renamed all lll_mutex_* resp.
2135         lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
2136         (LOCK, FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP,
2137         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
2138         (LLL_MUTEX_LOCK_INITIALIZER, LLL_MUTEX_LOCK_INITIALIZER_LOCKED,
2139         LLL_MUTEX_LOCK_INITIALIZER_WAITERS): Remove.
2140         (__lll_mutex_lock_wait, __lll_mutex_timedlock_wait,
2141         __lll_mutex_unlock_wake, __lll_lock_wait, __lll_unlock_wake):
2142         Remove prototype.
2143         (__lll_trylock_asm, __lll_lock_asm_start, __lll_unlock_asm): Define.
2144         (lll_robust_trylock, lll_cond_trylock): Use LLL_LOCK_INITIALIZER*
2145         rather than LLL_MUTEX_LOCK_INITIALIZER* macros.
2146         (lll_trylock): Likewise, use __lll_trylock_asm, pass
2147         MULTIPLE_THREADS_OFFSET as another asm operand.
2148         (lll_lock): Add private argument, use __lll_lock_asm_start, pass
2149         MULTIPLE_THREADS_OFFSET as last asm operand, call
2150         __lll_lock_wait_private if private is constant LLL_PRIVATE,
2151         otherwise pass private as another argument to __lll_lock_wait.
2152         (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
2153         lll_timedlock, lll_robust_timedlock): Add private argument, pass
2154         private as another argument to __lll_*lock_wait call.
2155         (lll_unlock): Add private argument, use __lll_unlock_asm, pass
2156         MULTIPLE_THREADS_OFFSET as another asm operand, call
2157         __lll_unlock_wake_private if private is constant LLL_PRIVATE,
2158         otherwise pass private as another argument to __lll_unlock_wake.
2159         (lll_robust_unlock): Add private argument, pass private as another
2160         argument to __lll_unlock_wake.
2161         (lll_robust_dead): Add private argument, use __lll_private_flag
2162         macro.
2163         (lll_islocked): Use LLL_LOCK_INITIALIZER instead of
2164         LLL_MUTEX_LOCK_INITIALIZER.
2165         (lll_lock_t): Remove.
2166         (LLL_LOCK_INITIALIZER_WAITERS): Define.
2167         (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
2168         __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
2169         lll_cond_wake, lll_cond_broadcast): Remove.
2170         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2171         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Revert
2172         2007-05-2{3,9} changes.
2173         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Include
2174         kernel-features.h and lowlevellock.h.
2175         (LOAD_PRIVATE_FUTEX_WAIT): Define.
2176         (LOAD_FUTEX_WAIT): Rewritten.
2177         (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
2178         define.
2179         (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
2180         (__lll_mutex_lock_wait): Rename to ...
2181         (__lll_lock_wait): ... this.  Take futex addr from %edx instead of
2182         %ecx, %ecx is now private argument.  Don't compile in for libc.so.
2183         (__lll_mutex_timedlock_wait): Rename to ...
2184         (__lll_timedlock_wait): ... this.  Use __NR_gettimeofday.  %esi
2185         contains private argument.  Don't compile in for libc.so.
2186         (__lll_mutex_unlock_wake): Rename to ...
2187         (__lll_unlock_wake): ... this.  %ecx contains private argument.
2188         Don't compile in for libc.so.
2189         (__lll_timedwait_tid): Use __NR_gettimeofday.
2190         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Include
2191         kernel-features.h and lowlevellock.h.
2192         (LOAD_FUTEX_WAIT): Define.
2193         (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
2194         define.
2195         (__lll_robust_mutex_lock_wait): Rename to ...
2196         (__lll_robust_lock_wait): ... this.  Futex addr is now in %edx
2197         argument, %ecx argument contains private.  Use LOAD_FUTEX_WAIT
2198         macro.
2199         (__lll_robust_mutex_timedlock_wait): Rename to ...
2200         (__lll_robust_timedlock_wait): ... this.  Use __NR_gettimeofday.
2201         %esi argument contains private, use LOAD_FUTEX_WAIT macro.
2202         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Include
2203         lowlevellock.h.
2204         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2205         (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
2206         PRIVATE(%ebx) ^ LLL_SHARED as private argument in %ecx to
2207         __lll_lock_wait and __lll_unlock_wake, pass MUTEX(%ebx) address
2208         to __lll_lock_wait in %edx.
2209         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
2210         Include lowlevellock.h and pthread-errnos.h.
2211         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
2212         FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
2213         (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*, pass
2214         cond_lock address in %edx rather than %ecx to __lll_lock_wait,
2215         pass LLL_SHARED in %ecx to both __lll_lock_wait and
2216         __lll_unlock_wake.
2217         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
2218         Include lowlevellock.h and pthread-errnos.h.
2219         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
2220         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
2221         (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*, pass
2222         cond_lock address in %edx rather than %ecx to __lll_lock_wait,
2223         pass LLL_SHARED in %ecx to both __lll_lock_wait and
2224         __lll_unlock_wake.
2225         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
2226         Include lowlevellock.h.
2227         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
2228         Don't define.
2229         (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*, pass
2230         cond_lock address in %edx rather than %ecx to __lll_lock_wait,
2231         pass LLL_SHARED in %ecx to both __lll_lock_wait and
2232         __lll_unlock_wake.  Use __NR_gettimeofday.
2233         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
2234         Include lowlevellock.h.
2235         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2236         (__pthread_cond_wait, __condvar_w_cleanup): Rename __lll_mutex_*
2237         to __lll_*, pass cond_lock address in %edx rather than %ecx to
2238         __lll_lock_wait, pass LLL_SHARED in %ecx to both __lll_lock_wait
2239         and __lll_unlock_wake.
2240         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S:
2241         Include lowlevellock.h.
2242         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2243         (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*, pass
2244         MUTEX(%ebx) address in %edx rather than %ecx to
2245         __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
2246         and __lll_unlock_wake.  Move return value from %ecx to %edx
2247         register.
2248         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2249         Include lowlevellock.h.
2250         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
2251         Don't define.
2252         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
2253         MUTEX(%ebp) address in %edx rather than %ecx to
2254         __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
2255         and __lll_unlock_wake.  Move return value from %ecx to %edx
2256         register.  Use __NR_gettimeofday.
2257         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2258         Include lowlevellock.h.
2259         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
2260         Don't define.
2261         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
2262         MUTEX(%ebp) address in %edx rather than %ecx to
2263         __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
2264         and __lll_unlock_wake.  Move return value from %ecx to %edx
2265         register.  Use __NR_gettimeofday.
2266         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
2267         Include lowlevellock.h.
2268         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2269         (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*, pass
2270         MUTEX(%edi) address in %edx rather than %ecx to
2271         __lll_lock_wait, pass PSHARED(%edi) in %ecx to both __lll_lock_wait
2272         and __lll_unlock_wake.
2273         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
2274         Include lowlevellock.h.
2275         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2276         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
2277         MUTEX(%ebx) address in %edx rather than %ecx to
2278         __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
2279         and __lll_unlock_wake.  Move return value from %ecx to %edx
2280         register.
2281         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Include
2282         lowlevellock.h.
2283         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
2284         define.
2285         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Include lowlevellock.h.
2286         (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
2287         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Include
2288         lowlevellock.h.
2289         (LOCK, SYS_futex, SYS_gettimeofday, FUTEX_WAIT): Don't define.
2290         (sem_timedwait): Use __NR_gettimeofday.
2291         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Include
2292         lowlevellock.h.
2293         (LOCK): Don't define.
2294         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include
2295         lowlevellock.h.
2296         (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
2297         * sysdeps/unix/sysv/linux/powerpc/sem_post.c: Wake only when there
2298         are waiters.
2299         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Revert
2300         2007-05-2{3,9} changes.
2301         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Include
2302         kernel-features.h and lowlevellock.h.
2303         (LOAD_PRIVATE_FUTEX_WAIT): Define.
2304         (LOAD_FUTEX_WAIT): Rewritten.
2305         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
2306         (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
2307         (__lll_mutex_lock_wait): Rename to ...
2308         (__lll_lock_wait): ... this.  %esi is now private argument.
2309         Don't compile in for libc.so.
2310         (__lll_mutex_timedlock_wait): Rename to ...
2311         (__lll_timedlock_wait): ... this.  %esi contains private argument.
2312         Don't compile in for libc.so.
2313         (__lll_mutex_unlock_wake): Rename to ...
2314         (__lll_unlock_wake): ... this.  %esi contains private argument.
2315         Don't compile in for libc.so.
2316         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Include
2317         kernel-features.h and lowlevellock.h.
2318         (LOAD_FUTEX_WAIT): Define.
2319         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
2320         (__lll_robust_mutex_lock_wait): Rename to ...
2321         (__lll_robust_lock_wait): ... this.  %esi argument contains private.
2322         Use LOAD_FUTEX_WAIT macro.
2323         (__lll_robust_mutex_timedlock_wait): Rename to ...
2324         (__lll_robust_timedlock_wait): ... this. %esi argument contains
2325         private, use LOAD_FUTEX_WAIT macro.
2326         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Include
2327         lowlevellock.h.
2328         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2329         (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
2330         PRIVATE(%rdi) ^ LLL_SHARED as private argument in %esi to
2331         __lll_lock_wait and __lll_unlock_wake.
2332         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S:
2333         Include lowlevellock.h and pthread-errnos.h.
2334         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
2335         FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
2336         (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*,
2337         pass LLL_SHARED in %esi to both __lll_lock_wait and
2338         __lll_unlock_wake.
2339         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S:
2340         Include lowlevellock.h and pthread-errnos.h.
2341         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
2342         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
2343         (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*,
2344         pass LLL_SHARED in %esi to both __lll_lock_wait and
2345         __lll_unlock_wake.
2346         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:
2347         Include lowlevellock.h.
2348         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2349         (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*,
2350         pass LLL_SHARED in %esi to both __lll_lock_wait and
2351         __lll_unlock_wake.
2352         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
2353         Include lowlevellock.h.
2354         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2355         (__pthread_cond_wait, __condvar_cleanup): Rename __lll_mutex_*
2356         to __lll_*, pass LLL_SHARED in %esi to both __lll_lock_wait
2357         and __lll_unlock_wake.
2358         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S:
2359         Include lowlevellock.h.
2360         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
2361         Don't define.
2362         (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*,
2363         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
2364         and __lll_unlock_wake.
2365         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
2366         Include lowlevellock.h.
2367         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
2368         Don't define.
2369         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
2370         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
2371         and __lll_unlock_wake.
2372         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
2373         Include lowlevellock.h.
2374         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
2375         Don't define.
2376         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
2377         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
2378         and __lll_unlock_wake.
2379         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S:
2380         Include lowlevellock.h.
2381         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
2382         Don't define.
2383         (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*,
2384         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
2385         and __lll_unlock_wake.
2386         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S:
2387         Include lowlevellock.h.
2388         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
2389         Don't define.
2390         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
2391         pass PSHARED(%rdi) in %ecx to both __lll_lock_wait
2392         and __lll_unlock_wake.
2393         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Include
2394         lowlevellock.h.
2395         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
2396         define.
2397         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Include lowlevellock.h.
2398         (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
2399         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Include
2400         lowlevellock.h.
2401         (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
2402         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Include
2403         lowlevellock.h.
2404         (LOCK): Don't define.
2405         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Include
2406         lowlevellock.h.
2407         (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
2408         * sysdeps/unix/sysv/linux/sparc/internaltypes.h: New file.
2409         * sysdeps/unix/sysv/linux/sparc/pthread_barrier_destroy.c: New file.
2410         * sysdeps/unix/sysv/linux/sparc/pthread_barrier_init.c: New file.
2411         * sysdeps/unix/sysv/linux/sparc/pthread_barrier_wait.c: New file.
2412         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
2413         (__lll_lock_wait_private): New function.
2414         (__lll_lock_wait, __lll_timedlock_wait): Add private argument, pass
2415         it to lll_futex_*wait.  Don't compile in for libc.so.
2416         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c:
2417         Remove.
2418         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c
2419         (struct sparc_pthread_barrier): Remove.
2420         (pthread_barrier_wait): Use union sparc_pthread_barrier instead of
2421         struct sparc_pthread_barrier.  Pass
2422         ibarrier->s.pshared ? LLL_SHARED : LLL_PRIVATE to lll_{,un}lock
2423         and lll_futex_wait macros.
2424         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
2425         Remove.
2426         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
2427         Include sparc pthread_barrier_wait.c instead of generic one.
2429 2007-07-30  Jakub Jelinek  <jakub@redhat.com>
2431         * tst-rwlock14.c (do_test): Avoid warnings on 32-bit arches.
2433         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
2434         (pthread_rwlock_timedrdlock): Copy futex retval to %esi rather than
2435         %ecx.
2436         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
2437         (pthread_rwlock_timedwrlock): Likewise.
2438         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
2439         (__pthread_rwlock_unlock): Fix MUTEX != 0 args to __lll_*.
2441 2007-07-31  Jakub Jelinek  <jakub@redhat.com>
2443         * sysdeps/sparc/tls.h (tcbhead_t): Add private_futex field.
2445 2007-07-26  Jakub Jelinek  <jakub@redhat.com>
2447         * tst-locale2.c (useless): Add return statement.
2449 2007-07-24  Jakub Jelinek  <jakub@redhat.com>
2451         * allocatestack.c (__nptl_setxid, __wait_lookup_done): Replace
2452         lll_private_futex_* (*) with lll_futex_* (*, LLL_PRIVATE).
2453         * pthread_create.c (start_thread): Likewise.
2454         * init.c (sighandler_setxid): Likewise.
2455         * sysdeps/alpha/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
2456         * sysdeps/ia64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
2457         * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
2458         * sysdeps/s390/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
2459         * sysdeps/powerpc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
2460         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
2461         * sysdeps/sparc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
2462         * sysdeps/sh/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
2463         * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY, AIO_MISC_WAIT):
2464         Likewise.
2465         * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY, GAI_MISC_WAIT):
2466         Likewise.
2467         * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
2468         Likewise.
2469         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_waitzero,
2470         __rtld_notify): Likewise.
2471         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Likewise.
2472         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (clear_once_control,
2473         __pthread_once): Likewise.
2474         * sysdeps/unix/sysv/linux/alpha/pthread_once.c (clear_once_control,
2475         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
2476         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_PRIVATE_FLAG,
2477         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
2478         (lll_futex_wait): Add private argument, define as wrapper around
2479         lll_futex_timed_wait.
2480         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
2481         use __lll_private_flag macro.
2482         (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
2483         __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
2484         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (clear_once_control,
2485         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
2486         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_PRIVATE_FLAG,
2487         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
2488         (lll_futex_wait): Add private argument, define as wrapper around
2489         lll_futex_timed_wait.
2490         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
2491         use __lll_private_flag macro.
2492         (__lll_mutex_unlock, __lll_robust_mutex_unlock, lll_wait_tid,
2493         __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
2494         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
2495         Define.
2496         (lll_futex_timed_wait, lll_futex_wake): Use it.
2497         (lll_private_futex_wait, lll_private_futex_timed_wait,
2498         lll_private_futex_wake): Removed.
2499         * sysdeps/unix/sysv/linux/s390/pthread_once.c (clear_once_control,
2500         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
2501         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_PRIVATE_FLAG,
2502         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
2503         (lll_futex_wait): Add private argument, define as wrapper around
2504         lll_futex_timed_wait.
2505         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
2506         use __lll_private_flag macro.
2507         (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
2508         lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
2509         to lll_futex_*.
2510         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
2511         (lll_private_futex_wait, lll_private_futex_timed_wait,
2512         lll_private_futex_wake): Removed.
2513         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_private_flag):
2514         Fix !__ASSUME_PRIVATE_FUTEX non-constant private case.
2515         (lll_private_futex_wait, lll_private_futex_timed_wait,
2516         lll_private_futex_wake): Removed.
2517         * sysdeps/unix/sysv/linux/sparc/pthread_once.c (clear_once_control,
2518         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
2519         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_PRIVATE_FLAG,
2520         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
2521         (lll_futex_wait): Add private argument, define as wrapper around
2522         lll_futex_timed_wait.
2523         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
2524         use __lll_private_flag macro.
2525         (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
2526         lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
2527         to lll_futex_*.
2528         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (__lll_private_flag):
2529         Define.
2530         (lll_futex_timed_wait, lll_futex_wake): Use it.
2531         (lll_private_futex_wait, lll_private_futex_timed_wait,
2532         lll_private_futex_wake): Removed.
2534 2007-07-27  Jakub Jelinek  <jakub@redhat.com>
2536         * sysdeps/sparc/tls.h (tcbhead_t): Move gscope_flag to the end
2537         of the structure for sparc32.
2539 2007-07-26  Aurelien Jarno  <aurelien@aurel32.net>
2541         * sysdeps/sparc/tls.h (tcbhead_t): Add gscope_flag.
2543 2007-07-23  Ulrich Drepper  <drepper@redhat.com>
2545         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
2546         code used when private futexes are assumed.
2547         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
2548         Likewise.
2550 2007-07-23  Jakub Jelinek  <jakub@redhat.com>
2552         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
2553         (__lll_private_flag): Define.
2554         (lll_futex_wait): Define as a wrapper around lll_futex_timed_wait.
2555         (lll_futex_timed_wait, lll_futex_wake, lll_futex_wake_unlock): Use
2556         __lll_private_flag.
2557         (lll_private_futex_wait, lll_private_futex_timedwait,
2558         lll_private_futex_wake): Define as wrapper around non-_private
2559         macros.
2560         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
2561         (__lll_private_flag): Define.
2562         (lll_futex_timed_wait, lll_futex_wake): Use __lll_private_flag.
2563         (lll_private_futex_wait, lll_private_futex_timedwait,
2564         lll_private_futex_wake): Define as wrapper around non-_private
2565         macros.
2567 2007-07-10  Steven Munroe  <sjmunroe@us.ibm.com>
2569         * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Add LLL_SHARED
2570         parameter to lll_futex_wait call.
2571         * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
2573         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
2574         Replace lll_futex_wait with lll_private_futex_wait.
2575         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
2576         Add LLL_SHARED parameter to lll_futex_wake().
2578         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define LLL_PRIVATE
2579         LLL_SHARED, lll_private_futex_wait, lll_private_futex_timed_wait and
2580         lll_private_futex_wake.
2581         (lll_futex_wait): Add private parameter. Adjust FUTEX_PRIVATE_FLAG
2582         bit from private parm before syscall.
2583         (lll_futex_timed_wait): Likewise.
2584         (lll_futex_wake): Likewise.
2585         (lll_futex_wake_unlock): Likewise.
2586         (lll_mutex_unlock): Add LLL_SHARED parm to lll_futex_wake call.
2587         (lll_robust_mutex_unlock): Likewise.
2588         (lll_mutex_unlock_force): Likewise.
2589         (lll_wait_tid): Add LLL_SHARED parm to lll_futex_wait call.
2591 2007-07-23  Ulrich Drepper  <drepper@redhat.com>
2593         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
2594         compilation when unconditionally using private futexes.
2595         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
2596         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
2597         Likewise.
2598         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
2599         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
2601 2007-07-17  Jakub Jelinek  <jakub@redhat.com>
2603         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock_clear_flags2):
2604         Define.
2606 2007-07-06  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2608         * sysdeps/sh/tls.h: Include stdlib.h, list.h, sysdep.h and
2609         kernel-features.h.
2611 2007-05-16  Roland McGrath  <roland@redhat.com>
2613         * init.c (__nptl_initial_report_events): New variable.
2614         (__pthread_initialize_minimal_internal): Initialize pd->report_events
2615         to that.
2617 2007-06-22  Jakub Jelinek  <jakub@redhat.com>
2619         * pthread_getattr_np.c (pthread_getattr_np): Clear cpuset and
2620         cpusetsize if pthread_getaffinity_np failed with ENOSYS.
2622 2007-06-19  Ulrich Drepper  <drepper@redhat.com>
2624         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Remove mrlock
2625         implementation.
2627 2007-06-18  Ulrich Drepper  <drepper@redhat.com>
2629         * pthreadP.h: Define PTHREAD_MUTEX_TYPE.
2630         * phtread_mutex_lock.c: Use PTHREAD_MUTEX_TYPE.
2631         * pthread_mutex_timedlock.c: Likewise.
2632         * pthread_mutex_trylock.c: Likewise.
2633         * pthread_mutex_unlock.c: Likewise.
2635 2007-06-17  Andreas Schwab  <schwab@suse.de>
2637         * sysdeps/pthread/pt-initfini.c: Tell gcc about the nonstandard
2638         sections.
2640 2007-06-17  Ulrich Drepper  <drepper@redhat.com>
2642         * allocatestack.c (allocate_stack): Make code compile if
2643         __ASSUME_PRIVATE_FUTEX is set.
2645 2007-06-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2647         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S:
2648         (__pthread_rwlock_rdlock): Don't use non SH-3/4 instruction.
2649         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S:
2650         (__pthread_rwlock_wrlock): Likewise.
2651         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
2652         (pthread_rwlock_timedrdlock): Likewise.
2653         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
2654         (pthread_rwlock_timedwrlock): Likewise.
2655         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S:
2656         (__pthread_rwlock_unlock): Likewise.
2658 2007-06-10  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2660         * sysdeps/sh/tcb-offsets.sym: Add PRIVATE_FUTEX.
2661         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Include endian.h.
2662         Split __flags into __flags, __shared, __pad1 and __pad2.
2663         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Use private
2664         futexes if they are available.
2665         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Adjust so that change
2666         in libc-lowlevellock.S allow using private futexes.
2667         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
2668         FUTEX_PRIVATE_FLAG.  Add additional parameter to lll_futex_wait,
2669         lll_futex_timed_wait and lll_futex_wake.  Change lll_futex_wait
2670         to call lll_futex_timed_wait.  Add lll_private_futex_wait,
2671         lll_private_futex_timed_wait and lll_private_futex_wake.
2672         (lll_robust_mutex_unlock): Fix typo.
2673         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Use private
2674         field in futex command setup.
2675         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Use
2676         COND_NWAITERS_SHIFT instead of COND_CLOCK_BITS.
2677         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
2678         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use private futexes
2679         if they are available.  Remove clear_once_control.
2680         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Use private
2681         futexes if they are available.
2682         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
2683         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
2684         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
2685         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
2686         * sysdeps/unix/sysv/linux/sh/sem_post.S: Add private futex support.
2687         Wake only when there are waiters.
2688         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add private futex
2689         support.  Indicate that there are waiters.  Remove unnecessary
2690         extra cancellation test.
2691         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.  Removed
2692         left-over duplication of __sem_wait_cleanup.
2694 2007-06-07  Ulrich Drepper  <drepper@redhat.com>
2696         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Add additional
2697         parameter to lll_futex_wait, lll_futex_timed_wait, and
2698         lll_futex_wake.  Change lll_futex_wait to call lll_futex_timed_wait.
2699         Add lll_private_futex_wait, lll_private_futex_timed_wait, and
2700         lll_private_futex_wake.
2701         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
2702         * allocatestack.c: Adjust use of lll_futex_* macros.
2703         * init.c: Likewise.
2704         * lowlevellock.h: Likewise.
2705         * pthread_barrier_wait.c: Likewise.
2706         * pthread_cond_broadcast.c: Likewise.
2707         * pthread_cond_destroy.c: Likewise.
2708         * pthread_cond_signal.c: Likewise.
2709         * pthread_cond_timedwait.c: Likewise.
2710         * pthread_cond_wait.c: Likewise.
2711         * pthread_create.c: Likewise.
2712         * pthread_mutex_lock.c: Likewise.
2713         * pthread_mutex_setprioceiling.c: Likewise.
2714         * pthread_mutex_timedlock.c: Likewise.
2715         * pthread_mutex_unlock.c: Likewise.
2716         * pthread_rwlock_timedrdlock.c: Likewise.
2717         * pthread_rwlock_timedwrlock.c: Likewise.
2718         * pthread_rwlock_unlock.c: Likewise.
2719         * sysdeps/alpha/tls.h: Likewise.
2720         * sysdeps/i386/tls.h: Likewise.
2721         * sysdeps/ia64/tls.h: Likewise.
2722         * sysdeps/powerpc/tls.h: Likewise.
2723         * sysdeps/pthread/aio_misc.h: Likewise.
2724         * sysdeps/pthread/gai_misc.h: Likewise.
2725         * sysdeps/s390/tls.h: Likewise.
2726         * sysdeps/sh/tls.h: Likewise.
2727         * sysdeps/sparc/tls.h: Likewise.
2728         * sysdeps/unix/sysv/linux/fork.c: Likewise.
2729         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
2730         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: Likewise.
2731         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Likewise.
2732         * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
2733         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
2734         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
2735         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
2736         * sysdeps/unix/sysv/linux/sparc/pthread_once.c: Likewise.
2737         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c:
2738         Likewise.
2739         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: Likewise.
2740         * sysdeps/x86_64/tls.h: Likewise.
2742 2007-05-29  Ulrich Drepper  <drepper@redhat.com>
2744         * pthread_getattr_np.c: No need to install a cancellation handler,
2745         this is no cancellation point.
2746         * pthread_getschedparam.c: Likewise.
2747         * pthread_setschedparam.c: Likewise.
2748         * pthread_setschedprio.c: Likewise.
2749         * sysdeps/unix/sysv/linux/lowlevellock.c: Remove all traces of
2750         lll_unlock_wake_cb.
2751         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
2752         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
2753         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
2754         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2755         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2756         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2757         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
2758         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
2759         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
2760         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: Likewise.
2761         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
2762         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2764         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Checking
2765         whether there are more than one thread makes no sense here since
2766         we only call the slow path if the locks are taken.
2767         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Likewise.
2769         * sysdeps/unix/sysv/linux/internaltypes.h: Introduce
2770         COND_NWAITERS_SHIFT.
2771         * pthread_cond_destroy.c: Use COND_NWAITERS_SHIFT instead of
2772         COND_CLOCK_BITS.
2773         * pthread_cond_init.c: Likewise.
2774         * pthread_cond_timedwait.c: Likewise.
2775         * pthread_cond_wait.c: Likewise.
2776         * pthread_condattr_getclock.c: Likewise.
2777         * pthread_condattr_setclock.c: Likewise.
2778         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Likewise.
2779         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2780         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
2781         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
2782         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2784 2007-05-28  Jakub Jelinek  <jakub@redhat.com>
2786         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c: Include
2787         unistd.h.
2789         * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Use explicit
2790         insn suffix.
2791         (THREAD_GSCOPE_GET_FLAG): Remove.
2792         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Remove.
2793         * allocatestack.c (__wait_lookup_done): Revert 2007-05-24
2794         changes.
2795         * sysdeps/powerpc/tls.h (tcbhead_t): Remove gscope_flag.
2796         (THREAD_GSCOPE_GET_FLAG): Remove.
2797         (THREAD_GSCOPE_RESET_FLAG): Use THREAD_SELF->header.gscope_flag
2798         instead of THREAD_GSCOPE_GET_FLAG.
2799         (THREAD_GSCOPE_SET_FLAG): Likewise.  Add atomic_write_barrier after
2800         it.
2801         * sysdeps/s390/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
2802         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
2803         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
2804         THREAD_GSCOPE_WAIT): Define.
2805         * sysdeps/sparc/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
2806         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
2807         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
2808         THREAD_GSCOPE_WAIT): Define.
2809         * sysdeps/sh/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
2810         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
2811         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
2812         THREAD_GSCOPE_WAIT): Define.
2813         * sysdeps/ia64/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
2814         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
2815         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
2816         THREAD_GSCOPE_WAIT): Define.
2818 2007-05-24  Richard Henderson  <rth@redhat.com>
2820         * descr.h (struct pthread): Add header.gscope_flag.
2821         * sysdeps/alpha/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
2822         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
2823         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
2824         THREAD_GSCOPE_WAIT): Define.
2826 2007-05-27  Ulrich Drepper  <drepper@redhat.com>
2828         * init.c: Make it compile with older kernel headers.
2830         * tst-initializers1.c: Show through exit code which test failed.
2832         * pthread_rwlock_init.c: Also initialize __shared field.
2833         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Split __flags
2834         element in rwlock structure into four byte elements.  One of them is
2835         the new __shared element.
2836         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h [__WORDSIZE=32]:
2837         Likewise.
2838         [__WORDSIZE=64]: Renamed __pad1 element int rwlock structure to
2839         __shared, adjust names of other padding elements.
2840         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2841         * sysdeps/pthread/pthread.h: Adjust rwlock initializers.
2842         * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: Add PSHARED.
2843         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define
2844         FUTEX_PRIVATE_FLAG.
2845         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Change main
2846         futex to use private operations if possible.
2847         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
2848         Likewise.
2849         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
2850         Likewise.
2851         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
2852         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
2853         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
2854         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2855         Likewise.
2856         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2857         Likewise.
2858         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
2859         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
2861 2007-05-26  Ulrich Drepper  <drepper@redhat.com>
2863         * pthreadP.h (PTHREAD_RWLOCK_PREFER_READER_P): Define.
2864         * pthread_rwlock_rdlock.c: Use PTHREAD_RWLOCK_PREFER_READER_P.
2865         * pthread_rwlock_timedrdlock.c: Likewise.
2866         * pthread_rwlock_tryrdlock.c: Likewise.
2868         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S (sem_trywait): Tiny
2869         optimization.
2871         * sysdeps/unix/sysv/linux/sem_wait.c: Add missing break.
2872         * sysdeps/unix/sysv/linux/sem_timedwait.c: Removed left-over
2873         duplication of __sem_wait_cleanup.
2875         * allocatestack.c: Revert last change.
2876         * init.c: Likewise.
2877         * sysdeps/i386/tls.h: Likewise.
2878         * sysdeps/x86_64/tls.h: Likewise.
2879         * descr.h [TLS_DTV_AT_TP] (struct pthread): Add private_futex field to
2880         header structure.
2881         * sysdeps/powerpc/tcb-offsets.sym: Add PRIVATE_FUTEX_OFFSET.
2883         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_barrier):
2884         Add private field.
2885         * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: Add PRIVATE definition.
2886         * pthread_barrier_init.c: Set private flag if pshared and private
2887         futexes are supported.
2888         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Use
2889         private field in futex command setup.
2890         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
2892 2007-05-25  Ulrich Drepper  <drepper@redhat.com>
2894         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Add private futex
2895         support.
2896         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
2897         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
2898         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
2899         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
2900         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
2902         * semaphoreP.h: Declare __old_sem_init and __old_sem_wait.
2903         * sem_init.c (__new_sem_init): Rewrite to initialize all three
2904         fields in the structure.
2905         (__old_sem_init): New function.
2906         * sem_open.c: Initialize all fields of the structure.
2907         * sem_getvalue.c: Adjust for renamed element.
2908         * sysdeps/unix/sysv/linux/Makefile [subdir=nptl]
2909         (gen-as-const-headers): Add structsem.sym.
2910         * sysdeps/unix/sysv/linux/structsem.sym: New file.
2911         * sysdeps/unix/sysv/linux/internaltypes.h: Rename struct sem to
2912         struct new_sem.  Add struct old_sem.
2913         * sysdeps/unix/sysv/linux/sem_post.c: Wake only when there are waiters.
2914         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
2915         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
2916         * sysdeps/unix/sysv/linux/sem_wait.c: Indicate that there are waiters.
2917         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
2918         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
2919         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
2920         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
2921         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
2922         * Makefile (tests): Add tst-sem10, tst-sem11, tst-sem12.
2923         * tst-sem10.c: New file.
2924         * tst-sem11.c: New file.
2925         * tst-sem12.c: New file.
2926         * tst-typesizes.c: Test struct new_sem and struct old_sem instead
2927         of struct sem.
2929 2007-05-25  Ulrich Drepper  <drepper@redhat.com>
2930             Jakub Jelinek  <jakub@redhat.com>
2932         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
2933         Move __pthread_enable_asynccancel right before futex syscall.
2934         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
2935         Likewise.
2937 2007-05-24  Jakub Jelinek  <jakub@redhat.com>
2939         * sysdeps/i386/tls.h (THREAD_SET_PRIVATE_FUTEX,
2940         THREAD_COPY_PRIVATE_FUTEX): Define.
2941         * sysdeps/x86_64/tls.h (THREAD_SET_PRIVATE_FUTEX,
2942         THREAD_COPY_PRIVATE_FUTEX): Define.
2943         * allocatestack.c (allocate_stack): Use THREAD_COPY_PRIVATE_FUTEX.
2944         * init.c (__pthread_initialize_minimal_internal): Use
2945         THREAD_SET_PRIVATE_FUTEX.
2947         * sysdeps/powerpc/tls.h (tcbhead_t): Add gscope_flag.
2948         (THREAD_GSCOPE_FLAG_UNUSED, THREAD_GSCOPE_FLAG_USED,
2949         THREAD_GSCOPE_FLAG_WAIT): Define.
2950         (THREAD_GSCOPE_GET_FLAG, THREAD_GSCOPE_SET_FLAG,
2951         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_WAIT): Define.
2952         * sysdeps/i386/tls.h (THREAD_GSCOPE_WAIT): Don't use
2953         PTR_DEMANGLE.
2954         (THREAD_GSCOPE_GET_FLAG): Define.
2955         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Define.
2956         * allocatestack.c (__wait_lookup_done): Use THREAD_GSCOPE_GET_FLAG
2957         instead of ->header.gscope_flag directly.
2959 2007-05-23  Ulrich Drepper  <drepper@redhat.com>
2961         * init.c (__pthread_initialize_minimal_internal): Check whether
2962         private futexes are available.
2963         * allocatestack.c (allocate_stack): Copy private_futex field from
2964         current thread into the new stack.
2965         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Use private
2966         futexes if they are available.
2967         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise
2968         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Adjust so that change
2969         in libc-lowlevellock.S allow using private futexes.
2970         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
2971         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
2972         FUTEX_PRIVATE_FLAG.
2973         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
2974         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use private futexes
2975         if they are available.
2976         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
2977         * sysdeps/x86_64/tcb-offsets.sym: Add PRIVATE_FUTEX.
2978         * sysdeps/i386/tcb-offsets.sym: Likewise.
2979         * sysdeps/x86_64/tls.h (tcbhead_t): Add private_futex field.
2980         * sysdeps/i386/tls.h (tcbhead_t): Likewise.
2982 2007-05-21  Ulrich Drepper  <drepper@redhat.com>
2984         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
2985         Remove ptr_wait_lookup_done again.
2986         * init.c (pthread_functions): Don't add .ptr_wait_lookup_done here.
2987         (__pthread_initialize_minimal_internal): Initialize
2988         _dl_wait_lookup_done pointer in _rtld_global directly.
2989         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
2990         Remove code to code _dl_wait_lookup_done.
2991         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_WAIT): The pointer is not
2992         encrypted for now.
2994 2007-05-21  Jakub Jelinek  <jakub@redhat.com>
2996         * tst-robust9.c (do_test): Don't fail if ENABLE_PI and
2997         pthread_mutex_init failed with ENOTSUP.
2999 2007-05-19  Ulrich Drepper  <drepper@redhat.com>
3001         * allocatestack.c (__wait_lookup_done): New function.
3002         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
3003         Add ptr_wait_lookup_done.
3004         * init.c (pthread_functions): Initialize .ptr_wait_lookup_done.
3005         * pthreadP.h: Declare __wait_lookup_done.
3006         * sysdeps/i386/tls.h (tcbhead_t): Add gscope_flag.
3007         Define macros to implement reference handling of global scope.
3008         * sysdeps/x86_64/tls.h: Likewise.
3009         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
3010         Initialize GL(dl_wait_lookup_done).
3012 2007-05-17  Ulrich Drepper  <drepper@redhat.com>
3014         [BZ #4512]
3015         * pthread_mutex_lock.c: Preserve FUTEX_WAITERS bit when dead owner
3016         is detected.
3017         * pthread_mutex_timedlock.c: Likewise.
3018         * pthread_mutex_trylock.c: Likewise.
3019         Patch in part by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
3021         * Makefile (tests): Add tst-robust9 and tst-robustpi9.
3022         * tst-robust9.c: New file.
3023         * tst-robustpi9.c: New file.
3025         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Remove
3026         unnecessary extra cancellation test.
3028 2007-05-14  Ulrich Drepper  <drepper@redhat.com>
3030         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Remove unnecessary
3031         extra cancellation test.
3032         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
3034 2007-05-10  Ulrich Drepper  <drepper@redhat.com>
3036         * descr.h (struct pthread): Rearrange members to fill hole in
3037         64-bit layout.
3039         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
3040         (__pthread_setaffinity_new): If syscall was successful and
3041         RESET_VGETCPU_CACHE is defined, use it before returning.
3042         * sysdeps/unix/sysv/linux/x86_64/pthread_setaffinity.c: New file.
3044 2007-05-10  Jakub Jelinek  <jakub@redhat.com>
3046         [BZ #4455]
3047         * tst-align2.c: Include stackinfo.h.
3048         * tst-getpid1.c: Likewise.
3050 2007-05-02  Carlos O'Donell  <carlos@systemhalted.org>
3052         [BZ #4455]
3053         * tst-align2.c (do_test): Add _STACK_GROWS_UP case.
3054         * tst-getpid1.c (do_test): Likewise.
3056         [BZ #4456]
3057         * allocatestack.c (change_stack_perm): Add _STACK_GROWS_UP case.
3058         (allocate_stack): Likewise.
3060 2007-05-07  Ulrich Drepper  <drepper@redhat.com>
3062         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
3063         (__lll_robust_lock_wait): Fix race caused by reloading of futex value.
3064         (__lll_robust_timedlock_wait): Likewise.
3065         Reported by Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>.
3067 2007-05-06  Mike Frysinger  <vapier@gentoo.org>
3069         [BZ #4465]
3070         * tst-cancel-wrappers.sh: Set C["fdatasync"] to 1.
3071         * tst-cancel4.c (tf_fdatasync): New test.
3073 2007-04-27  Ulrich Drepper  <drepper@redhat.com>
3075         [BZ #4392]
3076         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Treat error
3077         check mutexes like normal mutexes.
3079         [BZ #4306]
3080         * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
3081         Initialize the whole sigevent structure to appease valgrind.
3083 2007-04-25  Ulrich Drepper  <drepper@redhat.com>
3085         * sysdeps/x86_64/tls.h (tcbhead_t): Add vgetcpu_cache.
3086         * sysdeps/x86_64/tcb-offsets.sym: Add VGETCPU_CACHE_OFFSET.
3088 2007-04-06  Ulrich Drepper  <drepper@redhat.com>
3090         * tst-locale1.c: Avoid warnings.
3091         * tst-locale2.c: Likewise.
3093 2007-03-19  Steven Munroe  <sjmunroe@us.ibm.com>
3095         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
3096         (__lll_robust_trylock): Add MUTEX_HINT_ACQ to lwarx instruction.
3098 2007-03-16  Jakub Jelinek  <jakub@redhat.com>
3100         * sysdeps/pthread/bits/libc-lock.h: Use __extern_inline and
3101         __extern_always_inline where appropriate.
3102         * sysdeps/pthread/pthread.h: Likewise.
3104 2007-03-13  Richard Henderson  <rth@redhat.com>
3106         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Use two
3107         separate cfi regions for the two subsections.
3109 2007-02-25  Ulrich Drepper  <drepper@redhat.com>
3111         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset refcntr in
3112         new thread, don't just decrement it.
3113         Patch by Suzuki K P <suzuki@in.ibm.com>.
3115 2007-02-21  Ulrich Drepper  <drepper@redhat.com>
3117         * sysdeps/pthread/pthread-functions.h: Correct last patch, correct
3118         PTHFCT_CALL definition.
3120 2007-02-18  Ulrich Drepper  <drepper@redhat.com>
3122         * sysdeps/pthread/pthread-functions.h: If PTR_DEMANGLE is not
3123         available, don't use it.
3125 2007-02-09  Jakub Jelinek  <jakub@redhat.com>
3127         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
3128         (__lll_mutex_timedlock_wait): Use correct pointer when we don't
3129         call into the kernel to delay.
3131 2007-01-18  Ulrich Drepper  <drepper@redhat.com>
3133         * tst-initializers1.c: We want to test the initializers as seen
3134         outside of libc, so undefined _LIBC.
3136         * pthread_join.c (cleanup): Avoid warning.
3138 2007-01-17  Ulrich Drepper  <drepper@redhat.com>
3140         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
3141         (__lll_timedwait_tid): Add unwind info.
3143         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Don't just copy the
3144         function table, mangle the pointers.
3145         * sysdeps/pthread/pthread-functions.h: Define PTHFCT_CALL.
3146         * forward.c: Use PTHFCT_CALL and __libc_pthread_functions_init.
3147         * sysdeps/pthread/bits/libc-lock.h: When using __libc_pthread_functions
3148         demangle pointers before use.
3149         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Use PTHFCT_CALL to
3150         demangle pointer.
3151         * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
3152         * sysdeps/pthread/setxid.h: Likewise.
3154 2007-01-12  Ulrich Drepper  <drepper@redhat.com>
3156         * tst-rwlock7.c: Show some more information in case of correct
3157         behavior.
3159 2007-01-11  Ulrich Drepper  <drepper@redhat.com>
3161         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
3162         (lll_futex_timed_wait): Undo part of last change, don't negate
3163         return value.
3165 2007-01-10  Ulrich Drepper  <drepper@redhat.com>
3167         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Cleanups.  Define
3168         FUTEX_CMP_REQUEUE and lll_futex_requeue.
3170 2006-12-28  David S. Miller  <davem@davemloft.net>
3172         * shlib-versions: Fix sparc64 linux target specification.
3174 2007-01-10  Jakub Jelinek  <jakub@redhat.com>
3176         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
3177         Adjust include path for pthread_barrier_wait.c move.
3179 2006-12-21  Jakub Jelinek  <jakub@redhat.com>
3181         * sysdeps/unix/sysv/linux/pthread_kill.c (pthread_kill): Make sure
3182         tid isn't reread from pd->tid in between ESRCH test and the syscall.
3184 2006-12-06  Jakub Jelinek  <jakub@redhat.com>
3186         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Handle
3187         6 argument cancellable syscalls.
3188         (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
3189         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO): Handle
3190         6 argument cancellable syscalls.
3191         (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
3193 2006-12-09  Ulrich Drepper  <drepper@redhat.com>
3195         * sysdeps/unix/sysv/linux/rtld-lowlevel.h
3196         (__rtld_mrlock_initialize): Add missing closing parenthesis.
3198 2006-10-30  Jakub Jelinek  <jakub@redhat.com>
3200         * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
3201         __sync_lock_release instead of __sync_lock_release_si.
3203 2006-10-29  Jakub Jelinek  <jakub@redhat.com>
3205         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (RTLD_SINGLE_THREAD_P):
3206         Define.
3207         (SINGLE_THREAD_P): Define to 1 if IS_IN_rtld.
3208         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Likewise.
3209         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
3210         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
3211         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
3212         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
3213         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
3214         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
3215         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
3216         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
3217         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
3219 2006-10-27  Ulrich Drepper  <drepper@redhat.com>
3221         * sysdeps/pthread/pthread_barrier_wait.c: Move to...
3222         * pthread_barrier_wait.c: ...here.
3223         * sysdeps/pthread/pthread_cond_broadcast.c: Move to...
3224         * pthread_cond_broadcast.c: ...here.
3225         * sysdeps/pthread/pthread_cond_signal.c: Move to...
3226         * pthread_cond_signal.c: ...here.
3227         * sysdeps/pthread/pthread_cond_timedwait.c: Move to...
3228         * pthread_cond_timedwait.c: ...here.
3229         * sysdeps/pthread/pthread_cond_wait.c: Move to...
3230         * pthread_cond_wait.c: ...here.
3231         * sysdeps/pthread/pthread_once.c: Move to...
3232         * pthread_once.c: ...here.
3233         * sysdeps/pthread/pthread_rwlock_rdlock.c: Move to...
3234         * pthread_rwlock_rdlock.c: ...here.
3235         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Move to...
3236         * pthread_rwlock_timedrdlock.c: ...here.
3237         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Move to...
3238         * pthread_rwlock_timedwrlock.c: ...here.
3239         * sysdeps/pthread/pthread_rwlock_unlock.c: Move to...
3240         * pthread_rwlock_unlock.c: ...here.
3241         * sysdeps/pthread/pthread_rwlock_wrlock.c: Move to...
3242         * pthread_rwlock_wrlock.c: ...here.
3243         * sysdeps/pthread/pthread_spin_destroy.c: Move to...
3244         * pthread_spin_destroy.c: ...here.
3245         * sysdeps/pthread/pthread_spin_init.c: Move to...
3246         * pthread_spin_init.c: ...here.
3247         * sysdeps/pthread/pthread_spin_unlock.c: Move to...
3248         * pthread_spin_unlock.c: ...here.
3249         * sysdeps/pthread/pthread_getcpuclockid.c: Move to...
3250         * pthread_getcpuclockid.c: ...here.
3252         * init.c: USE_TLS support is now always enabled.
3253         * tst-tls5.h: Likewise.
3254         * sysdeps/alpha/tls.h: Likewise.
3255         * sysdeps/i386/tls.h: Likewise.
3256         * sysdeps/ia64/tls.h: Likewise.
3257         * sysdeps/powerpc/tls.h: Likewise.
3258         * sysdeps/s390/tls.h: Likewise.
3259         * sysdeps/sh/tls.h: Likewise.
3260         * sysdeps/sparc/tls.h: Likewise.
3261         * sysdeps/x86_64/tls.h: Likewise.
3263 2006-10-27  Jakub Jelinek  <jakub@redhat.com>
3265         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
3266         __rtld_mrlock_change): Update oldval if atomic compare and exchange
3267         failed.
3269         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
3270         Define to THREAD_SELF->header.multiple_threads.
3271         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
3272         Likewise.
3273         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
3274         Likewise.
3275         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
3276         (SINGLE_THREAD_P): Likewise.
3277         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
3278         (SINGLE_THREAD_P): Likewise.
3279         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
3280         (SINGLE_THREAD_P): Likewise.
3281         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
3282         (SINGLE_THREAD_P): Likewise.
3283         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (SINGLE_THREAD_P):
3284         Likewise.
3285         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
3286         (SINGLE_THREAD_P): Likewise.
3287         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
3288         (SINGLE_THREAD_P): Likewise.
3289         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (SINGLE_THREAD_P):
3290         Likewise.
3292 2006-10-26  Jakub Jelinek  <jakub@redhat.com>
3294         * pthread_attr_setstacksize.c (NEW_VERNUM): Define to GLIBC_2_3_3
3295         by default rather than 2_3_3.
3297 2006-10-17  Jakub Jelinek  <jakub@redhat.com>
3299         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
3300         __rtld_mrlock_unlock, __rtld_mrlock_change, __rtld_mrlock_done): Use
3301         atomic_* instead of catomic_* macros.
3303 2006-10-12  Ulrich Drepper  <drepper@redhat.com>
3305         [BZ #3285]
3306         * sysdeps/unix/sysv/linux/bits/local_lim.h: Add SEM_VALUE_MAX.
3307         * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
3308         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
3309         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
3310         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
3311         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Remove SEM_VALUE_MAX.
3312         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
3313         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
3314         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
3315         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: Likewise.
3316         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
3317         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
3318         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
3320 2006-10-11  Ulrich Drepper  <drepper@redhat.com>
3322         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add support for
3323         cancelable syscalls with six parameters.
3325         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Use catomic_*
3326         operations instead of atomic_*.
3328 2006-10-09  Ulrich Drepper  <drepper@redhat.com>
3330         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: New file..
3332 2006-10-07  Ulrich Drepper  <drepper@redhat.com>
3334         * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: New file.
3335         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstack.c: New file.
3336         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c:
3337         New file.
3338         * pthread_attr_setstack.c: Allow overwriting the version number of the
3339         new symbol.
3340         * pthread_attr_setstacksize.c: Likewise.
3341         (__old_pthread_attr_setstacksize): If STACKSIZE_ADJUST is defined use
3342         it.
3343         * sysdeps/unix/sysv/linux/powerpc/Versions (libpthread): Add
3344         pthread_attr_setstack and pthread_attr_setstacksize to GLIBC_2.6.
3346 2006-09-24  Ulrich Drepper  <drepper@redhat.com>
3348         [BZ #3251]
3349         * descr.h (ENQUEUE_MUTEX_BOTH): Add cast to avoid warning.
3350         Patch by Petr Baudis.
3352 2006-09-18  Jakub Jelinek  <jakub@redhat.com>
3354         * tst-kill4.c (do_test): Explicitly set tf thread's stack size.
3356         * tst-cancel2.c (tf): Loop as long as something was written.
3358 2006-09-12  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3360         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: For PI
3361         mutexes wake all mutexes.
3362         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Don't increment
3363         WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
3364         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
3366 2006-09-12  Ulrich Drepper  <drepper@redhat.com>
3368         * tst-cond22.c (tf): Slight changes to the pthread_cond_wait use
3369         to guarantee the thread is always canceled.
3371 2006-09-08  Jakub Jelinek  <jakub@redhat.com>
3373         * tst-cond22.c: Include pthread.h instead of pthreadP.h.
3374         Include stdlib.h.
3375         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Only
3376         increase FUTEX if increasing WAKEUP_SEQ.  Fix comment typo.
3377         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
3378         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3379         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3381 2006-09-08  Ulrich Drepper  <drepper@redhat.com>
3383         [BZ #3123]
3384         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Don't
3385         increment WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
3386         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
3387         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3388         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3389         * Makefile (tests): Add tst-cond22.
3390         * tst-cond22.c: New file.
3392 2006-09-05  Ulrich Drepper  <drepper@redhat.com>
3394         [BZ #3124]
3395         * descr.h (struct pthread): Add parent_cancelhandling.
3396         * sysdeps/pthread/createthread.c (create_thread): Pass parent
3397         cancelhandling value to child.
3398         * pthread_create.c (start_thread): If parent thread was canceled
3399         reset the SIGCANCEL mask.
3400         * Makefile (tests): Add tst-cancel25.
3401         * tst-cancel25.c: New file.
3403 2006-09-05  Jakub Jelinek  <jakub@redhat.com>
3404             Ulrich Drepper  <drepper@redhat.com>
3406         * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY): Don't decrement
3407         counterp if it is already zero.
3408         * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY): Likewise..
3410 2006-03-04  Jakub Jelinek  <jakub@redhat.com>
3411             Roland McGrath  <roland@redhat.com>
3413         * sysdeps/unix/sysv/linux/i386/lowlevellock.h
3414         (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
3415         LLL_STUB_UNWIND_INFO_3, LLL_STUB_UNWIND_INFO_4): Define.
3416         (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
3417         lll_robust_mutex_cond_lock, lll_mutex_timedlock,
3418         lll_robust_mutex_timedlock, lll_mutex_unlock,
3419         lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
3420         Add _L_*_ symbols around the subsection.
3421         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Add unwind info.
3422         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Likewise.
3424 2006-03-03  Jakub Jelinek  <jakub@redhat.com>
3425             Roland McGrath  <roland@redhat.com>
3427         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
3428         (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
3429         LLL_STUB_UNWIND_INFO_5, LLL_STUB_UNWIND_INFO_6): Define.
3430         (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
3431         lll_robust_mutex_cond_lock, lll_mutex_timedlock,
3432         lll_robust_mutex_timedlock, lll_mutex_unlock,
3433         lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
3434         Add _L_*_ symbols around the subsection.
3435         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Add unwind info.
3436         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
3438 2006-08-31  Ulrich Drepper  <drepper@redhat.com>
3440         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Undo last
3441         change because it can disturb too much existing code.  If real hard
3442         reader preference is needed we'll introduce another type.
3443         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
3444         (pthread_rwlock_timedwrlock): Likewise.
3445         * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
3446         Likewise.
3448 2006-08-30  Ulrich Drepper  <drepper@redhat.com>
3450         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Respect
3451         reader preference.
3452         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
3453         (pthread_rwlock_timedwrlock): Likewise.
3454         * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
3455         Likewise.
3457 2006-08-25  Jakub Jelinek  <jakub@redhat.com>
3459         * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libpthread):
3460         Only define ifdef SHARED.
3462 2006-08-23  Ulrich Drepper  <drepper@redhat.com>
3464         * allocatestack.c (queue_stack): Move freeing of surplus stacks to...
3465         (free_stacks): ...here.
3466         (__free_stack_cache): New function.
3467         * pthreadP.h: Declare __free_stack_cache.
3468         * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
3469         ptr_freeres.
3470         * init.c (pthread_functions): Initialize ptr_freeres.
3471         * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libptread):
3472         New freeres function.
3474 2006-07-30  Joseph S. Myers  <joseph@codesourcery.com>
3476         [BZ #3018]
3477         * Makefile (extra-objs): Add modules to extra-test-objs instead.
3479 2006-08-20  Ulrich Drepper  <drepper@redhat.com>
3481         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
3482         _XOPEN_REALTIME_THREADS.
3484 2006-08-15  Jakub Jelinek  <jakub@redhat.com>
3486         * sysdeps/unix/sysv/linux/clock_settime.c (INTERNAL_VSYSCALL): Use
3487         HAVE_CLOCK_GETRES_VSYSCALL as guard macro rather than
3488         HAVE_CLOCK_GETTIME_VSYSCALL.
3489         (maybe_syscall_settime_cpu): Use plain INTERNAL_VSYSCALL here.
3491 2006-08-14  Jakub Jelinek  <jakub@redhat.com>
3493         * sysdeps/unix/sysv/linux/bits/posix_opt.h
3494         (_POSIX_THREAD_PRIO_PROTECT): Define to 200112L.
3495         * descr.h (struct priority_protection_data): New type.
3496         (struct pthread): Add tpp field.
3497         * pthreadP.h (PTHREAD_MUTEX_PP_NORMAL_NP,
3498         PTHREAD_MUTEX_PP_RECURSIVE_NP, PTHREAD_MUTEX_PP_ERRORCHECK_NP,
3499         PTHREAD_MUTEX_PP_ADAPTIVE_NP): New enum values.
3500         * pthread_mutex_init.c (__pthread_mutex_init): Handle non-robust
3501         TPP mutexes.
3502         * pthread_mutex_lock.c (__pthread_mutex_lock): Handle TPP mutexes.
3503         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Likewise.
3504         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Likewise.
3505         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Likewise.
3506         * tpp.c: New file.
3507         * pthread_setschedparam.c (__pthread_setschedparam): Handle priority
3508         boosted by TPP.
3509         * pthread_setschedprio.c (pthread_setschedprio): Likewise.
3510         * pthread_mutexattr_getprioceiling.c
3511         (pthread_mutexattr_getprioceiling): If ceiling is 0, ensure it is
3512         in the SCHED_FIFO priority range.
3513         * pthread_mutexattr_setprioceiling.c
3514         (pthread_mutexattr_setprioceiling): Fix prioceiling validation.
3515         * pthread_mutex_getprioceiling.c (pthread_mutex_getprioceiling): Fail
3516         if mutex is not TPP.  Ceiling is now in __data.__lock.
3517         * pthread_mutex_setprioceiling.c: Include stdbool.h.
3518         (pthread_mutex_setprioceiling): Fix prioceiling validation.  Ceiling
3519         is now in __data.__lock.  Add locking.
3520         * pthread_create.c (__free_tcb): Free pd->tpp structure.
3521         * Makefile (libpthread-routines): Add tpp.
3522         (xtests): Add tst-mutexpp1, tst-mutexpp6 and tst-mutexpp10.
3523         * tst-tpp.h: New file.
3524         * tst-mutexpp1.c: New file.
3525         * tst-mutexpp6.c: New file.
3526         * tst-mutexpp10.c: New file.
3527         * tst-mutex1.c (TEST_FUNCTION): Don't redefine if already defined.
3528         * tst-mutex6.c (TEST_FUNCTION): Likewise.
3530 2006-08-12  Ulrich Drepper  <drepper@redhat.com>
3532         [BZ #2843]
3533         * pthread_join.c (pthread_join): Account for self being canceled
3534         when checking for deadlocks.
3535         * tst-join5.c: Cleanups.  Allow to be used in tst-join6.
3536         (tf1): Don't print anything after pthread_join returns, this would be
3537         another cancellation point.
3538         (tf2): Likewise.
3539         * tst-join6.c: New file.
3540         * Makefile (tests): Add tst-join6.
3542 2006-08-03  Ulrich Drepper  <drepper@redhat.com>
3544         [BZ #2892]
3545         * pthread_setspecific.c (__pthread_setspecific): Check
3546         out-of-range index before checking for unused key.
3548         * sysdeps/pthread/gai_misc.h: New file.
3550 2006-08-01  Ulrich Drepper  <drepper@redhat.com>
3552         * sysdeps/unix/sysv/linux/i386/smp.h: New file.  Old Linux-specific
3553         file.  Don't use sysctl.
3554         * sysdeps/unix/sysv/linux/smp.h: Always assume SMP.  Archs can
3555         overwrite the file if this is likely not true.
3557 2006-07-31  Daniel Jacobowitz  <dan@codesourcery.com>
3559         * allocatestack.c (__reclaim_stacks): Reset the PID on cached stacks.
3560         * Makefile (tests): Add tst-getpid3.
3561         * tst-getpid3.c: New file.
3563 2006-07-30  Roland McGrath  <roland@redhat.com>
3565         * Makefile (libpthread-routines): Add ptw-sigsuspend.
3567         * sysdeps/unix/sysv/linux/i386/not-cancel.h
3568         (pause_not_cancel): New macro.
3569         (nanosleep_not_cancel): New macro.
3570         (sigsuspend_not_cancel): New macro.
3571         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
3572         nanosleep_not_cancel macro from <not-cancel.h>.
3573         * pthread_mutex_lock.c (__pthread_mutex_lock): Use pause_not_cancel
3574         macro from <not-cancel.h>.
3576 2006-07-28  Ulrich Drepper  <drepper@redhat.com>
3577             Jakub Jelinek  <jakub@redhat.com>
3579         * descr.h: Change ENQUEUE_MUTEX and DEQUEUE_MUTEX for bit 0
3580         notification of PI mutex.  Add ENQUEUE_MUTEX_PI.
3581         * pthreadP.h: Define PTHREAD_MUTEX_PI_* macros for PI mutex types.
3582         * pthread_mutex_setprioceilining.c: Adjust for mutex type name change.
3583         * pthread_mutex_init.c: Add support for priority inheritance mutex.
3584         * pthread_mutex_lock.c: Likewise.
3585         * pthread_mutex_timedlock.c: Likewise.
3586         * pthread_mutex_trylock.c: Likewise.
3587         * pthread_mutex_unlock.c: Likewise.
3588         * sysdeps/pthread/pthread_cond_broadcast.c: For PI mutexes wake
3589         all mutexes.
3590         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.c: Likewise.
3591         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.c: Likewise.
3592         * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: New file.
3593         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-header): Add
3594         pthread-pi-defines.sym.
3595         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_LOCK_PI,
3596         FUTEX_UNLOCK_PI, and FUTEX_TRYLOCK_PI.
3597         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
3598         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
3599         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
3600         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
3601         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
3602         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
3603         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
3604         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
3605         _POSIX_THREAD_PRIO_INHERIT to 200112L.
3606         * tst-mutex1.c: Adjust to allow use in PI mutex test.
3607         * tst-mutex2.c: Likewise.
3608         * tst-mutex3.c: Likewise.
3609         * tst-mutex4.c: Likewise.
3610         * tst-mutex5.c: Likewise.
3611         * tst-mutex6.c: Likewise.
3612         * tst-mutex7.c: Likewise.
3613         * tst-mutex7a.c: Likewise.
3614         * tst-mutex8.c: Likewise.
3615         * tst-mutex9.c: Likewise.
3616         * tst-robust1.c: Likewise.
3617         * tst-robust7.c: Likewise.
3618         * tst-robust8.c: Likewise.
3619         * tst-mutexpi1.c: New file.
3620         * tst-mutexpi2.c: New file.
3621         * tst-mutexpi3.c: New file.
3622         * tst-mutexpi4.c: New file.
3623         * tst-mutexpi5.c: New file.
3624         * tst-mutexpi6.c: New file.
3625         * tst-mutexpi7.c: New file.
3626         * tst-mutexpi7a.c: New file.
3627         * tst-mutexpi8.c: New file.
3628         * tst-mutexpi9.c: New file.
3629         * tst-robust1.c: New file.
3630         * tst-robust2.c: New file.
3631         * tst-robust3.c: New file.
3632         * tst-robust4.c: New file.
3633         * tst-robust5.c: New file.
3634         * tst-robust6.c: New file.
3635         * tst-robust7.c: New file.
3636         * tst-robust8.c: New file.
3637         * Makefile (tests): Add the new tests.
3639         * pthread_create.c (start_thread): Add some casts to avoid warnings.
3640         * pthread_mutex_destroy.c: Remove unneeded label.
3642 2006-07-01  Ulrich Drepper  <drepper@redhat.com>
3644         * pthread_mutex_init.c (__pthread_mutex_init): Move some
3645         computations to compile time.
3647 2006-06-04  Ulrich Drepper  <drepper@redhat.com>
3649         * sysdeps/pthread/pthread.h: Add pthread_equal inline version.
3651 2006-05-15  Ulrich Drepper  <drepper@redhat.com>
3653         * sysdeps/unix/sysv/linux/fork.h: Mark __fork_handlers as hidden.
3655 2006-05-11  Ulrich Drepper  <drepper@redhat.com>
3657         * pthread_key_create.c (__pthread_key_create): Do away with
3658         __pthread_keys_lock.
3660         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
3661         (__kernel_cpumask_size): Mark as hidden.
3662         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
3664         * sem_open.c (__sem_mappings_lock): Mark as hidden.
3665         * semaphoreP.h (__sem_mappings_lock): Likewise.
3667 2006-05-10  Ulrich Drepper  <drepper@redhat.com>
3669         * pthread_atfork.c: Mark __dso_handle as hidden.
3671 2006-05-09  Ulrich Drepper  <drepper@redhat.com>
3673         [BZ #2644]
3674         * sysdeps/pthread/unwind-forcedunwind.c: Different solution for
3675         the reload problem.  Change the one path in pthread_cancel_init
3676         which causes the problem.  Force gcc to reload.  Simplify callers.
3677         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c
3678         (_Unwind_GetBSP): Undo last patch.
3680 2006-05-07  Ulrich Drepper  <drepper@redhat.com>
3682         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: Make sure the
3683         function pointer is reloaded after pthread_cancel_init calls.
3685         [BZ #2644]
3686         * sysdeps/pthread/unwind-forcedunwind.c: Make sure functions
3687         pointers are reloaded after pthread_cancel_init calls.
3689 2006-05-01  Ulrich Drepper  <drepper@redhat.com>
3691         * sysdeps/pthread/allocalim.h (__libc_use_alloca): Mark with
3692         __always_inline.
3694 2006-04-27  Ulrich Drepper  <drepper@redhat.com>
3696         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
3697         Allocate new object which is passed to timer_sigev_thread so that
3698         the timer can be deleted before the new thread is scheduled.
3700 2006-04-26  Roland McGrath  <roland@redhat.com>
3702         * sysdeps/x86_64/tls.h: Include <asm/prctl.h> inside [! __ASSEMBLER__].
3704 2006-04-08  Ulrich Drepper  <drepper@redhat.com>
3706         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove branch predicion
3707         suffix for conditional jumps.
3708         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
3709         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
3710         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
3711         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
3712         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
3713         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
3715         * init.c (sigcancel_handler): Compare with correct PID even if the
3716         thread is in the middle of a fork call.
3717         (sighandler_setxid): Likewise.
3718         Reported by Suzuki K P <suzuki@in.ibm.com> .
3720 2006-04-07  Jakub Jelinek  <jakub@redhat.com>
3722         * pthreadP.h (FUTEX_TID_MASK): Sync with kernel.
3724 2006-04-06  Ulrich Drepper  <drepper@redhat.com>
3726         * pthread_getattr_np.c (pthread_getattr_np): Close fp if getrlimit
3727         fails [Coverity CID 105].
3729 2006-04-05  Ulrich Drepper  <drepper@redhat.com>
3731         * sysdeps/pthread/pthread.h: Add nonnull attributes.
3733 2006-04-03  Steven Munroe  <sjmunroe@us.ibm.com>
3735         [BZ #2505]
3736         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h [_ARCH_PWR4]:
3737         Define __lll_rel_instr using lwsync.
3739 2006-03-27  Ulrich Drepper  <drepper@redhat.com>
3741         * allocatestack.c (allocate_stack): Always initialize robust_head.
3742         * descr.h: Define struct robust_list_head.
3743         (struct pthread): Use robust_list_head in robust mutex list definition.
3744         Adjust ENQUEUE_MUTEX and DEQUEUE_MUTEX.
3745         * init.c [!__ASSUME_SET_ROBUST_LIST] (__set_robust_list_avail): Define.
3746         (__pthread_initialize_minimal_internal): Register robust_list with
3747         the kernel.
3748         * pthreadP.h: Remove PRIVATE_ from PTHREAD_MUTEX_ROBUST_* names.
3749         Declare __set_robust_list_avail.
3750         * pthread_create.c (start_thread): Register robust_list of new thread.
3751         [!__ASSUME_SET_ROBUST_LIST]: If robust_list is not empty wake up
3752         waiters.
3753         * pthread_mutex_destroy.c: For robust mutexes don't look at the
3754         number of users, it's unreliable.
3755         * pthread_mutex_init.c: Allow use of pshared robust mutexes if
3756         set_robust_list syscall is available.
3757         * pthread_mutex_consistent.c: Adjust for PTHREAD_MUTEX_ROBUST_* rename.
3758         * pthread_mutex_lock.c: Simplify robust mutex code a bit.
3759         Set robust_head.list_op_pending before trying to lock a robust mutex.
3760         * pthread_mutex_timedlock.c: Likewise.
3761         * pthread_mutex_trylock.c: Likewise.
3762         * pthread_mutex_unlock.c: Likewise for unlocking.
3763         * Makefile (tests): Add tst-robust8.
3764         * tst-robust8.c: New file.
3766 2006-03-08  Andreas Schwab  <schwab@suse.de>
3768         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h
3769         (DL_SYSINFO_IMPLEMENTATION): Add missing newline.
3771 2006-03-05  Roland McGrath  <roland@redhat.com>
3773         * configure (libc_add_on): Disable add-on when $add_ons_automatic = yes
3774         and $config_os doesn't match *linux*.
3776 2006-03-05  David S. Miller  <davem@sunset.davemloft.net>
3778         * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S:
3779         Use __syscall_error.
3780         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
3781         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: Likewise.
3782         * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: Likewise.
3783         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
3784         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: Likewise.
3785         * sysdeps/unix/sysv/linux/sparc/Makefile: New file.
3787 2006-03-02  Ulrich Drepper  <drepper@redhat.com>
3789         * sysdeps/unix/sysv/linux/aio_misc.h: Various cleanups.
3791 2006-03-01  Ulrich Drepper  <drepper@redhat.com>
3793         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
3794         (__lll_robust_lock_wait): Also set FUTEX_WAITERS bit if we got the
3795         mutex.
3796         (__lll_robust_timedlock_wait): Likewise.
3797         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S
3798         (__lll_robust_lock_wait): Likewise.
3799         (__lll_robust_timedlock_wait): Likewise.
3800         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
3801         (__lll_robust_lock_wait): Likewise.
3802         (__lll_robust_timedlock_wait): Likewise.
3804 2006-03-01  Jakub Jelinek  <jakub@redhat.com>
3806         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_robust_mutex_dead,
3807         lll_robust_mutex_trylock, lll_robust_mutex_lock,
3808         lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
3809         lll_robust_mutex_unlock): Define.
3810         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
3812 2006-02-28  H.J. Lu  <hongjiu.lu@intel.com>
3814         * sysdeps/unix/sysv/linux/ia64/clone2.S: Include <clone2.S>
3815         instead of <clone.S>.
3817 2006-02-27  Jakub Jelinek  <jakub@redhat.com>
3819         * Makefile (libpthread-routines): Add
3820         pthread_mutexattr_[sg]etprotocol, pthread_mutexattr_[sg]etprioceiling
3821         and pthread_mutex_[sg]etprioceiling.
3822         * Versions (GLIBC_2.4): Export pthread_mutexattr_getprotocol,
3823         pthread_mutexattr_setprotocol, pthread_mutexattr_getprioceiling,
3824         pthread_mutexattr_setprioceiling, pthread_mutex_getprioceiling and
3825         pthread_mutex_setprioceiling.
3826         * sysdeps/pthread/pthread.h (PTHREAD_PRIO_NONE, PTHREAD_PRIO_INHERIT,
3827         PTHREAD_PRIO_PROTECT): New enum values.
3828         (pthread_mutexattr_getprotocol, pthread_mutexattr_setprotocol,
3829         pthread_mutexattr_getprioceiling, pthread_mutexattr_setprioceiling,
3830         pthread_mutex_getprioceiling, pthread_mutex_setprioceiling): New
3831         prototypes.
3832         * pthreadP.h (PTHREAD_MUTEX_PRIO_INHERIT_PRIVATE_NP,
3833         PTHREAD_MUTEX_PRIO_PROTECT_PRIVATE_NP): New enum values.
3834         (PTHREAD_MUTEX_PRIO_CEILING_SHIFT, PTHREAD_MUTEX_PRIO_CEILING_MASK):
3835         Define.
3836         (PTHREAD_MUTEXATTR_PROTOCOL_SHIFT, PTHREAD_MUTEXATTR_PROTOCOL_MASK,
3837         PTHREAD_MUTEXATTR_PRIO_CEILING_SHIFT,
3838         PTHREAD_MUTEXATTR_PRIO_CEILING_MASK): Define.
3839         (PTHREAD_MUTEXATTR_FLAG_BITS): Or in PTHREAD_MUTEXATTR_PROTOCOL_MASK
3840         and PTHREAD_MUTEXATTR_PRIO_CEILING_MASK.
3841         * pthread_mutex_init.c (__pthread_mutex_init): For the time being
3842         return ENOTSUP for PTHREAD_PRIO_INHERIT or PTHREAD_PRIO_PROTECT
3843         protocol mutexes.
3844         * pthread_mutex_getprioceiling.c: New file.
3845         * pthread_mutex_setprioceiling.c: New file.
3846         * pthread_mutexattr_getprioceiling.c: New file.
3847         * pthread_mutexattr_setprioceiling.c: New file.
3848         * pthread_mutexattr_getprotocol.c: New file.
3849         * pthread_mutexattr_setprotocol.c: New file.
3851 2006-02-27  Daniel Jacobowitz  <dan@codesourcery.com>
3853         * sysdeps/unix/sysv/linux/aio_misc.h: Include <limits.h>.
3855 2006-02-27  Roland McGrath  <roland@redhat.com>
3857         * sysdeps/pthread/Subdirs: List nptl here too.
3858         * configure (libc_add_on_canonical): New variable.
3860         * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: Use #include_next.
3862         * sysdeps/unix/sysv/linux/sleep.c: Use #include_next after #include of
3863         self to get main source tree's file.
3864         * sysdeps/unix/sysv/linux/alpha/clone.S: Likewise.
3865         * sysdeps/unix/sysv/linux/i386/clone.S: Likewise.
3866         * sysdeps/unix/sysv/linux/i386/vfork.S: Likewise.
3867         * sysdeps/unix/sysv/linux/ia64/clone2.S: Likewise.
3868         * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: Likewise.
3869         * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: Likewise.
3870         * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: Likewise.
3871         * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: Likewise.
3872         * sysdeps/unix/sysv/linux/sh/clone.S: Likewise.
3873         * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: Likewise.
3874         * sysdeps/unix/sysv/linux/sparc/sparc64/clone.S: Likewise.
3875         * sysdeps/unix/sysv/linux/x86_64/clone.S: Likewise.
3876         * sysdeps/unix/sysv/linux/x86_64/vfork.S: Likewise.
3878         * Makefile: Use $(sysdirs) in vpath directive.
3880         * sysdeps/pthread/Makefile (CFLAGS-libc-start.c): Variable removed.
3881         (CPPFLAGS-timer_routines.c): Likewise.
3883         * Makeconfig (includes): Variable removed.
3885 2006-02-26  Roland McGrath  <roland@redhat.com>
3887         * sysdeps/generic/pt-raise.c: Moved to ...
3888         * pt-raise.c: ... here.
3889         * sysdeps/generic/lowlevellock.h: Moved to ...
3890         * lowlevellock.h: ... here.
3892 2006-02-23  Roland McGrath  <roland@redhat.com>
3894         * descr.h (struct pthread): Add final member `end_padding'.
3895         (PTHREAD_STRUCT_END_PADDING): Use it.
3897 2006-02-20  Roland McGrath  <roland@redhat.com>
3899         * sysdeps/mips: Directory removed, saved in ports repository.
3900         * sysdeps/unix/sysv/linux/mips: Likewise.
3902 2006-02-18  Ulrich Drepper  <drepper@redhat.com>
3904         * tst-robust1.c: Add second mutex to check that the mutex list is
3905         handled correctly.
3907 2006-02-17  Jakub Jelinek  <jakub@redhat.com>
3909         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_mutex_dead,
3910         lll_robust_mutex_trylock, lll_robust_mutex_lock,
3911         lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
3912         lll_robust_mutex_unlock): New macros.
3913         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
3914         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
3915         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
3916         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
3917         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: New file.
3919 2006-02-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3921         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Add lll_robust_mutex_*
3922         definitions.
3923         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: New file.
3925 2006-02-17  Ulrich Drepper  <drepper@redhat.com>
3927         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
3928         (lll_robust_mutex_unlock): Avoid unnecessary wakeups.
3929         * sysdeps/unix/sysv/linux/i386/lowlevellock.h
3930         (lll_robust_mutex_unlock): Likewise.
3932 2006-02-13  Jakub Jelinek  <jakub@redhat.com>
3934         * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX):
3935         Set robust_list.__next rather than robust_list.
3936         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
3937         (__pthread_list_t): New typedef.
3938         (pthread_mutex_t): Replace __next and __prev fields with __list.
3939         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
3940         (__pthread_list_t): New typedef.
3941         (pthread_mutex_t): Replace __next and __prev fields with __list.
3942         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
3943         (__pthread_list_t, __pthread_slist_t): New typedefs.
3944         (pthread_mutex_t): Replace __next and __prev fields with __list.
3945         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
3946         (__pthread_list_t, __pthread_slist_t): New typedefs.
3947         (pthread_mutex_t): Replace __next and __prev fields with __list.
3948         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
3949         (__pthread_list_t, __pthread_slist_t): New typedefs.
3950         (pthread_mutex_t): Replace __next and __prev fields with __list.
3951         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h
3952         (__pthread_slist_t): New typedef.
3953         (pthread_mutex_t): Replace __next field with __list.
3955 2006-02-15  Ulrich Drepper  <drepper@redhat.com>
3957         * pthreadP.h: Define PTHREAD_MUTEX_INCONSISTENT instead of
3958         PTHREAD_MUTEX_OWNERDEAD.
3959         (PTHREAD_MUTEX_ROBUST_PRIVATE_NP): Define as 16, not 256.
3960         Define FUTEX_WAITERS, FUTEX_OWNER_DIED, FUTEX_TID_MASK.
3961         * Makefile (libpthread-routines): Add lowlevelrobustlock.
3962         * pthread_create.c (start_thread): Very much simplify robust_list loop.
3963         * pthread_mutex_consistent.c: Inconsistent mutex have __owner now set
3964         to PTHREAD_MUTEX_INCONSISTENT.
3965         * pthread_mutex_destroy.c: Allow destroying of inconsistent mutexes.
3966         * pthread_mutex_lock.c: Reimplement robust mutex handling.
3967         * pthread_mutex_trylock.c: Likewise.
3968         * pthread_mutex_timedlock.c: Likewise.
3969         * pthread_mutex_unlock.c: Likewise.
3970         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
3971         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
3972         lowlevelrobustlock.sym.
3973         * sysdeps/unix/sysv/linux/lowlevelrobustlock.sym: New file.
3974         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add lll_robust_mutex_*
3975         definitions.
3976         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
3977         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: New file.
3978         * sysdeps/unix/sysv/linux/i386/i586/lowlevelrobustlock.S: New file.
3979         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrobustlock.S: New file.
3980         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: New file.
3982 2006-02-12  Ulrich Drepper  <drepper@redhat.com>
3984         * allocatestack.c (allocate_stack): Initialize robust_list.
3985         * init.c (__pthread_initialize_minimal_internal): Likewise.
3986         * descr.h (struct xid_command): Pretty printing.
3987         (struct pthread): Use __pthread_list_t or __pthread_slist_t for
3988         robust_list.  Adjust macros.
3989         * pthread_create.c (start_thread): Adjust robust_list handling.
3990         * phtread_mutex_unlock.c: Don't allow unlocking from any thread
3991         but the owner for all robust mutex types.
3992         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
3993         __pthread_list_t and __pthread_slist_t.  Use them in pthread_mutex_t.
3994         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3995         * sysdeps/pthread/pthread.h: Adjust mutex initializers.
3997         * sysdeps/unix/sysv/linux/i386/not-cancel.h: Define openat_not_cancel,
3998         openat_not_cancel_3, openat64_not_cancel, and openat64_not_cancel_3.
4000 2006-02-08  Jakub Jelinek  <jakub@redhat.com>
4002         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait,
4003         lll_futex_timedwait, lll_wait_tid): Add "memory" clobber.
4005 2006-01-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4007         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_futex_wait):
4008         Return status.
4009         (lll_futex_timed_wait): Define.
4011 2006-01-19  Ulrich Drepper  <drepper@redhat.com>
4013         * tst-cancel4.c: Test ppoll.
4015 2006-01-18  Andreas Jaeger  <aj@suse.de>
4017         [BZ #2167]
4018         * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h
4019         (pthread_mutex_t): Follow changes for other archs.  Based on patch
4020         by Jim Gifford <patches@jg555.com>.
4022 2006-01-13  Richard Henderson  <rth@redhat.com>
4024         * sysdeps/alpha/tls.h (tcbhead_t): Rename member to __private.
4026 2006-01-10  Roland McGrath  <roland@redhat.com>
4028         * sysdeps/alpha/jmpbuf-unwind.h: File moved to main source tree.
4029         * sysdeps/i386/jmpbuf-unwind.h: Likewise.
4030         * sysdeps/mips/jmpbuf-unwind.h: Likewise.
4031         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
4032         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
4033         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
4034         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
4035         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
4036         * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
4037         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
4039 2006-01-09  Roland McGrath  <roland@redhat.com>
4041         * tst-initializers1-c89.c: New file.
4042         * tst-initializers1-c99.c: New file.
4043         * tst-initializers1-gnu89.c: New file.
4044         * tst-initializers1-gnu99.c: New file.
4045         * Makefile (tests): Add them.
4046         (CFLAGS-tst-initializers1-c89.c): New variable.
4047         (CFLAGS-tst-initializers1-c99.c): New variable.
4048         (CFLAGS-tst-initializers1-gnu89.c): New variable.
4049         (CFLAGS-tst-initializers1-gnu99.c): New variable.
4051         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
4052         Use __extension__ on anonymous union definition.
4053         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4054         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4055         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4056         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4057         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4059 2006-01-08  Jakub Jelinek  <jakub@redhat.com>
4061         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
4062         Don't give the union a name because it changes the mangled name.
4063         Instead name the struct for __data.
4064         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_mutex_t):
4065         Likewise.
4066         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_mutex_t):
4067         Likewise.
4069 2006-01-09  Jakub Jelinek  <jakub@redhat.com>
4071         * sysdeps/sparc/sparc64/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Add
4072         stack bias to mc_ftp field.
4074 2006-01-07  Ulrich Drepper  <drepper@redhat.com>
4076         * sysdeps/pthread/aio_misc.h (AIO_MISC_WAIT): Work around gcc
4077         being too clever and reloading the futex value where it shouldn't.
4079 2006-01-06  Ulrich Drepper  <drepper@redhat.com>
4081         * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX): Use
4082         correct type.
4084 2006-01-06  Jakub Jelinek  <jakub@redhat.com>
4086         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
4087         Add cfi directives.
4089 2006-01-06  Ulrich Drepper  <drepper@redhat.com>
4091         * sysdeps/ia64/tls.h (tcbhead_t): Rename private member to __private.
4092         * sysdeps/ia64/tcb-offsets.sym: Adjust for private->__private
4093         rename in tcbhead_t.
4095         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
4096         Don't give the union a name because it changes the mangled name.
4097         Instead name the struct for __data.
4098         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4099         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4100         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4101         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4102         * pthread_create.c (start_thread): Adjust robust mutex free loop.
4103         * descr.h (ENQUEUE_MUTEX, DEQUEUE_MUTEX): Adjust.
4105 2006-01-05  Ulrich Drepper  <drepper@redhat.com>
4107         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
4108         Return status.
4109         (lll_futex_timed_wait): Define.
4110         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
4111         * sysdeps/pthread/aio_misc.h: New file.
4113 2006-01-03  Joseph S. Myers  <joseph@codesourcery.com>
4115         * Makefile ($(objpfx)$(multidir)): Use mkdir -p.
4117 2006-01-03  Steven Munroe  <sjmunroe@us.ibm.com>
4119         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
4120         (PSEUDO): Remove redundant cfi_startproc and cfi_endproc directives.
4121         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
4123 2006-01-04  Ulrich Drepper  <drepper@redhat.com>
4125         * tst-cancel24.cc: Use C headers instead of C++ headers.
4127 2006-01-03  Jakub Jelinek  <jakub@redhat.com>
4129         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Remove #error for
4130         sparc-linux configured glibc.
4131         (lll_futex_wake_unlock): Define to 1 for sparc-linux configured glibc.
4132         (__lll_mutex_trylock, __lll_mutex_cond_trylock, __lll_mutex_lock,
4133         __lll_mutex_cond_lock, __lll_mutex_timedlock): Use
4134         atomic_compare_and_exchange_val_24_acq instead of
4135         atomic_compare_and_exchange_val_acq.
4136         (lll_mutex_unlock, lll_mutex_unlock_force): Use atomic_exchange_24_rel
4137         instead of atomic_exchange_rel.
4138         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: New file.
4139         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c: New
4140         file.
4141         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c: New
4142         file.
4143         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: New file.
4144         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: New file.
4145         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: New file.
4146         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c: New file.
4147         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: New file.
4148         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
4149         New file.
4150         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
4151         New file.
4152         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: New file.
4153         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: New file.
4154         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c: New
4155         file.
4156         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_trywait.c: New
4157         file.
4158         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: New file.
4160 2006-01-03  Ulrich Drepper  <drepper@redhat.com>
4162         * sysdeps/pthread/pthread.h [__WORDSIZE==64]: Don't use cast in
4163         mutex initializers.
4165 2006-01-02  Jakub Jelinek  <jakub@redhat.com>
4167         * sysdeps/sparc/tls.h (tcbhead_t): Add pointer_guard field.
4168         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
4169         THREAD_COPY_POINTER_GUARD): Define.
4170         * sysdeps/sparc/tcb-offsets.sym (POINTER_GUARD): Define.
4171         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Revert 2005-12-27 changes.
4173 2006-01-01  Ulrich Drepper  <drepper@redhat.com>
4175         * version.c: Update copyright year.
4177 2005-12-29  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4179         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Remove explicit
4180         .eh_frame section, use cfi_* directives.
4181         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Add cfi instrumentation.
4183 2005-12-30  Ulrich Drepper  <drepper@redhat.com>
4185         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Undo last change for
4186         now.
4188 2005-12-29  Ulrich Drepper  <drepper@redhat.com>
4190         * sysdeps/pthread/sigaction.c: Removed.
4191         * sigaction.c: New file.
4192         * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-sigaction.c.
4194 2005-12-28  Ulrich Drepper  <drepper@redhat.com>
4196         * Makefile (tests): Add tst-signal7.
4197         * tst-signal7.c: New file.
4199 2005-12-27  Roland McGrath  <roland@redhat.com>
4201         * sysdeps/x86_64/jmpbuf-unwind.h (_jmpbuf_sp): New inline function.
4202         (_JMPBUF_UNWINDS_ADJ): Use it, to PTR_DEMANGLE before comparison.
4203         * sysdeps/alpha/jmpbuf-unwind.h: Likewise.
4204         * sysdeps/i386/jmpbuf-unwind.h: Likewise.
4205         * sysdeps/mips/jmpbuf-unwind.h: Likewise.
4206         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
4207         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
4208         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
4209         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
4210         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
4211         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
4213 2005-12-27  Jakub Jelinek  <jakub@redhat.com>
4215         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Add __next
4216         and __prev field to pthread_mutex_t.
4217         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4218         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4219         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4220         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4221         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Add __next field
4222         to pthread_mutex_t.
4224 2005-12-26  Ulrich Drepper  <drepper@redhat.com>
4226         * pthreadP.h: Define PTHREAD_MUTEX_ROBUST_PRIVATE_NP,
4227         PTHREAD_MUTEX_ROBUST_PRIVATE_RECURSIVE_NP,
4228         PTHREAD_MUTEX_ROBUST_PRIVATE_ERRORCHECK_NP,
4229         PTHREAD_MUTEX_ROBUST_PRIVATE_ADAPTIVE_NP,
4230         PTHREAD_MUTEXATTR_FLAG_ROBUST, PTHREAD_MUTEXATTR_FLAG_PSHARED,
4231         and PTHREAD_MUTEXATTR_FLAG_BITS.
4232         * descr.h (struct pthread): Add robust_list field and define
4233         ENQUEUE_MUTEX and DEQUEUE_MUTEX macros.
4234         * pthread_mutexattr_getrobust.c: New file.
4235         * pthread_mutexattr_setrobust.c: New file.
4236         * pthread_mutex_consistent.c: New file.
4237         * sysdeps/pthread/pthread.h: Declare pthread_mutexattr_getrobust,
4238         pthread_mutexattr_setrobust, and pthread_mutex_consistent.
4239         Define PTHREAD_MUTEX_STALLED_NP and PTHREAD_MUTEX_ROBUST_NP.
4240         Adjust pthread_mutex_t initializers.
4241         * nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Add __next
4242         field to pthread_mutex_t.
4243         * nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Add __next
4244         and __prev field to pthread_mutex_t.
4245         * Versions [GLIBC_2.4]: Export pthread_mutexattr_getrobust_np,
4246         pthread_mutexattr_setrobust_np, and pthread_mutex_consistent_np.
4247         * pthread_mutexattr_getpshared.c: Use PTHREAD_MUTEXATTR_FLAG_PSHARED
4248         and PTHREAD_MUTEXATTR_FLAG_BITS macros instead of magic numbers.
4249         * pthread_mutexattr_gettype.c: Likewise.
4250         * pthread_mutexattr_setpshared.c: Likewise.
4251         * pthread_mutexattr_settype.c: Likewise.
4252         * pthread_mutex_init.c: Reject robust+pshared attribute for now.
4253         Initialize mutex kind according to robust flag.
4254         * pthread_mutex_lock.c: Implement local robust mutex.
4255         * pthread_mutex_timedlock.c: Likewise.
4256         * pthread_mutex_trylock.c: Likewise.
4257         * pthread_mutex_unlock.c: Likewise.
4258         * pthread_create.c (start_thread): Mark robust mutexes which remained
4259         locked as dead.
4260         * tst-robust1.c: New file.
4261         * tst-robust2.c: New file.
4262         * tst-robust3.c: New file.
4263         * tst-robust4.c: New file.
4264         * tst-robust5.c: New file.
4265         * tst-robust6.c: New file.
4266         * tst-robust7.c: New file.
4267         * Makefile (libpthread-routines): Add pthread_mutexattr_getrobust,
4268         pthread_mutexattr_setrobust, and pthread_mutex_consistent.
4269         (tests): Add tst-robust1, tst-robust2, tst-robust3, tst-robust4,
4270         tst-robust5, tst-robust6, and tst-robust7.
4272         * tst-typesizes.c: New file.
4273         * Makefile (tests): Add tst-typesizes.
4275         * tst-once3.c: More debug output.
4277 2005-12-24  Ulrich Drepper  <drepper@redhat.com>
4279         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Add break
4280         missing after last change.
4282         * version.c: Update copyright year.
4284 2005-12-23  Ulrich Drepper  <drepper@redhat.com>
4286         * pthread_mutex_destroy.c: Set mutex type to an invalid value.
4287         * pthread_mutex_lock.c: Return EINVAL for invalid mutex type.
4288         * pthread_mutex_trylock.c: Likewise.
4289         * pthread_mutex_timedlock.c: Likewise.
4290         * pthread_mutex_unlock.c: Likewise.
4292 2005-12-22  Roland McGrath  <roland@redhat.com>
4294         * sysdeps/pthread/sigaction.c: Use "" instead of <> to include self,
4295         so that #include_next's search location is not reset to the -I..
4296         directory where <nptl/...> can be found.
4298 2005-12-22  Ulrich Drepper  <drepper@redhat.com>
4300         [BZ #1913]
4301         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
4302         Fix unwind info.  Remove useless branch prediction prefix.
4303         * tst-cancel24.cc: New file.
4304         * Makefile: Add rules to build and run tst-cancel24.
4306 2005-12-21  Roland McGrath  <roland@redhat.com>
4308         * libc-cancellation.c: Use <> rather than "" #includes.
4309         * pt-cleanup.c: Likewise.
4310         * pthread_create.c: Likewise.
4311         * pthread_join.c: Likewise.
4312         * pthread_timedjoin.c: Likewise.
4313         * pthread_tryjoin.c: Likewise.
4314         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Likewise.
4315         * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
4316         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
4317         * unwind.c: Likewise.
4319 2005-12-19  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4321         * sysdeps/sh/tcb-offsets.sym: Add POINTER_GUARD.
4322         * sysdeps/sh/tls.h (tcbhead_t): Remove private and add pointer_guard.
4323         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
4324         THREAD_COPY_POINTER_GUARD): Define.
4326 2005-12-19  Jakub Jelinek  <jakub@redhat.com>
4328         * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): Make room for 2 uintptr_t's
4329         rather than one.
4330         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
4331         THREAD_COPY_POINTER_GUARD): Define.
4332         * sysdeps/powerpc/tcb-offsets.sym (POINTER_GUARD): Add.
4333         * sysdeps/powerpc/tls.h (tcbhead_t): Add pointer_guard field.
4334         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
4335         THREAD_COPY_POINTER_GUARD): Define.
4336         * sysdeps/s390/tcb-offsets.sym (STACK_GUARD): Add.
4337         * sysdeps/s390/tls.h (THREAD_GET_POINTER_GUARD,
4338         THREAD_SET_POINTER_GUARD, THREAD_COPY_POINTER_GUARD): Define.
4339         * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S (__ia64_longjmp):
4340         Use PTR_DEMANGLE for B0 if defined.
4342 2005-12-17  Ulrich Drepper  <drepper@redhat.com>
4344         * pthread_create.c (__pthread_create_2_1): Use
4345         THREAD_COPY_POINTER_GUARD if available.
4346         * sysdeps/i386/tcb-offsets.sym: Add POINTER_GUARD.
4347         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
4348         * sysdeps/i386/tls.h (tcbhead_t): Add pointer_guard.
4349         Define THREAD_SET_POINTER_GUARD and THREAD_COPY_POINTER_GUARD.
4350         * sysdeps/x86_64/tls.h: Likewise.
4352 2005-12-15  Roland McGrath  <roland@redhat.com>
4354         * sysdeps/unix/sysv/linux/mq_notify.c: Don't use sysdeps/generic.
4356 2005-12-13  Ulrich Drepper  <drepper@redhat.com>
4358         * sysdeps/pthread/sigfillset.c: Adjust for files moved out of
4359         sysdeps/generic.
4360         * errno-loc.c: New file.
4362 2005-12-12  Roland McGrath  <roland@redhat.com>
4364         * init.c (__pthread_initialize_minimal_internal): Do __static_tls_size
4365         adjustments before choosing stack size.  Update minimum stack size
4366         calculation to match allocate_stack change.
4368 2005-12-12  Ulrich Drepper  <drepper@redhat.com>
4370         * allocatestack.c (allocate_stack): Don't demand that there is an
4371         additional full page available on the stack beside guard, TLS, the
4372         minimum stack.
4374 2005-11-24  Ulrich Drepper  <drepper@redhat.com>
4376         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
4377         (__cleanup_fct_attribute): Use __regparm__ not regparm.
4379         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: When
4380         compiling 32-bit code we must define __cleanup_fct_attribute.
4382 005-11-24  Jakub Jelinek  <jakub@redhat.com>
4384         [BZ #1920]
4385         * sysdeps/pthread/pthread.h (__pthread_unwind_next): Use
4386         __attribute__ instead of __attribute.
4387         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
4388         (__cleanup_fct_attribute): Likewise.
4390 2005-11-17  Jakub Jelinek  <jakub@redhat.com>
4392         * sysdeps/pthread/unwind-forcedunwind.c (pthread_cancel_init): Put
4393         a write barrier before writing libgcc_s_getcfa.
4395 2005-11-06  Ulrich Drepper  <drepper@redhat.com>
4397         * sysdeps/unix/sysv/linux/configure: Removed.
4399 2005-11-05  Ulrich Drepper  <drepper@redhat.com>
4401         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Remove trace of
4402         optional init_array/fini_array support.
4404 2005-10-24  Roland McGrath  <roland@redhat.com>
4406         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Remove unnecessary
4407         versioned_symbol use.
4409 2005-10-16  Roland McGrath  <roland@redhat.com>
4411         * init.c (__pthread_initialize_minimal_internal): Even when using a
4412         compile-time default stack size, apply the minimum that allocate_stack
4413         will require, and round up to page size.
4415 2005-10-10  Daniel Jacobowitz  <dan@codesourcery.com>
4417         * Makefile ($(test-modules)): Remove static pattern rule.
4419 2005-10-14  Jakub Jelinek  <jakub@redhat.com>
4420             Ulrich Drepper  <drepper@redhat.com>
4422         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix stack
4423         alignment in callback function.
4424         * Makefile: Add rules to build and run tst-align3.
4425         * tst-align3.c: New file.
4427 2005-10-03  Jakub Jelinek  <jakub@redhat.com>
4429         * allocatestack.c (setxid_signal_thread): Add
4430         INTERNAL_SYSCALL_DECL (err).
4432 2005-10-02  Jakub Jelinek  <jakub@redhat.com>
4434         * allocatestack.c (setxid_signal_thread): Need to use
4435         atomic_compare_and_exchange_bool_acq.
4437 2005-10-01  Ulrich Drepper  <drepper@redhat.com>
4438             Jakub Jelinek  <jakub@redhat.com>
4440         * descr.h: Define SETXID_BIT and SETXID_BITMASK.  Adjust
4441         CANCEL_RESTMASK.
4442         (struct pthread): Move specific_used field to avoid padding.
4443         Add setxid_futex field.
4444         * init.c (sighandler_setxid): Reset setxid flag and release the
4445         setxid futex.
4446         * allocatestack.c (setxid_signal_thread): New function.  Broken
4447         out of the bodies of the two loops in __nptl_setxid.  For undetached
4448         threads check whether they are exiting and if yes, don't send a signal.
4449         (__nptl_setxid): Simplify loops by using setxid_signal_thread.
4450         * pthread_create.c (start_thread): For undetached threads, check
4451         whether setxid bit is set.  If yes, wait until signal has been
4452         processed.
4454         * allocatestack.c (STACK_VARIABLES): Initialize them.
4455         * pthread_create.c (__pthread_create_2_1): Initialize pd.
4457 2004-09-02  Jakub Jelinek  <jakub@redhat.com>
4459         * pthread_cond_destroy.c (__pthread_cond_destroy): If there are
4460         waiters, awake all waiters on the associated mutex.
4462 2005-09-22  Roland McGrath  <roland@redhat.com>
4464         * perf.c [__x86_64__] (HP_TIMING_NOW): New macro (copied from
4465         ../sysdeps/x86_64/hp-timing.h).
4467 2005-08-29  Jakub Jelinek  <jakub@redhat.com>
4469         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_WAKE_OP,
4470         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
4471         (lll_futex_wake_unlock): Define.
4472         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_WAKE_OP,
4473         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
4474         (lll_futex_wake_unlock): Define.
4475         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_WAKE_OP,
4476         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
4477         (lll_futex_wake_unlock): Define.
4478         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_WAKE_OP,
4479         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
4480         (lll_futex_wake_unlock): Define.
4481         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_WAKE_OP,
4482         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
4483         (lll_futex_wake_unlock): Define.
4484         * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal): Use
4485         lll_futex_wake_unlock.
4486         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
4487         (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
4488         (__pthread_cond_signal): Use FUTEX_WAKE_OP.
4489         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
4490         (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
4491         (__pthread_cond_signal): Use FUTEX_WAKE_OP.
4493 2005-09-05  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4495         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
4496         Fix typo in register name.
4498 2005-08-23  Ulrich Drepper  <drepper@redhat.com>
4500         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
4501         Use __sigfillset.  Document that sigfillset does the right thing wrt
4502         to SIGSETXID.
4504 2005-07-11  Jakub Jelinek  <jakub@redhat.com>
4506         [BZ #1102]
4507         * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER,
4508         PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP,
4509         PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP,
4510         PTHREAD_MUTEX_ADAPTIVE_NP, PTHREAD_RWLOCK_INITIALIZER,
4511         PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP,
4512         PTHREAD_COND_INITIALIZER): Supply zeros for all fields
4513         in the structure.
4514         * Makefile (tests): Add tst-initializers1.
4515         (CFLAGS-tst-initializers1.c): Set.
4516         * tst-initializers1.c: New test.
4518 2005-07-11  Jakub Jelinek  <jakub@redhat.com>
4520         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_rwlock_t):
4521         Make sure __flags are located at offset 48 from the start of the
4522         structure.
4524 2005-07-02  Roland McGrath  <roland@redhat.com>
4526         * Makeconfig: Comment fix.
4528 2005-07-05  Jakub Jelinek  <jakub@redhat.com>
4530         * descr.h (PTHREAD_STRUCT_END_PADDING): Define.
4531         * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): If PTHREAD_STRUCT_END_PADDING
4532         is smaller than 8 bytes, increase TLS_PRE_TCB_SIZE by 16 bytes.
4533         (THREAD_SYSINFO, THREAD_SELF, DB_THREAD_SELF): Don't assume
4534         TLS_PRE_TCB_SIZE is sizeof (struct pthread).
4535         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
4536         * sysdeps/ia64/tcb-offsets.sym (PID, TID, MULTIPLE_THREADS_OFFSET):
4537         Use TLS_PRE_TCB_SIZE instead of sizeof (struct pthread).
4538         * sysdeps/unix/sysv/linux/ia64/createthread.c (TLS_VALUE): Don't
4539         assume TLS_PRE_TCB_SIZE is sizeof (struct pthread).
4541 2005-06-25  Jakub Jelinek  <jakub@redhat.com>
4543         * sysdeps/i386/tls.h (tcbhead_t): Add stack_guard field.
4544         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
4545         * sysdeps/x86_64/tls.h (tcbhead_t): Add sysinfo and stack_guard
4546         fields.
4547         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
4548         * sysdeps/s390/tls.h (tcbhead_t): Add stack_guard
4549         field.  Put in sysinfo field unconditionally.
4550         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
4551         * sysdeps/powerpc/tls.h (tcbhead_t): Add stack_guard field.
4552         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
4553         * sysdeps/sparc/tls.h (tcbhead_t): Add sysinfo and stack_guard
4554         fields.
4555         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
4556         * pthread_create.c (__pthread_create_2_1): Use
4557         THREAD_COPY_STACK_GUARD macro.
4558         * Makefile: Add rules to build and run tst-stackguard1{,-static}
4559         tests.
4560         * tst-stackguard1.c: New file.
4561         * tst-stackguard1-static.c: New file.
4563 2005-06-14  Alan Modra  <amodra@bigpond.net.au>
4565         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
4566         Invoke CGOTSETUP and CGOTRESTORE.
4567         (CGOTSETUP, CGOTRESTORE): Define.
4569 2005-05-29  Richard Henderson  <rth@redhat.com>
4571         * tst-cancel4.c (WRITE_BUFFER_SIZE): New.
4572         (tf_write, tf_writev): Use it.
4573         (do_test): Use socketpair instead of pipe.  Set SO_SNDBUF to
4574         the system minimum.
4576 2005-05-23  Jakub Jelinek  <jakub@redhat.com>
4578         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
4579         [IS_IN_librt] (CENABLE, CDISABLE): Use JUMPTARGET instead of
4580         __librt_*_asynccancel@local.
4582 2005-05-17  Alan Modra  <amodra@bigpond.net.au>
4584         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Delete
4585         all occurrences of JUMPTARGET.  Instead append @local to labels.
4587 2005-05-20  Jakub Jelinek  <jakub@redhat.com>
4589         * sysdeps/i386/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN): Define to
4590         size/alignment of struct pthread rather than tcbhead_t.
4591         * sysdeps/x86_64/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
4592         Likewise.
4593         * sysdeps/s390/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
4594         Likewise.
4595         * sysdeps/sparc/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
4596         Likewise.
4598 2005-05-19  Richard Henderson  <rth@redhat.com>
4600         * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use
4601         __sync_val_compare_and_swap, not explicit _si variant.
4602         * sysdeps/ia64/pthread_spin_trylock.c (pthread_spin_trylock): Likewise.
4604 2005-05-03  Ulrich Drepper  <drepper@redhat.com>
4606         [BZ #915]
4607         * sysdeps/pthread/pthread.h: Avoid empty initializers.
4609 2005-05-03  Jakub Jelinek  <jakub@redhat.com>
4611         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Remove explicit
4612         .eh_frame section, use cfi_* directives.
4614 2005-04-27  Jakub Jelinek  <jakub@redhat.com>
4616         * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: Use <> instead
4617         of "" includes.
4619 2005-04-27  Ulrich Drepper  <drepper@redhat.com>
4621         [BZ #1075]
4622         * tst-cancel17.c (do_test): Add arbitrary factor to make sure
4623         aio_write blocks.
4625 2005-04-27  Roland McGrath  <roland@redhat.com>
4627         * Makefile (tests): Remove tst-clock2.
4629         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Handle
4630         CLOCK_PROCESS_CPUTIME_ID and CLOCK_PROCESS_THREAD_ID specially,
4631         translating to the kernel clockid_t for our own process/thread clock.
4633         * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: New file.
4635 2005-04-15  Jakub Jelinek  <jakub@redhat.com>
4637         * old_pthread_cond_init.c: Include <errno.h>.
4638         (__pthread_cond_init_2_0): Fail with EINVAL if COND_ATTR is
4639         process shared or uses clock other than CLOCK_REALTIME.
4640         * pthread_cond_init.c (__pthread_cond_init): Remove bogus comment.
4642 2005-04-13  David S. Miller  <davem@davemloft.net>
4644         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: New file.
4645         * sysdeps/sparc/sparc64/clone.S: New file.
4647 2005-04-05  Jakub Jelinek  <jakub@redhat.com>
4649         [BZ #1102]
4650         * sysdeps/pthread/pthread.h (__pthread_cleanup_routine): Use
4651         __inline instead of inline.
4652         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_routine): Likewise.
4654 2005-03-31  Jakub Jelinek  <jakub@redhat.com>
4656         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Use
4657         functionally equivalent, but shorter instructions.
4658         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
4659         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
4660         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
4661         Likewise.
4662         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
4663         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
4664         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
4665         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
4666         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4667         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
4668         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
4669         Likewise.
4670         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
4671         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
4672         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4673         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
4674         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
4676 2005-03-28  Daniel Jacobowitz  <dan@codesourcery.com>
4678         * sysdeps/mips/Makefile: New file.
4679         * sysdeps/mips/nptl-sysdep.S: New file.
4680         * sysdeps/mips/tcb-offsets.sym: New file.
4681         * sysdeps/mips/pthread_spin_lock.S: New file.
4682         * sysdeps/mips/pthread_spin_trylock.S: New file.
4683         * sysdeps/mips/pthreaddef.h: New file.
4684         * sysdeps/mips/tls.h: New file.
4685         * sysdeps/mips/jmpbuf-unwind.h: New file.
4686         * sysdeps/unix/sysv/linux/mips/lowlevellock.h: New file.
4687         * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h: New file.
4688         * sysdeps/unix/sysv/linux/mips/bits/semaphore.h: New file.
4689         * sysdeps/unix/sysv/linux/mips/pthread_once.c: New file.
4690         * sysdeps/unix/sysv/linux/mips/fork.c: New file.
4691         * sysdeps/unix/sysv/linux/mips/pt-vfork.S: New file.
4692         * sysdeps/unix/sysv/linux/mips/vfork.S: New file.
4693         * sysdeps/unix/sysv/linux/mips/clone.S: New file.
4694         * sysdeps/unix/sysv/linux/mips/createthread.c: New file.
4695         * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: New file.
4697 2005-03-23  Ulrich Drepper  <drepper@redhat.com>
4699         [BZ #1112]
4700         * pthread_create.c (__pthread_create_2_1): Rename syscall error
4701         variable to scerr.
4703 2005-03-10  Jakub Jelinek  <jakub@redhat.com>
4705         * tst-getpid1.c (do_test): Align stack passed to clone{2,}.
4707 2005-02-25  Roland McGrath  <roland@redhat.com>
4709         * alloca_cutoff.c: Correct license text.
4710         * tst-unload.c: Likewise.
4711         * sysdeps/pthread/allocalim.h: Likewise.
4712         * sysdeps/pthread/pt-initfini.c: Likewise.
4713         * sysdeps/pthread/bits/libc-lock.h: Likewise.
4714         * sysdeps/pthread/bits/sigthread.h: Likewise.
4715         * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
4716         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
4718 2005-02-16  Roland McGrath  <roland@redhat.com>
4720         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
4721         Use unsigned int * for ptr_nthreads.
4723 2005-02-14  Alan Modra  <amodra@bigpond.net.au>
4725         [BZ #721]
4726         * sysdeps/powerpc/tcb-offsets.sym (thread_offsetof): Redefine to suit
4727         gcc4.
4729 2005-02-07  Richard Henderson  <rth@redhat.com>
4731         [BZ #787]
4732         * sysdeps/pthread/pthread.h (__sigsetjmp): Use pointer as first
4733         argument.
4735 2004-11-03  Marcus Brinkmann  <marcus@gnu.org>
4737         * sysdeps/generic/lowlevellock.h (__generic_mutex_unlock): Fix
4738         order of arguments in invocation of atomic_add_zero.
4740 2005-01-26  Jakub Jelinek  <jakub@redhat.com>
4742         [BZ #737]
4743         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S (__new_sem_trywait):
4744         Use direct %gs segment access or, if NO_TLS_DIRECT_SEG_REFS,
4745         at least gotntpoff relocation and addition.
4746         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
4747         Likewise.
4748         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
4749         Likewise.
4750         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
4751         Likewise.
4753 2005-01-06  Ulrich Drepper  <drepper@redhat.com>
4755         * allocatestack.c (init_one_static_tls): Adjust initialization of DTV
4756         entry for static tls deallocation fix.
4757         * sysdeps/alpha/tls.h (dtv_t): Change pointer type to be struct which
4758         also contains information whether the memory pointed to is static
4759         TLS or not.
4760         * sysdeps/i386/tls.h: Likewise.
4761         * sysdeps/ia64/tls.h: Likewise.
4762         * sysdeps/powerpc/tls.h: Likewise.
4763         * sysdeps/s390/tls.h: Likewise.
4764         * sysdeps/sh/tls.h: Likewise.
4765         * sysdeps/sparc/tls.h: Likewise.
4766         * sysdeps/x86_64/tls.h: Likewise.
4768 2004-12-27  Ulrich Drepper  <drepper@redhat.com>
4770         * init.c (__pthread_initialize_minimal_internal): Use __sigemptyset.
4772 2004-12-21  Jakub Jelinek  <jakub@redhat.com>
4774         * sysdeps/i386/tls.h (CALL_THREAD_FCT): Maintain 16 byte alignment of
4775         %esp.
4776         * Makefile (tests): Add tst-align2.
4777         * tst-align2.c: New test.
4778         * sysdeps/i386/Makefile (CFLAGS-tst-align{,2}.c): Add
4779         -mpreferred-stack-boundary=4.
4781 2004-12-18  Roland McGrath  <roland@redhat.com>
4783         * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h:
4784         New file removed withdrawn for the moment.
4786 2004-12-17  Richard Henderson  <rth@redhat.com>
4788         * sysdeps/unix/sysv/linux/alpha/clone.S: New file.
4789         * sysdeps/alpha/tcb-offsets.sym (TID_OFFSET): New.
4791 2004-12-16  Ulrich Drepper  <drepper@redhat.com>
4793         * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h: New file.
4794         Increased PTHREAD_STACK_MIN.
4796         * tst-context1.c (stacks): Use bigger stack size.
4798 2004-12-16  Jakub Jelinek  <jakub@redhat.com>
4800         * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: New file.
4801         * sysdeps/sparc/tcb-offsets.sym: Add TID.
4803 2004-12-15  Jakub Jelinek  <jakub@redhat.com>
4805         * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: New file.
4806         * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: New file.
4807         * sysdeps/s390/tcb-offsets.sym (TID): Add.
4809 2004-12-15  Ulrich Drepper  <drepper@redhat.com>
4811         * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: New file.
4813 2004-12-14  Ulrich Drepper  <drepper@redhat.com>
4815         * sysdeps/powerpc/tcb-offsets.sym: Add TID.
4816         * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: New file.
4818         * tst-getpid1.c: If child crashes, report this first.  Print which
4819         signal.
4821 2004-12-09  Ulrich Drepper  <drepper@redhat.com>
4823         * init.c (__pthread_initialize_minimal_internal): Also unblock
4824         SIGSETXID.
4826 2004-12-01  Jakub Jelinek  <jakub@redhat.com>
4828         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_CPUTIME,
4829         _POSIX_THREAD_CPUTIME): Define to 0.
4830         * sysdeps/pthread/timer_create.c (timer_create): Remove unused code
4831         handling CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID.
4832         * sysdeps/pthread/timer_routines.c (__timer_signal_thread_pclk,
4833         __timer_signal_thread_tclk): Remove.
4834         (init_module): Remove their initialization.
4835         (thread_cleanup): Remove their cleanup assertions.
4836         * sysdeps/pthread/posix-timer.h (__timer_signal_thread_pclk,
4837         __timer_signal_thread_tclk): Remove.
4838         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Removed.
4839         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Removed.
4840         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Removed.
4842 2004-12-07  Jakub Jelinek  <jakub@redhat.com>
4844         * sysdeps/ia64/tcb-offsets.sym (TID): Add.
4845         * sysdeps/unix/sysv/linux/ia64/clone2.S: New file.
4847         * Makefile (tests): Add tst-getpid2.
4848         * tst-getpid1.c (TEST_CLONE_FLAGS): Define.
4849         (do_test): Use it.  Use __clone2 instead of clone on ia64.
4850         * tst-getpid2.c: New test.
4852 2004-12-07  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4854         * sysdeps/unix/sysv/linux/sh/clone.S: New file.
4856 2004-12-04  Ulrich Drepper  <drepper@redhat.com>
4858         * Makefile (tests): Add tst-getpid1.
4859         * tst-getpid1.c: New file.
4860         * sysdeps/unix/sysv/linux/i386/clone.S: New file.
4861         * sysdeps/unix/sysv/linux/x86_64/clone.S: New file.
4863 2004-12-02  Roland McGrath  <roland@redhat.com>
4865         * Makefile (libpthread-nonshared): Variable removed.
4866         ($(objpfx)libpthread_nonshared.a): Target removed.
4867         ($(inst_libdir)/libpthread_nonshared.a): Likewise.
4868         These are now handled by generic magic from
4869         libpthread-static-only-routines being set.
4871 2004-11-27  Ulrich Drepper  <drepper@redhat.com>
4873         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_PRIORITIZED_IO,
4874         _POSIX2_CHAR_TERM, _POSIX_THREAD_PRIO_INHERIT,
4875         _POSIX_THREAD_PRIO_PROTECT): Define.
4876         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
4877         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
4878         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
4880 2004-11-26  Jakub Jelinek  <jakub@redhat.com>
4882         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_ADVISORY_INFO,
4883         _POSIX_SPORADIC_SERVER, _POSIX_THREAD_SPORADIC_SERVER, _POSIX_TRACE,
4884         _POSIX_TRACE_EVENT_FILTER, _POSIX_TRACE_INHERIT, _POSIX_TRACE_LOG,
4885         _POSIX_TYPED_MEMORY_OBJECTS, _POSIX_IPV6, _POSIX_RAW_SOCKETS): Define.
4886         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
4887         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
4888         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
4890 2004-11-24  Ulrich Drepper  <drepper@redhat.com>
4892         * sysdeps/x86_64/Makefile [nptl]: Define CFLAGS-pthread_create.c.
4894         * Makefile (libpthread-routines): Add pthread_setschedprio.
4895         * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setschedprio.
4896         * sysdeps/pthread/pthread.h: Declare pthread_setschedprio.
4897         * pthread_setschedprio.c: New file.
4899 2004-11-20  Jakub Jelinek  <jakub@redhat.com>
4901         * pthread_create.c (pthread_cancel): Add PTHREAD_STATIC_FN_REQUIRE.
4902         * pthread_cancel.c (pthread_create): Likewise.
4904         * Makefile (libpthread-routines): Add vars.
4905         * sysdeps/pthread/createthread.c (__pthread_multiple_threads): Remove.
4906         * init.c (__default_stacksize, __is_smp): Remove.
4907         * vars.c: New file.
4908         * pthreadP.h (__find_thread_by_id): If !SHARED, add weak_function
4909         and define a wrapper macro.
4910         (PTHREAD_STATIC_FN_REQUIRE): Define.
4911         * allocatestack.c (__find_thread_by_id): Undefine.
4912         * pthread_create (__pthread_keys): Remove.
4913         (pthread_mutex_lock, pthread_mutex_unlock, pthread_once,
4914         pthread_key_create, pthread_setspecific, pthread_getspecific): Add
4915         PTHREAD_STATIC_FN_REQUIRE.
4917 2004-11-18  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4919         * sysdeps/sh/tls.h (DB_THREAD_SELF): Set the correct bias
4920         parameter to REGISTER macro.
4922 2004-11-17  Roland McGrath  <roland@redhat.com>
4924         * sysdeps/unix/sysv/linux/timer_routines.c (__start_helper_thread):
4925         Make sure SIGCANCEL is blocked as well.
4927 2004-11-10  Jakub Jelinek  <jakub@redhat.com>
4929         * sysdeps/pthread/setxid.h: New file.
4930         * sysdeps/pthread/pthread-functions.h (HAVE_PTR__NPTL_SETXID): Remove.
4931         (struct xid_command): Add forward decl.
4932         (struct pthread_functions): Change return type of __nptl_setxid hook
4933         to int.
4934         * pthreadP.h (__nptl_setxid): Change return type to int.
4935         * allocatestack.c (__nptl_setxid): Call INTERNAL_SYSCALL_NCS in the
4936         calling thread, return its return value and set errno on failure.
4937         * descr.h (struct xid_command): Change id type to long array.
4939         * Makefile: Add rules to build and test tst-setuid1 and
4940         tst-setuid1-static.
4941         * tst-setuid1.c: New test.
4942         * tst-setuid1-static.c: New test.
4944 2004-11-10  Jakub Jelinek  <jakub@redhat.com>
4946         * Makefile (tests): Add tst-exit3.
4947         * tst-exit3.c: New test.
4949 2004-11-09  Ulrich Drepper  <drepper@redhat.com>
4951         * Makefile (tests): Add tst-exit2.
4952         * tst-exit2.c: New file.
4954 2004-11-09  Roland McGrath  <roland@redhat.com>
4956         [BZ #530]
4957         * sysdeps/pthread/createthread.c (do_clone): Increment __nptl_nthreads
4958         here, before calling clone.
4959         * pthread_create.c (start_thread): Don't do it here.
4961 2004-11-02  Jakub Jelinek  <jakub@redhat.com>
4963         * sysdeps/unix/sysv/linux/smp.h: Include <errno.h>.
4965 2004-10-29  Kaz  Kojima  <kkojima@rr.iij4u.or.jp>
4967         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
4968         Set ETIMEDOUT to errno when time is up.  Tweak to avoid
4969         assembler warning.
4971 2004-10-28  Jakub Jelinek  <jakub@redhat.com>
4973         * pthread_create.c (__pthread_create_2_1): Avoid leaking stacks
4974         if sched_priority is not between minprio and maxprio.
4976 2004-10-25  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4978         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
4979         (__pthread_cond_timedwait): Use clock_gettime syscall if exists.
4981         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
4982         (__lll_mutex_timedlock_wait): Fix a bad branch condition.
4984 2004-10-24  Ulrich Drepper  <drepper@redhat.com>
4986         * sysdeps/unix/sysv/linux/smp.h (is_smp_system): Use
4987         not-cancelable I/O functions.
4989 2004-10-21  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4991         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
4992         (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
4993         make sure 2 is stored in the futex and we looked at the old value.
4994         Fix a few other problems to return the correct value.
4996 2004-10-14  Richard Henderson  <rth@redhat.com>
4998         * sysdeps/alpha/tcb-offsets.sym (thread_offsetof): Redefine to
4999         make gcc4 happy.
5001 2004-10-06  Jakub Jelinek  <jakub@redhat.com>
5003         * sysdeps/unix/sysv/linux/jmp-unwind.c: Include pthreadP.h instead
5004         of pthread-functions.h and pthreaddef.h.
5005         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Likewise.
5007         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
5008         Change __data.__nwaiters from int to unsigned int.
5010         * tst-clock2.c (do_test): Don't fail if _POSIX_THREAD_CPUTIME == 0 and
5011         sysconf (_SC_THREAD_CPUTIME) returns negative value.
5013         * allocatestack.c (__find_thread_by_id): Move attribute_hidden
5014         before return type.
5016         * sysdeps/s390/jmpbuf-unwind.h: Include bits/wordsize.h.
5017         (JMPBUF_CFA_UNWINDS_ADJ): Subtract 96 resp. 160 bytes from CFA.
5019 2004-10-06  Ulrich Drepper  <drepper@redhat.com>
5021         * tst-cancel4.c (tf_msgrcv): Check for failure in msgget.  If the
5022         test fails, remove message queue.
5023         (tf_msgsnd): Likewise.
5025 2004-10-05  Jakub Jelinek  <jakub@redhat.com>
5027         * tst-clock1.c: Change #ifdef to #if defined.
5028         * tst-clock2.c: Likewise.
5029         * tst-cond11.c: Likewise.
5031         * sysdeps/pthread/timer_create.c (timer_create): Use
5032         defined _POSIX_CPUTIME && _POSIX_CPUTIME >= 0 instead of
5033         defined CLOCK_PROCESS_CPUTIME_ID #ifs and similarly for
5034         THREAD_CPUTIME.
5036 2004-10-05  Jakub Jelinek  <jakub@redhat.com>
5038         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h (_POSIX_CPUTIME,
5039         _POSIX_THREAD_CPUTIME): Define to 0.
5041 2004-10-04  Ulrich Drepper  <drepper@redhat.com>
5043         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Define _POSIX_CPUTIME
5044         and _POSIX_THREAD_CPUTIME to zero.
5045         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
5046         * tst-barrier2.c: Fix testing for POSIX feature.
5047         * tst-clock1.c: Likewise.
5048         * tst-clock2.c: Likewise.
5049         * tst-cond11.c: Likewise.
5050         * tst-cond4.c: Likewise.
5051         * tst-cond6.c: Likewise.
5052         * tst-flock2.c: Likewise.
5053         * tst-mutex4.c: Likewise.
5054         * tst-mutex9.c: Likewise.
5055         * tst-rwlock12.c: Likewise.
5056         * tst-rwlock4.c: Likewise.
5057         * tst-signal1.c: Likewise.
5058         * tst-spin2.c: Likewise.
5059         * sysdeps/pthread/posix-timer.h: Likewise.
5060         * sysdeps/pthread/timer_create.c: Likewise.
5061         * sysdeps/pthread/timer_routines.c: Likewise.
5063 2004-10-01  Ulrich Drepper  <drepper@redhat.com>
5065         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
5066         (__lll_mutex_timedlock_wait): Address futex correctly.
5068         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
5069         (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
5070         make sure 2 is stored in the futex and we looked at the old value.
5071         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
5072         (__lll_mutex_timedlock_wait): Likewise.  Fix a few other problems
5073         which might very well made the code not working at all before.
5074         [BZ #417]
5076 2004-09-28  Ulrich Drepper  <drepper@redhat.com>
5078         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
5079         allow SIGSETXID to be sent.
5080         * sysdeps/pthread/sigaction.c (__sigaction): Don't allow action
5081         for SIGSETXID to be defined.
5082         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
5083         SIGSETXID cannot be blocked.
5085         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
5086         Add __extension__ to long long types.
5087         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5088         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5089         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5090         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5091         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
5092         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
5093         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5095 2004-09-25  Ulrich Drepper  <drepper@redhat.com>
5097         * descr.h (struct pthread): Add stopped_start field.
5098         * sysdeps/pthread/createthread.c (create_thread): Set
5099         start_stopped flag in descriptor for new thread appropriately.
5100         * pthread_create.c (start_thread): Only take lock to be stopped on
5101         startup if stopped_start flag says so.
5103 2004-09-24  Ulrich Drepper  <drepper@redhat.com>
5105         * pthread_create.c (__pthread_create_2_1): Remember whether thread
5106         is created detached and if yes, do not try to free the stack in case
5107         the thread creation failed.
5108         * sysdeps/pthread/createthread.c (do_clone): Free stack here if clone
5109         call fails.  Don't depend on INTERNAL_SYSCALL_ERRNO return zero in
5110         case there has been no error.  [BZ #405]
5112         * pthread_create.c (start_thread): Don't wait for scheduler data
5113         etc to be set at the beginning of the function.  The cancellation
5114         infrastructure must have been set up.  And enable async
5115         cancellation before potentially going to sleep.  [BZ #401]
5117 2004-09-20  Ulrich Drepper  <drepper@redhat.com>
5119         * Versions: Remove exports for pthread_set*id_np functions.
5120         * sysdeps/pthread/pthread.h: Remove pthread_set*id_np prototypes
5121         for now.
5122         * Makefile: Don't build pthread_set*id code for now.
5124 2004-09-19  Ulrich Drepper  <drepper@redhat.com>
5126         * sysdeps/unix/sysv/linux/allocrtsig.c: Allocate second signal for
5127         internal use.
5128         * allocatestack.c (__nptl_setxid): New function.
5129         * descr.h (struct xid_command): Define type.
5130         * init.c (pthread_functions): Add ptr__nptl_setxid initialization.
5131         (sighandler_setxid): New function.
5132         (__pthread_initialize_minimal): Register sighandler_setxid for
5133         SIGCANCEL.
5134         * pt-allocrtsig.c: Update comment.
5135         * pthreadP.h: Define SIGSETXID.  Declare __xidcmd variable.
5136         Declare __nptl_setxid.
5137         * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_setxid.
5138         * sysdeps/pthread/pthread.h: Declare pthread_setgid_np,
5139         pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
5140         pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
5141         and pthread_setresuid_np.
5142         * pthread_setgid_np.c: New file.
5143         * pthread_setuid_np.c: New file.
5144         * pthread_setegid_np.c: New file.
5145         * pthread_seteuid_np.c: New file.
5146         * pthread_setregid_np.c: New file.
5147         * pthread_setreuid_np.c: New file.
5148         * pthread_setresgid_np.c: New file.
5149         * pthread_setresuid_np.c: New file.
5150         * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setgid_np,
5151         pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
5152         pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
5153         and pthread_setresuid_np.
5154         * Makefile (libpthread-routines): Add pthread_setuid, pthread_seteuid,
5155         pthread_setreuid, pthread_setresuid, pthread_setgid, pthread_setegid,
5156         pthread_setregid, and pthread_setresgid.
5158 2004-09-18  Ulrich Drepper  <drepper@redhat.com>
5160         * allocatestack.c (allocate_stack): Return EAGAIN instead of
5161         ENOMEM when out of memory.
5163 2004-09-10  Roland McGrath  <roland@redhat.com>
5165         [BZ #379]
5166         * allocatestack.c (allocate_stack): Remove [__ASSUME_CLONE_STOPPED]
5167         code, since we don't try to use the broken CLONE_STOPPED any more.
5168         * pthread_create.c (start_thread): Likewise.
5170 2004-09-15  Richard Henderson  <rth@redhat.com>
5172         * sysdeps/unix/sysv/linux/alpha/vfork.S: Use libc_hidden_def.
5174 2004-09-01  David Mosberger  <davidm@hpl.hp.com>
5176         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h
5177         (__libc_unwind_longjmp): Delete macro and declare as function.
5178         * sysdeps/unix/sysv/linux/ia64/Makefile (sysdep_routines): Mention
5179         __ia64_longjmp, sigstack_longjmp, and __sigstack_longjmp for
5180         nptl directory.
5181         * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S: New file.
5182         * sysdeps/unix/sysv/linux/ia64/__sigstack_longjmp.c: New file.
5183         * sysdeps/unix/sysv/linux/ia64/unwind_longjmp.c: New file.
5185 2004-09-12  Ulrich Drepper  <drepper@redhat.com>
5187         * sysdeps/pthread/pthread.h: Make rwlock prototypes available also
5188         for __USE_XOPEN2K.
5189         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define rwlock
5190         types also for __USE_XOPEN2K.
5191         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
5192         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5193         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5194         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5195         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
5196         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5197         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5198         [BZ #320]
5200 2004-09-08  Ulrich Drepper  <drepper@redhat.com>
5202         * sysdeps/pthread/pthread.h
5203         (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Make safe for C++.
5204         (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
5205         (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
5206         (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Likewise.
5207         [BZ #375]
5209 2004-09-07  Ulrich Drepper  <drepper@redhat.com>
5211         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Allow
5212         PSEUDO to be used with . prefix.
5214         * sysdeps/unix/sysv/linux/alpha/pthread_once.c (__pthread_once):
5215         Use atomic_increment instead of atomic_exchange_and_add.
5216         * sysdeps/unix/sysv/linux/sparc/pthread_once.c (__pthread_once):
5217         Likewise.
5218         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
5219         Likewise.
5220         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
5221         Likewise.
5223         * allocatestack.c (allocate_stack): Use atomic_increment_val
5224         instead of atomic_exchange_and_add.
5225         * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Likewise.
5226         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
5227         Likewise.
5228         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
5229         Likewise.
5231         * sysdeps/pthread/pthread.h (pthread_once): Remove __THROW since
5232         the initialization function might throw.
5234 2005-09-05  Richard Henderson  <rth@redhat.com>
5236         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
5237         Move definition inside libpthread, libc, librt check.  Provide
5238         definition for rtld.
5240 2004-09-02  Ulrich Drepper  <drepper@redhat.com>
5242         * sysdeps/alpha/jmpbuf-unwind.h: Define __libc_unwind_longjmp.
5243         * sysdeps/i386/jmpbuf-unwind.h: Likewise
5244         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
5245         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
5246         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
5247         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
5248         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
5249         * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
5250         * unwind.c: Use it.
5252         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
5253         Rename __data.__clock to __data.__nwaiters, make it unsigned int.
5254         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
5255         Likewise.
5256         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
5257         Decrement __nwaiters.  If pthread_cond_destroy has been called and
5258         this is the last waiter, signal pthread_cond_destroy caller and
5259         avoid using the pthread_cond_t structure after unlock.
5260         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
5261         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5262         Read clock type from the least significant bits of __nwaiters instead
5263         of __clock.
5264         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5265         * sysdeps/unix/sysv/linux/internaltypes.h: Define COND_CLOCK_BITS.
5267 2004-08-31  Jakub Jelinek  <jakub@redhat.com>
5269         [BZ #342]
5270         * Makefile (tests): Add tst-cond20 and tst-cond21.
5271         * tst-cond20.c: New test.
5272         * tst-cond21.c: New test.
5273         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
5274         (pthread_cond_t): Rename __data.__clock to __data.__nwaiters, make
5275         it unsigned int.
5276         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
5277         Likewise.
5278         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
5279         (pthread_cond_t): Likewise.
5280         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
5281         Likewise.
5282         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
5283         Likewise.
5284         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
5285         Likewise.
5286         * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_clock): Remove.
5287         (cond_nwaiters): New.
5288         (clock_bits): New.
5289         * pthread_cond_destroy.c (__pthread_cond_destroy): Return EBUSY
5290         if there are waiters not signalled yet.
5291         Wait until all already signalled waiters wake up.
5292         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Decrement
5293         __nwaiters.  If pthread_cond_destroy has been called and this is the
5294         last waiter, signal pthread_cond_destroy caller and avoid using
5295         the pthread_cond_t structure after unlock.
5296         (__pthread_cond_wait): Increment __nwaiters in the beginning,
5297         decrement it when leaving.  If pthread_cond_destroy has been called
5298         and this is the last waiter, signal pthread_cond_destroy caller.
5299         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
5300         Likewise.  Read clock type from the least significant bits of
5301         __nwaiters instead of __clock.
5302         * pthread_condattr_setclock.c (pthread_condattr_setclock): Check
5303         whether clock ID can be encoded in COND_CLOCK_BITS bits.
5304         * pthread_condattr_getclock.c (pthread_condattr_getclock): Decode
5305         clock type just from the last COND_CLOCK_BITS bits of value.
5306         * pthread_cond_init.c (__pthread_cond_init): Initialize __nwaiters
5307         instead of __clock, just from second bit of condattr's value.
5309 2004-08-30  Jakub Jelinek  <jakub@redhat.com>
5311         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Include
5312         bits/wordsize.h.  Make the header match i386 header when __WORDSIZE
5313         != 64.
5314         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
5316 2004-08-15  Roland McGrath  <roland@frob.com>
5318         * pthread_atfork.c: Update copyright terms including special exception
5319         for these trivial files, which are statically linked into executables
5320         that use dynamic linking for the significant library code.
5322 2004-08-09  Jakub Jelinek  <jakub@redhat.com>
5324         * DESIGN-rwlock.txt: Add decreasing of nr_readers_queued to
5325         pthread_rwlock_rdlock.
5326         * sysdeps/pthread/pthread_rwlock_rdlock (__pthread_rwlock_rdlock):
5327         Decrease __nr_readers_queued after reacquiring lock.
5328         * sysdeps/pthread/pthread_rwlock_timedrdlock
5329         (pthread_rwlock_timedrdlock): Likewise.
5330         Reported by Bob Cook <bobcook47@hotmail.com>.
5332 2004-08-11  Jakub Jelinek  <jakub@redhat.com>
5334         * tst-rwlock14.c (tf): Read main thread handle from *ARG
5335         before pthread_barrier_wait.
5337 2004-08-07  Ulrich Drepper  <drepper@redhat.com>
5339         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
5340         Remove unnecessary exception handling data.
5342 2004-07-23  Jakub Jelinek  <jakub@redhat.com>
5344         [BZ #284]
5345         * sysdeps/pthread/pthread.h (pthread_getcpuclockid): Use __clockid_t
5346         instead of clockid_t.
5348 2004-07-21  Roland McGrath  <roland@redhat.com>
5350         * Makefile ($(objpfx)multidir.mk): Use $(make-target-directory).
5352 2004-07-19  Roland McGrath  <roland@redhat.com>
5354         * tst-cancel4.c (tf_waitid): Use WEXITED flag bit if available.
5356 2004-07-02  Roland McGrath  <roland@redhat.com>
5358         * configure: Don't exit.
5360 2004-07-14  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5362         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
5363         (__pthread_cond_timedwait): Check for invalid nanosecond in
5364         timeout value.
5366 2004-07-07  Ulrich Drepper  <drepper@redhat.com>
5368         * Makefile: Add rules to build and run tst-fini1.
5369         * tst-fini1.c: New file.
5370         * tst-fini1mod.c: New file.
5372 2004-07-05  Ulrich Drepper  <drepper@redhat.com>
5374         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define NO_CANCELLATION
5375         if no cancellation support is needed.
5376         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
5377         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
5378         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
5379         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
5380         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
5381         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
5382         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
5383         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
5384         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
5386         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define __NR_futex
5387         only if not already defined.
5389 2004-07-05  Jakub Jelinek  <jakub@redhat.com>
5391         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_unlock): Use
5392         constraint "m" instead of "0" for futex.
5394         * shlib-versions: Add powerpc64-.*-linux.*.
5396 2004-07-04  Jakub Jelinek  <jakub@redhat.com>
5398         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
5399         (pthread_rwlock_timedrdlock): Use cmpq instead of cmpl to check
5400         for valid tv_nsec.
5401         * tst-rwlock14.c (do_test): Test for invalid tv_nsec equal to
5402         1 billion and 64-bit tv_nsec which is valid when truncated to 32
5403         bits.
5405 2004-06-29  Roland McGrath  <roland@redhat.com>
5407         * Banner: NPTL no longer has its own version number.
5408         * Makefile (nptl-version): Variable removed.
5409         * sysdeps/pthread/Makefile (CFLAGS-confstr.c): Set LIBPTHREAD_VERSION
5410         using $(version), the glibc version number.
5412 2004-06-29  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5414         * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
5415         Fix branch offset for a PLT entry.
5416         * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
5417         Likewise.
5418         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
5419         Likewise.
5420         * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
5421         Likewise.
5422         * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait):
5423         Likewise.
5425 2004-06-28  Jakub Jelinek  <jakub@redhat.com>
5427         * sysdeps/alpha/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define
5428         unconditionally.
5430 2004-06-28  Jakub Jelinek  <jakub@redhat.com>
5432         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
5433         (pthread_rwlock_timedwrlock): Return EINVAL if tv_nsec is negative,
5434         instead of tv_sec.
5435         * sysdeps/pthread/pthread_rwlock_timedrdlock.c
5436         (pthread_rwlock_timedrdlock): Likewise.
5438 2004-06-22  Jakub Jelinek  <jakub@redhat.com>
5440         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
5441         Set __r7 to val, not mutex.
5443 2004-06-27  Ulrich Drepper  <drepper@redhat.com>
5445         * Makefile: Add rules to build tst-rwlock14.
5446         * tst-rwlock14.c: New file.
5448 2004-06-24  Boris Hu  <boris.hu@intel.com>
5450         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Add timeout validation
5451         check.
5452         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
5454 2004-06-19  Andreas Jaeger  <aj@suse.de>
5456         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix
5457         assembler in last patch.
5459 2004-06-17  Ulrich Drepper  <drepper@redhat.com>
5461         * sysdeps/pthread/pthread_cond_timedwait.c
5462         (__pthread_cond_timedwait): Also check for negativ nanoseconds.
5463         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5464         (__pthread_cond_timedwait): Check for invalid nanosecond in
5465         timeout value.
5466         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5467         * tst-cond19.c: New file.
5468         * Makefile: Add rules to build and run tst-cond19.
5470 2004-06-15  Steven Munroe  <sjmunroe@us.ibm.com>
5472         * tst-context1.c (GUARD_PATTERN): Defined.
5473         (tst_context_t): Define struct containing ucontext_t & guard words.
5474         (ctx): Declare as an array of tst_context_t.
5475         (fct): Verify uc_link & guard words are still valid.
5476         (tf): Initialize guard words in ctx.  Adjust ctx refs for new struct.
5478 2004-06-13  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5480         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
5481         Add __data.__futex field, reshuffle __data.__clock.
5482         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
5483         (__pthread_cond_signal): Increment __futex at the same time as
5484         __wakeup_seq or __total_seq.  Pass address of __futex instead of
5485         address of low 32-bits of __wakeup_seq to futex syscall.
5486         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
5487         (__pthread_cond_wait): Likewise.  Pass __futex value from before
5488         releasing internal lock to FUTEX_WAIT.
5489         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
5490         (__pthread_cond_timedwait): Likewise.
5491         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
5492         (FUTEX_CMP_REQUEUE): Define.
5493         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
5494         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
5495         Pass __futex value from before the unlock and __futex address instead
5496         of address of low 32-bits of __wakeup_seq to futex syscall.
5497         Fallback to FUTEX_WAKE all on any errors.
5499 2004-06-08  Jakub Jelinek  <jakub@redhat.com>
5501         * pthread_mutexattr_getpshared.c (pthread_mutex_getpshared): Fix
5502         comment typo.
5503         * pthread_mutexattr_gettype.c (pthread_mutexattr_gettype): Likewise.
5504         * pthread_mutexattr_init.c (__pthread_mutexattr_init): Likewise.
5505         * pthread_mutexattr_settype.c (__pthread_mutexattr_settype): Likewise.
5506         * pthread_mutexattr_setpshared.c (pthread_mutexattr_setpshared):
5507         Likewise.  Reported by Bob Cook <bobcook47@hotmail.com>.
5509 2004-06-11  Martin Schwidefsky  <schwidefsky@de.ibm.com>
5511         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_compare_and_swap):
5512         Add memory clobber to inline assembly.
5513         (__lll_mutex_trylock): Likewise.
5514         (__lll_mutex_cond_trylock): Likewise.
5516 2004-06-07  Martin Schwidefsky  <schwidefsky@de.ibm.com>
5518         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
5519         Pass val argument as 6th system call argument in %r7.
5521 2004-05-21  Jakub Jelinek  <jakub@redhat.com>
5523         * Makefile (tests): Add tst-cond16.
5524         * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_futex): Add.
5525         * pthread_cond_init.c (__pthread_cond_init): Clear __data.__futex.
5526         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
5527         Add __data.__futex field, reshuffle __data.__clock.
5528         * sysdeps/unix/sysv/linux/i386/pthread_cond_signal.S
5529         (__pthread_cond_signal): Increment __futex at the same time as
5530         __wakeup_seq or __total_seq.  Pass address of __futex instead of
5531         address of low 32-bits of __wakeup_seq to futex syscall.
5532         * sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S
5533         (__pthread_cond_wait): Likewise.  Pass __futex value from before
5534         releasing internal lock to FUTEX_WAIT.
5535         * sysdeps/unix/sysv/linux/i386/pthread_cond_timedwait.S
5536         (__pthread_cond_timedwait): Likewise.
5537         * sysdeps/unix/sysv/linux/i386/pthread_cond_broadcast.S
5538         (FUTEX_CMP_REQUEUE): Define.
5539         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
5540         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
5541         Pass __futex value from before the unlock and __futex address instead
5542         of address of low 32-bits of __wakeup_seq to futex syscall.
5543         Fallback to FUTEX_WAKE all on any errors.
5544         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_CMP_REQUEUE):
5545         Define.
5546         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
5547         internally.  Return non-zero if error, zero if success.
5548         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
5549         Add __data.__futex field, reshuffle __data.__clock.
5550         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_CMP_REQUEUE):
5551         Define.
5552         (lll_futex_requeue): Add val argument, return 1 unconditionally
5553         for the time being.
5554         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
5555         Add __data.__futex field, reshuffle __data.__clock.
5556         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_CMP_REQUEUE):
5557         Define.
5558         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
5559         internally.  Return non-zero if error, zero if success.
5560         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
5561         (pthread_cond_t): Add __data.__futex field, reshuffle __data.__clock.
5562         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_CMP_REQUEUE):
5563         Define.
5564         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
5565         internally.  Return non-zero if error, zero if success.
5566         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
5567         Add __data.__futex field, reshuffle __data.__clock.
5568         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_CMP_REQUEUE):
5569         Define.
5570         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
5571         internally.  Return non-zero if error, zero if success.
5572         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
5573         Add __data.__futex field, reshuffle __data.__clock.
5574         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
5575         Add __data.__futex field, reshuffle __data.__clock.
5576         * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal):
5577         Increment __futex at the same time as __wakeup_seq or __total_seq.
5578         Pass address of __futex instead of address of low 32-bits of
5579         __wakeup_seq to futex syscall.
5580         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
5581         Pass __futex value from before releasing internal lock
5582         to FUTEX_WAIT.
5583         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
5584         Likewise.  Avoid unnecessary shadowing of variables.
5585         * sysdeps/pthread/pthread_cond_broadcast.c (__pthread_cond_broadcast):
5586         Set __futex to 2 * __total_seq.  Pass __futex value from before the
5587         unlock and __futex address instead of address of low 32-bits of
5588         __wakeup_seq to futex_requeue macro, adjust for new return value
5589         meaning.
5590         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
5591         (__pthread_cond_signal): Increment __futex at the same time as
5592         __wakeup_seq or __total_seq.  Pass address of __futex instead of
5593         address of low 32-bits of __wakeup_seq to futex syscall.
5594         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
5595         (__pthread_cond_wait): Likewise.  Pass __futex value from before
5596         releasing internal lock to FUTEX_WAIT.
5597         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
5598         (__pthread_cond_timedwait): Likewise.
5599         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
5600         (FUTEX_CMP_REQUEUE): Define.
5601         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
5602         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
5603         Pass __futex value from before the unlock and __futex address instead
5604         of address of low 32-bits of __wakeup_seq to futex syscall.
5605         Fallback to FUTEX_WAKE all on any errors.
5607 2004-06-03  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5609         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_mutex_lock):
5610         Add nop to align the end of critical section.
5611         (lll_mutex_cond_lock, lll_mutex_timedlock): Likewise.
5613 2004-06-01  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5615         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
5616         Add __broadcast_seq field.
5617         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Mark
5618         all waiters as woken with woken_seq and bump broadcast counter.
5619         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use new
5620         __broadcast_seq.  Increment __woken_seq correctly when cleanuped.
5621         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
5622         Comment typo fixes.  Avoid returning -ETIMEDOUT.
5624 2004-06-01  Ulrich Drepper  <drepper@redhat.com>
5626         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5627         (__condvar_tw_cleanup): Fix access to saved broadcast_seq value.
5628         Reported by Kaz Kojima.
5630 2004-05-25  Jakub Jelinek  <jakub@redhat.com>
5632         * sysdeps/unix/sysv/linux/aio_misc.h: New file.
5634 2004-05-21  Jakub Jelinek  <jakub@redhat.com>
5636         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Compare
5637         __broadcast_seq with bc_seq after acquiring internal lock instead of
5638         before it.
5640 2004-05-18  Jakub Jelinek  <jakub@redhat.com>
5642         * Makefile (.NOTPARALLEL): Only serialize make check/xcheck, not
5643         compilation.
5644         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5645         (__pthread_cond_timedwait): Avoid returning -ETIMEDOUT.
5646         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
5647         (pthread_cond_t): Add __data.__broadcast_seq field.
5648         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
5649         (FRAME_SIZE): Define.
5650         (__pthread_cond_timedwait): Use it.  Store/check broadcast_seq.
5651         Comment typo fixes.
5652         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S (FRAME_SIZE):
5653         Define.
5654         (__pthread_cond_wait): Use it.  Store/check broadcast_seq.  Comment
5655         typo fixes.
5656         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
5657         (__pthread_cond_broadcast): Increment broadcast_seq.  Comment typo
5658         fixes.
5660 2004-05-18  Ulrich Drepper  <drepper@redhat.com>
5662         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add broadcast_seq entry.
5663         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
5664         Add __broadcast_seq field.
5665         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5666         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5667         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5668         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
5669         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5670         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Mark
5671         all waiters as woken with woken_seq and bump broadcast counter.
5672         * sysdeps/pthread/pthread_cond_broadcast.c: Likewise.
5673         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use new
5674         __broadcast_seq field.
5675         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5676         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
5677         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
5678         * pthread_cond_init.c: Initialize __broadcast_seq field.
5679         * Makefile (tests): Add tst-cond17 and tst-cond18.
5680         Add .NOTPARALLEL goal.
5681         * tst-cond16.c: New file.  From Jakub.
5682         * tst-cond17.c: New file.  From Jakub.
5683         * tst-cond18.c: New file.  From Jakub.
5685 2004-05-16  Ulrich Drepper  <drepper@redhat.com>
5687         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Correct some
5688         unwind info.
5690         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
5691         Parametrize frame size.  Correct some unwind info.
5692         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5694 2004-05-04  Jakub Jelinek  <jakub@redhat.com>
5696         * tst-stack3.c: Note testing functionality beyond POSIX.
5698 2004-05-04  Jakub Jelinek  <jakub@redhat.com>
5700         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (USE___THREAD):
5701         Change conditional from ifdef to if.
5703 2004-04-23  Jakub Jelinek  <jakub@redhat.com>
5705         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SYSDEP_CANCEL_ERRNO,
5706         SYSDEP_CANCEL_ERROR): Define.
5707         (PSEUDO): Use it.
5709 2004-05-01  Jakub Jelinek  <jakub@redhat.com>
5711         * Versions (libpthread): Remove __pthread_cleanup_upto@@GLIBC_PRIVATE.
5713 2004-04-20  Jakub Jelinek  <jakub@redhat.com>
5715         * sem_unlink.c (sem_unlink): Change EPERM into EACCES.
5717 2004-04-19  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5719         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Add frame info.
5720         Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
5721         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Remove unneeded frame
5722         info.  Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
5724 2004-04-19  Ulrich Drepper  <drepper@redhat.com>
5726         * sysdeps/unix/sysv/linux/timer_routines.c: Make sure helper
5727         thread has all signals blocked.
5729 2004-04-18  Andreas Jaeger  <aj@suse.de>
5731         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h
5732         (SEM_VALUE_MAX): Add missing brace.
5734 2004-04-17  Jakub Jelinek  <jakub@redhat.com>
5736         * sysdeps/pthread/Makefile (tests): Add tst-mqueue8x
5737         in rt subdir.
5738         (CFLAGS-tst-mqueue8x.c): Add -fexceptions.
5739         * sysdeps/pthread/tst-mqueue8x.c: New test.
5740         * tst-cancel4.c: Update comment about message queues.
5742         * sysdeps/pthread/timer_gettime.c (timer_gettime): For expired timer
5743         return it_value { 0, 0 }.
5744         * sysdeps/pthread/timer_create.c (timer_create): Handle SIGEV_NONE
5745         like SIGEV_SIGNAL.
5746         * sysdeps/pthread/timer_routines.c (thread_expire_timer): Remove
5747         assertion for SIGEV_NONE.
5748         (thread_attr_compare): Compare all attributes, not just a partial
5749         subset.
5751 2004-04-17  Jakub Jelinek  <jakub@redhat.com>
5753         * sysdeps/unix/sysv/linux/mq_notify.c: Include stdlib.h.
5755 2004-04-17  Ulrich Drepper  <drepper@redhat.com>
5757         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h (SEM_VALUE_MAX):
5758         Just use a plain number.
5759         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
5760         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
5761         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
5762         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
5763         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
5764         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
5765         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
5767 2004-04-16  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5769         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Remove unneeded
5770         frame info.
5771         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
5773 2004-04-15  Jakub Jelinek  <jakub@redhat.com>
5775         * sysdeps/unix/sysv/linux/timer_routines.c: Include errno.h.
5776         (timer_helper_thread): Use inline rt_sigtimedwait syscall instead
5777         of calling sigwaitinfo.
5779 2004-04-16  Ulrich Drepper  <drepper@redhat.com>
5781         * allocatestack.c (allocate_stack): Set reported_guardsize
5782         unconditionally.
5783         * pthread_getattr_np.c (pthread_getattr_np): Use
5784         reported_guardsize instead of guardsize.
5785         * descr.h (struct pthread): Add reported_guardsize field.
5787 2004-04-13  Jakub Jelinek  <jakub@redhat.com>
5789         * sysdeps/unix/sysv/linux/mq_notify.c: Shut up GCC warning.
5791 2004-04-12  Ulrich Drepper  <drepper@redhat.com>
5793         * sysdeps/unix/sysv/linux/mq-notify.c: New file.
5795 2004-04-08  Jakub Jelinek  <jakub@redhat.com>
5797         * sysdeps/unix/sysv/linux/bits/local_lim.h (MQ_PRIO_MAX): Define.
5798         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h (MQ_PRIO_MAX): Define.
5799         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h (MQ_PRIO_MAX): Define.
5800         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h (MQ_PRIO_MAX): Define.
5801         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
5802         Define.
5803         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
5804         (_POSIX_MESSAGE_PASSING): Define.
5805         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h
5806         (_POSIX_MESSAGE_PASSING): Define.
5807         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h
5808         (_POSIX_MESSAGE_PASSING): Define.
5810 2004-04-04  Ulrich Drepper  <drepper@redhat.com>
5812         * tst-context1.c (fct): Check whether correct stack is used.
5814 2004-04-03  Ulrich Drepper  <drepper@redhat.com>
5816         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Never use
5817         matching constraints for asm mem parameters.
5819         * tst-clock2.c (tf): Don't define unless needed.
5821 2004-03-30  H.J. Lu  <hongjiu.lu@intel.com>
5823         * Makefile (link-libc-static): Use $(static-gnulib) instead of
5824         $(gnulib).
5826 2004-03-30  Ulrich Drepper  <drepper@redhat.com>
5828         * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_deallocate_tsd.
5829         * init.c (pthread_functions): Add ptr__nptl_deallocate_tsd.
5830         * pthreadP.h: Declare __nptl_deallocate_tsd.
5831         * pthread_create.c (deallocate_tsd): Remove to __nptl_deallocate_tsd.
5832         Adjust caller.
5834         * Makefile (tests): Add tst-tsd5.
5835         * tst-tsd5.c: New file.
5837 2004-03-29  Ulrich Drepper  <drepper@redhat.com>
5839         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
5840         (__pthread_attr_setaffinity_old): Prepend GLIBC_ to version names
5841         is SHLIB_COMPAT check.
5842         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
5843         (__pthread_attr_getaffinity_old): Likewise.
5844         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
5845         (__pthread_getaffinity_old): Likewise.
5846         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
5847         (__pthread_setaffinity_old): Likewise.
5849 2004-03-26  Ulrich Drepper  <drepper@redhat.com>
5851         * allocatestack.c (_make_stacks_executable): Call
5852         _dl_make_stack_executable first.
5854 2004-03-24  Roland McGrath  <roland@redhat.com>
5856         * sysdeps/i386/pthread_spin_lock.c (pthread_spin_lock): Use "m"
5857         constraint instead of "0".
5859 2004-03-24  Ulrich Drepper  <drepper@redhat.com>
5861         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
5862         (lll_mutex_cond_trylock): Define as wrapper around __lll_cond_trylock.
5864         * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Reorganize
5865         code to avoid warning.
5867 2004-03-24  Andreas Jaeger  <aj@suse.de>
5869         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
5870         (__pthread_attr_setaffinity_old): Remove const.
5872 2004-03-23  Ulrich Drepper  <drepper@redhat.com>
5874         * sysdeps/unix/sysv/linux/smp.h: New file.
5875         * sysdeps/unix/sysv/linux/sh/smp.h: New file.
5876         * init.c: Define __is_smp.
5877         (__pthread_initialize_minimal_internal): Call is_smp_system to
5878         initialize __is_smp.
5879         * pthreadP.h: Declare __is_smp.
5880         Define MAX_ADAPTIVE_COUNT is necessary.
5881         * pthread_mutex_init.c: Add comment regarding __spins field.
5882         * pthread_mutex_lock.c: Implement adaptive mutex type.
5883         * pthread_mutex_timedlock.c: Likewise.
5884         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
5885         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
5886         Add __spins field.
5887         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
5888         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5889         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5890         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
5891         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5892         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5893         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5894         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define
5895         lll_mutex_cond_trylock.
5896         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5897         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
5898         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5899         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5900         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
5901         Define BUSY_WAIT_NOP.
5902         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5903         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5905         * tst-mutex5.c: Add support for testing adaptive mutexes.
5906         * tst-mutex7.c: Likewise.
5907         * tst-mutex5a.c: New file.
5908         * tst-mutex7a.c: New file.
5909         * Makefile (tests): Add tst-mutex5a and tst-mutex7a.
5911         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
5912         (__lll_mutex_timedlock_wait): Preserve r8 and r9 since the
5913         vgettimeofday call might destroy the content.
5915         * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use hint
5916         @pause in the loop.
5918         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
5919         No need to restrict type of ret.  Make it int.  Add comment.
5921         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
5922         Remove unnecessary setne instruction.
5924 2004-03-22  Jakub Jelinek  <jakub@redhat.com>
5926         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
5927         (__pthread_getaffinity_new): Use INT_MAX instead of UINT_MAX.
5928         * pthread_getattr_np.c (pthread_getattr_np): Double size every cycle.
5929         If realloc fails, break out of the loop.
5931 2004-03-20  Andreas Jaeger  <aj@suse.de>
5933         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
5934         (__pthread_setaffinity_old): Fix interface.
5935         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
5936         (__pthread_getaffinity_old): Likewise.
5938         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
5939         (__pthread_setaffinity_new): Remove duplicate declaration.
5941 2004-03-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5943         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Save
5944         the return value to a safe register.
5945         (CDISABLE): Set the function argument correctly.
5947 2004-03-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5949         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XCHG): Define.
5950         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
5951         Rewrite so that only one locked memory operation per round is needed.
5952         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
5953         (pthread_barrier_wait): After wakeup, release lock only when the
5954         last thread stopped using the barrier object.
5955         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
5956         (__pthread_cond_wait): Don't store mutex address if the current
5957         value is ~0l.  Add correct cleanup support and unwind info.
5958         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
5959         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
5960         (__pthread_cond_broadcast): Don't use requeue for pshared condvars.
5961         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Update comment.
5962         * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
5963         Add correct cleanup support and unwind info.
5964         * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
5965         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Add unwind
5966         information for syscall wrappers.
5968 2004-03-18  Ulrich Drepper  <drepper@redhat.com>
5970         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
5971         cpusetsize field, remove next.
5972         * sysdeps/pthread/pthread.h (pthread_getaffinity_np): Add new second
5973         parameter for size of the CPU set.
5974         (pthread_setaffinity_np): Likewise.
5975         (pthread_attr_getaffinity_np): Likewise.
5976         (pthread_attr_setaffinity_np): Likewise.
5977         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: Implement
5978         interface change, keep compatibility code.
5979         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
5980         * sysdeps/unix/sysv/linux/pthread_getaffinity.c: Likewise.
5981         * sysdeps/unix/sysv/linux/pthread_setaffinity.c: Likewise.
5982         * pthreadP.h: Remove hidden_proto for pthread_getaffinity_np.  Declare
5983         __pthread_getaffinity_np.
5984         * Versions: Add version for changed interfaces.
5985         * tst-attr3.c: Adjust test for interface change.
5986         * pthread_getattr_np.c: Query the kernel about the affinity mask with
5987         increasing buffer sizes.
5988         * pthread_attr_destroy.c: Remove unused list handling.
5989         * pthread_attr_init.c: Likewise.
5991 2004-03-17  Roland McGrath  <roland@redhat.com>
5993         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Pass missing
5994         first argument to clock_getres so we ever enable kernel timers.
5996 2004-03-15  Ulrich Weigand  <uweigand@de.ibm.com>
5998         * init.c (nptl_version): Add __attribute_used__ to nptl_version.
6000 2004-03-12  Richard Henderson  <rth@redhat.com>
6002         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Propagate
6003         oldvalue from CENABLE to CDISABLE.
6005 2004-03-12  Ulrich Drepper  <drepper@redhat.com>
6007         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define HOST_NAME_MAX.
6008         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
6009         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
6010         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
6012 2004-03-11  Richard Henderson  <rth@redhat.com>
6014         * sysdeps/alpha/tcb-offsets.sym (PID_OFFSET): New.
6015         * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: Save/restore PID.
6016         * sysdeps/unix/sysv/linux/alpha/vfork.S: New file.
6018 2004-03-11  Jakub Jelinek  <jakub@redhat.com>
6020         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Use jgnl
6021         instead of jnl instruction to jump to SYSCALL_ERROR_LABEL.
6022         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S (__vfork): Likewise.
6024 2004-03-11  Jakub Jelinek  <jakub@redhat.com>
6026         * forward.c (__pthread_cond_broadcast_2_0,
6027         __pthread_cond_destroy_2_0, __pthread_cond_init_2_0,
6028         __pthread_cond_signal_2_0, __pthread_cond_wait_2_0,
6029         __pthread_cond_timedwait_2_0): Use return 0 as defaction instead of 0.
6031 2004-03-11  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6033         * sysdeps/sh/tcb-offsets.sym: Add PID.
6034         * sysdeps/unix/sysv/linux/sh/pt-vfork.S: Properly handle PID cache.
6035         * sysdeps/unix/sysv/linux/sh/vfork.S: New file.
6037 2004-03-10  Ulrich Drepper  <drepper@redhat.com>
6039         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: No need to
6040         include <sysdep-cancel.h>, vfork is no cancellation point.
6041         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: Likewise.
6042         * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: Likewise.
6043         * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: Likewise.
6045 2004-03-10  Jakub Jelinek  <jakub@redhat.com>
6047         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Add
6048         libc_hidden_def.
6049         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
6050         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
6051         Likewise.
6052         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S (__vfork):
6053         Likewise.
6054         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
6055         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
6056         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Include tcb-offsets.h.
6057         * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Use DO_CALL instead
6058         of DO_CALL_VIA_BREAK.  Work around a gas problem.
6060         * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: Remove.
6061         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: New file.
6062         * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: New file.
6063         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: New file.
6064         * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: New file.
6065         * sysdeps/powerpc/tcb-offsets.sym: Add PID.
6067         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S (__vfork): Don't use
6068         a local register for saving old PID.  Negate PID in parent upon exit.
6070         * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: Include
6071         tcb-offsets.h.
6072         (__vfork): Negate PID if non-zero and set to INT_MIN if zero
6073         before syscall, set to the old value in the parent afterwards.
6074         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: New file.
6075         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: Include
6076         tcb-offsets.h.
6077         (__vfork): Negate PID if non-zero and set to INT_MIN if zero
6078         before syscall, set to the old value in the parent afterwards.
6079         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: New file.
6080         * sysdeps/s390/tcb-offsets.sym: Add PID.
6082         * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: Remove.
6083         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: New file.
6084         * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S: New file.
6085         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: New file.
6086         * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: New file.
6087         * sysdeps/sparc/tcb-offsets.sym: Add PID.
6089 2004-03-10  Andreas Schwab  <schwab@suse.de>
6091         * sysdeps/ia64/tcb-offsets.sym: Add PID.
6092         * sysdeps/unix/sysv/linux/ia64/vfork.S: New file.
6093         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Properly handle PID cache.
6095 2004-03-09  Jakub Jelinek  <jakub@redhat.com>
6097         * tst-cancel20.c (do_one_test): Clear in_sh_body first.
6098         * tst-cancel21.c (do_one_test): Likewise.
6099         Reported by Gordon Jin <gordon.jin@intel.com>.
6101 2004-02-09  Jakub Jelinek  <jakub@redhat.com>
6103         * sysdeps/unix/sysv/linux/i386/vfork.S (SAVE_PID): Negate PID
6104         if non-zero and set to INT_MIN if zero.
6105         * sysdeps/unix/sysv/linux/x86_64/vfork.S (SAVE_PID): Likewise.
6106         * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Include tcb-offsets.h.
6107         (SAVE_PID, RESTORE_PID): Define.
6108         (__vfork): Use it.
6109         * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: Include tcb-offsets.h.
6110         Use relative path to avoid including NPTL i386/vfork.S.
6111         (SAVE_PID, RESTORE_PID): Define.
6112         * sysdeps/unix/sysv/linux/raise.c: Include limits.h.
6113         (raise): Handle THREAD_SELF->pid INT_MIN the same as 0.
6114         * Makefile (tests): Add tst-vfork1, tst-vfork2, tst-vfork1x and
6115         tst-vfork2x.
6116         (tests-reverse): Add tst-vfork1x and tst-vfork2x.
6117         * tst-vfork1.c: New test.
6118         * tst-vfork2.c: New test.
6119         * tst-vfork1x.c: New test.
6120         * tst-vfork2x.c: New test.
6122 2004-03-08  Ulrich Drepper  <drepper@redhat.com>
6124         * sysdeps/i386/tcb-offsets.sym: Add PID.
6125         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
6126         * sysdeps/unix/sysv/linux/i386/vfork.S: New file.
6127         * sysdeps/unix/sysv/linux/x86_64/vfork.S: New file.
6129 2004-03-08  Steven Munroe  <sjmunroe@us.ibm.com>
6131         * sysdeps/unix/sysv/linux/powerpc/Versions: Remove leading tabs.
6133 2004-03-08  H.J. Lu  <hongjiu.lu@intel.com>
6135         * sysdeps/s390/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
6136         _rtld_global_ro.
6138 2004-03-07  Ulrich Drepper  <drepper@redhat.com>
6140         * sysdeps/ia64/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
6141         _rtld_global_ro.
6143         * tst-once4.c: Remove unnecessary macro definition.
6145         * tst-mutex7.c (do_test): Limit thread stack size.
6146         * tst-once2.c (do_test): Likewise.
6147         * tst-tls3.c (do_test): Likewise.
6148         * tst-tls1.c (do_test): Likewise.
6149         * tst-signal3.c (do_test): Likewise.
6150         * tst-kill6.c (do_test): Likewise.
6151         * tst-key4.c (do_test): Likewise.
6152         * tst-join4.c (do_test): Likewise.
6153         * tst-fork1.c (do_test): Likewise.
6154         * tst-context1.c (do_test): Likewise.
6155         * tst-cond2.c (do_test): Likewise.
6156         * tst-cond10.c (do_test): Likewise.
6157         * tst-clock2.c (do_test): Likewise.
6158         * tst-cancel10.c (do_test): Likewise.
6159         * tst-basic2.c (do_test): Likewise.
6160         * tst-barrier4.c (do_test): Likewise.
6162 2004-03-05  Ulrich Drepper  <drepper@redhat.com>
6164         * sysdeps/i386/tls.h: Use GLRO instead of GL where appropriate.
6166 2004-03-01  Ulrich Drepper  <drepper@redhat.com>
6168         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6169         (__pthread_cond_timedwait): Optimize wakeup test.
6170         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
6171         (__pthread_cond_wait): Likewise.
6172         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
6173         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
6174         Likewise.
6176 2004-02-29  Ulrich Drepper  <drepper@redhat.com>
6178         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
6179         (__lll_mutex_lock_wait): Optimize a bit more.  Just one copy of
6180         the atomic instruction needed.
6181         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
6182         (__lll_mutex_lock_wait): Likewise.
6184 2004-02-28  Ulrich Drepper  <drepper@redhat.com>
6186         * Makefile (tests): Add tst-cond14 and tst-cond15.
6187         * tst-cond14.c: New file.
6188         * tst-cond15.c: New file.
6190 2004-02-27  Ulrich Drepper  <drepper@redhat.com>
6192         * sysdeps/pthread/createthread.c (create_thread): Remove use of
6193         CLONE_STOPPED.  We cannot use SIGCONT which means CLONE_STOPPED
6194         needs to be implemented differently to be useful.
6196 2004-02-26  Ulrich Drepper  <drepper@redhat.com>
6198         * pthread_attr_setschedparam.c: Don't test priority against limits
6199         here.  Set ATTR_FLAG_SCHED_SET flag.
6200         * pthread_attr_setschedpolicy.c: Set ATTR_FLAG_POLICY_SET flag.
6201         * pthread_create.c (__pthread_create_2_1): Copy scheduling attributes
6202         from parent thread to child.  If attribute is used and scheduling
6203         parameters are not inherited, copy parameters from attribute or
6204         compute them.  Check priority value.
6205         * pthread_getschedparam.c: If the parameters aren't known yet get
6206         them from the kernel.
6207         * pthread_setschedparam.c: Set ATTR_FLAG_SCHED_SET and
6208         ATTR_FLAG_POLICY_SET flag for thread.
6209         * sysdeps/unix/sysv/linux/internaltypes.h: Define ATTR_FLAG_SCHED_SET
6210         and ATTR_FLAG_POLICY_SET.
6212         * sysdeps/pthread/createthread.c: Use tgkill if possible.
6214         * pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr): Don't
6215         fail if stack address hasn't been set.  Just return 0.
6217 2004-02-25  Ulrich Drepper  <drepper@redhat.com>
6219         * Makefile (tests-nolibpthread): Add tst-unload.  Don't link with
6220         libpthread for the files in this list.
6221         (CFLAGS-tst-unload): Removed.
6222         * tst-unload.c (do_test): Don't use complete path for
6223         LIBPHREAD_SO.
6225         * Makefile: Define sonames for tst-tls5mod, tst-_res1mod1, and
6226         tst-_res1mod2.
6228 2004-02-22  Ulrich Drepper  <drepper@redhat.com>
6230         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
6231         (__lll_mutex_lock_wait): Rewrite so that only one locked memory
6232         operation per round is needed.
6233         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
6234         (__lll_mutex_lock_wait): Likewise.
6236 2004-02-20  Ulrich Drepper  <drepper@redhat.com>
6238         * tst-cancel9.c (cleanup): Don't print to stderr.
6240 2004-02-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6242         * sysdeps/sh/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Fix variable name.
6244 2004-02-20  Jakub Jelinek  <jakub@redhat.com>
6246         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
6247         (__syscall_error_handler2): Call CDISABLE.
6248         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
6249         (__syscall_error_handler2): Call CDISABLE.
6251         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
6252         Release lock before the loop, don't reacquire it.
6254         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h (DL_ARGV_NOT_RELRO): Define.
6256 2004-02-19  Andreas Schwab  <schwab@suse.de>
6258         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
6259         Fix last change.
6261 2004-02-18  Ulrich Drepper  <drepper@redhat.com>
6263         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
6264         (pthread_barrier_wait): After wakeup, release lock only when the
6265         last thread stopped using the barrier object.
6266         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S
6267         (pthread_barrier_wait): Likewise.
6268         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
6269         Likewise.
6270         * Makefile (tests): Add tst-barrier4.
6271         * tst-barrier4.c: New file.
6273         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6274         (__pthread_cond_timedwait): Perform timeout test while holding
6275         internal lock to prevent wakeup race.
6276         Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
6277         * sysdeps/pthread/pthread_cond_timedwait.c
6278         (__pthread_cond_timedwait): Likewise.
6279         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
6280         (__pthread_cond_timedwait): Likewise.
6282 2004-02-18  Jakub Jelinek  <jakub@redhat.com>
6284         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S
6285         (__pthread_rwlock_unlock): Access WRITER as 32-bit value.
6286         * Makefile (tests): Add tst-rwlock13.
6287         * tst-rwlock13.c: New test.
6289 2004-02-16  Ulrich Drepper  <drepper@redhat.com>
6291         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6292         (__condvar_tw_cleanup): Little optimization.
6293         Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
6295 2004-02-16  Steven Munroe  <sjmunroe@us.ibm.com>
6297         * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: Replace libc with
6298         libpthread as "lib" parameter to SHLIB_COMPAT.
6299         (__novmx_siglongjmp): Fix typo in function name.
6300         (__novmx_longjmp): Fix typo in function name.
6302 2004-02-13  Ulrich Drepper  <drepper@redhat.com>
6304         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Add a
6305         __builtin_expect.
6307         * sysdeps/generic/pt-longjmp.c: Moved to...
6308         * sysdeps/pthread/pt-longjmp.c: ...here.  New file.
6310 2004-01-29  Steven Munroe  <sjmunroe@us.ibm.com>
6312         * Makefile (libpthread-routines): Add pt-cleanup.
6313         * pt-longjmp.c: Removed.
6314         * pt-cleanup.c: Copied __pthread_cleanup_upto to here. New file.
6315         * sysdeps/generic/pt-longjmp.c: Copied longjmp to here. New file.
6316         * sysdeps/unix/sysv/linux/powerpc/Versions: New file.
6317         Version longjmp, siglongjmp for GLIBC_2.3.4.
6318         * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: New File.
6320 2004-02-13  Ulrich Drepper  <drepper@redhat.com>
6322         * sysdeps/pthread/pthread_cond_timedwait.c
6323         (__pthread_cond_timedwait): Optimize.  Drop internal lock earlier.
6324         Reuse code.  Add __builtin_expects.
6326         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6327         (__pthread_cond_timedwait): Get internal lock in case timeout has
6328         passed before the futex syscall.
6329         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6331 2004-01-20  Ulrich Drepper  <drepper@redhat.com>
6333         * allocatestack.c: Pretty printing.
6335         * sysdeps/pthread/createthread.c (create_thread): Don't add
6336         CLONE_DETACHED bit if it is not necessary.
6338 2004-01-16  Ulrich Drepper  <drepper@redhat.com>
6340         * pthread_getattr_np.c: Include ldsodefs.h.
6342 2004-01-16  Richard Henderson  <rth@redhat.com>
6344         * allocatestack.c: Don't declare __libc_stack_end.
6345         * init.c (__pthread_initialize_minimal_internal): Likewise.
6346         * pthread_getattr_np.c (pthread_getattr_np): Likewise.
6348 2004-01-15  Richard Henderson  <rth@redhat.com>
6350         * sysdeps/alpha/tls.h (tcbhead_t): Add private.
6351         (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE,
6352         TLS_PRE_TCB_SIZE, TLS_TCB_ALIGN, INSTALL_DTV, INSTALL_NEW_DTV,
6353         GET_DTV, THREAD_DTV, THREAD_SELF, DB_THREAD_SELF): Match ia64.
6354         (TLS_TCB_OFFSET, THREAD_ID, NO_TLS_OFFSET): Remove.
6355         (THREAD_GETMEM, THREAD_GETMEM_NC): Simplify.
6356         (THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
6357         * sysdeps/unix/sysv/linux/alpha/createthread.c (TLS_VALUE): Match ia64.
6359 2004-01-14  Ulrich Drepper  <drepper@redhat.com>
6361         * init.c (pthread_functions): Make array const.
6363 2004-01-13  Ulrich Drepper  <drepper@redhat.com>
6365         * allocatestack.c (__make_stacks_executable): Change interface.
6366         Check parameters.  Pass parameter on to libc counterpart.
6367         * pthreadP.h: Change declaration.
6369 2004-01-13  Richard Henderson  <rth@redhat.com>
6371         * pthread_attr_setstack.c (__old_pthread_attr_setstack): Use
6372         prototype form.
6373         * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize):
6374         Likewise.
6376         * sysdeps/alpha/Makefile: New file.
6377         * sysdeps/alpha/tcb-offsets.sym: New file.
6378         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
6379         Use MULTIPLE_THREADS_OFFSET to implement !libpthread !libc version.
6381         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Rewrite based
6382         on powerpc version.
6384 2004-01-08  Jakub Jelinek  <jakub@redhat.com>
6386         * Makefile (tests): Add tst-backtrace1.
6387         * tst-backtrace1.c: New test.
6389 2003-12-11  Ulrich Weigand  <uweigand@de.ibm.com>
6391         * sysdeps/alpha/tls.h (DB_THREAD_SELF): Pass bit size of thread
6392         register as second parameter to the REGISTER macro.
6393         * sysdeps/ia64/tls.h (DB_THREAD_SELF): Likewise.
6394         * sysdeps/powerpc/tls.h (DB_THREAD_SELF): Likewise.
6395         * sysdeps/sh/tls.h (DB_THREAD_SELF): Likewise.
6396         * sysdeps/sparc/tls.h (DB_THREAD_SELF): Likewise.
6397         * sysdeps/s390/tls.h (DB_THREAD_SELF): Pass __WORDSIZE as bit size
6398         of thread register as second parameter to REGISTER macro in 64 case.
6400 2004-01-03  Ulrich Drepper  <drepper@redhat.com>
6402         * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Removed.
6403         (CFLAGS-getpid.o): Defined.
6404         (CFLAGS-getpid.os): Defined.
6406 2003-12-31  Ulrich Drepper  <drepper@redhat.com>
6408         * pthread_getattr_np.c (pthread_getattr_np): Make sure stack info
6409         returned for main thread does not overlap with any other VMA.
6410         Patch by Jakub Jelinek.
6412 2003-12-29  Jakub Jelinek  <jakub@redhat.com>
6414         * tst-raise1.c: Include stdio.h.
6416 2003-12-23  Jakub Jelinek  <jakub@redhat.com>
6418         * sysdeps/unix/sysv/linux/raise.c (raise): Protect pid = selftid
6419         setting with __ASSUME_TGKILL || defined __NR_tgkill.
6420         If pid is 0, set it to selftid.
6421         * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Make inline.
6422         Don't set self->pid but self->tid.  If self->pid == 0 and self->tid
6423         != 0, return self->tid without doing a syscall.
6424         * descr.h (struct pthread): Move pid field after tid.
6426         * Makefile (tests): Add tst-raise1.
6427         * tst-raise1.c: New file.
6429 2003-12-23  Roland McGrath  <roland@redhat.com>
6431         * tst-oddstacklimit.c: New file.
6432         * Makefile (tests): Add it.
6433         (tst-oddstacklimit-ENV): New variable.
6435         * init.c (__pthread_initialize_minimal_internal): Round stack rlimit
6436         value up to page size for __default_stacksize.
6438 2003-12-21  Ulrich Drepper  <drepper@redhat.com>
6440         * Makefile (tests): Add tst-eintr5.
6441         * tst-eintr5.c: New file.
6443         * eintr.c (eintr_source): Prevent sending signal to self.
6445         * tst-eintr2.c (tf1): Improve error message.
6447 2003-12-20  Ulrich Drepper  <drepper@redhat.com>
6449         * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Define.
6450         * sysdeps/unix/sysv/linux/getpid.c: New file.
6451         * pthread_cancel.c: Add comment explaining use of PID field.
6452         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
6453         * pthread_getattr_np.c: Use abs() when comparing PID and TID fields.
6454         * sysdeps/unix/sysv/linux/fork.c: Negate PID field of parent
6455         temporarily to signal the field must not be relied on and updated
6456         by getpid().
6457         * sysdeps/unix/sysv/linux/pt-raise.c: Handle case where PID is
6458         temporarily negative.
6459         * sysdeps/unix/sysv/linux/raise.c: Likewise.
6461 2003-12-19  Ulrich Drepper  <drepper@redhat.com>
6463         * eintr.c (setup_eintr): Add new parameter.  Pass to thread function.
6464         (eintr_source): If ARG != NULL, use pthread_kill.
6465         * tst-eintr1.c: Adjust for this change.
6466         * tst-eintr2.c: Likewise.
6467         * Makefile (tests): Add tst-eintr3 and tst-eintr4.
6468         * tst-eintr3.c: New file.
6469         * tst-eintr4.c: New file.
6471 2003-12-19  Jakub Jelinek  <jakub@redhat.com>
6473         * libc-cancellation.c (__libc_enable_asynccancel): Don't cancel
6474         if CANCELSTATE_BITMASK is set.
6475         * sysdeps/pthread/librt-cancellation.c (__librt_enable_asynccancel):
6476         Likewise.
6478         * Makefile (tests): Add tst-cancel22 and tst-cancel23.
6479         (tests-reverse): Add tst-cancel23.
6480         * tst-cancel22.c: New test.
6481         * tst-cancel23.c: New test.
6483 2003-12-18  Ulrich Drepper  <drepper@redhat.com>
6485         * tst-eintr1.c: Better error messages.
6487         * Makefile (tests): Add tst-eintr2.
6488         * tst-eintr2.c: New file.
6490 2003-12-18  Jakub Jelinek  <jakub@redhat.com>
6492         * Makefile (tests): Add tst-cancel21 and tst-cancelx21.
6493         (CFLAGS-tst-cancelx21.c): Set.
6494         * tst-cancel21.c: New test.
6495         * tst-cancelx21.c: New test.
6497         * unwind.c (FRAME_LEFT): Add adj argument.  Subtract it from each
6498         comparison operand.
6499         (unwind_stop): Use _JMPBUF_CFA_UNWINDS_ADJ macro instead of
6500         _JMPBUF_CFA_UNWINDS.  Adjust FRAME_LEFT invocations.
6501         * pt-longjmp.c: Include jmpbuf-unwind.h.
6502         (__pthread_cleanup_upto): Use _JMPBUF_UNWINDS_ADJ macro instead of
6503         _JMPBUF_UNWINDS.  Adjust compared pointers.
6504         * init.c (__pthread_initialize_minimal_internal): Initialize
6505         pd->stackblock_size.
6506         * sysdeps/pthread/jmpbuf-unwind.h: Removed.
6507         * sysdeps/alpha/jmpbuf-unwind.h: New file.
6508         * sysdeps/i386/jmpbuf-unwind.h: New file.
6509         * sysdeps/powerpc/jmpbuf-unwind.h: New file.
6510         * sysdeps/s390/jmpbuf-unwind.h: New file.
6511         * sysdeps/sh/jmpbuf-unwind.h: New file.
6512         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: New file.
6513         * sysdeps/x86_64/jmpbuf-unwind.h: New file.
6514         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Include stdint.h.
6515         (_JMPBUF_CFA_UNWINDS): Remove.
6516         (_JMPBUF_CFA_UNWINDS_ADJ, _JMPBUF_UNWINDS_ADJ): Define.
6518 2003-12-12  Jakub Jelinek  <jakub@redhat.com>
6520         * Makefile (tests): Add tst-cancel20 and tst-cancelx20.
6521         (CFLAGS-tst-cancelx20.c): Set.
6522         * tst-cancel20.c: New test.
6523         * tst-cancelx20.c: New test.
6525 2003-12-17  Ulrich Drepper  <drepper@redhat.com>
6527         * init.c (__pthread_initialize_minimal_internal): Don't treat
6528         architectures with separate register stack special here when
6529         computing default stack size.
6531 2003-12-17  Roland McGrath  <roland@redhat.com>
6533         * Makefile (tst-cancelx7-ARGS): New variable.
6534         Reportd by Greg Schafer <gschafer@zip.com.au>.
6536 2003-12-17  Jakub Jelinek  <jakub@redhat.com>
6538         * Makefile (tests): Add tst-stack3.  Depend on $(objpfx)tst-stack3-mem.
6539         (generated): Add tst-stack3.mtrace and tst-stack3-mem.
6540         (tst-stack3-ENV): Set.
6541         ($(objpfx)tst-stack3-mem): New.
6542         * tst-stack3.c: New test.
6544 2003-12-10  David Mosberger  <davidm@hpl.hp.com>
6546         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init_EPILOG_BEGINS):
6547         Add unwind directives.  Drop unused .regstk directive.
6548         (_fini_EPILOG_BEGINS): Add unwind directives.
6550 2003-12-11  Ulrich Drepper  <drepper@redhat.com>
6552         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
6553         Assume parameter is a pointer.
6554         (lll_futex_wake): Likewise.
6555         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_wait):
6556         Likewise.
6557         (lll_futex_wake): Likewise.
6558         Reported by Boris Hu.
6559         * sysdeps/unix/sysv/linux/unregister-atfork.c
6560         (__unregister_atfork): Pass pointer to refcntr to lll_futex_wait.
6562         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Simplify a bit.
6564 2003-12-10  Ulrich Drepper  <drepper@redhat.com>
6566         * sysdeps/pthread/bits/libc-lock.h (__rtld_lock_initialize): Define.
6567         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Call
6568         __rtld_lock_initialize for ld.so lock.
6569         Patch in part by Adam Li <adam.li@intel.com>.
6571 2003-12-02  David Mosberger  <davidm@hpl.hp.com>
6573         * Makefile (link-libc-static): Remove -lgcc_eh---it's already mentioned
6574         in $(gnulib).  Also, remove stale comment.
6576 2003-11-12  David Mosberger  <davidm@hpl.hp.com>
6578         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Take
6579         advantage of new syscall stub and optimize accordingly.
6581         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__NR_futex): Rename
6582         from SYS_futex, to match expectations of
6583         sysdep.h:DO_INLINE_SYSCALL.
6584         (lll_futex_clobbers): Remove.
6585         (lll_futex_timed_wait): Rewrite in terms of DO_INLINE_SYSCALL.
6586         (lll_futex_wake): Likewise.
6587         (lll_futex_requeue): Likewise.
6588         (__lll_mutex_trylock): Rewrite to a macro, so we can include this
6589         file before DO_INLINE_SYSCALL is defined (proposed by Jakub
6590         Jelinek).
6591         (__lll_mutex_lock): Likewise.
6592         (__lll_mutex_cond_lock): Likewise.
6593         (__lll_mutex_timed_lock): Likewise.
6594         (__lll_mutex_unlock): Likewise.
6595         (__lll_mutex_unlock_force): Likewise.
6597         * sysdeps/ia64/tls.h: Move declaration of __thread_self up so it
6598         comes before the include of <sysdep.h>.
6599         (THREAD_SELF_SYSINFO): New macro.
6600         (THREAD_SYSINFO): Likewise.
6601         (INIT_SYSINFO): New macro.
6602         (TLS_INIT_TP): Call INIT_SYSINFO.
6604         * sysdeps/ia64/tcb-offsets.sym: Add SYSINFO_OFFSET.
6606         * sysdeps/pthread/createthread.c (create_thread): Use
6607         THREAD_SELF_SYSINFO and THREAD_SYSINFO instead of open code.
6608         * allocatestack.c (allocate_stack): Use THREAD_SYSINFO and
6609         THREAD_SELF_SYSINFO instead of open code.
6610         * sysdeps/i386/tls.h (THREAD_SELF_SYSINFO): New macro.
6611         (THREAD_SYSINFO): Likewise.
6613         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: New file.
6615         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Work around gas problem.
6617 2003-12-06  Ulrich Drepper  <drepper@redhat.com>
6619         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Use .init_array
6620         instead of .init.  Patch by David Mosberger.
6622 2003-11-30  Thorsten Kukuk  <kukuk@suse.de>
6624         * sysdeps/pthread/configure.in: Remove broken declaration in C
6625         cleanup handling check.
6627 2003-11-30  Andreas Jaeger  <aj@suse.de>
6629         * Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time).
6630         * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
6631         Likewise.
6633 2003-11-27  Jakub Jelinek  <jakub@redhat.com>
6635         * sysdeps/unix/sysv/linux/internaltypes.h (ATTR_FLAG_OLDATTR): Define.
6636         * pthread_attr_destroy.c: Include shlib-compat.h.
6637         (__pthread_attr_destroy): Return immediately if ATTR_FLAG_OLDATTR
6638         is set in iattr->flags.
6639         * pthread_attr_init.c (__pthread_attr_init_2_0): Set ATTR_FLAG_OLDATTR.
6641 2003-11-21  Jakub Jelinek  <jakub@redhat.com>
6643         * Makefile (distribute): Add tst-cleanup4aux.c.
6645         * tst-cond12.c (prepare): Add prototype.  Move after test-skeleton.c
6646         include.
6648 2003-11-21  Ulrich Drepper  <drepper@redhat.com>
6650         * tst-cond12.c (do_test): If USE_COND_SIGNAL is defined, use
6651         pthread_cond_signal.
6653         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Don't
6654         store mutex address if the current value is ~0l.
6655         * sysdeps/pthread/pthread_cond_timedwait.c
6656         (__pthread_cond_timedwait): Likewise.
6657         * sysdeps/pthread/pthread_cond_broadcast.c
6658         (__pthread_cond_broadcast): Don't use requeue for pshared
6659         condvars.
6661         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
6662         (__pthread_cond_wait): Don't store mutex address if the current
6663         value is ~0l.
6664         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
6665         (__pthread_cond_timedwait): Likewise.
6666         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
6667         (__pthread_cond_broadcast): Don't use requeue for pshared
6668         condvars.
6670         * pthread_cond_init.c (__pthread_cond_init): Initialize __mutex
6671         element with ~0l for pshared condvars, with NULL otherwise.
6673         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
6674         (__pthread_cond_wait): Don't store mutex address if the current
6675         value is ~0l.
6676         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6677         (__pthread_cond_timedwait): Likewise.
6678         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
6679         (__pthread_cond_broadcast): Don't use requeue for pshared
6680         condvars.
6682         * Makefile: Add rules to build and run tst-cond12 and tst-cond13.
6683         * tst-cond12.c: New file.
6684         * tst-cond13.c: New file.
6686 2003-11-17  Ulrich Drepper  <drepper@redhat.com>
6688         * sysdeps/pthread/configure.in: Make missing forced unwind support
6689         fatal.
6691 2003-11-11  Ulrich Drepper  <drepper@redhat.com>
6693         * pthreadP.h: Don't declare __pthread_unwind as weak inside libpthread.
6695 2003-11-06  Ulrich Drepper  <drepper@redhat.com>
6697         * Makefile: Add magic to clean up correctly.
6699 2003-11-05  Jakub Jelinek  <jakub@redhat.com>
6701         * unwind.c (FRAME_LEFT): Define.
6702         (unwind_stop): Handle old style cleanups here.
6703         (__pthread_unwind): Handle old style cleanups only if
6704         !HAVE_FORCED_UNWIND.
6705         * Makefile (tests): Add tst-cleanup4 and tst-cleanupx4.
6706         (CFLAGS-tst-cleanupx4.c): Add -fexceptions.
6707         ($(objpfx)tst-cleanup4): Depend on $(objpfx)tst-cleanup4aux.o.
6708         ($(objpfx)tst-cleanupx4): Likewise.
6709         * tst-cleanup4.c: New test.
6710         * tst-cleanup4aux.c: New.
6711         * tst-cleanupx4.c: New test.
6713 2003-11-04  Ulrich Drepper  <drepper@redhat.com>
6715         * sysdeps/pthread/bits/stdio-lock.h: Use lll_*lock instead of
6716         lll_mutex_*lock macros to skip atomic operations on some archs.
6718 2003-11-03  Ulrich Drepper  <drepper@redhat.com>
6720         * sysdeps/pthread/tst-timer.c (main): Initialize
6721         sigev2.sigev_value as well.
6723 2003-10-15  Roland McGrath  <roland@redhat.com>
6725         * sysdeps/pthread/configure.in: Barf if visibility attribute support
6726         is missing.
6727         * sysdeps/pthread/configure: Regenerated.
6729 2003-10-09  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6731         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Completely revamp the
6732         locking macros.  No distinction between normal and mutex locking
6733         anymore.
6734         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Rewrite mutex locking.
6735         Merge bits from lowlevelmutex.S we still need.
6736         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Remove.
6737         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
6738         * sysdeps/unix/sysv/linux/sh/not-cancel.h: New file.
6739         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Adjust for
6740         new mutex implementation.
6741         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Likewise.
6742         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
6743         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
6744         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
6745         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
6746         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
6747         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
6748         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
6749         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
6750         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO): Also defined
6751         symbol for entry point to avoid cancellation.
6753 2003-10-07  Jakub Jelinek  <jakub@redhat.com>
6755         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Backout 2003-10-02
6756         changes.
6757         (SAVE_OLDTYPE_0): Fix a typo.
6759 2003-10-03  Ulrich Drepper  <drepper@redhat.com>
6761         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
6762         Check __sigsetjmp return value.  Reported by Daniel Jacobowitz.
6764 2003-10-02  Ulrich Drepper  <drepper@redhat.com>
6766         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (DOCARGS_1): Use
6767         correct offset.
6769 2003-10-02  Jakub Jelinek  <jakub@redhat.com>
6771         * Makefile (tests): Add tst-cancel19.
6772         * tst-cancel19.c: New test.
6774 2003-10-02  Ulrich Drepper  <drepper@redhat.com>
6776         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix saving and
6777         restoring of the old cancellation type.
6779 2003-09-30  Jakub Jelinek  <jakub@redhat.com>
6781         * sysdeps/pthread/malloc-machine.h: Remove misleading comment.
6783 2003-09-27  Wolfram Gloger  <wg@malloc.de>
6785         * sysdeps/pthread/malloc-machine.h: New file
6787 2003-09-24  Roland McGrath  <roland@redhat.com>
6789         * allocatestack.c (__make_stacks_executable): Don't ignore return
6790         value from _dl_make_stack_executable.
6792 2003-09-24  Ulrich Drepper  <drepper@redhat.com>
6794         * allocatestack.c (__make_stacks_executable): Also change
6795         permission of the currently unused stacks.
6797         * allocatestack.c (change_stack_perm): Split out from
6798         __make_stacks_executable.
6799         (allocate_stack): If the required permission changed between the time
6800         we started preparing the stack and queueing it, change the permission.
6801         (__make_stacks_executable): Call change_stack_perm.
6803         * Makefile: Build tst-execstack-mod locally.
6804         * tst-execstack-mod.c: New file.
6806 2003-09-23  Jakub Jelinek  <jakub@redhat.com>
6808         * Makefile (tests): Only add tst-execstack if have-z-execstack is yes.
6810 2003-09-23  Roland McGrath  <roland@redhat.com>
6812         * tst-execstack.c: New file.
6813         * Makefile (tests): Add it.
6814         ($(objpfx)tst-execstack, $(objpfx)tst-execstack.out): New targets.
6815         (LDFLAGS-tst-execstack): New variable.
6817         * allocatestack.c (allocate_stack): Use GL(dl_stack_flags) to decide
6818         whether to use PROT_EXEC for stack mmap.
6819         (__make_stacks_executable): New function.
6820         * pthreadP.h: Declare it.
6821         * init.c (__pthread_initialize_minimal_internal): Set
6822         GL(dl_make_stack_executable_hook) to that.
6824 2003-09-22  Ulrich Drepper  <drepper@redhat.com>
6826         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Adjust for latest
6827         recommendation from AMD re avoidance of lock prefix.
6829 2003-09-22  Jakub Jelinek  <jakub@redhat.com>
6831         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait): Use
6832         lll_futex_timed_wait instead of lll_futex_wait.
6833         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Removed.
6834         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Removed.
6835         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: Removed.
6836         * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: Removed.
6837         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Removed.
6838         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Removed.
6839         * sysdeps/unix/sysv/linux/s390/sem_post.c: Removed.
6840         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Removed.
6841         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Include atomic.h.
6842         Completely revamp the locking macros.  No distinction between
6843         normal and mutex locking anymore.
6844         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
6845         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock_wait,
6846         __lll_lock_timedwait): Fix prototypes.
6847         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_lock_wait,
6848         __lll_lock_timedwait): Likewise.
6849         (lll_mutex_lock, lll_mutex_cond_lock): Use _val instead of _bool
6850         macros, add __builtin_expect.
6851         (lll_mutex_timedlock): Likewise.  Fix return value.
6852         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Removed.
6853         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: Removed.
6854         * sysdeps/unix/sysv/linux/i386/i586/lowlevelmutex.S: Removed.
6855         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: Removed.
6856         * sysdeps/unix/sysv/linux/i386/i686/lowlevelmutex.S: Removed.
6857         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: Removed.
6858         * sysdeps/unix/sysv/linux/lowlevelmutex.c: Removed.
6859         * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: Removed.
6861 2003-09-22  Ulrich Drepper  <drepper@redhat.com>
6863         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
6864         (__lll_mutex_lock_wait): Minor optimization to avoid one atomic
6865         operation if possible.
6867         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Don't play tricks
6868         like jumping over the lock prefix.
6870 2003-09-21  Ulrich Drepper  <drepper@redhat.com>
6872         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Completely revamp the
6873         locking macros.  No distinction between normal and mutex locking
6874         anymore.
6875         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
6876         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
6877         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
6878         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Rewrite mutex
6879         locking.  Merge bits from lowlevelmutex.S we still need.
6880         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
6881         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
6882         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Removed.
6883         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Removed.
6884         * Makefile (routines): Remove libc-lowlevelmutex.
6885         (libpthread-rountines): Remove lowlevelmutex.
6886         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Adjust
6887         for new mutex implementation.
6888         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
6889         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6890         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6891         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
6892         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
6893         Likewise.
6894         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
6895         Likewise.
6896         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
6897         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
6898         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise
6899         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
6900         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6901         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6902         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
6903         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
6904         Likewise.
6905         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
6906         Likewise.
6907         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
6908         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
6909         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
6910         Don't use requeue.
6911         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
6912         * sysdeps/pthread/pthread_cond_signal.c: Don't use requeue.
6914 2003-09-20  Ulrich Drepper  <drepper@redhat.com>
6916         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't match memory
6917         in parameters of asm with output parameters.
6919         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Change
6920         type of DECR parameter to int.
6921         * pthreadP.h: Adjust prototype of __pthread_mutex_unlock_usercnt.
6923 2003-09-18  Jakub Jelinek  <jakub@redhat.com>
6925         * tst-attr3.c (tf, do_test): Print stack start/end/size and
6926         guardsize for each thread.
6928 2003-09-17  Jakub Jelinek  <jakub@redhat.com>
6930         * sysdeps/pthread/pthread.h (pthread_getattr_np): Clarify usage.
6931         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
6932         (pthread_attr_setaffinity_np): Handle cpuset == NULL.
6934         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
6935         (pthread_attr_getaffinity_np): Don't segfault if iattr->cpuset is
6936         NULL.
6937         * pthread_getattr_np.c: Set cpuset using pthread_getaffinity_np.
6938         * pthreadP.h (pthread_getaffinity_np): Add hidden_proto.
6939         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
6940         (pthread_getaffinity_np): Add hidden_def.
6942         * Makefile (tests): Add tst-attr3.
6943         * tst-attr3.c: New test.
6945         * sysdeps/i386/Makefile (CFLAGS-tst-align.c): Remove.
6947 2003-09-15  Jakub Jelinek  <jakub@redhat.com>
6949         * sysdeps/i386/Makefile (CFLAGS-pthread_create.c,
6950         CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
6952 2003-09-17  Jakub Jelinek  <jakub@redhat.com>
6954         * Makefile (CFLAGS-tst-align.c): Add $(stack-align-test-flags).
6955         * tst-align.c: Include tst-stack-align.h.
6956         (tf, do_test): Use TEST_STACK_ALIGN macro.
6958 2003-09-17  Ulrich Drepper  <drepper@redhat.com>
6960         * pthread_attr_init.c (__pthread_attr_init_2_0): Remove unused
6961         variable.
6963 2003-09-16  Ulrich Drepper  <drepper@redhat.com>
6965         * pthread_getattr_np.c (pthread_getattr_np): Correctly fill in the
6966         stack-related values for the initial thread.
6968 2003-09-15  Jakub Jelinek  <jakub@redhat.com>
6970         * Makefile (CFLAGS-pthread_once.c): Add $(uses-callbacks).
6972 2003-09-11  Ulrich Drepper  <drepper@redhat.com>
6974         * pthread_mutex_lock.c: Minor code rearrangements.
6976 2003-09-05  Roland McGrath  <roland@redhat.com>
6978         * pthread_create.c (__pthread_pthread_sizeof_descr): Removed.
6979         Instead, include ../nptl_db/db_info.c to do its magic.
6980         * pthread_key_create.c (__pthread_pthread_keys_max): Removed.
6981         (__pthread_pthread_key_2ndlevel_size): Likewise.
6982         * sysdeps/alpha/tls.h (DB_THREAD_SELF): New macro.
6983         * sysdeps/i386/tls.h (DB_THREAD_SELF): New macro.
6984         * sysdeps/ia64/tls.h (DB_THREAD_SELF): New macro.
6985         * sysdeps/powerpc/tls.h (DB_THREAD_SELF): New macro.
6986         * sysdeps/s390/tls.h (DB_THREAD_SELF): New macro.
6987         * sysdeps/sh/tls.h (DB_THREAD_SELF): New macro.
6988         * sysdeps/sparc/tls.h (DB_THREAD_SELF): New macro.
6989         * sysdeps/x86_64/tls.h (DB_THREAD_SELF): New macro.
6990         * sysdeps/alpha/td_ta_map_lwp2thr.c: File removed.
6991         * sysdeps/generic/td_ta_map_lwp2thr.c: File removed.
6992         * sysdeps/i386/td_ta_map_lwp2thr.c: File removed.
6993         * sysdeps/ia64/td_ta_map_lwp2thr.c: File removed.
6994         * sysdeps/powerpc/td_ta_map_lwp2thr.c: File removed.
6995         * sysdeps/s390/td_ta_map_lwp2thr.c: File removed.
6996         * sysdeps/sh/td_ta_map_lwp2thr.c: File removed.
6997         * sysdeps/sparc/td_ta_map_lwp2thr.c: File removed.
6998         * sysdeps/x86_64/td_ta_map_lwp2thr.c: File removed.
7000 2003-09-08  Ulrich Drepper  <drepper@redhat.com>
7002         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Change type
7003         of pthread_t to be compatible with LT.
7004         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
7005         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
7006         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7007         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7008         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
7009         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7010         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
7012 2003-09-04  Ulrich Drepper  <drepper@redhat.com>
7014         * sysdeps/unix/sysv/linux/i386/not-cancel.h (fcntl_not_cancel): Define.
7016 2003-09-04  Jakub Jelinek  <jakub@redhat.com>
7018         * unwind-forcedunwind.c: Move to...
7019         * sysdeps/pthread/unwind-forcedunwind.c: ...here.
7020         (pthread_cancel_init): Use ARCH_CANCEL_INIT if defined.
7021         * sysdeps/pthread/jmpbuf-unwind.h: New file.
7022         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: New file.
7023         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: New file.
7024         * unwind.c: Include jmpbuf-unwind.h.
7025         (unwind_stop): Use _JMPBUF_CFA_UNWINDS macro.
7027 2003-09-02  Jakub Jelinek  <jakub@redhat.com>
7029         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: New file.
7030         * sysdeps/unix/sysv/linux/ia64/Versions (libpthread): Export
7031         pthread_attr_setstack and pthread_attr_setstacksize @@GLIBC_2.3.3.
7032         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: New file.
7033         * sysdeps/unix/sysv/linux/alpha/Versions: New file.
7034         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: New file.
7035         * sysdeps/unix/sysv/linux/sparc/Versions: New file.
7036         * pthread_attr_setstack.c (__old_pthread_attr_setstack): New function.
7037         (pthread_attr_setstack): If PTHREAD_STACK_MIN != 16384, export
7038         as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.2.
7039         * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize): New
7040         function.
7041         (pthread_attr_setstacksize): If PTHREAD_STACK_MIN != 16384, export
7042         as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.1.
7043         * Makefile (tests): Add tst-stack2.
7044         * tst-stack2.c: New test.
7045         * tst-stack1.c: Include limits.h and sys/param.h.
7046         (do_test): Set size to MAX (4 * getpagesize (), PTHREAD_STACK_MIN).
7048         * pthread_condattr_setpshared.c: Include errno.h.
7049         (pthread_condattr_setpshared): Return EINVAL if pshared
7050         is neither PTHREAD_PROCESS_PRIVATE nor PTHREAD_PROCESS_SHARED.
7052         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Also
7053         defined symbol for entry point to avoid cancellation.
7054         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
7055         Likewise.
7056         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
7057         Likewise.
7058         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
7059         Likewise.
7060         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h (PSEUDO):
7061         Likewise.
7062         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
7063         Likewise.
7064         * sysdeps/unix/sysv/linux/i386/not-cancel.h (__open_nocancel,
7065         __close_nocancel, __read_nocancel, __write_nocancel,
7066         __waitpid_nocancel): Add attribute_hidden.  If not in libc.so,
7067         libpthread.so or librt.so, define to corresponding function
7068         without _nocancel suffix.
7069         * sysdeps/unix/sysv/linux/s390/not-cancel.h: New file.
7070         * sysdeps/unix/sysv/linux/powerpc/not-cancel.h: New file.
7071         * sysdeps/unix/sysv/linux/sparc/not-cancel.h: New file.
7073         * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: Fix a typo.
7075 2003-09-02  Ulrich Drepper  <drepper@redhat.com>
7077         * sysdeps/unix/sysv/linux/i386/not-cancel.h: New file.
7078         * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: New file.
7080         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Make sure the code
7081         in subsections has a symbol associated with it.
7083         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Also
7084         defined symbol for entry point to avoid cancellation.
7085         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Likewise.
7087 2003-09-01  Jakub Jelinek  <jakub@redhat.com>
7089         * Makefile (tests): Add tst-tls5.
7090         (module-names): Add tst-tls5mod{,a,b,c,d,e,f}.
7091         ($(objpfx)tst-tls5mod{,a,b,c,d,e,f}.so-no-z-defs): Set to yes.
7092         ($(objpfx)tst-tls5): New.
7093         ($(objpfx)tst-tls6.out): Likewise.
7094         (tests): Depend on $(objpfx)tst-tls6.out.
7095         * tst-tls3.c: Include stdint.h and pthreaddef.h.
7096         (do_test): Check pthread_self () return value alignment.
7097         * tst-tls3mod.c: Include stdint.h and pthreaddef.h.
7098         (tf): Check pthread_self () return value alignment.
7099         * tst-tls5.c: New test.
7100         * tst-tls5.h: New.
7101         * tst-tls5mod.c: New.
7102         * tst-tls5moda.c: New.
7103         * tst-tls5modb.c: New.
7104         * tst-tls5modc.c: New.
7105         * tst-tls5modd.c: New.
7106         * tst-tls5mode.c: New.
7107         * tst-tls5modf.c: New.
7108         * tst-tls6.sh: New test.
7110         * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Add
7111         ptr___pthread_cond_timedwait and ptr___pthread_cond_timedwait_2_0.
7112         * init.c (pthread_functions): Initialize them.
7113         * forward.c (pthread_cond_timedwait@GLIBC_2.0,
7114         pthread_cond_timedwait@@GLIBC_2.3.2): New forwards.
7115         * Versions (libc): Export pthread_cond_timedwait@GLIBC_2.0,
7116         pthread_cond_timedwait@@GLIBC_2.3.2.
7118 2003-09-01  Jakub Jelinek  <jakub@redhat.com>
7120         * sysdeps/unix/sysv/linux/alpha/timer_create.c: New file.
7121         * sysdeps/unix/sysv/linux/alpha/timer_delete.c: New file.
7122         * sysdeps/unix/sysv/linux/alpha/timer_getoverr.c: New file.
7123         * sysdeps/unix/sysv/linux/alpha/timer_gettime.c: New file.
7124         * sysdeps/unix/sysv/linux/alpha/timer_settime.c: New file.
7125         * sysdeps/unix/sysv/linux/alpha/Versions: New file.
7127         * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
7129         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Define
7130         _POSIX_THREAD_PRIORITY_SCHEDULING.
7131         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
7133 2003-08-31  Ulrich Drepper  <drepper@redhat.com>
7135         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock): Avoid
7136         nested function, use static inline function from libio.h.
7137         Code by Richard Henderson.
7139         * sysdeps/pthread/bits/libc-lock.h: Mark pthread_setcancelstate as
7140         weak.
7142 2003-08-30  Jakub Jelinek  <jakub@redhat.com>
7144         * sysdeps/unix/sysv/linux/sparc/sparc64/Versions: New file.
7145         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_create.c: New file.
7146         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_delete.c: New file.
7147         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_getoverr.c: New file.
7148         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_gettime.c: New file.
7149         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_settime.c: New file.
7150         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
7151         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
7152         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: New file.
7153         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: New file.
7154         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: New file.
7155         * sysdeps/unix/sysv/linux/sparc/pthread_once.c: New file.
7156         * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: New file.
7157         * sysdeps/unix/sysv/linux/sparc/fork.c: New file.
7158         * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
7159         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: New file.
7160         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: New file.
7161         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: New file.
7162         * sysdeps/sparc/sparc32/pthread_spin_lock.c: New file.
7163         * sysdeps/sparc/sparc32/pthread_spin_trylock.c: New file.
7164         * sysdeps/sparc/sparc32/pthreaddef.h: New file.
7165         * sysdeps/sparc/sparc64/pthread_spin_lock.c: New file.
7166         * sysdeps/sparc/sparc64/pthread_spin_trylock.c: New file.
7167         * sysdeps/sparc/sparc64/pthread_spin_unlock.c: New file.
7168         * sysdeps/sparc/sparc64/pthreaddef.h: New file.
7169         * sysdeps/sparc/tls.h: New file.
7170         * sysdeps/sparc/tcb-offsets.sym: New file.
7171         * sysdeps/sparc/Makefile: New file.
7172         * sysdeps/sparc/td_ta_map_lwp2thr.c: New file.
7173         * init.c [__sparc__] (__NR_set_tid_address): Define.
7175 2003-08-29  Jakub Jelinek  <jakub@redhat.com>
7177         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock,
7178         _IO_release_lock): Define.
7180 2003-08-29  Jakub Jelinek  <jakuB@redhat.com>
7182         * tst-cancel4.c (tf_sigwait, tf_sigwaitinfo, tf_sigtimedwait): Add
7183         sigemptyset before sigaddset.  Reported by jreiser@BitWagon.com.
7185 2003-08-27  Ulrich Drepper  <drepper@redhat.com>
7187         * sysdeps/pthread/pthread.h (pthread_exit): Remove __THROW.
7188         (__pthread_cleanup_class): Add missing return types of member
7189         functions.
7191 2003-08-26  Steven Munroe <sjmunroe@us.ibm.com>
7193         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
7194         (lll_mutex_unlock_force): Add memory barrier between store and futex
7195         syscall.
7197 2003-08-25  Ulrich Drepper  <drepper@redhat.com>
7199         * tst-cancel4.c (do_test): Also unlink tempfname and remove
7200         tempmsg in first loop.
7202 2003-08-18  Ulrich Drepper  <drepper@redhat.com>
7204         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
7205         _POSIX_THREAD_PRIORITY_SCHEDULING.
7206         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
7208 2003-08-07  Jakub Jelinek  <jakub@redhat.com>
7210         * sysdeps/pthread/bits/libc-lock.h [_LIBC && SHARED]
7211         (__rtld_lock_default_lock_recursive,
7212         __rtld_lock_default_unlock_recursive): Define.
7213         [_LIBC && SHARED] (__rtld_lock_lock_recursive,
7214         __rtld_lock_unlock_recursive): Define using
7215         GL(_dl_rtld_*lock_recursive).
7216         * init.c (__pthread_initialize_minimal_internal): Initialize
7217         _dl_rtld_lock_recursive and _dl_rtld_unlock_recursive.
7218         Lock GL(_dl_load_lock) the same number of times as
7219         GL(_dl_load_lock) using non-mt implementation was nested.
7221         * pthreadP.h (__pthread_cleanup_upto): Add hidden_proto.
7222         * pt-longjmp.c (__pthread_cleanup_upto): Add hidden_def.
7224 2003-08-06  Jakub Jelinek  <jakub@redhat.com>
7226         * tst-cancel17.c (do_test): Make len2 maximum of page size and
7227         PIPE_BUF.
7229 2003-08-07  Jakub Jelinek  <jakub@redhat.com>
7231         * pthread_create.c (__pthread_create_2_0): Clear new_attr.cpuset.
7233 2003-08-03  Jakub Jelinek  <jakub@redhat.com>
7235         * sysdeps/pthread/createthread.c (do_clone): Move error handling
7236         to first syscall error check.  Move syscall error check for tkill
7237         into __ASSUME_CLONE_STOPPED #ifdef.
7239 2003-08-02  Ulrich Drepper  <drepper@redhat.com>
7241         * sysdeps/pthread/createthread.c (do_clone): If __ASSUME_CLONE_STOPPED
7242         is not defined, do explicit synchronization.
7243         (create_thread): Do not lock pd->lock here.  If __ASSUME_CLONE_STOPPED
7244         is not defined also unlock pd->lock for non-debugging case in case
7245         it is necessary.
7246         * pthread_create.c (start_thread): Always get and release pd->lock
7247         if __ASSUME_CLONE_STOPPED is not defined.
7248         (start_thread_debug): Removed.  Adjust users.
7249         * allocatestack.c (allocate_stack): Always initialize lock if
7250         __ASSUME_CLONE_STOPPED is not defined.
7251         * Makefile (tests): Add tst-sched1.
7252         * tst-sched1.c: New file.
7254         * sysdeps/pthread/createthread.c (do_clone): Only use
7255         sched_setschduler and pass correct parameters.
7257 2003-07-31  Jakub Jelinek  <jakub@redhat.com>
7259         * sysdeps/pthread/pthread.h (pthread_attr_setstackaddr,
7260         pthread_attr_setstacksize): Change PTHREAD_STACK_SIZE to
7261         PTHREAD_STACK_MIN in comments.
7263 2003-07-31  Jakub Jelinek  <jakub@redhat.com>
7265         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
7266         Shut up warnings if INTERNAL_SYSCALL_ERROR_P does not use its first
7267         argument.
7268         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Likewise.
7269         * pthread_condattr_setclock.c (pthread_condattr_setclock): Likewise.
7270         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Include pthreaddef.h.
7271         (__pthread_cleanup_upto): Fix prototype.
7272         (_longjmp_unwind): Adjust caller.
7273         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_timedlock):
7274         Change second argument to const struct pointer.
7275         * tst-sem8.c (main): Remove unused s2 and s3 variables.
7276         * tst-sem9.c (main): Likewise.
7277         * unwind.c: Include string.h for strlen prototype.
7279 2003-07-31  Ulrich Drepper  <drepper@redhat.com>
7281         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7282         (__pthread_cond_timedwait): Don't use cmov unless HAVE_CMOV is defined.
7283         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S:
7284         Define HAVE_CMOV.
7285         Patch by Nicholas Miell <nmiell@attbi.com>.
7287 2003-07-30  Jakub Jelinek  <jakub@redhat.com>
7289         * init.c (__pthread_initialize_minimal_internal): Initialize
7290         GL(dl_init_static_tls).
7291         * pthreadP.h (__pthread_init_static_tls): New prototype.
7292         * allocatestack.c (init_one_static_tls, __pthread_init_static_tls):
7293         New functions.
7294         * Makefile (tests): Add tst-tls4.
7295         (modules-names): Add tst-tls4moda and tst-tls4modb.
7296         ($(objpfx)tst-tls4): Link against libdl and libpthread.
7297         ($(objpfx)tst-tls4.out): Depend on tst-tls4moda.so and
7298         tst-tls4modb.so.
7299         * tst-tls4.c: New file.
7300         * tst-tls4moda.c: New file.
7301         * tst-tls4modb.c: New file.
7303 2003-06-19  Daniel Jacobowitz  <drow@mvista.com>
7305         * sysdeps/pthread/timer_create.c (timer_create): Call timer_delref
7306         before __timer_dealloc.
7307         * sysdeps/pthread/timer_routines.c (__timer_thread_find_matching):
7308         Don't call list_unlink.
7310 2003-07-29  Roland McGrath  <roland@redhat.com>
7312         * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
7314 2003-07-25  Jakub Jelinek  <jakub@redhat.com>
7316         * tst-cancel17.c (do_test): Check if aio_cancel failed.
7317         Don't reuse struct aiocb A if it failed.
7318         Write fpathconf (fds[1], _PC_PIPE_BUF) + 2 bytes using aio_write,
7319         not just one byte, as that does not block.
7321 2003-07-22  Jakub Jelinek  <jakub@redhat.com>
7323         * sysdeps/pthread/unwind-resume.c: New file.
7324         * sysdeps/pthread/Makefile (routines, shared-only-routines): Add
7325         unwind-resume in csu subdir.
7326         (CFLAGS-unwind-resume.c, CFLAGS-rt-unwind-resume.c): Compile with
7327         exceptions.
7328         (librt-sysdep_routines, librt-shared-only-routines): Add
7329         rt-unwind-resume.
7330         * sysdeps/pthread/rt-unwind-resume.c: New file.
7331         * unwind-forcedunwind.c: New file.
7332         * Makefile (libpthread-routines): Add unwind-forcedunwind.
7333         (libpthread-shared-only-routines): Likewise.
7334         (CFLAGS-unwind-forcedunwind.c): Compile with exceptions.
7335         * pthreadP.h (pthread_cancel_init): New prototype.
7336         * pthread_cancel.c (pthread_cancel): Call pthread_cancel_init.
7338         * sysdeps/pthread/createthread.c (do_thread, create_thread): Make
7339         attr argument const struct pthread_attr *.
7341         * res.c (__res_state): Return __resp.
7342         * descr.h: Include resolv.h.
7343         (struct pthread): Add res field.
7344         * pthread_create.c: Include resolv.h.
7345         (start_thread): Initialize __resp.
7346         * Makefile (tests): Add tst-_res1.
7347         (module-names): Add tst-_res1mod1, tst-_res1mod2.
7348         ($(objpfx)tst-_res1mod2.so): Depend on $(objpfx)tst-_res1mod1.so.
7349         ($(objpfx)tst-_res1): Depend on $(objpfx)tst-_res1mod2.so and
7350         libpthread.
7351         * tst-_res1.c: New file.
7352         * tst-_res1mod1.c: New file.
7353         * tst-_res1mod2.c: New file.
7355 2003-07-21  Ulrich Drepper  <drepper@redhat.com>
7357         * sysdeps/pthread/createthread.c: Don't define CLONE_STOPPED.
7359         * Makefile: Define various *-no-z-defs variables for test DSOs
7360         which has undefined symbols.
7362 2003-07-21  Steven Munroe  <sjmunroe@us.ibm.com>
7364         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
7365         Retry if the stwcx fails to store once_control.
7367 2003-07-20  Ulrich Drepper  <drepper@redhat.com>
7369         * Makefile (libpthread-routines): Add pthread_attr_getaffinity and
7370         pthread_attr_setaffinity.
7371         * Versions [libpthread] (GLIBC_2.3.3): Likewise.
7372         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: New file.
7373         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: New file.
7374         * pthread_attr_destroy.c: Free cpuset element if allocated.
7375         * pthread_create.c: Pass iattr as additional parameter to
7376         create_thread.
7377         * sysdeps/pthread/createthread.c: If attribute is provided and
7378         a new thread is created with affinity set or scheduling parameters,
7379         start thread with CLONE_STOPPED.
7380         * sysdeps/pthread/pthread.h: Declare pthread_attr_getaffinity and
7381         pthread_attr_setaffinity.
7382         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
7383         cpuset element.
7385 2003-07-15  Ulrich Drepper  <drepper@redhat.com>
7387         * tst-tcancel-wrappers.sh: lseek and llseek are not cancelation points.
7389 2003-07-14  Ulrich Drepper  <drepper@redhat.com>
7391         * sysdeps/pthread/configure.in: Require CFI directives also for
7392         ppc and s390.
7394 2003-07-15  Jakub Jelinek  <jakub@redhat.com>
7396         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
7397         Add cfi directives.
7399 2003-07-12  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
7401         * sysdeps/sh/tcb-offsets.sym: Add RESULT, TID, CANCELHANDLING and
7402         CLEANUP_JMP_BUF.
7403         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use more
7404         registers as variables.  Call __pthread_mutex_unlock_usercnt.
7405         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7406         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Store TID
7407         not self pointer in __writer.  Compare with TID to determine
7408         deadlocks.
7409         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7410         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
7411         Likewise.
7412         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
7413         Likewise.
7414         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add cancellation support.
7415         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
7416         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Define all the nice
7417         macros also when compiling librt.
7419 2003-07-11  Jakub Jelinek  <jakub@redhat.com>
7421         * Makefile (CFLAGS-pthread_once.c): Add -fexceptions
7422         -fasynchronous-unwind-tables.
7423         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
7424         (PSEUDO): Add cfi directives.
7425         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO):
7426         Likewise.
7427         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
7428         Likewise.
7430 2003-07-08  Jakub Jelinek  <jakub@redhat.com>
7432         * pthreadP.h (__pthread_unwind_next, __pthread_register_cancel,
7433         __pthread_unregister_cancel): Add prototypes and hidden_proto.
7434         * unwind.c (__pthread_unwind_next): Add hidden_def.
7435         * cleanup.c (__pthread_register_cancel, __pthread_unregister_cancel):
7436         Likewise.
7437         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
7438         Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
7439         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
7440         Likewise.
7441         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
7442         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
7443         Likewise.
7444         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once): Use
7445         HIDDEN_JUMPTARGET to call __pthread_register_cancel,
7446         __pthread_unregister_cancel and __pthread_unwind_next.
7448 2003-07-04  Jakub Jelinek  <jakub@redhat.com>
7450         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Use
7451         different symbol for the cancellation syscall wrapper and
7452         non-cancellation syscall wrapper.
7453         (PSEUDO_END): Define.
7455 2003-07-05  Richard Henderson  <rth@redhat.com>
7457         * sysdeps/alpha/elf/pt-initfini.c: Avoid .ent/.end.
7458         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_wait,
7459         lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
7460         return actual return value from the syscall, not 0.
7462 2003-07-07  Ulrich Drepper  <drepper@redhat.com>
7464         * descr.h (struct pthread): Add pid field.
7465         * allocatestack.c (allocate_stack): Initialize pid field in descriptor.
7466         (__reclaim_stacks): Likewise.
7467         * init.c (sigcancel_handler): If __ASSUME_CORRECT_SI_PID is defined
7468         also check for PID of the signal source.
7469         (__pthread_initialize_minimal_internal): Also initialize pid field
7470         of initial thread's descriptor.
7471         * pthread_cancel.c: Use tgkill instead of tkill if possible.
7472         * sysdeps/unix/sysv/linux/fork.c: Likewise.
7473         * sysdeps/unix/sysv/linux/pt-raise.c: Likewise.
7474         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
7475         * sysdeps/unix/sysv/linux/raise.c: Likewise.
7477 2003-07-05  Ulrich Drepper  <drepper@redhat.com>
7479         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_push): Renamed.
7480         Fix use of parameter.
7481         (__libc_cleanup_pop): Likewise.
7483 2003-07-04  Ulrich Drepper  <drepper@redhat.com>
7485         * init.c (sigcancel_handler): Change parameters to match handler
7486         for SA_SIGACTION.  Check signal number and code to recognize
7487         invalid invocations.
7489 2003-07-03  Roland McGrath  <roland@redhat.com>
7491         * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr):
7492         Apply sizeof (struct pthread) bias to r13 value.
7494 2003-07-03  Ulrich Drepper  <drepper@redhat.com>
7496         * sysdeps/pthread/configure.in: Require CFI directives.
7498         * sysdeps/pthread/librt-cancellation.c (__pthread_unwind): Remove
7499         definition.
7500         * pthreadP.h (__pthread_unwind): Add hidden_proto if used in
7501         libpthread compilation.
7502         * unwind.c (__pthread_unwind): Add hidden_def.
7503         * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_unwind.
7505 2003-07-01  Ulrich Drepper  <drepper@redhat.com>
7507         * libc-cancellation.c (__libc_cleanup_routine): Define.
7508         * sysdeps/pthread/bits/libc-lock.h (__pthread_cleanup_push): Define.
7509         (__pthread_cleanup_pop): Define.
7511 2003-07-01  Richard Henderson  <rth@redhat.com>
7513         * sysdeps/alpha/elf/pt-initfini.c: New file.
7514         * sysdeps/alpha/pthread_spin_lock.S: New file.
7515         * sysdeps/alpha/pthread_spin_trylock.S: New file.
7516         * sysdeps/alpha/pthreaddef.h: New file.
7517         * sysdeps/alpha/td_ta_map_lwp2thr.c: New file.
7518         * sysdeps/alpha/tls.h: New file.
7519         * sysdeps/unix/sysv/linux/alpha/Makefile: New file.
7520         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: New file.
7521         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: New file.
7522         * sysdeps/unix/sysv/linux/alpha/createthread.c: New file.
7523         * sysdeps/unix/sysv/linux/alpha/fork.c: New file.
7524         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: New file.
7525         * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: New file.
7526         * sysdeps/unix/sysv/linux/alpha/pthread_once.c: New file.
7527         * sysdeps/unix/sysv/linux/alpha/sem_post.c: New file.
7528         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
7530 2003-07-01  Ulrich Drepper  <drepper@redhat.com>
7532         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Add correct
7533         cleanup support and unwind info.
7535 2003-06-30  Ulrich Drepper  <drepper@redhat.com>
7537         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
7538         Use correct cleanup handler registration.  Add unwind info.
7539         * sysdeps/unix/sysv/linux/unwindbuf.sym: New file.
7540         * sysdeps/unix/sysv/linux/Makefile: Add rule to build unwindbuf.h.
7541         * tst-once3.c: Add cleanup handler and check it is called.
7542         * tst-once4.c: Likewise.
7543         * tst-oncex3.c: New file.
7544         * tst-oncex4.c: New file.
7545         * Makefile: Add rules to build and run tst-oncex3 and tst-oncex4.
7547 2003-06-29  Ulrich Drepper  <drepper@redhat.com>
7549         * sysdeps/pthread/configure.in: Check for C cleanup handling in gcc.
7551 2003-06-27  Ulrich Drepper  <drepper@redhat.com>
7553         * tst-cancel4.c (tf_msgrcv): Use IPC_PRIVATE in msgget call.
7554         (tf_msgsnd): Likewise.
7556         * tst-cancel4.c (tf_msgrcv): Strengthen test against valid
7557         premature returns a bit more.
7559 2003-06-26  Ulrich Drepper  <drepper@redhat.com>
7561         * sysdeps/pthread/librt-cancellation.c: Move __pthread_unwind
7562         definition to the front.
7564         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rename
7565         the cleanup functions to make the names unique.  Fix dwarf opcode
7566         un unwind table.
7567         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Rename cleanup
7568         functions to make the names unique.  Fix CFA offset for two blocks.
7570 2003-06-25  Ulrich Drepper  <drepper@redhat.com>
7572         * sysdeps/pthread/pthread.h (class __pthread_cleanup_class): Add
7573         missing closing braces.
7574         Patch by Christophe Saout <christophe@saout.de>.
7576 2003-06-24  Roland McGrath  <roland@redhat.com>
7578         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Typo fix.
7580 2003-06-24  Ulrich Drepper  <drepper@redhat.com>
7582         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: New file.
7583         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: New file.
7585         * pthreadP.h: Declare __find_thread_by_id.
7586         * allocatestack.c [HP_TIMING_AVAIL]: Define __find_thread_by_id.
7587         * pthread_clock_gettime.c: Allow using other thread's clock.
7588         * pthread_clock_settime.c: Likewise.
7589         * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
7590         * Makefile: Add rules to build and run tst-clock2.
7591         * tst-clock2.c: New file.
7593 2003-06-23  Ulrich Drepper  <drepper@redhat.com>
7595         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rewrite
7596         to use exception-based cleanup handler.
7597         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7599         * tst-cond8.c (ch): Announce that we are done.
7601         * pthreadP.h (__pthread_mutex_cond_lock): Mark with internal_function.
7603         * tst-cancel17.c (tf): Retry aio_suspend in case of EINTR.
7604         Also test aio_suspend with timeout value.
7606 2003-06-22  Ulrich Drepper  <drepper@redhat.com>
7608         * pthreadP.h: Mark __pthread_mutex_unlock_usercnt also hidden.
7609         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Add
7610         attribute_hidden.
7612         * pthreadP.h (__pthread_mutex_init_internal): Mark hidden.
7613         (__pthread_mutex_lock_internal): Likewise.
7614         (__pthread_mutex_unlock_internal): Likewise.
7615         (__pthread_mutex_unlock_usercnt): Declare.
7616         * pthread_mutex_destroy.c: Always fail if used in any way.
7617         * pthread_mutex_init.c: Update comment.
7618         * pthread_mutex_lock.c: If NO_INCR is not defined adjust __nusers.
7619         * pthread_mutex_timedlock.c: Adjust __nusers.
7620         * pthread_mutex_trylock.c: Adjust __nusers.
7621         * pthread_mutex_unlock.c: Old code is in __pthread_mutex_unlock_usercnt
7622         and public interfaces are wrapper with pass additional parameter.
7623         __pthread_mutex_unlock_usercnt does not adjust __nusers if second
7624         parameter zero.
7625         * tst-mutex8.c: New file.
7626         * Makefile (tests): Add tst-mutex8.
7627         * sysdeps/pthread/pthread_cond_timedwait.c: Call
7628         __pthread_mutex_unlock_usercnt.
7629         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
7630         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7631         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7632         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7633         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7634         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Define NO_INCR.
7635         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
7636         Add __nusers.
7637         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7638         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7639         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7640         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
7641         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
7643         * pthread_mutex_lock.c: Don't store THREAD_ID in __owner, use TID.
7644         * pthread_mutex_timedlock.c: Likewise.
7645         * pthread_mutex_trylock.c: Adjust __nusers.
7646         * pthread_mutex_unlock.c: Compare with TID not THREAD_ID.
7647         * tst-mutex9.c: New file.
7648         * Makefile (tests): Add tst-mutex9.
7649         * sysdeps/i386/tls.h: Remove THREAD_ID definition.
7650         * sysdeps/ia64/tls.h: Likewise.
7651         * sysdeps/powerpc/tls.h: Likewise.
7652         * sysdeps/s390/tls.h: Likewise.
7653         * sysdeps/sh/tls.h: Likewise.
7654         * sysdeps/x86_64/tls.h: Likewise.
7655         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
7656         Change type of __owner.
7657         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7658         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7659         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7660         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
7661         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
7663 2003-06-19  Jakub Jelinek  <jakub@redhat.com>
7665         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Move to...
7666         * sysdeps/unix/sysv/linux/sem_post.c: ...here.
7668         * sysdeps/unix/sysv/linux/sem_post.c: Move to...
7669         * sysdeps/unix/sysv/linux/powerpc/sem_post.c: ... here.  Pass nr + 1
7670         instead of nr to lll_futex_wake.  Only set errno and return -1
7671         if err < 0.
7673         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_wait,
7674         lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
7675         return actual return value from the syscall, not 0.
7677 2003-06-18  Ulrich Drepper  <drepper@redhat.com>
7679         * tst-cancel4.c (tf_msgsnd): Don't always use 100 as the type,
7680         find a random value.
7681         (tf_msgrcv): Likewise.  Also don't report msgrcv returns if
7682         errno==EIDRM.
7684         * sysdeps/unix/sysv/linux/timer_settime.c: Add prototype for
7685         compat_timer_settime.
7686         * sysdeps/unix/sysv/linux/timer_gettime.c: Add prototype for
7687         compat_timer_gettime.
7688         * sysdeps/unix/sysv/linux/timer_getoverr.c: Add prototype for
7689         compat_timer_getoverrun.
7690         * sysdeps/unix/sysv/linux/timer_delete.c: Add prototype for
7691         compat_timer_delete.
7693         * pthread_mutex_destroy.c (__pthread_mutex_destroy): For
7694         error-checking mutex detect busy mutexes.
7696 2003-06-17  Ulrich Drepper  <drepper@redhat.com>
7698         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_mutex_lock):
7699         Add ax to clobber list.
7700         (lll_mutex_cond_lock): Likewise.
7701         (lll_mutex_unlock): Likewise.
7702         (lll_lock): Likewise.
7703         (lll_unlock): Likewise.
7705         * Makefile: Add rules to build and run tst-cancel18 and tst-cancelx18.
7706         * tst-cancel18.c: New file.
7707         * tst-cancelx18.c: New file.
7709         * tst-cancel4.c: Test connect, creat, msgrcv, msgsnd, sendmsg, sendto,
7710         and tcdrain.
7712         * Makefile: Add rules to build and run tst-cancel17 and tst-cancel17x.
7713         * tst-cancel17.c: New file.
7714         * tst-cancelx17.c: New file.
7716         * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
7717         * sysdeps/unix/sysv/linux/sigwait.c: New file.
7718         * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
7720         * tst-cancel4.c: Test open, close, pread, pwrite, fsync, and msync.
7722 2003-06-16  Jakub Jelinek  <jakub@redhat.com>
7724         * sysdeps/pthread/createthread.c (create_thread): Set
7725         header.multiple_threads unconditionally.
7726         * allocatestack.c (allocate_stack): Likewise.
7727         * descr.h (struct pthread): Add header.multiple_threads
7728         unconditionally.
7729         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (CENABLE, CDISABLE):
7730         Define for librt.  #error if neither libpthread, libc nor librt.
7731         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (CENABLE, CDISABLE):
7732         Likewise.
7733         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (CENABLE,
7734         CDISABLE): Likewise.
7735         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (CENABLE,
7736         CDISABLE): Likewise.
7737         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (CENABLE,
7738         CDISABLE): Likewise.
7739         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (CENABLE,
7740         CDISABLE): Likewise.  Access header.multiple_threads outside of
7741         libc and libpthread.
7742         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (CENABLE, CDISABLE):
7743         Likewise.
7744         * sysdeps/x86_64/tls.h (tcbhead_t): Add multiple_threads.
7745         * sysdeps/x86_64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define.
7747 2003-06-17  Ulrich Drepper  <drepper@redhat.com>
7749         * tst-cancel4.c: Add tests for the socket and signal functions, pause.
7750         Also test early cancellation before the thread reaches the cancellation
7751         point.
7753         * Makefile: Compile forward.c with exceptions.
7755         * sysdeps/unix/sysv/linux/sleep.c: New file.
7757 2003-06-16  Ulrich Drepper  <drepper@redhat.com>
7759         * Makefile: Add CFLAGS definition to compile function wrappers
7760         duplicated from libc with exceptions.
7761         * tst-cancel4.c: Also check cancellation handlers.
7763         * Makefile: Add rules to build and run tst-cancel16 and
7764         tst-cancelx16.  Add missing CFLAGS definitions.
7765         * tst-cancel16.c: New file.
7766         * tst-cancelx16.c: New file.
7768 2003-06-15  Ulrich Drepper  <drepper@redhat.com>
7770         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
7771         (DL_SYSINFO_IMPLEMENTATION): Use CFI opcodes.
7772         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
7773         (DL_SYSINFO_IMPLEMENTATION): Likewise.
7775         * pthreadP.h (LIBC_CANCEL_ASYNC): Also define for librt.
7776         (LIBC_CANCEL_RESET): Likewise.
7777         Declare __librt_enable_asynccancel and __librt_disable_asynccancel.
7778         * sysdeps/pthread/Makefile (librt-sysdep_routines): Add
7779         librt-cancellation.
7780         (CFLAGS-libcrt-cancellation.c): Define.
7781         * sysdeps/pthread/librt-cancellation.c: New file.
7782         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define all the nice
7783         macros also when compiling librt.
7784         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
7785         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
7786         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
7787         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
7788         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
7789         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
7790         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
7792         * sysdeps/unix/sysv/linux/timer_create.c: Add prototype for
7793         compat_timer_create.
7795 2003-06-14  Ulrich Drepper  <drepper@redhat.com>
7797         * sysdeps/pthread/posix-timer.h (timespec_compare): Always inline.
7799         * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
7800         __register_atfork.
7801         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
7802         Add libc_hidden_def.
7804 2003-06-13  Roland McGrath  <roland@redhat.com>
7806         * sysdeps/x86_64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Pass FS
7807         constant from <sys/reg.h> to ps_get_thread_area, not register contents.
7809 2003-06-11  Ulrich Drepper  <drepper@redhat.com>
7811         * allocatestack.c (queue_stack): Always inline.
7812         * ptreadhP.h (__do_cancel): Likewise.
7814 2003-06-10  Jakub Jelinek  <jakub@redhat.com>
7816         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait): Fix
7817         a typo.
7819 2003-06-10  Ulrich Drepper  <drepper@redhat.com>
7821         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
7822         (__pthread_cond_signal): Remove incorrect second addition for
7823         cond_lock!=0.
7825 2003-06-09  Ulrich Drepper  <drepper@redhat.com>
7827         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
7828         (__pthread_cond_signal): Use correct futex pointer in
7829         __lll_mutex_lock_wait call.
7831         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
7832         (__pthread_cond_signal): Some more tweaks to handle cond_lock!=0.
7834 2003-06-08  Ulrich Drepper  <drepper@redhat.com>
7836         * sysdeps/unix/sysv/linux/s390/sem_wait.c (__new_sem_wait): Make
7837         cancelable.
7838         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
7839         Likewise.
7841         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Remove
7842         hand-written CFI generation code.  Since ENTRY/END also initiated
7843         CFI frames this caused two CFI sets to be generated.
7845 2003-06-07  Ulrich Drepper  <drepper@redhat.com>
7847         * cleanup_routine.c: New file.
7848         * Versions (libpthread) [GLIBC_2.3.3]: Add __pthread_cleanup_routine.
7849         * sysdeps/pthread/pthread.h: Add support for fully exception-based
7850         cleanup handling.
7851         * Makefile (libpthread-routines): Add cleanup_routine.
7852         Add more CFLAGS variables to compile with exceptions.  Add comments
7853         why which file needs unwind tables.
7854         (tests) [have-forced-unwind==yes]: Add tst-cancelx* and tst-cleanupx*
7855         tests.
7856         * tst-cancelx1.c: New file.
7857         * tst-cancelx2.c: New file.
7858         * tst-cancelx3.c: New file.
7859         * tst-cancelx4.c: New file.
7860         * tst-cancelx5.c: New file.
7861         * tst-cancelx6.c: New file.
7862         * tst-cancelx7.c: New file.
7863         * tst-cancelx8.c: New file.
7864         * tst-cancelx9.c: New file.
7865         * tst-cancelx10.c: New file.
7866         * tst-cancelx11.c: New file.
7867         * tst-cancelx12.c: New file.
7868         * tst-cancelx13.c: New file.
7869         * tst-cancelx14.c: New file.
7870         * tst-cancelx15.c: New file.
7871         * tst-cleanupx0.c: New file.
7872         * tst-cleanupx0.expect: New file.
7873         * tst-cleanupx1.c: New file.
7874         * tst-cleanupx2.c: New file.
7875         * tst-cleanupx3.c: New file.
7877         * tst-cleanup0.c: Make standard compliant.
7878         * tst-cleanup1.c: Likewise.
7880         * sysdeps/unix/sysv/linux/sem_timedwait.c: Add cancellation support.
7881         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
7882         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
7883         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
7884         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
7885         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
7886         * sysdeps/i386/tcb-offsets.sym: Add RESULT, CANCELHANDLING, and
7887         CLEANUP_JMP_BUF.
7888         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
7889         * tst-cancel12.c: New file.
7890         * tst-cancel13.c: New file.
7891         * tst-cancel14.c: New file.
7892         * tst-cancel15.c: New file.
7893         * Makefile (tests): Add tst-cancel12, tst-cancel13, tst-cancel14,
7894         and tst-cancel15.
7896         * tst-cancel1.c: Add some comments.
7898         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Compute relative
7899         timeout correctly.
7901 2003-06-06  Ulrich Drepper  <drepper@redhat.com>
7903         * Makefile (CFLAGS-pthread_cancel.c): Define.
7905 2003-06-05  Ulrich Drepper  <drepper@redhat.com>
7907         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_rwlock_t):
7908         Change type of __writer element to int.
7909         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7910         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7911         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7912         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7913         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
7914         * sysdeps/i386/tcb-offsets.sym: Replace SELF entry with TID entry.
7915         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
7916         * pthread_rwlock_trywrlock.c: Store TID not self pointer in __writer.
7917         Compare with TID to determine deadlocks.
7918         * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
7919         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
7920         * sysdeps/pthread/pthread_rwlock_timedwrlock.: Likewise.
7921         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
7922         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
7923         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
7924         Likewise.
7925         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
7926         Likewise.
7927         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
7928         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
7929         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
7930         Likewise.
7931         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
7932         Likewise.
7933         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
7934         * Makefile (tests): Add tst-rwlock12.
7935         * tst-rwlock12.c: New file.
7937 2003-06-05  Jakub Jelinek  <jakub@redhat.com>
7939         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait,
7940         __lll_timedlock_wait, lll_unlock_wake_cb, __lll_timedwait_tid):
7941         Remove bogus hidden_proto.
7942         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
7943         Likewise.
7944         * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_lock,
7945         lll_unlock_wake_cb, ___lll_timedwait_tid): Likewise.
7946         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (___lll_mutex_lock,
7947         ___lll_mutex_timedlock): Likewise.
7949 2003-06-04  Ulrich Drepper  <drepper@redhat.com>
7951         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
7952         (__pthread_cond_signal): Add some code to eventually handle
7953         cond_lock!=0.
7955 2003-06-01  Ulrich Drepper  <drepper@redhat.com>
7957         * Makefile (tests): Add tst-exec4.
7958         (tst-exec4-ARGS): Define.
7959         * tst-exec4.c: New file.
7961 2003-05-31  Ulrich Drepper  <drepper@redhat.com>
7963         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
7964         Also fail if tv_nsec < 0.
7965         (__lll_timedwait_tid): Likewise.
7966         * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
7967         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_timedwait_tid):
7968         Likewise.
7969         * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_timedwait_tid):
7970         Likewise.
7971         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (__lll_mutex_timedlock):
7972         Likewise.
7973         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
7974         Likewise.
7975         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_timedwait_tid):
7976         Likewise.
7977         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_timedwait_tid):
7978         Likewise.
7980         * Makefile (tests): Add tst-sem8 and tst-sem9.
7981         * tst-sem8.c: New file.
7982         * tst-sem9.c: New file.
7983         * sem_open.c: Fix creation of in_use record if the file exists but
7984         no internal record.
7986         * posix-timer.h: Remove old, unused timer_id2ptr and timer_ptr2id
7987         definitions.
7989         * sysdeps/pthread/timer_create.c (timer_create): In case
7990         evp==NULL, assign timer ID to sival_ptr.
7992         * descr.h (struct pthread_unwind_buf): Change type of prev element to
7993         struct pthread_unwind_buf *.
7994         (struct pthread): Likewise for cleanup_jmp_buf element.
7996         * cleanup.c (__pthread_register_cancel): Add cast to avoid warning.
7997         * cleanup_defer.c (__pthread_register_cancel_defer): Likewise.
7998         * unwind.c (__pthread_unwind_next): Likewise.
8000 2003-05-30  Ulrich Drepper  <drepper@redhat.com>
8002         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
8003         (lll_futex_timed_wait): Use int for futex value parameter.
8004         (lll_futex_wake): Likewise.
8005         (lll_futex_requeue): Likewise.
8007         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
8008         Replace one memory operation with one register operation.
8010         * tst-join4.c (do_test): Fix error message.
8012         * tst-rwlock6.c (do_test): Use correct format specifier.
8014         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
8015         (__lll_mutex_lock_wait): Replace one memory operation with one
8016         register operation.
8017         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S
8018         (__lll_mutex_lock_wait): Likewise.
8020         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
8021         (__lll_mutex_cond_lock): Add one to value parameter of
8022         __lll_lock_wait to reflect reality in the futex syscall.
8023         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
8024         (lll_mutex_cond_lock): Likewise.
8026 2003-05-30  Jakub Jelinek  <jakub@redhat.com>
8028         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_cond_lock):
8029         New function.
8030         (lll_mutex_cond_lock): Define.
8032 2003-05-29  Ulrich Drepper  <drepper@redhat.com>
8034         * Makefile (tests): Add tst-signal6.
8035         * tst-signal6.c: New file.
8037         * sysdeps/unix/sysv/linux/s390/lowlevellock.h
8038         (__lll_mutex_unlock_force): New function
8039         (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
8041         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
8042         (__lll_mutex_unlock_force): New function.
8043         (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
8045         * tst-rwlock7.c (do_test): Use correct format specifier.
8047         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue):
8048         Find break parameter in correct asm argument.
8050 2003-05-27  Jakub Jelinek  <jakub@redhat.com>
8052         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_clobbers):
8053         Remove out4.
8054         (lll_futex_requeue): Fix __o3 constraint, return negative errno if
8055         error occured.
8056         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
8057         Add __mutex.
8058         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_REQUEUE,
8059         lll_futex_requeue, lll_mutex_unlock_force): Define.
8061 2003-05-30  Jakub Jelinek  <jakub@redhat.com>
8063         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
8064         (pthread_cond_t): Add __mutex.
8065         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_REQUEUE,
8066         lll_futex_requeue, lll_mutex_unlock_force): Define.
8068 2003-05-28  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
8070         * sysdeps/sh/tcb-offsets.sym: Define MUTEX_FUTEX.
8071         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
8072         Add __mutex field.
8073         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (SYSCALL_WITH_INST_PAD):
8074         Define.
8075         (lll_futex_wait, lll_futex_wake): Define.
8076         * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: New file.
8077         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Try using
8078         FUTEX_REQUEUE instead of FUTEX_WAIT.
8079         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
8080         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Remember
8081         mutex which was used in condvar structure.  Call
8082         __pthread_mutex_cond_lock instead of __pthread_mutex_lock_internal.
8083         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
8085         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Don't
8086         include tcb-offsets.h.  Read wakeup value in locked region.
8087         Use the value of gbr register as THREAD_ID.
8088         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
8089         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
8090         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
8092         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Remove futex related
8093         macros.
8095 2003-05-28  Ulrich Drepper  <drepper@redhat.com>
8097         * sysdeps/pthread/pthread_cond_broadcast.c
8098         (__pthread_cond_broadcast): Fix typo: MAX_INT -> INT_MAX.
8100 2003-05-26  Ulrich Drepper  <drepper@redhat.com>
8102         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Fix
8103         typo in register name.
8104         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use parameters
8105         correctly.  Actually use requeue.  Little optimization.
8106         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Store
8107         mutex address early.  Handle cancellation state as 32-bit value.
8108         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8109         Remove unnecessary label.
8111 2003-05-25  Ulrich Drepper  <drepper@redhat.com>
8113         * sysdeps/pthread/pthread_cond_broadcast.c: Try using FUTEX_REQUEUE
8114         instead of FUTEX_WAIT.
8115         * sysdeps/pthread/pthread_cond_signal.c: Likewise.
8116         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
8117         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
8118         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
8119         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
8120         * sysdeps/pthread/pthread_cond_timedwait.c: Remember mutex which was
8121         used in condvar structure.  Call __pthread_mutex_cond_lock instead
8122         of __pthread_mutex_lock_internal.
8123         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8124         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8125         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
8126         (__condvar_cleanup): Always call __pthread_mutex_cond_lock.
8127         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8128         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8129         * sysdeps/unix/sysv/linux/Makefile (libpthread-sysdep_routines):
8130         Add pthread_mutex_cond_lock.
8131         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add dep_mutex.
8132         * sysdeps/unix/sysv/linux/pthread_cond_mutex_lock.c: New file.
8133         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define
8134         lll_mutex_cond_lock.
8135         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
8136         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
8137         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
8138         Add __mutex field.
8139         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8140         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
8142         * sysdeps/i386/tcb-offsets.sym: Define MUTEX_FUTEX.
8143         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
8145         * pthreadP.h: Declare __pthread_mutex_cond_lock.
8146         * pthread_mutex_lock.c: Define LLL_MUTEX_LOCK if not already defined.
8147         Use it instead of lll_mutex_lock.  If __pthread_mutex_lock is a
8148         macro don't define aliases.
8150         * cancellation.c: Remove __pthread_enable_asynccancel_2.
8151         * pthreadP.h: Remove declaration of __pthread_enable_asynccancel_2.
8152         * sysdeps/pthread/pthread_cond_timedwait.c: Use
8153         __pthread_enable_asynccancel instead of __pthread_enable_asynccancel_2.
8154         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8155         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8156         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
8157         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8158         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8160 2003-05-17  Ulrich Drepper  <drepper@redhat.com>
8162         * sem_open.c: Fix one endless loop.  Implement correct semantics
8163         wrt opening the same semaphore more then once.
8164         * sem_close.c: Adjust for sem_open change.
8165         * semaphoreP.h: Include <semaphore.h>.  Define struct inuse_sem.
8166         Declare __sem_mappings, __sem_mappings_lock, __sem_search.
8167         * Makefile (tests): Add tst-sem7.
8168         * tst-sem7.c: New file.
8170 2003-05-16  Roland McGrath  <roland@redhat.com>
8172         * sysdeps/unix/sysv/linux/register-atfork.c (libc_freeres_fn): Fix
8173         uninitialized variable braino.
8175 2003-05-16  Ulrich Drepper  <drepper@redhat.com>
8177         * sysdeps/unix/sysv/linux/timer_gettime.c (timer_gettime): Correct
8178         test for syscall availability.
8180         * sysdeps/unix/sysv/linux/timer_settime.c (timer_settime): Set
8181         __no_posix_timers to -1 if the syscalls don't exist.
8183         * pthread_join.c (pthread_join): Set tid field of the joined
8184         thread to -1.  This isn't necessary but helps to recognize some
8185         error conditions with almost no cost.
8187         * allocatestack.c (FREE_P): Also negative values indicate an
8188         unused stack.
8190         * unwind.c: Include <unistd.h>.
8192 2003-05-14  Ulrich Drepper  <drepper@redhat.com>
8194         * Makefile ($(objpfx)$(multidir)): Add rule to create the directory.
8196 2003-05-14  Jakub Jelinek  <jakub@redhat.com>
8198         * Makefile (crti-objs, crtn-objs): New variables.
8199         (omit-deps, extra-objs): Add crtn.
8200         ($(objpfx)libpthread.so): Depend on both crti and crtn
8201         and links to them in multidir.
8202         ($(objpfx)crtn.S, $(objpfx)crtn.o): New rules.
8204 2003-05-12  Steven Munroe  <sjmunroe@us.ibm.com>
8206         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
8207         (lll_mutex_unlock): Use atomic_exchange_rel.
8209 2003-05-11  Ulrich Drepper  <drepper@redhat.com>
8211         * cond-perf.c (cons): Add missing locking around setting of alldone.
8213 2003-05-10  Ulrich Drepper  <drepper@redhat.com>
8215         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Remove futex
8216         related macros.
8217         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
8219 2003-05-09  Ulrich Drepper  <drepper@redhat.com>
8221         * tst-sem6.c: New file.
8222         * Makefile (tests): Add tst-sem6.
8224         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (___lll_mutex_unlock):
8225         Use atomic_exchange_rel instead of atomic_exchange.
8226         * sysdeps/unix/sysv/linux/lowlevellock.c (lll_unlock_wake_cb):
8227         Likewise.
8229         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Improve quality of
8230         code for lll_futex_wait and lll_futex_wake in static apps.  Use
8231         vsyscall is possible.
8233         * sysdeps/unix/sysv/linux/pthread_getaffinity.c: New file.
8234         * sysdeps/unix/sysv/linux/pthread_setaffinity.c: New file.
8235         * sysdeps/pthread/pthread.h: Declare pthread_getaffinity_np and
8236         pthread_setaffinity_np.
8237         * Versions [libpthread] (GLIBC_2.3.3): Add pthread_getaffinity_np
8238         and pthread_setaffinity_np.
8239         * Makefile (libpthread-routines): Add pthread_getaffinity and
8240         pthread_setaffinity.
8242         * allocatestack.c (allocate_stack): If ARCH_RETRY_MMAP is defined,
8243         use it in case mmap to allocate the stack fails.
8244         * sysdeps/unix/sysv/linux/x86_64/Makefile: Don't define
8245         ARCH_MAP_FLAGS here.
8246         * sysdeps/x86_64/pthreaddef.h: Define ARCH_MAP_FLAGS and
8247         ARCH_RETRY_MMAP.
8249 2003-05-08  Ulrich Drepper  <drepper@redhat.com>
8251         * sysdeps/unix/sysv/linux/fork.c: Complete rewrite of the atfork
8252         handler implementation.  It is now lockless in fork().
8253         * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
8254         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
8255         * sysdeps/unix/sysv/linux/fork.h: Don't include <link.h>.  Don't
8256         declare the __fork_*_lists.
8257         (struct fork_handler): Include pointers to all three functions.
8258         Add next, refcntr and need_signal elements.
8259         (__fork_handlers): New declaration.
8260         (__register_atfork_malloc): Remove declaration.
8261         (HAVE_register_atfork_malloc): Remove definition.
8262         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove
8263         __pthread_child_handler variable.
8264         (__libc_pthread_init): Use __register_atfork instead of explicitly
8265         adding to the list.
8266         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define lll_futex_wait
8267         and lll_futex_wake.
8268         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
8270         * unwind.c (unwind_cleanup): Print error message and then abort.  This
8271         function must never be reached.
8273         * cond-perf.c: New file.
8275 2003-05-05  Ulrich Drepper  <drepper@redhat.com>
8277         * sysdeps/i386/tls.h (TLS_INIT_TP): Include \n in error message.
8279 2003-05-04  Roland McGrath  <roland@redhat.com>
8281         * Makefile ($(objpfx)../libc.so): New target.
8283 2003-05-02  Ulrich Drepper  <drepper@redhat.com>
8285         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
8286         (pthread_condattr_t): Size is only an int, don't use long for
8287         alignment.
8288         (pthread_mutexattr_t): Likewise.
8289         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8290         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
8291         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
8293 2003-05-01  Ulrich Drepper  <drepper@redhat.com>
8295         * sysdeps/i386/tls.h: Define THREAD_ID.
8296         * sysdeps/ia64/tls.h: Likewise.
8297         * sysdeps/powerpc/tls.h: Likewise.
8298         * sysdeps/s390/tls.h: Likewise.
8299         * sysdeps/sh/tls.h: Likewise.
8300         * sysdeps/x86_64/tls.h: Likewise.
8301         * pthread_mutex_lock.c: Use THREAD_ID instead of THREAD_SELF to
8302         record ownership.
8303         * pthread_mutex_timedlock.c: Likewise.
8304         * pthread_mutex_trylock.c: Likewise.
8305         * pthread_mutex_unlock.c: Likewise.
8306         * pthread_rwlock_trywrlock.c: Likewise.
8307         * sysdeps/pthread/pthread_rwlocklock_rdlock.c: Likewise.
8308         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
8309         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
8310         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
8312         * sysdeps/pthread/createthread.c (create_thread): Use CLONE_SYSVSEM
8313         flag.
8315 2003-04-29  Jakub Jelinek  <jakub@redhat.com>
8317         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
8318         (__SIZEOF_PTHREAD_COND_T): Define to 48.
8319         (pthread_rwlock_t): Add 16 bytes of pad instead of 8 before __flags.
8320         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
8321         Make __align long long instead of long.
8322         (pthread_rwlock_t): Formatting.
8323         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
8324         (pthread_rwlock_t): Formatting.
8325         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
8326         (pthread_cond_t): Make __align long long instead of long.
8327         (pthread_rwlock_t): Move __flags field to the same position as in
8328         linuxthreads.
8330 2003-04-30  Ulrich Drepper  <drepper@redhat.com>
8332         * tst-rwlock6.c (do_test): Use correct printf format specifiers.
8333         * tst-rwlock7.c (do_test): Likewise.
8335 2003-04-26  Roland McGrath  <roland@redhat.com>
8337         * Makefile ($(test-modules)): Depend on $(common-objpfx)shlib.lds.
8339 2003-04-22  Jakub Jelinek  <jakub@redhat.com>
8341         * allocatestack.c (TLS_TPADJ): Add TLS_PRE_TCB_SIZE instead of
8342         sizeof (struct pthread).
8343         (allocate_stack): Subtract TLS_PRE_TCB_SIZE bytes instead of
8344         1 struct pthread.
8345         * sysdeps/powerpc/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Define
8346         to 0.
8347         (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Define to alignment of
8348         struct pthread.
8349         (TLS_PRE_TCB_SIZE): Increase to cover tcbhead_t preceeded by pad
8350         to 32-bit bytes.
8351         (INSTALL_DTV, GET_DTV, THREAD_DTV): tcbhead_t is immediately before
8352         tcbp.
8353         (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Don't add TLS_TCB_SIZE
8354         unneccessarily.
8355         (NO_TLS_OFFSET): Define.
8356         * sysdeps/unix/sysv/linux/powerpc/createthread.c (TLS_VALUE): Don't
8357         add TLS_TCB_SIZE unnecessarily.
8359 2003-04-22  Roland McGrath  <roland@redhat.com>
8361         * Makeconfig (shared-thread-library): Reverse link order to work
8362         around linker bug.
8364 2003-04-22  Ulrich Drepper  <drepper@redhat.com>
8366         * semaphore.h: Fix typo in comment.
8368 2003-04-21  Ulrich Drepper  <drepper@redhat.com>
8370         * sysdeps/pthread/sigfillset.c: New file.
8372         * init.c (__pthread_initialize_minimal): Don't block SIGTIMER.
8373         * pthreadP.h: Make SIGTIMER and SIGCANCEL the same.
8374         * sysdeps/pthread/pthread_sigmask.c: Remove handling of SIGTIMER.
8375         * sysdeps/pthread/sigaction.c: Likewise.
8376         * sysdeps/pthread/sigprocmask.c: New file.
8377         * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): Define as
8378         __SIGRTMIN+1.
8379         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
8380         Block SIGTIMER.  Also handle SI_TKILL events and terminate thread
8381         in this case.
8383 2003-04-19  Ulrich Drepper  <drepper@redhat.com>
8385         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
8386         (DL_SYSINFO_IMPLEMENTATION): Add .eh_frame information.
8388         * sysdeps/unix/sysv/linux/unregister-atfork.c
8389         (__unregister_atfork): Don't free memory not allocated dynamically.
8391         * semaphore.h: Remove __THROW marker from cancellation points.
8392         * nptl/sysdeps/pthread/pthread.h: Likewise.
8394 2003-04-18  Ulrich Drepper  <drepper@redhat.com>
8396         * sysdeps/pthread/pthread.h: Don't mark pthread_testcancel,
8397         pthread_cancel, pthread_setcancelstate, and pthread_setcanceltype with
8398         __THROW.
8400 2003-04-16  Jakub Jelinek  <jakub@redhat.com>
8402         * tst-cancel4.c (do_test): Use %zd instead of %d when printing cnt.
8404 2003-04-15  Roland McGrath  <roland@redhat.com>
8406         * forward.c (__pthread_unwind): Tweak to avoid warning.
8408 2003-04-15  Ulrich Drepper  <drepper@redhat.com>
8410         * pthreadP.h: Move THREAD_ATOMIC_* replacements to the top.
8412 2003-04-14  Ulrich Drepper  <drepper@redhat.com>
8414         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Don't
8415         overflow CFA advance instructions.
8416         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8418 2003-04-14  Jakub Jelinek  <jakub@redhat.com>
8420         * sysdeps/i386/tls.h: Rename LOCK to LOCK_PREFIX.
8421         * sysdeps/i386/pthread_spin_lock.c: Likewise.
8422         * sysdeps/x86_64/tls.h: Likewise.  Define LOCK_PREFIX if not already
8423         defined.
8425         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Use
8426         DW_CFA_advance_loc2 for .Laddl-.Lsubl.
8427         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
8428         DW_CFA_advance_loc for .Laddl-.Lsubl.
8430 2003-04-13  Ulrich Drepper  <drepper@redhat.com>
8432         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Don't use
8433         position-independent unwind data for static libraries.
8434         Add missing unwind info.  Add comments.
8436         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Add unwind info.
8437         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8438         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8439         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8441 2003-04-12  Ulrich Drepper  <drepper@redhat.com>
8443         * Makefile: Make sure all cancellation points are compiled with
8444         exception and asynchronous unwind tables.
8446         * sysdeps/x86_64/tls.h (THREAD_SETMEM): Word around compiler bug
8447         which mishandles loading of global object addresses in PIC.
8448         (THREAD_SETMEM_NC): Likewise.
8450 2003-04-11  Ulrich Drepper  <drepper@redhat.com>
8452         * pthread.h: Define new data structure for cleanup buffer.  Declare
8453         new cleanup handler interfaces.
8454         * descr.h: Include <unwind.h> if necessary.  Define pthread_unwind_buf.
8455         (struct pthread): Add cleanup_jmp_buf pointer.  Define
8456         HAVE_CLEANUP_JMP_BUF and not HAVE_CANCELBUF.
8457         * pthreadP.h: Declare __pthread_unwind.  Define __do_cancel to use
8458         it.  Declare old cleanup handler installation functions.
8459         * cleanup.c: Rewrite.  Install handler for unwind-based cleanup
8460         handling.
8461         * cleanup_defer.c: Likewise.
8462         * cleanup_compat.c: New file.  Old cleanup code.
8463         * cleanup_def_compat.c: New file.  Old cleanup code.
8464         * pthread_create.c (start_thread): Initialize cleanup_jmp_buf element
8465         if own thread descriptor.
8466         * unwind.c: New file.
8467         * forward.c: Add __pthread_unwind.
8468         * init.c (pthread_functions): Add __pthread_unwind.
8469         * sysdeps/pthread/pthread-functions.s (struct pthread_functions):
8470         Add ptr___pthread_unwind.
8471         * Versions [GLIBC_2.3.3] (libpthread): Export new cleanup handling
8472         and unwind function.
8473         * Makefile (libpthread-routines): Add cleanup_compat,
8474         cleanup_def_compat, and unwind.  Define CFLAGS to enable unwind
8475         table generation if necessary.
8476         * version.c: Record whether unwind support is compiled in.
8477         * sysdeps/pthread/configure.in: Add checks for unwind unterfaces.
8478         * sysdeps/pthread/bits/libc-lock.h: Add prototypes of the old cleanup
8479         handler interfaces.
8480         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add quite a bit of
8481         complication to generate unwind information for syscall wrappers.
8482         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
8483         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
8484         __cleanup_fct_attribute.
8486         * Makefile: Add rules to build and run tst-cleanup0.
8487         * tst-cleanup0.c: New file.
8488         * tst-cleanup0.expect: New file.
8490         * pthread_create.c (deallocate_tsd): Don't take parameter.  Adjust
8491         caller.  Optimize to avoid often unecessary local variable.
8493 2003-04-11  Roland McGrath  <roland@redhat.com>
8495         * Makefile ($(objpfx)multidir.mk): New target, generated makefile that
8496         sets variable `multidir'; include that.
8497         (generated): Add it.
8498         ($(objpfx)$(multidir)/crti.o): New target.
8499         [$(multidir) != .] (generated-dirs, extra-objs, omit-deps): Add it.
8501 2003-04-11  Ulrich Drepper  <drepper@redhat.com>
8503         * tst-attr2.c (do_test): Add cast to avoid warning.
8504         * tst-mutex4.c (do_test): Likewise.
8506 2003-04-10  Ulrich Drepper  <drepper@redhat.com>
8508         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset CPU clocks
8509         in child.
8511 2003-04-09  Ulrich Drepper  <drepper@redhat.com>
8513         * Makefile (tests): Add tst-detach1.
8514         * tst-detach1.c: New file.
8516 2003-04-08  Ulrich Drepper  <drepper@redhat.com>
8518         * sysdeps/pthread/pthread.h: Remove duplicate
8519         pthread_cleanup_{push,pop} definitions.
8521         * tst-barrier2.c: Eliminate warnings.
8522         * tst-cancel4.c: Likewise.
8523         * tst-cond4.c: Likewise.
8524         * tst-cond6.c: Likewise.
8525         * tst-detach1.c: Likewise.
8526         * tst-rwlock4.c: Likewise.
8527         * tst-rwlock6.c: Likewise.
8528         * tst-rwlock7.c: Likewise.
8529         * tst-sem3.c: Likewise.
8530         * tst-spin2.c: Likewise.
8531         * tst-umask1.c: Likewise.
8533 2003-04-07  Ulrich Drepper  <drepper@redhat.com>
8535         * pthread_detach.c (pthread_detach): Fix test for invalid TID.
8537 2003-04-06  Ulrich Drepper  <drepper@redhat.com>
8539         * descr.h (struct pthread): Move cancelhandling member to the front.
8541 2003-04-05  Ulrich Drepper  <drepper@redhat.com>
8543         * sysdeps/unix/sysv/linux/register-atfork.c: Define malloc_prepare,
8544         malloc_parent, and malloc_child statically.
8545         (__register_atfork_malloc): New function.
8546         (free_mem): Don't free any of the malloc_* variables on the list.
8547         * sysdeps/unix/sysv/linux/fork.h: Declare __register_atfork_malloc.
8548         Define HAVE_register_atfork_malloc.
8550 2003-04-04  Ulrich Drepper  <drepper@redhat.com>
8552         * sysdeps/pthread/createthread.c (create_thread): Add some more
8553         comments explaining when to set multiple_threads and when not.
8555         * pthreadP.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
8556         THREAD_ATOMIC_BIT_SET if not already defined.
8557         * sysdeps/i386/tls.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
8558         THREAD_ATOMIC_BIT_SET:
8559         * sysdeps/x86_64/tls.h: Likewise.
8560         * cleanup_defer.c (_pthread_cleanup_push_defer): Rewrite to use
8561         THREAD_ATOMIC_CMPXCHG_VAL.
8562         (_pthread_cleanup_pop_restore): Likewise.
8563         * cancellation.c (__pthread_enable_asynccancel): Likewise.
8564         (__pthread_enable_asynccancel_2): Likewise.
8565         (__pthread_disable_asynccancel): Likewise.
8566         * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
8567         (__libc_disable_asynccancel): Likewise.
8568         * init.c (sigcancel_handler): Likewise.
8569         * pthread_setcancelstate.c (__pthread_setcancelstate): Likewise.
8570         * pthread_setcanceltype.c (__pthread_setcanceltype): Likewise.
8572 2003-04-03  Ulrich Drepper  <drepper@redhat.com>
8574         * init.c (sigcancel_handler): Don't set EXITING_BIT here.
8575         * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
8576         * pthreadP.h (__do_cancel): Set EXITING_BIT here.
8577         * Makefile (tests): Add tst-cancel11.
8578         * tst-cancel11.c: New file.
8580 2003-04-01  Ulrich Drepper  <drepper@redhat.com>
8582         * pthread_create.c (deallocate_tsd): Clear/free memory after the last
8583         round, not the first.  Use specific_used flag instead of local
8584         found_nonzero variable.  Use THREAD_[SG]ETMEM where possible.
8585         (__free_tcb): Don't call deallocate_tsd here.
8586         (start_thread): Call deallocate_tsd here.
8587         * pthread_setspecific.c: Set specific_used flag really only when
8588         needed.
8589         * Makefile (tests): Add tst-tsd3.c and tst-tsd4.
8590         * tst-tsd3.c: New file.
8591         * tst-tsd4.c: New file.
8593 2003-03-31  Ulrich Drepper  <drepper@redhat.com>
8595         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_mutex_lock):
8596         Use atomic_exchange_and_add instead of __lll_add.
8597         (__lll_mutex_timedlock): Likewise.
8598         Patch by Ian Wienand.
8600 2003-03-24  Steven Munroe  <sjmunroe@us.ibm.com>
8602         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
8603         (SINGLE_THREAD_P): Fix typo.
8604         * tst-cancel-wrappers.sh: Handle '.'ed symbols.
8606 2003-03-31  Ulrich Drepper  <drepper@redhat.com>
8608         * Makefile (tests): Add tst-align.
8609         * tst-align.c: New file.
8610         * sysdeps/i386/Makefile: Define CFLAGS-tst-align.
8612         * sysdeps/i386/tls.h (CALL_THREAD_FCT): Align stack of called
8613         function correctly.
8615         * tst-tsd2.c: Add casts to avoid warnings.
8617 2003-03-30  Ulrich Drepper  <drepper@redhat.com>
8619         * descr.h (struct pthread): Move most often used elements to the front.
8621 2003-03-29  Ulrich Drepper  <drepper@redhat.com>
8623         * Makefile (libpthread-routines): Add pthread_atfork.
8624         (libpthread-static-only-routines): Add pthread_atfork.
8626 2003-03-28  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
8628         * sysdeps/sh/tls.h: Include nptl/descr.h after the definition
8629         of TLS_DTV_AT_TP.
8630         (INSTALL_DTV): Add parens.
8631         (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
8632         Use passed descr instead of THREAD_SELF.
8633         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S
8634         (__lll_mutex_timedlock_wait): Correct expected value after
8635         spurious wakeup.
8636         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S:
8637         Release lock before waking up the waiters.
8638         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Correct exit
8639         criteria.  Reorderstruct passed to cleanup handler.  Fix
8640         handling of cancellation and failung pthread_mutex_unlock call.
8641         Use __pthread_enable_asynccancel_2 instead of
8642         __pthread_enable_asynccancel.
8643         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
8644         Return result of lock re-get if it fails.
8645         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Fix wrong argument
8646         for __pthread_cleanup_push.
8647         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Fix
8648         completely broken rwlock implementation.
8649         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
8650         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
8651         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
8652         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
8653         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
8654         * sysdeps/unix/sysv/linux/sh/sem_post.S: Fix error value.  Use
8655         versioned_symbol macro.
8656         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Use versioned_symbol macro.
8657         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
8659 2003-03-27  Ulrich Drepper  <drepper@redhat.com>
8661         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Don't declare
8662         __timer_helper_thread.  Declare __start_helper_thread, __helper_once,
8663         and __helper_tid.
8664         (struct timer): Remove th and bar field.
8665         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Remove
8666         debugging code.  Create only one helper thread.
8667         * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Don't kill
8668         helper thread.
8669         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
8670         Renamed.  Define statically.  Use thread info from siginfo.
8671         (__helper_once): New variable.
8672         (__helper_tid): New variable.
8673         (__reset_helper_control): New function.
8674         (__start_helper_thread): New function.
8676         * pthread_create.c (start_thread): Don't use setjmp inside
8677         __builtin_expect to work around gcc bug.
8679         * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Even if
8680         timer_delete syscall fails, but not with ENOSYS, set
8681         __no_posix_timers.
8683         * sysdeps/unix/sysv/linux/timer_settime.c [!__ASSUME_POSIX_TIMERS]
8684         (timer_settime): Fix typo.
8685         * sysdeps/unix/sysv/linux/timer_getoverr.c
8686         [!__ASSUME_POSIX_TIMERS] (timer_getoverrun): Likewise.
8688 2003-03-27  Jakub Jelinek  <jakub@redhat.com>
8690         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Fix
8691         offset of cleanupbuf.__prev.
8693 2003-03-26  Jakub Jelinek  <jakub@redhat.com>
8695         * sysdeps/unix/sysv/linux/timer_getoverr.c: Fix typo in name
8696         of included file.
8698 2003-03-26  Ulrich Drepper  <drepper@redhat.com>
8700         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): If EVP ==
8701         NULL provide default definition to syscall.
8703 2003-03-25  Roland McGrath  <roland@redhat.com>
8705         * sysdeps/pthread/posix-timer.h (TIMER_MAX): Define if not defined.
8706         (timer_id2ptr): Fix typo.
8708 2003-03-25  Ulrich Drepper  <drepper@redhat.com>
8710         * pthreadP.h: Define SIGCANCEL and SIGTIMER.
8711         * sysdeps/i386/pthreaddef.h: Remove SIGCANCEL definition.
8712         * sysdeps/ia64/pthreaddef.h: Likewise.
8713         * sysdeps/powerpc/pthreaddef.h: Likewise.
8714         * sysdeps/s390/pthreaddef.h: Likewise.
8715         * sysdeps/sh/pthreaddef.h: Likewise.
8716         * sysdeps/x86_64/pthreaddef.h: Likewise.
8717         * init.c (__pthread_initialize_minimal): Block SIGTIMER.
8718         * sysdeps/pthread/sigaction.c: Also prevent SIGTIMER handler from
8719         being changed.
8720         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
8721         SIGTIMER is not unblocked.
8722         * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): One more
8723         RT signal taken.
8724         * sysdeps/unix/sysv/linux/pthread_kill.c: Do not allow SIGTIMER to
8725         be send.
8726         * sysdeps/pthread/posix-timer.h (timer_id2ptr, timer_ptr2id): Just
8727         pass pointer through as ID.
8728         * sysdeps/unix/sysv/linux/bits/local_lim.h (TIMER_MAX): Removed.
8729         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: New file.
8730         * sysdeps/unix/sysv/linux/timer_create.c: New file.
8731         * sysdeps/unix/sysv/linux/timer_delete.c: New file.
8732         * sysdeps/unix/sysv/linux/timer_getoverr.c: New file.
8733         * sysdeps/unix/sysv/linux/timer_gettime.c: New file.
8734         * sysdeps/unix/sysv/linux/timer_routines.c: New file.
8735         * sysdeps/unix/sysv/linux/timer_settime.c: New file.
8736         * sysdeps/unix/sysv/linux/ia64/Versions: New file.
8737         * sysdeps/unix/sysv/linux/ia64/timer_create.c: New file.
8738         * sysdeps/unix/sysv/linux/ia64/timer_delete.c: New file.
8739         * sysdeps/unix/sysv/linux/ia64/timer_getoverr.c: New file.
8740         * sysdeps/unix/sysv/linux/ia64/timer_gettime.c: New file.
8741         * sysdeps/unix/sysv/linux/ia64/timer_settime.c: New file.
8742         * sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions: New file.
8743         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_create.c: New file.
8744         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_delete.c: New file.
8745         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_getoverr.c: New file.
8746         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_gettime.c: New file.
8747         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_settime.c: New file.
8748         * sysdeps/unix/sysv/linux/s390/s390-64/Versions: New file.
8749         * sysdeps/unix/sysv/linux/s390/s390-64/timer_create.c: New file.
8750         * sysdeps/unix/sysv/linux/s390/s390-64/timer_delete.c: New file.
8751         * sysdeps/unix/sysv/linux/s390/s390-64/timer_getoverr.c: New file.
8752         * sysdeps/unix/sysv/linux/s390/s390-64/timer_gettime.c: New file.
8753         * sysdeps/unix/sysv/linux/s390/s390-64/timer_settime.c: New file.
8754         * sysdeps/unix/sysv/linux/x86_64/Versions: New file.
8755         * sysdeps/unix/sysv/linux/x86_64/compat-timer.h: New file.
8756         * sysdeps/unix/sysv/linux/x86_64/timer_create.c: New file.
8757         * sysdeps/unix/sysv/linux/x86_64/timer_delete.c: New file.
8758         * sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c: New file.
8759         * sysdeps/unix/sysv/linux/x86_64/timer_gettime.c: New file.
8760         * sysdeps/unix/sysv/linux/x86_64/timer_settime.c: New file.
8762         * pthreadP.h: Remove FRAME_LEFT definition.
8763         * cleanup.c (_pthread_cleanup_push): Don't check for reference to
8764         already left frame.  Programs which have this problem are not POSIX
8765         compliant.
8766         * cleanup_defer.c (_pthread_cleanup_push_defer): Likewise.
8768 2003-03-24  Ulrich Drepper  <drepper@redhat.com>
8770         * sysdeps/pthread/tst-timer.c: Check return values of the
8771         functions we test.
8773 2003-03-23  Roland McGrath  <roland@redhat.com>
8775         * tst-tls3.c (do_test) [! HAVE___THREAD]: Don't test anything.
8776         * tst-tls3mod.c: Likewise.
8777         * tst-tls1.c: Likewise.
8778         * tst-tls2.c: Likewise.
8780         * tst-mutex5.c (do_test): Unlock before destroy, otherwise we invoke
8781         undefined behavior.
8783         * tst-join5.c (tf1, tf2): Add a cast.
8785         * Makeconfig (includes): Append -I$(..)nptl to this variable.
8787         * tst-barrier2.c (do_test) [! _POSIX_THREAD_PROCESS_SHARED]:
8788         Don't test anything.
8789         * tst-cond4.c: Likewise.
8790         * tst-cond6.c: Likewise.
8791         * tst-flock2.c: Likewise.
8792         * tst-mutex4.c: Likewise.
8793         * tst-rwlock4.c: Likewise.
8794         * tst-signal1.c: Likewise.
8795         * tst-spin2.c: Likewise.
8796         * tst-cond11.c [! _POSIX_CLOCK_SELECTION]: Likewise.
8798         * tst-mutex4.c: Use test-skeleton.c.
8799         * tst-spin2.c: Likewise.
8800         * tst-sysconf.c: Likewise.
8801         * tst-barrier2.c: Likewise.
8802         * tst-cond4.c: Likewise.
8803         * tst-cond6.c: Likewise.
8804         * tst-rwlock4.c: Likewise.
8805         * tst-unload.c: Likewise.
8806         * tst-flock2.c (do_test): Use return instead of exit.
8808 2003-03-22  Jakub Jelinek  <jakub@redhat.com>
8810         * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
8812 2003-03-21  Ulrich Drepper  <drepper@redhat.com>
8814         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
8815         (__lll_mutex_trylock): Use atomic_compare_and_exchange_val_acq
8816         instead of __lll_compare_and_swap.
8817         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
8818         Likewise.
8819         Removed definition if __lll_compare_and_swap.
8821         * cancellation.c: Adjust for new form of compare&exchange macros.
8822         * cleanup_defer.c: Likewise.
8823         * init.c: Likewise.
8824         * libc-cancellation.c: Likewise.
8825         * old_pthread_cond_broadcast.c: Likewise.
8826         * old_pthread_cond_signal.c: Likewise.
8827         * old_pthread_cond_timedwait.c: Likewise.
8828         * old_pthread_cond_wait.c: Likewise.
8829         * pthread_cancel.c: Likewise.
8830         * pthread_create.c: Likewise.
8831         * pthread_detach.c: Likewise.
8832         * pthread_join.c: Likewise.
8833         * pthread_key_delete.c: Likewise.
8834         * pthread_setcancelstate.c: Likewise.
8835         * pthread_setcanceltype.c: Likewise.
8836         * pthread_timedjoin.c: Likewise.
8837         * pthread_tryjoin.c: Likewise.
8838         * sysdeps/pthread/createthread.c: Likewise.
8840 2003-03-20  Ulrich Drepper  <drepper@redhat.com>
8842         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Include <atomic.h>.
8843         Remove __lll_add, __lll_dec_if_positive, and __lll_test_and_set
8844         definitions.  Replace uses with calls to atomic_* functions.
8845         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
8846         * sysdeps/unix/sysv/linux/lowlevellock.c: Replace __lll_add and
8847         __lll_test_and_set calls with atomic_exchange_and_add and
8848         atomic_exchange calls respectively.
8849         * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
8850         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
8851         * sysdeps/unix/sysv/linux/sem_trywait.c: Likewise.
8852         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
8853         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Likewise.
8854         * sysdeps/unix/sysv/linux/ia64/sem_port.c: Likewise.
8855         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
8857         * allocatestack.c (allocate_stack): Assume atomic_exchange_and_add
8858         returns the old value.
8860 2003-03-20  Martin Schwidefsky  <sky@mschwid3.boeblingen.de.ibm.com>
8862         * sysdeps/s390/pthread_spin_lock.c (pthread_spin_lock): Use type
8863         int for variable OLDVAL and correct inline assembler contraint.
8864         * sysdeps/s390/pthread_spin_trylock.c (pthread_spin_trylock): Use
8865         type int for variable OLD.
8867         * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it
8868         only for s390-32.
8869         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
8870         (SINGLE_THREAD_P): Use global variable __local_multiple_threads
8871         instead of multiple_threads field in the TCB.
8873 2003-03-19  Ulrich Drepper  <drepper@redhat.com>
8875         * sysdeps/i386/i686/bits/atomic.h: Removed.
8876         * sysdeps/i386/i586/bits/atomic.h: Removed.
8877         * sysdeps/i386/i486/bits/atomic.h: Removed.  Moved to glibc.
8878         * sysdeps/x86_64/bits/atomic.h: Removed.  Moved to glibc.
8879         * sysdeps/s390/bits/atomic.h: Removed.  Moved to glibc.
8880         * sysdeps/sh/bits/atomic.h: Removed.  Moved to glibc.
8881         * sysdeps/ia64/bits/atomic.h: Removed.  Moved to glibc.
8882         * sysdeps/powerpc/bits/atomic.h: Removed.  Moved to glibc.
8883         * atomic.h: Removed.  Moved to glibc.
8885         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Add
8886         support for clock selection.
8888         * sysdeps/pthread/pthread_cond_broadcast.c: Release lock before
8889         signalling waiters.
8891 2003-03-18  Roland McGrath  <roland@redhat.com>
8893         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
8894         Add __lll_rel_instr first.  Add memory clobber.
8895         (lll_mutex_unlock): Use __lll_test_and_set.
8896         From Paul Mackerras <paulus@samba.org>.
8898         * sysdeps/powerpc/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define
8899         unconditionally.
8900         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
8901         (SINGLE_THREAD_P):  Add `header.' prefix.
8902         From Paul Mackerras <paulus@samba.org>.
8904         * Versions (libpthread: GLIBC_2.3.2): Move pthread_tryjoin_np and
8905         pthread_timedjoin_np to ...
8906         (libpthread: GLIBC_2.3.3): ... here.
8907         (libpthread: GLIBC_2.2): Move pthread_barrierattr_getpshared there too.
8909         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
8910         Avoid shadowing VAL variable.
8912         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
8913         New macro.
8915 2003-03-18  Ulrich Drepper  <drepper@redhat.com>
8917         * Makefile (tests): Add tst-cond11.
8918         * tst-cond11.c: New file.
8920         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Reorder
8921         struct passed to cleanup handler to eliminate one more
8922         instruction.
8923         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8925         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
8926         (pthrad_cond_t): Replace __unused field with __clock.
8928         * sysdeps/pthread/pthread_cond_wait.c: Release condvar lock before
8929         waken all waiters in cleanup handler.
8930         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8931         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8933         * pthread_condattr_getclock.c: New file.
8934         * pthread_condattr_setclock.c: New file.
8935         * sysdeps/pthread/pthread.h: Declare these new functions.
8936         * Versions [GLIBC_2.3.3] (libpthread): Add the new functions.
8937         * Makefile (libpthread-routines): Add the new functions.
8938         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_condattr):
8939         Renamed field to value.  Document use of the bits.
8940         * pthread_condattr_getpshared.c: Adjust for struct pthread_condattr
8941         change.
8942         * pthread_condattr_setpshared.c: Likewise.
8943         * pthread_cond_init.c (__pthread_cond_init): Initialized __clock field.
8944         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add cond_clock symbol.
8945         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
8946         Add __clock field.
8947         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8948         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
8949         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
8950         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
8951         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
8952         Implement clock selection.
8953         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
8954         * pthread-errnos.sym: Add ENOSYS.
8955         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
8956         _POSIX_CLOCK_SELECTION.
8957         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
8959         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Remove
8960         invalid .size directive.
8962 2003-03-17  Roland McGrath  <roland@redhat.com>
8964         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
8965         Formatting tweaks.
8967 2003-03-17  Ulrich Drepper  <drepper@redhat.com>
8969         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Use __builtin_expect.
8970         Use __lll_add instead of spelling it out.  Use protected symbol names.
8971         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Use __builtin_expect.
8972         Use __lll_add.
8973         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_compare_and_swap):
8974         Renamed from lll_compare_and_swap.  Use new name where necessary.
8975         (__lll_add): Defined.
8976         (__lll_dec_if_positive): Defined.
8977         (__lll_test_and_set): Defined.
8978         * sysdeps/ia64/pthread_spin_init.c: Removed.
8979         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Removed.
8980         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Removed.
8981         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Removed.
8982         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Removed.
8983         * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: Removed.
8984         * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: Removed.
8985         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Removed.
8986         * sysdeps/ia64/bits/atomic.h: Add __builtin_expect where appropriate.
8987         * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
8988         __sync_lock_release_si.
8989         Patch by Jakub Jelinek.
8991         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
8992         Fix timeout handling.
8993         (__lll_timedwait_tid): Likewise.
8994         (lll_unlock_wake_cb): Wake up other waiters if necessary.
8995         Patch by Jakub Jelinek.
8997         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Pretty printing.
8999 2003-03-17  Roland McGrath  <roland@redhat.com>
9001         PowerPC port contributed by Paul Mackerras <paulus@samba.org>.
9002         * sysdeps/pthread/pthread_spin_init.c: New file.
9003         * sysdeps/pthread/pthread_spin_unlock.c: New file.
9004         * sysdeps/powerpc/Makefile: New file.
9005         * sysdeps/powerpc/pthread_spin_lock.c: New file.
9006         * sysdeps/powerpc/pthread_spin_trylock.c: New file.
9007         * sysdeps/powerpc/pthreaddef.h: New file.
9008         * sysdeps/powerpc/tcb-offsets.sym: New file.
9009         * sysdeps/powerpc/td_ta_map_lwp2thr.c: New file.
9010         * sysdeps/powerpc/tls.h: New file.
9011         * sysdeps/powerpc/bits/atomic.h: New file.
9012         * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: New file.
9013         * sysdeps/unix/sysv/linux/libc-lowlevellock.c: New file.
9014         * sysdeps/unix/sysv/linux/lowlevellock.c: New file.
9016         * sysdeps/unix/sysv/linux/lowlevelmutex.c: New file.
9017         * sysdeps/unix/sysv/linux/sem_post.c: New file.
9018         * sysdeps/unix/sysv/linux/sem_timedwait.c: New file.
9019         * sysdeps/unix/sysv/linux/sem_trywait.c: New file.
9020         * sysdeps/unix/sysv/linux/sem_wait.c: New file.
9021         * sysdeps/unix/sysv/linux/powerpc/Makefile: New file.
9022         * sysdeps/unix/sysv/linux/powerpc/createthread.c: New file.
9023         * sysdeps/unix/sysv/linux/powerpc/fork.c: New file.
9024         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: New file.
9025         * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: New file.
9026         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: New file.
9027         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: New file.
9028         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: New file.
9029         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
9030         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New file.
9032         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Use __gettimeofday,
9033         not gettimeofday.
9034         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Likewise.
9035         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
9036         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Likewise.
9037         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Likewise.
9038         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
9040 2003-03-17  Ulrich Drepper  <drepper@redhat.com>
9042         * sysdeps/pthread/pthread_cond_wait.c: Correct exit criteria.
9043         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
9044         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9045         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
9046         Patch by Ewald Snel <ewald@rambo.its.tudelft.nl>.
9048 2003-03-16  Roland McGrath  <roland@redhat.com>
9050         * tst-fork4.c: Include <string.h>.
9051         * tst-signal2.c: Likewise.
9052         * tst-mutex5.c (do_test): exit -> return.
9053         * tst-mutex2.c: Include <stdlib.h>.
9055 2003-03-16  Ulrich Drepper  <drepper@redhat.com>
9057         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
9058         (__lll_mutex_timedlock_wait): Correct expected value after
9059         spurious wakeup.  Otherwise we would never wait again.
9061         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Work around red
9062         zone versus inline asm stupidity.  Use correct instructions.
9064         * tst-rwlock6.c: Add some more status output.
9066 2003-03-15  Roland McGrath  <roland@redhat.com>
9068         * sysdeps/pthread/configure.in: New file.
9069         * sysdeps/pthread/configure: New file (generated).
9071 2003-03-15  Ulrich Drepper  <drepper@redhat.com>
9073         * allocatestack.c (allocate_stack): Store the exact stack size of
9074         user allocated stacks.
9076 2003-03-15  Jakub Jelinek  <jakub@redhat.com>
9078         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
9079         (SINGLE_THREAD): Use `header' prefix instead of `header.data'.
9080         * sysdeps/sh/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
9081         * sysdeps/sh/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define.
9082         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
9083         Use `header.' prefix.
9084         * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
9086 2003-03-15  Ulrich Drepper  <drepper@redhat.com>
9088         * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Don't use
9089         __builtin_frame_address, use stack pointer.
9091         * sysdeps/unix/sysv/linux/jmp-unwind.c: Use CURRENT_STACK_FRAME
9092         instead of __builtin_frame_pointer.
9094 2003-03-14  Ulrich Drepper  <drepper@redhat.com>
9096         * tst-basic1.c (do_test): Add cast to avoid warning.
9097         * tst-basic2.c (do_test): Likewise.
9099         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use correct
9100         amount of stack correction.
9102         * tst-fork4.c: Use test-skeleton.c.
9104 2003-03-14  Roland McGrath  <roland@redhat.com>
9106         * init.c: Fix typo "#eli" for "#else".
9108 2003-03-14  Steven Munroe  <sjmunroe@us.ibm.com>
9110         * allocatestack.c (__stack_user): Use hidden_data_def.
9111         * pthread_create.c (__pthread_keys): Likewise.
9113         * init.c [__powerpc__] (__NR_set_tid_address): Define it.
9115 2003-03-14  Roland McGrath  <roland@redhat.com>
9117         * tst-fork4.c: New file.
9118         * Makefile (tests): Add it.
9120         * descr.h (struct pthread): Move the union out of [!TLS_DTV_AT_TP], so
9121         we always define the padding space.
9122         [!TLS_DTV_AT_TP]: Give tcbhead_t field a name, `header', since GCC
9123         stopped supporting its own extensions fully.
9124         [TLS_MULTIPLE_THREADS_IN_TCB]: Put `multiple_threads' inside a wrapper
9125         struct also called `header', so `header.multiple_threads' is the field
9126         name to use on all machines.
9127         * allocatestack.c (allocate_stack): Use `header.' prefix.
9128         * sysdeps/pthread/createthread.c (create_thread): Likewise.
9129         * pthread_create.c (__pthread_create_2_1): Likewise.
9130         * sysdeps/i386/tls.h (INSTALL_NEW_DTV, THREAD_DTV): Likewise.
9131         (THREAD_SELF): Likewise.
9132         * sysdeps/x86_64/tls.h: Likewise.
9133         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
9134         (SINGLE_THREAD_P): Likewise.
9135         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
9136         (SINGLE_THREAD_P): Likewise.
9137         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
9138         (SINGLE_THREAD_P): Likewise.
9140         * sysdeps/s390/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Use REGS[18]
9141         value directly.
9143 2003-03-14  Ulrich Drepper  <drepper@redhat.com>
9145         * pthread_create.c (start_thread): Use CALL_THREAD_FCT if defined.
9146         * sysdeps/i386/tls.h: Define CALL_THREAD_FCT.
9148         * pthread_create.c (start_thread): setjmp is expected to return 0.
9150         * sysdeps/x86_64/tls.h (THREAD_GETMEM): Mark asms volatile.
9151         (THREAD_GETMEM_NC): Likewise.
9153 2003-03-13  Ulrich Drepper  <drepper@redhat.com>
9155         * allocatestack.c (allocate_stack): If MULTI_PAGE_ALIASING is defined
9156         and the size of the stack which must be allocated is a multiple,
9157         allocate one more page.
9158         * sysdeps/i386/i686/Makefile: Don't define COLORING_INCREMENT, but
9159         MULTI_PAGE_ALIASING.
9161 2003-03-13  Roland McGrath  <roland@redhat.com>
9163         * pthread_create.c (start_thread): Set EXITING_BIT after the
9164         event-reporting (and destructors), not before.
9166 2003-03-13  Jakub Jelinek  <jakub@redhat.com>
9168         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_timed_wait,
9169         lll_futex_wake): Declare register variables as long int instead of
9170         unsigned long int.  Patch by Ian Wienand <ianw@gelato.unsw.edu.au>.
9171         Make syscall arguments clobbered by the syscall.
9172         (lll_futex_wait): Define using lll_futex_timed_wait.
9174         * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Cast regs[13]
9175         to void *.
9177         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Only declare and set
9178         PPID if [! NDEBUG].
9180         * allocatestack.c (nptl_ncreated): Only declare if
9181         COLORING_INCREMENT != 0.
9183         * pthreadP.h (__pthread_enable_asynccancel_2): New prototype.
9184         (__libc_enable_asynccancel_2): Remove prototype.
9186         * sysdeps/unix/sysv/linux/ia64/fork.c (ARCH_FORK): Swap ptid and
9187         ctid to match kernel.
9189 2003-03-12  Ulrich Drepper  <drepper@redhat.com>
9191         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add
9192         libc_multiple_threads.
9193         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Move definition of
9194         __libc_multiple_threads to...
9195         * sysdeps/unix/sysv/linux/libc_multiple_threads.c: ...here.  New file.
9197         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Remove unnecessary
9198         versioning.
9199         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
9200         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
9202         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
9203         (__pthread_once_internal): Define.
9205         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Use shlib-compat.h
9206         macros instead of .symver directly.
9207         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
9208         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
9210         * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Include tcb-offsets.h.
9211         * sysdeps/x86_64/tcb-offsets.sym: New file.
9212         * sysdeps/x86_64/Makefile: New file.
9214         * sysdeps/i386/tcb-offsets.sym: Add SELF.
9215         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use SELF
9216         to access own pthread_t in TCB.
9217         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
9218         Likewise.
9219         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
9220         Likewise.
9221         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
9223 2003-03-12  Roland McGrath  <roland@redhat.com>
9225         * pthread-errnos.sym: New file.
9226         * Makefile (gen-as-const-headers): New variable, list that file.
9227         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include generated
9228         header <pthread-errnos.h> instead of defining errno values here.
9229         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
9230         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
9231         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
9232         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
9233         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
9234         Likewise.
9235         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
9236         Likewise.
9237         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
9238         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9239         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
9240         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
9241         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
9242         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
9243         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
9244         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
9245         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
9246         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
9247         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
9248         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
9249         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
9250         * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
9251         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
9252         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
9253         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
9254         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
9255         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
9256         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
9257         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
9258         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
9259         * sysdeps/i386/i486/pthread_spin_trylock.S: Likewise.
9260         * sysdeps/x86_64/pthread_spin_trylock.S: Likewise.
9261         * sysdeps/sh/pthread_spin_trylock.S: Likewise.
9262         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
9263         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
9265         * sysdeps/unix/sysv/linux/fork.c: Add an assert to check that
9266         CLONE_CHILD_SETTID worked.
9268 2003-03-12  Ulrich Drepper  <drepper@redhat.com>
9270         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: New
9271         file.
9272         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S: New
9273         file.
9275         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
9276         (pthread_cond_t): Add padding.
9278         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: New file.
9279         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: New file.
9280         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: New file.
9282         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
9283         (__pthread_rwlock_timedwrlock): Add missing opcode suffix.
9284         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
9285         (__pthread_rwlock_timedrdlock): Likewise.
9286         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
9287         (__pthread_rwlock_wrlock): Likewise.
9288         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
9289         (__pthread_rwlock_rdlock): Likewise.
9291         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: New file.
9293         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Return
9294         result of lock re-get if it fails.
9296 2003-03-11  Ulrich Drepper  <drepper@redhat.com>
9298         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Fix asm syntax.
9299         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
9300         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
9301         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
9302         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
9303         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
9304         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
9305         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
9306         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
9307         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
9309         * sysdeps/x86_64/tls.h (THREAD_SELF, THREAD_GETMEM, THREAD_GETMEM_NC,
9310         THREAD_SETMEM, THREAD_SETMEM_NC): Correct asm syntax.
9312         * allocatestack.c [! TLS_MULTIPLE_THREADS_IN_TCB] (allocate_stack):
9313         Initialize *__libc_multiple_threads_ptr not __libc_multiple_threads.
9314         * sysdeps/pthread/createthread.c [! TLS_MULTIPLE_THREADS_IN_TCB]
9315         (create_thread): Likewise.
9316         Define __pthread_multiple_threads and __libc_multiple_threads_ptr.
9317         * init.c (__pthread_initialize_minimal_internal): Initialize
9318         __libc_multiple_threads_ptr if necessary.
9319         * pthreadP.h: Adjust prototype for __libc_pthread_init.  Declare
9320         __pthread_multiple_threads and __libc_multiple_threads_ptr.
9321         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Define
9322         __libc_multiple_threads.
9323         (__libc_pthread_init): Return pointer to __libc_pthread_init if
9324         necessary.
9326         * sysdeps/i386/tls.h (THREAD_SETMEM): Fix one-byte variant.
9327         (THREAD_SETMEM_NC): Likewise.
9329         * sysdeps/x86_64/pthread_spin_trylock.c: Removed.
9330         * sysdeps/x86_64/pthread_spin_trylock.S: New file.
9331         * sysdeps/x86_64/pthread_spin_unlock.c: Removed.
9332         * sysdeps/x86_64/pthread_spin_unlock.S: New file.
9334         * sysdeps/i386/i486/pthread_spin_trylock.S (pthread_spin_trylock):
9335         Eliminate one entire instruction.
9337         * cancellation.c (__pthread_enable_asynccancel_2): New function.
9338         * pthreadP.h: Declare __pthread_enable_asynccancel_2.
9339         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
9340         (__pthread_cond_timedwait): Use __pthread_enable_asynccancel_2
9341         instead of __pthread_enable_asynccancel.
9342         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
9343         (__pthread_cond_wait): Likewise.
9344         * sysdeps/pthread/pthread_cond_timedwait.c
9345         (__pthread_cond_timedwait): Likewise.
9346         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
9348         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
9349         (__condvar_cleanup): Wake up all waiters in case we got signaled
9350         after being woken up but before disabling asynchronous
9351         cancellation.
9352         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
9353         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
9354         (__condvar_cleanup): Likewise.
9356         * init.c (__NR_set_tid_address): If already defined, don't redefine.
9357         Make it an error if architecture has no #if case.  Add x86-64.
9359         * sysdeps/unix/sysv/linux/x86_64/Makefile: Add flags for
9360         pt-initfini.s generation.
9362         * sysdeps/x86_64/tls.h: Include <asm/prctl.h>.
9363         (TLS_INIT_TP): Fix typo.
9365 2003-03-11  Jakub Jelinek  <jakub@redhat.com>
9367         * sysdeps/ia64/bits/atomic.h (atomic_exchange_and_add): Swap 2nd and
9368         3rd argument of __arch_compare_and_exchange_{32,64}_val_acq.
9370         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Include semaphore.h.
9371         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
9372         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Likewise.
9373         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Likewise.
9374         * sysdeps/unix/sysv/linux/s390/sem_post.c: Likewise.
9375         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
9376         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
9377         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
9379 2003-03-11  Ulrich Drepper  <drepper@redhat.com>
9381         * sysdeps/pthread/pthread_cond_timedwait.c
9382         (__pthread_cond_timedwait): Return the result of the final
9383         locking.  If it succeeds, the regular function return value.
9385         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait):
9386         Return result of the final locking.
9387         * version.c (__nptl_main): Work around problems with the strange
9388         INTERNAL_SYSCALL macro on ppc32.
9389         * init.c (__pthread_initialize_minimal_internal): Unblock
9390         SIGCANCEL in case the parent blocked it.
9391         Reported by Paul Mackerras <paulus@samba.org>.
9393         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: New file.
9394         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: New file.
9395         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: New file.
9397 2003-03-11  Jakub Jelinek  <jakub@redhat.com>
9399         * sysdeps/pthread/pthread_cond_timedwait.c
9400         (__pthread_cond_timedwait): Unlock and fail if
9401         __pthread_mutex_unlock_internal failed.
9403         * sysdeps/pthread/createthread.c (ARCH_CLONE): Define if not defined.
9404         (create_thread): Only assert PD->tcb != NULL under [TLS_TCB_AT_TP].
9405         Use ARCH_CLONE.
9406         * allocatestack.c (ALLOCATE_STACK_PARMS): New macro.
9407         [NEED_SEPARATE_REGISTER_STACK] (STACK_VARIABLES,
9408         STACK_VARIABLES_ARGS, STACK_VARIABLES_PARMS, ALLOCATE_STACK_PARMS,
9409         ALLOCATE_STACK): New macros.
9410         (TLS_TPADJ): New macro.
9411         (get_cached_stack, queue_stack, __deallocate_stack): Use TLS_TPADJ.
9412         (allocate_stack): Handle TLS_DTV_AT_TP and
9413         NEED_SEPARATE_REGISTER_STACK.  Use TLS_TPADJ.
9414         * pthread_create.c (__pthread_create_2_1) [! TLS_TCB_AT_TP]:
9415         Don't set PD->self.
9416         * init.c [__ia64__] (__NR_set_tid_address): Define.
9418         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: New file.
9419         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: New file.
9420         * sysdeps/unix/sysv/linux/ia64/fork.c: New file.
9421         * sysdeps/unix/sysv/linux/ia64/createthread.c: New file.
9422         * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: New file.
9423         * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: New file.
9424         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: New file.
9425         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: New file.
9426         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: New file.
9427         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
9428         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: New file.
9429         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: New file.
9430         * sysdeps/unix/sysv/linux/ia64/sem_post.c: New file.
9431         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: New file.
9432         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: New file.
9433         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: New file.
9434         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
9435         * sysdeps/ia64/bits/atomic.h: New file.
9436         * sysdeps/ia64/Makefile: New file.
9437         * sysdeps/ia64/pthread_spin_init.c: New file.
9438         * sysdeps/ia64/pthread_spin_lock.c: New file.
9439         * sysdeps/ia64/pthread_spin_trylock.c: New file.
9440         * sysdeps/ia64/pthread_spin_unlock.c: New file.
9441         * sysdeps/ia64/pthreaddef.h: New file.
9442         * sysdeps/ia64/tcb-offsets.sym: New file.
9443         * sysdeps/ia64/td_ta_map_lwp2thr.c: New file.
9444         * sysdeps/ia64/tls.h: New file.
9446         * sysdeps/s390/pthreaddef.h (__exit_thread_inline): Pass 1 argument
9447         to syscall instead of no arguments.
9449 2003-03-10  Ulrich Drepper  <drepper@redhat.com>
9451         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: New file.
9452         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: New file.
9453         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: New file.
9454         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: New file.
9456         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Fix error value in
9457         unused code.
9459         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: New file
9461         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
9462         lowlevelbarrier.sym.
9463         * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: New file.
9464         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S:
9465         Include lowlevelbarrier.h and don't define offsets locally.
9466         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Likewise.
9468         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
9469         (__lll_mutex_lock_wait): Reverse order of first two parameters.
9470         (__lll_mutex_timedlock_wait): Likewise.
9471         (lll_mutex_lock): Adjust asm for that.
9472         (lll_mutex_timedlock): Likewise.  Mark cx, cc, r10 as clobbered.
9473         (lll_lock): Adjust asm for operand order change.
9474         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: New file.
9475         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: New file.
9477         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_lock_wait):
9478         Reverse order of parameters.
9479         (__lll_timedwait_tid): Remove regparms attribute.
9480         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: New file.
9481         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: New file.
9483         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
9484         (__lll_timedwait_tid): Remove one unnecessary instruction.
9486         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Define
9487         __lll_mutex_timedlock_wait only for NOT_IN_libc.
9488         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Include
9489         lowlevelmutex.S.
9491         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
9492         lll_unlock_wake_cb, __lll_wait_tid, and __lll_timedwait_tid only
9493         for NOT_IN_libc.
9494         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Include
9495         lowlevellock.S.
9497         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Don't define
9498         LOCK is already defined.  Don't define __lll_mutex_timedlock_wait
9499         for libc.so.
9500         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Only
9501         define LOCK here (if UP is not defined).  The actual code is in
9502         lowlevelmutex.S.
9504         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Don't define
9505         LOCK is already defined.  Don't define lll_unlock_wake_cb and
9506         __lll_timedwait_tid for libc.so.
9507         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Only
9508         define LOCK here (if UP is not defined).  The actual code is in
9509         lowlevellock.S.
9511         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Not needed anymore.
9512         * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: Likewise.
9513         * sysdeps/unix/sysv/linux/s390/sem_post.c: Include lowlevellock.h
9514         instead of lowlevelsem.h.
9515         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
9516         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
9517         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
9519         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
9520         lowlevelrwlock.sym.
9521         * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: New file.
9522         * sysdeps/unix/sysv/linux/i386/lowlevelrwlock.h: Removed.
9523         * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: Removed.
9525         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_trylock): Fix
9526         register loading.
9527         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_trylock): Undo
9528         last changed.  D'oh.
9530         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: New file.
9532         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove declaration
9533         of __libc_locking_needed.
9534         (lll_trylock): Initialize %eax to zero.
9536         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Update
9537         pthread_cond_t definition.
9539 2003-03-10  Roland McGrath  <roland@redhat.com>
9541         * sysdeps/unix/sysv/linux/lowlevelcond.sym: New file.
9542         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add it.
9543         * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: File removed.
9544         * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: Likewise.
9545         * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: Likewise.
9547         * allocatestack.c (allocate_stack) [!TLS_MULTIPLE_THREADS_IN_TCB]:
9548         Instead of setting PD->multiple_threads, set globals
9549         __pthread_multiple_threads and __libc_multiple_threads.
9550         * sysdeps/pthread/createthread.c (create_thread): Likewise.
9551         * sysdeps/i386/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it.
9552         * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Likewise.
9554         * descr.h (struct pthread): Conditionalize first member on
9555         [!TLS_DTV_AT_TP].  Replace the `header' member with an anonymous union
9556         containing an anonymous tcbhead_t.  Move `list' member out.
9557         [TLS_MULTIPLE_THREADS_IN_TCB]: Define a `multiple_threads' member.
9558         * allocatestack.c: Remove use of `header.data.' prefix.
9559         * pthread_create.c: Likewise.
9560         * init.c (__pthread_initialize_minimal_internal): Likewise.
9561         * sysdeps/pthread/createthread.c (create_thread): Likewise.
9562         * sysdeps/i386/tls.h (INSTALL_DTV): Add parens.
9563         (THREAD_SELF, THREAD_DTV, INSTALL_NEW_DTV): No `header.data.' prefix.
9564         * sysdeps/x86_64/tls.h: Likewise.
9565         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
9566         (SINGLE_THREAD_P): Likewise.
9567         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
9568         (SINGLE_THREAD_P): Likewise.
9569         * sysdeps/i386/tls.h (tcbhead_t): Remove `list' member.
9570         * sysdeps/s390/tls.h (tcbhead_t): Likewise.
9572 2003-03-09  Ulrich Drepper  <drepper@redhat.com>
9574         * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: New file.
9576         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
9577         * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
9579         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix many
9580         leftovers from the ia32 code.
9582         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Remove unneccessary
9583         memory load.
9584         (clear_once_control): Don't load %esi.
9586         * sysdeps/x86_64/tls.h: Remove all traces of segment descriptor
9587         handling.
9589         * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
9591         * sysdeps/unix/sysv/linux/s390/createthread.c: Moved to...
9592         * sysdeps/unix/sysv/linux/createthread.c: ...here.
9594         * Makefile (tests): Add tst-cond10.
9595         * tst-cond10.c: New file.
9597 2003-03-08  Ulrich Drepper  <drepper@redhat.com>
9599         * tst-tls2.c (do_test): Add TEMP_FAILURE_RETRY around sem_wait call.
9600         * tst-signal3.c (do_test): Likewise.
9601         * tst-sem5.c (do_test): Likewise.
9602         * tst-kill6.c (do_test): Likewise.
9603         * tst-tls3.c (do_test): Likewise.  Include <errno.h>.
9605         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use add/sub instead
9606         of inc/dec.
9607         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
9608         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise
9609         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
9610         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
9611         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
9612         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
9613         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
9614         Likewise.
9615         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
9616         Likewise.
9617         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
9618         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
9619         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9620         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
9621         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
9622         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
9623         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
9624         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
9626         * allocatestack.c (allocate_stack): If mprotect() fails free the
9627         TLS memory.
9629 2003-03-07  Ulrich Drepper  <drepper@redhat.com>
9631         * sysdeps/i386/i486/bits/atomic.h: Fix a few unused definitions.
9633         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove all trace of
9634         lll_wake_tid.  This was used only to work around kernel limits in
9635         the early days.
9636         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
9637         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Likewise.
9638         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
9639         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
9641         * init.c (__static_tls_align_m1): Renamed from __static_tls_align.
9642         (__pthread_initialize_minimal_internal): Change initialization of
9643         __static_tls_align_m1 appropriately.
9644         * pthreadP.h (__static_tls_align_m1): Renamed from
9645         __static_tls_align.
9646         * allocatestack.c (allocate_stack): Use __static_tls_align_m1
9647         instead of __static_tls_align-1.
9649 2003-03-04  Ulrich Drepper  <drepper@redhat.com>
9651         * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
9653         * pthread_create.c: Define __pthread_keys using nocommon
9654         attribute, not by placing it explicitly in bss.
9655         Remove DEFINE_DEALLOC definition.  Not needed anymore.
9657         * allocatestack.c: Define ARCH_MAP_FLAGS if not already defined.
9658         Use it in mmap call to allocate stacks.
9660         * sysdeps/pthread/createthread.c (create_thread): Fix comment.
9662         * pthread_create.c (start_thread): Use THREAD_SETMEM to store
9663         result of the thread function.
9665 2003-03-03  Ulrich Drepper  <drepper@redhat.com>
9667         * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: Removed.  The generic
9668         version is just fine.
9670         * sysdeps/unix/sysv/linux/libc_pthread_init.c
9671         (__pthread_child_handler): Renamed from pthread_child_handler,
9672         exported, and marked hidden.  Change all users.
9673         * sysdeps/unix/sysv/linux/register-atfork.c (free_mem): Do not
9674         free __pthread_child_handler from child list.
9676 2003-03-03  Martin Schwidefsky  <schwidefsky@de.ibm.com>
9678         * atomic.h (atomic_exchange_and_add): Return newval, not oldval.
9680         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
9681         Fix handling of cancellation and failing pthread_mutex_unlock call.
9682         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
9683         (__pthread_cond_wait): Likewise.
9685         * sysdeps/pthread/pthread_rwlock_timedrdlock.c
9686         (pthread_rwlock_timedrdlock): Fix clobber of result variable by
9687         lll_futex_timed_wait call.
9688         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
9689         (pthread_rwlock_timedwrlock): Likewise.
9691         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
9692         Don't define lll_unlock_wake_cb and ___lll_timedwait_tid in libc.so.
9693         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Remove XXX comments.
9695         * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Fix
9696         check of lll_futex_wake return value.
9698 2003-03-03  Roland McGrath  <roland@redhat.com>
9700         * forward.c: Fix typo in __pthread_attr_init_2_0 compat_symbol decl.
9702         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
9703         Argument to ptr___pthread_cleanup_upto is __jmp_buf, not jmp_buf.
9704         * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
9706 2003-03-02  Ulrich Drepper  <drepper@redhat.com>
9708         * sysdeps/pthread/timer_create.c (timer_create): Return correct
9709         error for CPU clocks.
9711         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
9712         _POSIX_MONOTONIC_CLOCK.
9713         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
9715         * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
9716         recent kernels.
9718 2003-03-01  Ulrich Drepper  <drepper@redhat.com>
9720         * descr.h (struct pthread): Move cleanup field to the front.
9722 2003-03-01  Roland McGrath  <roland@redhat.com>
9724         * sem_open.c (sem_open): Braino fix.
9726 2003-03-01  Ulrich Drepper  <drepper@redhat.com>
9728         * sysdeps/i386/tcb-offsets.sym: Add CLEANUP and CLEANUP_PREV.
9729         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Inline
9730         __pthread_cleanup_pop functionality.
9731         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9733         * descr.h (struct pthread): Move tid field to the front now that
9734         it is often used.
9736         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S
9737         (__lll_mutex_timedlock_wait): Remove.
9738         (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
9739         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
9740         (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
9741         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
9742         (lll_unlock_wake_cb): Don't save and restore %esi.
9743         (__lll_unlock_wake): Add alignment.  Don't save, load, and restore
9744         %esi.
9745         (__lll_timedwait_tid): Add alignment.
9746         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
9747         (__lll_unlock_wake): Add alignment.  Don't save, load, and restore
9748         %esi.
9749         (__lll_timedwait_tid): Removed.
9750         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
9751         (__pthread_cond_broadcast): Don't save, load, and restore %esi.
9752         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
9753         (pthread_barrier_wait): Don't save, load, and restore %esi for
9754         last thread.
9755         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
9756         (__pthread_cond_signal): Don't save, load, and restore %esi.
9757         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
9758         (__pthread_rwlock_unlock): Don't save, load, and restore %esi.
9759         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
9760         Don't save, load, and restore %esi.
9762 2003-02-27  Ulrich Drepper  <drepper@redhat.com>
9764         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
9765         Release lock before waking up the waiters.
9767         * tst-exit1.c (do_test): Don't start more than one thread in parallel.
9769         * tst-rwlock9.c (writer_thread): Correct adding TIMEOUT.
9770         (reader_thread): Likewise.
9772         * sysdeps/pthread/pthread_rwlock_unlock.c
9773         (__pthread_rwlock_unlock): Release internal lock early.  Don't try
9774         to wake up readers if there are none.
9776         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
9777         Release internal lock before wake threads.
9779 2003-02-26  Ulrich Drepper  <drepper@redhat.com>
9781         * Makefile (tests): Add tst-rwlock10 and tst-rwlock11.
9782         * tst-rwlock8.c: Initialize lock with INIT.  Allow INIT to be
9783         predefined.
9784         * tst-rwlock9.c: Likewise.
9785         * tst-rwlock10.c: New file.
9786         * tst-rwlock11.c: New file.
9788         * Makefile (tests): Add tst-dlsym1.
9789         * tst-dlsym1.c: New file.
9791         * init.c (__pthread_initialize_minimal_internal): Set
9792         GL(dl_error_catch_tsd) to __libc_dl_error_tsd.
9793         * Versions (libc:GLIBC_PRIVATE): Export __libc_dl_error_tsd.
9795 2003-02-24  Ulrich Drepper  <drepper@redhat.com>
9797         * sem_open.c (sem_open): Fix handling of O_CREAT without O_EXCL.
9799         * tst-cond2.c: Fix sychronization with child.
9801         * tst-rwlock8.c (reader_thread): Remove unused variable.
9803         * Makefile: Add rules to build and run tst-tls3.
9804         * tst-tls3.c: New file.
9805         * tst-tls3mod.c: New file.
9807         * Makefile (tests): Add tst-rwlock8 and tst-rwlock9.
9808         * tst-rwlock8.c: New file.
9809         * tst-rwlock9.c: New file.
9810         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Fix
9811         complete broken rwlock implementation.
9812         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
9813         Likewise.
9814         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
9815         Likewise.
9816         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
9817         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
9818         * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
9819         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
9820         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
9821         * sysdeps/pthread/pthread_rwlock_unlock.c: Likewise.
9822         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
9824 2003-02-23  Roland McGrath  <roland@redhat.com>
9826         * Makefile (nptl-version): Change regexp so case sensitivity is ok.
9828 2003-02-23  Ulrich Drepper  <drepper@redhat.com>
9830         * Makefile (tests): Add tst-context1.
9831         * tst-context1.c: New file.
9833         * Makefile (tests): Add tst-tls1 and tst-tls2.
9834         * tst-tls1.c: New file.
9835         * tst-tls2.c: New file.
9837         * libc-cancellation.c (__libc_enable_asynccancel): Correct test
9838         for failed cmpxchg.
9840         * pthread_create.c (start_thread): Set EXITING_BIT early.
9842         * sysdeps/i386/tls.h (THREAD_GETMEM): Mark asm as volatile.
9843         (THREAD_GETMEM_NC): Likewise.
9845 2003-02-22  Ulrich Drepper  <drepper@redhat.com>
9847         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Shave
9848         off 3 more bytes by using offset-less instructions when possible.
9850         * Makefile: Add dependency for $(objpfx)version.d.
9852         * eintr.c (eintr_source): Add unnecessary return but the compiler
9853         insists.
9855         * tst-kill3.c: Include <unistd.h>.
9857 2003-02-21  Roland McGrath  <roland@redhat.com>
9859         * pthread_create.c (start_thread): Call __libc_thread_freeres.
9861 2003-02-21  Ulrich Drepper  <drepper@redhat.com>
9863         * Makefile (tests): Add tst-eintr1.
9864         (distribute): Add eintr.c.
9865         * tst-eintr1.c: New file.
9866         * eintr.c: New file.
9868         * pthread_cancel.c (pthread_cancel): Use tkill directly.
9870         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill):
9871         Disallow sending SIGCANCEL.
9873         * Makefile (tests): Remove tst-basic7.  Add tst-kill1, tst-kill2,
9874         tst-kill3, tst-kill4, tst-kill5, tst-kill6.
9875         * tst-kill1.c: New file.
9876         * tst-kill2.c: New file.
9877         * tst-kill3.c: New file.
9878         * tst-kill5.c: New file.
9879         * tst-kill6.c: New file.
9880         * tst-basic7.c: Renamed to...
9881         * tst-kill4.c: ...this.
9883 2003-02-21  Roland McGrath  <roland@redhat.com>
9885         * Makefile (install-lib-ldscripts): New variable.
9887 2003-02-21  Ulrich Drepper  <drepper@redhat.com>
9889         * pthreadP.h: Define INVALID_TD_P and INVALID_NOT_TERMINATED_TD_P.
9890         * pthread_cancel.c: Use INVALID_TD_P.
9891         * pthread_detach.c: Likewise.
9892         * pthread_getschedparam.c: Likewise.
9893         * pthread_setschedparam.c: Likewise.
9894         * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
9895         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
9896         * pthread_join.c: Use INVALID_NOT_TERMINATED_TD_P.
9897         * pthread_timedjoin.c: Likewise.
9899         * tst-basic7.c: Include <signal.h>.
9901         * pthread_join.c (pthread_join): Limited checking for invalid
9902         descriptors.
9903         * pthread_timedjoin.c (pthread_timedjoin_np): Likewise.
9905 2003-02-20  Ulrich Drepper  <drepper@redhat.com>
9907         * pthread_create.c (deallocate_tsd): Reset found_nonzero at the
9908         beginning of the loop.  Clear the entire first block of TSD.
9909         * Makefile (tests): Add tst-key4.
9910         * tst-key4.c: New file.
9912 2003-02-18  Ulrich Drepper  <drepper@redhat.com>
9914         * Makefile (tests): Add tst-basic7.
9915         * tst-basic7.c: New file.
9917         * pthread_create.c (deallocate_tsd): Mark as internal_function.
9918         Add some more __builtin_expect.
9920         * pthreadP.h: Define dummy version of DEBUGGING_P.
9922 2003-02-17  Ulrich Drepper  <drepper@redhat.com>
9924         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remnove
9925         _POSIX_THREAD_PRIORITY_SCHEDULING.
9926         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
9927         _XOPEN_REALTIME_THREADS.
9928         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
9930         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): The
9931         kernel returns EINVAL for PID <= 0, work around it.
9933         * Makefile (tests): Add tst-signal5.
9934         * tst-signal5.c: New file.
9936         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
9937         and LOGIN_NAME_MAX.
9939         * tst-cancel1.c (tf): Block all signals.
9941         * Makefile (tests): Add tst-basic6.
9942         * tst-basic6.c: New file.
9944         * tst-basic1.c: Add test for process ID.
9946         * Makefile (tests): Add tst-cancel10.
9947         * tst-cancel10.c: New file.
9949         * Makefile (tests): Add tst-signal4.
9950         * tst-signal4.c: New file.
9952         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use
9953         __sigismember instead of sigismember.  Add __builtin_expect.
9955 2003-02-16  Ulrich Drepper  <drepper@redhat.com>
9957         * tst-attr1.c (do_test): Add tests for pthread_setcanceltype,
9958         pthread_setcancelstate, and pthread_rwlock_setpshared.
9960         * tst-cancel7.c (do_test): Make sure the pid file exists before
9961         canceling the thread.
9963         * tst-rwlock6.c: More pthread_rwlock_timedwrlock and
9964         pthread_rwlock_timedrdlock tests.
9965         * tst-rwlock7.c: More pthread_rwlock_timedwrlock tests.
9966         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
9967         Check for invalid tv_nsec field.
9968         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
9969         Likewise.
9971         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Protect
9972         recursive mutex of overflow.
9974         * tst-attr1.c (do_test): Add test for pthread_mutexattr_setpshared.
9976         * libc-cancellation.c (__libc_enable_asynccancel): Rewrite to avoid
9977         going into an endless loop.
9978         * Makefile (tests): Add tst-cancel9.
9979         * tst-cancel9.c: New file.
9981         * pthread_cancel.c (pthread_cancel): Use the result of __pthread_kill.
9983 2003-02-15  Ulrich Drepper  <drepper@redhat.com>
9985         * tst-mutex5.c (do_test): Add more timedlock tests.
9987         * tst-mutex2.c: Tests of trylock and unlock with ERROR mutexes.
9988         * tst-mutex3.c (do_test): Add tests for trylock with RECURSIVE mutexes.
9990         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
9991         use INLINE_SYSCALL.  Error number is returned, not -1.
9993         * pthreadP.h: Mark declarations of __find_in_stack_list, __free_tcb,
9994         and __deallocate_stack with internal_function.
9995         * pthread_create.c: Adjust definitions appropriately.
9996         * allocatestack.c: Likewise.
9998         * pthread_join.c: Add one more __builtin_expect.
9999         * pthread_timedjoin.c: Likewise.
10001         * pthread_getspecific.c (__pthread_getspecific): Clear data->data
10002         not data of sequence number does not match.
10003         Add one __builtin_expect.
10005         * Makefile (tests): Add tst-clock1.
10006         * tst-clock1.c: New file.
10008         * pthread_setconcurrency.c (pthread_setconcurrency): Fail for
10009         negative arguments.
10010         * Makefile (tests): Add tst-basic5.
10011         * tst-basic5.c: New file.
10013 2003-02-14  Ulrich Drepper  <drepper@redhat.com>
10015         * Makefile (tests): Add tst-basic4.
10016         * tst-basic4.c: New file.
10018         * pthreadP.h: Add declaraction for __nptl_nthreads.
10019         * pthread_create.c: Define __nptl_nthreads
10020         (start_thread): Increment __nptl_nthreads at beginning.  Decrement
10021         after thread is done.  If then zero, call exit(0).
10022         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
10023         Add ptr_nthreads.  Define HAVE_PTR_NTHREADS.
10024         * init.c (pthread_functions): Initialize ptr_nthreads.
10025         * allocatestack.c (nptl_nthreads): Remove definition and all uses.
10026         (__reclaim_stacks): Decrement __nptl_nthreads.
10027         * sysdeps/pthread/Makefile [$(subdir)==csu] (CFLAGS-libc-start.c):
10028         Define.
10029         * Makefile (tests): Add tst-basic3.
10030         * tst-basic3.c: New file.
10032         * descr.h: Define CANCELING_BIT and CANCELING_BITMASK.  Introduce
10033         after CANCELTYPE_BIT, move the other bits up.  Update CANCEL_RESTMASK.
10034         * init.c (sigcancel_handler): Also set CANCELING_BITMASK bit in newval.
10035         * pthread_cancel.c (pthread_cancel): Likewise.  Also set CANCELING_BIT
10036         if asynchronous canceling is enabled.
10037         * pthread_join.c (pthread_join): When recognizing circular joins,
10038         take into account the other thread might be already canceled.
10039         * Makefile (tests): Add tst-join5.
10040         * tst-join5.c: New file.
10042         * Makefile (tests): Add tst-join4.
10043         * tst-join4.c: New file.
10045 2003-02-13  Ulrich Drepper  <drepper@redhat.com>
10047         * tst-cond4.c (main): Add test of pthread_attr_getpshared.
10049 2003-02-13  Martin Schwidefsky  <schwidefsky@de.ibm.com>
10051         * sysdeps/s390/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM,
10052         THREAD_SETMEM_NC): Use passed descr instead of THREAD_SELF.
10053         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind): Avoid
10054         warning.
10055         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Include <sys/time.h>
10056         to avoid warning.
10057         * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Return
10058         error if lll_futex_wake failed.
10060 2003-02-13  Ulrich Drepper  <drepper@redhat.com>
10062         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Fix
10063         handling of cancellation and failung pthread_mutex_unlock call.
10064         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10065         * Makefile (tests): Add tst-cond8 and tst-cond9.
10066         * tst-cond8.c: New file.
10067         * tst-cond9.c: New file.
10069         * tst-cond7.c (do_test): Unlock the mutex before canceling the thread.
10071         * sysdeps/pthread/pthread.h: Add missing initializers.  Protect
10072         non-standard initializers with __USE_GNU.
10074         * Makefile (tests): Add tst-cleanup3.
10075         * tst-cleanup3.c: New file.
10077 2003-02-12  Ulrich Drepper  <drepper@redhat.com>
10079         * Makefile (tests): Add tst-attr1 and tst-attr2.
10080         * tst-attr1.c: New file.
10081         * tst-attr2.c: New file.
10083         * Makefile: Add rules to build and run tst-atfork2 test.
10084         * tst-atfork2.c: New file.
10085         * tst-atfork2mod.c: New file.
10087         * sysdeps/unix/sysv/linux/unregister-atfork.c
10088         (__unregister_atfork): Free the memory allocated for the handlers
10089         after removing them from the lists.
10091         * sysdeps/unix/sysv/linux/register-atfork.c: Define memeory
10092         cleanup function.
10094         * tst-atfork1.c (do_test): Wait for the child we forked.
10095         Report error in child.
10097         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Fix comment.
10099         * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
10101 2003-02-10  Ulrich Drepper  <drepper@redhat.com>
10103         * Makefile (tests): Add tst-cancel8.
10104         * tst-cancel8.c: New file.
10106         * sysdeps/unix/sysv/linux/i386/pthread_once.S (clear_once_control): Fix
10107         clearing of control variable.
10108         * Makefile (tests): Add tst-once3 and tst-once4.
10109         * tst-once3.c: New file.
10110         * tst-once4.c: New file.
10112 2003-02-08  kaz Kojima  <kkojima@rr.iij4u.or.jp>
10114         * sysdeps/sh/Makefile: New file.
10115         * sysdeps/sh/bits/atomic.h: New file.
10116         * sysdeps/sh/pthread_spin_init.c: New file.
10117         * sysdeps/sh/pthread_spin_lock.c: New file.
10118         * sysdeps/sh/pthread_spin_trylock.S: New file.
10119         * sysdeps/sh/pthread_spin_unlock.S: New file.
10120         * sysdeps/sh/pthreaddef.h: New file.
10121         * sysdeps/sh/tcb-offsets.sym: New file.
10122         * sysdeps/sh/td_ta_map_lwp2thr.c: New file.
10123         * sysdeps/sh/tls.h: New file.
10124         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: New file.
10125         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: New file.
10126         * sysdeps/unix/sysv/linux/sh/createthread.c: New file.
10127         * sysdeps/unix/sysv/linux/sh/fork.c: New file.
10128         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: New file.
10129         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: New file.
10130         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h: New file.
10131         * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: New file.
10132         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: New file.
10133         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: New file.
10134         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: New file.
10135         * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: New file.
10136         * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
10137         * sysdeps/unix/sysv/linux/sh/pt-vfork.S: New file.
10138         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: New file.
10139         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: New file.
10140         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: New file.
10141         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: New file.
10142         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: New file.
10143         * sysdeps/unix/sysv/linux/sh/pthread_once.S: New file.
10144         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: New file.
10145         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: New file.
10146         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: New file.
10147         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: New file.
10148         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: New file.
10149         * sysdeps/unix/sysv/linux/sh/sem_post.S: New file.
10150         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: New file.
10151         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: New file.
10152         * sysdeps/unix/sysv/linux/sh/sem_wait.S: New file.
10153         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
10155 2003-02-08  Ulrich Drepper  <drepper@redhat.com>
10157         * tst-cond2.c: Rearrange code to not rely on behavior undefined
10158         according to POSIX.
10160         * tst-basic2.c (do_test): Lock mutex before creating the thread.
10162 2003-02-07  Ulrich Drepper  <drepper@redhat.com>
10164         * sysdeps/x86_64/tls.h: Remove unnecessary macros, left over from x86.
10165         (TLS_GET_FS): New #define.
10166         (TLS_SET_FS): New #define.
10167         Correct value of __NR_set_thread_area.
10169         * sysdeps/x86_64/td_ta_map_lwp2thr.c: New file.
10171 2003-02-06  Ulrich Drepper  <drepper@redhat.com>
10173         * Makefile (tests): Add tst-popen1.
10174         * tst-popen1.c: New file.
10176         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Remove wrong
10177         but inactive generalization.
10178         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10179         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
10180         Minor optimization, remove one instruction.
10181         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
10183 2003-02-04  Martin Schwidefsky  <schwidefsky@de.ibm.com>
10185         * sysdeps/unix/sysv/linux/s390/fork.c: Correct order of parameters.
10187 2003-01-31  Martin Schwidefsky  <schwidefsky@de.ibm.com>
10189         * init.c (__NR_set_tid_address): Add #ifdef for s390.
10190         * sysdeps/pthread/pthread_barrier_wait.c: New file.
10191         * sysdeps/pthread/pthread_cond_broadcast.c: New file.
10192         * sysdeps/pthread/pthread_cond_signal.c: New file.
10193         * sysdeps/pthread/pthread_cond_timedwait.c: New file.
10194         * sysdeps/pthread/pthread_cond_wait.c: New file.
10195         * sysdeps/pthread/pthread_rwlock_rdlock.c: New file.
10196         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: New file.
10197         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: New file.
10198         * sysdeps/pthread/pthread_rwlock_unlock.c: New file.
10199         * sysdeps/pthread/pthread_rwlock_wrlock.c: New file.
10200         * sysdeps/s390/Makefile: New file.
10201         * sysdeps/s390/bits/atomic.h: New file.
10202         * sysdeps/s390/pthread_spin_init.c: New file.
10203         * sysdeps/s390/pthread_spin_lock.c: New file.
10204         * sysdeps/s390/pthread_spin_trylock.c: New file.
10205         * sysdeps/s390/pthread_spin_unlock.c: New file.
10206         * sysdeps/s390/pthreaddef.h: New file.
10207         * sysdeps/s390/tcb-offsets.sym: New file.
10208         * sysdeps/s390/td_ta_map_lwp2thr.c: New file.
10209         * sysdeps/s390/tls.h: New file.
10210         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: New file.
10211         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: New file.
10212         * sysdeps/unix/sysv/linux/s390/createthread.c: New file.
10213         * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: New file.
10214         * sysdeps/unix/sysv/linux/s390/fork.c: New file.
10215         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: New file.
10216         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
10217         * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: New file.
10218         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: New file.
10219         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: New file.
10220         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: New file.
10221         * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: New file.
10222         * sysdeps/unix/sysv/linux/s390/pthread_once.c: New file.
10223         * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: New file.
10224         * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: New file.
10225         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
10226         * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
10227         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: New file.
10228         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
10229         * sysdeps/unix/sysv/linux/s390/sem_post.c: New file.
10230         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: New file.
10231         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
10232         * sysdeps/unix/sysv/linux/s390/sem_wait.c: New file.
10234 2003-02-04  Ulrich Drepper  <drepper@redhat.com>
10236         * atomic.h: Add a couple more default implementations.
10237         (atomic_compare_and_exchange_acq): Use
10238         __arch_compare_and_exchange_32_acq in return value definition.  It
10239         always exists.
10240         (atomic_bit_set): Renamed from atomic_set_bit.
10241         Add missing atomic_ prefixes.
10243         * sysdeps/pthread/bits/libc-lock.h (__libc_once): In case no
10244         thread library is available, use correct value to mark initialized
10245         once variable.
10247 2003-02-03  Ulrich Drepper  <drepper@redhat.com>
10249         * allocatestack.c (allocate_stack): Use __getpagesize instead of
10250         __sysconf to determine pagesize.
10252         * pthread_create.c: Include <atomic.h>.
10253         * allocatestack.c (allocate_stack): Implement coloring of the
10254         allocated stack memory.  Rename pagesize to pagesize_m1.  It's the
10255         size minus one.  Adjust users.
10256         * sysdeps/i386/i686/Makefile: New file.
10258 2003-02-02  Ulrich Drepper  <drepper@redhat.com>
10260         * allocatestack.c: Improve comment throughout the file.
10262         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
10263         (__lll_lock_wait): Add branch prediction.
10264         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
10265         (__lll_lock_wait): Likewise.
10266         (lll_unlock_wake_cb): Removed.
10268 2003-01-31  Ulrich Drepper  <drepper@redhat.com>
10270         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Remove
10271         _POSIX_THREAD_PRIORITY_SCHEDULING.
10273 2003-01-30  Jakub Jelinek  <jakub@redhat.com>
10275         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
10276         Fix return type of ptr___pthread_getspecific.
10278 2003-01-29  Ulrich Drepper  <drepper@redhat.com>
10280         * Makefile (tests): Add tst-umask1.
10281         (tst-umask1-ARGS): Define.
10282         * tst-umask1.c: New file.
10284 2003-01-28  Ulrich Drepper  <drepper@redhat.com>
10286         * Makefile (libpthread-routines): Remove lowlevelrwlock.  Add
10287         pthread_rwlock_rdlock, pthread_rwlock_timedrdlock,
10288         pthread_rwlock_wrlock, pthread_rwlock_timedwrlock, and
10289         pthread_rwlock_unlock.
10290         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Removed
10291         * sysdeps/unix/sysv/linux/i386/i586/lowlevelrwlock.S: Removed
10292         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Removed
10293         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: New file.
10294         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
10295         New file.
10296         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: New file.
10297         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
10298         New file.
10299         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: New file.
10300         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_rdlock.S: New file.
10301         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedrdlock.S:
10302         New file.
10303         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_wrlock.S: New file.
10304         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedwrlock.S:
10305         New file.
10306         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_unlock.S: New file.
10307         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_rdlock.S: New file.
10308         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedrdlock.S:
10309         New file.
10310         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_wrlock.S: New file.
10311         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedwrlock.S:
10312         New file.
10313         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_unlock.S: New file.
10315         * Makefile (libpthread-routines): Remove lowlevelcond and
10316         lowlevelsem.  Add sem_wait, sem_trywait, sem_timedwait, sem_post,
10317         pthread_cond_wait, pthread_cond_timedwait, pthread_cond_signal,
10318         and pthread_cond_broadcast.
10319         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Removed
10320         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Removed
10321         * sysdeps/unix/sysv/linux/i386/i586/lowlevelsem.S: Removed
10322         * sysdeps/unix/sysv/linux/i386/i586/lowlevelcond.S: Removed
10323         * sysdeps/unix/sysv/linux/i386/i686/lowlevelsem.S: Removed
10324         * sysdeps/unix/sysv/linux/i386/i686/lowlevelcond.S: Removed
10325         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: New file.
10326         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: New file.
10327         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: New file.
10328         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: New file.
10329         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: New file.
10330         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: New file.
10331         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: New file.
10332         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: New file.
10333         * sysdeps/unix/sysv/linux/i386/i586/sem_wait.S: New file.
10334         * sysdeps/unix/sysv/linux/i386/i586/sem_trywait.S: New file.
10335         * sysdeps/unix/sysv/linux/i386/i586/sem_timedwait.S: New file.
10336         * sysdeps/unix/sysv/linux/i386/i586/sem_post.S: New file.
10337         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_wait.S: New file.
10338         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_timedwait.S: New file.
10339         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_signal.S: New file.
10340         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_broadcast.S: New file.
10341         * sysdeps/unix/sysv/linux/i386/i686/sem_wait.S: New file.
10342         * sysdeps/unix/sysv/linux/i386/i686/sem_trywait.S: New file.
10343         * sysdeps/unix/sysv/linux/i386/i686/sem_timedwait.S: New file.
10344         * sysdeps/unix/sysv/linux/i386/i686/sem_post.S: New file.
10345         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_wait.S: New file.
10346         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S: New file.
10347         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_signal.S: New file.
10348         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_broadcast.S: New file.
10349         * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: New file.
10351         * sysdeps/unix/sysv/linux/i386/createthread.c: Define
10352         PREPARE_CREATE and TLS_VALUE with x86-specific bits.  All the rest
10353         of the code is moved to ...
10354         * sysdeps/pthread/createthread.c: ...here.  New file.
10356 2003-01-27  Ulrich Drepper  <drepper@redhat.com>
10358         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S
10359         (__new_sem_post): Clear %eax before returning.
10360         Reported by MAEDA Naoaki <maeda.naoaki@jp.fujitsu.com>.
10362         * Makefile (tests): Add tst-cleanup2.
10363         * tst-cleanup2.c: New file.
10365         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
10366         Interpret first parameter correctly.
10368 2003-01-17  Ulrich Drepper  <drepper@redhat.com>
10370         * Makefile (headers): Add bits/semaphore.h.
10372 2003-01-16  Jakub Jelinek  <jakub@redhat.com>
10374         * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize _head->sysinfo even
10375         if not SHARED.
10377 2003-01-14  Ulrich Drepper  <drepper@redhat.com>
10379         * sem_open.c (sem_open): Return SEM_FAILED if existing semaphore
10380         must be used and mapping failed.
10381         Reported by Luke Elliott <luke.elliott@activfinancial.com>.
10383         * Makefile (CFLAGS-pthread_self.os): Define this, not
10384         CFLAGS-pthread_self.c.
10386 2003-01-13  Ulrich Drepper  <drepper@redhat.com>
10388         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Don't export
10389         lll_unlock_wake_cb.
10391         * Makefile (libpthread-routines): Add version.  Add rules to build
10392         version.os and banner.h.
10393         * version.c: New file.
10395 2003-01-13  Jakub Jelinek  <jakub@redhat.com>
10397         * pthread_mutex_lock.c (__pthread_mutex_lock_internal): Make
10398         the alias unconditional.
10399         * pthread_mutex_unlock.c  (__pthread_mutex_unlock_internal): Likewise.
10401 2003-01-13  Ulrich Drepper  <drepper@redhat.com>
10403         * Makefile (CFLAGS-pthread_self.c): New definition.
10405 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
10407         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Add
10408         INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
10409         * sysdeps/unix/sysv/linux/raise.c (raise): Likewise.
10410         * init.c (__pthread_initialize_minimal_internal): Likewise.
10412 2003-01-07  Jakub Jelinek  <jakub@redhat.com>
10414         * pthreadP.h (__pthread_cond_timedwait): Add prototype.
10416         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
10417         (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
10418         (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
10419         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
10420         (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
10421         (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
10423 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
10425         * pthreadP.h (LIBC_CANCEL_HANDLED): Define.
10426         * pt-system.c (LIBC_CANCEL_HANDLED): Add.
10427         * tst-cancel-wrappers.sh: Remove all exceptions.
10429 2003-01-05  Ulrich Drepper  <drepper@redhat.com>
10431         * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
10432         features.  Reported by Marijn Ros <marijn@mad.scientist.com>.
10434         * sysdeps/unix/sysv/linux/jmp-unwind.c: Include <pthread-functions.h>.
10435         Use __libc_pthread_functions array if SHARED.
10437         * pthreadP.h: Move pthread_cond_2_0_t definition to...
10438         * sysdeps/unix/sysv/linux/internaltypes.h: ...here.
10440         * sysdeps/pthread/bits/libc-lock.h (__libc_ptf_call): New #define.
10441         (__libc_rwlock_rdlock, __libc_rwlock_wrlock, __libc_rwlock_unlock,
10442         __libc_key_create, __libc_getspecific, __libc_setspecific): Use
10443         __libc_ptf_call instead of __libc_maybe_call.
10444         (PTF): New #define.
10445         (__libc_cleanup_region_start): Wrap function name with PTF call.
10446         (__libc_cleanup_region_end): Likewise.
10447         (__libc_cleanup_end): Likewise.
10449         * pthread_getspecific.c: Add __pthread_getspecific_internal alias.
10450         * pthread_setspecific.c: Add __pthread_setspecific_internal alias.
10451         * pthread_key_create.c: Add __pthread_key_create_internal alias.
10452         * pthreadP.h: Add prototypes.
10454         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Add
10455         __pthread_rwlock_rdlock, __pthread_rwlock_wrlock, and
10456         __pthread_rwlock_unlock aliases.
10457         * pthreadP.h: Add prototypes for new aliases.
10459         * pthreadP.h (struct pthead_functions): Moved to...
10460         * sysdeps/pthread/pthread-functions.h: ...here.  New file.
10461         * init.c (pthread_functions): Add initializers for new elements.
10463         * cleanup_defer.c: Add __pthread_cleanup_push_defer and
10464         __pthread_cleanup_pop_restore aliases.
10465         * pthreadP.h: Add prototypes.
10467         * cleanup.c: Rename _GI_pthread_cleanup_push to __pthread_cleanup_push
10468         and _GI_pthread_cleanup_pop to __pthread_cleanup_pop.
10469         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Adjust caller.
10470         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
10471         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
10472         * pthreadP.h: Adjust prototypes and callers.
10474 2003-01-04  Ulrich Drepper  <drepper@redhat.com>
10476         * Makefile (tests): Add tst-cancel7.
10477         (tst-cancel7-ARGS): New variable.
10478         * tst-cancel7.c: New file.
10480         * old_pthread_cond_broadcast.c: Optimize initialization a bit to work
10481         around gcc defficiencies.
10482         * old_pthread_cond_signal.c: Likewise.
10483         * old_pthread_cond_timedwait.c: Likewise.
10484         * old_pthread_cond_wait.c: Likewise.
10486         * pthreadP.h (pthread_cond_2_0_t): Remove unneeded lock element.
10488 2003-01-03  Ulrich Drepper  <drepper@redhat.com>
10490         * Makefile (tests): Add tst-cond7.
10491         * tst-cond7.c: New file.
10493         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
10494         (condvar_cleanup): Get condvar address from the right place.
10496         * atomic.h: Correct definitions of atomic_full_barrier,
10497         atomic_read_barrier, atomic_write_barrier.
10499         * old_pthread_cond_broadcast.c: Make memory allocate and initialization
10500         race-free.
10501         * old_pthread_cond_signal.c: Likewise.
10502         * old_pthread_cond_timedwait.c: Likewise.
10503         * old_pthread_cond_wait.c: Likewise.
10505 2003-01-03  Jakub Jelinek  <jakub@redhat.com>
10507         * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
10509 2003-01-03  Ulrich Drepper  <drepper@redhat.com>
10511         * pthreadP.h (pthread_cond_2_0_t): New type.
10512         (struct pthread_functions): Use new type for 2.0 condvar callbacks.
10513         Use new type for the 2.0 condvar function prototypes.
10514         * forward.c: Use pthread_cond_2_0_t for 2.0 condvar functions.
10515         * old_pthread_cond_init.c: Use pthread_cond_2_0_t for condvar
10516         parameter.
10517         * old_pthread_cond_destroy.c: Likewise.
10518         * old_pthread_cond_broadcast.c: Likewise.  Lock appropriately.
10519         * old_pthread_cond_signal.c: Likewise.
10520         * old_pthread_cond_timedwait.c: Likewise.
10521         * old_pthread_cond_wait.c: Likewise.
10523         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
10524         (__pthread_cond_wait): Don't save cancellation mode and seq value
10525         in same location.
10527         * herrno.c (__h_errno_location): Don't define as weak.
10529 2003-01-02  Jakub Jelinek  <jakub@redhat.com>
10531         * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
10532         pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
10533         and pthread_cond_wait.
10534         * old_pthread_cond_broadcast.c (__old_pthread_cond_broadcast):
10535         Renamed to...
10536         (__pthread_cond_broadcast_2_0): ... this.
10537         * old_pthread_cond_destroy.c (__old_pthread_cond_destroy):
10538         Renamed to...
10539         (__pthread_cond_destroy_2_0): ... this.
10540         * old_pthread_cond_init.c (__old_pthread_cond_init):
10541         Renamed to...
10542         (__pthread_cond_init_2_0): ... this.
10543         * old_pthread_cond_signal.c (__old_pthread_cond_signal):
10544         Renamed to...
10545         (__pthread_cond_signal_2_0): ... this.
10546         * old_pthread_cond_wait.c (__old_pthread_cond_wait):
10547         Renamed to...
10548         (__pthread_cond_wait_2_0): ... this.
10549         * pthread_cond_destroy.c: Include shlib-compat.h.
10550         (pthread_cond_destroy): Change strong_alias into versioned_symbol.
10551         * pthread_cond_init.c: Include shlib-compat.h.
10552         (pthread_cond_init): Change strong_alias into versioned_symbol.
10553         * pthreadP.h (struct pthread_functions): Rename ptr_pthread_cond_*
10554         fields to ptr___pthread_cond_* and add ptr___pthread_cond_*_2_0
10555         fields.
10556         (__pthread_cond_broadcast_2_0, __pthread_cond_destroy_2_0,
10557         __pthread_cond_init_2_0, __pthread_cond_signal_2_0,
10558         __pthread_cond_wait_2_0): New prototypes.
10559         (__old_pthread_cond_broadcast, __old_pthread_cond_destroy,
10560         __old_pthread_cond_init, __old_pthread_cond_signal,
10561         __old_pthread_cond_wait): Removed.
10562         * init.c: Include shlib-compat.h.
10563         (pthread_functions): Guard ptr___pthread_attr_init_2_0
10564         initialization with SHLIB_COMPAT (GLIBC_2_0, GLIBC_2_1).
10565         Rename ptr_pthread_cond_* to ptr___pthread_cond_*, initialize
10566         ptr___pthread_cond_*_2_0 fields.
10567         * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
10568         pthread_cond_*@GLIBC_2.0 compatibility symbols.
10570         * sysdeps/pthread/sigaction.c (SIGCANCEL): Only define if
10571         LIBC_SIGACTION was not yet defined.
10572         [!defined LIBC_SIGACTION]: Define LIBC_SIGACTION, #include self.
10573         [!defined LIBC_SIGACTION] (__sigaction): New function and
10574         libc_hidden_weak.
10575         [!defined LIBC_SIGACTION] (sigaction): New weak_alias.
10576         [defined LIBC_SIGACTION]: #include_next <sigaction.c>.
10578 2003-01-02  Jakub Jelinek  <jakub@redhat.com>
10580         * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
10582 2003-01-02  Ulrich Drepper  <drepper@redhat.com>
10584         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
10585         New, larger type definition.
10586         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: New condvar
10587         implementation.
10588         * Versions [libpthread]: Add definitions for new pthread_cond_*
10589         interfaces for version GLIBC_2.3.2.
10590         * pthread_cond_init.c: Update initialization for new type definition.
10591         * Makefile (libpthread-routines): Remove pthread_cond_wait,
10592         pthread_cond_timedwait, pthread_cond_signal, and
10593         pthread_cond_broadcast.  Add old_pthread_cond_init,
10594         old_pthread_cond_destroy, old_pthread_cond_wait,
10595         old_pthread_cond_timedwait, old_pthread_cond_signal, and
10596         old_pthread_cond_broadcast.
10597         * old_pthread_cond_broadcast.c: New file.
10598         * old_pthread_cond_destroy.c: New file.
10599         * old_pthread_cond_init.c: New file.
10600         * old_pthread_cond_signal.c: New file.
10601         * old_pthread_cond_timedwait.c: New file.
10602         * old_pthread_cond_wait.c: New file.
10603         * pthreadP.h: Add prototypes for the compatibility interfaces.
10605         * pthread_cond_destroy.c: Don't include <errno.h>.
10607 2003-01-01  Ulrich Drepper  <drepper@redhat.com>
10609         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Avoid
10610         unnecessary zero offset when addressing MUTEX.
10612 2002-12-31  Ulrich Drepper  <drepper@redhat.com>
10614         * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
10615         __register_atfork.
10616         * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
10617         for __register_atfork.
10619 2002-12-31  Jakub Jelinek  <jakub@redhat.com>
10621         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use __ASSEMBLER__
10622         instead of ASSEMBLER test macro.
10624         * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
10625         __libc_current_sigrtmax): Add libc_hidden_def.
10627         * sysdeps/pthread/list.h: Remove assert.h include.
10629 2002-12-31  Ulrich Drepper  <drepper@redhat.com>
10631         * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Use
10632         __pthread_initialize_minimal_internal not
10633         __pthread_initialize_minimal.
10635 2002-12-30  Ulrich Drepper  <drepper@redhat.com>
10637         * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Mark
10638         __pthread_initialize_minimal as hidden.
10640         * init.c (__pthread_initialize_minimal_internal): Don't mark as
10641         constructor.
10643 2002-12-31  Jakub Jelinek  <jakub@redhat.com>
10645         * Makefile ($(inst_libdir)/libpthread.so): Depend on
10646         $(common-objpfx)format.lds, include that into the output script.
10647         Fix comment.
10648         (extra-B-pthread.so): Change linuxthreads/ into nptl/.
10650 2002-12-28  Andreas Jaeger  <aj@suse.de>
10652         * sysdeps/unix/sysv/linux/xstatconv.c (xstat_conv): Adjust for
10653         nsec resolution changes.
10654         (xstat64_conv): Likewise.
10655         (xstat32_conv): Likewise.
10656         * sysdeps/unix/sysv/linux/kernel_stat.h: Add nsec resolution for
10657         struct kernel_stat.
10658         * sysdeps/unix/sysv/linux/bits/stat.h: Add nsec resolution for
10659         structs stat and stat64.
10660         * time/time.h (__timespec_defined): Define for __USE_MISC.
10661         * io/sys/stat.h [__USE_MISC]: Define __need_timespec for struct stat.
10663 2002-12-30  Jakub Jelinek  <jakub@redhat.com>
10665         * forward.c (FORWARD2): Renamed from FORWARD3.  Remove unused export
10666         argument.
10667         (pthread_attr_init_2_0, pthread_attr_init_2_1): Use FORWARD macro.
10668         (pthread_exit): Use strong_alias to avoid warnings.
10669         * pthreadP.h (struct pthread_functions): Rename ptr_pthread_exit
10670         and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
10671         ptr___pthread_attr_init_2_*.
10672         * init.c (pthread_functions): Adjust.
10674 2002-12-29  Ulrich Drepper  <drepper@redhat.com>
10676         * forward.c: Make all functions available by default again.  It
10677         caused too much trouble.
10679         * pt-siglongjmp.c: Removed.
10681 2002-12-28  Jakub Jelinek  <jakub@redhat.com>
10683         * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
10684         (SYSINFO_OFFSET, MULTIPLE_THREADS_OFFSET): Remove.
10685         * sysdeps/i386/Makefile: New file.
10686         * sysdeps/i386/tcb-offsets.sym: New file.
10687         * sysdeps/pthread/tcb-offsets.h: New file.
10688         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
10689         Remove MULTIPLE_THREADS_OFFSET and SYSINFO_OFFSET checks.
10691         * sysdeps/unix/sysv/linux/Versions [libc] (GLIBC_PRIVATE): Move
10692         __register_atfork...
10693         (GLIBC_2.3.2): ...here.
10695 2002-12-28  Ulrich Drepper  <drepper@redhat.com>
10697         * sysdeps/pthread/pthread.h: Mark pthread_attr_getstackaddr and
10698         pthread_attr_setstackaddr with __attribute_deprecated__.
10700 2002-12-27  Jakub Jelinek  <jakub@redhat.com>
10702         * pt-system.c (system): Remove cancellation handling.
10703         * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
10704         cancellation routines.
10706 2002-12-28  Ulrich Drepper  <drepper@redhat.com>
10708         * descr.h: Include <dl-sysdep.h>.
10709         (struct pthread): Move header.data.list to the back of the struct.
10710         * sysdeps/i386/tls.h (tcbhead_t): Move list to the back of the struct.
10711         (MULTIPLE_THREADS_OFFSET): Adjust offset.
10712         (SYSINFO_OFFSEET): Likewise.
10714 2002-12-27  Jakub Jelinek  <jakub@redhat.com>
10716         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h (USE_DL_SYSINFO):
10717         Define.
10718         (DL_SYSINFO_DEFAULT): Cast to uintptr_t to avoid warnings.
10719         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h (NEED_DL_SYSINFO,
10720         DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION): Define.
10721         (USE_DL_SYSINFO): Undef.
10723 2002-12-22  Jakub Jelinek  <jakub@redhat.com>
10725         * Makefile (tests-reverse): Use $(objpfx)../libc.so instead of
10726         $(common-objpfx)libc.so.
10727         * tst-cancel4.c (tf_write, tf_writev): Increase buf sizes so that
10728         it is bigger than pipe buffer size even on arches with bigger
10729         page size.
10730         (tf_usleep): Cast usleep argument to useconds_t to avoid warnings.
10732 2002-12-25  Ulrich Drepper  <drepper@redhat.com>
10734         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Implement
10735         correct errno access for case that USE___THREAD is not defined.
10737 2002-12-24  Ulrich Drepper  <drepper@redhat.com>
10739         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Add missing #endif.
10740         Patch by Marijn Ros <marijn@mad.scientist.com>.
10742 2002-12-22  Roland McGrath  <roland@redhat.com>
10744         * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
10746 2002-12-20  Ulrich Drepper  <drepper@redhat.com>
10748         * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_inexpensive): Define.
10750 2002-12-19  Ulrich Drepper  <drepper@redhat.com>
10752         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Don't define
10753         NEED_DL_SYSINFO since no processor < i686 had the sysenter opcode.
10754         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: New file.
10756         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Use ENTER_KERNEL instead
10757         of int $0x80.
10758         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
10759         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Likewise.
10760         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Likewise.
10761         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
10762         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
10763         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Likewise.
10764         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Likewise.
10765         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
10767         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add support for using
10768         sysenter.
10769         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
10771         * sysdeps/i386/tls.h: Unconditionally include <dl-sysdep.h>.
10773         * allocatestack.c (allocate_stack) [NEED_DL_SYSINFO]: Set sysinfo
10774         in new TCB.
10775         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Check
10776         that sysinfo is properly initialized.
10777         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define RTLD_PRIVATE_ERRNO
10778         to 1 only for ld.so.
10780         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
10781         RTLD_CORRECT_DYNAMIC_WEAK.
10783 2002-12-19  Jakub Jelinek  <jakub@redhat.com>
10785         * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
10786         Use return 0 as 6th argument to FORWARD4.
10787         * pthread_equal.c: Include pthreadP.h instead of pthread.h.
10789 2002-12-18  Ulrich Drepper  <drepper@redhat.com>
10791         * descr.h (struct pthread) [NEED_DL_SYSINFO]: Add sysinfo member.
10792         * sysdeps/i386/tls.h (tcbhead_t): Add sysinfo member.
10793         Define SYSINFO_OFFSEET if NEED_DL_SYSINFO is defined.
10794         (INIT_SYSINFO): New #define.
10795         (TLS_TP_INIT): Use INIT_SYSINFO.
10796         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
10797         At test to make sure SYSINFO_OFFSET value is correct.
10798         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
10800 2002-12-18  Jakub Jelinek  <jakub@redhat.com>
10802         * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
10803         * sysdeps/unix/sysv/linux/raise.c (gsignal): Add weak alias to raise.
10804         * Versions [libc: GLIBC_2.0]: Add pthread_attr_init.
10805         [libpthread: GLIBC_2.1]: Remove __pthread_rwlock_init,
10806         __pthread_rwlock_destroy, __pthread_rwlock_rdlock,
10807         __pthread_rwlock_wrlock, __pthread_rwlock_unlock,
10808         __pthread_rwlock_tryrdlock and __pthread_rwlock_trywrlock.
10810 2002-12-18  Ulrich Drepper  <drepper@redhat.com>
10812         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use ENTER_KERNEL
10813         macro instead of using int $0x80 directly.
10815         * sysdeps/pthread/bits/stdio-lock.h: New file.
10816         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: New file.
10817         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: New file.
10818         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: New file.
10819         * Makefile (routines): Add libc-lowlevelmutex.
10821         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Remove
10822         __i686.get_pc_thunk.dx.
10824 2002-12-17  Jakub Jelinek  <jakub@redhat.com>
10826         * Makefile (libpthread-shared-only-routines): Add pt-allocrtsig.
10827         (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
10828         ($(objpfx)tst-cancel-wrappers.out): New rule.
10829         * tst-cancel-wrappers.sh: New test.
10830         * tst-locale1.c: Include signal.h.
10831         (uselocale): Test static linking of __libc_current_sigrt*.
10833 2002-12-17  Ulrich Drepper  <drepper@redhat.com>
10835         * Makefile (tests): Add tst-cancel6.
10836         * tst-cancel6.c: New file
10838 2002-12-17  Jakub Jelinek  <jakub@redhat.com>
10840         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
10841         Define meaningfully for assembler as well.
10842         * pthreadP.h (struct pthread_functions): Remove
10843         ptr_pthread_attr_init field.  Add ptr_pthread_attr_init_2_0
10844         and ptr_pthread_attr_init_2_1 fields.
10845         * init.c (pthread_functions): Initialize ptr_pthread_attr_init_2_0
10846         and ptr_pthread_attr_init_2_1 instead of ptr_pthread_attr_init.
10847         * forward.c (FORWARD4): Renamed from FORWARD3. Add export argument.
10848         (FORWARD3): Define using FORWARD4.
10849         (pthread_attr_init): Provide both @GLIBC_2.0 and @@GLIBC_2.1
10850         versions.
10851         * pt-system.c: Remove duplicate stdlib.h include.
10853 2002-12-16  Ulrich Drepper  <drepper@redhat.com>
10855         * sem_init.c: Define sem_init@GLIBC_2.0.
10856         * sem_destroy.c: Define sem_destroy@GLIBC_2.0.
10857         * sem_getvalue.c: Define sem_getvalue@GLIBC_2.0.
10859         * flockfile.c: Moved to...
10860         * sysdeps/pthread/flockfile.c: ...here.  New file.
10861         * funlockfile.c: Moved to...
10862         * sysdeps/pthread/funlockfile.c: ...here.  New file.
10863         * ftrylockfile.c: Moved to...
10864         * sysdeps/pthread/ftrylockfile.c: ...here.  New file.
10866 2002-12-16  Jakub Jelinek  <jakub@redhat.com>
10868         * libc-cancellation.c: Guard both function with
10869         #if !defined NOT_IN_libc.
10870         * Makefile (libpthread-routines): Use ptw-, not pt- prefix for the
10871         automatically provided pthread wrappers.
10872         * pthreadP.h (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define to
10873         CANCEL_* if IS_IN_libpthread and to dummy versions if not in libc
10874         nor in libpthread.
10875         * pt-open.c: Removed.
10876         * pt-fcntl.c: Removed.
10877         * pt-fsync.c: Removed.
10878         * pt-lseek.c: Removed.
10879         * pt-msgrcv.c: Removed.
10880         * pt-msgsnd.c: Removed.
10881         * pt-msync.c: Removed.
10882         * pt-nanosleep.c: Removed.
10883         * pt-open64.c: Removed.
10884         * pt-pause.c: Removed.
10885         * pt-pread.c: Removed.
10886         * pt-pread64.c: Removed.
10887         * pt-pwrite.c: Removed.
10888         * pt-pwrite64.c: Removed.
10889         * pt-read.c: Removed.
10890         * pt-recv.c: Removed.
10891         * pt-recvfrom.c: Removed.
10892         * pt-recvmsg.c: Removed.
10893         * pt-send.c: Removed.
10894         * pt-sendto.c: Removed.
10895         * pt-sigtimedwait.c: Removed.
10896         * pt-sigwait.c: Removed.
10897         * pt-wait.c: Removed.
10898         * pt-waitpid.c: Removed.
10899         * pt-write.c: Removed.
10900         * pt-accept.c: Removed.
10901         * pt-close.c: Removed.
10902         * pt-connect.c: Removed.
10903         * pt-lseek64.c: Removed.
10904         * pt-sendmsg.c: Removed.
10905         * pt-tcdrain.c: Removed.
10907 2002-12-15  Ulrich Drepper  <drepper@redhat.com>
10909         * init.c (__pthread_initialize_minimal_internal): Renamed from
10910         __pthread_initialize_minimal.  Make old name an alias.  This
10911         converts a normal relocation into a relative relocation.
10913         * pt-fcntl.c (__fcntl): Use fcntl64 syscall, not fcntl.
10915         * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
10916         readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
10917         * Makefile (libpthread-routines): Remove pt-creat, pt-poll,
10918         pt-pselect, pt-readv, pt-select, pt-sigpause, pt-sigsuspend,
10919         pt-sigwaitinfo, pt-waitid, and pt-writev.
10920         * pt-creat.c: Removed.
10921         * pt-poll.c: Removed.
10922         * pt-pselect.c: Removed.
10923         * pt-readv.c: Removed.
10924         * pt-select.c: Removed.
10925         * pt-sigpause.c: Removed.
10926         * pt-sigsuspend.c: Removed.
10927         * pt-sigwaitinfo.c: Removed.
10928         * pt-waitid.c: Removed.
10929         * pt-writev.c: Removed.
10931         * init.c (pthread_functions): New variable.
10932         (__pthread_initialize_minimal): Pass pointer to pthread_functions
10933         (or NULL) to __libc_pthread_init.
10934         * forward.c: Rewrite to use __libc:pthread_functions array to get
10935         function addresses.
10936         * sysdeps/unix/sysv/linux/fork.h: Remove __libc_pthread_init
10937         prototype.
10938         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
10939         Take new parameter.  Copy content of variable pointed to by it
10940         to __libc_pthread_init.
10942         * pthreadP.h (struct pthread_functions): New type.
10943         (__libc_pthread_init): Declare.
10945         * pthread_attr_destroy.c: Add namespace protected alias.
10946         * pthread_attr_getdetachstate.c: Likewise.
10947         * pthread_attr_getinheritsched.c: Likewise.
10948         * pthread_attr_getschedparam.c: Likewise.
10949         * pthread_attr_getschedpolicy.c: Likewise.
10950         * pthread_attr_getscope.c: Likewise.
10951         * pthread_attr_setdetachstate.c: Likewise.
10952         * pthread_attr_setinheritsched.c: Likewise.
10953         * pthread_attr_setschedparam.c: Likewise.
10954         * pthread_attr_setschedpolicy.c: Likewise.
10955         * pthread_attr_setscope.c: Likewise.
10956         * pthread_cond_broadcast.c: Likewise.
10957         * pthread_cond_destroy.c: Likewise.
10958         * pthread_cond_init.c: Likewise.
10959         * pthread_cond_signal.c: Likewise.
10960         * pthread_cond_wait.c: Likewise.
10961         * pthread_condattr_destroy.c: Likewise.
10962         * pthread_condattr_init.c: Likewise.
10963         * pthread_equal.c: Likewise.
10964         * pthread_exit.c: Likewise.
10965         * pthread_getschedparam.c: Likewise.
10966         * pthread_self.c: Likewise.
10967         * pthread_setcancelstate.c: Likewise.
10968         * pthread_setschedparam.c: Likewise.
10969         * pthread_mutex_destroy.c: Likewise.
10970         * pthread_mutex_init.c: Likewise.
10971         * pthreadP.h: Add prototypes for the aliases.
10973         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Set
10974         multiple_threads member in correct TCB to 1.
10976         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define
10977         SINGLE_THREAD_P.  If in libc or libpthread examine multiple_thread
10978         member of thread decriptor, otherwise return unconditionally 1.
10980 2002-12-14  Ulrich Drepper  <drepper@redhat.com>
10982         * sysdeps/unix/sysv/linux/i386/pt-socket.S: Changes folded into the
10983         regular Linux version.  Remove file.
10984         * sysdeps/unix/sysv/linux/connect.S: Likewise.  Remove file.
10985         * sysdeps/unix/sysv/linux/llseek.c: Likewise.  Remove file.
10986         * sysdeps/unix/sysv/linux/msgrcv.c: Likewise.  Remove file.
10987         * sysdeps/unix/sysv/linux/msgsnd.c: Likewise.  Remove file.
10988         * sysdeps/unix/sysv/linux/open64.c: Likewise.  Remove file.
10989         * sysdeps/unix/sysv/linux/poll.c: Likewise.  Remove file.
10990         * sysdeps/unix/sysv/linux/pread.c: Likewise.  Remove file.
10991         * sysdeps/unix/sysv/linux/pread64.c: Likewise.  Remove file.
10992         * sysdeps/unix/sysv/linux/pselect.c: Likewise.  Remove file.
10993         * sysdeps/unix/sysv/linux/pwrite.c: Likewise.  Remove file.
10994         * sysdeps/unix/sysv/linux/pwrite64.c: Likewise.  Remove file.
10995         * sysdeps/unix/sysv/linux/readv.c: Likewise.  Remove file.
10996         * sysdeps/unix/sysv/linux/recv.S: Likewise.  Remove file.
10997         * sysdeps/unix/sysv/linux/recvfrom.S: Likewise.  Remove file.
10998         * sysdeps/unix/sysv/linux/recvmsg.S: Likewise.  Remove file.
10999         * sysdeps/unix/sysv/linux/send.S: Likewise.  Remove file.
11000         * sysdeps/unix/sysv/linux/sendmsg.S: Likewise.  Remove file.
11001         * sysdeps/unix/sysv/linux/sendto.S: Likewise.  Remove file.
11002         * sysdeps/unix/sysv/linux/sigpause.c: Likewise.  Remove file.
11003         * sysdeps/unix/sysv/linux/sigsuspend.c: Likewise.  Remove file.
11004         * sysdeps/unix/sysv/linux/sigtimedwait.c: Likewise.  Remove file.
11005         * sysdeps/unix/sysv/linux/sigwait.c: Likewise.  Remove file.
11006         * sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise.  Remove file.
11007         * sysdeps/unix/sysv/linux/system.c: Likewise.  Remove file.
11008         * sysdeps/unix/sysv/linux/tcdrain.c: Likewise.  Remove file.
11009         * sysdeps/unix/sysv/linux/wait.c: Likewise.  Remove file.
11010         * sysdeps/unix/sysv/linux/waitid.c: Likewise.  Remove file.
11011         * sysdeps/unix/sysv/linux/waitpid.c: Likewise.  Remove file.
11012         * sysdeps/unix/sysv/linux/writev.c: Likewise.  Remove file.
11013         * sysdeps/unix/sysv/linux/i386/fcntl.c: Likewise.  Remove file.
11015 2002-12-14  Jakub Jelinek  <jakub@redhat.com>
11017         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
11018         * sysdeps/unix/sysv/linux/open.c: Removed.
11019         * sysdeps/unix/sysv/linux/fsync.c: Removed.
11020         * sysdeps/unix/sysv/linux/lseek.c: Removed.
11021         * sysdeps/unix/sysv/linux/msync.c: Removed.
11022         * sysdeps/unix/sysv/linux/read.c: Removed.
11023         * sysdeps/unix/sysv/linux/close.c: Removed.
11024         * sysdeps/unix/sysv/linux/creat.c: Removed.
11025         * sysdeps/unix/sysv/linux/nanosleep.c: Removed.
11026         * sysdeps/unix/sysv/linux/pause.c: Removed.
11027         * sysdeps/unix/sysv/linux/select.c: Removed.
11028         * sysdeps/unix/sysv/linux/write.c: Removed.
11030 2002-12-14  Ulrich Drepper  <drepper@redhat.com>
11032         * sysdeps/unix/sysv/linux/i386/pt-socket.S: Check multiple_threads
11033         element in TCB to see whether locking is needed.
11035         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Check that
11036         MULTIPLE_THREADS_OFFSET value is correct.
11038         * sysdeps/unix/sysv/linux/close.c: New file.
11039         * sysdeps/unix/sysv/linux/connect.S: New file.
11040         * sysdeps/unix/sysv/linux/creat.c: New file.
11041         * sysdeps/unix/sysv/linux/fsync.c: New file.
11042         * sysdeps/unix/sysv/linux/llseek.c: New file.
11043         * sysdeps/unix/sysv/linux/lseek.c: New file.
11044         * sysdeps/unix/sysv/linux/msgrcv.c: New file.
11045         * sysdeps/unix/sysv/linux/msgsnd.c: New file.
11046         * sysdeps/unix/sysv/linux/msync.c: New file.
11047         * sysdeps/unix/sysv/linux/nanosleep.c: New file.
11048         * sysdeps/unix/sysv/linux/open.c: New file.
11049         * sysdeps/unix/sysv/linux/open64.c: New file.
11050         * sysdeps/unix/sysv/linux/pause.c: New file.
11051         * sysdeps/unix/sysv/linux/poll.c: New file.
11052         * sysdeps/unix/sysv/linux/pread.c: New file.
11053         * sysdeps/unix/sysv/linux/pread64.c: New file.
11054         * sysdeps/unix/sysv/linux/pselect.c: New file.
11055         * sysdeps/unix/sysv/linux/pwrite.c: New file.
11056         * sysdeps/unix/sysv/linux/pwrite64.c: New file.
11057         * sysdeps/unix/sysv/linux/readv.c: New file.
11058         * sysdeps/unix/sysv/linux/recv.S: New file.
11059         * sysdeps/unix/sysv/linux/recvfrom.S: New file.
11060         * sysdeps/unix/sysv/linux/recvmsg.S: New file.
11061         * sysdeps/unix/sysv/linux/select.c: New file.
11062         * sysdeps/unix/sysv/linux/send.S: New file.
11063         * sysdeps/unix/sysv/linux/sendmsg.S: New file.
11064         * sysdeps/unix/sysv/linux/sendto.S: New file.
11065         * sysdeps/unix/sysv/linux/sigpause.c: New file.
11066         * sysdeps/unix/sysv/linux/sigsuspend.c: New file.
11067         * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
11068         * sysdeps/unix/sysv/linux/sigwait.c: New file.
11069         * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
11070         * sysdeps/unix/sysv/linux/system.c: New file.
11071         * sysdeps/unix/sysv/linux/tcdrain.c: New file.
11072         * sysdeps/unix/sysv/linux/wait.c: New file.
11073         * sysdeps/unix/sysv/linux/waitid.c: New file.
11074         * sysdeps/unix/sysv/linux/waitpid.c: New file.
11075         * sysdeps/unix/sysv/linux/writev.c: New file.
11076         * sysdeps/unix/sysv/linux/i386/fcntl.c: New file.
11078         * pt-readv.c: Fix comment.
11080 2002-12-14  Jakub Jelinek  <jakub@redhat.com>
11082         * tst-cleanup1.c: Include stdlib.h.
11084         * tst-cancel5.c: New test.
11085         * Makefile (tests): Add tst-cancel5.
11086         (tst-cancel5): Link against libc.so libpthread.so in that order.
11088 2002-12-13  Ulrich Drepper  <drepper@redhat.com>
11090         * forward.c (test_loaded): Prevent recursive calls.
11092         * Makefile (routines): Add libc-cancellation.
11093         * libc-cancellation.c: New file.
11094         * descr.h (struct pthread): Add multiple_threads field.
11095         * allocatestack.c (allocate_stack): Initialize multiple_header field of
11096         new thread descriptor to 1.
11097         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread):
11098         Initialize multiple_thread field after successful thread creation.
11099         * cancellation.c (__do_cancel): Move to pthreadP.h.
11100         (__pthread_enable_asynccancel): Remove parameter from __do_cancel call.
11101         (__pthread_disable_asynccancel): Add internal_function attribute.
11102         * init.c (sigcancel_handler): Remove parameter from __do_cancel call.
11103         * pthread_setcancelstate.c: Likewise.
11104         * pthread_setcanceltype.c: Likewise.
11105         * pthread_exit.c: Likewise.
11106         * pthreadP.h (CANCELLATION_P): Likewise.
11107         (__do_cancel): Define as static inline.
11108         (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): New #defines.
11109         (__libc_enable_asynccancel, __libc_disable_asynccancel): New
11110         declarations.
11111         * sysdeps/i386/tls.h (tcbhead_t): Add list and multiple_threads
11112         fields.  Define MULTIPLE_THREADS_OFFSET.
11113         * sysdeps/pthread/bits/libc-lock.h: Remove __libc_locking_needed
11114         declaration.
11115         * sysdeps/unix/sysv/linux/accept.S: New file.
11116         * sysdeps/unix/sysv/linux/read.c: New file.
11117         * sysdeps/unix/sysv/linux/write.c: New file.
11118         * sysdeps/unix/sysv/linux/i386/pt-socket.S: New file.
11119         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove definition and
11120         initialization of __libc_locking_needed.
11121         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't use
11122         __libc_locking_needed, use multiple_threads field in TCB.
11123         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
11125 2002-12-12  Ulrich Drepper  <drepper@redhat.com>
11127         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: Use i486
11128         version.
11129         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: Likewise.
11131         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Correct
11132         access to __libc_locking_needed for PIC.
11134 2002-12-12  Jakub Jelinek  <jakub@redhat.com>
11136         * sysdeps/pthread/bits/libc-lock.h (__libc_locking_needed): Only
11137         declare for libc.so.
11138         (__libc_lock_init, __libc_lock_init_recursive): Change into comma
11139         expression.
11140         (__libc_lock_lock): Put into statement expression.
11141         (__libc_lock_unlock): Remove trailing semicolon.
11142         * sysdeps/unix/sysv/linux/fork.h (__libc_pthread_init): Fix typo.
11144 2002-12-12  Roland McGrath  <roland@redhat.com>
11146         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use asm operand with
11147         "m" constraint to refer to __libc_locking_needed.  Declare it here.
11149 2002-12-12  Ulrich Drepper  <drepper@redhat.com>
11151         * sysdeps/unix/sysv/linux/fork-gen.c: Renamed to...
11152         * sysdeps/unix/sysv/linux/libc_pthread_init.c: ...this.
11153         Initialize __libc_locking_needed.
11154         * init.c (__pthread_initialize_minimal): Call __libc_pthread_init
11155         instead of __register_pthread_fork_handler.
11156         * sysdeps/pthread/bits/libc-lock.h: Declare __libc_locking_needed.
11157         * sysdeps/unix/sysv/linux/Makefile (sysdep_routimes): Replace
11158         fork-gen with libc_pthread_init.
11159         * sysdeps/unix/sysv/linux/Versions: Use __libc_pthread_init instead
11160         of __register_pthread_fork_handler.
11161         * sysdeps/unix/sysv/linux/fork.h: Declare __libc_pthread_init instead
11162         of __register_pthread_fork_handler.
11163         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use
11164         __libc_locking_needed to determine whether lock prefix can be avoided.
11165         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
11167 2002-12-11  Ulrich Drepper  <drepper@redhat.com>
11169         * Makefile (tests): Add tst-cleanup1.
11170         * tst-cleanup1.c: New file.
11171         * cancellation.c (__cleanup_thread): Removed.
11172         (__do_cancel): Remove call to __cleanup_thread.
11173         * pthreadP.h: Remove __cleanup_thread prorotype.
11175         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
11176         Remember function and argument even if cancellation handler
11177         function is not available.
11178         (__libc_cleanup_region_end): Execute registered function directly if
11179         pthread functions are not available.
11180         (__libc_cleanup_end): Likewise.
11182         * init.c (__pthread_initialize_minimal): Fix initialization in
11183         static lib by preventing gcc from being too clever.
11185 2002-12-10  Ulrich Drepper  <drepper@redhat.com>
11187         * init.c (__pthread_initialize_minimal): Remove unneccesary
11188         sigaddset call.
11190         * Makefile (tests): We can run tst-locale2 now.
11192 2002-12-09  Ulrich Drepper  <drepper@redhat.com>
11194         * Versions: Remove duplicated sigwait entry.
11196 2002-12-08  Ulrich Drepper  <drepper@redhat.com>
11198         * pthreadP.h: Enable pthread_cleanup_{push,pop} optimizations only
11199         inside libpthread.
11201         * pt-fcntl.c (__fcntl): Initialize oldtype to avoid warning.
11203         * pthreadP.h: Declare __pthread_enable_asynccancel and
11204         __pthread_disable_asynccancel.
11205         (CANCEL_ASYNC): Use __pthread_enable_asynccancel.
11206         (CANCEL_RESET): Use __pthread_disable_asynccancel.
11207         * cancellation.c (__pthread_enable_asynccancel): New function.
11208         (__pthread_disable_asynccancel): New function.
11209         * pt-accept.c: Adjust for CANCEL_ASYNC and CANCEL_RESET change.
11210         * pt-close.c: Likewise.
11211         * pt-connect.c: Likewise.
11212         * pt-creat.c: Likewise.
11213         * pt-fcntl.c: Likewise.
11214         * pt-fsync.c: Likewise.
11215         * pt-lseek.c: Likewise.
11216         * pt-lseek64.c: Likewise.
11217         * pt-msgrcv.c: Likewise.
11218         * pt-msgsnd.c: Likewise.
11219         * pt-msync.c: Likewise.
11220         * pt-nanosleep.c: Likewise.
11221         * pt-open.c: Likewise.
11222         * pt-open64.c: Likewise.
11223         * pt-pause.c: Likewise.
11224         * pt-poll.c: Likewise.
11225         * pt-pread.c: Likewise.
11226         * pt-pread64.c: Likewise.
11227         * pt-pselect.c: Likewise.
11228         * pt-pwrite.c: Likewise.
11229         * pt-pwrite64.c: Likewise.
11230         * pt-read.c: Likewise.
11231         * pt-readv.c: Likewise.
11232         * pt-recv.c: Likewise.
11233         * pt-recvfrom.c: Likewise.
11234         * pt-recvmsg.c: Likewise.
11235         * pt-select.c: Likewise.
11236         * pt-send.c: Likewise.
11237         * pt-sendmsg.c: Likewise.
11238         * pt-sendto.c: Likewise.
11239         * pt-sigpause.c: Likewise.
11240         * pt-sigsuspend.c: Likewise.
11241         * pt-sigtimedwait.c: Likewise.
11242         * pt-sigwait.c: Likewise.
11243         * pt-sigwaitinfo.c: Likewise.
11244         * pt-system.c: Likewise.
11245         * pt-tcdrain.c: Likewise.
11246         * pt-wait.c: Likewise.
11247         * pt-waitid.c: Likewise.
11248         * pt-waitpid.c: Likewise.
11249         * pt-write.c: Likewise.
11250         * pt-writev.c: Likewise.
11251         * pthread_join.c: Likewise.
11252         * pthread_timedjoin.c: Likewise.
11254         * pt-sigpause.c (sigsuspend): Call __sigsuspend.
11255         (__xpg_sigpause): New function.
11256         * Versions (libpthread:GLIBC_2.3.2): Add __xpg_sigpause.
11258 2002-12-07  Ulrich Drepper  <drepper@redhat.com>
11260         * Makefile (CFLAGS-ftrylockfile.c): Add -D_IO_MTSAFE_IO.
11262         * cleanup.c: Move declarations of _GI_pthread_cleanup_push and
11263         _GI_pthread_cleanup_pop to pthreadP.h.
11265         * ftrylockfile.c: Use _IO_lock_trylock instead of
11266         pthread_mutex_trylock.
11268         * pthreadP.h (CANCEL_ASYNC): Use __pthread_setcanceltype.
11269         (CANCEL_RESET): Likewise.
11270         (__pthread_setcanceltype_): Declare.
11271         (__pthread_mutex_lock_internal): Declare.
11272         (__pthread_mutex_unlock_internal): Declare.
11273         (__pthread_once_internal): Declare.
11274         (pthread_cleanup_push): Redefine using _GI_pthread_cleanup_push.
11275         (pthread_cleanup_pop): Redefine using _GI_pthread_cleanup_pop.
11277         * pthread_cond_timedwait.c: Use INTUSE is calls to pthread_mutex_lock
11278         and pthread_mutex_unlock.
11279         * pthread_cond_wait.c: Likewise.
11280         * pthread_mutex_lock.c: Use INTDEF to define alias if needed.
11281         * pthread_mutex_unlock.c: Likewise.
11283         * pthread_setcanceltype.c: Add additional alias
11284         __pthread_setcanceltype.
11286         * sem_unlink.c (sem_unlink): Use __pthread_once with INTDEF.
11287         * sem_open.c (sem_open): Likewise.
11288         Use __libc_open, __libc_write, and __libc_close instead of
11289         open, write, and close respectively.
11291         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_trylock_internal):
11292         Rewrite as statement expression since it must return a value.
11294         * pthread_cancel.c: Use __pthread_kill instead of pthread_kill.
11295         * sysdeps/unix/sysv/linux/pthread_kill.c: Define additional alias
11296         __pthread_kill.
11298         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Define additional
11299         alias __pthread_once_internal.
11301         * sysdeps/unix/sysv/linux/raise.c: Use libc_hidden_def for raise.
11303 2002-12-06  Ulrich Drepper  <drepper@redhat.com>
11305         * Makefile (tests): Add tst-stdio1 and tst-stdio2.
11306         * tst-stdio1.c: New file.
11307         * tst-stdio2.c: New file.
11309         * init.c (__pthread_initialize_minimal): Correct INIT_LIST_HEAD use.
11311         * Makefile (tests): Comment out tst-locale2 for now.
11312         (CFLAGS-flockfile.c, CFLAGS-funlockfile.c): Define to -D_IO_MTSAFE_IO.
11314         * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-fork.c to
11315         -D_IO_MTSAFE_IO.
11316         * sysdeps/unix/sysv/linux/fork.c: Include <bits/stdio-lock.h>.
11317         Use _IO_lock_init instead of explicit assignment.
11319         * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
11320         Define __libc_lock_* and __libc_lock_recursive macros with
11321         lowlevellock macros, not pthread mutexes.
11323         * flockfile.c: Include <bits/stdio-lock.h>.  Use _IO_lock_lock instead
11324         of pthread_mutex_lock.
11325         * funlockfile.c: Include <bits/stdio-lock.h>.  Use _IO_lock_unlock
11326         instead of pthread_mutex_unlock.
11328 2002-12-06  Roland McGrath  <roland@redhat.com>
11330         * allocatestack.c (__stack_user): Use uninitialized defn.
11331         * init.c (__pthread_initialize_minimal): Initialize it here.
11333 2002-12-05  Roland McGrath  <roland@redhat.com>
11335         * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
11336         string.
11337         * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
11339         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Add
11340         missing & here too.
11342 2002-12-05  Ulrich Drepper  <drepper@redhat.com>
11344         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
11345         lowlevellock.
11346         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: New file.
11347         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: New file.
11348         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: New file.
11349         * sysdeps/pthread/bits/libc-lock.h: Use lowlevellock implementation
11350         for __libc_lock_* macros.
11351         * Makefile (routines): Add libc-lowlevellock.
11353 2002-10-09  Roland McGrath  <roland@redhat.com>
11355         * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
11356         Under [__PIC__], call the function via the pointer fetched for
11357         comparison rather than a call by name that uses the PLT.
11358         (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
11359         (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
11360         (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
11361         (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
11362         (__libc_key_create, __libc_getspecific, __libc_setspecific): Use it.
11364 2002-12-04  Roland McGrath  <roland@redhat.com>
11366         * forward.c (pthread_self): Use FORWARD3 macro to correct return type.
11368         * sysdeps/i386/td_ta_map_lwp2thr.c: Moved from ../nptl_db.
11369         * sysdeps/generic/td_ta_map_lwp2thr.c: New file.
11371         * pthread_create.c (start_thread): Add missing & on __nptl_last_event.
11373 2002-12-04  Ulrich Drepper  <drepper@redhat.com>
11375         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Make pthread_t
11376         a completely opaque, non-integer type.
11377         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
11379 2002-12-05  Jakub Jelinek  <jakub@redhat.com>
11381         * sysdeps/i386/tls.h: Include stdlib.h.
11382         * sysdeps/x86_64/tls.h: Likewise.
11384 2002-12-04  Ulrich Drepper  <drepper@redhat.com>
11386         * Makefile (tests): Add tst-locale2.
11387         (tests-static): Likewise.
11388         * tst-locale2.c: New file.
11390         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Mark asms as
11391         volatile and add memory clobbers to lock operations.
11393 2002-12-03  Ulrich Drepper  <drepper@redhat.com>
11395         * sysdeps/i386/i686/bits/atomic.h: Use i486 version.
11396         * sysdeps/i386/i486/bits/atomic.h: New file.
11397         * sysdeps/i386/i586/bits/atomic.h: New file.
11398         * sysdeps/i386/i686/pthread_spin_trylock.S: Define HAVE_CMOV and
11399         include i486 version.
11400         * sysdeps/i386/i486/pthread_spin_trylock.S: New file.
11401         * sysdeps/i386/i586/pthread_spin_trylock.S: New file.
11402         Patch by Marijn Ros <marijn@mad.scientist.com>.
11404         * allocatestack.c (get_cached_stack): Don't crash if we first
11405         found a stack with a larger size then needed.
11406         Reported by Hui Huang <hui.huang@sun.com>.
11408         * Makefile (tests): Add tst-sysconf.
11409         * tst-sysconf.c: New file.
11411         * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine
11412         PTHREAD_THREADS_MAX.
11414 2002-12-02  Roland McGrath  <roland@redhat.com>
11416         * pthreadP.h (__stack_user, __nptl_create_event, __nptl_death_event):
11417         Declare using hidden_proto instead of attribute_hidden, so there are
11418         non-.hidden static symbols for gdb to find.
11419         (__pthread_keys): Likewise.
11420         * events.c (__nptl_create_event, __nptl_death_event): Add hidden_def.
11421         * allocatestack.c (__stack_user): Likewise.
11422         * pthread_create.c (__pthread_keys): Likewise.
11423         (__nptl_threads_events, __nptl_last_event): Make these static instead
11424         of hidden.
11425         * pthread_key_create.c (__pthread_pthread_keys_max,
11426         __pthread_pthread_key_2ndlevel_size): Renamed from __linuxthreads_*.
11428 2002-12-02  Ulrich Drepper  <drepper@redhat.com>
11430         * Makefile (tests): Add tst-locale1.  If buid-static is yes link
11431         statically.
11432         * tst-locale1.c: New file.
11434         * pthread_cond_timedwait.c: Include <stdlib.h>.
11436         * Makefile (tests): Add tst-fork2 and tst-fork3.
11437         * tst-fork2.c: New file.
11438         * tst-fork3.c: New file.
11440 2002-11-28  Ulrich Drepper  <drepper@redhat.com>
11442         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
11444         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
11445         require it to 200112L.
11447         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Use cmov
11448         instruction only if HAVE_CMOV is defined.
11449         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Define HAVE_CMOV.
11451         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: New file.
11453         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: New file.
11455         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: New file.
11457         * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: New file.
11459 2002-11-27  Ulrich Drepper  <drepper@redhat.com>
11461         * sysdeps/x86_64/bits/atomic.h: New file.
11463         * sysdeps/i386/i686/bits/atomic.h: Fix asm syntax for 8- and
11464         16-bit operations.
11466         * sysdeps/unix/sysv/linux/raise.c (raise): Use INTERNAL_SYSCALL if
11467         possible since gettid cannot fail.
11469         * sysdeps/x86_64/pthreaddef.h: New file.
11471         * sysdeps/i386/pthreaddef.h (gettid): Removed.
11473         * sysdeps/x86_64/pthread_spin_init.c: New file.
11474         * sysdeps/x86_64/pthread_spin_lock.c: New file.
11475         * sysdeps/x86_64/pthread_spin_trylock.c: New file.
11476         * sysdeps/x86_64/pthread_spin_unlock.c: New file.
11478         * sysdeps/i386/i686/pthread_spin_trylock.S (pthread_spin_trylock):
11479         Add missing lock prefix.  Minute optimization.
11481         * tst-spin2.c (main): Also check successful trylock call.
11483         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use correct
11484         syscall.  Fix typo in case INTERNAL_SYSCALL is not used.
11486         * sysdeps/i386/pthread_spin_destroy.c: Moved to...
11487         * sysdeps/pthread/pthread_spin_destroy.c: ...here.  New file.
11489         * sysdeps/i386/pthread_sigmask.c: Removed.  Use the generic code.
11490         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Return correct
11491         value in case of an error.  Add support for INTERNAL_SYSCALL.
11493         * sysdeps/i386/pthread_sigmask.c (pthread_sigmask): Return correct
11494         value in case of an error.
11496         * sysdeps/x86_64/tls.h: New file.
11498 2002-11-26  Ulrich Drepper  <drepper@redhat.com>
11500         * sysdeps/i386/tls.h (THREAD_GETMEM_NC): Change interface.  It now
11501         takes the array member name and the index as parameters.
11502         (THREAD_SETMEM_NC): Likewise.
11503         * pthread_getspecific.c: Use new THREAD_GETMEM_NC interface.
11504         * pthread_setspecific.c: Use new THREAD_GETMEM_NC and THREAD_SETMEM_NC
11505         interfaces.
11507         * sysdeps/i386/tls.h (THREAD_SETMEM): Use size of member element
11508         to decide which code to use.
11509         (THREAD_SETMEM_NC): Likewise.
11511         * allocatestack.c (queue_stack): Don't remove stack from list here.
11512         Do it in the caller.  Correct condition to prematurely terminate
11513         loop to free stacks.
11514         (__deallocate_stack): Remove stack from list here.
11516 2002-11-26  Ulrich Drepper  <drepper@redhat.com>
11518         * Makefile (tests): Add tst-stack1.
11519         * tst-stack1.c: New file.
11521         * allocatestack.c (allocate_stack): Initialize the TCB on a user
11522         provided stack.
11524         * pthread_attr_getstack.c: Return bottom of the thread area.
11526 2002-11-25  Ulrich Drepper  <drepper@redhat.com>
11528         * Makefile (libpthread-routines): Add pt-allocrtsig and
11529         pthread_kill_other_threads.
11530         * pt-allocrtsig.c: New file.
11531         * pthread_kill_other_threads.c: New file.
11532         * sysdeps/unix/sysv/linux/allocrtsig.c: Add additional aliases for
11533         all three functions.
11534         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
11535         allocrtsig.
11536         * sysdeps/unix/sysv/linux/Versions (libc:GLIBC_PRIVATE): Export
11537         __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
11538         and __libc_allocate_rtsig_private.
11539         * Versions (libpthread): Export pthread_kill_other_threads_np,
11540         __libc_current_sigrtmin, and __libc_current_sigrtmax.
11542 2002-11-24  Ulrich Drepper  <drepper@redhat.com>
11544         * allocatestack.c (allocate_stack): stackaddr in attribute points to
11545         the end of the stack.  Adjust computations.
11546         When mprotect call fails dequeue stack and free it.
11547         * pthread_attr_setstack.c: Store top of the stack in stackaddr
11548         attribute.
11549         * pthread_getattr_np.c: Likewise.
11551         * descr.h (IS_DETACHED): Add some more parenthesis to prevent
11552         surprises.
11554 2002-11-23  Ulrich Drepper  <drepper@redhat.com>
11556         * sysdeps/pthread/pthread.h (pthread_self): __THROW must come before
11557         attribute definitions.  Patch by Luca Barbieri <ldb@ldb.ods.org>.
11559 2002-11-22  Ulrich Drepper  <drepper@redhat.com>
11561         * pthread_getspecific.c: Optimize access to first 2nd-level array.
11562         * pthread_setspecific.c: Likewise.
11564 2002-11-21  Ulrich Drepper  <drepper@redhat.com>
11566         * sysdeps/unix/sysv/linux/i386/createthread.c: Remove CLONE_ flags
11567         definitions.  Get them from the official place.
11568         * sysdeps/unix/sysv/linux/i386/fork.c: Likewise.
11570         * sysdeps/unix/sysv/linux/i386/createthread.c: Update CLONE_* flags.
11571         Use new CLONE_ flags in clone() calls.
11573         * sysdeps/unix/sysv/linux/fork.c: Use ARCH_FORK to actually fork.
11574         * sysdeps/unix/sysv/linux/i386/fork.c: New file.
11576         * Versions: Add pthread_* functions for libc.
11577         * forward.c: New file.
11579         * sysdeps/pthread/Makefile (libpthread-sysdeps_routines): Add
11580         errno-loc.
11581         * herrno.c: New file.
11582         * res.c: New file.
11584         * Makefile (libpthread-routines): Remove sem_post, sem_wait,
11585         sem_trywait, and sem_timedwait.  Add herrno and res.
11586         * sem_init.c: Don't initialize lock and waiters members.
11587         * sem_open.c: Likewise.
11588         * sem_post.c: Removed.
11589         * sem_wait.c: Removed.
11590         * sem_trywait.c: Removed.
11591         * sem_timedwait.c: Removed.
11592         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Complete rewrite.
11593         Includes full implementations of sem_post, sem_wait, sem_trywait,
11594         and sem_timedwait.
11595         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Adjust
11596         for new implementation.
11597         * sysdeps/unix/sysv/linux/internaltypes.h (struct sem): Remove lock
11598         and waiters fields.
11600         * tst-sem3.c: Improve error message.
11601         * tst-signal3.c: Likewise.
11603         * init.c (__pthread_initialize_minimal): Use set_tid_address syscall
11604         to tell the kernel about the termination futex and to initialize tid
11605         member.  Don't initialize main_thread.
11606         * descr.h (struct pthread): Remove main_thread member.
11607         * cancelllation.c (__do_cancel): Remove code handling main thread.
11608         The main thread is not special anymore.
11610         * allocatestack.c (__reclaim_stacks): Mark stacks as unused.  Add
11611         size of the stacks to stack_cache_actsize.
11613         * pt-readv.c: Add missing "defined".
11614         * pt-sigwait.c: Likewise.
11615         * pt-writev.c: Likewise.
11617 2002-11-09  Ulrich Drepper  <drepper@redhat.com>
11619         * Versions: Export __connect from libpthread.
11620         Patch by Luca Barbieri <ldb@ldb.ods.org>.
11622         * Makefile (libpthread-routines): Add pt-raise.
11623         * sysdeps/unix/sysv/linux/raise.c: New file.
11624         * sysdeps/unix/sysv/linux/pt-raise.c: New file.
11625         * sysdeps/generic/pt-raise.c: New file.
11627         * pthread_cond_init.c: Initialize all data elements of the condvar
11628         structure.  Patch by Luca Barbieri <ldb@ldb.ods.org>.
11630         * pthread_attr_init.c: Actually implement 2.0 compatibility version.
11631         * pthread_create.c: Likewise.
11633         * Makefile (tests): Add tst-key1, tst-key2, tst-key3.
11634         * tst-key1.c: New file.
11635         * tst-key2.c: New file.
11636         * tst-key3.c: New file.
11638         * Versions: Export pthread_detach for version GLIBC_2.0.
11639         Reported by Saurabh Desai <sdesai@austin.ibm.com>.
11641 2002-11-08  Ulrich Drepper  <drepper@redhat.com>
11643         * pthread_key_create.c: Terminate search after an unused key was found.
11644         Patch by Luca Barbieri <ldb@ldb.ods.org>.
11646         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Return zero.
11647         Patch by Luca Barbieri <ldb@ldb.ods.org>.
11649 2002-10-10  Ulrich Drepper  <drepper@redhat.com>
11651         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Use slow generic
11652         dynamic lookup for errno in PIC.
11654         * allocatestack.c (get_cached_stack): Rearrange code slightly to
11655         release the stack lock as soon as possible.
11656         Call _dl_allocate_tls_init for TCB from the cache to re-initialize
11657         the static TLS block.
11658         (allocate_stack): Call _dl_allocate_tls_init for user-provided stack.
11660         * cancellation.c: Renamed from cancelation.c.
11661         * Makefile: Adjust accordingly.
11662         * pthreadP.h (CANCELLATION_P): Renamed from CANCELATION_P.
11663         * cleanup_defer.c: Use CANCELLATION_P.
11664         * pthread_testcancel.c: Likewise.
11665         * descr.h: Fix spelling in comments.
11666         * init.c: Likewise.
11667         * pthread_getattr_np.c: Likewise.
11668         * pthread_getschedparam.c: Likewise.
11669         * pthread_setschedparam.c: Likewise.
11670         * Versions: Likewise.
11672         * pt-pselect.c: New file.
11673         * Makefile (libpthread-routines): Add pt-pselect.
11674         * Versions: Add pselect.
11676         * tst-cancel4.c: New file.
11677         * Makefile (tests): Add tst-cancel4.
11679 2002-10-09  Ulrich Drepper  <drepper@redhat.com>
11681         * pthread_mutex_lock.c: Always record lock ownership.
11682         * pthread_mutex_timedlock.c: Likewise.
11683         * pthread_mutex_trylock.c: Likewise.
11685         * pt-readv.c: New file.
11686         * pt-writev.c: New file.
11687         * pt-creat.c: New file.
11688         * pt-msgrcv.c: New file.
11689         * pt-msgsnd.c: New file.
11690         * pt-poll.c: New file.
11691         * pt-select.c: New file.
11692         * pt-sigpause.c: New file.
11693         * pt-sigsuspend.c: New file.
11694         * pt-sigwait.c: New file.
11695         * pt-sigwaitinfo.c: New file.
11696         * pt-waitid.c: New file.
11697         * Makefile (libpthread-routines): Add pt-readv, pt-writev, pt-creat,
11698         pt-msgrcv, pt-msgsnd, pt-poll, pt-select, pt-sigpause, pt-sigsuspend,
11699         pt-sigwait, pt-sigwaitinfo, and pt-waitid.
11700         * Versions: Add all the new functions.
11702         * tst-exit1.c: New file.
11703         * Makefile (tests): Add tst-exit1.
11705         * sem_timedwait.c: Minor optimization for more optimal fastpath.
11707 2002-10-08  Ulrich Drepper  <drepper@redhat.com>
11709         * pt-fcntl.c: Only enable asynchronous cancellation for F_SETLKW.
11711         * pthread_join.c: Enable asynchronous cancellation around lll_wait_tid
11712         call.  pthread_join is an official cancellation point.
11713         * pthread_timedjoin.c: Likewise.
11715         * pthread_cond_wait.c: Revert order in which internal lock are dropped
11716         and the condvar's mutex are retrieved.
11717         * pthread_cond_timedwait.c: Likewise.
11718         Reported by dice@saros.East.Sun.COM.
11720 2002-10-07  Ulrich Drepper  <drepper@redhat.com>
11722         * pthreadP.h: Cut out all type definitions and move them...
11723         * sysdeps/unix/sysv/linux/internaltypes.h: ...here.  New file.
11724         * pthreadP.h: Include <internaltypes.h>.
11726         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Little
11727         performance tweaks.
11729         * sem_trywait.c: Shuffle #includes around to get right order.
11730         * sem_timedwait.c: Likewise.
11731         * sem_post.c: Likewise.
11732         * sem_wait.c: Likewise.
11734         * nptl 0.3 released.
11736         * Makefile (tests): Add tst-signal3.
11737         * tst-signal3.c: New file.
11739 2002-10-05  Ulrich Drepper  <drepper@redhat.com>
11741         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Tell the compiler that
11742         the asms modify the sem object.
11743         (__lll_sem_timedwait): Now takes struct sem* as first parameter.
11745         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h (sem_t): Don't expose
11746         the actual members.
11747         * pthreadP.h (struct sem): New type.  Actual semaphore type.
11748         * semaphoreP.h: Include pthreadP.h.
11749         * sem_getvalue.c: Adjust to sem_t change.
11750         * sem_init.c: Likewise.
11751         * sem_open.c: Likewise.
11752         * sem_post.c: Likewise.
11753         * sem_timedwait.c: Likewise.
11754         * sem_trywait.c: Likewise.
11755         * sem_wait.c: Likewise.
11757 2002-10-04  Ulrich Drepper  <drepper@redhat.com>
11759         * Makefile (tests): Add tst-basic2, tst-exec1, tst-exec3, tst-exec3.
11760         * tst-basic2.c: New file.
11761         * tst-exec1.c: New file.
11762         * tst-exec2.c: New file.
11763         * tst-exec3.c: New file.
11765         * tst-fork1.c: Remove extra */.
11767         * nptl 0.2 released.  The API for IA-32 is complete.