2.3.5-2
[glibc.git] / nptl / ChangeLog
blob790ceb01d0321013469e584a3bdf215efda90999
1 2005-04-27  Ulrich Drepper  <drepper@redhat.com>
3         * tst-cancel17.c (do_test): Add arbitrary factor to make sure
4         aio_write blocks.
6 2005-04-27  Roland McGrath  <roland@redhat.com>
8         * Makefile (tests): Remove tst-clock2.
10         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Handle
11         CLOCK_PROCESS_CPUTIME_ID and CLOCK_PROCESS_THREAD_ID specially,
12         translating to the kernel clockid_t for our own process/thread clock.
14         * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: New file.
16 2005-04-15  Jakub Jelinek  <jakub@redhat.com>
18         * old_pthread_cond_init.c: Include <errno.h>.
19         (__pthread_cond_init_2_0): Fail with EINVAL if COND_ATTR is
20         process shared or uses clock other than CLOCK_REALTIME.
21         * pthread_cond_init.c (__pthread_cond_init): Remove bogus comment.
23 2005-04-13  David S. Miller  <davem@davemloft.net>
25         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: New file.
26         * sysdeps/sparc/sparc64/clone.S: New file.
28 2005-04-05  Jakub Jelinek  <jakub@redhat.com>
30         * sysdeps/pthread/pthread.h (__pthread_cleanup_routine): Use
31         __inline instead of inline.
32         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_routine): Likewise.
34 2005-03-31  Jakub Jelinek  <jakub@redhat.com>
36         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Use
37         functionally equivalent, but shorter instructions.
38         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
39         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
40         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
41         Likewise.
42         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
43         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
44         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
45         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
46         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
47         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
48         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
49         Likewise.
50         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
51         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
52         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
53         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
54         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
56 2005-03-28  Daniel Jacobowitz  <dan@codesourcery.com>
58         * sysdeps/mips/Makefile: New file.
59         * sysdeps/mips/nptl-sysdep.S: New file.
60         * sysdeps/mips/tcb-offsets.sym: New file.
61         * sysdeps/mips/pthread_spin_lock.S: New file.
62         * sysdeps/mips/pthread_spin_trylock.S: New file.
63         * sysdeps/mips/pthreaddef.h: New file.
64         * sysdeps/mips/tls.h: New file.
65         * sysdeps/mips/jmpbuf-unwind.h: New file.
66         * sysdeps/unix/sysv/linux/mips/lowlevellock.h: New file.
67         * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h: New file.
68         * sysdeps/unix/sysv/linux/mips/bits/semaphore.h: New file.
69         * sysdeps/unix/sysv/linux/mips/pthread_once.c: New file.
70         * sysdeps/unix/sysv/linux/mips/fork.c: New file.
71         * sysdeps/unix/sysv/linux/mips/pt-vfork.S: New file.
72         * sysdeps/unix/sysv/linux/mips/vfork.S: New file.
73         * sysdeps/unix/sysv/linux/mips/clone.S: New file.
74         * sysdeps/unix/sysv/linux/mips/createthread.c: New file.
75         * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: New file.
77 2005-03-23  Ulrich Drepper  <drepper@redhat.com>
79         * pthread_create.c (__pthread_create_2_1): Rename syscall error
80         variable to scerr.
82 2005-03-10  Jakub Jelinek  <jakub@redhat.com>
84         * tst-getpid1.c (do_test): Align stack passed to clone{2,}.
86 2005-02-25  Roland McGrath  <roland@redhat.com>
88         * alloca_cutoff.c: Correct license text.
89         * tst-unload.c: Likewise.
90         * sysdeps/pthread/allocalim.h: Likewise.
91         * sysdeps/pthread/pt-initfini.c: Likewise.
92         * sysdeps/pthread/bits/libc-lock.h: Likewise.
93         * sysdeps/pthread/bits/sigthread.h: Likewise.
94         * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
95         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
97 2005-02-16  Roland McGrath  <roland@redhat.com>
99         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
100         Use unsigned int * for ptr_nthreads.
102 2005-02-14  Alan Modra  <amodra@bigpond.net.au>
104         * sysdeps/powerpc/tcb-offsets.sym (thread_offsetof): Redefine to suit
105         gcc4.
107 2005-02-07  Richard Henderson  <rth@redhat.com>
109         [BZ #787]
110         * sysdeps/pthread/pthread.h (__sigsetjmp): Use pointer as first
111         argument.
113 2004-11-03  Marcus Brinkmann  <marcus@gnu.org>
115         * sysdeps/generic/lowlevellock.h (__generic_mutex_unlock): Fix
116         order of arguments in invocation of atomic_add_zero.
118 2005-01-26  Jakub Jelinek  <jakub@redhat.com>
120         [BZ #737]
121         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S (__new_sem_trywait):
122         Use direct %gs segment access or, if NO_TLS_DIRECT_SEG_REFS,
123         at least gotntpoff relocation and addition.
124         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
125         Likewise.
126         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
127         Likewise.
128         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
129         Likewise.
131 2005-01-06  Ulrich Drepper  <drepper@redhat.com>
133         * allocatestack.c (init_one_static_tls): Adjust initialization of DTV
134         entry for static tls deallocation fix.
135         * sysdeps/alpha/tls.h (dtv_t): Change pointer type to be struct which
136         also contains information whether the memory pointed to is static
137         TLS or not.
138         * sysdeps/i386/tls.h: Likewise.
139         * sysdeps/ia64/tls.h: Likewise.
140         * sysdeps/powerpc/tls.h: Likewise.
141         * sysdeps/s390/tls.h: Likewise.
142         * sysdeps/sh/tls.h: Likewise.
143         * sysdeps/sparc/tls.h: Likewise.
144         * sysdeps/x86_64/tls.h: Likewise.
146 2004-12-27  Ulrich Drepper  <drepper@redhat.com>
148         * init.c (__pthread_initialize_minimal_internal): Use __sigemptyset.
150 2004-12-21  Jakub Jelinek  <jakub@redhat.com>
152         * sysdeps/i386/tls.h (CALL_THREAD_FCT): Maintain 16 byte alignment of
153         %esp.
154         * Makefile (tests): Add tst-align2.
155         * tst-align2.c: New test.
156         * sysdeps/i386/Makefile (CFLAGS-tst-align{,2}.c): Add
157         -mpreferred-stack-boundary=4.
159 2004-12-18  Roland McGrath  <roland@redhat.com>
161         * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h:
162         New file removed withdrawn for the moment.
164 2004-12-17  Richard Henderson  <rth@redhat.com>
166         * sysdeps/unix/sysv/linux/alpha/clone.S: New file.
167         * sysdeps/alpha/tcb-offsets.sym (TID_OFFSET): New.
169 2004-12-16  Ulrich Drepper  <drepper@redhat.com>
171         * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h: New file.
172         Increased PTHREAD_STACK_MIN.
174         * tst-context1.c (stacks): Use bigger stack size.
176 2004-12-16  Jakub Jelinek  <jakub@redhat.com>
178         * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: New file.
179         * sysdeps/sparc/tcb-offsets.sym: Add TID.
181 2004-12-15  Jakub Jelinek  <jakub@redhat.com>
183         * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: New file.
184         * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: New file.
185         * sysdeps/s390/tcb-offsets.sym (TID): Add.
187 2004-12-15  Ulrich Drepper  <drepper@redhat.com>
189         * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: New file.
191 2004-12-14  Ulrich Drepper  <drepper@redhat.com>
193         * sysdeps/powerpc/tcb-offsets.sym: Add TID.
194         * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: New file.
196         * tst-getpid1.c: If child crashes, report this first.  Print which
197         signal.
199 2004-12-09  Ulrich Drepper  <drepper@redhat.com>
201         * init.c (__pthread_initialize_minimal_internal): Also unblock
202         SIGSETXID.
204 2004-12-01  Jakub Jelinek  <jakub@redhat.com>
206         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_CPUTIME,
207         _POSIX_THREAD_CPUTIME): Define to 0.
208         * sysdeps/pthread/timer_create.c (timer_create): Remove unused code
209         handling CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID.
210         * sysdeps/pthread/timer_routines.c (__timer_signal_thread_pclk,
211         __timer_signal_thread_tclk): Remove.
212         (init_module): Remove their initialization.
213         (thread_cleanup): Remove their cleanup assertions.
214         * sysdeps/pthread/posix-timer.h (__timer_signal_thread_pclk,
215         __timer_signal_thread_tclk): Remove.
216         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Removed.
217         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Removed.
218         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Removed.
220 2004-12-07  Jakub Jelinek  <jakub@redhat.com>
222         * sysdeps/ia64/tcb-offsets.sym (TID): Add.
223         * sysdeps/unix/sysv/linux/ia64/clone2.S: New file.
225         * Makefile (tests): Add tst-getpid2.
226         * tst-getpid1.c (TEST_CLONE_FLAGS): Define.
227         (do_test): Use it.  Use __clone2 instead of clone on ia64.
228         * tst-getpid2.c: New test.
230 2004-12-07  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
232         * sysdeps/unix/sysv/linux/sh/clone.S: New file.
234 2004-12-04  Ulrich Drepper  <drepper@redhat.com>
236         * Makefile (tests): Add tst-getpid1.
237         * tst-getpid1.c: New file.
238         * sysdeps/unix/sysv/linux/i386/clone.S: New file.
239         * sysdeps/unix/sysv/linux/x86_64/clone.S: New file.
241 2004-12-02  Roland McGrath  <roland@redhat.com>
243         * Makefile (libpthread-nonshared): Variable removed.
244         ($(objpfx)libpthread_nonshared.a): Target removed.
245         ($(inst_libdir)/libpthread_nonshared.a): Likewise.
246         These are now handled by generic magic from
247         libpthread-static-only-routines being set.
249 2004-11-27  Ulrich Drepper  <drepper@redhat.com>
251         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_PRIORITIZED_IO,
252         _POSIX2_CHAR_TERM, _POSIX_THREAD_PRIO_INHERIT,
253         _POSIX_THREAD_PRIO_PROTECT): Define.
254         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
255         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
256         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
258 2004-11-26  Jakub Jelinek  <jakub@redhat.com>
260         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_ADVISORY_INFO,
261         _POSIX_SPORADIC_SERVER, _POSIX_THREAD_SPORADIC_SERVER, _POSIX_TRACE,
262         _POSIX_TRACE_EVENT_FILTER, _POSIX_TRACE_INHERIT, _POSIX_TRACE_LOG,
263         _POSIX_TYPED_MEMORY_OBJECTS, _POSIX_IPV6, _POSIX_RAW_SOCKETS): Define.
264         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
265         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
266         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
268 2004-11-24  Ulrich Drepper  <drepper@redhat.com>
270         * sysdeps/x86_64/Makefile [nptl]: Define CFLAGS-pthread_create.c.
272         * Makefile (libpthread-routines): Add pthread_setschedprio.
273         * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setschedprio.
274         * sysdeps/pthread/pthread.h: Declare pthread_setschedprio.
275         * pthread_setschedprio.c: New file.
277 2004-11-20  Jakub Jelinek  <jakub@redhat.com>
279         * pthread_create.c (pthread_cancel): Add PTHREAD_STATIC_FN_REQUIRE.
280         * pthread_cancel.c (pthread_create): Likewise.
282         * Makefile (libpthread-routines): Add vars.
283         * sysdeps/pthread/createthread.c (__pthread_multiple_threads): Remove.
284         * init.c (__default_stacksize, __is_smp): Remove.
285         * vars.c: New file.
286         * pthreadP.h (__find_thread_by_id): If !SHARED, add weak_function
287         and define a wrapper macro.
288         (PTHREAD_STATIC_FN_REQUIRE): Define.
289         * allocatestack.c (__find_thread_by_id): Undefine.
290         * pthread_create (__pthread_keys): Remove.
291         (pthread_mutex_lock, pthread_mutex_unlock, pthread_once,
292         pthread_key_create, pthread_setspecific, pthread_getspecific): Add
293         PTHREAD_STATIC_FN_REQUIRE.
295 2004-11-18  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
297         * sysdeps/sh/tls.h (DB_THREAD_SELF): Set the correct bias
298         parameter to REGISTER macro.
300 2004-11-17  Roland McGrath  <roland@redhat.com>
302         * sysdeps/unix/sysv/linux/timer_routines.c (__start_helper_thread):
303         Make sure SIGCANCEL is blocked as well.
305 2004-11-10  Jakub Jelinek  <jakub@redhat.com>
307         * sysdeps/pthread/setxid.h: New file.
308         * sysdeps/pthread/pthread-functions.h (HAVE_PTR__NPTL_SETXID): Remove.
309         (struct xid_command): Add forward decl.
310         (struct pthread_functions): Change return type of __nptl_setxid hook
311         to int.
312         * pthreadP.h (__nptl_setxid): Change return type to int.
313         * allocatestack.c (__nptl_setxid): Call INTERNAL_SYSCALL_NCS in the
314         calling thread, return its return value and set errno on failure.
315         * descr.h (struct xid_command): Change id type to long array.
317         * Makefile: Add rules to build and test tst-setuid1 and
318         tst-setuid1-static.
319         * tst-setuid1.c: New test.
320         * tst-setuid1-static.c: New test.
322 2004-11-10  Jakub Jelinek  <jakub@redhat.com>
324         * Makefile (tests): Add tst-exit3.
325         * tst-exit3.c: New test.
327 2004-11-09  Ulrich Drepper  <drepper@redhat.com>
329         * Makefile (tests): Add tst-exit2.
330         * tst-exit2.c: New file.
332 2004-11-09  Roland McGrath  <roland@redhat.com>
334         [BZ #530]
335         * sysdeps/pthread/createthread.c (do_clone): Increment __nptl_nthreads
336         here, before calling clone.
337         * pthread_create.c (start_thread): Don't do it here.
339 2004-11-02  Jakub Jelinek  <jakub@redhat.com>
341         * sysdeps/unix/sysv/linux/smp.h: Include <errno.h>.
343 2004-10-29  Kaz  Kojima  <kkojima@rr.iij4u.or.jp>
345         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
346         Set ETIMEDOUT to errno when time is up.  Tweak to avoid
347         assembler warning.
349 2004-10-28  Jakub Jelinek  <jakub@redhat.com>
351         * pthread_create.c (__pthread_create_2_1): Avoid leaking stacks
352         if sched_priority is not between minprio and maxprio.
354 2004-10-25  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
356         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
357         (__pthread_cond_timedwait): Use clock_gettime syscall if exists.
359         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
360         (__lll_mutex_timedlock_wait): Fix a bad branch condition.
362 2004-10-24  Ulrich Drepper  <drepper@redhat.com>
364         * sysdeps/unix/sysv/linux/smp.h (is_smp_system): Use
365         not-cancelable I/O functions.
367 2004-10-21  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
369         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
370         (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
371         make sure 2 is stored in the futex and we looked at the old value.
372         Fix a few other problems to return the correct value.
374 2004-10-14  Richard Henderson  <rth@redhat.com>
376         * sysdeps/alpha/tcb-offsets.sym (thread_offsetof): Redefine to
377         make gcc4 happy.
379 2004-10-06  Jakub Jelinek  <jakub@redhat.com>
381         * sysdeps/unix/sysv/linux/jmp-unwind.c: Include pthreadP.h instead
382         of pthread-functions.h and pthreaddef.h.
383         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Likewise.
385         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
386         Change __data.__nwaiters from int to unsigned int.
388         * tst-clock2.c (do_test): Don't fail if _POSIX_THREAD_CPUTIME == 0 and
389         sysconf (_SC_THREAD_CPUTIME) returns negative value.
391         * allocatestack.c (__find_thread_by_id): Move attribute_hidden
392         before return type.
394         * sysdeps/s390/jmpbuf-unwind.h: Include bits/wordsize.h.
395         (JMPBUF_CFA_UNWINDS_ADJ): Subtract 96 resp. 160 bytes from CFA.
397 2004-10-06  Ulrich Drepper  <drepper@redhat.com>
399         * tst-cancel4.c (tf_msgrcv): Check for failure in msgget.  If the
400         test fails, remove message queue.
401         (tf_msgsnd): Likewise.
403 2004-10-05  Jakub Jelinek  <jakub@redhat.com>
405         * tst-clock1.c: Change #ifdef to #if defined.
406         * tst-clock2.c: Likewise.
407         * tst-cond11.c: Likewise.
409         * sysdeps/pthread/timer_create.c (timer_create): Use
410         defined _POSIX_CPUTIME && _POSIX_CPUTIME >= 0 instead of
411         defined CLOCK_PROCESS_CPUTIME_ID #ifs and similarly for
412         THREAD_CPUTIME.
414 2004-10-05  Jakub Jelinek  <jakub@redhat.com>
416         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h (_POSIX_CPUTIME,
417         _POSIX_THREAD_CPUTIME): Define to 0.
419 2004-10-04  Ulrich Drepper  <drepper@redhat.com>
421         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Define _POSIX_CPUTIME
422         and _POSIX_THREAD_CPUTIME to zero.
423         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
424         * tst-barrier2.c: Fix testing for POSIX feature.
425         * tst-clock1.c: Likewise.
426         * tst-clock2.c: Likewise.
427         * tst-cond11.c: Likewise.
428         * tst-cond4.c: Likewise.
429         * tst-cond6.c: Likewise.
430         * tst-flock2.c: Likewise.
431         * tst-mutex4.c: Likewise.
432         * tst-mutex9.c: Likewise.
433         * tst-rwlock12.c: Likewise.
434         * tst-rwlock4.c: Likewise.
435         * tst-signal1.c: Likewise.
436         * tst-spin2.c: Likewise.
437         * sysdeps/pthread/posix-timer.h: Likewise.
438         * sysdeps/pthread/timer_create.c: Likewise.
439         * sysdeps/pthread/timer_routines.c: Likewise.
441 2004-10-01  Ulrich Drepper  <drepper@redhat.com>
443         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
444         (__lll_mutex_timedlock_wait): Address futex correctly.
446         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
447         (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
448         make sure 2 is stored in the futex and we looked at the old value.
449         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
450         (__lll_mutex_timedlock_wait): Likewise.  Fix a few other problems
451         which might very well made the code not working at all before.
452         [BZ #417]
454 2004-09-28  Ulrich Drepper  <drepper@redhat.com>
456         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
457         allow SIGSETXID to be sent.
458         * sysdeps/pthread/sigaction.c (__sigaction): Don't allow action
459         for SIGSETXID to be defined.
460         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
461         SIGSETXID cannot be blocked.
463         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
464         Add __extension__ to long long types.
465         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
466         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
467         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
468         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
469         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
470         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
471         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
473 2004-09-25  Ulrich Drepper  <drepper@redhat.com>
475         * descr.h (struct pthread): Add stopped_start field.
476         * sysdeps/pthread/createthread.c (create_thread): Set
477         start_stopped flag in descriptor for new thread appropriately.
478         * pthread_create.c (start_thread): Only take lock to be stopped on
479         startup if stopped_start flag says so.
481 2004-09-24  Ulrich Drepper  <drepper@redhat.com>
483         * pthread_create.c (__pthread_create_2_1): Remember whether thread
484         is created detached and if yes, do not try to free the stack in case
485         the thread creation failed.
486         * sysdeps/pthread/createthread.c (do_clone): Free stack here if clone
487         call fails.  Don't depend on INTERNAL_SYSCALL_ERRNO return zero in
488         case there has been no error.  [BZ #405]
490         * pthread_create.c (start_thread): Don't wait for scheduler data
491         etc to be set at the beginning of the function.  The cancellation
492         infrastructure must have been set up.  And enable async
493         cancellation before potentially going to sleep.  [BZ #401]
495 2004-09-20  Ulrich Drepper  <drepper@redhat.com>
497         * Versions: Remove exports for pthread_set*id_np functions.
498         * sysdeps/pthread/pthread.h: Remove pthread_set*id_np prototypes
499         for now.
500         * Makefile: Don't build pthread_set*id code for now.
502 2004-09-19  Ulrich Drepper  <drepper@redhat.com>
504         * sysdeps/unix/sysv/linux/allocrtsig.c: Allocate second signal for
505         internal use.
506         * allocatestack.c (__nptl_setxid): New function.
507         * descr.h (struct xid_command): Define type.
508         * init.c (pthread_functions): Add ptr__nptl_setxid initialization.
509         (sighandler_setxid): New function.
510         (__pthread_initialize_minimal): Register sighandler_setxid for
511         SIGCANCEL.
512         * pt-allocrtsig.c: Update comment.
513         * pthreadP.h: Define SIGSETXID.  Declare __xidcmd variable.
514         Declare __nptl_setxid.
515         * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_setxid.
516         * sysdeps/pthread/pthread.h: Declare pthread_setgid_np,
517         pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
518         pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
519         and pthread_setresuid_np.
520         * pthread_setgid_np.c: New file.
521         * pthread_setuid_np.c: New file.
522         * pthread_setegid_np.c: New file.
523         * pthread_seteuid_np.c: New file.
524         * pthread_setregid_np.c: New file.
525         * pthread_setreuid_np.c: New file.
526         * pthread_setresgid_np.c: New file.
527         * pthread_setresuid_np.c: New file.
528         * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setgid_np,
529         pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
530         pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
531         and pthread_setresuid_np.
532         * Makefile (libpthread-routines): Add pthread_setuid, pthread_seteuid,
533         pthread_setreuid, pthread_setresuid, pthread_setgid, pthread_setegid,
534         pthread_setregid, and pthread_setresgid.
536 2004-09-18  Ulrich Drepper  <drepper@redhat.com>
538         * allocatestack.c (allocate_stack): Return EAGAIN instead of
539         ENOMEM when out of memory.
541 2004-09-10  Roland McGrath  <roland@redhat.com>
543         [BZ #379]
544         * allocatestack.c (allocate_stack): Remove [__ASSUME_CLONE_STOPPED]
545         code, since we don't try to use the broken CLONE_STOPPED any more.
546         * pthread_create.c (start_thread): Likewise.
548 2004-09-15  Richard Henderson  <rth@redhat.com>
550         * sysdeps/unix/sysv/linux/alpha/vfork.S: Use libc_hidden_def.
552 2004-09-01  David Mosberger  <davidm@hpl.hp.com>
554         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h
555         (__libc_unwind_longjmp): Delete macro and declare as function.
556         * sysdeps/unix/sysv/linux/ia64/Makefile (sysdep_routines): Mention
557         __ia64_longjmp, sigstack_longjmp, and __sigstack_longjmp for
558         nptl directory.
559         * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S: New file.
560         * sysdeps/unix/sysv/linux/ia64/__sigstack_longjmp.c: New file.
561         * sysdeps/unix/sysv/linux/ia64/unwind_longjmp.c: New file.
563 2004-09-12  Ulrich Drepper  <drepper@redhat.com>
565         * sysdeps/pthread/pthread.h: Make rwlock prototypes available also
566         for __USE_XOPEN2K.
567         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define rwlock
568         types also for __USE_XOPEN2K.
569         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
570         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
571         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
572         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
573         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
574         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
575         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
576         [BZ #320]
578 2004-09-08  Ulrich Drepper  <drepper@redhat.com>
580         * sysdeps/pthread/pthread.h
581         (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Make safe for C++.
582         (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
583         (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
584         (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Likewise.
585         [BZ #375]
587 2004-09-07  Ulrich Drepper  <drepper@redhat.com>
589         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Allow
590         PSEUDO to be used with . prefix.
592         * sysdeps/unix/sysv/linux/alpha/pthread_once.c (__pthread_once):
593         Use atomic_increment instead of atomic_exchange_and_add.
594         * sysdeps/unix/sysv/linux/sparc/pthread_once.c (__pthread_once):
595         Likewise.
596         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
597         Likewise.
598         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
599         Likewise.
601         * allocatestack.c (allocate_stack): Use atomic_increment_val
602         instead of atomic_exchange_and_add.
603         * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Likewise.
604         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
605         Likewise.
606         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
607         Likewise.
609         * sysdeps/pthread/pthread.h (pthread_once): Remove __THROW since
610         the initialization function might throw.
612 2005-09-05  Richard Henderson  <rth@redhat.com>
614         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
615         Move definition inside libpthread, libc, librt check.  Provide
616         definition for rtld.
618 2004-09-02  Jakub Jelinek  <jakub@redhat.com>
620         * pthread_cond_destroy.c (__pthread_cond_destroy): If there are
621         waiters, awake all waiters on the associated mutex.
623 2004-09-02  Ulrich Drepper  <drepper@redhat.com>
625         * sysdeps/alpha/jmpbuf-unwind.h: Define __libc_unwind_longjmp.
626         * sysdeps/i386/jmpbuf-unwind.h: Likewise
627         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
628         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
629         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
630         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
631         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
632         * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
633         * unwind.c: Use it.
635         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
636         Rename __data.__clock to __data.__nwaiters, make it unsigned int.
637         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
638         Likewise.
639         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
640         Decrement __nwaiters.  If pthread_cond_destroy has been called and
641         this is the last waiter, signal pthread_cond_destroy caller and
642         avoid using the pthread_cond_t structure after unlock.
643         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
644         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
645         Read clock type from the least significant bits of __nwaiters instead
646         of __clock.
647         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
648         * sysdeps/unix/sysv/linux/internaltypes.h: Define COND_CLOCK_BITS.
650 2004-08-31  Jakub Jelinek  <jakub@redhat.com>
652         [BZ #342]
653         * Makefile (tests): Add tst-cond20 and tst-cond21.
654         * tst-cond20.c: New test.
655         * tst-cond21.c: New test.
656         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
657         (pthread_cond_t): Rename __data.__clock to __data.__nwaiters, make
658         it unsigned int.
659         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
660         Likewise.
661         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
662         (pthread_cond_t): Likewise.
663         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
664         Likewise.
665         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
666         Likewise.
667         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
668         Likewise.
669         * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_clock): Remove.
670         (cond_nwaiters): New.
671         (clock_bits): New.
672         * pthread_cond_destroy.c (__pthread_cond_destroy): Return EBUSY
673         if there are waiters not signalled yet.
674         Wait until all already signalled waiters wake up.
675         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Decrement
676         __nwaiters.  If pthread_cond_destroy has been called and this is the
677         last waiter, signal pthread_cond_destroy caller and avoid using
678         the pthread_cond_t structure after unlock.
679         (__pthread_cond_wait): Increment __nwaiters in the beginning,
680         decrement it when leaving.  If pthread_cond_destroy has been called
681         and this is the last waiter, signal pthread_cond_destroy caller.
682         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
683         Likewise.  Read clock type from the least significant bits of
684         __nwaiters instead of __clock.
685         * pthread_condattr_setclock.c (pthread_condattr_setclock): Check
686         whether clock ID can be encoded in COND_CLOCK_BITS bits.
687         * pthread_condattr_getclock.c (pthread_condattr_getclock): Decode
688         clock type just from the last COND_CLOCK_BITS bits of value.
689         * pthread_cond_init.c (__pthread_cond_init): Initialize __nwaiters
690         instead of __clock, just from second bit of condattr's value.
692 2004-08-30  Jakub Jelinek  <jakub@redhat.com>
694         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Include
695         bits/wordsize.h.  Make the header match i386 header when __WORDSIZE
696         != 64.
697         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
699 2004-08-15  Roland McGrath  <roland@frob.com>
701         * pthread_atfork.c: Update copyright terms including special exception
702         for these trivial files, which are statically linked into executables
703         that use dynamic linking for the significant library code.
705 2004-08-09  Jakub Jelinek  <jakub@redhat.com>
707         * DESIGN-rwlock.txt: Add decreasing of nr_readers_queued to
708         pthread_rwlock_rdlock.
709         * sysdeps/pthread/pthread_rwlock_rdlock (__pthread_rwlock_rdlock):
710         Decrease __nr_readers_queued after reacquiring lock.
711         * sysdeps/pthread/pthread_rwlock_timedrdlock
712         (pthread_rwlock_timedrdlock): Likewise.
713         Reported by Bob Cook <bobcook47@hotmail.com>.
715 2004-08-11  Jakub Jelinek  <jakub@redhat.com>
717         * tst-rwlock14.c (tf): Read main thread handle from *ARG
718         before pthread_barrier_wait.
720 2004-08-07  Ulrich Drepper  <drepper@redhat.com>
722         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
723         Remove unnecessary exception handling data.
725 2004-07-23  Jakub Jelinek  <jakub@redhat.com>
727         [BZ #284]
728         * sysdeps/pthread/pthread.h (pthread_getcpuclockid): Use __clockid_t
729         instead of clockid_t.
731 2004-07-21  Roland McGrath  <roland@redhat.com>
733         * Makefile ($(objpfx)multidir.mk): Use $(make-target-directory).
735 2004-07-19  Roland McGrath  <roland@redhat.com>
737         * tst-cancel4.c (tf_waitid): Use WEXITED flag bit if available.
739 2004-07-02  Roland McGrath  <roland@redhat.com>
741         * configure: Don't exit.
743 2004-07-14  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
745         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
746         (__pthread_cond_timedwait): Check for invalid nanosecond in
747         timeout value.
749 2004-07-07  Ulrich Drepper  <drepper@redhat.com>
751         * Makefile: Add rules to build and run tst-fini1.
752         * tst-fini1.c: New file.
753         * tst-fini1mod.c: New file.
755 2004-07-05  Ulrich Drepper  <drepper@redhat.com>
757         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define NO_CANCELLATION
758         if no cancellation support is needed.
759         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
760         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
761         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
762         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
763         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
764         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
765         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
766         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
767         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
769         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define __NR_futex
770         only if not already defined.
772 2004-07-05  Jakub Jelinek  <jakub@redhat.com>
774         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_unlock): Use
775         constraint "m" instead of "0" for futex.
777         * shlib-versions: Add powerpc64-.*-linux.*.
779 2004-07-04  Jakub Jelinek  <jakub@redhat.com>
781         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
782         (pthread_rwlock_timedrdlock): Use cmpq instead of cmpl to check
783         for valid tv_nsec.
784         * tst-rwlock14.c (do_test): Test for invalid tv_nsec equal to
785         1 billion and 64-bit tv_nsec which is valid when truncated to 32
786         bits.
788 2004-06-29  Roland McGrath  <roland@redhat.com>
790         * Banner: NPTL no longer has its own version number.
791         * Makefile (nptl-version): Variable removed.
792         * sysdeps/pthread/Makefile (CFLAGS-confstr.c): Set LIBPTHREAD_VERSION
793         using $(version), the glibc version number.
795 2004-06-29  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
797         * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
798         Fix branch offset for a PLT entry.
799         * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
800         Likewise.
801         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
802         Likewise.
803         * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
804         Likewise.
805         * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait):
806         Likewise.
808 2004-06-28  Jakub Jelinek  <jakub@redhat.com>
810         * sysdeps/alpha/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define
811         unconditionally.
813 2004-06-28  Jakub Jelinek  <jakub@redhat.com>
815         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
816         (pthread_rwlock_timedwrlock): Return EINVAL if tv_nsec is negative,
817         instead of tv_sec.
818         * sysdeps/pthread/pthread_rwlock_timedrdlock.c
819         (pthread_rwlock_timedrdlock): Likewise.
821 2004-06-22  Jakub Jelinek  <jakub@redhat.com>
823         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
824         Set __r7 to val, not mutex.
826 2004-06-27  Ulrich Drepper  <drepper@redhat.com>
828         * Makefile: Add rules to build tst-rwlock14.
829         * tst-rwlock14.c: New file.
831 2004-06-24  Boris Hu  <boris.hu@intel.com>
833         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Add timeout validation
834         check.
835         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
837 2004-06-19  Andreas Jaeger  <aj@suse.de>
839         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix
840         assembler in last patch.
842 2004-06-17  Ulrich Drepper  <drepper@redhat.com>
844         * sysdeps/pthread/pthread_cond_timedwait.c
845         (__pthread_cond_timedwait): Also check for negativ nanoseconds.
846         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
847         (__pthread_cond_timedwait): Check for invalid nanosecond in
848         timeout value.
849         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
850         * tst-cond19.c: New file.
851         * Makefile: Add rules to build and run tst-cond19.
853 2004-06-15  Steven Munroe  <sjmunroe@us.ibm.com>
855         * tst-context1.c (GUARD_PATTERN): Defined.
856         (tst_context_t): Define struct containing ucontext_t & guard words.
857         (ctx): Declare as an array of tst_context_t.
858         (fct): Verify uc_link & guard words are still valid.
859         (tf): Initialize guard words in ctx.  Adjust ctx refs for new struct.
861 2004-06-13  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
863         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
864         Add __data.__futex field, reshuffle __data.__clock.
865         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
866         (__pthread_cond_signal): Increment __futex at the same time as
867         __wakeup_seq or __total_seq.  Pass address of __futex instead of
868         address of low 32-bits of __wakeup_seq to futex syscall.
869         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
870         (__pthread_cond_wait): Likewise.  Pass __futex value from before
871         releasing internal lock to FUTEX_WAIT.
872         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
873         (__pthread_cond_timedwait): Likewise.
874         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
875         (FUTEX_CMP_REQUEUE): Define.
876         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
877         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
878         Pass __futex value from before the unlock and __futex address instead
879         of address of low 32-bits of __wakeup_seq to futex syscall.
880         Fallback to FUTEX_WAKE all on any errors.
882 2004-06-08  Jakub Jelinek  <jakub@redhat.com>
884         * pthread_mutexattr_getpshared.c (pthread_mutex_getpshared): Fix
885         comment typo.
886         * pthread_mutexattr_gettype.c (pthread_mutexattr_gettype): Likewise.
887         * pthread_mutexattr_init.c (__pthread_mutexattr_init): Likewise.
888         * pthread_mutexattr_settype.c (__pthread_mutexattr_settype): Likewise.
889         * pthread_mutexattr_setpshared.c (pthread_mutexattr_setpshared):
890         Likewise.  Reported by Bob Cook <bobcook47@hotmail.com>.
892 2004-06-11  Martin Schwidefsky  <schwidefsky@de.ibm.com>
894         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_compare_and_swap):
895         Add memory clobber to inline assembly.
896         (__lll_mutex_trylock): Likewise.
897         (__lll_mutex_cond_trylock): Likewise.
899 2004-06-07  Martin Schwidefsky  <schwidefsky@de.ibm.com>
901         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
902         Pass val argument as 6th system call argument in %r7.
904 2004-05-21  Jakub Jelinek  <jakub@redhat.com>
906         * Makefile (tests): Add tst-cond16.
907         * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_futex): Add.
908         * pthread_cond_init.c (__pthread_cond_init): Clear __data.__futex.
909         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
910         Add __data.__futex field, reshuffle __data.__clock.
911         * sysdeps/unix/sysv/linux/i386/pthread_cond_signal.S
912         (__pthread_cond_signal): Increment __futex at the same time as
913         __wakeup_seq or __total_seq.  Pass address of __futex instead of
914         address of low 32-bits of __wakeup_seq to futex syscall.
915         * sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S
916         (__pthread_cond_wait): Likewise.  Pass __futex value from before
917         releasing internal lock to FUTEX_WAIT.
918         * sysdeps/unix/sysv/linux/i386/pthread_cond_timedwait.S
919         (__pthread_cond_timedwait): Likewise.
920         * sysdeps/unix/sysv/linux/i386/pthread_cond_broadcast.S
921         (FUTEX_CMP_REQUEUE): Define.
922         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
923         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
924         Pass __futex value from before the unlock and __futex address instead
925         of address of low 32-bits of __wakeup_seq to futex syscall.
926         Fallback to FUTEX_WAKE all on any errors.
927         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_CMP_REQUEUE):
928         Define.
929         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
930         internally.  Return non-zero if error, zero if success.
931         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
932         Add __data.__futex field, reshuffle __data.__clock.
933         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_CMP_REQUEUE):
934         Define.
935         (lll_futex_requeue): Add val argument, return 1 unconditionally
936         for the time being.
937         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
938         Add __data.__futex field, reshuffle __data.__clock.
939         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_CMP_REQUEUE):
940         Define.
941         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
942         internally.  Return non-zero if error, zero if success.
943         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
944         (pthread_cond_t): Add __data.__futex field, reshuffle __data.__clock.
945         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_CMP_REQUEUE):
946         Define.
947         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
948         internally.  Return non-zero if error, zero if success.
949         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
950         Add __data.__futex field, reshuffle __data.__clock.
951         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_CMP_REQUEUE):
952         Define.
953         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
954         internally.  Return non-zero if error, zero if success.
955         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
956         Add __data.__futex field, reshuffle __data.__clock.
957         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
958         Add __data.__futex field, reshuffle __data.__clock.
959         * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal):
960         Increment __futex at the same time as __wakeup_seq or __total_seq.
961         Pass address of __futex instead of address of low 32-bits of
962         __wakeup_seq to futex syscall.
963         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
964         Pass __futex value from before releasing internal lock
965         to FUTEX_WAIT.
966         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
967         Likewise.  Avoid unnecessary shadowing of variables.
968         * sysdeps/pthread/pthread_cond_broadcast.c (__pthread_cond_broadcast):
969         Set __futex to 2 * __total_seq.  Pass __futex value from before the
970         unlock and __futex address instead of address of low 32-bits of
971         __wakeup_seq to futex_requeue macro, adjust for new return value
972         meaning.
973         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
974         (__pthread_cond_signal): Increment __futex at the same time as
975         __wakeup_seq or __total_seq.  Pass address of __futex instead of
976         address of low 32-bits of __wakeup_seq to futex syscall.
977         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
978         (__pthread_cond_wait): Likewise.  Pass __futex value from before
979         releasing internal lock to FUTEX_WAIT.
980         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
981         (__pthread_cond_timedwait): Likewise.
982         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
983         (FUTEX_CMP_REQUEUE): Define.
984         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
985         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
986         Pass __futex value from before the unlock and __futex address instead
987         of address of low 32-bits of __wakeup_seq to futex syscall.
988         Fallback to FUTEX_WAKE all on any errors.
990 2004-06-03  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
992         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_mutex_lock):
993         Add nop to align the end of critical section.
994         (lll_mutex_cond_lock, lll_mutex_timedlock): Likewise.
996 2004-06-01  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
998         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
999         Add __broadcast_seq field.
1000         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Mark
1001         all waiters as woken with woken_seq and bump broadcast counter.
1002         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use new
1003         __broadcast_seq.  Increment __woken_seq correctly when cleanuped.
1004         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
1005         Comment typo fixes.  Avoid returning -ETIMEDOUT.
1007 2004-06-01  Ulrich Drepper  <drepper@redhat.com>
1009         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
1010         (__condvar_tw_cleanup): Fix access to saved broadcast_seq value.
1011         Reported by Kaz Kojima.
1013 2004-05-25  Jakub Jelinek  <jakub@redhat.com>
1015         * sysdeps/unix/sysv/linux/aio_misc.h: New file.
1017 2004-05-21  Jakub Jelinek  <jakub@redhat.com>
1019         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Compare
1020         __broadcast_seq with bc_seq after acquiring internal lock instead of
1021         before it.
1023 2004-05-18  Jakub Jelinek  <jakub@redhat.com>
1025         * Makefile (.NOTPARALLEL): Only serialize make check/xcheck, not
1026         compilation.
1027         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
1028         (__pthread_cond_timedwait): Avoid returning -ETIMEDOUT.
1029         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
1030         (pthread_cond_t): Add __data.__broadcast_seq field.
1031         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1032         (FRAME_SIZE): Define.
1033         (__pthread_cond_timedwait): Use it.  Store/check broadcast_seq.
1034         Comment typo fixes.
1035         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S (FRAME_SIZE):
1036         Define.
1037         (__pthread_cond_wait): Use it.  Store/check broadcast_seq.  Comment
1038         typo fixes.
1039         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
1040         (__pthread_cond_broadcast): Increment broadcast_seq.  Comment typo
1041         fixes.
1043 2004-05-18  Ulrich Drepper  <drepper@redhat.com>
1045         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add broadcast_seq entry.
1046         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
1047         Add __broadcast_seq field.
1048         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
1049         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
1050         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
1051         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
1052         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
1053         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Mark
1054         all waiters as woken with woken_seq and bump broadcast counter.
1055         * sysdeps/pthread/pthread_cond_broadcast.c: Likewise.
1056         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use new
1057         __broadcast_seq field.
1058         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1059         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
1060         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
1061         * pthread_cond_init.c: Initialize __broadcast_seq field.
1062         * Makefile (tests): Add tst-cond17 and tst-cond18.
1063         Add .NOTPARALLEL goal.
1064         * tst-cond16.c: New file.  From Jakub.
1065         * tst-cond17.c: New file.  From Jakub.
1066         * tst-cond18.c: New file.  From Jakub.
1068 2004-05-16  Ulrich Drepper  <drepper@redhat.com>
1070         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Correct some
1071         unwind info.
1073         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
1074         Parametrize frame size.  Correct some unwind info.
1075         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1077 2004-05-04  Jakub Jelinek  <jakub@redhat.com>
1079         * tst-stack3.c: Note testing functionality beyond POSIX.
1081 2004-05-04  Jakub Jelinek  <jakub@redhat.com>
1083         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (USE___THREAD):
1084         Change conditional from ifdef to if.
1086 2004-04-23  Jakub Jelinek  <jakub@redhat.com>
1088         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SYSDEP_CANCEL_ERRNO,
1089         SYSDEP_CANCEL_ERROR): Define.
1090         (PSEUDO): Use it.
1092 2004-05-01  Jakub Jelinek  <jakub@redhat.com>
1094         * Versions (libpthread): Remove __pthread_cleanup_upto@@GLIBC_PRIVATE.
1096 2004-04-20  Jakub Jelinek  <jakub@redhat.com>
1098         * sem_unlink.c (sem_unlink): Change EPERM into EACCES.
1100 2004-04-19  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1102         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Add frame info.
1103         Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
1104         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Remove unneeded frame
1105         info.  Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
1107 2004-04-19  Ulrich Drepper  <drepper@redhat.com>
1109         * sysdeps/unix/sysv/linux/timer_routines.c: Make sure helper
1110         thread has all signals blocked.
1112 2004-04-18  Andreas Jaeger  <aj@suse.de>
1114         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h
1115         (SEM_VALUE_MAX): Add missing brace.
1117 2004-04-17  Jakub Jelinek  <jakub@redhat.com>
1119         * sysdeps/pthread/Makefile (tests): Add tst-mqueue8x
1120         in rt subdir.
1121         (CFLAGS-tst-mqueue8x.c): Add -fexceptions.
1122         * sysdeps/pthread/tst-mqueue8x.c: New test.
1123         * tst-cancel4.c: Update comment about message queues.
1125         * sysdeps/pthread/timer_gettime.c (timer_gettime): For expired timer
1126         return it_value { 0, 0 }.
1127         * sysdeps/pthread/timer_create.c (timer_create): Handle SIGEV_NONE
1128         like SIGEV_SIGNAL.
1129         * sysdeps/pthread/timer_routines.c (thread_expire_timer): Remove
1130         assertion for SIGEV_NONE.
1131         (thread_attr_compare): Compare all attributes, not just a partial
1132         subset.
1134 2004-04-17  Jakub Jelinek  <jakub@redhat.com>
1136         * sysdeps/unix/sysv/linux/mq_notify.c: Include stdlib.h.
1138 2004-04-17  Ulrich Drepper  <drepper@redhat.com>
1140         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h (SEM_VALUE_MAX):
1141         Just use a plain number.
1142         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
1143         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
1144         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
1145         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
1146         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
1147         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
1148         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
1150 2004-04-16  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1152         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Remove unneeded
1153         frame info.
1154         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
1156 2004-04-15  Jakub Jelinek  <jakub@redhat.com>
1158         * sysdeps/unix/sysv/linux/timer_routines.c: Include errno.h.
1159         (timer_helper_thread): Use inline rt_sigtimedwait syscall instead
1160         of calling sigwaitinfo.
1162 2004-04-16  Ulrich Drepper  <drepper@redhat.com>
1164         * allocatestack.c (allocate_stack): Set reported_guardsize
1165         unconditionally.
1166         * pthread_getattr_np.c (pthread_getattr_np): Use
1167         reported_guardsize instead of guardsize.
1168         * descr.h (struct pthread): Add reported_guardsize field.
1170 2004-04-13  Jakub Jelinek  <jakub@redhat.com>
1172         * sysdeps/unix/sysv/linux/mq_notify.c: Shut up GCC warning.
1174 2004-04-12  Ulrich Drepper  <drepper@redhat.com>
1176         * sysdeps/unix/sysv/linux/mq-notify.c: New file.
1178 2004-04-08  Jakub Jelinek  <jakub@redhat.com>
1180         * sysdeps/unix/sysv/linux/bits/local_lim.h (MQ_PRIO_MAX): Define.
1181         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h (MQ_PRIO_MAX): Define.
1182         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h (MQ_PRIO_MAX): Define.
1183         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h (MQ_PRIO_MAX): Define.
1184         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
1185         Define.
1186         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
1187         (_POSIX_MESSAGE_PASSING): Define.
1188         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h
1189         (_POSIX_MESSAGE_PASSING): Define.
1190         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h
1191         (_POSIX_MESSAGE_PASSING): Define.
1193 2004-04-04  Ulrich Drepper  <drepper@redhat.com>
1195         * tst-context1.c (fct): Check whether correct stack is used.
1197 2004-04-03  Ulrich Drepper  <drepper@redhat.com>
1199         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Never use
1200         matching constraints for asm mem parameters.
1202         * tst-clock2.c (tf): Don't define unless needed.
1204 2004-03-30  H.J. Lu  <hongjiu.lu@intel.com>
1206         * Makefile (link-libc-static): Use $(static-gnulib) instead of
1207         $(gnulib).
1209 2004-03-30  Ulrich Drepper  <drepper@redhat.com>
1211         * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_deallocate_tsd.
1212         * init.c (pthread_functions): Add ptr__nptl_deallocate_tsd.
1213         * pthreadP.h: Declare __nptl_deallocate_tsd.
1214         * pthread_create.c (deallocate_tsd): Remove to __nptl_deallocate_tsd.
1215         Adjust caller.
1217         * Makefile (tests): Add tst-tsd5.
1218         * tst-tsd5.c: New file.
1220 2004-03-29  Ulrich Drepper  <drepper@redhat.com>
1222         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
1223         (__pthread_attr_setaffinity_old): Prepend GLIBC_ to version names
1224         is SHLIB_COMPAT check.
1225         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
1226         (__pthread_attr_getaffinity_old): Likewise.
1227         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
1228         (__pthread_getaffinity_old): Likewise.
1229         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
1230         (__pthread_setaffinity_old): Likewise.
1232 2004-03-26  Ulrich Drepper  <drepper@redhat.com>
1234         * allocatestack.c (_make_stacks_executable): Call
1235         _dl_make_stack_executable first.
1237 2004-03-24  Roland McGrath  <roland@redhat.com>
1239         * sysdeps/i386/pthread_spin_lock.c (pthread_spin_lock): Use "m"
1240         constraint instead of "0".
1242 2004-03-24  Ulrich Drepper  <drepper@redhat.com>
1244         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
1245         (lll_mutex_cond_trylock): Define as wrapper around __lll_cond_trylock.
1247         * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Reorganize
1248         code to avoid warning.
1250 2004-03-24  Andreas Jaeger  <aj@suse.de>
1252         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
1253         (__pthread_attr_setaffinity_old): Remove const.
1255 2004-03-23  Ulrich Drepper  <drepper@redhat.com>
1257         * sysdeps/unix/sysv/linux/smp.h: New file.
1258         * sysdeps/unix/sysv/linux/sh/smp.h: New file.
1259         * init.c: Define __is_smp.
1260         (__pthread_initialize_minimal_internal): Call is_smp_system to
1261         initialize __is_smp.
1262         * pthreadP.h: Declare __is_smp.
1263         Define MAX_ADAPTIVE_COUNT is necessary.
1264         * pthread_mutex_init.c: Add comment regarding __spins field.
1265         * pthread_mutex_lock.c: Implement adaptive mutex type.
1266         * pthread_mutex_timedlock.c: Likewise.
1267         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
1268         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
1269         Add __spins field.
1270         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
1271         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
1272         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
1273         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
1274         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
1275         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
1276         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
1277         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define
1278         lll_mutex_cond_trylock.
1279         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
1280         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
1281         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
1282         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
1283         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
1284         Define BUSY_WAIT_NOP.
1285         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
1286         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
1288         * tst-mutex5.c: Add support for testing adaptive mutexes.
1289         * tst-mutex7.c: Likewise.
1290         * tst-mutex5a.c: New file.
1291         * tst-mutex7a.c: New file.
1292         * Makefile (tests): Add tst-mutex5a and tst-mutex7a.
1294         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
1295         (__lll_mutex_timedlock_wait): Preserve r8 and r9 since the
1296         vgettimeofday call might destroy the content.
1298         * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use hint
1299         @pause in the loop.
1301         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
1302         No need to restrict type of ret.  Make it int.  Add comment.
1304         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
1305         Remove unnecessary setne instruction.
1307 2004-03-22  Jakub Jelinek  <jakub@redhat.com>
1309         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
1310         (__pthread_getaffinity_new): Use INT_MAX instead of UINT_MAX.
1311         * pthread_getattr_np.c (pthread_getattr_np): Double size every cycle.
1312         If realloc fails, break out of the loop.
1314 2004-03-20  Andreas Jaeger  <aj@suse.de>
1316         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
1317         (__pthread_setaffinity_old): Fix interface.
1318         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
1319         (__pthread_getaffinity_old): Likewise.
1321         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
1322         (__pthread_setaffinity_new): Remove duplicate declaration.
1324 2004-03-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1326         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Save
1327         the return value to a safe register.
1328         (CDISABLE): Set the function argument correctly.
1330 2004-03-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1332         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XCHG): Define.
1333         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
1334         Rewrite so that only one locked memory operation per round is needed.
1335         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
1336         (pthread_barrier_wait): After wakeup, release lock only when the
1337         last thread stopped using the barrier object.
1338         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
1339         (__pthread_cond_wait): Don't store mutex address if the current
1340         value is ~0l.  Add correct cleanup support and unwind info.
1341         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
1342         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
1343         (__pthread_cond_broadcast): Don't use requeue for pshared condvars.
1344         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Update comment.
1345         * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
1346         Add correct cleanup support and unwind info.
1347         * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
1348         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Add unwind
1349         information for syscall wrappers.
1351 2004-03-18  Ulrich Drepper  <drepper@redhat.com>
1353         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
1354         cpusetsize field, remove next.
1355         * sysdeps/pthread/pthread.h (pthread_getaffinity_np): Add new second
1356         parameter for size of the CPU set.
1357         (pthread_setaffinity_np): Likewise.
1358         (pthread_attr_getaffinity_np): Likewise.
1359         (pthread_attr_setaffinity_np): Likewise.
1360         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: Implement
1361         interface change, keep compatibility code.
1362         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
1363         * sysdeps/unix/sysv/linux/pthread_getaffinity.c: Likewise.
1364         * sysdeps/unix/sysv/linux/pthread_setaffinity.c: Likewise.
1365         * pthreadP.h: Remove hidden_proto for pthread_getaffinity_np.  Declare
1366         __pthread_getaffinity_np.
1367         * Versions: Add version for changed interfaces.
1368         * tst-attr3.c: Adjust test for interface change.
1369         * pthread_getattr_np.c: Query the kernel about the affinity mask with
1370         increasing buffer sizes.
1371         * pthread_attr_destroy.c: Remove unused list handling.
1372         * pthread_attr_init.c: Likewise.
1374 2004-03-17  Roland McGrath  <roland@redhat.com>
1376         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Pass missing
1377         first argument to clock_getres so we ever enable kernel timers.
1379 2004-03-15  Ulrich Weigand  <uweigand@de.ibm.com>
1381         * init.c (nptl_version): Add __attribute_used__ to nptl_version.
1383 2004-03-12  Richard Henderson  <rth@redhat.com>
1385         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Propagate
1386         oldvalue from CENABLE to CDISABLE.
1388 2004-03-12  Ulrich Drepper  <drepper@redhat.com>
1390         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define HOST_NAME_MAX.
1391         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
1392         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
1393         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
1395 2004-03-11  Richard Henderson  <rth@redhat.com>
1397         * sysdeps/alpha/tcb-offsets.sym (PID_OFFSET): New.
1398         * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: Save/restore PID.
1399         * sysdeps/unix/sysv/linux/alpha/vfork.S: New file.
1401 2004-03-11  Jakub Jelinek  <jakub@redhat.com>
1403         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Use jgnl
1404         instead of jnl instruction to jump to SYSCALL_ERROR_LABEL.
1405         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S (__vfork): Likewise.
1407 2004-03-11  Jakub Jelinek  <jakub@redhat.com>
1409         * forward.c (__pthread_cond_broadcast_2_0,
1410         __pthread_cond_destroy_2_0, __pthread_cond_init_2_0,
1411         __pthread_cond_signal_2_0, __pthread_cond_wait_2_0,
1412         __pthread_cond_timedwait_2_0): Use return 0 as defaction instead of 0.
1414 2004-03-11  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1416         * sysdeps/sh/tcb-offsets.sym: Add PID.
1417         * sysdeps/unix/sysv/linux/sh/pt-vfork.S: Properly handle PID cache.
1418         * sysdeps/unix/sysv/linux/sh/vfork.S: New file.
1420 2004-03-10  Ulrich Drepper  <drepper@redhat.com>
1422         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: No need to
1423         include <sysdep-cancel.h>, vfork is no cancellation point.
1424         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: Likewise.
1425         * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: Likewise.
1426         * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: Likewise.
1428 2004-03-10  Jakub Jelinek  <jakub@redhat.com>
1430         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Add
1431         libc_hidden_def.
1432         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
1433         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
1434         Likewise.
1435         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S (__vfork):
1436         Likewise.
1437         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
1438         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
1439         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Include tcb-offsets.h.
1440         * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Use DO_CALL instead
1441         of DO_CALL_VIA_BREAK.  Work around a gas problem.
1443         * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: Remove.
1444         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: New file.
1445         * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: New file.
1446         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: New file.
1447         * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: New file.
1448         * sysdeps/powerpc/tcb-offsets.sym: Add PID.
1450         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S (__vfork): Don't use
1451         a local register for saving old PID.  Negate PID in parent upon exit.
1453         * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: Include
1454         tcb-offsets.h.
1455         (__vfork): Negate PID if non-zero and set to INT_MIN if zero
1456         before syscall, set to the old value in the parent afterwards.
1457         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: New file.
1458         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: Include
1459         tcb-offsets.h.
1460         (__vfork): Negate PID if non-zero and set to INT_MIN if zero
1461         before syscall, set to the old value in the parent afterwards.
1462         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: New file.
1463         * sysdeps/s390/tcb-offsets.sym: Add PID.
1465         * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: Remove.
1466         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: New file.
1467         * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S: New file.
1468         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: New file.
1469         * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: New file.
1470         * sysdeps/sparc/tcb-offsets.sym: Add PID.
1472 2004-03-10  Andreas Schwab  <schwab@suse.de>
1474         * sysdeps/ia64/tcb-offsets.sym: Add PID.
1475         * sysdeps/unix/sysv/linux/ia64/vfork.S: New file.
1476         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Properly handle PID cache.
1478 2004-03-09  Jakub Jelinek  <jakub@redhat.com>
1480         * tst-cancel20.c (do_one_test): Clear in_sh_body first.
1481         * tst-cancel21.c (do_one_test): Likewise.
1482         Reported by Gordon Jin <gordon.jin@intel.com>.
1484 2004-02-09  Jakub Jelinek  <jakub@redhat.com>
1486         * sysdeps/unix/sysv/linux/i386/vfork.S (SAVE_PID): Negate PID
1487         if non-zero and set to INT_MIN if zero.
1488         * sysdeps/unix/sysv/linux/x86_64/vfork.S (SAVE_PID): Likewise.
1489         * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Include tcb-offsets.h.
1490         (SAVE_PID, RESTORE_PID): Define.
1491         (__vfork): Use it.
1492         * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: Include tcb-offsets.h.
1493         Use relative path to avoid including NPTL i386/vfork.S.
1494         (SAVE_PID, RESTORE_PID): Define.
1495         * sysdeps/unix/sysv/linux/raise.c: Include limits.h.
1496         (raise): Handle THREAD_SELF->pid INT_MIN the same as 0.
1497         * Makefile (tests): Add tst-vfork1, tst-vfork2, tst-vfork1x and
1498         tst-vfork2x.
1499         (tests-reverse): Add tst-vfork1x and tst-vfork2x.
1500         * tst-vfork1.c: New test.
1501         * tst-vfork2.c: New test.
1502         * tst-vfork1x.c: New test.
1503         * tst-vfork2x.c: New test.
1505 2004-03-08  Ulrich Drepper  <drepper@redhat.com>
1507         * sysdeps/i386/tcb-offsets.sym: Add PID.
1508         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
1509         * sysdeps/unix/sysv/linux/i386/vfork.S: New file.
1510         * sysdeps/unix/sysv/linux/x86_64/vfork.S: New file.
1512 2004-03-08  Steven Munroe  <sjmunroe@us.ibm.com>
1514         * sysdeps/unix/sysv/linux/powerpc/Versions: Remove leading tabs.
1516 2004-03-08  H.J. Lu  <hongjiu.lu@intel.com>
1518         * sysdeps/s390/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
1519         _rtld_global_ro.
1521 2004-03-07  Ulrich Drepper  <drepper@redhat.com>
1523         * sysdeps/ia64/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
1524         _rtld_global_ro.
1526         * tst-once4.c: Remove unnecessary macro definition.
1528         * tst-mutex7.c (do_test): Limit thread stack size.
1529         * tst-once2.c (do_test): Likewise.
1530         * tst-tls3.c (do_test): Likewise.
1531         * tst-tls1.c (do_test): Likewise.
1532         * tst-signal3.c (do_test): Likewise.
1533         * tst-kill6.c (do_test): Likewise.
1534         * tst-key4.c (do_test): Likewise.
1535         * tst-join4.c (do_test): Likewise.
1536         * tst-fork1.c (do_test): Likewise.
1537         * tst-context1.c (do_test): Likewise.
1538         * tst-cond2.c (do_test): Likewise.
1539         * tst-cond10.c (do_test): Likewise.
1540         * tst-clock2.c (do_test): Likewise.
1541         * tst-cancel10.c (do_test): Likewise.
1542         * tst-basic2.c (do_test): Likewise.
1543         * tst-barrier4.c (do_test): Likewise.
1545 2004-03-05  Ulrich Drepper  <drepper@redhat.com>
1547         * sysdeps/i386/tls.h: Use GLRO instead of GL where appropriate.
1549 2004-03-01  Ulrich Drepper  <drepper@redhat.com>
1551         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
1552         (__pthread_cond_timedwait): Optimize wakeup test.
1553         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
1554         (__pthread_cond_wait): Likewise.
1555         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
1556         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
1557         Likewise.
1559 2004-02-29  Ulrich Drepper  <drepper@redhat.com>
1561         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
1562         (__lll_mutex_lock_wait): Optimize a bit more.  Just one copy of
1563         the atomic instruction needed.
1564         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
1565         (__lll_mutex_lock_wait): Likewise.
1567 2004-02-28  Ulrich Drepper  <drepper@redhat.com>
1569         * Makefile (tests): Add tst-cond14 and tst-cond15.
1570         * tst-cond14.c: New file.
1571         * tst-cond15.c: New file.
1573 2004-02-27  Ulrich Drepper  <drepper@redhat.com>
1575         * sysdeps/pthread/createthread.c (create_thread): Remove use of
1576         CLONE_STOPPED.  We cannot use SIGCONT which means CLONE_STOPPED
1577         needs to be implemented differently to be useful.
1579 2004-02-26  Ulrich Drepper  <drepper@redhat.com>
1581         * pthread_attr_setschedparam.c: Don't test priority against limits
1582         here.  Set ATTR_FLAG_SCHED_SET flag.
1583         * pthread_attr_setschedpolicy.c: Set ATTR_FLAG_POLICY_SET flag.
1584         * pthread_create.c (__pthread_create_2_1): Copy scheduling attributes
1585         from parent thread to child.  If attribute is used and scheduling
1586         parameters are not inherited, copy parameters from attribute or
1587         compute them.  Check priority value.
1588         * pthread_getschedparam.c: If the parameters aren't known yet get
1589         them from the kernel.
1590         * pthread_setschedparam.c: Set ATTR_FLAG_SCHED_SET and
1591         ATTR_FLAG_POLICY_SET flag for thread.
1592         * sysdeps/unix/sysv/linux/internaltypes.h: Define ATTR_FLAG_SCHED_SET
1593         and ATTR_FLAG_POLICY_SET.
1595         * sysdeps/pthread/createthread.c: Use tgkill if possible.
1597         * pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr): Don't
1598         fail if stack address hasn't been set.  Just return 0.
1600 2004-02-25  Ulrich Drepper  <drepper@redhat.com>
1602         * Makefile (tests-nolibpthread): Add tst-unload.  Don't link with
1603         libpthread for the files in this list.
1604         (CFLAGS-tst-unload): Removed.
1605         * tst-unload.c (do_test): Don't use complete path for
1606         LIBPHREAD_SO.
1608         * Makefile: Define sonames for tst-tls5mod, tst-_res1mod1, and
1609         tst-_res1mod2.
1611 2004-02-22  Ulrich Drepper  <drepper@redhat.com>
1613         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
1614         (__lll_mutex_lock_wait): Rewrite so that only one locked memory
1615         operation per round is needed.
1616         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
1617         (__lll_mutex_lock_wait): Likewise.
1619 2004-02-20  Ulrich Drepper  <drepper@redhat.com>
1621         * tst-cancel9.c (cleanup): Don't print to stderr.
1623 2004-02-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1625         * sysdeps/sh/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Fix variable name.
1627 2004-02-20  Jakub Jelinek  <jakub@redhat.com>
1629         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
1630         (__syscall_error_handler2): Call CDISABLE.
1631         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
1632         (__syscall_error_handler2): Call CDISABLE.
1634         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
1635         Release lock before the loop, don't reacquire it.
1637         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h (DL_ARGV_NOT_RELRO): Define.
1639 2004-02-19  Andreas Schwab  <schwab@suse.de>
1641         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
1642         Fix last change.
1644 2004-02-18  Ulrich Drepper  <drepper@redhat.com>
1646         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
1647         (pthread_barrier_wait): After wakeup, release lock only when the
1648         last thread stopped using the barrier object.
1649         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S
1650         (pthread_barrier_wait): Likewise.
1651         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
1652         Likewise.
1653         * Makefile (tests): Add tst-barrier4.
1654         * tst-barrier4.c: New file.
1656         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
1657         (__pthread_cond_timedwait): Perform timeout test while holding
1658         internal lock to prevent wakeup race.
1659         Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
1660         * sysdeps/pthread/pthread_cond_timedwait.c
1661         (__pthread_cond_timedwait): Likewise.
1662         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1663         (__pthread_cond_timedwait): Likewise.
1665 2004-02-18  Jakub Jelinek  <jakub@redhat.com>
1667         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S
1668         (__pthread_rwlock_unlock): Access WRITER as 32-bit value.
1669         * Makefile (tests): Add tst-rwlock13.
1670         * tst-rwlock13.c: New test.
1672 2004-02-16  Ulrich Drepper  <drepper@redhat.com>
1674         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
1675         (__condvar_tw_cleanup): Little optimization.
1676         Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
1678 2004-02-16  Steven Munroe  <sjmunroe@us.ibm.com>
1680         * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: Replace libc with
1681         libpthread as "lib" parameter to SHLIB_COMPAT.
1682         (__novmx_siglongjmp): Fix typo in function name.
1683         (__novmx_longjmp): Fix typo in function name.
1685 2004-02-13  Ulrich Drepper  <drepper@redhat.com>
1687         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Add a
1688         __builtin_expect.
1690         * sysdeps/generic/pt-longjmp.c: Moved to...
1691         * sysdeps/pthread/pt-longjmp.c: ...here.  New file.
1693 2004-01-29  Steven Munroe  <sjmunroe@us.ibm.com>
1695         * Makefile (libpthread-routines): Add pt-cleanup.
1696         * pt-longjmp.c: Removed.
1697         * pt-cleanup.c: Copied __pthread_cleanup_upto to here. New file.
1698         * sysdeps/generic/pt-longjmp.c: Copied longjmp to here. New file.
1699         * sysdeps/unix/sysv/linux/powerpc/Versions: New file.
1700         Version longjmp, siglongjmp for GLIBC_2.3.4.
1701         * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: New File.
1703 2004-02-13  Ulrich Drepper  <drepper@redhat.com>
1705         * sysdeps/pthread/pthread_cond_timedwait.c
1706         (__pthread_cond_timedwait): Optimize.  Drop internal lock earlier.
1707         Reuse code.  Add __builtin_expects.
1709         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
1710         (__pthread_cond_timedwait): Get internal lock in case timeout has
1711         passed before the futex syscall.
1712         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1714 2004-01-20  Ulrich Drepper  <drepper@redhat.com>
1716         * allocatestack.c: Pretty printing.
1718         * sysdeps/pthread/createthread.c (create_thread): Don't add
1719         CLONE_DETACHED bit if it is not necessary.
1721 2004-01-16  Ulrich Drepper  <drepper@redhat.com>
1723         * pthread_getattr_np.c: Include ldsodefs.h.
1725 2004-01-16  Richard Henderson  <rth@redhat.com>
1727         * allocatestack.c: Don't declare __libc_stack_end.
1728         * init.c (__pthread_initialize_minimal_internal): Likewise.
1729         * pthread_getattr_np.c (pthread_getattr_np): Likewise.
1731 2004-01-15  Richard Henderson  <rth@redhat.com>
1733         * sysdeps/alpha/tls.h (tcbhead_t): Add private.
1734         (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE,
1735         TLS_PRE_TCB_SIZE, TLS_TCB_ALIGN, INSTALL_DTV, INSTALL_NEW_DTV,
1736         GET_DTV, THREAD_DTV, THREAD_SELF, DB_THREAD_SELF): Match ia64.
1737         (TLS_TCB_OFFSET, THREAD_ID, NO_TLS_OFFSET): Remove.
1738         (THREAD_GETMEM, THREAD_GETMEM_NC): Simplify.
1739         (THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
1740         * sysdeps/unix/sysv/linux/alpha/createthread.c (TLS_VALUE): Match ia64.
1742 2004-01-14  Ulrich Drepper  <drepper@redhat.com>
1744         * init.c (pthread_functions): Make array const.
1746 2004-01-13  Ulrich Drepper  <drepper@redhat.com>
1748         * allocatestack.c (__make_stacks_executable): Change interface.
1749         Check parameters.  Pass parameter on to libc counterpart.
1750         * pthreadP.h: Change declaration.
1752 2004-01-13  Richard Henderson  <rth@redhat.com>
1754         * pthread_attr_setstack.c (__old_pthread_attr_setstack): Use
1755         prototype form.
1756         * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize):
1757         Likewise.
1759         * sysdeps/alpha/Makefile: New file.
1760         * sysdeps/alpha/tcb-offsets.sym: New file.
1761         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
1762         Use MULTIPLE_THREADS_OFFSET to implement !libpthread !libc version.
1764         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Rewrite based
1765         on powerpc version.
1767 2004-01-08  Jakub Jelinek  <jakub@redhat.com>
1769         * Makefile (tests): Add tst-backtrace1.
1770         * tst-backtrace1.c: New test.
1772 2003-12-11  Ulrich Weigand  <uweigand@de.ibm.com>
1774         * sysdeps/alpha/tls.h (DB_THREAD_SELF): Pass bit size of thread
1775         register as second parameter to the REGISTER macro.
1776         * sysdeps/ia64/tls.h (DB_THREAD_SELF): Likewise.
1777         * sysdeps/powerpc/tls.h (DB_THREAD_SELF): Likewise.
1778         * sysdeps/sh/tls.h (DB_THREAD_SELF): Likewise.
1779         * sysdeps/sparc/tls.h (DB_THREAD_SELF): Likewise.
1780         * sysdeps/s390/tls.h (DB_THREAD_SELF): Pass __WORDSIZE as bit size
1781         of thread register as second parameter to REGISTER macro in 64 case.
1783 2004-01-03  Ulrich Drepper  <drepper@redhat.com>
1785         * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Removed.
1786         (CFLAGS-getpid.o): Defined.
1787         (CFLAGS-getpid.os): Defined.
1789 2003-12-31  Ulrich Drepper  <drepper@redhat.com>
1791         * pthread_getattr_np.c (pthread_getattr_np): Make sure stack info
1792         returned for main thread does not overlap with any other VMA.
1793         Patch by Jakub Jelinek.
1795 2003-12-29  Jakub Jelinek  <jakub@redhat.com>
1797         * tst-raise1.c: Include stdio.h.
1799 2003-12-23  Jakub Jelinek  <jakub@redhat.com>
1801         * sysdeps/unix/sysv/linux/raise.c (raise): Protect pid = selftid
1802         setting with __ASSUME_TGKILL || defined __NR_tgkill.
1803         If pid is 0, set it to selftid.
1804         * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Make inline.
1805         Don't set self->pid but self->tid.  If self->pid == 0 and self->tid
1806         != 0, return self->tid without doing a syscall.
1807         * descr.h (struct pthread): Move pid field after tid.
1809         * Makefile (tests): Add tst-raise1.
1810         * tst-raise1.c: New file.
1812 2003-12-23  Roland McGrath  <roland@redhat.com>
1814         * tst-oddstacklimit.c: New file.
1815         * Makefile (tests): Add it.
1816         (tst-oddstacklimit-ENV): New variable.
1818         * init.c (__pthread_initialize_minimal_internal): Round stack rlimit
1819         value up to page size for __default_stacksize.
1821 2003-12-21  Ulrich Drepper  <drepper@redhat.com>
1823         * Makefile (tests): Add tst-eintr5.
1824         * tst-eintr5.c: New file.
1826         * eintr.c (eintr_source): Prevent sending signal to self.
1828         * tst-eintr2.c (tf1): Improve error message.
1830 2003-12-20  Ulrich Drepper  <drepper@redhat.com>
1832         * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Define.
1833         * sysdeps/unix/sysv/linux/getpid.c: New file.
1834         * pthread_cancel.c: Add comment explaining use of PID field.
1835         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
1836         * pthread_getattr_np.c: Use abs() when comparing PID and TID fields.
1837         * sysdeps/unix/sysv/linux/fork.c: Negate PID field of parent
1838         temporarily to signal the field must not be relied on and updated
1839         by getpid().
1840         * sysdeps/unix/sysv/linux/pt-raise.c: Handle case where PID is
1841         temporarily negative.
1842         * sysdeps/unix/sysv/linux/raise.c: Likewise.
1844 2003-12-19  Ulrich Drepper  <drepper@redhat.com>
1846         * eintr.c (setup_eintr): Add new parameter.  Pass to thread function.
1847         (eintr_source): If ARG != NULL, use pthread_kill.
1848         * tst-eintr1.c: Adjust for this change.
1849         * tst-eintr2.c: Likewise.
1850         * Makefile (tests): Add tst-eintr3 and tst-eintr4.
1851         * tst-eintr3.c: New file.
1852         * tst-eintr4.c: New file.
1854 2003-12-19  Jakub Jelinek  <jakub@redhat.com>
1856         * libc-cancellation.c (__libc_enable_asynccancel): Don't cancel
1857         if CANCELSTATE_BITMASK is set.
1858         * sysdeps/pthread/librt-cancellation.c (__librt_enable_asynccancel):
1859         Likewise.
1861         * Makefile (tests): Add tst-cancel22 and tst-cancel23.
1862         (tests-reverse): Add tst-cancel23.
1863         * tst-cancel22.c: New test.
1864         * tst-cancel23.c: New test.
1866 2003-12-18  Ulrich Drepper  <drepper@redhat.com>
1868         * tst-eintr1.c: Better error messages.
1870         * Makefile (tests): Add tst-eintr2.
1871         * tst-eintr2.c: New file.
1873 2003-12-18  Jakub Jelinek  <jakub@redhat.com>
1875         * Makefile (tests): Add tst-cancel21 and tst-cancelx21.
1876         (CFLAGS-tst-cancelx21.c): Set.
1877         * tst-cancel21.c: New test.
1878         * tst-cancelx21.c: New test.
1880         * unwind.c (FRAME_LEFT): Add adj argument.  Subtract it from each
1881         comparison operand.
1882         (unwind_stop): Use _JMPBUF_CFA_UNWINDS_ADJ macro instead of
1883         _JMPBUF_CFA_UNWINDS.  Adjust FRAME_LEFT invocations.
1884         * pt-longjmp.c: Include jmpbuf-unwind.h.
1885         (__pthread_cleanup_upto): Use _JMPBUF_UNWINDS_ADJ macro instead of
1886         _JMPBUF_UNWINDS.  Adjust compared pointers.
1887         * init.c (__pthread_initialize_minimal_internal): Initialize
1888         pd->stackblock_size.
1889         * sysdeps/pthread/jmpbuf-unwind.h: Removed.
1890         * sysdeps/alpha/jmpbuf-unwind.h: New file.
1891         * sysdeps/i386/jmpbuf-unwind.h: New file.
1892         * sysdeps/powerpc/jmpbuf-unwind.h: New file.
1893         * sysdeps/s390/jmpbuf-unwind.h: New file.
1894         * sysdeps/sh/jmpbuf-unwind.h: New file.
1895         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: New file.
1896         * sysdeps/x86_64/jmpbuf-unwind.h: New file.
1897         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Include stdint.h.
1898         (_JMPBUF_CFA_UNWINDS): Remove.
1899         (_JMPBUF_CFA_UNWINDS_ADJ, _JMPBUF_UNWINDS_ADJ): Define.
1901 2003-12-12  Jakub Jelinek  <jakub@redhat.com>
1903         * Makefile (tests): Add tst-cancel20 and tst-cancelx20.
1904         (CFLAGS-tst-cancelx20.c): Set.
1905         * tst-cancel20.c: New test.
1906         * tst-cancelx20.c: New test.
1908 2003-12-17  Ulrich Drepper  <drepper@redhat.com>
1910         * init.c (__pthread_initialize_minimal_internal): Don't treat
1911         architectures with separate register stack special here when
1912         computing default stack size.
1914 2003-12-17  Roland McGrath  <roland@redhat.com>
1916         * Makefile (tst-cancelx7-ARGS): New variable.
1917         Reportd by Greg Schafer <gschafer@zip.com.au>.
1919 2003-12-17  Jakub Jelinek  <jakub@redhat.com>
1921         * Makefile (tests): Add tst-stack3.  Depend on $(objpfx)tst-stack3-mem.
1922         (generated): Add tst-stack3.mtrace and tst-stack3-mem.
1923         (tst-stack3-ENV): Set.
1924         ($(objpfx)tst-stack3-mem): New.
1925         * tst-stack3.c: New test.
1927 2003-12-10  David Mosberger  <davidm@hpl.hp.com>
1929         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init_EPILOG_BEGINS):
1930         Add unwind directives.  Drop unused .regstk directive.
1931         (_fini_EPILOG_BEGINS): Add unwind directives.
1933 2003-12-11  Ulrich Drepper  <drepper@redhat.com>
1935         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
1936         Assume parameter is a pointer.
1937         (lll_futex_wake): Likewise.
1938         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_wait):
1939         Likewise.
1940         (lll_futex_wake): Likewise.
1941         Reported by Boris Hu.
1942         * sysdeps/unix/sysv/linux/unregister-atfork.c
1943         (__unregister_atfork): Pass pointer to refcntr to lll_futex_wait.
1945         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Simplify a bit.
1947 2003-12-10  Ulrich Drepper  <drepper@redhat.com>
1949         * sysdeps/pthread/bits/libc-lock.h (__rtld_lock_initialize): Define.
1950         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Call
1951         __rtld_lock_initialize for ld.so lock.
1952         Patch in part by Adam Li <adam.li@intel.com>.
1954 2003-12-02  David Mosberger  <davidm@hpl.hp.com>
1956         * Makefile (link-libc-static): Remove -lgcc_eh---it's already mentioned
1957         in $(gnulib).  Also, remove stale comment.
1959 2003-11-12  David Mosberger  <davidm@hpl.hp.com>
1961         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Take
1962         advantage of new syscall stub and optimize accordingly.
1964         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__NR_futex): Rename
1965         from SYS_futex, to match expectations of
1966         sysdep.h:DO_INLINE_SYSCALL.
1967         (lll_futex_clobbers): Remove.
1968         (lll_futex_timed_wait): Rewrite in terms of DO_INLINE_SYSCALL.
1969         (lll_futex_wake): Likewise.
1970         (lll_futex_requeue): Likewise.
1971         (__lll_mutex_trylock): Rewrite to a macro, so we can include this
1972         file before DO_INLINE_SYSCALL is defined (proposed by Jakub
1973         Jelinek).
1974         (__lll_mutex_lock): Likewise.
1975         (__lll_mutex_cond_lock): Likewise.
1976         (__lll_mutex_timed_lock): Likewise.
1977         (__lll_mutex_unlock): Likewise.
1978         (__lll_mutex_unlock_force): Likewise.
1980         * sysdeps/ia64/tls.h: Move declaration of __thread_self up so it
1981         comes before the include of <sysdep.h>.
1982         (THREAD_SELF_SYSINFO): New macro.
1983         (THREAD_SYSINFO): Likewise.
1984         (INIT_SYSINFO): New macro.
1985         (TLS_INIT_TP): Call INIT_SYSINFO.
1987         * sysdeps/ia64/tcb-offsets.sym: Add SYSINFO_OFFSET.
1989         * sysdeps/pthread/createthread.c (create_thread): Use
1990         THREAD_SELF_SYSINFO and THREAD_SYSINFO instead of open code.
1991         * allocatestack.c (allocate_stack): Use THREAD_SYSINFO and
1992         THREAD_SELF_SYSINFO instead of open code.
1993         * sysdeps/i386/tls.h (THREAD_SELF_SYSINFO): New macro.
1994         (THREAD_SYSINFO): Likewise.
1996         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: New file.
1998         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Work around gas problem.
2000 2003-12-06  Ulrich Drepper  <drepper@redhat.com>
2002         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Use .init_array
2003         instead of .init.  Patch by David Mosberger.
2005 2003-11-30  Thorsten Kukuk  <kukuk@suse.de>
2007         * sysdeps/pthread/configure.in: Remove broken declaration in C
2008         cleanup handling check.
2010 2003-11-30  Andreas Jaeger  <aj@suse.de>
2012         * Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time).
2013         * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
2014         Likewise.
2016 2003-11-27  Jakub Jelinek  <jakub@redhat.com>
2018         * sysdeps/unix/sysv/linux/internaltypes.h (ATTR_FLAG_OLDATTR): Define.
2019         * pthread_attr_destroy.c: Include shlib-compat.h.
2020         (__pthread_attr_destroy): Return immediately if ATTR_FLAG_OLDATTR
2021         is set in iattr->flags.
2022         * pthread_attr_init.c (__pthread_attr_init_2_0): Set ATTR_FLAG_OLDATTR.
2024 2003-11-21  Jakub Jelinek  <jakub@redhat.com>
2026         * Makefile (distribute): Add tst-cleanup4aux.c.
2028         * tst-cond12.c (prepare): Add prototype.  Move after test-skeleton.c
2029         include.
2031 2003-11-21  Ulrich Drepper  <drepper@redhat.com>
2033         * tst-cond12.c (do_test): If USE_COND_SIGNAL is defined, use
2034         pthread_cond_signal.
2036         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Don't
2037         store mutex address if the current value is ~0l.
2038         * sysdeps/pthread/pthread_cond_timedwait.c
2039         (__pthread_cond_timedwait): Likewise.
2040         * sysdeps/pthread/pthread_cond_broadcast.c
2041         (__pthread_cond_broadcast): Don't use requeue for pshared
2042         condvars.
2044         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
2045         (__pthread_cond_wait): Don't store mutex address if the current
2046         value is ~0l.
2047         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
2048         (__pthread_cond_timedwait): Likewise.
2049         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
2050         (__pthread_cond_broadcast): Don't use requeue for pshared
2051         condvars.
2053         * pthread_cond_init.c (__pthread_cond_init): Initialize __mutex
2054         element with ~0l for pshared condvars, with NULL otherwise.
2056         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
2057         (__pthread_cond_wait): Don't store mutex address if the current
2058         value is ~0l.
2059         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
2060         (__pthread_cond_timedwait): Likewise.
2061         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
2062         (__pthread_cond_broadcast): Don't use requeue for pshared
2063         condvars.
2065         * Makefile: Add rules to build and run tst-cond12 and tst-cond13.
2066         * tst-cond12.c: New file.
2067         * tst-cond13.c: New file.
2069 2003-11-17  Ulrich Drepper  <drepper@redhat.com>
2071         * sysdeps/pthread/configure.in: Make missing forced unwind support
2072         fatal.
2074 2003-11-11  Ulrich Drepper  <drepper@redhat.com>
2076         * pthreadP.h: Don't declare __pthread_unwind as weak inside libpthread.
2078 2003-11-06  Ulrich Drepper  <drepper@redhat.com>
2080         * Makefile: Add magic to clean up correctly.
2082 2003-11-05  Jakub Jelinek  <jakub@redhat.com>
2084         * unwind.c (FRAME_LEFT): Define.
2085         (unwind_stop): Handle old style cleanups here.
2086         (__pthread_unwind): Handle old style cleanups only if
2087         !HAVE_FORCED_UNWIND.
2088         * Makefile (tests): Add tst-cleanup4 and tst-cleanupx4.
2089         (CFLAGS-tst-cleanupx4.c): Add -fexceptions.
2090         ($(objpfx)tst-cleanup4): Depend on $(objpfx)tst-cleanup4aux.o.
2091         ($(objpfx)tst-cleanupx4): Likewise.
2092         * tst-cleanup4.c: New test.
2093         * tst-cleanup4aux.c: New.
2094         * tst-cleanupx4.c: New test.
2096 2003-11-04  Ulrich Drepper  <drepper@redhat.com>
2098         * sysdeps/pthread/bits/stdio-lock.h: Use lll_*lock instead of
2099         lll_mutex_*lock macros to skip atomic operations on some archs.
2101 2003-11-03  Ulrich Drepper  <drepper@redhat.com>
2103         * sysdeps/pthread/tst-timer.c (main): Initialize
2104         sigev2.sigev_value as well.
2106 2003-10-15  Roland McGrath  <roland@redhat.com>
2108         * sysdeps/pthread/configure.in: Barf if visibility attribute support
2109         is missing.
2110         * sysdeps/pthread/configure: Regenerated.
2112 2003-10-09  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2114         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Completely revamp the
2115         locking macros.  No distinction between normal and mutex locking
2116         anymore.
2117         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Rewrite mutex locking.
2118         Merge bits from lowlevelmutex.S we still need.
2119         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Remove.
2120         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
2121         * sysdeps/unix/sysv/linux/sh/not-cancel.h: New file.
2122         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Adjust for
2123         new mutex implementation.
2124         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Likewise.
2125         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
2126         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
2127         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
2128         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
2129         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
2130         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
2131         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
2132         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
2133         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO): Also defined
2134         symbol for entry point to avoid cancellation.
2136 2003-10-07  Jakub Jelinek  <jakub@redhat.com>
2138         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Backout 2003-10-02
2139         changes.
2140         (SAVE_OLDTYPE_0): Fix a typo.
2142 2003-10-03  Ulrich Drepper  <drepper@redhat.com>
2144         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
2145         Check __sigsetjmp return value.  Reported by Daniel Jacobowitz.
2147 2003-10-02  Ulrich Drepper  <drepper@redhat.com>
2149         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (DOCARGS_1): Use
2150         correct offset.
2152 2003-10-02  Jakub Jelinek  <jakub@redhat.com>
2154         * Makefile (tests): Add tst-cancel19.
2155         * tst-cancel19.c: New test.
2157 2003-10-02  Ulrich Drepper  <drepper@redhat.com>
2159         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix saving and
2160         restoring of the old cancellation type.
2162 2003-09-30  Jakub Jelinek  <jakub@redhat.com>
2164         * sysdeps/pthread/malloc-machine.h: Remove misleading comment.
2166 2003-09-27  Wolfram Gloger  <wg@malloc.de>
2168         * sysdeps/pthread/malloc-machine.h: New file
2170 2003-09-24  Roland McGrath  <roland@redhat.com>
2172         * allocatestack.c (__make_stacks_executable): Don't ignore return
2173         value from _dl_make_stack_executable.
2175 2003-09-24  Ulrich Drepper  <drepper@redhat.com>
2177         * allocatestack.c (__make_stacks_executable): Also change
2178         permission of the currently unused stacks.
2180         * allocatestack.c (change_stack_perm): Split out from
2181         __make_stacks_executable.
2182         (allocate_stack): If the required permission changed between the time
2183         we started preparing the stack and queueing it, change the permission.
2184         (__make_stacks_executable): Call change_stack_perm.
2186         * Makefile: Build tst-execstack-mod locally.
2187         * tst-execstack-mod.c: New file.
2189 2003-09-23  Jakub Jelinek  <jakub@redhat.com>
2191         * Makefile (tests): Only add tst-execstack if have-z-execstack is yes.
2193 2003-09-23  Roland McGrath  <roland@redhat.com>
2195         * tst-execstack.c: New file.
2196         * Makefile (tests): Add it.
2197         ($(objpfx)tst-execstack, $(objpfx)tst-execstack.out): New targets.
2198         (LDFLAGS-tst-execstack): New variable.
2200         * allocatestack.c (allocate_stack): Use GL(dl_stack_flags) to decide
2201         whether to use PROT_EXEC for stack mmap.
2202         (__make_stacks_executable): New function.
2203         * pthreadP.h: Declare it.
2204         * init.c (__pthread_initialize_minimal_internal): Set
2205         GL(dl_make_stack_executable_hook) to that.
2207 2003-09-22  Ulrich Drepper  <drepper@redhat.com>
2209         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Adjust for latest
2210         recommendation from AMD re avoidance of lock prefix.
2212 2003-09-22  Jakub Jelinek  <jakub@redhat.com>
2214         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait): Use
2215         lll_futex_timed_wait instead of lll_futex_wait.
2216         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Removed.
2217         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Removed.
2218         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: Removed.
2219         * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: Removed.
2220         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Removed.
2221         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Removed.
2222         * sysdeps/unix/sysv/linux/s390/sem_post.c: Removed.
2223         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Removed.
2224         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Include atomic.h.
2225         Completely revamp the locking macros.  No distinction between
2226         normal and mutex locking anymore.
2227         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
2228         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock_wait,
2229         __lll_lock_timedwait): Fix prototypes.
2230         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_lock_wait,
2231         __lll_lock_timedwait): Likewise.
2232         (lll_mutex_lock, lll_mutex_cond_lock): Use _val instead of _bool
2233         macros, add __builtin_expect.
2234         (lll_mutex_timedlock): Likewise.  Fix return value.
2235         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Removed.
2236         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: Removed.
2237         * sysdeps/unix/sysv/linux/i386/i586/lowlevelmutex.S: Removed.
2238         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: Removed.
2239         * sysdeps/unix/sysv/linux/i386/i686/lowlevelmutex.S: Removed.
2240         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: Removed.
2241         * sysdeps/unix/sysv/linux/lowlevelmutex.c: Removed.
2242         * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: Removed.
2244 2003-09-22  Ulrich Drepper  <drepper@redhat.com>
2246         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
2247         (__lll_mutex_lock_wait): Minor optimization to avoid one atomic
2248         operation if possible.
2250         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Don't play tricks
2251         like jumping over the lock prefix.
2253 2003-09-21  Ulrich Drepper  <drepper@redhat.com>
2255         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Completely revamp the
2256         locking macros.  No distinction between normal and mutex locking
2257         anymore.
2258         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2259         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2260         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2261         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Rewrite mutex
2262         locking.  Merge bits from lowlevelmutex.S we still need.
2263         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
2264         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
2265         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Removed.
2266         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Removed.
2267         * Makefile (routines): Remove libc-lowlevelmutex.
2268         (libpthread-rountines): Remove lowlevelmutex.
2269         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Adjust
2270         for new mutex implementation.
2271         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
2272         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2273         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
2274         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
2275         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2276         Likewise.
2277         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2278         Likewise.
2279         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
2280         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
2281         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise
2282         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
2283         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
2284         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2285         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
2286         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
2287         Likewise.
2288         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
2289         Likewise.
2290         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
2291         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
2292         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
2293         Don't use requeue.
2294         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
2295         * sysdeps/pthread/pthread_cond_signal.c: Don't use requeue.
2297 2003-09-20  Ulrich Drepper  <drepper@redhat.com>
2299         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't match memory
2300         in parameters of asm with output parameters.
2302         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Change
2303         type of DECR parameter to int.
2304         * pthreadP.h: Adjust prototype of __pthread_mutex_unlock_usercnt.
2306 2003-09-18  Jakub Jelinek  <jakub@redhat.com>
2308         * tst-attr3.c (tf, do_test): Print stack start/end/size and
2309         guardsize for each thread.
2311 2003-09-17  Jakub Jelinek  <jakub@redhat.com>
2313         * sysdeps/pthread/pthread.h (pthread_getattr_np): Clarify usage.
2314         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
2315         (pthread_attr_setaffinity_np): Handle cpuset == NULL.
2317         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
2318         (pthread_attr_getaffinity_np): Don't segfault if iattr->cpuset is
2319         NULL.
2320         * pthread_getattr_np.c: Set cpuset using pthread_getaffinity_np.
2321         * pthreadP.h (pthread_getaffinity_np): Add hidden_proto.
2322         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
2323         (pthread_getaffinity_np): Add hidden_def.
2325         * Makefile (tests): Add tst-attr3.
2326         * tst-attr3.c: New test.
2328         * sysdeps/i386/Makefile (CFLAGS-tst-align.c): Remove.
2330 2003-09-15  Jakub Jelinek  <jakub@redhat.com>
2332         * sysdeps/i386/Makefile (CFLAGS-pthread_create.c,
2333         CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
2335 2003-09-17  Jakub Jelinek  <jakub@redhat.com>
2337         * Makefile (CFLAGS-tst-align.c): Add $(stack-align-test-flags).
2338         * tst-align.c: Include tst-stack-align.h.
2339         (tf, do_test): Use TEST_STACK_ALIGN macro.
2341 2003-09-17  Ulrich Drepper  <drepper@redhat.com>
2343         * pthread_attr_init.c (__pthread_attr_init_2_0): Remove unused
2344         variable.
2346 2003-09-16  Ulrich Drepper  <drepper@redhat.com>
2348         * pthread_getattr_np.c (pthread_getattr_np): Correctly fill in the
2349         stack-related values for the initial thread.
2351 2003-09-15  Jakub Jelinek  <jakub@redhat.com>
2353         * Makefile (CFLAGS-pthread_once.c): Add $(uses-callbacks).
2355 2003-09-11  Ulrich Drepper  <drepper@redhat.com>
2357         * pthread_mutex_lock.c: Minor code rearrangements.
2359 2003-09-05  Roland McGrath  <roland@redhat.com>
2361         * pthread_create.c (__pthread_pthread_sizeof_descr): Removed.
2362         Instead, include ../nptl_db/db_info.c to do its magic.
2363         * pthread_key_create.c (__pthread_pthread_keys_max): Removed.
2364         (__pthread_pthread_key_2ndlevel_size): Likewise.
2365         * sysdeps/alpha/tls.h (DB_THREAD_SELF): New macro.
2366         * sysdeps/i386/tls.h (DB_THREAD_SELF): New macro.
2367         * sysdeps/ia64/tls.h (DB_THREAD_SELF): New macro.
2368         * sysdeps/powerpc/tls.h (DB_THREAD_SELF): New macro.
2369         * sysdeps/s390/tls.h (DB_THREAD_SELF): New macro.
2370         * sysdeps/sh/tls.h (DB_THREAD_SELF): New macro.
2371         * sysdeps/sparc/tls.h (DB_THREAD_SELF): New macro.
2372         * sysdeps/x86_64/tls.h (DB_THREAD_SELF): New macro.
2373         * sysdeps/alpha/td_ta_map_lwp2thr.c: File removed.
2374         * sysdeps/generic/td_ta_map_lwp2thr.c: File removed.
2375         * sysdeps/i386/td_ta_map_lwp2thr.c: File removed.
2376         * sysdeps/ia64/td_ta_map_lwp2thr.c: File removed.
2377         * sysdeps/powerpc/td_ta_map_lwp2thr.c: File removed.
2378         * sysdeps/s390/td_ta_map_lwp2thr.c: File removed.
2379         * sysdeps/sh/td_ta_map_lwp2thr.c: File removed.
2380         * sysdeps/sparc/td_ta_map_lwp2thr.c: File removed.
2381         * sysdeps/x86_64/td_ta_map_lwp2thr.c: File removed.
2383 2003-09-08  Ulrich Drepper  <drepper@redhat.com>
2385         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Change type
2386         of pthread_t to be compatible with LT.
2387         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
2388         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
2389         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2390         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2391         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
2392         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
2393         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
2395 2003-09-04  Ulrich Drepper  <drepper@redhat.com>
2397         * sysdeps/unix/sysv/linux/i386/not-cancel.h (fcntl_not_cancel): Define.
2399 2003-09-04  Jakub Jelinek  <jakub@redhat.com>
2401         * unwind-forcedunwind.c: Move to...
2402         * sysdeps/pthread/unwind-forcedunwind.c: ...here.
2403         (pthread_cancel_init): Use ARCH_CANCEL_INIT if defined.
2404         * sysdeps/pthread/jmpbuf-unwind.h: New file.
2405         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: New file.
2406         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: New file.
2407         * unwind.c: Include jmpbuf-unwind.h.
2408         (unwind_stop): Use _JMPBUF_CFA_UNWINDS macro.
2410 2003-09-02  Jakub Jelinek  <jakub@redhat.com>
2412         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: New file.
2413         * sysdeps/unix/sysv/linux/ia64/Versions (libpthread): Export
2414         pthread_attr_setstack and pthread_attr_setstacksize @@GLIBC_2.3.3.
2415         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: New file.
2416         * sysdeps/unix/sysv/linux/alpha/Versions: New file.
2417         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: New file.
2418         * sysdeps/unix/sysv/linux/sparc/Versions: New file.
2419         * pthread_attr_setstack.c (__old_pthread_attr_setstack): New function.
2420         (pthread_attr_setstack): If PTHREAD_STACK_MIN != 16384, export
2421         as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.2.
2422         * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize): New
2423         function.
2424         (pthread_attr_setstacksize): If PTHREAD_STACK_MIN != 16384, export
2425         as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.1.
2426         * Makefile (tests): Add tst-stack2.
2427         * tst-stack2.c: New test.
2428         * tst-stack1.c: Include limits.h and sys/param.h.
2429         (do_test): Set size to MAX (4 * getpagesize (), PTHREAD_STACK_MIN).
2431         * pthread_condattr_setpshared.c: Include errno.h.
2432         (pthread_condattr_setpshared): Return EINVAL if pshared
2433         is neither PTHREAD_PROCESS_PRIVATE nor PTHREAD_PROCESS_SHARED.
2435         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Also
2436         defined symbol for entry point to avoid cancellation.
2437         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
2438         Likewise.
2439         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
2440         Likewise.
2441         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
2442         Likewise.
2443         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h (PSEUDO):
2444         Likewise.
2445         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
2446         Likewise.
2447         * sysdeps/unix/sysv/linux/i386/not-cancel.h (__open_nocancel,
2448         __close_nocancel, __read_nocancel, __write_nocancel,
2449         __waitpid_nocancel): Add attribute_hidden.  If not in libc.so,
2450         libpthread.so or librt.so, define to corresponding function
2451         without _nocancel suffix.
2452         * sysdeps/unix/sysv/linux/s390/not-cancel.h: New file.
2453         * sysdeps/unix/sysv/linux/powerpc/not-cancel.h: New file.
2454         * sysdeps/unix/sysv/linux/sparc/not-cancel.h: New file.
2456         * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: Fix a typo.
2458 2003-09-02  Ulrich Drepper  <drepper@redhat.com>
2460         * sysdeps/unix/sysv/linux/i386/not-cancel.h: New file.
2461         * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: New file.
2463         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Make sure the code
2464         in subsections has a symbol associated with it.
2466         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Also
2467         defined symbol for entry point to avoid cancellation.
2468         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Likewise.
2470 2003-09-01  Jakub Jelinek  <jakub@redhat.com>
2472         * Makefile (tests): Add tst-tls5.
2473         (module-names): Add tst-tls5mod{,a,b,c,d,e,f}.
2474         ($(objpfx)tst-tls5mod{,a,b,c,d,e,f}.so-no-z-defs): Set to yes.
2475         ($(objpfx)tst-tls5): New.
2476         ($(objpfx)tst-tls6.out): Likewise.
2477         (tests): Depend on $(objpfx)tst-tls6.out.
2478         * tst-tls3.c: Include stdint.h and pthreaddef.h.
2479         (do_test): Check pthread_self () return value alignment.
2480         * tst-tls3mod.c: Include stdint.h and pthreaddef.h.
2481         (tf): Check pthread_self () return value alignment.
2482         * tst-tls5.c: New test.
2483         * tst-tls5.h: New.
2484         * tst-tls5mod.c: New.
2485         * tst-tls5moda.c: New.
2486         * tst-tls5modb.c: New.
2487         * tst-tls5modc.c: New.
2488         * tst-tls5modd.c: New.
2489         * tst-tls5mode.c: New.
2490         * tst-tls5modf.c: New.
2491         * tst-tls6.sh: New test.
2493         * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Add
2494         ptr___pthread_cond_timedwait and ptr___pthread_cond_timedwait_2_0.
2495         * init.c (pthread_functions): Initialize them.
2496         * forward.c (pthread_cond_timedwait@GLIBC_2.0,
2497         pthread_cond_timedwait@@GLIBC_2.3.2): New forwards.
2498         * Versions (libc): Export pthread_cond_timedwait@GLIBC_2.0,
2499         pthread_cond_timedwait@@GLIBC_2.3.2.
2501 2003-09-01  Jakub Jelinek  <jakub@redhat.com>
2503         * sysdeps/unix/sysv/linux/alpha/timer_create.c: New file.
2504         * sysdeps/unix/sysv/linux/alpha/timer_delete.c: New file.
2505         * sysdeps/unix/sysv/linux/alpha/timer_getoverr.c: New file.
2506         * sysdeps/unix/sysv/linux/alpha/timer_gettime.c: New file.
2507         * sysdeps/unix/sysv/linux/alpha/timer_settime.c: New file.
2508         * sysdeps/unix/sysv/linux/alpha/Versions: New file.
2510         * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
2512         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Define
2513         _POSIX_THREAD_PRIORITY_SCHEDULING.
2514         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
2516 2003-08-31  Ulrich Drepper  <drepper@redhat.com>
2518         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock): Avoid
2519         nested function, use static inline function from libio.h.
2520         Code by Richard Henderson.
2522         * sysdeps/pthread/bits/libc-lock.h: Mark pthread_setcancelstate as
2523         weak.
2525 2003-08-30  Jakub Jelinek  <jakub@redhat.com>
2527         * sysdeps/unix/sysv/linux/sparc/sparc64/Versions: New file.
2528         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_create.c: New file.
2529         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_delete.c: New file.
2530         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_getoverr.c: New file.
2531         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_gettime.c: New file.
2532         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_settime.c: New file.
2533         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
2534         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
2535         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: New file.
2536         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: New file.
2537         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: New file.
2538         * sysdeps/unix/sysv/linux/sparc/pthread_once.c: New file.
2539         * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: New file.
2540         * sysdeps/unix/sysv/linux/sparc/fork.c: New file.
2541         * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
2542         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: New file.
2543         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: New file.
2544         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: New file.
2545         * sysdeps/sparc/sparc32/pthread_spin_lock.c: New file.
2546         * sysdeps/sparc/sparc32/pthread_spin_trylock.c: New file.
2547         * sysdeps/sparc/sparc32/pthreaddef.h: New file.
2548         * sysdeps/sparc/sparc64/pthread_spin_lock.c: New file.
2549         * sysdeps/sparc/sparc64/pthread_spin_trylock.c: New file.
2550         * sysdeps/sparc/sparc64/pthread_spin_unlock.c: New file.
2551         * sysdeps/sparc/sparc64/pthreaddef.h: New file.
2552         * sysdeps/sparc/tls.h: New file.
2553         * sysdeps/sparc/tcb-offsets.sym: New file.
2554         * sysdeps/sparc/Makefile: New file.
2555         * sysdeps/sparc/td_ta_map_lwp2thr.c: New file.
2556         * init.c [__sparc__] (__NR_set_tid_address): Define.
2558 2003-08-29  Jakub Jelinek  <jakub@redhat.com>
2560         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock,
2561         _IO_release_lock): Define.
2563 2003-08-29  Jakub Jelinek  <jakuB@redhat.com>
2565         * tst-cancel4.c (tf_sigwait, tf_sigwaitinfo, tf_sigtimedwait): Add
2566         sigemptyset before sigaddset.  Reported by jreiser@BitWagon.com.
2568 2003-08-27  Ulrich Drepper  <drepper@redhat.com>
2570         * sysdeps/pthread/pthread.h (pthread_exit): Remove __THROW.
2571         (__pthread_cleanup_class): Add missing return types of member
2572         functions.
2574 2003-08-26  Steven Munroe <sjmunroe@us.ibm.com>
2576         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
2577         (lll_mutex_unlock_force): Add memory barrier between store and futex
2578         syscall.
2580 2003-08-25  Ulrich Drepper  <drepper@redhat.com>
2582         * tst-cancel4.c (do_test): Also unlink tempfname and remove
2583         tempmsg in first loop.
2585 2003-08-18  Ulrich Drepper  <drepper@redhat.com>
2587         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
2588         _POSIX_THREAD_PRIORITY_SCHEDULING.
2589         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
2591 2003-08-07  Jakub Jelinek  <jakub@redhat.com>
2593         * sysdeps/pthread/bits/libc-lock.h [_LIBC && SHARED]
2594         (__rtld_lock_default_lock_recursive,
2595         __rtld_lock_default_unlock_recursive): Define.
2596         [_LIBC && SHARED] (__rtld_lock_lock_recursive,
2597         __rtld_lock_unlock_recursive): Define using
2598         GL(_dl_rtld_*lock_recursive).
2599         * init.c (__pthread_initialize_minimal_internal): Initialize
2600         _dl_rtld_lock_recursive and _dl_rtld_unlock_recursive.
2601         Lock GL(_dl_load_lock) the same number of times as
2602         GL(_dl_load_lock) using non-mt implementation was nested.
2604         * pthreadP.h (__pthread_cleanup_upto): Add hidden_proto.
2605         * pt-longjmp.c (__pthread_cleanup_upto): Add hidden_def.
2607 2003-08-06  Jakub Jelinek  <jakub@redhat.com>
2609         * tst-cancel17.c (do_test): Make len2 maximum of page size and
2610         PIPE_BUF.
2612 2003-08-07  Jakub Jelinek  <jakub@redhat.com>
2614         * pthread_create.c (__pthread_create_2_0): Clear new_attr.cpuset.
2616 2003-08-03  Jakub Jelinek  <jakub@redhat.com>
2618         * sysdeps/pthread/createthread.c (do_clone): Move error handling
2619         to first syscall error check.  Move syscall error check for tkill
2620         into __ASSUME_CLONE_STOPPED #ifdef.
2622 2003-08-02  Ulrich Drepper  <drepper@redhat.com>
2624         * sysdeps/pthread/createthread.c (do_clone): If __ASSUME_CLONE_STOPPED
2625         is not defined, do explicit synchronization.
2626         (create_thread): Do not lock pd->lock here.  If __ASSUME_CLONE_STOPPED
2627         is not defined also unlock pd->lock for non-debugging case in case
2628         it is necessary.
2629         * pthread_create.c (start_thread): Always get and release pd->lock
2630         if __ASSUME_CLONE_STOPPED is not defined.
2631         (start_thread_debug): Removed.  Adjust users.
2632         * allocatestack.c (allocate_stack): Always initialize lock if
2633         __ASSUME_CLONE_STOPPED is not defined.
2634         * Makefile (tests): Add tst-sched1.
2635         * tst-sched1.c: New file.
2637         * sysdeps/pthread/createthread.c (do_clone): Only use
2638         sched_setschduler and pass correct parameters.
2640 2003-07-31  Jakub Jelinek  <jakub@redhat.com>
2642         * sysdeps/pthread/pthread.h (pthread_attr_setstackaddr,
2643         pthread_attr_setstacksize): Change PTHREAD_STACK_SIZE to
2644         PTHREAD_STACK_MIN in comments.
2646 2003-07-31  Jakub Jelinek  <jakub@redhat.com>
2648         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
2649         Shut up warnings if INTERNAL_SYSCALL_ERROR_P does not use its first
2650         argument.
2651         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Likewise.
2652         * pthread_condattr_setclock.c (pthread_condattr_setclock): Likewise.
2653         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Include pthreaddef.h.
2654         (__pthread_cleanup_upto): Fix prototype.
2655         (_longjmp_unwind): Adjust caller.
2656         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_timedlock):
2657         Change second argument to const struct pointer.
2658         * tst-sem8.c (main): Remove unused s2 and s3 variables.
2659         * tst-sem9.c (main): Likewise.
2660         * unwind.c: Include string.h for strlen prototype.
2662 2003-07-31  Ulrich Drepper  <drepper@redhat.com>
2664         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
2665         (__pthread_cond_timedwait): Don't use cmov unless HAVE_CMOV is defined.
2666         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S:
2667         Define HAVE_CMOV.
2668         Patch by Nicholas Miell <nmiell@attbi.com>.
2670 2003-07-30  Jakub Jelinek  <jakub@redhat.com>
2672         * init.c (__pthread_initialize_minimal_internal): Initialize
2673         GL(dl_init_static_tls).
2674         * pthreadP.h (__pthread_init_static_tls): New prototype.
2675         * allocatestack.c (init_one_static_tls, __pthread_init_static_tls):
2676         New functions.
2677         * Makefile (tests): Add tst-tls4.
2678         (modules-names): Add tst-tls4moda and tst-tls4modb.
2679         ($(objpfx)tst-tls4): Link against libdl and libpthread.
2680         ($(objpfx)tst-tls4.out): Depend on tst-tls4moda.so and
2681         tst-tls4modb.so.
2682         * tst-tls4.c: New file.
2683         * tst-tls4moda.c: New file.
2684         * tst-tls4modb.c: New file.
2686 2003-06-19  Daniel Jacobowitz  <drow@mvista.com>
2688         * sysdeps/pthread/timer_create.c (timer_create): Call timer_delref
2689         before __timer_dealloc.
2690         * sysdeps/pthread/timer_routines.c (__timer_thread_find_matching):
2691         Don't call list_unlink.
2693 2003-07-29  Roland McGrath  <roland@redhat.com>
2695         * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
2697 2003-07-22  Jakub Jelinek  <jakub@redhat.com>
2699         * descr.h: Don't include lowlevellock.h, pthreaddef.h and dl-sysdep.h
2700         if __need_struct_pthread_size, instead define lll_lock_t.
2702 2003-07-25  Jakub Jelinek  <jakub@redhat.com>
2704         * tst-cancel17.c (do_test): Check if aio_cancel failed.
2705         Don't reuse struct aiocb A if it failed.
2706         Write fpathconf (fds[1], _PC_PIPE_BUF) + 2 bytes using aio_write,
2707         not just one byte, as that does not block.
2709 2003-07-22  Jakub Jelinek  <jakub@redhat.com>
2711         * sysdeps/pthread/unwind-resume.c: New file.
2712         * sysdeps/pthread/Makefile (routines, shared-only-routines): Add
2713         unwind-resume in csu subdir.
2714         (CFLAGS-unwind-resume.c, CFLAGS-rt-unwind-resume.c): Compile with
2715         exceptions.
2716         (librt-sysdep_routines, librt-shared-only-routines): Add
2717         rt-unwind-resume.
2718         * sysdeps/pthread/rt-unwind-resume.c: New file.
2719         * unwind-forcedunwind.c: New file.
2720         * Makefile (libpthread-routines): Add unwind-forcedunwind.
2721         (libpthread-shared-only-routines): Likewise.
2722         (CFLAGS-unwind-forcedunwind.c): Compile with exceptions.
2723         * pthreadP.h (pthread_cancel_init): New prototype.
2724         * pthread_cancel.c (pthread_cancel): Call pthread_cancel_init.
2726         * sysdeps/pthread/createthread.c (do_thread, create_thread): Make
2727         attr argument const struct pthread_attr *.
2729         * res.c (__res_state): Return __resp.
2730         * descr.h: Include resolv.h.
2731         (struct pthread): Add res field.
2732         * pthread_create.c: Include resolv.h.
2733         (start_thread): Initialize __resp.
2734         * Makefile (tests): Add tst-_res1.
2735         (module-names): Add tst-_res1mod1, tst-_res1mod2.
2736         ($(objpfx)tst-_res1mod2.so): Depend on $(objpfx)tst-_res1mod1.so.
2737         ($(objpfx)tst-_res1): Depend on $(objpfx)tst-_res1mod2.so and
2738         libpthread.
2739         * tst-_res1.c: New file.
2740         * tst-_res1mod1.c: New file.
2741         * tst-_res1mod2.c: New file.
2743 2003-07-21  Ulrich Drepper  <drepper@redhat.com>
2745         * sysdeps/pthread/createthread.c: Don't define CLONE_STOPPED.
2747         * Makefile: Define various *-no-z-defs variables for test DSOs
2748         which has undefined symbols.
2750 2003-07-21  Steven Munroe  <sjmunroe@us.ibm.com>
2752         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
2753         Retry if the stwcx fails to store once_control.
2755 2003-07-20  Ulrich Drepper  <drepper@redhat.com>
2757         * Makefile (libpthread-routines): Add pthread_attr_getaffinity and
2758         pthread_attr_setaffinity.
2759         * Versions [libpthread] (GLIBC_2.3.3): Likewise.
2760         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: New file.
2761         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: New file.
2762         * pthread_attr_destroy.c: Free cpuset element if allocated.
2763         * pthread_create.c: Pass iattr as additional parameter to
2764         create_thread.
2765         * sysdeps/pthread/createthread.c: If attribute is provided and
2766         a new thread is created with affinity set or scheduling parameters,
2767         start thread with CLONE_STOPPED.
2768         * sysdeps/pthread/pthread.h: Declare pthread_attr_getaffinity and
2769         pthread_attr_setaffinity.
2770         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
2771         cpuset element.
2773 2003-07-15  Ulrich Drepper  <drepper@redhat.com>
2775         * tst-tcancel-wrappers.sh: lseek and llseek are not cancelation points.
2777 2003-07-14  Ulrich Drepper  <drepper@redhat.com>
2779         * sysdeps/pthread/configure.in: Require CFI directives also for
2780         ppc and s390.
2782 2003-07-15  Jakub Jelinek  <jakub@redhat.com>
2784         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
2785         Add cfi directives.
2787 2003-07-12  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2789         * sysdeps/sh/tcb-offsets.sym: Add RESULT, TID, CANCELHANDLING and
2790         CLEANUP_JMP_BUF.
2791         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use more
2792         registers as variables.  Call __pthread_mutex_unlock_usercnt.
2793         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
2794         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Store TID
2795         not self pointer in __writer.  Compare with TID to determine
2796         deadlocks.
2797         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
2798         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
2799         Likewise.
2800         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
2801         Likewise.
2802         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add cancellation support.
2803         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
2804         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Define all the nice
2805         macros also when compiling librt.
2807 2003-07-11  Jakub Jelinek  <jakub@redhat.com>
2809         * Makefile (CFLAGS-pthread_once.c): Add -fexceptions
2810         -fasynchronous-unwind-tables.
2811         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
2812         (PSEUDO): Add cfi directives.
2813         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO):
2814         Likewise.
2815         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
2816         Likewise.
2818 2003-07-08  Jakub Jelinek  <jakub@redhat.com>
2820         * pthreadP.h (__pthread_unwind_next, __pthread_register_cancel,
2821         __pthread_unregister_cancel): Add prototypes and hidden_proto.
2822         * unwind.c (__pthread_unwind_next): Add hidden_def.
2823         * cleanup.c (__pthread_register_cancel, __pthread_unregister_cancel):
2824         Likewise.
2825         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
2826         Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
2827         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
2828         Likewise.
2829         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
2830         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
2831         Likewise.
2832         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once): Use
2833         HIDDEN_JUMPTARGET to call __pthread_register_cancel,
2834         __pthread_unregister_cancel and __pthread_unwind_next.
2836 2003-07-04  Jakub Jelinek  <jakub@redhat.com>
2838         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Use
2839         different symbol for the cancellation syscall wrapper and
2840         non-cancellation syscall wrapper.
2841         (PSEUDO_END): Define.
2843 2003-07-05  Richard Henderson  <rth@redhat.com>
2845         * sysdeps/alpha/elf/pt-initfini.c: Avoid .ent/.end.
2846         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_wait,
2847         lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
2848         return actual return value from the syscall, not 0.
2850 2003-07-07  Ulrich Drepper  <drepper@redhat.com>
2852         * descr.h (struct pthread): Add pid field.
2853         * allocatestack.c (allocate_stack): Initialize pid field in descriptor.
2854         (__reclaim_stacks): Likewise.
2855         * init.c (sigcancel_handler): If __ASSUME_CORRECT_SI_PID is defined
2856         also check for PID of the signal source.
2857         (__pthread_initialize_minimal_internal): Also initialize pid field
2858         of initial thread's descriptor.
2859         * pthread_cancel.c: Use tgkill instead of tkill if possible.
2860         * sysdeps/unix/sysv/linux/fork.c: Likewise.
2861         * sysdeps/unix/sysv/linux/pt-raise.c: Likewise.
2862         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
2863         * sysdeps/unix/sysv/linux/raise.c: Likewise.
2865 2003-07-05  Ulrich Drepper  <drepper@redhat.com>
2867         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_push): Renamed.
2868         Fix use of parameter.
2869         (__libc_cleanup_pop): Likewise.
2871 2003-07-04  Ulrich Drepper  <drepper@redhat.com>
2873         * init.c (sigcancel_handler): Change parameters to match handler
2874         for SA_SIGACTION.  Check signal number and code to recognize
2875         invalid invocations.
2877 2003-07-03  Roland McGrath  <roland@redhat.com>
2879         * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr):
2880         Apply sizeof (struct pthread) bias to r13 value.
2882 2003-07-03  Ulrich Drepper  <drepper@redhat.com>
2884         * sysdeps/pthread/configure.in: Require CFI directives.
2886         * sysdeps/pthread/librt-cancellation.c (__pthread_unwind): Remove
2887         definition.
2888         * pthreadP.h (__pthread_unwind): Add hidden_proto if used in
2889         libpthread compilation.
2890         * unwind.c (__pthread_unwind): Add hidden_def.
2891         * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_unwind.
2893 2003-07-01  Ulrich Drepper  <drepper@redhat.com>
2895         * libc-cancellation.c (__libc_cleanup_routine): Define.
2896         * sysdeps/pthread/bits/libc-lock.h (__pthread_cleanup_push): Define.
2897         (__pthread_cleanup_pop): Define.
2899 2003-07-01  Richard Henderson  <rth@redhat.com>
2901         * sysdeps/alpha/elf/pt-initfini.c: New file.
2902         * sysdeps/alpha/pthread_spin_lock.S: New file.
2903         * sysdeps/alpha/pthread_spin_trylock.S: New file.
2904         * sysdeps/alpha/pthreaddef.h: New file.
2905         * sysdeps/alpha/td_ta_map_lwp2thr.c: New file.
2906         * sysdeps/alpha/tls.h: New file.
2907         * sysdeps/unix/sysv/linux/alpha/Makefile: New file.
2908         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: New file.
2909         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: New file.
2910         * sysdeps/unix/sysv/linux/alpha/createthread.c: New file.
2911         * sysdeps/unix/sysv/linux/alpha/fork.c: New file.
2912         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: New file.
2913         * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: New file.
2914         * sysdeps/unix/sysv/linux/alpha/pthread_once.c: New file.
2915         * sysdeps/unix/sysv/linux/alpha/sem_post.c: New file.
2916         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
2918 2003-07-01  Ulrich Drepper  <drepper@redhat.com>
2920         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Add correct
2921         cleanup support and unwind info.
2923 2003-06-30  Ulrich Drepper  <drepper@redhat.com>
2925         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
2926         Use correct cleanup handler registration.  Add unwind info.
2927         * sysdeps/unix/sysv/linux/unwindbuf.sym: New file.
2928         * sysdeps/unix/sysv/linux/Makefile: Add rule to build unwindbuf.h.
2929         * tst-once3.c: Add cleanup handler and check it is called.
2930         * tst-once4.c: Likewise.
2931         * tst-oncex3.c: New file.
2932         * tst-oncex4.c: New file.
2933         * Makefile: Add rules to build and run tst-oncex3 and tst-oncex4.
2935 2003-06-29  Ulrich Drepper  <drepper@redhat.com>
2937         * sysdeps/pthread/configure.in: Check for C cleanup handling in gcc.
2939 2003-06-27  Ulrich Drepper  <drepper@redhat.com>
2941         * tst-cancel4.c (tf_msgrcv): Use IPC_PRIVATE in msgget call.
2942         (tf_msgsnd): Likewise.
2944         * tst-cancel4.c (tf_msgrcv): Strengthen test against valid
2945         premature returns a bit more.
2947 2003-06-26  Ulrich Drepper  <drepper@redhat.com>
2949         * sysdeps/pthread/librt-cancellation.c: Move __pthread_unwind
2950         definition to the front.
2952         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rename
2953         the cleanup functions to make the names unique.  Fix dwarf opcode
2954         un unwind table.
2955         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Rename cleanup
2956         functions to make the names unique.  Fix CFA offset for two blocks.
2958 2003-06-25  Ulrich Drepper  <drepper@redhat.com>
2960         * sysdeps/pthread/pthread.h (class __pthread_cleanup_class): Add
2961         missing closing braces.
2962         Patch by Christophe Saout <christophe@saout.de>.
2964 2003-06-24  Roland McGrath  <roland@redhat.com>
2966         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Typo fix.
2968 2003-06-24  Ulrich Drepper  <drepper@redhat.com>
2970         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: New file.
2971         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: New file.
2973         * pthreadP.h: Declare __find_thread_by_id.
2974         * allocatestack.c [HP_TIMING_AVAIL]: Define __find_thread_by_id.
2975         * pthread_clock_gettime.c: Allow using other thread's clock.
2976         * pthread_clock_settime.c: Likewise.
2977         * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
2978         * Makefile: Add rules to build and run tst-clock2.
2979         * tst-clock2.c: New file.
2981 2003-06-23  Ulrich Drepper  <drepper@redhat.com>
2983         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rewrite
2984         to use exception-based cleanup handler.
2985         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
2987         * tst-cond8.c (ch): Announce that we are done.
2989         * pthreadP.h (__pthread_mutex_cond_lock): Mark with internal_function.
2991         * tst-cancel17.c (tf): Retry aio_suspend in case of EINTR.
2992         Also test aio_suspend with timeout value.
2994 2003-06-22  Ulrich Drepper  <drepper@redhat.com>
2996         * pthreadP.h: Mark __pthread_mutex_unlock_usercnt also hidden.
2997         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Add
2998         attribute_hidden.
3000         * pthreadP.h (__pthread_mutex_init_internal): Mark hidden.
3001         (__pthread_mutex_lock_internal): Likewise.
3002         (__pthread_mutex_unlock_internal): Likewise.
3003         (__pthread_mutex_unlock_usercnt): Declare.
3004         * pthread_mutex_destroy.c: Always fail if used in any way.
3005         * pthread_mutex_init.c: Update comment.
3006         * pthread_mutex_lock.c: If NO_INCR is not defined adjust __nusers.
3007         * pthread_mutex_timedlock.c: Adjust __nusers.
3008         * pthread_mutex_trylock.c: Adjust __nusers.
3009         * pthread_mutex_unlock.c: Old code is in __pthread_mutex_unlock_usercnt
3010         and public interfaces are wrapper with pass additional parameter.
3011         __pthread_mutex_unlock_usercnt does not adjust __nusers if second
3012         parameter zero.
3013         * tst-mutex8.c: New file.
3014         * Makefile (tests): Add tst-mutex8.
3015         * sysdeps/pthread/pthread_cond_timedwait.c: Call
3016         __pthread_mutex_unlock_usercnt.
3017         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
3018         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3019         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
3020         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3021         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3022         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Define NO_INCR.
3023         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
3024         Add __nusers.
3025         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3026         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3027         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3028         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
3029         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3031         * pthread_mutex_lock.c: Don't store THREAD_ID in __owner, use TID.
3032         * pthread_mutex_timedlock.c: Likewise.
3033         * pthread_mutex_trylock.c: Adjust __nusers.
3034         * pthread_mutex_unlock.c: Compare with TID not THREAD_ID.
3035         * tst-mutex9.c: New file.
3036         * Makefile (tests): Add tst-mutex9.
3037         * sysdeps/i386/tls.h: Remove THREAD_ID definition.
3038         * sysdeps/ia64/tls.h: Likewise.
3039         * sysdeps/powerpc/tls.h: Likewise.
3040         * sysdeps/s390/tls.h: Likewise.
3041         * sysdeps/sh/tls.h: Likewise.
3042         * sysdeps/x86_64/tls.h: Likewise.
3043         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
3044         Change type of __owner.
3045         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3046         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3047         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3048         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
3049         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3051 2003-06-19  Jakub Jelinek  <jakub@redhat.com>
3053         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Move to...
3054         * sysdeps/unix/sysv/linux/sem_post.c: ...here.
3056         * sysdeps/unix/sysv/linux/sem_post.c: Move to...
3057         * sysdeps/unix/sysv/linux/powerpc/sem_post.c: ... here.  Pass nr + 1
3058         instead of nr to lll_futex_wake.  Only set errno and return -1
3059         if err < 0.
3061         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_wait,
3062         lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
3063         return actual return value from the syscall, not 0.
3065 2003-06-18  Ulrich Drepper  <drepper@redhat.com>
3067         * tst-cancel4.c (tf_msgsnd): Don't always use 100 as the type,
3068         find a random value.
3069         (tf_msgrcv): Likewise.  Also don't report msgrcv returns if
3070         errno==EIDRM.
3072         * sysdeps/unix/sysv/linux/timer_settime.c: Add prototype for
3073         compat_timer_settime.
3074         * sysdeps/unix/sysv/linux/timer_gettime.c: Add prototype for
3075         compat_timer_gettime.
3076         * sysdeps/unix/sysv/linux/timer_getoverr.c: Add prototype for
3077         compat_timer_getoverrun.
3078         * sysdeps/unix/sysv/linux/timer_delete.c: Add prototype for
3079         compat_timer_delete.
3081         * pthread_mutex_destroy.c (__pthread_mutex_destroy): For
3082         error-checking mutex detect busy mutexes.
3084 2003-06-17  Ulrich Drepper  <drepper@redhat.com>
3086         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_mutex_lock):
3087         Add ax to clobber list.
3088         (lll_mutex_cond_lock): Likewise.
3089         (lll_mutex_unlock): Likewise.
3090         (lll_lock): Likewise.
3091         (lll_unlock): Likewise.
3093         * Makefile: Add rules to build and run tst-cancel18 and tst-cancelx18.
3094         * tst-cancel18.c: New file.
3095         * tst-cancelx18.c: New file.
3097         * tst-cancel4.c: Test connect, creat, msgrcv, msgsnd, sendmsg, sendto,
3098         and tcdrain.
3100         * Makefile: Add rules to build and run tst-cancel17 and tst-cancel17x.
3101         * tst-cancel17.c: New file.
3102         * tst-cancelx17.c: New file.
3104         * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
3105         * sysdeps/unix/sysv/linux/sigwait.c: New file.
3106         * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
3108         * tst-cancel4.c: Test open, close, pread, pwrite, fsync, and msync.
3110 2003-06-16  Jakub Jelinek  <jakub@redhat.com>
3112         * sysdeps/pthread/createthread.c (create_thread): Set
3113         header.multiple_threads unconditionally.
3114         * allocatestack.c (allocate_stack): Likewise.
3115         * descr.h (struct pthread): Add header.multiple_threads
3116         unconditionally.
3117         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (CENABLE, CDISABLE):
3118         Define for librt.  #error if neither libpthread, libc nor librt.
3119         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (CENABLE, CDISABLE):
3120         Likewise.
3121         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (CENABLE,
3122         CDISABLE): Likewise.
3123         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (CENABLE,
3124         CDISABLE): Likewise.
3125         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (CENABLE,
3126         CDISABLE): Likewise.
3127         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (CENABLE,
3128         CDISABLE): Likewise.  Access header.multiple_threads outside of
3129         libc and libpthread.
3130         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (CENABLE, CDISABLE):
3131         Likewise.
3132         * sysdeps/x86_64/tls.h (tcbhead_t): Add multiple_threads.
3133         * sysdeps/x86_64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define.
3135 2003-06-17  Ulrich Drepper  <drepper@redhat.com>
3137         * tst-cancel4.c: Add tests for the socket and signal functions, pause.
3138         Also test early cancellation before the thread reaches the cancellation
3139         point.
3141         * Makefile: Compile forward.c with exceptions.
3143         * sysdeps/unix/sysv/linux/sleep.c: New file.
3145 2003-06-16  Ulrich Drepper  <drepper@redhat.com>
3147         * Makefile: Add CFLAGS definition to compile function wrappers
3148         duplicated from libc with exceptions.
3149         * tst-cancel4.c: Also check cancellation handlers.
3151         * Makefile: Add rules to build and run tst-cancel16 and
3152         tst-cancelx16.  Add missing CFLAGS definitions.
3153         * tst-cancel16.c: New file.
3154         * tst-cancelx16.c: New file.
3156 2003-06-15  Ulrich Drepper  <drepper@redhat.com>
3158         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
3159         (DL_SYSINFO_IMPLEMENTATION): Use CFI opcodes.
3160         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
3161         (DL_SYSINFO_IMPLEMENTATION): Likewise.
3163         * pthreadP.h (LIBC_CANCEL_ASYNC): Also define for librt.
3164         (LIBC_CANCEL_RESET): Likewise.
3165         Declare __librt_enable_asynccancel and __librt_disable_asynccancel.
3166         * sysdeps/pthread/Makefile (librt-sysdep_routines): Add
3167         librt-cancellation.
3168         (CFLAGS-libcrt-cancellation.c): Define.
3169         * sysdeps/pthread/librt-cancellation.c: New file.
3170         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define all the nice
3171         macros also when compiling librt.
3172         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
3173         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
3174         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
3175         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
3176         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
3177         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
3178         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
3180         * sysdeps/unix/sysv/linux/timer_create.c: Add prototype for
3181         compat_timer_create.
3183 2003-06-14  Ulrich Drepper  <drepper@redhat.com>
3185         * sysdeps/pthread/posix-timer.h (timespec_compare): Always inline.
3187         * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
3188         __register_atfork.
3189         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
3190         Add libc_hidden_def.
3192 2003-06-13  Roland McGrath  <roland@redhat.com>
3194         * sysdeps/x86_64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Pass FS
3195         constant from <sys/reg.h> to ps_get_thread_area, not register contents.
3197 2003-06-11  Ulrich Drepper  <drepper@redhat.com>
3199         * allocatestack.c (queue_stack): Always inline.
3200         * ptreadhP.h (__do_cancel): Likewise.
3202 2003-06-10  Jakub Jelinek  <jakub@redhat.com>
3204         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait): Fix
3205         a typo.
3207 2003-06-10  Ulrich Drepper  <drepper@redhat.com>
3209         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
3210         (__pthread_cond_signal): Remove incorrect second addition for
3211         cond_lock!=0.
3213 2003-06-09  Ulrich Drepper  <drepper@redhat.com>
3215         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
3216         (__pthread_cond_signal): Use correct futex pointer in
3217         __lll_mutex_lock_wait call.
3219         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
3220         (__pthread_cond_signal): Some more tweaks to handle cond_lock!=0.
3222 2003-06-08  Ulrich Drepper  <drepper@redhat.com>
3224         * sysdeps/unix/sysv/linux/s390/sem_wait.c (__new_sem_wait): Make
3225         cancelable.
3226         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
3227         Likewise.
3229         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Remove
3230         hand-written CFI generation code.  Since ENTRY/END also initiated
3231         CFI frames this caused two CFI sets to be generated.
3233 2003-06-07  Ulrich Drepper  <drepper@redhat.com>
3235         * cleanup_routine.c: New file.
3236         * Versions (libpthread) [GLIBC_2.3.3]: Add __pthread_cleanup_routine.
3237         * sysdeps/pthread/pthread.h: Add support for fully exception-based
3238         cleanup handling.
3239         * Makefile (libpthread-routines): Add cleanup_routine.
3240         Add more CFLAGS variables to compile with exceptions.  Add comments
3241         why which file needs unwind tables.
3242         (tests) [have-forced-unwind==yes]: Add tst-cancelx* and tst-cleanupx*
3243         tests.
3244         * tst-cancelx1.c: New file.
3245         * tst-cancelx2.c: New file.
3246         * tst-cancelx3.c: New file.
3247         * tst-cancelx4.c: New file.
3248         * tst-cancelx5.c: New file.
3249         * tst-cancelx6.c: New file.
3250         * tst-cancelx7.c: New file.
3251         * tst-cancelx8.c: New file.
3252         * tst-cancelx9.c: New file.
3253         * tst-cancelx10.c: New file.
3254         * tst-cancelx11.c: New file.
3255         * tst-cancelx12.c: New file.
3256         * tst-cancelx13.c: New file.
3257         * tst-cancelx14.c: New file.
3258         * tst-cancelx15.c: New file.
3259         * tst-cleanupx0.c: New file.
3260         * tst-cleanupx0.expect: New file.
3261         * tst-cleanupx1.c: New file.
3262         * tst-cleanupx2.c: New file.
3263         * tst-cleanupx3.c: New file.
3265         * tst-cleanup0.c: Make standard compliant.
3266         * tst-cleanup1.c: Likewise.
3268         * sysdeps/unix/sysv/linux/sem_timedwait.c: Add cancellation support.
3269         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
3270         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
3271         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
3272         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
3273         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
3274         * sysdeps/i386/tcb-offsets.sym: Add RESULT, CANCELHANDLING, and
3275         CLEANUP_JMP_BUF.
3276         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
3277         * tst-cancel12.c: New file.
3278         * tst-cancel13.c: New file.
3279         * tst-cancel14.c: New file.
3280         * tst-cancel15.c: New file.
3281         * Makefile (tests): Add tst-cancel12, tst-cancel13, tst-cancel14,
3282         and tst-cancel15.
3284         * tst-cancel1.c: Add some comments.
3286         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Compute relative
3287         timeout correctly.
3289 2003-06-06  Ulrich Drepper  <drepper@redhat.com>
3291         * Makefile (CFLAGS-pthread_cancel.c): Define.
3293 2003-06-05  Ulrich Drepper  <drepper@redhat.com>
3295         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_rwlock_t):
3296         Change type of __writer element to int.
3297         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3298         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3299         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3300         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3301         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3302         * sysdeps/i386/tcb-offsets.sym: Replace SELF entry with TID entry.
3303         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
3304         * pthread_rwlock_trywrlock.c: Store TID not self pointer in __writer.
3305         Compare with TID to determine deadlocks.
3306         * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
3307         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
3308         * sysdeps/pthread/pthread_rwlock_timedwrlock.: Likewise.
3309         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
3310         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
3311         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
3312         Likewise.
3313         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
3314         Likewise.
3315         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
3316         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
3317         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
3318         Likewise.
3319         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3320         Likewise.
3321         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
3322         * Makefile (tests): Add tst-rwlock12.
3323         * tst-rwlock12.c: New file.
3325 2003-06-05  Jakub Jelinek  <jakub@redhat.com>
3327         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait,
3328         __lll_timedlock_wait, lll_unlock_wake_cb, __lll_timedwait_tid):
3329         Remove bogus hidden_proto.
3330         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
3331         Likewise.
3332         * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_lock,
3333         lll_unlock_wake_cb, ___lll_timedwait_tid): Likewise.
3334         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (___lll_mutex_lock,
3335         ___lll_mutex_timedlock): Likewise.
3337 2003-06-04  Ulrich Drepper  <drepper@redhat.com>
3339         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
3340         (__pthread_cond_signal): Add some code to eventually handle
3341         cond_lock!=0.
3343 2003-06-01  Ulrich Drepper  <drepper@redhat.com>
3345         * Makefile (tests): Add tst-exec4.
3346         (tst-exec4-ARGS): Define.
3347         * tst-exec4.c: New file.
3349 2003-05-31  Ulrich Drepper  <drepper@redhat.com>
3351         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
3352         Also fail if tv_nsec < 0.
3353         (__lll_timedwait_tid): Likewise.
3354         * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
3355         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_timedwait_tid):
3356         Likewise.
3357         * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_timedwait_tid):
3358         Likewise.
3359         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (__lll_mutex_timedlock):
3360         Likewise.
3361         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
3362         Likewise.
3363         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_timedwait_tid):
3364         Likewise.
3365         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_timedwait_tid):
3366         Likewise.
3368         * Makefile (tests): Add tst-sem8 and tst-sem9.
3369         * tst-sem8.c: New file.
3370         * tst-sem9.c: New file.
3371         * sem_open.c: Fix creation of in_use record if the file exists but
3372         no internal record.
3374         * posix-timer.h: Remove old, unused timer_id2ptr and timer_ptr2id
3375         definitions.
3377         * sysdeps/pthread/timer_create.c (timer_create): In case
3378         evp==NULL, assign timer ID to sival_ptr.
3380         * descr.h (struct pthread_unwind_buf): Change type of prev element to
3381         struct pthread_unwind_buf *.
3382         (struct pthread): Likewise for cleanup_jmp_buf element.
3384         * cleanup.c (__pthread_register_cancel): Add cast to avoid warning.
3385         * cleanup_defer.c (__pthread_register_cancel_defer): Likewise.
3386         * unwind.c (__pthread_unwind_next): Likewise.
3388 2003-05-30  Ulrich Drepper  <drepper@redhat.com>
3390         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
3391         (lll_futex_timed_wait): Use int for futex value parameter.
3392         (lll_futex_wake): Likewise.
3393         (lll_futex_requeue): Likewise.
3395         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
3396         Replace one memory operation with one register operation.
3398         * tst-join4.c (do_test): Fix error message.
3400         * tst-rwlock6.c (do_test): Use correct format specifier.
3402         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
3403         (__lll_mutex_lock_wait): Replace one memory operation with one
3404         register operation.
3405         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S
3406         (__lll_mutex_lock_wait): Likewise.
3408         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
3409         (__lll_mutex_cond_lock): Add one to value parameter of
3410         __lll_lock_wait to reflect reality in the futex syscall.
3411         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
3412         (lll_mutex_cond_lock): Likewise.
3414 2003-05-30  Jakub Jelinek  <jakub@redhat.com>
3416         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_cond_lock):
3417         New function.
3418         (lll_mutex_cond_lock): Define.
3420 2003-05-29  Ulrich Drepper  <drepper@redhat.com>
3422         * Makefile (tests): Add tst-signal6.
3423         * tst-signal6.c: New file.
3425         * sysdeps/unix/sysv/linux/s390/lowlevellock.h
3426         (__lll_mutex_unlock_force): New function
3427         (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
3429         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
3430         (__lll_mutex_unlock_force): New function.
3431         (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
3433         * tst-rwlock7.c (do_test): Use correct format specifier.
3435         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue):
3436         Find break parameter in correct asm argument.
3438 2003-05-27  Jakub Jelinek  <jakub@redhat.com>
3440         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_clobbers):
3441         Remove out4.
3442         (lll_futex_requeue): Fix __o3 constraint, return negative errno if
3443         error occured.
3444         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
3445         Add __mutex.
3446         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_REQUEUE,
3447         lll_futex_requeue, lll_mutex_unlock_force): Define.
3449 2003-05-30  Jakub Jelinek  <jakub@redhat.com>
3451         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
3452         (pthread_cond_t): Add __mutex.
3453         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_REQUEUE,
3454         lll_futex_requeue, lll_mutex_unlock_force): Define.
3456 2003-05-28  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3458         * sysdeps/sh/tcb-offsets.sym: Define MUTEX_FUTEX.
3459         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
3460         Add __mutex field.
3461         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (SYSCALL_WITH_INST_PAD):
3462         Define.
3463         (lll_futex_wait, lll_futex_wake): Define.
3464         * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: New file.
3465         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Try using
3466         FUTEX_REQUEUE instead of FUTEX_WAIT.
3467         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
3468         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Remember
3469         mutex which was used in condvar structure.  Call
3470         __pthread_mutex_cond_lock instead of __pthread_mutex_lock_internal.
3471         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
3473         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Don't
3474         include tcb-offsets.h.  Read wakeup value in locked region.
3475         Use the value of gbr register as THREAD_ID.
3476         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
3477         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
3478         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
3480         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Remove futex related
3481         macros.
3483 2003-05-28  Ulrich Drepper  <drepper@redhat.com>
3485         * sysdeps/pthread/pthread_cond_broadcast.c
3486         (__pthread_cond_broadcast): Fix typo: MAX_INT -> INT_MAX.
3488 2003-05-26  Ulrich Drepper  <drepper@redhat.com>
3490         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Fix
3491         typo in register name.
3492         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use parameters
3493         correctly.  Actually use requeue.  Little optimization.
3494         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Store
3495         mutex address early.  Handle cancellation state as 32-bit value.
3496         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3497         Remove unnecessary label.
3499 2003-05-25  Ulrich Drepper  <drepper@redhat.com>
3501         * sysdeps/pthread/pthread_cond_broadcast.c: Try using FUTEX_REQUEUE
3502         instead of FUTEX_WAIT.
3503         * sysdeps/pthread/pthread_cond_signal.c: Likewise.
3504         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
3505         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
3506         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
3507         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
3508         * sysdeps/pthread/pthread_cond_timedwait.c: Remember mutex which was
3509         used in condvar structure.  Call __pthread_mutex_cond_lock instead
3510         of __pthread_mutex_lock_internal.
3511         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3512         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3513         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
3514         (__condvar_cleanup): Always call __pthread_mutex_cond_lock.
3515         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
3516         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3517         * sysdeps/unix/sysv/linux/Makefile (libpthread-sysdep_routines):
3518         Add pthread_mutex_cond_lock.
3519         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add dep_mutex.
3520         * sysdeps/unix/sysv/linux/pthread_cond_mutex_lock.c: New file.
3521         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define
3522         lll_mutex_cond_lock.
3523         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
3524         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
3525         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
3526         Add __mutex field.
3527         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3528         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3530         * sysdeps/i386/tcb-offsets.sym: Define MUTEX_FUTEX.
3531         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
3533         * pthreadP.h: Declare __pthread_mutex_cond_lock.
3534         * pthread_mutex_lock.c: Define LLL_MUTEX_LOCK if not already defined.
3535         Use it instead of lll_mutex_lock.  If __pthread_mutex_lock is a
3536         macro don't define aliases.
3538         * cancellation.c: Remove __pthread_enable_asynccancel_2.
3539         * pthreadP.h: Remove declaration of __pthread_enable_asynccancel_2.
3540         * sysdeps/pthread/pthread_cond_timedwait.c: Use
3541         __pthread_enable_asynccancel instead of __pthread_enable_asynccancel_2.
3542         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3543         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3544         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
3545         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
3546         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3548 2003-05-17  Ulrich Drepper  <drepper@redhat.com>
3550         * sem_open.c: Fix one endless loop.  Implement correct semantics
3551         wrt opening the same semaphore more then once.
3552         * sem_close.c: Adjust for sem_open change.
3553         * semaphoreP.h: Include <semaphore.h>.  Define struct inuse_sem.
3554         Declare __sem_mappings, __sem_mappings_lock, __sem_search.
3555         * Makefile (tests): Add tst-sem7.
3556         * tst-sem7.c: New file.
3558 2003-05-16  Roland McGrath  <roland@redhat.com>
3560         * sysdeps/unix/sysv/linux/register-atfork.c (libc_freeres_fn): Fix
3561         uninitialized variable braino.
3563 2003-05-16  Ulrich Drepper  <drepper@redhat.com>
3565         * sysdeps/unix/sysv/linux/timer_gettime.c (timer_gettime): Correct
3566         test for syscall availability.
3568         * sysdeps/unix/sysv/linux/timer_settime.c (timer_settime): Set
3569         __no_posix_timers to -1 if the syscalls don't exist.
3571         * pthread_join.c (pthread_join): Set tid field of the joined
3572         thread to -1.  This isn't necessary but helps to recognize some
3573         error conditions with almost no cost.
3575         * allocatestack.c (FREE_P): Also negative values indicate an
3576         unused stack.
3578         * unwind.c: Include <unistd.h>.
3580 2003-05-14  Ulrich Drepper  <drepper@redhat.com>
3582         * Makefile ($(objpfx)$(multidir)): Add rule to create the directory.
3584 2003-05-14  Jakub Jelinek  <jakub@redhat.com>
3586         * Makefile (crti-objs, crtn-objs): New variables.
3587         (omit-deps, extra-objs): Add crtn.
3588         ($(objpfx)libpthread.so): Depend on both crti and crtn
3589         and links to them in multidir.
3590         ($(objpfx)crtn.S, $(objpfx)crtn.o): New rules.
3592 2003-05-12  Steven Munroe  <sjmunroe@us.ibm.com>
3594         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
3595         (lll_mutex_unlock): Use atomic_exchange_rel.
3597 2003-05-11  Ulrich Drepper  <drepper@redhat.com>
3599         * cond-perf.c (cons): Add missing locking around setting of alldone.
3601 2003-05-10  Ulrich Drepper  <drepper@redhat.com>
3603         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Remove futex
3604         related macros.
3605         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
3607 2003-05-09  Ulrich Drepper  <drepper@redhat.com>
3609         * tst-sem6.c: New file.
3610         * Makefile (tests): Add tst-sem6.
3612         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (___lll_mutex_unlock):
3613         Use atomic_exchange_rel instead of atomic_exchange.
3614         * sysdeps/unix/sysv/linux/lowlevellock.c (lll_unlock_wake_cb):
3615         Likewise.
3617         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Improve quality of
3618         code for lll_futex_wait and lll_futex_wake in static apps.  Use
3619         vsyscall is possible.
3621         * sysdeps/unix/sysv/linux/pthread_getaffinity.c: New file.
3622         * sysdeps/unix/sysv/linux/pthread_setaffinity.c: New file.
3623         * sysdeps/pthread/pthread.h: Declare pthread_getaffinity_np and
3624         pthread_setaffinity_np.
3625         * Versions [libpthread] (GLIBC_2.3.3): Add pthread_getaffinity_np
3626         and pthread_setaffinity_np.
3627         * Makefile (libpthread-routines): Add pthread_getaffinity and
3628         pthread_setaffinity.
3630         * allocatestack.c (allocate_stack): If ARCH_RETRY_MMAP is defined,
3631         use it in case mmap to allocate the stack fails.
3632         * sysdeps/unix/sysv/linux/x86_64/Makefile: Don't define
3633         ARCH_MAP_FLAGS here.
3634         * sysdeps/x86_64/pthreaddef.h: Define ARCH_MAP_FLAGS and
3635         ARCH_RETRY_MMAP.
3637 2003-05-08  Ulrich Drepper  <drepper@redhat.com>
3639         * sysdeps/unix/sysv/linux/fork.c: Complete rewrite of the atfork
3640         handler implementation.  It is now lockless in fork().
3641         * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
3642         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
3643         * sysdeps/unix/sysv/linux/fork.h: Don't include <link.h>.  Don't
3644         declare the __fork_*_lists.
3645         (struct fork_handler): Include pointers to all three functions.
3646         Add next, refcntr and need_signal elements.
3647         (__fork_handlers): New declaration.
3648         (__register_atfork_malloc): Remove declaration.
3649         (HAVE_register_atfork_malloc): Remove definition.
3650         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove
3651         __pthread_child_handler variable.
3652         (__libc_pthread_init): Use __register_atfork instead of explicitly
3653         adding to the list.
3654         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define lll_futex_wait
3655         and lll_futex_wake.
3656         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
3658         * unwind.c (unwind_cleanup): Print error message and then abort.  This
3659         function must never be reached.
3661         * cond-perf.c: New file.
3663 2003-05-05  Ulrich Drepper  <drepper@redhat.com>
3665         * sysdeps/i386/tls.h (TLS_INIT_TP): Include \n in error message.
3667 2003-05-04  Roland McGrath  <roland@redhat.com>
3669         * Makefile ($(objpfx)../libc.so): New target.
3671 2003-05-02  Ulrich Drepper  <drepper@redhat.com>
3673         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
3674         (pthread_condattr_t): Size is only an int, don't use long for
3675         alignment.
3676         (pthread_mutexattr_t): Likewise.
3677         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3678         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3679         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3681 2003-05-01  Ulrich Drepper  <drepper@redhat.com>
3683         * sysdeps/i386/tls.h: Define THREAD_ID.
3684         * sysdeps/ia64/tls.h: Likewise.
3685         * sysdeps/powerpc/tls.h: Likewise.
3686         * sysdeps/s390/tls.h: Likewise.
3687         * sysdeps/sh/tls.h: Likewise.
3688         * sysdeps/x86_64/tls.h: Likewise.
3689         * pthread_mutex_lock.c: Use THREAD_ID instead of THREAD_SELF to
3690         record ownership.
3691         * pthread_mutex_timedlock.c: Likewise.
3692         * pthread_mutex_trylock.c: Likewise.
3693         * pthread_mutex_unlock.c: Likewise.
3694         * pthread_rwlock_trywrlock.c: Likewise.
3695         * sysdeps/pthread/pthread_rwlocklock_rdlock.c: Likewise.
3696         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
3697         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
3698         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
3700         * sysdeps/pthread/createthread.c (create_thread): Use CLONE_SYSVSEM
3701         flag.
3703 2003-04-29  Jakub Jelinek  <jakub@redhat.com>
3705         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
3706         (__SIZEOF_PTHREAD_COND_T): Define to 48.
3707         (pthread_rwlock_t): Add 16 bytes of pad instead of 8 before __flags.
3708         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
3709         Make __align long long instead of long.
3710         (pthread_rwlock_t): Formatting.
3711         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
3712         (pthread_rwlock_t): Formatting.
3713         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
3714         (pthread_cond_t): Make __align long long instead of long.
3715         (pthread_rwlock_t): Move __flags field to the same position as in
3716         linuxthreads.
3718 2003-04-30  Ulrich Drepper  <drepper@redhat.com>
3720         * tst-rwlock6.c (do_test): Use correct printf format specifiers.
3721         * tst-rwlock7.c (do_test): Likewise.
3723 2003-04-26  Roland McGrath  <roland@redhat.com>
3725         * Makefile ($(test-modules)): Depend on $(common-objpfx)shlib.lds.
3727 2003-04-22  Jakub Jelinek  <jakub@redhat.com>
3729         * allocatestack.c (TLS_TPADJ): Add TLS_PRE_TCB_SIZE instead of
3730         sizeof (struct pthread).
3731         (allocate_stack): Subtract TLS_PRE_TCB_SIZE bytes instead of
3732         1 struct pthread.
3733         * sysdeps/powerpc/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Define
3734         to 0.
3735         (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Define to alignment of
3736         struct pthread.
3737         (TLS_PRE_TCB_SIZE): Increase to cover tcbhead_t preceeded by pad
3738         to 32-bit bytes.
3739         (INSTALL_DTV, GET_DTV, THREAD_DTV): tcbhead_t is immediately before
3740         tcbp.
3741         (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Don't add TLS_TCB_SIZE
3742         unneccessarily.
3743         (NO_TLS_OFFSET): Define.
3744         * sysdeps/unix/sysv/linux/powerpc/createthread.c (TLS_VALUE): Don't
3745         add TLS_TCB_SIZE unnecessarily.
3747 2003-04-22  Roland McGrath  <roland@redhat.com>
3749         * Makeconfig (shared-thread-library): Reverse link order to work
3750         around linker bug.
3752 2003-04-22  Ulrich Drepper  <drepper@redhat.com>
3754         * semaphore.h: Fix typo in comment.
3756 2003-04-21  Ulrich Drepper  <drepper@redhat.com>
3758         * sysdeps/pthread/sigfillset.c: New file.
3760         * init.c (__pthread_initialize_minimal): Don't block SIGTIMER.
3761         * pthreadP.h: Make SIGTIMER and SIGCANCEL the same.
3762         * sysdeps/pthread/pthread_sigmask.c: Remove handling of SIGTIMER.
3763         * sysdeps/pthread/sigaction.c: Likewise.
3764         * sysdeps/pthread/sigprocmask.c: New file.
3765         * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): Define as
3766         __SIGRTMIN+1.
3767         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
3768         Block SIGTIMER.  Also handle SI_TKILL events and terminate thread
3769         in this case.
3771 2003-04-19  Ulrich Drepper  <drepper@redhat.com>
3773         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
3774         (DL_SYSINFO_IMPLEMENTATION): Add .eh_frame information.
3776         * sysdeps/unix/sysv/linux/unregister-atfork.c
3777         (__unregister_atfork): Don't free memory not allocated dynamically.
3779         * semaphore.h: Remove __THROW marker from cancellation points.
3780         * nptl/sysdeps/pthread/pthread.h: Likewise.
3782 2003-04-18  Ulrich Drepper  <drepper@redhat.com>
3784         * sysdeps/pthread/pthread.h: Don't mark pthread_testcancel,
3785         pthread_cancel, pthread_setcancelstate, and pthread_setcanceltype with
3786         __THROW.
3788 2003-04-16  Jakub Jelinek  <jakub@redhat.com>
3790         * tst-cancel4.c (do_test): Use %zd instead of %d when printing cnt.
3792 2003-04-15  Roland McGrath  <roland@redhat.com>
3794         * forward.c (__pthread_unwind): Tweak to avoid warning.
3796 2003-04-15  Ulrich Drepper  <drepper@redhat.com>
3798         * pthreadP.h: Move THREAD_ATOMIC_* replacements to the top.
3800 2003-04-14  Ulrich Drepper  <drepper@redhat.com>
3802         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Don't
3803         overflow CFA advance instructions.
3804         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3806 2003-04-14  Jakub Jelinek  <jakub@redhat.com>
3808         * sysdeps/i386/tls.h: Rename LOCK to LOCK_PREFIX.
3809         * sysdeps/i386/pthread_spin_lock.c: Likewise.
3810         * sysdeps/x86_64/tls.h: Likewise.  Define LOCK_PREFIX if not already
3811         defined.
3813         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Use
3814         DW_CFA_advance_loc2 for .Laddl-.Lsubl.
3815         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
3816         DW_CFA_advance_loc for .Laddl-.Lsubl.
3818 2003-04-13  Ulrich Drepper  <drepper@redhat.com>
3820         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Don't use
3821         position-independent unwind data for static libraries.
3822         Add missing unwind info.  Add comments.
3824         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Add unwind info.
3825         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3826         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
3827         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3829 2003-04-12  Ulrich Drepper  <drepper@redhat.com>
3831         * Makefile: Make sure all cancellation points are compiled with
3832         exception and asynchronous unwind tables.
3834         * sysdeps/x86_64/tls.h (THREAD_SETMEM): Word around compiler bug
3835         which mishandles loading of global object addresses in PIC.
3836         (THREAD_SETMEM_NC): Likewise.
3838 2003-04-11  Ulrich Drepper  <drepper@redhat.com>
3840         * pthread.h: Define new data structure for cleanup buffer.  Declare
3841         new cleanup handler interfaces.
3842         * descr.h: Include <unwind.h> if necessary.  Define pthread_unwind_buf.
3843         (struct pthread): Add cleanup_jmp_buf pointer.  Define
3844         HAVE_CLEANUP_JMP_BUF and not HAVE_CANCELBUF.
3845         * pthreadP.h: Declare __pthread_unwind.  Define __do_cancel to use
3846         it.  Declare old cleanup handler installation functions.
3847         * cleanup.c: Rewrite.  Install handler for unwind-based cleanup
3848         handling.
3849         * cleanup_defer.c: Likewise.
3850         * cleanup_compat.c: New file.  Old cleanup code.
3851         * cleanup_def_compat.c: New file.  Old cleanup code.
3852         * pthread_create.c (start_thread): Initialize cleanup_jmp_buf element
3853         if own thread descriptor.
3854         * unwind.c: New file.
3855         * forward.c: Add __pthread_unwind.
3856         * init.c (pthread_functions): Add __pthread_unwind.
3857         * sysdeps/pthread/pthread-functions.s (struct pthread_functions):
3858         Add ptr___pthread_unwind.
3859         * Versions [GLIBC_2.3.3] (libpthread): Export new cleanup handling
3860         and unwind function.
3861         * Makefile (libpthread-routines): Add cleanup_compat,
3862         cleanup_def_compat, and unwind.  Define CFLAGS to enable unwind
3863         table generation if necessary.
3864         * version.c: Record whether unwind support is compiled in.
3865         * sysdeps/pthread/configure.in: Add checks for unwind unterfaces.
3866         * sysdeps/pthread/bits/libc-lock.h: Add prototypes of the old cleanup
3867         handler interfaces.
3868         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add quite a bit of
3869         complication to generate unwind information for syscall wrappers.
3870         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
3871         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
3872         __cleanup_fct_attribute.
3874         * Makefile: Add rules to build and run tst-cleanup0.
3875         * tst-cleanup0.c: New file.
3876         * tst-cleanup0.expect: New file.
3878         * pthread_create.c (deallocate_tsd): Don't take parameter.  Adjust
3879         caller.  Optimize to avoid often unecessary local variable.
3881 2003-04-11  Roland McGrath  <roland@redhat.com>
3883         * Makefile ($(objpfx)multidir.mk): New target, generated makefile that
3884         sets variable `multidir'; include that.
3885         (generated): Add it.
3886         ($(objpfx)$(multidir)/crti.o): New target.
3887         [$(multidir) != .] (generated-dirs, extra-objs, omit-deps): Add it.
3889 2003-04-11  Ulrich Drepper  <drepper@redhat.com>
3891         * tst-attr2.c (do_test): Add cast to avoid warning.
3892         * tst-mutex4.c (do_test): Likewise.
3894 2003-04-10  Ulrich Drepper  <drepper@redhat.com>
3896         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset CPU clocks
3897         in child.
3899 2003-04-09  Ulrich Drepper  <drepper@redhat.com>
3901         * Makefile (tests): Add tst-detach1.
3902         * tst-detach1.c: New file.
3904 2003-04-08  Ulrich Drepper  <drepper@redhat.com>
3906         * sysdeps/pthread/pthread.h: Remove duplicate
3907         pthread_cleanup_{push,pop} definitions.
3909         * tst-barrier2.c: Eliminate warnings.
3910         * tst-cancel4.c: Likewise.
3911         * tst-cond4.c: Likewise.
3912         * tst-cond6.c: Likewise.
3913         * tst-detach1.c: Likewise.
3914         * tst-rwlock4.c: Likewise.
3915         * tst-rwlock6.c: Likewise.
3916         * tst-rwlock7.c: Likewise.
3917         * tst-sem3.c: Likewise.
3918         * tst-spin2.c: Likewise.
3919         * tst-umask1.c: Likewise.
3921 2003-04-07  Ulrich Drepper  <drepper@redhat.com>
3923         * pthread_detach.c (pthread_detach): Fix test for invalid TID.
3925 2003-04-06  Ulrich Drepper  <drepper@redhat.com>
3927         * descr.h (struct pthread): Move cancelhandling member to the front.
3929 2003-04-05  Ulrich Drepper  <drepper@redhat.com>
3931         * sysdeps/unix/sysv/linux/register-atfork.c: Define malloc_prepare,
3932         malloc_parent, and malloc_child statically.
3933         (__register_atfork_malloc): New function.
3934         (free_mem): Don't free any of the malloc_* variables on the list.
3935         * sysdeps/unix/sysv/linux/fork.h: Declare __register_atfork_malloc.
3936         Define HAVE_register_atfork_malloc.
3938 2003-04-04  Ulrich Drepper  <drepper@redhat.com>
3940         * sysdeps/pthread/createthread.c (create_thread): Add some more
3941         comments explaining when to set multiple_threads and when not.
3943         * pthreadP.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
3944         THREAD_ATOMIC_BIT_SET if not already defined.
3945         * sysdeps/i386/tls.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
3946         THREAD_ATOMIC_BIT_SET:
3947         * sysdeps/x86_64/tls.h: Likewise.
3948         * cleanup_defer.c (_pthread_cleanup_push_defer): Rewrite to use
3949         THREAD_ATOMIC_CMPXCHG_VAL.
3950         (_pthread_cleanup_pop_restore): Likewise.
3951         * cancellation.c (__pthread_enable_asynccancel): Likewise.
3952         (__pthread_enable_asynccancel_2): Likewise.
3953         (__pthread_disable_asynccancel): Likewise.
3954         * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
3955         (__libc_disable_asynccancel): Likewise.
3956         * init.c (sigcancel_handler): Likewise.
3957         * pthread_setcancelstate.c (__pthread_setcancelstate): Likewise.
3958         * pthread_setcanceltype.c (__pthread_setcanceltype): Likewise.
3960 2003-04-03  Ulrich Drepper  <drepper@redhat.com>
3962         * init.c (sigcancel_handler): Don't set EXITING_BIT here.
3963         * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
3964         * pthreadP.h (__do_cancel): Set EXITING_BIT here.
3965         * Makefile (tests): Add tst-cancel11.
3966         * tst-cancel11.c: New file.
3968 2003-04-01  Ulrich Drepper  <drepper@redhat.com>
3970         * pthread_create.c (deallocate_tsd): Clear/free memory after the last
3971         round, not the first.  Use specific_used flag instead of local
3972         found_nonzero variable.  Use THREAD_[SG]ETMEM where possible.
3973         (__free_tcb): Don't call deallocate_tsd here.
3974         (start_thread): Call deallocate_tsd here.
3975         * pthread_setspecific.c: Set specific_used flag really only when
3976         needed.
3977         * Makefile (tests): Add tst-tsd3.c and tst-tsd4.
3978         * tst-tsd3.c: New file.
3979         * tst-tsd4.c: New file.
3981 2003-03-31  Ulrich Drepper  <drepper@redhat.com>
3983         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_mutex_lock):
3984         Use atomic_exchange_and_add instead of __lll_add.
3985         (__lll_mutex_timedlock): Likewise.
3986         Patch by Ian Wienand.
3988 2003-03-24  Steven Munroe  <sjmunroe@us.ibm.com>
3990         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
3991         (SINGLE_THREAD_P): Fix typo.
3992         * tst-cancel-wrappers.sh: Handle '.'ed symbols.
3994 2003-03-31  Ulrich Drepper  <drepper@redhat.com>
3996         * Makefile (tests): Add tst-align.
3997         * tst-align.c: New file.
3998         * sysdeps/i386/Makefile: Define CFLAGS-tst-align.
4000         * sysdeps/i386/tls.h (CALL_THREAD_FCT): Align stack of called
4001         function correctly.
4003         * tst-tsd2.c: Add casts to avoid warnings.
4005 2003-03-30  Ulrich Drepper  <drepper@redhat.com>
4007         * descr.h (struct pthread): Move most often used elements to the front.
4009 2003-03-29  Ulrich Drepper  <drepper@redhat.com>
4011         * Makefile (libpthread-routines): Add pthread_atfork.
4012         (libpthread-static-only-routines): Add pthread_atfork.
4014 2003-03-28  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4016         * sysdeps/sh/tls.h: Include nptl/descr.h after the definition
4017         of TLS_DTV_AT_TP.
4018         (INSTALL_DTV): Add parens.
4019         (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
4020         Use passed descr instead of THREAD_SELF.
4021         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S
4022         (__lll_mutex_timedlock_wait): Correct expected value after
4023         spurious wakeup.
4024         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S:
4025         Release lock before waking up the waiters.
4026         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Correct exit
4027         criteria.  Reorderstruct passed to cleanup handler.  Fix
4028         handling of cancellation and failung pthread_mutex_unlock call.
4029         Use __pthread_enable_asynccancel_2 instead of
4030         __pthread_enable_asynccancel.
4031         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4032         Return result of lock re-get if it fails.
4033         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Fix wrong argument
4034         for __pthread_cleanup_push.
4035         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Fix
4036         completely broken rwlock implementation.
4037         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
4038         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
4039         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
4040         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
4041         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
4042         * sysdeps/unix/sysv/linux/sh/sem_post.S: Fix error value.  Use
4043         versioned_symbol macro.
4044         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Use versioned_symbol macro.
4045         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
4047 2003-03-27  Ulrich Drepper  <drepper@redhat.com>
4049         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Don't declare
4050         __timer_helper_thread.  Declare __start_helper_thread, __helper_once,
4051         and __helper_tid.
4052         (struct timer): Remove th and bar field.
4053         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Remove
4054         debugging code.  Create only one helper thread.
4055         * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Don't kill
4056         helper thread.
4057         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
4058         Renamed.  Define statically.  Use thread info from siginfo.
4059         (__helper_once): New variable.
4060         (__helper_tid): New variable.
4061         (__reset_helper_control): New function.
4062         (__start_helper_thread): New function.
4064         * pthread_create.c (start_thread): Don't use setjmp inside
4065         __builtin_expect to work around gcc bug.
4067         * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Even if
4068         timer_delete syscall fails, but not with ENOSYS, set
4069         __no_posix_timers.
4071         * sysdeps/unix/sysv/linux/timer_settime.c [!__ASSUME_POSIX_TIMERS]
4072         (timer_settime): Fix typo.
4073         * sysdeps/unix/sysv/linux/timer_getoverr.c
4074         [!__ASSUME_POSIX_TIMERS] (timer_getoverrun): Likewise.
4076 2003-03-27  Jakub Jelinek  <jakub@redhat.com>
4078         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Fix
4079         offset of cleanupbuf.__prev.
4081 2003-03-26  Jakub Jelinek  <jakub@redhat.com>
4083         * sysdeps/unix/sysv/linux/timer_getoverr.c: Fix typo in name
4084         of included file.
4086 2003-03-26  Ulrich Drepper  <drepper@redhat.com>
4088         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): If EVP ==
4089         NULL provide default definition to syscall.
4091 2003-03-25  Roland McGrath  <roland@redhat.com>
4093         * sysdeps/pthread/posix-timer.h (TIMER_MAX): Define if not defined.
4094         (timer_id2ptr): Fix typo.
4096 2003-03-25  Ulrich Drepper  <drepper@redhat.com>
4098         * pthreadP.h: Define SIGCANCEL and SIGTIMER.
4099         * sysdeps/i386/pthreaddef.h: Remove SIGCANCEL definition.
4100         * sysdeps/ia64/pthreaddef.h: Likewise.
4101         * sysdeps/powerpc/pthreaddef.h: Likewise.
4102         * sysdeps/s390/pthreaddef.h: Likewise.
4103         * sysdeps/sh/pthreaddef.h: Likewise.
4104         * sysdeps/x86_64/pthreaddef.h: Likewise.
4105         * init.c (__pthread_initialize_minimal): Block SIGTIMER.
4106         * sysdeps/pthread/sigaction.c: Also prevent SIGTIMER handler from
4107         being changed.
4108         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
4109         SIGTIMER is not unblocked.
4110         * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): One more
4111         RT signal taken.
4112         * sysdeps/unix/sysv/linux/pthread_kill.c: Do not allow SIGTIMER to
4113         be send.
4114         * sysdeps/pthread/posix-timer.h (timer_id2ptr, timer_ptr2id): Just
4115         pass pointer through as ID.
4116         * sysdeps/unix/sysv/linux/bits/local_lim.h (TIMER_MAX): Removed.
4117         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: New file.
4118         * sysdeps/unix/sysv/linux/timer_create.c: New file.
4119         * sysdeps/unix/sysv/linux/timer_delete.c: New file.
4120         * sysdeps/unix/sysv/linux/timer_getoverr.c: New file.
4121         * sysdeps/unix/sysv/linux/timer_gettime.c: New file.
4122         * sysdeps/unix/sysv/linux/timer_routines.c: New file.
4123         * sysdeps/unix/sysv/linux/timer_settime.c: New file.
4124         * sysdeps/unix/sysv/linux/ia64/Versions: New file.
4125         * sysdeps/unix/sysv/linux/ia64/timer_create.c: New file.
4126         * sysdeps/unix/sysv/linux/ia64/timer_delete.c: New file.
4127         * sysdeps/unix/sysv/linux/ia64/timer_getoverr.c: New file.
4128         * sysdeps/unix/sysv/linux/ia64/timer_gettime.c: New file.
4129         * sysdeps/unix/sysv/linux/ia64/timer_settime.c: New file.
4130         * sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions: New file.
4131         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_create.c: New file.
4132         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_delete.c: New file.
4133         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_getoverr.c: New file.
4134         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_gettime.c: New file.
4135         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_settime.c: New file.
4136         * sysdeps/unix/sysv/linux/s390/s390-64/Versions: New file.
4137         * sysdeps/unix/sysv/linux/s390/s390-64/timer_create.c: New file.
4138         * sysdeps/unix/sysv/linux/s390/s390-64/timer_delete.c: New file.
4139         * sysdeps/unix/sysv/linux/s390/s390-64/timer_getoverr.c: New file.
4140         * sysdeps/unix/sysv/linux/s390/s390-64/timer_gettime.c: New file.
4141         * sysdeps/unix/sysv/linux/s390/s390-64/timer_settime.c: New file.
4142         * sysdeps/unix/sysv/linux/x86_64/Versions: New file.
4143         * sysdeps/unix/sysv/linux/x86_64/compat-timer.h: New file.
4144         * sysdeps/unix/sysv/linux/x86_64/timer_create.c: New file.
4145         * sysdeps/unix/sysv/linux/x86_64/timer_delete.c: New file.
4146         * sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c: New file.
4147         * sysdeps/unix/sysv/linux/x86_64/timer_gettime.c: New file.
4148         * sysdeps/unix/sysv/linux/x86_64/timer_settime.c: New file.
4150         * pthreadP.h: Remove FRAME_LEFT definition.
4151         * cleanup.c (_pthread_cleanup_push): Don't check for reference to
4152         already left frame.  Programs which have this problem are not POSIX
4153         compliant.
4154         * cleanup_defer.c (_pthread_cleanup_push_defer): Likewise.
4156 2003-03-24  Ulrich Drepper  <drepper@redhat.com>
4158         * sysdeps/pthread/tst-timer.c: Check return values of the
4159         functions we test.
4161 2003-03-23  Roland McGrath  <roland@redhat.com>
4163         * tst-tls3.c (do_test) [! HAVE___THREAD]: Don't test anything.
4164         * tst-tls3mod.c: Likewise.
4165         * tst-tls1.c: Likewise.
4166         * tst-tls2.c: Likewise.
4168         * tst-mutex5.c (do_test): Unlock before destroy, otherwise we invoke
4169         undefined behavior.
4171         * tst-join5.c (tf1, tf2): Add a cast.
4173         * Makeconfig (includes): Append -I$(..)nptl to this variable.
4175         * tst-barrier2.c (do_test) [! _POSIX_THREAD_PROCESS_SHARED]:
4176         Don't test anything.
4177         * tst-cond4.c: Likewise.
4178         * tst-cond6.c: Likewise.
4179         * tst-flock2.c: Likewise.
4180         * tst-mutex4.c: Likewise.
4181         * tst-rwlock4.c: Likewise.
4182         * tst-signal1.c: Likewise.
4183         * tst-spin2.c: Likewise.
4184         * tst-cond11.c [! _POSIX_CLOCK_SELECTION]: Likewise.
4186         * tst-mutex4.c: Use test-skeleton.c.
4187         * tst-spin2.c: Likewise.
4188         * tst-sysconf.c: Likewise.
4189         * tst-barrier2.c: Likewise.
4190         * tst-cond4.c: Likewise.
4191         * tst-cond6.c: Likewise.
4192         * tst-rwlock4.c: Likewise.
4193         * tst-unload.c: Likewise.
4194         * tst-flock2.c (do_test): Use return instead of exit.
4196 2003-03-22  Jakub Jelinek  <jakub@redhat.com>
4198         * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
4200 2003-03-21  Ulrich Drepper  <drepper@redhat.com>
4202         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
4203         (__lll_mutex_trylock): Use atomic_compare_and_exchange_val_acq
4204         instead of __lll_compare_and_swap.
4205         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
4206         Likewise.
4207         Removed definition if __lll_compare_and_swap.
4209         * cancellation.c: Adjust for new form of compare&exchange macros.
4210         * cleanup_defer.c: Likewise.
4211         * init.c: Likewise.
4212         * libc-cancellation.c: Likewise.
4213         * old_pthread_cond_broadcast.c: Likewise.
4214         * old_pthread_cond_signal.c: Likewise.
4215         * old_pthread_cond_timedwait.c: Likewise.
4216         * old_pthread_cond_wait.c: Likewise.
4217         * pthread_cancel.c: Likewise.
4218         * pthread_create.c: Likewise.
4219         * pthread_detach.c: Likewise.
4220         * pthread_join.c: Likewise.
4221         * pthread_key_delete.c: Likewise.
4222         * pthread_setcancelstate.c: Likewise.
4223         * pthread_setcanceltype.c: Likewise.
4224         * pthread_timedjoin.c: Likewise.
4225         * pthread_tryjoin.c: Likewise.
4226         * sysdeps/pthread/createthread.c: Likewise.
4228 2003-03-20  Ulrich Drepper  <drepper@redhat.com>
4230         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Include <atomic.h>.
4231         Remove __lll_add, __lll_dec_if_positive, and __lll_test_and_set
4232         definitions.  Replace uses with calls to atomic_* functions.
4233         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
4234         * sysdeps/unix/sysv/linux/lowlevellock.c: Replace __lll_add and
4235         __lll_test_and_set calls with atomic_exchange_and_add and
4236         atomic_exchange calls respectively.
4237         * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
4238         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
4239         * sysdeps/unix/sysv/linux/sem_trywait.c: Likewise.
4240         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
4241         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Likewise.
4242         * sysdeps/unix/sysv/linux/ia64/sem_port.c: Likewise.
4243         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
4245         * allocatestack.c (allocate_stack): Assume atomic_exchange_and_add
4246         returns the old value.
4248 2003-03-20  Martin Schwidefsky  <sky@mschwid3.boeblingen.de.ibm.com>
4250         * sysdeps/s390/pthread_spin_lock.c (pthread_spin_lock): Use type
4251         int for variable OLDVAL and correct inline assembler contraint.
4252         * sysdeps/s390/pthread_spin_trylock.c (pthread_spin_trylock): Use
4253         type int for variable OLD.
4255         * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it
4256         only for s390-32.
4257         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
4258         (SINGLE_THREAD_P): Use global variable __local_multiple_threads
4259         instead of multiple_threads field in the TCB.
4261 2003-03-19  Ulrich Drepper  <drepper@redhat.com>
4263         * sysdeps/i386/i686/bits/atomic.h: Removed.
4264         * sysdeps/i386/i586/bits/atomic.h: Removed.
4265         * sysdeps/i386/i486/bits/atomic.h: Removed.  Moved to glibc.
4266         * sysdeps/x86_64/bits/atomic.h: Removed.  Moved to glibc.
4267         * sysdeps/s390/bits/atomic.h: Removed.  Moved to glibc.
4268         * sysdeps/sh/bits/atomic.h: Removed.  Moved to glibc.
4269         * sysdeps/ia64/bits/atomic.h: Removed.  Moved to glibc.
4270         * sysdeps/powerpc/bits/atomic.h: Removed.  Moved to glibc.
4271         * atomic.h: Removed.  Moved to glibc.
4273         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Add
4274         support for clock selection.
4276         * sysdeps/pthread/pthread_cond_broadcast.c: Release lock before
4277         signalling waiters.
4279 2003-03-18  Roland McGrath  <roland@redhat.com>
4281         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
4282         Add __lll_rel_instr first.  Add memory clobber.
4283         (lll_mutex_unlock): Use __lll_test_and_set.
4284         From Paul Mackerras <paulus@samba.org>.
4286         * sysdeps/powerpc/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define
4287         unconditionally.
4288         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
4289         (SINGLE_THREAD_P):  Add `header.' prefix.
4290         From Paul Mackerras <paulus@samba.org>.
4292         * Versions (libpthread: GLIBC_2.3.2): Move pthread_tryjoin_np and
4293         pthread_timedjoin_np to ...
4294         (libpthread: GLIBC_2.3.3): ... here.
4295         (libpthread: GLIBC_2.2): Move pthread_barrierattr_getpshared there too.
4297         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
4298         Avoid shadowing VAL variable.
4300         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
4301         New macro.
4303 2003-03-18  Ulrich Drepper  <drepper@redhat.com>
4305         * Makefile (tests): Add tst-cond11.
4306         * tst-cond11.c: New file.
4308         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Reorder
4309         struct passed to cleanup handler to eliminate one more
4310         instruction.
4311         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4313         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
4314         (pthrad_cond_t): Replace __unused field with __clock.
4316         * sysdeps/pthread/pthread_cond_wait.c: Release condvar lock before
4317         waken all waiters in cleanup handler.
4318         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4319         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
4321         * pthread_condattr_getclock.c: New file.
4322         * pthread_condattr_setclock.c: New file.
4323         * sysdeps/pthread/pthread.h: Declare these new functions.
4324         * Versions [GLIBC_2.3.3] (libpthread): Add the new functions.
4325         * Makefile (libpthread-routines): Add the new functions.
4326         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_condattr):
4327         Renamed field to value.  Document use of the bits.
4328         * pthread_condattr_getpshared.c: Adjust for struct pthread_condattr
4329         change.
4330         * pthread_condattr_setpshared.c: Likewise.
4331         * pthread_cond_init.c (__pthread_cond_init): Initialized __clock field.
4332         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add cond_clock symbol.
4333         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
4334         Add __clock field.
4335         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4336         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4337         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4338         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4339         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
4340         Implement clock selection.
4341         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
4342         * pthread-errnos.sym: Add ENOSYS.
4343         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
4344         _POSIX_CLOCK_SELECTION.
4345         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
4347         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Remove
4348         invalid .size directive.
4350 2003-03-17  Roland McGrath  <roland@redhat.com>
4352         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
4353         Formatting tweaks.
4355 2003-03-17  Ulrich Drepper  <drepper@redhat.com>
4357         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Use __builtin_expect.
4358         Use __lll_add instead of spelling it out.  Use protected symbol names.
4359         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Use __builtin_expect.
4360         Use __lll_add.
4361         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_compare_and_swap):
4362         Renamed from lll_compare_and_swap.  Use new name where necessary.
4363         (__lll_add): Defined.
4364         (__lll_dec_if_positive): Defined.
4365         (__lll_test_and_set): Defined.
4366         * sysdeps/ia64/pthread_spin_init.c: Removed.
4367         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Removed.
4368         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Removed.
4369         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Removed.
4370         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Removed.
4371         * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: Removed.
4372         * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: Removed.
4373         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Removed.
4374         * sysdeps/ia64/bits/atomic.h: Add __builtin_expect where appropriate.
4375         * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
4376         __sync_lock_release_si.
4377         Patch by Jakub Jelinek.
4379         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
4380         Fix timeout handling.
4381         (__lll_timedwait_tid): Likewise.
4382         (lll_unlock_wake_cb): Wake up other waiters if necessary.
4383         Patch by Jakub Jelinek.
4385         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Pretty printing.
4387 2003-03-17  Roland McGrath  <roland@redhat.com>
4389         PowerPC port contributed by Paul Mackerras <paulus@samba.org>.
4390         * sysdeps/pthread/pthread_spin_init.c: New file.
4391         * sysdeps/pthread/pthread_spin_unlock.c: New file.
4392         * sysdeps/powerpc/Makefile: New file.
4393         * sysdeps/powerpc/pthread_spin_lock.c: New file.
4394         * sysdeps/powerpc/pthread_spin_trylock.c: New file.
4395         * sysdeps/powerpc/pthreaddef.h: New file.
4396         * sysdeps/powerpc/tcb-offsets.sym: New file.
4397         * sysdeps/powerpc/td_ta_map_lwp2thr.c: New file.
4398         * sysdeps/powerpc/tls.h: New file.
4399         * sysdeps/powerpc/bits/atomic.h: New file.
4400         * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: New file.
4401         * sysdeps/unix/sysv/linux/libc-lowlevellock.c: New file.
4402         * sysdeps/unix/sysv/linux/lowlevellock.c: New file.
4404         * sysdeps/unix/sysv/linux/lowlevelmutex.c: New file.
4405         * sysdeps/unix/sysv/linux/sem_post.c: New file.
4406         * sysdeps/unix/sysv/linux/sem_timedwait.c: New file.
4407         * sysdeps/unix/sysv/linux/sem_trywait.c: New file.
4408         * sysdeps/unix/sysv/linux/sem_wait.c: New file.
4409         * sysdeps/unix/sysv/linux/powerpc/Makefile: New file.
4410         * sysdeps/unix/sysv/linux/powerpc/createthread.c: New file.
4411         * sysdeps/unix/sysv/linux/powerpc/fork.c: New file.
4412         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: New file.
4413         * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: New file.
4414         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: New file.
4415         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: New file.
4416         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: New file.
4417         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
4418         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New file.
4420         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Use __gettimeofday,
4421         not gettimeofday.
4422         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Likewise.
4423         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
4424         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Likewise.
4425         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Likewise.
4426         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
4428 2003-03-17  Ulrich Drepper  <drepper@redhat.com>
4430         * sysdeps/pthread/pthread_cond_wait.c: Correct exit criteria.
4431         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
4432         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4433         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
4434         Patch by Ewald Snel <ewald@rambo.its.tudelft.nl>.
4436 2003-03-16  Roland McGrath  <roland@redhat.com>
4438         * tst-fork4.c: Include <string.h>.
4439         * tst-signal2.c: Likewise.
4440         * tst-mutex5.c (do_test): exit -> return.
4441         * tst-mutex2.c: Include <stdlib.h>.
4443 2003-03-16  Ulrich Drepper  <drepper@redhat.com>
4445         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
4446         (__lll_mutex_timedlock_wait): Correct expected value after
4447         spurious wakeup.  Otherwise we would never wait again.
4449         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Work around red
4450         zone versus inline asm stupidity.  Use correct instructions.
4452         * tst-rwlock6.c: Add some more status output.
4454 2003-03-15  Roland McGrath  <roland@redhat.com>
4456         * sysdeps/pthread/configure.in: New file.
4457         * sysdeps/pthread/configure: New file (generated).
4459 2003-03-15  Ulrich Drepper  <drepper@redhat.com>
4461         * allocatestack.c (allocate_stack): Store the exact stack size of
4462         user allocated stacks.
4464 2003-03-15  Jakub Jelinek  <jakub@redhat.com>
4466         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
4467         (SINGLE_THREAD): Use `header' prefix instead of `header.data'.
4468         * sysdeps/sh/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
4469         * sysdeps/sh/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define.
4470         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
4471         Use `header.' prefix.
4472         * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
4474 2003-03-15  Ulrich Drepper  <drepper@redhat.com>
4476         * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Don't use
4477         __builtin_frame_address, use stack pointer.
4479         * sysdeps/unix/sysv/linux/jmp-unwind.c: Use CURRENT_STACK_FRAME
4480         instead of __builtin_frame_pointer.
4482 2003-03-14  Ulrich Drepper  <drepper@redhat.com>
4484         * tst-basic1.c (do_test): Add cast to avoid warning.
4485         * tst-basic2.c (do_test): Likewise.
4487         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use correct
4488         amount of stack correction.
4490         * tst-fork4.c: Use test-skeleton.c.
4492 2003-03-14  Roland McGrath  <roland@redhat.com>
4494         * init.c: Fix typo "#eli" for "#else".
4496 2003-03-14  Steven Munroe  <sjmunroe@us.ibm.com>
4498         * allocatestack.c (__stack_user): Use hidden_data_def.
4499         * pthread_create.c (__pthread_keys): Likewise.
4501         * init.c [__powerpc__] (__NR_set_tid_address): Define it.
4503 2003-03-14  Roland McGrath  <roland@redhat.com>
4505         * tst-fork4.c: New file.
4506         * Makefile (tests): Add it.
4508         * descr.h (struct pthread): Move the union out of [!TLS_DTV_AT_TP], so
4509         we always define the padding space.
4510         [!TLS_DTV_AT_TP]: Give tcbhead_t field a name, `header', since GCC
4511         stopped supporting its own extensions fully.
4512         [TLS_MULTIPLE_THREADS_IN_TCB]: Put `multiple_threads' inside a wrapper
4513         struct also called `header', so `header.multiple_threads' is the field
4514         name to use on all machines.
4515         * allocatestack.c (allocate_stack): Use `header.' prefix.
4516         * sysdeps/pthread/createthread.c (create_thread): Likewise.
4517         * pthread_create.c (__pthread_create_2_1): Likewise.
4518         * sysdeps/i386/tls.h (INSTALL_NEW_DTV, THREAD_DTV): Likewise.
4519         (THREAD_SELF): Likewise.
4520         * sysdeps/x86_64/tls.h: Likewise.
4521         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
4522         (SINGLE_THREAD_P): Likewise.
4523         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
4524         (SINGLE_THREAD_P): Likewise.
4525         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
4526         (SINGLE_THREAD_P): Likewise.
4528         * sysdeps/s390/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Use REGS[18]
4529         value directly.
4531 2003-03-14  Ulrich Drepper  <drepper@redhat.com>
4533         * pthread_create.c (start_thread): Use CALL_THREAD_FCT if defined.
4534         * sysdeps/i386/tls.h: Define CALL_THREAD_FCT.
4536         * pthread_create.c (start_thread): setjmp is expected to return 0.
4538         * sysdeps/x86_64/tls.h (THREAD_GETMEM): Mark asms volatile.
4539         (THREAD_GETMEM_NC): Likewise.
4541 2003-03-13  Ulrich Drepper  <drepper@redhat.com>
4543         * allocatestack.c (allocate_stack): If MULTI_PAGE_ALIASING is defined
4544         and the size of the stack which must be allocated is a multiple,
4545         allocate one more page.
4546         * sysdeps/i386/i686/Makefile: Don't define COLORING_INCREMENT, but
4547         MULTI_PAGE_ALIASING.
4549 2003-03-13  Roland McGrath  <roland@redhat.com>
4551         * pthread_create.c (start_thread): Set EXITING_BIT after the
4552         event-reporting (and destructors), not before.
4554 2003-03-13  Jakub Jelinek  <jakub@redhat.com>
4556         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_timed_wait,
4557         lll_futex_wake): Declare register variables as long int instead of
4558         unsigned long int.  Patch by Ian Wienand <ianw@gelato.unsw.edu.au>.
4559         Make syscall arguments clobbered by the syscall.
4560         (lll_futex_wait): Define using lll_futex_timed_wait.
4562         * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Cast regs[13]
4563         to void *.
4565         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Only declare and set
4566         PPID if [! NDEBUG].
4568         * allocatestack.c (nptl_ncreated): Only declare if
4569         COLORING_INCREMENT != 0.
4571         * pthreadP.h (__pthread_enable_asynccancel_2): New prototype.
4572         (__libc_enable_asynccancel_2): Remove prototype.
4574         * sysdeps/unix/sysv/linux/ia64/fork.c (ARCH_FORK): Swap ptid and
4575         ctid to match kernel.
4577 2003-03-12  Ulrich Drepper  <drepper@redhat.com>
4579         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add
4580         libc_multiple_threads.
4581         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Move definition of
4582         __libc_multiple_threads to...
4583         * sysdeps/unix/sysv/linux/libc_multiple_threads.c: ...here.  New file.
4585         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Remove unnecessary
4586         versioning.
4587         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
4588         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
4590         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
4591         (__pthread_once_internal): Define.
4593         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Use shlib-compat.h
4594         macros instead of .symver directly.
4595         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
4596         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
4598         * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Include tcb-offsets.h.
4599         * sysdeps/x86_64/tcb-offsets.sym: New file.
4600         * sysdeps/x86_64/Makefile: New file.
4602         * sysdeps/i386/tcb-offsets.sym: Add SELF.
4603         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use SELF
4604         to access own pthread_t in TCB.
4605         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
4606         Likewise.
4607         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
4608         Likewise.
4609         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
4611 2003-03-12  Roland McGrath  <roland@redhat.com>
4613         * pthread-errnos.sym: New file.
4614         * Makefile (gen-as-const-headers): New variable, list that file.
4615         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include generated
4616         header <pthread-errnos.h> instead of defining errno values here.
4617         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
4618         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
4619         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
4620         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
4621         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
4622         Likewise.
4623         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
4624         Likewise.
4625         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
4626         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4627         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
4628         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
4629         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
4630         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
4631         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
4632         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
4633         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4634         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
4635         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
4636         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
4637         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
4638         * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
4639         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
4640         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
4641         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
4642         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
4643         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4644         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
4645         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
4646         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
4647         * sysdeps/i386/i486/pthread_spin_trylock.S: Likewise.
4648         * sysdeps/x86_64/pthread_spin_trylock.S: Likewise.
4649         * sysdeps/sh/pthread_spin_trylock.S: Likewise.
4650         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
4651         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
4653         * sysdeps/unix/sysv/linux/fork.c: Add an assert to check that
4654         CLONE_CHILD_SETTID worked.
4656 2003-03-12  Ulrich Drepper  <drepper@redhat.com>
4658         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: New
4659         file.
4660         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S: New
4661         file.
4663         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
4664         (pthread_cond_t): Add padding.
4666         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: New file.
4667         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: New file.
4668         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: New file.
4670         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
4671         (__pthread_rwlock_timedwrlock): Add missing opcode suffix.
4672         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
4673         (__pthread_rwlock_timedrdlock): Likewise.
4674         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
4675         (__pthread_rwlock_wrlock): Likewise.
4676         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
4677         (__pthread_rwlock_rdlock): Likewise.
4679         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: New file.
4681         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Return
4682         result of lock re-get if it fails.
4684 2003-03-11  Ulrich Drepper  <drepper@redhat.com>
4686         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Fix asm syntax.
4687         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
4688         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
4689         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
4690         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4691         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
4692         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
4693         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
4694         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
4695         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
4697         * sysdeps/x86_64/tls.h (THREAD_SELF, THREAD_GETMEM, THREAD_GETMEM_NC,
4698         THREAD_SETMEM, THREAD_SETMEM_NC): Correct asm syntax.
4700         * allocatestack.c [! TLS_MULTIPLE_THREADS_IN_TCB] (allocate_stack):
4701         Initialize *__libc_multiple_threads_ptr not __libc_multiple_threads.
4702         * sysdeps/pthread/createthread.c [! TLS_MULTIPLE_THREADS_IN_TCB]
4703         (create_thread): Likewise.
4704         Define __pthread_multiple_threads and __libc_multiple_threads_ptr.
4705         * init.c (__pthread_initialize_minimal_internal): Initialize
4706         __libc_multiple_threads_ptr if necessary.
4707         * pthreadP.h: Adjust prototype for __libc_pthread_init.  Declare
4708         __pthread_multiple_threads and __libc_multiple_threads_ptr.
4709         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Define
4710         __libc_multiple_threads.
4711         (__libc_pthread_init): Return pointer to __libc_pthread_init if
4712         necessary.
4714         * sysdeps/i386/tls.h (THREAD_SETMEM): Fix one-byte variant.
4715         (THREAD_SETMEM_NC): Likewise.
4717         * sysdeps/x86_64/pthread_spin_trylock.c: Removed.
4718         * sysdeps/x86_64/pthread_spin_trylock.S: New file.
4719         * sysdeps/x86_64/pthread_spin_unlock.c: Removed.
4720         * sysdeps/x86_64/pthread_spin_unlock.S: New file.
4722         * sysdeps/i386/i486/pthread_spin_trylock.S (pthread_spin_trylock):
4723         Eliminate one entire instruction.
4725         * cancellation.c (__pthread_enable_asynccancel_2): New function.
4726         * pthreadP.h: Declare __pthread_enable_asynccancel_2.
4727         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4728         (__pthread_cond_timedwait): Use __pthread_enable_asynccancel_2
4729         instead of __pthread_enable_asynccancel.
4730         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
4731         (__pthread_cond_wait): Likewise.
4732         * sysdeps/pthread/pthread_cond_timedwait.c
4733         (__pthread_cond_timedwait): Likewise.
4734         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
4736         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
4737         (__condvar_cleanup): Wake up all waiters in case we got signaled
4738         after being woken up but before disabling asynchronous
4739         cancellation.
4740         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
4741         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
4742         (__condvar_cleanup): Likewise.
4744         * init.c (__NR_set_tid_address): If already defined, don't redefine.
4745         Make it an error if architecture has no #if case.  Add x86-64.
4747         * sysdeps/unix/sysv/linux/x86_64/Makefile: Add flags for
4748         pt-initfini.s generation.
4750         * sysdeps/x86_64/tls.h: Include <asm/prctl.h>.
4751         (TLS_INIT_TP): Fix typo.
4753 2003-03-11  Jakub Jelinek  <jakub@redhat.com>
4755         * sysdeps/ia64/bits/atomic.h (atomic_exchange_and_add): Swap 2nd and
4756         3rd argument of __arch_compare_and_exchange_{32,64}_val_acq.
4758         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Include semaphore.h.
4759         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
4760         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Likewise.
4761         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Likewise.
4762         * sysdeps/unix/sysv/linux/s390/sem_post.c: Likewise.
4763         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
4764         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
4765         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
4767 2003-03-11  Ulrich Drepper  <drepper@redhat.com>
4769         * sysdeps/pthread/pthread_cond_timedwait.c
4770         (__pthread_cond_timedwait): Return the result of the final
4771         locking.  If it succeeds, the regular function return value.
4773         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait):
4774         Return result of the final locking.
4775         * version.c (__nptl_main): Work around problems with the strange
4776         INTERNAL_SYSCALL macro on ppc32.
4777         * init.c (__pthread_initialize_minimal_internal): Unblock
4778         SIGCANCEL in case the parent blocked it.
4779         Reported by Paul Mackerras <paulus@samba.org>.
4781         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: New file.
4782         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: New file.
4783         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: New file.
4785 2003-03-11  Jakub Jelinek  <jakub@redhat.com>
4787         * sysdeps/pthread/pthread_cond_timedwait.c
4788         (__pthread_cond_timedwait): Unlock and fail if
4789         __pthread_mutex_unlock_internal failed.
4791         * sysdeps/pthread/createthread.c (ARCH_CLONE): Define if not defined.
4792         (create_thread): Only assert PD->tcb != NULL under [TLS_TCB_AT_TP].
4793         Use ARCH_CLONE.
4794         * allocatestack.c (ALLOCATE_STACK_PARMS): New macro.
4795         [NEED_SEPARATE_REGISTER_STACK] (STACK_VARIABLES,
4796         STACK_VARIABLES_ARGS, STACK_VARIABLES_PARMS, ALLOCATE_STACK_PARMS,
4797         ALLOCATE_STACK): New macros.
4798         (TLS_TPADJ): New macro.
4799         (get_cached_stack, queue_stack, __deallocate_stack): Use TLS_TPADJ.
4800         (allocate_stack): Handle TLS_DTV_AT_TP and
4801         NEED_SEPARATE_REGISTER_STACK.  Use TLS_TPADJ.
4802         * pthread_create.c (__pthread_create_2_1) [! TLS_TCB_AT_TP]:
4803         Don't set PD->self.
4804         * init.c [__ia64__] (__NR_set_tid_address): Define.
4806         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: New file.
4807         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: New file.
4808         * sysdeps/unix/sysv/linux/ia64/fork.c: New file.
4809         * sysdeps/unix/sysv/linux/ia64/createthread.c: New file.
4810         * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: New file.
4811         * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: New file.
4812         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: New file.
4813         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: New file.
4814         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: New file.
4815         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
4816         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: New file.
4817         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: New file.
4818         * sysdeps/unix/sysv/linux/ia64/sem_post.c: New file.
4819         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: New file.
4820         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: New file.
4821         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: New file.
4822         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
4823         * sysdeps/ia64/bits/atomic.h: New file.
4824         * sysdeps/ia64/Makefile: New file.
4825         * sysdeps/ia64/pthread_spin_init.c: New file.
4826         * sysdeps/ia64/pthread_spin_lock.c: New file.
4827         * sysdeps/ia64/pthread_spin_trylock.c: New file.
4828         * sysdeps/ia64/pthread_spin_unlock.c: New file.
4829         * sysdeps/ia64/pthreaddef.h: New file.
4830         * sysdeps/ia64/tcb-offsets.sym: New file.
4831         * sysdeps/ia64/td_ta_map_lwp2thr.c: New file.
4832         * sysdeps/ia64/tls.h: New file.
4834         * sysdeps/s390/pthreaddef.h (__exit_thread_inline): Pass 1 argument
4835         to syscall instead of no arguments.
4837 2003-03-10  Ulrich Drepper  <drepper@redhat.com>
4839         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: New file.
4840         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: New file.
4841         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: New file.
4842         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: New file.
4844         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Fix error value in
4845         unused code.
4847         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: New file
4849         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
4850         lowlevelbarrier.sym.
4851         * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: New file.
4852         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S:
4853         Include lowlevelbarrier.h and don't define offsets locally.
4854         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Likewise.
4856         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
4857         (__lll_mutex_lock_wait): Reverse order of first two parameters.
4858         (__lll_mutex_timedlock_wait): Likewise.
4859         (lll_mutex_lock): Adjust asm for that.
4860         (lll_mutex_timedlock): Likewise.  Mark cx, cc, r10 as clobbered.
4861         (lll_lock): Adjust asm for operand order change.
4862         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: New file.
4863         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: New file.
4865         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_lock_wait):
4866         Reverse order of parameters.
4867         (__lll_timedwait_tid): Remove regparms attribute.
4868         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: New file.
4869         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: New file.
4871         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
4872         (__lll_timedwait_tid): Remove one unnecessary instruction.
4874         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Define
4875         __lll_mutex_timedlock_wait only for NOT_IN_libc.
4876         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Include
4877         lowlevelmutex.S.
4879         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
4880         lll_unlock_wake_cb, __lll_wait_tid, and __lll_timedwait_tid only
4881         for NOT_IN_libc.
4882         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Include
4883         lowlevellock.S.
4885         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Don't define
4886         LOCK is already defined.  Don't define __lll_mutex_timedlock_wait
4887         for libc.so.
4888         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Only
4889         define LOCK here (if UP is not defined).  The actual code is in
4890         lowlevelmutex.S.
4892         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Don't define
4893         LOCK is already defined.  Don't define lll_unlock_wake_cb and
4894         __lll_timedwait_tid for libc.so.
4895         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Only
4896         define LOCK here (if UP is not defined).  The actual code is in
4897         lowlevellock.S.
4899         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Not needed anymore.
4900         * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: Likewise.
4901         * sysdeps/unix/sysv/linux/s390/sem_post.c: Include lowlevellock.h
4902         instead of lowlevelsem.h.
4903         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
4904         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
4905         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
4907         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
4908         lowlevelrwlock.sym.
4909         * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: New file.
4910         * sysdeps/unix/sysv/linux/i386/lowlevelrwlock.h: Removed.
4911         * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: Removed.
4913         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_trylock): Fix
4914         register loading.
4915         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_trylock): Undo
4916         last changed.  D'oh.
4918         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: New file.
4920         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove declaration
4921         of __libc_locking_needed.
4922         (lll_trylock): Initialize %eax to zero.
4924         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Update
4925         pthread_cond_t definition.
4927 2003-03-10  Roland McGrath  <roland@redhat.com>
4929         * sysdeps/unix/sysv/linux/lowlevelcond.sym: New file.
4930         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add it.
4931         * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: File removed.
4932         * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: Likewise.
4933         * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: Likewise.
4935         * allocatestack.c (allocate_stack) [!TLS_MULTIPLE_THREADS_IN_TCB]:
4936         Instead of setting PD->multiple_threads, set globals
4937         __pthread_multiple_threads and __libc_multiple_threads.
4938         * sysdeps/pthread/createthread.c (create_thread): Likewise.
4939         * sysdeps/i386/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it.
4940         * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Likewise.
4942         * descr.h (struct pthread): Conditionalize first member on
4943         [!TLS_DTV_AT_TP].  Replace the `header' member with an anonymous union
4944         containing an anonymous tcbhead_t.  Move `list' member out.
4945         [TLS_MULTIPLE_THREADS_IN_TCB]: Define a `multiple_threads' member.
4946         * allocatestack.c: Remove use of `header.data.' prefix.
4947         * pthread_create.c: Likewise.
4948         * init.c (__pthread_initialize_minimal_internal): Likewise.
4949         * sysdeps/pthread/createthread.c (create_thread): Likewise.
4950         * sysdeps/i386/tls.h (INSTALL_DTV): Add parens.
4951         (THREAD_SELF, THREAD_DTV, INSTALL_NEW_DTV): No `header.data.' prefix.
4952         * sysdeps/x86_64/tls.h: Likewise.
4953         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
4954         (SINGLE_THREAD_P): Likewise.
4955         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
4956         (SINGLE_THREAD_P): Likewise.
4957         * sysdeps/i386/tls.h (tcbhead_t): Remove `list' member.
4958         * sysdeps/s390/tls.h (tcbhead_t): Likewise.
4960 2003-03-09  Ulrich Drepper  <drepper@redhat.com>
4962         * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: New file.
4964         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
4965         * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
4967         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix many
4968         leftovers from the ia32 code.
4970         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Remove unneccessary
4971         memory load.
4972         (clear_once_control): Don't load %esi.
4974         * sysdeps/x86_64/tls.h: Remove all traces of segment descriptor
4975         handling.
4977         * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
4979         * sysdeps/unix/sysv/linux/s390/createthread.c: Moved to...
4980         * sysdeps/unix/sysv/linux/createthread.c: ...here.
4982         * Makefile (tests): Add tst-cond10.
4983         * tst-cond10.c: New file.
4985 2003-03-08  Ulrich Drepper  <drepper@redhat.com>
4987         * tst-tls2.c (do_test): Add TEMP_FAILURE_RETRY around sem_wait call.
4988         * tst-signal3.c (do_test): Likewise.
4989         * tst-sem5.c (do_test): Likewise.
4990         * tst-kill6.c (do_test): Likewise.
4991         * tst-tls3.c (do_test): Likewise.  Include <errno.h>.
4993         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use add/sub instead
4994         of inc/dec.
4995         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
4996         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise
4997         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
4998         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
4999         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
5000         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
5001         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
5002         Likewise.
5003         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
5004         Likewise.
5005         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
5006         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
5007         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5008         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
5009         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
5010         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
5011         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
5012         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
5014         * allocatestack.c (allocate_stack): If mprotect() fails free the
5015         TLS memory.
5017 2003-03-07  Ulrich Drepper  <drepper@redhat.com>
5019         * sysdeps/i386/i486/bits/atomic.h: Fix a few unused definitions.
5021         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove all trace of
5022         lll_wake_tid.  This was used only to work around kernel limits in
5023         the early days.
5024         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
5025         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Likewise.
5026         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
5027         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
5029         * init.c (__static_tls_align_m1): Renamed from __static_tls_align.
5030         (__pthread_initialize_minimal_internal): Change initialization of
5031         __static_tls_align_m1 appropriately.
5032         * pthreadP.h (__static_tls_align_m1): Renamed from
5033         __static_tls_align.
5034         * allocatestack.c (allocate_stack): Use __static_tls_align_m1
5035         instead of __static_tls_align-1.
5037 2003-03-04  Ulrich Drepper  <drepper@redhat.com>
5039         * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
5041         * pthread_create.c: Define __pthread_keys using nocommon
5042         attribute, not by placing it explicitly in bss.
5043         Remove DEFINE_DEALLOC definition.  Not needed anymore.
5045         * allocatestack.c: Define ARCH_MAP_FLAGS if not already defined.
5046         Use it in mmap call to allocate stacks.
5048         * sysdeps/pthread/createthread.c (create_thread): Fix comment.
5050         * pthread_create.c (start_thread): Use THREAD_SETMEM to store
5051         result of the thread function.
5053 2003-03-03  Ulrich Drepper  <drepper@redhat.com>
5055         * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: Removed.  The generic
5056         version is just fine.
5058         * sysdeps/unix/sysv/linux/libc_pthread_init.c
5059         (__pthread_child_handler): Renamed from pthread_child_handler,
5060         exported, and marked hidden.  Change all users.
5061         * sysdeps/unix/sysv/linux/register-atfork.c (free_mem): Do not
5062         free __pthread_child_handler from child list.
5064 2003-03-03  Martin Schwidefsky  <schwidefsky@de.ibm.com>
5066         * atomic.h (atomic_exchange_and_add): Return newval, not oldval.
5068         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
5069         Fix handling of cancellation and failing pthread_mutex_unlock call.
5070         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
5071         (__pthread_cond_wait): Likewise.
5073         * sysdeps/pthread/pthread_rwlock_timedrdlock.c
5074         (pthread_rwlock_timedrdlock): Fix clobber of result variable by
5075         lll_futex_timed_wait call.
5076         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
5077         (pthread_rwlock_timedwrlock): Likewise.
5079         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
5080         Don't define lll_unlock_wake_cb and ___lll_timedwait_tid in libc.so.
5081         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Remove XXX comments.
5083         * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Fix
5084         check of lll_futex_wake return value.
5086 2003-03-03  Roland McGrath  <roland@redhat.com>
5088         * forward.c: Fix typo in __pthread_attr_init_2_0 compat_symbol decl.
5090         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
5091         Argument to ptr___pthread_cleanup_upto is __jmp_buf, not jmp_buf.
5092         * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
5094 2003-03-02  Ulrich Drepper  <drepper@redhat.com>
5096         * sysdeps/pthread/timer_create.c (timer_create): Return correct
5097         error for CPU clocks.
5099         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
5100         _POSIX_MONOTONIC_CLOCK.
5101         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
5103         * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
5104         recent kernels.
5106 2003-03-01  Ulrich Drepper  <drepper@redhat.com>
5108         * descr.h (struct pthread): Move cleanup field to the front.
5110 2003-03-01  Roland McGrath  <roland@redhat.com>
5112         * sem_open.c (sem_open): Braino fix.
5114 2003-03-01  Ulrich Drepper  <drepper@redhat.com>
5116         * sysdeps/i386/tcb-offsets.sym: Add CLEANUP and CLEANUP_PREV.
5117         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Inline
5118         __pthread_cleanup_pop functionality.
5119         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5121         * descr.h (struct pthread): Move tid field to the front now that
5122         it is often used.
5124         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S
5125         (__lll_mutex_timedlock_wait): Remove.
5126         (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
5127         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
5128         (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
5129         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
5130         (lll_unlock_wake_cb): Don't save and restore %esi.
5131         (__lll_unlock_wake): Add alignment.  Don't save, load, and restore
5132         %esi.
5133         (__lll_timedwait_tid): Add alignment.
5134         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
5135         (__lll_unlock_wake): Add alignment.  Don't save, load, and restore
5136         %esi.
5137         (__lll_timedwait_tid): Removed.
5138         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
5139         (__pthread_cond_broadcast): Don't save, load, and restore %esi.
5140         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
5141         (pthread_barrier_wait): Don't save, load, and restore %esi for
5142         last thread.
5143         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
5144         (__pthread_cond_signal): Don't save, load, and restore %esi.
5145         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
5146         (__pthread_rwlock_unlock): Don't save, load, and restore %esi.
5147         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
5148         Don't save, load, and restore %esi.
5150 2003-02-27  Ulrich Drepper  <drepper@redhat.com>
5152         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
5153         Release lock before waking up the waiters.
5155         * tst-exit1.c (do_test): Don't start more than one thread in parallel.
5157         * tst-rwlock9.c (writer_thread): Correct adding TIMEOUT.
5158         (reader_thread): Likewise.
5160         * sysdeps/pthread/pthread_rwlock_unlock.c
5161         (__pthread_rwlock_unlock): Release internal lock early.  Don't try
5162         to wake up readers if there are none.
5164         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
5165         Release internal lock before wake threads.
5167 2003-02-26  Ulrich Drepper  <drepper@redhat.com>
5169         * Makefile (tests): Add tst-rwlock10 and tst-rwlock11.
5170         * tst-rwlock8.c: Initialize lock with INIT.  Allow INIT to be
5171         predefined.
5172         * tst-rwlock9.c: Likewise.
5173         * tst-rwlock10.c: New file.
5174         * tst-rwlock11.c: New file.
5176         * Makefile (tests): Add tst-dlsym1.
5177         * tst-dlsym1.c: New file.
5179         * init.c (__pthread_initialize_minimal_internal): Set
5180         GL(dl_error_catch_tsd) to __libc_dl_error_tsd.
5181         * Versions (libc:GLIBC_PRIVATE): Export __libc_dl_error_tsd.
5183 2003-02-24  Ulrich Drepper  <drepper@redhat.com>
5185         * sem_open.c (sem_open): Fix handling of O_CREAT without O_EXCL.
5187         * tst-cond2.c: Fix sychronization with child.
5189         * tst-rwlock8.c (reader_thread): Remove unused variable.
5191         * Makefile: Add rules to build and run tst-tls3.
5192         * tst-tls3.c: New file.
5193         * tst-tls3mod.c: New file.
5195         * Makefile (tests): Add tst-rwlock8 and tst-rwlock9.
5196         * tst-rwlock8.c: New file.
5197         * tst-rwlock9.c: New file.
5198         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Fix
5199         complete broken rwlock implementation.
5200         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
5201         Likewise.
5202         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
5203         Likewise.
5204         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
5205         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
5206         * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
5207         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
5208         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
5209         * sysdeps/pthread/pthread_rwlock_unlock.c: Likewise.
5210         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
5212 2003-02-23  Roland McGrath  <roland@redhat.com>
5214         * Makefile (nptl-version): Change regexp so case sensitivity is ok.
5216 2003-02-23  Ulrich Drepper  <drepper@redhat.com>
5218         * Makefile (tests): Add tst-context1.
5219         * tst-context1.c: New file.
5221         * Makefile (tests): Add tst-tls1 and tst-tls2.
5222         * tst-tls1.c: New file.
5223         * tst-tls2.c: New file.
5225         * libc-cancellation.c (__libc_enable_asynccancel): Correct test
5226         for failed cmpxchg.
5228         * pthread_create.c (start_thread): Set EXITING_BIT early.
5230         * sysdeps/i386/tls.h (THREAD_GETMEM): Mark asm as volatile.
5231         (THREAD_GETMEM_NC): Likewise.
5233 2003-02-22  Ulrich Drepper  <drepper@redhat.com>
5235         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Shave
5236         off 3 more bytes by using offset-less instructions when possible.
5238         * Makefile: Add dependency for $(objpfx)version.d.
5240         * eintr.c (eintr_source): Add unnecessary return but the compiler
5241         insists.
5243         * tst-kill3.c: Include <unistd.h>.
5245 2003-02-21  Roland McGrath  <roland@redhat.com>
5247         * pthread_create.c (start_thread): Call __libc_thread_freeres.
5249 2003-02-21  Ulrich Drepper  <drepper@redhat.com>
5251         * Makefile (tests): Add tst-eintr1.
5252         (distribute): Add eintr.c.
5253         * tst-eintr1.c: New file.
5254         * eintr.c: New file.
5256         * pthread_cancel.c (pthread_cancel): Use tkill directly.
5258         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill):
5259         Disallow sending SIGCANCEL.
5261         * Makefile (tests): Remove tst-basic7.  Add tst-kill1, tst-kill2,
5262         tst-kill3, tst-kill4, tst-kill5, tst-kill6.
5263         * tst-kill1.c: New file.
5264         * tst-kill2.c: New file.
5265         * tst-kill3.c: New file.
5266         * tst-kill5.c: New file.
5267         * tst-kill6.c: New file.
5268         * tst-basic7.c: Renamed to...
5269         * tst-kill4.c: ...this.
5271 2003-02-21  Roland McGrath  <roland@redhat.com>
5273         * Makefile (install-lib-ldscripts): New variable.
5275 2003-02-21  Ulrich Drepper  <drepper@redhat.com>
5277         * pthreadP.h: Define INVALID_TD_P and INVALID_NOT_TERMINATED_TD_P.
5278         * pthread_cancel.c: Use INVALID_TD_P.
5279         * pthread_detach.c: Likewise.
5280         * pthread_getschedparam.c: Likewise.
5281         * pthread_setschedparam.c: Likewise.
5282         * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
5283         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
5284         * pthread_join.c: Use INVALID_NOT_TERMINATED_TD_P.
5285         * pthread_timedjoin.c: Likewise.
5287         * tst-basic7.c: Include <signal.h>.
5289         * pthread_join.c (pthread_join): Limited checking for invalid
5290         descriptors.
5291         * pthread_timedjoin.c (pthread_timedjoin_np): Likewise.
5293 2003-02-20  Ulrich Drepper  <drepper@redhat.com>
5295         * pthread_create.c (deallocate_tsd): Reset found_nonzero at the
5296         beginning of the loop.  Clear the entire first block of TSD.
5297         * Makefile (tests): Add tst-key4.
5298         * tst-key4.c: New file.
5300 2003-02-18  Ulrich Drepper  <drepper@redhat.com>
5302         * Makefile (tests): Add tst-basic7.
5303         * tst-basic7.c: New file.
5305         * pthread_create.c (deallocate_tsd): Mark as internal_function.
5306         Add some more __builtin_expect.
5308         * pthreadP.h: Define dummy version of DEBUGGING_P.
5310 2003-02-17  Ulrich Drepper  <drepper@redhat.com>
5312         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remnove
5313         _POSIX_THREAD_PRIORITY_SCHEDULING.
5314         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
5315         _XOPEN_REALTIME_THREADS.
5316         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
5318         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): The
5319         kernel returns EINVAL for PID <= 0, work around it.
5321         * Makefile (tests): Add tst-signal5.
5322         * tst-signal5.c: New file.
5324         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
5325         and LOGIN_NAME_MAX.
5327         * tst-cancel1.c (tf): Block all signals.
5329         * Makefile (tests): Add tst-basic6.
5330         * tst-basic6.c: New file.
5332         * tst-basic1.c: Add test for process ID.
5334         * Makefile (tests): Add tst-cancel10.
5335         * tst-cancel10.c: New file.
5337         * Makefile (tests): Add tst-signal4.
5338         * tst-signal4.c: New file.
5340         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use
5341         __sigismember instead of sigismember.  Add __builtin_expect.
5343 2003-02-16  Ulrich Drepper  <drepper@redhat.com>
5345         * tst-attr1.c (do_test): Add tests for pthread_setcanceltype,
5346         pthread_setcancelstate, and pthread_rwlock_setpshared.
5348         * tst-cancel7.c (do_test): Make sure the pid file exists before
5349         canceling the thread.
5351         * tst-rwlock6.c: More pthread_rwlock_timedwrlock and
5352         pthread_rwlock_timedrdlock tests.
5353         * tst-rwlock7.c: More pthread_rwlock_timedwrlock tests.
5354         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
5355         Check for invalid tv_nsec field.
5356         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
5357         Likewise.
5359         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Protect
5360         recursive mutex of overflow.
5362         * tst-attr1.c (do_test): Add test for pthread_mutexattr_setpshared.
5364         * libc-cancellation.c (__libc_enable_asynccancel): Rewrite to avoid
5365         going into an endless loop.
5366         * Makefile (tests): Add tst-cancel9.
5367         * tst-cancel9.c: New file.
5369         * pthread_cancel.c (pthread_cancel): Use the result of __pthread_kill.
5371 2003-02-15  Ulrich Drepper  <drepper@redhat.com>
5373         * tst-mutex5.c (do_test): Add more timedlock tests.
5375         * tst-mutex2.c: Tests of trylock and unlock with ERROR mutexes.
5376         * tst-mutex3.c (do_test): Add tests for trylock with RECURSIVE mutexes.
5378         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
5379         use INLINE_SYSCALL.  Error number is returned, not -1.
5381         * pthreadP.h: Mark declarations of __find_in_stack_list, __free_tcb,
5382         and __deallocate_stack with internal_function.
5383         * pthread_create.c: Adjust definitions appropriately.
5384         * allocatestack.c: Likewise.
5386         * pthread_join.c: Add one more __builtin_expect.
5387         * pthread_timedjoin.c: Likewise.
5389         * pthread_getspecific.c (__pthread_getspecific): Clear data->data
5390         not data of sequence number does not match.
5391         Add one __builtin_expect.
5393         * Makefile (tests): Add tst-clock1.
5394         * tst-clock1.c: New file.
5396         * pthread_setconcurrency.c (pthread_setconcurrency): Fail for
5397         negative arguments.
5398         * Makefile (tests): Add tst-basic5.
5399         * tst-basic5.c: New file.
5401 2003-02-14  Ulrich Drepper  <drepper@redhat.com>
5403         * Makefile (tests): Add tst-basic4.
5404         * tst-basic4.c: New file.
5406         * pthreadP.h: Add declaraction for __nptl_nthreads.
5407         * pthread_create.c: Define __nptl_nthreads
5408         (start_thread): Increment __nptl_nthreads at beginning.  Decrement
5409         after thread is done.  If then zero, call exit(0).
5410         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
5411         Add ptr_nthreads.  Define HAVE_PTR_NTHREADS.
5412         * init.c (pthread_functions): Initialize ptr_nthreads.
5413         * allocatestack.c (nptl_nthreads): Remove definition and all uses.
5414         (__reclaim_stacks): Decrement __nptl_nthreads.
5415         * sysdeps/pthread/Makefile [$(subdir)==csu] (CFLAGS-libc-start.c):
5416         Define.
5417         * Makefile (tests): Add tst-basic3.
5418         * tst-basic3.c: New file.
5420         * descr.h: Define CANCELING_BIT and CANCELING_BITMASK.  Introduce
5421         after CANCELTYPE_BIT, move the other bits up.  Update CANCEL_RESTMASK.
5422         * init.c (sigcancel_handler): Also set CANCELING_BITMASK bit in newval.
5423         * pthread_cancel.c (pthread_cancel): Likewise.  Also set CANCELING_BIT
5424         if asynchronous canceling is enabled.
5425         * pthread_join.c (pthread_join): When recognizing circular joins,
5426         take into account the other thread might be already canceled.
5427         * Makefile (tests): Add tst-join5.
5428         * tst-join5.c: New file.
5430         * Makefile (tests): Add tst-join4.
5431         * tst-join4.c: New file.
5433 2003-02-13  Ulrich Drepper  <drepper@redhat.com>
5435         * tst-cond4.c (main): Add test of pthread_attr_getpshared.
5437 2003-02-13  Martin Schwidefsky  <schwidefsky@de.ibm.com>
5439         * sysdeps/s390/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM,
5440         THREAD_SETMEM_NC): Use passed descr instead of THREAD_SELF.
5441         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind): Avoid
5442         warning.
5443         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Include <sys/time.h>
5444         to avoid warning.
5445         * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Return
5446         error if lll_futex_wake failed.
5448 2003-02-13  Ulrich Drepper  <drepper@redhat.com>
5450         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Fix
5451         handling of cancellation and failung pthread_mutex_unlock call.
5452         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5453         * Makefile (tests): Add tst-cond8 and tst-cond9.
5454         * tst-cond8.c: New file.
5455         * tst-cond9.c: New file.
5457         * tst-cond7.c (do_test): Unlock the mutex before canceling the thread.
5459         * sysdeps/pthread/pthread.h: Add missing initializers.  Protect
5460         non-standard initializers with __USE_GNU.
5462         * Makefile (tests): Add tst-cleanup3.
5463         * tst-cleanup3.c: New file.
5465 2003-02-12  Ulrich Drepper  <drepper@redhat.com>
5467         * Makefile (tests): Add tst-attr1 and tst-attr2.
5468         * tst-attr1.c: New file.
5469         * tst-attr2.c: New file.
5471         * Makefile: Add rules to build and run tst-atfork2 test.
5472         * tst-atfork2.c: New file.
5473         * tst-atfork2mod.c: New file.
5475         * sysdeps/unix/sysv/linux/unregister-atfork.c
5476         (__unregister_atfork): Free the memory allocated for the handlers
5477         after removing them from the lists.
5479         * sysdeps/unix/sysv/linux/register-atfork.c: Define memeory
5480         cleanup function.
5482         * tst-atfork1.c (do_test): Wait for the child we forked.
5483         Report error in child.
5485         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Fix comment.
5487         * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
5489 2003-02-10  Ulrich Drepper  <drepper@redhat.com>
5491         * Makefile (tests): Add tst-cancel8.
5492         * tst-cancel8.c: New file.
5494         * sysdeps/unix/sysv/linux/i386/pthread_once.S (clear_once_control): Fix
5495         clearing of control variable.
5496         * Makefile (tests): Add tst-once3 and tst-once4.
5497         * tst-once3.c: New file.
5498         * tst-once4.c: New file.
5500 2003-02-08  kaz Kojima  <kkojima@rr.iij4u.or.jp>
5502         * sysdeps/sh/Makefile: New file.
5503         * sysdeps/sh/bits/atomic.h: New file.
5504         * sysdeps/sh/pthread_spin_init.c: New file.
5505         * sysdeps/sh/pthread_spin_lock.c: New file.
5506         * sysdeps/sh/pthread_spin_trylock.S: New file.
5507         * sysdeps/sh/pthread_spin_unlock.S: New file.
5508         * sysdeps/sh/pthreaddef.h: New file.
5509         * sysdeps/sh/tcb-offsets.sym: New file.
5510         * sysdeps/sh/td_ta_map_lwp2thr.c: New file.
5511         * sysdeps/sh/tls.h: New file.
5512         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: New file.
5513         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: New file.
5514         * sysdeps/unix/sysv/linux/sh/createthread.c: New file.
5515         * sysdeps/unix/sysv/linux/sh/fork.c: New file.
5516         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: New file.
5517         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: New file.
5518         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h: New file.
5519         * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: New file.
5520         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: New file.
5521         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: New file.
5522         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: New file.
5523         * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: New file.
5524         * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
5525         * sysdeps/unix/sysv/linux/sh/pt-vfork.S: New file.
5526         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: New file.
5527         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: New file.
5528         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: New file.
5529         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: New file.
5530         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: New file.
5531         * sysdeps/unix/sysv/linux/sh/pthread_once.S: New file.
5532         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: New file.
5533         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: New file.
5534         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: New file.
5535         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: New file.
5536         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: New file.
5537         * sysdeps/unix/sysv/linux/sh/sem_post.S: New file.
5538         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: New file.
5539         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: New file.
5540         * sysdeps/unix/sysv/linux/sh/sem_wait.S: New file.
5541         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
5543 2003-02-08  Ulrich Drepper  <drepper@redhat.com>
5545         * tst-cond2.c: Rearrange code to not rely on behavior undefined
5546         according to POSIX.
5548         * tst-basic2.c (do_test): Lock mutex before creating the thread.
5550 2003-02-07  Ulrich Drepper  <drepper@redhat.com>
5552         * sysdeps/x86_64/tls.h: Remove unnecessary macros, left over from x86.
5553         (TLS_GET_FS): New #define.
5554         (TLS_SET_FS): New #define.
5555         Correct value of __NR_set_thread_area.
5557         * sysdeps/x86_64/td_ta_map_lwp2thr.c: New file.
5559 2003-02-06  Ulrich Drepper  <drepper@redhat.com>
5561         * Makefile (tests): Add tst-popen1.
5562         * tst-popen1.c: New file.
5564         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Remove wrong
5565         but inactive generalization.
5566         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5567         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
5568         Minor optimization, remove one instruction.
5569         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
5571 2003-02-04  Martin Schwidefsky  <schwidefsky@de.ibm.com>
5573         * sysdeps/unix/sysv/linux/s390/fork.c: Correct order of parameters.
5575 2003-01-31  Martin Schwidefsky  <schwidefsky@de.ibm.com>
5577         * init.c (__NR_set_tid_address): Add #ifdef for s390.
5578         * sysdeps/pthread/pthread_barrier_wait.c: New file.
5579         * sysdeps/pthread/pthread_cond_broadcast.c: New file.
5580         * sysdeps/pthread/pthread_cond_signal.c: New file.
5581         * sysdeps/pthread/pthread_cond_timedwait.c: New file.
5582         * sysdeps/pthread/pthread_cond_wait.c: New file.
5583         * sysdeps/pthread/pthread_rwlock_rdlock.c: New file.
5584         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: New file.
5585         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: New file.
5586         * sysdeps/pthread/pthread_rwlock_unlock.c: New file.
5587         * sysdeps/pthread/pthread_rwlock_wrlock.c: New file.
5588         * sysdeps/s390/Makefile: New file.
5589         * sysdeps/s390/bits/atomic.h: New file.
5590         * sysdeps/s390/pthread_spin_init.c: New file.
5591         * sysdeps/s390/pthread_spin_lock.c: New file.
5592         * sysdeps/s390/pthread_spin_trylock.c: New file.
5593         * sysdeps/s390/pthread_spin_unlock.c: New file.
5594         * sysdeps/s390/pthreaddef.h: New file.
5595         * sysdeps/s390/tcb-offsets.sym: New file.
5596         * sysdeps/s390/td_ta_map_lwp2thr.c: New file.
5597         * sysdeps/s390/tls.h: New file.
5598         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: New file.
5599         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: New file.
5600         * sysdeps/unix/sysv/linux/s390/createthread.c: New file.
5601         * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: New file.
5602         * sysdeps/unix/sysv/linux/s390/fork.c: New file.
5603         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: New file.
5604         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
5605         * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: New file.
5606         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: New file.
5607         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: New file.
5608         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: New file.
5609         * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: New file.
5610         * sysdeps/unix/sysv/linux/s390/pthread_once.c: New file.
5611         * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: New file.
5612         * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: New file.
5613         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
5614         * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
5615         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: New file.
5616         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
5617         * sysdeps/unix/sysv/linux/s390/sem_post.c: New file.
5618         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: New file.
5619         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
5620         * sysdeps/unix/sysv/linux/s390/sem_wait.c: New file.
5622 2003-02-04  Ulrich Drepper  <drepper@redhat.com>
5624         * atomic.h: Add a couple more default implementations.
5625         (atomic_compare_and_exchange_acq): Use
5626         __arch_compare_and_exchange_32_acq in return value definition.  It
5627         always exists.
5628         (atomic_bit_set): Renamed from atomic_set_bit.
5629         Add missing atomic_ prefixes.
5631         * sysdeps/pthread/bits/libc-lock.h (__libc_once): In case no
5632         thread library is available, use correct value to mark initialized
5633         once variable.
5635 2003-02-03  Ulrich Drepper  <drepper@redhat.com>
5637         * allocatestack.c (allocate_stack): Use __getpagesize instead of
5638         __sysconf to determine pagesize.
5640         * pthread_create.c: Include <atomic.h>.
5641         * allocatestack.c (allocate_stack): Implement coloring of the
5642         allocated stack memory.  Rename pagesize to pagesize_m1.  It's the
5643         size minus one.  Adjust users.
5644         * sysdeps/i386/i686/Makefile: New file.
5646 2003-02-02  Ulrich Drepper  <drepper@redhat.com>
5648         * allocatestack.c: Improve comment throughout the file.
5650         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
5651         (__lll_lock_wait): Add branch prediction.
5652         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
5653         (__lll_lock_wait): Likewise.
5654         (lll_unlock_wake_cb): Removed.
5656 2003-01-31  Ulrich Drepper  <drepper@redhat.com>
5658         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Remove
5659         _POSIX_THREAD_PRIORITY_SCHEDULING.
5661 2003-01-30  Jakub Jelinek  <jakub@redhat.com>
5663         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
5664         Fix return type of ptr___pthread_getspecific.
5666 2003-01-29  Ulrich Drepper  <drepper@redhat.com>
5668         * Makefile (tests): Add tst-umask1.
5669         (tst-umask1-ARGS): Define.
5670         * tst-umask1.c: New file.
5672 2003-01-28  Ulrich Drepper  <drepper@redhat.com>
5674         * Makefile (libpthread-routines): Remove lowlevelrwlock.  Add
5675         pthread_rwlock_rdlock, pthread_rwlock_timedrdlock,
5676         pthread_rwlock_wrlock, pthread_rwlock_timedwrlock, and
5677         pthread_rwlock_unlock.
5678         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Removed
5679         * sysdeps/unix/sysv/linux/i386/i586/lowlevelrwlock.S: Removed
5680         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Removed
5681         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: New file.
5682         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
5683         New file.
5684         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: New file.
5685         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
5686         New file.
5687         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: New file.
5688         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_rdlock.S: New file.
5689         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedrdlock.S:
5690         New file.
5691         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_wrlock.S: New file.
5692         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedwrlock.S:
5693         New file.
5694         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_unlock.S: New file.
5695         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_rdlock.S: New file.
5696         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedrdlock.S:
5697         New file.
5698         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_wrlock.S: New file.
5699         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedwrlock.S:
5700         New file.
5701         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_unlock.S: New file.
5703         * Makefile (libpthread-routines): Remove lowlevelcond and
5704         lowlevelsem.  Add sem_wait, sem_trywait, sem_timedwait, sem_post,
5705         pthread_cond_wait, pthread_cond_timedwait, pthread_cond_signal,
5706         and pthread_cond_broadcast.
5707         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Removed
5708         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Removed
5709         * sysdeps/unix/sysv/linux/i386/i586/lowlevelsem.S: Removed
5710         * sysdeps/unix/sysv/linux/i386/i586/lowlevelcond.S: Removed
5711         * sysdeps/unix/sysv/linux/i386/i686/lowlevelsem.S: Removed
5712         * sysdeps/unix/sysv/linux/i386/i686/lowlevelcond.S: Removed
5713         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: New file.
5714         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: New file.
5715         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: New file.
5716         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: New file.
5717         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: New file.
5718         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: New file.
5719         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: New file.
5720         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: New file.
5721         * sysdeps/unix/sysv/linux/i386/i586/sem_wait.S: New file.
5722         * sysdeps/unix/sysv/linux/i386/i586/sem_trywait.S: New file.
5723         * sysdeps/unix/sysv/linux/i386/i586/sem_timedwait.S: New file.
5724         * sysdeps/unix/sysv/linux/i386/i586/sem_post.S: New file.
5725         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_wait.S: New file.
5726         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_timedwait.S: New file.
5727         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_signal.S: New file.
5728         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_broadcast.S: New file.
5729         * sysdeps/unix/sysv/linux/i386/i686/sem_wait.S: New file.
5730         * sysdeps/unix/sysv/linux/i386/i686/sem_trywait.S: New file.
5731         * sysdeps/unix/sysv/linux/i386/i686/sem_timedwait.S: New file.
5732         * sysdeps/unix/sysv/linux/i386/i686/sem_post.S: New file.
5733         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_wait.S: New file.
5734         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S: New file.
5735         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_signal.S: New file.
5736         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_broadcast.S: New file.
5737         * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: New file.
5739         * sysdeps/unix/sysv/linux/i386/createthread.c: Define
5740         PREPARE_CREATE and TLS_VALUE with x86-specific bits.  All the rest
5741         of the code is moved to ...
5742         * sysdeps/pthread/createthread.c: ...here.  New file.
5744 2003-01-27  Ulrich Drepper  <drepper@redhat.com>
5746         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S
5747         (__new_sem_post): Clear %eax before returning.
5748         Reported by MAEDA Naoaki <maeda.naoaki@jp.fujitsu.com>.
5750         * Makefile (tests): Add tst-cleanup2.
5751         * tst-cleanup2.c: New file.
5753         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
5754         Interpret first parameter correctly.
5756 2003-01-17  Ulrich Drepper  <drepper@redhat.com>
5758         * Makefile (headers): Add bits/semaphore.h.
5760 2003-01-16  Jakub Jelinek  <jakub@redhat.com>
5762         * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize _head->sysinfo even
5763         if not SHARED.
5765 2003-01-14  Ulrich Drepper  <drepper@redhat.com>
5767         * sem_open.c (sem_open): Return SEM_FAILED if existing semaphore
5768         must be used and mapping failed.
5769         Reported by Luke Elliott <luke.elliott@activfinancial.com>.
5771         * Makefile (CFLAGS-pthread_self.os): Define this, not
5772         CFLAGS-pthread_self.c.
5774 2003-01-13  Ulrich Drepper  <drepper@redhat.com>
5776         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Don't export
5777         lll_unlock_wake_cb.
5779         * Makefile (libpthread-routines): Add version.  Add rules to build
5780         version.os and banner.h.
5781         * version.c: New file.
5783 2003-01-13  Jakub Jelinek  <jakub@redhat.com>
5785         * pthread_mutex_lock.c (__pthread_mutex_lock_internal): Make
5786         the alias unconditional.
5787         * pthread_mutex_unlock.c  (__pthread_mutex_unlock_internal): Likewise.
5789 2003-01-13  Ulrich Drepper  <drepper@redhat.com>
5791         * Makefile (CFLAGS-pthread_self.c): New definition.
5793 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
5795         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Add
5796         INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
5797         * sysdeps/unix/sysv/linux/raise.c (raise): Likewise.
5798         * init.c (__pthread_initialize_minimal_internal): Likewise.
5800 2003-01-07  Jakub Jelinek  <jakub@redhat.com>
5802         * pthreadP.h (__pthread_cond_timedwait): Add prototype.
5804         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
5805         (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
5806         (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
5807         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
5808         (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
5809         (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
5811 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
5813         * pthreadP.h (LIBC_CANCEL_HANDLED): Define.
5814         * pt-system.c (LIBC_CANCEL_HANDLED): Add.
5815         * tst-cancel-wrappers.sh: Remove all exceptions.
5817 2003-01-05  Ulrich Drepper  <drepper@redhat.com>
5819         * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
5820         features.  Reported by Marijn Ros <marijn@mad.scientist.com>.
5822         * sysdeps/unix/sysv/linux/jmp-unwind.c: Include <pthread-functions.h>.
5823         Use __libc_pthread_functions array if SHARED.
5825         * pthreadP.h: Move pthread_cond_2_0_t definition to...
5826         * sysdeps/unix/sysv/linux/internaltypes.h: ...here.
5828         * sysdeps/pthread/bits/libc-lock.h (__libc_ptf_call): New #define.
5829         (__libc_rwlock_rdlock, __libc_rwlock_wrlock, __libc_rwlock_unlock,
5830         __libc_key_create, __libc_getspecific, __libc_setspecific): Use
5831         __libc_ptf_call instead of __libc_maybe_call.
5832         (PTF): New #define.
5833         (__libc_cleanup_region_start): Wrap function name with PTF call.
5834         (__libc_cleanup_region_end): Likewise.
5835         (__libc_cleanup_end): Likewise.
5837         * pthread_getspecific.c: Add __pthread_getspecific_internal alias.
5838         * pthread_setspecific.c: Add __pthread_setspecific_internal alias.
5839         * pthread_key_create.c: Add __pthread_key_create_internal alias.
5840         * pthreadP.h: Add prototypes.
5842         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Add
5843         __pthread_rwlock_rdlock, __pthread_rwlock_wrlock, and
5844         __pthread_rwlock_unlock aliases.
5845         * pthreadP.h: Add prototypes for new aliases.
5847         * pthreadP.h (struct pthead_functions): Moved to...
5848         * sysdeps/pthread/pthread-functions.h: ...here.  New file.
5849         * init.c (pthread_functions): Add initializers for new elements.
5851         * cleanup_defer.c: Add __pthread_cleanup_push_defer and
5852         __pthread_cleanup_pop_restore aliases.
5853         * pthreadP.h: Add prototypes.
5855         * cleanup.c: Rename _GI_pthread_cleanup_push to __pthread_cleanup_push
5856         and _GI_pthread_cleanup_pop to __pthread_cleanup_pop.
5857         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Adjust caller.
5858         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
5859         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
5860         * pthreadP.h: Adjust prototypes and callers.
5862 2003-01-04  Ulrich Drepper  <drepper@redhat.com>
5864         * Makefile (tests): Add tst-cancel7.
5865         (tst-cancel7-ARGS): New variable.
5866         * tst-cancel7.c: New file.
5868         * old_pthread_cond_broadcast.c: Optimize initialization a bit to work
5869         around gcc defficiencies.
5870         * old_pthread_cond_signal.c: Likewise.
5871         * old_pthread_cond_timedwait.c: Likewise.
5872         * old_pthread_cond_wait.c: Likewise.
5874         * pthreadP.h (pthread_cond_2_0_t): Remove unneeded lock element.
5876 2003-01-03  Ulrich Drepper  <drepper@redhat.com>
5878         * Makefile (tests): Add tst-cond7.
5879         * tst-cond7.c: New file.
5881         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
5882         (condvar_cleanup): Get condvar address from the right place.
5884         * atomic.h: Correct definitions of atomic_full_barrier,
5885         atomic_read_barrier, atomic_write_barrier.
5887         * old_pthread_cond_broadcast.c: Make memory allocate and initialization
5888         race-free.
5889         * old_pthread_cond_signal.c: Likewise.
5890         * old_pthread_cond_timedwait.c: Likewise.
5891         * old_pthread_cond_wait.c: Likewise.
5893 2003-01-03  Jakub Jelinek  <jakub@redhat.com>
5895         * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
5897 2003-01-03  Ulrich Drepper  <drepper@redhat.com>
5899         * pthreadP.h (pthread_cond_2_0_t): New type.
5900         (struct pthread_functions): Use new type for 2.0 condvar callbacks.
5901         Use new type for the 2.0 condvar function prototypes.
5902         * forward.c: Use pthread_cond_2_0_t for 2.0 condvar functions.
5903         * old_pthread_cond_init.c: Use pthread_cond_2_0_t for condvar
5904         parameter.
5905         * old_pthread_cond_destroy.c: Likewise.
5906         * old_pthread_cond_broadcast.c: Likewise.  Lock appropriately.
5907         * old_pthread_cond_signal.c: Likewise.
5908         * old_pthread_cond_timedwait.c: Likewise.
5909         * old_pthread_cond_wait.c: Likewise.
5911         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
5912         (__pthread_cond_wait): Don't save cancellation mode and seq value
5913         in same location.
5915         * herrno.c (__h_errno_location): Don't define as weak.
5917 2003-01-02  Jakub Jelinek  <jakub@redhat.com>
5919         * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
5920         pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
5921         and pthread_cond_wait.
5922         * old_pthread_cond_broadcast.c (__old_pthread_cond_broadcast):
5923         Renamed to...
5924         (__pthread_cond_broadcast_2_0): ... this.
5925         * old_pthread_cond_destroy.c (__old_pthread_cond_destroy):
5926         Renamed to...
5927         (__pthread_cond_destroy_2_0): ... this.
5928         * old_pthread_cond_init.c (__old_pthread_cond_init):
5929         Renamed to...
5930         (__pthread_cond_init_2_0): ... this.
5931         * old_pthread_cond_signal.c (__old_pthread_cond_signal):
5932         Renamed to...
5933         (__pthread_cond_signal_2_0): ... this.
5934         * old_pthread_cond_wait.c (__old_pthread_cond_wait):
5935         Renamed to...
5936         (__pthread_cond_wait_2_0): ... this.
5937         * pthread_cond_destroy.c: Include shlib-compat.h.
5938         (pthread_cond_destroy): Change strong_alias into versioned_symbol.
5939         * pthread_cond_init.c: Include shlib-compat.h.
5940         (pthread_cond_init): Change strong_alias into versioned_symbol.
5941         * pthreadP.h (struct pthread_functions): Rename ptr_pthread_cond_*
5942         fields to ptr___pthread_cond_* and add ptr___pthread_cond_*_2_0
5943         fields.
5944         (__pthread_cond_broadcast_2_0, __pthread_cond_destroy_2_0,
5945         __pthread_cond_init_2_0, __pthread_cond_signal_2_0,
5946         __pthread_cond_wait_2_0): New prototypes.
5947         (__old_pthread_cond_broadcast, __old_pthread_cond_destroy,
5948         __old_pthread_cond_init, __old_pthread_cond_signal,
5949         __old_pthread_cond_wait): Removed.
5950         * init.c: Include shlib-compat.h.
5951         (pthread_functions): Guard ptr___pthread_attr_init_2_0
5952         initialization with SHLIB_COMPAT (GLIBC_2_0, GLIBC_2_1).
5953         Rename ptr_pthread_cond_* to ptr___pthread_cond_*, initialize
5954         ptr___pthread_cond_*_2_0 fields.
5955         * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
5956         pthread_cond_*@GLIBC_2.0 compatibility symbols.
5958         * sysdeps/pthread/sigaction.c (SIGCANCEL): Only define if
5959         LIBC_SIGACTION was not yet defined.
5960         [!defined LIBC_SIGACTION]: Define LIBC_SIGACTION, #include self.
5961         [!defined LIBC_SIGACTION] (__sigaction): New function and
5962         libc_hidden_weak.
5963         [!defined LIBC_SIGACTION] (sigaction): New weak_alias.
5964         [defined LIBC_SIGACTION]: #include_next <sigaction.c>.
5966 2003-01-02  Jakub Jelinek  <jakub@redhat.com>
5968         * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
5970 2003-01-02  Ulrich Drepper  <drepper@redhat.com>
5972         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
5973         New, larger type definition.
5974         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: New condvar
5975         implementation.
5976         * Versions [libpthread]: Add definitions for new pthread_cond_*
5977         interfaces for version GLIBC_2.3.2.
5978         * pthread_cond_init.c: Update initialization for new type definition.
5979         * Makefile (libpthread-routines): Remove pthread_cond_wait,
5980         pthread_cond_timedwait, pthread_cond_signal, and
5981         pthread_cond_broadcast.  Add old_pthread_cond_init,
5982         old_pthread_cond_destroy, old_pthread_cond_wait,
5983         old_pthread_cond_timedwait, old_pthread_cond_signal, and
5984         old_pthread_cond_broadcast.
5985         * old_pthread_cond_broadcast.c: New file.
5986         * old_pthread_cond_destroy.c: New file.
5987         * old_pthread_cond_init.c: New file.
5988         * old_pthread_cond_signal.c: New file.
5989         * old_pthread_cond_timedwait.c: New file.
5990         * old_pthread_cond_wait.c: New file.
5991         * pthreadP.h: Add prototypes for the compatibility interfaces.
5993         * pthread_cond_destroy.c: Don't include <errno.h>.
5995 2003-01-01  Ulrich Drepper  <drepper@redhat.com>
5997         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Avoid
5998         unnecessary zero offset when addressing MUTEX.
6000 2002-12-31  Ulrich Drepper  <drepper@redhat.com>
6002         * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
6003         __register_atfork.
6004         * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
6005         for __register_atfork.
6007 2002-12-31  Jakub Jelinek  <jakub@redhat.com>
6009         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use __ASSEMBLER__
6010         instead of ASSEMBLER test macro.
6012         * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
6013         __libc_current_sigrtmax): Add libc_hidden_def.
6015         * sysdeps/pthread/list.h: Remove assert.h include.
6017 2002-12-31  Ulrich Drepper  <drepper@redhat.com>
6019         * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Use
6020         __pthread_initialize_minimal_internal not
6021         __pthread_initialize_minimal.
6023 2002-12-30  Ulrich Drepper  <drepper@redhat.com>
6025         * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Mark
6026         __pthread_initialize_minimal as hidden.
6028         * init.c (__pthread_initialize_minimal_internal): Don't mark as
6029         constructor.
6031 2002-12-31  Jakub Jelinek  <jakub@redhat.com>
6033         * Makefile ($(inst_libdir)/libpthread.so): Depend on
6034         $(common-objpfx)format.lds, include that into the output script.
6035         Fix comment.
6036         (extra-B-pthread.so): Change linuxthreads/ into nptl/.
6038 2002-12-28  Andreas Jaeger  <aj@suse.de>
6040         * sysdeps/unix/sysv/linux/xstatconv.c (xstat_conv): Adjust for
6041         nsec resolution changes.
6042         (xstat64_conv): Likewise.
6043         (xstat32_conv): Likewise.
6044         * sysdeps/unix/sysv/linux/kernel_stat.h: Add nsec resolution for
6045         struct kernel_stat.
6046         * sysdeps/unix/sysv/linux/bits/stat.h: Add nsec resolution for
6047         structs stat and stat64.
6048         * time/time.h (__timespec_defined): Define for __USE_MISC.
6049         * io/sys/stat.h [__USE_MISC]: Define __need_timespec for struct stat.
6051 2002-12-30  Jakub Jelinek  <jakub@redhat.com>
6053         * forward.c (FORWARD2): Renamed from FORWARD3.  Remove unused export
6054         argument.
6055         (pthread_attr_init_2_0, pthread_attr_init_2_1): Use FORWARD macro.
6056         (pthread_exit): Use strong_alias to avoid warnings.
6057         * pthreadP.h (struct pthread_functions): Rename ptr_pthread_exit
6058         and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
6059         ptr___pthread_attr_init_2_*.
6060         * init.c (pthread_functions): Adjust.
6062 2002-12-29  Ulrich Drepper  <drepper@redhat.com>
6064         * forward.c: Make all functions available by default again.  It
6065         caused too much trouble.
6067         * pt-siglongjmp.c: Removed.
6069 2002-12-28  Jakub Jelinek  <jakub@redhat.com>
6071         * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
6072         (SYSINFO_OFFSET, MULTIPLE_THREADS_OFFSET): Remove.
6073         * sysdeps/i386/Makefile: New file.
6074         * sysdeps/i386/tcb-offsets.sym: New file.
6075         * sysdeps/pthread/tcb-offsets.h: New file.
6076         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
6077         Remove MULTIPLE_THREADS_OFFSET and SYSINFO_OFFSET checks.
6079         * sysdeps/unix/sysv/linux/Versions [libc] (GLIBC_PRIVATE): Move
6080         __register_atfork...
6081         (GLIBC_2.3.2): ...here.
6083 2002-12-28  Ulrich Drepper  <drepper@redhat.com>
6085         * sysdeps/pthread/pthread.h: Mark pthread_attr_getstackaddr and
6086         pthread_attr_setstackaddr with __attribute_deprecated__.
6088 2002-12-27  Jakub Jelinek  <jakub@redhat.com>
6090         * pt-system.c (system): Remove cancellation handling.
6091         * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
6092         cancellation routines.
6094 2002-12-28  Ulrich Drepper  <drepper@redhat.com>
6096         * descr.h: Include <dl-sysdep.h>.
6097         (struct pthread): Move header.data.list to the back of the struct.
6098         * sysdeps/i386/tls.h (tcbhead_t): Move list to the back of the struct.
6099         (MULTIPLE_THREADS_OFFSET): Adjust offset.
6100         (SYSINFO_OFFSEET): Likewise.
6102 2002-12-27  Jakub Jelinek  <jakub@redhat.com>
6104         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h (USE_DL_SYSINFO):
6105         Define.
6106         (DL_SYSINFO_DEFAULT): Cast to uintptr_t to avoid warnings.
6107         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h (NEED_DL_SYSINFO,
6108         DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION): Define.
6109         (USE_DL_SYSINFO): Undef.
6111 2002-12-22  Jakub Jelinek  <jakub@redhat.com>
6113         * Makefile (tests-reverse): Use $(objpfx)../libc.so instead of
6114         $(common-objpfx)libc.so.
6115         * tst-cancel4.c (tf_write, tf_writev): Increase buf sizes so that
6116         it is bigger than pipe buffer size even on arches with bigger
6117         page size.
6118         (tf_usleep): Cast usleep argument to useconds_t to avoid warnings.
6120 2002-12-25  Ulrich Drepper  <drepper@redhat.com>
6122         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Implement
6123         correct errno access for case that USE___THREAD is not defined.
6125 2002-12-24  Ulrich Drepper  <drepper@redhat.com>
6127         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Add missing #endif.
6128         Patch by Marijn Ros <marijn@mad.scientist.com>.
6130 2002-12-22  Roland McGrath  <roland@redhat.com>
6132         * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
6134 2002-12-20  Ulrich Drepper  <drepper@redhat.com>
6136         * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_inexpensive): Define.
6138 2002-12-19  Ulrich Drepper  <drepper@redhat.com>
6140         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Don't define
6141         NEED_DL_SYSINFO since no processor < i686 had the sysenter opcode.
6142         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: New file.
6144         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Use ENTER_KERNEL instead
6145         of int $0x80.
6146         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
6147         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Likewise.
6148         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Likewise.
6149         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
6150         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
6151         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Likewise.
6152         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Likewise.
6153         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
6155         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add support for using
6156         sysenter.
6157         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
6159         * sysdeps/i386/tls.h: Unconditionally include <dl-sysdep.h>.
6161         * allocatestack.c (allocate_stack) [NEED_DL_SYSINFO]: Set sysinfo
6162         in new TCB.
6163         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Check
6164         that sysinfo is properly initialized.
6165         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define RTLD_PRIVATE_ERRNO
6166         to 1 only for ld.so.
6168         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
6169         RTLD_CORRECT_DYNAMIC_WEAK.
6171 2002-12-19  Jakub Jelinek  <jakub@redhat.com>
6173         * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
6174         Use return 0 as 6th argument to FORWARD4.
6175         * pthread_equal.c: Include pthreadP.h instead of pthread.h.
6177 2002-12-18  Ulrich Drepper  <drepper@redhat.com>
6179         * descr.h (struct pthread) [NEED_DL_SYSINFO]: Add sysinfo member.
6180         * sysdeps/i386/tls.h (tcbhead_t): Add sysinfo member.
6181         Define SYSINFO_OFFSEET if NEED_DL_SYSINFO is defined.
6182         (INIT_SYSINFO): New #define.
6183         (TLS_TP_INIT): Use INIT_SYSINFO.
6184         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
6185         At test to make sure SYSINFO_OFFSET value is correct.
6186         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
6188 2002-12-18  Jakub Jelinek  <jakub@redhat.com>
6190         * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
6191         * sysdeps/unix/sysv/linux/raise.c (gsignal): Add weak alias to raise.
6192         * Versions [libc: GLIBC_2.0]: Add pthread_attr_init.
6193         [libpthread: GLIBC_2.1]: Remove __pthread_rwlock_init,
6194         __pthread_rwlock_destroy, __pthread_rwlock_rdlock,
6195         __pthread_rwlock_wrlock, __pthread_rwlock_unlock,
6196         __pthread_rwlock_tryrdlock and __pthread_rwlock_trywrlock.
6198 2002-12-18  Ulrich Drepper  <drepper@redhat.com>
6200         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use ENTER_KERNEL
6201         macro instead of using int $0x80 directly.
6203         * sysdeps/pthread/bits/stdio-lock.h: New file.
6204         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: New file.
6205         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: New file.
6206         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: New file.
6207         * Makefile (routines): Add libc-lowlevelmutex.
6209         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Remove
6210         __i686.get_pc_thunk.dx.
6212 2002-12-17  Jakub Jelinek  <jakub@redhat.com>
6214         * Makefile (libpthread-shared-only-routines): Add pt-allocrtsig.
6215         (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
6216         ($(objpfx)tst-cancel-wrappers.out): New rule.
6217         * tst-cancel-wrappers.sh: New test.
6218         * tst-locale1.c: Include signal.h.
6219         (uselocale): Test static linking of __libc_current_sigrt*.
6221 2002-12-17  Ulrich Drepper  <drepper@redhat.com>
6223         * Makefile (tests): Add tst-cancel6.
6224         * tst-cancel6.c: New file
6226 2002-12-17  Jakub Jelinek  <jakub@redhat.com>
6228         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
6229         Define meaningfully for assembler as well.
6230         * pthreadP.h (struct pthread_functions): Remove
6231         ptr_pthread_attr_init field.  Add ptr_pthread_attr_init_2_0
6232         and ptr_pthread_attr_init_2_1 fields.
6233         * init.c (pthread_functions): Initialize ptr_pthread_attr_init_2_0
6234         and ptr_pthread_attr_init_2_1 instead of ptr_pthread_attr_init.
6235         * forward.c (FORWARD4): Renamed from FORWARD3. Add export argument.
6236         (FORWARD3): Define using FORWARD4.
6237         (pthread_attr_init): Provide both @GLIBC_2.0 and @@GLIBC_2.1
6238         versions.
6239         * pt-system.c: Remove duplicate stdlib.h include.
6241 2002-12-16  Ulrich Drepper  <drepper@redhat.com>
6243         * sem_init.c: Define sem_init@GLIBC_2.0.
6244         * sem_destroy.c: Define sem_destroy@GLIBC_2.0.
6245         * sem_getvalue.c: Define sem_getvalue@GLIBC_2.0.
6247         * flockfile.c: Moved to...
6248         * sysdeps/pthread/flockfile.c: ...here.  New file.
6249         * funlockfile.c: Moved to...
6250         * sysdeps/pthread/funlockfile.c: ...here.  New file.
6251         * ftrylockfile.c: Moved to...
6252         * sysdeps/pthread/ftrylockfile.c: ...here.  New file.
6254 2002-12-16  Jakub Jelinek  <jakub@redhat.com>
6256         * libc-cancellation.c: Guard both function with
6257         #if !defined NOT_IN_libc.
6258         * Makefile (libpthread-routines): Use ptw-, not pt- prefix for the
6259         automatically provided pthread wrappers.
6260         * pthreadP.h (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define to
6261         CANCEL_* if IS_IN_libpthread and to dummy versions if not in libc
6262         nor in libpthread.
6263         * pt-open.c: Removed.
6264         * pt-fcntl.c: Removed.
6265         * pt-fsync.c: Removed.
6266         * pt-lseek.c: Removed.
6267         * pt-msgrcv.c: Removed.
6268         * pt-msgsnd.c: Removed.
6269         * pt-msync.c: Removed.
6270         * pt-nanosleep.c: Removed.
6271         * pt-open64.c: Removed.
6272         * pt-pause.c: Removed.
6273         * pt-pread.c: Removed.
6274         * pt-pread64.c: Removed.
6275         * pt-pwrite.c: Removed.
6276         * pt-pwrite64.c: Removed.
6277         * pt-read.c: Removed.
6278         * pt-recv.c: Removed.
6279         * pt-recvfrom.c: Removed.
6280         * pt-recvmsg.c: Removed.
6281         * pt-send.c: Removed.
6282         * pt-sendto.c: Removed.
6283         * pt-sigtimedwait.c: Removed.
6284         * pt-sigwait.c: Removed.
6285         * pt-wait.c: Removed.
6286         * pt-waitpid.c: Removed.
6287         * pt-write.c: Removed.
6288         * pt-accept.c: Removed.
6289         * pt-close.c: Removed.
6290         * pt-connect.c: Removed.
6291         * pt-lseek64.c: Removed.
6292         * pt-sendmsg.c: Removed.
6293         * pt-tcdrain.c: Removed.
6295 2002-12-15  Ulrich Drepper  <drepper@redhat.com>
6297         * init.c (__pthread_initialize_minimal_internal): Renamed from
6298         __pthread_initialize_minimal.  Make old name an alias.  This
6299         converts a normal relocation into a relative relocation.
6301         * pt-fcntl.c (__fcntl): Use fcntl64 syscall, not fcntl.
6303         * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
6304         readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
6305         * Makefile (libpthread-routines): Remove pt-creat, pt-poll,
6306         pt-pselect, pt-readv, pt-select, pt-sigpause, pt-sigsuspend,
6307         pt-sigwaitinfo, pt-waitid, and pt-writev.
6308         * pt-creat.c: Removed.
6309         * pt-poll.c: Removed.
6310         * pt-pselect.c: Removed.
6311         * pt-readv.c: Removed.
6312         * pt-select.c: Removed.
6313         * pt-sigpause.c: Removed.
6314         * pt-sigsuspend.c: Removed.
6315         * pt-sigwaitinfo.c: Removed.
6316         * pt-waitid.c: Removed.
6317         * pt-writev.c: Removed.
6319         * init.c (pthread_functions): New variable.
6320         (__pthread_initialize_minimal): Pass pointer to pthread_functions
6321         (or NULL) to __libc_pthread_init.
6322         * forward.c: Rewrite to use __libc:pthread_functions array to get
6323         function addresses.
6324         * sysdeps/unix/sysv/linux/fork.h: Remove __libc_pthread_init
6325         prototype.
6326         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
6327         Take new parameter.  Copy content of variable pointed to by it
6328         to __libc_pthread_init.
6330         * pthreadP.h (struct pthread_functions): New type.
6331         (__libc_pthread_init): Declare.
6333         * pthread_attr_destroy.c: Add namespace protected alias.
6334         * pthread_attr_getdetachstate.c: Likewise.
6335         * pthread_attr_getinheritsched.c: Likewise.
6336         * pthread_attr_getschedparam.c: Likewise.
6337         * pthread_attr_getschedpolicy.c: Likewise.
6338         * pthread_attr_getscope.c: Likewise.
6339         * pthread_attr_setdetachstate.c: Likewise.
6340         * pthread_attr_setinheritsched.c: Likewise.
6341         * pthread_attr_setschedparam.c: Likewise.
6342         * pthread_attr_setschedpolicy.c: Likewise.
6343         * pthread_attr_setscope.c: Likewise.
6344         * pthread_cond_broadcast.c: Likewise.
6345         * pthread_cond_destroy.c: Likewise.
6346         * pthread_cond_init.c: Likewise.
6347         * pthread_cond_signal.c: Likewise.
6348         * pthread_cond_wait.c: Likewise.
6349         * pthread_condattr_destroy.c: Likewise.
6350         * pthread_condattr_init.c: Likewise.
6351         * pthread_equal.c: Likewise.
6352         * pthread_exit.c: Likewise.
6353         * pthread_getschedparam.c: Likewise.
6354         * pthread_self.c: Likewise.
6355         * pthread_setcancelstate.c: Likewise.
6356         * pthread_setschedparam.c: Likewise.
6357         * pthread_mutex_destroy.c: Likewise.
6358         * pthread_mutex_init.c: Likewise.
6359         * pthreadP.h: Add prototypes for the aliases.
6361         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Set
6362         multiple_threads member in correct TCB to 1.
6364         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define
6365         SINGLE_THREAD_P.  If in libc or libpthread examine multiple_thread
6366         member of thread decriptor, otherwise return unconditionally 1.
6368 2002-12-14  Ulrich Drepper  <drepper@redhat.com>
6370         * sysdeps/unix/sysv/linux/i386/pt-socket.S: Changes folded into the
6371         regular Linux version.  Remove file.
6372         * sysdeps/unix/sysv/linux/connect.S: Likewise.  Remove file.
6373         * sysdeps/unix/sysv/linux/llseek.c: Likewise.  Remove file.
6374         * sysdeps/unix/sysv/linux/msgrcv.c: Likewise.  Remove file.
6375         * sysdeps/unix/sysv/linux/msgsnd.c: Likewise.  Remove file.
6376         * sysdeps/unix/sysv/linux/open64.c: Likewise.  Remove file.
6377         * sysdeps/unix/sysv/linux/poll.c: Likewise.  Remove file.
6378         * sysdeps/unix/sysv/linux/pread.c: Likewise.  Remove file.
6379         * sysdeps/unix/sysv/linux/pread64.c: Likewise.  Remove file.
6380         * sysdeps/unix/sysv/linux/pselect.c: Likewise.  Remove file.
6381         * sysdeps/unix/sysv/linux/pwrite.c: Likewise.  Remove file.
6382         * sysdeps/unix/sysv/linux/pwrite64.c: Likewise.  Remove file.
6383         * sysdeps/unix/sysv/linux/readv.c: Likewise.  Remove file.
6384         * sysdeps/unix/sysv/linux/recv.S: Likewise.  Remove file.
6385         * sysdeps/unix/sysv/linux/recvfrom.S: Likewise.  Remove file.
6386         * sysdeps/unix/sysv/linux/recvmsg.S: Likewise.  Remove file.
6387         * sysdeps/unix/sysv/linux/send.S: Likewise.  Remove file.
6388         * sysdeps/unix/sysv/linux/sendmsg.S: Likewise.  Remove file.
6389         * sysdeps/unix/sysv/linux/sendto.S: Likewise.  Remove file.
6390         * sysdeps/unix/sysv/linux/sigpause.c: Likewise.  Remove file.
6391         * sysdeps/unix/sysv/linux/sigsuspend.c: Likewise.  Remove file.
6392         * sysdeps/unix/sysv/linux/sigtimedwait.c: Likewise.  Remove file.
6393         * sysdeps/unix/sysv/linux/sigwait.c: Likewise.  Remove file.
6394         * sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise.  Remove file.
6395         * sysdeps/unix/sysv/linux/system.c: Likewise.  Remove file.
6396         * sysdeps/unix/sysv/linux/tcdrain.c: Likewise.  Remove file.
6397         * sysdeps/unix/sysv/linux/wait.c: Likewise.  Remove file.
6398         * sysdeps/unix/sysv/linux/waitid.c: Likewise.  Remove file.
6399         * sysdeps/unix/sysv/linux/waitpid.c: Likewise.  Remove file.
6400         * sysdeps/unix/sysv/linux/writev.c: Likewise.  Remove file.
6401         * sysdeps/unix/sysv/linux/i386/fcntl.c: Likewise.  Remove file.
6403 2002-12-14  Jakub Jelinek  <jakub@redhat.com>
6405         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
6406         * sysdeps/unix/sysv/linux/open.c: Removed.
6407         * sysdeps/unix/sysv/linux/fsync.c: Removed.
6408         * sysdeps/unix/sysv/linux/lseek.c: Removed.
6409         * sysdeps/unix/sysv/linux/msync.c: Removed.
6410         * sysdeps/unix/sysv/linux/read.c: Removed.
6411         * sysdeps/unix/sysv/linux/close.c: Removed.
6412         * sysdeps/unix/sysv/linux/creat.c: Removed.
6413         * sysdeps/unix/sysv/linux/nanosleep.c: Removed.
6414         * sysdeps/unix/sysv/linux/pause.c: Removed.
6415         * sysdeps/unix/sysv/linux/select.c: Removed.
6416         * sysdeps/unix/sysv/linux/write.c: Removed.
6418 2002-12-14  Ulrich Drepper  <drepper@redhat.com>
6420         * sysdeps/unix/sysv/linux/i386/pt-socket.S: Check multiple_threads
6421         element in TCB to see whether locking is needed.
6423         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Check that
6424         MULTIPLE_THREADS_OFFSET value is correct.
6426         * sysdeps/unix/sysv/linux/close.c: New file.
6427         * sysdeps/unix/sysv/linux/connect.S: New file.
6428         * sysdeps/unix/sysv/linux/creat.c: New file.
6429         * sysdeps/unix/sysv/linux/fsync.c: New file.
6430         * sysdeps/unix/sysv/linux/llseek.c: New file.
6431         * sysdeps/unix/sysv/linux/lseek.c: New file.
6432         * sysdeps/unix/sysv/linux/msgrcv.c: New file.
6433         * sysdeps/unix/sysv/linux/msgsnd.c: New file.
6434         * sysdeps/unix/sysv/linux/msync.c: New file.
6435         * sysdeps/unix/sysv/linux/nanosleep.c: New file.
6436         * sysdeps/unix/sysv/linux/open.c: New file.
6437         * sysdeps/unix/sysv/linux/open64.c: New file.
6438         * sysdeps/unix/sysv/linux/pause.c: New file.
6439         * sysdeps/unix/sysv/linux/poll.c: New file.
6440         * sysdeps/unix/sysv/linux/pread.c: New file.
6441         * sysdeps/unix/sysv/linux/pread64.c: New file.
6442         * sysdeps/unix/sysv/linux/pselect.c: New file.
6443         * sysdeps/unix/sysv/linux/pwrite.c: New file.
6444         * sysdeps/unix/sysv/linux/pwrite64.c: New file.
6445         * sysdeps/unix/sysv/linux/readv.c: New file.
6446         * sysdeps/unix/sysv/linux/recv.S: New file.
6447         * sysdeps/unix/sysv/linux/recvfrom.S: New file.
6448         * sysdeps/unix/sysv/linux/recvmsg.S: New file.
6449         * sysdeps/unix/sysv/linux/select.c: New file.
6450         * sysdeps/unix/sysv/linux/send.S: New file.
6451         * sysdeps/unix/sysv/linux/sendmsg.S: New file.
6452         * sysdeps/unix/sysv/linux/sendto.S: New file.
6453         * sysdeps/unix/sysv/linux/sigpause.c: New file.
6454         * sysdeps/unix/sysv/linux/sigsuspend.c: New file.
6455         * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
6456         * sysdeps/unix/sysv/linux/sigwait.c: New file.
6457         * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
6458         * sysdeps/unix/sysv/linux/system.c: New file.
6459         * sysdeps/unix/sysv/linux/tcdrain.c: New file.
6460         * sysdeps/unix/sysv/linux/wait.c: New file.
6461         * sysdeps/unix/sysv/linux/waitid.c: New file.
6462         * sysdeps/unix/sysv/linux/waitpid.c: New file.
6463         * sysdeps/unix/sysv/linux/writev.c: New file.
6464         * sysdeps/unix/sysv/linux/i386/fcntl.c: New file.
6466         * pt-readv.c: Fix comment.
6468 2002-12-14  Jakub Jelinek  <jakub@redhat.com>
6470         * tst-cleanup1.c: Include stdlib.h.
6472         * tst-cancel5.c: New test.
6473         * Makefile (tests): Add tst-cancel5.
6474         (tst-cancel5): Link against libc.so libpthread.so in that order.
6476 2002-12-13  Ulrich Drepper  <drepper@redhat.com>
6478         * forward.c (test_loaded): Prevent recursive calls.
6480         * Makefile (routines): Add libc-cancellation.
6481         * libc-cancellation.c: New file.
6482         * descr.h (struct pthread): Add multiple_threads field.
6483         * allocatestack.c (allocate_stack): Initialize multiple_header field of
6484         new thread descriptor to 1.
6485         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread):
6486         Initialize multiple_thread field after successful thread creation.
6487         * cancellation.c (__do_cancel): Move to pthreadP.h.
6488         (__pthread_enable_asynccancel): Remove parameter from __do_cancel call.
6489         (__pthread_disable_asynccancel): Add internal_function attribute.
6490         * init.c (sigcancel_handler): Remove parameter from __do_cancel call.
6491         * pthread_setcancelstate.c: Likewise.
6492         * pthread_setcanceltype.c: Likewise.
6493         * pthread_exit.c: Likewise.
6494         * pthreadP.h (CANCELLATION_P): Likewise.
6495         (__do_cancel): Define as static inline.
6496         (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): New #defines.
6497         (__libc_enable_asynccancel, __libc_disable_asynccancel): New
6498         declarations.
6499         * sysdeps/i386/tls.h (tcbhead_t): Add list and multiple_threads
6500         fields.  Define MULTIPLE_THREADS_OFFSET.
6501         * sysdeps/pthread/bits/libc-lock.h: Remove __libc_locking_needed
6502         declaration.
6503         * sysdeps/unix/sysv/linux/accept.S: New file.
6504         * sysdeps/unix/sysv/linux/read.c: New file.
6505         * sysdeps/unix/sysv/linux/write.c: New file.
6506         * sysdeps/unix/sysv/linux/i386/pt-socket.S: New file.
6507         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove definition and
6508         initialization of __libc_locking_needed.
6509         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't use
6510         __libc_locking_needed, use multiple_threads field in TCB.
6511         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
6513 2002-12-12  Ulrich Drepper  <drepper@redhat.com>
6515         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: Use i486
6516         version.
6517         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: Likewise.
6519         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Correct
6520         access to __libc_locking_needed for PIC.
6522 2002-12-12  Jakub Jelinek  <jakub@redhat.com>
6524         * sysdeps/pthread/bits/libc-lock.h (__libc_locking_needed): Only
6525         declare for libc.so.
6526         (__libc_lock_init, __libc_lock_init_recursive): Change into comma
6527         expression.
6528         (__libc_lock_lock): Put into statement expression.
6529         (__libc_lock_unlock): Remove trailing semicolon.
6530         * sysdeps/unix/sysv/linux/fork.h (__libc_pthread_init): Fix typo.
6532 2002-12-12  Roland McGrath  <roland@redhat.com>
6534         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use asm operand with
6535         "m" constraint to refer to __libc_locking_needed.  Declare it here.
6537 2002-12-12  Ulrich Drepper  <drepper@redhat.com>
6539         * sysdeps/unix/sysv/linux/fork-gen.c: Renamed to...
6540         * sysdeps/unix/sysv/linux/libc_pthread_init.c: ...this.
6541         Initialize __libc_locking_needed.
6542         * init.c (__pthread_initialize_minimal): Call __libc_pthread_init
6543         instead of __register_pthread_fork_handler.
6544         * sysdeps/pthread/bits/libc-lock.h: Declare __libc_locking_needed.
6545         * sysdeps/unix/sysv/linux/Makefile (sysdep_routimes): Replace
6546         fork-gen with libc_pthread_init.
6547         * sysdeps/unix/sysv/linux/Versions: Use __libc_pthread_init instead
6548         of __register_pthread_fork_handler.
6549         * sysdeps/unix/sysv/linux/fork.h: Declare __libc_pthread_init instead
6550         of __register_pthread_fork_handler.
6551         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use
6552         __libc_locking_needed to determine whether lock prefix can be avoided.
6553         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
6555 2002-12-11  Ulrich Drepper  <drepper@redhat.com>
6557         * Makefile (tests): Add tst-cleanup1.
6558         * tst-cleanup1.c: New file.
6559         * cancellation.c (__cleanup_thread): Removed.
6560         (__do_cancel): Remove call to __cleanup_thread.
6561         * pthreadP.h: Remove __cleanup_thread prorotype.
6563         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
6564         Remember function and argument even if cancellation handler
6565         function is not available.
6566         (__libc_cleanup_region_end): Execute registered function directly if
6567         pthread functions are not available.
6568         (__libc_cleanup_end): Likewise.
6570         * init.c (__pthread_initialize_minimal): Fix initialization in
6571         static lib by preventing gcc from being too clever.
6573 2002-12-10  Ulrich Drepper  <drepper@redhat.com>
6575         * init.c (__pthread_initialize_minimal): Remove unneccesary
6576         sigaddset call.
6578         * Makefile (tests): We can run tst-locale2 now.
6580 2002-12-09  Ulrich Drepper  <drepper@redhat.com>
6582         * Versions: Remove duplicated sigwait entry.
6584 2002-12-08  Ulrich Drepper  <drepper@redhat.com>
6586         * pthreadP.h: Enable pthread_cleanup_{push,pop} optimizations only
6587         inside libpthread.
6589         * pt-fcntl.c (__fcntl): Initialize oldtype to avoid warning.
6591         * pthreadP.h: Declare __pthread_enable_asynccancel and
6592         __pthread_disable_asynccancel.
6593         (CANCEL_ASYNC): Use __pthread_enable_asynccancel.
6594         (CANCEL_RESET): Use __pthread_disable_asynccancel.
6595         * cancellation.c (__pthread_enable_asynccancel): New function.
6596         (__pthread_disable_asynccancel): New function.
6597         * pt-accept.c: Adjust for CANCEL_ASYNC and CANCEL_RESET change.
6598         * pt-close.c: Likewise.
6599         * pt-connect.c: Likewise.
6600         * pt-creat.c: Likewise.
6601         * pt-fcntl.c: Likewise.
6602         * pt-fsync.c: Likewise.
6603         * pt-lseek.c: Likewise.
6604         * pt-lseek64.c: Likewise.
6605         * pt-msgrcv.c: Likewise.
6606         * pt-msgsnd.c: Likewise.
6607         * pt-msync.c: Likewise.
6608         * pt-nanosleep.c: Likewise.
6609         * pt-open.c: Likewise.
6610         * pt-open64.c: Likewise.
6611         * pt-pause.c: Likewise.
6612         * pt-poll.c: Likewise.
6613         * pt-pread.c: Likewise.
6614         * pt-pread64.c: Likewise.
6615         * pt-pselect.c: Likewise.
6616         * pt-pwrite.c: Likewise.
6617         * pt-pwrite64.c: Likewise.
6618         * pt-read.c: Likewise.
6619         * pt-readv.c: Likewise.
6620         * pt-recv.c: Likewise.
6621         * pt-recvfrom.c: Likewise.
6622         * pt-recvmsg.c: Likewise.
6623         * pt-select.c: Likewise.
6624         * pt-send.c: Likewise.
6625         * pt-sendmsg.c: Likewise.
6626         * pt-sendto.c: Likewise.
6627         * pt-sigpause.c: Likewise.
6628         * pt-sigsuspend.c: Likewise.
6629         * pt-sigtimedwait.c: Likewise.
6630         * pt-sigwait.c: Likewise.
6631         * pt-sigwaitinfo.c: Likewise.
6632         * pt-system.c: Likewise.
6633         * pt-tcdrain.c: Likewise.
6634         * pt-wait.c: Likewise.
6635         * pt-waitid.c: Likewise.
6636         * pt-waitpid.c: Likewise.
6637         * pt-write.c: Likewise.
6638         * pt-writev.c: Likewise.
6639         * pthread_join.c: Likewise.
6640         * pthread_timedjoin.c: Likewise.
6642         * pt-sigpause.c (sigsuspend): Call __sigsuspend.
6643         (__xpg_sigpause): New function.
6644         * Versions (libpthread:GLIBC_2.3.2): Add __xpg_sigpause.
6646 2002-12-07  Ulrich Drepper  <drepper@redhat.com>
6648         * Makefile (CFLAGS-ftrylockfile.c): Add -D_IO_MTSAFE_IO.
6650         * cleanup.c: Move declarations of _GI_pthread_cleanup_push and
6651         _GI_pthread_cleanup_pop to pthreadP.h.
6653         * ftrylockfile.c: Use _IO_lock_trylock instead of
6654         pthread_mutex_trylock.
6656         * pthreadP.h (CANCEL_ASYNC): Use __pthread_setcanceltype.
6657         (CANCEL_RESET): Likewise.
6658         (__pthread_setcanceltype_): Declare.
6659         (__pthread_mutex_lock_internal): Declare.
6660         (__pthread_mutex_unlock_internal): Declare.
6661         (__pthread_once_internal): Declare.
6662         (pthread_cleanup_push): Redefine using _GI_pthread_cleanup_push.
6663         (pthread_cleanup_pop): Redefine using _GI_pthread_cleanup_pop.
6665         * pthread_cond_timedwait.c: Use INTUSE is calls to pthread_mutex_lock
6666         and pthread_mutex_unlock.
6667         * pthread_cond_wait.c: Likewise.
6668         * pthread_mutex_lock.c: Use INTDEF to define alias if needed.
6669         * pthread_mutex_unlock.c: Likewise.
6671         * pthread_setcanceltype.c: Add additional alias
6672         __pthread_setcanceltype.
6674         * sem_unlink.c (sem_unlink): Use __pthread_once with INTDEF.
6675         * sem_open.c (sem_open): Likewise.
6676         Use __libc_open, __libc_write, and __libc_close instead of
6677         open, write, and close respectively.
6679         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_trylock_internal):
6680         Rewrite as statement expression since it must return a value.
6682         * pthread_cancel.c: Use __pthread_kill instead of pthread_kill.
6683         * sysdeps/unix/sysv/linux/pthread_kill.c: Define additional alias
6684         __pthread_kill.
6686         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Define additional
6687         alias __pthread_once_internal.
6689         * sysdeps/unix/sysv/linux/raise.c: Use libc_hidden_def for raise.
6691 2002-12-06  Ulrich Drepper  <drepper@redhat.com>
6693         * Makefile (tests): Add tst-stdio1 and tst-stdio2.
6694         * tst-stdio1.c: New file.
6695         * tst-stdio2.c: New file.
6697         * init.c (__pthread_initialize_minimal): Correct INIT_LIST_HEAD use.
6699         * Makefile (tests): Comment out tst-locale2 for now.
6700         (CFLAGS-flockfile.c, CFLAGS-funlockfile.c): Define to -D_IO_MTSAFE_IO.
6702         * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-fork.c to
6703         -D_IO_MTSAFE_IO.
6704         * sysdeps/unix/sysv/linux/fork.c: Include <bits/stdio-lock.h>.
6705         Use _IO_lock_init instead of explicit assignment.
6707         * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
6708         Define __libc_lock_* and __libc_lock_recursive macros with
6709         lowlevellock macros, not pthread mutexes.
6711         * flockfile.c: Include <bits/stdio-lock.h>.  Use _IO_lock_lock instead
6712         of pthread_mutex_lock.
6713         * funlockfile.c: Include <bits/stdio-lock.h>.  Use _IO_lock_unlock
6714         instead of pthread_mutex_unlock.
6716 2002-12-06  Roland McGrath  <roland@redhat.com>
6718         * allocatestack.c (__stack_user): Use uninitialized defn.
6719         * init.c (__pthread_initialize_minimal): Initialize it here.
6721 2002-12-05  Roland McGrath  <roland@redhat.com>
6723         * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
6724         string.
6725         * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
6727         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Add
6728         missing & here too.
6730 2002-12-05  Ulrich Drepper  <drepper@redhat.com>
6732         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
6733         lowlevellock.
6734         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: New file.
6735         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: New file.
6736         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: New file.
6737         * sysdeps/pthread/bits/libc-lock.h: Use lowlevellock implementation
6738         for __libc_lock_* macros.
6739         * Makefile (routines): Add libc-lowlevellock.
6741 2002-10-09  Roland McGrath  <roland@redhat.com>
6743         * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
6744         Under [__PIC__], call the function via the pointer fetched for
6745         comparison rather than a call by name that uses the PLT.
6746         (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
6747         (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
6748         (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
6749         (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
6750         (__libc_key_create, __libc_getspecific, __libc_setspecific): Use it.
6752 2002-12-04  Roland McGrath  <roland@redhat.com>
6754         * forward.c (pthread_self): Use FORWARD3 macro to correct return type.
6756         * sysdeps/i386/td_ta_map_lwp2thr.c: Moved from ../nptl_db.
6757         * sysdeps/generic/td_ta_map_lwp2thr.c: New file.
6759         * pthread_create.c (start_thread): Add missing & on __nptl_last_event.
6761 2002-12-04  Ulrich Drepper  <drepper@redhat.com>
6763         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Make pthread_t
6764         a completely opaque, non-integer type.
6765         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6767 2002-12-05  Jakub Jelinek  <jakub@redhat.com>
6769         * sysdeps/i386/tls.h: Include stdlib.h.
6770         * sysdeps/x86_64/tls.h: Likewise.
6772 2002-12-04  Ulrich Drepper  <drepper@redhat.com>
6774         * Makefile (tests): Add tst-locale2.
6775         (tests-static): Likewise.
6776         * tst-locale2.c: New file.
6778         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Mark asms as
6779         volatile and add memory clobbers to lock operations.
6781 2002-12-03  Ulrich Drepper  <drepper@redhat.com>
6783         * sysdeps/i386/i686/bits/atomic.h: Use i486 version.
6784         * sysdeps/i386/i486/bits/atomic.h: New file.
6785         * sysdeps/i386/i586/bits/atomic.h: New file.
6786         * sysdeps/i386/i686/pthread_spin_trylock.S: Define HAVE_CMOV and
6787         include i486 version.
6788         * sysdeps/i386/i486/pthread_spin_trylock.S: New file.
6789         * sysdeps/i386/i586/pthread_spin_trylock.S: New file.
6790         Patch by Marijn Ros <marijn@mad.scientist.com>.
6792         * allocatestack.c (get_cached_stack): Don't crash if we first
6793         found a stack with a larger size then needed.
6794         Reported by Hui Huang <hui.huang@sun.com>.
6796         * Makefile (tests): Add tst-sysconf.
6797         * tst-sysconf.c: New file.
6799         * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine
6800         PTHREAD_THREADS_MAX.
6802 2002-12-02  Roland McGrath  <roland@redhat.com>
6804         * pthreadP.h (__stack_user, __nptl_create_event, __nptl_death_event):
6805         Declare using hidden_proto instead of attribute_hidden, so there are
6806         non-.hidden static symbols for gdb to find.
6807         (__pthread_keys): Likewise.
6808         * events.c (__nptl_create_event, __nptl_death_event): Add hidden_def.
6809         * allocatestack.c (__stack_user): Likewise.
6810         * pthread_create.c (__pthread_keys): Likewise.
6811         (__nptl_threads_events, __nptl_last_event): Make these static instead
6812         of hidden.
6813         * pthread_key_create.c (__pthread_pthread_keys_max,
6814         __pthread_pthread_key_2ndlevel_size): Renamed from __linuxthreads_*.
6816 2002-12-02  Ulrich Drepper  <drepper@redhat.com>
6818         * Makefile (tests): Add tst-locale1.  If buid-static is yes link
6819         statically.
6820         * tst-locale1.c: New file.
6822         * pthread_cond_timedwait.c: Include <stdlib.h>.
6824         * Makefile (tests): Add tst-fork2 and tst-fork3.
6825         * tst-fork2.c: New file.
6826         * tst-fork3.c: New file.
6828 2002-11-28  Ulrich Drepper  <drepper@redhat.com>
6830         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
6832         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
6833         require it to 200112L.
6835         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Use cmov
6836         instruction only if HAVE_CMOV is defined.
6837         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Define HAVE_CMOV.
6839         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: New file.
6841         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: New file.
6843         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: New file.
6845         * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: New file.
6847 2002-11-27  Ulrich Drepper  <drepper@redhat.com>
6849         * sysdeps/x86_64/bits/atomic.h: New file.
6851         * sysdeps/i386/i686/bits/atomic.h: Fix asm syntax for 8- and
6852         16-bit operations.
6854         * sysdeps/unix/sysv/linux/raise.c (raise): Use INTERNAL_SYSCALL if
6855         possible since gettid cannot fail.
6857         * sysdeps/x86_64/pthreaddef.h: New file.
6859         * sysdeps/i386/pthreaddef.h (gettid): Removed.
6861         * sysdeps/x86_64/pthread_spin_init.c: New file.
6862         * sysdeps/x86_64/pthread_spin_lock.c: New file.
6863         * sysdeps/x86_64/pthread_spin_trylock.c: New file.
6864         * sysdeps/x86_64/pthread_spin_unlock.c: New file.
6866         * sysdeps/i386/i686/pthread_spin_trylock.S (pthread_spin_trylock):
6867         Add missing lock prefix.  Minute optimization.
6869         * tst-spin2.c (main): Also check successful trylock call.
6871         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use correct
6872         syscall.  Fix typo in case INTERNAL_SYSCALL is not used.
6874         * sysdeps/i386/pthread_spin_destroy.c: Moved to...
6875         * sysdeps/pthread/pthread_spin_destroy.c: ...here.  New file.
6877         * sysdeps/i386/pthread_sigmask.c: Removed.  Use the generic code.
6878         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Return correct
6879         value in case of an error.  Add support for INTERNAL_SYSCALL.
6881         * sysdeps/i386/pthread_sigmask.c (pthread_sigmask): Return correct
6882         value in case of an error.
6884         * sysdeps/x86_64/tls.h: New file.
6886 2002-11-26  Ulrich Drepper  <drepper@redhat.com>
6888         * sysdeps/i386/tls.h (THREAD_GETMEM_NC): Change interface.  It now
6889         takes the array member name and the index as parameters.
6890         (THREAD_SETMEM_NC): Likewise.
6891         * pthread_getspecific.c: Use new THREAD_GETMEM_NC interface.
6892         * pthread_setspecific.c: Use new THREAD_GETMEM_NC and THREAD_SETMEM_NC
6893         interfaces.
6895         * sysdeps/i386/tls.h (THREAD_SETMEM): Use size of member element
6896         to decide which code to use.
6897         (THREAD_SETMEM_NC): Likewise.
6899         * allocatestack.c (queue_stack): Don't remove stack from list here.
6900         Do it in the caller.  Correct condition to prematurely terminate
6901         loop to free stacks.
6902         (__deallocate_stack): Remove stack from list here.
6904 2002-11-26  Ulrich Drepper  <drepper@redhat.com>
6906         * Makefile (tests): Add tst-stack1.
6907         * tst-stack1.c: New file.
6909         * allocatestack.c (allocate_stack): Initialize the TCB on a user
6910         provided stack.
6912         * pthread_attr_getstack.c: Return bottom of the thread area.
6914 2002-11-25  Ulrich Drepper  <drepper@redhat.com>
6916         * Makefile (libpthread-routines): Add pt-allocrtsig and
6917         pthread_kill_other_threads.
6918         * pt-allocrtsig.c: New file.
6919         * pthread_kill_other_threads.c: New file.
6920         * sysdeps/unix/sysv/linux/allocrtsig.c: Add additional aliases for
6921         all three functions.
6922         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
6923         allocrtsig.
6924         * sysdeps/unix/sysv/linux/Versions (libc:GLIBC_PRIVATE): Export
6925         __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
6926         and __libc_allocate_rtsig_private.
6927         * Versions (libpthread): Export pthread_kill_other_threads_np,
6928         __libc_current_sigrtmin, and __libc_current_sigrtmax.
6930 2002-11-24  Ulrich Drepper  <drepper@redhat.com>
6932         * allocatestack.c (allocate_stack): stackaddr in attribute points to
6933         the end of the stack.  Adjust computations.
6934         When mprotect call fails dequeue stack and free it.
6935         * pthread_attr_setstack.c: Store top of the stack in stackaddr
6936         attribute.
6937         * pthread_getattr_np.c: Likewise.
6939         * descr.h (IS_DETACHED): Add some more parenthesis to prevent
6940         surprises.
6942 2002-11-23  Ulrich Drepper  <drepper@redhat.com>
6944         * sysdeps/pthread/pthread.h (pthread_self): __THROW must come before
6945         attribute definitions.  Patch by Luca Barbieri <ldb@ldb.ods.org>.
6947 2002-11-22  Ulrich Drepper  <drepper@redhat.com>
6949         * pthread_getspecific.c: Optimize access to first 2nd-level array.
6950         * pthread_setspecific.c: Likewise.
6952 2002-11-21  Ulrich Drepper  <drepper@redhat.com>
6954         * sysdeps/unix/sysv/linux/i386/createthread.c: Remove CLONE_ flags
6955         definitions.  Get them from the official place.
6956         * sysdeps/unix/sysv/linux/i386/fork.c: Likewise.
6958         * sysdeps/unix/sysv/linux/i386/createthread.c: Update CLONE_* flags.
6959         Use new CLONE_ flags in clone() calls.
6961         * sysdeps/unix/sysv/linux/fork.c: Use ARCH_FORK to actually fork.
6962         * sysdeps/unix/sysv/linux/i386/fork.c: New file.
6964         * Versions: Add pthread_* functions for libc.
6965         * forward.c: New file.
6967         * sysdeps/pthread/Makefile (libpthread-sysdeps_routines): Add
6968         errno-loc.
6969         * herrno.c: New file.
6970         * res.c: New file.
6972         * Makefile (libpthread-routines): Remove sem_post, sem_wait,
6973         sem_trywait, and sem_timedwait.  Add herrno and res.
6974         * sem_init.c: Don't initialize lock and waiters members.
6975         * sem_open.c: Likewise.
6976         * sem_post.c: Removed.
6977         * sem_wait.c: Removed.
6978         * sem_trywait.c: Removed.
6979         * sem_timedwait.c: Removed.
6980         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Complete rewrite.
6981         Includes full implementations of sem_post, sem_wait, sem_trywait,
6982         and sem_timedwait.
6983         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Adjust
6984         for new implementation.
6985         * sysdeps/unix/sysv/linux/internaltypes.h (struct sem): Remove lock
6986         and waiters fields.
6988         * tst-sem3.c: Improve error message.
6989         * tst-signal3.c: Likewise.
6991         * init.c (__pthread_initialize_minimal): Use set_tid_address syscall
6992         to tell the kernel about the termination futex and to initialize tid
6993         member.  Don't initialize main_thread.
6994         * descr.h (struct pthread): Remove main_thread member.
6995         * cancelllation.c (__do_cancel): Remove code handling main thread.
6996         The main thread is not special anymore.
6998         * allocatestack.c (__reclaim_stacks): Mark stacks as unused.  Add
6999         size of the stacks to stack_cache_actsize.
7001         * pt-readv.c: Add missing "defined".
7002         * pt-sigwait.c: Likewise.
7003         * pt-writev.c: Likewise.
7005 2002-11-09  Ulrich Drepper  <drepper@redhat.com>
7007         * Versions: Export __connect from libpthread.
7008         Patch by Luca Barbieri <ldb@ldb.ods.org>.
7010         * Makefile (libpthread-routines): Add pt-raise.
7011         * sysdeps/unix/sysv/linux/raise.c: New file.
7012         * sysdeps/unix/sysv/linux/pt-raise.c: New file.
7013         * sysdeps/generic/pt-raise.c: New file.
7015         * pthread_cond_init.c: Initialize all data elements of the condvar
7016         structure.  Patch by Luca Barbieri <ldb@ldb.ods.org>.
7018         * pthread_attr_init.c: Actually implement 2.0 compatibility version.
7019         * pthread_create.c: Likewise.
7021         * Makefile (tests): Add tst-key1, tst-key2, tst-key3.
7022         * tst-key1.c: New file.
7023         * tst-key2.c: New file.
7024         * tst-key3.c: New file.
7026         * Versions: Export pthread_detach for version GLIBC_2.0.
7027         Reported by Saurabh Desai <sdesai@austin.ibm.com>.
7029 2002-11-08  Ulrich Drepper  <drepper@redhat.com>
7031         * pthread_key_create.c: Terminate search after an unused key was found.
7032         Patch by Luca Barbieri <ldb@ldb.ods.org>.
7034         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Return zero.
7035         Patch by Luca Barbieri <ldb@ldb.ods.org>.
7037 2002-10-10  Ulrich Drepper  <drepper@redhat.com>
7039         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Use slow generic
7040         dynamic lookup for errno in PIC.
7042         * allocatestack.c (get_cached_stack): Rearrange code slightly to
7043         release the stack lock as soon as possible.
7044         Call _dl_allocate_tls_init for TCB from the cache to re-initialize
7045         the static TLS block.
7046         (allocate_stack): Call _dl_allocate_tls_init for user-provided stack.
7048         * cancellation.c: Renamed from cancelation.c.
7049         * Makefile: Adjust accordingly.
7050         * pthreadP.h (CANCELLATION_P): Renamed from CANCELATION_P.
7051         * cleanup_defer.c: Use CANCELLATION_P.
7052         * pthread_testcancel.c: Likewise.
7053         * descr.h: Fix spelling in comments.
7054         * init.c: Likewise.
7055         * pthread_getattr_np.c: Likewise.
7056         * pthread_getschedparam.c: Likewise.
7057         * pthread_setschedparam.c: Likewise.
7058         * Versions: Likewise.
7060         * pt-pselect.c: New file.
7061         * Makefile (libpthread-routines): Add pt-pselect.
7062         * Versions: Add pselect.
7064         * tst-cancel4.c: New file.
7065         * Makefile (tests): Add tst-cancel4.
7067 2002-10-09  Ulrich Drepper  <drepper@redhat.com>
7069         * pthread_mutex_lock.c: Always record lock ownership.
7070         * pthread_mutex_timedlock.c: Likewise.
7071         * pthread_mutex_trylock.c: Likewise.
7073         * pt-readv.c: New file.
7074         * pt-writev.c: New file.
7075         * pt-creat.c: New file.
7076         * pt-msgrcv.c: New file.
7077         * pt-msgsnd.c: New file.
7078         * pt-poll.c: New file.
7079         * pt-select.c: New file.
7080         * pt-sigpause.c: New file.
7081         * pt-sigsuspend.c: New file.
7082         * pt-sigwait.c: New file.
7083         * pt-sigwaitinfo.c: New file.
7084         * pt-waitid.c: New file.
7085         * Makefile (libpthread-routines): Add pt-readv, pt-writev, pt-creat,
7086         pt-msgrcv, pt-msgsnd, pt-poll, pt-select, pt-sigpause, pt-sigsuspend,
7087         pt-sigwait, pt-sigwaitinfo, and pt-waitid.
7088         * Versions: Add all the new functions.
7090         * tst-exit1.c: New file.
7091         * Makefile (tests): Add tst-exit1.
7093         * sem_timedwait.c: Minor optimization for more optimal fastpath.
7095 2002-10-08  Ulrich Drepper  <drepper@redhat.com>
7097         * pt-fcntl.c: Only enable asynchronous cancellation for F_SETLKW.
7099         * pthread_join.c: Enable asynchronous cancellation around lll_wait_tid
7100         call.  pthread_join is an official cancellation point.
7101         * pthread_timedjoin.c: Likewise.
7103         * pthread_cond_wait.c: Revert order in which internal lock are dropped
7104         and the condvar's mutex are retrieved.
7105         * pthread_cond_timedwait.c: Likewise.
7106         Reported by dice@saros.East.Sun.COM.
7108 2002-10-07  Ulrich Drepper  <drepper@redhat.com>
7110         * pthreadP.h: Cut out all type definitions and move them...
7111         * sysdeps/unix/sysv/linux/internaltypes.h: ...here.  New file.
7112         * pthreadP.h: Include <internaltypes.h>.
7114         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Little
7115         performance tweaks.
7117         * sem_trywait.c: Shuffle #includes around to get right order.
7118         * sem_timedwait.c: Likewise.
7119         * sem_post.c: Likewise.
7120         * sem_wait.c: Likewise.
7122         * nptl 0.3 released.
7124         * Makefile (tests): Add tst-signal3.
7125         * tst-signal3.c: New file.
7127 2002-10-05  Ulrich Drepper  <drepper@redhat.com>
7129         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Tell the compiler that
7130         the asms modify the sem object.
7131         (__lll_sem_timedwait): Now takes struct sem* as first parameter.
7133         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h (sem_t): Don't expose
7134         the actual members.
7135         * pthreadP.h (struct sem): New type.  Actual semaphore type.
7136         * semaphoreP.h: Include pthreadP.h.
7137         * sem_getvalue.c: Adjust to sem_t change.
7138         * sem_init.c: Likewise.
7139         * sem_open.c: Likewise.
7140         * sem_post.c: Likewise.
7141         * sem_timedwait.c: Likewise.
7142         * sem_trywait.c: Likewise.
7143         * sem_wait.c: Likewise.
7145 2002-10-04  Ulrich Drepper  <drepper@redhat.com>
7147         * Makefile (tests): Add tst-basic2, tst-exec1, tst-exec3, tst-exec3.
7148         * tst-basic2.c: New file.
7149         * tst-exec1.c: New file.
7150         * tst-exec2.c: New file.
7151         * tst-exec3.c: New file.
7153         * tst-fork1.c: Remove extra */.
7155         * nptl 0.2 released.  The API for IA-32 is complete.