Updated to fedora-glibc-20060630T0858
[glibc/history.git] / nptl / ChangeLog
blob985c92d4e1bd327b1f722a42b1fecd0cc6d2bfd8
1 2006-06-04  Ulrich Drepper  <drepper@redhat.com>
3         * sysdeps/pthread/pthread.h: Add pthread_equal inline version.
5 2006-05-15  Ulrich Drepper  <drepper@redhat.com>
7         * sysdeps/unix/sysv/linux/fork.h: Mark __fork_handlers as hidden.
9 2006-05-11  Ulrich Drepper  <drepper@redhat.com>
11         * pthread_key_create.c (__pthread_key_create): Do away with
12         __pthread_keys_lock.
14         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
15         (__kernel_cpumask_size): Mark as hidden.
16         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
18         * sem_open.c (__sem_mappings_lock): Mark as hidden.
19         * semaphoreP.h (__sem_mappings_lock): Likewise.
21 2006-05-10  Ulrich Drepper  <drepper@redhat.com>
23         * pthread_atfork.c: Mark __dso_handle as hidden.
25 2006-05-09  Ulrich Drepper  <drepper@redhat.com>
27         [BZ #2644]
28         * sysdeps/pthread/unwind-forcedunwind.c: Different solution for
29         the reload problem.  Change the one path in pthread_cancel_init
30         which causes the problem.  Force gcc to reload.  Simplify callers.
31         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c
32         (_Unwind_GetBSP): Undo last patch.
34 2006-05-07  Ulrich Drepper  <drepper@redhat.com>
36         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: Make sure the
37         function pointer is reloaded after pthread_cancel_init calls.
39         [BZ #2644]
40         * sysdeps/pthread/unwind-forcedunwind.c: Make sure functions
41         pointers are reloaded after pthread_cancel_init calls.
43 2006-05-01  Ulrich Drepper  <drepper@redhat.com>
45         * sysdeps/pthread/allocalim.h (__libc_use_alloca): Mark with
46         __always_inline.
48 2006-04-27  Ulrich Drepper  <drepper@redhat.com>
50         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
51         Allocate new object which is passed to timer_sigev_thread so that
52         the timer can be deleted before the new thread is scheduled.
54 2006-04-26  Roland McGrath  <roland@redhat.com>
56         * sysdeps/x86_64/tls.h: Include <asm/prctl.h> inside [! __ASSEMBLER__].
58 2006-04-08  Ulrich Drepper  <drepper@redhat.com>
60         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove branch predicion
61         suffix for conditional jumps.
62         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
63         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
64         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
65         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
66         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
67         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
69         * init.c (sigcancel_handler): Compare with correct PID even if the
70         thread is in the middle of a fork call.
71         (sighandler_setxid): Likewise.
72         Reported by Suzuki K P <suzuki@in.ibm.com> .
74 2006-04-07  Jakub Jelinek  <jakub@redhat.com>
76         * pthreadP.h (FUTEX_TID_MASK): Sync with kernel.
78 2006-04-06  Ulrich Drepper  <drepper@redhat.com>
80         * pthread_getattr_np.c (pthread_getattr_np): Close fp if getrlimit
81         fails [Coverity CID 105].
83 2006-04-05  Ulrich Drepper  <drepper@redhat.com>
85         * sysdeps/pthread/pthread.h: Add nonnull attributes.
87 2006-04-03  Steven Munroe  <sjmunroe@us.ibm.com>
89         [BZ #2505]
90         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h [_ARCH_PWR4]:
91         Define __lll_rel_instr using lwsync.
93 2006-03-27  Ulrich Drepper  <drepper@redhat.com>
95         * allocatestack.c (allocate_stack): Always initialize robust_head.
96         * descr.h: Define struct robust_list_head.
97         (struct pthread): Use robust_list_head in robust mutex list definition.
98         Adjust ENQUEUE_MUTEX and DEQUEUE_MUTEX.
99         * init.c [!__ASSUME_SET_ROBUST_LIST] (__set_robust_list_avail): Define.
100         (__pthread_initialize_minimal_internal): Register robust_list with
101         the kernel.
102         * pthreadP.h: Remove PRIVATE_ from PTHREAD_MUTEX_ROBUST_* names.
103         Declare __set_robust_list_avail.
104         * pthread_create.c (start_thread): Register robust_list of new thread.
105         [!__ASSUME_SET_ROBUST_LIST]: If robust_list is not empty wake up
106         waiters.
107         * pthread_mutex_destroy.c: For robust mutexes don't look at the
108         number of users, it's unreliable.
109         * pthread_mutex_init.c: Allow use of pshared robust mutexes if
110         set_robust_list syscall is available.
111         * pthread_mutex_consistent.c: Adjust for PTHREAD_MUTEX_ROBUST_* rename.
112         * pthread_mutex_lock.c: Simplify robust mutex code a bit.
113         Set robust_head.list_op_pending before trying to lock a robust mutex.
114         * pthread_mutex_timedlock.c: Likewise.
115         * pthread_mutex_trylock.c: Likewise.
116         * pthread_mutex_unlock.c: Likewise for unlocking.
117         * Makefile (tests): Add tst-robust8.
118         * tst-robust8.c: New file.
120 2006-03-08  Andreas Schwab  <schwab@suse.de>
122         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h
123         (DL_SYSINFO_IMPLEMENTATION): Add missing newline.
125 2006-03-05  Roland McGrath  <roland@redhat.com>
127         * configure (libc_add_on): Disable add-on when $add_ons_automatic = yes
128         and $config_os doesn't match *linux*.
130 2006-03-05  David S. Miller  <davem@sunset.davemloft.net>
132         * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S:
133         Use __syscall_error.
134         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
135         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: Likewise.
136         * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: Likewise.
137         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
138         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: Likewise.
139         * sysdeps/unix/sysv/linux/sparc/Makefile: New file.
141 2006-03-02  Ulrich Drepper  <drepper@redhat.com>
143         * sysdeps/unix/sysv/linux/aio_misc.h: Various cleanups.
145 2006-03-01  Ulrich Drepper  <drepper@redhat.com>
147         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
148         (__lll_robust_lock_wait): Also set FUTEX_WAITERS bit if we got the
149         mutex.
150         (__lll_robust_timedlock_wait): Likewise.
151         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S
152         (__lll_robust_lock_wait): Likewise.
153         (__lll_robust_timedlock_wait): Likewise.
154         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
155         (__lll_robust_lock_wait): Likewise.
156         (__lll_robust_timedlock_wait): Likewise.
158 2006-03-01  Jakub Jelinek  <jakub@redhat.com>
160         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_robust_mutex_dead,
161         lll_robust_mutex_trylock, lll_robust_mutex_lock,
162         lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
163         lll_robust_mutex_unlock): Define.
164         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
166 2006-02-28  H.J. Lu  <hongjiu.lu@intel.com>
168         * sysdeps/unix/sysv/linux/ia64/clone2.S: Include <clone2.S>
169         instead of <clone.S>.
171 2006-02-27  Jakub Jelinek  <jakub@redhat.com>
173         * Makefile (libpthread-routines): Add
174         pthread_mutexattr_[sg]etprotocol, pthread_mutexattr_[sg]etprioceiling
175         and pthread_mutex_[sg]etprioceiling.
176         * Versions (GLIBC_2.4): Export pthread_mutexattr_getprotocol,
177         pthread_mutexattr_setprotocol, pthread_mutexattr_getprioceiling,
178         pthread_mutexattr_setprioceiling, pthread_mutex_getprioceiling and
179         pthread_mutex_setprioceiling.
180         * sysdeps/pthread/pthread.h (PTHREAD_PRIO_NONE, PTHREAD_PRIO_INHERIT,
181         PTHREAD_PRIO_PROTECT): New enum values.
182         (pthread_mutexattr_getprotocol, pthread_mutexattr_setprotocol,
183         pthread_mutexattr_getprioceiling, pthread_mutexattr_setprioceiling,
184         pthread_mutex_getprioceiling, pthread_mutex_setprioceiling): New
185         prototypes.
186         * pthreadP.h (PTHREAD_MUTEX_PRIO_INHERIT_PRIVATE_NP,
187         PTHREAD_MUTEX_PRIO_PROTECT_PRIVATE_NP): New enum values.
188         (PTHREAD_MUTEX_PRIO_CEILING_SHIFT, PTHREAD_MUTEX_PRIO_CEILING_MASK):
189         Define.
190         (PTHREAD_MUTEXATTR_PROTOCOL_SHIFT, PTHREAD_MUTEXATTR_PROTOCOL_MASK,
191         PTHREAD_MUTEXATTR_PRIO_CEILING_SHIFT,
192         PTHREAD_MUTEXATTR_PRIO_CEILING_MASK): Define.
193         (PTHREAD_MUTEXATTR_FLAG_BITS): Or in PTHREAD_MUTEXATTR_PROTOCOL_MASK
194         and PTHREAD_MUTEXATTR_PRIO_CEILING_MASK.
195         * pthread_mutex_init.c (__pthread_mutex_init): For the time being
196         return ENOTSUP for PTHREAD_PRIO_INHERIT or PTHREAD_PRIO_PROTECT
197         protocol mutexes.
198         * pthread_mutex_getprioceiling.c: New file.
199         * pthread_mutex_setprioceiling.c: New file.
200         * pthread_mutexattr_getprioceiling.c: New file.
201         * pthread_mutexattr_setprioceiling.c: New file.
202         * pthread_mutexattr_getprotocol.c: New file.
203         * pthread_mutexattr_setprotocol.c: New file.
205 2006-02-27  Daniel Jacobowitz  <dan@codesourcery.com>
207         * sysdeps/unix/sysv/linux/aio_misc.h: Include <limits.h>.
209 2006-02-27  Roland McGrath  <roland@redhat.com>
211         * sysdeps/pthread/Subdirs: List nptl here too.
212         * configure (libc_add_on_canonical): New variable.
214         * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: Use #include_next.
216         * sysdeps/unix/sysv/linux/sleep.c: Use #include_next after #include of
217         self to get main source tree's file.
218         * sysdeps/unix/sysv/linux/alpha/clone.S: Likewise.
219         * sysdeps/unix/sysv/linux/i386/clone.S: Likewise.
220         * sysdeps/unix/sysv/linux/i386/vfork.S: Likewise.
221         * sysdeps/unix/sysv/linux/ia64/clone2.S: Likewise.
222         * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: Likewise.
223         * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: Likewise.
224         * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: Likewise.
225         * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: Likewise.
226         * sysdeps/unix/sysv/linux/sh/clone.S: Likewise.
227         * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: Likewise.
228         * sysdeps/unix/sysv/linux/sparc/sparc64/clone.S: Likewise.
229         * sysdeps/unix/sysv/linux/x86_64/clone.S: Likewise.
230         * sysdeps/unix/sysv/linux/x86_64/vfork.S: Likewise.
232         * Makefile: Use $(sysdirs) in vpath directive.
234         * sysdeps/pthread/Makefile (CFLAGS-libc-start.c): Variable removed.
235         (CPPFLAGS-timer_routines.c): Likewise.
237         * Makeconfig (includes): Variable removed.
239 2006-02-26  Roland McGrath  <roland@redhat.com>
241         * sysdeps/generic/pt-raise.c: Moved to ...
242         * pt-raise.c: ... here.
243         * sysdeps/generic/lowlevellock.h: Moved to ...
244         * lowlevellock.h: ... here.
246 2006-02-23  Roland McGrath  <roland@redhat.com>
248         * descr.h (struct pthread): Add final member `end_padding'.
249         (PTHREAD_STRUCT_END_PADDING): Use it.
251 2006-02-20  Roland McGrath  <roland@redhat.com>
253         * sysdeps/mips: Directory removed, saved in ports repository.
254         * sysdeps/unix/sysv/linux/mips: Likewise.
256 2006-02-18  Ulrich Drepper  <drepper@redhat.com>
258         * tst-robust1.c: Add second mutex to check that the mutex list is
259         handled correctly.
261 2006-02-17  Jakub Jelinek  <jakub@redhat.com>
263         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_mutex_dead,
264         lll_robust_mutex_trylock, lll_robust_mutex_lock,
265         lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
266         lll_robust_mutex_unlock): New macros.
267         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
268         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
269         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
270         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
271         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: New file.
273 2006-02-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
275         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Add lll_robust_mutex_*
276         definitions.
277         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: New file.
279 2006-02-17  Ulrich Drepper  <drepper@redhat.com>
281         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
282         (lll_robust_mutex_unlock): Avoid unnecessary wakeups.
283         * sysdeps/unix/sysv/linux/i386/lowlevellock.h
284         (lll_robust_mutex_unlock): Likewise.
286 2006-02-13  Jakub Jelinek  <jakub@redhat.com>
288         * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX):
289         Set robust_list.__next rather than robust_list.
290         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
291         (__pthread_list_t): New typedef.
292         (pthread_mutex_t): Replace __next and __prev fields with __list.
293         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
294         (__pthread_list_t): New typedef.
295         (pthread_mutex_t): Replace __next and __prev fields with __list.
296         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
297         (__pthread_list_t, __pthread_slist_t): New typedefs.
298         (pthread_mutex_t): Replace __next and __prev fields with __list.
299         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
300         (__pthread_list_t, __pthread_slist_t): New typedefs.
301         (pthread_mutex_t): Replace __next and __prev fields with __list.
302         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
303         (__pthread_list_t, __pthread_slist_t): New typedefs.
304         (pthread_mutex_t): Replace __next and __prev fields with __list.
305         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h
306         (__pthread_slist_t): New typedef.
307         (pthread_mutex_t): Replace __next field with __list.
309 2006-02-15  Ulrich Drepper  <drepper@redhat.com>
311         * pthreadP.h: Define PTHREAD_MUTEX_INCONSISTENT instead of
312         PTHREAD_MUTEX_OWNERDEAD.
313         (PTHREAD_MUTEX_ROBUST_PRIVATE_NP): Define as 16, not 256.
314         Define FUTEX_WAITERS, FUTEX_OWNER_DIED, FUTEX_TID_MASK.
315         * Makefile (libpthread-routines): Add lowlevelrobustlock.
316         * pthread_create.c (start_thread): Very much simplify robust_list loop.
317         * pthread_mutex_consistent.c: Inconsistent mutex have __owner now set
318         to PTHREAD_MUTEX_INCONSISTENT.
319         * pthread_mutex_destroy.c: Allow destroying of inconsistent mutexes.
320         * pthread_mutex_lock.c: Reimplement robust mutex handling.
321         * pthread_mutex_trylock.c: Likewise.
322         * pthread_mutex_timedlock.c: Likewise.
323         * pthread_mutex_unlock.c: Likewise.
324         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
325         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
326         lowlevelrobustlock.sym.
327         * sysdeps/unix/sysv/linux/lowlevelrobustlock.sym: New file.
328         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add lll_robust_mutex_*
329         definitions.
330         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
331         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: New file.
332         * sysdeps/unix/sysv/linux/i386/i586/lowlevelrobustlock.S: New file.
333         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrobustlock.S: New file.
334         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: New file.
336 2006-02-12  Ulrich Drepper  <drepper@redhat.com>
338         * allocatestack.c (allocate_stack): Initialize robust_list.
339         * init.c (__pthread_initialize_minimal_internal): Likewise.
340         * descr.h (struct xid_command): Pretty printing.
341         (struct pthread): Use __pthread_list_t or __pthread_slist_t for
342         robust_list.  Adjust macros.
343         * pthread_create.c (start_thread): Adjust robust_list handling.
344         * phtread_mutex_unlock.c: Don't allow unlocking from any thread
345         but the owner for all robust mutex types.
346         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
347         __pthread_list_t and __pthread_slist_t.  Use them in pthread_mutex_t.
348         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
349         * sysdeps/pthread/pthread.h: Adjust mutex initializers.
351         * sysdeps/unix/sysv/linux/i386/not-cancel.h: Define openat_not_cancel,
352         openat_not_cancel_3, openat64_not_cancel, and openat64_not_cancel_3.
354 2006-02-08  Jakub Jelinek  <jakub@redhat.com>
356         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait,
357         lll_futex_timedwait, lll_wait_tid): Add "memory" clobber.
359 2006-01-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
361         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_futex_wait):
362         Return status.
363         (lll_futex_timed_wait): Define.
365 2006-01-19  Ulrich Drepper  <drepper@redhat.com>
367         * tst-cancel4.c: Test ppoll.
369 2006-01-18  Andreas Jaeger  <aj@suse.de>
371         [BZ #2167]
372         * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h
373         (pthread_mutex_t): Follow changes for other archs.  Based on patch
374         by Jim Gifford <patches@jg555.com>.
376 2006-01-13  Richard Henderson  <rth@redhat.com>
378         * sysdeps/alpha/tls.h (tcbhead_t): Rename member to __private.
380 2006-01-10  Roland McGrath  <roland@redhat.com>
382         * sysdeps/alpha/jmpbuf-unwind.h: File moved to main source tree.
383         * sysdeps/i386/jmpbuf-unwind.h: Likewise.
384         * sysdeps/mips/jmpbuf-unwind.h: Likewise.
385         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
386         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
387         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
388         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
389         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
390         * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
391         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
393 2006-01-09  Roland McGrath  <roland@redhat.com>
395         * tst-initializers1-c89.c: New file.
396         * tst-initializers1-c99.c: New file.
397         * tst-initializers1-gnu89.c: New file.
398         * tst-initializers1-gnu99.c: New file.
399         * Makefile (tests): Add them.
400         (CFLAGS-tst-initializers1-c89.c): New variable.
401         (CFLAGS-tst-initializers1-c99.c): New variable.
402         (CFLAGS-tst-initializers1-gnu89.c): New variable.
403         (CFLAGS-tst-initializers1-gnu99.c): New variable.
405         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
406         Use __extension__ on anonymous union definition.
407         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
408         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
409         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
410         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
411         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
413 2006-01-08  Jakub Jelinek  <jakub@redhat.com>
415         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
416         Don't give the union a name because it changes the mangled name.
417         Instead name the struct for __data.
418         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_mutex_t):
419         Likewise.
420         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_mutex_t):
421         Likewise.
423 2006-01-09  Jakub Jelinek  <jakub@redhat.com>
425         * sysdeps/sparc/sparc64/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Add
426         stack bias to mc_ftp field.
428 2006-01-07  Ulrich Drepper  <drepper@redhat.com>
430         * sysdeps/pthread/aio_misc.h (AIO_MISC_WAIT): Work around gcc
431         being too clever and reloading the futex value where it shouldn't.
433 2006-01-06  Ulrich Drepper  <drepper@redhat.com>
435         * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX): Use
436         correct type.
438 2006-01-06  Jakub Jelinek  <jakub@redhat.com>
440         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
441         Add cfi directives.
443 2006-01-06  Ulrich Drepper  <drepper@redhat.com>
445         * sysdeps/ia64/tls.h (tcbhead_t): Rename private member to __private.
446         * sysdeps/ia64/tcb-offsets.sym: Adjust for private->__private
447         rename in tcbhead_t.
449         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
450         Don't give the union a name because it changes the mangled name.
451         Instead name the struct for __data.
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/x86_64/bits/pthreadtypes.h: Likewise.
456         * pthread_create.c (start_thread): Adjust robust mutex free loop.
457         * descr.h (ENQUEUE_MUTEX, DEQUEUE_MUTEX): Adjust.
459 2006-01-05  Ulrich Drepper  <drepper@redhat.com>
461         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
462         Return status.
463         (lll_futex_timed_wait): Define.
464         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
465         * sysdeps/pthread/aio_misc.h: New file.
467 2006-01-03  Joseph S. Myers  <joseph@codesourcery.com>
469         * Makefile ($(objpfx)$(multidir)): Use mkdir -p.
471 2006-01-03  Steven Munroe  <sjmunroe@us.ibm.com>
473         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
474         (PSEUDO): Remove redundant cfi_startproc and cfi_endproc directives.
475         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
477 2006-01-04  Ulrich Drepper  <drepper@redhat.com>
479         * tst-cancel24.cc: Use C headers instead of C++ headers.
481 2006-01-03  Jakub Jelinek  <jakub@redhat.com>
483         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Remove #error for
484         sparc-linux configured glibc.
485         (lll_futex_wake_unlock): Define to 1 for sparc-linux configured glibc.
486         (__lll_mutex_trylock, __lll_mutex_cond_trylock, __lll_mutex_lock,
487         __lll_mutex_cond_lock, __lll_mutex_timedlock): Use
488         atomic_compare_and_exchange_val_24_acq instead of
489         atomic_compare_and_exchange_val_acq.
490         (lll_mutex_unlock, lll_mutex_unlock_force): Use atomic_exchange_24_rel
491         instead of atomic_exchange_rel.
492         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: New file.
493         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c: New
494         file.
495         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c: New
496         file.
497         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: New file.
498         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: New file.
499         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: New file.
500         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c: New file.
501         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: New file.
502         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
503         New file.
504         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
505         New file.
506         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: New file.
507         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: New file.
508         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c: New
509         file.
510         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_trywait.c: New
511         file.
512         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: New file.
514 2006-01-03  Ulrich Drepper  <drepper@redhat.com>
516         * sysdeps/pthread/pthread.h [__WORDSIZE==64]: Don't use cast in
517         mutex initializers.
519 2006-01-02  Jakub Jelinek  <jakub@redhat.com>
521         * sysdeps/sparc/tls.h (tcbhead_t): Add pointer_guard field.
522         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
523         THREAD_COPY_POINTER_GUARD): Define.
524         * sysdeps/sparc/tcb-offsets.sym (POINTER_GUARD): Define.
525         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Revert 2005-12-27 changes.
527 2006-01-01  Ulrich Drepper  <drepper@redhat.com>
529         * version.c: Update copyright year.
531 2005-12-29  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
533         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Remove explicit
534         .eh_frame section, use cfi_* directives.
535         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Add cfi instrumentation.
537 2005-12-30  Ulrich Drepper  <drepper@redhat.com>
539         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Undo last change for
540         now.
542 2005-12-29  Ulrich Drepper  <drepper@redhat.com>
544         * sysdeps/pthread/sigaction.c: Removed.
545         * sigaction.c: New file.
546         * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-sigaction.c.
548 2005-12-28  Ulrich Drepper  <drepper@redhat.com>
550         * Makefile (tests): Add tst-signal7.
551         * tst-signal7.c: New file.
553 2005-12-27  Roland McGrath  <roland@redhat.com>
555         * sysdeps/x86_64/jmpbuf-unwind.h (_jmpbuf_sp): New inline function.
556         (_JMPBUF_UNWINDS_ADJ): Use it, to PTR_DEMANGLE before comparison.
557         * sysdeps/alpha/jmpbuf-unwind.h: Likewise.
558         * sysdeps/i386/jmpbuf-unwind.h: Likewise.
559         * sysdeps/mips/jmpbuf-unwind.h: Likewise.
560         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
561         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
562         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
563         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
564         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
565         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
567 2005-12-27  Jakub Jelinek  <jakub@redhat.com>
569         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Add __next
570         and __prev field to pthread_mutex_t.
571         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
572         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
573         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
574         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
575         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Add __next field
576         to pthread_mutex_t.
578 2005-12-26  Ulrich Drepper  <drepper@redhat.com>
580         * pthreadP.h: Define PTHREAD_MUTEX_ROBUST_PRIVATE_NP,
581         PTHREAD_MUTEX_ROBUST_PRIVATE_RECURSIVE_NP,
582         PTHREAD_MUTEX_ROBUST_PRIVATE_ERRORCHECK_NP,
583         PTHREAD_MUTEX_ROBUST_PRIVATE_ADAPTIVE_NP,
584         PTHREAD_MUTEXATTR_FLAG_ROBUST, PTHREAD_MUTEXATTR_FLAG_PSHARED,
585         and PTHREAD_MUTEXATTR_FLAG_BITS.
586         * descr.h (struct pthread): Add robust_list field and define
587         ENQUEUE_MUTEX and DEQUEUE_MUTEX macros.
588         * pthread_mutexattr_getrobust.c: New file.
589         * pthread_mutexattr_setrobust.c: New file.
590         * pthread_mutex_consistent.c: New file.
591         * sysdeps/pthread/pthread.h: Declare pthread_mutexattr_getrobust,
592         pthread_mutexattr_setrobust, and pthread_mutex_consistent.
593         Define PTHREAD_MUTEX_STALLED_NP and PTHREAD_MUTEX_ROBUST_NP.
594         Adjust pthread_mutex_t initializers.
595         * nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Add __next
596         field to pthread_mutex_t.
597         * nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Add __next
598         and __prev field to pthread_mutex_t.
599         * Versions [GLIBC_2.4]: Export pthread_mutexattr_getrobust_np,
600         pthread_mutexattr_setrobust_np, and pthread_mutex_consistent_np.
601         * pthread_mutexattr_getpshared.c: Use PTHREAD_MUTEXATTR_FLAG_PSHARED
602         and PTHREAD_MUTEXATTR_FLAG_BITS macros instead of magic numbers.
603         * pthread_mutexattr_gettype.c: Likewise.
604         * pthread_mutexattr_setpshared.c: Likewise.
605         * pthread_mutexattr_settype.c: Likewise.
606         * pthread_mutex_init.c: Reject robust+pshared attribute for now.
607         Initialize mutex kind according to robust flag.
608         * pthread_mutex_lock.c: Implement local robust mutex.
609         * pthread_mutex_timedlock.c: Likewise.
610         * pthread_mutex_trylock.c: Likewise.
611         * pthread_mutex_unlock.c: Likewise.
612         * pthread_create.c (start_thread): Mark robust mutexes which remained
613         locked as dead.
614         * tst-robust1.c: New file.
615         * tst-robust2.c: New file.
616         * tst-robust3.c: New file.
617         * tst-robust4.c: New file.
618         * tst-robust5.c: New file.
619         * tst-robust6.c: New file.
620         * tst-robust7.c: New file.
621         * Makefile (libpthread-routines): Add pthread_mutexattr_getrobust,
622         pthread_mutexattr_setrobust, and pthread_mutex_consistent.
623         (tests): Add tst-robust1, tst-robust2, tst-robust3, tst-robust4,
624         tst-robust5, tst-robust6, and tst-robust7.
626         * tst-typesizes.c: New file.
627         * Makefile (tests): Add tst-typesizes.
629         * tst-once3.c: More debug output.
631 2005-12-24  Ulrich Drepper  <drepper@redhat.com>
633         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Add break
634         missing after last change.
636         * version.c: Update copyright year.
638 2005-12-23  Ulrich Drepper  <drepper@redhat.com>
640         * pthread_mutex_destroy.c: Set mutex type to an invalid value.
641         * pthread_mutex_lock.c: Return EINVAL for invalid mutex type.
642         * pthread_mutex_trylock.c: Likewise.
643         * pthread_mutex_timedlock.c: Likewise.
644         * pthread_mutex_unlock.c: Likewise.
646 2005-12-22  Roland McGrath  <roland@redhat.com>
648         * sysdeps/pthread/sigaction.c: Use "" instead of <> to include self,
649         so that #include_next's search location is not reset to the -I..
650         directory where <nptl/...> can be found.
652 2005-12-22  Ulrich Drepper  <drepper@redhat.com>
654         [BZ #1913]
655         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
656         Fix unwind info.  Remove useless branch prediction prefix.
657         * tst-cancel24.cc: New file.
658         * Makefile: Add rules to build and run tst-cancel24.
660 2005-12-21  Roland McGrath  <roland@redhat.com>
662         * libc-cancellation.c: Use <> rather than "" #includes.
663         * pt-cleanup.c: Likewise.
664         * pthread_create.c: Likewise.
665         * pthread_join.c: Likewise.
666         * pthread_timedjoin.c: Likewise.
667         * pthread_tryjoin.c: Likewise.
668         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Likewise.
669         * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
670         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
671         * unwind.c: Likewise.
673 2005-12-19  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
675         * sysdeps/sh/tcb-offsets.sym: Add POINTER_GUARD.
676         * sysdeps/sh/tls.h (tcbhead_t): Remove private and add pointer_guard.
677         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
678         THREAD_COPY_POINTER_GUARD): Define.
680 2005-12-19  Jakub Jelinek  <jakub@redhat.com>
682         * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): Make room for 2 uintptr_t's
683         rather than one.
684         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
685         THREAD_COPY_POINTER_GUARD): Define.
686         * sysdeps/powerpc/tcb-offsets.sym (POINTER_GUARD): Add.
687         * sysdeps/powerpc/tls.h (tcbhead_t): Add pointer_guard field.
688         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
689         THREAD_COPY_POINTER_GUARD): Define.
690         * sysdeps/s390/tcb-offsets.sym (STACK_GUARD): Add.
691         * sysdeps/s390/tls.h (THREAD_GET_POINTER_GUARD,
692         THREAD_SET_POINTER_GUARD, THREAD_COPY_POINTER_GUARD): Define.
693         * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S (__ia64_longjmp):
694         Use PTR_DEMANGLE for B0 if defined.
696 2005-12-17  Ulrich Drepper  <drepper@redhat.com>
698         * pthread_create.c (__pthread_create_2_1): Use
699         THREAD_COPY_POINTER_GUARD if available.
700         * sysdeps/i386/tcb-offsets.sym: Add POINTER_GUARD.
701         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
702         * sysdeps/i386/tls.h (tcbhead_t): Add pointer_guard.
703         Define THREAD_SET_POINTER_GUARD and THREAD_COPY_POINTER_GUARD.
704         * sysdeps/x86_64/tls.h: Likewise.
706 2005-12-15  Roland McGrath  <roland@redhat.com>
708         * sysdeps/unix/sysv/linux/mq_notify.c: Don't use sysdeps/generic.
710 2005-12-13  Ulrich Drepper  <drepper@redhat.com>
712         * sysdeps/pthread/sigfillset.c: Adjust for files moved out of
713         sysdeps/generic.
714         * errno-loc.c: New file.
716 2005-12-12  Roland McGrath  <roland@redhat.com>
718         * init.c (__pthread_initialize_minimal_internal): Do __static_tls_size
719         adjustments before choosing stack size.  Update minimum stack size
720         calculation to match allocate_stack change.
722 2005-12-12  Ulrich Drepper  <drepper@redhat.com>
724         * allocatestack.c (allocate_stack): Don't demand that there is an
725         additional full page available on the stack beside guard, TLS, the
726         minimum stack.
728 2005-11-24  Ulrich Drepper  <drepper@redhat.com>
730         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
731         (__cleanup_fct_attribute): Use __regparm__ not regparm.
733         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: When
734         compiling 32-bit code we must define __cleanup_fct_attribute.
736 005-11-24  Jakub Jelinek  <jakub@redhat.com>
738         [BZ #1920]
739         * sysdeps/pthread/pthread.h (__pthread_unwind_next): Use
740         __attribute__ instead of __attribute.
741         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
742         (__cleanup_fct_attribute): Likewise.
744 2005-11-17  Jakub Jelinek  <jakub@redhat.com>
746         * sysdeps/pthread/unwind-forcedunwind.c (pthread_cancel_init): Put
747         a write barrier before writing libgcc_s_getcfa.
749 2005-11-06  Ulrich Drepper  <drepper@redhat.com>
751         * sysdeps/unix/sysv/linux/configure: Removed.
753 2005-11-05  Ulrich Drepper  <drepper@redhat.com>
755         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Remove trace of
756         optional init_array/fini_array support.
758 2005-10-24  Roland McGrath  <roland@redhat.com>
760         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Remove unnecessary
761         versioned_symbol use.
763 2005-10-16  Roland McGrath  <roland@redhat.com>
765         * init.c (__pthread_initialize_minimal_internal): Even when using a
766         compile-time default stack size, apply the minimum that allocate_stack
767         will require, and round up to page size.
769 2005-10-10  Daniel Jacobowitz  <dan@codesourcery.com>
771         * Makefile ($(test-modules)): Remove static pattern rule.
773 2005-10-14  Jakub Jelinek  <jakub@redhat.com>
774             Ulrich Drepper  <drepper@redhat.com>
776         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix stack
777         alignment in callback function.
778         * Makefile: Add rules to build and run tst-align3.
779         * tst-align3.c: New file.
781 2005-10-03  Jakub Jelinek  <jakub@redhat.com>
783         * allocatestack.c (setxid_signal_thread): Add
784         INTERNAL_SYSCALL_DECL (err).
786 2005-10-02  Jakub Jelinek  <jakub@redhat.com>
788         * allocatestack.c (setxid_signal_thread): Need to use
789         atomic_compare_and_exchange_bool_acq.
791 2005-10-01  Ulrich Drepper  <drepper@redhat.com>
792             Jakub Jelinek  <jakub@redhat.com>
794         * descr.h: Define SETXID_BIT and SETXID_BITMASK.  Adjust
795         CANCEL_RESTMASK.
796         (struct pthread): Move specific_used field to avoid padding.
797         Add setxid_futex field.
798         * init.c (sighandler_setxid): Reset setxid flag and release the
799         setxid futex.
800         * allocatestack.c (setxid_signal_thread): New function.  Broken
801         out of the bodies of the two loops in __nptl_setxid.  For undetached
802         threads check whether they are exiting and if yes, don't send a signal.
803         (__nptl_setxid): Simplify loops by using setxid_signal_thread.
804         * pthread_create.c (start_thread): For undetached threads, check
805         whether setxid bit is set.  If yes, wait until signal has been
806         processed.
808         * allocatestack.c (STACK_VARIABLES): Initialize them.
809         * pthread_create.c (__pthread_create_2_1): Initialize pd.
811 2004-09-02  Jakub Jelinek  <jakub@redhat.com>
813         * pthread_cond_destroy.c (__pthread_cond_destroy): If there are
814         waiters, awake all waiters on the associated mutex.
816 2005-09-22  Roland McGrath  <roland@redhat.com>
818         * perf.c [__x86_64__] (HP_TIMING_NOW): New macro (copied from
819         ../sysdeps/x86_64/hp-timing.h).
821 2005-08-29  Jakub Jelinek  <jakub@redhat.com>
823         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_WAKE_OP,
824         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
825         (lll_futex_wake_unlock): Define.
826         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_WAKE_OP,
827         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
828         (lll_futex_wake_unlock): Define.
829         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_WAKE_OP,
830         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
831         (lll_futex_wake_unlock): Define.
832         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_WAKE_OP,
833         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
834         (lll_futex_wake_unlock): Define.
835         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_WAKE_OP,
836         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
837         (lll_futex_wake_unlock): Define.
838         * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal): Use
839         lll_futex_wake_unlock.
840         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
841         (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
842         (__pthread_cond_signal): Use FUTEX_WAKE_OP.
843         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
844         (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
845         (__pthread_cond_signal): Use FUTEX_WAKE_OP.
847 2005-09-05  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
849         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
850         Fix typo in register name.
852 2005-08-23  Ulrich Drepper  <drepper@redhat.com>
854         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
855         Use __sigfillset.  Document that sigfillset does the right thing wrt
856         to SIGSETXID.
858 2005-08-08  Jakub Jelinek  <jakub@redhat.com>
860         * tst-stackguard1.c (do_test): Likewise.
862 2005-07-29  Jakub Jelinek  <jakub@redhat.com>
864         * tst-stackguard1.c (do_test): Don't fail if the poor man's
865         randomization doesn't work well enough.
867 2005-07-11  Jakub Jelinek  <jakub@redhat.com>
869         [BZ #1102]
870         * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER,
871         PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP,
872         PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP,
873         PTHREAD_MUTEX_ADAPTIVE_NP, PTHREAD_RWLOCK_INITIALIZER,
874         PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP,
875         PTHREAD_COND_INITIALIZER): Supply zeros for all fields
876         in the structure.
877         * Makefile (tests): Add tst-initializers1.
878         (CFLAGS-tst-initializers1.c): Set.
879         * tst-initializers1.c: New test.
881 2005-07-11  Jakub Jelinek  <jakub@redhat.com>
883         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_rwlock_t):
884         Make sure __flags are located at offset 48 from the start of the
885         structure.
887 2005-07-02  Roland McGrath  <roland@redhat.com>
889         * Makeconfig: Comment fix.
891 2005-07-05  Jakub Jelinek  <jakub@redhat.com>
893         * descr.h (PTHREAD_STRUCT_END_PADDING): Define.
894         * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): If PTHREAD_STRUCT_END_PADDING
895         is smaller than 8 bytes, increase TLS_PRE_TCB_SIZE by 16 bytes.
896         (THREAD_SYSINFO, THREAD_SELF, DB_THREAD_SELF): Don't assume
897         TLS_PRE_TCB_SIZE is sizeof (struct pthread).
898         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
899         * sysdeps/ia64/tcb-offsets.sym (PID, TID, MULTIPLE_THREADS_OFFSET):
900         Use TLS_PRE_TCB_SIZE instead of sizeof (struct pthread).
901         * sysdeps/unix/sysv/linux/ia64/createthread.c (TLS_VALUE): Don't
902         assume TLS_PRE_TCB_SIZE is sizeof (struct pthread).
904 2005-06-25  Jakub Jelinek  <jakub@redhat.com>
906         * sysdeps/i386/tls.h (tcbhead_t): Add stack_guard field.
907         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
908         * sysdeps/x86_64/tls.h (tcbhead_t): Add sysinfo and stack_guard
909         fields.
910         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
911         * sysdeps/s390/tls.h (tcbhead_t): Add stack_guard
912         field.  Put in sysinfo field unconditionally.
913         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
914         * sysdeps/powerpc/tls.h (tcbhead_t): Add stack_guard field.
915         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
916         * sysdeps/sparc/tls.h (tcbhead_t): Add sysinfo and stack_guard
917         fields.
918         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
919         * pthread_create.c (__pthread_create_2_1): Use
920         THREAD_COPY_STACK_GUARD macro.
921         * Makefile: Add rules to build and run tst-stackguard1{,-static}
922         tests.
923         * tst-stackguard1.c: New file.
924         * tst-stackguard1-static.c: New file.
926 2005-06-14  Alan Modra  <amodra@bigpond.net.au>
928         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
929         Invoke CGOTSETUP and CGOTRESTORE.
930         (CGOTSETUP, CGOTRESTORE): Define.
932 2005-05-29  Richard Henderson  <rth@redhat.com>
934         * tst-cancel4.c (WRITE_BUFFER_SIZE): New.
935         (tf_write, tf_writev): Use it.
936         (do_test): Use socketpair instead of pipe.  Set SO_SNDBUF to
937         the system minimum.
939 2005-05-23  Jakub Jelinek  <jakub@redhat.com>
941         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
942         [IS_IN_librt] (CENABLE, CDISABLE): Use JUMPTARGET instead of
943         __librt_*_asynccancel@local.
945 2005-05-17  Alan Modra  <amodra@bigpond.net.au>
947         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Delete
948         all occurrences of JUMPTARGET.  Instead append @local to labels.
950 2005-05-20  Jakub Jelinek  <jakub@redhat.com>
952         * sysdeps/i386/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN): Define to
953         size/alignment of struct pthread rather than tcbhead_t.
954         * sysdeps/x86_64/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
955         Likewise.
956         * sysdeps/s390/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
957         Likewise.
958         * sysdeps/sparc/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
959         Likewise.
961 2005-05-19  Richard Henderson  <rth@redhat.com>
963         * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use
964         __sync_val_compare_and_swap, not explicit _si variant.
965         * sysdeps/ia64/pthread_spin_trylock.c (pthread_spin_trylock): Likewise.
967 2005-05-03  Ulrich Drepper  <drepper@redhat.com>
969         [BZ #915]
970         * sysdeps/pthread/pthread.h: Avoid empty initializers.
972 2005-05-03  Jakub Jelinek  <jakub@redhat.com>
974         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Remove explicit
975         .eh_frame section, use cfi_* directives.
977 2005-04-27  Jakub Jelinek  <jakub@redhat.com>
979         * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: Use <> instead
980         of "" includes.
982 2005-04-27  Ulrich Drepper  <drepper@redhat.com>
984         [BZ #1075]
985         * tst-cancel17.c (do_test): Add arbitrary factor to make sure
986         aio_write blocks.
988 2005-04-27  Roland McGrath  <roland@redhat.com>
990         * Makefile (tests): Remove tst-clock2.
992         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Handle
993         CLOCK_PROCESS_CPUTIME_ID and CLOCK_PROCESS_THREAD_ID specially,
994         translating to the kernel clockid_t for our own process/thread clock.
996         * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: New file.
998 2005-04-15  Jakub Jelinek  <jakub@redhat.com>
1000         * old_pthread_cond_init.c: Include <errno.h>.
1001         (__pthread_cond_init_2_0): Fail with EINVAL if COND_ATTR is
1002         process shared or uses clock other than CLOCK_REALTIME.
1003         * pthread_cond_init.c (__pthread_cond_init): Remove bogus comment.
1005 2005-04-13  David S. Miller  <davem@davemloft.net>
1007         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: New file.
1008         * sysdeps/sparc/sparc64/clone.S: New file.
1010 2005-04-05  Jakub Jelinek  <jakub@redhat.com>
1012         [BZ #1102]
1013         * sysdeps/pthread/pthread.h (__pthread_cleanup_routine): Use
1014         __inline instead of inline.
1015         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_routine): Likewise.
1017 2005-03-31  Jakub Jelinek  <jakub@redhat.com>
1019         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Use
1020         functionally equivalent, but shorter instructions.
1021         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
1022         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
1023         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
1024         Likewise.
1025         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
1026         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
1027         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
1028         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
1029         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1030         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
1031         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1032         Likewise.
1033         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
1034         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
1035         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1036         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
1037         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1039 2005-03-28  Daniel Jacobowitz  <dan@codesourcery.com>
1041         * sysdeps/mips/Makefile: New file.
1042         * sysdeps/mips/nptl-sysdep.S: New file.
1043         * sysdeps/mips/tcb-offsets.sym: New file.
1044         * sysdeps/mips/pthread_spin_lock.S: New file.
1045         * sysdeps/mips/pthread_spin_trylock.S: New file.
1046         * sysdeps/mips/pthreaddef.h: New file.
1047         * sysdeps/mips/tls.h: New file.
1048         * sysdeps/mips/jmpbuf-unwind.h: New file.
1049         * sysdeps/unix/sysv/linux/mips/lowlevellock.h: New file.
1050         * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h: New file.
1051         * sysdeps/unix/sysv/linux/mips/bits/semaphore.h: New file.
1052         * sysdeps/unix/sysv/linux/mips/pthread_once.c: New file.
1053         * sysdeps/unix/sysv/linux/mips/fork.c: New file.
1054         * sysdeps/unix/sysv/linux/mips/pt-vfork.S: New file.
1055         * sysdeps/unix/sysv/linux/mips/vfork.S: New file.
1056         * sysdeps/unix/sysv/linux/mips/clone.S: New file.
1057         * sysdeps/unix/sysv/linux/mips/createthread.c: New file.
1058         * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: New file.
1060 2005-03-23  Ulrich Drepper  <drepper@redhat.com>
1062         [BZ #1112]
1063         * pthread_create.c (__pthread_create_2_1): Rename syscall error
1064         variable to scerr.
1066 2005-03-10  Jakub Jelinek  <jakub@redhat.com>
1068         * tst-getpid1.c (do_test): Align stack passed to clone{2,}.
1070 2005-02-25  Roland McGrath  <roland@redhat.com>
1072         * alloca_cutoff.c: Correct license text.
1073         * tst-unload.c: Likewise.
1074         * sysdeps/pthread/allocalim.h: Likewise.
1075         * sysdeps/pthread/pt-initfini.c: Likewise.
1076         * sysdeps/pthread/bits/libc-lock.h: Likewise.
1077         * sysdeps/pthread/bits/sigthread.h: Likewise.
1078         * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
1079         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
1081 2005-02-16  Roland McGrath  <roland@redhat.com>
1083         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
1084         Use unsigned int * for ptr_nthreads.
1086 2005-02-14  Alan Modra  <amodra@bigpond.net.au>
1088         [BZ #721]
1089         * sysdeps/powerpc/tcb-offsets.sym (thread_offsetof): Redefine to suit
1090         gcc4.
1092 2005-02-07  Richard Henderson  <rth@redhat.com>
1094         [BZ #787]
1095         * sysdeps/pthread/pthread.h (__sigsetjmp): Use pointer as first
1096         argument.
1098 2004-11-03  Marcus Brinkmann  <marcus@gnu.org>
1100         * sysdeps/generic/lowlevellock.h (__generic_mutex_unlock): Fix
1101         order of arguments in invocation of atomic_add_zero.
1103 2005-01-26  Jakub Jelinek  <jakub@redhat.com>
1105         [BZ #737]
1106         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S (__new_sem_trywait):
1107         Use direct %gs segment access or, if NO_TLS_DIRECT_SEG_REFS,
1108         at least gotntpoff relocation and addition.
1109         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
1110         Likewise.
1111         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
1112         Likewise.
1113         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
1114         Likewise.
1116 2005-01-06  Ulrich Drepper  <drepper@redhat.com>
1118         * allocatestack.c (init_one_static_tls): Adjust initialization of DTV
1119         entry for static tls deallocation fix.
1120         * sysdeps/alpha/tls.h (dtv_t): Change pointer type to be struct which
1121         also contains information whether the memory pointed to is static
1122         TLS or not.
1123         * sysdeps/i386/tls.h: Likewise.
1124         * sysdeps/ia64/tls.h: Likewise.
1125         * sysdeps/powerpc/tls.h: Likewise.
1126         * sysdeps/s390/tls.h: Likewise.
1127         * sysdeps/sh/tls.h: Likewise.
1128         * sysdeps/sparc/tls.h: Likewise.
1129         * sysdeps/x86_64/tls.h: Likewise.
1131 2004-12-27  Ulrich Drepper  <drepper@redhat.com>
1133         * init.c (__pthread_initialize_minimal_internal): Use __sigemptyset.
1135 2004-12-21  Jakub Jelinek  <jakub@redhat.com>
1137         * sysdeps/i386/tls.h (CALL_THREAD_FCT): Maintain 16 byte alignment of
1138         %esp.
1139         * Makefile (tests): Add tst-align2.
1140         * tst-align2.c: New test.
1141         * sysdeps/i386/Makefile (CFLAGS-tst-align{,2}.c): Add
1142         -mpreferred-stack-boundary=4.
1144 2004-12-18  Roland McGrath  <roland@redhat.com>
1146         * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h:
1147         New file removed withdrawn for the moment.
1149 2004-12-17  Richard Henderson  <rth@redhat.com>
1151         * sysdeps/unix/sysv/linux/alpha/clone.S: New file.
1152         * sysdeps/alpha/tcb-offsets.sym (TID_OFFSET): New.
1154 2004-12-16  Ulrich Drepper  <drepper@redhat.com>
1156         * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h: New file.
1157         Increased PTHREAD_STACK_MIN.
1159         * tst-context1.c (stacks): Use bigger stack size.
1161 2004-12-16  Jakub Jelinek  <jakub@redhat.com>
1163         * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: New file.
1164         * sysdeps/sparc/tcb-offsets.sym: Add TID.
1166 2004-12-15  Jakub Jelinek  <jakub@redhat.com>
1168         * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: New file.
1169         * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: New file.
1170         * sysdeps/s390/tcb-offsets.sym (TID): Add.
1172 2004-12-15  Ulrich Drepper  <drepper@redhat.com>
1174         * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: New file.
1176 2004-12-14  Ulrich Drepper  <drepper@redhat.com>
1178         * sysdeps/powerpc/tcb-offsets.sym: Add TID.
1179         * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: New file.
1181         * tst-getpid1.c: If child crashes, report this first.  Print which
1182         signal.
1184 2004-12-09  Ulrich Drepper  <drepper@redhat.com>
1186         * init.c (__pthread_initialize_minimal_internal): Also unblock
1187         SIGSETXID.
1189 2004-12-01  Jakub Jelinek  <jakub@redhat.com>
1191         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_CPUTIME,
1192         _POSIX_THREAD_CPUTIME): Define to 0.
1193         * sysdeps/pthread/timer_create.c (timer_create): Remove unused code
1194         handling CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID.
1195         * sysdeps/pthread/timer_routines.c (__timer_signal_thread_pclk,
1196         __timer_signal_thread_tclk): Remove.
1197         (init_module): Remove their initialization.
1198         (thread_cleanup): Remove their cleanup assertions.
1199         * sysdeps/pthread/posix-timer.h (__timer_signal_thread_pclk,
1200         __timer_signal_thread_tclk): Remove.
1201         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Removed.
1202         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Removed.
1203         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Removed.
1205 2004-12-07  Jakub Jelinek  <jakub@redhat.com>
1207         * sysdeps/ia64/tcb-offsets.sym (TID): Add.
1208         * sysdeps/unix/sysv/linux/ia64/clone2.S: New file.
1210         * Makefile (tests): Add tst-getpid2.
1211         * tst-getpid1.c (TEST_CLONE_FLAGS): Define.
1212         (do_test): Use it.  Use __clone2 instead of clone on ia64.
1213         * tst-getpid2.c: New test.
1215 2004-12-07  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1217         * sysdeps/unix/sysv/linux/sh/clone.S: New file.
1219 2004-12-04  Ulrich Drepper  <drepper@redhat.com>
1221         * Makefile (tests): Add tst-getpid1.
1222         * tst-getpid1.c: New file.
1223         * sysdeps/unix/sysv/linux/i386/clone.S: New file.
1224         * sysdeps/unix/sysv/linux/x86_64/clone.S: New file.
1226 2004-12-02  Roland McGrath  <roland@redhat.com>
1228         * Makefile (libpthread-nonshared): Variable removed.
1229         ($(objpfx)libpthread_nonshared.a): Target removed.
1230         ($(inst_libdir)/libpthread_nonshared.a): Likewise.
1231         These are now handled by generic magic from
1232         libpthread-static-only-routines being set.
1234 2004-11-27  Ulrich Drepper  <drepper@redhat.com>
1236         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_PRIORITIZED_IO,
1237         _POSIX2_CHAR_TERM, _POSIX_THREAD_PRIO_INHERIT,
1238         _POSIX_THREAD_PRIO_PROTECT): Define.
1239         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1240         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
1241         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
1243 2004-11-26  Jakub Jelinek  <jakub@redhat.com>
1245         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_ADVISORY_INFO,
1246         _POSIX_SPORADIC_SERVER, _POSIX_THREAD_SPORADIC_SERVER, _POSIX_TRACE,
1247         _POSIX_TRACE_EVENT_FILTER, _POSIX_TRACE_INHERIT, _POSIX_TRACE_LOG,
1248         _POSIX_TYPED_MEMORY_OBJECTS, _POSIX_IPV6, _POSIX_RAW_SOCKETS): Define.
1249         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1250         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
1251         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
1253 2004-11-24  Ulrich Drepper  <drepper@redhat.com>
1255         * sysdeps/x86_64/Makefile [nptl]: Define CFLAGS-pthread_create.c.
1257         * Makefile (libpthread-routines): Add pthread_setschedprio.
1258         * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setschedprio.
1259         * sysdeps/pthread/pthread.h: Declare pthread_setschedprio.
1260         * pthread_setschedprio.c: New file.
1262 2004-11-20  Jakub Jelinek  <jakub@redhat.com>
1264         * pthread_create.c (pthread_cancel): Add PTHREAD_STATIC_FN_REQUIRE.
1265         * pthread_cancel.c (pthread_create): Likewise.
1267         * Makefile (libpthread-routines): Add vars.
1268         * sysdeps/pthread/createthread.c (__pthread_multiple_threads): Remove.
1269         * init.c (__default_stacksize, __is_smp): Remove.
1270         * vars.c: New file.
1271         * pthreadP.h (__find_thread_by_id): If !SHARED, add weak_function
1272         and define a wrapper macro.
1273         (PTHREAD_STATIC_FN_REQUIRE): Define.
1274         * allocatestack.c (__find_thread_by_id): Undefine.
1275         * pthread_create (__pthread_keys): Remove.
1276         (pthread_mutex_lock, pthread_mutex_unlock, pthread_once,
1277         pthread_key_create, pthread_setspecific, pthread_getspecific): Add
1278         PTHREAD_STATIC_FN_REQUIRE.
1280 2004-11-18  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1282         * sysdeps/sh/tls.h (DB_THREAD_SELF): Set the correct bias
1283         parameter to REGISTER macro.
1285 2004-11-17  Roland McGrath  <roland@redhat.com>
1287         * sysdeps/unix/sysv/linux/timer_routines.c (__start_helper_thread):
1288         Make sure SIGCANCEL is blocked as well.
1290 2004-11-10  Jakub Jelinek  <jakub@redhat.com>
1292         * sysdeps/pthread/setxid.h: New file.
1293         * sysdeps/pthread/pthread-functions.h (HAVE_PTR__NPTL_SETXID): Remove.
1294         (struct xid_command): Add forward decl.
1295         (struct pthread_functions): Change return type of __nptl_setxid hook
1296         to int.
1297         * pthreadP.h (__nptl_setxid): Change return type to int.
1298         * allocatestack.c (__nptl_setxid): Call INTERNAL_SYSCALL_NCS in the
1299         calling thread, return its return value and set errno on failure.
1300         * descr.h (struct xid_command): Change id type to long array.
1302         * Makefile: Add rules to build and test tst-setuid1 and
1303         tst-setuid1-static.
1304         * tst-setuid1.c: New test.
1305         * tst-setuid1-static.c: New test.
1307 2004-11-10  Jakub Jelinek  <jakub@redhat.com>
1309         * Makefile (tests): Add tst-exit3.
1310         * tst-exit3.c: New test.
1312 2004-11-09  Ulrich Drepper  <drepper@redhat.com>
1314         * Makefile (tests): Add tst-exit2.
1315         * tst-exit2.c: New file.
1317 2004-11-09  Roland McGrath  <roland@redhat.com>
1319         [BZ #530]
1320         * sysdeps/pthread/createthread.c (do_clone): Increment __nptl_nthreads
1321         here, before calling clone.
1322         * pthread_create.c (start_thread): Don't do it here.
1324 2004-11-02  Jakub Jelinek  <jakub@redhat.com>
1326         * sysdeps/unix/sysv/linux/smp.h: Include <errno.h>.
1328 2004-10-29  Kaz  Kojima  <kkojima@rr.iij4u.or.jp>
1330         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
1331         Set ETIMEDOUT to errno when time is up.  Tweak to avoid
1332         assembler warning.
1334 2004-10-28  Jakub Jelinek  <jakub@redhat.com>
1336         * pthread_create.c (__pthread_create_2_1): Avoid leaking stacks
1337         if sched_priority is not between minprio and maxprio.
1339 2004-10-25  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1341         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
1342         (__pthread_cond_timedwait): Use clock_gettime syscall if exists.
1344         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
1345         (__lll_mutex_timedlock_wait): Fix a bad branch condition.
1347 2004-10-24  Ulrich Drepper  <drepper@redhat.com>
1349         * sysdeps/unix/sysv/linux/smp.h (is_smp_system): Use
1350         not-cancelable I/O functions.
1352 2004-10-21  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1354         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
1355         (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
1356         make sure 2 is stored in the futex and we looked at the old value.
1357         Fix a few other problems to return the correct value.
1359 2004-10-14  Richard Henderson  <rth@redhat.com>
1361         * sysdeps/alpha/tcb-offsets.sym (thread_offsetof): Redefine to
1362         make gcc4 happy.
1364 2004-10-06  Jakub Jelinek  <jakub@redhat.com>
1366         * sysdeps/unix/sysv/linux/jmp-unwind.c: Include pthreadP.h instead
1367         of pthread-functions.h and pthreaddef.h.
1368         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Likewise.
1370         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
1371         Change __data.__nwaiters from int to unsigned int.
1373         * tst-clock2.c (do_test): Don't fail if _POSIX_THREAD_CPUTIME == 0 and
1374         sysconf (_SC_THREAD_CPUTIME) returns negative value.
1376         * allocatestack.c (__find_thread_by_id): Move attribute_hidden
1377         before return type.
1379         * sysdeps/s390/jmpbuf-unwind.h: Include bits/wordsize.h.
1380         (JMPBUF_CFA_UNWINDS_ADJ): Subtract 96 resp. 160 bytes from CFA.
1382 2004-10-06  Ulrich Drepper  <drepper@redhat.com>
1384         * tst-cancel4.c (tf_msgrcv): Check for failure in msgget.  If the
1385         test fails, remove message queue.
1386         (tf_msgsnd): Likewise.
1388 2004-10-05  Jakub Jelinek  <jakub@redhat.com>
1390         * tst-clock1.c: Change #ifdef to #if defined.
1391         * tst-clock2.c: Likewise.
1392         * tst-cond11.c: Likewise.
1394         * sysdeps/pthread/timer_create.c (timer_create): Use
1395         defined _POSIX_CPUTIME && _POSIX_CPUTIME >= 0 instead of
1396         defined CLOCK_PROCESS_CPUTIME_ID #ifs and similarly for
1397         THREAD_CPUTIME.
1399 2004-10-05  Jakub Jelinek  <jakub@redhat.com>
1401         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h (_POSIX_CPUTIME,
1402         _POSIX_THREAD_CPUTIME): Define to 0.
1404 2004-10-04  Ulrich Drepper  <drepper@redhat.com>
1406         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Define _POSIX_CPUTIME
1407         and _POSIX_THREAD_CPUTIME to zero.
1408         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
1409         * tst-barrier2.c: Fix testing for POSIX feature.
1410         * tst-clock1.c: Likewise.
1411         * tst-clock2.c: Likewise.
1412         * tst-cond11.c: Likewise.
1413         * tst-cond4.c: Likewise.
1414         * tst-cond6.c: Likewise.
1415         * tst-flock2.c: Likewise.
1416         * tst-mutex4.c: Likewise.
1417         * tst-mutex9.c: Likewise.
1418         * tst-rwlock12.c: Likewise.
1419         * tst-rwlock4.c: Likewise.
1420         * tst-signal1.c: Likewise.
1421         * tst-spin2.c: Likewise.
1422         * sysdeps/pthread/posix-timer.h: Likewise.
1423         * sysdeps/pthread/timer_create.c: Likewise.
1424         * sysdeps/pthread/timer_routines.c: Likewise.
1426 2004-10-01  Ulrich Drepper  <drepper@redhat.com>
1428         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
1429         (__lll_mutex_timedlock_wait): Address futex correctly.
1431         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
1432         (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
1433         make sure 2 is stored in the futex and we looked at the old value.
1434         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
1435         (__lll_mutex_timedlock_wait): Likewise.  Fix a few other problems
1436         which might very well made the code not working at all before.
1437         [BZ #417]
1439 2004-09-28  Ulrich Drepper  <drepper@redhat.com>
1441         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
1442         allow SIGSETXID to be sent.
1443         * sysdeps/pthread/sigaction.c (__sigaction): Don't allow action
1444         for SIGSETXID to be defined.
1445         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
1446         SIGSETXID cannot be blocked.
1448         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
1449         Add __extension__ to long long types.
1450         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
1451         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
1452         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
1453         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
1454         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
1455         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
1456         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
1458 2004-09-25  Ulrich Drepper  <drepper@redhat.com>
1460         * descr.h (struct pthread): Add stopped_start field.
1461         * sysdeps/pthread/createthread.c (create_thread): Set
1462         start_stopped flag in descriptor for new thread appropriately.
1463         * pthread_create.c (start_thread): Only take lock to be stopped on
1464         startup if stopped_start flag says so.
1466 2004-09-24  Ulrich Drepper  <drepper@redhat.com>
1468         * pthread_create.c (__pthread_create_2_1): Remember whether thread
1469         is created detached and if yes, do not try to free the stack in case
1470         the thread creation failed.
1471         * sysdeps/pthread/createthread.c (do_clone): Free stack here if clone
1472         call fails.  Don't depend on INTERNAL_SYSCALL_ERRNO return zero in
1473         case there has been no error.  [BZ #405]
1475         * pthread_create.c (start_thread): Don't wait for scheduler data
1476         etc to be set at the beginning of the function.  The cancellation
1477         infrastructure must have been set up.  And enable async
1478         cancellation before potentially going to sleep.  [BZ #401]
1480 2004-09-20  Ulrich Drepper  <drepper@redhat.com>
1482         * Versions: Remove exports for pthread_set*id_np functions.
1483         * sysdeps/pthread/pthread.h: Remove pthread_set*id_np prototypes
1484         for now.
1485         * Makefile: Don't build pthread_set*id code for now.
1487 2004-09-19  Ulrich Drepper  <drepper@redhat.com>
1489         * sysdeps/unix/sysv/linux/allocrtsig.c: Allocate second signal for
1490         internal use.
1491         * allocatestack.c (__nptl_setxid): New function.
1492         * descr.h (struct xid_command): Define type.
1493         * init.c (pthread_functions): Add ptr__nptl_setxid initialization.
1494         (sighandler_setxid): New function.
1495         (__pthread_initialize_minimal): Register sighandler_setxid for
1496         SIGCANCEL.
1497         * pt-allocrtsig.c: Update comment.
1498         * pthreadP.h: Define SIGSETXID.  Declare __xidcmd variable.
1499         Declare __nptl_setxid.
1500         * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_setxid.
1501         * sysdeps/pthread/pthread.h: Declare pthread_setgid_np,
1502         pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
1503         pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
1504         and pthread_setresuid_np.
1505         * pthread_setgid_np.c: New file.
1506         * pthread_setuid_np.c: New file.
1507         * pthread_setegid_np.c: New file.
1508         * pthread_seteuid_np.c: New file.
1509         * pthread_setregid_np.c: New file.
1510         * pthread_setreuid_np.c: New file.
1511         * pthread_setresgid_np.c: New file.
1512         * pthread_setresuid_np.c: New file.
1513         * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setgid_np,
1514         pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
1515         pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
1516         and pthread_setresuid_np.
1517         * Makefile (libpthread-routines): Add pthread_setuid, pthread_seteuid,
1518         pthread_setreuid, pthread_setresuid, pthread_setgid, pthread_setegid,
1519         pthread_setregid, and pthread_setresgid.
1521 2004-09-18  Ulrich Drepper  <drepper@redhat.com>
1523         * allocatestack.c (allocate_stack): Return EAGAIN instead of
1524         ENOMEM when out of memory.
1526 2004-09-10  Roland McGrath  <roland@redhat.com>
1528         [BZ #379]
1529         * allocatestack.c (allocate_stack): Remove [__ASSUME_CLONE_STOPPED]
1530         code, since we don't try to use the broken CLONE_STOPPED any more.
1531         * pthread_create.c (start_thread): Likewise.
1533 2004-09-15  Richard Henderson  <rth@redhat.com>
1535         * sysdeps/unix/sysv/linux/alpha/vfork.S: Use libc_hidden_def.
1537 2004-09-01  David Mosberger  <davidm@hpl.hp.com>
1539         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h
1540         (__libc_unwind_longjmp): Delete macro and declare as function.
1541         * sysdeps/unix/sysv/linux/ia64/Makefile (sysdep_routines): Mention
1542         __ia64_longjmp, sigstack_longjmp, and __sigstack_longjmp for
1543         nptl directory.
1544         * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S: New file.
1545         * sysdeps/unix/sysv/linux/ia64/__sigstack_longjmp.c: New file.
1546         * sysdeps/unix/sysv/linux/ia64/unwind_longjmp.c: New file.
1548 2004-09-12  Ulrich Drepper  <drepper@redhat.com>
1550         * sysdeps/pthread/pthread.h: Make rwlock prototypes available also
1551         for __USE_XOPEN2K.
1552         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define rwlock
1553         types also for __USE_XOPEN2K.
1554         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
1555         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
1556         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
1557         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
1558         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
1559         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
1560         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
1561         [BZ #320]
1563 2004-09-08  Ulrich Drepper  <drepper@redhat.com>
1565         * sysdeps/pthread/pthread.h
1566         (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Make safe for C++.
1567         (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
1568         (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
1569         (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Likewise.
1570         [BZ #375]
1572 2004-09-07  Ulrich Drepper  <drepper@redhat.com>
1574         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Allow
1575         PSEUDO to be used with . prefix.
1577         * sysdeps/unix/sysv/linux/alpha/pthread_once.c (__pthread_once):
1578         Use atomic_increment instead of atomic_exchange_and_add.
1579         * sysdeps/unix/sysv/linux/sparc/pthread_once.c (__pthread_once):
1580         Likewise.
1581         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
1582         Likewise.
1583         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
1584         Likewise.
1586         * allocatestack.c (allocate_stack): Use atomic_increment_val
1587         instead of atomic_exchange_and_add.
1588         * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Likewise.
1589         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
1590         Likewise.
1591         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
1592         Likewise.
1594         * sysdeps/pthread/pthread.h (pthread_once): Remove __THROW since
1595         the initialization function might throw.
1597 2005-09-05  Richard Henderson  <rth@redhat.com>
1599         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
1600         Move definition inside libpthread, libc, librt check.  Provide
1601         definition for rtld.
1603 2004-09-02  Jakub Jelinek  <jakub@redhat.com>
1605         * pthread_cond_destroy.c (__pthread_cond_destroy): If there are
1606         waiters, awake all waiters on the associated mutex.
1608 2004-09-02  Ulrich Drepper  <drepper@redhat.com>
1610         * sysdeps/alpha/jmpbuf-unwind.h: Define __libc_unwind_longjmp.
1611         * sysdeps/i386/jmpbuf-unwind.h: Likewise
1612         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
1613         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
1614         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
1615         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
1616         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
1617         * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
1618         * unwind.c: Use it.
1620         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
1621         Rename __data.__clock to __data.__nwaiters, make it unsigned int.
1622         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
1623         Likewise.
1624         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
1625         Decrement __nwaiters.  If pthread_cond_destroy has been called and
1626         this is the last waiter, signal pthread_cond_destroy caller and
1627         avoid using the pthread_cond_t structure after unlock.
1628         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1629         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1630         Read clock type from the least significant bits of __nwaiters instead
1631         of __clock.
1632         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1633         * sysdeps/unix/sysv/linux/internaltypes.h: Define COND_CLOCK_BITS.
1635 2004-08-31  Jakub Jelinek  <jakub@redhat.com>
1637         [BZ #342]
1638         * Makefile (tests): Add tst-cond20 and tst-cond21.
1639         * tst-cond20.c: New test.
1640         * tst-cond21.c: New test.
1641         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
1642         (pthread_cond_t): Rename __data.__clock to __data.__nwaiters, make
1643         it unsigned int.
1644         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
1645         Likewise.
1646         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
1647         (pthread_cond_t): Likewise.
1648         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
1649         Likewise.
1650         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
1651         Likewise.
1652         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
1653         Likewise.
1654         * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_clock): Remove.
1655         (cond_nwaiters): New.
1656         (clock_bits): New.
1657         * pthread_cond_destroy.c (__pthread_cond_destroy): Return EBUSY
1658         if there are waiters not signalled yet.
1659         Wait until all already signalled waiters wake up.
1660         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Decrement
1661         __nwaiters.  If pthread_cond_destroy has been called and this is the
1662         last waiter, signal pthread_cond_destroy caller and avoid using
1663         the pthread_cond_t structure after unlock.
1664         (__pthread_cond_wait): Increment __nwaiters in the beginning,
1665         decrement it when leaving.  If pthread_cond_destroy has been called
1666         and this is the last waiter, signal pthread_cond_destroy caller.
1667         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
1668         Likewise.  Read clock type from the least significant bits of
1669         __nwaiters instead of __clock.
1670         * pthread_condattr_setclock.c (pthread_condattr_setclock): Check
1671         whether clock ID can be encoded in COND_CLOCK_BITS bits.
1672         * pthread_condattr_getclock.c (pthread_condattr_getclock): Decode
1673         clock type just from the last COND_CLOCK_BITS bits of value.
1674         * pthread_cond_init.c (__pthread_cond_init): Initialize __nwaiters
1675         instead of __clock, just from second bit of condattr's value.
1677 2004-08-30  Jakub Jelinek  <jakub@redhat.com>
1679         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Include
1680         bits/wordsize.h.  Make the header match i386 header when __WORDSIZE
1681         != 64.
1682         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
1684 2004-08-15  Roland McGrath  <roland@frob.com>
1686         * pthread_atfork.c: Update copyright terms including special exception
1687         for these trivial files, which are statically linked into executables
1688         that use dynamic linking for the significant library code.
1690 2004-08-09  Jakub Jelinek  <jakub@redhat.com>
1692         * DESIGN-rwlock.txt: Add decreasing of nr_readers_queued to
1693         pthread_rwlock_rdlock.
1694         * sysdeps/pthread/pthread_rwlock_rdlock (__pthread_rwlock_rdlock):
1695         Decrease __nr_readers_queued after reacquiring lock.
1696         * sysdeps/pthread/pthread_rwlock_timedrdlock
1697         (pthread_rwlock_timedrdlock): Likewise.
1698         Reported by Bob Cook <bobcook47@hotmail.com>.
1700 2004-08-11  Jakub Jelinek  <jakub@redhat.com>
1702         * tst-rwlock14.c (tf): Read main thread handle from *ARG
1703         before pthread_barrier_wait.
1705 2004-08-07  Ulrich Drepper  <drepper@redhat.com>
1707         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
1708         Remove unnecessary exception handling data.
1710 2004-07-23  Jakub Jelinek  <jakub@redhat.com>
1712         [BZ #284]
1713         * sysdeps/pthread/pthread.h (pthread_getcpuclockid): Use __clockid_t
1714         instead of clockid_t.
1716 2004-07-21  Roland McGrath  <roland@redhat.com>
1718         * Makefile ($(objpfx)multidir.mk): Use $(make-target-directory).
1720 2004-07-19  Roland McGrath  <roland@redhat.com>
1722         * tst-cancel4.c (tf_waitid): Use WEXITED flag bit if available.
1724 2004-07-02  Roland McGrath  <roland@redhat.com>
1726         * configure: Don't exit.
1728 2004-07-14  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1730         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
1731         (__pthread_cond_timedwait): Check for invalid nanosecond in
1732         timeout value.
1734 2004-07-07  Ulrich Drepper  <drepper@redhat.com>
1736         * Makefile: Add rules to build and run tst-fini1.
1737         * tst-fini1.c: New file.
1738         * tst-fini1mod.c: New file.
1740 2004-07-05  Ulrich Drepper  <drepper@redhat.com>
1742         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define NO_CANCELLATION
1743         if no cancellation support is needed.
1744         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
1745         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
1746         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
1747         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
1748         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
1749         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
1750         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
1751         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
1752         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
1754         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define __NR_futex
1755         only if not already defined.
1757 2004-07-05  Jakub Jelinek  <jakub@redhat.com>
1759         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_unlock): Use
1760         constraint "m" instead of "0" for futex.
1762         * shlib-versions: Add powerpc64-.*-linux.*.
1764 2004-07-04  Jakub Jelinek  <jakub@redhat.com>
1766         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
1767         (pthread_rwlock_timedrdlock): Use cmpq instead of cmpl to check
1768         for valid tv_nsec.
1769         * tst-rwlock14.c (do_test): Test for invalid tv_nsec equal to
1770         1 billion and 64-bit tv_nsec which is valid when truncated to 32
1771         bits.
1773 2004-06-29  Roland McGrath  <roland@redhat.com>
1775         * Banner: NPTL no longer has its own version number.
1776         * Makefile (nptl-version): Variable removed.
1777         * sysdeps/pthread/Makefile (CFLAGS-confstr.c): Set LIBPTHREAD_VERSION
1778         using $(version), the glibc version number.
1780 2004-06-29  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1782         * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
1783         Fix branch offset for a PLT entry.
1784         * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
1785         Likewise.
1786         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
1787         Likewise.
1788         * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
1789         Likewise.
1790         * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait):
1791         Likewise.
1793 2004-06-28  Jakub Jelinek  <jakub@redhat.com>
1795         * sysdeps/alpha/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define
1796         unconditionally.
1798 2004-06-28  Jakub Jelinek  <jakub@redhat.com>
1800         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
1801         (pthread_rwlock_timedwrlock): Return EINVAL if tv_nsec is negative,
1802         instead of tv_sec.
1803         * sysdeps/pthread/pthread_rwlock_timedrdlock.c
1804         (pthread_rwlock_timedrdlock): Likewise.
1806 2004-06-22  Jakub Jelinek  <jakub@redhat.com>
1808         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
1809         Set __r7 to val, not mutex.
1811 2004-06-27  Ulrich Drepper  <drepper@redhat.com>
1813         * Makefile: Add rules to build tst-rwlock14.
1814         * tst-rwlock14.c: New file.
1816 2004-06-24  Boris Hu  <boris.hu@intel.com>
1818         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Add timeout validation
1819         check.
1820         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
1822 2004-06-19  Andreas Jaeger  <aj@suse.de>
1824         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix
1825         assembler in last patch.
1827 2004-06-17  Ulrich Drepper  <drepper@redhat.com>
1829         * sysdeps/pthread/pthread_cond_timedwait.c
1830         (__pthread_cond_timedwait): Also check for negativ nanoseconds.
1831         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
1832         (__pthread_cond_timedwait): Check for invalid nanosecond in
1833         timeout value.
1834         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1835         * tst-cond19.c: New file.
1836         * Makefile: Add rules to build and run tst-cond19.
1838 2004-06-15  Steven Munroe  <sjmunroe@us.ibm.com>
1840         * tst-context1.c (GUARD_PATTERN): Defined.
1841         (tst_context_t): Define struct containing ucontext_t & guard words.
1842         (ctx): Declare as an array of tst_context_t.
1843         (fct): Verify uc_link & guard words are still valid.
1844         (tf): Initialize guard words in ctx.  Adjust ctx refs for new struct.
1846 2004-06-13  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1848         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
1849         Add __data.__futex field, reshuffle __data.__clock.
1850         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
1851         (__pthread_cond_signal): Increment __futex at the same time as
1852         __wakeup_seq or __total_seq.  Pass address of __futex instead of
1853         address of low 32-bits of __wakeup_seq to futex syscall.
1854         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
1855         (__pthread_cond_wait): Likewise.  Pass __futex value from before
1856         releasing internal lock to FUTEX_WAIT.
1857         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
1858         (__pthread_cond_timedwait): Likewise.
1859         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
1860         (FUTEX_CMP_REQUEUE): Define.
1861         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
1862         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
1863         Pass __futex value from before the unlock and __futex address instead
1864         of address of low 32-bits of __wakeup_seq to futex syscall.
1865         Fallback to FUTEX_WAKE all on any errors.
1867 2004-06-08  Jakub Jelinek  <jakub@redhat.com>
1869         * pthread_mutexattr_getpshared.c (pthread_mutex_getpshared): Fix
1870         comment typo.
1871         * pthread_mutexattr_gettype.c (pthread_mutexattr_gettype): Likewise.
1872         * pthread_mutexattr_init.c (__pthread_mutexattr_init): Likewise.
1873         * pthread_mutexattr_settype.c (__pthread_mutexattr_settype): Likewise.
1874         * pthread_mutexattr_setpshared.c (pthread_mutexattr_setpshared):
1875         Likewise.  Reported by Bob Cook <bobcook47@hotmail.com>.
1877 2004-06-11  Martin Schwidefsky  <schwidefsky@de.ibm.com>
1879         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_compare_and_swap):
1880         Add memory clobber to inline assembly.
1881         (__lll_mutex_trylock): Likewise.
1882         (__lll_mutex_cond_trylock): Likewise.
1884 2004-06-07  Martin Schwidefsky  <schwidefsky@de.ibm.com>
1886         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
1887         Pass val argument as 6th system call argument in %r7.
1889 2004-05-21  Jakub Jelinek  <jakub@redhat.com>
1891         * Makefile (tests): Add tst-cond16.
1892         * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_futex): Add.
1893         * pthread_cond_init.c (__pthread_cond_init): Clear __data.__futex.
1894         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
1895         Add __data.__futex field, reshuffle __data.__clock.
1896         * sysdeps/unix/sysv/linux/i386/pthread_cond_signal.S
1897         (__pthread_cond_signal): Increment __futex at the same time as
1898         __wakeup_seq or __total_seq.  Pass address of __futex instead of
1899         address of low 32-bits of __wakeup_seq to futex syscall.
1900         * sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S
1901         (__pthread_cond_wait): Likewise.  Pass __futex value from before
1902         releasing internal lock to FUTEX_WAIT.
1903         * sysdeps/unix/sysv/linux/i386/pthread_cond_timedwait.S
1904         (__pthread_cond_timedwait): Likewise.
1905         * sysdeps/unix/sysv/linux/i386/pthread_cond_broadcast.S
1906         (FUTEX_CMP_REQUEUE): Define.
1907         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
1908         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
1909         Pass __futex value from before the unlock and __futex address instead
1910         of address of low 32-bits of __wakeup_seq to futex syscall.
1911         Fallback to FUTEX_WAKE all on any errors.
1912         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_CMP_REQUEUE):
1913         Define.
1914         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
1915         internally.  Return non-zero if error, zero if success.
1916         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
1917         Add __data.__futex field, reshuffle __data.__clock.
1918         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_CMP_REQUEUE):
1919         Define.
1920         (lll_futex_requeue): Add val argument, return 1 unconditionally
1921         for the time being.
1922         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
1923         Add __data.__futex field, reshuffle __data.__clock.
1924         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_CMP_REQUEUE):
1925         Define.
1926         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
1927         internally.  Return non-zero if error, zero if success.
1928         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
1929         (pthread_cond_t): Add __data.__futex field, reshuffle __data.__clock.
1930         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_CMP_REQUEUE):
1931         Define.
1932         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
1933         internally.  Return non-zero if error, zero if success.
1934         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
1935         Add __data.__futex field, reshuffle __data.__clock.
1936         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_CMP_REQUEUE):
1937         Define.
1938         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
1939         internally.  Return non-zero if error, zero if success.
1940         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
1941         Add __data.__futex field, reshuffle __data.__clock.
1942         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
1943         Add __data.__futex field, reshuffle __data.__clock.
1944         * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal):
1945         Increment __futex at the same time as __wakeup_seq or __total_seq.
1946         Pass address of __futex instead of address of low 32-bits of
1947         __wakeup_seq to futex syscall.
1948         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
1949         Pass __futex value from before releasing internal lock
1950         to FUTEX_WAIT.
1951         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
1952         Likewise.  Avoid unnecessary shadowing of variables.
1953         * sysdeps/pthread/pthread_cond_broadcast.c (__pthread_cond_broadcast):
1954         Set __futex to 2 * __total_seq.  Pass __futex value from before the
1955         unlock and __futex address instead of address of low 32-bits of
1956         __wakeup_seq to futex_requeue macro, adjust for new return value
1957         meaning.
1958         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
1959         (__pthread_cond_signal): Increment __futex at the same time as
1960         __wakeup_seq or __total_seq.  Pass address of __futex instead of
1961         address of low 32-bits of __wakeup_seq to futex syscall.
1962         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
1963         (__pthread_cond_wait): Likewise.  Pass __futex value from before
1964         releasing internal lock to FUTEX_WAIT.
1965         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1966         (__pthread_cond_timedwait): Likewise.
1967         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
1968         (FUTEX_CMP_REQUEUE): Define.
1969         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
1970         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
1971         Pass __futex value from before the unlock and __futex address instead
1972         of address of low 32-bits of __wakeup_seq to futex syscall.
1973         Fallback to FUTEX_WAKE all on any errors.
1975 2004-06-03  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1977         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_mutex_lock):
1978         Add nop to align the end of critical section.
1979         (lll_mutex_cond_lock, lll_mutex_timedlock): Likewise.
1981 2004-06-01  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1983         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
1984         Add __broadcast_seq field.
1985         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Mark
1986         all waiters as woken with woken_seq and bump broadcast counter.
1987         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use new
1988         __broadcast_seq.  Increment __woken_seq correctly when cleanuped.
1989         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
1990         Comment typo fixes.  Avoid returning -ETIMEDOUT.
1992 2004-06-01  Ulrich Drepper  <drepper@redhat.com>
1994         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
1995         (__condvar_tw_cleanup): Fix access to saved broadcast_seq value.
1996         Reported by Kaz Kojima.
1998 2004-05-25  Jakub Jelinek  <jakub@redhat.com>
2000         * sysdeps/unix/sysv/linux/aio_misc.h: New file.
2002 2004-05-21  Jakub Jelinek  <jakub@redhat.com>
2004         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Compare
2005         __broadcast_seq with bc_seq after acquiring internal lock instead of
2006         before it.
2008 2004-05-18  Jakub Jelinek  <jakub@redhat.com>
2010         * Makefile (.NOTPARALLEL): Only serialize make check/xcheck, not
2011         compilation.
2012         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
2013         (__pthread_cond_timedwait): Avoid returning -ETIMEDOUT.
2014         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
2015         (pthread_cond_t): Add __data.__broadcast_seq field.
2016         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
2017         (FRAME_SIZE): Define.
2018         (__pthread_cond_timedwait): Use it.  Store/check broadcast_seq.
2019         Comment typo fixes.
2020         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S (FRAME_SIZE):
2021         Define.
2022         (__pthread_cond_wait): Use it.  Store/check broadcast_seq.  Comment
2023         typo fixes.
2024         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
2025         (__pthread_cond_broadcast): Increment broadcast_seq.  Comment typo
2026         fixes.
2028 2004-05-18  Ulrich Drepper  <drepper@redhat.com>
2030         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add broadcast_seq entry.
2031         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
2032         Add __broadcast_seq field.
2033         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2034         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2035         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
2036         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
2037         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
2038         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Mark
2039         all waiters as woken with woken_seq and bump broadcast counter.
2040         * sysdeps/pthread/pthread_cond_broadcast.c: Likewise.
2041         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use new
2042         __broadcast_seq field.
2043         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2044         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
2045         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
2046         * pthread_cond_init.c: Initialize __broadcast_seq field.
2047         * Makefile (tests): Add tst-cond17 and tst-cond18.
2048         Add .NOTPARALLEL goal.
2049         * tst-cond16.c: New file.  From Jakub.
2050         * tst-cond17.c: New file.  From Jakub.
2051         * tst-cond18.c: New file.  From Jakub.
2053 2004-05-16  Ulrich Drepper  <drepper@redhat.com>
2055         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Correct some
2056         unwind info.
2058         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
2059         Parametrize frame size.  Correct some unwind info.
2060         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2062 2004-05-04  Jakub Jelinek  <jakub@redhat.com>
2064         * tst-stack3.c: Note testing functionality beyond POSIX.
2066 2004-05-04  Jakub Jelinek  <jakub@redhat.com>
2068         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (USE___THREAD):
2069         Change conditional from ifdef to if.
2071 2004-04-23  Jakub Jelinek  <jakub@redhat.com>
2073         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SYSDEP_CANCEL_ERRNO,
2074         SYSDEP_CANCEL_ERROR): Define.
2075         (PSEUDO): Use it.
2077 2004-05-01  Jakub Jelinek  <jakub@redhat.com>
2079         * Versions (libpthread): Remove __pthread_cleanup_upto@@GLIBC_PRIVATE.
2081 2004-04-20  Jakub Jelinek  <jakub@redhat.com>
2083         * sem_unlink.c (sem_unlink): Change EPERM into EACCES.
2085 2004-04-19  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2087         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Add frame info.
2088         Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
2089         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Remove unneeded frame
2090         info.  Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
2092 2004-04-19  Ulrich Drepper  <drepper@redhat.com>
2094         * sysdeps/unix/sysv/linux/timer_routines.c: Make sure helper
2095         thread has all signals blocked.
2097 2004-04-18  Andreas Jaeger  <aj@suse.de>
2099         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h
2100         (SEM_VALUE_MAX): Add missing brace.
2102 2004-04-17  Jakub Jelinek  <jakub@redhat.com>
2104         * sysdeps/pthread/Makefile (tests): Add tst-mqueue8x
2105         in rt subdir.
2106         (CFLAGS-tst-mqueue8x.c): Add -fexceptions.
2107         * sysdeps/pthread/tst-mqueue8x.c: New test.
2108         * tst-cancel4.c: Update comment about message queues.
2110         * sysdeps/pthread/timer_gettime.c (timer_gettime): For expired timer
2111         return it_value { 0, 0 }.
2112         * sysdeps/pthread/timer_create.c (timer_create): Handle SIGEV_NONE
2113         like SIGEV_SIGNAL.
2114         * sysdeps/pthread/timer_routines.c (thread_expire_timer): Remove
2115         assertion for SIGEV_NONE.
2116         (thread_attr_compare): Compare all attributes, not just a partial
2117         subset.
2119 2004-04-17  Jakub Jelinek  <jakub@redhat.com>
2121         * sysdeps/unix/sysv/linux/mq_notify.c: Include stdlib.h.
2123 2004-04-17  Ulrich Drepper  <drepper@redhat.com>
2125         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h (SEM_VALUE_MAX):
2126         Just use a plain number.
2127         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
2128         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
2129         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
2130         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
2131         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
2132         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
2133         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
2135 2004-04-16  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2137         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Remove unneeded
2138         frame info.
2139         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
2141 2004-04-15  Jakub Jelinek  <jakub@redhat.com>
2143         * sysdeps/unix/sysv/linux/timer_routines.c: Include errno.h.
2144         (timer_helper_thread): Use inline rt_sigtimedwait syscall instead
2145         of calling sigwaitinfo.
2147 2004-04-16  Ulrich Drepper  <drepper@redhat.com>
2149         * allocatestack.c (allocate_stack): Set reported_guardsize
2150         unconditionally.
2151         * pthread_getattr_np.c (pthread_getattr_np): Use
2152         reported_guardsize instead of guardsize.
2153         * descr.h (struct pthread): Add reported_guardsize field.
2155 2004-04-13  Jakub Jelinek  <jakub@redhat.com>
2157         * sysdeps/unix/sysv/linux/mq_notify.c: Shut up GCC warning.
2159 2004-04-12  Ulrich Drepper  <drepper@redhat.com>
2161         * sysdeps/unix/sysv/linux/mq-notify.c: New file.
2163 2004-04-08  Jakub Jelinek  <jakub@redhat.com>
2165         * sysdeps/unix/sysv/linux/bits/local_lim.h (MQ_PRIO_MAX): Define.
2166         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h (MQ_PRIO_MAX): Define.
2167         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h (MQ_PRIO_MAX): Define.
2168         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h (MQ_PRIO_MAX): Define.
2169         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
2170         Define.
2171         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
2172         (_POSIX_MESSAGE_PASSING): Define.
2173         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h
2174         (_POSIX_MESSAGE_PASSING): Define.
2175         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h
2176         (_POSIX_MESSAGE_PASSING): Define.
2178 2004-04-04  Ulrich Drepper  <drepper@redhat.com>
2180         * tst-context1.c (fct): Check whether correct stack is used.
2182 2004-04-03  Ulrich Drepper  <drepper@redhat.com>
2184         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Never use
2185         matching constraints for asm mem parameters.
2187         * tst-clock2.c (tf): Don't define unless needed.
2189 2004-03-30  H.J. Lu  <hongjiu.lu@intel.com>
2191         * Makefile (link-libc-static): Use $(static-gnulib) instead of
2192         $(gnulib).
2194 2004-03-30  Ulrich Drepper  <drepper@redhat.com>
2196         * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_deallocate_tsd.
2197         * init.c (pthread_functions): Add ptr__nptl_deallocate_tsd.
2198         * pthreadP.h: Declare __nptl_deallocate_tsd.
2199         * pthread_create.c (deallocate_tsd): Remove to __nptl_deallocate_tsd.
2200         Adjust caller.
2202         * Makefile (tests): Add tst-tsd5.
2203         * tst-tsd5.c: New file.
2205 2004-03-29  Ulrich Drepper  <drepper@redhat.com>
2207         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
2208         (__pthread_attr_setaffinity_old): Prepend GLIBC_ to version names
2209         is SHLIB_COMPAT check.
2210         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
2211         (__pthread_attr_getaffinity_old): Likewise.
2212         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
2213         (__pthread_getaffinity_old): Likewise.
2214         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
2215         (__pthread_setaffinity_old): Likewise.
2217 2004-03-26  Ulrich Drepper  <drepper@redhat.com>
2219         * allocatestack.c (_make_stacks_executable): Call
2220         _dl_make_stack_executable first.
2222 2004-03-24  Roland McGrath  <roland@redhat.com>
2224         * sysdeps/i386/pthread_spin_lock.c (pthread_spin_lock): Use "m"
2225         constraint instead of "0".
2227 2004-03-24  Ulrich Drepper  <drepper@redhat.com>
2229         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
2230         (lll_mutex_cond_trylock): Define as wrapper around __lll_cond_trylock.
2232         * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Reorganize
2233         code to avoid warning.
2235 2004-03-24  Andreas Jaeger  <aj@suse.de>
2237         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
2238         (__pthread_attr_setaffinity_old): Remove const.
2240 2004-03-23  Ulrich Drepper  <drepper@redhat.com>
2242         * sysdeps/unix/sysv/linux/smp.h: New file.
2243         * sysdeps/unix/sysv/linux/sh/smp.h: New file.
2244         * init.c: Define __is_smp.
2245         (__pthread_initialize_minimal_internal): Call is_smp_system to
2246         initialize __is_smp.
2247         * pthreadP.h: Declare __is_smp.
2248         Define MAX_ADAPTIVE_COUNT is necessary.
2249         * pthread_mutex_init.c: Add comment regarding __spins field.
2250         * pthread_mutex_lock.c: Implement adaptive mutex type.
2251         * pthread_mutex_timedlock.c: Likewise.
2252         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
2253         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
2254         Add __spins field.
2255         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
2256         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
2257         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2258         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
2259         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2260         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
2261         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2262         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define
2263         lll_mutex_cond_trylock.
2264         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2265         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
2266         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2267         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
2268         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
2269         Define BUSY_WAIT_NOP.
2270         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
2271         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2273         * tst-mutex5.c: Add support for testing adaptive mutexes.
2274         * tst-mutex7.c: Likewise.
2275         * tst-mutex5a.c: New file.
2276         * tst-mutex7a.c: New file.
2277         * Makefile (tests): Add tst-mutex5a and tst-mutex7a.
2279         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
2280         (__lll_mutex_timedlock_wait): Preserve r8 and r9 since the
2281         vgettimeofday call might destroy the content.
2283         * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use hint
2284         @pause in the loop.
2286         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
2287         No need to restrict type of ret.  Make it int.  Add comment.
2289         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
2290         Remove unnecessary setne instruction.
2292 2004-03-22  Jakub Jelinek  <jakub@redhat.com>
2294         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
2295         (__pthread_getaffinity_new): Use INT_MAX instead of UINT_MAX.
2296         * pthread_getattr_np.c (pthread_getattr_np): Double size every cycle.
2297         If realloc fails, break out of the loop.
2299 2004-03-20  Andreas Jaeger  <aj@suse.de>
2301         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
2302         (__pthread_setaffinity_old): Fix interface.
2303         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
2304         (__pthread_getaffinity_old): Likewise.
2306         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
2307         (__pthread_setaffinity_new): Remove duplicate declaration.
2309 2004-03-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2311         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Save
2312         the return value to a safe register.
2313         (CDISABLE): Set the function argument correctly.
2315 2004-03-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2317         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XCHG): Define.
2318         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
2319         Rewrite so that only one locked memory operation per round is needed.
2320         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
2321         (pthread_barrier_wait): After wakeup, release lock only when the
2322         last thread stopped using the barrier object.
2323         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
2324         (__pthread_cond_wait): Don't store mutex address if the current
2325         value is ~0l.  Add correct cleanup support and unwind info.
2326         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
2327         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
2328         (__pthread_cond_broadcast): Don't use requeue for pshared condvars.
2329         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Update comment.
2330         * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
2331         Add correct cleanup support and unwind info.
2332         * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
2333         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Add unwind
2334         information for syscall wrappers.
2336 2004-03-18  Ulrich Drepper  <drepper@redhat.com>
2338         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
2339         cpusetsize field, remove next.
2340         * sysdeps/pthread/pthread.h (pthread_getaffinity_np): Add new second
2341         parameter for size of the CPU set.
2342         (pthread_setaffinity_np): Likewise.
2343         (pthread_attr_getaffinity_np): Likewise.
2344         (pthread_attr_setaffinity_np): Likewise.
2345         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: Implement
2346         interface change, keep compatibility code.
2347         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
2348         * sysdeps/unix/sysv/linux/pthread_getaffinity.c: Likewise.
2349         * sysdeps/unix/sysv/linux/pthread_setaffinity.c: Likewise.
2350         * pthreadP.h: Remove hidden_proto for pthread_getaffinity_np.  Declare
2351         __pthread_getaffinity_np.
2352         * Versions: Add version for changed interfaces.
2353         * tst-attr3.c: Adjust test for interface change.
2354         * pthread_getattr_np.c: Query the kernel about the affinity mask with
2355         increasing buffer sizes.
2356         * pthread_attr_destroy.c: Remove unused list handling.
2357         * pthread_attr_init.c: Likewise.
2359 2004-03-17  Roland McGrath  <roland@redhat.com>
2361         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Pass missing
2362         first argument to clock_getres so we ever enable kernel timers.
2364 2004-03-15  Ulrich Weigand  <uweigand@de.ibm.com>
2366         * init.c (nptl_version): Add __attribute_used__ to nptl_version.
2368 2004-03-12  Richard Henderson  <rth@redhat.com>
2370         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Propagate
2371         oldvalue from CENABLE to CDISABLE.
2373 2004-03-12  Ulrich Drepper  <drepper@redhat.com>
2375         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define HOST_NAME_MAX.
2376         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
2377         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
2378         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
2380 2004-03-11  Richard Henderson  <rth@redhat.com>
2382         * sysdeps/alpha/tcb-offsets.sym (PID_OFFSET): New.
2383         * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: Save/restore PID.
2384         * sysdeps/unix/sysv/linux/alpha/vfork.S: New file.
2386 2004-03-11  Jakub Jelinek  <jakub@redhat.com>
2388         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Use jgnl
2389         instead of jnl instruction to jump to SYSCALL_ERROR_LABEL.
2390         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S (__vfork): Likewise.
2392 2004-03-11  Jakub Jelinek  <jakub@redhat.com>
2394         * forward.c (__pthread_cond_broadcast_2_0,
2395         __pthread_cond_destroy_2_0, __pthread_cond_init_2_0,
2396         __pthread_cond_signal_2_0, __pthread_cond_wait_2_0,
2397         __pthread_cond_timedwait_2_0): Use return 0 as defaction instead of 0.
2399 2004-03-11  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2401         * sysdeps/sh/tcb-offsets.sym: Add PID.
2402         * sysdeps/unix/sysv/linux/sh/pt-vfork.S: Properly handle PID cache.
2403         * sysdeps/unix/sysv/linux/sh/vfork.S: New file.
2405 2004-03-10  Ulrich Drepper  <drepper@redhat.com>
2407         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: No need to
2408         include <sysdep-cancel.h>, vfork is no cancellation point.
2409         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: Likewise.
2410         * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: Likewise.
2411         * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: Likewise.
2413 2004-03-10  Jakub Jelinek  <jakub@redhat.com>
2415         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Add
2416         libc_hidden_def.
2417         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
2418         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
2419         Likewise.
2420         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S (__vfork):
2421         Likewise.
2422         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
2423         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
2424         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Include tcb-offsets.h.
2425         * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Use DO_CALL instead
2426         of DO_CALL_VIA_BREAK.  Work around a gas problem.
2428         * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: Remove.
2429         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: New file.
2430         * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: New file.
2431         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: New file.
2432         * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: New file.
2433         * sysdeps/powerpc/tcb-offsets.sym: Add PID.
2435         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S (__vfork): Don't use
2436         a local register for saving old PID.  Negate PID in parent upon exit.
2438         * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: Include
2439         tcb-offsets.h.
2440         (__vfork): Negate PID if non-zero and set to INT_MIN if zero
2441         before syscall, set to the old value in the parent afterwards.
2442         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: New file.
2443         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: Include
2444         tcb-offsets.h.
2445         (__vfork): Negate PID if non-zero and set to INT_MIN if zero
2446         before syscall, set to the old value in the parent afterwards.
2447         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: New file.
2448         * sysdeps/s390/tcb-offsets.sym: Add PID.
2450         * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: Remove.
2451         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: New file.
2452         * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S: New file.
2453         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: New file.
2454         * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: New file.
2455         * sysdeps/sparc/tcb-offsets.sym: Add PID.
2457 2004-03-10  Andreas Schwab  <schwab@suse.de>
2459         * sysdeps/ia64/tcb-offsets.sym: Add PID.
2460         * sysdeps/unix/sysv/linux/ia64/vfork.S: New file.
2461         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Properly handle PID cache.
2463 2004-03-09  Jakub Jelinek  <jakub@redhat.com>
2465         * tst-cancel20.c (do_one_test): Clear in_sh_body first.
2466         * tst-cancel21.c (do_one_test): Likewise.
2467         Reported by Gordon Jin <gordon.jin@intel.com>.
2469 2004-02-09  Jakub Jelinek  <jakub@redhat.com>
2471         * sysdeps/unix/sysv/linux/i386/vfork.S (SAVE_PID): Negate PID
2472         if non-zero and set to INT_MIN if zero.
2473         * sysdeps/unix/sysv/linux/x86_64/vfork.S (SAVE_PID): Likewise.
2474         * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Include tcb-offsets.h.
2475         (SAVE_PID, RESTORE_PID): Define.
2476         (__vfork): Use it.
2477         * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: Include tcb-offsets.h.
2478         Use relative path to avoid including NPTL i386/vfork.S.
2479         (SAVE_PID, RESTORE_PID): Define.
2480         * sysdeps/unix/sysv/linux/raise.c: Include limits.h.
2481         (raise): Handle THREAD_SELF->pid INT_MIN the same as 0.
2482         * Makefile (tests): Add tst-vfork1, tst-vfork2, tst-vfork1x and
2483         tst-vfork2x.
2484         (tests-reverse): Add tst-vfork1x and tst-vfork2x.
2485         * tst-vfork1.c: New test.
2486         * tst-vfork2.c: New test.
2487         * tst-vfork1x.c: New test.
2488         * tst-vfork2x.c: New test.
2490 2004-03-08  Ulrich Drepper  <drepper@redhat.com>
2492         * sysdeps/i386/tcb-offsets.sym: Add PID.
2493         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
2494         * sysdeps/unix/sysv/linux/i386/vfork.S: New file.
2495         * sysdeps/unix/sysv/linux/x86_64/vfork.S: New file.
2497 2004-03-08  Steven Munroe  <sjmunroe@us.ibm.com>
2499         * sysdeps/unix/sysv/linux/powerpc/Versions: Remove leading tabs.
2501 2004-03-08  H.J. Lu  <hongjiu.lu@intel.com>
2503         * sysdeps/s390/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
2504         _rtld_global_ro.
2506 2004-03-07  Ulrich Drepper  <drepper@redhat.com>
2508         * sysdeps/ia64/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
2509         _rtld_global_ro.
2511         * tst-once4.c: Remove unnecessary macro definition.
2513         * tst-mutex7.c (do_test): Limit thread stack size.
2514         * tst-once2.c (do_test): Likewise.
2515         * tst-tls3.c (do_test): Likewise.
2516         * tst-tls1.c (do_test): Likewise.
2517         * tst-signal3.c (do_test): Likewise.
2518         * tst-kill6.c (do_test): Likewise.
2519         * tst-key4.c (do_test): Likewise.
2520         * tst-join4.c (do_test): Likewise.
2521         * tst-fork1.c (do_test): Likewise.
2522         * tst-context1.c (do_test): Likewise.
2523         * tst-cond2.c (do_test): Likewise.
2524         * tst-cond10.c (do_test): Likewise.
2525         * tst-clock2.c (do_test): Likewise.
2526         * tst-cancel10.c (do_test): Likewise.
2527         * tst-basic2.c (do_test): Likewise.
2528         * tst-barrier4.c (do_test): Likewise.
2530 2004-03-05  Ulrich Drepper  <drepper@redhat.com>
2532         * sysdeps/i386/tls.h: Use GLRO instead of GL where appropriate.
2534 2004-03-01  Ulrich Drepper  <drepper@redhat.com>
2536         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
2537         (__pthread_cond_timedwait): Optimize wakeup test.
2538         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
2539         (__pthread_cond_wait): Likewise.
2540         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
2541         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
2542         Likewise.
2544 2004-02-29  Ulrich Drepper  <drepper@redhat.com>
2546         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
2547         (__lll_mutex_lock_wait): Optimize a bit more.  Just one copy of
2548         the atomic instruction needed.
2549         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
2550         (__lll_mutex_lock_wait): Likewise.
2552 2004-02-28  Ulrich Drepper  <drepper@redhat.com>
2554         * Makefile (tests): Add tst-cond14 and tst-cond15.
2555         * tst-cond14.c: New file.
2556         * tst-cond15.c: New file.
2558 2004-02-27  Ulrich Drepper  <drepper@redhat.com>
2560         * sysdeps/pthread/createthread.c (create_thread): Remove use of
2561         CLONE_STOPPED.  We cannot use SIGCONT which means CLONE_STOPPED
2562         needs to be implemented differently to be useful.
2564 2004-02-26  Ulrich Drepper  <drepper@redhat.com>
2566         * pthread_attr_setschedparam.c: Don't test priority against limits
2567         here.  Set ATTR_FLAG_SCHED_SET flag.
2568         * pthread_attr_setschedpolicy.c: Set ATTR_FLAG_POLICY_SET flag.
2569         * pthread_create.c (__pthread_create_2_1): Copy scheduling attributes
2570         from parent thread to child.  If attribute is used and scheduling
2571         parameters are not inherited, copy parameters from attribute or
2572         compute them.  Check priority value.
2573         * pthread_getschedparam.c: If the parameters aren't known yet get
2574         them from the kernel.
2575         * pthread_setschedparam.c: Set ATTR_FLAG_SCHED_SET and
2576         ATTR_FLAG_POLICY_SET flag for thread.
2577         * sysdeps/unix/sysv/linux/internaltypes.h: Define ATTR_FLAG_SCHED_SET
2578         and ATTR_FLAG_POLICY_SET.
2580         * sysdeps/pthread/createthread.c: Use tgkill if possible.
2582         * pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr): Don't
2583         fail if stack address hasn't been set.  Just return 0.
2585 2004-02-25  Ulrich Drepper  <drepper@redhat.com>
2587         * Makefile (tests-nolibpthread): Add tst-unload.  Don't link with
2588         libpthread for the files in this list.
2589         (CFLAGS-tst-unload): Removed.
2590         * tst-unload.c (do_test): Don't use complete path for
2591         LIBPHREAD_SO.
2593         * Makefile: Define sonames for tst-tls5mod, tst-_res1mod1, and
2594         tst-_res1mod2.
2596 2004-02-22  Ulrich Drepper  <drepper@redhat.com>
2598         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
2599         (__lll_mutex_lock_wait): Rewrite so that only one locked memory
2600         operation per round is needed.
2601         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
2602         (__lll_mutex_lock_wait): Likewise.
2604 2004-02-20  Ulrich Drepper  <drepper@redhat.com>
2606         * tst-cancel9.c (cleanup): Don't print to stderr.
2608 2004-02-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2610         * sysdeps/sh/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Fix variable name.
2612 2004-02-20  Jakub Jelinek  <jakub@redhat.com>
2614         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
2615         (__syscall_error_handler2): Call CDISABLE.
2616         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
2617         (__syscall_error_handler2): Call CDISABLE.
2619         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
2620         Release lock before the loop, don't reacquire it.
2622         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h (DL_ARGV_NOT_RELRO): Define.
2624 2004-02-19  Andreas Schwab  <schwab@suse.de>
2626         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
2627         Fix last change.
2629 2004-02-18  Ulrich Drepper  <drepper@redhat.com>
2631         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
2632         (pthread_barrier_wait): After wakeup, release lock only when the
2633         last thread stopped using the barrier object.
2634         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S
2635         (pthread_barrier_wait): Likewise.
2636         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
2637         Likewise.
2638         * Makefile (tests): Add tst-barrier4.
2639         * tst-barrier4.c: New file.
2641         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
2642         (__pthread_cond_timedwait): Perform timeout test while holding
2643         internal lock to prevent wakeup race.
2644         Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
2645         * sysdeps/pthread/pthread_cond_timedwait.c
2646         (__pthread_cond_timedwait): Likewise.
2647         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
2648         (__pthread_cond_timedwait): Likewise.
2650 2004-02-18  Jakub Jelinek  <jakub@redhat.com>
2652         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S
2653         (__pthread_rwlock_unlock): Access WRITER as 32-bit value.
2654         * Makefile (tests): Add tst-rwlock13.
2655         * tst-rwlock13.c: New test.
2657 2004-02-16  Ulrich Drepper  <drepper@redhat.com>
2659         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
2660         (__condvar_tw_cleanup): Little optimization.
2661         Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
2663 2004-02-16  Steven Munroe  <sjmunroe@us.ibm.com>
2665         * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: Replace libc with
2666         libpthread as "lib" parameter to SHLIB_COMPAT.
2667         (__novmx_siglongjmp): Fix typo in function name.
2668         (__novmx_longjmp): Fix typo in function name.
2670 2004-02-13  Ulrich Drepper  <drepper@redhat.com>
2672         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Add a
2673         __builtin_expect.
2675         * sysdeps/generic/pt-longjmp.c: Moved to...
2676         * sysdeps/pthread/pt-longjmp.c: ...here.  New file.
2678 2004-01-29  Steven Munroe  <sjmunroe@us.ibm.com>
2680         * Makefile (libpthread-routines): Add pt-cleanup.
2681         * pt-longjmp.c: Removed.
2682         * pt-cleanup.c: Copied __pthread_cleanup_upto to here. New file.
2683         * sysdeps/generic/pt-longjmp.c: Copied longjmp to here. New file.
2684         * sysdeps/unix/sysv/linux/powerpc/Versions: New file.
2685         Version longjmp, siglongjmp for GLIBC_2.3.4.
2686         * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: New File.
2688 2004-02-13  Ulrich Drepper  <drepper@redhat.com>
2690         * sysdeps/pthread/pthread_cond_timedwait.c
2691         (__pthread_cond_timedwait): Optimize.  Drop internal lock earlier.
2692         Reuse code.  Add __builtin_expects.
2694         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
2695         (__pthread_cond_timedwait): Get internal lock in case timeout has
2696         passed before the futex syscall.
2697         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
2699 2004-01-20  Ulrich Drepper  <drepper@redhat.com>
2701         * allocatestack.c: Pretty printing.
2703         * sysdeps/pthread/createthread.c (create_thread): Don't add
2704         CLONE_DETACHED bit if it is not necessary.
2706 2004-01-16  Ulrich Drepper  <drepper@redhat.com>
2708         * pthread_getattr_np.c: Include ldsodefs.h.
2710 2004-01-16  Richard Henderson  <rth@redhat.com>
2712         * allocatestack.c: Don't declare __libc_stack_end.
2713         * init.c (__pthread_initialize_minimal_internal): Likewise.
2714         * pthread_getattr_np.c (pthread_getattr_np): Likewise.
2716 2004-01-15  Richard Henderson  <rth@redhat.com>
2718         * sysdeps/alpha/tls.h (tcbhead_t): Add private.
2719         (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE,
2720         TLS_PRE_TCB_SIZE, TLS_TCB_ALIGN, INSTALL_DTV, INSTALL_NEW_DTV,
2721         GET_DTV, THREAD_DTV, THREAD_SELF, DB_THREAD_SELF): Match ia64.
2722         (TLS_TCB_OFFSET, THREAD_ID, NO_TLS_OFFSET): Remove.
2723         (THREAD_GETMEM, THREAD_GETMEM_NC): Simplify.
2724         (THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
2725         * sysdeps/unix/sysv/linux/alpha/createthread.c (TLS_VALUE): Match ia64.
2727 2004-01-14  Ulrich Drepper  <drepper@redhat.com>
2729         * init.c (pthread_functions): Make array const.
2731 2004-01-13  Ulrich Drepper  <drepper@redhat.com>
2733         * allocatestack.c (__make_stacks_executable): Change interface.
2734         Check parameters.  Pass parameter on to libc counterpart.
2735         * pthreadP.h: Change declaration.
2737 2004-01-13  Richard Henderson  <rth@redhat.com>
2739         * pthread_attr_setstack.c (__old_pthread_attr_setstack): Use
2740         prototype form.
2741         * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize):
2742         Likewise.
2744         * sysdeps/alpha/Makefile: New file.
2745         * sysdeps/alpha/tcb-offsets.sym: New file.
2746         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
2747         Use MULTIPLE_THREADS_OFFSET to implement !libpthread !libc version.
2749         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Rewrite based
2750         on powerpc version.
2752 2004-01-08  Jakub Jelinek  <jakub@redhat.com>
2754         * Makefile (tests): Add tst-backtrace1.
2755         * tst-backtrace1.c: New test.
2757 2003-12-11  Ulrich Weigand  <uweigand@de.ibm.com>
2759         * sysdeps/alpha/tls.h (DB_THREAD_SELF): Pass bit size of thread
2760         register as second parameter to the REGISTER macro.
2761         * sysdeps/ia64/tls.h (DB_THREAD_SELF): Likewise.
2762         * sysdeps/powerpc/tls.h (DB_THREAD_SELF): Likewise.
2763         * sysdeps/sh/tls.h (DB_THREAD_SELF): Likewise.
2764         * sysdeps/sparc/tls.h (DB_THREAD_SELF): Likewise.
2765         * sysdeps/s390/tls.h (DB_THREAD_SELF): Pass __WORDSIZE as bit size
2766         of thread register as second parameter to REGISTER macro in 64 case.
2768 2004-01-03  Ulrich Drepper  <drepper@redhat.com>
2770         * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Removed.
2771         (CFLAGS-getpid.o): Defined.
2772         (CFLAGS-getpid.os): Defined.
2774 2003-12-31  Ulrich Drepper  <drepper@redhat.com>
2776         * pthread_getattr_np.c (pthread_getattr_np): Make sure stack info
2777         returned for main thread does not overlap with any other VMA.
2778         Patch by Jakub Jelinek.
2780 2003-12-29  Jakub Jelinek  <jakub@redhat.com>
2782         * tst-raise1.c: Include stdio.h.
2784 2003-12-23  Jakub Jelinek  <jakub@redhat.com>
2786         * sysdeps/unix/sysv/linux/raise.c (raise): Protect pid = selftid
2787         setting with __ASSUME_TGKILL || defined __NR_tgkill.
2788         If pid is 0, set it to selftid.
2789         * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Make inline.
2790         Don't set self->pid but self->tid.  If self->pid == 0 and self->tid
2791         != 0, return self->tid without doing a syscall.
2792         * descr.h (struct pthread): Move pid field after tid.
2794         * Makefile (tests): Add tst-raise1.
2795         * tst-raise1.c: New file.
2797 2003-12-23  Roland McGrath  <roland@redhat.com>
2799         * tst-oddstacklimit.c: New file.
2800         * Makefile (tests): Add it.
2801         (tst-oddstacklimit-ENV): New variable.
2803         * init.c (__pthread_initialize_minimal_internal): Round stack rlimit
2804         value up to page size for __default_stacksize.
2806 2003-12-21  Ulrich Drepper  <drepper@redhat.com>
2808         * Makefile (tests): Add tst-eintr5.
2809         * tst-eintr5.c: New file.
2811         * eintr.c (eintr_source): Prevent sending signal to self.
2813         * tst-eintr2.c (tf1): Improve error message.
2815 2003-12-20  Ulrich Drepper  <drepper@redhat.com>
2817         * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Define.
2818         * sysdeps/unix/sysv/linux/getpid.c: New file.
2819         * pthread_cancel.c: Add comment explaining use of PID field.
2820         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
2821         * pthread_getattr_np.c: Use abs() when comparing PID and TID fields.
2822         * sysdeps/unix/sysv/linux/fork.c: Negate PID field of parent
2823         temporarily to signal the field must not be relied on and updated
2824         by getpid().
2825         * sysdeps/unix/sysv/linux/pt-raise.c: Handle case where PID is
2826         temporarily negative.
2827         * sysdeps/unix/sysv/linux/raise.c: Likewise.
2829 2003-12-19  Ulrich Drepper  <drepper@redhat.com>
2831         * eintr.c (setup_eintr): Add new parameter.  Pass to thread function.
2832         (eintr_source): If ARG != NULL, use pthread_kill.
2833         * tst-eintr1.c: Adjust for this change.
2834         * tst-eintr2.c: Likewise.
2835         * Makefile (tests): Add tst-eintr3 and tst-eintr4.
2836         * tst-eintr3.c: New file.
2837         * tst-eintr4.c: New file.
2839 2003-12-19  Jakub Jelinek  <jakub@redhat.com>
2841         * libc-cancellation.c (__libc_enable_asynccancel): Don't cancel
2842         if CANCELSTATE_BITMASK is set.
2843         * sysdeps/pthread/librt-cancellation.c (__librt_enable_asynccancel):
2844         Likewise.
2846         * Makefile (tests): Add tst-cancel22 and tst-cancel23.
2847         (tests-reverse): Add tst-cancel23.
2848         * tst-cancel22.c: New test.
2849         * tst-cancel23.c: New test.
2851 2003-12-18  Ulrich Drepper  <drepper@redhat.com>
2853         * tst-eintr1.c: Better error messages.
2855         * Makefile (tests): Add tst-eintr2.
2856         * tst-eintr2.c: New file.
2858 2003-12-18  Jakub Jelinek  <jakub@redhat.com>
2860         * Makefile (tests): Add tst-cancel21 and tst-cancelx21.
2861         (CFLAGS-tst-cancelx21.c): Set.
2862         * tst-cancel21.c: New test.
2863         * tst-cancelx21.c: New test.
2865         * unwind.c (FRAME_LEFT): Add adj argument.  Subtract it from each
2866         comparison operand.
2867         (unwind_stop): Use _JMPBUF_CFA_UNWINDS_ADJ macro instead of
2868         _JMPBUF_CFA_UNWINDS.  Adjust FRAME_LEFT invocations.
2869         * pt-longjmp.c: Include jmpbuf-unwind.h.
2870         (__pthread_cleanup_upto): Use _JMPBUF_UNWINDS_ADJ macro instead of
2871         _JMPBUF_UNWINDS.  Adjust compared pointers.
2872         * init.c (__pthread_initialize_minimal_internal): Initialize
2873         pd->stackblock_size.
2874         * sysdeps/pthread/jmpbuf-unwind.h: Removed.
2875         * sysdeps/alpha/jmpbuf-unwind.h: New file.
2876         * sysdeps/i386/jmpbuf-unwind.h: New file.
2877         * sysdeps/powerpc/jmpbuf-unwind.h: New file.
2878         * sysdeps/s390/jmpbuf-unwind.h: New file.
2879         * sysdeps/sh/jmpbuf-unwind.h: New file.
2880         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: New file.
2881         * sysdeps/x86_64/jmpbuf-unwind.h: New file.
2882         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Include stdint.h.
2883         (_JMPBUF_CFA_UNWINDS): Remove.
2884         (_JMPBUF_CFA_UNWINDS_ADJ, _JMPBUF_UNWINDS_ADJ): Define.
2886 2003-12-12  Jakub Jelinek  <jakub@redhat.com>
2888         * Makefile (tests): Add tst-cancel20 and tst-cancelx20.
2889         (CFLAGS-tst-cancelx20.c): Set.
2890         * tst-cancel20.c: New test.
2891         * tst-cancelx20.c: New test.
2893 2003-12-17  Ulrich Drepper  <drepper@redhat.com>
2895         * init.c (__pthread_initialize_minimal_internal): Don't treat
2896         architectures with separate register stack special here when
2897         computing default stack size.
2899 2003-12-17  Roland McGrath  <roland@redhat.com>
2901         * Makefile (tst-cancelx7-ARGS): New variable.
2902         Reportd by Greg Schafer <gschafer@zip.com.au>.
2904 2003-12-17  Jakub Jelinek  <jakub@redhat.com>
2906         * Makefile (tests): Add tst-stack3.  Depend on $(objpfx)tst-stack3-mem.
2907         (generated): Add tst-stack3.mtrace and tst-stack3-mem.
2908         (tst-stack3-ENV): Set.
2909         ($(objpfx)tst-stack3-mem): New.
2910         * tst-stack3.c: New test.
2912 2003-12-10  David Mosberger  <davidm@hpl.hp.com>
2914         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init_EPILOG_BEGINS):
2915         Add unwind directives.  Drop unused .regstk directive.
2916         (_fini_EPILOG_BEGINS): Add unwind directives.
2918 2003-12-11  Ulrich Drepper  <drepper@redhat.com>
2920         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
2921         Assume parameter is a pointer.
2922         (lll_futex_wake): Likewise.
2923         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_wait):
2924         Likewise.
2925         (lll_futex_wake): Likewise.
2926         Reported by Boris Hu.
2927         * sysdeps/unix/sysv/linux/unregister-atfork.c
2928         (__unregister_atfork): Pass pointer to refcntr to lll_futex_wait.
2930         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Simplify a bit.
2932 2003-12-10  Ulrich Drepper  <drepper@redhat.com>
2934         * sysdeps/pthread/bits/libc-lock.h (__rtld_lock_initialize): Define.
2935         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Call
2936         __rtld_lock_initialize for ld.so lock.
2937         Patch in part by Adam Li <adam.li@intel.com>.
2939 2003-12-02  David Mosberger  <davidm@hpl.hp.com>
2941         * Makefile (link-libc-static): Remove -lgcc_eh---it's already mentioned
2942         in $(gnulib).  Also, remove stale comment.
2944 2003-11-12  David Mosberger  <davidm@hpl.hp.com>
2946         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Take
2947         advantage of new syscall stub and optimize accordingly.
2949         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__NR_futex): Rename
2950         from SYS_futex, to match expectations of
2951         sysdep.h:DO_INLINE_SYSCALL.
2952         (lll_futex_clobbers): Remove.
2953         (lll_futex_timed_wait): Rewrite in terms of DO_INLINE_SYSCALL.
2954         (lll_futex_wake): Likewise.
2955         (lll_futex_requeue): Likewise.
2956         (__lll_mutex_trylock): Rewrite to a macro, so we can include this
2957         file before DO_INLINE_SYSCALL is defined (proposed by Jakub
2958         Jelinek).
2959         (__lll_mutex_lock): Likewise.
2960         (__lll_mutex_cond_lock): Likewise.
2961         (__lll_mutex_timed_lock): Likewise.
2962         (__lll_mutex_unlock): Likewise.
2963         (__lll_mutex_unlock_force): Likewise.
2965         * sysdeps/ia64/tls.h: Move declaration of __thread_self up so it
2966         comes before the include of <sysdep.h>.
2967         (THREAD_SELF_SYSINFO): New macro.
2968         (THREAD_SYSINFO): Likewise.
2969         (INIT_SYSINFO): New macro.
2970         (TLS_INIT_TP): Call INIT_SYSINFO.
2972         * sysdeps/ia64/tcb-offsets.sym: Add SYSINFO_OFFSET.
2974         * sysdeps/pthread/createthread.c (create_thread): Use
2975         THREAD_SELF_SYSINFO and THREAD_SYSINFO instead of open code.
2976         * allocatestack.c (allocate_stack): Use THREAD_SYSINFO and
2977         THREAD_SELF_SYSINFO instead of open code.
2978         * sysdeps/i386/tls.h (THREAD_SELF_SYSINFO): New macro.
2979         (THREAD_SYSINFO): Likewise.
2981         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: New file.
2983         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Work around gas problem.
2985 2003-12-06  Ulrich Drepper  <drepper@redhat.com>
2987         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Use .init_array
2988         instead of .init.  Patch by David Mosberger.
2990 2003-11-30  Thorsten Kukuk  <kukuk@suse.de>
2992         * sysdeps/pthread/configure.in: Remove broken declaration in C
2993         cleanup handling check.
2995 2003-11-30  Andreas Jaeger  <aj@suse.de>
2997         * Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time).
2998         * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
2999         Likewise.
3001 2003-11-27  Jakub Jelinek  <jakub@redhat.com>
3003         * sysdeps/unix/sysv/linux/internaltypes.h (ATTR_FLAG_OLDATTR): Define.
3004         * pthread_attr_destroy.c: Include shlib-compat.h.
3005         (__pthread_attr_destroy): Return immediately if ATTR_FLAG_OLDATTR
3006         is set in iattr->flags.
3007         * pthread_attr_init.c (__pthread_attr_init_2_0): Set ATTR_FLAG_OLDATTR.
3009 2003-11-21  Jakub Jelinek  <jakub@redhat.com>
3011         * Makefile (distribute): Add tst-cleanup4aux.c.
3013         * tst-cond12.c (prepare): Add prototype.  Move after test-skeleton.c
3014         include.
3016 2003-11-21  Ulrich Drepper  <drepper@redhat.com>
3018         * tst-cond12.c (do_test): If USE_COND_SIGNAL is defined, use
3019         pthread_cond_signal.
3021         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Don't
3022         store mutex address if the current value is ~0l.
3023         * sysdeps/pthread/pthread_cond_timedwait.c
3024         (__pthread_cond_timedwait): Likewise.
3025         * sysdeps/pthread/pthread_cond_broadcast.c
3026         (__pthread_cond_broadcast): Don't use requeue for pshared
3027         condvars.
3029         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
3030         (__pthread_cond_wait): Don't store mutex address if the current
3031         value is ~0l.
3032         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
3033         (__pthread_cond_timedwait): Likewise.
3034         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
3035         (__pthread_cond_broadcast): Don't use requeue for pshared
3036         condvars.
3038         * pthread_cond_init.c (__pthread_cond_init): Initialize __mutex
3039         element with ~0l for pshared condvars, with NULL otherwise.
3041         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
3042         (__pthread_cond_wait): Don't store mutex address if the current
3043         value is ~0l.
3044         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
3045         (__pthread_cond_timedwait): Likewise.
3046         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
3047         (__pthread_cond_broadcast): Don't use requeue for pshared
3048         condvars.
3050         * Makefile: Add rules to build and run tst-cond12 and tst-cond13.
3051         * tst-cond12.c: New file.
3052         * tst-cond13.c: New file.
3054 2003-11-17  Ulrich Drepper  <drepper@redhat.com>
3056         * sysdeps/pthread/configure.in: Make missing forced unwind support
3057         fatal.
3059 2003-11-11  Ulrich Drepper  <drepper@redhat.com>
3061         * pthreadP.h: Don't declare __pthread_unwind as weak inside libpthread.
3063 2003-11-06  Ulrich Drepper  <drepper@redhat.com>
3065         * Makefile: Add magic to clean up correctly.
3067 2003-11-05  Jakub Jelinek  <jakub@redhat.com>
3069         * unwind.c (FRAME_LEFT): Define.
3070         (unwind_stop): Handle old style cleanups here.
3071         (__pthread_unwind): Handle old style cleanups only if
3072         !HAVE_FORCED_UNWIND.
3073         * Makefile (tests): Add tst-cleanup4 and tst-cleanupx4.
3074         (CFLAGS-tst-cleanupx4.c): Add -fexceptions.
3075         ($(objpfx)tst-cleanup4): Depend on $(objpfx)tst-cleanup4aux.o.
3076         ($(objpfx)tst-cleanupx4): Likewise.
3077         * tst-cleanup4.c: New test.
3078         * tst-cleanup4aux.c: New.
3079         * tst-cleanupx4.c: New test.
3081 2003-11-04  Ulrich Drepper  <drepper@redhat.com>
3083         * sysdeps/pthread/bits/stdio-lock.h: Use lll_*lock instead of
3084         lll_mutex_*lock macros to skip atomic operations on some archs.
3086 2003-11-03  Ulrich Drepper  <drepper@redhat.com>
3088         * sysdeps/pthread/tst-timer.c (main): Initialize
3089         sigev2.sigev_value as well.
3091 2003-10-15  Roland McGrath  <roland@redhat.com>
3093         * sysdeps/pthread/configure.in: Barf if visibility attribute support
3094         is missing.
3095         * sysdeps/pthread/configure: Regenerated.
3097 2003-10-09  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3099         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Completely revamp the
3100         locking macros.  No distinction between normal and mutex locking
3101         anymore.
3102         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Rewrite mutex locking.
3103         Merge bits from lowlevelmutex.S we still need.
3104         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Remove.
3105         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
3106         * sysdeps/unix/sysv/linux/sh/not-cancel.h: New file.
3107         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Adjust for
3108         new mutex implementation.
3109         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Likewise.
3110         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
3111         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
3112         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
3113         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
3114         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
3115         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
3116         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
3117         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
3118         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO): Also defined
3119         symbol for entry point to avoid cancellation.
3121 2003-10-07  Jakub Jelinek  <jakub@redhat.com>
3123         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Backout 2003-10-02
3124         changes.
3125         (SAVE_OLDTYPE_0): Fix a typo.
3127 2003-10-03  Ulrich Drepper  <drepper@redhat.com>
3129         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
3130         Check __sigsetjmp return value.  Reported by Daniel Jacobowitz.
3132 2003-10-02  Ulrich Drepper  <drepper@redhat.com>
3134         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (DOCARGS_1): Use
3135         correct offset.
3137 2003-10-02  Jakub Jelinek  <jakub@redhat.com>
3139         * Makefile (tests): Add tst-cancel19.
3140         * tst-cancel19.c: New test.
3142 2003-10-02  Ulrich Drepper  <drepper@redhat.com>
3144         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix saving and
3145         restoring of the old cancellation type.
3147 2003-09-30  Jakub Jelinek  <jakub@redhat.com>
3149         * sysdeps/pthread/malloc-machine.h: Remove misleading comment.
3151 2003-09-27  Wolfram Gloger  <wg@malloc.de>
3153         * sysdeps/pthread/malloc-machine.h: New file
3155 2003-09-24  Roland McGrath  <roland@redhat.com>
3157         * allocatestack.c (__make_stacks_executable): Don't ignore return
3158         value from _dl_make_stack_executable.
3160 2003-09-24  Ulrich Drepper  <drepper@redhat.com>
3162         * allocatestack.c (__make_stacks_executable): Also change
3163         permission of the currently unused stacks.
3165         * allocatestack.c (change_stack_perm): Split out from
3166         __make_stacks_executable.
3167         (allocate_stack): If the required permission changed between the time
3168         we started preparing the stack and queueing it, change the permission.
3169         (__make_stacks_executable): Call change_stack_perm.
3171         * Makefile: Build tst-execstack-mod locally.
3172         * tst-execstack-mod.c: New file.
3174 2003-09-23  Jakub Jelinek  <jakub@redhat.com>
3176         * Makefile (tests): Only add tst-execstack if have-z-execstack is yes.
3178 2003-09-23  Roland McGrath  <roland@redhat.com>
3180         * tst-execstack.c: New file.
3181         * Makefile (tests): Add it.
3182         ($(objpfx)tst-execstack, $(objpfx)tst-execstack.out): New targets.
3183         (LDFLAGS-tst-execstack): New variable.
3185         * allocatestack.c (allocate_stack): Use GL(dl_stack_flags) to decide
3186         whether to use PROT_EXEC for stack mmap.
3187         (__make_stacks_executable): New function.
3188         * pthreadP.h: Declare it.
3189         * init.c (__pthread_initialize_minimal_internal): Set
3190         GL(dl_make_stack_executable_hook) to that.
3192 2003-09-22  Ulrich Drepper  <drepper@redhat.com>
3194         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Adjust for latest
3195         recommendation from AMD re avoidance of lock prefix.
3197 2003-09-22  Jakub Jelinek  <jakub@redhat.com>
3199         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait): Use
3200         lll_futex_timed_wait instead of lll_futex_wait.
3201         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Removed.
3202         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Removed.
3203         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: Removed.
3204         * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: Removed.
3205         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Removed.
3206         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Removed.
3207         * sysdeps/unix/sysv/linux/s390/sem_post.c: Removed.
3208         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Removed.
3209         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Include atomic.h.
3210         Completely revamp the locking macros.  No distinction between
3211         normal and mutex locking anymore.
3212         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
3213         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock_wait,
3214         __lll_lock_timedwait): Fix prototypes.
3215         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_lock_wait,
3216         __lll_lock_timedwait): Likewise.
3217         (lll_mutex_lock, lll_mutex_cond_lock): Use _val instead of _bool
3218         macros, add __builtin_expect.
3219         (lll_mutex_timedlock): Likewise.  Fix return value.
3220         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Removed.
3221         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: Removed.
3222         * sysdeps/unix/sysv/linux/i386/i586/lowlevelmutex.S: Removed.
3223         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: Removed.
3224         * sysdeps/unix/sysv/linux/i386/i686/lowlevelmutex.S: Removed.
3225         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: Removed.
3226         * sysdeps/unix/sysv/linux/lowlevelmutex.c: Removed.
3227         * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: Removed.
3229 2003-09-22  Ulrich Drepper  <drepper@redhat.com>
3231         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
3232         (__lll_mutex_lock_wait): Minor optimization to avoid one atomic
3233         operation if possible.
3235         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Don't play tricks
3236         like jumping over the lock prefix.
3238 2003-09-21  Ulrich Drepper  <drepper@redhat.com>
3240         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Completely revamp the
3241         locking macros.  No distinction between normal and mutex locking
3242         anymore.
3243         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
3244         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
3245         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
3246         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Rewrite mutex
3247         locking.  Merge bits from lowlevelmutex.S we still need.
3248         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
3249         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
3250         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Removed.
3251         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Removed.
3252         * Makefile (routines): Remove libc-lowlevelmutex.
3253         (libpthread-rountines): Remove lowlevelmutex.
3254         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Adjust
3255         for new mutex implementation.
3256         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
3257         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3258         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
3259         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
3260         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
3261         Likewise.
3262         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
3263         Likewise.
3264         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
3265         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
3266         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise
3267         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
3268         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3269         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3270         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
3271         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
3272         Likewise.
3273         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3274         Likewise.
3275         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
3276         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
3277         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
3278         Don't use requeue.
3279         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
3280         * sysdeps/pthread/pthread_cond_signal.c: Don't use requeue.
3282 2003-09-20  Ulrich Drepper  <drepper@redhat.com>
3284         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't match memory
3285         in parameters of asm with output parameters.
3287         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Change
3288         type of DECR parameter to int.
3289         * pthreadP.h: Adjust prototype of __pthread_mutex_unlock_usercnt.
3291 2003-09-18  Jakub Jelinek  <jakub@redhat.com>
3293         * tst-attr3.c (tf, do_test): Print stack start/end/size and
3294         guardsize for each thread.
3296 2003-09-17  Jakub Jelinek  <jakub@redhat.com>
3298         * sysdeps/pthread/pthread.h (pthread_getattr_np): Clarify usage.
3299         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
3300         (pthread_attr_setaffinity_np): Handle cpuset == NULL.
3302         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
3303         (pthread_attr_getaffinity_np): Don't segfault if iattr->cpuset is
3304         NULL.
3305         * pthread_getattr_np.c: Set cpuset using pthread_getaffinity_np.
3306         * pthreadP.h (pthread_getaffinity_np): Add hidden_proto.
3307         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
3308         (pthread_getaffinity_np): Add hidden_def.
3310         * Makefile (tests): Add tst-attr3.
3311         * tst-attr3.c: New test.
3313         * sysdeps/i386/Makefile (CFLAGS-tst-align.c): Remove.
3315 2003-09-15  Jakub Jelinek  <jakub@redhat.com>
3317         * sysdeps/i386/Makefile (CFLAGS-pthread_create.c,
3318         CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
3320 2003-09-17  Jakub Jelinek  <jakub@redhat.com>
3322         * Makefile (CFLAGS-tst-align.c): Add $(stack-align-test-flags).
3323         * tst-align.c: Include tst-stack-align.h.
3324         (tf, do_test): Use TEST_STACK_ALIGN macro.
3326 2003-09-17  Ulrich Drepper  <drepper@redhat.com>
3328         * pthread_attr_init.c (__pthread_attr_init_2_0): Remove unused
3329         variable.
3331 2003-09-16  Ulrich Drepper  <drepper@redhat.com>
3333         * pthread_getattr_np.c (pthread_getattr_np): Correctly fill in the
3334         stack-related values for the initial thread.
3336 2003-09-15  Jakub Jelinek  <jakub@redhat.com>
3338         * Makefile (CFLAGS-pthread_once.c): Add $(uses-callbacks).
3340 2003-09-11  Ulrich Drepper  <drepper@redhat.com>
3342         * pthread_mutex_lock.c: Minor code rearrangements.
3344 2003-09-05  Roland McGrath  <roland@redhat.com>
3346         * pthread_create.c (__pthread_pthread_sizeof_descr): Removed.
3347         Instead, include ../nptl_db/db_info.c to do its magic.
3348         * pthread_key_create.c (__pthread_pthread_keys_max): Removed.
3349         (__pthread_pthread_key_2ndlevel_size): Likewise.
3350         * sysdeps/alpha/tls.h (DB_THREAD_SELF): New macro.
3351         * sysdeps/i386/tls.h (DB_THREAD_SELF): New macro.
3352         * sysdeps/ia64/tls.h (DB_THREAD_SELF): New macro.
3353         * sysdeps/powerpc/tls.h (DB_THREAD_SELF): New macro.
3354         * sysdeps/s390/tls.h (DB_THREAD_SELF): New macro.
3355         * sysdeps/sh/tls.h (DB_THREAD_SELF): New macro.
3356         * sysdeps/sparc/tls.h (DB_THREAD_SELF): New macro.
3357         * sysdeps/x86_64/tls.h (DB_THREAD_SELF): New macro.
3358         * sysdeps/alpha/td_ta_map_lwp2thr.c: File removed.
3359         * sysdeps/generic/td_ta_map_lwp2thr.c: File removed.
3360         * sysdeps/i386/td_ta_map_lwp2thr.c: File removed.
3361         * sysdeps/ia64/td_ta_map_lwp2thr.c: File removed.
3362         * sysdeps/powerpc/td_ta_map_lwp2thr.c: File removed.
3363         * sysdeps/s390/td_ta_map_lwp2thr.c: File removed.
3364         * sysdeps/sh/td_ta_map_lwp2thr.c: File removed.
3365         * sysdeps/sparc/td_ta_map_lwp2thr.c: File removed.
3366         * sysdeps/x86_64/td_ta_map_lwp2thr.c: File removed.
3368 2003-09-08  Ulrich Drepper  <drepper@redhat.com>
3370         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Change type
3371         of pthread_t to be compatible with LT.
3372         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
3373         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
3374         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3375         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3376         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
3377         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3378         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
3380 2003-09-04  Ulrich Drepper  <drepper@redhat.com>
3382         * sysdeps/unix/sysv/linux/i386/not-cancel.h (fcntl_not_cancel): Define.
3384 2003-09-04  Jakub Jelinek  <jakub@redhat.com>
3386         * unwind-forcedunwind.c: Move to...
3387         * sysdeps/pthread/unwind-forcedunwind.c: ...here.
3388         (pthread_cancel_init): Use ARCH_CANCEL_INIT if defined.
3389         * sysdeps/pthread/jmpbuf-unwind.h: New file.
3390         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: New file.
3391         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: New file.
3392         * unwind.c: Include jmpbuf-unwind.h.
3393         (unwind_stop): Use _JMPBUF_CFA_UNWINDS macro.
3395 2003-09-02  Jakub Jelinek  <jakub@redhat.com>
3397         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: New file.
3398         * sysdeps/unix/sysv/linux/ia64/Versions (libpthread): Export
3399         pthread_attr_setstack and pthread_attr_setstacksize @@GLIBC_2.3.3.
3400         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: New file.
3401         * sysdeps/unix/sysv/linux/alpha/Versions: New file.
3402         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: New file.
3403         * sysdeps/unix/sysv/linux/sparc/Versions: New file.
3404         * pthread_attr_setstack.c (__old_pthread_attr_setstack): New function.
3405         (pthread_attr_setstack): If PTHREAD_STACK_MIN != 16384, export
3406         as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.2.
3407         * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize): New
3408         function.
3409         (pthread_attr_setstacksize): If PTHREAD_STACK_MIN != 16384, export
3410         as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.1.
3411         * Makefile (tests): Add tst-stack2.
3412         * tst-stack2.c: New test.
3413         * tst-stack1.c: Include limits.h and sys/param.h.
3414         (do_test): Set size to MAX (4 * getpagesize (), PTHREAD_STACK_MIN).
3416         * pthread_condattr_setpshared.c: Include errno.h.
3417         (pthread_condattr_setpshared): Return EINVAL if pshared
3418         is neither PTHREAD_PROCESS_PRIVATE nor PTHREAD_PROCESS_SHARED.
3420         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Also
3421         defined symbol for entry point to avoid cancellation.
3422         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
3423         Likewise.
3424         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
3425         Likewise.
3426         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
3427         Likewise.
3428         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h (PSEUDO):
3429         Likewise.
3430         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
3431         Likewise.
3432         * sysdeps/unix/sysv/linux/i386/not-cancel.h (__open_nocancel,
3433         __close_nocancel, __read_nocancel, __write_nocancel,
3434         __waitpid_nocancel): Add attribute_hidden.  If not in libc.so,
3435         libpthread.so or librt.so, define to corresponding function
3436         without _nocancel suffix.
3437         * sysdeps/unix/sysv/linux/s390/not-cancel.h: New file.
3438         * sysdeps/unix/sysv/linux/powerpc/not-cancel.h: New file.
3439         * sysdeps/unix/sysv/linux/sparc/not-cancel.h: New file.
3441         * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: Fix a typo.
3443 2003-09-02  Ulrich Drepper  <drepper@redhat.com>
3445         * sysdeps/unix/sysv/linux/i386/not-cancel.h: New file.
3446         * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: New file.
3448         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Make sure the code
3449         in subsections has a symbol associated with it.
3451         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Also
3452         defined symbol for entry point to avoid cancellation.
3453         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Likewise.
3455 2003-09-01  Jakub Jelinek  <jakub@redhat.com>
3457         * Makefile (tests): Add tst-tls5.
3458         (module-names): Add tst-tls5mod{,a,b,c,d,e,f}.
3459         ($(objpfx)tst-tls5mod{,a,b,c,d,e,f}.so-no-z-defs): Set to yes.
3460         ($(objpfx)tst-tls5): New.
3461         ($(objpfx)tst-tls6.out): Likewise.
3462         (tests): Depend on $(objpfx)tst-tls6.out.
3463         * tst-tls3.c: Include stdint.h and pthreaddef.h.
3464         (do_test): Check pthread_self () return value alignment.
3465         * tst-tls3mod.c: Include stdint.h and pthreaddef.h.
3466         (tf): Check pthread_self () return value alignment.
3467         * tst-tls5.c: New test.
3468         * tst-tls5.h: New.
3469         * tst-tls5mod.c: New.
3470         * tst-tls5moda.c: New.
3471         * tst-tls5modb.c: New.
3472         * tst-tls5modc.c: New.
3473         * tst-tls5modd.c: New.
3474         * tst-tls5mode.c: New.
3475         * tst-tls5modf.c: New.
3476         * tst-tls6.sh: New test.
3478         * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Add
3479         ptr___pthread_cond_timedwait and ptr___pthread_cond_timedwait_2_0.
3480         * init.c (pthread_functions): Initialize them.
3481         * forward.c (pthread_cond_timedwait@GLIBC_2.0,
3482         pthread_cond_timedwait@@GLIBC_2.3.2): New forwards.
3483         * Versions (libc): Export pthread_cond_timedwait@GLIBC_2.0,
3484         pthread_cond_timedwait@@GLIBC_2.3.2.
3486 2003-09-01  Jakub Jelinek  <jakub@redhat.com>
3488         * sysdeps/unix/sysv/linux/alpha/timer_create.c: New file.
3489         * sysdeps/unix/sysv/linux/alpha/timer_delete.c: New file.
3490         * sysdeps/unix/sysv/linux/alpha/timer_getoverr.c: New file.
3491         * sysdeps/unix/sysv/linux/alpha/timer_gettime.c: New file.
3492         * sysdeps/unix/sysv/linux/alpha/timer_settime.c: New file.
3493         * sysdeps/unix/sysv/linux/alpha/Versions: New file.
3495         * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
3497         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Define
3498         _POSIX_THREAD_PRIORITY_SCHEDULING.
3499         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
3501 2003-08-31  Ulrich Drepper  <drepper@redhat.com>
3503         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock): Avoid
3504         nested function, use static inline function from libio.h.
3505         Code by Richard Henderson.
3507         * sysdeps/pthread/bits/libc-lock.h: Mark pthread_setcancelstate as
3508         weak.
3510 2003-08-30  Jakub Jelinek  <jakub@redhat.com>
3512         * sysdeps/unix/sysv/linux/sparc/sparc64/Versions: New file.
3513         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_create.c: New file.
3514         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_delete.c: New file.
3515         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_getoverr.c: New file.
3516         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_gettime.c: New file.
3517         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_settime.c: New file.
3518         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
3519         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
3520         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: New file.
3521         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: New file.
3522         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: New file.
3523         * sysdeps/unix/sysv/linux/sparc/pthread_once.c: New file.
3524         * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: New file.
3525         * sysdeps/unix/sysv/linux/sparc/fork.c: New file.
3526         * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
3527         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: New file.
3528         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: New file.
3529         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: New file.
3530         * sysdeps/sparc/sparc32/pthread_spin_lock.c: New file.
3531         * sysdeps/sparc/sparc32/pthread_spin_trylock.c: New file.
3532         * sysdeps/sparc/sparc32/pthreaddef.h: New file.
3533         * sysdeps/sparc/sparc64/pthread_spin_lock.c: New file.
3534         * sysdeps/sparc/sparc64/pthread_spin_trylock.c: New file.
3535         * sysdeps/sparc/sparc64/pthread_spin_unlock.c: New file.
3536         * sysdeps/sparc/sparc64/pthreaddef.h: New file.
3537         * sysdeps/sparc/tls.h: New file.
3538         * sysdeps/sparc/tcb-offsets.sym: New file.
3539         * sysdeps/sparc/Makefile: New file.
3540         * sysdeps/sparc/td_ta_map_lwp2thr.c: New file.
3541         * init.c [__sparc__] (__NR_set_tid_address): Define.
3543 2003-08-29  Jakub Jelinek  <jakub@redhat.com>
3545         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock,
3546         _IO_release_lock): Define.
3548 2003-08-29  Jakub Jelinek  <jakuB@redhat.com>
3550         * tst-cancel4.c (tf_sigwait, tf_sigwaitinfo, tf_sigtimedwait): Add
3551         sigemptyset before sigaddset.  Reported by jreiser@BitWagon.com.
3553 2003-08-27  Ulrich Drepper  <drepper@redhat.com>
3555         * sysdeps/pthread/pthread.h (pthread_exit): Remove __THROW.
3556         (__pthread_cleanup_class): Add missing return types of member
3557         functions.
3559 2003-08-26  Steven Munroe <sjmunroe@us.ibm.com>
3561         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
3562         (lll_mutex_unlock_force): Add memory barrier between store and futex
3563         syscall.
3565 2003-08-25  Ulrich Drepper  <drepper@redhat.com>
3567         * tst-cancel4.c (do_test): Also unlink tempfname and remove
3568         tempmsg in first loop.
3570 2003-08-18  Ulrich Drepper  <drepper@redhat.com>
3572         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
3573         _POSIX_THREAD_PRIORITY_SCHEDULING.
3574         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3576 2003-08-07  Jakub Jelinek  <jakub@redhat.com>
3578         * sysdeps/pthread/bits/libc-lock.h [_LIBC && SHARED]
3579         (__rtld_lock_default_lock_recursive,
3580         __rtld_lock_default_unlock_recursive): Define.
3581         [_LIBC && SHARED] (__rtld_lock_lock_recursive,
3582         __rtld_lock_unlock_recursive): Define using
3583         GL(_dl_rtld_*lock_recursive).
3584         * init.c (__pthread_initialize_minimal_internal): Initialize
3585         _dl_rtld_lock_recursive and _dl_rtld_unlock_recursive.
3586         Lock GL(_dl_load_lock) the same number of times as
3587         GL(_dl_load_lock) using non-mt implementation was nested.
3589         * pthreadP.h (__pthread_cleanup_upto): Add hidden_proto.
3590         * pt-longjmp.c (__pthread_cleanup_upto): Add hidden_def.
3592 2003-08-06  Jakub Jelinek  <jakub@redhat.com>
3594         * tst-cancel17.c (do_test): Make len2 maximum of page size and
3595         PIPE_BUF.
3597 2003-08-07  Jakub Jelinek  <jakub@redhat.com>
3599         * pthread_create.c (__pthread_create_2_0): Clear new_attr.cpuset.
3601 2003-08-03  Jakub Jelinek  <jakub@redhat.com>
3603         * sysdeps/pthread/createthread.c (do_clone): Move error handling
3604         to first syscall error check.  Move syscall error check for tkill
3605         into __ASSUME_CLONE_STOPPED #ifdef.
3607 2003-08-02  Ulrich Drepper  <drepper@redhat.com>
3609         * sysdeps/pthread/createthread.c (do_clone): If __ASSUME_CLONE_STOPPED
3610         is not defined, do explicit synchronization.
3611         (create_thread): Do not lock pd->lock here.  If __ASSUME_CLONE_STOPPED
3612         is not defined also unlock pd->lock for non-debugging case in case
3613         it is necessary.
3614         * pthread_create.c (start_thread): Always get and release pd->lock
3615         if __ASSUME_CLONE_STOPPED is not defined.
3616         (start_thread_debug): Removed.  Adjust users.
3617         * allocatestack.c (allocate_stack): Always initialize lock if
3618         __ASSUME_CLONE_STOPPED is not defined.
3619         * Makefile (tests): Add tst-sched1.
3620         * tst-sched1.c: New file.
3622         * sysdeps/pthread/createthread.c (do_clone): Only use
3623         sched_setschduler and pass correct parameters.
3625 2003-07-31  Jakub Jelinek  <jakub@redhat.com>
3627         * sysdeps/pthread/pthread.h (pthread_attr_setstackaddr,
3628         pthread_attr_setstacksize): Change PTHREAD_STACK_SIZE to
3629         PTHREAD_STACK_MIN in comments.
3631 2003-07-31  Jakub Jelinek  <jakub@redhat.com>
3633         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
3634         Shut up warnings if INTERNAL_SYSCALL_ERROR_P does not use its first
3635         argument.
3636         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Likewise.
3637         * pthread_condattr_setclock.c (pthread_condattr_setclock): Likewise.
3638         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Include pthreaddef.h.
3639         (__pthread_cleanup_upto): Fix prototype.
3640         (_longjmp_unwind): Adjust caller.
3641         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_timedlock):
3642         Change second argument to const struct pointer.
3643         * tst-sem8.c (main): Remove unused s2 and s3 variables.
3644         * tst-sem9.c (main): Likewise.
3645         * unwind.c: Include string.h for strlen prototype.
3647 2003-07-31  Ulrich Drepper  <drepper@redhat.com>
3649         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
3650         (__pthread_cond_timedwait): Don't use cmov unless HAVE_CMOV is defined.
3651         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S:
3652         Define HAVE_CMOV.
3653         Patch by Nicholas Miell <nmiell@attbi.com>.
3655 2003-07-30  Jakub Jelinek  <jakub@redhat.com>
3657         * init.c (__pthread_initialize_minimal_internal): Initialize
3658         GL(dl_init_static_tls).
3659         * pthreadP.h (__pthread_init_static_tls): New prototype.
3660         * allocatestack.c (init_one_static_tls, __pthread_init_static_tls):
3661         New functions.
3662         * Makefile (tests): Add tst-tls4.
3663         (modules-names): Add tst-tls4moda and tst-tls4modb.
3664         ($(objpfx)tst-tls4): Link against libdl and libpthread.
3665         ($(objpfx)tst-tls4.out): Depend on tst-tls4moda.so and
3666         tst-tls4modb.so.
3667         * tst-tls4.c: New file.
3668         * tst-tls4moda.c: New file.
3669         * tst-tls4modb.c: New file.
3671 2003-06-19  Daniel Jacobowitz  <drow@mvista.com>
3673         * sysdeps/pthread/timer_create.c (timer_create): Call timer_delref
3674         before __timer_dealloc.
3675         * sysdeps/pthread/timer_routines.c (__timer_thread_find_matching):
3676         Don't call list_unlink.
3678 2003-07-29  Roland McGrath  <roland@redhat.com>
3680         * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
3682 2003-07-22  Jakub Jelinek  <jakub@redhat.com>
3684         * descr.h: Don't include lowlevellock.h, pthreaddef.h and dl-sysdep.h
3685         if __need_struct_pthread_size, instead define lll_lock_t.
3687 2003-07-25  Jakub Jelinek  <jakub@redhat.com>
3689         * tst-cancel17.c (do_test): Check if aio_cancel failed.
3690         Don't reuse struct aiocb A if it failed.
3691         Write fpathconf (fds[1], _PC_PIPE_BUF) + 2 bytes using aio_write,
3692         not just one byte, as that does not block.
3694 2003-07-22  Jakub Jelinek  <jakub@redhat.com>
3696         * sysdeps/pthread/unwind-resume.c: New file.
3697         * sysdeps/pthread/Makefile (routines, shared-only-routines): Add
3698         unwind-resume in csu subdir.
3699         (CFLAGS-unwind-resume.c, CFLAGS-rt-unwind-resume.c): Compile with
3700         exceptions.
3701         (librt-sysdep_routines, librt-shared-only-routines): Add
3702         rt-unwind-resume.
3703         * sysdeps/pthread/rt-unwind-resume.c: New file.
3704         * unwind-forcedunwind.c: New file.
3705         * Makefile (libpthread-routines): Add unwind-forcedunwind.
3706         (libpthread-shared-only-routines): Likewise.
3707         (CFLAGS-unwind-forcedunwind.c): Compile with exceptions.
3708         * pthreadP.h (pthread_cancel_init): New prototype.
3709         * pthread_cancel.c (pthread_cancel): Call pthread_cancel_init.
3711         * sysdeps/pthread/createthread.c (do_thread, create_thread): Make
3712         attr argument const struct pthread_attr *.
3714         * res.c (__res_state): Return __resp.
3715         * descr.h: Include resolv.h.
3716         (struct pthread): Add res field.
3717         * pthread_create.c: Include resolv.h.
3718         (start_thread): Initialize __resp.
3719         * Makefile (tests): Add tst-_res1.
3720         (module-names): Add tst-_res1mod1, tst-_res1mod2.
3721         ($(objpfx)tst-_res1mod2.so): Depend on $(objpfx)tst-_res1mod1.so.
3722         ($(objpfx)tst-_res1): Depend on $(objpfx)tst-_res1mod2.so and
3723         libpthread.
3724         * tst-_res1.c: New file.
3725         * tst-_res1mod1.c: New file.
3726         * tst-_res1mod2.c: New file.
3728 2003-07-21  Ulrich Drepper  <drepper@redhat.com>
3730         * sysdeps/pthread/createthread.c: Don't define CLONE_STOPPED.
3732         * Makefile: Define various *-no-z-defs variables for test DSOs
3733         which has undefined symbols.
3735 2003-07-21  Steven Munroe  <sjmunroe@us.ibm.com>
3737         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
3738         Retry if the stwcx fails to store once_control.
3740 2003-07-20  Ulrich Drepper  <drepper@redhat.com>
3742         * Makefile (libpthread-routines): Add pthread_attr_getaffinity and
3743         pthread_attr_setaffinity.
3744         * Versions [libpthread] (GLIBC_2.3.3): Likewise.
3745         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: New file.
3746         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: New file.
3747         * pthread_attr_destroy.c: Free cpuset element if allocated.
3748         * pthread_create.c: Pass iattr as additional parameter to
3749         create_thread.
3750         * sysdeps/pthread/createthread.c: If attribute is provided and
3751         a new thread is created with affinity set or scheduling parameters,
3752         start thread with CLONE_STOPPED.
3753         * sysdeps/pthread/pthread.h: Declare pthread_attr_getaffinity and
3754         pthread_attr_setaffinity.
3755         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
3756         cpuset element.
3758 2003-07-15  Ulrich Drepper  <drepper@redhat.com>
3760         * tst-tcancel-wrappers.sh: lseek and llseek are not cancelation points.
3762 2003-07-14  Ulrich Drepper  <drepper@redhat.com>
3764         * sysdeps/pthread/configure.in: Require CFI directives also for
3765         ppc and s390.
3767 2003-07-15  Jakub Jelinek  <jakub@redhat.com>
3769         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
3770         Add cfi directives.
3772 2003-07-12  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3774         * sysdeps/sh/tcb-offsets.sym: Add RESULT, TID, CANCELHANDLING and
3775         CLEANUP_JMP_BUF.
3776         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use more
3777         registers as variables.  Call __pthread_mutex_unlock_usercnt.
3778         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
3779         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Store TID
3780         not self pointer in __writer.  Compare with TID to determine
3781         deadlocks.
3782         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
3783         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
3784         Likewise.
3785         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
3786         Likewise.
3787         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add cancellation support.
3788         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
3789         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Define all the nice
3790         macros also when compiling librt.
3792 2003-07-11  Jakub Jelinek  <jakub@redhat.com>
3794         * Makefile (CFLAGS-pthread_once.c): Add -fexceptions
3795         -fasynchronous-unwind-tables.
3796         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
3797         (PSEUDO): Add cfi directives.
3798         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO):
3799         Likewise.
3800         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
3801         Likewise.
3803 2003-07-08  Jakub Jelinek  <jakub@redhat.com>
3805         * pthreadP.h (__pthread_unwind_next, __pthread_register_cancel,
3806         __pthread_unregister_cancel): Add prototypes and hidden_proto.
3807         * unwind.c (__pthread_unwind_next): Add hidden_def.
3808         * cleanup.c (__pthread_register_cancel, __pthread_unregister_cancel):
3809         Likewise.
3810         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
3811         Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
3812         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
3813         Likewise.
3814         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
3815         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
3816         Likewise.
3817         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once): Use
3818         HIDDEN_JUMPTARGET to call __pthread_register_cancel,
3819         __pthread_unregister_cancel and __pthread_unwind_next.
3821 2003-07-04  Jakub Jelinek  <jakub@redhat.com>
3823         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Use
3824         different symbol for the cancellation syscall wrapper and
3825         non-cancellation syscall wrapper.
3826         (PSEUDO_END): Define.
3828 2003-07-05  Richard Henderson  <rth@redhat.com>
3830         * sysdeps/alpha/elf/pt-initfini.c: Avoid .ent/.end.
3831         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_wait,
3832         lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
3833         return actual return value from the syscall, not 0.
3835 2003-07-07  Ulrich Drepper  <drepper@redhat.com>
3837         * descr.h (struct pthread): Add pid field.
3838         * allocatestack.c (allocate_stack): Initialize pid field in descriptor.
3839         (__reclaim_stacks): Likewise.
3840         * init.c (sigcancel_handler): If __ASSUME_CORRECT_SI_PID is defined
3841         also check for PID of the signal source.
3842         (__pthread_initialize_minimal_internal): Also initialize pid field
3843         of initial thread's descriptor.
3844         * pthread_cancel.c: Use tgkill instead of tkill if possible.
3845         * sysdeps/unix/sysv/linux/fork.c: Likewise.
3846         * sysdeps/unix/sysv/linux/pt-raise.c: Likewise.
3847         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
3848         * sysdeps/unix/sysv/linux/raise.c: Likewise.
3850 2003-07-05  Ulrich Drepper  <drepper@redhat.com>
3852         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_push): Renamed.
3853         Fix use of parameter.
3854         (__libc_cleanup_pop): Likewise.
3856 2003-07-04  Ulrich Drepper  <drepper@redhat.com>
3858         * init.c (sigcancel_handler): Change parameters to match handler
3859         for SA_SIGACTION.  Check signal number and code to recognize
3860         invalid invocations.
3862 2003-07-03  Roland McGrath  <roland@redhat.com>
3864         * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr):
3865         Apply sizeof (struct pthread) bias to r13 value.
3867 2003-07-03  Ulrich Drepper  <drepper@redhat.com>
3869         * sysdeps/pthread/configure.in: Require CFI directives.
3871         * sysdeps/pthread/librt-cancellation.c (__pthread_unwind): Remove
3872         definition.
3873         * pthreadP.h (__pthread_unwind): Add hidden_proto if used in
3874         libpthread compilation.
3875         * unwind.c (__pthread_unwind): Add hidden_def.
3876         * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_unwind.
3878 2003-07-01  Ulrich Drepper  <drepper@redhat.com>
3880         * libc-cancellation.c (__libc_cleanup_routine): Define.
3881         * sysdeps/pthread/bits/libc-lock.h (__pthread_cleanup_push): Define.
3882         (__pthread_cleanup_pop): Define.
3884 2003-07-01  Richard Henderson  <rth@redhat.com>
3886         * sysdeps/alpha/elf/pt-initfini.c: New file.
3887         * sysdeps/alpha/pthread_spin_lock.S: New file.
3888         * sysdeps/alpha/pthread_spin_trylock.S: New file.
3889         * sysdeps/alpha/pthreaddef.h: New file.
3890         * sysdeps/alpha/td_ta_map_lwp2thr.c: New file.
3891         * sysdeps/alpha/tls.h: New file.
3892         * sysdeps/unix/sysv/linux/alpha/Makefile: New file.
3893         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: New file.
3894         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: New file.
3895         * sysdeps/unix/sysv/linux/alpha/createthread.c: New file.
3896         * sysdeps/unix/sysv/linux/alpha/fork.c: New file.
3897         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: New file.
3898         * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: New file.
3899         * sysdeps/unix/sysv/linux/alpha/pthread_once.c: New file.
3900         * sysdeps/unix/sysv/linux/alpha/sem_post.c: New file.
3901         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
3903 2003-07-01  Ulrich Drepper  <drepper@redhat.com>
3905         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Add correct
3906         cleanup support and unwind info.
3908 2003-06-30  Ulrich Drepper  <drepper@redhat.com>
3910         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
3911         Use correct cleanup handler registration.  Add unwind info.
3912         * sysdeps/unix/sysv/linux/unwindbuf.sym: New file.
3913         * sysdeps/unix/sysv/linux/Makefile: Add rule to build unwindbuf.h.
3914         * tst-once3.c: Add cleanup handler and check it is called.
3915         * tst-once4.c: Likewise.
3916         * tst-oncex3.c: New file.
3917         * tst-oncex4.c: New file.
3918         * Makefile: Add rules to build and run tst-oncex3 and tst-oncex4.
3920 2003-06-29  Ulrich Drepper  <drepper@redhat.com>
3922         * sysdeps/pthread/configure.in: Check for C cleanup handling in gcc.
3924 2003-06-27  Ulrich Drepper  <drepper@redhat.com>
3926         * tst-cancel4.c (tf_msgrcv): Use IPC_PRIVATE in msgget call.
3927         (tf_msgsnd): Likewise.
3929         * tst-cancel4.c (tf_msgrcv): Strengthen test against valid
3930         premature returns a bit more.
3932 2003-06-26  Ulrich Drepper  <drepper@redhat.com>
3934         * sysdeps/pthread/librt-cancellation.c: Move __pthread_unwind
3935         definition to the front.
3937         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rename
3938         the cleanup functions to make the names unique.  Fix dwarf opcode
3939         un unwind table.
3940         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Rename cleanup
3941         functions to make the names unique.  Fix CFA offset for two blocks.
3943 2003-06-25  Ulrich Drepper  <drepper@redhat.com>
3945         * sysdeps/pthread/pthread.h (class __pthread_cleanup_class): Add
3946         missing closing braces.
3947         Patch by Christophe Saout <christophe@saout.de>.
3949 2003-06-24  Roland McGrath  <roland@redhat.com>
3951         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Typo fix.
3953 2003-06-24  Ulrich Drepper  <drepper@redhat.com>
3955         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: New file.
3956         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: New file.
3958         * pthreadP.h: Declare __find_thread_by_id.
3959         * allocatestack.c [HP_TIMING_AVAIL]: Define __find_thread_by_id.
3960         * pthread_clock_gettime.c: Allow using other thread's clock.
3961         * pthread_clock_settime.c: Likewise.
3962         * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
3963         * Makefile: Add rules to build and run tst-clock2.
3964         * tst-clock2.c: New file.
3966 2003-06-23  Ulrich Drepper  <drepper@redhat.com>
3968         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rewrite
3969         to use exception-based cleanup handler.
3970         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
3972         * tst-cond8.c (ch): Announce that we are done.
3974         * pthreadP.h (__pthread_mutex_cond_lock): Mark with internal_function.
3976         * tst-cancel17.c (tf): Retry aio_suspend in case of EINTR.
3977         Also test aio_suspend with timeout value.
3979 2003-06-22  Ulrich Drepper  <drepper@redhat.com>
3981         * pthreadP.h: Mark __pthread_mutex_unlock_usercnt also hidden.
3982         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Add
3983         attribute_hidden.
3985         * pthreadP.h (__pthread_mutex_init_internal): Mark hidden.
3986         (__pthread_mutex_lock_internal): Likewise.
3987         (__pthread_mutex_unlock_internal): Likewise.
3988         (__pthread_mutex_unlock_usercnt): Declare.
3989         * pthread_mutex_destroy.c: Always fail if used in any way.
3990         * pthread_mutex_init.c: Update comment.
3991         * pthread_mutex_lock.c: If NO_INCR is not defined adjust __nusers.
3992         * pthread_mutex_timedlock.c: Adjust __nusers.
3993         * pthread_mutex_trylock.c: Adjust __nusers.
3994         * pthread_mutex_unlock.c: Old code is in __pthread_mutex_unlock_usercnt
3995         and public interfaces are wrapper with pass additional parameter.
3996         __pthread_mutex_unlock_usercnt does not adjust __nusers if second
3997         parameter zero.
3998         * tst-mutex8.c: New file.
3999         * Makefile (tests): Add tst-mutex8.
4000         * sysdeps/pthread/pthread_cond_timedwait.c: Call
4001         __pthread_mutex_unlock_usercnt.
4002         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
4003         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4004         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
4005         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4006         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4007         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Define NO_INCR.
4008         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
4009         Add __nusers.
4010         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4011         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4012         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4013         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4014         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4016         * pthread_mutex_lock.c: Don't store THREAD_ID in __owner, use TID.
4017         * pthread_mutex_timedlock.c: Likewise.
4018         * pthread_mutex_trylock.c: Adjust __nusers.
4019         * pthread_mutex_unlock.c: Compare with TID not THREAD_ID.
4020         * tst-mutex9.c: New file.
4021         * Makefile (tests): Add tst-mutex9.
4022         * sysdeps/i386/tls.h: Remove THREAD_ID definition.
4023         * sysdeps/ia64/tls.h: Likewise.
4024         * sysdeps/powerpc/tls.h: Likewise.
4025         * sysdeps/s390/tls.h: Likewise.
4026         * sysdeps/sh/tls.h: Likewise.
4027         * sysdeps/x86_64/tls.h: Likewise.
4028         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
4029         Change type of __owner.
4030         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4031         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4032         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4033         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4034         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4036 2003-06-19  Jakub Jelinek  <jakub@redhat.com>
4038         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Move to...
4039         * sysdeps/unix/sysv/linux/sem_post.c: ...here.
4041         * sysdeps/unix/sysv/linux/sem_post.c: Move to...
4042         * sysdeps/unix/sysv/linux/powerpc/sem_post.c: ... here.  Pass nr + 1
4043         instead of nr to lll_futex_wake.  Only set errno and return -1
4044         if err < 0.
4046         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_wait,
4047         lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
4048         return actual return value from the syscall, not 0.
4050 2003-06-18  Ulrich Drepper  <drepper@redhat.com>
4052         * tst-cancel4.c (tf_msgsnd): Don't always use 100 as the type,
4053         find a random value.
4054         (tf_msgrcv): Likewise.  Also don't report msgrcv returns if
4055         errno==EIDRM.
4057         * sysdeps/unix/sysv/linux/timer_settime.c: Add prototype for
4058         compat_timer_settime.
4059         * sysdeps/unix/sysv/linux/timer_gettime.c: Add prototype for
4060         compat_timer_gettime.
4061         * sysdeps/unix/sysv/linux/timer_getoverr.c: Add prototype for
4062         compat_timer_getoverrun.
4063         * sysdeps/unix/sysv/linux/timer_delete.c: Add prototype for
4064         compat_timer_delete.
4066         * pthread_mutex_destroy.c (__pthread_mutex_destroy): For
4067         error-checking mutex detect busy mutexes.
4069 2003-06-17  Ulrich Drepper  <drepper@redhat.com>
4071         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_mutex_lock):
4072         Add ax to clobber list.
4073         (lll_mutex_cond_lock): Likewise.
4074         (lll_mutex_unlock): Likewise.
4075         (lll_lock): Likewise.
4076         (lll_unlock): Likewise.
4078         * Makefile: Add rules to build and run tst-cancel18 and tst-cancelx18.
4079         * tst-cancel18.c: New file.
4080         * tst-cancelx18.c: New file.
4082         * tst-cancel4.c: Test connect, creat, msgrcv, msgsnd, sendmsg, sendto,
4083         and tcdrain.
4085         * Makefile: Add rules to build and run tst-cancel17 and tst-cancel17x.
4086         * tst-cancel17.c: New file.
4087         * tst-cancelx17.c: New file.
4089         * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
4090         * sysdeps/unix/sysv/linux/sigwait.c: New file.
4091         * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
4093         * tst-cancel4.c: Test open, close, pread, pwrite, fsync, and msync.
4095 2003-06-16  Jakub Jelinek  <jakub@redhat.com>
4097         * sysdeps/pthread/createthread.c (create_thread): Set
4098         header.multiple_threads unconditionally.
4099         * allocatestack.c (allocate_stack): Likewise.
4100         * descr.h (struct pthread): Add header.multiple_threads
4101         unconditionally.
4102         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (CENABLE, CDISABLE):
4103         Define for librt.  #error if neither libpthread, libc nor librt.
4104         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (CENABLE, CDISABLE):
4105         Likewise.
4106         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (CENABLE,
4107         CDISABLE): Likewise.
4108         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (CENABLE,
4109         CDISABLE): Likewise.
4110         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (CENABLE,
4111         CDISABLE): Likewise.
4112         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (CENABLE,
4113         CDISABLE): Likewise.  Access header.multiple_threads outside of
4114         libc and libpthread.
4115         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (CENABLE, CDISABLE):
4116         Likewise.
4117         * sysdeps/x86_64/tls.h (tcbhead_t): Add multiple_threads.
4118         * sysdeps/x86_64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define.
4120 2003-06-17  Ulrich Drepper  <drepper@redhat.com>
4122         * tst-cancel4.c: Add tests for the socket and signal functions, pause.
4123         Also test early cancellation before the thread reaches the cancellation
4124         point.
4126         * Makefile: Compile forward.c with exceptions.
4128         * sysdeps/unix/sysv/linux/sleep.c: New file.
4130 2003-06-16  Ulrich Drepper  <drepper@redhat.com>
4132         * Makefile: Add CFLAGS definition to compile function wrappers
4133         duplicated from libc with exceptions.
4134         * tst-cancel4.c: Also check cancellation handlers.
4136         * Makefile: Add rules to build and run tst-cancel16 and
4137         tst-cancelx16.  Add missing CFLAGS definitions.
4138         * tst-cancel16.c: New file.
4139         * tst-cancelx16.c: New file.
4141 2003-06-15  Ulrich Drepper  <drepper@redhat.com>
4143         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
4144         (DL_SYSINFO_IMPLEMENTATION): Use CFI opcodes.
4145         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
4146         (DL_SYSINFO_IMPLEMENTATION): Likewise.
4148         * pthreadP.h (LIBC_CANCEL_ASYNC): Also define for librt.
4149         (LIBC_CANCEL_RESET): Likewise.
4150         Declare __librt_enable_asynccancel and __librt_disable_asynccancel.
4151         * sysdeps/pthread/Makefile (librt-sysdep_routines): Add
4152         librt-cancellation.
4153         (CFLAGS-libcrt-cancellation.c): Define.
4154         * sysdeps/pthread/librt-cancellation.c: New file.
4155         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define all the nice
4156         macros also when compiling librt.
4157         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
4158         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
4159         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
4160         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
4161         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
4162         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
4163         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
4165         * sysdeps/unix/sysv/linux/timer_create.c: Add prototype for
4166         compat_timer_create.
4168 2003-06-14  Ulrich Drepper  <drepper@redhat.com>
4170         * sysdeps/pthread/posix-timer.h (timespec_compare): Always inline.
4172         * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
4173         __register_atfork.
4174         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
4175         Add libc_hidden_def.
4177 2003-06-13  Roland McGrath  <roland@redhat.com>
4179         * sysdeps/x86_64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Pass FS
4180         constant from <sys/reg.h> to ps_get_thread_area, not register contents.
4182 2003-06-11  Ulrich Drepper  <drepper@redhat.com>
4184         * allocatestack.c (queue_stack): Always inline.
4185         * ptreadhP.h (__do_cancel): Likewise.
4187 2003-06-10  Jakub Jelinek  <jakub@redhat.com>
4189         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait): Fix
4190         a typo.
4192 2003-06-10  Ulrich Drepper  <drepper@redhat.com>
4194         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
4195         (__pthread_cond_signal): Remove incorrect second addition for
4196         cond_lock!=0.
4198 2003-06-09  Ulrich Drepper  <drepper@redhat.com>
4200         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
4201         (__pthread_cond_signal): Use correct futex pointer in
4202         __lll_mutex_lock_wait call.
4204         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
4205         (__pthread_cond_signal): Some more tweaks to handle cond_lock!=0.
4207 2003-06-08  Ulrich Drepper  <drepper@redhat.com>
4209         * sysdeps/unix/sysv/linux/s390/sem_wait.c (__new_sem_wait): Make
4210         cancelable.
4211         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
4212         Likewise.
4214         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Remove
4215         hand-written CFI generation code.  Since ENTRY/END also initiated
4216         CFI frames this caused two CFI sets to be generated.
4218 2003-06-07  Ulrich Drepper  <drepper@redhat.com>
4220         * cleanup_routine.c: New file.
4221         * Versions (libpthread) [GLIBC_2.3.3]: Add __pthread_cleanup_routine.
4222         * sysdeps/pthread/pthread.h: Add support for fully exception-based
4223         cleanup handling.
4224         * Makefile (libpthread-routines): Add cleanup_routine.
4225         Add more CFLAGS variables to compile with exceptions.  Add comments
4226         why which file needs unwind tables.
4227         (tests) [have-forced-unwind==yes]: Add tst-cancelx* and tst-cleanupx*
4228         tests.
4229         * tst-cancelx1.c: New file.
4230         * tst-cancelx2.c: New file.
4231         * tst-cancelx3.c: New file.
4232         * tst-cancelx4.c: New file.
4233         * tst-cancelx5.c: New file.
4234         * tst-cancelx6.c: New file.
4235         * tst-cancelx7.c: New file.
4236         * tst-cancelx8.c: New file.
4237         * tst-cancelx9.c: New file.
4238         * tst-cancelx10.c: New file.
4239         * tst-cancelx11.c: New file.
4240         * tst-cancelx12.c: New file.
4241         * tst-cancelx13.c: New file.
4242         * tst-cancelx14.c: New file.
4243         * tst-cancelx15.c: New file.
4244         * tst-cleanupx0.c: New file.
4245         * tst-cleanupx0.expect: New file.
4246         * tst-cleanupx1.c: New file.
4247         * tst-cleanupx2.c: New file.
4248         * tst-cleanupx3.c: New file.
4250         * tst-cleanup0.c: Make standard compliant.
4251         * tst-cleanup1.c: Likewise.
4253         * sysdeps/unix/sysv/linux/sem_timedwait.c: Add cancellation support.
4254         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
4255         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
4256         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
4257         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
4258         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
4259         * sysdeps/i386/tcb-offsets.sym: Add RESULT, CANCELHANDLING, and
4260         CLEANUP_JMP_BUF.
4261         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
4262         * tst-cancel12.c: New file.
4263         * tst-cancel13.c: New file.
4264         * tst-cancel14.c: New file.
4265         * tst-cancel15.c: New file.
4266         * Makefile (tests): Add tst-cancel12, tst-cancel13, tst-cancel14,
4267         and tst-cancel15.
4269         * tst-cancel1.c: Add some comments.
4271         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Compute relative
4272         timeout correctly.
4274 2003-06-06  Ulrich Drepper  <drepper@redhat.com>
4276         * Makefile (CFLAGS-pthread_cancel.c): Define.
4278 2003-06-05  Ulrich Drepper  <drepper@redhat.com>
4280         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_rwlock_t):
4281         Change type of __writer element to int.
4282         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4283         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4284         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4285         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4286         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4287         * sysdeps/i386/tcb-offsets.sym: Replace SELF entry with TID entry.
4288         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
4289         * pthread_rwlock_trywrlock.c: Store TID not self pointer in __writer.
4290         Compare with TID to determine deadlocks.
4291         * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
4292         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
4293         * sysdeps/pthread/pthread_rwlock_timedwrlock.: Likewise.
4294         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
4295         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
4296         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
4297         Likewise.
4298         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
4299         Likewise.
4300         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
4301         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
4302         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
4303         Likewise.
4304         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
4305         Likewise.
4306         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
4307         * Makefile (tests): Add tst-rwlock12.
4308         * tst-rwlock12.c: New file.
4310 2003-06-05  Jakub Jelinek  <jakub@redhat.com>
4312         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait,
4313         __lll_timedlock_wait, lll_unlock_wake_cb, __lll_timedwait_tid):
4314         Remove bogus hidden_proto.
4315         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
4316         Likewise.
4317         * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_lock,
4318         lll_unlock_wake_cb, ___lll_timedwait_tid): Likewise.
4319         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (___lll_mutex_lock,
4320         ___lll_mutex_timedlock): Likewise.
4322 2003-06-04  Ulrich Drepper  <drepper@redhat.com>
4324         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
4325         (__pthread_cond_signal): Add some code to eventually handle
4326         cond_lock!=0.
4328 2003-06-01  Ulrich Drepper  <drepper@redhat.com>
4330         * Makefile (tests): Add tst-exec4.
4331         (tst-exec4-ARGS): Define.
4332         * tst-exec4.c: New file.
4334 2003-05-31  Ulrich Drepper  <drepper@redhat.com>
4336         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
4337         Also fail if tv_nsec < 0.
4338         (__lll_timedwait_tid): Likewise.
4339         * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
4340         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_timedwait_tid):
4341         Likewise.
4342         * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_timedwait_tid):
4343         Likewise.
4344         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (__lll_mutex_timedlock):
4345         Likewise.
4346         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
4347         Likewise.
4348         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_timedwait_tid):
4349         Likewise.
4350         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_timedwait_tid):
4351         Likewise.
4353         * Makefile (tests): Add tst-sem8 and tst-sem9.
4354         * tst-sem8.c: New file.
4355         * tst-sem9.c: New file.
4356         * sem_open.c: Fix creation of in_use record if the file exists but
4357         no internal record.
4359         * posix-timer.h: Remove old, unused timer_id2ptr and timer_ptr2id
4360         definitions.
4362         * sysdeps/pthread/timer_create.c (timer_create): In case
4363         evp==NULL, assign timer ID to sival_ptr.
4365         * descr.h (struct pthread_unwind_buf): Change type of prev element to
4366         struct pthread_unwind_buf *.
4367         (struct pthread): Likewise for cleanup_jmp_buf element.
4369         * cleanup.c (__pthread_register_cancel): Add cast to avoid warning.
4370         * cleanup_defer.c (__pthread_register_cancel_defer): Likewise.
4371         * unwind.c (__pthread_unwind_next): Likewise.
4373 2003-05-30  Ulrich Drepper  <drepper@redhat.com>
4375         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
4376         (lll_futex_timed_wait): Use int for futex value parameter.
4377         (lll_futex_wake): Likewise.
4378         (lll_futex_requeue): Likewise.
4380         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
4381         Replace one memory operation with one register operation.
4383         * tst-join4.c (do_test): Fix error message.
4385         * tst-rwlock6.c (do_test): Use correct format specifier.
4387         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
4388         (__lll_mutex_lock_wait): Replace one memory operation with one
4389         register operation.
4390         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S
4391         (__lll_mutex_lock_wait): Likewise.
4393         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
4394         (__lll_mutex_cond_lock): Add one to value parameter of
4395         __lll_lock_wait to reflect reality in the futex syscall.
4396         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
4397         (lll_mutex_cond_lock): Likewise.
4399 2003-05-30  Jakub Jelinek  <jakub@redhat.com>
4401         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_cond_lock):
4402         New function.
4403         (lll_mutex_cond_lock): Define.
4405 2003-05-29  Ulrich Drepper  <drepper@redhat.com>
4407         * Makefile (tests): Add tst-signal6.
4408         * tst-signal6.c: New file.
4410         * sysdeps/unix/sysv/linux/s390/lowlevellock.h
4411         (__lll_mutex_unlock_force): New function
4412         (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
4414         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
4415         (__lll_mutex_unlock_force): New function.
4416         (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
4418         * tst-rwlock7.c (do_test): Use correct format specifier.
4420         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue):
4421         Find break parameter in correct asm argument.
4423 2003-05-27  Jakub Jelinek  <jakub@redhat.com>
4425         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_clobbers):
4426         Remove out4.
4427         (lll_futex_requeue): Fix __o3 constraint, return negative errno if
4428         error occured.
4429         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
4430         Add __mutex.
4431         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_REQUEUE,
4432         lll_futex_requeue, lll_mutex_unlock_force): Define.
4434 2003-05-30  Jakub Jelinek  <jakub@redhat.com>
4436         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
4437         (pthread_cond_t): Add __mutex.
4438         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_REQUEUE,
4439         lll_futex_requeue, lll_mutex_unlock_force): Define.
4441 2003-05-28  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4443         * sysdeps/sh/tcb-offsets.sym: Define MUTEX_FUTEX.
4444         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4445         Add __mutex field.
4446         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (SYSCALL_WITH_INST_PAD):
4447         Define.
4448         (lll_futex_wait, lll_futex_wake): Define.
4449         * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: New file.
4450         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Try using
4451         FUTEX_REQUEUE instead of FUTEX_WAIT.
4452         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
4453         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Remember
4454         mutex which was used in condvar structure.  Call
4455         __pthread_mutex_cond_lock instead of __pthread_mutex_lock_internal.
4456         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
4458         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Don't
4459         include tcb-offsets.h.  Read wakeup value in locked region.
4460         Use the value of gbr register as THREAD_ID.
4461         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
4462         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
4463         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
4465         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Remove futex related
4466         macros.
4468 2003-05-28  Ulrich Drepper  <drepper@redhat.com>
4470         * sysdeps/pthread/pthread_cond_broadcast.c
4471         (__pthread_cond_broadcast): Fix typo: MAX_INT -> INT_MAX.
4473 2003-05-26  Ulrich Drepper  <drepper@redhat.com>
4475         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Fix
4476         typo in register name.
4477         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use parameters
4478         correctly.  Actually use requeue.  Little optimization.
4479         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Store
4480         mutex address early.  Handle cancellation state as 32-bit value.
4481         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4482         Remove unnecessary label.
4484 2003-05-25  Ulrich Drepper  <drepper@redhat.com>
4486         * sysdeps/pthread/pthread_cond_broadcast.c: Try using FUTEX_REQUEUE
4487         instead of FUTEX_WAIT.
4488         * sysdeps/pthread/pthread_cond_signal.c: Likewise.
4489         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
4490         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
4491         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
4492         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
4493         * sysdeps/pthread/pthread_cond_timedwait.c: Remember mutex which was
4494         used in condvar structure.  Call __pthread_mutex_cond_lock instead
4495         of __pthread_mutex_lock_internal.
4496         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4497         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4498         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
4499         (__condvar_cleanup): Always call __pthread_mutex_cond_lock.
4500         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
4501         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4502         * sysdeps/unix/sysv/linux/Makefile (libpthread-sysdep_routines):
4503         Add pthread_mutex_cond_lock.
4504         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add dep_mutex.
4505         * sysdeps/unix/sysv/linux/pthread_cond_mutex_lock.c: New file.
4506         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define
4507         lll_mutex_cond_lock.
4508         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
4509         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
4510         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
4511         Add __mutex field.
4512         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4513         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4515         * sysdeps/i386/tcb-offsets.sym: Define MUTEX_FUTEX.
4516         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
4518         * pthreadP.h: Declare __pthread_mutex_cond_lock.
4519         * pthread_mutex_lock.c: Define LLL_MUTEX_LOCK if not already defined.
4520         Use it instead of lll_mutex_lock.  If __pthread_mutex_lock is a
4521         macro don't define aliases.
4523         * cancellation.c: Remove __pthread_enable_asynccancel_2.
4524         * pthreadP.h: Remove declaration of __pthread_enable_asynccancel_2.
4525         * sysdeps/pthread/pthread_cond_timedwait.c: Use
4526         __pthread_enable_asynccancel instead of __pthread_enable_asynccancel_2.
4527         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4528         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4529         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
4530         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
4531         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4533 2003-05-17  Ulrich Drepper  <drepper@redhat.com>
4535         * sem_open.c: Fix one endless loop.  Implement correct semantics
4536         wrt opening the same semaphore more then once.
4537         * sem_close.c: Adjust for sem_open change.
4538         * semaphoreP.h: Include <semaphore.h>.  Define struct inuse_sem.
4539         Declare __sem_mappings, __sem_mappings_lock, __sem_search.
4540         * Makefile (tests): Add tst-sem7.
4541         * tst-sem7.c: New file.
4543 2003-05-16  Roland McGrath  <roland@redhat.com>
4545         * sysdeps/unix/sysv/linux/register-atfork.c (libc_freeres_fn): Fix
4546         uninitialized variable braino.
4548 2003-05-16  Ulrich Drepper  <drepper@redhat.com>
4550         * sysdeps/unix/sysv/linux/timer_gettime.c (timer_gettime): Correct
4551         test for syscall availability.
4553         * sysdeps/unix/sysv/linux/timer_settime.c (timer_settime): Set
4554         __no_posix_timers to -1 if the syscalls don't exist.
4556         * pthread_join.c (pthread_join): Set tid field of the joined
4557         thread to -1.  This isn't necessary but helps to recognize some
4558         error conditions with almost no cost.
4560         * allocatestack.c (FREE_P): Also negative values indicate an
4561         unused stack.
4563         * unwind.c: Include <unistd.h>.
4565 2003-05-14  Ulrich Drepper  <drepper@redhat.com>
4567         * Makefile ($(objpfx)$(multidir)): Add rule to create the directory.
4569 2003-05-14  Jakub Jelinek  <jakub@redhat.com>
4571         * Makefile (crti-objs, crtn-objs): New variables.
4572         (omit-deps, extra-objs): Add crtn.
4573         ($(objpfx)libpthread.so): Depend on both crti and crtn
4574         and links to them in multidir.
4575         ($(objpfx)crtn.S, $(objpfx)crtn.o): New rules.
4577 2003-05-12  Steven Munroe  <sjmunroe@us.ibm.com>
4579         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
4580         (lll_mutex_unlock): Use atomic_exchange_rel.
4582 2003-05-11  Ulrich Drepper  <drepper@redhat.com>
4584         * cond-perf.c (cons): Add missing locking around setting of alldone.
4586 2003-05-10  Ulrich Drepper  <drepper@redhat.com>
4588         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Remove futex
4589         related macros.
4590         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
4592 2003-05-09  Ulrich Drepper  <drepper@redhat.com>
4594         * tst-sem6.c: New file.
4595         * Makefile (tests): Add tst-sem6.
4597         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (___lll_mutex_unlock):
4598         Use atomic_exchange_rel instead of atomic_exchange.
4599         * sysdeps/unix/sysv/linux/lowlevellock.c (lll_unlock_wake_cb):
4600         Likewise.
4602         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Improve quality of
4603         code for lll_futex_wait and lll_futex_wake in static apps.  Use
4604         vsyscall is possible.
4606         * sysdeps/unix/sysv/linux/pthread_getaffinity.c: New file.
4607         * sysdeps/unix/sysv/linux/pthread_setaffinity.c: New file.
4608         * sysdeps/pthread/pthread.h: Declare pthread_getaffinity_np and
4609         pthread_setaffinity_np.
4610         * Versions [libpthread] (GLIBC_2.3.3): Add pthread_getaffinity_np
4611         and pthread_setaffinity_np.
4612         * Makefile (libpthread-routines): Add pthread_getaffinity and
4613         pthread_setaffinity.
4615         * allocatestack.c (allocate_stack): If ARCH_RETRY_MMAP is defined,
4616         use it in case mmap to allocate the stack fails.
4617         * sysdeps/unix/sysv/linux/x86_64/Makefile: Don't define
4618         ARCH_MAP_FLAGS here.
4619         * sysdeps/x86_64/pthreaddef.h: Define ARCH_MAP_FLAGS and
4620         ARCH_RETRY_MMAP.
4622 2003-05-08  Ulrich Drepper  <drepper@redhat.com>
4624         * sysdeps/unix/sysv/linux/fork.c: Complete rewrite of the atfork
4625         handler implementation.  It is now lockless in fork().
4626         * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
4627         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
4628         * sysdeps/unix/sysv/linux/fork.h: Don't include <link.h>.  Don't
4629         declare the __fork_*_lists.
4630         (struct fork_handler): Include pointers to all three functions.
4631         Add next, refcntr and need_signal elements.
4632         (__fork_handlers): New declaration.
4633         (__register_atfork_malloc): Remove declaration.
4634         (HAVE_register_atfork_malloc): Remove definition.
4635         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove
4636         __pthread_child_handler variable.
4637         (__libc_pthread_init): Use __register_atfork instead of explicitly
4638         adding to the list.
4639         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define lll_futex_wait
4640         and lll_futex_wake.
4641         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
4643         * unwind.c (unwind_cleanup): Print error message and then abort.  This
4644         function must never be reached.
4646         * cond-perf.c: New file.
4648 2003-05-05  Ulrich Drepper  <drepper@redhat.com>
4650         * sysdeps/i386/tls.h (TLS_INIT_TP): Include \n in error message.
4652 2003-05-04  Roland McGrath  <roland@redhat.com>
4654         * Makefile ($(objpfx)../libc.so): New target.
4656 2003-05-02  Ulrich Drepper  <drepper@redhat.com>
4658         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
4659         (pthread_condattr_t): Size is only an int, don't use long for
4660         alignment.
4661         (pthread_mutexattr_t): Likewise.
4662         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4663         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4664         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4666 2003-05-01  Ulrich Drepper  <drepper@redhat.com>
4668         * sysdeps/i386/tls.h: Define THREAD_ID.
4669         * sysdeps/ia64/tls.h: Likewise.
4670         * sysdeps/powerpc/tls.h: Likewise.
4671         * sysdeps/s390/tls.h: Likewise.
4672         * sysdeps/sh/tls.h: Likewise.
4673         * sysdeps/x86_64/tls.h: Likewise.
4674         * pthread_mutex_lock.c: Use THREAD_ID instead of THREAD_SELF to
4675         record ownership.
4676         * pthread_mutex_timedlock.c: Likewise.
4677         * pthread_mutex_trylock.c: Likewise.
4678         * pthread_mutex_unlock.c: Likewise.
4679         * pthread_rwlock_trywrlock.c: Likewise.
4680         * sysdeps/pthread/pthread_rwlocklock_rdlock.c: Likewise.
4681         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
4682         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
4683         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
4685         * sysdeps/pthread/createthread.c (create_thread): Use CLONE_SYSVSEM
4686         flag.
4688 2003-04-29  Jakub Jelinek  <jakub@redhat.com>
4690         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
4691         (__SIZEOF_PTHREAD_COND_T): Define to 48.
4692         (pthread_rwlock_t): Add 16 bytes of pad instead of 8 before __flags.
4693         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
4694         Make __align long long instead of long.
4695         (pthread_rwlock_t): Formatting.
4696         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
4697         (pthread_rwlock_t): Formatting.
4698         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
4699         (pthread_cond_t): Make __align long long instead of long.
4700         (pthread_rwlock_t): Move __flags field to the same position as in
4701         linuxthreads.
4703 2003-04-30  Ulrich Drepper  <drepper@redhat.com>
4705         * tst-rwlock6.c (do_test): Use correct printf format specifiers.
4706         * tst-rwlock7.c (do_test): Likewise.
4708 2003-04-26  Roland McGrath  <roland@redhat.com>
4710         * Makefile ($(test-modules)): Depend on $(common-objpfx)shlib.lds.
4712 2003-04-22  Jakub Jelinek  <jakub@redhat.com>
4714         * allocatestack.c (TLS_TPADJ): Add TLS_PRE_TCB_SIZE instead of
4715         sizeof (struct pthread).
4716         (allocate_stack): Subtract TLS_PRE_TCB_SIZE bytes instead of
4717         1 struct pthread.
4718         * sysdeps/powerpc/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Define
4719         to 0.
4720         (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Define to alignment of
4721         struct pthread.
4722         (TLS_PRE_TCB_SIZE): Increase to cover tcbhead_t preceeded by pad
4723         to 32-bit bytes.
4724         (INSTALL_DTV, GET_DTV, THREAD_DTV): tcbhead_t is immediately before
4725         tcbp.
4726         (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Don't add TLS_TCB_SIZE
4727         unneccessarily.
4728         (NO_TLS_OFFSET): Define.
4729         * sysdeps/unix/sysv/linux/powerpc/createthread.c (TLS_VALUE): Don't
4730         add TLS_TCB_SIZE unnecessarily.
4732 2003-04-22  Roland McGrath  <roland@redhat.com>
4734         * Makeconfig (shared-thread-library): Reverse link order to work
4735         around linker bug.
4737 2003-04-22  Ulrich Drepper  <drepper@redhat.com>
4739         * semaphore.h: Fix typo in comment.
4741 2003-04-21  Ulrich Drepper  <drepper@redhat.com>
4743         * sysdeps/pthread/sigfillset.c: New file.
4745         * init.c (__pthread_initialize_minimal): Don't block SIGTIMER.
4746         * pthreadP.h: Make SIGTIMER and SIGCANCEL the same.
4747         * sysdeps/pthread/pthread_sigmask.c: Remove handling of SIGTIMER.
4748         * sysdeps/pthread/sigaction.c: Likewise.
4749         * sysdeps/pthread/sigprocmask.c: New file.
4750         * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): Define as
4751         __SIGRTMIN+1.
4752         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
4753         Block SIGTIMER.  Also handle SI_TKILL events and terminate thread
4754         in this case.
4756 2003-04-19  Ulrich Drepper  <drepper@redhat.com>
4758         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
4759         (DL_SYSINFO_IMPLEMENTATION): Add .eh_frame information.
4761         * sysdeps/unix/sysv/linux/unregister-atfork.c
4762         (__unregister_atfork): Don't free memory not allocated dynamically.
4764         * semaphore.h: Remove __THROW marker from cancellation points.
4765         * nptl/sysdeps/pthread/pthread.h: Likewise.
4767 2003-04-18  Ulrich Drepper  <drepper@redhat.com>
4769         * sysdeps/pthread/pthread.h: Don't mark pthread_testcancel,
4770         pthread_cancel, pthread_setcancelstate, and pthread_setcanceltype with
4771         __THROW.
4773 2003-04-16  Jakub Jelinek  <jakub@redhat.com>
4775         * tst-cancel4.c (do_test): Use %zd instead of %d when printing cnt.
4777 2003-04-15  Roland McGrath  <roland@redhat.com>
4779         * forward.c (__pthread_unwind): Tweak to avoid warning.
4781 2003-04-15  Ulrich Drepper  <drepper@redhat.com>
4783         * pthreadP.h: Move THREAD_ATOMIC_* replacements to the top.
4785 2003-04-14  Ulrich Drepper  <drepper@redhat.com>
4787         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Don't
4788         overflow CFA advance instructions.
4789         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4791 2003-04-14  Jakub Jelinek  <jakub@redhat.com>
4793         * sysdeps/i386/tls.h: Rename LOCK to LOCK_PREFIX.
4794         * sysdeps/i386/pthread_spin_lock.c: Likewise.
4795         * sysdeps/x86_64/tls.h: Likewise.  Define LOCK_PREFIX if not already
4796         defined.
4798         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Use
4799         DW_CFA_advance_loc2 for .Laddl-.Lsubl.
4800         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
4801         DW_CFA_advance_loc for .Laddl-.Lsubl.
4803 2003-04-13  Ulrich Drepper  <drepper@redhat.com>
4805         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Don't use
4806         position-independent unwind data for static libraries.
4807         Add missing unwind info.  Add comments.
4809         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Add unwind info.
4810         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4811         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
4812         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4814 2003-04-12  Ulrich Drepper  <drepper@redhat.com>
4816         * Makefile: Make sure all cancellation points are compiled with
4817         exception and asynchronous unwind tables.
4819         * sysdeps/x86_64/tls.h (THREAD_SETMEM): Word around compiler bug
4820         which mishandles loading of global object addresses in PIC.
4821         (THREAD_SETMEM_NC): Likewise.
4823 2003-04-11  Ulrich Drepper  <drepper@redhat.com>
4825         * pthread.h: Define new data structure for cleanup buffer.  Declare
4826         new cleanup handler interfaces.
4827         * descr.h: Include <unwind.h> if necessary.  Define pthread_unwind_buf.
4828         (struct pthread): Add cleanup_jmp_buf pointer.  Define
4829         HAVE_CLEANUP_JMP_BUF and not HAVE_CANCELBUF.
4830         * pthreadP.h: Declare __pthread_unwind.  Define __do_cancel to use
4831         it.  Declare old cleanup handler installation functions.
4832         * cleanup.c: Rewrite.  Install handler for unwind-based cleanup
4833         handling.
4834         * cleanup_defer.c: Likewise.
4835         * cleanup_compat.c: New file.  Old cleanup code.
4836         * cleanup_def_compat.c: New file.  Old cleanup code.
4837         * pthread_create.c (start_thread): Initialize cleanup_jmp_buf element
4838         if own thread descriptor.
4839         * unwind.c: New file.
4840         * forward.c: Add __pthread_unwind.
4841         * init.c (pthread_functions): Add __pthread_unwind.
4842         * sysdeps/pthread/pthread-functions.s (struct pthread_functions):
4843         Add ptr___pthread_unwind.
4844         * Versions [GLIBC_2.3.3] (libpthread): Export new cleanup handling
4845         and unwind function.
4846         * Makefile (libpthread-routines): Add cleanup_compat,
4847         cleanup_def_compat, and unwind.  Define CFLAGS to enable unwind
4848         table generation if necessary.
4849         * version.c: Record whether unwind support is compiled in.
4850         * sysdeps/pthread/configure.in: Add checks for unwind unterfaces.
4851         * sysdeps/pthread/bits/libc-lock.h: Add prototypes of the old cleanup
4852         handler interfaces.
4853         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add quite a bit of
4854         complication to generate unwind information for syscall wrappers.
4855         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
4856         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
4857         __cleanup_fct_attribute.
4859         * Makefile: Add rules to build and run tst-cleanup0.
4860         * tst-cleanup0.c: New file.
4861         * tst-cleanup0.expect: New file.
4863         * pthread_create.c (deallocate_tsd): Don't take parameter.  Adjust
4864         caller.  Optimize to avoid often unecessary local variable.
4866 2003-04-11  Roland McGrath  <roland@redhat.com>
4868         * Makefile ($(objpfx)multidir.mk): New target, generated makefile that
4869         sets variable `multidir'; include that.
4870         (generated): Add it.
4871         ($(objpfx)$(multidir)/crti.o): New target.
4872         [$(multidir) != .] (generated-dirs, extra-objs, omit-deps): Add it.
4874 2003-04-11  Ulrich Drepper  <drepper@redhat.com>
4876         * tst-attr2.c (do_test): Add cast to avoid warning.
4877         * tst-mutex4.c (do_test): Likewise.
4879 2003-04-10  Ulrich Drepper  <drepper@redhat.com>
4881         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset CPU clocks
4882         in child.
4884 2003-04-09  Ulrich Drepper  <drepper@redhat.com>
4886         * Makefile (tests): Add tst-detach1.
4887         * tst-detach1.c: New file.
4889 2003-04-08  Ulrich Drepper  <drepper@redhat.com>
4891         * sysdeps/pthread/pthread.h: Remove duplicate
4892         pthread_cleanup_{push,pop} definitions.
4894         * tst-barrier2.c: Eliminate warnings.
4895         * tst-cancel4.c: Likewise.
4896         * tst-cond4.c: Likewise.
4897         * tst-cond6.c: Likewise.
4898         * tst-detach1.c: Likewise.
4899         * tst-rwlock4.c: Likewise.
4900         * tst-rwlock6.c: Likewise.
4901         * tst-rwlock7.c: Likewise.
4902         * tst-sem3.c: Likewise.
4903         * tst-spin2.c: Likewise.
4904         * tst-umask1.c: Likewise.
4906 2003-04-07  Ulrich Drepper  <drepper@redhat.com>
4908         * pthread_detach.c (pthread_detach): Fix test for invalid TID.
4910 2003-04-06  Ulrich Drepper  <drepper@redhat.com>
4912         * descr.h (struct pthread): Move cancelhandling member to the front.
4914 2003-04-05  Ulrich Drepper  <drepper@redhat.com>
4916         * sysdeps/unix/sysv/linux/register-atfork.c: Define malloc_prepare,
4917         malloc_parent, and malloc_child statically.
4918         (__register_atfork_malloc): New function.
4919         (free_mem): Don't free any of the malloc_* variables on the list.
4920         * sysdeps/unix/sysv/linux/fork.h: Declare __register_atfork_malloc.
4921         Define HAVE_register_atfork_malloc.
4923 2003-04-04  Ulrich Drepper  <drepper@redhat.com>
4925         * sysdeps/pthread/createthread.c (create_thread): Add some more
4926         comments explaining when to set multiple_threads and when not.
4928         * pthreadP.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
4929         THREAD_ATOMIC_BIT_SET if not already defined.
4930         * sysdeps/i386/tls.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
4931         THREAD_ATOMIC_BIT_SET:
4932         * sysdeps/x86_64/tls.h: Likewise.
4933         * cleanup_defer.c (_pthread_cleanup_push_defer): Rewrite to use
4934         THREAD_ATOMIC_CMPXCHG_VAL.
4935         (_pthread_cleanup_pop_restore): Likewise.
4936         * cancellation.c (__pthread_enable_asynccancel): Likewise.
4937         (__pthread_enable_asynccancel_2): Likewise.
4938         (__pthread_disable_asynccancel): Likewise.
4939         * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
4940         (__libc_disable_asynccancel): Likewise.
4941         * init.c (sigcancel_handler): Likewise.
4942         * pthread_setcancelstate.c (__pthread_setcancelstate): Likewise.
4943         * pthread_setcanceltype.c (__pthread_setcanceltype): Likewise.
4945 2003-04-03  Ulrich Drepper  <drepper@redhat.com>
4947         * init.c (sigcancel_handler): Don't set EXITING_BIT here.
4948         * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
4949         * pthreadP.h (__do_cancel): Set EXITING_BIT here.
4950         * Makefile (tests): Add tst-cancel11.
4951         * tst-cancel11.c: New file.
4953 2003-04-01  Ulrich Drepper  <drepper@redhat.com>
4955         * pthread_create.c (deallocate_tsd): Clear/free memory after the last
4956         round, not the first.  Use specific_used flag instead of local
4957         found_nonzero variable.  Use THREAD_[SG]ETMEM where possible.
4958         (__free_tcb): Don't call deallocate_tsd here.
4959         (start_thread): Call deallocate_tsd here.
4960         * pthread_setspecific.c: Set specific_used flag really only when
4961         needed.
4962         * Makefile (tests): Add tst-tsd3.c and tst-tsd4.
4963         * tst-tsd3.c: New file.
4964         * tst-tsd4.c: New file.
4966 2003-03-31  Ulrich Drepper  <drepper@redhat.com>
4968         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_mutex_lock):
4969         Use atomic_exchange_and_add instead of __lll_add.
4970         (__lll_mutex_timedlock): Likewise.
4971         Patch by Ian Wienand.
4973 2003-03-24  Steven Munroe  <sjmunroe@us.ibm.com>
4975         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
4976         (SINGLE_THREAD_P): Fix typo.
4977         * tst-cancel-wrappers.sh: Handle '.'ed symbols.
4979 2003-03-31  Ulrich Drepper  <drepper@redhat.com>
4981         * Makefile (tests): Add tst-align.
4982         * tst-align.c: New file.
4983         * sysdeps/i386/Makefile: Define CFLAGS-tst-align.
4985         * sysdeps/i386/tls.h (CALL_THREAD_FCT): Align stack of called
4986         function correctly.
4988         * tst-tsd2.c: Add casts to avoid warnings.
4990 2003-03-30  Ulrich Drepper  <drepper@redhat.com>
4992         * descr.h (struct pthread): Move most often used elements to the front.
4994 2003-03-29  Ulrich Drepper  <drepper@redhat.com>
4996         * Makefile (libpthread-routines): Add pthread_atfork.
4997         (libpthread-static-only-routines): Add pthread_atfork.
4999 2003-03-28  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5001         * sysdeps/sh/tls.h: Include nptl/descr.h after the definition
5002         of TLS_DTV_AT_TP.
5003         (INSTALL_DTV): Add parens.
5004         (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
5005         Use passed descr instead of THREAD_SELF.
5006         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S
5007         (__lll_mutex_timedlock_wait): Correct expected value after
5008         spurious wakeup.
5009         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S:
5010         Release lock before waking up the waiters.
5011         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Correct exit
5012         criteria.  Reorderstruct passed to cleanup handler.  Fix
5013         handling of cancellation and failung pthread_mutex_unlock call.
5014         Use __pthread_enable_asynccancel_2 instead of
5015         __pthread_enable_asynccancel.
5016         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
5017         Return result of lock re-get if it fails.
5018         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Fix wrong argument
5019         for __pthread_cleanup_push.
5020         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Fix
5021         completely broken rwlock implementation.
5022         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
5023         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
5024         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
5025         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
5026         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
5027         * sysdeps/unix/sysv/linux/sh/sem_post.S: Fix error value.  Use
5028         versioned_symbol macro.
5029         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Use versioned_symbol macro.
5030         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
5032 2003-03-27  Ulrich Drepper  <drepper@redhat.com>
5034         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Don't declare
5035         __timer_helper_thread.  Declare __start_helper_thread, __helper_once,
5036         and __helper_tid.
5037         (struct timer): Remove th and bar field.
5038         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Remove
5039         debugging code.  Create only one helper thread.
5040         * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Don't kill
5041         helper thread.
5042         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
5043         Renamed.  Define statically.  Use thread info from siginfo.
5044         (__helper_once): New variable.
5045         (__helper_tid): New variable.
5046         (__reset_helper_control): New function.
5047         (__start_helper_thread): New function.
5049         * pthread_create.c (start_thread): Don't use setjmp inside
5050         __builtin_expect to work around gcc bug.
5052         * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Even if
5053         timer_delete syscall fails, but not with ENOSYS, set
5054         __no_posix_timers.
5056         * sysdeps/unix/sysv/linux/timer_settime.c [!__ASSUME_POSIX_TIMERS]
5057         (timer_settime): Fix typo.
5058         * sysdeps/unix/sysv/linux/timer_getoverr.c
5059         [!__ASSUME_POSIX_TIMERS] (timer_getoverrun): Likewise.
5061 2003-03-27  Jakub Jelinek  <jakub@redhat.com>
5063         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Fix
5064         offset of cleanupbuf.__prev.
5066 2003-03-26  Jakub Jelinek  <jakub@redhat.com>
5068         * sysdeps/unix/sysv/linux/timer_getoverr.c: Fix typo in name
5069         of included file.
5071 2003-03-26  Ulrich Drepper  <drepper@redhat.com>
5073         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): If EVP ==
5074         NULL provide default definition to syscall.
5076 2003-03-25  Roland McGrath  <roland@redhat.com>
5078         * sysdeps/pthread/posix-timer.h (TIMER_MAX): Define if not defined.
5079         (timer_id2ptr): Fix typo.
5081 2003-03-25  Ulrich Drepper  <drepper@redhat.com>
5083         * pthreadP.h: Define SIGCANCEL and SIGTIMER.
5084         * sysdeps/i386/pthreaddef.h: Remove SIGCANCEL definition.
5085         * sysdeps/ia64/pthreaddef.h: Likewise.
5086         * sysdeps/powerpc/pthreaddef.h: Likewise.
5087         * sysdeps/s390/pthreaddef.h: Likewise.
5088         * sysdeps/sh/pthreaddef.h: Likewise.
5089         * sysdeps/x86_64/pthreaddef.h: Likewise.
5090         * init.c (__pthread_initialize_minimal): Block SIGTIMER.
5091         * sysdeps/pthread/sigaction.c: Also prevent SIGTIMER handler from
5092         being changed.
5093         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
5094         SIGTIMER is not unblocked.
5095         * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): One more
5096         RT signal taken.
5097         * sysdeps/unix/sysv/linux/pthread_kill.c: Do not allow SIGTIMER to
5098         be send.
5099         * sysdeps/pthread/posix-timer.h (timer_id2ptr, timer_ptr2id): Just
5100         pass pointer through as ID.
5101         * sysdeps/unix/sysv/linux/bits/local_lim.h (TIMER_MAX): Removed.
5102         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: New file.
5103         * sysdeps/unix/sysv/linux/timer_create.c: New file.
5104         * sysdeps/unix/sysv/linux/timer_delete.c: New file.
5105         * sysdeps/unix/sysv/linux/timer_getoverr.c: New file.
5106         * sysdeps/unix/sysv/linux/timer_gettime.c: New file.
5107         * sysdeps/unix/sysv/linux/timer_routines.c: New file.
5108         * sysdeps/unix/sysv/linux/timer_settime.c: New file.
5109         * sysdeps/unix/sysv/linux/ia64/Versions: New file.
5110         * sysdeps/unix/sysv/linux/ia64/timer_create.c: New file.
5111         * sysdeps/unix/sysv/linux/ia64/timer_delete.c: New file.
5112         * sysdeps/unix/sysv/linux/ia64/timer_getoverr.c: New file.
5113         * sysdeps/unix/sysv/linux/ia64/timer_gettime.c: New file.
5114         * sysdeps/unix/sysv/linux/ia64/timer_settime.c: New file.
5115         * sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions: New file.
5116         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_create.c: New file.
5117         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_delete.c: New file.
5118         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_getoverr.c: New file.
5119         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_gettime.c: New file.
5120         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_settime.c: New file.
5121         * sysdeps/unix/sysv/linux/s390/s390-64/Versions: New file.
5122         * sysdeps/unix/sysv/linux/s390/s390-64/timer_create.c: New file.
5123         * sysdeps/unix/sysv/linux/s390/s390-64/timer_delete.c: New file.
5124         * sysdeps/unix/sysv/linux/s390/s390-64/timer_getoverr.c: New file.
5125         * sysdeps/unix/sysv/linux/s390/s390-64/timer_gettime.c: New file.
5126         * sysdeps/unix/sysv/linux/s390/s390-64/timer_settime.c: New file.
5127         * sysdeps/unix/sysv/linux/x86_64/Versions: New file.
5128         * sysdeps/unix/sysv/linux/x86_64/compat-timer.h: New file.
5129         * sysdeps/unix/sysv/linux/x86_64/timer_create.c: New file.
5130         * sysdeps/unix/sysv/linux/x86_64/timer_delete.c: New file.
5131         * sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c: New file.
5132         * sysdeps/unix/sysv/linux/x86_64/timer_gettime.c: New file.
5133         * sysdeps/unix/sysv/linux/x86_64/timer_settime.c: New file.
5135         * pthreadP.h: Remove FRAME_LEFT definition.
5136         * cleanup.c (_pthread_cleanup_push): Don't check for reference to
5137         already left frame.  Programs which have this problem are not POSIX
5138         compliant.
5139         * cleanup_defer.c (_pthread_cleanup_push_defer): Likewise.
5141 2003-03-24  Ulrich Drepper  <drepper@redhat.com>
5143         * sysdeps/pthread/tst-timer.c: Check return values of the
5144         functions we test.
5146 2003-03-23  Roland McGrath  <roland@redhat.com>
5148         * tst-tls3.c (do_test) [! HAVE___THREAD]: Don't test anything.
5149         * tst-tls3mod.c: Likewise.
5150         * tst-tls1.c: Likewise.
5151         * tst-tls2.c: Likewise.
5153         * tst-mutex5.c (do_test): Unlock before destroy, otherwise we invoke
5154         undefined behavior.
5156         * tst-join5.c (tf1, tf2): Add a cast.
5158         * Makeconfig (includes): Append -I$(..)nptl to this variable.
5160         * tst-barrier2.c (do_test) [! _POSIX_THREAD_PROCESS_SHARED]:
5161         Don't test anything.
5162         * tst-cond4.c: Likewise.
5163         * tst-cond6.c: Likewise.
5164         * tst-flock2.c: Likewise.
5165         * tst-mutex4.c: Likewise.
5166         * tst-rwlock4.c: Likewise.
5167         * tst-signal1.c: Likewise.
5168         * tst-spin2.c: Likewise.
5169         * tst-cond11.c [! _POSIX_CLOCK_SELECTION]: Likewise.
5171         * tst-mutex4.c: Use test-skeleton.c.
5172         * tst-spin2.c: Likewise.
5173         * tst-sysconf.c: Likewise.
5174         * tst-barrier2.c: Likewise.
5175         * tst-cond4.c: Likewise.
5176         * tst-cond6.c: Likewise.
5177         * tst-rwlock4.c: Likewise.
5178         * tst-unload.c: Likewise.
5179         * tst-flock2.c (do_test): Use return instead of exit.
5181 2003-03-22  Jakub Jelinek  <jakub@redhat.com>
5183         * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
5185 2003-03-21  Ulrich Drepper  <drepper@redhat.com>
5187         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
5188         (__lll_mutex_trylock): Use atomic_compare_and_exchange_val_acq
5189         instead of __lll_compare_and_swap.
5190         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
5191         Likewise.
5192         Removed definition if __lll_compare_and_swap.
5194         * cancellation.c: Adjust for new form of compare&exchange macros.
5195         * cleanup_defer.c: Likewise.
5196         * init.c: Likewise.
5197         * libc-cancellation.c: Likewise.
5198         * old_pthread_cond_broadcast.c: Likewise.
5199         * old_pthread_cond_signal.c: Likewise.
5200         * old_pthread_cond_timedwait.c: Likewise.
5201         * old_pthread_cond_wait.c: Likewise.
5202         * pthread_cancel.c: Likewise.
5203         * pthread_create.c: Likewise.
5204         * pthread_detach.c: Likewise.
5205         * pthread_join.c: Likewise.
5206         * pthread_key_delete.c: Likewise.
5207         * pthread_setcancelstate.c: Likewise.
5208         * pthread_setcanceltype.c: Likewise.
5209         * pthread_timedjoin.c: Likewise.
5210         * pthread_tryjoin.c: Likewise.
5211         * sysdeps/pthread/createthread.c: Likewise.
5213 2003-03-20  Ulrich Drepper  <drepper@redhat.com>
5215         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Include <atomic.h>.
5216         Remove __lll_add, __lll_dec_if_positive, and __lll_test_and_set
5217         definitions.  Replace uses with calls to atomic_* functions.
5218         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
5219         * sysdeps/unix/sysv/linux/lowlevellock.c: Replace __lll_add and
5220         __lll_test_and_set calls with atomic_exchange_and_add and
5221         atomic_exchange calls respectively.
5222         * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
5223         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
5224         * sysdeps/unix/sysv/linux/sem_trywait.c: Likewise.
5225         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
5226         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Likewise.
5227         * sysdeps/unix/sysv/linux/ia64/sem_port.c: Likewise.
5228         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
5230         * allocatestack.c (allocate_stack): Assume atomic_exchange_and_add
5231         returns the old value.
5233 2003-03-20  Martin Schwidefsky  <sky@mschwid3.boeblingen.de.ibm.com>
5235         * sysdeps/s390/pthread_spin_lock.c (pthread_spin_lock): Use type
5236         int for variable OLDVAL and correct inline assembler contraint.
5237         * sysdeps/s390/pthread_spin_trylock.c (pthread_spin_trylock): Use
5238         type int for variable OLD.
5240         * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it
5241         only for s390-32.
5242         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
5243         (SINGLE_THREAD_P): Use global variable __local_multiple_threads
5244         instead of multiple_threads field in the TCB.
5246 2003-03-19  Ulrich Drepper  <drepper@redhat.com>
5248         * sysdeps/i386/i686/bits/atomic.h: Removed.
5249         * sysdeps/i386/i586/bits/atomic.h: Removed.
5250         * sysdeps/i386/i486/bits/atomic.h: Removed.  Moved to glibc.
5251         * sysdeps/x86_64/bits/atomic.h: Removed.  Moved to glibc.
5252         * sysdeps/s390/bits/atomic.h: Removed.  Moved to glibc.
5253         * sysdeps/sh/bits/atomic.h: Removed.  Moved to glibc.
5254         * sysdeps/ia64/bits/atomic.h: Removed.  Moved to glibc.
5255         * sysdeps/powerpc/bits/atomic.h: Removed.  Moved to glibc.
5256         * atomic.h: Removed.  Moved to glibc.
5258         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Add
5259         support for clock selection.
5261         * sysdeps/pthread/pthread_cond_broadcast.c: Release lock before
5262         signalling waiters.
5264 2003-03-18  Roland McGrath  <roland@redhat.com>
5266         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
5267         Add __lll_rel_instr first.  Add memory clobber.
5268         (lll_mutex_unlock): Use __lll_test_and_set.
5269         From Paul Mackerras <paulus@samba.org>.
5271         * sysdeps/powerpc/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define
5272         unconditionally.
5273         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
5274         (SINGLE_THREAD_P):  Add `header.' prefix.
5275         From Paul Mackerras <paulus@samba.org>.
5277         * Versions (libpthread: GLIBC_2.3.2): Move pthread_tryjoin_np and
5278         pthread_timedjoin_np to ...
5279         (libpthread: GLIBC_2.3.3): ... here.
5280         (libpthread: GLIBC_2.2): Move pthread_barrierattr_getpshared there too.
5282         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
5283         Avoid shadowing VAL variable.
5285         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
5286         New macro.
5288 2003-03-18  Ulrich Drepper  <drepper@redhat.com>
5290         * Makefile (tests): Add tst-cond11.
5291         * tst-cond11.c: New file.
5293         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Reorder
5294         struct passed to cleanup handler to eliminate one more
5295         instruction.
5296         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5298         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
5299         (pthrad_cond_t): Replace __unused field with __clock.
5301         * sysdeps/pthread/pthread_cond_wait.c: Release condvar lock before
5302         waken all waiters in cleanup handler.
5303         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
5304         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
5306         * pthread_condattr_getclock.c: New file.
5307         * pthread_condattr_setclock.c: New file.
5308         * sysdeps/pthread/pthread.h: Declare these new functions.
5309         * Versions [GLIBC_2.3.3] (libpthread): Add the new functions.
5310         * Makefile (libpthread-routines): Add the new functions.
5311         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_condattr):
5312         Renamed field to value.  Document use of the bits.
5313         * pthread_condattr_getpshared.c: Adjust for struct pthread_condattr
5314         change.
5315         * pthread_condattr_setpshared.c: Likewise.
5316         * pthread_cond_init.c (__pthread_cond_init): Initialized __clock field.
5317         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add cond_clock symbol.
5318         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
5319         Add __clock field.
5320         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5321         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5322         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5323         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
5324         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
5325         Implement clock selection.
5326         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
5327         * pthread-errnos.sym: Add ENOSYS.
5328         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
5329         _POSIX_CLOCK_SELECTION.
5330         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
5332         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Remove
5333         invalid .size directive.
5335 2003-03-17  Roland McGrath  <roland@redhat.com>
5337         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
5338         Formatting tweaks.
5340 2003-03-17  Ulrich Drepper  <drepper@redhat.com>
5342         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Use __builtin_expect.
5343         Use __lll_add instead of spelling it out.  Use protected symbol names.
5344         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Use __builtin_expect.
5345         Use __lll_add.
5346         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_compare_and_swap):
5347         Renamed from lll_compare_and_swap.  Use new name where necessary.
5348         (__lll_add): Defined.
5349         (__lll_dec_if_positive): Defined.
5350         (__lll_test_and_set): Defined.
5351         * sysdeps/ia64/pthread_spin_init.c: Removed.
5352         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Removed.
5353         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Removed.
5354         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Removed.
5355         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Removed.
5356         * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: Removed.
5357         * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: Removed.
5358         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Removed.
5359         * sysdeps/ia64/bits/atomic.h: Add __builtin_expect where appropriate.
5360         * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
5361         __sync_lock_release_si.
5362         Patch by Jakub Jelinek.
5364         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
5365         Fix timeout handling.
5366         (__lll_timedwait_tid): Likewise.
5367         (lll_unlock_wake_cb): Wake up other waiters if necessary.
5368         Patch by Jakub Jelinek.
5370         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Pretty printing.
5372 2003-03-17  Roland McGrath  <roland@redhat.com>
5374         PowerPC port contributed by Paul Mackerras <paulus@samba.org>.
5375         * sysdeps/pthread/pthread_spin_init.c: New file.
5376         * sysdeps/pthread/pthread_spin_unlock.c: New file.
5377         * sysdeps/powerpc/Makefile: New file.
5378         * sysdeps/powerpc/pthread_spin_lock.c: New file.
5379         * sysdeps/powerpc/pthread_spin_trylock.c: New file.
5380         * sysdeps/powerpc/pthreaddef.h: New file.
5381         * sysdeps/powerpc/tcb-offsets.sym: New file.
5382         * sysdeps/powerpc/td_ta_map_lwp2thr.c: New file.
5383         * sysdeps/powerpc/tls.h: New file.
5384         * sysdeps/powerpc/bits/atomic.h: New file.
5385         * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: New file.
5386         * sysdeps/unix/sysv/linux/libc-lowlevellock.c: New file.
5387         * sysdeps/unix/sysv/linux/lowlevellock.c: New file.
5389         * sysdeps/unix/sysv/linux/lowlevelmutex.c: New file.
5390         * sysdeps/unix/sysv/linux/sem_post.c: New file.
5391         * sysdeps/unix/sysv/linux/sem_timedwait.c: New file.
5392         * sysdeps/unix/sysv/linux/sem_trywait.c: New file.
5393         * sysdeps/unix/sysv/linux/sem_wait.c: New file.
5394         * sysdeps/unix/sysv/linux/powerpc/Makefile: New file.
5395         * sysdeps/unix/sysv/linux/powerpc/createthread.c: New file.
5396         * sysdeps/unix/sysv/linux/powerpc/fork.c: New file.
5397         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: New file.
5398         * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: New file.
5399         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: New file.
5400         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: New file.
5401         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: New file.
5402         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
5403         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New file.
5405         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Use __gettimeofday,
5406         not gettimeofday.
5407         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Likewise.
5408         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
5409         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Likewise.
5410         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Likewise.
5411         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
5413 2003-03-17  Ulrich Drepper  <drepper@redhat.com>
5415         * sysdeps/pthread/pthread_cond_wait.c: Correct exit criteria.
5416         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
5417         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5418         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
5419         Patch by Ewald Snel <ewald@rambo.its.tudelft.nl>.
5421 2003-03-16  Roland McGrath  <roland@redhat.com>
5423         * tst-fork4.c: Include <string.h>.
5424         * tst-signal2.c: Likewise.
5425         * tst-mutex5.c (do_test): exit -> return.
5426         * tst-mutex2.c: Include <stdlib.h>.
5428 2003-03-16  Ulrich Drepper  <drepper@redhat.com>
5430         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
5431         (__lll_mutex_timedlock_wait): Correct expected value after
5432         spurious wakeup.  Otherwise we would never wait again.
5434         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Work around red
5435         zone versus inline asm stupidity.  Use correct instructions.
5437         * tst-rwlock6.c: Add some more status output.
5439 2003-03-15  Roland McGrath  <roland@redhat.com>
5441         * sysdeps/pthread/configure.in: New file.
5442         * sysdeps/pthread/configure: New file (generated).
5444 2003-03-15  Ulrich Drepper  <drepper@redhat.com>
5446         * allocatestack.c (allocate_stack): Store the exact stack size of
5447         user allocated stacks.
5449 2003-03-15  Jakub Jelinek  <jakub@redhat.com>
5451         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
5452         (SINGLE_THREAD): Use `header' prefix instead of `header.data'.
5453         * sysdeps/sh/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
5454         * sysdeps/sh/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define.
5455         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
5456         Use `header.' prefix.
5457         * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
5459 2003-03-15  Ulrich Drepper  <drepper@redhat.com>
5461         * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Don't use
5462         __builtin_frame_address, use stack pointer.
5464         * sysdeps/unix/sysv/linux/jmp-unwind.c: Use CURRENT_STACK_FRAME
5465         instead of __builtin_frame_pointer.
5467 2003-03-14  Ulrich Drepper  <drepper@redhat.com>
5469         * tst-basic1.c (do_test): Add cast to avoid warning.
5470         * tst-basic2.c (do_test): Likewise.
5472         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use correct
5473         amount of stack correction.
5475         * tst-fork4.c: Use test-skeleton.c.
5477 2003-03-14  Roland McGrath  <roland@redhat.com>
5479         * init.c: Fix typo "#eli" for "#else".
5481 2003-03-14  Steven Munroe  <sjmunroe@us.ibm.com>
5483         * allocatestack.c (__stack_user): Use hidden_data_def.
5484         * pthread_create.c (__pthread_keys): Likewise.
5486         * init.c [__powerpc__] (__NR_set_tid_address): Define it.
5488 2003-03-14  Roland McGrath  <roland@redhat.com>
5490         * tst-fork4.c: New file.
5491         * Makefile (tests): Add it.
5493         * descr.h (struct pthread): Move the union out of [!TLS_DTV_AT_TP], so
5494         we always define the padding space.
5495         [!TLS_DTV_AT_TP]: Give tcbhead_t field a name, `header', since GCC
5496         stopped supporting its own extensions fully.
5497         [TLS_MULTIPLE_THREADS_IN_TCB]: Put `multiple_threads' inside a wrapper
5498         struct also called `header', so `header.multiple_threads' is the field
5499         name to use on all machines.
5500         * allocatestack.c (allocate_stack): Use `header.' prefix.
5501         * sysdeps/pthread/createthread.c (create_thread): Likewise.
5502         * pthread_create.c (__pthread_create_2_1): Likewise.
5503         * sysdeps/i386/tls.h (INSTALL_NEW_DTV, THREAD_DTV): Likewise.
5504         (THREAD_SELF): Likewise.
5505         * sysdeps/x86_64/tls.h: Likewise.
5506         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
5507         (SINGLE_THREAD_P): Likewise.
5508         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
5509         (SINGLE_THREAD_P): Likewise.
5510         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
5511         (SINGLE_THREAD_P): Likewise.
5513         * sysdeps/s390/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Use REGS[18]
5514         value directly.
5516 2003-03-14  Ulrich Drepper  <drepper@redhat.com>
5518         * pthread_create.c (start_thread): Use CALL_THREAD_FCT if defined.
5519         * sysdeps/i386/tls.h: Define CALL_THREAD_FCT.
5521         * pthread_create.c (start_thread): setjmp is expected to return 0.
5523         * sysdeps/x86_64/tls.h (THREAD_GETMEM): Mark asms volatile.
5524         (THREAD_GETMEM_NC): Likewise.
5526 2003-03-13  Ulrich Drepper  <drepper@redhat.com>
5528         * allocatestack.c (allocate_stack): If MULTI_PAGE_ALIASING is defined
5529         and the size of the stack which must be allocated is a multiple,
5530         allocate one more page.
5531         * sysdeps/i386/i686/Makefile: Don't define COLORING_INCREMENT, but
5532         MULTI_PAGE_ALIASING.
5534 2003-03-13  Roland McGrath  <roland@redhat.com>
5536         * pthread_create.c (start_thread): Set EXITING_BIT after the
5537         event-reporting (and destructors), not before.
5539 2003-03-13  Jakub Jelinek  <jakub@redhat.com>
5541         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_timed_wait,
5542         lll_futex_wake): Declare register variables as long int instead of
5543         unsigned long int.  Patch by Ian Wienand <ianw@gelato.unsw.edu.au>.
5544         Make syscall arguments clobbered by the syscall.
5545         (lll_futex_wait): Define using lll_futex_timed_wait.
5547         * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Cast regs[13]
5548         to void *.
5550         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Only declare and set
5551         PPID if [! NDEBUG].
5553         * allocatestack.c (nptl_ncreated): Only declare if
5554         COLORING_INCREMENT != 0.
5556         * pthreadP.h (__pthread_enable_asynccancel_2): New prototype.
5557         (__libc_enable_asynccancel_2): Remove prototype.
5559         * sysdeps/unix/sysv/linux/ia64/fork.c (ARCH_FORK): Swap ptid and
5560         ctid to match kernel.
5562 2003-03-12  Ulrich Drepper  <drepper@redhat.com>
5564         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add
5565         libc_multiple_threads.
5566         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Move definition of
5567         __libc_multiple_threads to...
5568         * sysdeps/unix/sysv/linux/libc_multiple_threads.c: ...here.  New file.
5570         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Remove unnecessary
5571         versioning.
5572         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
5573         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
5575         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
5576         (__pthread_once_internal): Define.
5578         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Use shlib-compat.h
5579         macros instead of .symver directly.
5580         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
5581         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
5583         * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Include tcb-offsets.h.
5584         * sysdeps/x86_64/tcb-offsets.sym: New file.
5585         * sysdeps/x86_64/Makefile: New file.
5587         * sysdeps/i386/tcb-offsets.sym: Add SELF.
5588         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use SELF
5589         to access own pthread_t in TCB.
5590         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
5591         Likewise.
5592         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
5593         Likewise.
5594         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
5596 2003-03-12  Roland McGrath  <roland@redhat.com>
5598         * pthread-errnos.sym: New file.
5599         * Makefile (gen-as-const-headers): New variable, list that file.
5600         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include generated
5601         header <pthread-errnos.h> instead of defining errno values here.
5602         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
5603         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
5604         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
5605         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
5606         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
5607         Likewise.
5608         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
5609         Likewise.
5610         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
5611         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5612         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
5613         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
5614         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
5615         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
5616         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
5617         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
5618         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5619         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
5620         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
5621         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
5622         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
5623         * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
5624         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
5625         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
5626         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
5627         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
5628         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
5629         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
5630         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
5631         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
5632         * sysdeps/i386/i486/pthread_spin_trylock.S: Likewise.
5633         * sysdeps/x86_64/pthread_spin_trylock.S: Likewise.
5634         * sysdeps/sh/pthread_spin_trylock.S: Likewise.
5635         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
5636         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
5638         * sysdeps/unix/sysv/linux/fork.c: Add an assert to check that
5639         CLONE_CHILD_SETTID worked.
5641 2003-03-12  Ulrich Drepper  <drepper@redhat.com>
5643         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: New
5644         file.
5645         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S: New
5646         file.
5648         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
5649         (pthread_cond_t): Add padding.
5651         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: New file.
5652         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: New file.
5653         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: New file.
5655         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
5656         (__pthread_rwlock_timedwrlock): Add missing opcode suffix.
5657         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
5658         (__pthread_rwlock_timedrdlock): Likewise.
5659         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
5660         (__pthread_rwlock_wrlock): Likewise.
5661         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
5662         (__pthread_rwlock_rdlock): Likewise.
5664         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: New file.
5666         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Return
5667         result of lock re-get if it fails.
5669 2003-03-11  Ulrich Drepper  <drepper@redhat.com>
5671         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Fix asm syntax.
5672         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
5673         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
5674         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
5675         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
5676         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
5677         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
5678         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
5679         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
5680         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
5682         * sysdeps/x86_64/tls.h (THREAD_SELF, THREAD_GETMEM, THREAD_GETMEM_NC,
5683         THREAD_SETMEM, THREAD_SETMEM_NC): Correct asm syntax.
5685         * allocatestack.c [! TLS_MULTIPLE_THREADS_IN_TCB] (allocate_stack):
5686         Initialize *__libc_multiple_threads_ptr not __libc_multiple_threads.
5687         * sysdeps/pthread/createthread.c [! TLS_MULTIPLE_THREADS_IN_TCB]
5688         (create_thread): Likewise.
5689         Define __pthread_multiple_threads and __libc_multiple_threads_ptr.
5690         * init.c (__pthread_initialize_minimal_internal): Initialize
5691         __libc_multiple_threads_ptr if necessary.
5692         * pthreadP.h: Adjust prototype for __libc_pthread_init.  Declare
5693         __pthread_multiple_threads and __libc_multiple_threads_ptr.
5694         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Define
5695         __libc_multiple_threads.
5696         (__libc_pthread_init): Return pointer to __libc_pthread_init if
5697         necessary.
5699         * sysdeps/i386/tls.h (THREAD_SETMEM): Fix one-byte variant.
5700         (THREAD_SETMEM_NC): Likewise.
5702         * sysdeps/x86_64/pthread_spin_trylock.c: Removed.
5703         * sysdeps/x86_64/pthread_spin_trylock.S: New file.
5704         * sysdeps/x86_64/pthread_spin_unlock.c: Removed.
5705         * sysdeps/x86_64/pthread_spin_unlock.S: New file.
5707         * sysdeps/i386/i486/pthread_spin_trylock.S (pthread_spin_trylock):
5708         Eliminate one entire instruction.
5710         * cancellation.c (__pthread_enable_asynccancel_2): New function.
5711         * pthreadP.h: Declare __pthread_enable_asynccancel_2.
5712         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5713         (__pthread_cond_timedwait): Use __pthread_enable_asynccancel_2
5714         instead of __pthread_enable_asynccancel.
5715         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
5716         (__pthread_cond_wait): Likewise.
5717         * sysdeps/pthread/pthread_cond_timedwait.c
5718         (__pthread_cond_timedwait): Likewise.
5719         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
5721         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
5722         (__condvar_cleanup): Wake up all waiters in case we got signaled
5723         after being woken up but before disabling asynchronous
5724         cancellation.
5725         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
5726         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
5727         (__condvar_cleanup): Likewise.
5729         * init.c (__NR_set_tid_address): If already defined, don't redefine.
5730         Make it an error if architecture has no #if case.  Add x86-64.
5732         * sysdeps/unix/sysv/linux/x86_64/Makefile: Add flags for
5733         pt-initfini.s generation.
5735         * sysdeps/x86_64/tls.h: Include <asm/prctl.h>.
5736         (TLS_INIT_TP): Fix typo.
5738 2003-03-11  Jakub Jelinek  <jakub@redhat.com>
5740         * sysdeps/ia64/bits/atomic.h (atomic_exchange_and_add): Swap 2nd and
5741         3rd argument of __arch_compare_and_exchange_{32,64}_val_acq.
5743         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Include semaphore.h.
5744         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
5745         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Likewise.
5746         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Likewise.
5747         * sysdeps/unix/sysv/linux/s390/sem_post.c: Likewise.
5748         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
5749         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
5750         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
5752 2003-03-11  Ulrich Drepper  <drepper@redhat.com>
5754         * sysdeps/pthread/pthread_cond_timedwait.c
5755         (__pthread_cond_timedwait): Return the result of the final
5756         locking.  If it succeeds, the regular function return value.
5758         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait):
5759         Return result of the final locking.
5760         * version.c (__nptl_main): Work around problems with the strange
5761         INTERNAL_SYSCALL macro on ppc32.
5762         * init.c (__pthread_initialize_minimal_internal): Unblock
5763         SIGCANCEL in case the parent blocked it.
5764         Reported by Paul Mackerras <paulus@samba.org>.
5766         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: New file.
5767         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: New file.
5768         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: New file.
5770 2003-03-11  Jakub Jelinek  <jakub@redhat.com>
5772         * sysdeps/pthread/pthread_cond_timedwait.c
5773         (__pthread_cond_timedwait): Unlock and fail if
5774         __pthread_mutex_unlock_internal failed.
5776         * sysdeps/pthread/createthread.c (ARCH_CLONE): Define if not defined.
5777         (create_thread): Only assert PD->tcb != NULL under [TLS_TCB_AT_TP].
5778         Use ARCH_CLONE.
5779         * allocatestack.c (ALLOCATE_STACK_PARMS): New macro.
5780         [NEED_SEPARATE_REGISTER_STACK] (STACK_VARIABLES,
5781         STACK_VARIABLES_ARGS, STACK_VARIABLES_PARMS, ALLOCATE_STACK_PARMS,
5782         ALLOCATE_STACK): New macros.
5783         (TLS_TPADJ): New macro.
5784         (get_cached_stack, queue_stack, __deallocate_stack): Use TLS_TPADJ.
5785         (allocate_stack): Handle TLS_DTV_AT_TP and
5786         NEED_SEPARATE_REGISTER_STACK.  Use TLS_TPADJ.
5787         * pthread_create.c (__pthread_create_2_1) [! TLS_TCB_AT_TP]:
5788         Don't set PD->self.
5789         * init.c [__ia64__] (__NR_set_tid_address): Define.
5791         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: New file.
5792         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: New file.
5793         * sysdeps/unix/sysv/linux/ia64/fork.c: New file.
5794         * sysdeps/unix/sysv/linux/ia64/createthread.c: New file.
5795         * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: New file.
5796         * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: New file.
5797         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: New file.
5798         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: New file.
5799         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: New file.
5800         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
5801         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: New file.
5802         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: New file.
5803         * sysdeps/unix/sysv/linux/ia64/sem_post.c: New file.
5804         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: New file.
5805         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: New file.
5806         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: New file.
5807         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
5808         * sysdeps/ia64/bits/atomic.h: New file.
5809         * sysdeps/ia64/Makefile: New file.
5810         * sysdeps/ia64/pthread_spin_init.c: New file.
5811         * sysdeps/ia64/pthread_spin_lock.c: New file.
5812         * sysdeps/ia64/pthread_spin_trylock.c: New file.
5813         * sysdeps/ia64/pthread_spin_unlock.c: New file.
5814         * sysdeps/ia64/pthreaddef.h: New file.
5815         * sysdeps/ia64/tcb-offsets.sym: New file.
5816         * sysdeps/ia64/td_ta_map_lwp2thr.c: New file.
5817         * sysdeps/ia64/tls.h: New file.
5819         * sysdeps/s390/pthreaddef.h (__exit_thread_inline): Pass 1 argument
5820         to syscall instead of no arguments.
5822 2003-03-10  Ulrich Drepper  <drepper@redhat.com>
5824         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: New file.
5825         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: New file.
5826         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: New file.
5827         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: New file.
5829         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Fix error value in
5830         unused code.
5832         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: New file
5834         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
5835         lowlevelbarrier.sym.
5836         * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: New file.
5837         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S:
5838         Include lowlevelbarrier.h and don't define offsets locally.
5839         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Likewise.
5841         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
5842         (__lll_mutex_lock_wait): Reverse order of first two parameters.
5843         (__lll_mutex_timedlock_wait): Likewise.
5844         (lll_mutex_lock): Adjust asm for that.
5845         (lll_mutex_timedlock): Likewise.  Mark cx, cc, r10 as clobbered.
5846         (lll_lock): Adjust asm for operand order change.
5847         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: New file.
5848         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: New file.
5850         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_lock_wait):
5851         Reverse order of parameters.
5852         (__lll_timedwait_tid): Remove regparms attribute.
5853         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: New file.
5854         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: New file.
5856         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
5857         (__lll_timedwait_tid): Remove one unnecessary instruction.
5859         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Define
5860         __lll_mutex_timedlock_wait only for NOT_IN_libc.
5861         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Include
5862         lowlevelmutex.S.
5864         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
5865         lll_unlock_wake_cb, __lll_wait_tid, and __lll_timedwait_tid only
5866         for NOT_IN_libc.
5867         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Include
5868         lowlevellock.S.
5870         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Don't define
5871         LOCK is already defined.  Don't define __lll_mutex_timedlock_wait
5872         for libc.so.
5873         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Only
5874         define LOCK here (if UP is not defined).  The actual code is in
5875         lowlevelmutex.S.
5877         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Don't define
5878         LOCK is already defined.  Don't define lll_unlock_wake_cb and
5879         __lll_timedwait_tid for libc.so.
5880         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Only
5881         define LOCK here (if UP is not defined).  The actual code is in
5882         lowlevellock.S.
5884         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Not needed anymore.
5885         * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: Likewise.
5886         * sysdeps/unix/sysv/linux/s390/sem_post.c: Include lowlevellock.h
5887         instead of lowlevelsem.h.
5888         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
5889         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
5890         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
5892         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
5893         lowlevelrwlock.sym.
5894         * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: New file.
5895         * sysdeps/unix/sysv/linux/i386/lowlevelrwlock.h: Removed.
5896         * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: Removed.
5898         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_trylock): Fix
5899         register loading.
5900         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_trylock): Undo
5901         last changed.  D'oh.
5903         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: New file.
5905         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove declaration
5906         of __libc_locking_needed.
5907         (lll_trylock): Initialize %eax to zero.
5909         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Update
5910         pthread_cond_t definition.
5912 2003-03-10  Roland McGrath  <roland@redhat.com>
5914         * sysdeps/unix/sysv/linux/lowlevelcond.sym: New file.
5915         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add it.
5916         * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: File removed.
5917         * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: Likewise.
5918         * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: Likewise.
5920         * allocatestack.c (allocate_stack) [!TLS_MULTIPLE_THREADS_IN_TCB]:
5921         Instead of setting PD->multiple_threads, set globals
5922         __pthread_multiple_threads and __libc_multiple_threads.
5923         * sysdeps/pthread/createthread.c (create_thread): Likewise.
5924         * sysdeps/i386/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it.
5925         * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Likewise.
5927         * descr.h (struct pthread): Conditionalize first member on
5928         [!TLS_DTV_AT_TP].  Replace the `header' member with an anonymous union
5929         containing an anonymous tcbhead_t.  Move `list' member out.
5930         [TLS_MULTIPLE_THREADS_IN_TCB]: Define a `multiple_threads' member.
5931         * allocatestack.c: Remove use of `header.data.' prefix.
5932         * pthread_create.c: Likewise.
5933         * init.c (__pthread_initialize_minimal_internal): Likewise.
5934         * sysdeps/pthread/createthread.c (create_thread): Likewise.
5935         * sysdeps/i386/tls.h (INSTALL_DTV): Add parens.
5936         (THREAD_SELF, THREAD_DTV, INSTALL_NEW_DTV): No `header.data.' prefix.
5937         * sysdeps/x86_64/tls.h: Likewise.
5938         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
5939         (SINGLE_THREAD_P): Likewise.
5940         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
5941         (SINGLE_THREAD_P): Likewise.
5942         * sysdeps/i386/tls.h (tcbhead_t): Remove `list' member.
5943         * sysdeps/s390/tls.h (tcbhead_t): Likewise.
5945 2003-03-09  Ulrich Drepper  <drepper@redhat.com>
5947         * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: New file.
5949         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
5950         * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
5952         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix many
5953         leftovers from the ia32 code.
5955         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Remove unneccessary
5956         memory load.
5957         (clear_once_control): Don't load %esi.
5959         * sysdeps/x86_64/tls.h: Remove all traces of segment descriptor
5960         handling.
5962         * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
5964         * sysdeps/unix/sysv/linux/s390/createthread.c: Moved to...
5965         * sysdeps/unix/sysv/linux/createthread.c: ...here.
5967         * Makefile (tests): Add tst-cond10.
5968         * tst-cond10.c: New file.
5970 2003-03-08  Ulrich Drepper  <drepper@redhat.com>
5972         * tst-tls2.c (do_test): Add TEMP_FAILURE_RETRY around sem_wait call.
5973         * tst-signal3.c (do_test): Likewise.
5974         * tst-sem5.c (do_test): Likewise.
5975         * tst-kill6.c (do_test): Likewise.
5976         * tst-tls3.c (do_test): Likewise.  Include <errno.h>.
5978         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use add/sub instead
5979         of inc/dec.
5980         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
5981         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise
5982         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
5983         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
5984         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
5985         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
5986         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
5987         Likewise.
5988         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
5989         Likewise.
5990         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
5991         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
5992         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5993         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
5994         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
5995         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
5996         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
5997         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
5999         * allocatestack.c (allocate_stack): If mprotect() fails free the
6000         TLS memory.
6002 2003-03-07  Ulrich Drepper  <drepper@redhat.com>
6004         * sysdeps/i386/i486/bits/atomic.h: Fix a few unused definitions.
6006         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove all trace of
6007         lll_wake_tid.  This was used only to work around kernel limits in
6008         the early days.
6009         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
6010         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Likewise.
6011         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
6012         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
6014         * init.c (__static_tls_align_m1): Renamed from __static_tls_align.
6015         (__pthread_initialize_minimal_internal): Change initialization of
6016         __static_tls_align_m1 appropriately.
6017         * pthreadP.h (__static_tls_align_m1): Renamed from
6018         __static_tls_align.
6019         * allocatestack.c (allocate_stack): Use __static_tls_align_m1
6020         instead of __static_tls_align-1.
6022 2003-03-04  Ulrich Drepper  <drepper@redhat.com>
6024         * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
6026         * pthread_create.c: Define __pthread_keys using nocommon
6027         attribute, not by placing it explicitly in bss.
6028         Remove DEFINE_DEALLOC definition.  Not needed anymore.
6030         * allocatestack.c: Define ARCH_MAP_FLAGS if not already defined.
6031         Use it in mmap call to allocate stacks.
6033         * sysdeps/pthread/createthread.c (create_thread): Fix comment.
6035         * pthread_create.c (start_thread): Use THREAD_SETMEM to store
6036         result of the thread function.
6038 2003-03-03  Ulrich Drepper  <drepper@redhat.com>
6040         * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: Removed.  The generic
6041         version is just fine.
6043         * sysdeps/unix/sysv/linux/libc_pthread_init.c
6044         (__pthread_child_handler): Renamed from pthread_child_handler,
6045         exported, and marked hidden.  Change all users.
6046         * sysdeps/unix/sysv/linux/register-atfork.c (free_mem): Do not
6047         free __pthread_child_handler from child list.
6049 2003-03-03  Martin Schwidefsky  <schwidefsky@de.ibm.com>
6051         * atomic.h (atomic_exchange_and_add): Return newval, not oldval.
6053         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
6054         Fix handling of cancellation and failing pthread_mutex_unlock call.
6055         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
6056         (__pthread_cond_wait): Likewise.
6058         * sysdeps/pthread/pthread_rwlock_timedrdlock.c
6059         (pthread_rwlock_timedrdlock): Fix clobber of result variable by
6060         lll_futex_timed_wait call.
6061         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
6062         (pthread_rwlock_timedwrlock): Likewise.
6064         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
6065         Don't define lll_unlock_wake_cb and ___lll_timedwait_tid in libc.so.
6066         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Remove XXX comments.
6068         * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Fix
6069         check of lll_futex_wake return value.
6071 2003-03-03  Roland McGrath  <roland@redhat.com>
6073         * forward.c: Fix typo in __pthread_attr_init_2_0 compat_symbol decl.
6075         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
6076         Argument to ptr___pthread_cleanup_upto is __jmp_buf, not jmp_buf.
6077         * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
6079 2003-03-02  Ulrich Drepper  <drepper@redhat.com>
6081         * sysdeps/pthread/timer_create.c (timer_create): Return correct
6082         error for CPU clocks.
6084         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
6085         _POSIX_MONOTONIC_CLOCK.
6086         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
6088         * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
6089         recent kernels.
6091 2003-03-01  Ulrich Drepper  <drepper@redhat.com>
6093         * descr.h (struct pthread): Move cleanup field to the front.
6095 2003-03-01  Roland McGrath  <roland@redhat.com>
6097         * sem_open.c (sem_open): Braino fix.
6099 2003-03-01  Ulrich Drepper  <drepper@redhat.com>
6101         * sysdeps/i386/tcb-offsets.sym: Add CLEANUP and CLEANUP_PREV.
6102         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Inline
6103         __pthread_cleanup_pop functionality.
6104         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6106         * descr.h (struct pthread): Move tid field to the front now that
6107         it is often used.
6109         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S
6110         (__lll_mutex_timedlock_wait): Remove.
6111         (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
6112         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
6113         (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
6114         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
6115         (lll_unlock_wake_cb): Don't save and restore %esi.
6116         (__lll_unlock_wake): Add alignment.  Don't save, load, and restore
6117         %esi.
6118         (__lll_timedwait_tid): Add alignment.
6119         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
6120         (__lll_unlock_wake): Add alignment.  Don't save, load, and restore
6121         %esi.
6122         (__lll_timedwait_tid): Removed.
6123         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
6124         (__pthread_cond_broadcast): Don't save, load, and restore %esi.
6125         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
6126         (pthread_barrier_wait): Don't save, load, and restore %esi for
6127         last thread.
6128         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6129         (__pthread_cond_signal): Don't save, load, and restore %esi.
6130         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
6131         (__pthread_rwlock_unlock): Don't save, load, and restore %esi.
6132         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
6133         Don't save, load, and restore %esi.
6135 2003-02-27  Ulrich Drepper  <drepper@redhat.com>
6137         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
6138         Release lock before waking up the waiters.
6140         * tst-exit1.c (do_test): Don't start more than one thread in parallel.
6142         * tst-rwlock9.c (writer_thread): Correct adding TIMEOUT.
6143         (reader_thread): Likewise.
6145         * sysdeps/pthread/pthread_rwlock_unlock.c
6146         (__pthread_rwlock_unlock): Release internal lock early.  Don't try
6147         to wake up readers if there are none.
6149         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
6150         Release internal lock before wake threads.
6152 2003-02-26  Ulrich Drepper  <drepper@redhat.com>
6154         * Makefile (tests): Add tst-rwlock10 and tst-rwlock11.
6155         * tst-rwlock8.c: Initialize lock with INIT.  Allow INIT to be
6156         predefined.
6157         * tst-rwlock9.c: Likewise.
6158         * tst-rwlock10.c: New file.
6159         * tst-rwlock11.c: New file.
6161         * Makefile (tests): Add tst-dlsym1.
6162         * tst-dlsym1.c: New file.
6164         * init.c (__pthread_initialize_minimal_internal): Set
6165         GL(dl_error_catch_tsd) to __libc_dl_error_tsd.
6166         * Versions (libc:GLIBC_PRIVATE): Export __libc_dl_error_tsd.
6168 2003-02-24  Ulrich Drepper  <drepper@redhat.com>
6170         * sem_open.c (sem_open): Fix handling of O_CREAT without O_EXCL.
6172         * tst-cond2.c: Fix sychronization with child.
6174         * tst-rwlock8.c (reader_thread): Remove unused variable.
6176         * Makefile: Add rules to build and run tst-tls3.
6177         * tst-tls3.c: New file.
6178         * tst-tls3mod.c: New file.
6180         * Makefile (tests): Add tst-rwlock8 and tst-rwlock9.
6181         * tst-rwlock8.c: New file.
6182         * tst-rwlock9.c: New file.
6183         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Fix
6184         complete broken rwlock implementation.
6185         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
6186         Likewise.
6187         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
6188         Likewise.
6189         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
6190         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
6191         * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
6192         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
6193         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
6194         * sysdeps/pthread/pthread_rwlock_unlock.c: Likewise.
6195         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
6197 2003-02-23  Roland McGrath  <roland@redhat.com>
6199         * Makefile (nptl-version): Change regexp so case sensitivity is ok.
6201 2003-02-23  Ulrich Drepper  <drepper@redhat.com>
6203         * Makefile (tests): Add tst-context1.
6204         * tst-context1.c: New file.
6206         * Makefile (tests): Add tst-tls1 and tst-tls2.
6207         * tst-tls1.c: New file.
6208         * tst-tls2.c: New file.
6210         * libc-cancellation.c (__libc_enable_asynccancel): Correct test
6211         for failed cmpxchg.
6213         * pthread_create.c (start_thread): Set EXITING_BIT early.
6215         * sysdeps/i386/tls.h (THREAD_GETMEM): Mark asm as volatile.
6216         (THREAD_GETMEM_NC): Likewise.
6218 2003-02-22  Ulrich Drepper  <drepper@redhat.com>
6220         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Shave
6221         off 3 more bytes by using offset-less instructions when possible.
6223         * Makefile: Add dependency for $(objpfx)version.d.
6225         * eintr.c (eintr_source): Add unnecessary return but the compiler
6226         insists.
6228         * tst-kill3.c: Include <unistd.h>.
6230 2003-02-21  Roland McGrath  <roland@redhat.com>
6232         * pthread_create.c (start_thread): Call __libc_thread_freeres.
6234 2003-02-21  Ulrich Drepper  <drepper@redhat.com>
6236         * Makefile (tests): Add tst-eintr1.
6237         (distribute): Add eintr.c.
6238         * tst-eintr1.c: New file.
6239         * eintr.c: New file.
6241         * pthread_cancel.c (pthread_cancel): Use tkill directly.
6243         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill):
6244         Disallow sending SIGCANCEL.
6246         * Makefile (tests): Remove tst-basic7.  Add tst-kill1, tst-kill2,
6247         tst-kill3, tst-kill4, tst-kill5, tst-kill6.
6248         * tst-kill1.c: New file.
6249         * tst-kill2.c: New file.
6250         * tst-kill3.c: New file.
6251         * tst-kill5.c: New file.
6252         * tst-kill6.c: New file.
6253         * tst-basic7.c: Renamed to...
6254         * tst-kill4.c: ...this.
6256 2003-02-21  Roland McGrath  <roland@redhat.com>
6258         * Makefile (install-lib-ldscripts): New variable.
6260 2003-02-21  Ulrich Drepper  <drepper@redhat.com>
6262         * pthreadP.h: Define INVALID_TD_P and INVALID_NOT_TERMINATED_TD_P.
6263         * pthread_cancel.c: Use INVALID_TD_P.
6264         * pthread_detach.c: Likewise.
6265         * pthread_getschedparam.c: Likewise.
6266         * pthread_setschedparam.c: Likewise.
6267         * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
6268         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
6269         * pthread_join.c: Use INVALID_NOT_TERMINATED_TD_P.
6270         * pthread_timedjoin.c: Likewise.
6272         * tst-basic7.c: Include <signal.h>.
6274         * pthread_join.c (pthread_join): Limited checking for invalid
6275         descriptors.
6276         * pthread_timedjoin.c (pthread_timedjoin_np): Likewise.
6278 2003-02-20  Ulrich Drepper  <drepper@redhat.com>
6280         * pthread_create.c (deallocate_tsd): Reset found_nonzero at the
6281         beginning of the loop.  Clear the entire first block of TSD.
6282         * Makefile (tests): Add tst-key4.
6283         * tst-key4.c: New file.
6285 2003-02-18  Ulrich Drepper  <drepper@redhat.com>
6287         * Makefile (tests): Add tst-basic7.
6288         * tst-basic7.c: New file.
6290         * pthread_create.c (deallocate_tsd): Mark as internal_function.
6291         Add some more __builtin_expect.
6293         * pthreadP.h: Define dummy version of DEBUGGING_P.
6295 2003-02-17  Ulrich Drepper  <drepper@redhat.com>
6297         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remnove
6298         _POSIX_THREAD_PRIORITY_SCHEDULING.
6299         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
6300         _XOPEN_REALTIME_THREADS.
6301         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
6303         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): The
6304         kernel returns EINVAL for PID <= 0, work around it.
6306         * Makefile (tests): Add tst-signal5.
6307         * tst-signal5.c: New file.
6309         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
6310         and LOGIN_NAME_MAX.
6312         * tst-cancel1.c (tf): Block all signals.
6314         * Makefile (tests): Add tst-basic6.
6315         * tst-basic6.c: New file.
6317         * tst-basic1.c: Add test for process ID.
6319         * Makefile (tests): Add tst-cancel10.
6320         * tst-cancel10.c: New file.
6322         * Makefile (tests): Add tst-signal4.
6323         * tst-signal4.c: New file.
6325         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use
6326         __sigismember instead of sigismember.  Add __builtin_expect.
6328 2003-02-16  Ulrich Drepper  <drepper@redhat.com>
6330         * tst-attr1.c (do_test): Add tests for pthread_setcanceltype,
6331         pthread_setcancelstate, and pthread_rwlock_setpshared.
6333         * tst-cancel7.c (do_test): Make sure the pid file exists before
6334         canceling the thread.
6336         * tst-rwlock6.c: More pthread_rwlock_timedwrlock and
6337         pthread_rwlock_timedrdlock tests.
6338         * tst-rwlock7.c: More pthread_rwlock_timedwrlock tests.
6339         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
6340         Check for invalid tv_nsec field.
6341         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
6342         Likewise.
6344         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Protect
6345         recursive mutex of overflow.
6347         * tst-attr1.c (do_test): Add test for pthread_mutexattr_setpshared.
6349         * libc-cancellation.c (__libc_enable_asynccancel): Rewrite to avoid
6350         going into an endless loop.
6351         * Makefile (tests): Add tst-cancel9.
6352         * tst-cancel9.c: New file.
6354         * pthread_cancel.c (pthread_cancel): Use the result of __pthread_kill.
6356 2003-02-15  Ulrich Drepper  <drepper@redhat.com>
6358         * tst-mutex5.c (do_test): Add more timedlock tests.
6360         * tst-mutex2.c: Tests of trylock and unlock with ERROR mutexes.
6361         * tst-mutex3.c (do_test): Add tests for trylock with RECURSIVE mutexes.
6363         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
6364         use INLINE_SYSCALL.  Error number is returned, not -1.
6366         * pthreadP.h: Mark declarations of __find_in_stack_list, __free_tcb,
6367         and __deallocate_stack with internal_function.
6368         * pthread_create.c: Adjust definitions appropriately.
6369         * allocatestack.c: Likewise.
6371         * pthread_join.c: Add one more __builtin_expect.
6372         * pthread_timedjoin.c: Likewise.
6374         * pthread_getspecific.c (__pthread_getspecific): Clear data->data
6375         not data of sequence number does not match.
6376         Add one __builtin_expect.
6378         * Makefile (tests): Add tst-clock1.
6379         * tst-clock1.c: New file.
6381         * pthread_setconcurrency.c (pthread_setconcurrency): Fail for
6382         negative arguments.
6383         * Makefile (tests): Add tst-basic5.
6384         * tst-basic5.c: New file.
6386 2003-02-14  Ulrich Drepper  <drepper@redhat.com>
6388         * Makefile (tests): Add tst-basic4.
6389         * tst-basic4.c: New file.
6391         * pthreadP.h: Add declaraction for __nptl_nthreads.
6392         * pthread_create.c: Define __nptl_nthreads
6393         (start_thread): Increment __nptl_nthreads at beginning.  Decrement
6394         after thread is done.  If then zero, call exit(0).
6395         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
6396         Add ptr_nthreads.  Define HAVE_PTR_NTHREADS.
6397         * init.c (pthread_functions): Initialize ptr_nthreads.
6398         * allocatestack.c (nptl_nthreads): Remove definition and all uses.
6399         (__reclaim_stacks): Decrement __nptl_nthreads.
6400         * sysdeps/pthread/Makefile [$(subdir)==csu] (CFLAGS-libc-start.c):
6401         Define.
6402         * Makefile (tests): Add tst-basic3.
6403         * tst-basic3.c: New file.
6405         * descr.h: Define CANCELING_BIT and CANCELING_BITMASK.  Introduce
6406         after CANCELTYPE_BIT, move the other bits up.  Update CANCEL_RESTMASK.
6407         * init.c (sigcancel_handler): Also set CANCELING_BITMASK bit in newval.
6408         * pthread_cancel.c (pthread_cancel): Likewise.  Also set CANCELING_BIT
6409         if asynchronous canceling is enabled.
6410         * pthread_join.c (pthread_join): When recognizing circular joins,
6411         take into account the other thread might be already canceled.
6412         * Makefile (tests): Add tst-join5.
6413         * tst-join5.c: New file.
6415         * Makefile (tests): Add tst-join4.
6416         * tst-join4.c: New file.
6418 2003-02-13  Ulrich Drepper  <drepper@redhat.com>
6420         * tst-cond4.c (main): Add test of pthread_attr_getpshared.
6422 2003-02-13  Martin Schwidefsky  <schwidefsky@de.ibm.com>
6424         * sysdeps/s390/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM,
6425         THREAD_SETMEM_NC): Use passed descr instead of THREAD_SELF.
6426         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind): Avoid
6427         warning.
6428         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Include <sys/time.h>
6429         to avoid warning.
6430         * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Return
6431         error if lll_futex_wake failed.
6433 2003-02-13  Ulrich Drepper  <drepper@redhat.com>
6435         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Fix
6436         handling of cancellation and failung pthread_mutex_unlock call.
6437         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6438         * Makefile (tests): Add tst-cond8 and tst-cond9.
6439         * tst-cond8.c: New file.
6440         * tst-cond9.c: New file.
6442         * tst-cond7.c (do_test): Unlock the mutex before canceling the thread.
6444         * sysdeps/pthread/pthread.h: Add missing initializers.  Protect
6445         non-standard initializers with __USE_GNU.
6447         * Makefile (tests): Add tst-cleanup3.
6448         * tst-cleanup3.c: New file.
6450 2003-02-12  Ulrich Drepper  <drepper@redhat.com>
6452         * Makefile (tests): Add tst-attr1 and tst-attr2.
6453         * tst-attr1.c: New file.
6454         * tst-attr2.c: New file.
6456         * Makefile: Add rules to build and run tst-atfork2 test.
6457         * tst-atfork2.c: New file.
6458         * tst-atfork2mod.c: New file.
6460         * sysdeps/unix/sysv/linux/unregister-atfork.c
6461         (__unregister_atfork): Free the memory allocated for the handlers
6462         after removing them from the lists.
6464         * sysdeps/unix/sysv/linux/register-atfork.c: Define memeory
6465         cleanup function.
6467         * tst-atfork1.c (do_test): Wait for the child we forked.
6468         Report error in child.
6470         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Fix comment.
6472         * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
6474 2003-02-10  Ulrich Drepper  <drepper@redhat.com>
6476         * Makefile (tests): Add tst-cancel8.
6477         * tst-cancel8.c: New file.
6479         * sysdeps/unix/sysv/linux/i386/pthread_once.S (clear_once_control): Fix
6480         clearing of control variable.
6481         * Makefile (tests): Add tst-once3 and tst-once4.
6482         * tst-once3.c: New file.
6483         * tst-once4.c: New file.
6485 2003-02-08  kaz Kojima  <kkojima@rr.iij4u.or.jp>
6487         * sysdeps/sh/Makefile: New file.
6488         * sysdeps/sh/bits/atomic.h: New file.
6489         * sysdeps/sh/pthread_spin_init.c: New file.
6490         * sysdeps/sh/pthread_spin_lock.c: New file.
6491         * sysdeps/sh/pthread_spin_trylock.S: New file.
6492         * sysdeps/sh/pthread_spin_unlock.S: New file.
6493         * sysdeps/sh/pthreaddef.h: New file.
6494         * sysdeps/sh/tcb-offsets.sym: New file.
6495         * sysdeps/sh/td_ta_map_lwp2thr.c: New file.
6496         * sysdeps/sh/tls.h: New file.
6497         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: New file.
6498         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: New file.
6499         * sysdeps/unix/sysv/linux/sh/createthread.c: New file.
6500         * sysdeps/unix/sysv/linux/sh/fork.c: New file.
6501         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: New file.
6502         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: New file.
6503         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h: New file.
6504         * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: New file.
6505         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: New file.
6506         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: New file.
6507         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: New file.
6508         * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: New file.
6509         * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
6510         * sysdeps/unix/sysv/linux/sh/pt-vfork.S: New file.
6511         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: New file.
6512         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: New file.
6513         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: New file.
6514         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: New file.
6515         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: New file.
6516         * sysdeps/unix/sysv/linux/sh/pthread_once.S: New file.
6517         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: New file.
6518         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: New file.
6519         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: New file.
6520         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: New file.
6521         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: New file.
6522         * sysdeps/unix/sysv/linux/sh/sem_post.S: New file.
6523         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: New file.
6524         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: New file.
6525         * sysdeps/unix/sysv/linux/sh/sem_wait.S: New file.
6526         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
6528 2003-02-08  Ulrich Drepper  <drepper@redhat.com>
6530         * tst-cond2.c: Rearrange code to not rely on behavior undefined
6531         according to POSIX.
6533         * tst-basic2.c (do_test): Lock mutex before creating the thread.
6535 2003-02-07  Ulrich Drepper  <drepper@redhat.com>
6537         * sysdeps/x86_64/tls.h: Remove unnecessary macros, left over from x86.
6538         (TLS_GET_FS): New #define.
6539         (TLS_SET_FS): New #define.
6540         Correct value of __NR_set_thread_area.
6542         * sysdeps/x86_64/td_ta_map_lwp2thr.c: New file.
6544 2003-02-06  Ulrich Drepper  <drepper@redhat.com>
6546         * Makefile (tests): Add tst-popen1.
6547         * tst-popen1.c: New file.
6549         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Remove wrong
6550         but inactive generalization.
6551         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6552         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
6553         Minor optimization, remove one instruction.
6554         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
6556 2003-02-04  Martin Schwidefsky  <schwidefsky@de.ibm.com>
6558         * sysdeps/unix/sysv/linux/s390/fork.c: Correct order of parameters.
6560 2003-01-31  Martin Schwidefsky  <schwidefsky@de.ibm.com>
6562         * init.c (__NR_set_tid_address): Add #ifdef for s390.
6563         * sysdeps/pthread/pthread_barrier_wait.c: New file.
6564         * sysdeps/pthread/pthread_cond_broadcast.c: New file.
6565         * sysdeps/pthread/pthread_cond_signal.c: New file.
6566         * sysdeps/pthread/pthread_cond_timedwait.c: New file.
6567         * sysdeps/pthread/pthread_cond_wait.c: New file.
6568         * sysdeps/pthread/pthread_rwlock_rdlock.c: New file.
6569         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: New file.
6570         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: New file.
6571         * sysdeps/pthread/pthread_rwlock_unlock.c: New file.
6572         * sysdeps/pthread/pthread_rwlock_wrlock.c: New file.
6573         * sysdeps/s390/Makefile: New file.
6574         * sysdeps/s390/bits/atomic.h: New file.
6575         * sysdeps/s390/pthread_spin_init.c: New file.
6576         * sysdeps/s390/pthread_spin_lock.c: New file.
6577         * sysdeps/s390/pthread_spin_trylock.c: New file.
6578         * sysdeps/s390/pthread_spin_unlock.c: New file.
6579         * sysdeps/s390/pthreaddef.h: New file.
6580         * sysdeps/s390/tcb-offsets.sym: New file.
6581         * sysdeps/s390/td_ta_map_lwp2thr.c: New file.
6582         * sysdeps/s390/tls.h: New file.
6583         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: New file.
6584         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: New file.
6585         * sysdeps/unix/sysv/linux/s390/createthread.c: New file.
6586         * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: New file.
6587         * sysdeps/unix/sysv/linux/s390/fork.c: New file.
6588         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: New file.
6589         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
6590         * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: New file.
6591         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: New file.
6592         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: New file.
6593         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: New file.
6594         * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: New file.
6595         * sysdeps/unix/sysv/linux/s390/pthread_once.c: New file.
6596         * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: New file.
6597         * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: New file.
6598         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
6599         * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
6600         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: New file.
6601         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
6602         * sysdeps/unix/sysv/linux/s390/sem_post.c: New file.
6603         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: New file.
6604         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
6605         * sysdeps/unix/sysv/linux/s390/sem_wait.c: New file.
6607 2003-02-04  Ulrich Drepper  <drepper@redhat.com>
6609         * atomic.h: Add a couple more default implementations.
6610         (atomic_compare_and_exchange_acq): Use
6611         __arch_compare_and_exchange_32_acq in return value definition.  It
6612         always exists.
6613         (atomic_bit_set): Renamed from atomic_set_bit.
6614         Add missing atomic_ prefixes.
6616         * sysdeps/pthread/bits/libc-lock.h (__libc_once): In case no
6617         thread library is available, use correct value to mark initialized
6618         once variable.
6620 2003-02-03  Ulrich Drepper  <drepper@redhat.com>
6622         * allocatestack.c (allocate_stack): Use __getpagesize instead of
6623         __sysconf to determine pagesize.
6625         * pthread_create.c: Include <atomic.h>.
6626         * allocatestack.c (allocate_stack): Implement coloring of the
6627         allocated stack memory.  Rename pagesize to pagesize_m1.  It's the
6628         size minus one.  Adjust users.
6629         * sysdeps/i386/i686/Makefile: New file.
6631 2003-02-02  Ulrich Drepper  <drepper@redhat.com>
6633         * allocatestack.c: Improve comment throughout the file.
6635         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
6636         (__lll_lock_wait): Add branch prediction.
6637         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
6638         (__lll_lock_wait): Likewise.
6639         (lll_unlock_wake_cb): Removed.
6641 2003-01-31  Ulrich Drepper  <drepper@redhat.com>
6643         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Remove
6644         _POSIX_THREAD_PRIORITY_SCHEDULING.
6646 2003-01-30  Jakub Jelinek  <jakub@redhat.com>
6648         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
6649         Fix return type of ptr___pthread_getspecific.
6651 2003-01-29  Ulrich Drepper  <drepper@redhat.com>
6653         * Makefile (tests): Add tst-umask1.
6654         (tst-umask1-ARGS): Define.
6655         * tst-umask1.c: New file.
6657 2003-01-28  Ulrich Drepper  <drepper@redhat.com>
6659         * Makefile (libpthread-routines): Remove lowlevelrwlock.  Add
6660         pthread_rwlock_rdlock, pthread_rwlock_timedrdlock,
6661         pthread_rwlock_wrlock, pthread_rwlock_timedwrlock, and
6662         pthread_rwlock_unlock.
6663         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Removed
6664         * sysdeps/unix/sysv/linux/i386/i586/lowlevelrwlock.S: Removed
6665         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Removed
6666         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: New file.
6667         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
6668         New file.
6669         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: New file.
6670         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
6671         New file.
6672         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: New file.
6673         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_rdlock.S: New file.
6674         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedrdlock.S:
6675         New file.
6676         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_wrlock.S: New file.
6677         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedwrlock.S:
6678         New file.
6679         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_unlock.S: New file.
6680         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_rdlock.S: New file.
6681         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedrdlock.S:
6682         New file.
6683         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_wrlock.S: New file.
6684         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedwrlock.S:
6685         New file.
6686         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_unlock.S: New file.
6688         * Makefile (libpthread-routines): Remove lowlevelcond and
6689         lowlevelsem.  Add sem_wait, sem_trywait, sem_timedwait, sem_post,
6690         pthread_cond_wait, pthread_cond_timedwait, pthread_cond_signal,
6691         and pthread_cond_broadcast.
6692         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Removed
6693         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Removed
6694         * sysdeps/unix/sysv/linux/i386/i586/lowlevelsem.S: Removed
6695         * sysdeps/unix/sysv/linux/i386/i586/lowlevelcond.S: Removed
6696         * sysdeps/unix/sysv/linux/i386/i686/lowlevelsem.S: Removed
6697         * sysdeps/unix/sysv/linux/i386/i686/lowlevelcond.S: Removed
6698         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: New file.
6699         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: New file.
6700         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: New file.
6701         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: New file.
6702         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: New file.
6703         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: New file.
6704         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: New file.
6705         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: New file.
6706         * sysdeps/unix/sysv/linux/i386/i586/sem_wait.S: New file.
6707         * sysdeps/unix/sysv/linux/i386/i586/sem_trywait.S: New file.
6708         * sysdeps/unix/sysv/linux/i386/i586/sem_timedwait.S: New file.
6709         * sysdeps/unix/sysv/linux/i386/i586/sem_post.S: New file.
6710         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_wait.S: New file.
6711         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_timedwait.S: New file.
6712         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_signal.S: New file.
6713         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_broadcast.S: New file.
6714         * sysdeps/unix/sysv/linux/i386/i686/sem_wait.S: New file.
6715         * sysdeps/unix/sysv/linux/i386/i686/sem_trywait.S: New file.
6716         * sysdeps/unix/sysv/linux/i386/i686/sem_timedwait.S: New file.
6717         * sysdeps/unix/sysv/linux/i386/i686/sem_post.S: New file.
6718         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_wait.S: New file.
6719         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S: New file.
6720         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_signal.S: New file.
6721         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_broadcast.S: New file.
6722         * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: New file.
6724         * sysdeps/unix/sysv/linux/i386/createthread.c: Define
6725         PREPARE_CREATE and TLS_VALUE with x86-specific bits.  All the rest
6726         of the code is moved to ...
6727         * sysdeps/pthread/createthread.c: ...here.  New file.
6729 2003-01-27  Ulrich Drepper  <drepper@redhat.com>
6731         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S
6732         (__new_sem_post): Clear %eax before returning.
6733         Reported by MAEDA Naoaki <maeda.naoaki@jp.fujitsu.com>.
6735         * Makefile (tests): Add tst-cleanup2.
6736         * tst-cleanup2.c: New file.
6738         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
6739         Interpret first parameter correctly.
6741 2003-01-17  Ulrich Drepper  <drepper@redhat.com>
6743         * Makefile (headers): Add bits/semaphore.h.
6745 2003-01-16  Jakub Jelinek  <jakub@redhat.com>
6747         * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize _head->sysinfo even
6748         if not SHARED.
6750 2003-01-14  Ulrich Drepper  <drepper@redhat.com>
6752         * sem_open.c (sem_open): Return SEM_FAILED if existing semaphore
6753         must be used and mapping failed.
6754         Reported by Luke Elliott <luke.elliott@activfinancial.com>.
6756         * Makefile (CFLAGS-pthread_self.os): Define this, not
6757         CFLAGS-pthread_self.c.
6759 2003-01-13  Ulrich Drepper  <drepper@redhat.com>
6761         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Don't export
6762         lll_unlock_wake_cb.
6764         * Makefile (libpthread-routines): Add version.  Add rules to build
6765         version.os and banner.h.
6766         * version.c: New file.
6768 2003-01-13  Jakub Jelinek  <jakub@redhat.com>
6770         * pthread_mutex_lock.c (__pthread_mutex_lock_internal): Make
6771         the alias unconditional.
6772         * pthread_mutex_unlock.c  (__pthread_mutex_unlock_internal): Likewise.
6774 2003-01-13  Ulrich Drepper  <drepper@redhat.com>
6776         * Makefile (CFLAGS-pthread_self.c): New definition.
6778 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
6780         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Add
6781         INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
6782         * sysdeps/unix/sysv/linux/raise.c (raise): Likewise.
6783         * init.c (__pthread_initialize_minimal_internal): Likewise.
6785 2003-01-07  Jakub Jelinek  <jakub@redhat.com>
6787         * pthreadP.h (__pthread_cond_timedwait): Add prototype.
6789         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
6790         (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
6791         (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
6792         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
6793         (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
6794         (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
6796 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
6798         * pthreadP.h (LIBC_CANCEL_HANDLED): Define.
6799         * pt-system.c (LIBC_CANCEL_HANDLED): Add.
6800         * tst-cancel-wrappers.sh: Remove all exceptions.
6802 2003-01-05  Ulrich Drepper  <drepper@redhat.com>
6804         * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
6805         features.  Reported by Marijn Ros <marijn@mad.scientist.com>.
6807         * sysdeps/unix/sysv/linux/jmp-unwind.c: Include <pthread-functions.h>.
6808         Use __libc_pthread_functions array if SHARED.
6810         * pthreadP.h: Move pthread_cond_2_0_t definition to...
6811         * sysdeps/unix/sysv/linux/internaltypes.h: ...here.
6813         * sysdeps/pthread/bits/libc-lock.h (__libc_ptf_call): New #define.
6814         (__libc_rwlock_rdlock, __libc_rwlock_wrlock, __libc_rwlock_unlock,
6815         __libc_key_create, __libc_getspecific, __libc_setspecific): Use
6816         __libc_ptf_call instead of __libc_maybe_call.
6817         (PTF): New #define.
6818         (__libc_cleanup_region_start): Wrap function name with PTF call.
6819         (__libc_cleanup_region_end): Likewise.
6820         (__libc_cleanup_end): Likewise.
6822         * pthread_getspecific.c: Add __pthread_getspecific_internal alias.
6823         * pthread_setspecific.c: Add __pthread_setspecific_internal alias.
6824         * pthread_key_create.c: Add __pthread_key_create_internal alias.
6825         * pthreadP.h: Add prototypes.
6827         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Add
6828         __pthread_rwlock_rdlock, __pthread_rwlock_wrlock, and
6829         __pthread_rwlock_unlock aliases.
6830         * pthreadP.h: Add prototypes for new aliases.
6832         * pthreadP.h (struct pthead_functions): Moved to...
6833         * sysdeps/pthread/pthread-functions.h: ...here.  New file.
6834         * init.c (pthread_functions): Add initializers for new elements.
6836         * cleanup_defer.c: Add __pthread_cleanup_push_defer and
6837         __pthread_cleanup_pop_restore aliases.
6838         * pthreadP.h: Add prototypes.
6840         * cleanup.c: Rename _GI_pthread_cleanup_push to __pthread_cleanup_push
6841         and _GI_pthread_cleanup_pop to __pthread_cleanup_pop.
6842         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Adjust caller.
6843         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
6844         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
6845         * pthreadP.h: Adjust prototypes and callers.
6847 2003-01-04  Ulrich Drepper  <drepper@redhat.com>
6849         * Makefile (tests): Add tst-cancel7.
6850         (tst-cancel7-ARGS): New variable.
6851         * tst-cancel7.c: New file.
6853         * old_pthread_cond_broadcast.c: Optimize initialization a bit to work
6854         around gcc defficiencies.
6855         * old_pthread_cond_signal.c: Likewise.
6856         * old_pthread_cond_timedwait.c: Likewise.
6857         * old_pthread_cond_wait.c: Likewise.
6859         * pthreadP.h (pthread_cond_2_0_t): Remove unneeded lock element.
6861 2003-01-03  Ulrich Drepper  <drepper@redhat.com>
6863         * Makefile (tests): Add tst-cond7.
6864         * tst-cond7.c: New file.
6866         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
6867         (condvar_cleanup): Get condvar address from the right place.
6869         * atomic.h: Correct definitions of atomic_full_barrier,
6870         atomic_read_barrier, atomic_write_barrier.
6872         * old_pthread_cond_broadcast.c: Make memory allocate and initialization
6873         race-free.
6874         * old_pthread_cond_signal.c: Likewise.
6875         * old_pthread_cond_timedwait.c: Likewise.
6876         * old_pthread_cond_wait.c: Likewise.
6878 2003-01-03  Jakub Jelinek  <jakub@redhat.com>
6880         * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
6882 2003-01-03  Ulrich Drepper  <drepper@redhat.com>
6884         * pthreadP.h (pthread_cond_2_0_t): New type.
6885         (struct pthread_functions): Use new type for 2.0 condvar callbacks.
6886         Use new type for the 2.0 condvar function prototypes.
6887         * forward.c: Use pthread_cond_2_0_t for 2.0 condvar functions.
6888         * old_pthread_cond_init.c: Use pthread_cond_2_0_t for condvar
6889         parameter.
6890         * old_pthread_cond_destroy.c: Likewise.
6891         * old_pthread_cond_broadcast.c: Likewise.  Lock appropriately.
6892         * old_pthread_cond_signal.c: Likewise.
6893         * old_pthread_cond_timedwait.c: Likewise.
6894         * old_pthread_cond_wait.c: Likewise.
6896         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
6897         (__pthread_cond_wait): Don't save cancellation mode and seq value
6898         in same location.
6900         * herrno.c (__h_errno_location): Don't define as weak.
6902 2003-01-02  Jakub Jelinek  <jakub@redhat.com>
6904         * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
6905         pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
6906         and pthread_cond_wait.
6907         * old_pthread_cond_broadcast.c (__old_pthread_cond_broadcast):
6908         Renamed to...
6909         (__pthread_cond_broadcast_2_0): ... this.
6910         * old_pthread_cond_destroy.c (__old_pthread_cond_destroy):
6911         Renamed to...
6912         (__pthread_cond_destroy_2_0): ... this.
6913         * old_pthread_cond_init.c (__old_pthread_cond_init):
6914         Renamed to...
6915         (__pthread_cond_init_2_0): ... this.
6916         * old_pthread_cond_signal.c (__old_pthread_cond_signal):
6917         Renamed to...
6918         (__pthread_cond_signal_2_0): ... this.
6919         * old_pthread_cond_wait.c (__old_pthread_cond_wait):
6920         Renamed to...
6921         (__pthread_cond_wait_2_0): ... this.
6922         * pthread_cond_destroy.c: Include shlib-compat.h.
6923         (pthread_cond_destroy): Change strong_alias into versioned_symbol.
6924         * pthread_cond_init.c: Include shlib-compat.h.
6925         (pthread_cond_init): Change strong_alias into versioned_symbol.
6926         * pthreadP.h (struct pthread_functions): Rename ptr_pthread_cond_*
6927         fields to ptr___pthread_cond_* and add ptr___pthread_cond_*_2_0
6928         fields.
6929         (__pthread_cond_broadcast_2_0, __pthread_cond_destroy_2_0,
6930         __pthread_cond_init_2_0, __pthread_cond_signal_2_0,
6931         __pthread_cond_wait_2_0): New prototypes.
6932         (__old_pthread_cond_broadcast, __old_pthread_cond_destroy,
6933         __old_pthread_cond_init, __old_pthread_cond_signal,
6934         __old_pthread_cond_wait): Removed.
6935         * init.c: Include shlib-compat.h.
6936         (pthread_functions): Guard ptr___pthread_attr_init_2_0
6937         initialization with SHLIB_COMPAT (GLIBC_2_0, GLIBC_2_1).
6938         Rename ptr_pthread_cond_* to ptr___pthread_cond_*, initialize
6939         ptr___pthread_cond_*_2_0 fields.
6940         * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
6941         pthread_cond_*@GLIBC_2.0 compatibility symbols.
6943         * sysdeps/pthread/sigaction.c (SIGCANCEL): Only define if
6944         LIBC_SIGACTION was not yet defined.
6945         [!defined LIBC_SIGACTION]: Define LIBC_SIGACTION, #include self.
6946         [!defined LIBC_SIGACTION] (__sigaction): New function and
6947         libc_hidden_weak.
6948         [!defined LIBC_SIGACTION] (sigaction): New weak_alias.
6949         [defined LIBC_SIGACTION]: #include_next <sigaction.c>.
6951 2003-01-02  Jakub Jelinek  <jakub@redhat.com>
6953         * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
6955 2003-01-02  Ulrich Drepper  <drepper@redhat.com>
6957         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
6958         New, larger type definition.
6959         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: New condvar
6960         implementation.
6961         * Versions [libpthread]: Add definitions for new pthread_cond_*
6962         interfaces for version GLIBC_2.3.2.
6963         * pthread_cond_init.c: Update initialization for new type definition.
6964         * Makefile (libpthread-routines): Remove pthread_cond_wait,
6965         pthread_cond_timedwait, pthread_cond_signal, and
6966         pthread_cond_broadcast.  Add old_pthread_cond_init,
6967         old_pthread_cond_destroy, old_pthread_cond_wait,
6968         old_pthread_cond_timedwait, old_pthread_cond_signal, and
6969         old_pthread_cond_broadcast.
6970         * old_pthread_cond_broadcast.c: New file.
6971         * old_pthread_cond_destroy.c: New file.
6972         * old_pthread_cond_init.c: New file.
6973         * old_pthread_cond_signal.c: New file.
6974         * old_pthread_cond_timedwait.c: New file.
6975         * old_pthread_cond_wait.c: New file.
6976         * pthreadP.h: Add prototypes for the compatibility interfaces.
6978         * pthread_cond_destroy.c: Don't include <errno.h>.
6980 2003-01-01  Ulrich Drepper  <drepper@redhat.com>
6982         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Avoid
6983         unnecessary zero offset when addressing MUTEX.
6985 2002-12-31  Ulrich Drepper  <drepper@redhat.com>
6987         * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
6988         __register_atfork.
6989         * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
6990         for __register_atfork.
6992 2002-12-31  Jakub Jelinek  <jakub@redhat.com>
6994         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use __ASSEMBLER__
6995         instead of ASSEMBLER test macro.
6997         * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
6998         __libc_current_sigrtmax): Add libc_hidden_def.
7000         * sysdeps/pthread/list.h: Remove assert.h include.
7002 2002-12-31  Ulrich Drepper  <drepper@redhat.com>
7004         * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Use
7005         __pthread_initialize_minimal_internal not
7006         __pthread_initialize_minimal.
7008 2002-12-30  Ulrich Drepper  <drepper@redhat.com>
7010         * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Mark
7011         __pthread_initialize_minimal as hidden.
7013         * init.c (__pthread_initialize_minimal_internal): Don't mark as
7014         constructor.
7016 2002-12-31  Jakub Jelinek  <jakub@redhat.com>
7018         * Makefile ($(inst_libdir)/libpthread.so): Depend on
7019         $(common-objpfx)format.lds, include that into the output script.
7020         Fix comment.
7021         (extra-B-pthread.so): Change linuxthreads/ into nptl/.
7023 2002-12-28  Andreas Jaeger  <aj@suse.de>
7025         * sysdeps/unix/sysv/linux/xstatconv.c (xstat_conv): Adjust for
7026         nsec resolution changes.
7027         (xstat64_conv): Likewise.
7028         (xstat32_conv): Likewise.
7029         * sysdeps/unix/sysv/linux/kernel_stat.h: Add nsec resolution for
7030         struct kernel_stat.
7031         * sysdeps/unix/sysv/linux/bits/stat.h: Add nsec resolution for
7032         structs stat and stat64.
7033         * time/time.h (__timespec_defined): Define for __USE_MISC.
7034         * io/sys/stat.h [__USE_MISC]: Define __need_timespec for struct stat.
7036 2002-12-30  Jakub Jelinek  <jakub@redhat.com>
7038         * forward.c (FORWARD2): Renamed from FORWARD3.  Remove unused export
7039         argument.
7040         (pthread_attr_init_2_0, pthread_attr_init_2_1): Use FORWARD macro.
7041         (pthread_exit): Use strong_alias to avoid warnings.
7042         * pthreadP.h (struct pthread_functions): Rename ptr_pthread_exit
7043         and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
7044         ptr___pthread_attr_init_2_*.
7045         * init.c (pthread_functions): Adjust.
7047 2002-12-29  Ulrich Drepper  <drepper@redhat.com>
7049         * forward.c: Make all functions available by default again.  It
7050         caused too much trouble.
7052         * pt-siglongjmp.c: Removed.
7054 2002-12-28  Jakub Jelinek  <jakub@redhat.com>
7056         * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
7057         (SYSINFO_OFFSET, MULTIPLE_THREADS_OFFSET): Remove.
7058         * sysdeps/i386/Makefile: New file.
7059         * sysdeps/i386/tcb-offsets.sym: New file.
7060         * sysdeps/pthread/tcb-offsets.h: New file.
7061         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
7062         Remove MULTIPLE_THREADS_OFFSET and SYSINFO_OFFSET checks.
7064         * sysdeps/unix/sysv/linux/Versions [libc] (GLIBC_PRIVATE): Move
7065         __register_atfork...
7066         (GLIBC_2.3.2): ...here.
7068 2002-12-28  Ulrich Drepper  <drepper@redhat.com>
7070         * sysdeps/pthread/pthread.h: Mark pthread_attr_getstackaddr and
7071         pthread_attr_setstackaddr with __attribute_deprecated__.
7073 2002-12-27  Jakub Jelinek  <jakub@redhat.com>
7075         * pt-system.c (system): Remove cancellation handling.
7076         * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
7077         cancellation routines.
7079 2002-12-28  Ulrich Drepper  <drepper@redhat.com>
7081         * descr.h: Include <dl-sysdep.h>.
7082         (struct pthread): Move header.data.list to the back of the struct.
7083         * sysdeps/i386/tls.h (tcbhead_t): Move list to the back of the struct.
7084         (MULTIPLE_THREADS_OFFSET): Adjust offset.
7085         (SYSINFO_OFFSEET): Likewise.
7087 2002-12-27  Jakub Jelinek  <jakub@redhat.com>
7089         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h (USE_DL_SYSINFO):
7090         Define.
7091         (DL_SYSINFO_DEFAULT): Cast to uintptr_t to avoid warnings.
7092         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h (NEED_DL_SYSINFO,
7093         DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION): Define.
7094         (USE_DL_SYSINFO): Undef.
7096 2002-12-22  Jakub Jelinek  <jakub@redhat.com>
7098         * Makefile (tests-reverse): Use $(objpfx)../libc.so instead of
7099         $(common-objpfx)libc.so.
7100         * tst-cancel4.c (tf_write, tf_writev): Increase buf sizes so that
7101         it is bigger than pipe buffer size even on arches with bigger
7102         page size.
7103         (tf_usleep): Cast usleep argument to useconds_t to avoid warnings.
7105 2002-12-25  Ulrich Drepper  <drepper@redhat.com>
7107         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Implement
7108         correct errno access for case that USE___THREAD is not defined.
7110 2002-12-24  Ulrich Drepper  <drepper@redhat.com>
7112         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Add missing #endif.
7113         Patch by Marijn Ros <marijn@mad.scientist.com>.
7115 2002-12-22  Roland McGrath  <roland@redhat.com>
7117         * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
7119 2002-12-20  Ulrich Drepper  <drepper@redhat.com>
7121         * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_inexpensive): Define.
7123 2002-12-19  Ulrich Drepper  <drepper@redhat.com>
7125         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Don't define
7126         NEED_DL_SYSINFO since no processor < i686 had the sysenter opcode.
7127         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: New file.
7129         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Use ENTER_KERNEL instead
7130         of int $0x80.
7131         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
7132         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Likewise.
7133         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Likewise.
7134         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
7135         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
7136         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Likewise.
7137         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Likewise.
7138         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
7140         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add support for using
7141         sysenter.
7142         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
7144         * sysdeps/i386/tls.h: Unconditionally include <dl-sysdep.h>.
7146         * allocatestack.c (allocate_stack) [NEED_DL_SYSINFO]: Set sysinfo
7147         in new TCB.
7148         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Check
7149         that sysinfo is properly initialized.
7150         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define RTLD_PRIVATE_ERRNO
7151         to 1 only for ld.so.
7153         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
7154         RTLD_CORRECT_DYNAMIC_WEAK.
7156 2002-12-19  Jakub Jelinek  <jakub@redhat.com>
7158         * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
7159         Use return 0 as 6th argument to FORWARD4.
7160         * pthread_equal.c: Include pthreadP.h instead of pthread.h.
7162 2002-12-18  Ulrich Drepper  <drepper@redhat.com>
7164         * descr.h (struct pthread) [NEED_DL_SYSINFO]: Add sysinfo member.
7165         * sysdeps/i386/tls.h (tcbhead_t): Add sysinfo member.
7166         Define SYSINFO_OFFSEET if NEED_DL_SYSINFO is defined.
7167         (INIT_SYSINFO): New #define.
7168         (TLS_TP_INIT): Use INIT_SYSINFO.
7169         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
7170         At test to make sure SYSINFO_OFFSET value is correct.
7171         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
7173 2002-12-18  Jakub Jelinek  <jakub@redhat.com>
7175         * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
7176         * sysdeps/unix/sysv/linux/raise.c (gsignal): Add weak alias to raise.
7177         * Versions [libc: GLIBC_2.0]: Add pthread_attr_init.
7178         [libpthread: GLIBC_2.1]: Remove __pthread_rwlock_init,
7179         __pthread_rwlock_destroy, __pthread_rwlock_rdlock,
7180         __pthread_rwlock_wrlock, __pthread_rwlock_unlock,
7181         __pthread_rwlock_tryrdlock and __pthread_rwlock_trywrlock.
7183 2002-12-18  Ulrich Drepper  <drepper@redhat.com>
7185         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use ENTER_KERNEL
7186         macro instead of using int $0x80 directly.
7188         * sysdeps/pthread/bits/stdio-lock.h: New file.
7189         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: New file.
7190         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: New file.
7191         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: New file.
7192         * Makefile (routines): Add libc-lowlevelmutex.
7194         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Remove
7195         __i686.get_pc_thunk.dx.
7197 2002-12-17  Jakub Jelinek  <jakub@redhat.com>
7199         * Makefile (libpthread-shared-only-routines): Add pt-allocrtsig.
7200         (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
7201         ($(objpfx)tst-cancel-wrappers.out): New rule.
7202         * tst-cancel-wrappers.sh: New test.
7203         * tst-locale1.c: Include signal.h.
7204         (uselocale): Test static linking of __libc_current_sigrt*.
7206 2002-12-17  Ulrich Drepper  <drepper@redhat.com>
7208         * Makefile (tests): Add tst-cancel6.
7209         * tst-cancel6.c: New file
7211 2002-12-17  Jakub Jelinek  <jakub@redhat.com>
7213         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
7214         Define meaningfully for assembler as well.
7215         * pthreadP.h (struct pthread_functions): Remove
7216         ptr_pthread_attr_init field.  Add ptr_pthread_attr_init_2_0
7217         and ptr_pthread_attr_init_2_1 fields.
7218         * init.c (pthread_functions): Initialize ptr_pthread_attr_init_2_0
7219         and ptr_pthread_attr_init_2_1 instead of ptr_pthread_attr_init.
7220         * forward.c (FORWARD4): Renamed from FORWARD3. Add export argument.
7221         (FORWARD3): Define using FORWARD4.
7222         (pthread_attr_init): Provide both @GLIBC_2.0 and @@GLIBC_2.1
7223         versions.
7224         * pt-system.c: Remove duplicate stdlib.h include.
7226 2002-12-16  Ulrich Drepper  <drepper@redhat.com>
7228         * sem_init.c: Define sem_init@GLIBC_2.0.
7229         * sem_destroy.c: Define sem_destroy@GLIBC_2.0.
7230         * sem_getvalue.c: Define sem_getvalue@GLIBC_2.0.
7232         * flockfile.c: Moved to...
7233         * sysdeps/pthread/flockfile.c: ...here.  New file.
7234         * funlockfile.c: Moved to...
7235         * sysdeps/pthread/funlockfile.c: ...here.  New file.
7236         * ftrylockfile.c: Moved to...
7237         * sysdeps/pthread/ftrylockfile.c: ...here.  New file.
7239 2002-12-16  Jakub Jelinek  <jakub@redhat.com>
7241         * libc-cancellation.c: Guard both function with
7242         #if !defined NOT_IN_libc.
7243         * Makefile (libpthread-routines): Use ptw-, not pt- prefix for the
7244         automatically provided pthread wrappers.
7245         * pthreadP.h (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define to
7246         CANCEL_* if IS_IN_libpthread and to dummy versions if not in libc
7247         nor in libpthread.
7248         * pt-open.c: Removed.
7249         * pt-fcntl.c: Removed.
7250         * pt-fsync.c: Removed.
7251         * pt-lseek.c: Removed.
7252         * pt-msgrcv.c: Removed.
7253         * pt-msgsnd.c: Removed.
7254         * pt-msync.c: Removed.
7255         * pt-nanosleep.c: Removed.
7256         * pt-open64.c: Removed.
7257         * pt-pause.c: Removed.
7258         * pt-pread.c: Removed.
7259         * pt-pread64.c: Removed.
7260         * pt-pwrite.c: Removed.
7261         * pt-pwrite64.c: Removed.
7262         * pt-read.c: Removed.
7263         * pt-recv.c: Removed.
7264         * pt-recvfrom.c: Removed.
7265         * pt-recvmsg.c: Removed.
7266         * pt-send.c: Removed.
7267         * pt-sendto.c: Removed.
7268         * pt-sigtimedwait.c: Removed.
7269         * pt-sigwait.c: Removed.
7270         * pt-wait.c: Removed.
7271         * pt-waitpid.c: Removed.
7272         * pt-write.c: Removed.
7273         * pt-accept.c: Removed.
7274         * pt-close.c: Removed.
7275         * pt-connect.c: Removed.
7276         * pt-lseek64.c: Removed.
7277         * pt-sendmsg.c: Removed.
7278         * pt-tcdrain.c: Removed.
7280 2002-12-15  Ulrich Drepper  <drepper@redhat.com>
7282         * init.c (__pthread_initialize_minimal_internal): Renamed from
7283         __pthread_initialize_minimal.  Make old name an alias.  This
7284         converts a normal relocation into a relative relocation.
7286         * pt-fcntl.c (__fcntl): Use fcntl64 syscall, not fcntl.
7288         * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
7289         readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
7290         * Makefile (libpthread-routines): Remove pt-creat, pt-poll,
7291         pt-pselect, pt-readv, pt-select, pt-sigpause, pt-sigsuspend,
7292         pt-sigwaitinfo, pt-waitid, and pt-writev.
7293         * pt-creat.c: Removed.
7294         * pt-poll.c: Removed.
7295         * pt-pselect.c: Removed.
7296         * pt-readv.c: Removed.
7297         * pt-select.c: Removed.
7298         * pt-sigpause.c: Removed.
7299         * pt-sigsuspend.c: Removed.
7300         * pt-sigwaitinfo.c: Removed.
7301         * pt-waitid.c: Removed.
7302         * pt-writev.c: Removed.
7304         * init.c (pthread_functions): New variable.
7305         (__pthread_initialize_minimal): Pass pointer to pthread_functions
7306         (or NULL) to __libc_pthread_init.
7307         * forward.c: Rewrite to use __libc:pthread_functions array to get
7308         function addresses.
7309         * sysdeps/unix/sysv/linux/fork.h: Remove __libc_pthread_init
7310         prototype.
7311         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
7312         Take new parameter.  Copy content of variable pointed to by it
7313         to __libc_pthread_init.
7315         * pthreadP.h (struct pthread_functions): New type.
7316         (__libc_pthread_init): Declare.
7318         * pthread_attr_destroy.c: Add namespace protected alias.
7319         * pthread_attr_getdetachstate.c: Likewise.
7320         * pthread_attr_getinheritsched.c: Likewise.
7321         * pthread_attr_getschedparam.c: Likewise.
7322         * pthread_attr_getschedpolicy.c: Likewise.
7323         * pthread_attr_getscope.c: Likewise.
7324         * pthread_attr_setdetachstate.c: Likewise.
7325         * pthread_attr_setinheritsched.c: Likewise.
7326         * pthread_attr_setschedparam.c: Likewise.
7327         * pthread_attr_setschedpolicy.c: Likewise.
7328         * pthread_attr_setscope.c: Likewise.
7329         * pthread_cond_broadcast.c: Likewise.
7330         * pthread_cond_destroy.c: Likewise.
7331         * pthread_cond_init.c: Likewise.
7332         * pthread_cond_signal.c: Likewise.
7333         * pthread_cond_wait.c: Likewise.
7334         * pthread_condattr_destroy.c: Likewise.
7335         * pthread_condattr_init.c: Likewise.
7336         * pthread_equal.c: Likewise.
7337         * pthread_exit.c: Likewise.
7338         * pthread_getschedparam.c: Likewise.
7339         * pthread_self.c: Likewise.
7340         * pthread_setcancelstate.c: Likewise.
7341         * pthread_setschedparam.c: Likewise.
7342         * pthread_mutex_destroy.c: Likewise.
7343         * pthread_mutex_init.c: Likewise.
7344         * pthreadP.h: Add prototypes for the aliases.
7346         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Set
7347         multiple_threads member in correct TCB to 1.
7349         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define
7350         SINGLE_THREAD_P.  If in libc or libpthread examine multiple_thread
7351         member of thread decriptor, otherwise return unconditionally 1.
7353 2002-12-14  Ulrich Drepper  <drepper@redhat.com>
7355         * sysdeps/unix/sysv/linux/i386/pt-socket.S: Changes folded into the
7356         regular Linux version.  Remove file.
7357         * sysdeps/unix/sysv/linux/connect.S: Likewise.  Remove file.
7358         * sysdeps/unix/sysv/linux/llseek.c: Likewise.  Remove file.
7359         * sysdeps/unix/sysv/linux/msgrcv.c: Likewise.  Remove file.
7360         * sysdeps/unix/sysv/linux/msgsnd.c: Likewise.  Remove file.
7361         * sysdeps/unix/sysv/linux/open64.c: Likewise.  Remove file.
7362         * sysdeps/unix/sysv/linux/poll.c: Likewise.  Remove file.
7363         * sysdeps/unix/sysv/linux/pread.c: Likewise.  Remove file.
7364         * sysdeps/unix/sysv/linux/pread64.c: Likewise.  Remove file.
7365         * sysdeps/unix/sysv/linux/pselect.c: Likewise.  Remove file.
7366         * sysdeps/unix/sysv/linux/pwrite.c: Likewise.  Remove file.
7367         * sysdeps/unix/sysv/linux/pwrite64.c: Likewise.  Remove file.
7368         * sysdeps/unix/sysv/linux/readv.c: Likewise.  Remove file.
7369         * sysdeps/unix/sysv/linux/recv.S: Likewise.  Remove file.
7370         * sysdeps/unix/sysv/linux/recvfrom.S: Likewise.  Remove file.
7371         * sysdeps/unix/sysv/linux/recvmsg.S: Likewise.  Remove file.
7372         * sysdeps/unix/sysv/linux/send.S: Likewise.  Remove file.
7373         * sysdeps/unix/sysv/linux/sendmsg.S: Likewise.  Remove file.
7374         * sysdeps/unix/sysv/linux/sendto.S: Likewise.  Remove file.
7375         * sysdeps/unix/sysv/linux/sigpause.c: Likewise.  Remove file.
7376         * sysdeps/unix/sysv/linux/sigsuspend.c: Likewise.  Remove file.
7377         * sysdeps/unix/sysv/linux/sigtimedwait.c: Likewise.  Remove file.
7378         * sysdeps/unix/sysv/linux/sigwait.c: Likewise.  Remove file.
7379         * sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise.  Remove file.
7380         * sysdeps/unix/sysv/linux/system.c: Likewise.  Remove file.
7381         * sysdeps/unix/sysv/linux/tcdrain.c: Likewise.  Remove file.
7382         * sysdeps/unix/sysv/linux/wait.c: Likewise.  Remove file.
7383         * sysdeps/unix/sysv/linux/waitid.c: Likewise.  Remove file.
7384         * sysdeps/unix/sysv/linux/waitpid.c: Likewise.  Remove file.
7385         * sysdeps/unix/sysv/linux/writev.c: Likewise.  Remove file.
7386         * sysdeps/unix/sysv/linux/i386/fcntl.c: Likewise.  Remove file.
7388 2002-12-14  Jakub Jelinek  <jakub@redhat.com>
7390         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
7391         * sysdeps/unix/sysv/linux/open.c: Removed.
7392         * sysdeps/unix/sysv/linux/fsync.c: Removed.
7393         * sysdeps/unix/sysv/linux/lseek.c: Removed.
7394         * sysdeps/unix/sysv/linux/msync.c: Removed.
7395         * sysdeps/unix/sysv/linux/read.c: Removed.
7396         * sysdeps/unix/sysv/linux/close.c: Removed.
7397         * sysdeps/unix/sysv/linux/creat.c: Removed.
7398         * sysdeps/unix/sysv/linux/nanosleep.c: Removed.
7399         * sysdeps/unix/sysv/linux/pause.c: Removed.
7400         * sysdeps/unix/sysv/linux/select.c: Removed.
7401         * sysdeps/unix/sysv/linux/write.c: Removed.
7403 2002-12-14  Ulrich Drepper  <drepper@redhat.com>
7405         * sysdeps/unix/sysv/linux/i386/pt-socket.S: Check multiple_threads
7406         element in TCB to see whether locking is needed.
7408         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Check that
7409         MULTIPLE_THREADS_OFFSET value is correct.
7411         * sysdeps/unix/sysv/linux/close.c: New file.
7412         * sysdeps/unix/sysv/linux/connect.S: New file.
7413         * sysdeps/unix/sysv/linux/creat.c: New file.
7414         * sysdeps/unix/sysv/linux/fsync.c: New file.
7415         * sysdeps/unix/sysv/linux/llseek.c: New file.
7416         * sysdeps/unix/sysv/linux/lseek.c: New file.
7417         * sysdeps/unix/sysv/linux/msgrcv.c: New file.
7418         * sysdeps/unix/sysv/linux/msgsnd.c: New file.
7419         * sysdeps/unix/sysv/linux/msync.c: New file.
7420         * sysdeps/unix/sysv/linux/nanosleep.c: New file.
7421         * sysdeps/unix/sysv/linux/open.c: New file.
7422         * sysdeps/unix/sysv/linux/open64.c: New file.
7423         * sysdeps/unix/sysv/linux/pause.c: New file.
7424         * sysdeps/unix/sysv/linux/poll.c: New file.
7425         * sysdeps/unix/sysv/linux/pread.c: New file.
7426         * sysdeps/unix/sysv/linux/pread64.c: New file.
7427         * sysdeps/unix/sysv/linux/pselect.c: New file.
7428         * sysdeps/unix/sysv/linux/pwrite.c: New file.
7429         * sysdeps/unix/sysv/linux/pwrite64.c: New file.
7430         * sysdeps/unix/sysv/linux/readv.c: New file.
7431         * sysdeps/unix/sysv/linux/recv.S: New file.
7432         * sysdeps/unix/sysv/linux/recvfrom.S: New file.
7433         * sysdeps/unix/sysv/linux/recvmsg.S: New file.
7434         * sysdeps/unix/sysv/linux/select.c: New file.
7435         * sysdeps/unix/sysv/linux/send.S: New file.
7436         * sysdeps/unix/sysv/linux/sendmsg.S: New file.
7437         * sysdeps/unix/sysv/linux/sendto.S: New file.
7438         * sysdeps/unix/sysv/linux/sigpause.c: New file.
7439         * sysdeps/unix/sysv/linux/sigsuspend.c: New file.
7440         * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
7441         * sysdeps/unix/sysv/linux/sigwait.c: New file.
7442         * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
7443         * sysdeps/unix/sysv/linux/system.c: New file.
7444         * sysdeps/unix/sysv/linux/tcdrain.c: New file.
7445         * sysdeps/unix/sysv/linux/wait.c: New file.
7446         * sysdeps/unix/sysv/linux/waitid.c: New file.
7447         * sysdeps/unix/sysv/linux/waitpid.c: New file.
7448         * sysdeps/unix/sysv/linux/writev.c: New file.
7449         * sysdeps/unix/sysv/linux/i386/fcntl.c: New file.
7451         * pt-readv.c: Fix comment.
7453 2002-12-14  Jakub Jelinek  <jakub@redhat.com>
7455         * tst-cleanup1.c: Include stdlib.h.
7457         * tst-cancel5.c: New test.
7458         * Makefile (tests): Add tst-cancel5.
7459         (tst-cancel5): Link against libc.so libpthread.so in that order.
7461 2002-12-13  Ulrich Drepper  <drepper@redhat.com>
7463         * forward.c (test_loaded): Prevent recursive calls.
7465         * Makefile (routines): Add libc-cancellation.
7466         * libc-cancellation.c: New file.
7467         * descr.h (struct pthread): Add multiple_threads field.
7468         * allocatestack.c (allocate_stack): Initialize multiple_header field of
7469         new thread descriptor to 1.
7470         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread):
7471         Initialize multiple_thread field after successful thread creation.
7472         * cancellation.c (__do_cancel): Move to pthreadP.h.
7473         (__pthread_enable_asynccancel): Remove parameter from __do_cancel call.
7474         (__pthread_disable_asynccancel): Add internal_function attribute.
7475         * init.c (sigcancel_handler): Remove parameter from __do_cancel call.
7476         * pthread_setcancelstate.c: Likewise.
7477         * pthread_setcanceltype.c: Likewise.
7478         * pthread_exit.c: Likewise.
7479         * pthreadP.h (CANCELLATION_P): Likewise.
7480         (__do_cancel): Define as static inline.
7481         (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): New #defines.
7482         (__libc_enable_asynccancel, __libc_disable_asynccancel): New
7483         declarations.
7484         * sysdeps/i386/tls.h (tcbhead_t): Add list and multiple_threads
7485         fields.  Define MULTIPLE_THREADS_OFFSET.
7486         * sysdeps/pthread/bits/libc-lock.h: Remove __libc_locking_needed
7487         declaration.
7488         * sysdeps/unix/sysv/linux/accept.S: New file.
7489         * sysdeps/unix/sysv/linux/read.c: New file.
7490         * sysdeps/unix/sysv/linux/write.c: New file.
7491         * sysdeps/unix/sysv/linux/i386/pt-socket.S: New file.
7492         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove definition and
7493         initialization of __libc_locking_needed.
7494         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't use
7495         __libc_locking_needed, use multiple_threads field in TCB.
7496         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
7498 2002-12-12  Ulrich Drepper  <drepper@redhat.com>
7500         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: Use i486
7501         version.
7502         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: Likewise.
7504         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Correct
7505         access to __libc_locking_needed for PIC.
7507 2002-12-12  Jakub Jelinek  <jakub@redhat.com>
7509         * sysdeps/pthread/bits/libc-lock.h (__libc_locking_needed): Only
7510         declare for libc.so.
7511         (__libc_lock_init, __libc_lock_init_recursive): Change into comma
7512         expression.
7513         (__libc_lock_lock): Put into statement expression.
7514         (__libc_lock_unlock): Remove trailing semicolon.
7515         * sysdeps/unix/sysv/linux/fork.h (__libc_pthread_init): Fix typo.
7517 2002-12-12  Roland McGrath  <roland@redhat.com>
7519         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use asm operand with
7520         "m" constraint to refer to __libc_locking_needed.  Declare it here.
7522 2002-12-12  Ulrich Drepper  <drepper@redhat.com>
7524         * sysdeps/unix/sysv/linux/fork-gen.c: Renamed to...
7525         * sysdeps/unix/sysv/linux/libc_pthread_init.c: ...this.
7526         Initialize __libc_locking_needed.
7527         * init.c (__pthread_initialize_minimal): Call __libc_pthread_init
7528         instead of __register_pthread_fork_handler.
7529         * sysdeps/pthread/bits/libc-lock.h: Declare __libc_locking_needed.
7530         * sysdeps/unix/sysv/linux/Makefile (sysdep_routimes): Replace
7531         fork-gen with libc_pthread_init.
7532         * sysdeps/unix/sysv/linux/Versions: Use __libc_pthread_init instead
7533         of __register_pthread_fork_handler.
7534         * sysdeps/unix/sysv/linux/fork.h: Declare __libc_pthread_init instead
7535         of __register_pthread_fork_handler.
7536         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use
7537         __libc_locking_needed to determine whether lock prefix can be avoided.
7538         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
7540 2002-12-11  Ulrich Drepper  <drepper@redhat.com>
7542         * Makefile (tests): Add tst-cleanup1.
7543         * tst-cleanup1.c: New file.
7544         * cancellation.c (__cleanup_thread): Removed.
7545         (__do_cancel): Remove call to __cleanup_thread.
7546         * pthreadP.h: Remove __cleanup_thread prorotype.
7548         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
7549         Remember function and argument even if cancellation handler
7550         function is not available.
7551         (__libc_cleanup_region_end): Execute registered function directly if
7552         pthread functions are not available.
7553         (__libc_cleanup_end): Likewise.
7555         * init.c (__pthread_initialize_minimal): Fix initialization in
7556         static lib by preventing gcc from being too clever.
7558 2002-12-10  Ulrich Drepper  <drepper@redhat.com>
7560         * init.c (__pthread_initialize_minimal): Remove unneccesary
7561         sigaddset call.
7563         * Makefile (tests): We can run tst-locale2 now.
7565 2002-12-09  Ulrich Drepper  <drepper@redhat.com>
7567         * Versions: Remove duplicated sigwait entry.
7569 2002-12-08  Ulrich Drepper  <drepper@redhat.com>
7571         * pthreadP.h: Enable pthread_cleanup_{push,pop} optimizations only
7572         inside libpthread.
7574         * pt-fcntl.c (__fcntl): Initialize oldtype to avoid warning.
7576         * pthreadP.h: Declare __pthread_enable_asynccancel and
7577         __pthread_disable_asynccancel.
7578         (CANCEL_ASYNC): Use __pthread_enable_asynccancel.
7579         (CANCEL_RESET): Use __pthread_disable_asynccancel.
7580         * cancellation.c (__pthread_enable_asynccancel): New function.
7581         (__pthread_disable_asynccancel): New function.
7582         * pt-accept.c: Adjust for CANCEL_ASYNC and CANCEL_RESET change.
7583         * pt-close.c: Likewise.
7584         * pt-connect.c: Likewise.
7585         * pt-creat.c: Likewise.
7586         * pt-fcntl.c: Likewise.
7587         * pt-fsync.c: Likewise.
7588         * pt-lseek.c: Likewise.
7589         * pt-lseek64.c: Likewise.
7590         * pt-msgrcv.c: Likewise.
7591         * pt-msgsnd.c: Likewise.
7592         * pt-msync.c: Likewise.
7593         * pt-nanosleep.c: Likewise.
7594         * pt-open.c: Likewise.
7595         * pt-open64.c: Likewise.
7596         * pt-pause.c: Likewise.
7597         * pt-poll.c: Likewise.
7598         * pt-pread.c: Likewise.
7599         * pt-pread64.c: Likewise.
7600         * pt-pselect.c: Likewise.
7601         * pt-pwrite.c: Likewise.
7602         * pt-pwrite64.c: Likewise.
7603         * pt-read.c: Likewise.
7604         * pt-readv.c: Likewise.
7605         * pt-recv.c: Likewise.
7606         * pt-recvfrom.c: Likewise.
7607         * pt-recvmsg.c: Likewise.
7608         * pt-select.c: Likewise.
7609         * pt-send.c: Likewise.
7610         * pt-sendmsg.c: Likewise.
7611         * pt-sendto.c: Likewise.
7612         * pt-sigpause.c: Likewise.
7613         * pt-sigsuspend.c: Likewise.
7614         * pt-sigtimedwait.c: Likewise.
7615         * pt-sigwait.c: Likewise.
7616         * pt-sigwaitinfo.c: Likewise.
7617         * pt-system.c: Likewise.
7618         * pt-tcdrain.c: Likewise.
7619         * pt-wait.c: Likewise.
7620         * pt-waitid.c: Likewise.
7621         * pt-waitpid.c: Likewise.
7622         * pt-write.c: Likewise.
7623         * pt-writev.c: Likewise.
7624         * pthread_join.c: Likewise.
7625         * pthread_timedjoin.c: Likewise.
7627         * pt-sigpause.c (sigsuspend): Call __sigsuspend.
7628         (__xpg_sigpause): New function.
7629         * Versions (libpthread:GLIBC_2.3.2): Add __xpg_sigpause.
7631 2002-12-07  Ulrich Drepper  <drepper@redhat.com>
7633         * Makefile (CFLAGS-ftrylockfile.c): Add -D_IO_MTSAFE_IO.
7635         * cleanup.c: Move declarations of _GI_pthread_cleanup_push and
7636         _GI_pthread_cleanup_pop to pthreadP.h.
7638         * ftrylockfile.c: Use _IO_lock_trylock instead of
7639         pthread_mutex_trylock.
7641         * pthreadP.h (CANCEL_ASYNC): Use __pthread_setcanceltype.
7642         (CANCEL_RESET): Likewise.
7643         (__pthread_setcanceltype_): Declare.
7644         (__pthread_mutex_lock_internal): Declare.
7645         (__pthread_mutex_unlock_internal): Declare.
7646         (__pthread_once_internal): Declare.
7647         (pthread_cleanup_push): Redefine using _GI_pthread_cleanup_push.
7648         (pthread_cleanup_pop): Redefine using _GI_pthread_cleanup_pop.
7650         * pthread_cond_timedwait.c: Use INTUSE is calls to pthread_mutex_lock
7651         and pthread_mutex_unlock.
7652         * pthread_cond_wait.c: Likewise.
7653         * pthread_mutex_lock.c: Use INTDEF to define alias if needed.
7654         * pthread_mutex_unlock.c: Likewise.
7656         * pthread_setcanceltype.c: Add additional alias
7657         __pthread_setcanceltype.
7659         * sem_unlink.c (sem_unlink): Use __pthread_once with INTDEF.
7660         * sem_open.c (sem_open): Likewise.
7661         Use __libc_open, __libc_write, and __libc_close instead of
7662         open, write, and close respectively.
7664         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_trylock_internal):
7665         Rewrite as statement expression since it must return a value.
7667         * pthread_cancel.c: Use __pthread_kill instead of pthread_kill.
7668         * sysdeps/unix/sysv/linux/pthread_kill.c: Define additional alias
7669         __pthread_kill.
7671         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Define additional
7672         alias __pthread_once_internal.
7674         * sysdeps/unix/sysv/linux/raise.c: Use libc_hidden_def for raise.
7676 2002-12-06  Ulrich Drepper  <drepper@redhat.com>
7678         * Makefile (tests): Add tst-stdio1 and tst-stdio2.
7679         * tst-stdio1.c: New file.
7680         * tst-stdio2.c: New file.
7682         * init.c (__pthread_initialize_minimal): Correct INIT_LIST_HEAD use.
7684         * Makefile (tests): Comment out tst-locale2 for now.
7685         (CFLAGS-flockfile.c, CFLAGS-funlockfile.c): Define to -D_IO_MTSAFE_IO.
7687         * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-fork.c to
7688         -D_IO_MTSAFE_IO.
7689         * sysdeps/unix/sysv/linux/fork.c: Include <bits/stdio-lock.h>.
7690         Use _IO_lock_init instead of explicit assignment.
7692         * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
7693         Define __libc_lock_* and __libc_lock_recursive macros with
7694         lowlevellock macros, not pthread mutexes.
7696         * flockfile.c: Include <bits/stdio-lock.h>.  Use _IO_lock_lock instead
7697         of pthread_mutex_lock.
7698         * funlockfile.c: Include <bits/stdio-lock.h>.  Use _IO_lock_unlock
7699         instead of pthread_mutex_unlock.
7701 2002-12-06  Roland McGrath  <roland@redhat.com>
7703         * allocatestack.c (__stack_user): Use uninitialized defn.
7704         * init.c (__pthread_initialize_minimal): Initialize it here.
7706 2002-12-05  Roland McGrath  <roland@redhat.com>
7708         * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
7709         string.
7710         * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
7712         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Add
7713         missing & here too.
7715 2002-12-05  Ulrich Drepper  <drepper@redhat.com>
7717         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
7718         lowlevellock.
7719         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: New file.
7720         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: New file.
7721         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: New file.
7722         * sysdeps/pthread/bits/libc-lock.h: Use lowlevellock implementation
7723         for __libc_lock_* macros.
7724         * Makefile (routines): Add libc-lowlevellock.
7726 2002-10-09  Roland McGrath  <roland@redhat.com>
7728         * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
7729         Under [__PIC__], call the function via the pointer fetched for
7730         comparison rather than a call by name that uses the PLT.
7731         (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
7732         (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
7733         (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
7734         (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
7735         (__libc_key_create, __libc_getspecific, __libc_setspecific): Use it.
7737 2002-12-04  Roland McGrath  <roland@redhat.com>
7739         * forward.c (pthread_self): Use FORWARD3 macro to correct return type.
7741         * sysdeps/i386/td_ta_map_lwp2thr.c: Moved from ../nptl_db.
7742         * sysdeps/generic/td_ta_map_lwp2thr.c: New file.
7744         * pthread_create.c (start_thread): Add missing & on __nptl_last_event.
7746 2002-12-04  Ulrich Drepper  <drepper@redhat.com>
7748         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Make pthread_t
7749         a completely opaque, non-integer type.
7750         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
7752 2002-12-05  Jakub Jelinek  <jakub@redhat.com>
7754         * sysdeps/i386/tls.h: Include stdlib.h.
7755         * sysdeps/x86_64/tls.h: Likewise.
7757 2002-12-04  Ulrich Drepper  <drepper@redhat.com>
7759         * Makefile (tests): Add tst-locale2.
7760         (tests-static): Likewise.
7761         * tst-locale2.c: New file.
7763         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Mark asms as
7764         volatile and add memory clobbers to lock operations.
7766 2002-12-03  Ulrich Drepper  <drepper@redhat.com>
7768         * sysdeps/i386/i686/bits/atomic.h: Use i486 version.
7769         * sysdeps/i386/i486/bits/atomic.h: New file.
7770         * sysdeps/i386/i586/bits/atomic.h: New file.
7771         * sysdeps/i386/i686/pthread_spin_trylock.S: Define HAVE_CMOV and
7772         include i486 version.
7773         * sysdeps/i386/i486/pthread_spin_trylock.S: New file.
7774         * sysdeps/i386/i586/pthread_spin_trylock.S: New file.
7775         Patch by Marijn Ros <marijn@mad.scientist.com>.
7777         * allocatestack.c (get_cached_stack): Don't crash if we first
7778         found a stack with a larger size then needed.
7779         Reported by Hui Huang <hui.huang@sun.com>.
7781         * Makefile (tests): Add tst-sysconf.
7782         * tst-sysconf.c: New file.
7784         * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine
7785         PTHREAD_THREADS_MAX.
7787 2002-12-02  Roland McGrath  <roland@redhat.com>
7789         * pthreadP.h (__stack_user, __nptl_create_event, __nptl_death_event):
7790         Declare using hidden_proto instead of attribute_hidden, so there are
7791         non-.hidden static symbols for gdb to find.
7792         (__pthread_keys): Likewise.
7793         * events.c (__nptl_create_event, __nptl_death_event): Add hidden_def.
7794         * allocatestack.c (__stack_user): Likewise.
7795         * pthread_create.c (__pthread_keys): Likewise.
7796         (__nptl_threads_events, __nptl_last_event): Make these static instead
7797         of hidden.
7798         * pthread_key_create.c (__pthread_pthread_keys_max,
7799         __pthread_pthread_key_2ndlevel_size): Renamed from __linuxthreads_*.
7801 2002-12-02  Ulrich Drepper  <drepper@redhat.com>
7803         * Makefile (tests): Add tst-locale1.  If buid-static is yes link
7804         statically.
7805         * tst-locale1.c: New file.
7807         * pthread_cond_timedwait.c: Include <stdlib.h>.
7809         * Makefile (tests): Add tst-fork2 and tst-fork3.
7810         * tst-fork2.c: New file.
7811         * tst-fork3.c: New file.
7813 2002-11-28  Ulrich Drepper  <drepper@redhat.com>
7815         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
7817         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
7818         require it to 200112L.
7820         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Use cmov
7821         instruction only if HAVE_CMOV is defined.
7822         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Define HAVE_CMOV.
7824         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: New file.
7826         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: New file.
7828         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: New file.
7830         * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: New file.
7832 2002-11-27  Ulrich Drepper  <drepper@redhat.com>
7834         * sysdeps/x86_64/bits/atomic.h: New file.
7836         * sysdeps/i386/i686/bits/atomic.h: Fix asm syntax for 8- and
7837         16-bit operations.
7839         * sysdeps/unix/sysv/linux/raise.c (raise): Use INTERNAL_SYSCALL if
7840         possible since gettid cannot fail.
7842         * sysdeps/x86_64/pthreaddef.h: New file.
7844         * sysdeps/i386/pthreaddef.h (gettid): Removed.
7846         * sysdeps/x86_64/pthread_spin_init.c: New file.
7847         * sysdeps/x86_64/pthread_spin_lock.c: New file.
7848         * sysdeps/x86_64/pthread_spin_trylock.c: New file.
7849         * sysdeps/x86_64/pthread_spin_unlock.c: New file.
7851         * sysdeps/i386/i686/pthread_spin_trylock.S (pthread_spin_trylock):
7852         Add missing lock prefix.  Minute optimization.
7854         * tst-spin2.c (main): Also check successful trylock call.
7856         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use correct
7857         syscall.  Fix typo in case INTERNAL_SYSCALL is not used.
7859         * sysdeps/i386/pthread_spin_destroy.c: Moved to...
7860         * sysdeps/pthread/pthread_spin_destroy.c: ...here.  New file.
7862         * sysdeps/i386/pthread_sigmask.c: Removed.  Use the generic code.
7863         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Return correct
7864         value in case of an error.  Add support for INTERNAL_SYSCALL.
7866         * sysdeps/i386/pthread_sigmask.c (pthread_sigmask): Return correct
7867         value in case of an error.
7869         * sysdeps/x86_64/tls.h: New file.
7871 2002-11-26  Ulrich Drepper  <drepper@redhat.com>
7873         * sysdeps/i386/tls.h (THREAD_GETMEM_NC): Change interface.  It now
7874         takes the array member name and the index as parameters.
7875         (THREAD_SETMEM_NC): Likewise.
7876         * pthread_getspecific.c: Use new THREAD_GETMEM_NC interface.
7877         * pthread_setspecific.c: Use new THREAD_GETMEM_NC and THREAD_SETMEM_NC
7878         interfaces.
7880         * sysdeps/i386/tls.h (THREAD_SETMEM): Use size of member element
7881         to decide which code to use.
7882         (THREAD_SETMEM_NC): Likewise.
7884         * allocatestack.c (queue_stack): Don't remove stack from list here.
7885         Do it in the caller.  Correct condition to prematurely terminate
7886         loop to free stacks.
7887         (__deallocate_stack): Remove stack from list here.
7889 2002-11-26  Ulrich Drepper  <drepper@redhat.com>
7891         * Makefile (tests): Add tst-stack1.
7892         * tst-stack1.c: New file.
7894         * allocatestack.c (allocate_stack): Initialize the TCB on a user
7895         provided stack.
7897         * pthread_attr_getstack.c: Return bottom of the thread area.
7899 2002-11-25  Ulrich Drepper  <drepper@redhat.com>
7901         * Makefile (libpthread-routines): Add pt-allocrtsig and
7902         pthread_kill_other_threads.
7903         * pt-allocrtsig.c: New file.
7904         * pthread_kill_other_threads.c: New file.
7905         * sysdeps/unix/sysv/linux/allocrtsig.c: Add additional aliases for
7906         all three functions.
7907         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
7908         allocrtsig.
7909         * sysdeps/unix/sysv/linux/Versions (libc:GLIBC_PRIVATE): Export
7910         __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
7911         and __libc_allocate_rtsig_private.
7912         * Versions (libpthread): Export pthread_kill_other_threads_np,
7913         __libc_current_sigrtmin, and __libc_current_sigrtmax.
7915 2002-11-24  Ulrich Drepper  <drepper@redhat.com>
7917         * allocatestack.c (allocate_stack): stackaddr in attribute points to
7918         the end of the stack.  Adjust computations.
7919         When mprotect call fails dequeue stack and free it.
7920         * pthread_attr_setstack.c: Store top of the stack in stackaddr
7921         attribute.
7922         * pthread_getattr_np.c: Likewise.
7924         * descr.h (IS_DETACHED): Add some more parenthesis to prevent
7925         surprises.
7927 2002-11-23  Ulrich Drepper  <drepper@redhat.com>
7929         * sysdeps/pthread/pthread.h (pthread_self): __THROW must come before
7930         attribute definitions.  Patch by Luca Barbieri <ldb@ldb.ods.org>.
7932 2002-11-22  Ulrich Drepper  <drepper@redhat.com>
7934         * pthread_getspecific.c: Optimize access to first 2nd-level array.
7935         * pthread_setspecific.c: Likewise.
7937 2002-11-21  Ulrich Drepper  <drepper@redhat.com>
7939         * sysdeps/unix/sysv/linux/i386/createthread.c: Remove CLONE_ flags
7940         definitions.  Get them from the official place.
7941         * sysdeps/unix/sysv/linux/i386/fork.c: Likewise.
7943         * sysdeps/unix/sysv/linux/i386/createthread.c: Update CLONE_* flags.
7944         Use new CLONE_ flags in clone() calls.
7946         * sysdeps/unix/sysv/linux/fork.c: Use ARCH_FORK to actually fork.
7947         * sysdeps/unix/sysv/linux/i386/fork.c: New file.
7949         * Versions: Add pthread_* functions for libc.
7950         * forward.c: New file.
7952         * sysdeps/pthread/Makefile (libpthread-sysdeps_routines): Add
7953         errno-loc.
7954         * herrno.c: New file.
7955         * res.c: New file.
7957         * Makefile (libpthread-routines): Remove sem_post, sem_wait,
7958         sem_trywait, and sem_timedwait.  Add herrno and res.
7959         * sem_init.c: Don't initialize lock and waiters members.
7960         * sem_open.c: Likewise.
7961         * sem_post.c: Removed.
7962         * sem_wait.c: Removed.
7963         * sem_trywait.c: Removed.
7964         * sem_timedwait.c: Removed.
7965         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Complete rewrite.
7966         Includes full implementations of sem_post, sem_wait, sem_trywait,
7967         and sem_timedwait.
7968         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Adjust
7969         for new implementation.
7970         * sysdeps/unix/sysv/linux/internaltypes.h (struct sem): Remove lock
7971         and waiters fields.
7973         * tst-sem3.c: Improve error message.
7974         * tst-signal3.c: Likewise.
7976         * init.c (__pthread_initialize_minimal): Use set_tid_address syscall
7977         to tell the kernel about the termination futex and to initialize tid
7978         member.  Don't initialize main_thread.
7979         * descr.h (struct pthread): Remove main_thread member.
7980         * cancelllation.c (__do_cancel): Remove code handling main thread.
7981         The main thread is not special anymore.
7983         * allocatestack.c (__reclaim_stacks): Mark stacks as unused.  Add
7984         size of the stacks to stack_cache_actsize.
7986         * pt-readv.c: Add missing "defined".
7987         * pt-sigwait.c: Likewise.
7988         * pt-writev.c: Likewise.
7990 2002-11-09  Ulrich Drepper  <drepper@redhat.com>
7992         * Versions: Export __connect from libpthread.
7993         Patch by Luca Barbieri <ldb@ldb.ods.org>.
7995         * Makefile (libpthread-routines): Add pt-raise.
7996         * sysdeps/unix/sysv/linux/raise.c: New file.
7997         * sysdeps/unix/sysv/linux/pt-raise.c: New file.
7998         * sysdeps/generic/pt-raise.c: New file.
8000         * pthread_cond_init.c: Initialize all data elements of the condvar
8001         structure.  Patch by Luca Barbieri <ldb@ldb.ods.org>.
8003         * pthread_attr_init.c: Actually implement 2.0 compatibility version.
8004         * pthread_create.c: Likewise.
8006         * Makefile (tests): Add tst-key1, tst-key2, tst-key3.
8007         * tst-key1.c: New file.
8008         * tst-key2.c: New file.
8009         * tst-key3.c: New file.
8011         * Versions: Export pthread_detach for version GLIBC_2.0.
8012         Reported by Saurabh Desai <sdesai@austin.ibm.com>.
8014 2002-11-08  Ulrich Drepper  <drepper@redhat.com>
8016         * pthread_key_create.c: Terminate search after an unused key was found.
8017         Patch by Luca Barbieri <ldb@ldb.ods.org>.
8019         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Return zero.
8020         Patch by Luca Barbieri <ldb@ldb.ods.org>.
8022 2002-10-10  Ulrich Drepper  <drepper@redhat.com>
8024         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Use slow generic
8025         dynamic lookup for errno in PIC.
8027         * allocatestack.c (get_cached_stack): Rearrange code slightly to
8028         release the stack lock as soon as possible.
8029         Call _dl_allocate_tls_init for TCB from the cache to re-initialize
8030         the static TLS block.
8031         (allocate_stack): Call _dl_allocate_tls_init for user-provided stack.
8033         * cancellation.c: Renamed from cancelation.c.
8034         * Makefile: Adjust accordingly.
8035         * pthreadP.h (CANCELLATION_P): Renamed from CANCELATION_P.
8036         * cleanup_defer.c: Use CANCELLATION_P.
8037         * pthread_testcancel.c: Likewise.
8038         * descr.h: Fix spelling in comments.
8039         * init.c: Likewise.
8040         * pthread_getattr_np.c: Likewise.
8041         * pthread_getschedparam.c: Likewise.
8042         * pthread_setschedparam.c: Likewise.
8043         * Versions: Likewise.
8045         * pt-pselect.c: New file.
8046         * Makefile (libpthread-routines): Add pt-pselect.
8047         * Versions: Add pselect.
8049         * tst-cancel4.c: New file.
8050         * Makefile (tests): Add tst-cancel4.
8052 2002-10-09  Ulrich Drepper  <drepper@redhat.com>
8054         * pthread_mutex_lock.c: Always record lock ownership.
8055         * pthread_mutex_timedlock.c: Likewise.
8056         * pthread_mutex_trylock.c: Likewise.
8058         * pt-readv.c: New file.
8059         * pt-writev.c: New file.
8060         * pt-creat.c: New file.
8061         * pt-msgrcv.c: New file.
8062         * pt-msgsnd.c: New file.
8063         * pt-poll.c: New file.
8064         * pt-select.c: New file.
8065         * pt-sigpause.c: New file.
8066         * pt-sigsuspend.c: New file.
8067         * pt-sigwait.c: New file.
8068         * pt-sigwaitinfo.c: New file.
8069         * pt-waitid.c: New file.
8070         * Makefile (libpthread-routines): Add pt-readv, pt-writev, pt-creat,
8071         pt-msgrcv, pt-msgsnd, pt-poll, pt-select, pt-sigpause, pt-sigsuspend,
8072         pt-sigwait, pt-sigwaitinfo, and pt-waitid.
8073         * Versions: Add all the new functions.
8075         * tst-exit1.c: New file.
8076         * Makefile (tests): Add tst-exit1.
8078         * sem_timedwait.c: Minor optimization for more optimal fastpath.
8080 2002-10-08  Ulrich Drepper  <drepper@redhat.com>
8082         * pt-fcntl.c: Only enable asynchronous cancellation for F_SETLKW.
8084         * pthread_join.c: Enable asynchronous cancellation around lll_wait_tid
8085         call.  pthread_join is an official cancellation point.
8086         * pthread_timedjoin.c: Likewise.
8088         * pthread_cond_wait.c: Revert order in which internal lock are dropped
8089         and the condvar's mutex are retrieved.
8090         * pthread_cond_timedwait.c: Likewise.
8091         Reported by dice@saros.East.Sun.COM.
8093 2002-10-07  Ulrich Drepper  <drepper@redhat.com>
8095         * pthreadP.h: Cut out all type definitions and move them...
8096         * sysdeps/unix/sysv/linux/internaltypes.h: ...here.  New file.
8097         * pthreadP.h: Include <internaltypes.h>.
8099         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Little
8100         performance tweaks.
8102         * sem_trywait.c: Shuffle #includes around to get right order.
8103         * sem_timedwait.c: Likewise.
8104         * sem_post.c: Likewise.
8105         * sem_wait.c: Likewise.
8107         * nptl 0.3 released.
8109         * Makefile (tests): Add tst-signal3.
8110         * tst-signal3.c: New file.
8112 2002-10-05  Ulrich Drepper  <drepper@redhat.com>
8114         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Tell the compiler that
8115         the asms modify the sem object.
8116         (__lll_sem_timedwait): Now takes struct sem* as first parameter.
8118         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h (sem_t): Don't expose
8119         the actual members.
8120         * pthreadP.h (struct sem): New type.  Actual semaphore type.
8121         * semaphoreP.h: Include pthreadP.h.
8122         * sem_getvalue.c: Adjust to sem_t change.
8123         * sem_init.c: Likewise.
8124         * sem_open.c: Likewise.
8125         * sem_post.c: Likewise.
8126         * sem_timedwait.c: Likewise.
8127         * sem_trywait.c: Likewise.
8128         * sem_wait.c: Likewise.
8130 2002-10-04  Ulrich Drepper  <drepper@redhat.com>
8132         * Makefile (tests): Add tst-basic2, tst-exec1, tst-exec3, tst-exec3.
8133         * tst-basic2.c: New file.
8134         * tst-exec1.c: New file.
8135         * tst-exec2.c: New file.
8136         * tst-exec3.c: New file.
8138         * tst-fork1.c: Remove extra */.
8140         * nptl 0.2 released.  The API for IA-32 is complete.