* sysdeps/unix/sysv/linux/ia64/dl-sysdep.h
[glibc.git] / nptl / ChangeLog
blobbd3af40267b831b6d539684f02d256b2576920f2
1 2006-03-08  Andreas Schwab  <schwab@suse.de>
3         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h
4         (DL_SYSINFO_IMPLEMENTATION): Add missing newline.
6 2006-03-05  Roland McGrath  <roland@redhat.com>
8         * configure (libc_add_on): Disable add-on when $add_ons_automatic = yes
9         and $config_os doesn't match *linux*.
11 2006-03-05  David S. Miller  <davem@sunset.davemloft.net>
13         * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S:
14         Use __syscall_error.
15         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
16         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: Likewise.
17         * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: Likewise.
18         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
19         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: Likewise.
20         * sysdeps/unix/sysv/linux/sparc/Makefile: New file.
22 2006-03-02  Ulrich Drepper  <drepper@redhat.com>
24         * sysdeps/unix/sysv/linux/aio_misc.h: Various cleanups.
26 2006-03-01  Ulrich Drepper  <drepper@redhat.com>
28         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
29         (__lll_robust_lock_wait): Also set FUTEX_WAITERS bit if we got the
30         mutex.
31         (__lll_robust_timedlock_wait): Likewise.
32         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S
33         (__lll_robust_lock_wait): Likewise.
34         (__lll_robust_timedlock_wait): Likewise.
35         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
36         (__lll_robust_lock_wait): Likewise.
37         (__lll_robust_timedlock_wait): Likewise.
39 2006-03-01  Jakub Jelinek  <jakub@redhat.com>
41         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_robust_mutex_dead,
42         lll_robust_mutex_trylock, lll_robust_mutex_lock,
43         lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
44         lll_robust_mutex_unlock): Define.
45         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
47 2006-02-28  H.J. Lu  <hongjiu.lu@intel.com>
49         * sysdeps/unix/sysv/linux/ia64/clone2.S: Include <clone2.S>
50         instead of <clone.S>.
52 2006-02-27  Jakub Jelinek  <jakub@redhat.com>
54         * Makefile (libpthread-routines): Add
55         pthread_mutexattr_[sg]etprotocol, pthread_mutexattr_[sg]etprioceiling
56         and pthread_mutex_[sg]etprioceiling.
57         * Versions (GLIBC_2.4): Export pthread_mutexattr_getprotocol,
58         pthread_mutexattr_setprotocol, pthread_mutexattr_getprioceiling,
59         pthread_mutexattr_setprioceiling, pthread_mutex_getprioceiling and
60         pthread_mutex_setprioceiling.
61         * sysdeps/pthread/pthread.h (PTHREAD_PRIO_NONE, PTHREAD_PRIO_INHERIT,
62         PTHREAD_PRIO_PROTECT): New enum values.
63         (pthread_mutexattr_getprotocol, pthread_mutexattr_setprotocol,
64         pthread_mutexattr_getprioceiling, pthread_mutexattr_setprioceiling,
65         pthread_mutex_getprioceiling, pthread_mutex_setprioceiling): New
66         prototypes.
67         * pthreadP.h (PTHREAD_MUTEX_PRIO_INHERIT_PRIVATE_NP,
68         PTHREAD_MUTEX_PRIO_PROTECT_PRIVATE_NP): New enum values.
69         (PTHREAD_MUTEX_PRIO_CEILING_SHIFT, PTHREAD_MUTEX_PRIO_CEILING_MASK):
70         Define.
71         (PTHREAD_MUTEXATTR_PROTOCOL_SHIFT, PTHREAD_MUTEXATTR_PROTOCOL_MASK,
72         PTHREAD_MUTEXATTR_PRIO_CEILING_SHIFT,
73         PTHREAD_MUTEXATTR_PRIO_CEILING_MASK): Define.
74         (PTHREAD_MUTEXATTR_FLAG_BITS): Or in PTHREAD_MUTEXATTR_PROTOCOL_MASK
75         and PTHREAD_MUTEXATTR_PRIO_CEILING_MASK.
76         * pthread_mutex_init.c (__pthread_mutex_init): For the time being
77         return ENOTSUP for PTHREAD_PRIO_INHERIT or PTHREAD_PRIO_PROTECT
78         protocol mutexes.
79         * pthread_mutex_getprioceiling.c: New file.
80         * pthread_mutex_setprioceiling.c: New file.
81         * pthread_mutexattr_getprioceiling.c: New file.
82         * pthread_mutexattr_setprioceiling.c: New file.
83         * pthread_mutexattr_getprotocol.c: New file.
84         * pthread_mutexattr_setprotocol.c: New file.
86 2006-02-27  Daniel Jacobowitz  <dan@codesourcery.com>
88         * sysdeps/unix/sysv/linux/aio_misc.h: Include <limits.h>.
90 2006-02-27  Roland McGrath  <roland@redhat.com>
92         * sysdeps/pthread/Subdirs: List nptl here too.
93         * configure (libc_add_on_canonical): New variable.
95         * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: Use #include_next.
97         * sysdeps/unix/sysv/linux/sleep.c: Use #include_next after #include of
98         self to get main source tree's file.
99         * sysdeps/unix/sysv/linux/alpha/clone.S: Likewise.
100         * sysdeps/unix/sysv/linux/i386/clone.S: Likewise.
101         * sysdeps/unix/sysv/linux/i386/vfork.S: Likewise.
102         * sysdeps/unix/sysv/linux/ia64/clone2.S: Likewise.
103         * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: Likewise.
104         * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: Likewise.
105         * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: Likewise.
106         * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: Likewise.
107         * sysdeps/unix/sysv/linux/sh/clone.S: Likewise.
108         * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: Likewise.
109         * sysdeps/unix/sysv/linux/sparc/sparc64/clone.S: Likewise.
110         * sysdeps/unix/sysv/linux/x86_64/clone.S: Likewise.
111         * sysdeps/unix/sysv/linux/x86_64/vfork.S: Likewise.
113         * Makefile: Use $(sysdirs) in vpath directive.
115         * sysdeps/pthread/Makefile (CFLAGS-libc-start.c): Variable removed.
116         (CPPFLAGS-timer_routines.c): Likewise.
118         * Makeconfig (includes): Variable removed.
120 2006-02-26  Roland McGrath  <roland@redhat.com>
122         * sysdeps/generic/pt-raise.c: Moved to ...
123         * pt-raise.c: ... here.
124         * sysdeps/generic/lowlevellock.h: Moved to ...
125         * lowlevellock.h: ... here.
127 2006-02-23  Roland McGrath  <roland@redhat.com>
129         * descr.h (struct pthread): Add final member `end_padding'.
130         (PTHREAD_STRUCT_END_PADDING): Use it.
132 2006-02-20  Roland McGrath  <roland@redhat.com>
134         * sysdeps/mips: Directory removed, saved in ports repository.
135         * sysdeps/unix/sysv/linux/mips: Likewise.
137 2006-02-18  Ulrich Drepper  <drepper@redhat.com>
139         * tst-robust1.c: Add second mutex to check that the mutex list is
140         handled correctly.
142 2006-02-17  Jakub Jelinek  <jakub@redhat.com>
144         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_mutex_dead,
145         lll_robust_mutex_trylock, lll_robust_mutex_lock,
146         lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
147         lll_robust_mutex_unlock): New macros.
148         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
149         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
150         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
151         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
152         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: New file.
154 2006-02-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
156         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Add lll_robust_mutex_*
157         definitions.
158         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: New file.
160 2006-02-17  Ulrich Drepper  <drepper@redhat.com>
162         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
163         (lll_robust_mutex_unlock): Avoid unnecessary wakeups.
164         * sysdeps/unix/sysv/linux/i386/lowlevellock.h
165         (lll_robust_mutex_unlock): Likewise.
167 2006-02-13  Jakub Jelinek  <jakub@redhat.com>
169         * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX):
170         Set robust_list.__next rather than robust_list.
171         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
172         (__pthread_list_t): New typedef.
173         (pthread_mutex_t): Replace __next and __prev fields with __list.
174         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
175         (__pthread_list_t): New typedef.
176         (pthread_mutex_t): Replace __next and __prev fields with __list.
177         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
178         (__pthread_list_t, __pthread_slist_t): New typedefs.
179         (pthread_mutex_t): Replace __next and __prev fields with __list.
180         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
181         (__pthread_list_t, __pthread_slist_t): New typedefs.
182         (pthread_mutex_t): Replace __next and __prev fields with __list.
183         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
184         (__pthread_list_t, __pthread_slist_t): New typedefs.
185         (pthread_mutex_t): Replace __next and __prev fields with __list.
186         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h
187         (__pthread_slist_t): New typedef.
188         (pthread_mutex_t): Replace __next field with __list.
190 2006-02-15  Ulrich Drepper  <drepper@redhat.com>
192         * pthreadP.h: Define PTHREAD_MUTEX_INCONSISTENT instead of
193         PTHREAD_MUTEX_OWNERDEAD.
194         (PTHREAD_MUTEX_ROBUST_PRIVATE_NP): Define as 16, not 256.
195         Define FUTEX_WAITERS, FUTEX_OWNER_DIED, FUTEX_TID_MASK.
196         * Makefile (libpthread-routines): Add lowlevelrobustlock.
197         * pthread_create.c (start_thread): Very much simplify robust_list loop.
198         * pthread_mutex_consistent.c: Inconsistent mutex have __owner now set
199         to PTHREAD_MUTEX_INCONSISTENT.
200         * pthread_mutex_destroy.c: Allow destroying of inconsistent mutexes.
201         * pthread_mutex_lock.c: Reimplement robust mutex handling.
202         * pthread_mutex_trylock.c: Likewise.
203         * pthread_mutex_timedlock.c: Likewise.
204         * pthread_mutex_unlock.c: Likewise.
205         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
206         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
207         lowlevelrobustlock.sym.
208         * sysdeps/unix/sysv/linux/lowlevelrobustlock.sym: New file.
209         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add lll_robust_mutex_*
210         definitions.
211         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
212         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: New file.
213         * sysdeps/unix/sysv/linux/i386/i586/lowlevelrobustlock.S: New file.
214         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrobustlock.S: New file.
215         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: New file.
217 2006-02-12  Ulrich Drepper  <drepper@redhat.com>
219         * allocatestack.c (allocate_stack): Initialize robust_list.
220         * init.c (__pthread_initialize_minimal_internal): Likewise.
221         * descr.h (struct xid_command): Pretty printing.
222         (struct pthread): Use __pthread_list_t or __pthread_slist_t for
223         robust_list.  Adjust macros.
224         * pthread_create.c (start_thread): Adjust robust_list handling.
225         * phtread_mutex_unlock.c: Don't allow unlocking from any thread
226         but the owner for all robust mutex types.
227         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
228         __pthread_list_t and __pthread_slist_t.  Use them in pthread_mutex_t.
229         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
230         * sysdeps/pthread/pthread.h: Adjust mutex initializers.
232         * sysdeps/unix/sysv/linux/i386/not-cancel.h: Define openat_not_cancel,
233         openat_not_cancel_3, openat64_not_cancel, and openat64_not_cancel_3.
235 2006-02-08  Jakub Jelinek  <jakub@redhat.com>
237         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait,
238         lll_futex_timedwait, lll_wait_tid): Add "memory" clobber.
240 2006-01-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
242         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_futex_wait):
243         Return status.
244         (lll_futex_timed_wait): Define.
246 2006-01-19  Ulrich Drepper  <drepper@redhat.com>
248         * tst-cancel4.c: Test ppoll.
250 2006-01-18  Andreas Jaeger  <aj@suse.de>
252         [BZ #2167]
253         * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h
254         (pthread_mutex_t): Follow changes for other archs.  Based on patch
255         by Jim Gifford <patches@jg555.com>.
257 2006-01-13  Richard Henderson  <rth@redhat.com>
259         * sysdeps/alpha/tls.h (tcbhead_t): Rename member to __private.
261 2006-01-10  Roland McGrath  <roland@redhat.com>
263         * sysdeps/alpha/jmpbuf-unwind.h: File moved to main source tree.
264         * sysdeps/i386/jmpbuf-unwind.h: Likewise.
265         * sysdeps/mips/jmpbuf-unwind.h: Likewise.
266         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
267         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
268         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
269         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
270         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
271         * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
272         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
274 2006-01-09  Roland McGrath  <roland@redhat.com>
276         * tst-initializers1-c89.c: New file.
277         * tst-initializers1-c99.c: New file.
278         * tst-initializers1-gnu89.c: New file.
279         * tst-initializers1-gnu99.c: New file.
280         * Makefile (tests): Add them.
281         (CFLAGS-tst-initializers1-c89.c): New variable.
282         (CFLAGS-tst-initializers1-c99.c): New variable.
283         (CFLAGS-tst-initializers1-gnu89.c): New variable.
284         (CFLAGS-tst-initializers1-gnu99.c): New variable.
286         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
287         Use __extension__ on anonymous union definition.
288         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
289         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
290         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
291         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
292         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
294 2006-01-08  Jakub Jelinek  <jakub@redhat.com>
296         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
297         Don't give the union a name because it changes the mangled name.
298         Instead name the struct for __data.
299         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_mutex_t):
300         Likewise.
301         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_mutex_t):
302         Likewise.
304 2006-01-09  Jakub Jelinek  <jakub@redhat.com>
306         * sysdeps/sparc/sparc64/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Add
307         stack bias to mc_ftp field.
309 2006-01-07  Ulrich Drepper  <drepper@redhat.com>
311         * sysdeps/pthread/aio_misc.h (AIO_MISC_WAIT): Work around gcc
312         being too clever and reloading the futex value where it shouldn't.
314 2006-01-06  Ulrich Drepper  <drepper@redhat.com>
316         * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX): Use
317         correct type.
319 2006-01-06  Jakub Jelinek  <jakub@redhat.com>
321         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
322         Add cfi directives.
324 2006-01-06  Ulrich Drepper  <drepper@redhat.com>
326         * sysdeps/ia64/tls.h (tcbhead_t): Rename private member to __private.
327         * sysdeps/ia64/tcb-offsets.sym: Adjust for private->__private
328         rename in tcbhead_t.
330         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
331         Don't give the union a name because it changes the mangled name.
332         Instead name the struct for __data.
333         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
334         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
335         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
336         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
337         * pthread_create.c (start_thread): Adjust robust mutex free loop.
338         * descr.h (ENQUEUE_MUTEX, DEQUEUE_MUTEX): Adjust.
340 2006-01-05  Ulrich Drepper  <drepper@redhat.com>
342         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
343         Return status.
344         (lll_futex_timed_wait): Define.
345         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
346         * sysdeps/pthread/aio_misc.h: New file.
348 2006-01-03  Joseph S. Myers  <joseph@codesourcery.com>
350         * Makefile ($(objpfx)$(multidir)): Use mkdir -p.
352 2006-01-03  Steven Munroe  <sjmunroe@us.ibm.com>
354         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
355         (PSEUDO): Remove redundant cfi_startproc and cfi_endproc directives.
356         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
358 2006-01-04  Ulrich Drepper  <drepper@redhat.com>
360         * tst-cancel24.cc: Use C headers instead of C++ headers.
362 2006-01-03  Jakub Jelinek  <jakub@redhat.com>
364         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Remove #error for
365         sparc-linux configured glibc.
366         (lll_futex_wake_unlock): Define to 1 for sparc-linux configured glibc.
367         (__lll_mutex_trylock, __lll_mutex_cond_trylock, __lll_mutex_lock,
368         __lll_mutex_cond_lock, __lll_mutex_timedlock): Use
369         atomic_compare_and_exchange_val_24_acq instead of
370         atomic_compare_and_exchange_val_acq.
371         (lll_mutex_unlock, lll_mutex_unlock_force): Use atomic_exchange_24_rel
372         instead of atomic_exchange_rel.
373         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: New file.
374         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c: New
375         file.
376         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c: New
377         file.
378         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: New file.
379         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: New file.
380         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: New file.
381         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c: New file.
382         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: New file.
383         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
384         New file.
385         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
386         New file.
387         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: New file.
388         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: New file.
389         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c: New
390         file.
391         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_trywait.c: New
392         file.
393         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: New file.
395 2006-01-03  Ulrich Drepper  <drepper@redhat.com>
397         * sysdeps/pthread/pthread.h [__WORDSIZE==64]: Don't use cast in
398         mutex initializers.
400 2006-01-02  Jakub Jelinek  <jakub@redhat.com>
402         * sysdeps/sparc/tls.h (tcbhead_t): Add pointer_guard field.
403         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
404         THREAD_COPY_POINTER_GUARD): Define.
405         * sysdeps/sparc/tcb-offsets.sym (POINTER_GUARD): Define.
406         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Revert 2005-12-27 changes.
408 2006-01-01  Ulrich Drepper  <drepper@redhat.com>
410         * version.c: Update copyright year.
412 2005-12-29  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
414         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Remove explicit
415         .eh_frame section, use cfi_* directives.
416         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Add cfi instrumentation.
418 2005-12-30  Ulrich Drepper  <drepper@redhat.com>
420         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Undo last change for
421         now.
423 2005-12-29  Ulrich Drepper  <drepper@redhat.com>
425         * sysdeps/pthread/sigaction.c: Removed.
426         * sigaction.c: New file.
427         * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-sigaction.c.
429 2005-12-28  Ulrich Drepper  <drepper@redhat.com>
431         * Makefile (tests): Add tst-signal7.
432         * tst-signal7.c: New file.
434 2005-12-27  Roland McGrath  <roland@redhat.com>
436         * sysdeps/x86_64/jmpbuf-unwind.h (_jmpbuf_sp): New inline function.
437         (_JMPBUF_UNWINDS_ADJ): Use it, to PTR_DEMANGLE before comparison.
438         * sysdeps/alpha/jmpbuf-unwind.h: Likewise.
439         * sysdeps/i386/jmpbuf-unwind.h: Likewise.
440         * sysdeps/mips/jmpbuf-unwind.h: Likewise.
441         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
442         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
443         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
444         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
445         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
446         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
448 2005-12-27  Jakub Jelinek  <jakub@redhat.com>
450         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Add __next
451         and __prev field to pthread_mutex_t.
452         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
453         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
454         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
455         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
456         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Add __next field
457         to pthread_mutex_t.
459 2005-12-26  Ulrich Drepper  <drepper@redhat.com>
461         * pthreadP.h: Define PTHREAD_MUTEX_ROBUST_PRIVATE_NP,
462         PTHREAD_MUTEX_ROBUST_PRIVATE_RECURSIVE_NP,
463         PTHREAD_MUTEX_ROBUST_PRIVATE_ERRORCHECK_NP,
464         PTHREAD_MUTEX_ROBUST_PRIVATE_ADAPTIVE_NP,
465         PTHREAD_MUTEXATTR_FLAG_ROBUST, PTHREAD_MUTEXATTR_FLAG_PSHARED,
466         and PTHREAD_MUTEXATTR_FLAG_BITS.
467         * descr.h (struct pthread): Add robust_list field and define
468         ENQUEUE_MUTEX and DEQUEUE_MUTEX macros.
469         * pthread_mutexattr_getrobust.c: New file.
470         * pthread_mutexattr_setrobust.c: New file.
471         * pthread_mutex_consistent.c: New file.
472         * sysdeps/pthread/pthread.h: Declare pthread_mutexattr_getrobust,
473         pthread_mutexattr_setrobust, and pthread_mutex_consistent.
474         Define PTHREAD_MUTEX_STALLED_NP and PTHREAD_MUTEX_ROBUST_NP.
475         Adjust pthread_mutex_t initializers.
476         * nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Add __next
477         field to pthread_mutex_t.
478         * nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Add __next
479         and __prev field to pthread_mutex_t.
480         * Versions [GLIBC_2.4]: Export pthread_mutexattr_getrobust_np,
481         pthread_mutexattr_setrobust_np, and pthread_mutex_consistent_np.
482         * pthread_mutexattr_getpshared.c: Use PTHREAD_MUTEXATTR_FLAG_PSHARED
483         and PTHREAD_MUTEXATTR_FLAG_BITS macros instead of magic numbers.
484         * pthread_mutexattr_gettype.c: Likewise.
485         * pthread_mutexattr_setpshared.c: Likewise.
486         * pthread_mutexattr_settype.c: Likewise.
487         * pthread_mutex_init.c: Reject robust+pshared attribute for now.
488         Initialize mutex kind according to robust flag.
489         * pthread_mutex_lock.c: Implement local robust mutex.
490         * pthread_mutex_timedlock.c: Likewise.
491         * pthread_mutex_trylock.c: Likewise.
492         * pthread_mutex_unlock.c: Likewise.
493         * pthread_create.c (start_thread): Mark robust mutexes which remained
494         locked as dead.
495         * tst-robust1.c: New file.
496         * tst-robust2.c: New file.
497         * tst-robust3.c: New file.
498         * tst-robust4.c: New file.
499         * tst-robust5.c: New file.
500         * tst-robust6.c: New file.
501         * tst-robust7.c: New file.
502         * Makefile (libpthread-routines): Add pthread_mutexattr_getrobust,
503         pthread_mutexattr_setrobust, and pthread_mutex_consistent.
504         (tests): Add tst-robust1, tst-robust2, tst-robust3, tst-robust4,
505         tst-robust5, tst-robust6, and tst-robust7.
507         * tst-typesizes.c: New file.
508         * Makefile (tests): Add tst-typesizes.
510         * tst-once3.c: More debug output.
512 2005-12-24  Ulrich Drepper  <drepper@redhat.com>
514         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Add break
515         missing after last change.
517         * version.c: Update copyright year.
519 2005-12-23  Ulrich Drepper  <drepper@redhat.com>
521         * pthread_mutex_destroy.c: Set mutex type to an invalid value.
522         * pthread_mutex_lock.c: Return EINVAL for invalid mutex type.
523         * pthread_mutex_trylock.c: Likewise.
524         * pthread_mutex_timedlock.c: Likewise.
525         * pthread_mutex_unlock.c: Likewise.
527 2005-12-22  Roland McGrath  <roland@redhat.com>
529         * sysdeps/pthread/sigaction.c: Use "" instead of <> to include self,
530         so that #include_next's search location is not reset to the -I..
531         directory where <nptl/...> can be found.
533 2005-12-22  Ulrich Drepper  <drepper@redhat.com>
535         [BZ #1913]
536         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
537         Fix unwind info.  Remove useless branch prediction prefix.
538         * tst-cancel24.cc: New file.
539         * Makefile: Add rules to build and run tst-cancel24.
541 2005-12-21  Roland McGrath  <roland@redhat.com>
543         * libc-cancellation.c: Use <> rather than "" #includes.
544         * pt-cleanup.c: Likewise.
545         * pthread_create.c: Likewise.
546         * pthread_join.c: Likewise.
547         * pthread_timedjoin.c: Likewise.
548         * pthread_tryjoin.c: Likewise.
549         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Likewise.
550         * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
551         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
552         * unwind.c: Likewise.
554 2005-12-19  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
556         * sysdeps/sh/tcb-offsets.sym: Add POINTER_GUARD.
557         * sysdeps/sh/tls.h (tcbhead_t): Remove private and add pointer_guard.
558         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
559         THREAD_COPY_POINTER_GUARD): Define.
561 2005-12-19  Jakub Jelinek  <jakub@redhat.com>
563         * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): Make room for 2 uintptr_t's
564         rather than one.
565         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
566         THREAD_COPY_POINTER_GUARD): Define.
567         * sysdeps/powerpc/tcb-offsets.sym (POINTER_GUARD): Add.
568         * sysdeps/powerpc/tls.h (tcbhead_t): Add pointer_guard field.
569         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
570         THREAD_COPY_POINTER_GUARD): Define.
571         * sysdeps/s390/tcb-offsets.sym (STACK_GUARD): Add.
572         * sysdeps/s390/tls.h (THREAD_GET_POINTER_GUARD,
573         THREAD_SET_POINTER_GUARD, THREAD_COPY_POINTER_GUARD): Define.
574         * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S (__ia64_longjmp):
575         Use PTR_DEMANGLE for B0 if defined.
577 2005-12-17  Ulrich Drepper  <drepper@redhat.com>
579         * pthread_create.c (__pthread_create_2_1): Use
580         THREAD_COPY_POINTER_GUARD if available.
581         * sysdeps/i386/tcb-offsets.sym: Add POINTER_GUARD.
582         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
583         * sysdeps/i386/tls.h (tcbhead_t): Add pointer_guard.
584         Define THREAD_SET_POINTER_GUARD and THREAD_COPY_POINTER_GUARD.
585         * sysdeps/x86_64/tls.h: Likewise.
587 2005-12-15  Roland McGrath  <roland@redhat.com>
589         * sysdeps/unix/sysv/linux/mq_notify.c: Don't use sysdeps/generic.
591 2005-12-13  Ulrich Drepper  <drepper@redhat.com>
593         * sysdeps/pthread/sigfillset.c: Adjust for files moved out of
594         sysdeps/generic.
595         * errno-loc.c: New file.
597 2005-12-12  Roland McGrath  <roland@redhat.com>
599         * init.c (__pthread_initialize_minimal_internal): Do __static_tls_size
600         adjustments before choosing stack size.  Update minimum stack size
601         calculation to match allocate_stack change.
603 2005-12-12  Ulrich Drepper  <drepper@redhat.com>
605         * allocatestack.c (allocate_stack): Don't demand that there is an
606         additional full page available on the stack beside guard, TLS, the
607         minimum stack.
609 2005-11-24  Ulrich Drepper  <drepper@redhat.com>
611         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
612         (__cleanup_fct_attribute): Use __regparm__ not regparm.
614         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: When
615         compiling 32-bit code we must define __cleanup_fct_attribute.
617 005-11-24  Jakub Jelinek  <jakub@redhat.com>
619         [BZ #1920]
620         * sysdeps/pthread/pthread.h (__pthread_unwind_next): Use
621         __attribute__ instead of __attribute.
622         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
623         (__cleanup_fct_attribute): Likewise.
625 2005-11-17  Jakub Jelinek  <jakub@redhat.com>
627         * sysdeps/pthread/unwind-forcedunwind.c (pthread_cancel_init): Put
628         a write barrier before writing libgcc_s_getcfa.
630 2005-11-06  Ulrich Drepper  <drepper@redhat.com>
632         * sysdeps/unix/sysv/linux/configure: Removed.
634 2005-11-05  Ulrich Drepper  <drepper@redhat.com>
636         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Remove trace of
637         optional init_array/fini_array support.
639 2005-10-24  Roland McGrath  <roland@redhat.com>
641         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Remove unnecessary
642         versioned_symbol use.
644 2005-10-16  Roland McGrath  <roland@redhat.com>
646         * init.c (__pthread_initialize_minimal_internal): Even when using a
647         compile-time default stack size, apply the minimum that allocate_stack
648         will require, and round up to page size.
650 2005-10-10  Daniel Jacobowitz  <dan@codesourcery.com>
652         * Makefile ($(test-modules)): Remove static pattern rule.
654 2005-10-14  Jakub Jelinek  <jakub@redhat.com>
655             Ulrich Drepper  <drepper@redhat.com>
657         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix stack
658         alignment in callback function.
659         * Makefile: Add rules to build and run tst-align3.
660         * tst-align3.c: New file.
662 2005-10-03  Jakub Jelinek  <jakub@redhat.com>
664         * allocatestack.c (setxid_signal_thread): Add
665         INTERNAL_SYSCALL_DECL (err).
667 2005-10-02  Jakub Jelinek  <jakub@redhat.com>
669         * allocatestack.c (setxid_signal_thread): Need to use
670         atomic_compare_and_exchange_bool_acq.
672 2005-10-01  Ulrich Drepper  <drepper@redhat.com>
673             Jakub Jelinek  <jakub@redhat.com>
675         * descr.h: Define SETXID_BIT and SETXID_BITMASK.  Adjust
676         CANCEL_RESTMASK.
677         (struct pthread): Move specific_used field to avoid padding.
678         Add setxid_futex field.
679         * init.c (sighandler_setxid): Reset setxid flag and release the
680         setxid futex.
681         * allocatestack.c (setxid_signal_thread): New function.  Broken
682         out of the bodies of the two loops in __nptl_setxid.  For undetached
683         threads check whether they are exiting and if yes, don't send a signal.
684         (__nptl_setxid): Simplify loops by using setxid_signal_thread.
685         * pthread_create.c (start_thread): For undetached threads, check
686         whether setxid bit is set.  If yes, wait until signal has been
687         processed.
689         * allocatestack.c (STACK_VARIABLES): Initialize them.
690         * pthread_create.c (__pthread_create_2_1): Initialize pd.
692 2004-09-02  Jakub Jelinek  <jakub@redhat.com>
694         * pthread_cond_destroy.c (__pthread_cond_destroy): If there are
695         waiters, awake all waiters on the associated mutex.
697 2005-09-22  Roland McGrath  <roland@redhat.com>
699         * perf.c [__x86_64__] (HP_TIMING_NOW): New macro (copied from
700         ../sysdeps/x86_64/hp-timing.h).
702 2005-08-29  Jakub Jelinek  <jakub@redhat.com>
704         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_WAKE_OP,
705         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
706         (lll_futex_wake_unlock): Define.
707         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_WAKE_OP,
708         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
709         (lll_futex_wake_unlock): Define.
710         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_WAKE_OP,
711         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
712         (lll_futex_wake_unlock): Define.
713         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_WAKE_OP,
714         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
715         (lll_futex_wake_unlock): Define.
716         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_WAKE_OP,
717         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
718         (lll_futex_wake_unlock): Define.
719         * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal): Use
720         lll_futex_wake_unlock.
721         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
722         (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
723         (__pthread_cond_signal): Use FUTEX_WAKE_OP.
724         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
725         (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
726         (__pthread_cond_signal): Use FUTEX_WAKE_OP.
728 2005-09-05  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
730         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
731         Fix typo in register name.
733 2005-08-23  Ulrich Drepper  <drepper@redhat.com>
735         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
736         Use __sigfillset.  Document that sigfillset does the right thing wrt
737         to SIGSETXID.
739 2005-07-11  Jakub Jelinek  <jakub@redhat.com>
741         [BZ #1102]
742         * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER,
743         PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP,
744         PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP,
745         PTHREAD_MUTEX_ADAPTIVE_NP, PTHREAD_RWLOCK_INITIALIZER,
746         PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP,
747         PTHREAD_COND_INITIALIZER): Supply zeros for all fields
748         in the structure.
749         * Makefile (tests): Add tst-initializers1.
750         (CFLAGS-tst-initializers1.c): Set.
751         * tst-initializers1.c: New test.
753 2005-07-11  Jakub Jelinek  <jakub@redhat.com>
755         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_rwlock_t):
756         Make sure __flags are located at offset 48 from the start of the
757         structure.
759 2005-07-02  Roland McGrath  <roland@redhat.com>
761         * Makeconfig: Comment fix.
763 2005-07-05  Jakub Jelinek  <jakub@redhat.com>
765         * descr.h (PTHREAD_STRUCT_END_PADDING): Define.
766         * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): If PTHREAD_STRUCT_END_PADDING
767         is smaller than 8 bytes, increase TLS_PRE_TCB_SIZE by 16 bytes.
768         (THREAD_SYSINFO, THREAD_SELF, DB_THREAD_SELF): Don't assume
769         TLS_PRE_TCB_SIZE is sizeof (struct pthread).
770         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
771         * sysdeps/ia64/tcb-offsets.sym (PID, TID, MULTIPLE_THREADS_OFFSET):
772         Use TLS_PRE_TCB_SIZE instead of sizeof (struct pthread).
773         * sysdeps/unix/sysv/linux/ia64/createthread.c (TLS_VALUE): Don't
774         assume TLS_PRE_TCB_SIZE is sizeof (struct pthread).
776 2005-06-25  Jakub Jelinek  <jakub@redhat.com>
778         * sysdeps/i386/tls.h (tcbhead_t): Add stack_guard field.
779         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
780         * sysdeps/x86_64/tls.h (tcbhead_t): Add sysinfo and stack_guard
781         fields.
782         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
783         * sysdeps/s390/tls.h (tcbhead_t): Add stack_guard
784         field.  Put in sysinfo field unconditionally.
785         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
786         * sysdeps/powerpc/tls.h (tcbhead_t): Add stack_guard field.
787         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
788         * sysdeps/sparc/tls.h (tcbhead_t): Add sysinfo and stack_guard
789         fields.
790         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
791         * pthread_create.c (__pthread_create_2_1): Use
792         THREAD_COPY_STACK_GUARD macro.
793         * Makefile: Add rules to build and run tst-stackguard1{,-static}
794         tests.
795         * tst-stackguard1.c: New file.
796         * tst-stackguard1-static.c: New file.
798 2005-06-14  Alan Modra  <amodra@bigpond.net.au>
800         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
801         Invoke CGOTSETUP and CGOTRESTORE.
802         (CGOTSETUP, CGOTRESTORE): Define.
804 2005-05-29  Richard Henderson  <rth@redhat.com>
806         * tst-cancel4.c (WRITE_BUFFER_SIZE): New.
807         (tf_write, tf_writev): Use it.
808         (do_test): Use socketpair instead of pipe.  Set SO_SNDBUF to
809         the system minimum.
811 2005-05-23  Jakub Jelinek  <jakub@redhat.com>
813         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
814         [IS_IN_librt] (CENABLE, CDISABLE): Use JUMPTARGET instead of
815         __librt_*_asynccancel@local.
817 2005-05-17  Alan Modra  <amodra@bigpond.net.au>
819         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Delete
820         all occurrences of JUMPTARGET.  Instead append @local to labels.
822 2005-05-20  Jakub Jelinek  <jakub@redhat.com>
824         * sysdeps/i386/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN): Define to
825         size/alignment of struct pthread rather than tcbhead_t.
826         * sysdeps/x86_64/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
827         Likewise.
828         * sysdeps/s390/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
829         Likewise.
830         * sysdeps/sparc/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
831         Likewise.
833 2005-05-19  Richard Henderson  <rth@redhat.com>
835         * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use
836         __sync_val_compare_and_swap, not explicit _si variant.
837         * sysdeps/ia64/pthread_spin_trylock.c (pthread_spin_trylock): Likewise.
839 2005-05-03  Ulrich Drepper  <drepper@redhat.com>
841         [BZ #915]
842         * sysdeps/pthread/pthread.h: Avoid empty initializers.
844 2005-05-03  Jakub Jelinek  <jakub@redhat.com>
846         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Remove explicit
847         .eh_frame section, use cfi_* directives.
849 2005-04-27  Jakub Jelinek  <jakub@redhat.com>
851         * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: Use <> instead
852         of "" includes.
854 2005-04-27  Ulrich Drepper  <drepper@redhat.com>
856         [BZ #1075]
857         * tst-cancel17.c (do_test): Add arbitrary factor to make sure
858         aio_write blocks.
860 2005-04-27  Roland McGrath  <roland@redhat.com>
862         * Makefile (tests): Remove tst-clock2.
864         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Handle
865         CLOCK_PROCESS_CPUTIME_ID and CLOCK_PROCESS_THREAD_ID specially,
866         translating to the kernel clockid_t for our own process/thread clock.
868         * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: New file.
870 2005-04-15  Jakub Jelinek  <jakub@redhat.com>
872         * old_pthread_cond_init.c: Include <errno.h>.
873         (__pthread_cond_init_2_0): Fail with EINVAL if COND_ATTR is
874         process shared or uses clock other than CLOCK_REALTIME.
875         * pthread_cond_init.c (__pthread_cond_init): Remove bogus comment.
877 2005-04-13  David S. Miller  <davem@davemloft.net>
879         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: New file.
880         * sysdeps/sparc/sparc64/clone.S: New file.
882 2005-04-05  Jakub Jelinek  <jakub@redhat.com>
884         [BZ #1102]
885         * sysdeps/pthread/pthread.h (__pthread_cleanup_routine): Use
886         __inline instead of inline.
887         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_routine): Likewise.
889 2005-03-31  Jakub Jelinek  <jakub@redhat.com>
891         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Use
892         functionally equivalent, but shorter instructions.
893         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
894         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
895         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
896         Likewise.
897         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
898         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
899         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
900         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
901         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
902         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
903         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
904         Likewise.
905         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
906         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
907         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
908         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
909         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
911 2005-03-28  Daniel Jacobowitz  <dan@codesourcery.com>
913         * sysdeps/mips/Makefile: New file.
914         * sysdeps/mips/nptl-sysdep.S: New file.
915         * sysdeps/mips/tcb-offsets.sym: New file.
916         * sysdeps/mips/pthread_spin_lock.S: New file.
917         * sysdeps/mips/pthread_spin_trylock.S: New file.
918         * sysdeps/mips/pthreaddef.h: New file.
919         * sysdeps/mips/tls.h: New file.
920         * sysdeps/mips/jmpbuf-unwind.h: New file.
921         * sysdeps/unix/sysv/linux/mips/lowlevellock.h: New file.
922         * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h: New file.
923         * sysdeps/unix/sysv/linux/mips/bits/semaphore.h: New file.
924         * sysdeps/unix/sysv/linux/mips/pthread_once.c: New file.
925         * sysdeps/unix/sysv/linux/mips/fork.c: New file.
926         * sysdeps/unix/sysv/linux/mips/pt-vfork.S: New file.
927         * sysdeps/unix/sysv/linux/mips/vfork.S: New file.
928         * sysdeps/unix/sysv/linux/mips/clone.S: New file.
929         * sysdeps/unix/sysv/linux/mips/createthread.c: New file.
930         * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: New file.
932 2005-03-23  Ulrich Drepper  <drepper@redhat.com>
934         [BZ #1112]
935         * pthread_create.c (__pthread_create_2_1): Rename syscall error
936         variable to scerr.
938 2005-03-10  Jakub Jelinek  <jakub@redhat.com>
940         * tst-getpid1.c (do_test): Align stack passed to clone{2,}.
942 2005-02-25  Roland McGrath  <roland@redhat.com>
944         * alloca_cutoff.c: Correct license text.
945         * tst-unload.c: Likewise.
946         * sysdeps/pthread/allocalim.h: Likewise.
947         * sysdeps/pthread/pt-initfini.c: Likewise.
948         * sysdeps/pthread/bits/libc-lock.h: Likewise.
949         * sysdeps/pthread/bits/sigthread.h: Likewise.
950         * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
951         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
953 2005-02-16  Roland McGrath  <roland@redhat.com>
955         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
956         Use unsigned int * for ptr_nthreads.
958 2005-02-14  Alan Modra  <amodra@bigpond.net.au>
960         [BZ #721]
961         * sysdeps/powerpc/tcb-offsets.sym (thread_offsetof): Redefine to suit
962         gcc4.
964 2005-02-07  Richard Henderson  <rth@redhat.com>
966         [BZ #787]
967         * sysdeps/pthread/pthread.h (__sigsetjmp): Use pointer as first
968         argument.
970 2004-11-03  Marcus Brinkmann  <marcus@gnu.org>
972         * sysdeps/generic/lowlevellock.h (__generic_mutex_unlock): Fix
973         order of arguments in invocation of atomic_add_zero.
975 2005-01-26  Jakub Jelinek  <jakub@redhat.com>
977         [BZ #737]
978         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S (__new_sem_trywait):
979         Use direct %gs segment access or, if NO_TLS_DIRECT_SEG_REFS,
980         at least gotntpoff relocation and addition.
981         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
982         Likewise.
983         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
984         Likewise.
985         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
986         Likewise.
988 2005-01-06  Ulrich Drepper  <drepper@redhat.com>
990         * allocatestack.c (init_one_static_tls): Adjust initialization of DTV
991         entry for static tls deallocation fix.
992         * sysdeps/alpha/tls.h (dtv_t): Change pointer type to be struct which
993         also contains information whether the memory pointed to is static
994         TLS or not.
995         * sysdeps/i386/tls.h: Likewise.
996         * sysdeps/ia64/tls.h: Likewise.
997         * sysdeps/powerpc/tls.h: Likewise.
998         * sysdeps/s390/tls.h: Likewise.
999         * sysdeps/sh/tls.h: Likewise.
1000         * sysdeps/sparc/tls.h: Likewise.
1001         * sysdeps/x86_64/tls.h: Likewise.
1003 2004-12-27  Ulrich Drepper  <drepper@redhat.com>
1005         * init.c (__pthread_initialize_minimal_internal): Use __sigemptyset.
1007 2004-12-21  Jakub Jelinek  <jakub@redhat.com>
1009         * sysdeps/i386/tls.h (CALL_THREAD_FCT): Maintain 16 byte alignment of
1010         %esp.
1011         * Makefile (tests): Add tst-align2.
1012         * tst-align2.c: New test.
1013         * sysdeps/i386/Makefile (CFLAGS-tst-align{,2}.c): Add
1014         -mpreferred-stack-boundary=4.
1016 2004-12-18  Roland McGrath  <roland@redhat.com>
1018         * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h:
1019         New file removed withdrawn for the moment.
1021 2004-12-17  Richard Henderson  <rth@redhat.com>
1023         * sysdeps/unix/sysv/linux/alpha/clone.S: New file.
1024         * sysdeps/alpha/tcb-offsets.sym (TID_OFFSET): New.
1026 2004-12-16  Ulrich Drepper  <drepper@redhat.com>
1028         * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h: New file.
1029         Increased PTHREAD_STACK_MIN.
1031         * tst-context1.c (stacks): Use bigger stack size.
1033 2004-12-16  Jakub Jelinek  <jakub@redhat.com>
1035         * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: New file.
1036         * sysdeps/sparc/tcb-offsets.sym: Add TID.
1038 2004-12-15  Jakub Jelinek  <jakub@redhat.com>
1040         * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: New file.
1041         * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: New file.
1042         * sysdeps/s390/tcb-offsets.sym (TID): Add.
1044 2004-12-15  Ulrich Drepper  <drepper@redhat.com>
1046         * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: New file.
1048 2004-12-14  Ulrich Drepper  <drepper@redhat.com>
1050         * sysdeps/powerpc/tcb-offsets.sym: Add TID.
1051         * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: New file.
1053         * tst-getpid1.c: If child crashes, report this first.  Print which
1054         signal.
1056 2004-12-09  Ulrich Drepper  <drepper@redhat.com>
1058         * init.c (__pthread_initialize_minimal_internal): Also unblock
1059         SIGSETXID.
1061 2004-12-01  Jakub Jelinek  <jakub@redhat.com>
1063         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_CPUTIME,
1064         _POSIX_THREAD_CPUTIME): Define to 0.
1065         * sysdeps/pthread/timer_create.c (timer_create): Remove unused code
1066         handling CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID.
1067         * sysdeps/pthread/timer_routines.c (__timer_signal_thread_pclk,
1068         __timer_signal_thread_tclk): Remove.
1069         (init_module): Remove their initialization.
1070         (thread_cleanup): Remove their cleanup assertions.
1071         * sysdeps/pthread/posix-timer.h (__timer_signal_thread_pclk,
1072         __timer_signal_thread_tclk): Remove.
1073         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Removed.
1074         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Removed.
1075         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Removed.
1077 2004-12-07  Jakub Jelinek  <jakub@redhat.com>
1079         * sysdeps/ia64/tcb-offsets.sym (TID): Add.
1080         * sysdeps/unix/sysv/linux/ia64/clone2.S: New file.
1082         * Makefile (tests): Add tst-getpid2.
1083         * tst-getpid1.c (TEST_CLONE_FLAGS): Define.
1084         (do_test): Use it.  Use __clone2 instead of clone on ia64.
1085         * tst-getpid2.c: New test.
1087 2004-12-07  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1089         * sysdeps/unix/sysv/linux/sh/clone.S: New file.
1091 2004-12-04  Ulrich Drepper  <drepper@redhat.com>
1093         * Makefile (tests): Add tst-getpid1.
1094         * tst-getpid1.c: New file.
1095         * sysdeps/unix/sysv/linux/i386/clone.S: New file.
1096         * sysdeps/unix/sysv/linux/x86_64/clone.S: New file.
1098 2004-12-02  Roland McGrath  <roland@redhat.com>
1100         * Makefile (libpthread-nonshared): Variable removed.
1101         ($(objpfx)libpthread_nonshared.a): Target removed.
1102         ($(inst_libdir)/libpthread_nonshared.a): Likewise.
1103         These are now handled by generic magic from
1104         libpthread-static-only-routines being set.
1106 2004-11-27  Ulrich Drepper  <drepper@redhat.com>
1108         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_PRIORITIZED_IO,
1109         _POSIX2_CHAR_TERM, _POSIX_THREAD_PRIO_INHERIT,
1110         _POSIX_THREAD_PRIO_PROTECT): Define.
1111         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1112         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
1113         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
1115 2004-11-26  Jakub Jelinek  <jakub@redhat.com>
1117         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_ADVISORY_INFO,
1118         _POSIX_SPORADIC_SERVER, _POSIX_THREAD_SPORADIC_SERVER, _POSIX_TRACE,
1119         _POSIX_TRACE_EVENT_FILTER, _POSIX_TRACE_INHERIT, _POSIX_TRACE_LOG,
1120         _POSIX_TYPED_MEMORY_OBJECTS, _POSIX_IPV6, _POSIX_RAW_SOCKETS): Define.
1121         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1122         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
1123         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
1125 2004-11-24  Ulrich Drepper  <drepper@redhat.com>
1127         * sysdeps/x86_64/Makefile [nptl]: Define CFLAGS-pthread_create.c.
1129         * Makefile (libpthread-routines): Add pthread_setschedprio.
1130         * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setschedprio.
1131         * sysdeps/pthread/pthread.h: Declare pthread_setschedprio.
1132         * pthread_setschedprio.c: New file.
1134 2004-11-20  Jakub Jelinek  <jakub@redhat.com>
1136         * pthread_create.c (pthread_cancel): Add PTHREAD_STATIC_FN_REQUIRE.
1137         * pthread_cancel.c (pthread_create): Likewise.
1139         * Makefile (libpthread-routines): Add vars.
1140         * sysdeps/pthread/createthread.c (__pthread_multiple_threads): Remove.
1141         * init.c (__default_stacksize, __is_smp): Remove.
1142         * vars.c: New file.
1143         * pthreadP.h (__find_thread_by_id): If !SHARED, add weak_function
1144         and define a wrapper macro.
1145         (PTHREAD_STATIC_FN_REQUIRE): Define.
1146         * allocatestack.c (__find_thread_by_id): Undefine.
1147         * pthread_create (__pthread_keys): Remove.
1148         (pthread_mutex_lock, pthread_mutex_unlock, pthread_once,
1149         pthread_key_create, pthread_setspecific, pthread_getspecific): Add
1150         PTHREAD_STATIC_FN_REQUIRE.
1152 2004-11-18  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1154         * sysdeps/sh/tls.h (DB_THREAD_SELF): Set the correct bias
1155         parameter to REGISTER macro.
1157 2004-11-17  Roland McGrath  <roland@redhat.com>
1159         * sysdeps/unix/sysv/linux/timer_routines.c (__start_helper_thread):
1160         Make sure SIGCANCEL is blocked as well.
1162 2004-11-10  Jakub Jelinek  <jakub@redhat.com>
1164         * sysdeps/pthread/setxid.h: New file.
1165         * sysdeps/pthread/pthread-functions.h (HAVE_PTR__NPTL_SETXID): Remove.
1166         (struct xid_command): Add forward decl.
1167         (struct pthread_functions): Change return type of __nptl_setxid hook
1168         to int.
1169         * pthreadP.h (__nptl_setxid): Change return type to int.
1170         * allocatestack.c (__nptl_setxid): Call INTERNAL_SYSCALL_NCS in the
1171         calling thread, return its return value and set errno on failure.
1172         * descr.h (struct xid_command): Change id type to long array.
1174         * Makefile: Add rules to build and test tst-setuid1 and
1175         tst-setuid1-static.
1176         * tst-setuid1.c: New test.
1177         * tst-setuid1-static.c: New test.
1179 2004-11-10  Jakub Jelinek  <jakub@redhat.com>
1181         * Makefile (tests): Add tst-exit3.
1182         * tst-exit3.c: New test.
1184 2004-11-09  Ulrich Drepper  <drepper@redhat.com>
1186         * Makefile (tests): Add tst-exit2.
1187         * tst-exit2.c: New file.
1189 2004-11-09  Roland McGrath  <roland@redhat.com>
1191         [BZ #530]
1192         * sysdeps/pthread/createthread.c (do_clone): Increment __nptl_nthreads
1193         here, before calling clone.
1194         * pthread_create.c (start_thread): Don't do it here.
1196 2004-11-02  Jakub Jelinek  <jakub@redhat.com>
1198         * sysdeps/unix/sysv/linux/smp.h: Include <errno.h>.
1200 2004-10-29  Kaz  Kojima  <kkojima@rr.iij4u.or.jp>
1202         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
1203         Set ETIMEDOUT to errno when time is up.  Tweak to avoid
1204         assembler warning.
1206 2004-10-28  Jakub Jelinek  <jakub@redhat.com>
1208         * pthread_create.c (__pthread_create_2_1): Avoid leaking stacks
1209         if sched_priority is not between minprio and maxprio.
1211 2004-10-25  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1213         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
1214         (__pthread_cond_timedwait): Use clock_gettime syscall if exists.
1216         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
1217         (__lll_mutex_timedlock_wait): Fix a bad branch condition.
1219 2004-10-24  Ulrich Drepper  <drepper@redhat.com>
1221         * sysdeps/unix/sysv/linux/smp.h (is_smp_system): Use
1222         not-cancelable I/O functions.
1224 2004-10-21  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1226         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
1227         (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
1228         make sure 2 is stored in the futex and we looked at the old value.
1229         Fix a few other problems to return the correct value.
1231 2004-10-14  Richard Henderson  <rth@redhat.com>
1233         * sysdeps/alpha/tcb-offsets.sym (thread_offsetof): Redefine to
1234         make gcc4 happy.
1236 2004-10-06  Jakub Jelinek  <jakub@redhat.com>
1238         * sysdeps/unix/sysv/linux/jmp-unwind.c: Include pthreadP.h instead
1239         of pthread-functions.h and pthreaddef.h.
1240         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Likewise.
1242         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
1243         Change __data.__nwaiters from int to unsigned int.
1245         * tst-clock2.c (do_test): Don't fail if _POSIX_THREAD_CPUTIME == 0 and
1246         sysconf (_SC_THREAD_CPUTIME) returns negative value.
1248         * allocatestack.c (__find_thread_by_id): Move attribute_hidden
1249         before return type.
1251         * sysdeps/s390/jmpbuf-unwind.h: Include bits/wordsize.h.
1252         (JMPBUF_CFA_UNWINDS_ADJ): Subtract 96 resp. 160 bytes from CFA.
1254 2004-10-06  Ulrich Drepper  <drepper@redhat.com>
1256         * tst-cancel4.c (tf_msgrcv): Check for failure in msgget.  If the
1257         test fails, remove message queue.
1258         (tf_msgsnd): Likewise.
1260 2004-10-05  Jakub Jelinek  <jakub@redhat.com>
1262         * tst-clock1.c: Change #ifdef to #if defined.
1263         * tst-clock2.c: Likewise.
1264         * tst-cond11.c: Likewise.
1266         * sysdeps/pthread/timer_create.c (timer_create): Use
1267         defined _POSIX_CPUTIME && _POSIX_CPUTIME >= 0 instead of
1268         defined CLOCK_PROCESS_CPUTIME_ID #ifs and similarly for
1269         THREAD_CPUTIME.
1271 2004-10-05  Jakub Jelinek  <jakub@redhat.com>
1273         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h (_POSIX_CPUTIME,
1274         _POSIX_THREAD_CPUTIME): Define to 0.
1276 2004-10-04  Ulrich Drepper  <drepper@redhat.com>
1278         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Define _POSIX_CPUTIME
1279         and _POSIX_THREAD_CPUTIME to zero.
1280         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
1281         * tst-barrier2.c: Fix testing for POSIX feature.
1282         * tst-clock1.c: Likewise.
1283         * tst-clock2.c: Likewise.
1284         * tst-cond11.c: Likewise.
1285         * tst-cond4.c: Likewise.
1286         * tst-cond6.c: Likewise.
1287         * tst-flock2.c: Likewise.
1288         * tst-mutex4.c: Likewise.
1289         * tst-mutex9.c: Likewise.
1290         * tst-rwlock12.c: Likewise.
1291         * tst-rwlock4.c: Likewise.
1292         * tst-signal1.c: Likewise.
1293         * tst-spin2.c: Likewise.
1294         * sysdeps/pthread/posix-timer.h: Likewise.
1295         * sysdeps/pthread/timer_create.c: Likewise.
1296         * sysdeps/pthread/timer_routines.c: Likewise.
1298 2004-10-01  Ulrich Drepper  <drepper@redhat.com>
1300         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
1301         (__lll_mutex_timedlock_wait): Address futex correctly.
1303         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
1304         (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
1305         make sure 2 is stored in the futex and we looked at the old value.
1306         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
1307         (__lll_mutex_timedlock_wait): Likewise.  Fix a few other problems
1308         which might very well made the code not working at all before.
1309         [BZ #417]
1311 2004-09-28  Ulrich Drepper  <drepper@redhat.com>
1313         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
1314         allow SIGSETXID to be sent.
1315         * sysdeps/pthread/sigaction.c (__sigaction): Don't allow action
1316         for SIGSETXID to be defined.
1317         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
1318         SIGSETXID cannot be blocked.
1320         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
1321         Add __extension__ to long long types.
1322         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
1323         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
1324         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
1325         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
1326         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
1327         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
1328         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
1330 2004-09-25  Ulrich Drepper  <drepper@redhat.com>
1332         * descr.h (struct pthread): Add stopped_start field.
1333         * sysdeps/pthread/createthread.c (create_thread): Set
1334         start_stopped flag in descriptor for new thread appropriately.
1335         * pthread_create.c (start_thread): Only take lock to be stopped on
1336         startup if stopped_start flag says so.
1338 2004-09-24  Ulrich Drepper  <drepper@redhat.com>
1340         * pthread_create.c (__pthread_create_2_1): Remember whether thread
1341         is created detached and if yes, do not try to free the stack in case
1342         the thread creation failed.
1343         * sysdeps/pthread/createthread.c (do_clone): Free stack here if clone
1344         call fails.  Don't depend on INTERNAL_SYSCALL_ERRNO return zero in
1345         case there has been no error.  [BZ #405]
1347         * pthread_create.c (start_thread): Don't wait for scheduler data
1348         etc to be set at the beginning of the function.  The cancellation
1349         infrastructure must have been set up.  And enable async
1350         cancellation before potentially going to sleep.  [BZ #401]
1352 2004-09-20  Ulrich Drepper  <drepper@redhat.com>
1354         * Versions: Remove exports for pthread_set*id_np functions.
1355         * sysdeps/pthread/pthread.h: Remove pthread_set*id_np prototypes
1356         for now.
1357         * Makefile: Don't build pthread_set*id code for now.
1359 2004-09-19  Ulrich Drepper  <drepper@redhat.com>
1361         * sysdeps/unix/sysv/linux/allocrtsig.c: Allocate second signal for
1362         internal use.
1363         * allocatestack.c (__nptl_setxid): New function.
1364         * descr.h (struct xid_command): Define type.
1365         * init.c (pthread_functions): Add ptr__nptl_setxid initialization.
1366         (sighandler_setxid): New function.
1367         (__pthread_initialize_minimal): Register sighandler_setxid for
1368         SIGCANCEL.
1369         * pt-allocrtsig.c: Update comment.
1370         * pthreadP.h: Define SIGSETXID.  Declare __xidcmd variable.
1371         Declare __nptl_setxid.
1372         * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_setxid.
1373         * sysdeps/pthread/pthread.h: Declare pthread_setgid_np,
1374         pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
1375         pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
1376         and pthread_setresuid_np.
1377         * pthread_setgid_np.c: New file.
1378         * pthread_setuid_np.c: New file.
1379         * pthread_setegid_np.c: New file.
1380         * pthread_seteuid_np.c: New file.
1381         * pthread_setregid_np.c: New file.
1382         * pthread_setreuid_np.c: New file.
1383         * pthread_setresgid_np.c: New file.
1384         * pthread_setresuid_np.c: New file.
1385         * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setgid_np,
1386         pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
1387         pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
1388         and pthread_setresuid_np.
1389         * Makefile (libpthread-routines): Add pthread_setuid, pthread_seteuid,
1390         pthread_setreuid, pthread_setresuid, pthread_setgid, pthread_setegid,
1391         pthread_setregid, and pthread_setresgid.
1393 2004-09-18  Ulrich Drepper  <drepper@redhat.com>
1395         * allocatestack.c (allocate_stack): Return EAGAIN instead of
1396         ENOMEM when out of memory.
1398 2004-09-10  Roland McGrath  <roland@redhat.com>
1400         [BZ #379]
1401         * allocatestack.c (allocate_stack): Remove [__ASSUME_CLONE_STOPPED]
1402         code, since we don't try to use the broken CLONE_STOPPED any more.
1403         * pthread_create.c (start_thread): Likewise.
1405 2004-09-15  Richard Henderson  <rth@redhat.com>
1407         * sysdeps/unix/sysv/linux/alpha/vfork.S: Use libc_hidden_def.
1409 2004-09-01  David Mosberger  <davidm@hpl.hp.com>
1411         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h
1412         (__libc_unwind_longjmp): Delete macro and declare as function.
1413         * sysdeps/unix/sysv/linux/ia64/Makefile (sysdep_routines): Mention
1414         __ia64_longjmp, sigstack_longjmp, and __sigstack_longjmp for
1415         nptl directory.
1416         * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S: New file.
1417         * sysdeps/unix/sysv/linux/ia64/__sigstack_longjmp.c: New file.
1418         * sysdeps/unix/sysv/linux/ia64/unwind_longjmp.c: New file.
1420 2004-09-12  Ulrich Drepper  <drepper@redhat.com>
1422         * sysdeps/pthread/pthread.h: Make rwlock prototypes available also
1423         for __USE_XOPEN2K.
1424         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define rwlock
1425         types also for __USE_XOPEN2K.
1426         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
1427         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
1428         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
1429         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
1430         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
1431         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
1432         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
1433         [BZ #320]
1435 2004-09-08  Ulrich Drepper  <drepper@redhat.com>
1437         * sysdeps/pthread/pthread.h
1438         (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Make safe for C++.
1439         (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
1440         (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
1441         (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Likewise.
1442         [BZ #375]
1444 2004-09-07  Ulrich Drepper  <drepper@redhat.com>
1446         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Allow
1447         PSEUDO to be used with . prefix.
1449         * sysdeps/unix/sysv/linux/alpha/pthread_once.c (__pthread_once):
1450         Use atomic_increment instead of atomic_exchange_and_add.
1451         * sysdeps/unix/sysv/linux/sparc/pthread_once.c (__pthread_once):
1452         Likewise.
1453         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
1454         Likewise.
1455         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
1456         Likewise.
1458         * allocatestack.c (allocate_stack): Use atomic_increment_val
1459         instead of atomic_exchange_and_add.
1460         * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Likewise.
1461         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
1462         Likewise.
1463         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
1464         Likewise.
1466         * sysdeps/pthread/pthread.h (pthread_once): Remove __THROW since
1467         the initialization function might throw.
1469 2005-09-05  Richard Henderson  <rth@redhat.com>
1471         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
1472         Move definition inside libpthread, libc, librt check.  Provide
1473         definition for rtld.
1475 2004-09-02  Ulrich Drepper  <drepper@redhat.com>
1477         * sysdeps/alpha/jmpbuf-unwind.h: Define __libc_unwind_longjmp.
1478         * sysdeps/i386/jmpbuf-unwind.h: Likewise
1479         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
1480         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
1481         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
1482         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
1483         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
1484         * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
1485         * unwind.c: Use it.
1487         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
1488         Rename __data.__clock to __data.__nwaiters, make it unsigned int.
1489         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
1490         Likewise.
1491         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
1492         Decrement __nwaiters.  If pthread_cond_destroy has been called and
1493         this is the last waiter, signal pthread_cond_destroy caller and
1494         avoid using the pthread_cond_t structure after unlock.
1495         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1496         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1497         Read clock type from the least significant bits of __nwaiters instead
1498         of __clock.
1499         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1500         * sysdeps/unix/sysv/linux/internaltypes.h: Define COND_CLOCK_BITS.
1502 2004-08-31  Jakub Jelinek  <jakub@redhat.com>
1504         [BZ #342]
1505         * Makefile (tests): Add tst-cond20 and tst-cond21.
1506         * tst-cond20.c: New test.
1507         * tst-cond21.c: New test.
1508         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
1509         (pthread_cond_t): Rename __data.__clock to __data.__nwaiters, make
1510         it unsigned int.
1511         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
1512         Likewise.
1513         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
1514         (pthread_cond_t): Likewise.
1515         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
1516         Likewise.
1517         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
1518         Likewise.
1519         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
1520         Likewise.
1521         * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_clock): Remove.
1522         (cond_nwaiters): New.
1523         (clock_bits): New.
1524         * pthread_cond_destroy.c (__pthread_cond_destroy): Return EBUSY
1525         if there are waiters not signalled yet.
1526         Wait until all already signalled waiters wake up.
1527         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Decrement
1528         __nwaiters.  If pthread_cond_destroy has been called and this is the
1529         last waiter, signal pthread_cond_destroy caller and avoid using
1530         the pthread_cond_t structure after unlock.
1531         (__pthread_cond_wait): Increment __nwaiters in the beginning,
1532         decrement it when leaving.  If pthread_cond_destroy has been called
1533         and this is the last waiter, signal pthread_cond_destroy caller.
1534         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
1535         Likewise.  Read clock type from the least significant bits of
1536         __nwaiters instead of __clock.
1537         * pthread_condattr_setclock.c (pthread_condattr_setclock): Check
1538         whether clock ID can be encoded in COND_CLOCK_BITS bits.
1539         * pthread_condattr_getclock.c (pthread_condattr_getclock): Decode
1540         clock type just from the last COND_CLOCK_BITS bits of value.
1541         * pthread_cond_init.c (__pthread_cond_init): Initialize __nwaiters
1542         instead of __clock, just from second bit of condattr's value.
1544 2004-08-30  Jakub Jelinek  <jakub@redhat.com>
1546         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Include
1547         bits/wordsize.h.  Make the header match i386 header when __WORDSIZE
1548         != 64.
1549         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
1551 2004-08-15  Roland McGrath  <roland@frob.com>
1553         * pthread_atfork.c: Update copyright terms including special exception
1554         for these trivial files, which are statically linked into executables
1555         that use dynamic linking for the significant library code.
1557 2004-08-09  Jakub Jelinek  <jakub@redhat.com>
1559         * DESIGN-rwlock.txt: Add decreasing of nr_readers_queued to
1560         pthread_rwlock_rdlock.
1561         * sysdeps/pthread/pthread_rwlock_rdlock (__pthread_rwlock_rdlock):
1562         Decrease __nr_readers_queued after reacquiring lock.
1563         * sysdeps/pthread/pthread_rwlock_timedrdlock
1564         (pthread_rwlock_timedrdlock): Likewise.
1565         Reported by Bob Cook <bobcook47@hotmail.com>.
1567 2004-08-11  Jakub Jelinek  <jakub@redhat.com>
1569         * tst-rwlock14.c (tf): Read main thread handle from *ARG
1570         before pthread_barrier_wait.
1572 2004-08-07  Ulrich Drepper  <drepper@redhat.com>
1574         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
1575         Remove unnecessary exception handling data.
1577 2004-07-23  Jakub Jelinek  <jakub@redhat.com>
1579         [BZ #284]
1580         * sysdeps/pthread/pthread.h (pthread_getcpuclockid): Use __clockid_t
1581         instead of clockid_t.
1583 2004-07-21  Roland McGrath  <roland@redhat.com>
1585         * Makefile ($(objpfx)multidir.mk): Use $(make-target-directory).
1587 2004-07-19  Roland McGrath  <roland@redhat.com>
1589         * tst-cancel4.c (tf_waitid): Use WEXITED flag bit if available.
1591 2004-07-02  Roland McGrath  <roland@redhat.com>
1593         * configure: Don't exit.
1595 2004-07-14  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1597         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
1598         (__pthread_cond_timedwait): Check for invalid nanosecond in
1599         timeout value.
1601 2004-07-07  Ulrich Drepper  <drepper@redhat.com>
1603         * Makefile: Add rules to build and run tst-fini1.
1604         * tst-fini1.c: New file.
1605         * tst-fini1mod.c: New file.
1607 2004-07-05  Ulrich Drepper  <drepper@redhat.com>
1609         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define NO_CANCELLATION
1610         if no cancellation support is needed.
1611         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
1612         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
1613         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
1614         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
1615         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
1616         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
1617         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
1618         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
1619         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
1621         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define __NR_futex
1622         only if not already defined.
1624 2004-07-05  Jakub Jelinek  <jakub@redhat.com>
1626         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_unlock): Use
1627         constraint "m" instead of "0" for futex.
1629         * shlib-versions: Add powerpc64-.*-linux.*.
1631 2004-07-04  Jakub Jelinek  <jakub@redhat.com>
1633         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
1634         (pthread_rwlock_timedrdlock): Use cmpq instead of cmpl to check
1635         for valid tv_nsec.
1636         * tst-rwlock14.c (do_test): Test for invalid tv_nsec equal to
1637         1 billion and 64-bit tv_nsec which is valid when truncated to 32
1638         bits.
1640 2004-06-29  Roland McGrath  <roland@redhat.com>
1642         * Banner: NPTL no longer has its own version number.
1643         * Makefile (nptl-version): Variable removed.
1644         * sysdeps/pthread/Makefile (CFLAGS-confstr.c): Set LIBPTHREAD_VERSION
1645         using $(version), the glibc version number.
1647 2004-06-29  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1649         * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
1650         Fix branch offset for a PLT entry.
1651         * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
1652         Likewise.
1653         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
1654         Likewise.
1655         * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
1656         Likewise.
1657         * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait):
1658         Likewise.
1660 2004-06-28  Jakub Jelinek  <jakub@redhat.com>
1662         * sysdeps/alpha/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define
1663         unconditionally.
1665 2004-06-28  Jakub Jelinek  <jakub@redhat.com>
1667         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
1668         (pthread_rwlock_timedwrlock): Return EINVAL if tv_nsec is negative,
1669         instead of tv_sec.
1670         * sysdeps/pthread/pthread_rwlock_timedrdlock.c
1671         (pthread_rwlock_timedrdlock): Likewise.
1673 2004-06-22  Jakub Jelinek  <jakub@redhat.com>
1675         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
1676         Set __r7 to val, not mutex.
1678 2004-06-27  Ulrich Drepper  <drepper@redhat.com>
1680         * Makefile: Add rules to build tst-rwlock14.
1681         * tst-rwlock14.c: New file.
1683 2004-06-24  Boris Hu  <boris.hu@intel.com>
1685         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Add timeout validation
1686         check.
1687         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
1689 2004-06-19  Andreas Jaeger  <aj@suse.de>
1691         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix
1692         assembler in last patch.
1694 2004-06-17  Ulrich Drepper  <drepper@redhat.com>
1696         * sysdeps/pthread/pthread_cond_timedwait.c
1697         (__pthread_cond_timedwait): Also check for negativ nanoseconds.
1698         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
1699         (__pthread_cond_timedwait): Check for invalid nanosecond in
1700         timeout value.
1701         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1702         * tst-cond19.c: New file.
1703         * Makefile: Add rules to build and run tst-cond19.
1705 2004-06-15  Steven Munroe  <sjmunroe@us.ibm.com>
1707         * tst-context1.c (GUARD_PATTERN): Defined.
1708         (tst_context_t): Define struct containing ucontext_t & guard words.
1709         (ctx): Declare as an array of tst_context_t.
1710         (fct): Verify uc_link & guard words are still valid.
1711         (tf): Initialize guard words in ctx.  Adjust ctx refs for new struct.
1713 2004-06-13  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1715         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
1716         Add __data.__futex field, reshuffle __data.__clock.
1717         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
1718         (__pthread_cond_signal): Increment __futex at the same time as
1719         __wakeup_seq or __total_seq.  Pass address of __futex instead of
1720         address of low 32-bits of __wakeup_seq to futex syscall.
1721         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
1722         (__pthread_cond_wait): Likewise.  Pass __futex value from before
1723         releasing internal lock to FUTEX_WAIT.
1724         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
1725         (__pthread_cond_timedwait): Likewise.
1726         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
1727         (FUTEX_CMP_REQUEUE): Define.
1728         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
1729         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
1730         Pass __futex value from before the unlock and __futex address instead
1731         of address of low 32-bits of __wakeup_seq to futex syscall.
1732         Fallback to FUTEX_WAKE all on any errors.
1734 2004-06-08  Jakub Jelinek  <jakub@redhat.com>
1736         * pthread_mutexattr_getpshared.c (pthread_mutex_getpshared): Fix
1737         comment typo.
1738         * pthread_mutexattr_gettype.c (pthread_mutexattr_gettype): Likewise.
1739         * pthread_mutexattr_init.c (__pthread_mutexattr_init): Likewise.
1740         * pthread_mutexattr_settype.c (__pthread_mutexattr_settype): Likewise.
1741         * pthread_mutexattr_setpshared.c (pthread_mutexattr_setpshared):
1742         Likewise.  Reported by Bob Cook <bobcook47@hotmail.com>.
1744 2004-06-11  Martin Schwidefsky  <schwidefsky@de.ibm.com>
1746         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_compare_and_swap):
1747         Add memory clobber to inline assembly.
1748         (__lll_mutex_trylock): Likewise.
1749         (__lll_mutex_cond_trylock): Likewise.
1751 2004-06-07  Martin Schwidefsky  <schwidefsky@de.ibm.com>
1753         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
1754         Pass val argument as 6th system call argument in %r7.
1756 2004-05-21  Jakub Jelinek  <jakub@redhat.com>
1758         * Makefile (tests): Add tst-cond16.
1759         * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_futex): Add.
1760         * pthread_cond_init.c (__pthread_cond_init): Clear __data.__futex.
1761         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
1762         Add __data.__futex field, reshuffle __data.__clock.
1763         * sysdeps/unix/sysv/linux/i386/pthread_cond_signal.S
1764         (__pthread_cond_signal): Increment __futex at the same time as
1765         __wakeup_seq or __total_seq.  Pass address of __futex instead of
1766         address of low 32-bits of __wakeup_seq to futex syscall.
1767         * sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S
1768         (__pthread_cond_wait): Likewise.  Pass __futex value from before
1769         releasing internal lock to FUTEX_WAIT.
1770         * sysdeps/unix/sysv/linux/i386/pthread_cond_timedwait.S
1771         (__pthread_cond_timedwait): Likewise.
1772         * sysdeps/unix/sysv/linux/i386/pthread_cond_broadcast.S
1773         (FUTEX_CMP_REQUEUE): Define.
1774         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
1775         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
1776         Pass __futex value from before the unlock and __futex address instead
1777         of address of low 32-bits of __wakeup_seq to futex syscall.
1778         Fallback to FUTEX_WAKE all on any errors.
1779         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_CMP_REQUEUE):
1780         Define.
1781         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
1782         internally.  Return non-zero if error, zero if success.
1783         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
1784         Add __data.__futex field, reshuffle __data.__clock.
1785         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_CMP_REQUEUE):
1786         Define.
1787         (lll_futex_requeue): Add val argument, return 1 unconditionally
1788         for the time being.
1789         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
1790         Add __data.__futex field, reshuffle __data.__clock.
1791         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_CMP_REQUEUE):
1792         Define.
1793         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
1794         internally.  Return non-zero if error, zero if success.
1795         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
1796         (pthread_cond_t): Add __data.__futex field, reshuffle __data.__clock.
1797         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_CMP_REQUEUE):
1798         Define.
1799         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
1800         internally.  Return non-zero if error, zero if success.
1801         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
1802         Add __data.__futex field, reshuffle __data.__clock.
1803         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_CMP_REQUEUE):
1804         Define.
1805         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
1806         internally.  Return non-zero if error, zero if success.
1807         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
1808         Add __data.__futex field, reshuffle __data.__clock.
1809         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
1810         Add __data.__futex field, reshuffle __data.__clock.
1811         * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal):
1812         Increment __futex at the same time as __wakeup_seq or __total_seq.
1813         Pass address of __futex instead of address of low 32-bits of
1814         __wakeup_seq to futex syscall.
1815         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
1816         Pass __futex value from before releasing internal lock
1817         to FUTEX_WAIT.
1818         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
1819         Likewise.  Avoid unnecessary shadowing of variables.
1820         * sysdeps/pthread/pthread_cond_broadcast.c (__pthread_cond_broadcast):
1821         Set __futex to 2 * __total_seq.  Pass __futex value from before the
1822         unlock and __futex address instead of address of low 32-bits of
1823         __wakeup_seq to futex_requeue macro, adjust for new return value
1824         meaning.
1825         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
1826         (__pthread_cond_signal): Increment __futex at the same time as
1827         __wakeup_seq or __total_seq.  Pass address of __futex instead of
1828         address of low 32-bits of __wakeup_seq to futex syscall.
1829         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
1830         (__pthread_cond_wait): Likewise.  Pass __futex value from before
1831         releasing internal lock to FUTEX_WAIT.
1832         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1833         (__pthread_cond_timedwait): Likewise.
1834         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
1835         (FUTEX_CMP_REQUEUE): Define.
1836         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
1837         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
1838         Pass __futex value from before the unlock and __futex address instead
1839         of address of low 32-bits of __wakeup_seq to futex syscall.
1840         Fallback to FUTEX_WAKE all on any errors.
1842 2004-06-03  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1844         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_mutex_lock):
1845         Add nop to align the end of critical section.
1846         (lll_mutex_cond_lock, lll_mutex_timedlock): Likewise.
1848 2004-06-01  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1850         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
1851         Add __broadcast_seq field.
1852         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Mark
1853         all waiters as woken with woken_seq and bump broadcast counter.
1854         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use new
1855         __broadcast_seq.  Increment __woken_seq correctly when cleanuped.
1856         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
1857         Comment typo fixes.  Avoid returning -ETIMEDOUT.
1859 2004-06-01  Ulrich Drepper  <drepper@redhat.com>
1861         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
1862         (__condvar_tw_cleanup): Fix access to saved broadcast_seq value.
1863         Reported by Kaz Kojima.
1865 2004-05-25  Jakub Jelinek  <jakub@redhat.com>
1867         * sysdeps/unix/sysv/linux/aio_misc.h: New file.
1869 2004-05-21  Jakub Jelinek  <jakub@redhat.com>
1871         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Compare
1872         __broadcast_seq with bc_seq after acquiring internal lock instead of
1873         before it.
1875 2004-05-18  Jakub Jelinek  <jakub@redhat.com>
1877         * Makefile (.NOTPARALLEL): Only serialize make check/xcheck, not
1878         compilation.
1879         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
1880         (__pthread_cond_timedwait): Avoid returning -ETIMEDOUT.
1881         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
1882         (pthread_cond_t): Add __data.__broadcast_seq field.
1883         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1884         (FRAME_SIZE): Define.
1885         (__pthread_cond_timedwait): Use it.  Store/check broadcast_seq.
1886         Comment typo fixes.
1887         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S (FRAME_SIZE):
1888         Define.
1889         (__pthread_cond_wait): Use it.  Store/check broadcast_seq.  Comment
1890         typo fixes.
1891         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
1892         (__pthread_cond_broadcast): Increment broadcast_seq.  Comment typo
1893         fixes.
1895 2004-05-18  Ulrich Drepper  <drepper@redhat.com>
1897         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add broadcast_seq entry.
1898         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
1899         Add __broadcast_seq field.
1900         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
1901         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
1902         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
1903         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
1904         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
1905         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Mark
1906         all waiters as woken with woken_seq and bump broadcast counter.
1907         * sysdeps/pthread/pthread_cond_broadcast.c: Likewise.
1908         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use new
1909         __broadcast_seq field.
1910         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1911         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
1912         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
1913         * pthread_cond_init.c: Initialize __broadcast_seq field.
1914         * Makefile (tests): Add tst-cond17 and tst-cond18.
1915         Add .NOTPARALLEL goal.
1916         * tst-cond16.c: New file.  From Jakub.
1917         * tst-cond17.c: New file.  From Jakub.
1918         * tst-cond18.c: New file.  From Jakub.
1920 2004-05-16  Ulrich Drepper  <drepper@redhat.com>
1922         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Correct some
1923         unwind info.
1925         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
1926         Parametrize frame size.  Correct some unwind info.
1927         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1929 2004-05-04  Jakub Jelinek  <jakub@redhat.com>
1931         * tst-stack3.c: Note testing functionality beyond POSIX.
1933 2004-05-04  Jakub Jelinek  <jakub@redhat.com>
1935         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (USE___THREAD):
1936         Change conditional from ifdef to if.
1938 2004-04-23  Jakub Jelinek  <jakub@redhat.com>
1940         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SYSDEP_CANCEL_ERRNO,
1941         SYSDEP_CANCEL_ERROR): Define.
1942         (PSEUDO): Use it.
1944 2004-05-01  Jakub Jelinek  <jakub@redhat.com>
1946         * Versions (libpthread): Remove __pthread_cleanup_upto@@GLIBC_PRIVATE.
1948 2004-04-20  Jakub Jelinek  <jakub@redhat.com>
1950         * sem_unlink.c (sem_unlink): Change EPERM into EACCES.
1952 2004-04-19  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1954         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Add frame info.
1955         Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
1956         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Remove unneeded frame
1957         info.  Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
1959 2004-04-19  Ulrich Drepper  <drepper@redhat.com>
1961         * sysdeps/unix/sysv/linux/timer_routines.c: Make sure helper
1962         thread has all signals blocked.
1964 2004-04-18  Andreas Jaeger  <aj@suse.de>
1966         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h
1967         (SEM_VALUE_MAX): Add missing brace.
1969 2004-04-17  Jakub Jelinek  <jakub@redhat.com>
1971         * sysdeps/pthread/Makefile (tests): Add tst-mqueue8x
1972         in rt subdir.
1973         (CFLAGS-tst-mqueue8x.c): Add -fexceptions.
1974         * sysdeps/pthread/tst-mqueue8x.c: New test.
1975         * tst-cancel4.c: Update comment about message queues.
1977         * sysdeps/pthread/timer_gettime.c (timer_gettime): For expired timer
1978         return it_value { 0, 0 }.
1979         * sysdeps/pthread/timer_create.c (timer_create): Handle SIGEV_NONE
1980         like SIGEV_SIGNAL.
1981         * sysdeps/pthread/timer_routines.c (thread_expire_timer): Remove
1982         assertion for SIGEV_NONE.
1983         (thread_attr_compare): Compare all attributes, not just a partial
1984         subset.
1986 2004-04-17  Jakub Jelinek  <jakub@redhat.com>
1988         * sysdeps/unix/sysv/linux/mq_notify.c: Include stdlib.h.
1990 2004-04-17  Ulrich Drepper  <drepper@redhat.com>
1992         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h (SEM_VALUE_MAX):
1993         Just use a plain number.
1994         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
1995         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
1996         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
1997         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
1998         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
1999         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
2000         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
2002 2004-04-16  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2004         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Remove unneeded
2005         frame info.
2006         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
2008 2004-04-15  Jakub Jelinek  <jakub@redhat.com>
2010         * sysdeps/unix/sysv/linux/timer_routines.c: Include errno.h.
2011         (timer_helper_thread): Use inline rt_sigtimedwait syscall instead
2012         of calling sigwaitinfo.
2014 2004-04-16  Ulrich Drepper  <drepper@redhat.com>
2016         * allocatestack.c (allocate_stack): Set reported_guardsize
2017         unconditionally.
2018         * pthread_getattr_np.c (pthread_getattr_np): Use
2019         reported_guardsize instead of guardsize.
2020         * descr.h (struct pthread): Add reported_guardsize field.
2022 2004-04-13  Jakub Jelinek  <jakub@redhat.com>
2024         * sysdeps/unix/sysv/linux/mq_notify.c: Shut up GCC warning.
2026 2004-04-12  Ulrich Drepper  <drepper@redhat.com>
2028         * sysdeps/unix/sysv/linux/mq-notify.c: New file.
2030 2004-04-08  Jakub Jelinek  <jakub@redhat.com>
2032         * sysdeps/unix/sysv/linux/bits/local_lim.h (MQ_PRIO_MAX): Define.
2033         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h (MQ_PRIO_MAX): Define.
2034         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h (MQ_PRIO_MAX): Define.
2035         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h (MQ_PRIO_MAX): Define.
2036         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
2037         Define.
2038         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
2039         (_POSIX_MESSAGE_PASSING): Define.
2040         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h
2041         (_POSIX_MESSAGE_PASSING): Define.
2042         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h
2043         (_POSIX_MESSAGE_PASSING): Define.
2045 2004-04-04  Ulrich Drepper  <drepper@redhat.com>
2047         * tst-context1.c (fct): Check whether correct stack is used.
2049 2004-04-03  Ulrich Drepper  <drepper@redhat.com>
2051         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Never use
2052         matching constraints for asm mem parameters.
2054         * tst-clock2.c (tf): Don't define unless needed.
2056 2004-03-30  H.J. Lu  <hongjiu.lu@intel.com>
2058         * Makefile (link-libc-static): Use $(static-gnulib) instead of
2059         $(gnulib).
2061 2004-03-30  Ulrich Drepper  <drepper@redhat.com>
2063         * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_deallocate_tsd.
2064         * init.c (pthread_functions): Add ptr__nptl_deallocate_tsd.
2065         * pthreadP.h: Declare __nptl_deallocate_tsd.
2066         * pthread_create.c (deallocate_tsd): Remove to __nptl_deallocate_tsd.
2067         Adjust caller.
2069         * Makefile (tests): Add tst-tsd5.
2070         * tst-tsd5.c: New file.
2072 2004-03-29  Ulrich Drepper  <drepper@redhat.com>
2074         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
2075         (__pthread_attr_setaffinity_old): Prepend GLIBC_ to version names
2076         is SHLIB_COMPAT check.
2077         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
2078         (__pthread_attr_getaffinity_old): Likewise.
2079         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
2080         (__pthread_getaffinity_old): Likewise.
2081         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
2082         (__pthread_setaffinity_old): Likewise.
2084 2004-03-26  Ulrich Drepper  <drepper@redhat.com>
2086         * allocatestack.c (_make_stacks_executable): Call
2087         _dl_make_stack_executable first.
2089 2004-03-24  Roland McGrath  <roland@redhat.com>
2091         * sysdeps/i386/pthread_spin_lock.c (pthread_spin_lock): Use "m"
2092         constraint instead of "0".
2094 2004-03-24  Ulrich Drepper  <drepper@redhat.com>
2096         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
2097         (lll_mutex_cond_trylock): Define as wrapper around __lll_cond_trylock.
2099         * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Reorganize
2100         code to avoid warning.
2102 2004-03-24  Andreas Jaeger  <aj@suse.de>
2104         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
2105         (__pthread_attr_setaffinity_old): Remove const.
2107 2004-03-23  Ulrich Drepper  <drepper@redhat.com>
2109         * sysdeps/unix/sysv/linux/smp.h: New file.
2110         * sysdeps/unix/sysv/linux/sh/smp.h: New file.
2111         * init.c: Define __is_smp.
2112         (__pthread_initialize_minimal_internal): Call is_smp_system to
2113         initialize __is_smp.
2114         * pthreadP.h: Declare __is_smp.
2115         Define MAX_ADAPTIVE_COUNT is necessary.
2116         * pthread_mutex_init.c: Add comment regarding __spins field.
2117         * pthread_mutex_lock.c: Implement adaptive mutex type.
2118         * pthread_mutex_timedlock.c: Likewise.
2119         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
2120         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
2121         Add __spins field.
2122         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
2123         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
2124         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2125         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
2126         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2127         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
2128         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2129         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define
2130         lll_mutex_cond_trylock.
2131         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2132         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
2133         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2134         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
2135         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
2136         Define BUSY_WAIT_NOP.
2137         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
2138         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2140         * tst-mutex5.c: Add support for testing adaptive mutexes.
2141         * tst-mutex7.c: Likewise.
2142         * tst-mutex5a.c: New file.
2143         * tst-mutex7a.c: New file.
2144         * Makefile (tests): Add tst-mutex5a and tst-mutex7a.
2146         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
2147         (__lll_mutex_timedlock_wait): Preserve r8 and r9 since the
2148         vgettimeofday call might destroy the content.
2150         * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use hint
2151         @pause in the loop.
2153         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
2154         No need to restrict type of ret.  Make it int.  Add comment.
2156         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
2157         Remove unnecessary setne instruction.
2159 2004-03-22  Jakub Jelinek  <jakub@redhat.com>
2161         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
2162         (__pthread_getaffinity_new): Use INT_MAX instead of UINT_MAX.
2163         * pthread_getattr_np.c (pthread_getattr_np): Double size every cycle.
2164         If realloc fails, break out of the loop.
2166 2004-03-20  Andreas Jaeger  <aj@suse.de>
2168         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
2169         (__pthread_setaffinity_old): Fix interface.
2170         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
2171         (__pthread_getaffinity_old): Likewise.
2173         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
2174         (__pthread_setaffinity_new): Remove duplicate declaration.
2176 2004-03-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2178         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Save
2179         the return value to a safe register.
2180         (CDISABLE): Set the function argument correctly.
2182 2004-03-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2184         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XCHG): Define.
2185         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
2186         Rewrite so that only one locked memory operation per round is needed.
2187         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
2188         (pthread_barrier_wait): After wakeup, release lock only when the
2189         last thread stopped using the barrier object.
2190         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
2191         (__pthread_cond_wait): Don't store mutex address if the current
2192         value is ~0l.  Add correct cleanup support and unwind info.
2193         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
2194         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
2195         (__pthread_cond_broadcast): Don't use requeue for pshared condvars.
2196         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Update comment.
2197         * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
2198         Add correct cleanup support and unwind info.
2199         * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
2200         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Add unwind
2201         information for syscall wrappers.
2203 2004-03-18  Ulrich Drepper  <drepper@redhat.com>
2205         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
2206         cpusetsize field, remove next.
2207         * sysdeps/pthread/pthread.h (pthread_getaffinity_np): Add new second
2208         parameter for size of the CPU set.
2209         (pthread_setaffinity_np): Likewise.
2210         (pthread_attr_getaffinity_np): Likewise.
2211         (pthread_attr_setaffinity_np): Likewise.
2212         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: Implement
2213         interface change, keep compatibility code.
2214         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
2215         * sysdeps/unix/sysv/linux/pthread_getaffinity.c: Likewise.
2216         * sysdeps/unix/sysv/linux/pthread_setaffinity.c: Likewise.
2217         * pthreadP.h: Remove hidden_proto for pthread_getaffinity_np.  Declare
2218         __pthread_getaffinity_np.
2219         * Versions: Add version for changed interfaces.
2220         * tst-attr3.c: Adjust test for interface change.
2221         * pthread_getattr_np.c: Query the kernel about the affinity mask with
2222         increasing buffer sizes.
2223         * pthread_attr_destroy.c: Remove unused list handling.
2224         * pthread_attr_init.c: Likewise.
2226 2004-03-17  Roland McGrath  <roland@redhat.com>
2228         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Pass missing
2229         first argument to clock_getres so we ever enable kernel timers.
2231 2004-03-15  Ulrich Weigand  <uweigand@de.ibm.com>
2233         * init.c (nptl_version): Add __attribute_used__ to nptl_version.
2235 2004-03-12  Richard Henderson  <rth@redhat.com>
2237         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Propagate
2238         oldvalue from CENABLE to CDISABLE.
2240 2004-03-12  Ulrich Drepper  <drepper@redhat.com>
2242         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define HOST_NAME_MAX.
2243         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
2244         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
2245         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
2247 2004-03-11  Richard Henderson  <rth@redhat.com>
2249         * sysdeps/alpha/tcb-offsets.sym (PID_OFFSET): New.
2250         * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: Save/restore PID.
2251         * sysdeps/unix/sysv/linux/alpha/vfork.S: New file.
2253 2004-03-11  Jakub Jelinek  <jakub@redhat.com>
2255         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Use jgnl
2256         instead of jnl instruction to jump to SYSCALL_ERROR_LABEL.
2257         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S (__vfork): Likewise.
2259 2004-03-11  Jakub Jelinek  <jakub@redhat.com>
2261         * forward.c (__pthread_cond_broadcast_2_0,
2262         __pthread_cond_destroy_2_0, __pthread_cond_init_2_0,
2263         __pthread_cond_signal_2_0, __pthread_cond_wait_2_0,
2264         __pthread_cond_timedwait_2_0): Use return 0 as defaction instead of 0.
2266 2004-03-11  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2268         * sysdeps/sh/tcb-offsets.sym: Add PID.
2269         * sysdeps/unix/sysv/linux/sh/pt-vfork.S: Properly handle PID cache.
2270         * sysdeps/unix/sysv/linux/sh/vfork.S: New file.
2272 2004-03-10  Ulrich Drepper  <drepper@redhat.com>
2274         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: No need to
2275         include <sysdep-cancel.h>, vfork is no cancellation point.
2276         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: Likewise.
2277         * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: Likewise.
2278         * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: Likewise.
2280 2004-03-10  Jakub Jelinek  <jakub@redhat.com>
2282         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Add
2283         libc_hidden_def.
2284         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
2285         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
2286         Likewise.
2287         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S (__vfork):
2288         Likewise.
2289         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
2290         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
2291         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Include tcb-offsets.h.
2292         * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Use DO_CALL instead
2293         of DO_CALL_VIA_BREAK.  Work around a gas problem.
2295         * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: Remove.
2296         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: New file.
2297         * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: New file.
2298         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: New file.
2299         * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: New file.
2300         * sysdeps/powerpc/tcb-offsets.sym: Add PID.
2302         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S (__vfork): Don't use
2303         a local register for saving old PID.  Negate PID in parent upon exit.
2305         * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: Include
2306         tcb-offsets.h.
2307         (__vfork): Negate PID if non-zero and set to INT_MIN if zero
2308         before syscall, set to the old value in the parent afterwards.
2309         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: New file.
2310         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: Include
2311         tcb-offsets.h.
2312         (__vfork): Negate PID if non-zero and set to INT_MIN if zero
2313         before syscall, set to the old value in the parent afterwards.
2314         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: New file.
2315         * sysdeps/s390/tcb-offsets.sym: Add PID.
2317         * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: Remove.
2318         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: New file.
2319         * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S: New file.
2320         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: New file.
2321         * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: New file.
2322         * sysdeps/sparc/tcb-offsets.sym: Add PID.
2324 2004-03-10  Andreas Schwab  <schwab@suse.de>
2326         * sysdeps/ia64/tcb-offsets.sym: Add PID.
2327         * sysdeps/unix/sysv/linux/ia64/vfork.S: New file.
2328         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Properly handle PID cache.
2330 2004-03-09  Jakub Jelinek  <jakub@redhat.com>
2332         * tst-cancel20.c (do_one_test): Clear in_sh_body first.
2333         * tst-cancel21.c (do_one_test): Likewise.
2334         Reported by Gordon Jin <gordon.jin@intel.com>.
2336 2004-02-09  Jakub Jelinek  <jakub@redhat.com>
2338         * sysdeps/unix/sysv/linux/i386/vfork.S (SAVE_PID): Negate PID
2339         if non-zero and set to INT_MIN if zero.
2340         * sysdeps/unix/sysv/linux/x86_64/vfork.S (SAVE_PID): Likewise.
2341         * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Include tcb-offsets.h.
2342         (SAVE_PID, RESTORE_PID): Define.
2343         (__vfork): Use it.
2344         * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: Include tcb-offsets.h.
2345         Use relative path to avoid including NPTL i386/vfork.S.
2346         (SAVE_PID, RESTORE_PID): Define.
2347         * sysdeps/unix/sysv/linux/raise.c: Include limits.h.
2348         (raise): Handle THREAD_SELF->pid INT_MIN the same as 0.
2349         * Makefile (tests): Add tst-vfork1, tst-vfork2, tst-vfork1x and
2350         tst-vfork2x.
2351         (tests-reverse): Add tst-vfork1x and tst-vfork2x.
2352         * tst-vfork1.c: New test.
2353         * tst-vfork2.c: New test.
2354         * tst-vfork1x.c: New test.
2355         * tst-vfork2x.c: New test.
2357 2004-03-08  Ulrich Drepper  <drepper@redhat.com>
2359         * sysdeps/i386/tcb-offsets.sym: Add PID.
2360         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
2361         * sysdeps/unix/sysv/linux/i386/vfork.S: New file.
2362         * sysdeps/unix/sysv/linux/x86_64/vfork.S: New file.
2364 2004-03-08  Steven Munroe  <sjmunroe@us.ibm.com>
2366         * sysdeps/unix/sysv/linux/powerpc/Versions: Remove leading tabs.
2368 2004-03-08  H.J. Lu  <hongjiu.lu@intel.com>
2370         * sysdeps/s390/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
2371         _rtld_global_ro.
2373 2004-03-07  Ulrich Drepper  <drepper@redhat.com>
2375         * sysdeps/ia64/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
2376         _rtld_global_ro.
2378         * tst-once4.c: Remove unnecessary macro definition.
2380         * tst-mutex7.c (do_test): Limit thread stack size.
2381         * tst-once2.c (do_test): Likewise.
2382         * tst-tls3.c (do_test): Likewise.
2383         * tst-tls1.c (do_test): Likewise.
2384         * tst-signal3.c (do_test): Likewise.
2385         * tst-kill6.c (do_test): Likewise.
2386         * tst-key4.c (do_test): Likewise.
2387         * tst-join4.c (do_test): Likewise.
2388         * tst-fork1.c (do_test): Likewise.
2389         * tst-context1.c (do_test): Likewise.
2390         * tst-cond2.c (do_test): Likewise.
2391         * tst-cond10.c (do_test): Likewise.
2392         * tst-clock2.c (do_test): Likewise.
2393         * tst-cancel10.c (do_test): Likewise.
2394         * tst-basic2.c (do_test): Likewise.
2395         * tst-barrier4.c (do_test): Likewise.
2397 2004-03-05  Ulrich Drepper  <drepper@redhat.com>
2399         * sysdeps/i386/tls.h: Use GLRO instead of GL where appropriate.
2401 2004-03-01  Ulrich Drepper  <drepper@redhat.com>
2403         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
2404         (__pthread_cond_timedwait): Optimize wakeup test.
2405         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
2406         (__pthread_cond_wait): Likewise.
2407         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
2408         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
2409         Likewise.
2411 2004-02-29  Ulrich Drepper  <drepper@redhat.com>
2413         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
2414         (__lll_mutex_lock_wait): Optimize a bit more.  Just one copy of
2415         the atomic instruction needed.
2416         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
2417         (__lll_mutex_lock_wait): Likewise.
2419 2004-02-28  Ulrich Drepper  <drepper@redhat.com>
2421         * Makefile (tests): Add tst-cond14 and tst-cond15.
2422         * tst-cond14.c: New file.
2423         * tst-cond15.c: New file.
2425 2004-02-27  Ulrich Drepper  <drepper@redhat.com>
2427         * sysdeps/pthread/createthread.c (create_thread): Remove use of
2428         CLONE_STOPPED.  We cannot use SIGCONT which means CLONE_STOPPED
2429         needs to be implemented differently to be useful.
2431 2004-02-26  Ulrich Drepper  <drepper@redhat.com>
2433         * pthread_attr_setschedparam.c: Don't test priority against limits
2434         here.  Set ATTR_FLAG_SCHED_SET flag.
2435         * pthread_attr_setschedpolicy.c: Set ATTR_FLAG_POLICY_SET flag.
2436         * pthread_create.c (__pthread_create_2_1): Copy scheduling attributes
2437         from parent thread to child.  If attribute is used and scheduling
2438         parameters are not inherited, copy parameters from attribute or
2439         compute them.  Check priority value.
2440         * pthread_getschedparam.c: If the parameters aren't known yet get
2441         them from the kernel.
2442         * pthread_setschedparam.c: Set ATTR_FLAG_SCHED_SET and
2443         ATTR_FLAG_POLICY_SET flag for thread.
2444         * sysdeps/unix/sysv/linux/internaltypes.h: Define ATTR_FLAG_SCHED_SET
2445         and ATTR_FLAG_POLICY_SET.
2447         * sysdeps/pthread/createthread.c: Use tgkill if possible.
2449         * pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr): Don't
2450         fail if stack address hasn't been set.  Just return 0.
2452 2004-02-25  Ulrich Drepper  <drepper@redhat.com>
2454         * Makefile (tests-nolibpthread): Add tst-unload.  Don't link with
2455         libpthread for the files in this list.
2456         (CFLAGS-tst-unload): Removed.
2457         * tst-unload.c (do_test): Don't use complete path for
2458         LIBPHREAD_SO.
2460         * Makefile: Define sonames for tst-tls5mod, tst-_res1mod1, and
2461         tst-_res1mod2.
2463 2004-02-22  Ulrich Drepper  <drepper@redhat.com>
2465         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
2466         (__lll_mutex_lock_wait): Rewrite so that only one locked memory
2467         operation per round is needed.
2468         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
2469         (__lll_mutex_lock_wait): Likewise.
2471 2004-02-20  Ulrich Drepper  <drepper@redhat.com>
2473         * tst-cancel9.c (cleanup): Don't print to stderr.
2475 2004-02-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2477         * sysdeps/sh/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Fix variable name.
2479 2004-02-20  Jakub Jelinek  <jakub@redhat.com>
2481         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
2482         (__syscall_error_handler2): Call CDISABLE.
2483         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
2484         (__syscall_error_handler2): Call CDISABLE.
2486         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
2487         Release lock before the loop, don't reacquire it.
2489         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h (DL_ARGV_NOT_RELRO): Define.
2491 2004-02-19  Andreas Schwab  <schwab@suse.de>
2493         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
2494         Fix last change.
2496 2004-02-18  Ulrich Drepper  <drepper@redhat.com>
2498         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
2499         (pthread_barrier_wait): After wakeup, release lock only when the
2500         last thread stopped using the barrier object.
2501         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S
2502         (pthread_barrier_wait): Likewise.
2503         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
2504         Likewise.
2505         * Makefile (tests): Add tst-barrier4.
2506         * tst-barrier4.c: New file.
2508         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
2509         (__pthread_cond_timedwait): Perform timeout test while holding
2510         internal lock to prevent wakeup race.
2511         Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
2512         * sysdeps/pthread/pthread_cond_timedwait.c
2513         (__pthread_cond_timedwait): Likewise.
2514         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
2515         (__pthread_cond_timedwait): Likewise.
2517 2004-02-18  Jakub Jelinek  <jakub@redhat.com>
2519         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S
2520         (__pthread_rwlock_unlock): Access WRITER as 32-bit value.
2521         * Makefile (tests): Add tst-rwlock13.
2522         * tst-rwlock13.c: New test.
2524 2004-02-16  Ulrich Drepper  <drepper@redhat.com>
2526         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
2527         (__condvar_tw_cleanup): Little optimization.
2528         Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
2530 2004-02-16  Steven Munroe  <sjmunroe@us.ibm.com>
2532         * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: Replace libc with
2533         libpthread as "lib" parameter to SHLIB_COMPAT.
2534         (__novmx_siglongjmp): Fix typo in function name.
2535         (__novmx_longjmp): Fix typo in function name.
2537 2004-02-13  Ulrich Drepper  <drepper@redhat.com>
2539         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Add a
2540         __builtin_expect.
2542         * sysdeps/generic/pt-longjmp.c: Moved to...
2543         * sysdeps/pthread/pt-longjmp.c: ...here.  New file.
2545 2004-01-29  Steven Munroe  <sjmunroe@us.ibm.com>
2547         * Makefile (libpthread-routines): Add pt-cleanup.
2548         * pt-longjmp.c: Removed.
2549         * pt-cleanup.c: Copied __pthread_cleanup_upto to here. New file.
2550         * sysdeps/generic/pt-longjmp.c: Copied longjmp to here. New file.
2551         * sysdeps/unix/sysv/linux/powerpc/Versions: New file.
2552         Version longjmp, siglongjmp for GLIBC_2.3.4.
2553         * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: New File.
2555 2004-02-13  Ulrich Drepper  <drepper@redhat.com>
2557         * sysdeps/pthread/pthread_cond_timedwait.c
2558         (__pthread_cond_timedwait): Optimize.  Drop internal lock earlier.
2559         Reuse code.  Add __builtin_expects.
2561         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
2562         (__pthread_cond_timedwait): Get internal lock in case timeout has
2563         passed before the futex syscall.
2564         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
2566 2004-01-20  Ulrich Drepper  <drepper@redhat.com>
2568         * allocatestack.c: Pretty printing.
2570         * sysdeps/pthread/createthread.c (create_thread): Don't add
2571         CLONE_DETACHED bit if it is not necessary.
2573 2004-01-16  Ulrich Drepper  <drepper@redhat.com>
2575         * pthread_getattr_np.c: Include ldsodefs.h.
2577 2004-01-16  Richard Henderson  <rth@redhat.com>
2579         * allocatestack.c: Don't declare __libc_stack_end.
2580         * init.c (__pthread_initialize_minimal_internal): Likewise.
2581         * pthread_getattr_np.c (pthread_getattr_np): Likewise.
2583 2004-01-15  Richard Henderson  <rth@redhat.com>
2585         * sysdeps/alpha/tls.h (tcbhead_t): Add private.
2586         (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE,
2587         TLS_PRE_TCB_SIZE, TLS_TCB_ALIGN, INSTALL_DTV, INSTALL_NEW_DTV,
2588         GET_DTV, THREAD_DTV, THREAD_SELF, DB_THREAD_SELF): Match ia64.
2589         (TLS_TCB_OFFSET, THREAD_ID, NO_TLS_OFFSET): Remove.
2590         (THREAD_GETMEM, THREAD_GETMEM_NC): Simplify.
2591         (THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
2592         * sysdeps/unix/sysv/linux/alpha/createthread.c (TLS_VALUE): Match ia64.
2594 2004-01-14  Ulrich Drepper  <drepper@redhat.com>
2596         * init.c (pthread_functions): Make array const.
2598 2004-01-13  Ulrich Drepper  <drepper@redhat.com>
2600         * allocatestack.c (__make_stacks_executable): Change interface.
2601         Check parameters.  Pass parameter on to libc counterpart.
2602         * pthreadP.h: Change declaration.
2604 2004-01-13  Richard Henderson  <rth@redhat.com>
2606         * pthread_attr_setstack.c (__old_pthread_attr_setstack): Use
2607         prototype form.
2608         * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize):
2609         Likewise.
2611         * sysdeps/alpha/Makefile: New file.
2612         * sysdeps/alpha/tcb-offsets.sym: New file.
2613         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
2614         Use MULTIPLE_THREADS_OFFSET to implement !libpthread !libc version.
2616         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Rewrite based
2617         on powerpc version.
2619 2004-01-08  Jakub Jelinek  <jakub@redhat.com>
2621         * Makefile (tests): Add tst-backtrace1.
2622         * tst-backtrace1.c: New test.
2624 2003-12-11  Ulrich Weigand  <uweigand@de.ibm.com>
2626         * sysdeps/alpha/tls.h (DB_THREAD_SELF): Pass bit size of thread
2627         register as second parameter to the REGISTER macro.
2628         * sysdeps/ia64/tls.h (DB_THREAD_SELF): Likewise.
2629         * sysdeps/powerpc/tls.h (DB_THREAD_SELF): Likewise.
2630         * sysdeps/sh/tls.h (DB_THREAD_SELF): Likewise.
2631         * sysdeps/sparc/tls.h (DB_THREAD_SELF): Likewise.
2632         * sysdeps/s390/tls.h (DB_THREAD_SELF): Pass __WORDSIZE as bit size
2633         of thread register as second parameter to REGISTER macro in 64 case.
2635 2004-01-03  Ulrich Drepper  <drepper@redhat.com>
2637         * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Removed.
2638         (CFLAGS-getpid.o): Defined.
2639         (CFLAGS-getpid.os): Defined.
2641 2003-12-31  Ulrich Drepper  <drepper@redhat.com>
2643         * pthread_getattr_np.c (pthread_getattr_np): Make sure stack info
2644         returned for main thread does not overlap with any other VMA.
2645         Patch by Jakub Jelinek.
2647 2003-12-29  Jakub Jelinek  <jakub@redhat.com>
2649         * tst-raise1.c: Include stdio.h.
2651 2003-12-23  Jakub Jelinek  <jakub@redhat.com>
2653         * sysdeps/unix/sysv/linux/raise.c (raise): Protect pid = selftid
2654         setting with __ASSUME_TGKILL || defined __NR_tgkill.
2655         If pid is 0, set it to selftid.
2656         * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Make inline.
2657         Don't set self->pid but self->tid.  If self->pid == 0 and self->tid
2658         != 0, return self->tid without doing a syscall.
2659         * descr.h (struct pthread): Move pid field after tid.
2661         * Makefile (tests): Add tst-raise1.
2662         * tst-raise1.c: New file.
2664 2003-12-23  Roland McGrath  <roland@redhat.com>
2666         * tst-oddstacklimit.c: New file.
2667         * Makefile (tests): Add it.
2668         (tst-oddstacklimit-ENV): New variable.
2670         * init.c (__pthread_initialize_minimal_internal): Round stack rlimit
2671         value up to page size for __default_stacksize.
2673 2003-12-21  Ulrich Drepper  <drepper@redhat.com>
2675         * Makefile (tests): Add tst-eintr5.
2676         * tst-eintr5.c: New file.
2678         * eintr.c (eintr_source): Prevent sending signal to self.
2680         * tst-eintr2.c (tf1): Improve error message.
2682 2003-12-20  Ulrich Drepper  <drepper@redhat.com>
2684         * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Define.
2685         * sysdeps/unix/sysv/linux/getpid.c: New file.
2686         * pthread_cancel.c: Add comment explaining use of PID field.
2687         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
2688         * pthread_getattr_np.c: Use abs() when comparing PID and TID fields.
2689         * sysdeps/unix/sysv/linux/fork.c: Negate PID field of parent
2690         temporarily to signal the field must not be relied on and updated
2691         by getpid().
2692         * sysdeps/unix/sysv/linux/pt-raise.c: Handle case where PID is
2693         temporarily negative.
2694         * sysdeps/unix/sysv/linux/raise.c: Likewise.
2696 2003-12-19  Ulrich Drepper  <drepper@redhat.com>
2698         * eintr.c (setup_eintr): Add new parameter.  Pass to thread function.
2699         (eintr_source): If ARG != NULL, use pthread_kill.
2700         * tst-eintr1.c: Adjust for this change.
2701         * tst-eintr2.c: Likewise.
2702         * Makefile (tests): Add tst-eintr3 and tst-eintr4.
2703         * tst-eintr3.c: New file.
2704         * tst-eintr4.c: New file.
2706 2003-12-19  Jakub Jelinek  <jakub@redhat.com>
2708         * libc-cancellation.c (__libc_enable_asynccancel): Don't cancel
2709         if CANCELSTATE_BITMASK is set.
2710         * sysdeps/pthread/librt-cancellation.c (__librt_enable_asynccancel):
2711         Likewise.
2713         * Makefile (tests): Add tst-cancel22 and tst-cancel23.
2714         (tests-reverse): Add tst-cancel23.
2715         * tst-cancel22.c: New test.
2716         * tst-cancel23.c: New test.
2718 2003-12-18  Ulrich Drepper  <drepper@redhat.com>
2720         * tst-eintr1.c: Better error messages.
2722         * Makefile (tests): Add tst-eintr2.
2723         * tst-eintr2.c: New file.
2725 2003-12-18  Jakub Jelinek  <jakub@redhat.com>
2727         * Makefile (tests): Add tst-cancel21 and tst-cancelx21.
2728         (CFLAGS-tst-cancelx21.c): Set.
2729         * tst-cancel21.c: New test.
2730         * tst-cancelx21.c: New test.
2732         * unwind.c (FRAME_LEFT): Add adj argument.  Subtract it from each
2733         comparison operand.
2734         (unwind_stop): Use _JMPBUF_CFA_UNWINDS_ADJ macro instead of
2735         _JMPBUF_CFA_UNWINDS.  Adjust FRAME_LEFT invocations.
2736         * pt-longjmp.c: Include jmpbuf-unwind.h.
2737         (__pthread_cleanup_upto): Use _JMPBUF_UNWINDS_ADJ macro instead of
2738         _JMPBUF_UNWINDS.  Adjust compared pointers.
2739         * init.c (__pthread_initialize_minimal_internal): Initialize
2740         pd->stackblock_size.
2741         * sysdeps/pthread/jmpbuf-unwind.h: Removed.
2742         * sysdeps/alpha/jmpbuf-unwind.h: New file.
2743         * sysdeps/i386/jmpbuf-unwind.h: New file.
2744         * sysdeps/powerpc/jmpbuf-unwind.h: New file.
2745         * sysdeps/s390/jmpbuf-unwind.h: New file.
2746         * sysdeps/sh/jmpbuf-unwind.h: New file.
2747         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: New file.
2748         * sysdeps/x86_64/jmpbuf-unwind.h: New file.
2749         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Include stdint.h.
2750         (_JMPBUF_CFA_UNWINDS): Remove.
2751         (_JMPBUF_CFA_UNWINDS_ADJ, _JMPBUF_UNWINDS_ADJ): Define.
2753 2003-12-12  Jakub Jelinek  <jakub@redhat.com>
2755         * Makefile (tests): Add tst-cancel20 and tst-cancelx20.
2756         (CFLAGS-tst-cancelx20.c): Set.
2757         * tst-cancel20.c: New test.
2758         * tst-cancelx20.c: New test.
2760 2003-12-17  Ulrich Drepper  <drepper@redhat.com>
2762         * init.c (__pthread_initialize_minimal_internal): Don't treat
2763         architectures with separate register stack special here when
2764         computing default stack size.
2766 2003-12-17  Roland McGrath  <roland@redhat.com>
2768         * Makefile (tst-cancelx7-ARGS): New variable.
2769         Reportd by Greg Schafer <gschafer@zip.com.au>.
2771 2003-12-17  Jakub Jelinek  <jakub@redhat.com>
2773         * Makefile (tests): Add tst-stack3.  Depend on $(objpfx)tst-stack3-mem.
2774         (generated): Add tst-stack3.mtrace and tst-stack3-mem.
2775         (tst-stack3-ENV): Set.
2776         ($(objpfx)tst-stack3-mem): New.
2777         * tst-stack3.c: New test.
2779 2003-12-10  David Mosberger  <davidm@hpl.hp.com>
2781         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init_EPILOG_BEGINS):
2782         Add unwind directives.  Drop unused .regstk directive.
2783         (_fini_EPILOG_BEGINS): Add unwind directives.
2785 2003-12-11  Ulrich Drepper  <drepper@redhat.com>
2787         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
2788         Assume parameter is a pointer.
2789         (lll_futex_wake): Likewise.
2790         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_wait):
2791         Likewise.
2792         (lll_futex_wake): Likewise.
2793         Reported by Boris Hu.
2794         * sysdeps/unix/sysv/linux/unregister-atfork.c
2795         (__unregister_atfork): Pass pointer to refcntr to lll_futex_wait.
2797         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Simplify a bit.
2799 2003-12-10  Ulrich Drepper  <drepper@redhat.com>
2801         * sysdeps/pthread/bits/libc-lock.h (__rtld_lock_initialize): Define.
2802         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Call
2803         __rtld_lock_initialize for ld.so lock.
2804         Patch in part by Adam Li <adam.li@intel.com>.
2806 2003-12-02  David Mosberger  <davidm@hpl.hp.com>
2808         * Makefile (link-libc-static): Remove -lgcc_eh---it's already mentioned
2809         in $(gnulib).  Also, remove stale comment.
2811 2003-11-12  David Mosberger  <davidm@hpl.hp.com>
2813         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Take
2814         advantage of new syscall stub and optimize accordingly.
2816         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__NR_futex): Rename
2817         from SYS_futex, to match expectations of
2818         sysdep.h:DO_INLINE_SYSCALL.
2819         (lll_futex_clobbers): Remove.
2820         (lll_futex_timed_wait): Rewrite in terms of DO_INLINE_SYSCALL.
2821         (lll_futex_wake): Likewise.
2822         (lll_futex_requeue): Likewise.
2823         (__lll_mutex_trylock): Rewrite to a macro, so we can include this
2824         file before DO_INLINE_SYSCALL is defined (proposed by Jakub
2825         Jelinek).
2826         (__lll_mutex_lock): Likewise.
2827         (__lll_mutex_cond_lock): Likewise.
2828         (__lll_mutex_timed_lock): Likewise.
2829         (__lll_mutex_unlock): Likewise.
2830         (__lll_mutex_unlock_force): Likewise.
2832         * sysdeps/ia64/tls.h: Move declaration of __thread_self up so it
2833         comes before the include of <sysdep.h>.
2834         (THREAD_SELF_SYSINFO): New macro.
2835         (THREAD_SYSINFO): Likewise.
2836         (INIT_SYSINFO): New macro.
2837         (TLS_INIT_TP): Call INIT_SYSINFO.
2839         * sysdeps/ia64/tcb-offsets.sym: Add SYSINFO_OFFSET.
2841         * sysdeps/pthread/createthread.c (create_thread): Use
2842         THREAD_SELF_SYSINFO and THREAD_SYSINFO instead of open code.
2843         * allocatestack.c (allocate_stack): Use THREAD_SYSINFO and
2844         THREAD_SELF_SYSINFO instead of open code.
2845         * sysdeps/i386/tls.h (THREAD_SELF_SYSINFO): New macro.
2846         (THREAD_SYSINFO): Likewise.
2848         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: New file.
2850         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Work around gas problem.
2852 2003-12-06  Ulrich Drepper  <drepper@redhat.com>
2854         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Use .init_array
2855         instead of .init.  Patch by David Mosberger.
2857 2003-11-30  Thorsten Kukuk  <kukuk@suse.de>
2859         * sysdeps/pthread/configure.in: Remove broken declaration in C
2860         cleanup handling check.
2862 2003-11-30  Andreas Jaeger  <aj@suse.de>
2864         * Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time).
2865         * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
2866         Likewise.
2868 2003-11-27  Jakub Jelinek  <jakub@redhat.com>
2870         * sysdeps/unix/sysv/linux/internaltypes.h (ATTR_FLAG_OLDATTR): Define.
2871         * pthread_attr_destroy.c: Include shlib-compat.h.
2872         (__pthread_attr_destroy): Return immediately if ATTR_FLAG_OLDATTR
2873         is set in iattr->flags.
2874         * pthread_attr_init.c (__pthread_attr_init_2_0): Set ATTR_FLAG_OLDATTR.
2876 2003-11-21  Jakub Jelinek  <jakub@redhat.com>
2878         * Makefile (distribute): Add tst-cleanup4aux.c.
2880         * tst-cond12.c (prepare): Add prototype.  Move after test-skeleton.c
2881         include.
2883 2003-11-21  Ulrich Drepper  <drepper@redhat.com>
2885         * tst-cond12.c (do_test): If USE_COND_SIGNAL is defined, use
2886         pthread_cond_signal.
2888         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Don't
2889         store mutex address if the current value is ~0l.
2890         * sysdeps/pthread/pthread_cond_timedwait.c
2891         (__pthread_cond_timedwait): Likewise.
2892         * sysdeps/pthread/pthread_cond_broadcast.c
2893         (__pthread_cond_broadcast): Don't use requeue for pshared
2894         condvars.
2896         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
2897         (__pthread_cond_wait): Don't store mutex address if the current
2898         value is ~0l.
2899         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
2900         (__pthread_cond_timedwait): Likewise.
2901         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
2902         (__pthread_cond_broadcast): Don't use requeue for pshared
2903         condvars.
2905         * pthread_cond_init.c (__pthread_cond_init): Initialize __mutex
2906         element with ~0l for pshared condvars, with NULL otherwise.
2908         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
2909         (__pthread_cond_wait): Don't store mutex address if the current
2910         value is ~0l.
2911         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
2912         (__pthread_cond_timedwait): Likewise.
2913         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
2914         (__pthread_cond_broadcast): Don't use requeue for pshared
2915         condvars.
2917         * Makefile: Add rules to build and run tst-cond12 and tst-cond13.
2918         * tst-cond12.c: New file.
2919         * tst-cond13.c: New file.
2921 2003-11-17  Ulrich Drepper  <drepper@redhat.com>
2923         * sysdeps/pthread/configure.in: Make missing forced unwind support
2924         fatal.
2926 2003-11-11  Ulrich Drepper  <drepper@redhat.com>
2928         * pthreadP.h: Don't declare __pthread_unwind as weak inside libpthread.
2930 2003-11-06  Ulrich Drepper  <drepper@redhat.com>
2932         * Makefile: Add magic to clean up correctly.
2934 2003-11-05  Jakub Jelinek  <jakub@redhat.com>
2936         * unwind.c (FRAME_LEFT): Define.
2937         (unwind_stop): Handle old style cleanups here.
2938         (__pthread_unwind): Handle old style cleanups only if
2939         !HAVE_FORCED_UNWIND.
2940         * Makefile (tests): Add tst-cleanup4 and tst-cleanupx4.
2941         (CFLAGS-tst-cleanupx4.c): Add -fexceptions.
2942         ($(objpfx)tst-cleanup4): Depend on $(objpfx)tst-cleanup4aux.o.
2943         ($(objpfx)tst-cleanupx4): Likewise.
2944         * tst-cleanup4.c: New test.
2945         * tst-cleanup4aux.c: New.
2946         * tst-cleanupx4.c: New test.
2948 2003-11-04  Ulrich Drepper  <drepper@redhat.com>
2950         * sysdeps/pthread/bits/stdio-lock.h: Use lll_*lock instead of
2951         lll_mutex_*lock macros to skip atomic operations on some archs.
2953 2003-11-03  Ulrich Drepper  <drepper@redhat.com>
2955         * sysdeps/pthread/tst-timer.c (main): Initialize
2956         sigev2.sigev_value as well.
2958 2003-10-15  Roland McGrath  <roland@redhat.com>
2960         * sysdeps/pthread/configure.in: Barf if visibility attribute support
2961         is missing.
2962         * sysdeps/pthread/configure: Regenerated.
2964 2003-10-09  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2966         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Completely revamp the
2967         locking macros.  No distinction between normal and mutex locking
2968         anymore.
2969         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Rewrite mutex locking.
2970         Merge bits from lowlevelmutex.S we still need.
2971         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Remove.
2972         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
2973         * sysdeps/unix/sysv/linux/sh/not-cancel.h: New file.
2974         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Adjust for
2975         new mutex implementation.
2976         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Likewise.
2977         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
2978         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
2979         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
2980         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
2981         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
2982         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
2983         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
2984         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
2985         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO): Also defined
2986         symbol for entry point to avoid cancellation.
2988 2003-10-07  Jakub Jelinek  <jakub@redhat.com>
2990         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Backout 2003-10-02
2991         changes.
2992         (SAVE_OLDTYPE_0): Fix a typo.
2994 2003-10-03  Ulrich Drepper  <drepper@redhat.com>
2996         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
2997         Check __sigsetjmp return value.  Reported by Daniel Jacobowitz.
2999 2003-10-02  Ulrich Drepper  <drepper@redhat.com>
3001         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (DOCARGS_1): Use
3002         correct offset.
3004 2003-10-02  Jakub Jelinek  <jakub@redhat.com>
3006         * Makefile (tests): Add tst-cancel19.
3007         * tst-cancel19.c: New test.
3009 2003-10-02  Ulrich Drepper  <drepper@redhat.com>
3011         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix saving and
3012         restoring of the old cancellation type.
3014 2003-09-30  Jakub Jelinek  <jakub@redhat.com>
3016         * sysdeps/pthread/malloc-machine.h: Remove misleading comment.
3018 2003-09-27  Wolfram Gloger  <wg@malloc.de>
3020         * sysdeps/pthread/malloc-machine.h: New file
3022 2003-09-24  Roland McGrath  <roland@redhat.com>
3024         * allocatestack.c (__make_stacks_executable): Don't ignore return
3025         value from _dl_make_stack_executable.
3027 2003-09-24  Ulrich Drepper  <drepper@redhat.com>
3029         * allocatestack.c (__make_stacks_executable): Also change
3030         permission of the currently unused stacks.
3032         * allocatestack.c (change_stack_perm): Split out from
3033         __make_stacks_executable.
3034         (allocate_stack): If the required permission changed between the time
3035         we started preparing the stack and queueing it, change the permission.
3036         (__make_stacks_executable): Call change_stack_perm.
3038         * Makefile: Build tst-execstack-mod locally.
3039         * tst-execstack-mod.c: New file.
3041 2003-09-23  Jakub Jelinek  <jakub@redhat.com>
3043         * Makefile (tests): Only add tst-execstack if have-z-execstack is yes.
3045 2003-09-23  Roland McGrath  <roland@redhat.com>
3047         * tst-execstack.c: New file.
3048         * Makefile (tests): Add it.
3049         ($(objpfx)tst-execstack, $(objpfx)tst-execstack.out): New targets.
3050         (LDFLAGS-tst-execstack): New variable.
3052         * allocatestack.c (allocate_stack): Use GL(dl_stack_flags) to decide
3053         whether to use PROT_EXEC for stack mmap.
3054         (__make_stacks_executable): New function.
3055         * pthreadP.h: Declare it.
3056         * init.c (__pthread_initialize_minimal_internal): Set
3057         GL(dl_make_stack_executable_hook) to that.
3059 2003-09-22  Ulrich Drepper  <drepper@redhat.com>
3061         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Adjust for latest
3062         recommendation from AMD re avoidance of lock prefix.
3064 2003-09-22  Jakub Jelinek  <jakub@redhat.com>
3066         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait): Use
3067         lll_futex_timed_wait instead of lll_futex_wait.
3068         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Removed.
3069         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Removed.
3070         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: Removed.
3071         * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: Removed.
3072         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Removed.
3073         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Removed.
3074         * sysdeps/unix/sysv/linux/s390/sem_post.c: Removed.
3075         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Removed.
3076         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Include atomic.h.
3077         Completely revamp the locking macros.  No distinction between
3078         normal and mutex locking anymore.
3079         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
3080         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock_wait,
3081         __lll_lock_timedwait): Fix prototypes.
3082         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_lock_wait,
3083         __lll_lock_timedwait): Likewise.
3084         (lll_mutex_lock, lll_mutex_cond_lock): Use _val instead of _bool
3085         macros, add __builtin_expect.
3086         (lll_mutex_timedlock): Likewise.  Fix return value.
3087         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Removed.
3088         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: Removed.
3089         * sysdeps/unix/sysv/linux/i386/i586/lowlevelmutex.S: Removed.
3090         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: Removed.
3091         * sysdeps/unix/sysv/linux/i386/i686/lowlevelmutex.S: Removed.
3092         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: Removed.
3093         * sysdeps/unix/sysv/linux/lowlevelmutex.c: Removed.
3094         * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: Removed.
3096 2003-09-22  Ulrich Drepper  <drepper@redhat.com>
3098         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
3099         (__lll_mutex_lock_wait): Minor optimization to avoid one atomic
3100         operation if possible.
3102         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Don't play tricks
3103         like jumping over the lock prefix.
3105 2003-09-21  Ulrich Drepper  <drepper@redhat.com>
3107         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Completely revamp the
3108         locking macros.  No distinction between normal and mutex locking
3109         anymore.
3110         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
3111         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
3112         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
3113         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Rewrite mutex
3114         locking.  Merge bits from lowlevelmutex.S we still need.
3115         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
3116         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
3117         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Removed.
3118         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Removed.
3119         * Makefile (routines): Remove libc-lowlevelmutex.
3120         (libpthread-rountines): Remove lowlevelmutex.
3121         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Adjust
3122         for new mutex implementation.
3123         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
3124         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3125         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
3126         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
3127         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
3128         Likewise.
3129         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
3130         Likewise.
3131         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
3132         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
3133         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise
3134         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
3135         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3136         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3137         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
3138         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
3139         Likewise.
3140         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3141         Likewise.
3142         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
3143         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
3144         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
3145         Don't use requeue.
3146         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
3147         * sysdeps/pthread/pthread_cond_signal.c: Don't use requeue.
3149 2003-09-20  Ulrich Drepper  <drepper@redhat.com>
3151         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't match memory
3152         in parameters of asm with output parameters.
3154         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Change
3155         type of DECR parameter to int.
3156         * pthreadP.h: Adjust prototype of __pthread_mutex_unlock_usercnt.
3158 2003-09-18  Jakub Jelinek  <jakub@redhat.com>
3160         * tst-attr3.c (tf, do_test): Print stack start/end/size and
3161         guardsize for each thread.
3163 2003-09-17  Jakub Jelinek  <jakub@redhat.com>
3165         * sysdeps/pthread/pthread.h (pthread_getattr_np): Clarify usage.
3166         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
3167         (pthread_attr_setaffinity_np): Handle cpuset == NULL.
3169         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
3170         (pthread_attr_getaffinity_np): Don't segfault if iattr->cpuset is
3171         NULL.
3172         * pthread_getattr_np.c: Set cpuset using pthread_getaffinity_np.
3173         * pthreadP.h (pthread_getaffinity_np): Add hidden_proto.
3174         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
3175         (pthread_getaffinity_np): Add hidden_def.
3177         * Makefile (tests): Add tst-attr3.
3178         * tst-attr3.c: New test.
3180         * sysdeps/i386/Makefile (CFLAGS-tst-align.c): Remove.
3182 2003-09-15  Jakub Jelinek  <jakub@redhat.com>
3184         * sysdeps/i386/Makefile (CFLAGS-pthread_create.c,
3185         CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
3187 2003-09-17  Jakub Jelinek  <jakub@redhat.com>
3189         * Makefile (CFLAGS-tst-align.c): Add $(stack-align-test-flags).
3190         * tst-align.c: Include tst-stack-align.h.
3191         (tf, do_test): Use TEST_STACK_ALIGN macro.
3193 2003-09-17  Ulrich Drepper  <drepper@redhat.com>
3195         * pthread_attr_init.c (__pthread_attr_init_2_0): Remove unused
3196         variable.
3198 2003-09-16  Ulrich Drepper  <drepper@redhat.com>
3200         * pthread_getattr_np.c (pthread_getattr_np): Correctly fill in the
3201         stack-related values for the initial thread.
3203 2003-09-15  Jakub Jelinek  <jakub@redhat.com>
3205         * Makefile (CFLAGS-pthread_once.c): Add $(uses-callbacks).
3207 2003-09-11  Ulrich Drepper  <drepper@redhat.com>
3209         * pthread_mutex_lock.c: Minor code rearrangements.
3211 2003-09-05  Roland McGrath  <roland@redhat.com>
3213         * pthread_create.c (__pthread_pthread_sizeof_descr): Removed.
3214         Instead, include ../nptl_db/db_info.c to do its magic.
3215         * pthread_key_create.c (__pthread_pthread_keys_max): Removed.
3216         (__pthread_pthread_key_2ndlevel_size): Likewise.
3217         * sysdeps/alpha/tls.h (DB_THREAD_SELF): New macro.
3218         * sysdeps/i386/tls.h (DB_THREAD_SELF): New macro.
3219         * sysdeps/ia64/tls.h (DB_THREAD_SELF): New macro.
3220         * sysdeps/powerpc/tls.h (DB_THREAD_SELF): New macro.
3221         * sysdeps/s390/tls.h (DB_THREAD_SELF): New macro.
3222         * sysdeps/sh/tls.h (DB_THREAD_SELF): New macro.
3223         * sysdeps/sparc/tls.h (DB_THREAD_SELF): New macro.
3224         * sysdeps/x86_64/tls.h (DB_THREAD_SELF): New macro.
3225         * sysdeps/alpha/td_ta_map_lwp2thr.c: File removed.
3226         * sysdeps/generic/td_ta_map_lwp2thr.c: File removed.
3227         * sysdeps/i386/td_ta_map_lwp2thr.c: File removed.
3228         * sysdeps/ia64/td_ta_map_lwp2thr.c: File removed.
3229         * sysdeps/powerpc/td_ta_map_lwp2thr.c: File removed.
3230         * sysdeps/s390/td_ta_map_lwp2thr.c: File removed.
3231         * sysdeps/sh/td_ta_map_lwp2thr.c: File removed.
3232         * sysdeps/sparc/td_ta_map_lwp2thr.c: File removed.
3233         * sysdeps/x86_64/td_ta_map_lwp2thr.c: File removed.
3235 2003-09-08  Ulrich Drepper  <drepper@redhat.com>
3237         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Change type
3238         of pthread_t to be compatible with LT.
3239         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
3240         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
3241         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3242         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3243         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
3244         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3245         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
3247 2003-09-04  Ulrich Drepper  <drepper@redhat.com>
3249         * sysdeps/unix/sysv/linux/i386/not-cancel.h (fcntl_not_cancel): Define.
3251 2003-09-04  Jakub Jelinek  <jakub@redhat.com>
3253         * unwind-forcedunwind.c: Move to...
3254         * sysdeps/pthread/unwind-forcedunwind.c: ...here.
3255         (pthread_cancel_init): Use ARCH_CANCEL_INIT if defined.
3256         * sysdeps/pthread/jmpbuf-unwind.h: New file.
3257         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: New file.
3258         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: New file.
3259         * unwind.c: Include jmpbuf-unwind.h.
3260         (unwind_stop): Use _JMPBUF_CFA_UNWINDS macro.
3262 2003-09-02  Jakub Jelinek  <jakub@redhat.com>
3264         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: New file.
3265         * sysdeps/unix/sysv/linux/ia64/Versions (libpthread): Export
3266         pthread_attr_setstack and pthread_attr_setstacksize @@GLIBC_2.3.3.
3267         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: New file.
3268         * sysdeps/unix/sysv/linux/alpha/Versions: New file.
3269         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: New file.
3270         * sysdeps/unix/sysv/linux/sparc/Versions: New file.
3271         * pthread_attr_setstack.c (__old_pthread_attr_setstack): New function.
3272         (pthread_attr_setstack): If PTHREAD_STACK_MIN != 16384, export
3273         as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.2.
3274         * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize): New
3275         function.
3276         (pthread_attr_setstacksize): If PTHREAD_STACK_MIN != 16384, export
3277         as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.1.
3278         * Makefile (tests): Add tst-stack2.
3279         * tst-stack2.c: New test.
3280         * tst-stack1.c: Include limits.h and sys/param.h.
3281         (do_test): Set size to MAX (4 * getpagesize (), PTHREAD_STACK_MIN).
3283         * pthread_condattr_setpshared.c: Include errno.h.
3284         (pthread_condattr_setpshared): Return EINVAL if pshared
3285         is neither PTHREAD_PROCESS_PRIVATE nor PTHREAD_PROCESS_SHARED.
3287         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Also
3288         defined symbol for entry point to avoid cancellation.
3289         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
3290         Likewise.
3291         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
3292         Likewise.
3293         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
3294         Likewise.
3295         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h (PSEUDO):
3296         Likewise.
3297         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
3298         Likewise.
3299         * sysdeps/unix/sysv/linux/i386/not-cancel.h (__open_nocancel,
3300         __close_nocancel, __read_nocancel, __write_nocancel,
3301         __waitpid_nocancel): Add attribute_hidden.  If not in libc.so,
3302         libpthread.so or librt.so, define to corresponding function
3303         without _nocancel suffix.
3304         * sysdeps/unix/sysv/linux/s390/not-cancel.h: New file.
3305         * sysdeps/unix/sysv/linux/powerpc/not-cancel.h: New file.
3306         * sysdeps/unix/sysv/linux/sparc/not-cancel.h: New file.
3308         * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: Fix a typo.
3310 2003-09-02  Ulrich Drepper  <drepper@redhat.com>
3312         * sysdeps/unix/sysv/linux/i386/not-cancel.h: New file.
3313         * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: New file.
3315         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Make sure the code
3316         in subsections has a symbol associated with it.
3318         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Also
3319         defined symbol for entry point to avoid cancellation.
3320         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Likewise.
3322 2003-09-01  Jakub Jelinek  <jakub@redhat.com>
3324         * Makefile (tests): Add tst-tls5.
3325         (module-names): Add tst-tls5mod{,a,b,c,d,e,f}.
3326         ($(objpfx)tst-tls5mod{,a,b,c,d,e,f}.so-no-z-defs): Set to yes.
3327         ($(objpfx)tst-tls5): New.
3328         ($(objpfx)tst-tls6.out): Likewise.
3329         (tests): Depend on $(objpfx)tst-tls6.out.
3330         * tst-tls3.c: Include stdint.h and pthreaddef.h.
3331         (do_test): Check pthread_self () return value alignment.
3332         * tst-tls3mod.c: Include stdint.h and pthreaddef.h.
3333         (tf): Check pthread_self () return value alignment.
3334         * tst-tls5.c: New test.
3335         * tst-tls5.h: New.
3336         * tst-tls5mod.c: New.
3337         * tst-tls5moda.c: New.
3338         * tst-tls5modb.c: New.
3339         * tst-tls5modc.c: New.
3340         * tst-tls5modd.c: New.
3341         * tst-tls5mode.c: New.
3342         * tst-tls5modf.c: New.
3343         * tst-tls6.sh: New test.
3345         * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Add
3346         ptr___pthread_cond_timedwait and ptr___pthread_cond_timedwait_2_0.
3347         * init.c (pthread_functions): Initialize them.
3348         * forward.c (pthread_cond_timedwait@GLIBC_2.0,
3349         pthread_cond_timedwait@@GLIBC_2.3.2): New forwards.
3350         * Versions (libc): Export pthread_cond_timedwait@GLIBC_2.0,
3351         pthread_cond_timedwait@@GLIBC_2.3.2.
3353 2003-09-01  Jakub Jelinek  <jakub@redhat.com>
3355         * sysdeps/unix/sysv/linux/alpha/timer_create.c: New file.
3356         * sysdeps/unix/sysv/linux/alpha/timer_delete.c: New file.
3357         * sysdeps/unix/sysv/linux/alpha/timer_getoverr.c: New file.
3358         * sysdeps/unix/sysv/linux/alpha/timer_gettime.c: New file.
3359         * sysdeps/unix/sysv/linux/alpha/timer_settime.c: New file.
3360         * sysdeps/unix/sysv/linux/alpha/Versions: New file.
3362         * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
3364         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Define
3365         _POSIX_THREAD_PRIORITY_SCHEDULING.
3366         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
3368 2003-08-31  Ulrich Drepper  <drepper@redhat.com>
3370         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock): Avoid
3371         nested function, use static inline function from libio.h.
3372         Code by Richard Henderson.
3374         * sysdeps/pthread/bits/libc-lock.h: Mark pthread_setcancelstate as
3375         weak.
3377 2003-08-30  Jakub Jelinek  <jakub@redhat.com>
3379         * sysdeps/unix/sysv/linux/sparc/sparc64/Versions: New file.
3380         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_create.c: New file.
3381         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_delete.c: New file.
3382         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_getoverr.c: New file.
3383         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_gettime.c: New file.
3384         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_settime.c: New file.
3385         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
3386         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
3387         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: New file.
3388         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: New file.
3389         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: New file.
3390         * sysdeps/unix/sysv/linux/sparc/pthread_once.c: New file.
3391         * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: New file.
3392         * sysdeps/unix/sysv/linux/sparc/fork.c: New file.
3393         * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
3394         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: New file.
3395         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: New file.
3396         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: New file.
3397         * sysdeps/sparc/sparc32/pthread_spin_lock.c: New file.
3398         * sysdeps/sparc/sparc32/pthread_spin_trylock.c: New file.
3399         * sysdeps/sparc/sparc32/pthreaddef.h: New file.
3400         * sysdeps/sparc/sparc64/pthread_spin_lock.c: New file.
3401         * sysdeps/sparc/sparc64/pthread_spin_trylock.c: New file.
3402         * sysdeps/sparc/sparc64/pthread_spin_unlock.c: New file.
3403         * sysdeps/sparc/sparc64/pthreaddef.h: New file.
3404         * sysdeps/sparc/tls.h: New file.
3405         * sysdeps/sparc/tcb-offsets.sym: New file.
3406         * sysdeps/sparc/Makefile: New file.
3407         * sysdeps/sparc/td_ta_map_lwp2thr.c: New file.
3408         * init.c [__sparc__] (__NR_set_tid_address): Define.
3410 2003-08-29  Jakub Jelinek  <jakub@redhat.com>
3412         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock,
3413         _IO_release_lock): Define.
3415 2003-08-29  Jakub Jelinek  <jakuB@redhat.com>
3417         * tst-cancel4.c (tf_sigwait, tf_sigwaitinfo, tf_sigtimedwait): Add
3418         sigemptyset before sigaddset.  Reported by jreiser@BitWagon.com.
3420 2003-08-27  Ulrich Drepper  <drepper@redhat.com>
3422         * sysdeps/pthread/pthread.h (pthread_exit): Remove __THROW.
3423         (__pthread_cleanup_class): Add missing return types of member
3424         functions.
3426 2003-08-26  Steven Munroe <sjmunroe@us.ibm.com>
3428         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
3429         (lll_mutex_unlock_force): Add memory barrier between store and futex
3430         syscall.
3432 2003-08-25  Ulrich Drepper  <drepper@redhat.com>
3434         * tst-cancel4.c (do_test): Also unlink tempfname and remove
3435         tempmsg in first loop.
3437 2003-08-18  Ulrich Drepper  <drepper@redhat.com>
3439         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
3440         _POSIX_THREAD_PRIORITY_SCHEDULING.
3441         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3443 2003-08-07  Jakub Jelinek  <jakub@redhat.com>
3445         * sysdeps/pthread/bits/libc-lock.h [_LIBC && SHARED]
3446         (__rtld_lock_default_lock_recursive,
3447         __rtld_lock_default_unlock_recursive): Define.
3448         [_LIBC && SHARED] (__rtld_lock_lock_recursive,
3449         __rtld_lock_unlock_recursive): Define using
3450         GL(_dl_rtld_*lock_recursive).
3451         * init.c (__pthread_initialize_minimal_internal): Initialize
3452         _dl_rtld_lock_recursive and _dl_rtld_unlock_recursive.
3453         Lock GL(_dl_load_lock) the same number of times as
3454         GL(_dl_load_lock) using non-mt implementation was nested.
3456         * pthreadP.h (__pthread_cleanup_upto): Add hidden_proto.
3457         * pt-longjmp.c (__pthread_cleanup_upto): Add hidden_def.
3459 2003-08-06  Jakub Jelinek  <jakub@redhat.com>
3461         * tst-cancel17.c (do_test): Make len2 maximum of page size and
3462         PIPE_BUF.
3464 2003-08-07  Jakub Jelinek  <jakub@redhat.com>
3466         * pthread_create.c (__pthread_create_2_0): Clear new_attr.cpuset.
3468 2003-08-03  Jakub Jelinek  <jakub@redhat.com>
3470         * sysdeps/pthread/createthread.c (do_clone): Move error handling
3471         to first syscall error check.  Move syscall error check for tkill
3472         into __ASSUME_CLONE_STOPPED #ifdef.
3474 2003-08-02  Ulrich Drepper  <drepper@redhat.com>
3476         * sysdeps/pthread/createthread.c (do_clone): If __ASSUME_CLONE_STOPPED
3477         is not defined, do explicit synchronization.
3478         (create_thread): Do not lock pd->lock here.  If __ASSUME_CLONE_STOPPED
3479         is not defined also unlock pd->lock for non-debugging case in case
3480         it is necessary.
3481         * pthread_create.c (start_thread): Always get and release pd->lock
3482         if __ASSUME_CLONE_STOPPED is not defined.
3483         (start_thread_debug): Removed.  Adjust users.
3484         * allocatestack.c (allocate_stack): Always initialize lock if
3485         __ASSUME_CLONE_STOPPED is not defined.
3486         * Makefile (tests): Add tst-sched1.
3487         * tst-sched1.c: New file.
3489         * sysdeps/pthread/createthread.c (do_clone): Only use
3490         sched_setschduler and pass correct parameters.
3492 2003-07-31  Jakub Jelinek  <jakub@redhat.com>
3494         * sysdeps/pthread/pthread.h (pthread_attr_setstackaddr,
3495         pthread_attr_setstacksize): Change PTHREAD_STACK_SIZE to
3496         PTHREAD_STACK_MIN in comments.
3498 2003-07-31  Jakub Jelinek  <jakub@redhat.com>
3500         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
3501         Shut up warnings if INTERNAL_SYSCALL_ERROR_P does not use its first
3502         argument.
3503         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Likewise.
3504         * pthread_condattr_setclock.c (pthread_condattr_setclock): Likewise.
3505         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Include pthreaddef.h.
3506         (__pthread_cleanup_upto): Fix prototype.
3507         (_longjmp_unwind): Adjust caller.
3508         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_timedlock):
3509         Change second argument to const struct pointer.
3510         * tst-sem8.c (main): Remove unused s2 and s3 variables.
3511         * tst-sem9.c (main): Likewise.
3512         * unwind.c: Include string.h for strlen prototype.
3514 2003-07-31  Ulrich Drepper  <drepper@redhat.com>
3516         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
3517         (__pthread_cond_timedwait): Don't use cmov unless HAVE_CMOV is defined.
3518         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S:
3519         Define HAVE_CMOV.
3520         Patch by Nicholas Miell <nmiell@attbi.com>.
3522 2003-07-30  Jakub Jelinek  <jakub@redhat.com>
3524         * init.c (__pthread_initialize_minimal_internal): Initialize
3525         GL(dl_init_static_tls).
3526         * pthreadP.h (__pthread_init_static_tls): New prototype.
3527         * allocatestack.c (init_one_static_tls, __pthread_init_static_tls):
3528         New functions.
3529         * Makefile (tests): Add tst-tls4.
3530         (modules-names): Add tst-tls4moda and tst-tls4modb.
3531         ($(objpfx)tst-tls4): Link against libdl and libpthread.
3532         ($(objpfx)tst-tls4.out): Depend on tst-tls4moda.so and
3533         tst-tls4modb.so.
3534         * tst-tls4.c: New file.
3535         * tst-tls4moda.c: New file.
3536         * tst-tls4modb.c: New file.
3538 2003-06-19  Daniel Jacobowitz  <drow@mvista.com>
3540         * sysdeps/pthread/timer_create.c (timer_create): Call timer_delref
3541         before __timer_dealloc.
3542         * sysdeps/pthread/timer_routines.c (__timer_thread_find_matching):
3543         Don't call list_unlink.
3545 2003-07-29  Roland McGrath  <roland@redhat.com>
3547         * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
3549 2003-07-25  Jakub Jelinek  <jakub@redhat.com>
3551         * tst-cancel17.c (do_test): Check if aio_cancel failed.
3552         Don't reuse struct aiocb A if it failed.
3553         Write fpathconf (fds[1], _PC_PIPE_BUF) + 2 bytes using aio_write,
3554         not just one byte, as that does not block.
3556 2003-07-22  Jakub Jelinek  <jakub@redhat.com>
3558         * sysdeps/pthread/unwind-resume.c: New file.
3559         * sysdeps/pthread/Makefile (routines, shared-only-routines): Add
3560         unwind-resume in csu subdir.
3561         (CFLAGS-unwind-resume.c, CFLAGS-rt-unwind-resume.c): Compile with
3562         exceptions.
3563         (librt-sysdep_routines, librt-shared-only-routines): Add
3564         rt-unwind-resume.
3565         * sysdeps/pthread/rt-unwind-resume.c: New file.
3566         * unwind-forcedunwind.c: New file.
3567         * Makefile (libpthread-routines): Add unwind-forcedunwind.
3568         (libpthread-shared-only-routines): Likewise.
3569         (CFLAGS-unwind-forcedunwind.c): Compile with exceptions.
3570         * pthreadP.h (pthread_cancel_init): New prototype.
3571         * pthread_cancel.c (pthread_cancel): Call pthread_cancel_init.
3573         * sysdeps/pthread/createthread.c (do_thread, create_thread): Make
3574         attr argument const struct pthread_attr *.
3576         * res.c (__res_state): Return __resp.
3577         * descr.h: Include resolv.h.
3578         (struct pthread): Add res field.
3579         * pthread_create.c: Include resolv.h.
3580         (start_thread): Initialize __resp.
3581         * Makefile (tests): Add tst-_res1.
3582         (module-names): Add tst-_res1mod1, tst-_res1mod2.
3583         ($(objpfx)tst-_res1mod2.so): Depend on $(objpfx)tst-_res1mod1.so.
3584         ($(objpfx)tst-_res1): Depend on $(objpfx)tst-_res1mod2.so and
3585         libpthread.
3586         * tst-_res1.c: New file.
3587         * tst-_res1mod1.c: New file.
3588         * tst-_res1mod2.c: New file.
3590 2003-07-21  Ulrich Drepper  <drepper@redhat.com>
3592         * sysdeps/pthread/createthread.c: Don't define CLONE_STOPPED.
3594         * Makefile: Define various *-no-z-defs variables for test DSOs
3595         which has undefined symbols.
3597 2003-07-21  Steven Munroe  <sjmunroe@us.ibm.com>
3599         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
3600         Retry if the stwcx fails to store once_control.
3602 2003-07-20  Ulrich Drepper  <drepper@redhat.com>
3604         * Makefile (libpthread-routines): Add pthread_attr_getaffinity and
3605         pthread_attr_setaffinity.
3606         * Versions [libpthread] (GLIBC_2.3.3): Likewise.
3607         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: New file.
3608         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: New file.
3609         * pthread_attr_destroy.c: Free cpuset element if allocated.
3610         * pthread_create.c: Pass iattr as additional parameter to
3611         create_thread.
3612         * sysdeps/pthread/createthread.c: If attribute is provided and
3613         a new thread is created with affinity set or scheduling parameters,
3614         start thread with CLONE_STOPPED.
3615         * sysdeps/pthread/pthread.h: Declare pthread_attr_getaffinity and
3616         pthread_attr_setaffinity.
3617         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
3618         cpuset element.
3620 2003-07-15  Ulrich Drepper  <drepper@redhat.com>
3622         * tst-tcancel-wrappers.sh: lseek and llseek are not cancelation points.
3624 2003-07-14  Ulrich Drepper  <drepper@redhat.com>
3626         * sysdeps/pthread/configure.in: Require CFI directives also for
3627         ppc and s390.
3629 2003-07-15  Jakub Jelinek  <jakub@redhat.com>
3631         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
3632         Add cfi directives.
3634 2003-07-12  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3636         * sysdeps/sh/tcb-offsets.sym: Add RESULT, TID, CANCELHANDLING and
3637         CLEANUP_JMP_BUF.
3638         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use more
3639         registers as variables.  Call __pthread_mutex_unlock_usercnt.
3640         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
3641         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Store TID
3642         not self pointer in __writer.  Compare with TID to determine
3643         deadlocks.
3644         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
3645         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
3646         Likewise.
3647         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
3648         Likewise.
3649         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add cancellation support.
3650         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
3651         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Define all the nice
3652         macros also when compiling librt.
3654 2003-07-11  Jakub Jelinek  <jakub@redhat.com>
3656         * Makefile (CFLAGS-pthread_once.c): Add -fexceptions
3657         -fasynchronous-unwind-tables.
3658         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
3659         (PSEUDO): Add cfi directives.
3660         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO):
3661         Likewise.
3662         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
3663         Likewise.
3665 2003-07-08  Jakub Jelinek  <jakub@redhat.com>
3667         * pthreadP.h (__pthread_unwind_next, __pthread_register_cancel,
3668         __pthread_unregister_cancel): Add prototypes and hidden_proto.
3669         * unwind.c (__pthread_unwind_next): Add hidden_def.
3670         * cleanup.c (__pthread_register_cancel, __pthread_unregister_cancel):
3671         Likewise.
3672         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
3673         Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
3674         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
3675         Likewise.
3676         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
3677         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
3678         Likewise.
3679         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once): Use
3680         HIDDEN_JUMPTARGET to call __pthread_register_cancel,
3681         __pthread_unregister_cancel and __pthread_unwind_next.
3683 2003-07-04  Jakub Jelinek  <jakub@redhat.com>
3685         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Use
3686         different symbol for the cancellation syscall wrapper and
3687         non-cancellation syscall wrapper.
3688         (PSEUDO_END): Define.
3690 2003-07-05  Richard Henderson  <rth@redhat.com>
3692         * sysdeps/alpha/elf/pt-initfini.c: Avoid .ent/.end.
3693         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_wait,
3694         lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
3695         return actual return value from the syscall, not 0.
3697 2003-07-07  Ulrich Drepper  <drepper@redhat.com>
3699         * descr.h (struct pthread): Add pid field.
3700         * allocatestack.c (allocate_stack): Initialize pid field in descriptor.
3701         (__reclaim_stacks): Likewise.
3702         * init.c (sigcancel_handler): If __ASSUME_CORRECT_SI_PID is defined
3703         also check for PID of the signal source.
3704         (__pthread_initialize_minimal_internal): Also initialize pid field
3705         of initial thread's descriptor.
3706         * pthread_cancel.c: Use tgkill instead of tkill if possible.
3707         * sysdeps/unix/sysv/linux/fork.c: Likewise.
3708         * sysdeps/unix/sysv/linux/pt-raise.c: Likewise.
3709         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
3710         * sysdeps/unix/sysv/linux/raise.c: Likewise.
3712 2003-07-05  Ulrich Drepper  <drepper@redhat.com>
3714         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_push): Renamed.
3715         Fix use of parameter.
3716         (__libc_cleanup_pop): Likewise.
3718 2003-07-04  Ulrich Drepper  <drepper@redhat.com>
3720         * init.c (sigcancel_handler): Change parameters to match handler
3721         for SA_SIGACTION.  Check signal number and code to recognize
3722         invalid invocations.
3724 2003-07-03  Roland McGrath  <roland@redhat.com>
3726         * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr):
3727         Apply sizeof (struct pthread) bias to r13 value.
3729 2003-07-03  Ulrich Drepper  <drepper@redhat.com>
3731         * sysdeps/pthread/configure.in: Require CFI directives.
3733         * sysdeps/pthread/librt-cancellation.c (__pthread_unwind): Remove
3734         definition.
3735         * pthreadP.h (__pthread_unwind): Add hidden_proto if used in
3736         libpthread compilation.
3737         * unwind.c (__pthread_unwind): Add hidden_def.
3738         * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_unwind.
3740 2003-07-01  Ulrich Drepper  <drepper@redhat.com>
3742         * libc-cancellation.c (__libc_cleanup_routine): Define.
3743         * sysdeps/pthread/bits/libc-lock.h (__pthread_cleanup_push): Define.
3744         (__pthread_cleanup_pop): Define.
3746 2003-07-01  Richard Henderson  <rth@redhat.com>
3748         * sysdeps/alpha/elf/pt-initfini.c: New file.
3749         * sysdeps/alpha/pthread_spin_lock.S: New file.
3750         * sysdeps/alpha/pthread_spin_trylock.S: New file.
3751         * sysdeps/alpha/pthreaddef.h: New file.
3752         * sysdeps/alpha/td_ta_map_lwp2thr.c: New file.
3753         * sysdeps/alpha/tls.h: New file.
3754         * sysdeps/unix/sysv/linux/alpha/Makefile: New file.
3755         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: New file.
3756         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: New file.
3757         * sysdeps/unix/sysv/linux/alpha/createthread.c: New file.
3758         * sysdeps/unix/sysv/linux/alpha/fork.c: New file.
3759         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: New file.
3760         * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: New file.
3761         * sysdeps/unix/sysv/linux/alpha/pthread_once.c: New file.
3762         * sysdeps/unix/sysv/linux/alpha/sem_post.c: New file.
3763         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
3765 2003-07-01  Ulrich Drepper  <drepper@redhat.com>
3767         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Add correct
3768         cleanup support and unwind info.
3770 2003-06-30  Ulrich Drepper  <drepper@redhat.com>
3772         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
3773         Use correct cleanup handler registration.  Add unwind info.
3774         * sysdeps/unix/sysv/linux/unwindbuf.sym: New file.
3775         * sysdeps/unix/sysv/linux/Makefile: Add rule to build unwindbuf.h.
3776         * tst-once3.c: Add cleanup handler and check it is called.
3777         * tst-once4.c: Likewise.
3778         * tst-oncex3.c: New file.
3779         * tst-oncex4.c: New file.
3780         * Makefile: Add rules to build and run tst-oncex3 and tst-oncex4.
3782 2003-06-29  Ulrich Drepper  <drepper@redhat.com>
3784         * sysdeps/pthread/configure.in: Check for C cleanup handling in gcc.
3786 2003-06-27  Ulrich Drepper  <drepper@redhat.com>
3788         * tst-cancel4.c (tf_msgrcv): Use IPC_PRIVATE in msgget call.
3789         (tf_msgsnd): Likewise.
3791         * tst-cancel4.c (tf_msgrcv): Strengthen test against valid
3792         premature returns a bit more.
3794 2003-06-26  Ulrich Drepper  <drepper@redhat.com>
3796         * sysdeps/pthread/librt-cancellation.c: Move __pthread_unwind
3797         definition to the front.
3799         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rename
3800         the cleanup functions to make the names unique.  Fix dwarf opcode
3801         un unwind table.
3802         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Rename cleanup
3803         functions to make the names unique.  Fix CFA offset for two blocks.
3805 2003-06-25  Ulrich Drepper  <drepper@redhat.com>
3807         * sysdeps/pthread/pthread.h (class __pthread_cleanup_class): Add
3808         missing closing braces.
3809         Patch by Christophe Saout <christophe@saout.de>.
3811 2003-06-24  Roland McGrath  <roland@redhat.com>
3813         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Typo fix.
3815 2003-06-24  Ulrich Drepper  <drepper@redhat.com>
3817         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: New file.
3818         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: New file.
3820         * pthreadP.h: Declare __find_thread_by_id.
3821         * allocatestack.c [HP_TIMING_AVAIL]: Define __find_thread_by_id.
3822         * pthread_clock_gettime.c: Allow using other thread's clock.
3823         * pthread_clock_settime.c: Likewise.
3824         * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
3825         * Makefile: Add rules to build and run tst-clock2.
3826         * tst-clock2.c: New file.
3828 2003-06-23  Ulrich Drepper  <drepper@redhat.com>
3830         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rewrite
3831         to use exception-based cleanup handler.
3832         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
3834         * tst-cond8.c (ch): Announce that we are done.
3836         * pthreadP.h (__pthread_mutex_cond_lock): Mark with internal_function.
3838         * tst-cancel17.c (tf): Retry aio_suspend in case of EINTR.
3839         Also test aio_suspend with timeout value.
3841 2003-06-22  Ulrich Drepper  <drepper@redhat.com>
3843         * pthreadP.h: Mark __pthread_mutex_unlock_usercnt also hidden.
3844         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Add
3845         attribute_hidden.
3847         * pthreadP.h (__pthread_mutex_init_internal): Mark hidden.
3848         (__pthread_mutex_lock_internal): Likewise.
3849         (__pthread_mutex_unlock_internal): Likewise.
3850         (__pthread_mutex_unlock_usercnt): Declare.
3851         * pthread_mutex_destroy.c: Always fail if used in any way.
3852         * pthread_mutex_init.c: Update comment.
3853         * pthread_mutex_lock.c: If NO_INCR is not defined adjust __nusers.
3854         * pthread_mutex_timedlock.c: Adjust __nusers.
3855         * pthread_mutex_trylock.c: Adjust __nusers.
3856         * pthread_mutex_unlock.c: Old code is in __pthread_mutex_unlock_usercnt
3857         and public interfaces are wrapper with pass additional parameter.
3858         __pthread_mutex_unlock_usercnt does not adjust __nusers if second
3859         parameter zero.
3860         * tst-mutex8.c: New file.
3861         * Makefile (tests): Add tst-mutex8.
3862         * sysdeps/pthread/pthread_cond_timedwait.c: Call
3863         __pthread_mutex_unlock_usercnt.
3864         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
3865         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3866         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
3867         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3868         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3869         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Define NO_INCR.
3870         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
3871         Add __nusers.
3872         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3873         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3874         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3875         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
3876         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3878         * pthread_mutex_lock.c: Don't store THREAD_ID in __owner, use TID.
3879         * pthread_mutex_timedlock.c: Likewise.
3880         * pthread_mutex_trylock.c: Adjust __nusers.
3881         * pthread_mutex_unlock.c: Compare with TID not THREAD_ID.
3882         * tst-mutex9.c: New file.
3883         * Makefile (tests): Add tst-mutex9.
3884         * sysdeps/i386/tls.h: Remove THREAD_ID definition.
3885         * sysdeps/ia64/tls.h: Likewise.
3886         * sysdeps/powerpc/tls.h: Likewise.
3887         * sysdeps/s390/tls.h: Likewise.
3888         * sysdeps/sh/tls.h: Likewise.
3889         * sysdeps/x86_64/tls.h: Likewise.
3890         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
3891         Change type of __owner.
3892         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3893         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3894         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3895         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
3896         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3898 2003-06-19  Jakub Jelinek  <jakub@redhat.com>
3900         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Move to...
3901         * sysdeps/unix/sysv/linux/sem_post.c: ...here.
3903         * sysdeps/unix/sysv/linux/sem_post.c: Move to...
3904         * sysdeps/unix/sysv/linux/powerpc/sem_post.c: ... here.  Pass nr + 1
3905         instead of nr to lll_futex_wake.  Only set errno and return -1
3906         if err < 0.
3908         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_wait,
3909         lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
3910         return actual return value from the syscall, not 0.
3912 2003-06-18  Ulrich Drepper  <drepper@redhat.com>
3914         * tst-cancel4.c (tf_msgsnd): Don't always use 100 as the type,
3915         find a random value.
3916         (tf_msgrcv): Likewise.  Also don't report msgrcv returns if
3917         errno==EIDRM.
3919         * sysdeps/unix/sysv/linux/timer_settime.c: Add prototype for
3920         compat_timer_settime.
3921         * sysdeps/unix/sysv/linux/timer_gettime.c: Add prototype for
3922         compat_timer_gettime.
3923         * sysdeps/unix/sysv/linux/timer_getoverr.c: Add prototype for
3924         compat_timer_getoverrun.
3925         * sysdeps/unix/sysv/linux/timer_delete.c: Add prototype for
3926         compat_timer_delete.
3928         * pthread_mutex_destroy.c (__pthread_mutex_destroy): For
3929         error-checking mutex detect busy mutexes.
3931 2003-06-17  Ulrich Drepper  <drepper@redhat.com>
3933         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_mutex_lock):
3934         Add ax to clobber list.
3935         (lll_mutex_cond_lock): Likewise.
3936         (lll_mutex_unlock): Likewise.
3937         (lll_lock): Likewise.
3938         (lll_unlock): Likewise.
3940         * Makefile: Add rules to build and run tst-cancel18 and tst-cancelx18.
3941         * tst-cancel18.c: New file.
3942         * tst-cancelx18.c: New file.
3944         * tst-cancel4.c: Test connect, creat, msgrcv, msgsnd, sendmsg, sendto,
3945         and tcdrain.
3947         * Makefile: Add rules to build and run tst-cancel17 and tst-cancel17x.
3948         * tst-cancel17.c: New file.
3949         * tst-cancelx17.c: New file.
3951         * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
3952         * sysdeps/unix/sysv/linux/sigwait.c: New file.
3953         * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
3955         * tst-cancel4.c: Test open, close, pread, pwrite, fsync, and msync.
3957 2003-06-16  Jakub Jelinek  <jakub@redhat.com>
3959         * sysdeps/pthread/createthread.c (create_thread): Set
3960         header.multiple_threads unconditionally.
3961         * allocatestack.c (allocate_stack): Likewise.
3962         * descr.h (struct pthread): Add header.multiple_threads
3963         unconditionally.
3964         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (CENABLE, CDISABLE):
3965         Define for librt.  #error if neither libpthread, libc nor librt.
3966         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (CENABLE, CDISABLE):
3967         Likewise.
3968         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (CENABLE,
3969         CDISABLE): Likewise.
3970         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (CENABLE,
3971         CDISABLE): Likewise.
3972         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (CENABLE,
3973         CDISABLE): Likewise.
3974         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (CENABLE,
3975         CDISABLE): Likewise.  Access header.multiple_threads outside of
3976         libc and libpthread.
3977         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (CENABLE, CDISABLE):
3978         Likewise.
3979         * sysdeps/x86_64/tls.h (tcbhead_t): Add multiple_threads.
3980         * sysdeps/x86_64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define.
3982 2003-06-17  Ulrich Drepper  <drepper@redhat.com>
3984         * tst-cancel4.c: Add tests for the socket and signal functions, pause.
3985         Also test early cancellation before the thread reaches the cancellation
3986         point.
3988         * Makefile: Compile forward.c with exceptions.
3990         * sysdeps/unix/sysv/linux/sleep.c: New file.
3992 2003-06-16  Ulrich Drepper  <drepper@redhat.com>
3994         * Makefile: Add CFLAGS definition to compile function wrappers
3995         duplicated from libc with exceptions.
3996         * tst-cancel4.c: Also check cancellation handlers.
3998         * Makefile: Add rules to build and run tst-cancel16 and
3999         tst-cancelx16.  Add missing CFLAGS definitions.
4000         * tst-cancel16.c: New file.
4001         * tst-cancelx16.c: New file.
4003 2003-06-15  Ulrich Drepper  <drepper@redhat.com>
4005         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
4006         (DL_SYSINFO_IMPLEMENTATION): Use CFI opcodes.
4007         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
4008         (DL_SYSINFO_IMPLEMENTATION): Likewise.
4010         * pthreadP.h (LIBC_CANCEL_ASYNC): Also define for librt.
4011         (LIBC_CANCEL_RESET): Likewise.
4012         Declare __librt_enable_asynccancel and __librt_disable_asynccancel.
4013         * sysdeps/pthread/Makefile (librt-sysdep_routines): Add
4014         librt-cancellation.
4015         (CFLAGS-libcrt-cancellation.c): Define.
4016         * sysdeps/pthread/librt-cancellation.c: New file.
4017         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define all the nice
4018         macros also when compiling librt.
4019         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
4020         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
4021         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
4022         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
4023         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
4024         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
4025         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
4027         * sysdeps/unix/sysv/linux/timer_create.c: Add prototype for
4028         compat_timer_create.
4030 2003-06-14  Ulrich Drepper  <drepper@redhat.com>
4032         * sysdeps/pthread/posix-timer.h (timespec_compare): Always inline.
4034         * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
4035         __register_atfork.
4036         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
4037         Add libc_hidden_def.
4039 2003-06-13  Roland McGrath  <roland@redhat.com>
4041         * sysdeps/x86_64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Pass FS
4042         constant from <sys/reg.h> to ps_get_thread_area, not register contents.
4044 2003-06-11  Ulrich Drepper  <drepper@redhat.com>
4046         * allocatestack.c (queue_stack): Always inline.
4047         * ptreadhP.h (__do_cancel): Likewise.
4049 2003-06-10  Jakub Jelinek  <jakub@redhat.com>
4051         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait): Fix
4052         a typo.
4054 2003-06-10  Ulrich Drepper  <drepper@redhat.com>
4056         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
4057         (__pthread_cond_signal): Remove incorrect second addition for
4058         cond_lock!=0.
4060 2003-06-09  Ulrich Drepper  <drepper@redhat.com>
4062         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
4063         (__pthread_cond_signal): Use correct futex pointer in
4064         __lll_mutex_lock_wait call.
4066         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
4067         (__pthread_cond_signal): Some more tweaks to handle cond_lock!=0.
4069 2003-06-08  Ulrich Drepper  <drepper@redhat.com>
4071         * sysdeps/unix/sysv/linux/s390/sem_wait.c (__new_sem_wait): Make
4072         cancelable.
4073         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
4074         Likewise.
4076         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Remove
4077         hand-written CFI generation code.  Since ENTRY/END also initiated
4078         CFI frames this caused two CFI sets to be generated.
4080 2003-06-07  Ulrich Drepper  <drepper@redhat.com>
4082         * cleanup_routine.c: New file.
4083         * Versions (libpthread) [GLIBC_2.3.3]: Add __pthread_cleanup_routine.
4084         * sysdeps/pthread/pthread.h: Add support for fully exception-based
4085         cleanup handling.
4086         * Makefile (libpthread-routines): Add cleanup_routine.
4087         Add more CFLAGS variables to compile with exceptions.  Add comments
4088         why which file needs unwind tables.
4089         (tests) [have-forced-unwind==yes]: Add tst-cancelx* and tst-cleanupx*
4090         tests.
4091         * tst-cancelx1.c: New file.
4092         * tst-cancelx2.c: New file.
4093         * tst-cancelx3.c: New file.
4094         * tst-cancelx4.c: New file.
4095         * tst-cancelx5.c: New file.
4096         * tst-cancelx6.c: New file.
4097         * tst-cancelx7.c: New file.
4098         * tst-cancelx8.c: New file.
4099         * tst-cancelx9.c: New file.
4100         * tst-cancelx10.c: New file.
4101         * tst-cancelx11.c: New file.
4102         * tst-cancelx12.c: New file.
4103         * tst-cancelx13.c: New file.
4104         * tst-cancelx14.c: New file.
4105         * tst-cancelx15.c: New file.
4106         * tst-cleanupx0.c: New file.
4107         * tst-cleanupx0.expect: New file.
4108         * tst-cleanupx1.c: New file.
4109         * tst-cleanupx2.c: New file.
4110         * tst-cleanupx3.c: New file.
4112         * tst-cleanup0.c: Make standard compliant.
4113         * tst-cleanup1.c: Likewise.
4115         * sysdeps/unix/sysv/linux/sem_timedwait.c: Add cancellation support.
4116         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
4117         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
4118         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
4119         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
4120         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
4121         * sysdeps/i386/tcb-offsets.sym: Add RESULT, CANCELHANDLING, and
4122         CLEANUP_JMP_BUF.
4123         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
4124         * tst-cancel12.c: New file.
4125         * tst-cancel13.c: New file.
4126         * tst-cancel14.c: New file.
4127         * tst-cancel15.c: New file.
4128         * Makefile (tests): Add tst-cancel12, tst-cancel13, tst-cancel14,
4129         and tst-cancel15.
4131         * tst-cancel1.c: Add some comments.
4133         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Compute relative
4134         timeout correctly.
4136 2003-06-06  Ulrich Drepper  <drepper@redhat.com>
4138         * Makefile (CFLAGS-pthread_cancel.c): Define.
4140 2003-06-05  Ulrich Drepper  <drepper@redhat.com>
4142         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_rwlock_t):
4143         Change type of __writer element to int.
4144         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4145         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4146         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4147         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4148         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4149         * sysdeps/i386/tcb-offsets.sym: Replace SELF entry with TID entry.
4150         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
4151         * pthread_rwlock_trywrlock.c: Store TID not self pointer in __writer.
4152         Compare with TID to determine deadlocks.
4153         * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
4154         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
4155         * sysdeps/pthread/pthread_rwlock_timedwrlock.: Likewise.
4156         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
4157         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
4158         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
4159         Likewise.
4160         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
4161         Likewise.
4162         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
4163         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
4164         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
4165         Likewise.
4166         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
4167         Likewise.
4168         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
4169         * Makefile (tests): Add tst-rwlock12.
4170         * tst-rwlock12.c: New file.
4172 2003-06-05  Jakub Jelinek  <jakub@redhat.com>
4174         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait,
4175         __lll_timedlock_wait, lll_unlock_wake_cb, __lll_timedwait_tid):
4176         Remove bogus hidden_proto.
4177         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
4178         Likewise.
4179         * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_lock,
4180         lll_unlock_wake_cb, ___lll_timedwait_tid): Likewise.
4181         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (___lll_mutex_lock,
4182         ___lll_mutex_timedlock): Likewise.
4184 2003-06-04  Ulrich Drepper  <drepper@redhat.com>
4186         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
4187         (__pthread_cond_signal): Add some code to eventually handle
4188         cond_lock!=0.
4190 2003-06-01  Ulrich Drepper  <drepper@redhat.com>
4192         * Makefile (tests): Add tst-exec4.
4193         (tst-exec4-ARGS): Define.
4194         * tst-exec4.c: New file.
4196 2003-05-31  Ulrich Drepper  <drepper@redhat.com>
4198         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
4199         Also fail if tv_nsec < 0.
4200         (__lll_timedwait_tid): Likewise.
4201         * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
4202         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_timedwait_tid):
4203         Likewise.
4204         * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_timedwait_tid):
4205         Likewise.
4206         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (__lll_mutex_timedlock):
4207         Likewise.
4208         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
4209         Likewise.
4210         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_timedwait_tid):
4211         Likewise.
4212         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_timedwait_tid):
4213         Likewise.
4215         * Makefile (tests): Add tst-sem8 and tst-sem9.
4216         * tst-sem8.c: New file.
4217         * tst-sem9.c: New file.
4218         * sem_open.c: Fix creation of in_use record if the file exists but
4219         no internal record.
4221         * posix-timer.h: Remove old, unused timer_id2ptr and timer_ptr2id
4222         definitions.
4224         * sysdeps/pthread/timer_create.c (timer_create): In case
4225         evp==NULL, assign timer ID to sival_ptr.
4227         * descr.h (struct pthread_unwind_buf): Change type of prev element to
4228         struct pthread_unwind_buf *.
4229         (struct pthread): Likewise for cleanup_jmp_buf element.
4231         * cleanup.c (__pthread_register_cancel): Add cast to avoid warning.
4232         * cleanup_defer.c (__pthread_register_cancel_defer): Likewise.
4233         * unwind.c (__pthread_unwind_next): Likewise.
4235 2003-05-30  Ulrich Drepper  <drepper@redhat.com>
4237         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
4238         (lll_futex_timed_wait): Use int for futex value parameter.
4239         (lll_futex_wake): Likewise.
4240         (lll_futex_requeue): Likewise.
4242         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
4243         Replace one memory operation with one register operation.
4245         * tst-join4.c (do_test): Fix error message.
4247         * tst-rwlock6.c (do_test): Use correct format specifier.
4249         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
4250         (__lll_mutex_lock_wait): Replace one memory operation with one
4251         register operation.
4252         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S
4253         (__lll_mutex_lock_wait): Likewise.
4255         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
4256         (__lll_mutex_cond_lock): Add one to value parameter of
4257         __lll_lock_wait to reflect reality in the futex syscall.
4258         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
4259         (lll_mutex_cond_lock): Likewise.
4261 2003-05-30  Jakub Jelinek  <jakub@redhat.com>
4263         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_cond_lock):
4264         New function.
4265         (lll_mutex_cond_lock): Define.
4267 2003-05-29  Ulrich Drepper  <drepper@redhat.com>
4269         * Makefile (tests): Add tst-signal6.
4270         * tst-signal6.c: New file.
4272         * sysdeps/unix/sysv/linux/s390/lowlevellock.h
4273         (__lll_mutex_unlock_force): New function
4274         (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
4276         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
4277         (__lll_mutex_unlock_force): New function.
4278         (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
4280         * tst-rwlock7.c (do_test): Use correct format specifier.
4282         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue):
4283         Find break parameter in correct asm argument.
4285 2003-05-27  Jakub Jelinek  <jakub@redhat.com>
4287         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_clobbers):
4288         Remove out4.
4289         (lll_futex_requeue): Fix __o3 constraint, return negative errno if
4290         error occured.
4291         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
4292         Add __mutex.
4293         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_REQUEUE,
4294         lll_futex_requeue, lll_mutex_unlock_force): Define.
4296 2003-05-30  Jakub Jelinek  <jakub@redhat.com>
4298         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
4299         (pthread_cond_t): Add __mutex.
4300         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_REQUEUE,
4301         lll_futex_requeue, lll_mutex_unlock_force): Define.
4303 2003-05-28  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4305         * sysdeps/sh/tcb-offsets.sym: Define MUTEX_FUTEX.
4306         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4307         Add __mutex field.
4308         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (SYSCALL_WITH_INST_PAD):
4309         Define.
4310         (lll_futex_wait, lll_futex_wake): Define.
4311         * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: New file.
4312         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Try using
4313         FUTEX_REQUEUE instead of FUTEX_WAIT.
4314         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
4315         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Remember
4316         mutex which was used in condvar structure.  Call
4317         __pthread_mutex_cond_lock instead of __pthread_mutex_lock_internal.
4318         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
4320         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Don't
4321         include tcb-offsets.h.  Read wakeup value in locked region.
4322         Use the value of gbr register as THREAD_ID.
4323         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
4324         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
4325         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
4327         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Remove futex related
4328         macros.
4330 2003-05-28  Ulrich Drepper  <drepper@redhat.com>
4332         * sysdeps/pthread/pthread_cond_broadcast.c
4333         (__pthread_cond_broadcast): Fix typo: MAX_INT -> INT_MAX.
4335 2003-05-26  Ulrich Drepper  <drepper@redhat.com>
4337         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Fix
4338         typo in register name.
4339         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use parameters
4340         correctly.  Actually use requeue.  Little optimization.
4341         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Store
4342         mutex address early.  Handle cancellation state as 32-bit value.
4343         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4344         Remove unnecessary label.
4346 2003-05-25  Ulrich Drepper  <drepper@redhat.com>
4348         * sysdeps/pthread/pthread_cond_broadcast.c: Try using FUTEX_REQUEUE
4349         instead of FUTEX_WAIT.
4350         * sysdeps/pthread/pthread_cond_signal.c: Likewise.
4351         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
4352         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
4353         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
4354         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
4355         * sysdeps/pthread/pthread_cond_timedwait.c: Remember mutex which was
4356         used in condvar structure.  Call __pthread_mutex_cond_lock instead
4357         of __pthread_mutex_lock_internal.
4358         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4359         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4360         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
4361         (__condvar_cleanup): Always call __pthread_mutex_cond_lock.
4362         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
4363         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4364         * sysdeps/unix/sysv/linux/Makefile (libpthread-sysdep_routines):
4365         Add pthread_mutex_cond_lock.
4366         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add dep_mutex.
4367         * sysdeps/unix/sysv/linux/pthread_cond_mutex_lock.c: New file.
4368         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define
4369         lll_mutex_cond_lock.
4370         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
4371         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
4372         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
4373         Add __mutex field.
4374         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4375         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4377         * sysdeps/i386/tcb-offsets.sym: Define MUTEX_FUTEX.
4378         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
4380         * pthreadP.h: Declare __pthread_mutex_cond_lock.
4381         * pthread_mutex_lock.c: Define LLL_MUTEX_LOCK if not already defined.
4382         Use it instead of lll_mutex_lock.  If __pthread_mutex_lock is a
4383         macro don't define aliases.
4385         * cancellation.c: Remove __pthread_enable_asynccancel_2.
4386         * pthreadP.h: Remove declaration of __pthread_enable_asynccancel_2.
4387         * sysdeps/pthread/pthread_cond_timedwait.c: Use
4388         __pthread_enable_asynccancel instead of __pthread_enable_asynccancel_2.
4389         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4390         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4391         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
4392         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
4393         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4395 2003-05-17  Ulrich Drepper  <drepper@redhat.com>
4397         * sem_open.c: Fix one endless loop.  Implement correct semantics
4398         wrt opening the same semaphore more then once.
4399         * sem_close.c: Adjust for sem_open change.
4400         * semaphoreP.h: Include <semaphore.h>.  Define struct inuse_sem.
4401         Declare __sem_mappings, __sem_mappings_lock, __sem_search.
4402         * Makefile (tests): Add tst-sem7.
4403         * tst-sem7.c: New file.
4405 2003-05-16  Roland McGrath  <roland@redhat.com>
4407         * sysdeps/unix/sysv/linux/register-atfork.c (libc_freeres_fn): Fix
4408         uninitialized variable braino.
4410 2003-05-16  Ulrich Drepper  <drepper@redhat.com>
4412         * sysdeps/unix/sysv/linux/timer_gettime.c (timer_gettime): Correct
4413         test for syscall availability.
4415         * sysdeps/unix/sysv/linux/timer_settime.c (timer_settime): Set
4416         __no_posix_timers to -1 if the syscalls don't exist.
4418         * pthread_join.c (pthread_join): Set tid field of the joined
4419         thread to -1.  This isn't necessary but helps to recognize some
4420         error conditions with almost no cost.
4422         * allocatestack.c (FREE_P): Also negative values indicate an
4423         unused stack.
4425         * unwind.c: Include <unistd.h>.
4427 2003-05-14  Ulrich Drepper  <drepper@redhat.com>
4429         * Makefile ($(objpfx)$(multidir)): Add rule to create the directory.
4431 2003-05-14  Jakub Jelinek  <jakub@redhat.com>
4433         * Makefile (crti-objs, crtn-objs): New variables.
4434         (omit-deps, extra-objs): Add crtn.
4435         ($(objpfx)libpthread.so): Depend on both crti and crtn
4436         and links to them in multidir.
4437         ($(objpfx)crtn.S, $(objpfx)crtn.o): New rules.
4439 2003-05-12  Steven Munroe  <sjmunroe@us.ibm.com>
4441         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
4442         (lll_mutex_unlock): Use atomic_exchange_rel.
4444 2003-05-11  Ulrich Drepper  <drepper@redhat.com>
4446         * cond-perf.c (cons): Add missing locking around setting of alldone.
4448 2003-05-10  Ulrich Drepper  <drepper@redhat.com>
4450         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Remove futex
4451         related macros.
4452         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
4454 2003-05-09  Ulrich Drepper  <drepper@redhat.com>
4456         * tst-sem6.c: New file.
4457         * Makefile (tests): Add tst-sem6.
4459         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (___lll_mutex_unlock):
4460         Use atomic_exchange_rel instead of atomic_exchange.
4461         * sysdeps/unix/sysv/linux/lowlevellock.c (lll_unlock_wake_cb):
4462         Likewise.
4464         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Improve quality of
4465         code for lll_futex_wait and lll_futex_wake in static apps.  Use
4466         vsyscall is possible.
4468         * sysdeps/unix/sysv/linux/pthread_getaffinity.c: New file.
4469         * sysdeps/unix/sysv/linux/pthread_setaffinity.c: New file.
4470         * sysdeps/pthread/pthread.h: Declare pthread_getaffinity_np and
4471         pthread_setaffinity_np.
4472         * Versions [libpthread] (GLIBC_2.3.3): Add pthread_getaffinity_np
4473         and pthread_setaffinity_np.
4474         * Makefile (libpthread-routines): Add pthread_getaffinity and
4475         pthread_setaffinity.
4477         * allocatestack.c (allocate_stack): If ARCH_RETRY_MMAP is defined,
4478         use it in case mmap to allocate the stack fails.
4479         * sysdeps/unix/sysv/linux/x86_64/Makefile: Don't define
4480         ARCH_MAP_FLAGS here.
4481         * sysdeps/x86_64/pthreaddef.h: Define ARCH_MAP_FLAGS and
4482         ARCH_RETRY_MMAP.
4484 2003-05-08  Ulrich Drepper  <drepper@redhat.com>
4486         * sysdeps/unix/sysv/linux/fork.c: Complete rewrite of the atfork
4487         handler implementation.  It is now lockless in fork().
4488         * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
4489         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
4490         * sysdeps/unix/sysv/linux/fork.h: Don't include <link.h>.  Don't
4491         declare the __fork_*_lists.
4492         (struct fork_handler): Include pointers to all three functions.
4493         Add next, refcntr and need_signal elements.
4494         (__fork_handlers): New declaration.
4495         (__register_atfork_malloc): Remove declaration.
4496         (HAVE_register_atfork_malloc): Remove definition.
4497         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove
4498         __pthread_child_handler variable.
4499         (__libc_pthread_init): Use __register_atfork instead of explicitly
4500         adding to the list.
4501         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define lll_futex_wait
4502         and lll_futex_wake.
4503         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
4505         * unwind.c (unwind_cleanup): Print error message and then abort.  This
4506         function must never be reached.
4508         * cond-perf.c: New file.
4510 2003-05-05  Ulrich Drepper  <drepper@redhat.com>
4512         * sysdeps/i386/tls.h (TLS_INIT_TP): Include \n in error message.
4514 2003-05-04  Roland McGrath  <roland@redhat.com>
4516         * Makefile ($(objpfx)../libc.so): New target.
4518 2003-05-02  Ulrich Drepper  <drepper@redhat.com>
4520         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
4521         (pthread_condattr_t): Size is only an int, don't use long for
4522         alignment.
4523         (pthread_mutexattr_t): Likewise.
4524         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4525         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4526         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4528 2003-05-01  Ulrich Drepper  <drepper@redhat.com>
4530         * sysdeps/i386/tls.h: Define THREAD_ID.
4531         * sysdeps/ia64/tls.h: Likewise.
4532         * sysdeps/powerpc/tls.h: Likewise.
4533         * sysdeps/s390/tls.h: Likewise.
4534         * sysdeps/sh/tls.h: Likewise.
4535         * sysdeps/x86_64/tls.h: Likewise.
4536         * pthread_mutex_lock.c: Use THREAD_ID instead of THREAD_SELF to
4537         record ownership.
4538         * pthread_mutex_timedlock.c: Likewise.
4539         * pthread_mutex_trylock.c: Likewise.
4540         * pthread_mutex_unlock.c: Likewise.
4541         * pthread_rwlock_trywrlock.c: Likewise.
4542         * sysdeps/pthread/pthread_rwlocklock_rdlock.c: Likewise.
4543         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
4544         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
4545         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
4547         * sysdeps/pthread/createthread.c (create_thread): Use CLONE_SYSVSEM
4548         flag.
4550 2003-04-29  Jakub Jelinek  <jakub@redhat.com>
4552         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
4553         (__SIZEOF_PTHREAD_COND_T): Define to 48.
4554         (pthread_rwlock_t): Add 16 bytes of pad instead of 8 before __flags.
4555         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
4556         Make __align long long instead of long.
4557         (pthread_rwlock_t): Formatting.
4558         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
4559         (pthread_rwlock_t): Formatting.
4560         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
4561         (pthread_cond_t): Make __align long long instead of long.
4562         (pthread_rwlock_t): Move __flags field to the same position as in
4563         linuxthreads.
4565 2003-04-30  Ulrich Drepper  <drepper@redhat.com>
4567         * tst-rwlock6.c (do_test): Use correct printf format specifiers.
4568         * tst-rwlock7.c (do_test): Likewise.
4570 2003-04-26  Roland McGrath  <roland@redhat.com>
4572         * Makefile ($(test-modules)): Depend on $(common-objpfx)shlib.lds.
4574 2003-04-22  Jakub Jelinek  <jakub@redhat.com>
4576         * allocatestack.c (TLS_TPADJ): Add TLS_PRE_TCB_SIZE instead of
4577         sizeof (struct pthread).
4578         (allocate_stack): Subtract TLS_PRE_TCB_SIZE bytes instead of
4579         1 struct pthread.
4580         * sysdeps/powerpc/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Define
4581         to 0.
4582         (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Define to alignment of
4583         struct pthread.
4584         (TLS_PRE_TCB_SIZE): Increase to cover tcbhead_t preceeded by pad
4585         to 32-bit bytes.
4586         (INSTALL_DTV, GET_DTV, THREAD_DTV): tcbhead_t is immediately before
4587         tcbp.
4588         (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Don't add TLS_TCB_SIZE
4589         unneccessarily.
4590         (NO_TLS_OFFSET): Define.
4591         * sysdeps/unix/sysv/linux/powerpc/createthread.c (TLS_VALUE): Don't
4592         add TLS_TCB_SIZE unnecessarily.
4594 2003-04-22  Roland McGrath  <roland@redhat.com>
4596         * Makeconfig (shared-thread-library): Reverse link order to work
4597         around linker bug.
4599 2003-04-22  Ulrich Drepper  <drepper@redhat.com>
4601         * semaphore.h: Fix typo in comment.
4603 2003-04-21  Ulrich Drepper  <drepper@redhat.com>
4605         * sysdeps/pthread/sigfillset.c: New file.
4607         * init.c (__pthread_initialize_minimal): Don't block SIGTIMER.
4608         * pthreadP.h: Make SIGTIMER and SIGCANCEL the same.
4609         * sysdeps/pthread/pthread_sigmask.c: Remove handling of SIGTIMER.
4610         * sysdeps/pthread/sigaction.c: Likewise.
4611         * sysdeps/pthread/sigprocmask.c: New file.
4612         * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): Define as
4613         __SIGRTMIN+1.
4614         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
4615         Block SIGTIMER.  Also handle SI_TKILL events and terminate thread
4616         in this case.
4618 2003-04-19  Ulrich Drepper  <drepper@redhat.com>
4620         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
4621         (DL_SYSINFO_IMPLEMENTATION): Add .eh_frame information.
4623         * sysdeps/unix/sysv/linux/unregister-atfork.c
4624         (__unregister_atfork): Don't free memory not allocated dynamically.
4626         * semaphore.h: Remove __THROW marker from cancellation points.
4627         * nptl/sysdeps/pthread/pthread.h: Likewise.
4629 2003-04-18  Ulrich Drepper  <drepper@redhat.com>
4631         * sysdeps/pthread/pthread.h: Don't mark pthread_testcancel,
4632         pthread_cancel, pthread_setcancelstate, and pthread_setcanceltype with
4633         __THROW.
4635 2003-04-16  Jakub Jelinek  <jakub@redhat.com>
4637         * tst-cancel4.c (do_test): Use %zd instead of %d when printing cnt.
4639 2003-04-15  Roland McGrath  <roland@redhat.com>
4641         * forward.c (__pthread_unwind): Tweak to avoid warning.
4643 2003-04-15  Ulrich Drepper  <drepper@redhat.com>
4645         * pthreadP.h: Move THREAD_ATOMIC_* replacements to the top.
4647 2003-04-14  Ulrich Drepper  <drepper@redhat.com>
4649         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Don't
4650         overflow CFA advance instructions.
4651         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4653 2003-04-14  Jakub Jelinek  <jakub@redhat.com>
4655         * sysdeps/i386/tls.h: Rename LOCK to LOCK_PREFIX.
4656         * sysdeps/i386/pthread_spin_lock.c: Likewise.
4657         * sysdeps/x86_64/tls.h: Likewise.  Define LOCK_PREFIX if not already
4658         defined.
4660         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Use
4661         DW_CFA_advance_loc2 for .Laddl-.Lsubl.
4662         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
4663         DW_CFA_advance_loc for .Laddl-.Lsubl.
4665 2003-04-13  Ulrich Drepper  <drepper@redhat.com>
4667         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Don't use
4668         position-independent unwind data for static libraries.
4669         Add missing unwind info.  Add comments.
4671         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Add unwind info.
4672         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4673         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
4674         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4676 2003-04-12  Ulrich Drepper  <drepper@redhat.com>
4678         * Makefile: Make sure all cancellation points are compiled with
4679         exception and asynchronous unwind tables.
4681         * sysdeps/x86_64/tls.h (THREAD_SETMEM): Word around compiler bug
4682         which mishandles loading of global object addresses in PIC.
4683         (THREAD_SETMEM_NC): Likewise.
4685 2003-04-11  Ulrich Drepper  <drepper@redhat.com>
4687         * pthread.h: Define new data structure for cleanup buffer.  Declare
4688         new cleanup handler interfaces.
4689         * descr.h: Include <unwind.h> if necessary.  Define pthread_unwind_buf.
4690         (struct pthread): Add cleanup_jmp_buf pointer.  Define
4691         HAVE_CLEANUP_JMP_BUF and not HAVE_CANCELBUF.
4692         * pthreadP.h: Declare __pthread_unwind.  Define __do_cancel to use
4693         it.  Declare old cleanup handler installation functions.
4694         * cleanup.c: Rewrite.  Install handler for unwind-based cleanup
4695         handling.
4696         * cleanup_defer.c: Likewise.
4697         * cleanup_compat.c: New file.  Old cleanup code.
4698         * cleanup_def_compat.c: New file.  Old cleanup code.
4699         * pthread_create.c (start_thread): Initialize cleanup_jmp_buf element
4700         if own thread descriptor.
4701         * unwind.c: New file.
4702         * forward.c: Add __pthread_unwind.
4703         * init.c (pthread_functions): Add __pthread_unwind.
4704         * sysdeps/pthread/pthread-functions.s (struct pthread_functions):
4705         Add ptr___pthread_unwind.
4706         * Versions [GLIBC_2.3.3] (libpthread): Export new cleanup handling
4707         and unwind function.
4708         * Makefile (libpthread-routines): Add cleanup_compat,
4709         cleanup_def_compat, and unwind.  Define CFLAGS to enable unwind
4710         table generation if necessary.
4711         * version.c: Record whether unwind support is compiled in.
4712         * sysdeps/pthread/configure.in: Add checks for unwind unterfaces.
4713         * sysdeps/pthread/bits/libc-lock.h: Add prototypes of the old cleanup
4714         handler interfaces.
4715         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add quite a bit of
4716         complication to generate unwind information for syscall wrappers.
4717         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
4718         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
4719         __cleanup_fct_attribute.
4721         * Makefile: Add rules to build and run tst-cleanup0.
4722         * tst-cleanup0.c: New file.
4723         * tst-cleanup0.expect: New file.
4725         * pthread_create.c (deallocate_tsd): Don't take parameter.  Adjust
4726         caller.  Optimize to avoid often unecessary local variable.
4728 2003-04-11  Roland McGrath  <roland@redhat.com>
4730         * Makefile ($(objpfx)multidir.mk): New target, generated makefile that
4731         sets variable `multidir'; include that.
4732         (generated): Add it.
4733         ($(objpfx)$(multidir)/crti.o): New target.
4734         [$(multidir) != .] (generated-dirs, extra-objs, omit-deps): Add it.
4736 2003-04-11  Ulrich Drepper  <drepper@redhat.com>
4738         * tst-attr2.c (do_test): Add cast to avoid warning.
4739         * tst-mutex4.c (do_test): Likewise.
4741 2003-04-10  Ulrich Drepper  <drepper@redhat.com>
4743         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset CPU clocks
4744         in child.
4746 2003-04-09  Ulrich Drepper  <drepper@redhat.com>
4748         * Makefile (tests): Add tst-detach1.
4749         * tst-detach1.c: New file.
4751 2003-04-08  Ulrich Drepper  <drepper@redhat.com>
4753         * sysdeps/pthread/pthread.h: Remove duplicate
4754         pthread_cleanup_{push,pop} definitions.
4756         * tst-barrier2.c: Eliminate warnings.
4757         * tst-cancel4.c: Likewise.
4758         * tst-cond4.c: Likewise.
4759         * tst-cond6.c: Likewise.
4760         * tst-detach1.c: Likewise.
4761         * tst-rwlock4.c: Likewise.
4762         * tst-rwlock6.c: Likewise.
4763         * tst-rwlock7.c: Likewise.
4764         * tst-sem3.c: Likewise.
4765         * tst-spin2.c: Likewise.
4766         * tst-umask1.c: Likewise.
4768 2003-04-07  Ulrich Drepper  <drepper@redhat.com>
4770         * pthread_detach.c (pthread_detach): Fix test for invalid TID.
4772 2003-04-06  Ulrich Drepper  <drepper@redhat.com>
4774         * descr.h (struct pthread): Move cancelhandling member to the front.
4776 2003-04-05  Ulrich Drepper  <drepper@redhat.com>
4778         * sysdeps/unix/sysv/linux/register-atfork.c: Define malloc_prepare,
4779         malloc_parent, and malloc_child statically.
4780         (__register_atfork_malloc): New function.
4781         (free_mem): Don't free any of the malloc_* variables on the list.
4782         * sysdeps/unix/sysv/linux/fork.h: Declare __register_atfork_malloc.
4783         Define HAVE_register_atfork_malloc.
4785 2003-04-04  Ulrich Drepper  <drepper@redhat.com>
4787         * sysdeps/pthread/createthread.c (create_thread): Add some more
4788         comments explaining when to set multiple_threads and when not.
4790         * pthreadP.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
4791         THREAD_ATOMIC_BIT_SET if not already defined.
4792         * sysdeps/i386/tls.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
4793         THREAD_ATOMIC_BIT_SET:
4794         * sysdeps/x86_64/tls.h: Likewise.
4795         * cleanup_defer.c (_pthread_cleanup_push_defer): Rewrite to use
4796         THREAD_ATOMIC_CMPXCHG_VAL.
4797         (_pthread_cleanup_pop_restore): Likewise.
4798         * cancellation.c (__pthread_enable_asynccancel): Likewise.
4799         (__pthread_enable_asynccancel_2): Likewise.
4800         (__pthread_disable_asynccancel): Likewise.
4801         * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
4802         (__libc_disable_asynccancel): Likewise.
4803         * init.c (sigcancel_handler): Likewise.
4804         * pthread_setcancelstate.c (__pthread_setcancelstate): Likewise.
4805         * pthread_setcanceltype.c (__pthread_setcanceltype): Likewise.
4807 2003-04-03  Ulrich Drepper  <drepper@redhat.com>
4809         * init.c (sigcancel_handler): Don't set EXITING_BIT here.
4810         * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
4811         * pthreadP.h (__do_cancel): Set EXITING_BIT here.
4812         * Makefile (tests): Add tst-cancel11.
4813         * tst-cancel11.c: New file.
4815 2003-04-01  Ulrich Drepper  <drepper@redhat.com>
4817         * pthread_create.c (deallocate_tsd): Clear/free memory after the last
4818         round, not the first.  Use specific_used flag instead of local
4819         found_nonzero variable.  Use THREAD_[SG]ETMEM where possible.
4820         (__free_tcb): Don't call deallocate_tsd here.
4821         (start_thread): Call deallocate_tsd here.
4822         * pthread_setspecific.c: Set specific_used flag really only when
4823         needed.
4824         * Makefile (tests): Add tst-tsd3.c and tst-tsd4.
4825         * tst-tsd3.c: New file.
4826         * tst-tsd4.c: New file.
4828 2003-03-31  Ulrich Drepper  <drepper@redhat.com>
4830         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_mutex_lock):
4831         Use atomic_exchange_and_add instead of __lll_add.
4832         (__lll_mutex_timedlock): Likewise.
4833         Patch by Ian Wienand.
4835 2003-03-24  Steven Munroe  <sjmunroe@us.ibm.com>
4837         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
4838         (SINGLE_THREAD_P): Fix typo.
4839         * tst-cancel-wrappers.sh: Handle '.'ed symbols.
4841 2003-03-31  Ulrich Drepper  <drepper@redhat.com>
4843         * Makefile (tests): Add tst-align.
4844         * tst-align.c: New file.
4845         * sysdeps/i386/Makefile: Define CFLAGS-tst-align.
4847         * sysdeps/i386/tls.h (CALL_THREAD_FCT): Align stack of called
4848         function correctly.
4850         * tst-tsd2.c: Add casts to avoid warnings.
4852 2003-03-30  Ulrich Drepper  <drepper@redhat.com>
4854         * descr.h (struct pthread): Move most often used elements to the front.
4856 2003-03-29  Ulrich Drepper  <drepper@redhat.com>
4858         * Makefile (libpthread-routines): Add pthread_atfork.
4859         (libpthread-static-only-routines): Add pthread_atfork.
4861 2003-03-28  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4863         * sysdeps/sh/tls.h: Include nptl/descr.h after the definition
4864         of TLS_DTV_AT_TP.
4865         (INSTALL_DTV): Add parens.
4866         (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
4867         Use passed descr instead of THREAD_SELF.
4868         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S
4869         (__lll_mutex_timedlock_wait): Correct expected value after
4870         spurious wakeup.
4871         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S:
4872         Release lock before waking up the waiters.
4873         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Correct exit
4874         criteria.  Reorderstruct passed to cleanup handler.  Fix
4875         handling of cancellation and failung pthread_mutex_unlock call.
4876         Use __pthread_enable_asynccancel_2 instead of
4877         __pthread_enable_asynccancel.
4878         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4879         Return result of lock re-get if it fails.
4880         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Fix wrong argument
4881         for __pthread_cleanup_push.
4882         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Fix
4883         completely broken rwlock implementation.
4884         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
4885         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
4886         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
4887         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
4888         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
4889         * sysdeps/unix/sysv/linux/sh/sem_post.S: Fix error value.  Use
4890         versioned_symbol macro.
4891         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Use versioned_symbol macro.
4892         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
4894 2003-03-27  Ulrich Drepper  <drepper@redhat.com>
4896         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Don't declare
4897         __timer_helper_thread.  Declare __start_helper_thread, __helper_once,
4898         and __helper_tid.
4899         (struct timer): Remove th and bar field.
4900         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Remove
4901         debugging code.  Create only one helper thread.
4902         * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Don't kill
4903         helper thread.
4904         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
4905         Renamed.  Define statically.  Use thread info from siginfo.
4906         (__helper_once): New variable.
4907         (__helper_tid): New variable.
4908         (__reset_helper_control): New function.
4909         (__start_helper_thread): New function.
4911         * pthread_create.c (start_thread): Don't use setjmp inside
4912         __builtin_expect to work around gcc bug.
4914         * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Even if
4915         timer_delete syscall fails, but not with ENOSYS, set
4916         __no_posix_timers.
4918         * sysdeps/unix/sysv/linux/timer_settime.c [!__ASSUME_POSIX_TIMERS]
4919         (timer_settime): Fix typo.
4920         * sysdeps/unix/sysv/linux/timer_getoverr.c
4921         [!__ASSUME_POSIX_TIMERS] (timer_getoverrun): Likewise.
4923 2003-03-27  Jakub Jelinek  <jakub@redhat.com>
4925         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Fix
4926         offset of cleanupbuf.__prev.
4928 2003-03-26  Jakub Jelinek  <jakub@redhat.com>
4930         * sysdeps/unix/sysv/linux/timer_getoverr.c: Fix typo in name
4931         of included file.
4933 2003-03-26  Ulrich Drepper  <drepper@redhat.com>
4935         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): If EVP ==
4936         NULL provide default definition to syscall.
4938 2003-03-25  Roland McGrath  <roland@redhat.com>
4940         * sysdeps/pthread/posix-timer.h (TIMER_MAX): Define if not defined.
4941         (timer_id2ptr): Fix typo.
4943 2003-03-25  Ulrich Drepper  <drepper@redhat.com>
4945         * pthreadP.h: Define SIGCANCEL and SIGTIMER.
4946         * sysdeps/i386/pthreaddef.h: Remove SIGCANCEL definition.
4947         * sysdeps/ia64/pthreaddef.h: Likewise.
4948         * sysdeps/powerpc/pthreaddef.h: Likewise.
4949         * sysdeps/s390/pthreaddef.h: Likewise.
4950         * sysdeps/sh/pthreaddef.h: Likewise.
4951         * sysdeps/x86_64/pthreaddef.h: Likewise.
4952         * init.c (__pthread_initialize_minimal): Block SIGTIMER.
4953         * sysdeps/pthread/sigaction.c: Also prevent SIGTIMER handler from
4954         being changed.
4955         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
4956         SIGTIMER is not unblocked.
4957         * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): One more
4958         RT signal taken.
4959         * sysdeps/unix/sysv/linux/pthread_kill.c: Do not allow SIGTIMER to
4960         be send.
4961         * sysdeps/pthread/posix-timer.h (timer_id2ptr, timer_ptr2id): Just
4962         pass pointer through as ID.
4963         * sysdeps/unix/sysv/linux/bits/local_lim.h (TIMER_MAX): Removed.
4964         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: New file.
4965         * sysdeps/unix/sysv/linux/timer_create.c: New file.
4966         * sysdeps/unix/sysv/linux/timer_delete.c: New file.
4967         * sysdeps/unix/sysv/linux/timer_getoverr.c: New file.
4968         * sysdeps/unix/sysv/linux/timer_gettime.c: New file.
4969         * sysdeps/unix/sysv/linux/timer_routines.c: New file.
4970         * sysdeps/unix/sysv/linux/timer_settime.c: New file.
4971         * sysdeps/unix/sysv/linux/ia64/Versions: New file.
4972         * sysdeps/unix/sysv/linux/ia64/timer_create.c: New file.
4973         * sysdeps/unix/sysv/linux/ia64/timer_delete.c: New file.
4974         * sysdeps/unix/sysv/linux/ia64/timer_getoverr.c: New file.
4975         * sysdeps/unix/sysv/linux/ia64/timer_gettime.c: New file.
4976         * sysdeps/unix/sysv/linux/ia64/timer_settime.c: New file.
4977         * sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions: New file.
4978         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_create.c: New file.
4979         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_delete.c: New file.
4980         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_getoverr.c: New file.
4981         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_gettime.c: New file.
4982         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_settime.c: New file.
4983         * sysdeps/unix/sysv/linux/s390/s390-64/Versions: New file.
4984         * sysdeps/unix/sysv/linux/s390/s390-64/timer_create.c: New file.
4985         * sysdeps/unix/sysv/linux/s390/s390-64/timer_delete.c: New file.
4986         * sysdeps/unix/sysv/linux/s390/s390-64/timer_getoverr.c: New file.
4987         * sysdeps/unix/sysv/linux/s390/s390-64/timer_gettime.c: New file.
4988         * sysdeps/unix/sysv/linux/s390/s390-64/timer_settime.c: New file.
4989         * sysdeps/unix/sysv/linux/x86_64/Versions: New file.
4990         * sysdeps/unix/sysv/linux/x86_64/compat-timer.h: New file.
4991         * sysdeps/unix/sysv/linux/x86_64/timer_create.c: New file.
4992         * sysdeps/unix/sysv/linux/x86_64/timer_delete.c: New file.
4993         * sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c: New file.
4994         * sysdeps/unix/sysv/linux/x86_64/timer_gettime.c: New file.
4995         * sysdeps/unix/sysv/linux/x86_64/timer_settime.c: New file.
4997         * pthreadP.h: Remove FRAME_LEFT definition.
4998         * cleanup.c (_pthread_cleanup_push): Don't check for reference to
4999         already left frame.  Programs which have this problem are not POSIX
5000         compliant.
5001         * cleanup_defer.c (_pthread_cleanup_push_defer): Likewise.
5003 2003-03-24  Ulrich Drepper  <drepper@redhat.com>
5005         * sysdeps/pthread/tst-timer.c: Check return values of the
5006         functions we test.
5008 2003-03-23  Roland McGrath  <roland@redhat.com>
5010         * tst-tls3.c (do_test) [! HAVE___THREAD]: Don't test anything.
5011         * tst-tls3mod.c: Likewise.
5012         * tst-tls1.c: Likewise.
5013         * tst-tls2.c: Likewise.
5015         * tst-mutex5.c (do_test): Unlock before destroy, otherwise we invoke
5016         undefined behavior.
5018         * tst-join5.c (tf1, tf2): Add a cast.
5020         * Makeconfig (includes): Append -I$(..)nptl to this variable.
5022         * tst-barrier2.c (do_test) [! _POSIX_THREAD_PROCESS_SHARED]:
5023         Don't test anything.
5024         * tst-cond4.c: Likewise.
5025         * tst-cond6.c: Likewise.
5026         * tst-flock2.c: Likewise.
5027         * tst-mutex4.c: Likewise.
5028         * tst-rwlock4.c: Likewise.
5029         * tst-signal1.c: Likewise.
5030         * tst-spin2.c: Likewise.
5031         * tst-cond11.c [! _POSIX_CLOCK_SELECTION]: Likewise.
5033         * tst-mutex4.c: Use test-skeleton.c.
5034         * tst-spin2.c: Likewise.
5035         * tst-sysconf.c: Likewise.
5036         * tst-barrier2.c: Likewise.
5037         * tst-cond4.c: Likewise.
5038         * tst-cond6.c: Likewise.
5039         * tst-rwlock4.c: Likewise.
5040         * tst-unload.c: Likewise.
5041         * tst-flock2.c (do_test): Use return instead of exit.
5043 2003-03-22  Jakub Jelinek  <jakub@redhat.com>
5045         * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
5047 2003-03-21  Ulrich Drepper  <drepper@redhat.com>
5049         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
5050         (__lll_mutex_trylock): Use atomic_compare_and_exchange_val_acq
5051         instead of __lll_compare_and_swap.
5052         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
5053         Likewise.
5054         Removed definition if __lll_compare_and_swap.
5056         * cancellation.c: Adjust for new form of compare&exchange macros.
5057         * cleanup_defer.c: Likewise.
5058         * init.c: Likewise.
5059         * libc-cancellation.c: Likewise.
5060         * old_pthread_cond_broadcast.c: Likewise.
5061         * old_pthread_cond_signal.c: Likewise.
5062         * old_pthread_cond_timedwait.c: Likewise.
5063         * old_pthread_cond_wait.c: Likewise.
5064         * pthread_cancel.c: Likewise.
5065         * pthread_create.c: Likewise.
5066         * pthread_detach.c: Likewise.
5067         * pthread_join.c: Likewise.
5068         * pthread_key_delete.c: Likewise.
5069         * pthread_setcancelstate.c: Likewise.
5070         * pthread_setcanceltype.c: Likewise.
5071         * pthread_timedjoin.c: Likewise.
5072         * pthread_tryjoin.c: Likewise.
5073         * sysdeps/pthread/createthread.c: Likewise.
5075 2003-03-20  Ulrich Drepper  <drepper@redhat.com>
5077         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Include <atomic.h>.
5078         Remove __lll_add, __lll_dec_if_positive, and __lll_test_and_set
5079         definitions.  Replace uses with calls to atomic_* functions.
5080         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
5081         * sysdeps/unix/sysv/linux/lowlevellock.c: Replace __lll_add and
5082         __lll_test_and_set calls with atomic_exchange_and_add and
5083         atomic_exchange calls respectively.
5084         * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
5085         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
5086         * sysdeps/unix/sysv/linux/sem_trywait.c: Likewise.
5087         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
5088         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Likewise.
5089         * sysdeps/unix/sysv/linux/ia64/sem_port.c: Likewise.
5090         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
5092         * allocatestack.c (allocate_stack): Assume atomic_exchange_and_add
5093         returns the old value.
5095 2003-03-20  Martin Schwidefsky  <sky@mschwid3.boeblingen.de.ibm.com>
5097         * sysdeps/s390/pthread_spin_lock.c (pthread_spin_lock): Use type
5098         int for variable OLDVAL and correct inline assembler contraint.
5099         * sysdeps/s390/pthread_spin_trylock.c (pthread_spin_trylock): Use
5100         type int for variable OLD.
5102         * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it
5103         only for s390-32.
5104         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
5105         (SINGLE_THREAD_P): Use global variable __local_multiple_threads
5106         instead of multiple_threads field in the TCB.
5108 2003-03-19  Ulrich Drepper  <drepper@redhat.com>
5110         * sysdeps/i386/i686/bits/atomic.h: Removed.
5111         * sysdeps/i386/i586/bits/atomic.h: Removed.
5112         * sysdeps/i386/i486/bits/atomic.h: Removed.  Moved to glibc.
5113         * sysdeps/x86_64/bits/atomic.h: Removed.  Moved to glibc.
5114         * sysdeps/s390/bits/atomic.h: Removed.  Moved to glibc.
5115         * sysdeps/sh/bits/atomic.h: Removed.  Moved to glibc.
5116         * sysdeps/ia64/bits/atomic.h: Removed.  Moved to glibc.
5117         * sysdeps/powerpc/bits/atomic.h: Removed.  Moved to glibc.
5118         * atomic.h: Removed.  Moved to glibc.
5120         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Add
5121         support for clock selection.
5123         * sysdeps/pthread/pthread_cond_broadcast.c: Release lock before
5124         signalling waiters.
5126 2003-03-18  Roland McGrath  <roland@redhat.com>
5128         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
5129         Add __lll_rel_instr first.  Add memory clobber.
5130         (lll_mutex_unlock): Use __lll_test_and_set.
5131         From Paul Mackerras <paulus@samba.org>.
5133         * sysdeps/powerpc/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define
5134         unconditionally.
5135         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
5136         (SINGLE_THREAD_P):  Add `header.' prefix.
5137         From Paul Mackerras <paulus@samba.org>.
5139         * Versions (libpthread: GLIBC_2.3.2): Move pthread_tryjoin_np and
5140         pthread_timedjoin_np to ...
5141         (libpthread: GLIBC_2.3.3): ... here.
5142         (libpthread: GLIBC_2.2): Move pthread_barrierattr_getpshared there too.
5144         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
5145         Avoid shadowing VAL variable.
5147         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
5148         New macro.
5150 2003-03-18  Ulrich Drepper  <drepper@redhat.com>
5152         * Makefile (tests): Add tst-cond11.
5153         * tst-cond11.c: New file.
5155         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Reorder
5156         struct passed to cleanup handler to eliminate one more
5157         instruction.
5158         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5160         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
5161         (pthrad_cond_t): Replace __unused field with __clock.
5163         * sysdeps/pthread/pthread_cond_wait.c: Release condvar lock before
5164         waken all waiters in cleanup handler.
5165         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
5166         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
5168         * pthread_condattr_getclock.c: New file.
5169         * pthread_condattr_setclock.c: New file.
5170         * sysdeps/pthread/pthread.h: Declare these new functions.
5171         * Versions [GLIBC_2.3.3] (libpthread): Add the new functions.
5172         * Makefile (libpthread-routines): Add the new functions.
5173         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_condattr):
5174         Renamed field to value.  Document use of the bits.
5175         * pthread_condattr_getpshared.c: Adjust for struct pthread_condattr
5176         change.
5177         * pthread_condattr_setpshared.c: Likewise.
5178         * pthread_cond_init.c (__pthread_cond_init): Initialized __clock field.
5179         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add cond_clock symbol.
5180         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
5181         Add __clock field.
5182         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5183         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5184         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5185         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
5186         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
5187         Implement clock selection.
5188         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
5189         * pthread-errnos.sym: Add ENOSYS.
5190         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
5191         _POSIX_CLOCK_SELECTION.
5192         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
5194         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Remove
5195         invalid .size directive.
5197 2003-03-17  Roland McGrath  <roland@redhat.com>
5199         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
5200         Formatting tweaks.
5202 2003-03-17  Ulrich Drepper  <drepper@redhat.com>
5204         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Use __builtin_expect.
5205         Use __lll_add instead of spelling it out.  Use protected symbol names.
5206         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Use __builtin_expect.
5207         Use __lll_add.
5208         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_compare_and_swap):
5209         Renamed from lll_compare_and_swap.  Use new name where necessary.
5210         (__lll_add): Defined.
5211         (__lll_dec_if_positive): Defined.
5212         (__lll_test_and_set): Defined.
5213         * sysdeps/ia64/pthread_spin_init.c: Removed.
5214         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Removed.
5215         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Removed.
5216         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Removed.
5217         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Removed.
5218         * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: Removed.
5219         * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: Removed.
5220         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Removed.
5221         * sysdeps/ia64/bits/atomic.h: Add __builtin_expect where appropriate.
5222         * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
5223         __sync_lock_release_si.
5224         Patch by Jakub Jelinek.
5226         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
5227         Fix timeout handling.
5228         (__lll_timedwait_tid): Likewise.
5229         (lll_unlock_wake_cb): Wake up other waiters if necessary.
5230         Patch by Jakub Jelinek.
5232         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Pretty printing.
5234 2003-03-17  Roland McGrath  <roland@redhat.com>
5236         PowerPC port contributed by Paul Mackerras <paulus@samba.org>.
5237         * sysdeps/pthread/pthread_spin_init.c: New file.
5238         * sysdeps/pthread/pthread_spin_unlock.c: New file.
5239         * sysdeps/powerpc/Makefile: New file.
5240         * sysdeps/powerpc/pthread_spin_lock.c: New file.
5241         * sysdeps/powerpc/pthread_spin_trylock.c: New file.
5242         * sysdeps/powerpc/pthreaddef.h: New file.
5243         * sysdeps/powerpc/tcb-offsets.sym: New file.
5244         * sysdeps/powerpc/td_ta_map_lwp2thr.c: New file.
5245         * sysdeps/powerpc/tls.h: New file.
5246         * sysdeps/powerpc/bits/atomic.h: New file.
5247         * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: New file.
5248         * sysdeps/unix/sysv/linux/libc-lowlevellock.c: New file.
5249         * sysdeps/unix/sysv/linux/lowlevellock.c: New file.
5251         * sysdeps/unix/sysv/linux/lowlevelmutex.c: New file.
5252         * sysdeps/unix/sysv/linux/sem_post.c: New file.
5253         * sysdeps/unix/sysv/linux/sem_timedwait.c: New file.
5254         * sysdeps/unix/sysv/linux/sem_trywait.c: New file.
5255         * sysdeps/unix/sysv/linux/sem_wait.c: New file.
5256         * sysdeps/unix/sysv/linux/powerpc/Makefile: New file.
5257         * sysdeps/unix/sysv/linux/powerpc/createthread.c: New file.
5258         * sysdeps/unix/sysv/linux/powerpc/fork.c: New file.
5259         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: New file.
5260         * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: New file.
5261         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: New file.
5262         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: New file.
5263         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: New file.
5264         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
5265         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New file.
5267         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Use __gettimeofday,
5268         not gettimeofday.
5269         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Likewise.
5270         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
5271         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Likewise.
5272         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Likewise.
5273         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
5275 2003-03-17  Ulrich Drepper  <drepper@redhat.com>
5277         * sysdeps/pthread/pthread_cond_wait.c: Correct exit criteria.
5278         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
5279         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5280         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
5281         Patch by Ewald Snel <ewald@rambo.its.tudelft.nl>.
5283 2003-03-16  Roland McGrath  <roland@redhat.com>
5285         * tst-fork4.c: Include <string.h>.
5286         * tst-signal2.c: Likewise.
5287         * tst-mutex5.c (do_test): exit -> return.
5288         * tst-mutex2.c: Include <stdlib.h>.
5290 2003-03-16  Ulrich Drepper  <drepper@redhat.com>
5292         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
5293         (__lll_mutex_timedlock_wait): Correct expected value after
5294         spurious wakeup.  Otherwise we would never wait again.
5296         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Work around red
5297         zone versus inline asm stupidity.  Use correct instructions.
5299         * tst-rwlock6.c: Add some more status output.
5301 2003-03-15  Roland McGrath  <roland@redhat.com>
5303         * sysdeps/pthread/configure.in: New file.
5304         * sysdeps/pthread/configure: New file (generated).
5306 2003-03-15  Ulrich Drepper  <drepper@redhat.com>
5308         * allocatestack.c (allocate_stack): Store the exact stack size of
5309         user allocated stacks.
5311 2003-03-15  Jakub Jelinek  <jakub@redhat.com>
5313         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
5314         (SINGLE_THREAD): Use `header' prefix instead of `header.data'.
5315         * sysdeps/sh/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
5316         * sysdeps/sh/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define.
5317         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
5318         Use `header.' prefix.
5319         * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
5321 2003-03-15  Ulrich Drepper  <drepper@redhat.com>
5323         * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Don't use
5324         __builtin_frame_address, use stack pointer.
5326         * sysdeps/unix/sysv/linux/jmp-unwind.c: Use CURRENT_STACK_FRAME
5327         instead of __builtin_frame_pointer.
5329 2003-03-14  Ulrich Drepper  <drepper@redhat.com>
5331         * tst-basic1.c (do_test): Add cast to avoid warning.
5332         * tst-basic2.c (do_test): Likewise.
5334         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use correct
5335         amount of stack correction.
5337         * tst-fork4.c: Use test-skeleton.c.
5339 2003-03-14  Roland McGrath  <roland@redhat.com>
5341         * init.c: Fix typo "#eli" for "#else".
5343 2003-03-14  Steven Munroe  <sjmunroe@us.ibm.com>
5345         * allocatestack.c (__stack_user): Use hidden_data_def.
5346         * pthread_create.c (__pthread_keys): Likewise.
5348         * init.c [__powerpc__] (__NR_set_tid_address): Define it.
5350 2003-03-14  Roland McGrath  <roland@redhat.com>
5352         * tst-fork4.c: New file.
5353         * Makefile (tests): Add it.
5355         * descr.h (struct pthread): Move the union out of [!TLS_DTV_AT_TP], so
5356         we always define the padding space.
5357         [!TLS_DTV_AT_TP]: Give tcbhead_t field a name, `header', since GCC
5358         stopped supporting its own extensions fully.
5359         [TLS_MULTIPLE_THREADS_IN_TCB]: Put `multiple_threads' inside a wrapper
5360         struct also called `header', so `header.multiple_threads' is the field
5361         name to use on all machines.
5362         * allocatestack.c (allocate_stack): Use `header.' prefix.
5363         * sysdeps/pthread/createthread.c (create_thread): Likewise.
5364         * pthread_create.c (__pthread_create_2_1): Likewise.
5365         * sysdeps/i386/tls.h (INSTALL_NEW_DTV, THREAD_DTV): Likewise.
5366         (THREAD_SELF): Likewise.
5367         * sysdeps/x86_64/tls.h: Likewise.
5368         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
5369         (SINGLE_THREAD_P): Likewise.
5370         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
5371         (SINGLE_THREAD_P): Likewise.
5372         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
5373         (SINGLE_THREAD_P): Likewise.
5375         * sysdeps/s390/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Use REGS[18]
5376         value directly.
5378 2003-03-14  Ulrich Drepper  <drepper@redhat.com>
5380         * pthread_create.c (start_thread): Use CALL_THREAD_FCT if defined.
5381         * sysdeps/i386/tls.h: Define CALL_THREAD_FCT.
5383         * pthread_create.c (start_thread): setjmp is expected to return 0.
5385         * sysdeps/x86_64/tls.h (THREAD_GETMEM): Mark asms volatile.
5386         (THREAD_GETMEM_NC): Likewise.
5388 2003-03-13  Ulrich Drepper  <drepper@redhat.com>
5390         * allocatestack.c (allocate_stack): If MULTI_PAGE_ALIASING is defined
5391         and the size of the stack which must be allocated is a multiple,
5392         allocate one more page.
5393         * sysdeps/i386/i686/Makefile: Don't define COLORING_INCREMENT, but
5394         MULTI_PAGE_ALIASING.
5396 2003-03-13  Roland McGrath  <roland@redhat.com>
5398         * pthread_create.c (start_thread): Set EXITING_BIT after the
5399         event-reporting (and destructors), not before.
5401 2003-03-13  Jakub Jelinek  <jakub@redhat.com>
5403         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_timed_wait,
5404         lll_futex_wake): Declare register variables as long int instead of
5405         unsigned long int.  Patch by Ian Wienand <ianw@gelato.unsw.edu.au>.
5406         Make syscall arguments clobbered by the syscall.
5407         (lll_futex_wait): Define using lll_futex_timed_wait.
5409         * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Cast regs[13]
5410         to void *.
5412         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Only declare and set
5413         PPID if [! NDEBUG].
5415         * allocatestack.c (nptl_ncreated): Only declare if
5416         COLORING_INCREMENT != 0.
5418         * pthreadP.h (__pthread_enable_asynccancel_2): New prototype.
5419         (__libc_enable_asynccancel_2): Remove prototype.
5421         * sysdeps/unix/sysv/linux/ia64/fork.c (ARCH_FORK): Swap ptid and
5422         ctid to match kernel.
5424 2003-03-12  Ulrich Drepper  <drepper@redhat.com>
5426         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add
5427         libc_multiple_threads.
5428         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Move definition of
5429         __libc_multiple_threads to...
5430         * sysdeps/unix/sysv/linux/libc_multiple_threads.c: ...here.  New file.
5432         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Remove unnecessary
5433         versioning.
5434         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
5435         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
5437         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
5438         (__pthread_once_internal): Define.
5440         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Use shlib-compat.h
5441         macros instead of .symver directly.
5442         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
5443         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
5445         * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Include tcb-offsets.h.
5446         * sysdeps/x86_64/tcb-offsets.sym: New file.
5447         * sysdeps/x86_64/Makefile: New file.
5449         * sysdeps/i386/tcb-offsets.sym: Add SELF.
5450         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use SELF
5451         to access own pthread_t in TCB.
5452         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
5453         Likewise.
5454         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
5455         Likewise.
5456         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
5458 2003-03-12  Roland McGrath  <roland@redhat.com>
5460         * pthread-errnos.sym: New file.
5461         * Makefile (gen-as-const-headers): New variable, list that file.
5462         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include generated
5463         header <pthread-errnos.h> instead of defining errno values here.
5464         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
5465         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
5466         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
5467         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
5468         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
5469         Likewise.
5470         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
5471         Likewise.
5472         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
5473         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5474         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
5475         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
5476         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
5477         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
5478         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
5479         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
5480         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5481         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
5482         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
5483         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
5484         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
5485         * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
5486         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
5487         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
5488         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
5489         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
5490         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
5491         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
5492         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
5493         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
5494         * sysdeps/i386/i486/pthread_spin_trylock.S: Likewise.
5495         * sysdeps/x86_64/pthread_spin_trylock.S: Likewise.
5496         * sysdeps/sh/pthread_spin_trylock.S: Likewise.
5497         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
5498         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
5500         * sysdeps/unix/sysv/linux/fork.c: Add an assert to check that
5501         CLONE_CHILD_SETTID worked.
5503 2003-03-12  Ulrich Drepper  <drepper@redhat.com>
5505         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: New
5506         file.
5507         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S: New
5508         file.
5510         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
5511         (pthread_cond_t): Add padding.
5513         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: New file.
5514         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: New file.
5515         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: New file.
5517         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
5518         (__pthread_rwlock_timedwrlock): Add missing opcode suffix.
5519         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
5520         (__pthread_rwlock_timedrdlock): Likewise.
5521         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
5522         (__pthread_rwlock_wrlock): Likewise.
5523         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
5524         (__pthread_rwlock_rdlock): Likewise.
5526         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: New file.
5528         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Return
5529         result of lock re-get if it fails.
5531 2003-03-11  Ulrich Drepper  <drepper@redhat.com>
5533         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Fix asm syntax.
5534         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
5535         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
5536         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
5537         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
5538         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
5539         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
5540         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
5541         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
5542         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
5544         * sysdeps/x86_64/tls.h (THREAD_SELF, THREAD_GETMEM, THREAD_GETMEM_NC,
5545         THREAD_SETMEM, THREAD_SETMEM_NC): Correct asm syntax.
5547         * allocatestack.c [! TLS_MULTIPLE_THREADS_IN_TCB] (allocate_stack):
5548         Initialize *__libc_multiple_threads_ptr not __libc_multiple_threads.
5549         * sysdeps/pthread/createthread.c [! TLS_MULTIPLE_THREADS_IN_TCB]
5550         (create_thread): Likewise.
5551         Define __pthread_multiple_threads and __libc_multiple_threads_ptr.
5552         * init.c (__pthread_initialize_minimal_internal): Initialize
5553         __libc_multiple_threads_ptr if necessary.
5554         * pthreadP.h: Adjust prototype for __libc_pthread_init.  Declare
5555         __pthread_multiple_threads and __libc_multiple_threads_ptr.
5556         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Define
5557         __libc_multiple_threads.
5558         (__libc_pthread_init): Return pointer to __libc_pthread_init if
5559         necessary.
5561         * sysdeps/i386/tls.h (THREAD_SETMEM): Fix one-byte variant.
5562         (THREAD_SETMEM_NC): Likewise.
5564         * sysdeps/x86_64/pthread_spin_trylock.c: Removed.
5565         * sysdeps/x86_64/pthread_spin_trylock.S: New file.
5566         * sysdeps/x86_64/pthread_spin_unlock.c: Removed.
5567         * sysdeps/x86_64/pthread_spin_unlock.S: New file.
5569         * sysdeps/i386/i486/pthread_spin_trylock.S (pthread_spin_trylock):
5570         Eliminate one entire instruction.
5572         * cancellation.c (__pthread_enable_asynccancel_2): New function.
5573         * pthreadP.h: Declare __pthread_enable_asynccancel_2.
5574         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5575         (__pthread_cond_timedwait): Use __pthread_enable_asynccancel_2
5576         instead of __pthread_enable_asynccancel.
5577         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
5578         (__pthread_cond_wait): Likewise.
5579         * sysdeps/pthread/pthread_cond_timedwait.c
5580         (__pthread_cond_timedwait): Likewise.
5581         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
5583         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
5584         (__condvar_cleanup): Wake up all waiters in case we got signaled
5585         after being woken up but before disabling asynchronous
5586         cancellation.
5587         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
5588         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
5589         (__condvar_cleanup): Likewise.
5591         * init.c (__NR_set_tid_address): If already defined, don't redefine.
5592         Make it an error if architecture has no #if case.  Add x86-64.
5594         * sysdeps/unix/sysv/linux/x86_64/Makefile: Add flags for
5595         pt-initfini.s generation.
5597         * sysdeps/x86_64/tls.h: Include <asm/prctl.h>.
5598         (TLS_INIT_TP): Fix typo.
5600 2003-03-11  Jakub Jelinek  <jakub@redhat.com>
5602         * sysdeps/ia64/bits/atomic.h (atomic_exchange_and_add): Swap 2nd and
5603         3rd argument of __arch_compare_and_exchange_{32,64}_val_acq.
5605         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Include semaphore.h.
5606         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
5607         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Likewise.
5608         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Likewise.
5609         * sysdeps/unix/sysv/linux/s390/sem_post.c: Likewise.
5610         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
5611         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
5612         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
5614 2003-03-11  Ulrich Drepper  <drepper@redhat.com>
5616         * sysdeps/pthread/pthread_cond_timedwait.c
5617         (__pthread_cond_timedwait): Return the result of the final
5618         locking.  If it succeeds, the regular function return value.
5620         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait):
5621         Return result of the final locking.
5622         * version.c (__nptl_main): Work around problems with the strange
5623         INTERNAL_SYSCALL macro on ppc32.
5624         * init.c (__pthread_initialize_minimal_internal): Unblock
5625         SIGCANCEL in case the parent blocked it.
5626         Reported by Paul Mackerras <paulus@samba.org>.
5628         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: New file.
5629         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: New file.
5630         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: New file.
5632 2003-03-11  Jakub Jelinek  <jakub@redhat.com>
5634         * sysdeps/pthread/pthread_cond_timedwait.c
5635         (__pthread_cond_timedwait): Unlock and fail if
5636         __pthread_mutex_unlock_internal failed.
5638         * sysdeps/pthread/createthread.c (ARCH_CLONE): Define if not defined.
5639         (create_thread): Only assert PD->tcb != NULL under [TLS_TCB_AT_TP].
5640         Use ARCH_CLONE.
5641         * allocatestack.c (ALLOCATE_STACK_PARMS): New macro.
5642         [NEED_SEPARATE_REGISTER_STACK] (STACK_VARIABLES,
5643         STACK_VARIABLES_ARGS, STACK_VARIABLES_PARMS, ALLOCATE_STACK_PARMS,
5644         ALLOCATE_STACK): New macros.
5645         (TLS_TPADJ): New macro.
5646         (get_cached_stack, queue_stack, __deallocate_stack): Use TLS_TPADJ.
5647         (allocate_stack): Handle TLS_DTV_AT_TP and
5648         NEED_SEPARATE_REGISTER_STACK.  Use TLS_TPADJ.
5649         * pthread_create.c (__pthread_create_2_1) [! TLS_TCB_AT_TP]:
5650         Don't set PD->self.
5651         * init.c [__ia64__] (__NR_set_tid_address): Define.
5653         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: New file.
5654         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: New file.
5655         * sysdeps/unix/sysv/linux/ia64/fork.c: New file.
5656         * sysdeps/unix/sysv/linux/ia64/createthread.c: New file.
5657         * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: New file.
5658         * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: New file.
5659         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: New file.
5660         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: New file.
5661         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: New file.
5662         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
5663         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: New file.
5664         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: New file.
5665         * sysdeps/unix/sysv/linux/ia64/sem_post.c: New file.
5666         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: New file.
5667         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: New file.
5668         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: New file.
5669         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
5670         * sysdeps/ia64/bits/atomic.h: New file.
5671         * sysdeps/ia64/Makefile: New file.
5672         * sysdeps/ia64/pthread_spin_init.c: New file.
5673         * sysdeps/ia64/pthread_spin_lock.c: New file.
5674         * sysdeps/ia64/pthread_spin_trylock.c: New file.
5675         * sysdeps/ia64/pthread_spin_unlock.c: New file.
5676         * sysdeps/ia64/pthreaddef.h: New file.
5677         * sysdeps/ia64/tcb-offsets.sym: New file.
5678         * sysdeps/ia64/td_ta_map_lwp2thr.c: New file.
5679         * sysdeps/ia64/tls.h: New file.
5681         * sysdeps/s390/pthreaddef.h (__exit_thread_inline): Pass 1 argument
5682         to syscall instead of no arguments.
5684 2003-03-10  Ulrich Drepper  <drepper@redhat.com>
5686         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: New file.
5687         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: New file.
5688         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: New file.
5689         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: New file.
5691         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Fix error value in
5692         unused code.
5694         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: New file
5696         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
5697         lowlevelbarrier.sym.
5698         * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: New file.
5699         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S:
5700         Include lowlevelbarrier.h and don't define offsets locally.
5701         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Likewise.
5703         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
5704         (__lll_mutex_lock_wait): Reverse order of first two parameters.
5705         (__lll_mutex_timedlock_wait): Likewise.
5706         (lll_mutex_lock): Adjust asm for that.
5707         (lll_mutex_timedlock): Likewise.  Mark cx, cc, r10 as clobbered.
5708         (lll_lock): Adjust asm for operand order change.
5709         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: New file.
5710         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: New file.
5712         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_lock_wait):
5713         Reverse order of parameters.
5714         (__lll_timedwait_tid): Remove regparms attribute.
5715         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: New file.
5716         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: New file.
5718         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
5719         (__lll_timedwait_tid): Remove one unnecessary instruction.
5721         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Define
5722         __lll_mutex_timedlock_wait only for NOT_IN_libc.
5723         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Include
5724         lowlevelmutex.S.
5726         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
5727         lll_unlock_wake_cb, __lll_wait_tid, and __lll_timedwait_tid only
5728         for NOT_IN_libc.
5729         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Include
5730         lowlevellock.S.
5732         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Don't define
5733         LOCK is already defined.  Don't define __lll_mutex_timedlock_wait
5734         for libc.so.
5735         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Only
5736         define LOCK here (if UP is not defined).  The actual code is in
5737         lowlevelmutex.S.
5739         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Don't define
5740         LOCK is already defined.  Don't define lll_unlock_wake_cb and
5741         __lll_timedwait_tid for libc.so.
5742         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Only
5743         define LOCK here (if UP is not defined).  The actual code is in
5744         lowlevellock.S.
5746         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Not needed anymore.
5747         * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: Likewise.
5748         * sysdeps/unix/sysv/linux/s390/sem_post.c: Include lowlevellock.h
5749         instead of lowlevelsem.h.
5750         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
5751         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
5752         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
5754         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
5755         lowlevelrwlock.sym.
5756         * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: New file.
5757         * sysdeps/unix/sysv/linux/i386/lowlevelrwlock.h: Removed.
5758         * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: Removed.
5760         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_trylock): Fix
5761         register loading.
5762         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_trylock): Undo
5763         last changed.  D'oh.
5765         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: New file.
5767         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove declaration
5768         of __libc_locking_needed.
5769         (lll_trylock): Initialize %eax to zero.
5771         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Update
5772         pthread_cond_t definition.
5774 2003-03-10  Roland McGrath  <roland@redhat.com>
5776         * sysdeps/unix/sysv/linux/lowlevelcond.sym: New file.
5777         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add it.
5778         * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: File removed.
5779         * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: Likewise.
5780         * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: Likewise.
5782         * allocatestack.c (allocate_stack) [!TLS_MULTIPLE_THREADS_IN_TCB]:
5783         Instead of setting PD->multiple_threads, set globals
5784         __pthread_multiple_threads and __libc_multiple_threads.
5785         * sysdeps/pthread/createthread.c (create_thread): Likewise.
5786         * sysdeps/i386/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it.
5787         * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Likewise.
5789         * descr.h (struct pthread): Conditionalize first member on
5790         [!TLS_DTV_AT_TP].  Replace the `header' member with an anonymous union
5791         containing an anonymous tcbhead_t.  Move `list' member out.
5792         [TLS_MULTIPLE_THREADS_IN_TCB]: Define a `multiple_threads' member.
5793         * allocatestack.c: Remove use of `header.data.' prefix.
5794         * pthread_create.c: Likewise.
5795         * init.c (__pthread_initialize_minimal_internal): Likewise.
5796         * sysdeps/pthread/createthread.c (create_thread): Likewise.
5797         * sysdeps/i386/tls.h (INSTALL_DTV): Add parens.
5798         (THREAD_SELF, THREAD_DTV, INSTALL_NEW_DTV): No `header.data.' prefix.
5799         * sysdeps/x86_64/tls.h: Likewise.
5800         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
5801         (SINGLE_THREAD_P): Likewise.
5802         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
5803         (SINGLE_THREAD_P): Likewise.
5804         * sysdeps/i386/tls.h (tcbhead_t): Remove `list' member.
5805         * sysdeps/s390/tls.h (tcbhead_t): Likewise.
5807 2003-03-09  Ulrich Drepper  <drepper@redhat.com>
5809         * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: New file.
5811         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
5812         * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
5814         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix many
5815         leftovers from the ia32 code.
5817         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Remove unneccessary
5818         memory load.
5819         (clear_once_control): Don't load %esi.
5821         * sysdeps/x86_64/tls.h: Remove all traces of segment descriptor
5822         handling.
5824         * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
5826         * sysdeps/unix/sysv/linux/s390/createthread.c: Moved to...
5827         * sysdeps/unix/sysv/linux/createthread.c: ...here.
5829         * Makefile (tests): Add tst-cond10.
5830         * tst-cond10.c: New file.
5832 2003-03-08  Ulrich Drepper  <drepper@redhat.com>
5834         * tst-tls2.c (do_test): Add TEMP_FAILURE_RETRY around sem_wait call.
5835         * tst-signal3.c (do_test): Likewise.
5836         * tst-sem5.c (do_test): Likewise.
5837         * tst-kill6.c (do_test): Likewise.
5838         * tst-tls3.c (do_test): Likewise.  Include <errno.h>.
5840         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use add/sub instead
5841         of inc/dec.
5842         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
5843         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise
5844         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
5845         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
5846         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
5847         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
5848         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
5849         Likewise.
5850         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
5851         Likewise.
5852         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
5853         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
5854         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5855         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
5856         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
5857         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
5858         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
5859         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
5861         * allocatestack.c (allocate_stack): If mprotect() fails free the
5862         TLS memory.
5864 2003-03-07  Ulrich Drepper  <drepper@redhat.com>
5866         * sysdeps/i386/i486/bits/atomic.h: Fix a few unused definitions.
5868         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove all trace of
5869         lll_wake_tid.  This was used only to work around kernel limits in
5870         the early days.
5871         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
5872         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Likewise.
5873         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
5874         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
5876         * init.c (__static_tls_align_m1): Renamed from __static_tls_align.
5877         (__pthread_initialize_minimal_internal): Change initialization of
5878         __static_tls_align_m1 appropriately.
5879         * pthreadP.h (__static_tls_align_m1): Renamed from
5880         __static_tls_align.
5881         * allocatestack.c (allocate_stack): Use __static_tls_align_m1
5882         instead of __static_tls_align-1.
5884 2003-03-04  Ulrich Drepper  <drepper@redhat.com>
5886         * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
5888         * pthread_create.c: Define __pthread_keys using nocommon
5889         attribute, not by placing it explicitly in bss.
5890         Remove DEFINE_DEALLOC definition.  Not needed anymore.
5892         * allocatestack.c: Define ARCH_MAP_FLAGS if not already defined.
5893         Use it in mmap call to allocate stacks.
5895         * sysdeps/pthread/createthread.c (create_thread): Fix comment.
5897         * pthread_create.c (start_thread): Use THREAD_SETMEM to store
5898         result of the thread function.
5900 2003-03-03  Ulrich Drepper  <drepper@redhat.com>
5902         * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: Removed.  The generic
5903         version is just fine.
5905         * sysdeps/unix/sysv/linux/libc_pthread_init.c
5906         (__pthread_child_handler): Renamed from pthread_child_handler,
5907         exported, and marked hidden.  Change all users.
5908         * sysdeps/unix/sysv/linux/register-atfork.c (free_mem): Do not
5909         free __pthread_child_handler from child list.
5911 2003-03-03  Martin Schwidefsky  <schwidefsky@de.ibm.com>
5913         * atomic.h (atomic_exchange_and_add): Return newval, not oldval.
5915         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
5916         Fix handling of cancellation and failing pthread_mutex_unlock call.
5917         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
5918         (__pthread_cond_wait): Likewise.
5920         * sysdeps/pthread/pthread_rwlock_timedrdlock.c
5921         (pthread_rwlock_timedrdlock): Fix clobber of result variable by
5922         lll_futex_timed_wait call.
5923         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
5924         (pthread_rwlock_timedwrlock): Likewise.
5926         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
5927         Don't define lll_unlock_wake_cb and ___lll_timedwait_tid in libc.so.
5928         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Remove XXX comments.
5930         * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Fix
5931         check of lll_futex_wake return value.
5933 2003-03-03  Roland McGrath  <roland@redhat.com>
5935         * forward.c: Fix typo in __pthread_attr_init_2_0 compat_symbol decl.
5937         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
5938         Argument to ptr___pthread_cleanup_upto is __jmp_buf, not jmp_buf.
5939         * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
5941 2003-03-02  Ulrich Drepper  <drepper@redhat.com>
5943         * sysdeps/pthread/timer_create.c (timer_create): Return correct
5944         error for CPU clocks.
5946         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
5947         _POSIX_MONOTONIC_CLOCK.
5948         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
5950         * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
5951         recent kernels.
5953 2003-03-01  Ulrich Drepper  <drepper@redhat.com>
5955         * descr.h (struct pthread): Move cleanup field to the front.
5957 2003-03-01  Roland McGrath  <roland@redhat.com>
5959         * sem_open.c (sem_open): Braino fix.
5961 2003-03-01  Ulrich Drepper  <drepper@redhat.com>
5963         * sysdeps/i386/tcb-offsets.sym: Add CLEANUP and CLEANUP_PREV.
5964         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Inline
5965         __pthread_cleanup_pop functionality.
5966         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5968         * descr.h (struct pthread): Move tid field to the front now that
5969         it is often used.
5971         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S
5972         (__lll_mutex_timedlock_wait): Remove.
5973         (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
5974         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
5975         (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
5976         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
5977         (lll_unlock_wake_cb): Don't save and restore %esi.
5978         (__lll_unlock_wake): Add alignment.  Don't save, load, and restore
5979         %esi.
5980         (__lll_timedwait_tid): Add alignment.
5981         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
5982         (__lll_unlock_wake): Add alignment.  Don't save, load, and restore
5983         %esi.
5984         (__lll_timedwait_tid): Removed.
5985         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
5986         (__pthread_cond_broadcast): Don't save, load, and restore %esi.
5987         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
5988         (pthread_barrier_wait): Don't save, load, and restore %esi for
5989         last thread.
5990         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
5991         (__pthread_cond_signal): Don't save, load, and restore %esi.
5992         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
5993         (__pthread_rwlock_unlock): Don't save, load, and restore %esi.
5994         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
5995         Don't save, load, and restore %esi.
5997 2003-02-27  Ulrich Drepper  <drepper@redhat.com>
5999         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
6000         Release lock before waking up the waiters.
6002         * tst-exit1.c (do_test): Don't start more than one thread in parallel.
6004         * tst-rwlock9.c (writer_thread): Correct adding TIMEOUT.
6005         (reader_thread): Likewise.
6007         * sysdeps/pthread/pthread_rwlock_unlock.c
6008         (__pthread_rwlock_unlock): Release internal lock early.  Don't try
6009         to wake up readers if there are none.
6011         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
6012         Release internal lock before wake threads.
6014 2003-02-26  Ulrich Drepper  <drepper@redhat.com>
6016         * Makefile (tests): Add tst-rwlock10 and tst-rwlock11.
6017         * tst-rwlock8.c: Initialize lock with INIT.  Allow INIT to be
6018         predefined.
6019         * tst-rwlock9.c: Likewise.
6020         * tst-rwlock10.c: New file.
6021         * tst-rwlock11.c: New file.
6023         * Makefile (tests): Add tst-dlsym1.
6024         * tst-dlsym1.c: New file.
6026         * init.c (__pthread_initialize_minimal_internal): Set
6027         GL(dl_error_catch_tsd) to __libc_dl_error_tsd.
6028         * Versions (libc:GLIBC_PRIVATE): Export __libc_dl_error_tsd.
6030 2003-02-24  Ulrich Drepper  <drepper@redhat.com>
6032         * sem_open.c (sem_open): Fix handling of O_CREAT without O_EXCL.
6034         * tst-cond2.c: Fix sychronization with child.
6036         * tst-rwlock8.c (reader_thread): Remove unused variable.
6038         * Makefile: Add rules to build and run tst-tls3.
6039         * tst-tls3.c: New file.
6040         * tst-tls3mod.c: New file.
6042         * Makefile (tests): Add tst-rwlock8 and tst-rwlock9.
6043         * tst-rwlock8.c: New file.
6044         * tst-rwlock9.c: New file.
6045         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Fix
6046         complete broken rwlock implementation.
6047         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
6048         Likewise.
6049         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
6050         Likewise.
6051         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
6052         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
6053         * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
6054         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
6055         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
6056         * sysdeps/pthread/pthread_rwlock_unlock.c: Likewise.
6057         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
6059 2003-02-23  Roland McGrath  <roland@redhat.com>
6061         * Makefile (nptl-version): Change regexp so case sensitivity is ok.
6063 2003-02-23  Ulrich Drepper  <drepper@redhat.com>
6065         * Makefile (tests): Add tst-context1.
6066         * tst-context1.c: New file.
6068         * Makefile (tests): Add tst-tls1 and tst-tls2.
6069         * tst-tls1.c: New file.
6070         * tst-tls2.c: New file.
6072         * libc-cancellation.c (__libc_enable_asynccancel): Correct test
6073         for failed cmpxchg.
6075         * pthread_create.c (start_thread): Set EXITING_BIT early.
6077         * sysdeps/i386/tls.h (THREAD_GETMEM): Mark asm as volatile.
6078         (THREAD_GETMEM_NC): Likewise.
6080 2003-02-22  Ulrich Drepper  <drepper@redhat.com>
6082         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Shave
6083         off 3 more bytes by using offset-less instructions when possible.
6085         * Makefile: Add dependency for $(objpfx)version.d.
6087         * eintr.c (eintr_source): Add unnecessary return but the compiler
6088         insists.
6090         * tst-kill3.c: Include <unistd.h>.
6092 2003-02-21  Roland McGrath  <roland@redhat.com>
6094         * pthread_create.c (start_thread): Call __libc_thread_freeres.
6096 2003-02-21  Ulrich Drepper  <drepper@redhat.com>
6098         * Makefile (tests): Add tst-eintr1.
6099         (distribute): Add eintr.c.
6100         * tst-eintr1.c: New file.
6101         * eintr.c: New file.
6103         * pthread_cancel.c (pthread_cancel): Use tkill directly.
6105         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill):
6106         Disallow sending SIGCANCEL.
6108         * Makefile (tests): Remove tst-basic7.  Add tst-kill1, tst-kill2,
6109         tst-kill3, tst-kill4, tst-kill5, tst-kill6.
6110         * tst-kill1.c: New file.
6111         * tst-kill2.c: New file.
6112         * tst-kill3.c: New file.
6113         * tst-kill5.c: New file.
6114         * tst-kill6.c: New file.
6115         * tst-basic7.c: Renamed to...
6116         * tst-kill4.c: ...this.
6118 2003-02-21  Roland McGrath  <roland@redhat.com>
6120         * Makefile (install-lib-ldscripts): New variable.
6122 2003-02-21  Ulrich Drepper  <drepper@redhat.com>
6124         * pthreadP.h: Define INVALID_TD_P and INVALID_NOT_TERMINATED_TD_P.
6125         * pthread_cancel.c: Use INVALID_TD_P.
6126         * pthread_detach.c: Likewise.
6127         * pthread_getschedparam.c: Likewise.
6128         * pthread_setschedparam.c: Likewise.
6129         * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
6130         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
6131         * pthread_join.c: Use INVALID_NOT_TERMINATED_TD_P.
6132         * pthread_timedjoin.c: Likewise.
6134         * tst-basic7.c: Include <signal.h>.
6136         * pthread_join.c (pthread_join): Limited checking for invalid
6137         descriptors.
6138         * pthread_timedjoin.c (pthread_timedjoin_np): Likewise.
6140 2003-02-20  Ulrich Drepper  <drepper@redhat.com>
6142         * pthread_create.c (deallocate_tsd): Reset found_nonzero at the
6143         beginning of the loop.  Clear the entire first block of TSD.
6144         * Makefile (tests): Add tst-key4.
6145         * tst-key4.c: New file.
6147 2003-02-18  Ulrich Drepper  <drepper@redhat.com>
6149         * Makefile (tests): Add tst-basic7.
6150         * tst-basic7.c: New file.
6152         * pthread_create.c (deallocate_tsd): Mark as internal_function.
6153         Add some more __builtin_expect.
6155         * pthreadP.h: Define dummy version of DEBUGGING_P.
6157 2003-02-17  Ulrich Drepper  <drepper@redhat.com>
6159         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remnove
6160         _POSIX_THREAD_PRIORITY_SCHEDULING.
6161         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
6162         _XOPEN_REALTIME_THREADS.
6163         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
6165         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): The
6166         kernel returns EINVAL for PID <= 0, work around it.
6168         * Makefile (tests): Add tst-signal5.
6169         * tst-signal5.c: New file.
6171         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
6172         and LOGIN_NAME_MAX.
6174         * tst-cancel1.c (tf): Block all signals.
6176         * Makefile (tests): Add tst-basic6.
6177         * tst-basic6.c: New file.
6179         * tst-basic1.c: Add test for process ID.
6181         * Makefile (tests): Add tst-cancel10.
6182         * tst-cancel10.c: New file.
6184         * Makefile (tests): Add tst-signal4.
6185         * tst-signal4.c: New file.
6187         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use
6188         __sigismember instead of sigismember.  Add __builtin_expect.
6190 2003-02-16  Ulrich Drepper  <drepper@redhat.com>
6192         * tst-attr1.c (do_test): Add tests for pthread_setcanceltype,
6193         pthread_setcancelstate, and pthread_rwlock_setpshared.
6195         * tst-cancel7.c (do_test): Make sure the pid file exists before
6196         canceling the thread.
6198         * tst-rwlock6.c: More pthread_rwlock_timedwrlock and
6199         pthread_rwlock_timedrdlock tests.
6200         * tst-rwlock7.c: More pthread_rwlock_timedwrlock tests.
6201         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
6202         Check for invalid tv_nsec field.
6203         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
6204         Likewise.
6206         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Protect
6207         recursive mutex of overflow.
6209         * tst-attr1.c (do_test): Add test for pthread_mutexattr_setpshared.
6211         * libc-cancellation.c (__libc_enable_asynccancel): Rewrite to avoid
6212         going into an endless loop.
6213         * Makefile (tests): Add tst-cancel9.
6214         * tst-cancel9.c: New file.
6216         * pthread_cancel.c (pthread_cancel): Use the result of __pthread_kill.
6218 2003-02-15  Ulrich Drepper  <drepper@redhat.com>
6220         * tst-mutex5.c (do_test): Add more timedlock tests.
6222         * tst-mutex2.c: Tests of trylock and unlock with ERROR mutexes.
6223         * tst-mutex3.c (do_test): Add tests for trylock with RECURSIVE mutexes.
6225         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
6226         use INLINE_SYSCALL.  Error number is returned, not -1.
6228         * pthreadP.h: Mark declarations of __find_in_stack_list, __free_tcb,
6229         and __deallocate_stack with internal_function.
6230         * pthread_create.c: Adjust definitions appropriately.
6231         * allocatestack.c: Likewise.
6233         * pthread_join.c: Add one more __builtin_expect.
6234         * pthread_timedjoin.c: Likewise.
6236         * pthread_getspecific.c (__pthread_getspecific): Clear data->data
6237         not data of sequence number does not match.
6238         Add one __builtin_expect.
6240         * Makefile (tests): Add tst-clock1.
6241         * tst-clock1.c: New file.
6243         * pthread_setconcurrency.c (pthread_setconcurrency): Fail for
6244         negative arguments.
6245         * Makefile (tests): Add tst-basic5.
6246         * tst-basic5.c: New file.
6248 2003-02-14  Ulrich Drepper  <drepper@redhat.com>
6250         * Makefile (tests): Add tst-basic4.
6251         * tst-basic4.c: New file.
6253         * pthreadP.h: Add declaraction for __nptl_nthreads.
6254         * pthread_create.c: Define __nptl_nthreads
6255         (start_thread): Increment __nptl_nthreads at beginning.  Decrement
6256         after thread is done.  If then zero, call exit(0).
6257         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
6258         Add ptr_nthreads.  Define HAVE_PTR_NTHREADS.
6259         * init.c (pthread_functions): Initialize ptr_nthreads.
6260         * allocatestack.c (nptl_nthreads): Remove definition and all uses.
6261         (__reclaim_stacks): Decrement __nptl_nthreads.
6262         * sysdeps/pthread/Makefile [$(subdir)==csu] (CFLAGS-libc-start.c):
6263         Define.
6264         * Makefile (tests): Add tst-basic3.
6265         * tst-basic3.c: New file.
6267         * descr.h: Define CANCELING_BIT and CANCELING_BITMASK.  Introduce
6268         after CANCELTYPE_BIT, move the other bits up.  Update CANCEL_RESTMASK.
6269         * init.c (sigcancel_handler): Also set CANCELING_BITMASK bit in newval.
6270         * pthread_cancel.c (pthread_cancel): Likewise.  Also set CANCELING_BIT
6271         if asynchronous canceling is enabled.
6272         * pthread_join.c (pthread_join): When recognizing circular joins,
6273         take into account the other thread might be already canceled.
6274         * Makefile (tests): Add tst-join5.
6275         * tst-join5.c: New file.
6277         * Makefile (tests): Add tst-join4.
6278         * tst-join4.c: New file.
6280 2003-02-13  Ulrich Drepper  <drepper@redhat.com>
6282         * tst-cond4.c (main): Add test of pthread_attr_getpshared.
6284 2003-02-13  Martin Schwidefsky  <schwidefsky@de.ibm.com>
6286         * sysdeps/s390/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM,
6287         THREAD_SETMEM_NC): Use passed descr instead of THREAD_SELF.
6288         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind): Avoid
6289         warning.
6290         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Include <sys/time.h>
6291         to avoid warning.
6292         * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Return
6293         error if lll_futex_wake failed.
6295 2003-02-13  Ulrich Drepper  <drepper@redhat.com>
6297         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Fix
6298         handling of cancellation and failung pthread_mutex_unlock call.
6299         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6300         * Makefile (tests): Add tst-cond8 and tst-cond9.
6301         * tst-cond8.c: New file.
6302         * tst-cond9.c: New file.
6304         * tst-cond7.c (do_test): Unlock the mutex before canceling the thread.
6306         * sysdeps/pthread/pthread.h: Add missing initializers.  Protect
6307         non-standard initializers with __USE_GNU.
6309         * Makefile (tests): Add tst-cleanup3.
6310         * tst-cleanup3.c: New file.
6312 2003-02-12  Ulrich Drepper  <drepper@redhat.com>
6314         * Makefile (tests): Add tst-attr1 and tst-attr2.
6315         * tst-attr1.c: New file.
6316         * tst-attr2.c: New file.
6318         * Makefile: Add rules to build and run tst-atfork2 test.
6319         * tst-atfork2.c: New file.
6320         * tst-atfork2mod.c: New file.
6322         * sysdeps/unix/sysv/linux/unregister-atfork.c
6323         (__unregister_atfork): Free the memory allocated for the handlers
6324         after removing them from the lists.
6326         * sysdeps/unix/sysv/linux/register-atfork.c: Define memeory
6327         cleanup function.
6329         * tst-atfork1.c (do_test): Wait for the child we forked.
6330         Report error in child.
6332         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Fix comment.
6334         * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
6336 2003-02-10  Ulrich Drepper  <drepper@redhat.com>
6338         * Makefile (tests): Add tst-cancel8.
6339         * tst-cancel8.c: New file.
6341         * sysdeps/unix/sysv/linux/i386/pthread_once.S (clear_once_control): Fix
6342         clearing of control variable.
6343         * Makefile (tests): Add tst-once3 and tst-once4.
6344         * tst-once3.c: New file.
6345         * tst-once4.c: New file.
6347 2003-02-08  kaz Kojima  <kkojima@rr.iij4u.or.jp>
6349         * sysdeps/sh/Makefile: New file.
6350         * sysdeps/sh/bits/atomic.h: New file.
6351         * sysdeps/sh/pthread_spin_init.c: New file.
6352         * sysdeps/sh/pthread_spin_lock.c: New file.
6353         * sysdeps/sh/pthread_spin_trylock.S: New file.
6354         * sysdeps/sh/pthread_spin_unlock.S: New file.
6355         * sysdeps/sh/pthreaddef.h: New file.
6356         * sysdeps/sh/tcb-offsets.sym: New file.
6357         * sysdeps/sh/td_ta_map_lwp2thr.c: New file.
6358         * sysdeps/sh/tls.h: New file.
6359         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: New file.
6360         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: New file.
6361         * sysdeps/unix/sysv/linux/sh/createthread.c: New file.
6362         * sysdeps/unix/sysv/linux/sh/fork.c: New file.
6363         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: New file.
6364         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: New file.
6365         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h: New file.
6366         * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: New file.
6367         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: New file.
6368         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: New file.
6369         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: New file.
6370         * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: New file.
6371         * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
6372         * sysdeps/unix/sysv/linux/sh/pt-vfork.S: New file.
6373         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: New file.
6374         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: New file.
6375         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: New file.
6376         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: New file.
6377         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: New file.
6378         * sysdeps/unix/sysv/linux/sh/pthread_once.S: New file.
6379         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: New file.
6380         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: New file.
6381         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: New file.
6382         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: New file.
6383         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: New file.
6384         * sysdeps/unix/sysv/linux/sh/sem_post.S: New file.
6385         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: New file.
6386         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: New file.
6387         * sysdeps/unix/sysv/linux/sh/sem_wait.S: New file.
6388         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
6390 2003-02-08  Ulrich Drepper  <drepper@redhat.com>
6392         * tst-cond2.c: Rearrange code to not rely on behavior undefined
6393         according to POSIX.
6395         * tst-basic2.c (do_test): Lock mutex before creating the thread.
6397 2003-02-07  Ulrich Drepper  <drepper@redhat.com>
6399         * sysdeps/x86_64/tls.h: Remove unnecessary macros, left over from x86.
6400         (TLS_GET_FS): New #define.
6401         (TLS_SET_FS): New #define.
6402         Correct value of __NR_set_thread_area.
6404         * sysdeps/x86_64/td_ta_map_lwp2thr.c: New file.
6406 2003-02-06  Ulrich Drepper  <drepper@redhat.com>
6408         * Makefile (tests): Add tst-popen1.
6409         * tst-popen1.c: New file.
6411         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Remove wrong
6412         but inactive generalization.
6413         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6414         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
6415         Minor optimization, remove one instruction.
6416         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
6418 2003-02-04  Martin Schwidefsky  <schwidefsky@de.ibm.com>
6420         * sysdeps/unix/sysv/linux/s390/fork.c: Correct order of parameters.
6422 2003-01-31  Martin Schwidefsky  <schwidefsky@de.ibm.com>
6424         * init.c (__NR_set_tid_address): Add #ifdef for s390.
6425         * sysdeps/pthread/pthread_barrier_wait.c: New file.
6426         * sysdeps/pthread/pthread_cond_broadcast.c: New file.
6427         * sysdeps/pthread/pthread_cond_signal.c: New file.
6428         * sysdeps/pthread/pthread_cond_timedwait.c: New file.
6429         * sysdeps/pthread/pthread_cond_wait.c: New file.
6430         * sysdeps/pthread/pthread_rwlock_rdlock.c: New file.
6431         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: New file.
6432         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: New file.
6433         * sysdeps/pthread/pthread_rwlock_unlock.c: New file.
6434         * sysdeps/pthread/pthread_rwlock_wrlock.c: New file.
6435         * sysdeps/s390/Makefile: New file.
6436         * sysdeps/s390/bits/atomic.h: New file.
6437         * sysdeps/s390/pthread_spin_init.c: New file.
6438         * sysdeps/s390/pthread_spin_lock.c: New file.
6439         * sysdeps/s390/pthread_spin_trylock.c: New file.
6440         * sysdeps/s390/pthread_spin_unlock.c: New file.
6441         * sysdeps/s390/pthreaddef.h: New file.
6442         * sysdeps/s390/tcb-offsets.sym: New file.
6443         * sysdeps/s390/td_ta_map_lwp2thr.c: New file.
6444         * sysdeps/s390/tls.h: New file.
6445         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: New file.
6446         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: New file.
6447         * sysdeps/unix/sysv/linux/s390/createthread.c: New file.
6448         * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: New file.
6449         * sysdeps/unix/sysv/linux/s390/fork.c: New file.
6450         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: New file.
6451         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
6452         * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: New file.
6453         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: New file.
6454         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: New file.
6455         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: New file.
6456         * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: New file.
6457         * sysdeps/unix/sysv/linux/s390/pthread_once.c: New file.
6458         * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: New file.
6459         * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: New file.
6460         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
6461         * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
6462         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: New file.
6463         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
6464         * sysdeps/unix/sysv/linux/s390/sem_post.c: New file.
6465         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: New file.
6466         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
6467         * sysdeps/unix/sysv/linux/s390/sem_wait.c: New file.
6469 2003-02-04  Ulrich Drepper  <drepper@redhat.com>
6471         * atomic.h: Add a couple more default implementations.
6472         (atomic_compare_and_exchange_acq): Use
6473         __arch_compare_and_exchange_32_acq in return value definition.  It
6474         always exists.
6475         (atomic_bit_set): Renamed from atomic_set_bit.
6476         Add missing atomic_ prefixes.
6478         * sysdeps/pthread/bits/libc-lock.h (__libc_once): In case no
6479         thread library is available, use correct value to mark initialized
6480         once variable.
6482 2003-02-03  Ulrich Drepper  <drepper@redhat.com>
6484         * allocatestack.c (allocate_stack): Use __getpagesize instead of
6485         __sysconf to determine pagesize.
6487         * pthread_create.c: Include <atomic.h>.
6488         * allocatestack.c (allocate_stack): Implement coloring of the
6489         allocated stack memory.  Rename pagesize to pagesize_m1.  It's the
6490         size minus one.  Adjust users.
6491         * sysdeps/i386/i686/Makefile: New file.
6493 2003-02-02  Ulrich Drepper  <drepper@redhat.com>
6495         * allocatestack.c: Improve comment throughout the file.
6497         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
6498         (__lll_lock_wait): Add branch prediction.
6499         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
6500         (__lll_lock_wait): Likewise.
6501         (lll_unlock_wake_cb): Removed.
6503 2003-01-31  Ulrich Drepper  <drepper@redhat.com>
6505         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Remove
6506         _POSIX_THREAD_PRIORITY_SCHEDULING.
6508 2003-01-30  Jakub Jelinek  <jakub@redhat.com>
6510         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
6511         Fix return type of ptr___pthread_getspecific.
6513 2003-01-29  Ulrich Drepper  <drepper@redhat.com>
6515         * Makefile (tests): Add tst-umask1.
6516         (tst-umask1-ARGS): Define.
6517         * tst-umask1.c: New file.
6519 2003-01-28  Ulrich Drepper  <drepper@redhat.com>
6521         * Makefile (libpthread-routines): Remove lowlevelrwlock.  Add
6522         pthread_rwlock_rdlock, pthread_rwlock_timedrdlock,
6523         pthread_rwlock_wrlock, pthread_rwlock_timedwrlock, and
6524         pthread_rwlock_unlock.
6525         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Removed
6526         * sysdeps/unix/sysv/linux/i386/i586/lowlevelrwlock.S: Removed
6527         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Removed
6528         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: New file.
6529         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
6530         New file.
6531         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: New file.
6532         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
6533         New file.
6534         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: New file.
6535         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_rdlock.S: New file.
6536         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedrdlock.S:
6537         New file.
6538         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_wrlock.S: New file.
6539         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedwrlock.S:
6540         New file.
6541         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_unlock.S: New file.
6542         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_rdlock.S: New file.
6543         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedrdlock.S:
6544         New file.
6545         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_wrlock.S: New file.
6546         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedwrlock.S:
6547         New file.
6548         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_unlock.S: New file.
6550         * Makefile (libpthread-routines): Remove lowlevelcond and
6551         lowlevelsem.  Add sem_wait, sem_trywait, sem_timedwait, sem_post,
6552         pthread_cond_wait, pthread_cond_timedwait, pthread_cond_signal,
6553         and pthread_cond_broadcast.
6554         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Removed
6555         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Removed
6556         * sysdeps/unix/sysv/linux/i386/i586/lowlevelsem.S: Removed
6557         * sysdeps/unix/sysv/linux/i386/i586/lowlevelcond.S: Removed
6558         * sysdeps/unix/sysv/linux/i386/i686/lowlevelsem.S: Removed
6559         * sysdeps/unix/sysv/linux/i386/i686/lowlevelcond.S: Removed
6560         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: New file.
6561         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: New file.
6562         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: New file.
6563         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: New file.
6564         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: New file.
6565         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: New file.
6566         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: New file.
6567         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: New file.
6568         * sysdeps/unix/sysv/linux/i386/i586/sem_wait.S: New file.
6569         * sysdeps/unix/sysv/linux/i386/i586/sem_trywait.S: New file.
6570         * sysdeps/unix/sysv/linux/i386/i586/sem_timedwait.S: New file.
6571         * sysdeps/unix/sysv/linux/i386/i586/sem_post.S: New file.
6572         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_wait.S: New file.
6573         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_timedwait.S: New file.
6574         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_signal.S: New file.
6575         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_broadcast.S: New file.
6576         * sysdeps/unix/sysv/linux/i386/i686/sem_wait.S: New file.
6577         * sysdeps/unix/sysv/linux/i386/i686/sem_trywait.S: New file.
6578         * sysdeps/unix/sysv/linux/i386/i686/sem_timedwait.S: New file.
6579         * sysdeps/unix/sysv/linux/i386/i686/sem_post.S: New file.
6580         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_wait.S: New file.
6581         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S: New file.
6582         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_signal.S: New file.
6583         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_broadcast.S: New file.
6584         * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: New file.
6586         * sysdeps/unix/sysv/linux/i386/createthread.c: Define
6587         PREPARE_CREATE and TLS_VALUE with x86-specific bits.  All the rest
6588         of the code is moved to ...
6589         * sysdeps/pthread/createthread.c: ...here.  New file.
6591 2003-01-27  Ulrich Drepper  <drepper@redhat.com>
6593         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S
6594         (__new_sem_post): Clear %eax before returning.
6595         Reported by MAEDA Naoaki <maeda.naoaki@jp.fujitsu.com>.
6597         * Makefile (tests): Add tst-cleanup2.
6598         * tst-cleanup2.c: New file.
6600         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
6601         Interpret first parameter correctly.
6603 2003-01-17  Ulrich Drepper  <drepper@redhat.com>
6605         * Makefile (headers): Add bits/semaphore.h.
6607 2003-01-16  Jakub Jelinek  <jakub@redhat.com>
6609         * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize _head->sysinfo even
6610         if not SHARED.
6612 2003-01-14  Ulrich Drepper  <drepper@redhat.com>
6614         * sem_open.c (sem_open): Return SEM_FAILED if existing semaphore
6615         must be used and mapping failed.
6616         Reported by Luke Elliott <luke.elliott@activfinancial.com>.
6618         * Makefile (CFLAGS-pthread_self.os): Define this, not
6619         CFLAGS-pthread_self.c.
6621 2003-01-13  Ulrich Drepper  <drepper@redhat.com>
6623         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Don't export
6624         lll_unlock_wake_cb.
6626         * Makefile (libpthread-routines): Add version.  Add rules to build
6627         version.os and banner.h.
6628         * version.c: New file.
6630 2003-01-13  Jakub Jelinek  <jakub@redhat.com>
6632         * pthread_mutex_lock.c (__pthread_mutex_lock_internal): Make
6633         the alias unconditional.
6634         * pthread_mutex_unlock.c  (__pthread_mutex_unlock_internal): Likewise.
6636 2003-01-13  Ulrich Drepper  <drepper@redhat.com>
6638         * Makefile (CFLAGS-pthread_self.c): New definition.
6640 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
6642         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Add
6643         INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
6644         * sysdeps/unix/sysv/linux/raise.c (raise): Likewise.
6645         * init.c (__pthread_initialize_minimal_internal): Likewise.
6647 2003-01-07  Jakub Jelinek  <jakub@redhat.com>
6649         * pthreadP.h (__pthread_cond_timedwait): Add prototype.
6651         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
6652         (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
6653         (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
6654         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
6655         (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
6656         (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
6658 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
6660         * pthreadP.h (LIBC_CANCEL_HANDLED): Define.
6661         * pt-system.c (LIBC_CANCEL_HANDLED): Add.
6662         * tst-cancel-wrappers.sh: Remove all exceptions.
6664 2003-01-05  Ulrich Drepper  <drepper@redhat.com>
6666         * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
6667         features.  Reported by Marijn Ros <marijn@mad.scientist.com>.
6669         * sysdeps/unix/sysv/linux/jmp-unwind.c: Include <pthread-functions.h>.
6670         Use __libc_pthread_functions array if SHARED.
6672         * pthreadP.h: Move pthread_cond_2_0_t definition to...
6673         * sysdeps/unix/sysv/linux/internaltypes.h: ...here.
6675         * sysdeps/pthread/bits/libc-lock.h (__libc_ptf_call): New #define.
6676         (__libc_rwlock_rdlock, __libc_rwlock_wrlock, __libc_rwlock_unlock,
6677         __libc_key_create, __libc_getspecific, __libc_setspecific): Use
6678         __libc_ptf_call instead of __libc_maybe_call.
6679         (PTF): New #define.
6680         (__libc_cleanup_region_start): Wrap function name with PTF call.
6681         (__libc_cleanup_region_end): Likewise.
6682         (__libc_cleanup_end): Likewise.
6684         * pthread_getspecific.c: Add __pthread_getspecific_internal alias.
6685         * pthread_setspecific.c: Add __pthread_setspecific_internal alias.
6686         * pthread_key_create.c: Add __pthread_key_create_internal alias.
6687         * pthreadP.h: Add prototypes.
6689         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Add
6690         __pthread_rwlock_rdlock, __pthread_rwlock_wrlock, and
6691         __pthread_rwlock_unlock aliases.
6692         * pthreadP.h: Add prototypes for new aliases.
6694         * pthreadP.h (struct pthead_functions): Moved to...
6695         * sysdeps/pthread/pthread-functions.h: ...here.  New file.
6696         * init.c (pthread_functions): Add initializers for new elements.
6698         * cleanup_defer.c: Add __pthread_cleanup_push_defer and
6699         __pthread_cleanup_pop_restore aliases.
6700         * pthreadP.h: Add prototypes.
6702         * cleanup.c: Rename _GI_pthread_cleanup_push to __pthread_cleanup_push
6703         and _GI_pthread_cleanup_pop to __pthread_cleanup_pop.
6704         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Adjust caller.
6705         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
6706         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
6707         * pthreadP.h: Adjust prototypes and callers.
6709 2003-01-04  Ulrich Drepper  <drepper@redhat.com>
6711         * Makefile (tests): Add tst-cancel7.
6712         (tst-cancel7-ARGS): New variable.
6713         * tst-cancel7.c: New file.
6715         * old_pthread_cond_broadcast.c: Optimize initialization a bit to work
6716         around gcc defficiencies.
6717         * old_pthread_cond_signal.c: Likewise.
6718         * old_pthread_cond_timedwait.c: Likewise.
6719         * old_pthread_cond_wait.c: Likewise.
6721         * pthreadP.h (pthread_cond_2_0_t): Remove unneeded lock element.
6723 2003-01-03  Ulrich Drepper  <drepper@redhat.com>
6725         * Makefile (tests): Add tst-cond7.
6726         * tst-cond7.c: New file.
6728         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
6729         (condvar_cleanup): Get condvar address from the right place.
6731         * atomic.h: Correct definitions of atomic_full_barrier,
6732         atomic_read_barrier, atomic_write_barrier.
6734         * old_pthread_cond_broadcast.c: Make memory allocate and initialization
6735         race-free.
6736         * old_pthread_cond_signal.c: Likewise.
6737         * old_pthread_cond_timedwait.c: Likewise.
6738         * old_pthread_cond_wait.c: Likewise.
6740 2003-01-03  Jakub Jelinek  <jakub@redhat.com>
6742         * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
6744 2003-01-03  Ulrich Drepper  <drepper@redhat.com>
6746         * pthreadP.h (pthread_cond_2_0_t): New type.
6747         (struct pthread_functions): Use new type for 2.0 condvar callbacks.
6748         Use new type for the 2.0 condvar function prototypes.
6749         * forward.c: Use pthread_cond_2_0_t for 2.0 condvar functions.
6750         * old_pthread_cond_init.c: Use pthread_cond_2_0_t for condvar
6751         parameter.
6752         * old_pthread_cond_destroy.c: Likewise.
6753         * old_pthread_cond_broadcast.c: Likewise.  Lock appropriately.
6754         * old_pthread_cond_signal.c: Likewise.
6755         * old_pthread_cond_timedwait.c: Likewise.
6756         * old_pthread_cond_wait.c: Likewise.
6758         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
6759         (__pthread_cond_wait): Don't save cancellation mode and seq value
6760         in same location.
6762         * herrno.c (__h_errno_location): Don't define as weak.
6764 2003-01-02  Jakub Jelinek  <jakub@redhat.com>
6766         * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
6767         pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
6768         and pthread_cond_wait.
6769         * old_pthread_cond_broadcast.c (__old_pthread_cond_broadcast):
6770         Renamed to...
6771         (__pthread_cond_broadcast_2_0): ... this.
6772         * old_pthread_cond_destroy.c (__old_pthread_cond_destroy):
6773         Renamed to...
6774         (__pthread_cond_destroy_2_0): ... this.
6775         * old_pthread_cond_init.c (__old_pthread_cond_init):
6776         Renamed to...
6777         (__pthread_cond_init_2_0): ... this.
6778         * old_pthread_cond_signal.c (__old_pthread_cond_signal):
6779         Renamed to...
6780         (__pthread_cond_signal_2_0): ... this.
6781         * old_pthread_cond_wait.c (__old_pthread_cond_wait):
6782         Renamed to...
6783         (__pthread_cond_wait_2_0): ... this.
6784         * pthread_cond_destroy.c: Include shlib-compat.h.
6785         (pthread_cond_destroy): Change strong_alias into versioned_symbol.
6786         * pthread_cond_init.c: Include shlib-compat.h.
6787         (pthread_cond_init): Change strong_alias into versioned_symbol.
6788         * pthreadP.h (struct pthread_functions): Rename ptr_pthread_cond_*
6789         fields to ptr___pthread_cond_* and add ptr___pthread_cond_*_2_0
6790         fields.
6791         (__pthread_cond_broadcast_2_0, __pthread_cond_destroy_2_0,
6792         __pthread_cond_init_2_0, __pthread_cond_signal_2_0,
6793         __pthread_cond_wait_2_0): New prototypes.
6794         (__old_pthread_cond_broadcast, __old_pthread_cond_destroy,
6795         __old_pthread_cond_init, __old_pthread_cond_signal,
6796         __old_pthread_cond_wait): Removed.
6797         * init.c: Include shlib-compat.h.
6798         (pthread_functions): Guard ptr___pthread_attr_init_2_0
6799         initialization with SHLIB_COMPAT (GLIBC_2_0, GLIBC_2_1).
6800         Rename ptr_pthread_cond_* to ptr___pthread_cond_*, initialize
6801         ptr___pthread_cond_*_2_0 fields.
6802         * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
6803         pthread_cond_*@GLIBC_2.0 compatibility symbols.
6805         * sysdeps/pthread/sigaction.c (SIGCANCEL): Only define if
6806         LIBC_SIGACTION was not yet defined.
6807         [!defined LIBC_SIGACTION]: Define LIBC_SIGACTION, #include self.
6808         [!defined LIBC_SIGACTION] (__sigaction): New function and
6809         libc_hidden_weak.
6810         [!defined LIBC_SIGACTION] (sigaction): New weak_alias.
6811         [defined LIBC_SIGACTION]: #include_next <sigaction.c>.
6813 2003-01-02  Jakub Jelinek  <jakub@redhat.com>
6815         * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
6817 2003-01-02  Ulrich Drepper  <drepper@redhat.com>
6819         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
6820         New, larger type definition.
6821         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: New condvar
6822         implementation.
6823         * Versions [libpthread]: Add definitions for new pthread_cond_*
6824         interfaces for version GLIBC_2.3.2.
6825         * pthread_cond_init.c: Update initialization for new type definition.
6826         * Makefile (libpthread-routines): Remove pthread_cond_wait,
6827         pthread_cond_timedwait, pthread_cond_signal, and
6828         pthread_cond_broadcast.  Add old_pthread_cond_init,
6829         old_pthread_cond_destroy, old_pthread_cond_wait,
6830         old_pthread_cond_timedwait, old_pthread_cond_signal, and
6831         old_pthread_cond_broadcast.
6832         * old_pthread_cond_broadcast.c: New file.
6833         * old_pthread_cond_destroy.c: New file.
6834         * old_pthread_cond_init.c: New file.
6835         * old_pthread_cond_signal.c: New file.
6836         * old_pthread_cond_timedwait.c: New file.
6837         * old_pthread_cond_wait.c: New file.
6838         * pthreadP.h: Add prototypes for the compatibility interfaces.
6840         * pthread_cond_destroy.c: Don't include <errno.h>.
6842 2003-01-01  Ulrich Drepper  <drepper@redhat.com>
6844         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Avoid
6845         unnecessary zero offset when addressing MUTEX.
6847 2002-12-31  Ulrich Drepper  <drepper@redhat.com>
6849         * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
6850         __register_atfork.
6851         * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
6852         for __register_atfork.
6854 2002-12-31  Jakub Jelinek  <jakub@redhat.com>
6856         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use __ASSEMBLER__
6857         instead of ASSEMBLER test macro.
6859         * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
6860         __libc_current_sigrtmax): Add libc_hidden_def.
6862         * sysdeps/pthread/list.h: Remove assert.h include.
6864 2002-12-31  Ulrich Drepper  <drepper@redhat.com>
6866         * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Use
6867         __pthread_initialize_minimal_internal not
6868         __pthread_initialize_minimal.
6870 2002-12-30  Ulrich Drepper  <drepper@redhat.com>
6872         * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Mark
6873         __pthread_initialize_minimal as hidden.
6875         * init.c (__pthread_initialize_minimal_internal): Don't mark as
6876         constructor.
6878 2002-12-31  Jakub Jelinek  <jakub@redhat.com>
6880         * Makefile ($(inst_libdir)/libpthread.so): Depend on
6881         $(common-objpfx)format.lds, include that into the output script.
6882         Fix comment.
6883         (extra-B-pthread.so): Change linuxthreads/ into nptl/.
6885 2002-12-28  Andreas Jaeger  <aj@suse.de>
6887         * sysdeps/unix/sysv/linux/xstatconv.c (xstat_conv): Adjust for
6888         nsec resolution changes.
6889         (xstat64_conv): Likewise.
6890         (xstat32_conv): Likewise.
6891         * sysdeps/unix/sysv/linux/kernel_stat.h: Add nsec resolution for
6892         struct kernel_stat.
6893         * sysdeps/unix/sysv/linux/bits/stat.h: Add nsec resolution for
6894         structs stat and stat64.
6895         * time/time.h (__timespec_defined): Define for __USE_MISC.
6896         * io/sys/stat.h [__USE_MISC]: Define __need_timespec for struct stat.
6898 2002-12-30  Jakub Jelinek  <jakub@redhat.com>
6900         * forward.c (FORWARD2): Renamed from FORWARD3.  Remove unused export
6901         argument.
6902         (pthread_attr_init_2_0, pthread_attr_init_2_1): Use FORWARD macro.
6903         (pthread_exit): Use strong_alias to avoid warnings.
6904         * pthreadP.h (struct pthread_functions): Rename ptr_pthread_exit
6905         and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
6906         ptr___pthread_attr_init_2_*.
6907         * init.c (pthread_functions): Adjust.
6909 2002-12-29  Ulrich Drepper  <drepper@redhat.com>
6911         * forward.c: Make all functions available by default again.  It
6912         caused too much trouble.
6914         * pt-siglongjmp.c: Removed.
6916 2002-12-28  Jakub Jelinek  <jakub@redhat.com>
6918         * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
6919         (SYSINFO_OFFSET, MULTIPLE_THREADS_OFFSET): Remove.
6920         * sysdeps/i386/Makefile: New file.
6921         * sysdeps/i386/tcb-offsets.sym: New file.
6922         * sysdeps/pthread/tcb-offsets.h: New file.
6923         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
6924         Remove MULTIPLE_THREADS_OFFSET and SYSINFO_OFFSET checks.
6926         * sysdeps/unix/sysv/linux/Versions [libc] (GLIBC_PRIVATE): Move
6927         __register_atfork...
6928         (GLIBC_2.3.2): ...here.
6930 2002-12-28  Ulrich Drepper  <drepper@redhat.com>
6932         * sysdeps/pthread/pthread.h: Mark pthread_attr_getstackaddr and
6933         pthread_attr_setstackaddr with __attribute_deprecated__.
6935 2002-12-27  Jakub Jelinek  <jakub@redhat.com>
6937         * pt-system.c (system): Remove cancellation handling.
6938         * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
6939         cancellation routines.
6941 2002-12-28  Ulrich Drepper  <drepper@redhat.com>
6943         * descr.h: Include <dl-sysdep.h>.
6944         (struct pthread): Move header.data.list to the back of the struct.
6945         * sysdeps/i386/tls.h (tcbhead_t): Move list to the back of the struct.
6946         (MULTIPLE_THREADS_OFFSET): Adjust offset.
6947         (SYSINFO_OFFSEET): Likewise.
6949 2002-12-27  Jakub Jelinek  <jakub@redhat.com>
6951         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h (USE_DL_SYSINFO):
6952         Define.
6953         (DL_SYSINFO_DEFAULT): Cast to uintptr_t to avoid warnings.
6954         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h (NEED_DL_SYSINFO,
6955         DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION): Define.
6956         (USE_DL_SYSINFO): Undef.
6958 2002-12-22  Jakub Jelinek  <jakub@redhat.com>
6960         * Makefile (tests-reverse): Use $(objpfx)../libc.so instead of
6961         $(common-objpfx)libc.so.
6962         * tst-cancel4.c (tf_write, tf_writev): Increase buf sizes so that
6963         it is bigger than pipe buffer size even on arches with bigger
6964         page size.
6965         (tf_usleep): Cast usleep argument to useconds_t to avoid warnings.
6967 2002-12-25  Ulrich Drepper  <drepper@redhat.com>
6969         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Implement
6970         correct errno access for case that USE___THREAD is not defined.
6972 2002-12-24  Ulrich Drepper  <drepper@redhat.com>
6974         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Add missing #endif.
6975         Patch by Marijn Ros <marijn@mad.scientist.com>.
6977 2002-12-22  Roland McGrath  <roland@redhat.com>
6979         * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
6981 2002-12-20  Ulrich Drepper  <drepper@redhat.com>
6983         * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_inexpensive): Define.
6985 2002-12-19  Ulrich Drepper  <drepper@redhat.com>
6987         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Don't define
6988         NEED_DL_SYSINFO since no processor < i686 had the sysenter opcode.
6989         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: New file.
6991         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Use ENTER_KERNEL instead
6992         of int $0x80.
6993         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
6994         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Likewise.
6995         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Likewise.
6996         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
6997         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
6998         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Likewise.
6999         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Likewise.
7000         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
7002         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add support for using
7003         sysenter.
7004         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
7006         * sysdeps/i386/tls.h: Unconditionally include <dl-sysdep.h>.
7008         * allocatestack.c (allocate_stack) [NEED_DL_SYSINFO]: Set sysinfo
7009         in new TCB.
7010         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Check
7011         that sysinfo is properly initialized.
7012         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define RTLD_PRIVATE_ERRNO
7013         to 1 only for ld.so.
7015         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
7016         RTLD_CORRECT_DYNAMIC_WEAK.
7018 2002-12-19  Jakub Jelinek  <jakub@redhat.com>
7020         * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
7021         Use return 0 as 6th argument to FORWARD4.
7022         * pthread_equal.c: Include pthreadP.h instead of pthread.h.
7024 2002-12-18  Ulrich Drepper  <drepper@redhat.com>
7026         * descr.h (struct pthread) [NEED_DL_SYSINFO]: Add sysinfo member.
7027         * sysdeps/i386/tls.h (tcbhead_t): Add sysinfo member.
7028         Define SYSINFO_OFFSEET if NEED_DL_SYSINFO is defined.
7029         (INIT_SYSINFO): New #define.
7030         (TLS_TP_INIT): Use INIT_SYSINFO.
7031         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
7032         At test to make sure SYSINFO_OFFSET value is correct.
7033         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
7035 2002-12-18  Jakub Jelinek  <jakub@redhat.com>
7037         * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
7038         * sysdeps/unix/sysv/linux/raise.c (gsignal): Add weak alias to raise.
7039         * Versions [libc: GLIBC_2.0]: Add pthread_attr_init.
7040         [libpthread: GLIBC_2.1]: Remove __pthread_rwlock_init,
7041         __pthread_rwlock_destroy, __pthread_rwlock_rdlock,
7042         __pthread_rwlock_wrlock, __pthread_rwlock_unlock,
7043         __pthread_rwlock_tryrdlock and __pthread_rwlock_trywrlock.
7045 2002-12-18  Ulrich Drepper  <drepper@redhat.com>
7047         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use ENTER_KERNEL
7048         macro instead of using int $0x80 directly.
7050         * sysdeps/pthread/bits/stdio-lock.h: New file.
7051         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: New file.
7052         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: New file.
7053         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: New file.
7054         * Makefile (routines): Add libc-lowlevelmutex.
7056         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Remove
7057         __i686.get_pc_thunk.dx.
7059 2002-12-17  Jakub Jelinek  <jakub@redhat.com>
7061         * Makefile (libpthread-shared-only-routines): Add pt-allocrtsig.
7062         (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
7063         ($(objpfx)tst-cancel-wrappers.out): New rule.
7064         * tst-cancel-wrappers.sh: New test.
7065         * tst-locale1.c: Include signal.h.
7066         (uselocale): Test static linking of __libc_current_sigrt*.
7068 2002-12-17  Ulrich Drepper  <drepper@redhat.com>
7070         * Makefile (tests): Add tst-cancel6.
7071         * tst-cancel6.c: New file
7073 2002-12-17  Jakub Jelinek  <jakub@redhat.com>
7075         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
7076         Define meaningfully for assembler as well.
7077         * pthreadP.h (struct pthread_functions): Remove
7078         ptr_pthread_attr_init field.  Add ptr_pthread_attr_init_2_0
7079         and ptr_pthread_attr_init_2_1 fields.
7080         * init.c (pthread_functions): Initialize ptr_pthread_attr_init_2_0
7081         and ptr_pthread_attr_init_2_1 instead of ptr_pthread_attr_init.
7082         * forward.c (FORWARD4): Renamed from FORWARD3. Add export argument.
7083         (FORWARD3): Define using FORWARD4.
7084         (pthread_attr_init): Provide both @GLIBC_2.0 and @@GLIBC_2.1
7085         versions.
7086         * pt-system.c: Remove duplicate stdlib.h include.
7088 2002-12-16  Ulrich Drepper  <drepper@redhat.com>
7090         * sem_init.c: Define sem_init@GLIBC_2.0.
7091         * sem_destroy.c: Define sem_destroy@GLIBC_2.0.
7092         * sem_getvalue.c: Define sem_getvalue@GLIBC_2.0.
7094         * flockfile.c: Moved to...
7095         * sysdeps/pthread/flockfile.c: ...here.  New file.
7096         * funlockfile.c: Moved to...
7097         * sysdeps/pthread/funlockfile.c: ...here.  New file.
7098         * ftrylockfile.c: Moved to...
7099         * sysdeps/pthread/ftrylockfile.c: ...here.  New file.
7101 2002-12-16  Jakub Jelinek  <jakub@redhat.com>
7103         * libc-cancellation.c: Guard both function with
7104         #if !defined NOT_IN_libc.
7105         * Makefile (libpthread-routines): Use ptw-, not pt- prefix for the
7106         automatically provided pthread wrappers.
7107         * pthreadP.h (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define to
7108         CANCEL_* if IS_IN_libpthread and to dummy versions if not in libc
7109         nor in libpthread.
7110         * pt-open.c: Removed.
7111         * pt-fcntl.c: Removed.
7112         * pt-fsync.c: Removed.
7113         * pt-lseek.c: Removed.
7114         * pt-msgrcv.c: Removed.
7115         * pt-msgsnd.c: Removed.
7116         * pt-msync.c: Removed.
7117         * pt-nanosleep.c: Removed.
7118         * pt-open64.c: Removed.
7119         * pt-pause.c: Removed.
7120         * pt-pread.c: Removed.
7121         * pt-pread64.c: Removed.
7122         * pt-pwrite.c: Removed.
7123         * pt-pwrite64.c: Removed.
7124         * pt-read.c: Removed.
7125         * pt-recv.c: Removed.
7126         * pt-recvfrom.c: Removed.
7127         * pt-recvmsg.c: Removed.
7128         * pt-send.c: Removed.
7129         * pt-sendto.c: Removed.
7130         * pt-sigtimedwait.c: Removed.
7131         * pt-sigwait.c: Removed.
7132         * pt-wait.c: Removed.
7133         * pt-waitpid.c: Removed.
7134         * pt-write.c: Removed.
7135         * pt-accept.c: Removed.
7136         * pt-close.c: Removed.
7137         * pt-connect.c: Removed.
7138         * pt-lseek64.c: Removed.
7139         * pt-sendmsg.c: Removed.
7140         * pt-tcdrain.c: Removed.
7142 2002-12-15  Ulrich Drepper  <drepper@redhat.com>
7144         * init.c (__pthread_initialize_minimal_internal): Renamed from
7145         __pthread_initialize_minimal.  Make old name an alias.  This
7146         converts a normal relocation into a relative relocation.
7148         * pt-fcntl.c (__fcntl): Use fcntl64 syscall, not fcntl.
7150         * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
7151         readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
7152         * Makefile (libpthread-routines): Remove pt-creat, pt-poll,
7153         pt-pselect, pt-readv, pt-select, pt-sigpause, pt-sigsuspend,
7154         pt-sigwaitinfo, pt-waitid, and pt-writev.
7155         * pt-creat.c: Removed.
7156         * pt-poll.c: Removed.
7157         * pt-pselect.c: Removed.
7158         * pt-readv.c: Removed.
7159         * pt-select.c: Removed.
7160         * pt-sigpause.c: Removed.
7161         * pt-sigsuspend.c: Removed.
7162         * pt-sigwaitinfo.c: Removed.
7163         * pt-waitid.c: Removed.
7164         * pt-writev.c: Removed.
7166         * init.c (pthread_functions): New variable.
7167         (__pthread_initialize_minimal): Pass pointer to pthread_functions
7168         (or NULL) to __libc_pthread_init.
7169         * forward.c: Rewrite to use __libc:pthread_functions array to get
7170         function addresses.
7171         * sysdeps/unix/sysv/linux/fork.h: Remove __libc_pthread_init
7172         prototype.
7173         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
7174         Take new parameter.  Copy content of variable pointed to by it
7175         to __libc_pthread_init.
7177         * pthreadP.h (struct pthread_functions): New type.
7178         (__libc_pthread_init): Declare.
7180         * pthread_attr_destroy.c: Add namespace protected alias.
7181         * pthread_attr_getdetachstate.c: Likewise.
7182         * pthread_attr_getinheritsched.c: Likewise.
7183         * pthread_attr_getschedparam.c: Likewise.
7184         * pthread_attr_getschedpolicy.c: Likewise.
7185         * pthread_attr_getscope.c: Likewise.
7186         * pthread_attr_setdetachstate.c: Likewise.
7187         * pthread_attr_setinheritsched.c: Likewise.
7188         * pthread_attr_setschedparam.c: Likewise.
7189         * pthread_attr_setschedpolicy.c: Likewise.
7190         * pthread_attr_setscope.c: Likewise.
7191         * pthread_cond_broadcast.c: Likewise.
7192         * pthread_cond_destroy.c: Likewise.
7193         * pthread_cond_init.c: Likewise.
7194         * pthread_cond_signal.c: Likewise.
7195         * pthread_cond_wait.c: Likewise.
7196         * pthread_condattr_destroy.c: Likewise.
7197         * pthread_condattr_init.c: Likewise.
7198         * pthread_equal.c: Likewise.
7199         * pthread_exit.c: Likewise.
7200         * pthread_getschedparam.c: Likewise.
7201         * pthread_self.c: Likewise.
7202         * pthread_setcancelstate.c: Likewise.
7203         * pthread_setschedparam.c: Likewise.
7204         * pthread_mutex_destroy.c: Likewise.
7205         * pthread_mutex_init.c: Likewise.
7206         * pthreadP.h: Add prototypes for the aliases.
7208         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Set
7209         multiple_threads member in correct TCB to 1.
7211         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define
7212         SINGLE_THREAD_P.  If in libc or libpthread examine multiple_thread
7213         member of thread decriptor, otherwise return unconditionally 1.
7215 2002-12-14  Ulrich Drepper  <drepper@redhat.com>
7217         * sysdeps/unix/sysv/linux/i386/pt-socket.S: Changes folded into the
7218         regular Linux version.  Remove file.
7219         * sysdeps/unix/sysv/linux/connect.S: Likewise.  Remove file.
7220         * sysdeps/unix/sysv/linux/llseek.c: Likewise.  Remove file.
7221         * sysdeps/unix/sysv/linux/msgrcv.c: Likewise.  Remove file.
7222         * sysdeps/unix/sysv/linux/msgsnd.c: Likewise.  Remove file.
7223         * sysdeps/unix/sysv/linux/open64.c: Likewise.  Remove file.
7224         * sysdeps/unix/sysv/linux/poll.c: Likewise.  Remove file.
7225         * sysdeps/unix/sysv/linux/pread.c: Likewise.  Remove file.
7226         * sysdeps/unix/sysv/linux/pread64.c: Likewise.  Remove file.
7227         * sysdeps/unix/sysv/linux/pselect.c: Likewise.  Remove file.
7228         * sysdeps/unix/sysv/linux/pwrite.c: Likewise.  Remove file.
7229         * sysdeps/unix/sysv/linux/pwrite64.c: Likewise.  Remove file.
7230         * sysdeps/unix/sysv/linux/readv.c: Likewise.  Remove file.
7231         * sysdeps/unix/sysv/linux/recv.S: Likewise.  Remove file.
7232         * sysdeps/unix/sysv/linux/recvfrom.S: Likewise.  Remove file.
7233         * sysdeps/unix/sysv/linux/recvmsg.S: Likewise.  Remove file.
7234         * sysdeps/unix/sysv/linux/send.S: Likewise.  Remove file.
7235         * sysdeps/unix/sysv/linux/sendmsg.S: Likewise.  Remove file.
7236         * sysdeps/unix/sysv/linux/sendto.S: Likewise.  Remove file.
7237         * sysdeps/unix/sysv/linux/sigpause.c: Likewise.  Remove file.
7238         * sysdeps/unix/sysv/linux/sigsuspend.c: Likewise.  Remove file.
7239         * sysdeps/unix/sysv/linux/sigtimedwait.c: Likewise.  Remove file.
7240         * sysdeps/unix/sysv/linux/sigwait.c: Likewise.  Remove file.
7241         * sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise.  Remove file.
7242         * sysdeps/unix/sysv/linux/system.c: Likewise.  Remove file.
7243         * sysdeps/unix/sysv/linux/tcdrain.c: Likewise.  Remove file.
7244         * sysdeps/unix/sysv/linux/wait.c: Likewise.  Remove file.
7245         * sysdeps/unix/sysv/linux/waitid.c: Likewise.  Remove file.
7246         * sysdeps/unix/sysv/linux/waitpid.c: Likewise.  Remove file.
7247         * sysdeps/unix/sysv/linux/writev.c: Likewise.  Remove file.
7248         * sysdeps/unix/sysv/linux/i386/fcntl.c: Likewise.  Remove file.
7250 2002-12-14  Jakub Jelinek  <jakub@redhat.com>
7252         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
7253         * sysdeps/unix/sysv/linux/open.c: Removed.
7254         * sysdeps/unix/sysv/linux/fsync.c: Removed.
7255         * sysdeps/unix/sysv/linux/lseek.c: Removed.
7256         * sysdeps/unix/sysv/linux/msync.c: Removed.
7257         * sysdeps/unix/sysv/linux/read.c: Removed.
7258         * sysdeps/unix/sysv/linux/close.c: Removed.
7259         * sysdeps/unix/sysv/linux/creat.c: Removed.
7260         * sysdeps/unix/sysv/linux/nanosleep.c: Removed.
7261         * sysdeps/unix/sysv/linux/pause.c: Removed.
7262         * sysdeps/unix/sysv/linux/select.c: Removed.
7263         * sysdeps/unix/sysv/linux/write.c: Removed.
7265 2002-12-14  Ulrich Drepper  <drepper@redhat.com>
7267         * sysdeps/unix/sysv/linux/i386/pt-socket.S: Check multiple_threads
7268         element in TCB to see whether locking is needed.
7270         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Check that
7271         MULTIPLE_THREADS_OFFSET value is correct.
7273         * sysdeps/unix/sysv/linux/close.c: New file.
7274         * sysdeps/unix/sysv/linux/connect.S: New file.
7275         * sysdeps/unix/sysv/linux/creat.c: New file.
7276         * sysdeps/unix/sysv/linux/fsync.c: New file.
7277         * sysdeps/unix/sysv/linux/llseek.c: New file.
7278         * sysdeps/unix/sysv/linux/lseek.c: New file.
7279         * sysdeps/unix/sysv/linux/msgrcv.c: New file.
7280         * sysdeps/unix/sysv/linux/msgsnd.c: New file.
7281         * sysdeps/unix/sysv/linux/msync.c: New file.
7282         * sysdeps/unix/sysv/linux/nanosleep.c: New file.
7283         * sysdeps/unix/sysv/linux/open.c: New file.
7284         * sysdeps/unix/sysv/linux/open64.c: New file.
7285         * sysdeps/unix/sysv/linux/pause.c: New file.
7286         * sysdeps/unix/sysv/linux/poll.c: New file.
7287         * sysdeps/unix/sysv/linux/pread.c: New file.
7288         * sysdeps/unix/sysv/linux/pread64.c: New file.
7289         * sysdeps/unix/sysv/linux/pselect.c: New file.
7290         * sysdeps/unix/sysv/linux/pwrite.c: New file.
7291         * sysdeps/unix/sysv/linux/pwrite64.c: New file.
7292         * sysdeps/unix/sysv/linux/readv.c: New file.
7293         * sysdeps/unix/sysv/linux/recv.S: New file.
7294         * sysdeps/unix/sysv/linux/recvfrom.S: New file.
7295         * sysdeps/unix/sysv/linux/recvmsg.S: New file.
7296         * sysdeps/unix/sysv/linux/select.c: New file.
7297         * sysdeps/unix/sysv/linux/send.S: New file.
7298         * sysdeps/unix/sysv/linux/sendmsg.S: New file.
7299         * sysdeps/unix/sysv/linux/sendto.S: New file.
7300         * sysdeps/unix/sysv/linux/sigpause.c: New file.
7301         * sysdeps/unix/sysv/linux/sigsuspend.c: New file.
7302         * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
7303         * sysdeps/unix/sysv/linux/sigwait.c: New file.
7304         * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
7305         * sysdeps/unix/sysv/linux/system.c: New file.
7306         * sysdeps/unix/sysv/linux/tcdrain.c: New file.
7307         * sysdeps/unix/sysv/linux/wait.c: New file.
7308         * sysdeps/unix/sysv/linux/waitid.c: New file.
7309         * sysdeps/unix/sysv/linux/waitpid.c: New file.
7310         * sysdeps/unix/sysv/linux/writev.c: New file.
7311         * sysdeps/unix/sysv/linux/i386/fcntl.c: New file.
7313         * pt-readv.c: Fix comment.
7315 2002-12-14  Jakub Jelinek  <jakub@redhat.com>
7317         * tst-cleanup1.c: Include stdlib.h.
7319         * tst-cancel5.c: New test.
7320         * Makefile (tests): Add tst-cancel5.
7321         (tst-cancel5): Link against libc.so libpthread.so in that order.
7323 2002-12-13  Ulrich Drepper  <drepper@redhat.com>
7325         * forward.c (test_loaded): Prevent recursive calls.
7327         * Makefile (routines): Add libc-cancellation.
7328         * libc-cancellation.c: New file.
7329         * descr.h (struct pthread): Add multiple_threads field.
7330         * allocatestack.c (allocate_stack): Initialize multiple_header field of
7331         new thread descriptor to 1.
7332         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread):
7333         Initialize multiple_thread field after successful thread creation.
7334         * cancellation.c (__do_cancel): Move to pthreadP.h.
7335         (__pthread_enable_asynccancel): Remove parameter from __do_cancel call.
7336         (__pthread_disable_asynccancel): Add internal_function attribute.
7337         * init.c (sigcancel_handler): Remove parameter from __do_cancel call.
7338         * pthread_setcancelstate.c: Likewise.
7339         * pthread_setcanceltype.c: Likewise.
7340         * pthread_exit.c: Likewise.
7341         * pthreadP.h (CANCELLATION_P): Likewise.
7342         (__do_cancel): Define as static inline.
7343         (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): New #defines.
7344         (__libc_enable_asynccancel, __libc_disable_asynccancel): New
7345         declarations.
7346         * sysdeps/i386/tls.h (tcbhead_t): Add list and multiple_threads
7347         fields.  Define MULTIPLE_THREADS_OFFSET.
7348         * sysdeps/pthread/bits/libc-lock.h: Remove __libc_locking_needed
7349         declaration.
7350         * sysdeps/unix/sysv/linux/accept.S: New file.
7351         * sysdeps/unix/sysv/linux/read.c: New file.
7352         * sysdeps/unix/sysv/linux/write.c: New file.
7353         * sysdeps/unix/sysv/linux/i386/pt-socket.S: New file.
7354         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove definition and
7355         initialization of __libc_locking_needed.
7356         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't use
7357         __libc_locking_needed, use multiple_threads field in TCB.
7358         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
7360 2002-12-12  Ulrich Drepper  <drepper@redhat.com>
7362         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: Use i486
7363         version.
7364         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: Likewise.
7366         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Correct
7367         access to __libc_locking_needed for PIC.
7369 2002-12-12  Jakub Jelinek  <jakub@redhat.com>
7371         * sysdeps/pthread/bits/libc-lock.h (__libc_locking_needed): Only
7372         declare for libc.so.
7373         (__libc_lock_init, __libc_lock_init_recursive): Change into comma
7374         expression.
7375         (__libc_lock_lock): Put into statement expression.
7376         (__libc_lock_unlock): Remove trailing semicolon.
7377         * sysdeps/unix/sysv/linux/fork.h (__libc_pthread_init): Fix typo.
7379 2002-12-12  Roland McGrath  <roland@redhat.com>
7381         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use asm operand with
7382         "m" constraint to refer to __libc_locking_needed.  Declare it here.
7384 2002-12-12  Ulrich Drepper  <drepper@redhat.com>
7386         * sysdeps/unix/sysv/linux/fork-gen.c: Renamed to...
7387         * sysdeps/unix/sysv/linux/libc_pthread_init.c: ...this.
7388         Initialize __libc_locking_needed.
7389         * init.c (__pthread_initialize_minimal): Call __libc_pthread_init
7390         instead of __register_pthread_fork_handler.
7391         * sysdeps/pthread/bits/libc-lock.h: Declare __libc_locking_needed.
7392         * sysdeps/unix/sysv/linux/Makefile (sysdep_routimes): Replace
7393         fork-gen with libc_pthread_init.
7394         * sysdeps/unix/sysv/linux/Versions: Use __libc_pthread_init instead
7395         of __register_pthread_fork_handler.
7396         * sysdeps/unix/sysv/linux/fork.h: Declare __libc_pthread_init instead
7397         of __register_pthread_fork_handler.
7398         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use
7399         __libc_locking_needed to determine whether lock prefix can be avoided.
7400         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
7402 2002-12-11  Ulrich Drepper  <drepper@redhat.com>
7404         * Makefile (tests): Add tst-cleanup1.
7405         * tst-cleanup1.c: New file.
7406         * cancellation.c (__cleanup_thread): Removed.
7407         (__do_cancel): Remove call to __cleanup_thread.
7408         * pthreadP.h: Remove __cleanup_thread prorotype.
7410         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
7411         Remember function and argument even if cancellation handler
7412         function is not available.
7413         (__libc_cleanup_region_end): Execute registered function directly if
7414         pthread functions are not available.
7415         (__libc_cleanup_end): Likewise.
7417         * init.c (__pthread_initialize_minimal): Fix initialization in
7418         static lib by preventing gcc from being too clever.
7420 2002-12-10  Ulrich Drepper  <drepper@redhat.com>
7422         * init.c (__pthread_initialize_minimal): Remove unneccesary
7423         sigaddset call.
7425         * Makefile (tests): We can run tst-locale2 now.
7427 2002-12-09  Ulrich Drepper  <drepper@redhat.com>
7429         * Versions: Remove duplicated sigwait entry.
7431 2002-12-08  Ulrich Drepper  <drepper@redhat.com>
7433         * pthreadP.h: Enable pthread_cleanup_{push,pop} optimizations only
7434         inside libpthread.
7436         * pt-fcntl.c (__fcntl): Initialize oldtype to avoid warning.
7438         * pthreadP.h: Declare __pthread_enable_asynccancel and
7439         __pthread_disable_asynccancel.
7440         (CANCEL_ASYNC): Use __pthread_enable_asynccancel.
7441         (CANCEL_RESET): Use __pthread_disable_asynccancel.
7442         * cancellation.c (__pthread_enable_asynccancel): New function.
7443         (__pthread_disable_asynccancel): New function.
7444         * pt-accept.c: Adjust for CANCEL_ASYNC and CANCEL_RESET change.
7445         * pt-close.c: Likewise.
7446         * pt-connect.c: Likewise.
7447         * pt-creat.c: Likewise.
7448         * pt-fcntl.c: Likewise.
7449         * pt-fsync.c: Likewise.
7450         * pt-lseek.c: Likewise.
7451         * pt-lseek64.c: Likewise.
7452         * pt-msgrcv.c: Likewise.
7453         * pt-msgsnd.c: Likewise.
7454         * pt-msync.c: Likewise.
7455         * pt-nanosleep.c: Likewise.
7456         * pt-open.c: Likewise.
7457         * pt-open64.c: Likewise.
7458         * pt-pause.c: Likewise.
7459         * pt-poll.c: Likewise.
7460         * pt-pread.c: Likewise.
7461         * pt-pread64.c: Likewise.
7462         * pt-pselect.c: Likewise.
7463         * pt-pwrite.c: Likewise.
7464         * pt-pwrite64.c: Likewise.
7465         * pt-read.c: Likewise.
7466         * pt-readv.c: Likewise.
7467         * pt-recv.c: Likewise.
7468         * pt-recvfrom.c: Likewise.
7469         * pt-recvmsg.c: Likewise.
7470         * pt-select.c: Likewise.
7471         * pt-send.c: Likewise.
7472         * pt-sendmsg.c: Likewise.
7473         * pt-sendto.c: Likewise.
7474         * pt-sigpause.c: Likewise.
7475         * pt-sigsuspend.c: Likewise.
7476         * pt-sigtimedwait.c: Likewise.
7477         * pt-sigwait.c: Likewise.
7478         * pt-sigwaitinfo.c: Likewise.
7479         * pt-system.c: Likewise.
7480         * pt-tcdrain.c: Likewise.
7481         * pt-wait.c: Likewise.
7482         * pt-waitid.c: Likewise.
7483         * pt-waitpid.c: Likewise.
7484         * pt-write.c: Likewise.
7485         * pt-writev.c: Likewise.
7486         * pthread_join.c: Likewise.
7487         * pthread_timedjoin.c: Likewise.
7489         * pt-sigpause.c (sigsuspend): Call __sigsuspend.
7490         (__xpg_sigpause): New function.
7491         * Versions (libpthread:GLIBC_2.3.2): Add __xpg_sigpause.
7493 2002-12-07  Ulrich Drepper  <drepper@redhat.com>
7495         * Makefile (CFLAGS-ftrylockfile.c): Add -D_IO_MTSAFE_IO.
7497         * cleanup.c: Move declarations of _GI_pthread_cleanup_push and
7498         _GI_pthread_cleanup_pop to pthreadP.h.
7500         * ftrylockfile.c: Use _IO_lock_trylock instead of
7501         pthread_mutex_trylock.
7503         * pthreadP.h (CANCEL_ASYNC): Use __pthread_setcanceltype.
7504         (CANCEL_RESET): Likewise.
7505         (__pthread_setcanceltype_): Declare.
7506         (__pthread_mutex_lock_internal): Declare.
7507         (__pthread_mutex_unlock_internal): Declare.
7508         (__pthread_once_internal): Declare.
7509         (pthread_cleanup_push): Redefine using _GI_pthread_cleanup_push.
7510         (pthread_cleanup_pop): Redefine using _GI_pthread_cleanup_pop.
7512         * pthread_cond_timedwait.c: Use INTUSE is calls to pthread_mutex_lock
7513         and pthread_mutex_unlock.
7514         * pthread_cond_wait.c: Likewise.
7515         * pthread_mutex_lock.c: Use INTDEF to define alias if needed.
7516         * pthread_mutex_unlock.c: Likewise.
7518         * pthread_setcanceltype.c: Add additional alias
7519         __pthread_setcanceltype.
7521         * sem_unlink.c (sem_unlink): Use __pthread_once with INTDEF.
7522         * sem_open.c (sem_open): Likewise.
7523         Use __libc_open, __libc_write, and __libc_close instead of
7524         open, write, and close respectively.
7526         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_trylock_internal):
7527         Rewrite as statement expression since it must return a value.
7529         * pthread_cancel.c: Use __pthread_kill instead of pthread_kill.
7530         * sysdeps/unix/sysv/linux/pthread_kill.c: Define additional alias
7531         __pthread_kill.
7533         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Define additional
7534         alias __pthread_once_internal.
7536         * sysdeps/unix/sysv/linux/raise.c: Use libc_hidden_def for raise.
7538 2002-12-06  Ulrich Drepper  <drepper@redhat.com>
7540         * Makefile (tests): Add tst-stdio1 and tst-stdio2.
7541         * tst-stdio1.c: New file.
7542         * tst-stdio2.c: New file.
7544         * init.c (__pthread_initialize_minimal): Correct INIT_LIST_HEAD use.
7546         * Makefile (tests): Comment out tst-locale2 for now.
7547         (CFLAGS-flockfile.c, CFLAGS-funlockfile.c): Define to -D_IO_MTSAFE_IO.
7549         * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-fork.c to
7550         -D_IO_MTSAFE_IO.
7551         * sysdeps/unix/sysv/linux/fork.c: Include <bits/stdio-lock.h>.
7552         Use _IO_lock_init instead of explicit assignment.
7554         * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
7555         Define __libc_lock_* and __libc_lock_recursive macros with
7556         lowlevellock macros, not pthread mutexes.
7558         * flockfile.c: Include <bits/stdio-lock.h>.  Use _IO_lock_lock instead
7559         of pthread_mutex_lock.
7560         * funlockfile.c: Include <bits/stdio-lock.h>.  Use _IO_lock_unlock
7561         instead of pthread_mutex_unlock.
7563 2002-12-06  Roland McGrath  <roland@redhat.com>
7565         * allocatestack.c (__stack_user): Use uninitialized defn.
7566         * init.c (__pthread_initialize_minimal): Initialize it here.
7568 2002-12-05  Roland McGrath  <roland@redhat.com>
7570         * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
7571         string.
7572         * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
7574         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Add
7575         missing & here too.
7577 2002-12-05  Ulrich Drepper  <drepper@redhat.com>
7579         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
7580         lowlevellock.
7581         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: New file.
7582         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: New file.
7583         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: New file.
7584         * sysdeps/pthread/bits/libc-lock.h: Use lowlevellock implementation
7585         for __libc_lock_* macros.
7586         * Makefile (routines): Add libc-lowlevellock.
7588 2002-10-09  Roland McGrath  <roland@redhat.com>
7590         * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
7591         Under [__PIC__], call the function via the pointer fetched for
7592         comparison rather than a call by name that uses the PLT.
7593         (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
7594         (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
7595         (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
7596         (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
7597         (__libc_key_create, __libc_getspecific, __libc_setspecific): Use it.
7599 2002-12-04  Roland McGrath  <roland@redhat.com>
7601         * forward.c (pthread_self): Use FORWARD3 macro to correct return type.
7603         * sysdeps/i386/td_ta_map_lwp2thr.c: Moved from ../nptl_db.
7604         * sysdeps/generic/td_ta_map_lwp2thr.c: New file.
7606         * pthread_create.c (start_thread): Add missing & on __nptl_last_event.
7608 2002-12-04  Ulrich Drepper  <drepper@redhat.com>
7610         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Make pthread_t
7611         a completely opaque, non-integer type.
7612         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
7614 2002-12-05  Jakub Jelinek  <jakub@redhat.com>
7616         * sysdeps/i386/tls.h: Include stdlib.h.
7617         * sysdeps/x86_64/tls.h: Likewise.
7619 2002-12-04  Ulrich Drepper  <drepper@redhat.com>
7621         * Makefile (tests): Add tst-locale2.
7622         (tests-static): Likewise.
7623         * tst-locale2.c: New file.
7625         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Mark asms as
7626         volatile and add memory clobbers to lock operations.
7628 2002-12-03  Ulrich Drepper  <drepper@redhat.com>
7630         * sysdeps/i386/i686/bits/atomic.h: Use i486 version.
7631         * sysdeps/i386/i486/bits/atomic.h: New file.
7632         * sysdeps/i386/i586/bits/atomic.h: New file.
7633         * sysdeps/i386/i686/pthread_spin_trylock.S: Define HAVE_CMOV and
7634         include i486 version.
7635         * sysdeps/i386/i486/pthread_spin_trylock.S: New file.
7636         * sysdeps/i386/i586/pthread_spin_trylock.S: New file.
7637         Patch by Marijn Ros <marijn@mad.scientist.com>.
7639         * allocatestack.c (get_cached_stack): Don't crash if we first
7640         found a stack with a larger size then needed.
7641         Reported by Hui Huang <hui.huang@sun.com>.
7643         * Makefile (tests): Add tst-sysconf.
7644         * tst-sysconf.c: New file.
7646         * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine
7647         PTHREAD_THREADS_MAX.
7649 2002-12-02  Roland McGrath  <roland@redhat.com>
7651         * pthreadP.h (__stack_user, __nptl_create_event, __nptl_death_event):
7652         Declare using hidden_proto instead of attribute_hidden, so there are
7653         non-.hidden static symbols for gdb to find.
7654         (__pthread_keys): Likewise.
7655         * events.c (__nptl_create_event, __nptl_death_event): Add hidden_def.
7656         * allocatestack.c (__stack_user): Likewise.
7657         * pthread_create.c (__pthread_keys): Likewise.
7658         (__nptl_threads_events, __nptl_last_event): Make these static instead
7659         of hidden.
7660         * pthread_key_create.c (__pthread_pthread_keys_max,
7661         __pthread_pthread_key_2ndlevel_size): Renamed from __linuxthreads_*.
7663 2002-12-02  Ulrich Drepper  <drepper@redhat.com>
7665         * Makefile (tests): Add tst-locale1.  If buid-static is yes link
7666         statically.
7667         * tst-locale1.c: New file.
7669         * pthread_cond_timedwait.c: Include <stdlib.h>.
7671         * Makefile (tests): Add tst-fork2 and tst-fork3.
7672         * tst-fork2.c: New file.
7673         * tst-fork3.c: New file.
7675 2002-11-28  Ulrich Drepper  <drepper@redhat.com>
7677         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
7679         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
7680         require it to 200112L.
7682         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Use cmov
7683         instruction only if HAVE_CMOV is defined.
7684         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Define HAVE_CMOV.
7686         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: New file.
7688         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: New file.
7690         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: New file.
7692         * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: New file.
7694 2002-11-27  Ulrich Drepper  <drepper@redhat.com>
7696         * sysdeps/x86_64/bits/atomic.h: New file.
7698         * sysdeps/i386/i686/bits/atomic.h: Fix asm syntax for 8- and
7699         16-bit operations.
7701         * sysdeps/unix/sysv/linux/raise.c (raise): Use INTERNAL_SYSCALL if
7702         possible since gettid cannot fail.
7704         * sysdeps/x86_64/pthreaddef.h: New file.
7706         * sysdeps/i386/pthreaddef.h (gettid): Removed.
7708         * sysdeps/x86_64/pthread_spin_init.c: New file.
7709         * sysdeps/x86_64/pthread_spin_lock.c: New file.
7710         * sysdeps/x86_64/pthread_spin_trylock.c: New file.
7711         * sysdeps/x86_64/pthread_spin_unlock.c: New file.
7713         * sysdeps/i386/i686/pthread_spin_trylock.S (pthread_spin_trylock):
7714         Add missing lock prefix.  Minute optimization.
7716         * tst-spin2.c (main): Also check successful trylock call.
7718         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use correct
7719         syscall.  Fix typo in case INTERNAL_SYSCALL is not used.
7721         * sysdeps/i386/pthread_spin_destroy.c: Moved to...
7722         * sysdeps/pthread/pthread_spin_destroy.c: ...here.  New file.
7724         * sysdeps/i386/pthread_sigmask.c: Removed.  Use the generic code.
7725         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Return correct
7726         value in case of an error.  Add support for INTERNAL_SYSCALL.
7728         * sysdeps/i386/pthread_sigmask.c (pthread_sigmask): Return correct
7729         value in case of an error.
7731         * sysdeps/x86_64/tls.h: New file.
7733 2002-11-26  Ulrich Drepper  <drepper@redhat.com>
7735         * sysdeps/i386/tls.h (THREAD_GETMEM_NC): Change interface.  It now
7736         takes the array member name and the index as parameters.
7737         (THREAD_SETMEM_NC): Likewise.
7738         * pthread_getspecific.c: Use new THREAD_GETMEM_NC interface.
7739         * pthread_setspecific.c: Use new THREAD_GETMEM_NC and THREAD_SETMEM_NC
7740         interfaces.
7742         * sysdeps/i386/tls.h (THREAD_SETMEM): Use size of member element
7743         to decide which code to use.
7744         (THREAD_SETMEM_NC): Likewise.
7746         * allocatestack.c (queue_stack): Don't remove stack from list here.
7747         Do it in the caller.  Correct condition to prematurely terminate
7748         loop to free stacks.
7749         (__deallocate_stack): Remove stack from list here.
7751 2002-11-26  Ulrich Drepper  <drepper@redhat.com>
7753         * Makefile (tests): Add tst-stack1.
7754         * tst-stack1.c: New file.
7756         * allocatestack.c (allocate_stack): Initialize the TCB on a user
7757         provided stack.
7759         * pthread_attr_getstack.c: Return bottom of the thread area.
7761 2002-11-25  Ulrich Drepper  <drepper@redhat.com>
7763         * Makefile (libpthread-routines): Add pt-allocrtsig and
7764         pthread_kill_other_threads.
7765         * pt-allocrtsig.c: New file.
7766         * pthread_kill_other_threads.c: New file.
7767         * sysdeps/unix/sysv/linux/allocrtsig.c: Add additional aliases for
7768         all three functions.
7769         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
7770         allocrtsig.
7771         * sysdeps/unix/sysv/linux/Versions (libc:GLIBC_PRIVATE): Export
7772         __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
7773         and __libc_allocate_rtsig_private.
7774         * Versions (libpthread): Export pthread_kill_other_threads_np,
7775         __libc_current_sigrtmin, and __libc_current_sigrtmax.
7777 2002-11-24  Ulrich Drepper  <drepper@redhat.com>
7779         * allocatestack.c (allocate_stack): stackaddr in attribute points to
7780         the end of the stack.  Adjust computations.
7781         When mprotect call fails dequeue stack and free it.
7782         * pthread_attr_setstack.c: Store top of the stack in stackaddr
7783         attribute.
7784         * pthread_getattr_np.c: Likewise.
7786         * descr.h (IS_DETACHED): Add some more parenthesis to prevent
7787         surprises.
7789 2002-11-23  Ulrich Drepper  <drepper@redhat.com>
7791         * sysdeps/pthread/pthread.h (pthread_self): __THROW must come before
7792         attribute definitions.  Patch by Luca Barbieri <ldb@ldb.ods.org>.
7794 2002-11-22  Ulrich Drepper  <drepper@redhat.com>
7796         * pthread_getspecific.c: Optimize access to first 2nd-level array.
7797         * pthread_setspecific.c: Likewise.
7799 2002-11-21  Ulrich Drepper  <drepper@redhat.com>
7801         * sysdeps/unix/sysv/linux/i386/createthread.c: Remove CLONE_ flags
7802         definitions.  Get them from the official place.
7803         * sysdeps/unix/sysv/linux/i386/fork.c: Likewise.
7805         * sysdeps/unix/sysv/linux/i386/createthread.c: Update CLONE_* flags.
7806         Use new CLONE_ flags in clone() calls.
7808         * sysdeps/unix/sysv/linux/fork.c: Use ARCH_FORK to actually fork.
7809         * sysdeps/unix/sysv/linux/i386/fork.c: New file.
7811         * Versions: Add pthread_* functions for libc.
7812         * forward.c: New file.
7814         * sysdeps/pthread/Makefile (libpthread-sysdeps_routines): Add
7815         errno-loc.
7816         * herrno.c: New file.
7817         * res.c: New file.
7819         * Makefile (libpthread-routines): Remove sem_post, sem_wait,
7820         sem_trywait, and sem_timedwait.  Add herrno and res.
7821         * sem_init.c: Don't initialize lock and waiters members.
7822         * sem_open.c: Likewise.
7823         * sem_post.c: Removed.
7824         * sem_wait.c: Removed.
7825         * sem_trywait.c: Removed.
7826         * sem_timedwait.c: Removed.
7827         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Complete rewrite.
7828         Includes full implementations of sem_post, sem_wait, sem_trywait,
7829         and sem_timedwait.
7830         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Adjust
7831         for new implementation.
7832         * sysdeps/unix/sysv/linux/internaltypes.h (struct sem): Remove lock
7833         and waiters fields.
7835         * tst-sem3.c: Improve error message.
7836         * tst-signal3.c: Likewise.
7838         * init.c (__pthread_initialize_minimal): Use set_tid_address syscall
7839         to tell the kernel about the termination futex and to initialize tid
7840         member.  Don't initialize main_thread.
7841         * descr.h (struct pthread): Remove main_thread member.
7842         * cancelllation.c (__do_cancel): Remove code handling main thread.
7843         The main thread is not special anymore.
7845         * allocatestack.c (__reclaim_stacks): Mark stacks as unused.  Add
7846         size of the stacks to stack_cache_actsize.
7848         * pt-readv.c: Add missing "defined".
7849         * pt-sigwait.c: Likewise.
7850         * pt-writev.c: Likewise.
7852 2002-11-09  Ulrich Drepper  <drepper@redhat.com>
7854         * Versions: Export __connect from libpthread.
7855         Patch by Luca Barbieri <ldb@ldb.ods.org>.
7857         * Makefile (libpthread-routines): Add pt-raise.
7858         * sysdeps/unix/sysv/linux/raise.c: New file.
7859         * sysdeps/unix/sysv/linux/pt-raise.c: New file.
7860         * sysdeps/generic/pt-raise.c: New file.
7862         * pthread_cond_init.c: Initialize all data elements of the condvar
7863         structure.  Patch by Luca Barbieri <ldb@ldb.ods.org>.
7865         * pthread_attr_init.c: Actually implement 2.0 compatibility version.
7866         * pthread_create.c: Likewise.
7868         * Makefile (tests): Add tst-key1, tst-key2, tst-key3.
7869         * tst-key1.c: New file.
7870         * tst-key2.c: New file.
7871         * tst-key3.c: New file.
7873         * Versions: Export pthread_detach for version GLIBC_2.0.
7874         Reported by Saurabh Desai <sdesai@austin.ibm.com>.
7876 2002-11-08  Ulrich Drepper  <drepper@redhat.com>
7878         * pthread_key_create.c: Terminate search after an unused key was found.
7879         Patch by Luca Barbieri <ldb@ldb.ods.org>.
7881         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Return zero.
7882         Patch by Luca Barbieri <ldb@ldb.ods.org>.
7884 2002-10-10  Ulrich Drepper  <drepper@redhat.com>
7886         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Use slow generic
7887         dynamic lookup for errno in PIC.
7889         * allocatestack.c (get_cached_stack): Rearrange code slightly to
7890         release the stack lock as soon as possible.
7891         Call _dl_allocate_tls_init for TCB from the cache to re-initialize
7892         the static TLS block.
7893         (allocate_stack): Call _dl_allocate_tls_init for user-provided stack.
7895         * cancellation.c: Renamed from cancelation.c.
7896         * Makefile: Adjust accordingly.
7897         * pthreadP.h (CANCELLATION_P): Renamed from CANCELATION_P.
7898         * cleanup_defer.c: Use CANCELLATION_P.
7899         * pthread_testcancel.c: Likewise.
7900         * descr.h: Fix spelling in comments.
7901         * init.c: Likewise.
7902         * pthread_getattr_np.c: Likewise.
7903         * pthread_getschedparam.c: Likewise.
7904         * pthread_setschedparam.c: Likewise.
7905         * Versions: Likewise.
7907         * pt-pselect.c: New file.
7908         * Makefile (libpthread-routines): Add pt-pselect.
7909         * Versions: Add pselect.
7911         * tst-cancel4.c: New file.
7912         * Makefile (tests): Add tst-cancel4.
7914 2002-10-09  Ulrich Drepper  <drepper@redhat.com>
7916         * pthread_mutex_lock.c: Always record lock ownership.
7917         * pthread_mutex_timedlock.c: Likewise.
7918         * pthread_mutex_trylock.c: Likewise.
7920         * pt-readv.c: New file.
7921         * pt-writev.c: New file.
7922         * pt-creat.c: New file.
7923         * pt-msgrcv.c: New file.
7924         * pt-msgsnd.c: New file.
7925         * pt-poll.c: New file.
7926         * pt-select.c: New file.
7927         * pt-sigpause.c: New file.
7928         * pt-sigsuspend.c: New file.
7929         * pt-sigwait.c: New file.
7930         * pt-sigwaitinfo.c: New file.
7931         * pt-waitid.c: New file.
7932         * Makefile (libpthread-routines): Add pt-readv, pt-writev, pt-creat,
7933         pt-msgrcv, pt-msgsnd, pt-poll, pt-select, pt-sigpause, pt-sigsuspend,
7934         pt-sigwait, pt-sigwaitinfo, and pt-waitid.
7935         * Versions: Add all the new functions.
7937         * tst-exit1.c: New file.
7938         * Makefile (tests): Add tst-exit1.
7940         * sem_timedwait.c: Minor optimization for more optimal fastpath.
7942 2002-10-08  Ulrich Drepper  <drepper@redhat.com>
7944         * pt-fcntl.c: Only enable asynchronous cancellation for F_SETLKW.
7946         * pthread_join.c: Enable asynchronous cancellation around lll_wait_tid
7947         call.  pthread_join is an official cancellation point.
7948         * pthread_timedjoin.c: Likewise.
7950         * pthread_cond_wait.c: Revert order in which internal lock are dropped
7951         and the condvar's mutex are retrieved.
7952         * pthread_cond_timedwait.c: Likewise.
7953         Reported by dice@saros.East.Sun.COM.
7955 2002-10-07  Ulrich Drepper  <drepper@redhat.com>
7957         * pthreadP.h: Cut out all type definitions and move them...
7958         * sysdeps/unix/sysv/linux/internaltypes.h: ...here.  New file.
7959         * pthreadP.h: Include <internaltypes.h>.
7961         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Little
7962         performance tweaks.
7964         * sem_trywait.c: Shuffle #includes around to get right order.
7965         * sem_timedwait.c: Likewise.
7966         * sem_post.c: Likewise.
7967         * sem_wait.c: Likewise.
7969         * nptl 0.3 released.
7971         * Makefile (tests): Add tst-signal3.
7972         * tst-signal3.c: New file.
7974 2002-10-05  Ulrich Drepper  <drepper@redhat.com>
7976         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Tell the compiler that
7977         the asms modify the sem object.
7978         (__lll_sem_timedwait): Now takes struct sem* as first parameter.
7980         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h (sem_t): Don't expose
7981         the actual members.
7982         * pthreadP.h (struct sem): New type.  Actual semaphore type.
7983         * semaphoreP.h: Include pthreadP.h.
7984         * sem_getvalue.c: Adjust to sem_t change.
7985         * sem_init.c: Likewise.
7986         * sem_open.c: Likewise.
7987         * sem_post.c: Likewise.
7988         * sem_timedwait.c: Likewise.
7989         * sem_trywait.c: Likewise.
7990         * sem_wait.c: Likewise.
7992 2002-10-04  Ulrich Drepper  <drepper@redhat.com>
7994         * Makefile (tests): Add tst-basic2, tst-exec1, tst-exec3, tst-exec3.
7995         * tst-basic2.c: New file.
7996         * tst-exec1.c: New file.
7997         * tst-exec2.c: New file.
7998         * tst-exec3.c: New file.
8000         * tst-fork1.c: Remove extra */.
8002         * nptl 0.2 released.  The API for IA-32 is complete.