iconv mapping of 0xA8 0xEC in CP1258 is non-canonical
[glibc.git] / nptl / ChangeLog
blobe8ff69ab008053a5e11954adc99148d0291db8fe
1 2011-12-22  Ulrich Drepper  <drepper@gmail.com>
3         * sysdeps/pthread/gai_misc.h (__gai_create_helper_thread): Use
4         __pthread_get_minstack.
5         * sysdeps/unix/sysv/linux/mq_notify.c (init_mq_netlink): Likewise.
7         [BZ #13088]
8         * sysdeps/unix/sysv/linux/timer_routines.c: Get minimum stack size
9         through __pthread_get_minstack.
10         * nptl-init.c (__pthread_initialize_minimal_internal): Get page size
11         directly from _rtld_global_ro.
12         (__pthread_get_minstack): New function.
13         * pthreadP.h: Declare __pthread_get_minstack.
14         * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_get_minstack.
16 2011-12-21  Ulrich Drepper  <drepper@gmail.com>
18         [BZ #13515]
19         * sysdeps/unix/sysv/linux/pthread_getname.c (pthread_getname_np):
20         Correct reading name from file.
22 2011-12-14  Carlos O'Donell  <carlos@systemhalted.org>
24         * allocatestack.c (allocate_stack): Return errno on failure.
26 2011-12-14  Jeff Law  <law@redhat.com>
28         [BZ #5245]
29         * pthread_create.c (__pthread_create_2_1): Translate ENOMEM to EAGAIN.
31 2011-11-28  Andreas Schwab  <schwab@redhat.com>
33         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Handle
34         EAGAIN from FUTEX_WAIT_REQUEUE_PI.
35         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
37 2011-11-15  Ulrich Drepper  <drepper@gmail.com>
39         * pthread_getattr_np.c (pthread_getattr_np): Set FD_CLOEXEC for
40         /proc/self/maps.
42 2011-10-29  Ulrich Drepper  <drepper@gmail.com>
44         [BZ #13358]
45         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
46         (__pthread_cond_timedwait): Initialize %r15 correctly also for code
47         path for kernels with FUTEX_CLOCK_REALTIME.
48         Debugged by H.J. Lu <hjl.tools@gmail.com>.
50 2011-10-27  Andreas Schwab  <schwab@redhat.com>
52         [BZ #13344]
53         * sysdeps/pthread/pthread.h: Use __THREADNL instead of __THREAD
54         for memory synchronization functions.
55         * semaphore.h: Likewise.
57 2011-10-24  Ulrich Drepper  <drepper@gmail.com>
59         * tst-cancel7.c: Avoid warning.
60         * tst-mutex6.c: Likewise.
61         * tst-mutex9.c: Likewise.
62         * tst-mutexpi6.c: Likewise.
64 2011-10-23  Ulrich Drepper  <drepper@gmail.com>
66         * sysdeps/i386/tls.h: Remove #include <list.h>.
68 2011-10-15  Ulrich Drepper  <drepper@gmail.com>
70         * pthread_create.c (start_thread): Call __ctype_init.
72 2011-09-15  Andreas Schwab  <schwab@redhat.com>
74         * sysdeps/pthread/list.h: Define only list_t if __need_list_t is
75         defined.
76         (list_add): Add atomic_write_barrier.
77         * descr.h: Define __need_list_t before including <list.h>.
78         * nptl-init.c: Include <list.h>
79         * allocatestack.c: Likewise.
81 2011-09-11  Ulrich Drepper  <drepper@gmail.com>
83         * sysdeps/i386/tls.h: Remove HAVE_TLS_SUPPORT test.
84         * sysdeps/ia64/tls.h: Likewise.
85         * sysdeps/powerpc/tls.h: Likewise.
86         * sysdeps/s390/tls.h: Likewise.
87         * sysdeps/sh/tls.h: Likewise.
88         * sysdeps/sparc/tls.h: Likewise.
89         * sysdeps/x86_64/tls.h: Likewise.
91 2011-09-10  Ulrich Drepper  <drepper@gmail.com>
93         * sysdeps/pthread/malloc-machine.h: Define MUTEX_INITIALIZER.
95         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Don't handle
96         !USE___THREAD.
97         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
98         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
99         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
100         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
101         * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
102         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
103         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
104         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
105         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
106         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
107         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
108         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
110         * tst-tls1.c: Support for __thread is now mandatory.
111         * tst-tls2.c: Likewise.
112         * tst-tls3.c: Likewise.
113         * tst-tls3mod.c: Likewise.
114         * tst-tls4.c: Likewise.
115         * tst-tls4moda.c: Likewise.
116         * tst-tls4modb.c: Likewise.
117         * tst-tls5.h: Likewise.
119 2011-09-08  Ulrich Drepper  <drepper@gmail.com>
121         [BZ #12403]
122         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
123         (pthread_rwlock_timedwrlock): Use correct macro in test.
124         Patch by H.J. Lu <hongjiu.lu@intel.com>.
126 2011-09-06  Ulrich Drepper  <drepper@gmail.com>
128         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait): Don't
129         use gettimeofday vsyscall, just call gettimeofday.
130         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
131         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
132         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
133         Likewise.
134         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
135         Likewise.
136         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
137         Simplify __vdso_clock_gettime use.
139 2011-09-05  David S. Miller  <davem@davemloft.net>
141         * sysdeps/unix/sysv/linux/sem_timedwait.c (do_futex_timed_wait):
142         New function.
143         (sem_timedwait): Call it to force an exception region around
144         the async cancel enable and the futex operation.
145         * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c: Likewise.
146         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: Likewise.
147         * sysdeps/unix/sysv/linux/sem_wait.c (do_futex_wait): New function.
148         (__new_sem_wait): Call it to force an exception region around
149         the async cancel enable and the futex operation.
150         * sysdeps/unix/sysv/linux/sparc/sem_wait.c: Likewise.
151         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: Likewise.
153 2011-08-31  Andreas Schwab  <schwab@redhat.com>
155         * allocatestack.c (setxid_mark_thread): Ensure that the exiting
156         thread is woken up.
158 2011-08-20  David S. Miller  <davem@davemloft.net>
160         * Makefile (tst-cleanup0.out): Fix typo in output redirection.
162 2011-08-14  Roland McGrath  <roland@hack.frob.com>
164         * sysdeps/i386/pthreaddef.h (TCB_ALIGNMENT): Set to 64, optimal on Atom.
165         * sysdeps/x86_64/pthreaddef.h (TCB_ALIGNMENT): Likewise.
167 2011-08-08  Andreas Schwab  <schwab@redhat.com>
169         * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Maintain aligned
170         stack.
171         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
172         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
174 2011-07-22  Ulrich Drepper  <drepper@gmail.com>
176         * sysdeps/pthread/unwind-forcedunwind.c (_Unwind_Resume): Add read
177         barrier.
178         (__gcc_personality_v0): Likewise.
179         (_Unwind_ForcedUnwind): Likewise.
180         (_Unwind_GetCFA): Likewise.
182 2011-07-14  Roland McGrath  <roland@hack.frob.com>
184         * allocatestack.c (__reclaim_stacks): Use uintptr_t cast rather than
185         UINTMAX_C.
187 2011-06-30  Ulrich Drepper  <drepper@gmail.com>
189         * nptl-init.c (__nptl_set_robust): New function.
190         (pthread_functions): Add reference.
191         * npthreadP.h: Declare __nptl_set_robust.
192         * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
193         ptr_set_robust member.
194         * sysdeps/unix/sysv/linux/fork.c: Call set_robust_list syscall in
195         child if threads are used.
197 2011-06-14  Andreas Jaeger  <aj@suse.de>
199         * pthread_rwlock_init.c: Include <string.h> for memset declaration.
201 2011-05-11  Ulrich Drepper  <drepper@gmail.com>
203         [BZ #386]
204         * allocatestack.c (allocate_stack): Convert ENOMEM error to EAGAIN.
206 2011-04-10  Ulrich Drepper  <drepper@gmail.com>
208         [BZ #12650]
209         * allocatestack.c (get_cached_stack): Deallocate DTV entries before
210         clearing memory.
211         Patch partly by Robert Rex <robert.rex@exasol.com>.
213 2011-01-19  Roland McGrath  <roland@redhat.com>
215         * pthread_cond_wait.c (__pthread_cond_wait): Fix comment typo.
216         * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
217         * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Likewise.
218         * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
219         * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock): Likewise.
220         * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock): Likewise.
222 2011-01-16  Andreas Schwab  <schwab@linux-m68k.org>
224         * Makefile (test-extras): Add tst-cleanup4aux.
226 2011-01-14  Ulrich Drepper  <drepper@gmail.com>
228         [BZ #10563]
229         * sysdeps/pthread/setxid.h (__SETXID_1): Add cast to assignment.
230         (__SETXID_2): Likewise.
231         (__SETXID_3): Likewise.
233 2011-01-13  Ulrich Drepper  <drepper@gmail.com>
235         [BZ #10484]
236         * Versions [libc] (GLIBC_PRIVATE): Export __libc_alloca_cutoff.
237         * alloca_cutoff.c: Add libc_hidden_def.
239 2010-10-13  H.J. Lu  <hongjiu.lu@intel.com>
241         [BZ #12113]
242         * sysdeps/x86_64/pthreaddef.h (TCB_ALIGNMENT): Changed to 32.
243         * sysdeps/x86_64/tls.h (TLS_TCB_ALIGN): Defined with alignment
244         of "struct pthread".
246 2010-09-21  Andreas Schwab  <schwab@redhat.com>
248         * sysdeps/pthread/pthread.h (pthread_cleanup_push)
249         [!__EXCEPTIONS]: Mangle local variable not_first_call.
250         (pthread_cleanup_push_defer_np): Likewise.
252 2010-09-03  Ulrich Drepper  <drepper@redhat.com>
254         * sysdeps/pthread/allocalim.h (__libc_use_alloca): Expect blocks are
255         small.
257 2010-08-10  Dinakar Guniguntala  <dino@in.ibm.com>
258             Stefan Hajnoczi  <stefanha@linux.vnet.ibm.com>
260         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: If
261         FUTEX_WAKE_OP fails make sure to call FUTEX_WAKE instead.
263 2010-08-12  H.J. Lu  <hongjiu.lu@intel.com>
265         * sysdeps/unix/sysv/linux/i386/Makefile: New file.
267 2010-05-01  Alan Modra  <amodra@gmail.com>
269         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
270         (PSEUDO): Use correct cr save.  Don't use wrong parm save area
271         to save temps.  Correct cfi for possible later frame manipulation.
272         (DOCARGS_1, UNDOCARGS_1): Use the correct parm save area.
273         (DOCARGS_2, UNDOCARGS_2, DOCARGS_3, UNDOCARGS_3): Likewise.
274         (DOCARGS_4, UNDOCARGS_4, DOCARGS_5, UNDOCARGS_5): Likewise.
275         (DOCARGS_6, UNDOCARGS_6): Likewise.
276         (CENABLE, CDISABLE): Add nops for non-shared calls.
278 2010-07-06  Andreas Schwab  <schwab@redhat.com>
280         * sysdeps/unix/sysv/linux/pthread_getname.c (pthread_getname_np):
281         Fix type mismatch.
283 2010-07-03  Ulrich Drepper  <drepper@redhat.com>
285         * tst-abstime.c (do_test): Some more cleanups
287 2010-07-02  Ulrich Drepper  <drepper@redhat.com>
289         * tst-abstime.c: Correct testing and add test for sem_timedwait.
291 2010-07-01  Andreas Schwab  <schwab@redhat.com>
292             Ulrich Drepper  <drepper@redhat.com>
294         * Makefile (tests): Add tst-abstime.
295         * tst-abstime.c: New file.
296         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
297         (__lll_timedlock_wait): Check for timestamp before the Epoch.
298         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
299         (__lll_timedlock_wait): Likewise.
300         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
301         (__lll_robust_timedlock_wait): Likewise.
302         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
303         (__pthread_cond_timedwait): Likewise.
304         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
305         (pthread_rwlock_timedrdlock): Likewise.
306         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
307         (pthread_rwlock_timedwrlock): Likewise.
308         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
309         Likewise.
311 2010-07-01  Ulrich Drepper  <drepper@redhat.com>
313         * Makefile (tst-_res1): Add tst-_res1mod1 to dependency list.
315 2010-06-01  Takashi Yoshii  <takashi.yoshii.zj@renesas.com>
317         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Fix incorrect
318         location of ifndef __ASSUME_FUTEX_CLOCK_REALTIME.
320 2010-04-09  Ulrich Drepper  <drepper@redhat.com>
322         [BZ #11390]
323         * sysdeps/unix/sysv/linux/pthread_getname.c: New file.
324         * sysdeps/unix/sysv/linux/pthread_setname.c: New file.
325         * nptl/sysdeps/pthread/pthread.h: Declare pthread_getname and
326         pthread_setname.
327         * Makefile (libpthread-routines): Add pthread_getname and
328         pthread_setname.
329         * Versions: Export pthread_getname and pthread_setname for GLIBC_2.12.
331 2010-04-05  Thomas Schwinge  <thomas@schwinge.name>
333         * sysdeps/pthread/unwind-resume.c: Moved to main tree sysdeps/gnu/.
334         * sysdeps/pthread/rt-unwind-resume.c: Likewise.
335         * sysdeps/pthread/Makefile: Remove csu section and rt section's
336         unwind-resume bits, now in main tree sysdeps/gnu/Makefile instead.
338 2010-03-23  Luis Machado  <luisgpm@br.ibm.com>
340         * pthread_cond_timedwait.c: Add check for
341         HAVE_CLOCK_GETTIME_VSYSCALL to use VDSO whenever possible.
342         (pthread_cond_timedwait): Use INTERNAL_VSYSCALL instead of
343         INTERNAL_SYSCALL.
345 2010-03-09  Ulrich Drepper  <drepper@redhat.com>
347         * pthread_create.c (__pthread_create_2_1): If priorities are incorrect
348         and the call fails wake eventually waiting setxid threads.  Don't free
349         stack here if we try starting a thread.
350         * sysdeps/pthread/createthread.c (do_clone): Only wake setxid waiter
351         if the clone call failed.
353 2010-03-08  Andreas Schwab  <schwab@redhat.com>
355         * pthread_create.c (__pthread_create_2_1): Don't set setxid_futex.
356         * allocatestack.c (get_cached_stack): Set setxid_futex.
357         (allocate_stack): Likewise.
359 2010-03-05  Andreas Schwab  <schwab@redhat.com>
360             Ulrich Drepper  <drepper@redhat.com>
362         * allocatestack.c (setxid_mark_thread): Delay handling of thread if
363         it is creating a thread or it is just being created.
364         * pthread_create.c (start_thread): Wake setxid thread if it is
365         waiting.
366         (__pthread_create_2_1): Initialize setxid_futex.
367         * sysdeps/pthread/createthread.c (do_clone): Wake setxid thread if it
368         is waiting.
370 2010-01-15  Ulrich Drepper  <drepper@redhat.com>
372         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
373         Fix unwind info.
374         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
376 2010-01-15  Michal Schmidt  <mschmidt@redhat.com>
378         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
379         Fix pthread_cond_timedwait with requeue-PI.
380         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
381         Fix pthread_cond_wait with requeue-PI.
383 2010-01-14  Ulrich Drepper  <drepper@redhat.com>
385         * Versions: Add pthread_mutex_consistent, pthread_mutexattr_getrobust,
386         and pthread_mutexattr_setrobust for GLIBC_2.12.
387         * pthread_mutex_consistent.c: Define alias pthread_mutex_consistent.
388         * pthread_mutexattr_getrobust.c: Define alias
389         pthread_mutexattr_getrobust.
390         * pthread_mutexattr_setrobust.c: Define alias
391         pthread_mutexattr_setrobust.
393 2010-01-12  Ulrich Drepper  <drepper@redhat.com>
395         * sysdeps/pthread/pthread.h: Cleanup.  Fix up for XPG7.
397 2010-01-08  Ulrich Drepper  <drepper@redhat.com>
399         * sysdeps/pthread/pthread.h: Fix pthread_mutex_consistent declaration.
401 2009-12-18  Thomas Schwinge  <thomas@codesourcery.com>
403         * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c (_init): Don't
404         call __gmon_start__.
405         * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c (_init): Likewise.
407 2009-12-17  Ulrich Drepper  <drepper@redhat.com>
409         * pthread_rwlock_init.c (__pthread_rwlock_init): Simplify code by
410         using memset.
412 2009-12-01  Dinakar Guniguntala  <dino@in.ibm.com>
414         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.h: Define
415         FUTEX_WAIT_REQUEUE_PI and FUTEX_CMP_REQUEUE_PI.
416         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: If mutex
417         is a non robust PI mutex, then use FUTEX_CMP_REQUEUE_PI.
418         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
419         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: If mutex
420         is a non robust PI mutex, then use FUTEX_WAIT_REQUEUE_PI.
421         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
423 2009-12-12  Ulrich Drepper  <drepper@redhat.com>
425         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
426         Don't update nwaiters after invalid timeout is recognized.
428 2009-11-27  Thomas Schwinge  <thomas@codesourcery.com>
430         * sysdeps/unix/sysv/linux/sh/pt-initfini.c (_init): Don't call
431         __gmon_start__.
433 2009-11-27  Andreas Schwab  <schwab@redhat.com>
435         * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Reload
436         THREAD_SELF->cancelhandling after returning from futex call.
438 2009-11-24  Ulrich Drepper  <drepper@redhat.com>
440         * tst-sem13.c: New file.
441         * Makefile (tests): Add tst-sem13.
443 2009-11-22  Roland McGrath  <roland@redhat.com>
445         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: # include "i686/dl-sysdep.h"
446         instead of recapitulating its contents.
448 2009-11-18  Ulrich Drepper  <drepper@redhat.com>
450         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Minor
451         optimizations and cleanups.
453 2009-11-18  Dinakar Guniguntala  <dino@in.ibm.com>
455         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
456         Remove redundant code. Fix cfi offsets.
457         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
458         Fix cfi offsets.
460 2009-11-17  Ulrich Drepper  <drepper@redhat.com>
462         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Minimally
463         reduce size of unwind info.
465         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Convert to use
466         cfi directives.
467         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
468         Based on a patch by Dinakar Guniguntala <dino@in.ibm.com>.
470 2009-11-03  Andreas Schwab  <schwab@linux-m68k.org>
472         [BZ #4457]
473         * sysdeps/pthread/unwind-resume.c: Include <libgcc_s.h> and use
474         LIBGCC_S_SO.
475         * sysdeps/pthread/unwind-forcedunwind.c: Likewise.
477 2009-10-30  Ulrich Drepper  <drepper@redhat.com>
479         * tst-sem11.c (main): Rewrite to avoid aliasing problems.
481         [BZ #3270]
482         * allocatestack.c (__nptl_setxid): Perform the operation in multiple
483         steps to avoid races with creation and terminations.
484         * nptl-init.c (sighandler_setxid): Adjust.
485         Patch by Daniel Jacobowitz.
487 2009-09-07  Andreas Schwab  <schwab@redhat.com>
489         * sysdeps/pthread/bits/libc-lock.h (BP_SYM): Remove space before paren.
491 2009-09-02  Suzuki K P  <suzuki@in.ibm.com>
492             Joseph Myers  <joseph@codesourcery.com>
494         [BZ #7094]
495         * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
496         Initialize the sigev_notify field for newly created timer to make sure
497         the timer gets deleted from the active timer's list upon timer_delete.
499 2009-08-27  Andrew Stubbs  <ams@codesourcery.com>
501         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
502         Correct a logic error.
504 2009-08-25  Ulrich Drepper  <drepper@redhat.com>
506         * sysdeps/x86_64/tls.h (RTLD_ENABLE_FOREIGN_CALL): Store old value
507         of the field in local variables.
508         (RTLD_FINALIZE_FOREIGN_CALL): Restore rtld_must_xmm_save from local
509         variable and don't unconditionally clear it.
511 2009-08-24  Ulrich Drepper  <drepper@redhat.com>
513         * pthread_create.c (start_thread): Hint to the kernel that memory for
514         the stack can be reused.  We do not mark all the memory.  The part
515         still in use and some reserve are kept.
517 2009-08-23  Ulrich Drepper  <drepper@redhat.com>
519         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Clean up namespace.
521 2009-08-11  Ulrich Drepper  <drepper@redhat.com>
523         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Add CFI
524         directives.
526 2009-08-10  Ulrich Drepper  <drepper@redhat.com>
528         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Add CFI
529         directives.
530         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
532 2009-08-10  Andreas Schwab  <schwab@redhat.com>
534         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
535         (__pthread_cond_signal): Don't clobber register used for syscall
536         number.
538 2009-08-08  Ulrich Drepper  <drepper@redhat.com>
540         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
541         Optimize code path used when FUTEX_CLOCK_REALTIME is supported.
543         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
544         (__pthread_cond_wait): Optimize by avoiding use of callee-safe
545         register.
547 2009-08-07  Ulrich Drepper  <drepper@redhat.com>
549         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Little optimizations
550         enabled by the special *_asynccancel functions.
551         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
552         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
554         * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Include lowlevellock.h.
556 2009-08-04  Ulrich Drepper  <drepper@redhat.com>
558         * sysdeps/unix/sysv/linux/x86_64/cancellation.S: New file.
559         * sysdeps/unix/sysv/linux/x86_64/libc-cancellation.S: New file.
560         * sysdeps/unix/sysv/linux/x86_64/librt-cancellation.S: New file.
561         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Optimize
562         since we can assume the special __*_{en,dis}able_asynccancel
563         functions.
564         (PUSHARGS_*, POPARGS_*, SAVESTK_*, RESTSTK_*): Removed.
565         * sysdeps/x86_64/tcb-offsets.sym: Add cancellation-related bits
566         and PTHREAD_CANCELED.
568 2009-07-31  Ulrich Drepper  <drepper@redhat.com>
570         * descr.h: Better definition of *_BITMASK macros for cancellation.
572 2009-07-29  Ulrich Drepper  <drepper@redhat.com>
574         * sysdeps/x86_64/tls.h (TLS_TCB_ALIGN): Define explicitly to 32.
576         * sysdeps/x86_64/tls.h (tcbhead_t): Add room for SSE registers the
577         dynamic linker might have to save.
578         Define RTLD_CHECK_FOREIGN_CALL, RTLD_ENABLE_FOREIGN_CALL,
579         RTLD_PREPARE_FOREIGN_CALL, and RTLD_FINALIZE_FOREIGN_CALL.  Pretty
580         printing.
582         * sysdeps/x86_64/tcb-offsets.sym: Add RTLD_SAVESPACE_SSE.
584 2009-07-28  Ulrich Drepper  <drepper@redhat.com>
586         * pthread_mutex_lock.c [NO_INCR] (__pthread_mutex_cond_lock_adjust):
587         New function.
588         * pthreadP.h: Declare __pthread_mutex_cond_lock_adjust.
589         * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: Add ROBUST_BIT.
590         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Don't use
591         requeue_pi for robust mutexes.
592         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
593         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
594         Don't only skip __pthread_mutex_cond_lock.  Call instead
595         __pthread_mutex_cond_lock_adjust.
596         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
598         * pthread_mutex_unlock.c (__pthread_mutex_unlock_full): Minor
599         optimization of PI mutex handling.
601 2009-07-27  Ulrich Drepper  <drepper@redhat.com>
603         [BZ #10418]
604         * pthread_mutex_unlock.c (__pthread_mutex_unlock_full): Use _rel
605         instead of of _acq variants of cmpxchg.
607 2009-07-23  Ulrich Drepper  <drepper@redhat.com>
609         * sysdeps/x86_64/configure.in: New file.
611         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix error
612         path when not using absolute timeout futex.
614 2009-07-20  Ulrich Drepper  <drepper@redhat.com>
616         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Minor
617         optimizations of last changes.
618         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
620 2009-07-19  Ulrich Drepper  <drepper@redhat.com>
622         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
623         FUTEX_WAIT_REQUEUE_PI and FUTEX_CMP_REQUEUE_PI.
624         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: If mutex
625         is a PI mutex, then use FUTEX_CMP_REQUEUE_PI.
626         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
627         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: If mutex
628         is a PI mutex, then use FUTEX_WAIT_REQUEUE_PI.
629         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
631         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
632         (__pthread_cond_timedwait): Make more robust.
634 2009-07-18  Ulrich Drepper  <drepper@redhat.com>
636         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
637         (__lll_robust_timedlock_wait): If possible use FUTEX_WAIT_BITSET to
638         directly use absolute timeout.
640         * tst-sem5.c (do_test): Add test for premature timeout.
641         * Makefile: Linu tst-sem5 with librt.
643         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
644         (pthread_rwlock_timedwrlock): If possible use FUTEX_WAIT_BITSET to
645         directly use absolute timeout.
646         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
647         (pthread_rwlock_timedrdlock): Likewise.
649         * tst-cond11.c (run_test): Add test to check that the timeout is
650         long enough.
652         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
653         (__pthread_cond_timedwait): If possible use FUTEX_WAIT_BITSET to
654         directly use absolute timeout.
656         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
657         (__pthread_cond_wait): Convert to using exception handler instead of
658         registered unwind buffer.
659         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
660         (__pthread_cond_timedwait): Likewise.
662 2009-07-17  Ulrich Drepper  <drepper@redhat.com>
664         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
665         If possible use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME to directly
666         use absolute timeout.
668         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Optimize
669         handling of uncontested semaphore.
671         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
672         (__condvar_cleanup): Rewrite to use cfi directives instead of
673         hand-coded unwind tables.
674         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S (__pthread_once):
675         Likewise.
676         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
677         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
678         Likewise.
680 2009-06-12  Ulrich Drepper  <drepper@redhat.com>
682         * Makefile (libpthread-routines): Add pthread_sigqueue.
683         * Versions: Add pthread_sigqueue for GLIBC_2.11.
684         * sysdeps/pthread/bits/sigthread.h: Declare pthread_sigqueue.
685         * sysdeps/unix/sysv/linux/pthread_sigqueue.c: New file.
687 2009-06-11  Ulrich Drepper  <drepper@redhat.com>
689         [BZ #10262]
690         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
691         (LOAD_FUTEX_WAIT_ABS): Fix futex parameter in case private futexes
692         cannot be assumed.
693         Patch by Bryan Kadzban <bz-glibc@kdzbn.homelinux.net>.
695 2009-05-16  Ulrich Drepper  <drepper@redhat.com>
697         * libc-cancellation.c: Move __libc_cleanup_routine to...
698         * libc-cleanup.c: ...here.  New file.
699         * Makefile (routines): Add libc-cleanup.
701         * cancellation.c (__pthread_disable_asynccancel): Remove unnecessary
702         test.
703         * libc-cancellation.c: Use <nptl/cancellation.c: to define the code.
704         * sysdeps/pthread/librt-cancellation.c: Likewise.
706         [BZ #9924]
707         * nptl-init.c: Renamed from init.c.
708         * Makefile: Change all occurences of init.c to nptl-init.c.
710 2009-05-15  Ulrich Drepper  <drepper@redhat.com>
712         * cancellation.c (__pthread_disable_asynccancel): Correct the bits
713         to test when deciding on the delay.
714         * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
715         * pthread_cancel.c: Close race between deciding on sending a signal
716         and setting the CANCELING_BIT bit.
718         * cancellation.c (__pthread_disable_asynccancel): Don't return if
719         thread is canceled.
720         * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
722 2009-04-27  Ulrich Drepper  <drepper@redhat.com>
724         * cancellation.c (__pthread_disable_asynccancel): Use THREAD_ATOMIC_AND
725         is available.
726         * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
727         * sysdeps/x86_64/tls.h: Define THREAD_ATOMIC_AND.
728         * sysdeps/i386/tls.h: Likewise.
729         (tcbhead_t): Add __private_tm member.
731 2009-04-26  Ulrich Drepper  <drepper@redhat.com>
733         * sem_open.c (sem_open): Rewrite initialization of initsem to
734         avoid warnings.
736         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
737         Avoid warning by using may_alias attribute on ptrhack.
739 2009-04-22  Ulrich Drepper  <drepper@redhat.com>
741         [BZ #10090]
742         * pthread_attr_setschedparam.c (__pthread_attr_setschedparam):
743         Check policy and priority for validity.
744         Patch mostly by Zhang Xiliang <zhangxiliang@cn.fujitsu.com>.
746 2009-03-15  Ulrich Drepper  <drepper@redhat.com>
748         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
749         (__pthread_cond_timedwait): Change to use cfi directives instead of
750         hand-coded unwind sections.
752 2009-03-10  Ulrich Drepper  <drepper@redhat.com>
754         * init.c (nptl_freeres): Compile only for SHARED.
756 2009-03-09  Jakub Jelinek  <jakub@redhat.com>
758         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Define
759         FUTEX_WAIT_BITSET, FUTEX_WAKE_BITSET, FUTEX_CLOCK_REALTIME and
760         FUTEX_BITSET_MATCH_ANY.
762 2009-02-27  Roland McGrath  <roland@redhat.com>
764         * init.c (__nptl_initial_report_events): Mark __attribute_used__.
765         * pthread_create.c (__nptl_threads_events, __nptl_last_event): Likewise.
767 2009-02-26  Ulrich Drepper  <drepper@redhat.com>
769         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
770         _POSIX_THREAD_ROBUST_PRIO_INHERIT and
771         _POSIX_THREAD_ROBUST_PRIO_PROTECT.  Reset value of macros from
772         200112L to 200809L.
774 2009-02-25  Ulrich Drepper  <drepper@redhat.com>
776         * sysdeps/pthread/pthread.h: The robust mutex functions are in
777         POSIX 2008.
779 2009-02-24  Ulrich Drepper  <drepper@redhat.com>
781         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_BITS_POSIX_OPT_H):
782         Unify name of include protector macro.
784 2009-02-14  SUGIOKA Toshinobu  <sugioka@itonet.co.jp>
786         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
787         LOAD_FUTEX_WAIT_ABS even if (FUTEX_WAIT == 0).
789 2009-01-29  Ulrich Drepper  <drepper@redhat.com>
791         * sysdeps/pthread/unwind-forcedunwind.c: Encrypt all function
792         pointer variables.
794         * allocatestack.c (__free_stacks): Renamed from free_stacks.
795         (__free_stack_cache): Removed.  Change callers to call __free_stacks.
796         * init.c (nptl_freeres): New function.
797         (pthread_functions): Initialize ptr_freeres to nptl_freeres.
798         * pthreadP.h: Don't declare __free_stack_cache.  Declare __free_stacks.
799         * sysdeps/pthread/unwind-forcedunwind.c (libgcc_s_handle): New
800         variable.
801         (pthread_cancel_init): Depend in libgcc_s_handle for decision to
802         load DSO.  Assign last.
803         (__unwind_freeres): New function.
805         * allocatestack.c (__reclaim_stacks): Reset in_flight_stack later
806         for better debugging.  No need to use stack_list_add here.
808 2009-01-14  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
810         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
811         (__lll_timedlock_wait): Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME
812         instead of computing relative timeout.
813         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
814         FUTEX_CLOCK_REALTIME and FUTEX_BITSET_MATCH_ANY.
816 2009-01-25  Ulrich Drepper  <drepper@redhat.com>
818         * pthread_mutex_lock.c (__pthread_mutex_lock): Remove unused label out.
820 2009-01-08  Ulrich Drepper  <drepper@redhat.com>
822         * sysdeps/pthread/list.h (list_add): Initialize new element first.
823         (list_add_tail): Removed.
825 2009-01-07  Ulrich Drepper  <drepper@redhat.com>
827         * (in_flight_stack): New variable.
828         (stack_list_del): New function.  Use instead of list_del.
829         (stack_list_add): New function.  Use instead of list_add when adding to
830         stack_cache and stack_used lists.
831         (__reclaim_stacks): Complete operations on stack_cache and stack_used lists
832         when the fork call interrupted another thread.
834 2009-01-04  Ulrich Drepper  <drepper@redhat.com>
836         * init.c (__pthread_initialize_minimal_internal): Optimize test
837         FUTEX_CLOCK_REALTIME a bit.
839 2009-01-03  Ulrich Drepper  <drepper@redhat.com>
841         * init.c (__pthread_initialize_minimal_internal): Cheat a bit by
842         only passing five parameters to FUTEX_WAIT_BITSET call.
844         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
845         (__lll_timedlock_wait): Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME
846         instead of computing relative timeout.
848 2009-01-02  Ulrich Drepper  <drepper@redhat.com>
850         * init.c (__pthread_initialize_minimal_internal): Check for
851         FUTEX_CLOCK_REALTIME flag.
852         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
853         Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME instead of computing
854         relative timeout.
856         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
857         FUTEX_CLOCK_REALTIME and FUTEX_BITSET_MATCH_ANY.
858         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
859         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
860         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
861         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
863 2008-12-09  Ulrich Drepper  <drepper@redhat.com>
865         * sysdeps/pthread/pthread.h (pthread_cleanup_pop): Use { } as empty
866         loop body instead of ; to avoid gcc warnings.
867         (pthread_cleanup_pop_restore_np): Likewise.
868         Patch by Caolán McNamara <caolanm@redhat.com>.
870 2008-12-09  Jakub Jelinek  <jakub@redhat.com>
872         * pthread_mutex_lock.c (__pthread_mutex_lock): Handle only the
873         fast path here, for robust/PI/PP mutexes call
874         __pthread_mutex_lock_full.  Don't use switch, instead use a series
875         of ifs according to their probability.
876         (__pthread_mutex_lock_full): New function.
877         * pthread_mutex_unlock.c: Include assert.h.
878         (__pthread_mutex_unlock_usercnt): Handle only the
879         fast path here, for robust/PI/PP mutexes call
880         __pthread_mutex_unlock_full.  Don't use switch, instead use a series
881         of ifs according to their probability.
882         (__pthread_mutex_unlock_full): New function.
883         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c
884         (__pthread_mutex_lock_full): Define.
886 2008-12-08  Ulrich Drepper  <drepper@redhat.com>
888         * sysdeps/x86_64/tls.h (tcbhead_t): Add fields reserved for TM
889         implementation.  Add necessary padding and.
890         * descr.h (struct pthread): Increase padding for tcbhead_t to 24
891         words.
893 2008-12-04  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
895         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define FUTEX_WAIT_BITSET
896         and FUTEX_WAKE_BITSET.
898 2008-12-02  Ulrich Drepper  <drepper@redhat.com>
900         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_WAIT_BITSET
901         and FUTEX_WAKE_BITSET.
902         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
903         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
904         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
905         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
907 2008-11-25  Roland McGrath  <roland@redhat.com>
909         * sysdeps/alpha, sysdeps/unix/sysv/linux/alpha:
910         Subdirectories moved to ports repository as
911         sysdeps/.../nptl subdirectories.
913 2008-11-12  Jakub Jelinek  <jakub@redhat.com>
915         [BZ #7008]
916         * pthread_condattr_setclock.c (pthread_condattr_setclock): Fix masking
917         of old value.
918         * pthread_cond_init.c (__pthread_cond_init): Fix
919         cond->__data.__nwaiters initialization.
920         * Makefile (tests): Add tst-cond23.
921         * tst-cond23.c: New test.
923 2008-11-07  Jakub Jelinek  <jakub@redhat.com>
925         * sysdeps/pthread/malloc-machine.h (MALLOC): Adjust __libc_tsd_define
926         arguments.
927         (tsd_setspecific, tsd_getspecific): Adjust __libc_tsd_{set,get}
928         arguments.
930 2008-11-01  Ulrich Drepper  <drepper@redhat.com>
932         [BZ #6955]
933         * pthread_mutex_lock.c: Add support for private PI mutexes.
934         * pthread_mutex_timedlock.c: Likewise.
935         * pthread_mutex_trylock.c: Likewise.
936         * pthread_mutex_unlock.c: Likewise.
937         Patch mostly by Ben Jackson <ben@ben.com>.
939 2008-10-31  Ulrich Drepper  <drepper@redhat.com>
941         [BZ #6843]
942         * sysdeps/pthread/gai_misc.h (__gai_create_helper_thread):
943         Increase stack size for helper thread.
945 2008-10-06  Martin Schwidefsky  <schwidefsky@de.ibm.com>
947         * sysdeps/s390/tls.h (THREAD_SET_STACK_GUARD): Add empty inline
948         assembly with a clobber list for access registers a0 and a1.
950 2008-09-11  Martin Schwidefsky  <schwidefsky@de.ibm.com>
952         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Add memory barrier
953         to force runp->refcntr to be read from memory.
955 2008-09-08  Richard Guenther  <rguenther@suse.de>
957         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_lock,
958         lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
959         lll_timedlock, lll_robust_timedlock, lll_unlock,
960         lll_robust_unlock): Promote private to int.
962 2008-08-15  Ulrich Drepper  <drepper@redhat.com>
964         * sysdeps/x86_64/pthreaddef.h: Remove ARCH_MAP_FLAGS and
965         ARCH_RETRY_MMAP definitions.
966         * allocatestack.c: Remove definition of ARCH_MAP_FLAGS.
967         Define MAP_STACK when not defined.
968         (allocate_stack): Use MAP_STACK instead of ARCH_MAP_FLAGS.  Remove
969         handling of ARCH_RETRY_MMAP.
971 2008-07-30  Ulrich Drepper  <drepper@redhat.com>
973         * tst-align2.c (f): Print message that f is reached.
975 2008-04-28  Hiroki Kaminaga  <kaminaga@sm.sony.co.jp>
977         [BZ #6740]
978         * sysdeps/powerpc/tcb-offsets.sym (PRIVATE_FUTEX_OFFSET): Guard symbol
979         definition with #ifndef __ASSUME_PRIVATE_FUTEX.
981 2008-07-25  Ulrich Drepper  <drepper@redhat.com>
983         * sysdeps/unix/sysv/linux/mq_notify.c (init_mq_netlink): Use
984         SOCK_CLOEXEC if possible.
986 2008-05-29  Ulrich Drepper  <drepper@redhat.com>
988         * Makefile (tests): Add tst-rwlock2a.
989         * tst-rwlock2.c: Use TYPE macro to decide what rwlock type to use.
990         * tst-rwlock2a.c: New file.
992 2008-06-12  Ulrich Drepper  <drepper@redhat.com>
994         * sysdeps/pthread/pthread.h: Remove inadvertant checkin.
996 2008-05-17  Samuel Thibault  <samuel.thibault@ens-lyon.org>
998         * sysdeps/pthread/pthread.h: Fix typo in comment.
1000 2008-05-28  Ulrich Drepper  <drepper@redhat.com>
1002         * sysdeps/pthread/createthread.c (do_clone): Pass accurate length
1003         of CPU set to the kernel.
1005 2008-05-23  Paul Pluzhnikov  <ppluzhnikov@google.com>
1007         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Add
1008         cfi directives.
1009         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
1010         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
1011         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
1012         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
1013         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
1014         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
1016 2008-05-22  Paul Pluzhnikov  <ppluzhnikov@google.com>
1018         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S: Add
1019         cfi directives.
1020         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1021         Likewise.
1022         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
1023         Likewise.
1024         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1025         Likewise.
1027 2008-05-26  Ulrich Drepper  <drepper@redhat.com>
1029         * tst-typesizes.c: Explicitly check __SIZEOF_PTHREAD_* constants.
1031 2008-05-20  Jakub Jelinek  <jakub@redhat.com>
1033         David S. Miller  <davem@davemloft.net>
1035         * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: New file.
1037 2008-05-10  Ulrich Drepper  <drepper@redhat.com>
1039         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Access
1040         __pshared correctly.
1041         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1042         Likewise.
1043         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1044         Likewise.
1045         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
1046         Likewise.
1047         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
1048         Likewise.
1049         Reported by Clemens Kolbitsch <clemens.kol@gmx.at>.
1051 2008-04-14  David S. Miller  <davem@davemloft.net>
1053         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
1054         (__old_sem_wait): Fix argument to lll_futex_wait().
1056 2007-11-26  Daniel Jacobowitz  <dan@codesourcery.com>
1058         * pthread_create.c: Require pthread_mutex_trylock and
1059         pthread_key_delete for libgcc.
1061 2008-04-08  Jakub Jelinek  <jakub@redhat.com>
1063         [BZ #6020]
1064         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h
1065         (lll_futex_wake_unlock): Add private argument to the pre-v9 macro.
1066         Patch by Sunil Amitkumar Janki <devel.sjanki@gmail.com>.
1068 2008-03-27  Ulrich Drepper  <drepper@redhat.com>
1070         * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine ARG_MAX if
1071         <linux/limits.h> has defined it.
1072         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
1073         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
1074         * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
1075         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
1077 2008-03-18  Jakub Jelinek  <jakub@redhat.com>
1079         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Use __ASSEMBLER__ instead
1080         of ASSEMBLER.
1081         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
1082         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Likewise.
1084 2008-03-14  Ulrich Drepper  <drepper@redhat.com>
1086         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
1087         HAVE_DL_DISCOVER_OSVERSION.
1088         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
1089         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Likewise.
1091 2008-03-07  Ulrich Drepper  <drepper@redhat.com>
1093         [BZ #5778]
1094         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Change
1095         _POSIX_CHOWN_RESTRICTED value to zero.
1097 2008-01-31  Roland McGrath  <roland@redhat.com>
1099         * Makefile (omit-deps): Variable removed.
1101 2008-01-30  Ulrich Drepper  <drepper@redhat.com>
1103         * sysdeps/unix/sysv/linux/x86_64/sem_post.S (sem_post): Avoid
1104         unnecessary addr32 prefix.
1106 2008-01-29  Roland McGrath  <roland@redhat.com>
1108         * Makeconfig (ptw-CPPFLAGS, sysd-rules-patterns): New variables.
1110 2008-01-22  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1112         * sysdeps/unix/sysv/linux/sh/sem_post.S: Don't overflow value field.
1114 2008-01-21  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1116         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XADD): Use
1117         a scratch register.
1118         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
1119         (__lll_lock_wait_private): Fix typo.
1120         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
1121         (pthread_barrier_wait): Likewise.  Adjust XADD use.
1122         * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
1123         Adjust XADD use.
1124         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S
1125         (pthread_rwlock_timedrdlock): Return correct return value.
1126         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S
1127         (pthread_rwlock_timedwrlock): Likewise.
1129 2008-01-15  Ulrich Drepper  <drepper@redhat.com>
1131         * tst-eintr2.c (do_test): make sure that if mutex_lock in main
1132         thread returns the program exits with an error code.
1134 2008-01-10  Ulrich Drepper  <drepper@redhat.com>
1136         * pthread-errnos.sym: Add EOVERFLOW.
1137         * sysdeps/unix/sysv/linux/structsem.sym: Add SEM_VALUE_MAX.
1138         * sysdeps/unix/sysv/linux/sem_post.c: Don't overflow value field.
1139         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
1140         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
1142 2007-12-14  Ulrich Drepper  <drepper@redhat.com>
1144         * sysdeps/x86_64/pthreaddef.h (ARCH_RETRY_MMAP): Take additional
1145         parameter.  Passed it as permission to mmap.
1146         * allocatestack.c (allocate_stack): Pass prot as second parameter
1147         to ARCH_RETRY_MMAP.
1149 2007-12-12  Ulrich Drepper  <drepper@redhat.com>
1151         * tst-basic7.c: Allocate memory for the stack.
1153         [BZ #5465]
1154         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S [!SHARED]
1155         (__pthread_cond_timedwait): Don't use VDSO.
1156         Patch by Michal Januszewski.
1158 2007-12-07  Ulrich Drepper  <drepper@redhat.com>
1160         [BZ #5455]
1161         * sysdeps/pthread/pthread.h [!__EXCEPTIONS] (pthread_cleanup_pop):
1162         Allow label before pthread_cleanup_pop.
1163         (pthread_cleanup_pop_restore_np): Likewise.
1165 2007-12-04  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1167         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
1168         Store 2 before returning ETIMEDOUT.
1170 2007-11-23  Ulrich Drepper  <drepper@redhat.com>
1172         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
1173         Store 2 before returning ETIMEDOUT.
1174         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise
1175         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
1176         (__lll_lock_wait_private): Optimize.
1177         (__lll_lock_wait): Likewise.
1179 2007-11-20  Jakub Jelinek  <jakub@redhat.com>
1181         * sysdeps/pthread/pthread.h (pthread_cleanup_push,
1182         pthread_cleanup_push_defer_np): Add extra (void *) cast to shut up
1183         g++ 4.1 and 4.2 -Wstrict-aliasing warnings.
1185 2007-11-08  Ulrich Drepper  <drepper@redhat.com>
1187         [BZ #5240]
1188         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
1189         If we time out, try one last time to lock the futex to avoid
1190         losing a wakeup signal.
1191         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
1192         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
1194         [BZ #5245]
1195         * sysdeps/pthread/createthread.c (do_clone): Translate clone error
1196         if necessary.
1198 2007-11-07  Ulrich Drepper  <drepper@redhat.com>
1200         [BZ #5245]
1201         * allocatestack.c (allocate_stack): Change ENOMEM error in case
1202         mmap failed to EAGAIN.
1203         * Makefile (tests): Add tst-basic7.
1204         * tst-basic7.c: New file.
1206 2007-11-05  Ulrich Drepper  <drepper@redhat.com>
1208         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
1209         Use __linkin_atfork.
1211 2007-11-03  Mike Frysinger  <vapier@gentoo.org>
1213         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (LOAD_FUTEX_WAIT): Add
1214         missing line continuations.
1215         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S (LOAD_FUTEX_WAIT,
1216         LOAD_FUTEX_WAKE): Likewise.  Also add missing 3rd parameter.
1218 2007-10-28  Ulrich Drepper  <drepper@redhat.com>
1220         [BZ #5220]
1221         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Declare
1222         __active_timer_sigev_thread and __active_timer_sigev_thread_lock.
1223         (struct timer): Add next element.
1224         * sysdeps/unix/sysv/linux/timer_create.c: For SIGEV_THREAD timers,
1225         enqueue timer structure into __active_timer_sigev_thread list.
1226         * sysdeps/unix/sysv/linux/timer_delete.c: For SIGEV_THREAD timers,
1227         remove timer struct from __active_timer_sigev_thread.
1228         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
1229         Before using timer structure make sure it is still on the
1230         __active_timer_sigev_thread list.  Keep lock until done.
1231         Define __active_timer_sigev_thread and
1232         __active_timer_sigev_thread_lock.
1234 2007-10-27  Ulrich Drepper  <drepper@redhat.com>
1236         * sysdeps/pthread/malloc-machine.h: Define ATFORK_MEM.
1237         Redefine thread_atfork for use of ATFORK_MEM.
1238         * sysdeps/unix/sysv/linux/fork.h: Define __linkin_atfork.
1239         * sysdeps/unix/sysv/linux/register-atfork.c (__linkin_atfork): New
1240         function.
1241         * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
1242         Use atomic operation when removing first element of list.
1244 2007-10-17  Jakub Jelinek  <jakub@redhat.com>
1246         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__old_sem_post): New
1247         routine instead of an alias to __new_sem_post.
1249 2007-10-15  Jakub Jelinek  <jakub@redhat.com>
1251         * init.c (__pthread_initialize_minimal): Initialize word to appease
1252         valgrind.
1254 2007-10-10  Jakub Jelinek  <jakub@redhat.com>
1256         * sysdeps/pthread/bits/libc-lock.h (__libc_rwlock_init): Inside of
1257         libc.so just clear NAME.
1258         (__libc_rwlock_fini): Nop inside of libc.so.
1259         * tst-initializers1.c (main): Test if PTHREAD_RWLOCK_INITIALIZER is
1260         all zeros.
1262 2007-09-02  Ulrich Drepper  <drepper@redhat.com>
1264         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
1265         (__pthread_cond_wait): Fix unlocking of internal lock after mutex
1266         unlocking failed.
1267         Patch by Luca Barbieri <luca.barbieri@gmail.com>.
1269 2007-08-21  Ulrich Drepper  <drepper@redhat.com>
1271         [BZ #4938]
1272         * allocatestack.c (__reclaim_stacks): Clear the TSD in the
1273         reclaimed stack if necessary.
1274         * Makefile (tests): Add tst-tsd6.
1275         * tst-tsd6.c: New file.
1277 2007-08-21  Jakub Jelinek  <jakub@redhat.com>
1279         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_dead):
1280         Add private argument.
1282 2007-08-20  Ulrich Drepper  <drepper@redhat.com>
1284         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1285         (__pthread_cond_timedwait): Use clock_gettime from VDSO if possible.
1287 2007-08-16  Jakub Jelinek  <jakub@redhat.com>
1289         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h
1290         (__lll_robust_timedlock): Pass private as last argument to
1291         __lll_robust_timedlock_wait.
1292         (__lll_unlock): Fix a pasto.
1294 2007-08-15  Jakub Jelinek  <jakub@redhat.com>
1296         * sysdeps/unix/sysv/linux/sparc/internaltypes.h (sparc_new_sem,
1297         sparc_old_sem): New structs.
1298         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
1299         (__sem_wait_cleanup): New function.
1300         (__new_sem_wait): Use sparc_new_sem structure.  Bump and afterwards
1301         decrease nwaiters.  Register __sem_wait_cleanup as cleanup handler.
1302         Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
1303         lll_futex_wait.
1304         (__old_sem_wait): New function.
1305         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: Include
1306         nptl/sysdeps/unix/sysv/linux/sparc version.
1307         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c:
1308         Likewise.
1309         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: Likewise.
1310         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c
1311         (__new_sem_trywait): Use sparc_old_sem structure.
1312         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c
1313         (sem_timedwait): Use sparc_new_sem structure.  Bump and afterwards
1314         decrease nwaiters.  Register __sem_wait_cleanup as cleanup handler.
1315         Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
1316         lll_futex_timed_wait.
1317         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c (__new_sem_post):
1318         Use sparc_new_sem structure.  Only wake if nwaiters > 0.  Pass
1319         isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
1320         lll_futex_wake.
1321         (__old_sem_post): New function.
1322         * sysdeps/unix/sysv/linux/sparc/sem_wait.c: New file.
1323         * sysdeps/unix/sysv/linux/sparc/sem_init.c: New file.
1324         * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c: New file.
1325         * sysdeps/unix/sysv/linux/sparc/sem_post.c: New file.
1326         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: Remove.
1327         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: Remove.
1329 2007-08-14  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1331         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
1332         (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
1333         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
1334         Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
1335         * sysdeps/unix/sysv/linux/shpthread_cond_signal.S
1336         (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
1337         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
1338         Use FUTEX_WAKE_OP.
1339         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
1340         kernel-features.h and tcb-offsets.h.
1341         (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
1342         lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
1343         process private.
1344         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
1345         tcb-offsets.h.
1346         (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE
1347         to lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
1348         process private.
1349         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use #ifdef
1350         __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
1351         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
1352         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
1353         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
1354         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
1355         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
1357 2007-08-14  Jakub Jelinek  <jakub@redhat.com>
1359         * sysdeps/unix/sysv/linux/lowlevellock.c: Comment fix.
1360         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
1361         (__lll_timedwait_tid): Pass LLL_SHARED as 4th argument to
1362         lll_futex_timed_wait.
1364         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (__lll_unlock,
1365         __lll_robust_unlock): Rewrite as macros instead of inline functions.
1366         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_unlock,
1367         __lll_robust_unlock, __lll_wait_tid): Likewise.
1369 2007-08-13  Jakub Jelinek  <jakub@redhat.com>
1371         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
1372         Fix a pasto.
1373         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
1374         (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
1375         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
1376         Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
1377         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
1378         (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
1379         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
1380         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Include
1381         kernel-features.h.
1382         (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
1383         lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
1384         process private.  Switch DW_CFA_advance_loc1 and some
1385         DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
1386         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
1387         (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE to
1388         lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
1389         process private.  Switch DW_CFA_advance_loc{1,2} and some
1390         DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
1391         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use
1392         #ifdef __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
1393         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1394         Likewise.
1395         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
1396         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
1397         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1398         Likewise.
1399         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
1400         (__pthread_cond_broadcast): Compare %r8 instead of
1401         dep_mutex-cond_*(%rdi) with $-1.
1402         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
1403         (__pthread_cond_signal): Xor FUTEX_WAKE_OP with FUTEX_WAKE instead
1404         of oring.
1406 2007-08-13  Ulrich Drepper  <drepper@redhat.com>
1408         * sysdeps/unix/sysv/linux/i386/i786/Implies: New file.
1410 2007-08-13  Jakub Jelinek  <jakub@redhat.com>
1412         * allocatestack.c: Include kernel-features.h.
1413         * pthread_create.c: Likewise.
1414         * pthread_mutex_init.c: Likewise.
1415         * init.c: Likewise.
1416         * pthread_cond_timedwait.c: Likewise.
1417         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
1418         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
1419         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
1420         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
1421         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
1422         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1423         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1424         Likewise.
1425         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1426         Likewise.
1427         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
1428         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
1429         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
1430         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
1432 2007-08-12  Jakub Jelinek  <jakub@redhat.com>
1434         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
1435         [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
1436         byte elements.  One of them is the new __shared element.
1437         [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
1438         adjust names of other padding elements.
1439         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
1440         [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
1441         byte elements.  One of them is the new __shared element.
1442         [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
1443         adjust names of other padding elements.
1444         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_rwlock_t):
1445         Renamed __pad1 element to __shared, adjust names of other padding
1446         elements.
1447         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
1448         (pthread_rwlock_t): Likewise.
1449         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock): Fix a
1450         typo.
1452 2007-08-09  Anton Blanchard  <anton@samba.org>
1454         * sysdeps/unix/sysv/linux/powerpc/pthread_spin_unlock.c: New file.
1456 2007-08-12  Ulrich Drepper  <drepper@redhat.com>
1458         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Include
1459         <kernel-features.h>.
1460         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1462 2007-08-11  Ulrich Drepper  <drepper@redhat.com>
1464         * pthreadP.h (PTHREAD_ROBUST_MUTEX_PSHARED): Define.
1465         * pthread_mutex_lock.c: Use it instead of PTHREAD_MUTEX_PSHARED when
1466         dealing with robust mutexes.
1467         * pthread_mutex_timedlock.c: Likewise.
1468         * pthread_mutex_trylock.c: Likewise.
1469         * pthread_mutex_unlock.c: Likewise.
1470         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
1472 2007-08-06  Jakub Jelinek  <jakub@redhat.com>
1474         * pthreadP.h (PTHREAD_MUTEX_PSHARED_BIT): Define.
1475         (PTHREAD_MUTEX_TYPE): Mask __kind with 127.
1476         (PTHREAD_MUTEX_PSHARED): Define.
1477         * pthread_mutex_init.c (__pthread_mutex_init): Set
1478         PTHREAD_MUTEX_PSHARED_BIT for pshared or robust
1479         mutexes.
1480         * pthread_mutex_lock.c (LLL_MUTEX_LOCK): Take mutex as argument
1481         instead of its __data.__lock field, pass PTHREAD_MUTEX_PSHARED
1482         as second argument to lll_lock.
1483         (LLL_MUTEX_TRYLOCK): Take mutex as argument
1484         instead of its __data.__lock field.
1485         (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
1486         __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
1487         to lll_robust_lock.
1488         (__pthread_mutex_lock): Update LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
1489         LLL_ROBUST_MUTEX_LOCK users, use PTHREAD_MUTEX_TYPE (mutex)
1490         instead of mutex->__data.__kind directly, pass
1491         PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock and lll_futex_wait.
1492         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Use
1493         PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
1494         directly, pass PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock.
1495         (pthread_mutex_timedlock): Pass PTHREAD_MUTEX_PSHARED (mutex)
1496         to lll_timedlock, lll_robust_timedlock, lll_unlock and
1497         lll_futex_timed_wait.  Use PTHREAD_MUTEX_TYPE (mutex) instead
1498         of mutex->__data.__kind directly.
1499         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Pass
1500         PTHREAD_MUTEX_PSHARED (mutex) to lll_timedlock,
1501         lll_robust_timedlock, lll_unlock and lll_futex_timed_wait.  Use
1502         PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind directly.
1503         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Pass
1504         PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock, lll_robust_unlock
1505         and lll_futex_wake.
1506         * pthread_mutex_setprioceiling.c (pthread_mutex_setprioceiling): Pass
1507         PTHREAD_MUTEX_PSHARED (mutex) to lll_futex_wait and lll_futex_wake.
1508         Use PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
1509         directly.
1510         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK):
1511         Take mutex as argument instead of its __data.__lock field, pass
1512         PTHREAD_MUTEX_PSHARED as second argument to lll_cond_lock.
1513         (LLL_MUTEX_TRYLOCK): Take mutex as argument instead of its
1514         __data.__lock field.
1515         (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
1516         __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
1517         to lll_robust_cond_lock.
1518         * pthread_cond_broadcast.c (__pthread_cond_broadcast): Add pshared
1519         variable, pass it to lll_lock, lll_unlock, lll_futex_requeue and
1520         lll_futex_wake.  Don't use lll_futex_requeue if dependent mutex
1521         has PTHREAD_MUTEX_PSHARED_BIT bit set in its __data.__kind.
1522         * pthread_cond_destroy.c (__pthread_cond_destroy): Add pshared
1523         variable, pass it to lll_lock, lll_unlock, lll_futex_wake and
1524         lll_futex_wait.
1525         * pthread_cond_signal.c (__pthread_cond_signal): Add pshared
1526         variable, pass it to lll_lock, lll_unlock, lll_futex_wake_unlock and
1527         lll_futex_wake.
1528         * pthread_cond_timedwait.c (__pthread_cond_wait): Add
1529         pshared variable, pass it to lll_lock, lll_unlock,
1530         lll_futex_timedwait and lll_futex_wake.
1531         * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait): Add
1532         pshared variable, pass it to lll_lock, lll_unlock, lll_futex_wait
1533         and lll_futex_wake.
1534         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_requeue,
1535         lll_futex_wake_unlock): Add private argument, use __lll_private_flag
1536         macro.
1537         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue,
1538         lll_futex_wake_unlock): Likewise.
1539         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_requeue):
1540         Likewise.
1541         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_futex_requeue,
1542         lll_futex_wake_unlock): Likewise.
1543         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_requeue):
1544         Likewise.
1545         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue,
1546         lll_futex_wake_unlock): Likewise.
1547         (lll_futex_wake): Fix a typo.
1548         * sysdeps/unix/sysv/linux/pthread-pi-defines.sym (PS_BIT): Add.
1549         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
1550         (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
1551         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
1552         Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
1553         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
1554         (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
1555         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
1556         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1557         (__pthread_cond_timedwait): Likewise.
1558         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
1559         (__condvar_cleanup, __pthread_cond_wait): Likewise.
1561 2007-08-05  Jakub Jelinek  <jakub@redhat.com>
1563         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
1564         Don't use CGOTSETUP and CGOTRESTORE macros.
1565         (CGOTSETUP, CGOTRESTORE): Remove.
1566         <IS_IN_rtld> (CENABLE, CDISABLE): Don't use JUMPTARGET, branch to
1567         @local symbol.
1569 2007-08-01  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1571         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Remove
1572         definitions for private futexes.
1573         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Include
1574         kernel-features.h and lowlevellock.h.  Use private futexes if
1575         they are available.
1576         (__lll_lock_wait_private, __lll_unlock_wake_private): New.
1577         (__lll_mutex_lock_wait): Rename to
1578         (__lll_lock_wait): ... this.  Don't compile in for libc.so.
1579         (__lll_mutex_timedlock_wait): Rename to ...
1580         (__lll_timedlock_wait): ... this.  Use __NR_gettimeofday.
1581         Don't compile in for libc.so.
1582         (__lll_mutex_unlock_wake): Rename to ...
1583         (__lll_unlock_wake): ... this.  Don't compile in for libc.so.
1584         (__lll_timedwait_tid): Use __NR_gettimeofday.
1585         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Allow including
1586         the header from assembler.  Renamed all lll_mutex_* resp.
1587         lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
1588         Renamed all LLL_MUTEX_LOCK_* macros to LLL_LOCK_*.
1589         (FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE):
1590         Define.
1591         (__lll_lock_wait_private): Add prototype.
1592         (__lll_lock_wait, __lll_timedlock_wait, __lll_robust_lock_wait,
1593         __lll_robust_timedlock_wait, __lll_unlock_wake_private,
1594         __lll_unlock_wake): Likewise.
1595         (lll_lock): Add private argument.  Call __lll_lock_wait_private
1596         if private is constant LLL_PRIVATE.
1597         (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
1598         lll_timedlock, lll_robust_timedlock): Add private argument.
1599         (lll_unlock): Add private argument.  Call __lll_unlock_wake_private
1600         if private is constant LLL_PRIVATE.
1601         (lll_robust_unlock, lll_robust_dead): Add private argument.
1602         (lll_lock_t): Remove.
1603         (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
1604         __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
1605         lll_cond_wake, lll_cond_broadcast): Remove.
1606         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: Include
1607         kernel-features.h and lowlevellock.h.
1608         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
1609         (LOAD_FUTEX_WAIT): Define.
1610         (__lll_robust_mutex_lock_wait): Rename to ...
1611         (__lll_robust_lock_wait): ... this.  Add private argument.
1612         Use LOAD_FUTEX_WAIT macro.
1613         (__lll_robust_mutex_timedlock_wait): Rename to ...
1614         (__lll_robust_timedlock_wait): ... this.    Add private argument.
1615         Use __NR_gettimeofday.  Use LOAD_FUTEX_WAIT macro.
1616         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Include
1617         lowlevellock.h.
1618         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
1619         (pthread_barrier_wait): Use __lll_{lock,unlock}_* instead of
1620         __lll_mutex_{lock,unlock}_*.
1621         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Include
1622         lowlevellock.h and pthread-errnos.h.
1623         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
1624         FUTEX_CMP_REQUEUE, EINVAL): Remove.
1625         (__pthread_cond_broadcast): Use __lll_{lock,unlock}_* instead of
1626         __lll_mutex_{lock,unlock}_*.
1627         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Include
1628         lowlevellock.h and pthread-errnos.h.
1629         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE, EINVAL): Remove.
1630         (__pthread_cond_signal): Use __lll_{lock,unlock}_* instead of
1631         __lll_mutex_{lock,unlock}_*.
1632         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
1633         lowlevellock.h.
1634         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE): Remove.
1635         (__pthread_cond_timedwait): Use __lll_{lock,unlock}_* instead of
1636         __lll_mutex_{lock,unlock}_*.  Use __NR_gettimeofday.
1637         (__condvar_tw_cleanup): Likewise.
1638         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
1639         lowlevellock.h.
1640         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
1641         (__pthread_cond_wait): Use __lll_{lock,unlock}_* instead of
1642         __lll_mutex_{lock,unlock}_*.
1643         ( __condvar_w_cleanup): Likewise.
1644         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Include lowlevellock.h.
1645         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
1646         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Include
1647         lowlevellock.h.
1648         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
1649         (__pthread_rwlock_rdlock): Use __lll_{lock,unlock}_* instead of
1650         __lll_mutex_{lock,unlock}_*.
1651         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Include
1652         lowlevellock.h.
1653         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
1654         FUTEX_PRIVATE_FLAG): Remove.
1655         (pthread_rwlock_timedrdlock): Use __lll_{lock,unlock}_* instead of
1656         __lll_mutex_{lock,unlock}_*.  Use __NR_gettimeofday.
1657         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Include
1658         lowlevellock.h.
1659         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
1660         FUTEX_PRIVATE_FLAG): Remove.
1661         (pthread_rwlock_timedwrlock): Use __lll_{lock,unlock}_* instead of
1662         __lll_mutex_{lock,unlock}_*.  Use __NR_gettimeofday.
1663         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Include
1664         lowlevellock.h.
1665         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
1666         (__pthread_rwlock_unlock): Use __lll_{lock,unlock}_* instead of
1667         __lll_mutex_{lock,unlock}_*.
1668         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Include
1669         lowlevellock.h.
1670         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
1671         (__pthread_rwlock_wrlock): Use __lll_{lock,unlock}_* instead of
1672         __lll_mutex_{lock,unlock}_*.
1673         * sysdeps/unix/sysv/linux/sh/sem_post.S: Include lowlevellock.h.
1674         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
1675         (__new_sem_post): Use standard initial exec code sequences.
1676         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Include
1677         lowlevellock.h.
1678         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
1679         FUTEX_PRIVATE_FLAG): Remove.
1680         (sem_timedwait): Use __NR_gettimeofday.  Use standard initial
1681         exec code sequences.
1682         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Include lowlevellock.h.
1683         (__new_sem_trywait): Use standard initial exec code sequences.
1684         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Include lowlevellock.h.
1685         (__new_sem_wait): Use standard initial exec code sequences.
1687 2007-07-31  Anton Blanchard  <anton@samba.org>
1689         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
1690         Use __asm __volatile (__lll_acq_instr ::: "memory") instead of
1691         atomic_full_barrier.
1693 2007-07-31  Jakub Jelinek  <jakub@redhat.com>
1695         * allocatestack.c (stack_cache_lock): Change type to int.
1696         (get_cached_stack, allocate_stack, __deallocate_stack,
1697         __make_stacks_executable, __find_thread_by_id, __nptl_setxid,
1698         __pthread_init_static_tls, __wait_lookup_done): Add LLL_PRIVATE
1699         as second argument to lll_lock and lll_unlock macros on
1700         stack_cache_lock.
1701         * pthread_create.c (__find_in_stack_list): Likewise.
1702         (start_thread): Similarly with pd->lock.  Use lll_robust_dead
1703         macro instead of lll_robust_mutex_dead, pass LLL_SHARED to it
1704         as second argument.
1705         * descr.h (struct pthread): Change lock and setxid_futex field
1706         type to int.
1707         * old_pthread_cond_broadcast.c (__pthread_cond_broadcast_2_0): Use
1708         LLL_LOCK_INITIALIZER instead of LLL_MUTEX_LOCK_INITIALIZER.
1709         * old_pthread_cond_signal.c (__pthread_cond_signal_2_0): Likewise.
1710         * old_pthread_cond_timedwait.c (__pthread_cond_timedwait_2_0):
1711         Likewise.
1712         * old_pthread_cond_wait.c (__pthread_cond_wait_2_0): Likewise.
1713         * pthread_cond_init.c (__pthread_cond_init): Likewise.
1714         * pthreadP.h (__attr_list_lock): Change type to int.
1715         * pthread_attr_init.c (__attr_list_lock): Likewise.
1716         * pthread_barrier_destroy.c (pthread_barrier_destroy): Pass
1717         ibarrier->private ^ FUTEX_PRIVATE_FLAG as second argument to
1718         lll_{,un}lock.
1719         * pthread_barrier_wait.c (pthread_barrier_wait): Likewise and
1720         also for lll_futex_{wake,wait}.
1721         * pthread_barrier_init.c (pthread_barrier_init): Make iattr
1722         a pointer to const.
1723         * pthread_cond_broadcast.c (__pthread_cond_broadcast): Pass
1724         LLL_SHARED as second argument to lll_{,un}lock.
1725         * pthread_cond_destroy.c (__pthread_cond_destroy): Likewise.
1726         * pthread_cond_signal.c (__pthread_cond_singal): Likewise.
1727         * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
1728         * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait):
1729         Likewise.
1730         * pthread_getattr_np.c (pthread_getattr_np): Add LLL_PRIVATE
1731         as second argument to lll_{,un}lock macros on pd->lock.
1732         * pthread_getschedparam.c (__pthread_getschedparam): Likewise.
1733         * pthread_setschedparam.c (__pthread_setschedparam): Likewise.
1734         * pthread_setschedprio.c (pthread_setschedprio): Likewise.
1735         * tpp.c (__pthread_tpp_change_priority, __pthread_current_priority):
1736         Likewise.
1737         * sysdeps/pthread/createthread.c (do_clone, create_thread):
1738         Likewise.
1739         * pthread_once.c (once_lock): Change type to int.
1740         (__pthread_once): Pass LLL_PRIVATE as second argument to
1741         lll_{,un}lock macros on once_lock.
1742         * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Use
1743         lll_{,un}lock macros instead of lll_mutex_{,un}lock, pass
1744         rwlock->__data.__shared as second argument to them and similarly
1745         for lll_futex_w*.
1746         * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock):
1747         Likewise.
1748         * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock):
1749         Likewise.
1750         * pthread_rwlock_tryrdlock.c (__pthread_rwlock_tryrdlock): Likewise.
1751         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Likewise.
1752         * pthread_rwlock_unlock.c (__pthread_rwlock_unlock): Likewise.
1753         * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
1754         * sem_close.c (sem_close): Pass LLL_PRIVATE as second argument
1755         to lll_{,un}lock macros on __sem_mappings_lock.
1756         * sem_open.c (check_add_mapping): Likewise.
1757         (__sem_mappings_lock): Change type to int.
1758         * semaphoreP.h (__sem_mappings_lock): Likewise.
1759         * pthread_mutex_lock.c (LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
1760         LLL_ROBUST_MUTEX_LOCK): Use lll_{,try,robust_}lock macros
1761         instead of lll_*mutex_*, pass LLL_SHARED as last
1762         argument.
1763         (__pthread_mutex_lock): Use lll_unlock instead of lll_mutex_unlock,
1764         pass LLL_SHARED as last argument.
1765         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK,
1766         LLL_MUTEX_TRYLOCK, LLL_ROBUST_MUTEX_LOCK): Use
1767         lll_{cond_,cond_try,robust_cond}lock macros instead of lll_*mutex_*,
1768         pass LLL_SHARED as last argument.
1769         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
1770         lll_{timed,try,robust_timed,un}lock instead of lll_*mutex*, pass
1771         LLL_SHARED as last argument.
1772         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Similarly.
1773         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt):
1774         Similarly.
1775         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_lock,
1776         __libc_lock_lock_recursive, __libc_lock_unlock,
1777         __libc_lock_unlock_recursive): Pass LLL_PRIVATE as second
1778         argument to lll_{,un}lock.
1779         * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_lock,
1780         _IO_lock_unlock): Likewise.
1781         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Don't use
1782         compound literal.
1783         * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
1784         Pass LLL_PRIVATE as second argument to lll_{,un}lock macros on
1785         __fork_lock.
1786         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork,
1787         free_mem): Likewise.
1788         (__fork_lock): Change type to int.
1789         * sysdeps/unix/sysv/linux/fork.h (__fork_lock): Likewise.
1790         * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Pass
1791         isem->private ^ FUTEX_PRIVATE_FLAG as second argument to
1792         lll_futex_wake.
1793         * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
1794         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Likewise.
1795         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait_private):
1796         New function.
1797         (__lll_lock_wait, __lll_timedlock_wait): Add private argument and
1798         pass it through to lll_futex_*wait, only compile in when
1799         IS_IN_libpthread.
1800         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
1801         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): Add private
1802         argument and pass it through to lll_futex_*wait.
1803         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Renamed all
1804         lll_mutex_* resp. lll_robust_mutex_* macros to lll_* resp.
1805         lll_robust_*.  Renamed all __lll_mutex_* resp. __lll_robust_mutex_*
1806         inline functions to __lll_* resp. __lll_robust_*.
1807         (LLL_MUTEX_LOCK_INITIALIZER): Remove.
1808         (lll_mutex_dead): Add private argument.
1809         (__lll_lock_wait_private): New prototype.
1810         (__lll_lock_wait, __lll_robust_lock_wait, __lll_lock_timedwait,
1811         __lll_robust_lock_timedwait): Add private argument to prototypes.
1812         (__lll_lock): Add private argument, if it is constant LLL_PRIVATE,
1813         call __lll_lock_wait_private, otherwise pass private to
1814         __lll_lock_wait.
1815         (__lll_robust_lock, __lll_cond_lock, __lll_timedlock,
1816         __lll_robust_timedlock): Add private argument, pass it to
1817         __lll_*wait functions.
1818         (__lll_unlock): Add private argument, if it is constant LLL_PRIVATE,
1819         call __lll_unlock_wake_private, otherwise pass private to
1820         __lll_unlock_wake.
1821         (__lll_robust_unlock): Add private argument, pass it to
1822         __lll_robust_unlock_wake.
1823         (lll_lock, lll_robust_lock, lll_cond_lock, lll_timedlock,
1824         lll_robust_timedlock, lll_unlock, lll_robust_unlock): Add private
1825         argument, pass it through to __lll_* inline function.
1826         (__lll_mutex_unlock_force, lll_mutex_unlock_force): Remove.
1827         (lll_lock_t): Remove.
1828         (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
1829         __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
1830         lll_cond_wake, lll_cond_broadcast): Remove.
1831         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
1832         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
1833         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
1834         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
1835         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Allow including
1836         the header from assembler.  Renamed all lll_mutex_* resp.
1837         lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
1838         (LOCK, FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP,
1839         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
1840         (LLL_MUTEX_LOCK_INITIALIZER, LLL_MUTEX_LOCK_INITIALIZER_LOCKED,
1841         LLL_MUTEX_LOCK_INITIALIZER_WAITERS): Remove.
1842         (__lll_mutex_lock_wait, __lll_mutex_timedlock_wait,
1843         __lll_mutex_unlock_wake, __lll_lock_wait, __lll_unlock_wake):
1844         Remove prototype.
1845         (__lll_trylock_asm, __lll_lock_asm_start, __lll_unlock_asm): Define.
1846         (lll_robust_trylock, lll_cond_trylock): Use LLL_LOCK_INITIALIZER*
1847         rather than LLL_MUTEX_LOCK_INITIALIZER* macros.
1848         (lll_trylock): Likewise, use __lll_trylock_asm, pass
1849         MULTIPLE_THREADS_OFFSET as another asm operand.
1850         (lll_lock): Add private argument, use __lll_lock_asm_start, pass
1851         MULTIPLE_THREADS_OFFSET as last asm operand, call
1852         __lll_lock_wait_private if private is constant LLL_PRIVATE,
1853         otherwise pass private as another argument to __lll_lock_wait.
1854         (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
1855         lll_timedlock, lll_robust_timedlock): Add private argument, pass
1856         private as another argument to __lll_*lock_wait call.
1857         (lll_unlock): Add private argument, use __lll_unlock_asm, pass
1858         MULTIPLE_THREADS_OFFSET as another asm operand, call
1859         __lll_unlock_wake_private if private is constant LLL_PRIVATE,
1860         otherwise pass private as another argument to __lll_unlock_wake.
1861         (lll_robust_unlock): Add private argument, pass private as another
1862         argument to __lll_unlock_wake.
1863         (lll_robust_dead): Add private argument, use __lll_private_flag
1864         macro.
1865         (lll_islocked): Use LLL_LOCK_INITIALIZER instead of
1866         LLL_MUTEX_LOCK_INITIALIZER.
1867         (lll_lock_t): Remove.
1868         (LLL_LOCK_INITIALIZER_WAITERS): Define.
1869         (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
1870         __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
1871         lll_cond_wake, lll_cond_broadcast): Remove.
1872         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
1873         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Revert
1874         2007-05-2{3,9} changes.
1875         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Include
1876         kernel-features.h and lowlevellock.h.
1877         (LOAD_PRIVATE_FUTEX_WAIT): Define.
1878         (LOAD_FUTEX_WAIT): Rewritten.
1879         (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
1880         define.
1881         (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
1882         (__lll_mutex_lock_wait): Rename to ...
1883         (__lll_lock_wait): ... this.  Take futex addr from %edx instead of
1884         %ecx, %ecx is now private argument.  Don't compile in for libc.so.
1885         (__lll_mutex_timedlock_wait): Rename to ...
1886         (__lll_timedlock_wait): ... this.  Use __NR_gettimeofday.  %esi
1887         contains private argument.  Don't compile in for libc.so.
1888         (__lll_mutex_unlock_wake): Rename to ...
1889         (__lll_unlock_wake): ... this.  %ecx contains private argument.
1890         Don't compile in for libc.so.
1891         (__lll_timedwait_tid): Use __NR_gettimeofday.
1892         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Include
1893         kernel-features.h and lowlevellock.h.
1894         (LOAD_FUTEX_WAIT): Define.
1895         (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
1896         define.
1897         (__lll_robust_mutex_lock_wait): Rename to ...
1898         (__lll_robust_lock_wait): ... this.  Futex addr is now in %edx
1899         argument, %ecx argument contains private.  Use LOAD_FUTEX_WAIT
1900         macro.
1901         (__lll_robust_mutex_timedlock_wait): Rename to ...
1902         (__lll_robust_timedlock_wait): ... this.  Use __NR_gettimeofday.
1903         %esi argument contains private, use LOAD_FUTEX_WAIT macro.
1904         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Include
1905         lowlevellock.h.
1906         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1907         (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
1908         PRIVATE(%ebx) ^ LLL_SHARED as private argument in %ecx to
1909         __lll_lock_wait and __lll_unlock_wake, pass MUTEX(%ebx) address
1910         to __lll_lock_wait in %edx.
1911         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
1912         Include lowlevellock.h and pthread-errnos.h.
1913         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
1914         FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
1915         (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*, pass
1916         cond_lock address in %edx rather than %ecx to __lll_lock_wait,
1917         pass LLL_SHARED in %ecx to both __lll_lock_wait and
1918         __lll_unlock_wake.
1919         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
1920         Include lowlevellock.h and pthread-errnos.h.
1921         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
1922         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
1923         (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*, pass
1924         cond_lock address in %edx rather than %ecx to __lll_lock_wait,
1925         pass LLL_SHARED in %ecx to both __lll_lock_wait and
1926         __lll_unlock_wake.
1927         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
1928         Include lowlevellock.h.
1929         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
1930         Don't define.
1931         (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*, pass
1932         cond_lock address in %edx rather than %ecx to __lll_lock_wait,
1933         pass LLL_SHARED in %ecx to both __lll_lock_wait and
1934         __lll_unlock_wake.  Use __NR_gettimeofday.
1935         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
1936         Include lowlevellock.h.
1937         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1938         (__pthread_cond_wait, __condvar_w_cleanup): Rename __lll_mutex_*
1939         to __lll_*, pass cond_lock address in %edx rather than %ecx to
1940         __lll_lock_wait, pass LLL_SHARED in %ecx to both __lll_lock_wait
1941         and __lll_unlock_wake.
1942         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S:
1943         Include lowlevellock.h.
1944         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1945         (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*, pass
1946         MUTEX(%ebx) address in %edx rather than %ecx to
1947         __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
1948         and __lll_unlock_wake.  Move return value from %ecx to %edx
1949         register.
1950         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1951         Include lowlevellock.h.
1952         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
1953         Don't define.
1954         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
1955         MUTEX(%ebp) address in %edx rather than %ecx to
1956         __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
1957         and __lll_unlock_wake.  Move return value from %ecx to %edx
1958         register.  Use __NR_gettimeofday.
1959         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1960         Include lowlevellock.h.
1961         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
1962         Don't define.
1963         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
1964         MUTEX(%ebp) address in %edx rather than %ecx to
1965         __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
1966         and __lll_unlock_wake.  Move return value from %ecx to %edx
1967         register.  Use __NR_gettimeofday.
1968         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
1969         Include lowlevellock.h.
1970         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1971         (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*, pass
1972         MUTEX(%edi) address in %edx rather than %ecx to
1973         __lll_lock_wait, pass PSHARED(%edi) in %ecx to both __lll_lock_wait
1974         and __lll_unlock_wake.
1975         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
1976         Include lowlevellock.h.
1977         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1978         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
1979         MUTEX(%ebx) address in %edx rather than %ecx to
1980         __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
1981         and __lll_unlock_wake.  Move return value from %ecx to %edx
1982         register.
1983         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Include
1984         lowlevellock.h.
1985         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
1986         define.
1987         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Include lowlevellock.h.
1988         (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
1989         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Include
1990         lowlevellock.h.
1991         (LOCK, SYS_futex, SYS_gettimeofday, FUTEX_WAIT): Don't define.
1992         (sem_timedwait): Use __NR_gettimeofday.
1993         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Include
1994         lowlevellock.h.
1995         (LOCK): Don't define.
1996         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include
1997         lowlevellock.h.
1998         (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
1999         * sysdeps/unix/sysv/linux/powerpc/sem_post.c: Wake only when there
2000         are waiters.
2001         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Revert
2002         2007-05-2{3,9} changes.
2003         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Include
2004         kernel-features.h and lowlevellock.h.
2005         (LOAD_PRIVATE_FUTEX_WAIT): Define.
2006         (LOAD_FUTEX_WAIT): Rewritten.
2007         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
2008         (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
2009         (__lll_mutex_lock_wait): Rename to ...
2010         (__lll_lock_wait): ... this.  %esi is now private argument.
2011         Don't compile in for libc.so.
2012         (__lll_mutex_timedlock_wait): Rename to ...
2013         (__lll_timedlock_wait): ... this.  %esi contains private argument.
2014         Don't compile in for libc.so.
2015         (__lll_mutex_unlock_wake): Rename to ...
2016         (__lll_unlock_wake): ... this.  %esi contains private argument.
2017         Don't compile in for libc.so.
2018         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Include
2019         kernel-features.h and lowlevellock.h.
2020         (LOAD_FUTEX_WAIT): Define.
2021         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
2022         (__lll_robust_mutex_lock_wait): Rename to ...
2023         (__lll_robust_lock_wait): ... this.  %esi argument contains private.
2024         Use LOAD_FUTEX_WAIT macro.
2025         (__lll_robust_mutex_timedlock_wait): Rename to ...
2026         (__lll_robust_timedlock_wait): ... this. %esi argument contains
2027         private, use LOAD_FUTEX_WAIT macro.
2028         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Include
2029         lowlevellock.h.
2030         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2031         (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
2032         PRIVATE(%rdi) ^ LLL_SHARED as private argument in %esi to
2033         __lll_lock_wait and __lll_unlock_wake.
2034         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S:
2035         Include lowlevellock.h and pthread-errnos.h.
2036         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
2037         FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
2038         (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*,
2039         pass LLL_SHARED in %esi to both __lll_lock_wait and
2040         __lll_unlock_wake.
2041         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S:
2042         Include lowlevellock.h and pthread-errnos.h.
2043         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
2044         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
2045         (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*,
2046         pass LLL_SHARED in %esi to both __lll_lock_wait and
2047         __lll_unlock_wake.
2048         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:
2049         Include lowlevellock.h.
2050         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2051         (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*,
2052         pass LLL_SHARED in %esi to both __lll_lock_wait and
2053         __lll_unlock_wake.
2054         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
2055         Include lowlevellock.h.
2056         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2057         (__pthread_cond_wait, __condvar_cleanup): Rename __lll_mutex_*
2058         to __lll_*, pass LLL_SHARED in %esi to both __lll_lock_wait
2059         and __lll_unlock_wake.
2060         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S:
2061         Include lowlevellock.h.
2062         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
2063         Don't define.
2064         (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*,
2065         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
2066         and __lll_unlock_wake.
2067         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
2068         Include lowlevellock.h.
2069         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
2070         Don't define.
2071         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
2072         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
2073         and __lll_unlock_wake.
2074         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
2075         Include lowlevellock.h.
2076         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
2077         Don't define.
2078         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
2079         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
2080         and __lll_unlock_wake.
2081         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S:
2082         Include lowlevellock.h.
2083         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
2084         Don't define.
2085         (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*,
2086         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
2087         and __lll_unlock_wake.
2088         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S:
2089         Include lowlevellock.h.
2090         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
2091         Don't define.
2092         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
2093         pass PSHARED(%rdi) in %ecx to both __lll_lock_wait
2094         and __lll_unlock_wake.
2095         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Include
2096         lowlevellock.h.
2097         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
2098         define.
2099         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Include lowlevellock.h.
2100         (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
2101         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Include
2102         lowlevellock.h.
2103         (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
2104         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Include
2105         lowlevellock.h.
2106         (LOCK): Don't define.
2107         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Include
2108         lowlevellock.h.
2109         (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
2110         * sysdeps/unix/sysv/linux/sparc/internaltypes.h: New file.
2111         * sysdeps/unix/sysv/linux/sparc/pthread_barrier_destroy.c: New file.
2112         * sysdeps/unix/sysv/linux/sparc/pthread_barrier_init.c: New file.
2113         * sysdeps/unix/sysv/linux/sparc/pthread_barrier_wait.c: New file.
2114         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
2115         (__lll_lock_wait_private): New function.
2116         (__lll_lock_wait, __lll_timedlock_wait): Add private argument, pass
2117         it to lll_futex_*wait.  Don't compile in for libc.so.
2118         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c:
2119         Remove.
2120         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c
2121         (struct sparc_pthread_barrier): Remove.
2122         (pthread_barrier_wait): Use union sparc_pthread_barrier instead of
2123         struct sparc_pthread_barrier.  Pass
2124         ibarrier->s.pshared ? LLL_SHARED : LLL_PRIVATE to lll_{,un}lock
2125         and lll_futex_wait macros.
2126         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
2127         Remove.
2128         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
2129         Include sparc pthread_barrier_wait.c instead of generic one.
2131 2007-07-30  Jakub Jelinek  <jakub@redhat.com>
2133         * tst-rwlock14.c (do_test): Avoid warnings on 32-bit arches.
2135         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
2136         (pthread_rwlock_timedrdlock): Copy futex retval to %esi rather than
2137         %ecx.
2138         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
2139         (pthread_rwlock_timedwrlock): Likewise.
2140         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
2141         (__pthread_rwlock_unlock): Fix MUTEX != 0 args to __lll_*.
2143 2007-07-31  Jakub Jelinek  <jakub@redhat.com>
2145         * sysdeps/sparc/tls.h (tcbhead_t): Add private_futex field.
2147 2007-07-26  Jakub Jelinek  <jakub@redhat.com>
2149         * tst-locale2.c (useless): Add return statement.
2151 2007-07-24  Jakub Jelinek  <jakub@redhat.com>
2153         * allocatestack.c (__nptl_setxid, __wait_lookup_done): Replace
2154         lll_private_futex_* (*) with lll_futex_* (*, LLL_PRIVATE).
2155         * pthread_create.c (start_thread): Likewise.
2156         * init.c (sighandler_setxid): Likewise.
2157         * sysdeps/alpha/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
2158         * sysdeps/ia64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
2159         * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
2160         * sysdeps/s390/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
2161         * sysdeps/powerpc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
2162         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
2163         * sysdeps/sparc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
2164         * sysdeps/sh/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
2165         * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY, AIO_MISC_WAIT):
2166         Likewise.
2167         * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY, GAI_MISC_WAIT):
2168         Likewise.
2169         * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
2170         Likewise.
2171         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_waitzero,
2172         __rtld_notify): Likewise.
2173         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Likewise.
2174         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (clear_once_control,
2175         __pthread_once): Likewise.
2176         * sysdeps/unix/sysv/linux/alpha/pthread_once.c (clear_once_control,
2177         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
2178         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_PRIVATE_FLAG,
2179         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
2180         (lll_futex_wait): Add private argument, define as wrapper around
2181         lll_futex_timed_wait.
2182         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
2183         use __lll_private_flag macro.
2184         (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
2185         __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
2186         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (clear_once_control,
2187         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
2188         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_PRIVATE_FLAG,
2189         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
2190         (lll_futex_wait): Add private argument, define as wrapper around
2191         lll_futex_timed_wait.
2192         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
2193         use __lll_private_flag macro.
2194         (__lll_mutex_unlock, __lll_robust_mutex_unlock, lll_wait_tid,
2195         __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
2196         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
2197         Define.
2198         (lll_futex_timed_wait, lll_futex_wake): Use it.
2199         (lll_private_futex_wait, lll_private_futex_timed_wait,
2200         lll_private_futex_wake): Removed.
2201         * sysdeps/unix/sysv/linux/s390/pthread_once.c (clear_once_control,
2202         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
2203         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_PRIVATE_FLAG,
2204         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
2205         (lll_futex_wait): Add private argument, define as wrapper around
2206         lll_futex_timed_wait.
2207         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
2208         use __lll_private_flag macro.
2209         (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
2210         lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
2211         to lll_futex_*.
2212         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
2213         (lll_private_futex_wait, lll_private_futex_timed_wait,
2214         lll_private_futex_wake): Removed.
2215         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_private_flag):
2216         Fix !__ASSUME_PRIVATE_FUTEX non-constant private case.
2217         (lll_private_futex_wait, lll_private_futex_timed_wait,
2218         lll_private_futex_wake): Removed.
2219         * sysdeps/unix/sysv/linux/sparc/pthread_once.c (clear_once_control,
2220         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
2221         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_PRIVATE_FLAG,
2222         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
2223         (lll_futex_wait): Add private argument, define as wrapper around
2224         lll_futex_timed_wait.
2225         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
2226         use __lll_private_flag macro.
2227         (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
2228         lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
2229         to lll_futex_*.
2230         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (__lll_private_flag):
2231         Define.
2232         (lll_futex_timed_wait, lll_futex_wake): Use it.
2233         (lll_private_futex_wait, lll_private_futex_timed_wait,
2234         lll_private_futex_wake): Removed.
2236 2007-07-27  Jakub Jelinek  <jakub@redhat.com>
2238         * sysdeps/sparc/tls.h (tcbhead_t): Move gscope_flag to the end
2239         of the structure for sparc32.
2241 2007-07-26  Aurelien Jarno  <aurelien@aurel32.net>
2243         * sysdeps/sparc/tls.h (tcbhead_t): Add gscope_flag.
2245 2007-07-23  Ulrich Drepper  <drepper@redhat.com>
2247         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
2248         code used when private futexes are assumed.
2249         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
2250         Likewise.
2252 2007-07-23  Jakub Jelinek  <jakub@redhat.com>
2254         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
2255         (__lll_private_flag): Define.
2256         (lll_futex_wait): Define as a wrapper around lll_futex_timed_wait.
2257         (lll_futex_timed_wait, lll_futex_wake, lll_futex_wake_unlock): Use
2258         __lll_private_flag.
2259         (lll_private_futex_wait, lll_private_futex_timedwait,
2260         lll_private_futex_wake): Define as wrapper around non-_private
2261         macros.
2262         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
2263         (__lll_private_flag): Define.
2264         (lll_futex_timed_wait, lll_futex_wake): Use __lll_private_flag.
2265         (lll_private_futex_wait, lll_private_futex_timedwait,
2266         lll_private_futex_wake): Define as wrapper around non-_private
2267         macros.
2269 2007-07-10  Steven Munroe  <sjmunroe@us.ibm.com>
2271         * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Add LLL_SHARED
2272         parameter to lll_futex_wait call.
2273         * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
2275         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
2276         Replace lll_futex_wait with lll_private_futex_wait.
2277         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
2278         Add LLL_SHARED parameter to lll_futex_wake().
2280         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define LLL_PRIVATE
2281         LLL_SHARED, lll_private_futex_wait, lll_private_futex_timed_wait and
2282         lll_private_futex_wake.
2283         (lll_futex_wait): Add private parameter. Adjust FUTEX_PRIVATE_FLAG
2284         bit from private parm before syscall.
2285         (lll_futex_timed_wait): Likewise.
2286         (lll_futex_wake): Likewise.
2287         (lll_futex_wake_unlock): Likewise.
2288         (lll_mutex_unlock): Add LLL_SHARED parm to lll_futex_wake call.
2289         (lll_robust_mutex_unlock): Likewise.
2290         (lll_mutex_unlock_force): Likewise.
2291         (lll_wait_tid): Add LLL_SHARED parm to lll_futex_wait call.
2293 2007-07-23  Ulrich Drepper  <drepper@redhat.com>
2295         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
2296         compilation when unconditionally using private futexes.
2297         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
2298         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
2299         Likewise.
2300         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
2301         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
2303 2007-07-17  Jakub Jelinek  <jakub@redhat.com>
2305         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock_clear_flags2):
2306         Define.
2308 2007-07-06  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2310         * sysdeps/sh/tls.h: Include stdlib.h, list.h, sysdep.h and
2311         kernel-features.h.
2313 2007-05-16  Roland McGrath  <roland@redhat.com>
2315         * init.c (__nptl_initial_report_events): New variable.
2316         (__pthread_initialize_minimal_internal): Initialize pd->report_events
2317         to that.
2319 2007-06-22  Jakub Jelinek  <jakub@redhat.com>
2321         * pthread_getattr_np.c (pthread_getattr_np): Clear cpuset and
2322         cpusetsize if pthread_getaffinity_np failed with ENOSYS.
2324 2007-06-19  Ulrich Drepper  <drepper@redhat.com>
2326         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Remove mrlock
2327         implementation.
2329 2007-06-18  Ulrich Drepper  <drepper@redhat.com>
2331         * pthreadP.h: Define PTHREAD_MUTEX_TYPE.
2332         * phtread_mutex_lock.c: Use PTHREAD_MUTEX_TYPE.
2333         * pthread_mutex_timedlock.c: Likewise.
2334         * pthread_mutex_trylock.c: Likewise.
2335         * pthread_mutex_unlock.c: Likewise.
2337 2007-06-17  Andreas Schwab  <schwab@suse.de>
2339         * sysdeps/pthread/pt-initfini.c: Tell gcc about the nonstandard
2340         sections.
2342 2007-06-17  Ulrich Drepper  <drepper@redhat.com>
2344         * allocatestack.c (allocate_stack): Make code compile if
2345         __ASSUME_PRIVATE_FUTEX is set.
2347 2007-06-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2349         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S:
2350         (__pthread_rwlock_rdlock): Don't use non SH-3/4 instruction.
2351         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S:
2352         (__pthread_rwlock_wrlock): Likewise.
2353         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
2354         (pthread_rwlock_timedrdlock): Likewise.
2355         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
2356         (pthread_rwlock_timedwrlock): Likewise.
2357         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S:
2358         (__pthread_rwlock_unlock): Likewise.
2360 2007-06-10  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2362         * sysdeps/sh/tcb-offsets.sym: Add PRIVATE_FUTEX.
2363         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Include endian.h.
2364         Split __flags into __flags, __shared, __pad1 and __pad2.
2365         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Use private
2366         futexes if they are available.
2367         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Adjust so that change
2368         in libc-lowlevellock.S allow using private futexes.
2369         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
2370         FUTEX_PRIVATE_FLAG.  Add additional parameter to lll_futex_wait,
2371         lll_futex_timed_wait and lll_futex_wake.  Change lll_futex_wait
2372         to call lll_futex_timed_wait.  Add lll_private_futex_wait,
2373         lll_private_futex_timed_wait and lll_private_futex_wake.
2374         (lll_robust_mutex_unlock): Fix typo.
2375         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Use private
2376         field in futex command setup.
2377         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Use
2378         COND_NWAITERS_SHIFT instead of COND_CLOCK_BITS.
2379         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
2380         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use private futexes
2381         if they are available.  Remove clear_once_control.
2382         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Use private
2383         futexes if they are available.
2384         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
2385         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
2386         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
2387         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
2388         * sysdeps/unix/sysv/linux/sh/sem_post.S: Add private futex support.
2389         Wake only when there are waiters.
2390         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add private futex
2391         support.  Indicate that there are waiters.  Remove unnecessary
2392         extra cancellation test.
2393         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.  Removed
2394         left-over duplication of __sem_wait_cleanup.
2396 2007-06-07  Ulrich Drepper  <drepper@redhat.com>
2398         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Add additional
2399         parameter to lll_futex_wait, lll_futex_timed_wait, and
2400         lll_futex_wake.  Change lll_futex_wait to call lll_futex_timed_wait.
2401         Add lll_private_futex_wait, lll_private_futex_timed_wait, and
2402         lll_private_futex_wake.
2403         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
2404         * allocatestack.c: Adjust use of lll_futex_* macros.
2405         * init.c: Likewise.
2406         * lowlevellock.h: Likewise.
2407         * pthread_barrier_wait.c: Likewise.
2408         * pthread_cond_broadcast.c: Likewise.
2409         * pthread_cond_destroy.c: Likewise.
2410         * pthread_cond_signal.c: Likewise.
2411         * pthread_cond_timedwait.c: Likewise.
2412         * pthread_cond_wait.c: Likewise.
2413         * pthread_create.c: Likewise.
2414         * pthread_mutex_lock.c: Likewise.
2415         * pthread_mutex_setprioceiling.c: Likewise.
2416         * pthread_mutex_timedlock.c: Likewise.
2417         * pthread_mutex_unlock.c: Likewise.
2418         * pthread_rwlock_timedrdlock.c: Likewise.
2419         * pthread_rwlock_timedwrlock.c: Likewise.
2420         * pthread_rwlock_unlock.c: Likewise.
2421         * sysdeps/alpha/tls.h: Likewise.
2422         * sysdeps/i386/tls.h: Likewise.
2423         * sysdeps/ia64/tls.h: Likewise.
2424         * sysdeps/powerpc/tls.h: Likewise.
2425         * sysdeps/pthread/aio_misc.h: Likewise.
2426         * sysdeps/pthread/gai_misc.h: Likewise.
2427         * sysdeps/s390/tls.h: Likewise.
2428         * sysdeps/sh/tls.h: Likewise.
2429         * sysdeps/sparc/tls.h: Likewise.
2430         * sysdeps/unix/sysv/linux/fork.c: Likewise.
2431         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
2432         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: Likewise.
2433         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Likewise.
2434         * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
2435         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
2436         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
2437         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
2438         * sysdeps/unix/sysv/linux/sparc/pthread_once.c: Likewise.
2439         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c:
2440         Likewise.
2441         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: Likewise.
2442         * sysdeps/x86_64/tls.h: Likewise.
2444 2007-05-29  Ulrich Drepper  <drepper@redhat.com>
2446         * pthread_getattr_np.c: No need to install a cancellation handler,
2447         this is no cancellation point.
2448         * pthread_getschedparam.c: Likewise.
2449         * pthread_setschedparam.c: Likewise.
2450         * pthread_setschedprio.c: Likewise.
2451         * sysdeps/unix/sysv/linux/lowlevellock.c: Remove all traces of
2452         lll_unlock_wake_cb.
2453         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
2454         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
2455         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
2456         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2457         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2458         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2459         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
2460         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
2461         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
2462         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: Likewise.
2463         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
2464         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2466         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Checking
2467         whether there are more than one thread makes no sense here since
2468         we only call the slow path if the locks are taken.
2469         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Likewise.
2471         * sysdeps/unix/sysv/linux/internaltypes.h: Introduce
2472         COND_NWAITERS_SHIFT.
2473         * pthread_cond_destroy.c: Use COND_NWAITERS_SHIFT instead of
2474         COND_CLOCK_BITS.
2475         * pthread_cond_init.c: Likewise.
2476         * pthread_cond_timedwait.c: Likewise.
2477         * pthread_cond_wait.c: Likewise.
2478         * pthread_condattr_getclock.c: Likewise.
2479         * pthread_condattr_setclock.c: Likewise.
2480         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Likewise.
2481         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2482         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
2483         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
2484         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2486 2007-05-28  Jakub Jelinek  <jakub@redhat.com>
2488         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c: Include
2489         unistd.h.
2491         * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Use explicit
2492         insn suffix.
2493         (THREAD_GSCOPE_GET_FLAG): Remove.
2494         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Remove.
2495         * allocatestack.c (__wait_lookup_done): Revert 2007-05-24
2496         changes.
2497         * sysdeps/powerpc/tls.h (tcbhead_t): Remove gscope_flag.
2498         (THREAD_GSCOPE_GET_FLAG): Remove.
2499         (THREAD_GSCOPE_RESET_FLAG): Use THREAD_SELF->header.gscope_flag
2500         instead of THREAD_GSCOPE_GET_FLAG.
2501         (THREAD_GSCOPE_SET_FLAG): Likewise.  Add atomic_write_barrier after
2502         it.
2503         * sysdeps/s390/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
2504         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
2505         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
2506         THREAD_GSCOPE_WAIT): Define.
2507         * sysdeps/sparc/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
2508         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
2509         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
2510         THREAD_GSCOPE_WAIT): Define.
2511         * sysdeps/sh/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
2512         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
2513         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
2514         THREAD_GSCOPE_WAIT): Define.
2515         * sysdeps/ia64/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
2516         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
2517         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
2518         THREAD_GSCOPE_WAIT): Define.
2520 2007-05-24  Richard Henderson  <rth@redhat.com>
2522         * descr.h (struct pthread): Add header.gscope_flag.
2523         * sysdeps/alpha/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
2524         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
2525         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
2526         THREAD_GSCOPE_WAIT): Define.
2528 2007-05-27  Ulrich Drepper  <drepper@redhat.com>
2530         * init.c: Make it compile with older kernel headers.
2532         * tst-initializers1.c: Show through exit code which test failed.
2534         * pthread_rwlock_init.c: Also initialize __shared field.
2535         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Split __flags
2536         element in rwlock structure into four byte elements.  One of them is
2537         the new __shared element.
2538         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h [__WORDSIZE=32]:
2539         Likewise.
2540         [__WORDSIZE=64]: Renamed __pad1 element int rwlock structure to
2541         __shared, adjust names of other padding elements.
2542         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2543         * sysdeps/pthread/pthread.h: Adjust rwlock initializers.
2544         * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: Add PSHARED.
2545         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define
2546         FUTEX_PRIVATE_FLAG.
2547         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Change main
2548         futex to use private operations if possible.
2549         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
2550         Likewise.
2551         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
2552         Likewise.
2553         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
2554         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
2555         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
2556         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2557         Likewise.
2558         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2559         Likewise.
2560         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
2561         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
2563 2007-05-26  Ulrich Drepper  <drepper@redhat.com>
2565         * pthreadP.h (PTHREAD_RWLOCK_PREFER_READER_P): Define.
2566         * pthread_rwlock_rdlock.c: Use PTHREAD_RWLOCK_PREFER_READER_P.
2567         * pthread_rwlock_timedrdlock.c: Likewise.
2568         * pthread_rwlock_tryrdlock.c: Likewise.
2570         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S (sem_trywait): Tiny
2571         optimization.
2573         * sysdeps/unix/sysv/linux/sem_wait.c: Add missing break.
2574         * sysdeps/unix/sysv/linux/sem_timedwait.c: Removed left-over
2575         duplication of __sem_wait_cleanup.
2577         * allocatestack.c: Revert last change.
2578         * init.c: Likewise.
2579         * sysdeps/i386/tls.h: Likewise.
2580         * sysdeps/x86_64/tls.h: Likewise.
2581         * descr.h [TLS_DTV_AT_TP] (struct pthread): Add private_futex field to
2582         header structure.
2583         * sysdeps/powerpc/tcb-offsets.sym: Add PRIVATE_FUTEX_OFFSET.
2585         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_barrier):
2586         Add private field.
2587         * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: Add PRIVATE definition.
2588         * pthread_barrier_init.c: Set private flag if pshared and private
2589         futexes are supported.
2590         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Use
2591         private field in futex command setup.
2592         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
2594 2007-05-25  Ulrich Drepper  <drepper@redhat.com>
2596         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Add private futex
2597         support.
2598         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
2599         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
2600         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
2601         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
2602         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
2604         * semaphoreP.h: Declare __old_sem_init and __old_sem_wait.
2605         * sem_init.c (__new_sem_init): Rewrite to initialize all three
2606         fields in the structure.
2607         (__old_sem_init): New function.
2608         * sem_open.c: Initialize all fields of the structure.
2609         * sem_getvalue.c: Adjust for renamed element.
2610         * sysdeps/unix/sysv/linux/Makefile [subdir=nptl]
2611         (gen-as-const-headers): Add structsem.sym.
2612         * sysdeps/unix/sysv/linux/structsem.sym: New file.
2613         * sysdeps/unix/sysv/linux/internaltypes.h: Rename struct sem to
2614         struct new_sem.  Add struct old_sem.
2615         * sysdeps/unix/sysv/linux/sem_post.c: Wake only when there are waiters.
2616         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
2617         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
2618         * sysdeps/unix/sysv/linux/sem_wait.c: Indicate that there are waiters.
2619         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
2620         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
2621         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
2622         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
2623         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
2624         * Makefile (tests): Add tst-sem10, tst-sem11, tst-sem12.
2625         * tst-sem10.c: New file.
2626         * tst-sem11.c: New file.
2627         * tst-sem12.c: New file.
2628         * tst-typesizes.c: Test struct new_sem and struct old_sem instead
2629         of struct sem.
2631 2007-05-25  Ulrich Drepper  <drepper@redhat.com>
2632             Jakub Jelinek  <jakub@redhat.com>
2634         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
2635         Move __pthread_enable_asynccancel right before futex syscall.
2636         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
2637         Likewise.
2639 2007-05-24  Jakub Jelinek  <jakub@redhat.com>
2641         * sysdeps/i386/tls.h (THREAD_SET_PRIVATE_FUTEX,
2642         THREAD_COPY_PRIVATE_FUTEX): Define.
2643         * sysdeps/x86_64/tls.h (THREAD_SET_PRIVATE_FUTEX,
2644         THREAD_COPY_PRIVATE_FUTEX): Define.
2645         * allocatestack.c (allocate_stack): Use THREAD_COPY_PRIVATE_FUTEX.
2646         * init.c (__pthread_initialize_minimal_internal): Use
2647         THREAD_SET_PRIVATE_FUTEX.
2649         * sysdeps/powerpc/tls.h (tcbhead_t): Add gscope_flag.
2650         (THREAD_GSCOPE_FLAG_UNUSED, THREAD_GSCOPE_FLAG_USED,
2651         THREAD_GSCOPE_FLAG_WAIT): Define.
2652         (THREAD_GSCOPE_GET_FLAG, THREAD_GSCOPE_SET_FLAG,
2653         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_WAIT): Define.
2654         * sysdeps/i386/tls.h (THREAD_GSCOPE_WAIT): Don't use
2655         PTR_DEMANGLE.
2656         (THREAD_GSCOPE_GET_FLAG): Define.
2657         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Define.
2658         * allocatestack.c (__wait_lookup_done): Use THREAD_GSCOPE_GET_FLAG
2659         instead of ->header.gscope_flag directly.
2661 2007-05-23  Ulrich Drepper  <drepper@redhat.com>
2663         * init.c (__pthread_initialize_minimal_internal): Check whether
2664         private futexes are available.
2665         * allocatestack.c (allocate_stack): Copy private_futex field from
2666         current thread into the new stack.
2667         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Use private
2668         futexes if they are available.
2669         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise
2670         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Adjust so that change
2671         in libc-lowlevellock.S allow using private futexes.
2672         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
2673         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
2674         FUTEX_PRIVATE_FLAG.
2675         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
2676         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use private futexes
2677         if they are available.
2678         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
2679         * sysdeps/x86_64/tcb-offsets.sym: Add PRIVATE_FUTEX.
2680         * sysdeps/i386/tcb-offsets.sym: Likewise.
2681         * sysdeps/x86_64/tls.h (tcbhead_t): Add private_futex field.
2682         * sysdeps/i386/tls.h (tcbhead_t): Likewise.
2684 2007-05-21  Ulrich Drepper  <drepper@redhat.com>
2686         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
2687         Remove ptr_wait_lookup_done again.
2688         * init.c (pthread_functions): Don't add .ptr_wait_lookup_done here.
2689         (__pthread_initialize_minimal_internal): Initialize
2690         _dl_wait_lookup_done pointer in _rtld_global directly.
2691         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
2692         Remove code to code _dl_wait_lookup_done.
2693         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_WAIT): The pointer is not
2694         encrypted for now.
2696 2007-05-21  Jakub Jelinek  <jakub@redhat.com>
2698         * tst-robust9.c (do_test): Don't fail if ENABLE_PI and
2699         pthread_mutex_init failed with ENOTSUP.
2701 2007-05-19  Ulrich Drepper  <drepper@redhat.com>
2703         * allocatestack.c (__wait_lookup_done): New function.
2704         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
2705         Add ptr_wait_lookup_done.
2706         * init.c (pthread_functions): Initialize .ptr_wait_lookup_done.
2707         * pthreadP.h: Declare __wait_lookup_done.
2708         * sysdeps/i386/tls.h (tcbhead_t): Add gscope_flag.
2709         Define macros to implement reference handling of global scope.
2710         * sysdeps/x86_64/tls.h: Likewise.
2711         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
2712         Initialize GL(dl_wait_lookup_done).
2714 2007-05-17  Ulrich Drepper  <drepper@redhat.com>
2716         [BZ #4512]
2717         * pthread_mutex_lock.c: Preserve FUTEX_WAITERS bit when dead owner
2718         is detected.
2719         * pthread_mutex_timedlock.c: Likewise.
2720         * pthread_mutex_trylock.c: Likewise.
2721         Patch in part by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
2723         * Makefile (tests): Add tst-robust9 and tst-robustpi9.
2724         * tst-robust9.c: New file.
2725         * tst-robustpi9.c: New file.
2727         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Remove
2728         unnecessary extra cancellation test.
2730 2007-05-14  Ulrich Drepper  <drepper@redhat.com>
2732         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Remove unnecessary
2733         extra cancellation test.
2734         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
2736 2007-05-10  Ulrich Drepper  <drepper@redhat.com>
2738         * descr.h (struct pthread): Rearrange members to fill hole in
2739         64-bit layout.
2741         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
2742         (__pthread_setaffinity_new): If syscall was successful and
2743         RESET_VGETCPU_CACHE is defined, use it before returning.
2744         * sysdeps/unix/sysv/linux/x86_64/pthread_setaffinity.c: New file.
2746 2007-05-10  Jakub Jelinek  <jakub@redhat.com>
2748         [BZ #4455]
2749         * tst-align2.c: Include stackinfo.h.
2750         * tst-getpid1.c: Likewise.
2752 2007-05-02  Carlos O'Donell  <carlos@systemhalted.org>
2754         [BZ #4455]
2755         * tst-align2.c (do_test): Add _STACK_GROWS_UP case.
2756         * tst-getpid1.c (do_test): Likewise.
2758         [BZ #4456]
2759         * allocatestack.c (change_stack_perm): Add _STACK_GROWS_UP case.
2760         (allocate_stack): Likewise.
2762 2007-05-07  Ulrich Drepper  <drepper@redhat.com>
2764         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
2765         (__lll_robust_lock_wait): Fix race caused by reloading of futex value.
2766         (__lll_robust_timedlock_wait): Likewise.
2767         Reported by Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>.
2769 2007-05-06  Mike Frysinger  <vapier@gentoo.org>
2771         [BZ #4465]
2772         * tst-cancel-wrappers.sh: Set C["fdatasync"] to 1.
2773         * tst-cancel4.c (tf_fdatasync): New test.
2775 2007-04-27  Ulrich Drepper  <drepper@redhat.com>
2777         [BZ #4392]
2778         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Treat error
2779         check mutexes like normal mutexes.
2781         [BZ #4306]
2782         * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
2783         Initialize the whole sigevent structure to appease valgrind.
2785 2007-04-25  Ulrich Drepper  <drepper@redhat.com>
2787         * sysdeps/x86_64/tls.h (tcbhead_t): Add vgetcpu_cache.
2788         * sysdeps/x86_64/tcb-offsets.sym: Add VGETCPU_CACHE_OFFSET.
2790 2007-04-06  Ulrich Drepper  <drepper@redhat.com>
2792         * tst-locale1.c: Avoid warnings.
2793         * tst-locale2.c: Likewise.
2795 2007-03-19  Steven Munroe  <sjmunroe@us.ibm.com>
2797         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
2798         (__lll_robust_trylock): Add MUTEX_HINT_ACQ to lwarx instruction.
2800 2007-03-16  Jakub Jelinek  <jakub@redhat.com>
2802         * sysdeps/pthread/bits/libc-lock.h: Use __extern_inline and
2803         __extern_always_inline where appropriate.
2804         * sysdeps/pthread/pthread.h: Likewise.
2806 2007-03-13  Richard Henderson  <rth@redhat.com>
2808         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Use two
2809         separate cfi regions for the two subsections.
2811 2007-02-25  Ulrich Drepper  <drepper@redhat.com>
2813         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset refcntr in
2814         new thread, don't just decrement it.
2815         Patch by Suzuki K P <suzuki@in.ibm.com>.
2817 2007-02-21  Ulrich Drepper  <drepper@redhat.com>
2819         * sysdeps/pthread/pthread-functions.h: Correct last patch, correct
2820         PTHFCT_CALL definition.
2822 2007-02-18  Ulrich Drepper  <drepper@redhat.com>
2824         * sysdeps/pthread/pthread-functions.h: If PTR_DEMANGLE is not
2825         available, don't use it.
2827 2007-02-09  Jakub Jelinek  <jakub@redhat.com>
2829         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
2830         (__lll_mutex_timedlock_wait): Use correct pointer when we don't
2831         call into the kernel to delay.
2833 2007-01-18  Ulrich Drepper  <drepper@redhat.com>
2835         * tst-initializers1.c: We want to test the initializers as seen
2836         outside of libc, so undefined _LIBC.
2838         * pthread_join.c (cleanup): Avoid warning.
2840 2007-01-17  Ulrich Drepper  <drepper@redhat.com>
2842         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
2843         (__lll_timedwait_tid): Add unwind info.
2845         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Don't just copy the
2846         function table, mangle the pointers.
2847         * sysdeps/pthread/pthread-functions.h: Define PTHFCT_CALL.
2848         * forward.c: Use PTHFCT_CALL and __libc_pthread_functions_init.
2849         * sysdeps/pthread/bits/libc-lock.h: When using __libc_pthread_functions
2850         demangle pointers before use.
2851         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Use PTHFCT_CALL to
2852         demangle pointer.
2853         * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
2854         * sysdeps/pthread/setxid.h: Likewise.
2856 2007-01-12  Ulrich Drepper  <drepper@redhat.com>
2858         * tst-rwlock7.c: Show some more information in case of correct
2859         behavior.
2861 2007-01-11  Ulrich Drepper  <drepper@redhat.com>
2863         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
2864         (lll_futex_timed_wait): Undo part of last change, don't negate
2865         return value.
2867 2007-01-10  Ulrich Drepper  <drepper@redhat.com>
2869         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Cleanups.  Define
2870         FUTEX_CMP_REQUEUE and lll_futex_requeue.
2872 2006-12-28  David S. Miller  <davem@davemloft.net>
2874         * shlib-versions: Fix sparc64 linux target specification.
2876 2007-01-10  Jakub Jelinek  <jakub@redhat.com>
2878         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
2879         Adjust include path for pthread_barrier_wait.c move.
2881 2006-12-21  Jakub Jelinek  <jakub@redhat.com>
2883         * sysdeps/unix/sysv/linux/pthread_kill.c (pthread_kill): Make sure
2884         tid isn't reread from pd->tid in between ESRCH test and the syscall.
2886 2006-12-06  Jakub Jelinek  <jakub@redhat.com>
2888         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Handle
2889         6 argument cancellable syscalls.
2890         (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
2891         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO): Handle
2892         6 argument cancellable syscalls.
2893         (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
2895 2006-12-09  Ulrich Drepper  <drepper@redhat.com>
2897         * sysdeps/unix/sysv/linux/rtld-lowlevel.h
2898         (__rtld_mrlock_initialize): Add missing closing parenthesis.
2900 2006-10-30  Jakub Jelinek  <jakub@redhat.com>
2902         * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
2903         __sync_lock_release instead of __sync_lock_release_si.
2905 2006-10-29  Jakub Jelinek  <jakub@redhat.com>
2907         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (RTLD_SINGLE_THREAD_P):
2908         Define.
2909         (SINGLE_THREAD_P): Define to 1 if IS_IN_rtld.
2910         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Likewise.
2911         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
2912         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
2913         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
2914         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
2915         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
2916         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
2917         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
2918         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
2919         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
2921 2006-10-27  Ulrich Drepper  <drepper@redhat.com>
2923         * sysdeps/pthread/pthread_barrier_wait.c: Move to...
2924         * pthread_barrier_wait.c: ...here.
2925         * sysdeps/pthread/pthread_cond_broadcast.c: Move to...
2926         * pthread_cond_broadcast.c: ...here.
2927         * sysdeps/pthread/pthread_cond_signal.c: Move to...
2928         * pthread_cond_signal.c: ...here.
2929         * sysdeps/pthread/pthread_cond_timedwait.c: Move to...
2930         * pthread_cond_timedwait.c: ...here.
2931         * sysdeps/pthread/pthread_cond_wait.c: Move to...
2932         * pthread_cond_wait.c: ...here.
2933         * sysdeps/pthread/pthread_once.c: Move to...
2934         * pthread_once.c: ...here.
2935         * sysdeps/pthread/pthread_rwlock_rdlock.c: Move to...
2936         * pthread_rwlock_rdlock.c: ...here.
2937         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Move to...
2938         * pthread_rwlock_timedrdlock.c: ...here.
2939         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Move to...
2940         * pthread_rwlock_timedwrlock.c: ...here.
2941         * sysdeps/pthread/pthread_rwlock_unlock.c: Move to...
2942         * pthread_rwlock_unlock.c: ...here.
2943         * sysdeps/pthread/pthread_rwlock_wrlock.c: Move to...
2944         * pthread_rwlock_wrlock.c: ...here.
2945         * sysdeps/pthread/pthread_spin_destroy.c: Move to...
2946         * pthread_spin_destroy.c: ...here.
2947         * sysdeps/pthread/pthread_spin_init.c: Move to...
2948         * pthread_spin_init.c: ...here.
2949         * sysdeps/pthread/pthread_spin_unlock.c: Move to...
2950         * pthread_spin_unlock.c: ...here.
2951         * sysdeps/pthread/pthread_getcpuclockid.c: Move to...
2952         * pthread_getcpuclockid.c: ...here.
2954         * init.c: USE_TLS support is now always enabled.
2955         * tst-tls5.h: Likewise.
2956         * sysdeps/alpha/tls.h: Likewise.
2957         * sysdeps/i386/tls.h: Likewise.
2958         * sysdeps/ia64/tls.h: Likewise.
2959         * sysdeps/powerpc/tls.h: Likewise.
2960         * sysdeps/s390/tls.h: Likewise.
2961         * sysdeps/sh/tls.h: Likewise.
2962         * sysdeps/sparc/tls.h: Likewise.
2963         * sysdeps/x86_64/tls.h: Likewise.
2965 2006-10-27  Jakub Jelinek  <jakub@redhat.com>
2967         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
2968         __rtld_mrlock_change): Update oldval if atomic compare and exchange
2969         failed.
2971         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
2972         Define to THREAD_SELF->header.multiple_threads.
2973         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
2974         Likewise.
2975         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
2976         Likewise.
2977         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
2978         (SINGLE_THREAD_P): Likewise.
2979         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
2980         (SINGLE_THREAD_P): Likewise.
2981         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
2982         (SINGLE_THREAD_P): Likewise.
2983         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
2984         (SINGLE_THREAD_P): Likewise.
2985         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (SINGLE_THREAD_P):
2986         Likewise.
2987         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
2988         (SINGLE_THREAD_P): Likewise.
2989         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
2990         (SINGLE_THREAD_P): Likewise.
2991         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (SINGLE_THREAD_P):
2992         Likewise.
2994 2006-10-26  Jakub Jelinek  <jakub@redhat.com>
2996         * pthread_attr_setstacksize.c (NEW_VERNUM): Define to GLIBC_2_3_3
2997         by default rather than 2_3_3.
2999 2006-10-17  Jakub Jelinek  <jakub@redhat.com>
3001         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
3002         __rtld_mrlock_unlock, __rtld_mrlock_change, __rtld_mrlock_done): Use
3003         atomic_* instead of catomic_* macros.
3005 2006-10-12  Ulrich Drepper  <drepper@redhat.com>
3007         [BZ #3285]
3008         * sysdeps/unix/sysv/linux/bits/local_lim.h: Add SEM_VALUE_MAX.
3009         * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
3010         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
3011         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
3012         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
3013         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Remove SEM_VALUE_MAX.
3014         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
3015         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
3016         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
3017         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: Likewise.
3018         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
3019         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
3020         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
3022 2006-10-11  Ulrich Drepper  <drepper@redhat.com>
3024         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add support for
3025         cancelable syscalls with six parameters.
3027         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Use catomic_*
3028         operations instead of atomic_*.
3030 2006-10-09  Ulrich Drepper  <drepper@redhat.com>
3032         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: New file..
3034 2006-10-07  Ulrich Drepper  <drepper@redhat.com>
3036         * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: New file.
3037         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstack.c: New file.
3038         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c:
3039         New file.
3040         * pthread_attr_setstack.c: Allow overwriting the version number of the
3041         new symbol.
3042         * pthread_attr_setstacksize.c: Likewise.
3043         (__old_pthread_attr_setstacksize): If STACKSIZE_ADJUST is defined use
3044         it.
3045         * sysdeps/unix/sysv/linux/powerpc/Versions (libpthread): Add
3046         pthread_attr_setstack and pthread_attr_setstacksize to GLIBC_2.6.
3048 2006-09-24  Ulrich Drepper  <drepper@redhat.com>
3050         [BZ #3251]
3051         * descr.h (ENQUEUE_MUTEX_BOTH): Add cast to avoid warning.
3052         Patch by Petr Baudis.
3054 2006-09-18  Jakub Jelinek  <jakub@redhat.com>
3056         * tst-kill4.c (do_test): Explicitly set tf thread's stack size.
3058         * tst-cancel2.c (tf): Loop as long as something was written.
3060 2006-09-12  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3062         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: For PI
3063         mutexes wake all mutexes.
3064         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Don't increment
3065         WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
3066         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
3068 2006-09-12  Ulrich Drepper  <drepper@redhat.com>
3070         * tst-cond22.c (tf): Slight changes to the pthread_cond_wait use
3071         to guarantee the thread is always canceled.
3073 2006-09-08  Jakub Jelinek  <jakub@redhat.com>
3075         * tst-cond22.c: Include pthread.h instead of pthreadP.h.
3076         Include stdlib.h.
3077         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Only
3078         increase FUTEX if increasing WAKEUP_SEQ.  Fix comment typo.
3079         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
3080         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3081         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3083 2006-09-08  Ulrich Drepper  <drepper@redhat.com>
3085         [BZ #3123]
3086         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Don't
3087         increment WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
3088         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
3089         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3090         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3091         * Makefile (tests): Add tst-cond22.
3092         * tst-cond22.c: New file.
3094 2006-09-05  Ulrich Drepper  <drepper@redhat.com>
3096         [BZ #3124]
3097         * descr.h (struct pthread): Add parent_cancelhandling.
3098         * sysdeps/pthread/createthread.c (create_thread): Pass parent
3099         cancelhandling value to child.
3100         * pthread_create.c (start_thread): If parent thread was canceled
3101         reset the SIGCANCEL mask.
3102         * Makefile (tests): Add tst-cancel25.
3103         * tst-cancel25.c: New file.
3105 2006-09-05  Jakub Jelinek  <jakub@redhat.com>
3106             Ulrich Drepper  <drepper@redhat.com>
3108         * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY): Don't decrement
3109         counterp if it is already zero.
3110         * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY): Likewise..
3112 2006-03-04  Jakub Jelinek  <jakub@redhat.com>
3113             Roland McGrath  <roland@redhat.com>
3115         * sysdeps/unix/sysv/linux/i386/lowlevellock.h
3116         (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
3117         LLL_STUB_UNWIND_INFO_3, LLL_STUB_UNWIND_INFO_4): Define.
3118         (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
3119         lll_robust_mutex_cond_lock, lll_mutex_timedlock,
3120         lll_robust_mutex_timedlock, lll_mutex_unlock,
3121         lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
3122         Add _L_*_ symbols around the subsection.
3123         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Add unwind info.
3124         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Likewise.
3126 2006-03-03  Jakub Jelinek  <jakub@redhat.com>
3127             Roland McGrath  <roland@redhat.com>
3129         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
3130         (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
3131         LLL_STUB_UNWIND_INFO_5, LLL_STUB_UNWIND_INFO_6): Define.
3132         (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
3133         lll_robust_mutex_cond_lock, lll_mutex_timedlock,
3134         lll_robust_mutex_timedlock, lll_mutex_unlock,
3135         lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
3136         Add _L_*_ symbols around the subsection.
3137         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Add unwind info.
3138         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
3140 2006-08-31  Ulrich Drepper  <drepper@redhat.com>
3142         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Undo last
3143         change because it can disturb too much existing code.  If real hard
3144         reader preference is needed we'll introduce another type.
3145         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
3146         (pthread_rwlock_timedwrlock): Likewise.
3147         * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
3148         Likewise.
3150 2006-08-30  Ulrich Drepper  <drepper@redhat.com>
3152         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Respect
3153         reader preference.
3154         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
3155         (pthread_rwlock_timedwrlock): Likewise.
3156         * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
3157         Likewise.
3159 2006-08-25  Jakub Jelinek  <jakub@redhat.com>
3161         * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libpthread):
3162         Only define ifdef SHARED.
3164 2006-08-23  Ulrich Drepper  <drepper@redhat.com>
3166         * allocatestack.c (queue_stack): Move freeing of surplus stacks to...
3167         (free_stacks): ...here.
3168         (__free_stack_cache): New function.
3169         * pthreadP.h: Declare __free_stack_cache.
3170         * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
3171         ptr_freeres.
3172         * init.c (pthread_functions): Initialize ptr_freeres.
3173         * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libptread):
3174         New freeres function.
3176 2006-07-30  Joseph S. Myers  <joseph@codesourcery.com>
3178         [BZ #3018]
3179         * Makefile (extra-objs): Add modules to extra-test-objs instead.
3181 2006-08-20  Ulrich Drepper  <drepper@redhat.com>
3183         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
3184         _XOPEN_REALTIME_THREADS.
3186 2006-08-15  Jakub Jelinek  <jakub@redhat.com>
3188         * sysdeps/unix/sysv/linux/clock_settime.c (INTERNAL_VSYSCALL): Use
3189         HAVE_CLOCK_GETRES_VSYSCALL as guard macro rather than
3190         HAVE_CLOCK_GETTIME_VSYSCALL.
3191         (maybe_syscall_settime_cpu): Use plain INTERNAL_VSYSCALL here.
3193 2006-08-14  Jakub Jelinek  <jakub@redhat.com>
3195         * sysdeps/unix/sysv/linux/bits/posix_opt.h
3196         (_POSIX_THREAD_PRIO_PROTECT): Define to 200112L.
3197         * descr.h (struct priority_protection_data): New type.
3198         (struct pthread): Add tpp field.
3199         * pthreadP.h (PTHREAD_MUTEX_PP_NORMAL_NP,
3200         PTHREAD_MUTEX_PP_RECURSIVE_NP, PTHREAD_MUTEX_PP_ERRORCHECK_NP,
3201         PTHREAD_MUTEX_PP_ADAPTIVE_NP): New enum values.
3202         * pthread_mutex_init.c (__pthread_mutex_init): Handle non-robust
3203         TPP mutexes.
3204         * pthread_mutex_lock.c (__pthread_mutex_lock): Handle TPP mutexes.
3205         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Likewise.
3206         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Likewise.
3207         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Likewise.
3208         * tpp.c: New file.
3209         * pthread_setschedparam.c (__pthread_setschedparam): Handle priority
3210         boosted by TPP.
3211         * pthread_setschedprio.c (pthread_setschedprio): Likewise.
3212         * pthread_mutexattr_getprioceiling.c
3213         (pthread_mutexattr_getprioceiling): If ceiling is 0, ensure it is
3214         in the SCHED_FIFO priority range.
3215         * pthread_mutexattr_setprioceiling.c
3216         (pthread_mutexattr_setprioceiling): Fix prioceiling validation.
3217         * pthread_mutex_getprioceiling.c (pthread_mutex_getprioceiling): Fail
3218         if mutex is not TPP.  Ceiling is now in __data.__lock.
3219         * pthread_mutex_setprioceiling.c: Include stdbool.h.
3220         (pthread_mutex_setprioceiling): Fix prioceiling validation.  Ceiling
3221         is now in __data.__lock.  Add locking.
3222         * pthread_create.c (__free_tcb): Free pd->tpp structure.
3223         * Makefile (libpthread-routines): Add tpp.
3224         (xtests): Add tst-mutexpp1, tst-mutexpp6 and tst-mutexpp10.
3225         * tst-tpp.h: New file.
3226         * tst-mutexpp1.c: New file.
3227         * tst-mutexpp6.c: New file.
3228         * tst-mutexpp10.c: New file.
3229         * tst-mutex1.c (TEST_FUNCTION): Don't redefine if already defined.
3230         * tst-mutex6.c (TEST_FUNCTION): Likewise.
3232 2006-08-12  Ulrich Drepper  <drepper@redhat.com>
3234         [BZ #2843]
3235         * pthread_join.c (pthread_join): Account for self being canceled
3236         when checking for deadlocks.
3237         * tst-join5.c: Cleanups.  Allow to be used in tst-join6.
3238         (tf1): Don't print anything after pthread_join returns, this would be
3239         another cancellation point.
3240         (tf2): Likewise.
3241         * tst-join6.c: New file.
3242         * Makefile (tests): Add tst-join6.
3244 2006-08-03  Ulrich Drepper  <drepper@redhat.com>
3246         [BZ #2892]
3247         * pthread_setspecific.c (__pthread_setspecific): Check
3248         out-of-range index before checking for unused key.
3250         * sysdeps/pthread/gai_misc.h: New file.
3252 2006-08-01  Ulrich Drepper  <drepper@redhat.com>
3254         * sysdeps/unix/sysv/linux/i386/smp.h: New file.  Old Linux-specific
3255         file.  Don't use sysctl.
3256         * sysdeps/unix/sysv/linux/smp.h: Always assume SMP.  Archs can
3257         overwrite the file if this is likely not true.
3259 2006-07-31  Daniel Jacobowitz  <dan@codesourcery.com>
3261         * allocatestack.c (__reclaim_stacks): Reset the PID on cached stacks.
3262         * Makefile (tests): Add tst-getpid3.
3263         * tst-getpid3.c: New file.
3265 2006-07-30  Roland McGrath  <roland@redhat.com>
3267         * Makefile (libpthread-routines): Add ptw-sigsuspend.
3269         * sysdeps/unix/sysv/linux/i386/not-cancel.h
3270         (pause_not_cancel): New macro.
3271         (nanosleep_not_cancel): New macro.
3272         (sigsuspend_not_cancel): New macro.
3273         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
3274         nanosleep_not_cancel macro from <not-cancel.h>.
3275         * pthread_mutex_lock.c (__pthread_mutex_lock): Use pause_not_cancel
3276         macro from <not-cancel.h>.
3278 2006-07-28  Ulrich Drepper  <drepper@redhat.com>
3279             Jakub Jelinek  <jakub@redhat.com>
3281         * descr.h: Change ENQUEUE_MUTEX and DEQUEUE_MUTEX for bit 0
3282         notification of PI mutex.  Add ENQUEUE_MUTEX_PI.
3283         * pthreadP.h: Define PTHREAD_MUTEX_PI_* macros for PI mutex types.
3284         * pthread_mutex_setprioceilining.c: Adjust for mutex type name change.
3285         * pthread_mutex_init.c: Add support for priority inheritance mutex.
3286         * pthread_mutex_lock.c: Likewise.
3287         * pthread_mutex_timedlock.c: Likewise.
3288         * pthread_mutex_trylock.c: Likewise.
3289         * pthread_mutex_unlock.c: Likewise.
3290         * sysdeps/pthread/pthread_cond_broadcast.c: For PI mutexes wake
3291         all mutexes.
3292         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.c: Likewise.
3293         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.c: Likewise.
3294         * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: New file.
3295         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-header): Add
3296         pthread-pi-defines.sym.
3297         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_LOCK_PI,
3298         FUTEX_UNLOCK_PI, and FUTEX_TRYLOCK_PI.
3299         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
3300         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
3301         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
3302         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
3303         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
3304         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
3305         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
3306         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
3307         _POSIX_THREAD_PRIO_INHERIT to 200112L.
3308         * tst-mutex1.c: Adjust to allow use in PI mutex test.
3309         * tst-mutex2.c: Likewise.
3310         * tst-mutex3.c: Likewise.
3311         * tst-mutex4.c: Likewise.
3312         * tst-mutex5.c: Likewise.
3313         * tst-mutex6.c: Likewise.
3314         * tst-mutex7.c: Likewise.
3315         * tst-mutex7a.c: Likewise.
3316         * tst-mutex8.c: Likewise.
3317         * tst-mutex9.c: Likewise.
3318         * tst-robust1.c: Likewise.
3319         * tst-robust7.c: Likewise.
3320         * tst-robust8.c: Likewise.
3321         * tst-mutexpi1.c: New file.
3322         * tst-mutexpi2.c: New file.
3323         * tst-mutexpi3.c: New file.
3324         * tst-mutexpi4.c: New file.
3325         * tst-mutexpi5.c: New file.
3326         * tst-mutexpi6.c: New file.
3327         * tst-mutexpi7.c: New file.
3328         * tst-mutexpi7a.c: New file.
3329         * tst-mutexpi8.c: New file.
3330         * tst-mutexpi9.c: New file.
3331         * tst-robust1.c: New file.
3332         * tst-robust2.c: New file.
3333         * tst-robust3.c: New file.
3334         * tst-robust4.c: New file.
3335         * tst-robust5.c: New file.
3336         * tst-robust6.c: New file.
3337         * tst-robust7.c: New file.
3338         * tst-robust8.c: New file.
3339         * Makefile (tests): Add the new tests.
3341         * pthread_create.c (start_thread): Add some casts to avoid warnings.
3342         * pthread_mutex_destroy.c: Remove unneeded label.
3344 2006-07-01  Ulrich Drepper  <drepper@redhat.com>
3346         * pthread_mutex_init.c (__pthread_mutex_init): Move some
3347         computations to compile time.
3349 2006-06-04  Ulrich Drepper  <drepper@redhat.com>
3351         * sysdeps/pthread/pthread.h: Add pthread_equal inline version.
3353 2006-05-15  Ulrich Drepper  <drepper@redhat.com>
3355         * sysdeps/unix/sysv/linux/fork.h: Mark __fork_handlers as hidden.
3357 2006-05-11  Ulrich Drepper  <drepper@redhat.com>
3359         * pthread_key_create.c (__pthread_key_create): Do away with
3360         __pthread_keys_lock.
3362         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
3363         (__kernel_cpumask_size): Mark as hidden.
3364         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
3366         * sem_open.c (__sem_mappings_lock): Mark as hidden.
3367         * semaphoreP.h (__sem_mappings_lock): Likewise.
3369 2006-05-10  Ulrich Drepper  <drepper@redhat.com>
3371         * pthread_atfork.c: Mark __dso_handle as hidden.
3373 2006-05-09  Ulrich Drepper  <drepper@redhat.com>
3375         [BZ #2644]
3376         * sysdeps/pthread/unwind-forcedunwind.c: Different solution for
3377         the reload problem.  Change the one path in pthread_cancel_init
3378         which causes the problem.  Force gcc to reload.  Simplify callers.
3379         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c
3380         (_Unwind_GetBSP): Undo last patch.
3382 2006-05-07  Ulrich Drepper  <drepper@redhat.com>
3384         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: Make sure the
3385         function pointer is reloaded after pthread_cancel_init calls.
3387         [BZ #2644]
3388         * sysdeps/pthread/unwind-forcedunwind.c: Make sure functions
3389         pointers are reloaded after pthread_cancel_init calls.
3391 2006-05-01  Ulrich Drepper  <drepper@redhat.com>
3393         * sysdeps/pthread/allocalim.h (__libc_use_alloca): Mark with
3394         __always_inline.
3396 2006-04-27  Ulrich Drepper  <drepper@redhat.com>
3398         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
3399         Allocate new object which is passed to timer_sigev_thread so that
3400         the timer can be deleted before the new thread is scheduled.
3402 2006-04-26  Roland McGrath  <roland@redhat.com>
3404         * sysdeps/x86_64/tls.h: Include <asm/prctl.h> inside [! __ASSEMBLER__].
3406 2006-04-08  Ulrich Drepper  <drepper@redhat.com>
3408         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove branch predicion
3409         suffix for conditional jumps.
3410         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
3411         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
3412         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
3413         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
3414         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
3415         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
3417         * init.c (sigcancel_handler): Compare with correct PID even if the
3418         thread is in the middle of a fork call.
3419         (sighandler_setxid): Likewise.
3420         Reported by Suzuki K P <suzuki@in.ibm.com> .
3422 2006-04-07  Jakub Jelinek  <jakub@redhat.com>
3424         * pthreadP.h (FUTEX_TID_MASK): Sync with kernel.
3426 2006-04-06  Ulrich Drepper  <drepper@redhat.com>
3428         * pthread_getattr_np.c (pthread_getattr_np): Close fp if getrlimit
3429         fails [Coverity CID 105].
3431 2006-04-05  Ulrich Drepper  <drepper@redhat.com>
3433         * sysdeps/pthread/pthread.h: Add nonnull attributes.
3435 2006-04-03  Steven Munroe  <sjmunroe@us.ibm.com>
3437         [BZ #2505]
3438         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h [_ARCH_PWR4]:
3439         Define __lll_rel_instr using lwsync.
3441 2006-03-27  Ulrich Drepper  <drepper@redhat.com>
3443         * allocatestack.c (allocate_stack): Always initialize robust_head.
3444         * descr.h: Define struct robust_list_head.
3445         (struct pthread): Use robust_list_head in robust mutex list definition.
3446         Adjust ENQUEUE_MUTEX and DEQUEUE_MUTEX.
3447         * init.c [!__ASSUME_SET_ROBUST_LIST] (__set_robust_list_avail): Define.
3448         (__pthread_initialize_minimal_internal): Register robust_list with
3449         the kernel.
3450         * pthreadP.h: Remove PRIVATE_ from PTHREAD_MUTEX_ROBUST_* names.
3451         Declare __set_robust_list_avail.
3452         * pthread_create.c (start_thread): Register robust_list of new thread.
3453         [!__ASSUME_SET_ROBUST_LIST]: If robust_list is not empty wake up
3454         waiters.
3455         * pthread_mutex_destroy.c: For robust mutexes don't look at the
3456         number of users, it's unreliable.
3457         * pthread_mutex_init.c: Allow use of pshared robust mutexes if
3458         set_robust_list syscall is available.
3459         * pthread_mutex_consistent.c: Adjust for PTHREAD_MUTEX_ROBUST_* rename.
3460         * pthread_mutex_lock.c: Simplify robust mutex code a bit.
3461         Set robust_head.list_op_pending before trying to lock a robust mutex.
3462         * pthread_mutex_timedlock.c: Likewise.
3463         * pthread_mutex_trylock.c: Likewise.
3464         * pthread_mutex_unlock.c: Likewise for unlocking.
3465         * Makefile (tests): Add tst-robust8.
3466         * tst-robust8.c: New file.
3468 2006-03-08  Andreas Schwab  <schwab@suse.de>
3470         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h
3471         (DL_SYSINFO_IMPLEMENTATION): Add missing newline.
3473 2006-03-05  Roland McGrath  <roland@redhat.com>
3475         * configure (libc_add_on): Disable add-on when $add_ons_automatic = yes
3476         and $config_os doesn't match *linux*.
3478 2006-03-05  David S. Miller  <davem@sunset.davemloft.net>
3480         * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S:
3481         Use __syscall_error.
3482         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
3483         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: Likewise.
3484         * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: Likewise.
3485         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
3486         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: Likewise.
3487         * sysdeps/unix/sysv/linux/sparc/Makefile: New file.
3489 2006-03-02  Ulrich Drepper  <drepper@redhat.com>
3491         * sysdeps/unix/sysv/linux/aio_misc.h: Various cleanups.
3493 2006-03-01  Ulrich Drepper  <drepper@redhat.com>
3495         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
3496         (__lll_robust_lock_wait): Also set FUTEX_WAITERS bit if we got the
3497         mutex.
3498         (__lll_robust_timedlock_wait): Likewise.
3499         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S
3500         (__lll_robust_lock_wait): Likewise.
3501         (__lll_robust_timedlock_wait): Likewise.
3502         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
3503         (__lll_robust_lock_wait): Likewise.
3504         (__lll_robust_timedlock_wait): Likewise.
3506 2006-03-01  Jakub Jelinek  <jakub@redhat.com>
3508         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_robust_mutex_dead,
3509         lll_robust_mutex_trylock, lll_robust_mutex_lock,
3510         lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
3511         lll_robust_mutex_unlock): Define.
3512         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
3514 2006-02-28  H.J. Lu  <hongjiu.lu@intel.com>
3516         * sysdeps/unix/sysv/linux/ia64/clone2.S: Include <clone2.S>
3517         instead of <clone.S>.
3519 2006-02-27  Jakub Jelinek  <jakub@redhat.com>
3521         * Makefile (libpthread-routines): Add
3522         pthread_mutexattr_[sg]etprotocol, pthread_mutexattr_[sg]etprioceiling
3523         and pthread_mutex_[sg]etprioceiling.
3524         * Versions (GLIBC_2.4): Export pthread_mutexattr_getprotocol,
3525         pthread_mutexattr_setprotocol, pthread_mutexattr_getprioceiling,
3526         pthread_mutexattr_setprioceiling, pthread_mutex_getprioceiling and
3527         pthread_mutex_setprioceiling.
3528         * sysdeps/pthread/pthread.h (PTHREAD_PRIO_NONE, PTHREAD_PRIO_INHERIT,
3529         PTHREAD_PRIO_PROTECT): New enum values.
3530         (pthread_mutexattr_getprotocol, pthread_mutexattr_setprotocol,
3531         pthread_mutexattr_getprioceiling, pthread_mutexattr_setprioceiling,
3532         pthread_mutex_getprioceiling, pthread_mutex_setprioceiling): New
3533         prototypes.
3534         * pthreadP.h (PTHREAD_MUTEX_PRIO_INHERIT_PRIVATE_NP,
3535         PTHREAD_MUTEX_PRIO_PROTECT_PRIVATE_NP): New enum values.
3536         (PTHREAD_MUTEX_PRIO_CEILING_SHIFT, PTHREAD_MUTEX_PRIO_CEILING_MASK):
3537         Define.
3538         (PTHREAD_MUTEXATTR_PROTOCOL_SHIFT, PTHREAD_MUTEXATTR_PROTOCOL_MASK,
3539         PTHREAD_MUTEXATTR_PRIO_CEILING_SHIFT,
3540         PTHREAD_MUTEXATTR_PRIO_CEILING_MASK): Define.
3541         (PTHREAD_MUTEXATTR_FLAG_BITS): Or in PTHREAD_MUTEXATTR_PROTOCOL_MASK
3542         and PTHREAD_MUTEXATTR_PRIO_CEILING_MASK.
3543         * pthread_mutex_init.c (__pthread_mutex_init): For the time being
3544         return ENOTSUP for PTHREAD_PRIO_INHERIT or PTHREAD_PRIO_PROTECT
3545         protocol mutexes.
3546         * pthread_mutex_getprioceiling.c: New file.
3547         * pthread_mutex_setprioceiling.c: New file.
3548         * pthread_mutexattr_getprioceiling.c: New file.
3549         * pthread_mutexattr_setprioceiling.c: New file.
3550         * pthread_mutexattr_getprotocol.c: New file.
3551         * pthread_mutexattr_setprotocol.c: New file.
3553 2006-02-27  Daniel Jacobowitz  <dan@codesourcery.com>
3555         * sysdeps/unix/sysv/linux/aio_misc.h: Include <limits.h>.
3557 2006-02-27  Roland McGrath  <roland@redhat.com>
3559         * sysdeps/pthread/Subdirs: List nptl here too.
3560         * configure (libc_add_on_canonical): New variable.
3562         * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: Use #include_next.
3564         * sysdeps/unix/sysv/linux/sleep.c: Use #include_next after #include of
3565         self to get main source tree's file.
3566         * sysdeps/unix/sysv/linux/alpha/clone.S: Likewise.
3567         * sysdeps/unix/sysv/linux/i386/clone.S: Likewise.
3568         * sysdeps/unix/sysv/linux/i386/vfork.S: Likewise.
3569         * sysdeps/unix/sysv/linux/ia64/clone2.S: Likewise.
3570         * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: Likewise.
3571         * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: Likewise.
3572         * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: Likewise.
3573         * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: Likewise.
3574         * sysdeps/unix/sysv/linux/sh/clone.S: Likewise.
3575         * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: Likewise.
3576         * sysdeps/unix/sysv/linux/sparc/sparc64/clone.S: Likewise.
3577         * sysdeps/unix/sysv/linux/x86_64/clone.S: Likewise.
3578         * sysdeps/unix/sysv/linux/x86_64/vfork.S: Likewise.
3580         * Makefile: Use $(sysdirs) in vpath directive.
3582         * sysdeps/pthread/Makefile (CFLAGS-libc-start.c): Variable removed.
3583         (CPPFLAGS-timer_routines.c): Likewise.
3585         * Makeconfig (includes): Variable removed.
3587 2006-02-26  Roland McGrath  <roland@redhat.com>
3589         * sysdeps/generic/pt-raise.c: Moved to ...
3590         * pt-raise.c: ... here.
3591         * sysdeps/generic/lowlevellock.h: Moved to ...
3592         * lowlevellock.h: ... here.
3594 2006-02-23  Roland McGrath  <roland@redhat.com>
3596         * descr.h (struct pthread): Add final member `end_padding'.
3597         (PTHREAD_STRUCT_END_PADDING): Use it.
3599 2006-02-20  Roland McGrath  <roland@redhat.com>
3601         * sysdeps/mips: Directory removed, saved in ports repository.
3602         * sysdeps/unix/sysv/linux/mips: Likewise.
3604 2006-02-18  Ulrich Drepper  <drepper@redhat.com>
3606         * tst-robust1.c: Add second mutex to check that the mutex list is
3607         handled correctly.
3609 2006-02-17  Jakub Jelinek  <jakub@redhat.com>
3611         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_mutex_dead,
3612         lll_robust_mutex_trylock, lll_robust_mutex_lock,
3613         lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
3614         lll_robust_mutex_unlock): New macros.
3615         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
3616         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
3617         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
3618         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
3619         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: New file.
3621 2006-02-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3623         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Add lll_robust_mutex_*
3624         definitions.
3625         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: New file.
3627 2006-02-17  Ulrich Drepper  <drepper@redhat.com>
3629         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
3630         (lll_robust_mutex_unlock): Avoid unnecessary wakeups.
3631         * sysdeps/unix/sysv/linux/i386/lowlevellock.h
3632         (lll_robust_mutex_unlock): Likewise.
3634 2006-02-13  Jakub Jelinek  <jakub@redhat.com>
3636         * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX):
3637         Set robust_list.__next rather than robust_list.
3638         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
3639         (__pthread_list_t): New typedef.
3640         (pthread_mutex_t): Replace __next and __prev fields with __list.
3641         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
3642         (__pthread_list_t): New typedef.
3643         (pthread_mutex_t): Replace __next and __prev fields with __list.
3644         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
3645         (__pthread_list_t, __pthread_slist_t): New typedefs.
3646         (pthread_mutex_t): Replace __next and __prev fields with __list.
3647         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
3648         (__pthread_list_t, __pthread_slist_t): New typedefs.
3649         (pthread_mutex_t): Replace __next and __prev fields with __list.
3650         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
3651         (__pthread_list_t, __pthread_slist_t): New typedefs.
3652         (pthread_mutex_t): Replace __next and __prev fields with __list.
3653         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h
3654         (__pthread_slist_t): New typedef.
3655         (pthread_mutex_t): Replace __next field with __list.
3657 2006-02-15  Ulrich Drepper  <drepper@redhat.com>
3659         * pthreadP.h: Define PTHREAD_MUTEX_INCONSISTENT instead of
3660         PTHREAD_MUTEX_OWNERDEAD.
3661         (PTHREAD_MUTEX_ROBUST_PRIVATE_NP): Define as 16, not 256.
3662         Define FUTEX_WAITERS, FUTEX_OWNER_DIED, FUTEX_TID_MASK.
3663         * Makefile (libpthread-routines): Add lowlevelrobustlock.
3664         * pthread_create.c (start_thread): Very much simplify robust_list loop.
3665         * pthread_mutex_consistent.c: Inconsistent mutex have __owner now set
3666         to PTHREAD_MUTEX_INCONSISTENT.
3667         * pthread_mutex_destroy.c: Allow destroying of inconsistent mutexes.
3668         * pthread_mutex_lock.c: Reimplement robust mutex handling.
3669         * pthread_mutex_trylock.c: Likewise.
3670         * pthread_mutex_timedlock.c: Likewise.
3671         * pthread_mutex_unlock.c: Likewise.
3672         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
3673         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
3674         lowlevelrobustlock.sym.
3675         * sysdeps/unix/sysv/linux/lowlevelrobustlock.sym: New file.
3676         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add lll_robust_mutex_*
3677         definitions.
3678         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
3679         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: New file.
3680         * sysdeps/unix/sysv/linux/i386/i586/lowlevelrobustlock.S: New file.
3681         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrobustlock.S: New file.
3682         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: New file.
3684 2006-02-12  Ulrich Drepper  <drepper@redhat.com>
3686         * allocatestack.c (allocate_stack): Initialize robust_list.
3687         * init.c (__pthread_initialize_minimal_internal): Likewise.
3688         * descr.h (struct xid_command): Pretty printing.
3689         (struct pthread): Use __pthread_list_t or __pthread_slist_t for
3690         robust_list.  Adjust macros.
3691         * pthread_create.c (start_thread): Adjust robust_list handling.
3692         * phtread_mutex_unlock.c: Don't allow unlocking from any thread
3693         but the owner for all robust mutex types.
3694         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
3695         __pthread_list_t and __pthread_slist_t.  Use them in pthread_mutex_t.
3696         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3697         * sysdeps/pthread/pthread.h: Adjust mutex initializers.
3699         * sysdeps/unix/sysv/linux/i386/not-cancel.h: Define openat_not_cancel,
3700         openat_not_cancel_3, openat64_not_cancel, and openat64_not_cancel_3.
3702 2006-02-08  Jakub Jelinek  <jakub@redhat.com>
3704         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait,
3705         lll_futex_timedwait, lll_wait_tid): Add "memory" clobber.
3707 2006-01-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3709         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_futex_wait):
3710         Return status.
3711         (lll_futex_timed_wait): Define.
3713 2006-01-19  Ulrich Drepper  <drepper@redhat.com>
3715         * tst-cancel4.c: Test ppoll.
3717 2006-01-18  Andreas Jaeger  <aj@suse.de>
3719         [BZ #2167]
3720         * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h
3721         (pthread_mutex_t): Follow changes for other archs.  Based on patch
3722         by Jim Gifford <patches@jg555.com>.
3724 2006-01-13  Richard Henderson  <rth@redhat.com>
3726         * sysdeps/alpha/tls.h (tcbhead_t): Rename member to __private.
3728 2006-01-10  Roland McGrath  <roland@redhat.com>
3730         * sysdeps/alpha/jmpbuf-unwind.h: File moved to main source tree.
3731         * sysdeps/i386/jmpbuf-unwind.h: Likewise.
3732         * sysdeps/mips/jmpbuf-unwind.h: Likewise.
3733         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
3734         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
3735         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
3736         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
3737         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
3738         * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
3739         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
3741 2006-01-09  Roland McGrath  <roland@redhat.com>
3743         * tst-initializers1-c89.c: New file.
3744         * tst-initializers1-c99.c: New file.
3745         * tst-initializers1-gnu89.c: New file.
3746         * tst-initializers1-gnu99.c: New file.
3747         * Makefile (tests): Add them.
3748         (CFLAGS-tst-initializers1-c89.c): New variable.
3749         (CFLAGS-tst-initializers1-c99.c): New variable.
3750         (CFLAGS-tst-initializers1-gnu89.c): New variable.
3751         (CFLAGS-tst-initializers1-gnu99.c): New variable.
3753         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
3754         Use __extension__ on anonymous union definition.
3755         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3756         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
3757         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3758         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3759         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
3761 2006-01-08  Jakub Jelinek  <jakub@redhat.com>
3763         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
3764         Don't give the union a name because it changes the mangled name.
3765         Instead name the struct for __data.
3766         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_mutex_t):
3767         Likewise.
3768         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_mutex_t):
3769         Likewise.
3771 2006-01-09  Jakub Jelinek  <jakub@redhat.com>
3773         * sysdeps/sparc/sparc64/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Add
3774         stack bias to mc_ftp field.
3776 2006-01-07  Ulrich Drepper  <drepper@redhat.com>
3778         * sysdeps/pthread/aio_misc.h (AIO_MISC_WAIT): Work around gcc
3779         being too clever and reloading the futex value where it shouldn't.
3781 2006-01-06  Ulrich Drepper  <drepper@redhat.com>
3783         * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX): Use
3784         correct type.
3786 2006-01-06  Jakub Jelinek  <jakub@redhat.com>
3788         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
3789         Add cfi directives.
3791 2006-01-06  Ulrich Drepper  <drepper@redhat.com>
3793         * sysdeps/ia64/tls.h (tcbhead_t): Rename private member to __private.
3794         * sysdeps/ia64/tcb-offsets.sym: Adjust for private->__private
3795         rename in tcbhead_t.
3797         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
3798         Don't give the union a name because it changes the mangled name.
3799         Instead name the struct for __data.
3800         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3801         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3802         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3803         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3804         * pthread_create.c (start_thread): Adjust robust mutex free loop.
3805         * descr.h (ENQUEUE_MUTEX, DEQUEUE_MUTEX): Adjust.
3807 2006-01-05  Ulrich Drepper  <drepper@redhat.com>
3809         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
3810         Return status.
3811         (lll_futex_timed_wait): Define.
3812         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
3813         * sysdeps/pthread/aio_misc.h: New file.
3815 2006-01-03  Joseph S. Myers  <joseph@codesourcery.com>
3817         * Makefile ($(objpfx)$(multidir)): Use mkdir -p.
3819 2006-01-03  Steven Munroe  <sjmunroe@us.ibm.com>
3821         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
3822         (PSEUDO): Remove redundant cfi_startproc and cfi_endproc directives.
3823         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
3825 2006-01-04  Ulrich Drepper  <drepper@redhat.com>
3827         * tst-cancel24.cc: Use C headers instead of C++ headers.
3829 2006-01-03  Jakub Jelinek  <jakub@redhat.com>
3831         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Remove #error for
3832         sparc-linux configured glibc.
3833         (lll_futex_wake_unlock): Define to 1 for sparc-linux configured glibc.
3834         (__lll_mutex_trylock, __lll_mutex_cond_trylock, __lll_mutex_lock,
3835         __lll_mutex_cond_lock, __lll_mutex_timedlock): Use
3836         atomic_compare_and_exchange_val_24_acq instead of
3837         atomic_compare_and_exchange_val_acq.
3838         (lll_mutex_unlock, lll_mutex_unlock_force): Use atomic_exchange_24_rel
3839         instead of atomic_exchange_rel.
3840         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: New file.
3841         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c: New
3842         file.
3843         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c: New
3844         file.
3845         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: New file.
3846         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: New file.
3847         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: New file.
3848         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c: New file.
3849         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: New file.
3850         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
3851         New file.
3852         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
3853         New file.
3854         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: New file.
3855         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: New file.
3856         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c: New
3857         file.
3858         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_trywait.c: New
3859         file.
3860         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: New file.
3862 2006-01-03  Ulrich Drepper  <drepper@redhat.com>
3864         * sysdeps/pthread/pthread.h [__WORDSIZE==64]: Don't use cast in
3865         mutex initializers.
3867 2006-01-02  Jakub Jelinek  <jakub@redhat.com>
3869         * sysdeps/sparc/tls.h (tcbhead_t): Add pointer_guard field.
3870         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
3871         THREAD_COPY_POINTER_GUARD): Define.
3872         * sysdeps/sparc/tcb-offsets.sym (POINTER_GUARD): Define.
3873         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Revert 2005-12-27 changes.
3875 2006-01-01  Ulrich Drepper  <drepper@redhat.com>
3877         * version.c: Update copyright year.
3879 2005-12-29  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3881         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Remove explicit
3882         .eh_frame section, use cfi_* directives.
3883         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Add cfi instrumentation.
3885 2005-12-30  Ulrich Drepper  <drepper@redhat.com>
3887         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Undo last change for
3888         now.
3890 2005-12-29  Ulrich Drepper  <drepper@redhat.com>
3892         * sysdeps/pthread/sigaction.c: Removed.
3893         * sigaction.c: New file.
3894         * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-sigaction.c.
3896 2005-12-28  Ulrich Drepper  <drepper@redhat.com>
3898         * Makefile (tests): Add tst-signal7.
3899         * tst-signal7.c: New file.
3901 2005-12-27  Roland McGrath  <roland@redhat.com>
3903         * sysdeps/x86_64/jmpbuf-unwind.h (_jmpbuf_sp): New inline function.
3904         (_JMPBUF_UNWINDS_ADJ): Use it, to PTR_DEMANGLE before comparison.
3905         * sysdeps/alpha/jmpbuf-unwind.h: Likewise.
3906         * sysdeps/i386/jmpbuf-unwind.h: Likewise.
3907         * sysdeps/mips/jmpbuf-unwind.h: Likewise.
3908         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
3909         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
3910         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
3911         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
3912         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
3913         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
3915 2005-12-27  Jakub Jelinek  <jakub@redhat.com>
3917         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Add __next
3918         and __prev field to pthread_mutex_t.
3919         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3920         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3921         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3922         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
3923         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Add __next field
3924         to pthread_mutex_t.
3926 2005-12-26  Ulrich Drepper  <drepper@redhat.com>
3928         * pthreadP.h: Define PTHREAD_MUTEX_ROBUST_PRIVATE_NP,
3929         PTHREAD_MUTEX_ROBUST_PRIVATE_RECURSIVE_NP,
3930         PTHREAD_MUTEX_ROBUST_PRIVATE_ERRORCHECK_NP,
3931         PTHREAD_MUTEX_ROBUST_PRIVATE_ADAPTIVE_NP,
3932         PTHREAD_MUTEXATTR_FLAG_ROBUST, PTHREAD_MUTEXATTR_FLAG_PSHARED,
3933         and PTHREAD_MUTEXATTR_FLAG_BITS.
3934         * descr.h (struct pthread): Add robust_list field and define
3935         ENQUEUE_MUTEX and DEQUEUE_MUTEX macros.
3936         * pthread_mutexattr_getrobust.c: New file.
3937         * pthread_mutexattr_setrobust.c: New file.
3938         * pthread_mutex_consistent.c: New file.
3939         * sysdeps/pthread/pthread.h: Declare pthread_mutexattr_getrobust,
3940         pthread_mutexattr_setrobust, and pthread_mutex_consistent.
3941         Define PTHREAD_MUTEX_STALLED_NP and PTHREAD_MUTEX_ROBUST_NP.
3942         Adjust pthread_mutex_t initializers.
3943         * nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Add __next
3944         field to pthread_mutex_t.
3945         * nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Add __next
3946         and __prev field to pthread_mutex_t.
3947         * Versions [GLIBC_2.4]: Export pthread_mutexattr_getrobust_np,
3948         pthread_mutexattr_setrobust_np, and pthread_mutex_consistent_np.
3949         * pthread_mutexattr_getpshared.c: Use PTHREAD_MUTEXATTR_FLAG_PSHARED
3950         and PTHREAD_MUTEXATTR_FLAG_BITS macros instead of magic numbers.
3951         * pthread_mutexattr_gettype.c: Likewise.
3952         * pthread_mutexattr_setpshared.c: Likewise.
3953         * pthread_mutexattr_settype.c: Likewise.
3954         * pthread_mutex_init.c: Reject robust+pshared attribute for now.
3955         Initialize mutex kind according to robust flag.
3956         * pthread_mutex_lock.c: Implement local robust mutex.
3957         * pthread_mutex_timedlock.c: Likewise.
3958         * pthread_mutex_trylock.c: Likewise.
3959         * pthread_mutex_unlock.c: Likewise.
3960         * pthread_create.c (start_thread): Mark robust mutexes which remained
3961         locked as dead.
3962         * tst-robust1.c: New file.
3963         * tst-robust2.c: New file.
3964         * tst-robust3.c: New file.
3965         * tst-robust4.c: New file.
3966         * tst-robust5.c: New file.
3967         * tst-robust6.c: New file.
3968         * tst-robust7.c: New file.
3969         * Makefile (libpthread-routines): Add pthread_mutexattr_getrobust,
3970         pthread_mutexattr_setrobust, and pthread_mutex_consistent.
3971         (tests): Add tst-robust1, tst-robust2, tst-robust3, tst-robust4,
3972         tst-robust5, tst-robust6, and tst-robust7.
3974         * tst-typesizes.c: New file.
3975         * Makefile (tests): Add tst-typesizes.
3977         * tst-once3.c: More debug output.
3979 2005-12-24  Ulrich Drepper  <drepper@redhat.com>
3981         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Add break
3982         missing after last change.
3984         * version.c: Update copyright year.
3986 2005-12-23  Ulrich Drepper  <drepper@redhat.com>
3988         * pthread_mutex_destroy.c: Set mutex type to an invalid value.
3989         * pthread_mutex_lock.c: Return EINVAL for invalid mutex type.
3990         * pthread_mutex_trylock.c: Likewise.
3991         * pthread_mutex_timedlock.c: Likewise.
3992         * pthread_mutex_unlock.c: Likewise.
3994 2005-12-22  Roland McGrath  <roland@redhat.com>
3996         * sysdeps/pthread/sigaction.c: Use "" instead of <> to include self,
3997         so that #include_next's search location is not reset to the -I..
3998         directory where <nptl/...> can be found.
4000 2005-12-22  Ulrich Drepper  <drepper@redhat.com>
4002         [BZ #1913]
4003         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
4004         Fix unwind info.  Remove useless branch prediction prefix.
4005         * tst-cancel24.cc: New file.
4006         * Makefile: Add rules to build and run tst-cancel24.
4008 2005-12-21  Roland McGrath  <roland@redhat.com>
4010         * libc-cancellation.c: Use <> rather than "" #includes.
4011         * pt-cleanup.c: Likewise.
4012         * pthread_create.c: Likewise.
4013         * pthread_join.c: Likewise.
4014         * pthread_timedjoin.c: Likewise.
4015         * pthread_tryjoin.c: Likewise.
4016         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Likewise.
4017         * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
4018         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
4019         * unwind.c: Likewise.
4021 2005-12-19  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4023         * sysdeps/sh/tcb-offsets.sym: Add POINTER_GUARD.
4024         * sysdeps/sh/tls.h (tcbhead_t): Remove private and add pointer_guard.
4025         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
4026         THREAD_COPY_POINTER_GUARD): Define.
4028 2005-12-19  Jakub Jelinek  <jakub@redhat.com>
4030         * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): Make room for 2 uintptr_t's
4031         rather than one.
4032         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
4033         THREAD_COPY_POINTER_GUARD): Define.
4034         * sysdeps/powerpc/tcb-offsets.sym (POINTER_GUARD): Add.
4035         * sysdeps/powerpc/tls.h (tcbhead_t): Add pointer_guard field.
4036         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
4037         THREAD_COPY_POINTER_GUARD): Define.
4038         * sysdeps/s390/tcb-offsets.sym (STACK_GUARD): Add.
4039         * sysdeps/s390/tls.h (THREAD_GET_POINTER_GUARD,
4040         THREAD_SET_POINTER_GUARD, THREAD_COPY_POINTER_GUARD): Define.
4041         * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S (__ia64_longjmp):
4042         Use PTR_DEMANGLE for B0 if defined.
4044 2005-12-17  Ulrich Drepper  <drepper@redhat.com>
4046         * pthread_create.c (__pthread_create_2_1): Use
4047         THREAD_COPY_POINTER_GUARD if available.
4048         * sysdeps/i386/tcb-offsets.sym: Add POINTER_GUARD.
4049         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
4050         * sysdeps/i386/tls.h (tcbhead_t): Add pointer_guard.
4051         Define THREAD_SET_POINTER_GUARD and THREAD_COPY_POINTER_GUARD.
4052         * sysdeps/x86_64/tls.h: Likewise.
4054 2005-12-15  Roland McGrath  <roland@redhat.com>
4056         * sysdeps/unix/sysv/linux/mq_notify.c: Don't use sysdeps/generic.
4058 2005-12-13  Ulrich Drepper  <drepper@redhat.com>
4060         * sysdeps/pthread/sigfillset.c: Adjust for files moved out of
4061         sysdeps/generic.
4062         * errno-loc.c: New file.
4064 2005-12-12  Roland McGrath  <roland@redhat.com>
4066         * init.c (__pthread_initialize_minimal_internal): Do __static_tls_size
4067         adjustments before choosing stack size.  Update minimum stack size
4068         calculation to match allocate_stack change.
4070 2005-12-12  Ulrich Drepper  <drepper@redhat.com>
4072         * allocatestack.c (allocate_stack): Don't demand that there is an
4073         additional full page available on the stack beside guard, TLS, the
4074         minimum stack.
4076 2005-11-24  Ulrich Drepper  <drepper@redhat.com>
4078         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
4079         (__cleanup_fct_attribute): Use __regparm__ not regparm.
4081         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: When
4082         compiling 32-bit code we must define __cleanup_fct_attribute.
4084 005-11-24  Jakub Jelinek  <jakub@redhat.com>
4086         [BZ #1920]
4087         * sysdeps/pthread/pthread.h (__pthread_unwind_next): Use
4088         __attribute__ instead of __attribute.
4089         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
4090         (__cleanup_fct_attribute): Likewise.
4092 2005-11-17  Jakub Jelinek  <jakub@redhat.com>
4094         * sysdeps/pthread/unwind-forcedunwind.c (pthread_cancel_init): Put
4095         a write barrier before writing libgcc_s_getcfa.
4097 2005-11-06  Ulrich Drepper  <drepper@redhat.com>
4099         * sysdeps/unix/sysv/linux/configure: Removed.
4101 2005-11-05  Ulrich Drepper  <drepper@redhat.com>
4103         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Remove trace of
4104         optional init_array/fini_array support.
4106 2005-10-24  Roland McGrath  <roland@redhat.com>
4108         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Remove unnecessary
4109         versioned_symbol use.
4111 2005-10-16  Roland McGrath  <roland@redhat.com>
4113         * init.c (__pthread_initialize_minimal_internal): Even when using a
4114         compile-time default stack size, apply the minimum that allocate_stack
4115         will require, and round up to page size.
4117 2005-10-10  Daniel Jacobowitz  <dan@codesourcery.com>
4119         * Makefile ($(test-modules)): Remove static pattern rule.
4121 2005-10-14  Jakub Jelinek  <jakub@redhat.com>
4122             Ulrich Drepper  <drepper@redhat.com>
4124         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix stack
4125         alignment in callback function.
4126         * Makefile: Add rules to build and run tst-align3.
4127         * tst-align3.c: New file.
4129 2005-10-03  Jakub Jelinek  <jakub@redhat.com>
4131         * allocatestack.c (setxid_signal_thread): Add
4132         INTERNAL_SYSCALL_DECL (err).
4134 2005-10-02  Jakub Jelinek  <jakub@redhat.com>
4136         * allocatestack.c (setxid_signal_thread): Need to use
4137         atomic_compare_and_exchange_bool_acq.
4139 2005-10-01  Ulrich Drepper  <drepper@redhat.com>
4140             Jakub Jelinek  <jakub@redhat.com>
4142         * descr.h: Define SETXID_BIT and SETXID_BITMASK.  Adjust
4143         CANCEL_RESTMASK.
4144         (struct pthread): Move specific_used field to avoid padding.
4145         Add setxid_futex field.
4146         * init.c (sighandler_setxid): Reset setxid flag and release the
4147         setxid futex.
4148         * allocatestack.c (setxid_signal_thread): New function.  Broken
4149         out of the bodies of the two loops in __nptl_setxid.  For undetached
4150         threads check whether they are exiting and if yes, don't send a signal.
4151         (__nptl_setxid): Simplify loops by using setxid_signal_thread.
4152         * pthread_create.c (start_thread): For undetached threads, check
4153         whether setxid bit is set.  If yes, wait until signal has been
4154         processed.
4156         * allocatestack.c (STACK_VARIABLES): Initialize them.
4157         * pthread_create.c (__pthread_create_2_1): Initialize pd.
4159 2004-09-02  Jakub Jelinek  <jakub@redhat.com>
4161         * pthread_cond_destroy.c (__pthread_cond_destroy): If there are
4162         waiters, awake all waiters on the associated mutex.
4164 2005-09-22  Roland McGrath  <roland@redhat.com>
4166         * perf.c [__x86_64__] (HP_TIMING_NOW): New macro (copied from
4167         ../sysdeps/x86_64/hp-timing.h).
4169 2005-08-29  Jakub Jelinek  <jakub@redhat.com>
4171         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_WAKE_OP,
4172         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
4173         (lll_futex_wake_unlock): Define.
4174         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_WAKE_OP,
4175         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
4176         (lll_futex_wake_unlock): Define.
4177         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_WAKE_OP,
4178         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
4179         (lll_futex_wake_unlock): Define.
4180         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_WAKE_OP,
4181         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
4182         (lll_futex_wake_unlock): Define.
4183         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_WAKE_OP,
4184         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
4185         (lll_futex_wake_unlock): Define.
4186         * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal): Use
4187         lll_futex_wake_unlock.
4188         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
4189         (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
4190         (__pthread_cond_signal): Use FUTEX_WAKE_OP.
4191         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
4192         (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
4193         (__pthread_cond_signal): Use FUTEX_WAKE_OP.
4195 2005-09-05  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4197         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
4198         Fix typo in register name.
4200 2005-08-23  Ulrich Drepper  <drepper@redhat.com>
4202         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
4203         Use __sigfillset.  Document that sigfillset does the right thing wrt
4204         to SIGSETXID.
4206 2005-07-11  Jakub Jelinek  <jakub@redhat.com>
4208         [BZ #1102]
4209         * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER,
4210         PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP,
4211         PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP,
4212         PTHREAD_MUTEX_ADAPTIVE_NP, PTHREAD_RWLOCK_INITIALIZER,
4213         PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP,
4214         PTHREAD_COND_INITIALIZER): Supply zeros for all fields
4215         in the structure.
4216         * Makefile (tests): Add tst-initializers1.
4217         (CFLAGS-tst-initializers1.c): Set.
4218         * tst-initializers1.c: New test.
4220 2005-07-11  Jakub Jelinek  <jakub@redhat.com>
4222         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_rwlock_t):
4223         Make sure __flags are located at offset 48 from the start of the
4224         structure.
4226 2005-07-02  Roland McGrath  <roland@redhat.com>
4228         * Makeconfig: Comment fix.
4230 2005-07-05  Jakub Jelinek  <jakub@redhat.com>
4232         * descr.h (PTHREAD_STRUCT_END_PADDING): Define.
4233         * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): If PTHREAD_STRUCT_END_PADDING
4234         is smaller than 8 bytes, increase TLS_PRE_TCB_SIZE by 16 bytes.
4235         (THREAD_SYSINFO, THREAD_SELF, DB_THREAD_SELF): Don't assume
4236         TLS_PRE_TCB_SIZE is sizeof (struct pthread).
4237         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
4238         * sysdeps/ia64/tcb-offsets.sym (PID, TID, MULTIPLE_THREADS_OFFSET):
4239         Use TLS_PRE_TCB_SIZE instead of sizeof (struct pthread).
4240         * sysdeps/unix/sysv/linux/ia64/createthread.c (TLS_VALUE): Don't
4241         assume TLS_PRE_TCB_SIZE is sizeof (struct pthread).
4243 2005-06-25  Jakub Jelinek  <jakub@redhat.com>
4245         * sysdeps/i386/tls.h (tcbhead_t): Add stack_guard field.
4246         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
4247         * sysdeps/x86_64/tls.h (tcbhead_t): Add sysinfo and stack_guard
4248         fields.
4249         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
4250         * sysdeps/s390/tls.h (tcbhead_t): Add stack_guard
4251         field.  Put in sysinfo field unconditionally.
4252         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
4253         * sysdeps/powerpc/tls.h (tcbhead_t): Add stack_guard field.
4254         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
4255         * sysdeps/sparc/tls.h (tcbhead_t): Add sysinfo and stack_guard
4256         fields.
4257         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
4258         * pthread_create.c (__pthread_create_2_1): Use
4259         THREAD_COPY_STACK_GUARD macro.
4260         * Makefile: Add rules to build and run tst-stackguard1{,-static}
4261         tests.
4262         * tst-stackguard1.c: New file.
4263         * tst-stackguard1-static.c: New file.
4265 2005-06-14  Alan Modra  <amodra@bigpond.net.au>
4267         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
4268         Invoke CGOTSETUP and CGOTRESTORE.
4269         (CGOTSETUP, CGOTRESTORE): Define.
4271 2005-05-29  Richard Henderson  <rth@redhat.com>
4273         * tst-cancel4.c (WRITE_BUFFER_SIZE): New.
4274         (tf_write, tf_writev): Use it.
4275         (do_test): Use socketpair instead of pipe.  Set SO_SNDBUF to
4276         the system minimum.
4278 2005-05-23  Jakub Jelinek  <jakub@redhat.com>
4280         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
4281         [IS_IN_librt] (CENABLE, CDISABLE): Use JUMPTARGET instead of
4282         __librt_*_asynccancel@local.
4284 2005-05-17  Alan Modra  <amodra@bigpond.net.au>
4286         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Delete
4287         all occurrences of JUMPTARGET.  Instead append @local to labels.
4289 2005-05-20  Jakub Jelinek  <jakub@redhat.com>
4291         * sysdeps/i386/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN): Define to
4292         size/alignment of struct pthread rather than tcbhead_t.
4293         * sysdeps/x86_64/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
4294         Likewise.
4295         * sysdeps/s390/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
4296         Likewise.
4297         * sysdeps/sparc/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
4298         Likewise.
4300 2005-05-19  Richard Henderson  <rth@redhat.com>
4302         * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use
4303         __sync_val_compare_and_swap, not explicit _si variant.
4304         * sysdeps/ia64/pthread_spin_trylock.c (pthread_spin_trylock): Likewise.
4306 2005-05-03  Ulrich Drepper  <drepper@redhat.com>
4308         [BZ #915]
4309         * sysdeps/pthread/pthread.h: Avoid empty initializers.
4311 2005-05-03  Jakub Jelinek  <jakub@redhat.com>
4313         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Remove explicit
4314         .eh_frame section, use cfi_* directives.
4316 2005-04-27  Jakub Jelinek  <jakub@redhat.com>
4318         * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: Use <> instead
4319         of "" includes.
4321 2005-04-27  Ulrich Drepper  <drepper@redhat.com>
4323         [BZ #1075]
4324         * tst-cancel17.c (do_test): Add arbitrary factor to make sure
4325         aio_write blocks.
4327 2005-04-27  Roland McGrath  <roland@redhat.com>
4329         * Makefile (tests): Remove tst-clock2.
4331         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Handle
4332         CLOCK_PROCESS_CPUTIME_ID and CLOCK_PROCESS_THREAD_ID specially,
4333         translating to the kernel clockid_t for our own process/thread clock.
4335         * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: New file.
4337 2005-04-15  Jakub Jelinek  <jakub@redhat.com>
4339         * old_pthread_cond_init.c: Include <errno.h>.
4340         (__pthread_cond_init_2_0): Fail with EINVAL if COND_ATTR is
4341         process shared or uses clock other than CLOCK_REALTIME.
4342         * pthread_cond_init.c (__pthread_cond_init): Remove bogus comment.
4344 2005-04-13  David S. Miller  <davem@davemloft.net>
4346         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: New file.
4347         * sysdeps/sparc/sparc64/clone.S: New file.
4349 2005-04-05  Jakub Jelinek  <jakub@redhat.com>
4351         [BZ #1102]
4352         * sysdeps/pthread/pthread.h (__pthread_cleanup_routine): Use
4353         __inline instead of inline.
4354         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_routine): Likewise.
4356 2005-03-31  Jakub Jelinek  <jakub@redhat.com>
4358         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Use
4359         functionally equivalent, but shorter instructions.
4360         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
4361         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
4362         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
4363         Likewise.
4364         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
4365         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
4366         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
4367         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
4368         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4369         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
4370         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
4371         Likewise.
4372         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
4373         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
4374         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4375         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
4376         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
4378 2005-03-28  Daniel Jacobowitz  <dan@codesourcery.com>
4380         * sysdeps/mips/Makefile: New file.
4381         * sysdeps/mips/nptl-sysdep.S: New file.
4382         * sysdeps/mips/tcb-offsets.sym: New file.
4383         * sysdeps/mips/pthread_spin_lock.S: New file.
4384         * sysdeps/mips/pthread_spin_trylock.S: New file.
4385         * sysdeps/mips/pthreaddef.h: New file.
4386         * sysdeps/mips/tls.h: New file.
4387         * sysdeps/mips/jmpbuf-unwind.h: New file.
4388         * sysdeps/unix/sysv/linux/mips/lowlevellock.h: New file.
4389         * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h: New file.
4390         * sysdeps/unix/sysv/linux/mips/bits/semaphore.h: New file.
4391         * sysdeps/unix/sysv/linux/mips/pthread_once.c: New file.
4392         * sysdeps/unix/sysv/linux/mips/fork.c: New file.
4393         * sysdeps/unix/sysv/linux/mips/pt-vfork.S: New file.
4394         * sysdeps/unix/sysv/linux/mips/vfork.S: New file.
4395         * sysdeps/unix/sysv/linux/mips/clone.S: New file.
4396         * sysdeps/unix/sysv/linux/mips/createthread.c: New file.
4397         * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: New file.
4399 2005-03-23  Ulrich Drepper  <drepper@redhat.com>
4401         [BZ #1112]
4402         * pthread_create.c (__pthread_create_2_1): Rename syscall error
4403         variable to scerr.
4405 2005-03-10  Jakub Jelinek  <jakub@redhat.com>
4407         * tst-getpid1.c (do_test): Align stack passed to clone{2,}.
4409 2005-02-25  Roland McGrath  <roland@redhat.com>
4411         * alloca_cutoff.c: Correct license text.
4412         * tst-unload.c: Likewise.
4413         * sysdeps/pthread/allocalim.h: Likewise.
4414         * sysdeps/pthread/pt-initfini.c: Likewise.
4415         * sysdeps/pthread/bits/libc-lock.h: Likewise.
4416         * sysdeps/pthread/bits/sigthread.h: Likewise.
4417         * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
4418         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
4420 2005-02-16  Roland McGrath  <roland@redhat.com>
4422         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
4423         Use unsigned int * for ptr_nthreads.
4425 2005-02-14  Alan Modra  <amodra@bigpond.net.au>
4427         [BZ #721]
4428         * sysdeps/powerpc/tcb-offsets.sym (thread_offsetof): Redefine to suit
4429         gcc4.
4431 2005-02-07  Richard Henderson  <rth@redhat.com>
4433         [BZ #787]
4434         * sysdeps/pthread/pthread.h (__sigsetjmp): Use pointer as first
4435         argument.
4437 2004-11-03  Marcus Brinkmann  <marcus@gnu.org>
4439         * sysdeps/generic/lowlevellock.h (__generic_mutex_unlock): Fix
4440         order of arguments in invocation of atomic_add_zero.
4442 2005-01-26  Jakub Jelinek  <jakub@redhat.com>
4444         [BZ #737]
4445         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S (__new_sem_trywait):
4446         Use direct %gs segment access or, if NO_TLS_DIRECT_SEG_REFS,
4447         at least gotntpoff relocation and addition.
4448         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
4449         Likewise.
4450         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
4451         Likewise.
4452         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
4453         Likewise.
4455 2005-01-06  Ulrich Drepper  <drepper@redhat.com>
4457         * allocatestack.c (init_one_static_tls): Adjust initialization of DTV
4458         entry for static tls deallocation fix.
4459         * sysdeps/alpha/tls.h (dtv_t): Change pointer type to be struct which
4460         also contains information whether the memory pointed to is static
4461         TLS or not.
4462         * sysdeps/i386/tls.h: Likewise.
4463         * sysdeps/ia64/tls.h: Likewise.
4464         * sysdeps/powerpc/tls.h: Likewise.
4465         * sysdeps/s390/tls.h: Likewise.
4466         * sysdeps/sh/tls.h: Likewise.
4467         * sysdeps/sparc/tls.h: Likewise.
4468         * sysdeps/x86_64/tls.h: Likewise.
4470 2004-12-27  Ulrich Drepper  <drepper@redhat.com>
4472         * init.c (__pthread_initialize_minimal_internal): Use __sigemptyset.
4474 2004-12-21  Jakub Jelinek  <jakub@redhat.com>
4476         * sysdeps/i386/tls.h (CALL_THREAD_FCT): Maintain 16 byte alignment of
4477         %esp.
4478         * Makefile (tests): Add tst-align2.
4479         * tst-align2.c: New test.
4480         * sysdeps/i386/Makefile (CFLAGS-tst-align{,2}.c): Add
4481         -mpreferred-stack-boundary=4.
4483 2004-12-18  Roland McGrath  <roland@redhat.com>
4485         * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h:
4486         New file removed withdrawn for the moment.
4488 2004-12-17  Richard Henderson  <rth@redhat.com>
4490         * sysdeps/unix/sysv/linux/alpha/clone.S: New file.
4491         * sysdeps/alpha/tcb-offsets.sym (TID_OFFSET): New.
4493 2004-12-16  Ulrich Drepper  <drepper@redhat.com>
4495         * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h: New file.
4496         Increased PTHREAD_STACK_MIN.
4498         * tst-context1.c (stacks): Use bigger stack size.
4500 2004-12-16  Jakub Jelinek  <jakub@redhat.com>
4502         * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: New file.
4503         * sysdeps/sparc/tcb-offsets.sym: Add TID.
4505 2004-12-15  Jakub Jelinek  <jakub@redhat.com>
4507         * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: New file.
4508         * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: New file.
4509         * sysdeps/s390/tcb-offsets.sym (TID): Add.
4511 2004-12-15  Ulrich Drepper  <drepper@redhat.com>
4513         * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: New file.
4515 2004-12-14  Ulrich Drepper  <drepper@redhat.com>
4517         * sysdeps/powerpc/tcb-offsets.sym: Add TID.
4518         * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: New file.
4520         * tst-getpid1.c: If child crashes, report this first.  Print which
4521         signal.
4523 2004-12-09  Ulrich Drepper  <drepper@redhat.com>
4525         * init.c (__pthread_initialize_minimal_internal): Also unblock
4526         SIGSETXID.
4528 2004-12-01  Jakub Jelinek  <jakub@redhat.com>
4530         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_CPUTIME,
4531         _POSIX_THREAD_CPUTIME): Define to 0.
4532         * sysdeps/pthread/timer_create.c (timer_create): Remove unused code
4533         handling CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID.
4534         * sysdeps/pthread/timer_routines.c (__timer_signal_thread_pclk,
4535         __timer_signal_thread_tclk): Remove.
4536         (init_module): Remove their initialization.
4537         (thread_cleanup): Remove their cleanup assertions.
4538         * sysdeps/pthread/posix-timer.h (__timer_signal_thread_pclk,
4539         __timer_signal_thread_tclk): Remove.
4540         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Removed.
4541         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Removed.
4542         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Removed.
4544 2004-12-07  Jakub Jelinek  <jakub@redhat.com>
4546         * sysdeps/ia64/tcb-offsets.sym (TID): Add.
4547         * sysdeps/unix/sysv/linux/ia64/clone2.S: New file.
4549         * Makefile (tests): Add tst-getpid2.
4550         * tst-getpid1.c (TEST_CLONE_FLAGS): Define.
4551         (do_test): Use it.  Use __clone2 instead of clone on ia64.
4552         * tst-getpid2.c: New test.
4554 2004-12-07  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4556         * sysdeps/unix/sysv/linux/sh/clone.S: New file.
4558 2004-12-04  Ulrich Drepper  <drepper@redhat.com>
4560         * Makefile (tests): Add tst-getpid1.
4561         * tst-getpid1.c: New file.
4562         * sysdeps/unix/sysv/linux/i386/clone.S: New file.
4563         * sysdeps/unix/sysv/linux/x86_64/clone.S: New file.
4565 2004-12-02  Roland McGrath  <roland@redhat.com>
4567         * Makefile (libpthread-nonshared): Variable removed.
4568         ($(objpfx)libpthread_nonshared.a): Target removed.
4569         ($(inst_libdir)/libpthread_nonshared.a): Likewise.
4570         These are now handled by generic magic from
4571         libpthread-static-only-routines being set.
4573 2004-11-27  Ulrich Drepper  <drepper@redhat.com>
4575         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_PRIORITIZED_IO,
4576         _POSIX2_CHAR_TERM, _POSIX_THREAD_PRIO_INHERIT,
4577         _POSIX_THREAD_PRIO_PROTECT): Define.
4578         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
4579         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
4580         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
4582 2004-11-26  Jakub Jelinek  <jakub@redhat.com>
4584         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_ADVISORY_INFO,
4585         _POSIX_SPORADIC_SERVER, _POSIX_THREAD_SPORADIC_SERVER, _POSIX_TRACE,
4586         _POSIX_TRACE_EVENT_FILTER, _POSIX_TRACE_INHERIT, _POSIX_TRACE_LOG,
4587         _POSIX_TYPED_MEMORY_OBJECTS, _POSIX_IPV6, _POSIX_RAW_SOCKETS): Define.
4588         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
4589         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
4590         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
4592 2004-11-24  Ulrich Drepper  <drepper@redhat.com>
4594         * sysdeps/x86_64/Makefile [nptl]: Define CFLAGS-pthread_create.c.
4596         * Makefile (libpthread-routines): Add pthread_setschedprio.
4597         * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setschedprio.
4598         * sysdeps/pthread/pthread.h: Declare pthread_setschedprio.
4599         * pthread_setschedprio.c: New file.
4601 2004-11-20  Jakub Jelinek  <jakub@redhat.com>
4603         * pthread_create.c (pthread_cancel): Add PTHREAD_STATIC_FN_REQUIRE.
4604         * pthread_cancel.c (pthread_create): Likewise.
4606         * Makefile (libpthread-routines): Add vars.
4607         * sysdeps/pthread/createthread.c (__pthread_multiple_threads): Remove.
4608         * init.c (__default_stacksize, __is_smp): Remove.
4609         * vars.c: New file.
4610         * pthreadP.h (__find_thread_by_id): If !SHARED, add weak_function
4611         and define a wrapper macro.
4612         (PTHREAD_STATIC_FN_REQUIRE): Define.
4613         * allocatestack.c (__find_thread_by_id): Undefine.
4614         * pthread_create (__pthread_keys): Remove.
4615         (pthread_mutex_lock, pthread_mutex_unlock, pthread_once,
4616         pthread_key_create, pthread_setspecific, pthread_getspecific): Add
4617         PTHREAD_STATIC_FN_REQUIRE.
4619 2004-11-18  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4621         * sysdeps/sh/tls.h (DB_THREAD_SELF): Set the correct bias
4622         parameter to REGISTER macro.
4624 2004-11-17  Roland McGrath  <roland@redhat.com>
4626         * sysdeps/unix/sysv/linux/timer_routines.c (__start_helper_thread):
4627         Make sure SIGCANCEL is blocked as well.
4629 2004-11-10  Jakub Jelinek  <jakub@redhat.com>
4631         * sysdeps/pthread/setxid.h: New file.
4632         * sysdeps/pthread/pthread-functions.h (HAVE_PTR__NPTL_SETXID): Remove.
4633         (struct xid_command): Add forward decl.
4634         (struct pthread_functions): Change return type of __nptl_setxid hook
4635         to int.
4636         * pthreadP.h (__nptl_setxid): Change return type to int.
4637         * allocatestack.c (__nptl_setxid): Call INTERNAL_SYSCALL_NCS in the
4638         calling thread, return its return value and set errno on failure.
4639         * descr.h (struct xid_command): Change id type to long array.
4641         * Makefile: Add rules to build and test tst-setuid1 and
4642         tst-setuid1-static.
4643         * tst-setuid1.c: New test.
4644         * tst-setuid1-static.c: New test.
4646 2004-11-10  Jakub Jelinek  <jakub@redhat.com>
4648         * Makefile (tests): Add tst-exit3.
4649         * tst-exit3.c: New test.
4651 2004-11-09  Ulrich Drepper  <drepper@redhat.com>
4653         * Makefile (tests): Add tst-exit2.
4654         * tst-exit2.c: New file.
4656 2004-11-09  Roland McGrath  <roland@redhat.com>
4658         [BZ #530]
4659         * sysdeps/pthread/createthread.c (do_clone): Increment __nptl_nthreads
4660         here, before calling clone.
4661         * pthread_create.c (start_thread): Don't do it here.
4663 2004-11-02  Jakub Jelinek  <jakub@redhat.com>
4665         * sysdeps/unix/sysv/linux/smp.h: Include <errno.h>.
4667 2004-10-29  Kaz  Kojima  <kkojima@rr.iij4u.or.jp>
4669         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
4670         Set ETIMEDOUT to errno when time is up.  Tweak to avoid
4671         assembler warning.
4673 2004-10-28  Jakub Jelinek  <jakub@redhat.com>
4675         * pthread_create.c (__pthread_create_2_1): Avoid leaking stacks
4676         if sched_priority is not between minprio and maxprio.
4678 2004-10-25  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4680         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
4681         (__pthread_cond_timedwait): Use clock_gettime syscall if exists.
4683         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
4684         (__lll_mutex_timedlock_wait): Fix a bad branch condition.
4686 2004-10-24  Ulrich Drepper  <drepper@redhat.com>
4688         * sysdeps/unix/sysv/linux/smp.h (is_smp_system): Use
4689         not-cancelable I/O functions.
4691 2004-10-21  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4693         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
4694         (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
4695         make sure 2 is stored in the futex and we looked at the old value.
4696         Fix a few other problems to return the correct value.
4698 2004-10-14  Richard Henderson  <rth@redhat.com>
4700         * sysdeps/alpha/tcb-offsets.sym (thread_offsetof): Redefine to
4701         make gcc4 happy.
4703 2004-10-06  Jakub Jelinek  <jakub@redhat.com>
4705         * sysdeps/unix/sysv/linux/jmp-unwind.c: Include pthreadP.h instead
4706         of pthread-functions.h and pthreaddef.h.
4707         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Likewise.
4709         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
4710         Change __data.__nwaiters from int to unsigned int.
4712         * tst-clock2.c (do_test): Don't fail if _POSIX_THREAD_CPUTIME == 0 and
4713         sysconf (_SC_THREAD_CPUTIME) returns negative value.
4715         * allocatestack.c (__find_thread_by_id): Move attribute_hidden
4716         before return type.
4718         * sysdeps/s390/jmpbuf-unwind.h: Include bits/wordsize.h.
4719         (JMPBUF_CFA_UNWINDS_ADJ): Subtract 96 resp. 160 bytes from CFA.
4721 2004-10-06  Ulrich Drepper  <drepper@redhat.com>
4723         * tst-cancel4.c (tf_msgrcv): Check for failure in msgget.  If the
4724         test fails, remove message queue.
4725         (tf_msgsnd): Likewise.
4727 2004-10-05  Jakub Jelinek  <jakub@redhat.com>
4729         * tst-clock1.c: Change #ifdef to #if defined.
4730         * tst-clock2.c: Likewise.
4731         * tst-cond11.c: Likewise.
4733         * sysdeps/pthread/timer_create.c (timer_create): Use
4734         defined _POSIX_CPUTIME && _POSIX_CPUTIME >= 0 instead of
4735         defined CLOCK_PROCESS_CPUTIME_ID #ifs and similarly for
4736         THREAD_CPUTIME.
4738 2004-10-05  Jakub Jelinek  <jakub@redhat.com>
4740         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h (_POSIX_CPUTIME,
4741         _POSIX_THREAD_CPUTIME): Define to 0.
4743 2004-10-04  Ulrich Drepper  <drepper@redhat.com>
4745         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Define _POSIX_CPUTIME
4746         and _POSIX_THREAD_CPUTIME to zero.
4747         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
4748         * tst-barrier2.c: Fix testing for POSIX feature.
4749         * tst-clock1.c: Likewise.
4750         * tst-clock2.c: Likewise.
4751         * tst-cond11.c: Likewise.
4752         * tst-cond4.c: Likewise.
4753         * tst-cond6.c: Likewise.
4754         * tst-flock2.c: Likewise.
4755         * tst-mutex4.c: Likewise.
4756         * tst-mutex9.c: Likewise.
4757         * tst-rwlock12.c: Likewise.
4758         * tst-rwlock4.c: Likewise.
4759         * tst-signal1.c: Likewise.
4760         * tst-spin2.c: Likewise.
4761         * sysdeps/pthread/posix-timer.h: Likewise.
4762         * sysdeps/pthread/timer_create.c: Likewise.
4763         * sysdeps/pthread/timer_routines.c: Likewise.
4765 2004-10-01  Ulrich Drepper  <drepper@redhat.com>
4767         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4768         (__lll_mutex_timedlock_wait): Address futex correctly.
4770         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
4771         (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
4772         make sure 2 is stored in the futex and we looked at the old value.
4773         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4774         (__lll_mutex_timedlock_wait): Likewise.  Fix a few other problems
4775         which might very well made the code not working at all before.
4776         [BZ #417]
4778 2004-09-28  Ulrich Drepper  <drepper@redhat.com>
4780         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
4781         allow SIGSETXID to be sent.
4782         * sysdeps/pthread/sigaction.c (__sigaction): Don't allow action
4783         for SIGSETXID to be defined.
4784         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
4785         SIGSETXID cannot be blocked.
4787         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4788         Add __extension__ to long long types.
4789         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4790         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4791         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4792         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4793         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
4794         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4795         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4797 2004-09-25  Ulrich Drepper  <drepper@redhat.com>
4799         * descr.h (struct pthread): Add stopped_start field.
4800         * sysdeps/pthread/createthread.c (create_thread): Set
4801         start_stopped flag in descriptor for new thread appropriately.
4802         * pthread_create.c (start_thread): Only take lock to be stopped on
4803         startup if stopped_start flag says so.
4805 2004-09-24  Ulrich Drepper  <drepper@redhat.com>
4807         * pthread_create.c (__pthread_create_2_1): Remember whether thread
4808         is created detached and if yes, do not try to free the stack in case
4809         the thread creation failed.
4810         * sysdeps/pthread/createthread.c (do_clone): Free stack here if clone
4811         call fails.  Don't depend on INTERNAL_SYSCALL_ERRNO return zero in
4812         case there has been no error.  [BZ #405]
4814         * pthread_create.c (start_thread): Don't wait for scheduler data
4815         etc to be set at the beginning of the function.  The cancellation
4816         infrastructure must have been set up.  And enable async
4817         cancellation before potentially going to sleep.  [BZ #401]
4819 2004-09-20  Ulrich Drepper  <drepper@redhat.com>
4821         * Versions: Remove exports for pthread_set*id_np functions.
4822         * sysdeps/pthread/pthread.h: Remove pthread_set*id_np prototypes
4823         for now.
4824         * Makefile: Don't build pthread_set*id code for now.
4826 2004-09-19  Ulrich Drepper  <drepper@redhat.com>
4828         * sysdeps/unix/sysv/linux/allocrtsig.c: Allocate second signal for
4829         internal use.
4830         * allocatestack.c (__nptl_setxid): New function.
4831         * descr.h (struct xid_command): Define type.
4832         * init.c (pthread_functions): Add ptr__nptl_setxid initialization.
4833         (sighandler_setxid): New function.
4834         (__pthread_initialize_minimal): Register sighandler_setxid for
4835         SIGCANCEL.
4836         * pt-allocrtsig.c: Update comment.
4837         * pthreadP.h: Define SIGSETXID.  Declare __xidcmd variable.
4838         Declare __nptl_setxid.
4839         * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_setxid.
4840         * sysdeps/pthread/pthread.h: Declare pthread_setgid_np,
4841         pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
4842         pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
4843         and pthread_setresuid_np.
4844         * pthread_setgid_np.c: New file.
4845         * pthread_setuid_np.c: New file.
4846         * pthread_setegid_np.c: New file.
4847         * pthread_seteuid_np.c: New file.
4848         * pthread_setregid_np.c: New file.
4849         * pthread_setreuid_np.c: New file.
4850         * pthread_setresgid_np.c: New file.
4851         * pthread_setresuid_np.c: New file.
4852         * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setgid_np,
4853         pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
4854         pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
4855         and pthread_setresuid_np.
4856         * Makefile (libpthread-routines): Add pthread_setuid, pthread_seteuid,
4857         pthread_setreuid, pthread_setresuid, pthread_setgid, pthread_setegid,
4858         pthread_setregid, and pthread_setresgid.
4860 2004-09-18  Ulrich Drepper  <drepper@redhat.com>
4862         * allocatestack.c (allocate_stack): Return EAGAIN instead of
4863         ENOMEM when out of memory.
4865 2004-09-10  Roland McGrath  <roland@redhat.com>
4867         [BZ #379]
4868         * allocatestack.c (allocate_stack): Remove [__ASSUME_CLONE_STOPPED]
4869         code, since we don't try to use the broken CLONE_STOPPED any more.
4870         * pthread_create.c (start_thread): Likewise.
4872 2004-09-15  Richard Henderson  <rth@redhat.com>
4874         * sysdeps/unix/sysv/linux/alpha/vfork.S: Use libc_hidden_def.
4876 2004-09-01  David Mosberger  <davidm@hpl.hp.com>
4878         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h
4879         (__libc_unwind_longjmp): Delete macro and declare as function.
4880         * sysdeps/unix/sysv/linux/ia64/Makefile (sysdep_routines): Mention
4881         __ia64_longjmp, sigstack_longjmp, and __sigstack_longjmp for
4882         nptl directory.
4883         * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S: New file.
4884         * sysdeps/unix/sysv/linux/ia64/__sigstack_longjmp.c: New file.
4885         * sysdeps/unix/sysv/linux/ia64/unwind_longjmp.c: New file.
4887 2004-09-12  Ulrich Drepper  <drepper@redhat.com>
4889         * sysdeps/pthread/pthread.h: Make rwlock prototypes available also
4890         for __USE_XOPEN2K.
4891         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define rwlock
4892         types also for __USE_XOPEN2K.
4893         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4894         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4895         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4896         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4897         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4898         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4899         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4900         [BZ #320]
4902 2004-09-08  Ulrich Drepper  <drepper@redhat.com>
4904         * sysdeps/pthread/pthread.h
4905         (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Make safe for C++.
4906         (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
4907         (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
4908         (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Likewise.
4909         [BZ #375]
4911 2004-09-07  Ulrich Drepper  <drepper@redhat.com>
4913         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Allow
4914         PSEUDO to be used with . prefix.
4916         * sysdeps/unix/sysv/linux/alpha/pthread_once.c (__pthread_once):
4917         Use atomic_increment instead of atomic_exchange_and_add.
4918         * sysdeps/unix/sysv/linux/sparc/pthread_once.c (__pthread_once):
4919         Likewise.
4920         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
4921         Likewise.
4922         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
4923         Likewise.
4925         * allocatestack.c (allocate_stack): Use atomic_increment_val
4926         instead of atomic_exchange_and_add.
4927         * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Likewise.
4928         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
4929         Likewise.
4930         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
4931         Likewise.
4933         * sysdeps/pthread/pthread.h (pthread_once): Remove __THROW since
4934         the initialization function might throw.
4936 2005-09-05  Richard Henderson  <rth@redhat.com>
4938         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
4939         Move definition inside libpthread, libc, librt check.  Provide
4940         definition for rtld.
4942 2004-09-02  Ulrich Drepper  <drepper@redhat.com>
4944         * sysdeps/alpha/jmpbuf-unwind.h: Define __libc_unwind_longjmp.
4945         * sysdeps/i386/jmpbuf-unwind.h: Likewise
4946         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
4947         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
4948         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
4949         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
4950         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
4951         * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
4952         * unwind.c: Use it.
4954         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
4955         Rename __data.__clock to __data.__nwaiters, make it unsigned int.
4956         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
4957         Likewise.
4958         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
4959         Decrement __nwaiters.  If pthread_cond_destroy has been called and
4960         this is the last waiter, signal pthread_cond_destroy caller and
4961         avoid using the pthread_cond_t structure after unlock.
4962         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4963         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4964         Read clock type from the least significant bits of __nwaiters instead
4965         of __clock.
4966         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4967         * sysdeps/unix/sysv/linux/internaltypes.h: Define COND_CLOCK_BITS.
4969 2004-08-31  Jakub Jelinek  <jakub@redhat.com>
4971         [BZ #342]
4972         * Makefile (tests): Add tst-cond20 and tst-cond21.
4973         * tst-cond20.c: New test.
4974         * tst-cond21.c: New test.
4975         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
4976         (pthread_cond_t): Rename __data.__clock to __data.__nwaiters, make
4977         it unsigned int.
4978         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
4979         Likewise.
4980         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
4981         (pthread_cond_t): Likewise.
4982         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
4983         Likewise.
4984         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4985         Likewise.
4986         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
4987         Likewise.
4988         * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_clock): Remove.
4989         (cond_nwaiters): New.
4990         (clock_bits): New.
4991         * pthread_cond_destroy.c (__pthread_cond_destroy): Return EBUSY
4992         if there are waiters not signalled yet.
4993         Wait until all already signalled waiters wake up.
4994         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Decrement
4995         __nwaiters.  If pthread_cond_destroy has been called and this is the
4996         last waiter, signal pthread_cond_destroy caller and avoid using
4997         the pthread_cond_t structure after unlock.
4998         (__pthread_cond_wait): Increment __nwaiters in the beginning,
4999         decrement it when leaving.  If pthread_cond_destroy has been called
5000         and this is the last waiter, signal pthread_cond_destroy caller.
5001         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
5002         Likewise.  Read clock type from the least significant bits of
5003         __nwaiters instead of __clock.
5004         * pthread_condattr_setclock.c (pthread_condattr_setclock): Check
5005         whether clock ID can be encoded in COND_CLOCK_BITS bits.
5006         * pthread_condattr_getclock.c (pthread_condattr_getclock): Decode
5007         clock type just from the last COND_CLOCK_BITS bits of value.
5008         * pthread_cond_init.c (__pthread_cond_init): Initialize __nwaiters
5009         instead of __clock, just from second bit of condattr's value.
5011 2004-08-30  Jakub Jelinek  <jakub@redhat.com>
5013         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Include
5014         bits/wordsize.h.  Make the header match i386 header when __WORDSIZE
5015         != 64.
5016         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
5018 2004-08-15  Roland McGrath  <roland@frob.com>
5020         * pthread_atfork.c: Update copyright terms including special exception
5021         for these trivial files, which are statically linked into executables
5022         that use dynamic linking for the significant library code.
5024 2004-08-09  Jakub Jelinek  <jakub@redhat.com>
5026         * DESIGN-rwlock.txt: Add decreasing of nr_readers_queued to
5027         pthread_rwlock_rdlock.
5028         * sysdeps/pthread/pthread_rwlock_rdlock (__pthread_rwlock_rdlock):
5029         Decrease __nr_readers_queued after reacquiring lock.
5030         * sysdeps/pthread/pthread_rwlock_timedrdlock
5031         (pthread_rwlock_timedrdlock): Likewise.
5032         Reported by Bob Cook <bobcook47@hotmail.com>.
5034 2004-08-11  Jakub Jelinek  <jakub@redhat.com>
5036         * tst-rwlock14.c (tf): Read main thread handle from *ARG
5037         before pthread_barrier_wait.
5039 2004-08-07  Ulrich Drepper  <drepper@redhat.com>
5041         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
5042         Remove unnecessary exception handling data.
5044 2004-07-23  Jakub Jelinek  <jakub@redhat.com>
5046         [BZ #284]
5047         * sysdeps/pthread/pthread.h (pthread_getcpuclockid): Use __clockid_t
5048         instead of clockid_t.
5050 2004-07-21  Roland McGrath  <roland@redhat.com>
5052         * Makefile ($(objpfx)multidir.mk): Use $(make-target-directory).
5054 2004-07-19  Roland McGrath  <roland@redhat.com>
5056         * tst-cancel4.c (tf_waitid): Use WEXITED flag bit if available.
5058 2004-07-02  Roland McGrath  <roland@redhat.com>
5060         * configure: Don't exit.
5062 2004-07-14  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5064         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
5065         (__pthread_cond_timedwait): Check for invalid nanosecond in
5066         timeout value.
5068 2004-07-07  Ulrich Drepper  <drepper@redhat.com>
5070         * Makefile: Add rules to build and run tst-fini1.
5071         * tst-fini1.c: New file.
5072         * tst-fini1mod.c: New file.
5074 2004-07-05  Ulrich Drepper  <drepper@redhat.com>
5076         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define NO_CANCELLATION
5077         if no cancellation support is needed.
5078         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
5079         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
5080         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
5081         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
5082         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
5083         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
5084         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
5085         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
5086         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
5088         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define __NR_futex
5089         only if not already defined.
5091 2004-07-05  Jakub Jelinek  <jakub@redhat.com>
5093         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_unlock): Use
5094         constraint "m" instead of "0" for futex.
5096         * shlib-versions: Add powerpc64-.*-linux.*.
5098 2004-07-04  Jakub Jelinek  <jakub@redhat.com>
5100         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
5101         (pthread_rwlock_timedrdlock): Use cmpq instead of cmpl to check
5102         for valid tv_nsec.
5103         * tst-rwlock14.c (do_test): Test for invalid tv_nsec equal to
5104         1 billion and 64-bit tv_nsec which is valid when truncated to 32
5105         bits.
5107 2004-06-29  Roland McGrath  <roland@redhat.com>
5109         * Banner: NPTL no longer has its own version number.
5110         * Makefile (nptl-version): Variable removed.
5111         * sysdeps/pthread/Makefile (CFLAGS-confstr.c): Set LIBPTHREAD_VERSION
5112         using $(version), the glibc version number.
5114 2004-06-29  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5116         * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
5117         Fix branch offset for a PLT entry.
5118         * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
5119         Likewise.
5120         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
5121         Likewise.
5122         * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
5123         Likewise.
5124         * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait):
5125         Likewise.
5127 2004-06-28  Jakub Jelinek  <jakub@redhat.com>
5129         * sysdeps/alpha/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define
5130         unconditionally.
5132 2004-06-28  Jakub Jelinek  <jakub@redhat.com>
5134         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
5135         (pthread_rwlock_timedwrlock): Return EINVAL if tv_nsec is negative,
5136         instead of tv_sec.
5137         * sysdeps/pthread/pthread_rwlock_timedrdlock.c
5138         (pthread_rwlock_timedrdlock): Likewise.
5140 2004-06-22  Jakub Jelinek  <jakub@redhat.com>
5142         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
5143         Set __r7 to val, not mutex.
5145 2004-06-27  Ulrich Drepper  <drepper@redhat.com>
5147         * Makefile: Add rules to build tst-rwlock14.
5148         * tst-rwlock14.c: New file.
5150 2004-06-24  Boris Hu  <boris.hu@intel.com>
5152         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Add timeout validation
5153         check.
5154         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
5156 2004-06-19  Andreas Jaeger  <aj@suse.de>
5158         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix
5159         assembler in last patch.
5161 2004-06-17  Ulrich Drepper  <drepper@redhat.com>
5163         * sysdeps/pthread/pthread_cond_timedwait.c
5164         (__pthread_cond_timedwait): Also check for negativ nanoseconds.
5165         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5166         (__pthread_cond_timedwait): Check for invalid nanosecond in
5167         timeout value.
5168         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5169         * tst-cond19.c: New file.
5170         * Makefile: Add rules to build and run tst-cond19.
5172 2004-06-15  Steven Munroe  <sjmunroe@us.ibm.com>
5174         * tst-context1.c (GUARD_PATTERN): Defined.
5175         (tst_context_t): Define struct containing ucontext_t & guard words.
5176         (ctx): Declare as an array of tst_context_t.
5177         (fct): Verify uc_link & guard words are still valid.
5178         (tf): Initialize guard words in ctx.  Adjust ctx refs for new struct.
5180 2004-06-13  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5182         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
5183         Add __data.__futex field, reshuffle __data.__clock.
5184         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
5185         (__pthread_cond_signal): Increment __futex at the same time as
5186         __wakeup_seq or __total_seq.  Pass address of __futex instead of
5187         address of low 32-bits of __wakeup_seq to futex syscall.
5188         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
5189         (__pthread_cond_wait): Likewise.  Pass __futex value from before
5190         releasing internal lock to FUTEX_WAIT.
5191         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
5192         (__pthread_cond_timedwait): Likewise.
5193         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
5194         (FUTEX_CMP_REQUEUE): Define.
5195         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
5196         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
5197         Pass __futex value from before the unlock and __futex address instead
5198         of address of low 32-bits of __wakeup_seq to futex syscall.
5199         Fallback to FUTEX_WAKE all on any errors.
5201 2004-06-08  Jakub Jelinek  <jakub@redhat.com>
5203         * pthread_mutexattr_getpshared.c (pthread_mutex_getpshared): Fix
5204         comment typo.
5205         * pthread_mutexattr_gettype.c (pthread_mutexattr_gettype): Likewise.
5206         * pthread_mutexattr_init.c (__pthread_mutexattr_init): Likewise.
5207         * pthread_mutexattr_settype.c (__pthread_mutexattr_settype): Likewise.
5208         * pthread_mutexattr_setpshared.c (pthread_mutexattr_setpshared):
5209         Likewise.  Reported by Bob Cook <bobcook47@hotmail.com>.
5211 2004-06-11  Martin Schwidefsky  <schwidefsky@de.ibm.com>
5213         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_compare_and_swap):
5214         Add memory clobber to inline assembly.
5215         (__lll_mutex_trylock): Likewise.
5216         (__lll_mutex_cond_trylock): Likewise.
5218 2004-06-07  Martin Schwidefsky  <schwidefsky@de.ibm.com>
5220         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
5221         Pass val argument as 6th system call argument in %r7.
5223 2004-05-21  Jakub Jelinek  <jakub@redhat.com>
5225         * Makefile (tests): Add tst-cond16.
5226         * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_futex): Add.
5227         * pthread_cond_init.c (__pthread_cond_init): Clear __data.__futex.
5228         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
5229         Add __data.__futex field, reshuffle __data.__clock.
5230         * sysdeps/unix/sysv/linux/i386/pthread_cond_signal.S
5231         (__pthread_cond_signal): Increment __futex at the same time as
5232         __wakeup_seq or __total_seq.  Pass address of __futex instead of
5233         address of low 32-bits of __wakeup_seq to futex syscall.
5234         * sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S
5235         (__pthread_cond_wait): Likewise.  Pass __futex value from before
5236         releasing internal lock to FUTEX_WAIT.
5237         * sysdeps/unix/sysv/linux/i386/pthread_cond_timedwait.S
5238         (__pthread_cond_timedwait): Likewise.
5239         * sysdeps/unix/sysv/linux/i386/pthread_cond_broadcast.S
5240         (FUTEX_CMP_REQUEUE): Define.
5241         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
5242         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
5243         Pass __futex value from before the unlock and __futex address instead
5244         of address of low 32-bits of __wakeup_seq to futex syscall.
5245         Fallback to FUTEX_WAKE all on any errors.
5246         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_CMP_REQUEUE):
5247         Define.
5248         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
5249         internally.  Return non-zero if error, zero if success.
5250         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
5251         Add __data.__futex field, reshuffle __data.__clock.
5252         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_CMP_REQUEUE):
5253         Define.
5254         (lll_futex_requeue): Add val argument, return 1 unconditionally
5255         for the time being.
5256         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
5257         Add __data.__futex field, reshuffle __data.__clock.
5258         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_CMP_REQUEUE):
5259         Define.
5260         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
5261         internally.  Return non-zero if error, zero if success.
5262         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
5263         (pthread_cond_t): Add __data.__futex field, reshuffle __data.__clock.
5264         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_CMP_REQUEUE):
5265         Define.
5266         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
5267         internally.  Return non-zero if error, zero if success.
5268         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
5269         Add __data.__futex field, reshuffle __data.__clock.
5270         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_CMP_REQUEUE):
5271         Define.
5272         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
5273         internally.  Return non-zero if error, zero if success.
5274         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
5275         Add __data.__futex field, reshuffle __data.__clock.
5276         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
5277         Add __data.__futex field, reshuffle __data.__clock.
5278         * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal):
5279         Increment __futex at the same time as __wakeup_seq or __total_seq.
5280         Pass address of __futex instead of address of low 32-bits of
5281         __wakeup_seq to futex syscall.
5282         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
5283         Pass __futex value from before releasing internal lock
5284         to FUTEX_WAIT.
5285         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
5286         Likewise.  Avoid unnecessary shadowing of variables.
5287         * sysdeps/pthread/pthread_cond_broadcast.c (__pthread_cond_broadcast):
5288         Set __futex to 2 * __total_seq.  Pass __futex value from before the
5289         unlock and __futex address instead of address of low 32-bits of
5290         __wakeup_seq to futex_requeue macro, adjust for new return value
5291         meaning.
5292         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
5293         (__pthread_cond_signal): Increment __futex at the same time as
5294         __wakeup_seq or __total_seq.  Pass address of __futex instead of
5295         address of low 32-bits of __wakeup_seq to futex syscall.
5296         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
5297         (__pthread_cond_wait): Likewise.  Pass __futex value from before
5298         releasing internal lock to FUTEX_WAIT.
5299         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
5300         (__pthread_cond_timedwait): Likewise.
5301         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
5302         (FUTEX_CMP_REQUEUE): Define.
5303         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
5304         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
5305         Pass __futex value from before the unlock and __futex address instead
5306         of address of low 32-bits of __wakeup_seq to futex syscall.
5307         Fallback to FUTEX_WAKE all on any errors.
5309 2004-06-03  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5311         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_mutex_lock):
5312         Add nop to align the end of critical section.
5313         (lll_mutex_cond_lock, lll_mutex_timedlock): Likewise.
5315 2004-06-01  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5317         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
5318         Add __broadcast_seq field.
5319         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Mark
5320         all waiters as woken with woken_seq and bump broadcast counter.
5321         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use new
5322         __broadcast_seq.  Increment __woken_seq correctly when cleanuped.
5323         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
5324         Comment typo fixes.  Avoid returning -ETIMEDOUT.
5326 2004-06-01  Ulrich Drepper  <drepper@redhat.com>
5328         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5329         (__condvar_tw_cleanup): Fix access to saved broadcast_seq value.
5330         Reported by Kaz Kojima.
5332 2004-05-25  Jakub Jelinek  <jakub@redhat.com>
5334         * sysdeps/unix/sysv/linux/aio_misc.h: New file.
5336 2004-05-21  Jakub Jelinek  <jakub@redhat.com>
5338         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Compare
5339         __broadcast_seq with bc_seq after acquiring internal lock instead of
5340         before it.
5342 2004-05-18  Jakub Jelinek  <jakub@redhat.com>
5344         * Makefile (.NOTPARALLEL): Only serialize make check/xcheck, not
5345         compilation.
5346         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5347         (__pthread_cond_timedwait): Avoid returning -ETIMEDOUT.
5348         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
5349         (pthread_cond_t): Add __data.__broadcast_seq field.
5350         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
5351         (FRAME_SIZE): Define.
5352         (__pthread_cond_timedwait): Use it.  Store/check broadcast_seq.
5353         Comment typo fixes.
5354         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S (FRAME_SIZE):
5355         Define.
5356         (__pthread_cond_wait): Use it.  Store/check broadcast_seq.  Comment
5357         typo fixes.
5358         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
5359         (__pthread_cond_broadcast): Increment broadcast_seq.  Comment typo
5360         fixes.
5362 2004-05-18  Ulrich Drepper  <drepper@redhat.com>
5364         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add broadcast_seq entry.
5365         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
5366         Add __broadcast_seq field.
5367         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5368         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5369         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5370         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
5371         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5372         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Mark
5373         all waiters as woken with woken_seq and bump broadcast counter.
5374         * sysdeps/pthread/pthread_cond_broadcast.c: Likewise.
5375         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use new
5376         __broadcast_seq field.
5377         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5378         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
5379         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
5380         * pthread_cond_init.c: Initialize __broadcast_seq field.
5381         * Makefile (tests): Add tst-cond17 and tst-cond18.
5382         Add .NOTPARALLEL goal.
5383         * tst-cond16.c: New file.  From Jakub.
5384         * tst-cond17.c: New file.  From Jakub.
5385         * tst-cond18.c: New file.  From Jakub.
5387 2004-05-16  Ulrich Drepper  <drepper@redhat.com>
5389         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Correct some
5390         unwind info.
5392         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
5393         Parametrize frame size.  Correct some unwind info.
5394         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5396 2004-05-04  Jakub Jelinek  <jakub@redhat.com>
5398         * tst-stack3.c: Note testing functionality beyond POSIX.
5400 2004-05-04  Jakub Jelinek  <jakub@redhat.com>
5402         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (USE___THREAD):
5403         Change conditional from ifdef to if.
5405 2004-04-23  Jakub Jelinek  <jakub@redhat.com>
5407         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SYSDEP_CANCEL_ERRNO,
5408         SYSDEP_CANCEL_ERROR): Define.
5409         (PSEUDO): Use it.
5411 2004-05-01  Jakub Jelinek  <jakub@redhat.com>
5413         * Versions (libpthread): Remove __pthread_cleanup_upto@@GLIBC_PRIVATE.
5415 2004-04-20  Jakub Jelinek  <jakub@redhat.com>
5417         * sem_unlink.c (sem_unlink): Change EPERM into EACCES.
5419 2004-04-19  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5421         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Add frame info.
5422         Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
5423         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Remove unneeded frame
5424         info.  Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
5426 2004-04-19  Ulrich Drepper  <drepper@redhat.com>
5428         * sysdeps/unix/sysv/linux/timer_routines.c: Make sure helper
5429         thread has all signals blocked.
5431 2004-04-18  Andreas Jaeger  <aj@suse.de>
5433         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h
5434         (SEM_VALUE_MAX): Add missing brace.
5436 2004-04-17  Jakub Jelinek  <jakub@redhat.com>
5438         * sysdeps/pthread/Makefile (tests): Add tst-mqueue8x
5439         in rt subdir.
5440         (CFLAGS-tst-mqueue8x.c): Add -fexceptions.
5441         * sysdeps/pthread/tst-mqueue8x.c: New test.
5442         * tst-cancel4.c: Update comment about message queues.
5444         * sysdeps/pthread/timer_gettime.c (timer_gettime): For expired timer
5445         return it_value { 0, 0 }.
5446         * sysdeps/pthread/timer_create.c (timer_create): Handle SIGEV_NONE
5447         like SIGEV_SIGNAL.
5448         * sysdeps/pthread/timer_routines.c (thread_expire_timer): Remove
5449         assertion for SIGEV_NONE.
5450         (thread_attr_compare): Compare all attributes, not just a partial
5451         subset.
5453 2004-04-17  Jakub Jelinek  <jakub@redhat.com>
5455         * sysdeps/unix/sysv/linux/mq_notify.c: Include stdlib.h.
5457 2004-04-17  Ulrich Drepper  <drepper@redhat.com>
5459         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h (SEM_VALUE_MAX):
5460         Just use a plain number.
5461         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
5462         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
5463         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
5464         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
5465         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
5466         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
5467         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
5469 2004-04-16  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5471         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Remove unneeded
5472         frame info.
5473         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
5475 2004-04-15  Jakub Jelinek  <jakub@redhat.com>
5477         * sysdeps/unix/sysv/linux/timer_routines.c: Include errno.h.
5478         (timer_helper_thread): Use inline rt_sigtimedwait syscall instead
5479         of calling sigwaitinfo.
5481 2004-04-16  Ulrich Drepper  <drepper@redhat.com>
5483         * allocatestack.c (allocate_stack): Set reported_guardsize
5484         unconditionally.
5485         * pthread_getattr_np.c (pthread_getattr_np): Use
5486         reported_guardsize instead of guardsize.
5487         * descr.h (struct pthread): Add reported_guardsize field.
5489 2004-04-13  Jakub Jelinek  <jakub@redhat.com>
5491         * sysdeps/unix/sysv/linux/mq_notify.c: Shut up GCC warning.
5493 2004-04-12  Ulrich Drepper  <drepper@redhat.com>
5495         * sysdeps/unix/sysv/linux/mq-notify.c: New file.
5497 2004-04-08  Jakub Jelinek  <jakub@redhat.com>
5499         * sysdeps/unix/sysv/linux/bits/local_lim.h (MQ_PRIO_MAX): Define.
5500         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h (MQ_PRIO_MAX): Define.
5501         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h (MQ_PRIO_MAX): Define.
5502         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h (MQ_PRIO_MAX): Define.
5503         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
5504         Define.
5505         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
5506         (_POSIX_MESSAGE_PASSING): Define.
5507         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h
5508         (_POSIX_MESSAGE_PASSING): Define.
5509         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h
5510         (_POSIX_MESSAGE_PASSING): Define.
5512 2004-04-04  Ulrich Drepper  <drepper@redhat.com>
5514         * tst-context1.c (fct): Check whether correct stack is used.
5516 2004-04-03  Ulrich Drepper  <drepper@redhat.com>
5518         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Never use
5519         matching constraints for asm mem parameters.
5521         * tst-clock2.c (tf): Don't define unless needed.
5523 2004-03-30  H.J. Lu  <hongjiu.lu@intel.com>
5525         * Makefile (link-libc-static): Use $(static-gnulib) instead of
5526         $(gnulib).
5528 2004-03-30  Ulrich Drepper  <drepper@redhat.com>
5530         * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_deallocate_tsd.
5531         * init.c (pthread_functions): Add ptr__nptl_deallocate_tsd.
5532         * pthreadP.h: Declare __nptl_deallocate_tsd.
5533         * pthread_create.c (deallocate_tsd): Remove to __nptl_deallocate_tsd.
5534         Adjust caller.
5536         * Makefile (tests): Add tst-tsd5.
5537         * tst-tsd5.c: New file.
5539 2004-03-29  Ulrich Drepper  <drepper@redhat.com>
5541         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
5542         (__pthread_attr_setaffinity_old): Prepend GLIBC_ to version names
5543         is SHLIB_COMPAT check.
5544         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
5545         (__pthread_attr_getaffinity_old): Likewise.
5546         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
5547         (__pthread_getaffinity_old): Likewise.
5548         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
5549         (__pthread_setaffinity_old): Likewise.
5551 2004-03-26  Ulrich Drepper  <drepper@redhat.com>
5553         * allocatestack.c (_make_stacks_executable): Call
5554         _dl_make_stack_executable first.
5556 2004-03-24  Roland McGrath  <roland@redhat.com>
5558         * sysdeps/i386/pthread_spin_lock.c (pthread_spin_lock): Use "m"
5559         constraint instead of "0".
5561 2004-03-24  Ulrich Drepper  <drepper@redhat.com>
5563         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
5564         (lll_mutex_cond_trylock): Define as wrapper around __lll_cond_trylock.
5566         * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Reorganize
5567         code to avoid warning.
5569 2004-03-24  Andreas Jaeger  <aj@suse.de>
5571         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
5572         (__pthread_attr_setaffinity_old): Remove const.
5574 2004-03-23  Ulrich Drepper  <drepper@redhat.com>
5576         * sysdeps/unix/sysv/linux/smp.h: New file.
5577         * sysdeps/unix/sysv/linux/sh/smp.h: New file.
5578         * init.c: Define __is_smp.
5579         (__pthread_initialize_minimal_internal): Call is_smp_system to
5580         initialize __is_smp.
5581         * pthreadP.h: Declare __is_smp.
5582         Define MAX_ADAPTIVE_COUNT is necessary.
5583         * pthread_mutex_init.c: Add comment regarding __spins field.
5584         * pthread_mutex_lock.c: Implement adaptive mutex type.
5585         * pthread_mutex_timedlock.c: Likewise.
5586         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
5587         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
5588         Add __spins field.
5589         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
5590         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5591         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5592         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
5593         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5594         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5595         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5596         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define
5597         lll_mutex_cond_trylock.
5598         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5599         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
5600         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5601         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5602         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
5603         Define BUSY_WAIT_NOP.
5604         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5605         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5607         * tst-mutex5.c: Add support for testing adaptive mutexes.
5608         * tst-mutex7.c: Likewise.
5609         * tst-mutex5a.c: New file.
5610         * tst-mutex7a.c: New file.
5611         * Makefile (tests): Add tst-mutex5a and tst-mutex7a.
5613         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
5614         (__lll_mutex_timedlock_wait): Preserve r8 and r9 since the
5615         vgettimeofday call might destroy the content.
5617         * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use hint
5618         @pause in the loop.
5620         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
5621         No need to restrict type of ret.  Make it int.  Add comment.
5623         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
5624         Remove unnecessary setne instruction.
5626 2004-03-22  Jakub Jelinek  <jakub@redhat.com>
5628         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
5629         (__pthread_getaffinity_new): Use INT_MAX instead of UINT_MAX.
5630         * pthread_getattr_np.c (pthread_getattr_np): Double size every cycle.
5631         If realloc fails, break out of the loop.
5633 2004-03-20  Andreas Jaeger  <aj@suse.de>
5635         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
5636         (__pthread_setaffinity_old): Fix interface.
5637         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
5638         (__pthread_getaffinity_old): Likewise.
5640         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
5641         (__pthread_setaffinity_new): Remove duplicate declaration.
5643 2004-03-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5645         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Save
5646         the return value to a safe register.
5647         (CDISABLE): Set the function argument correctly.
5649 2004-03-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5651         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XCHG): Define.
5652         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
5653         Rewrite so that only one locked memory operation per round is needed.
5654         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
5655         (pthread_barrier_wait): After wakeup, release lock only when the
5656         last thread stopped using the barrier object.
5657         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
5658         (__pthread_cond_wait): Don't store mutex address if the current
5659         value is ~0l.  Add correct cleanup support and unwind info.
5660         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
5661         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
5662         (__pthread_cond_broadcast): Don't use requeue for pshared condvars.
5663         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Update comment.
5664         * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
5665         Add correct cleanup support and unwind info.
5666         * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
5667         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Add unwind
5668         information for syscall wrappers.
5670 2004-03-18  Ulrich Drepper  <drepper@redhat.com>
5672         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
5673         cpusetsize field, remove next.
5674         * sysdeps/pthread/pthread.h (pthread_getaffinity_np): Add new second
5675         parameter for size of the CPU set.
5676         (pthread_setaffinity_np): Likewise.
5677         (pthread_attr_getaffinity_np): Likewise.
5678         (pthread_attr_setaffinity_np): Likewise.
5679         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: Implement
5680         interface change, keep compatibility code.
5681         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
5682         * sysdeps/unix/sysv/linux/pthread_getaffinity.c: Likewise.
5683         * sysdeps/unix/sysv/linux/pthread_setaffinity.c: Likewise.
5684         * pthreadP.h: Remove hidden_proto for pthread_getaffinity_np.  Declare
5685         __pthread_getaffinity_np.
5686         * Versions: Add version for changed interfaces.
5687         * tst-attr3.c: Adjust test for interface change.
5688         * pthread_getattr_np.c: Query the kernel about the affinity mask with
5689         increasing buffer sizes.
5690         * pthread_attr_destroy.c: Remove unused list handling.
5691         * pthread_attr_init.c: Likewise.
5693 2004-03-17  Roland McGrath  <roland@redhat.com>
5695         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Pass missing
5696         first argument to clock_getres so we ever enable kernel timers.
5698 2004-03-15  Ulrich Weigand  <uweigand@de.ibm.com>
5700         * init.c (nptl_version): Add __attribute_used__ to nptl_version.
5702 2004-03-12  Richard Henderson  <rth@redhat.com>
5704         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Propagate
5705         oldvalue from CENABLE to CDISABLE.
5707 2004-03-12  Ulrich Drepper  <drepper@redhat.com>
5709         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define HOST_NAME_MAX.
5710         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
5711         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
5712         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
5714 2004-03-11  Richard Henderson  <rth@redhat.com>
5716         * sysdeps/alpha/tcb-offsets.sym (PID_OFFSET): New.
5717         * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: Save/restore PID.
5718         * sysdeps/unix/sysv/linux/alpha/vfork.S: New file.
5720 2004-03-11  Jakub Jelinek  <jakub@redhat.com>
5722         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Use jgnl
5723         instead of jnl instruction to jump to SYSCALL_ERROR_LABEL.
5724         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S (__vfork): Likewise.
5726 2004-03-11  Jakub Jelinek  <jakub@redhat.com>
5728         * forward.c (__pthread_cond_broadcast_2_0,
5729         __pthread_cond_destroy_2_0, __pthread_cond_init_2_0,
5730         __pthread_cond_signal_2_0, __pthread_cond_wait_2_0,
5731         __pthread_cond_timedwait_2_0): Use return 0 as defaction instead of 0.
5733 2004-03-11  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5735         * sysdeps/sh/tcb-offsets.sym: Add PID.
5736         * sysdeps/unix/sysv/linux/sh/pt-vfork.S: Properly handle PID cache.
5737         * sysdeps/unix/sysv/linux/sh/vfork.S: New file.
5739 2004-03-10  Ulrich Drepper  <drepper@redhat.com>
5741         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: No need to
5742         include <sysdep-cancel.h>, vfork is no cancellation point.
5743         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: Likewise.
5744         * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: Likewise.
5745         * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: Likewise.
5747 2004-03-10  Jakub Jelinek  <jakub@redhat.com>
5749         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Add
5750         libc_hidden_def.
5751         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
5752         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
5753         Likewise.
5754         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S (__vfork):
5755         Likewise.
5756         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
5757         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
5758         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Include tcb-offsets.h.
5759         * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Use DO_CALL instead
5760         of DO_CALL_VIA_BREAK.  Work around a gas problem.
5762         * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: Remove.
5763         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: New file.
5764         * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: New file.
5765         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: New file.
5766         * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: New file.
5767         * sysdeps/powerpc/tcb-offsets.sym: Add PID.
5769         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S (__vfork): Don't use
5770         a local register for saving old PID.  Negate PID in parent upon exit.
5772         * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: Include
5773         tcb-offsets.h.
5774         (__vfork): Negate PID if non-zero and set to INT_MIN if zero
5775         before syscall, set to the old value in the parent afterwards.
5776         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: New file.
5777         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: Include
5778         tcb-offsets.h.
5779         (__vfork): Negate PID if non-zero and set to INT_MIN if zero
5780         before syscall, set to the old value in the parent afterwards.
5781         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: New file.
5782         * sysdeps/s390/tcb-offsets.sym: Add PID.
5784         * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: Remove.
5785         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: New file.
5786         * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S: New file.
5787         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: New file.
5788         * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: New file.
5789         * sysdeps/sparc/tcb-offsets.sym: Add PID.
5791 2004-03-10  Andreas Schwab  <schwab@suse.de>
5793         * sysdeps/ia64/tcb-offsets.sym: Add PID.
5794         * sysdeps/unix/sysv/linux/ia64/vfork.S: New file.
5795         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Properly handle PID cache.
5797 2004-03-09  Jakub Jelinek  <jakub@redhat.com>
5799         * tst-cancel20.c (do_one_test): Clear in_sh_body first.
5800         * tst-cancel21.c (do_one_test): Likewise.
5801         Reported by Gordon Jin <gordon.jin@intel.com>.
5803 2004-02-09  Jakub Jelinek  <jakub@redhat.com>
5805         * sysdeps/unix/sysv/linux/i386/vfork.S (SAVE_PID): Negate PID
5806         if non-zero and set to INT_MIN if zero.
5807         * sysdeps/unix/sysv/linux/x86_64/vfork.S (SAVE_PID): Likewise.
5808         * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Include tcb-offsets.h.
5809         (SAVE_PID, RESTORE_PID): Define.
5810         (__vfork): Use it.
5811         * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: Include tcb-offsets.h.
5812         Use relative path to avoid including NPTL i386/vfork.S.
5813         (SAVE_PID, RESTORE_PID): Define.
5814         * sysdeps/unix/sysv/linux/raise.c: Include limits.h.
5815         (raise): Handle THREAD_SELF->pid INT_MIN the same as 0.
5816         * Makefile (tests): Add tst-vfork1, tst-vfork2, tst-vfork1x and
5817         tst-vfork2x.
5818         (tests-reverse): Add tst-vfork1x and tst-vfork2x.
5819         * tst-vfork1.c: New test.
5820         * tst-vfork2.c: New test.
5821         * tst-vfork1x.c: New test.
5822         * tst-vfork2x.c: New test.
5824 2004-03-08  Ulrich Drepper  <drepper@redhat.com>
5826         * sysdeps/i386/tcb-offsets.sym: Add PID.
5827         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
5828         * sysdeps/unix/sysv/linux/i386/vfork.S: New file.
5829         * sysdeps/unix/sysv/linux/x86_64/vfork.S: New file.
5831 2004-03-08  Steven Munroe  <sjmunroe@us.ibm.com>
5833         * sysdeps/unix/sysv/linux/powerpc/Versions: Remove leading tabs.
5835 2004-03-08  H.J. Lu  <hongjiu.lu@intel.com>
5837         * sysdeps/s390/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
5838         _rtld_global_ro.
5840 2004-03-07  Ulrich Drepper  <drepper@redhat.com>
5842         * sysdeps/ia64/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
5843         _rtld_global_ro.
5845         * tst-once4.c: Remove unnecessary macro definition.
5847         * tst-mutex7.c (do_test): Limit thread stack size.
5848         * tst-once2.c (do_test): Likewise.
5849         * tst-tls3.c (do_test): Likewise.
5850         * tst-tls1.c (do_test): Likewise.
5851         * tst-signal3.c (do_test): Likewise.
5852         * tst-kill6.c (do_test): Likewise.
5853         * tst-key4.c (do_test): Likewise.
5854         * tst-join4.c (do_test): Likewise.
5855         * tst-fork1.c (do_test): Likewise.
5856         * tst-context1.c (do_test): Likewise.
5857         * tst-cond2.c (do_test): Likewise.
5858         * tst-cond10.c (do_test): Likewise.
5859         * tst-clock2.c (do_test): Likewise.
5860         * tst-cancel10.c (do_test): Likewise.
5861         * tst-basic2.c (do_test): Likewise.
5862         * tst-barrier4.c (do_test): Likewise.
5864 2004-03-05  Ulrich Drepper  <drepper@redhat.com>
5866         * sysdeps/i386/tls.h: Use GLRO instead of GL where appropriate.
5868 2004-03-01  Ulrich Drepper  <drepper@redhat.com>
5870         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5871         (__pthread_cond_timedwait): Optimize wakeup test.
5872         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
5873         (__pthread_cond_wait): Likewise.
5874         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
5875         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
5876         Likewise.
5878 2004-02-29  Ulrich Drepper  <drepper@redhat.com>
5880         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
5881         (__lll_mutex_lock_wait): Optimize a bit more.  Just one copy of
5882         the atomic instruction needed.
5883         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
5884         (__lll_mutex_lock_wait): Likewise.
5886 2004-02-28  Ulrich Drepper  <drepper@redhat.com>
5888         * Makefile (tests): Add tst-cond14 and tst-cond15.
5889         * tst-cond14.c: New file.
5890         * tst-cond15.c: New file.
5892 2004-02-27  Ulrich Drepper  <drepper@redhat.com>
5894         * sysdeps/pthread/createthread.c (create_thread): Remove use of
5895         CLONE_STOPPED.  We cannot use SIGCONT which means CLONE_STOPPED
5896         needs to be implemented differently to be useful.
5898 2004-02-26  Ulrich Drepper  <drepper@redhat.com>
5900         * pthread_attr_setschedparam.c: Don't test priority against limits
5901         here.  Set ATTR_FLAG_SCHED_SET flag.
5902         * pthread_attr_setschedpolicy.c: Set ATTR_FLAG_POLICY_SET flag.
5903         * pthread_create.c (__pthread_create_2_1): Copy scheduling attributes
5904         from parent thread to child.  If attribute is used and scheduling
5905         parameters are not inherited, copy parameters from attribute or
5906         compute them.  Check priority value.
5907         * pthread_getschedparam.c: If the parameters aren't known yet get
5908         them from the kernel.
5909         * pthread_setschedparam.c: Set ATTR_FLAG_SCHED_SET and
5910         ATTR_FLAG_POLICY_SET flag for thread.
5911         * sysdeps/unix/sysv/linux/internaltypes.h: Define ATTR_FLAG_SCHED_SET
5912         and ATTR_FLAG_POLICY_SET.
5914         * sysdeps/pthread/createthread.c: Use tgkill if possible.
5916         * pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr): Don't
5917         fail if stack address hasn't been set.  Just return 0.
5919 2004-02-25  Ulrich Drepper  <drepper@redhat.com>
5921         * Makefile (tests-nolibpthread): Add tst-unload.  Don't link with
5922         libpthread for the files in this list.
5923         (CFLAGS-tst-unload): Removed.
5924         * tst-unload.c (do_test): Don't use complete path for
5925         LIBPHREAD_SO.
5927         * Makefile: Define sonames for tst-tls5mod, tst-_res1mod1, and
5928         tst-_res1mod2.
5930 2004-02-22  Ulrich Drepper  <drepper@redhat.com>
5932         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
5933         (__lll_mutex_lock_wait): Rewrite so that only one locked memory
5934         operation per round is needed.
5935         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
5936         (__lll_mutex_lock_wait): Likewise.
5938 2004-02-20  Ulrich Drepper  <drepper@redhat.com>
5940         * tst-cancel9.c (cleanup): Don't print to stderr.
5942 2004-02-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5944         * sysdeps/sh/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Fix variable name.
5946 2004-02-20  Jakub Jelinek  <jakub@redhat.com>
5948         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
5949         (__syscall_error_handler2): Call CDISABLE.
5950         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
5951         (__syscall_error_handler2): Call CDISABLE.
5953         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
5954         Release lock before the loop, don't reacquire it.
5956         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h (DL_ARGV_NOT_RELRO): Define.
5958 2004-02-19  Andreas Schwab  <schwab@suse.de>
5960         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
5961         Fix last change.
5963 2004-02-18  Ulrich Drepper  <drepper@redhat.com>
5965         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
5966         (pthread_barrier_wait): After wakeup, release lock only when the
5967         last thread stopped using the barrier object.
5968         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S
5969         (pthread_barrier_wait): Likewise.
5970         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
5971         Likewise.
5972         * Makefile (tests): Add tst-barrier4.
5973         * tst-barrier4.c: New file.
5975         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5976         (__pthread_cond_timedwait): Perform timeout test while holding
5977         internal lock to prevent wakeup race.
5978         Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
5979         * sysdeps/pthread/pthread_cond_timedwait.c
5980         (__pthread_cond_timedwait): Likewise.
5981         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
5982         (__pthread_cond_timedwait): Likewise.
5984 2004-02-18  Jakub Jelinek  <jakub@redhat.com>
5986         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S
5987         (__pthread_rwlock_unlock): Access WRITER as 32-bit value.
5988         * Makefile (tests): Add tst-rwlock13.
5989         * tst-rwlock13.c: New test.
5991 2004-02-16  Ulrich Drepper  <drepper@redhat.com>
5993         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5994         (__condvar_tw_cleanup): Little optimization.
5995         Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
5997 2004-02-16  Steven Munroe  <sjmunroe@us.ibm.com>
5999         * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: Replace libc with
6000         libpthread as "lib" parameter to SHLIB_COMPAT.
6001         (__novmx_siglongjmp): Fix typo in function name.
6002         (__novmx_longjmp): Fix typo in function name.
6004 2004-02-13  Ulrich Drepper  <drepper@redhat.com>
6006         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Add a
6007         __builtin_expect.
6009         * sysdeps/generic/pt-longjmp.c: Moved to...
6010         * sysdeps/pthread/pt-longjmp.c: ...here.  New file.
6012 2004-01-29  Steven Munroe  <sjmunroe@us.ibm.com>
6014         * Makefile (libpthread-routines): Add pt-cleanup.
6015         * pt-longjmp.c: Removed.
6016         * pt-cleanup.c: Copied __pthread_cleanup_upto to here. New file.
6017         * sysdeps/generic/pt-longjmp.c: Copied longjmp to here. New file.
6018         * sysdeps/unix/sysv/linux/powerpc/Versions: New file.
6019         Version longjmp, siglongjmp for GLIBC_2.3.4.
6020         * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: New File.
6022 2004-02-13  Ulrich Drepper  <drepper@redhat.com>
6024         * sysdeps/pthread/pthread_cond_timedwait.c
6025         (__pthread_cond_timedwait): Optimize.  Drop internal lock earlier.
6026         Reuse code.  Add __builtin_expects.
6028         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6029         (__pthread_cond_timedwait): Get internal lock in case timeout has
6030         passed before the futex syscall.
6031         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6033 2004-01-20  Ulrich Drepper  <drepper@redhat.com>
6035         * allocatestack.c: Pretty printing.
6037         * sysdeps/pthread/createthread.c (create_thread): Don't add
6038         CLONE_DETACHED bit if it is not necessary.
6040 2004-01-16  Ulrich Drepper  <drepper@redhat.com>
6042         * pthread_getattr_np.c: Include ldsodefs.h.
6044 2004-01-16  Richard Henderson  <rth@redhat.com>
6046         * allocatestack.c: Don't declare __libc_stack_end.
6047         * init.c (__pthread_initialize_minimal_internal): Likewise.
6048         * pthread_getattr_np.c (pthread_getattr_np): Likewise.
6050 2004-01-15  Richard Henderson  <rth@redhat.com>
6052         * sysdeps/alpha/tls.h (tcbhead_t): Add private.
6053         (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE,
6054         TLS_PRE_TCB_SIZE, TLS_TCB_ALIGN, INSTALL_DTV, INSTALL_NEW_DTV,
6055         GET_DTV, THREAD_DTV, THREAD_SELF, DB_THREAD_SELF): Match ia64.
6056         (TLS_TCB_OFFSET, THREAD_ID, NO_TLS_OFFSET): Remove.
6057         (THREAD_GETMEM, THREAD_GETMEM_NC): Simplify.
6058         (THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
6059         * sysdeps/unix/sysv/linux/alpha/createthread.c (TLS_VALUE): Match ia64.
6061 2004-01-14  Ulrich Drepper  <drepper@redhat.com>
6063         * init.c (pthread_functions): Make array const.
6065 2004-01-13  Ulrich Drepper  <drepper@redhat.com>
6067         * allocatestack.c (__make_stacks_executable): Change interface.
6068         Check parameters.  Pass parameter on to libc counterpart.
6069         * pthreadP.h: Change declaration.
6071 2004-01-13  Richard Henderson  <rth@redhat.com>
6073         * pthread_attr_setstack.c (__old_pthread_attr_setstack): Use
6074         prototype form.
6075         * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize):
6076         Likewise.
6078         * sysdeps/alpha/Makefile: New file.
6079         * sysdeps/alpha/tcb-offsets.sym: New file.
6080         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
6081         Use MULTIPLE_THREADS_OFFSET to implement !libpthread !libc version.
6083         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Rewrite based
6084         on powerpc version.
6086 2004-01-08  Jakub Jelinek  <jakub@redhat.com>
6088         * Makefile (tests): Add tst-backtrace1.
6089         * tst-backtrace1.c: New test.
6091 2003-12-11  Ulrich Weigand  <uweigand@de.ibm.com>
6093         * sysdeps/alpha/tls.h (DB_THREAD_SELF): Pass bit size of thread
6094         register as second parameter to the REGISTER macro.
6095         * sysdeps/ia64/tls.h (DB_THREAD_SELF): Likewise.
6096         * sysdeps/powerpc/tls.h (DB_THREAD_SELF): Likewise.
6097         * sysdeps/sh/tls.h (DB_THREAD_SELF): Likewise.
6098         * sysdeps/sparc/tls.h (DB_THREAD_SELF): Likewise.
6099         * sysdeps/s390/tls.h (DB_THREAD_SELF): Pass __WORDSIZE as bit size
6100         of thread register as second parameter to REGISTER macro in 64 case.
6102 2004-01-03  Ulrich Drepper  <drepper@redhat.com>
6104         * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Removed.
6105         (CFLAGS-getpid.o): Defined.
6106         (CFLAGS-getpid.os): Defined.
6108 2003-12-31  Ulrich Drepper  <drepper@redhat.com>
6110         * pthread_getattr_np.c (pthread_getattr_np): Make sure stack info
6111         returned for main thread does not overlap with any other VMA.
6112         Patch by Jakub Jelinek.
6114 2003-12-29  Jakub Jelinek  <jakub@redhat.com>
6116         * tst-raise1.c: Include stdio.h.
6118 2003-12-23  Jakub Jelinek  <jakub@redhat.com>
6120         * sysdeps/unix/sysv/linux/raise.c (raise): Protect pid = selftid
6121         setting with __ASSUME_TGKILL || defined __NR_tgkill.
6122         If pid is 0, set it to selftid.
6123         * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Make inline.
6124         Don't set self->pid but self->tid.  If self->pid == 0 and self->tid
6125         != 0, return self->tid without doing a syscall.
6126         * descr.h (struct pthread): Move pid field after tid.
6128         * Makefile (tests): Add tst-raise1.
6129         * tst-raise1.c: New file.
6131 2003-12-23  Roland McGrath  <roland@redhat.com>
6133         * tst-oddstacklimit.c: New file.
6134         * Makefile (tests): Add it.
6135         (tst-oddstacklimit-ENV): New variable.
6137         * init.c (__pthread_initialize_minimal_internal): Round stack rlimit
6138         value up to page size for __default_stacksize.
6140 2003-12-21  Ulrich Drepper  <drepper@redhat.com>
6142         * Makefile (tests): Add tst-eintr5.
6143         * tst-eintr5.c: New file.
6145         * eintr.c (eintr_source): Prevent sending signal to self.
6147         * tst-eintr2.c (tf1): Improve error message.
6149 2003-12-20  Ulrich Drepper  <drepper@redhat.com>
6151         * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Define.
6152         * sysdeps/unix/sysv/linux/getpid.c: New file.
6153         * pthread_cancel.c: Add comment explaining use of PID field.
6154         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
6155         * pthread_getattr_np.c: Use abs() when comparing PID and TID fields.
6156         * sysdeps/unix/sysv/linux/fork.c: Negate PID field of parent
6157         temporarily to signal the field must not be relied on and updated
6158         by getpid().
6159         * sysdeps/unix/sysv/linux/pt-raise.c: Handle case where PID is
6160         temporarily negative.
6161         * sysdeps/unix/sysv/linux/raise.c: Likewise.
6163 2003-12-19  Ulrich Drepper  <drepper@redhat.com>
6165         * eintr.c (setup_eintr): Add new parameter.  Pass to thread function.
6166         (eintr_source): If ARG != NULL, use pthread_kill.
6167         * tst-eintr1.c: Adjust for this change.
6168         * tst-eintr2.c: Likewise.
6169         * Makefile (tests): Add tst-eintr3 and tst-eintr4.
6170         * tst-eintr3.c: New file.
6171         * tst-eintr4.c: New file.
6173 2003-12-19  Jakub Jelinek  <jakub@redhat.com>
6175         * libc-cancellation.c (__libc_enable_asynccancel): Don't cancel
6176         if CANCELSTATE_BITMASK is set.
6177         * sysdeps/pthread/librt-cancellation.c (__librt_enable_asynccancel):
6178         Likewise.
6180         * Makefile (tests): Add tst-cancel22 and tst-cancel23.
6181         (tests-reverse): Add tst-cancel23.
6182         * tst-cancel22.c: New test.
6183         * tst-cancel23.c: New test.
6185 2003-12-18  Ulrich Drepper  <drepper@redhat.com>
6187         * tst-eintr1.c: Better error messages.
6189         * Makefile (tests): Add tst-eintr2.
6190         * tst-eintr2.c: New file.
6192 2003-12-18  Jakub Jelinek  <jakub@redhat.com>
6194         * Makefile (tests): Add tst-cancel21 and tst-cancelx21.
6195         (CFLAGS-tst-cancelx21.c): Set.
6196         * tst-cancel21.c: New test.
6197         * tst-cancelx21.c: New test.
6199         * unwind.c (FRAME_LEFT): Add adj argument.  Subtract it from each
6200         comparison operand.
6201         (unwind_stop): Use _JMPBUF_CFA_UNWINDS_ADJ macro instead of
6202         _JMPBUF_CFA_UNWINDS.  Adjust FRAME_LEFT invocations.
6203         * pt-longjmp.c: Include jmpbuf-unwind.h.
6204         (__pthread_cleanup_upto): Use _JMPBUF_UNWINDS_ADJ macro instead of
6205         _JMPBUF_UNWINDS.  Adjust compared pointers.
6206         * init.c (__pthread_initialize_minimal_internal): Initialize
6207         pd->stackblock_size.
6208         * sysdeps/pthread/jmpbuf-unwind.h: Removed.
6209         * sysdeps/alpha/jmpbuf-unwind.h: New file.
6210         * sysdeps/i386/jmpbuf-unwind.h: New file.
6211         * sysdeps/powerpc/jmpbuf-unwind.h: New file.
6212         * sysdeps/s390/jmpbuf-unwind.h: New file.
6213         * sysdeps/sh/jmpbuf-unwind.h: New file.
6214         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: New file.
6215         * sysdeps/x86_64/jmpbuf-unwind.h: New file.
6216         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Include stdint.h.
6217         (_JMPBUF_CFA_UNWINDS): Remove.
6218         (_JMPBUF_CFA_UNWINDS_ADJ, _JMPBUF_UNWINDS_ADJ): Define.
6220 2003-12-12  Jakub Jelinek  <jakub@redhat.com>
6222         * Makefile (tests): Add tst-cancel20 and tst-cancelx20.
6223         (CFLAGS-tst-cancelx20.c): Set.
6224         * tst-cancel20.c: New test.
6225         * tst-cancelx20.c: New test.
6227 2003-12-17  Ulrich Drepper  <drepper@redhat.com>
6229         * init.c (__pthread_initialize_minimal_internal): Don't treat
6230         architectures with separate register stack special here when
6231         computing default stack size.
6233 2003-12-17  Roland McGrath  <roland@redhat.com>
6235         * Makefile (tst-cancelx7-ARGS): New variable.
6236         Reportd by Greg Schafer <gschafer@zip.com.au>.
6238 2003-12-17  Jakub Jelinek  <jakub@redhat.com>
6240         * Makefile (tests): Add tst-stack3.  Depend on $(objpfx)tst-stack3-mem.
6241         (generated): Add tst-stack3.mtrace and tst-stack3-mem.
6242         (tst-stack3-ENV): Set.
6243         ($(objpfx)tst-stack3-mem): New.
6244         * tst-stack3.c: New test.
6246 2003-12-10  David Mosberger  <davidm@hpl.hp.com>
6248         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init_EPILOG_BEGINS):
6249         Add unwind directives.  Drop unused .regstk directive.
6250         (_fini_EPILOG_BEGINS): Add unwind directives.
6252 2003-12-11  Ulrich Drepper  <drepper@redhat.com>
6254         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
6255         Assume parameter is a pointer.
6256         (lll_futex_wake): Likewise.
6257         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_wait):
6258         Likewise.
6259         (lll_futex_wake): Likewise.
6260         Reported by Boris Hu.
6261         * sysdeps/unix/sysv/linux/unregister-atfork.c
6262         (__unregister_atfork): Pass pointer to refcntr to lll_futex_wait.
6264         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Simplify a bit.
6266 2003-12-10  Ulrich Drepper  <drepper@redhat.com>
6268         * sysdeps/pthread/bits/libc-lock.h (__rtld_lock_initialize): Define.
6269         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Call
6270         __rtld_lock_initialize for ld.so lock.
6271         Patch in part by Adam Li <adam.li@intel.com>.
6273 2003-12-02  David Mosberger  <davidm@hpl.hp.com>
6275         * Makefile (link-libc-static): Remove -lgcc_eh---it's already mentioned
6276         in $(gnulib).  Also, remove stale comment.
6278 2003-11-12  David Mosberger  <davidm@hpl.hp.com>
6280         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Take
6281         advantage of new syscall stub and optimize accordingly.
6283         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__NR_futex): Rename
6284         from SYS_futex, to match expectations of
6285         sysdep.h:DO_INLINE_SYSCALL.
6286         (lll_futex_clobbers): Remove.
6287         (lll_futex_timed_wait): Rewrite in terms of DO_INLINE_SYSCALL.
6288         (lll_futex_wake): Likewise.
6289         (lll_futex_requeue): Likewise.
6290         (__lll_mutex_trylock): Rewrite to a macro, so we can include this
6291         file before DO_INLINE_SYSCALL is defined (proposed by Jakub
6292         Jelinek).
6293         (__lll_mutex_lock): Likewise.
6294         (__lll_mutex_cond_lock): Likewise.
6295         (__lll_mutex_timed_lock): Likewise.
6296         (__lll_mutex_unlock): Likewise.
6297         (__lll_mutex_unlock_force): Likewise.
6299         * sysdeps/ia64/tls.h: Move declaration of __thread_self up so it
6300         comes before the include of <sysdep.h>.
6301         (THREAD_SELF_SYSINFO): New macro.
6302         (THREAD_SYSINFO): Likewise.
6303         (INIT_SYSINFO): New macro.
6304         (TLS_INIT_TP): Call INIT_SYSINFO.
6306         * sysdeps/ia64/tcb-offsets.sym: Add SYSINFO_OFFSET.
6308         * sysdeps/pthread/createthread.c (create_thread): Use
6309         THREAD_SELF_SYSINFO and THREAD_SYSINFO instead of open code.
6310         * allocatestack.c (allocate_stack): Use THREAD_SYSINFO and
6311         THREAD_SELF_SYSINFO instead of open code.
6312         * sysdeps/i386/tls.h (THREAD_SELF_SYSINFO): New macro.
6313         (THREAD_SYSINFO): Likewise.
6315         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: New file.
6317         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Work around gas problem.
6319 2003-12-06  Ulrich Drepper  <drepper@redhat.com>
6321         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Use .init_array
6322         instead of .init.  Patch by David Mosberger.
6324 2003-11-30  Thorsten Kukuk  <kukuk@suse.de>
6326         * sysdeps/pthread/configure.in: Remove broken declaration in C
6327         cleanup handling check.
6329 2003-11-30  Andreas Jaeger  <aj@suse.de>
6331         * Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time).
6332         * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
6333         Likewise.
6335 2003-11-27  Jakub Jelinek  <jakub@redhat.com>
6337         * sysdeps/unix/sysv/linux/internaltypes.h (ATTR_FLAG_OLDATTR): Define.
6338         * pthread_attr_destroy.c: Include shlib-compat.h.
6339         (__pthread_attr_destroy): Return immediately if ATTR_FLAG_OLDATTR
6340         is set in iattr->flags.
6341         * pthread_attr_init.c (__pthread_attr_init_2_0): Set ATTR_FLAG_OLDATTR.
6343 2003-11-21  Jakub Jelinek  <jakub@redhat.com>
6345         * Makefile (distribute): Add tst-cleanup4aux.c.
6347         * tst-cond12.c (prepare): Add prototype.  Move after test-skeleton.c
6348         include.
6350 2003-11-21  Ulrich Drepper  <drepper@redhat.com>
6352         * tst-cond12.c (do_test): If USE_COND_SIGNAL is defined, use
6353         pthread_cond_signal.
6355         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Don't
6356         store mutex address if the current value is ~0l.
6357         * sysdeps/pthread/pthread_cond_timedwait.c
6358         (__pthread_cond_timedwait): Likewise.
6359         * sysdeps/pthread/pthread_cond_broadcast.c
6360         (__pthread_cond_broadcast): Don't use requeue for pshared
6361         condvars.
6363         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
6364         (__pthread_cond_wait): Don't store mutex address if the current
6365         value is ~0l.
6366         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
6367         (__pthread_cond_timedwait): Likewise.
6368         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
6369         (__pthread_cond_broadcast): Don't use requeue for pshared
6370         condvars.
6372         * pthread_cond_init.c (__pthread_cond_init): Initialize __mutex
6373         element with ~0l for pshared condvars, with NULL otherwise.
6375         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
6376         (__pthread_cond_wait): Don't store mutex address if the current
6377         value is ~0l.
6378         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6379         (__pthread_cond_timedwait): Likewise.
6380         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
6381         (__pthread_cond_broadcast): Don't use requeue for pshared
6382         condvars.
6384         * Makefile: Add rules to build and run tst-cond12 and tst-cond13.
6385         * tst-cond12.c: New file.
6386         * tst-cond13.c: New file.
6388 2003-11-17  Ulrich Drepper  <drepper@redhat.com>
6390         * sysdeps/pthread/configure.in: Make missing forced unwind support
6391         fatal.
6393 2003-11-11  Ulrich Drepper  <drepper@redhat.com>
6395         * pthreadP.h: Don't declare __pthread_unwind as weak inside libpthread.
6397 2003-11-06  Ulrich Drepper  <drepper@redhat.com>
6399         * Makefile: Add magic to clean up correctly.
6401 2003-11-05  Jakub Jelinek  <jakub@redhat.com>
6403         * unwind.c (FRAME_LEFT): Define.
6404         (unwind_stop): Handle old style cleanups here.
6405         (__pthread_unwind): Handle old style cleanups only if
6406         !HAVE_FORCED_UNWIND.
6407         * Makefile (tests): Add tst-cleanup4 and tst-cleanupx4.
6408         (CFLAGS-tst-cleanupx4.c): Add -fexceptions.
6409         ($(objpfx)tst-cleanup4): Depend on $(objpfx)tst-cleanup4aux.o.
6410         ($(objpfx)tst-cleanupx4): Likewise.
6411         * tst-cleanup4.c: New test.
6412         * tst-cleanup4aux.c: New.
6413         * tst-cleanupx4.c: New test.
6415 2003-11-04  Ulrich Drepper  <drepper@redhat.com>
6417         * sysdeps/pthread/bits/stdio-lock.h: Use lll_*lock instead of
6418         lll_mutex_*lock macros to skip atomic operations on some archs.
6420 2003-11-03  Ulrich Drepper  <drepper@redhat.com>
6422         * sysdeps/pthread/tst-timer.c (main): Initialize
6423         sigev2.sigev_value as well.
6425 2003-10-15  Roland McGrath  <roland@redhat.com>
6427         * sysdeps/pthread/configure.in: Barf if visibility attribute support
6428         is missing.
6429         * sysdeps/pthread/configure: Regenerated.
6431 2003-10-09  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6433         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Completely revamp the
6434         locking macros.  No distinction between normal and mutex locking
6435         anymore.
6436         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Rewrite mutex locking.
6437         Merge bits from lowlevelmutex.S we still need.
6438         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Remove.
6439         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
6440         * sysdeps/unix/sysv/linux/sh/not-cancel.h: New file.
6441         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Adjust for
6442         new mutex implementation.
6443         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Likewise.
6444         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
6445         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
6446         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
6447         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
6448         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
6449         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
6450         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
6451         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
6452         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO): Also defined
6453         symbol for entry point to avoid cancellation.
6455 2003-10-07  Jakub Jelinek  <jakub@redhat.com>
6457         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Backout 2003-10-02
6458         changes.
6459         (SAVE_OLDTYPE_0): Fix a typo.
6461 2003-10-03  Ulrich Drepper  <drepper@redhat.com>
6463         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
6464         Check __sigsetjmp return value.  Reported by Daniel Jacobowitz.
6466 2003-10-02  Ulrich Drepper  <drepper@redhat.com>
6468         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (DOCARGS_1): Use
6469         correct offset.
6471 2003-10-02  Jakub Jelinek  <jakub@redhat.com>
6473         * Makefile (tests): Add tst-cancel19.
6474         * tst-cancel19.c: New test.
6476 2003-10-02  Ulrich Drepper  <drepper@redhat.com>
6478         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix saving and
6479         restoring of the old cancellation type.
6481 2003-09-30  Jakub Jelinek  <jakub@redhat.com>
6483         * sysdeps/pthread/malloc-machine.h: Remove misleading comment.
6485 2003-09-27  Wolfram Gloger  <wg@malloc.de>
6487         * sysdeps/pthread/malloc-machine.h: New file
6489 2003-09-24  Roland McGrath  <roland@redhat.com>
6491         * allocatestack.c (__make_stacks_executable): Don't ignore return
6492         value from _dl_make_stack_executable.
6494 2003-09-24  Ulrich Drepper  <drepper@redhat.com>
6496         * allocatestack.c (__make_stacks_executable): Also change
6497         permission of the currently unused stacks.
6499         * allocatestack.c (change_stack_perm): Split out from
6500         __make_stacks_executable.
6501         (allocate_stack): If the required permission changed between the time
6502         we started preparing the stack and queueing it, change the permission.
6503         (__make_stacks_executable): Call change_stack_perm.
6505         * Makefile: Build tst-execstack-mod locally.
6506         * tst-execstack-mod.c: New file.
6508 2003-09-23  Jakub Jelinek  <jakub@redhat.com>
6510         * Makefile (tests): Only add tst-execstack if have-z-execstack is yes.
6512 2003-09-23  Roland McGrath  <roland@redhat.com>
6514         * tst-execstack.c: New file.
6515         * Makefile (tests): Add it.
6516         ($(objpfx)tst-execstack, $(objpfx)tst-execstack.out): New targets.
6517         (LDFLAGS-tst-execstack): New variable.
6519         * allocatestack.c (allocate_stack): Use GL(dl_stack_flags) to decide
6520         whether to use PROT_EXEC for stack mmap.
6521         (__make_stacks_executable): New function.
6522         * pthreadP.h: Declare it.
6523         * init.c (__pthread_initialize_minimal_internal): Set
6524         GL(dl_make_stack_executable_hook) to that.
6526 2003-09-22  Ulrich Drepper  <drepper@redhat.com>
6528         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Adjust for latest
6529         recommendation from AMD re avoidance of lock prefix.
6531 2003-09-22  Jakub Jelinek  <jakub@redhat.com>
6533         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait): Use
6534         lll_futex_timed_wait instead of lll_futex_wait.
6535         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Removed.
6536         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Removed.
6537         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: Removed.
6538         * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: Removed.
6539         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Removed.
6540         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Removed.
6541         * sysdeps/unix/sysv/linux/s390/sem_post.c: Removed.
6542         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Removed.
6543         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Include atomic.h.
6544         Completely revamp the locking macros.  No distinction between
6545         normal and mutex locking anymore.
6546         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
6547         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock_wait,
6548         __lll_lock_timedwait): Fix prototypes.
6549         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_lock_wait,
6550         __lll_lock_timedwait): Likewise.
6551         (lll_mutex_lock, lll_mutex_cond_lock): Use _val instead of _bool
6552         macros, add __builtin_expect.
6553         (lll_mutex_timedlock): Likewise.  Fix return value.
6554         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Removed.
6555         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: Removed.
6556         * sysdeps/unix/sysv/linux/i386/i586/lowlevelmutex.S: Removed.
6557         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: Removed.
6558         * sysdeps/unix/sysv/linux/i386/i686/lowlevelmutex.S: Removed.
6559         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: Removed.
6560         * sysdeps/unix/sysv/linux/lowlevelmutex.c: Removed.
6561         * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: Removed.
6563 2003-09-22  Ulrich Drepper  <drepper@redhat.com>
6565         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
6566         (__lll_mutex_lock_wait): Minor optimization to avoid one atomic
6567         operation if possible.
6569         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Don't play tricks
6570         like jumping over the lock prefix.
6572 2003-09-21  Ulrich Drepper  <drepper@redhat.com>
6574         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Completely revamp the
6575         locking macros.  No distinction between normal and mutex locking
6576         anymore.
6577         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
6578         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
6579         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
6580         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Rewrite mutex
6581         locking.  Merge bits from lowlevelmutex.S we still need.
6582         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
6583         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
6584         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Removed.
6585         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Removed.
6586         * Makefile (routines): Remove libc-lowlevelmutex.
6587         (libpthread-rountines): Remove lowlevelmutex.
6588         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Adjust
6589         for new mutex implementation.
6590         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
6591         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6592         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6593         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
6594         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
6595         Likewise.
6596         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
6597         Likewise.
6598         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
6599         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
6600         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise
6601         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
6602         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6603         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6604         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
6605         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
6606         Likewise.
6607         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
6608         Likewise.
6609         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
6610         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
6611         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
6612         Don't use requeue.
6613         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
6614         * sysdeps/pthread/pthread_cond_signal.c: Don't use requeue.
6616 2003-09-20  Ulrich Drepper  <drepper@redhat.com>
6618         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't match memory
6619         in parameters of asm with output parameters.
6621         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Change
6622         type of DECR parameter to int.
6623         * pthreadP.h: Adjust prototype of __pthread_mutex_unlock_usercnt.
6625 2003-09-18  Jakub Jelinek  <jakub@redhat.com>
6627         * tst-attr3.c (tf, do_test): Print stack start/end/size and
6628         guardsize for each thread.
6630 2003-09-17  Jakub Jelinek  <jakub@redhat.com>
6632         * sysdeps/pthread/pthread.h (pthread_getattr_np): Clarify usage.
6633         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
6634         (pthread_attr_setaffinity_np): Handle cpuset == NULL.
6636         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
6637         (pthread_attr_getaffinity_np): Don't segfault if iattr->cpuset is
6638         NULL.
6639         * pthread_getattr_np.c: Set cpuset using pthread_getaffinity_np.
6640         * pthreadP.h (pthread_getaffinity_np): Add hidden_proto.
6641         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
6642         (pthread_getaffinity_np): Add hidden_def.
6644         * Makefile (tests): Add tst-attr3.
6645         * tst-attr3.c: New test.
6647         * sysdeps/i386/Makefile (CFLAGS-tst-align.c): Remove.
6649 2003-09-15  Jakub Jelinek  <jakub@redhat.com>
6651         * sysdeps/i386/Makefile (CFLAGS-pthread_create.c,
6652         CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
6654 2003-09-17  Jakub Jelinek  <jakub@redhat.com>
6656         * Makefile (CFLAGS-tst-align.c): Add $(stack-align-test-flags).
6657         * tst-align.c: Include tst-stack-align.h.
6658         (tf, do_test): Use TEST_STACK_ALIGN macro.
6660 2003-09-17  Ulrich Drepper  <drepper@redhat.com>
6662         * pthread_attr_init.c (__pthread_attr_init_2_0): Remove unused
6663         variable.
6665 2003-09-16  Ulrich Drepper  <drepper@redhat.com>
6667         * pthread_getattr_np.c (pthread_getattr_np): Correctly fill in the
6668         stack-related values for the initial thread.
6670 2003-09-15  Jakub Jelinek  <jakub@redhat.com>
6672         * Makefile (CFLAGS-pthread_once.c): Add $(uses-callbacks).
6674 2003-09-11  Ulrich Drepper  <drepper@redhat.com>
6676         * pthread_mutex_lock.c: Minor code rearrangements.
6678 2003-09-05  Roland McGrath  <roland@redhat.com>
6680         * pthread_create.c (__pthread_pthread_sizeof_descr): Removed.
6681         Instead, include ../nptl_db/db_info.c to do its magic.
6682         * pthread_key_create.c (__pthread_pthread_keys_max): Removed.
6683         (__pthread_pthread_key_2ndlevel_size): Likewise.
6684         * sysdeps/alpha/tls.h (DB_THREAD_SELF): New macro.
6685         * sysdeps/i386/tls.h (DB_THREAD_SELF): New macro.
6686         * sysdeps/ia64/tls.h (DB_THREAD_SELF): New macro.
6687         * sysdeps/powerpc/tls.h (DB_THREAD_SELF): New macro.
6688         * sysdeps/s390/tls.h (DB_THREAD_SELF): New macro.
6689         * sysdeps/sh/tls.h (DB_THREAD_SELF): New macro.
6690         * sysdeps/sparc/tls.h (DB_THREAD_SELF): New macro.
6691         * sysdeps/x86_64/tls.h (DB_THREAD_SELF): New macro.
6692         * sysdeps/alpha/td_ta_map_lwp2thr.c: File removed.
6693         * sysdeps/generic/td_ta_map_lwp2thr.c: File removed.
6694         * sysdeps/i386/td_ta_map_lwp2thr.c: File removed.
6695         * sysdeps/ia64/td_ta_map_lwp2thr.c: File removed.
6696         * sysdeps/powerpc/td_ta_map_lwp2thr.c: File removed.
6697         * sysdeps/s390/td_ta_map_lwp2thr.c: File removed.
6698         * sysdeps/sh/td_ta_map_lwp2thr.c: File removed.
6699         * sysdeps/sparc/td_ta_map_lwp2thr.c: File removed.
6700         * sysdeps/x86_64/td_ta_map_lwp2thr.c: File removed.
6702 2003-09-08  Ulrich Drepper  <drepper@redhat.com>
6704         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Change type
6705         of pthread_t to be compatible with LT.
6706         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
6707         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6708         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6709         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6710         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
6711         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6712         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
6714 2003-09-04  Ulrich Drepper  <drepper@redhat.com>
6716         * sysdeps/unix/sysv/linux/i386/not-cancel.h (fcntl_not_cancel): Define.
6718 2003-09-04  Jakub Jelinek  <jakub@redhat.com>
6720         * unwind-forcedunwind.c: Move to...
6721         * sysdeps/pthread/unwind-forcedunwind.c: ...here.
6722         (pthread_cancel_init): Use ARCH_CANCEL_INIT if defined.
6723         * sysdeps/pthread/jmpbuf-unwind.h: New file.
6724         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: New file.
6725         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: New file.
6726         * unwind.c: Include jmpbuf-unwind.h.
6727         (unwind_stop): Use _JMPBUF_CFA_UNWINDS macro.
6729 2003-09-02  Jakub Jelinek  <jakub@redhat.com>
6731         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: New file.
6732         * sysdeps/unix/sysv/linux/ia64/Versions (libpthread): Export
6733         pthread_attr_setstack and pthread_attr_setstacksize @@GLIBC_2.3.3.
6734         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: New file.
6735         * sysdeps/unix/sysv/linux/alpha/Versions: New file.
6736         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: New file.
6737         * sysdeps/unix/sysv/linux/sparc/Versions: New file.
6738         * pthread_attr_setstack.c (__old_pthread_attr_setstack): New function.
6739         (pthread_attr_setstack): If PTHREAD_STACK_MIN != 16384, export
6740         as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.2.
6741         * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize): New
6742         function.
6743         (pthread_attr_setstacksize): If PTHREAD_STACK_MIN != 16384, export
6744         as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.1.
6745         * Makefile (tests): Add tst-stack2.
6746         * tst-stack2.c: New test.
6747         * tst-stack1.c: Include limits.h and sys/param.h.
6748         (do_test): Set size to MAX (4 * getpagesize (), PTHREAD_STACK_MIN).
6750         * pthread_condattr_setpshared.c: Include errno.h.
6751         (pthread_condattr_setpshared): Return EINVAL if pshared
6752         is neither PTHREAD_PROCESS_PRIVATE nor PTHREAD_PROCESS_SHARED.
6754         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Also
6755         defined symbol for entry point to avoid cancellation.
6756         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
6757         Likewise.
6758         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
6759         Likewise.
6760         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
6761         Likewise.
6762         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h (PSEUDO):
6763         Likewise.
6764         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
6765         Likewise.
6766         * sysdeps/unix/sysv/linux/i386/not-cancel.h (__open_nocancel,
6767         __close_nocancel, __read_nocancel, __write_nocancel,
6768         __waitpid_nocancel): Add attribute_hidden.  If not in libc.so,
6769         libpthread.so or librt.so, define to corresponding function
6770         without _nocancel suffix.
6771         * sysdeps/unix/sysv/linux/s390/not-cancel.h: New file.
6772         * sysdeps/unix/sysv/linux/powerpc/not-cancel.h: New file.
6773         * sysdeps/unix/sysv/linux/sparc/not-cancel.h: New file.
6775         * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: Fix a typo.
6777 2003-09-02  Ulrich Drepper  <drepper@redhat.com>
6779         * sysdeps/unix/sysv/linux/i386/not-cancel.h: New file.
6780         * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: New file.
6782         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Make sure the code
6783         in subsections has a symbol associated with it.
6785         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Also
6786         defined symbol for entry point to avoid cancellation.
6787         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Likewise.
6789 2003-09-01  Jakub Jelinek  <jakub@redhat.com>
6791         * Makefile (tests): Add tst-tls5.
6792         (module-names): Add tst-tls5mod{,a,b,c,d,e,f}.
6793         ($(objpfx)tst-tls5mod{,a,b,c,d,e,f}.so-no-z-defs): Set to yes.
6794         ($(objpfx)tst-tls5): New.
6795         ($(objpfx)tst-tls6.out): Likewise.
6796         (tests): Depend on $(objpfx)tst-tls6.out.
6797         * tst-tls3.c: Include stdint.h and pthreaddef.h.
6798         (do_test): Check pthread_self () return value alignment.
6799         * tst-tls3mod.c: Include stdint.h and pthreaddef.h.
6800         (tf): Check pthread_self () return value alignment.
6801         * tst-tls5.c: New test.
6802         * tst-tls5.h: New.
6803         * tst-tls5mod.c: New.
6804         * tst-tls5moda.c: New.
6805         * tst-tls5modb.c: New.
6806         * tst-tls5modc.c: New.
6807         * tst-tls5modd.c: New.
6808         * tst-tls5mode.c: New.
6809         * tst-tls5modf.c: New.
6810         * tst-tls6.sh: New test.
6812         * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Add
6813         ptr___pthread_cond_timedwait and ptr___pthread_cond_timedwait_2_0.
6814         * init.c (pthread_functions): Initialize them.
6815         * forward.c (pthread_cond_timedwait@GLIBC_2.0,
6816         pthread_cond_timedwait@@GLIBC_2.3.2): New forwards.
6817         * Versions (libc): Export pthread_cond_timedwait@GLIBC_2.0,
6818         pthread_cond_timedwait@@GLIBC_2.3.2.
6820 2003-09-01  Jakub Jelinek  <jakub@redhat.com>
6822         * sysdeps/unix/sysv/linux/alpha/timer_create.c: New file.
6823         * sysdeps/unix/sysv/linux/alpha/timer_delete.c: New file.
6824         * sysdeps/unix/sysv/linux/alpha/timer_getoverr.c: New file.
6825         * sysdeps/unix/sysv/linux/alpha/timer_gettime.c: New file.
6826         * sysdeps/unix/sysv/linux/alpha/timer_settime.c: New file.
6827         * sysdeps/unix/sysv/linux/alpha/Versions: New file.
6829         * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
6831         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Define
6832         _POSIX_THREAD_PRIORITY_SCHEDULING.
6833         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
6835 2003-08-31  Ulrich Drepper  <drepper@redhat.com>
6837         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock): Avoid
6838         nested function, use static inline function from libio.h.
6839         Code by Richard Henderson.
6841         * sysdeps/pthread/bits/libc-lock.h: Mark pthread_setcancelstate as
6842         weak.
6844 2003-08-30  Jakub Jelinek  <jakub@redhat.com>
6846         * sysdeps/unix/sysv/linux/sparc/sparc64/Versions: New file.
6847         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_create.c: New file.
6848         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_delete.c: New file.
6849         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_getoverr.c: New file.
6850         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_gettime.c: New file.
6851         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_settime.c: New file.
6852         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
6853         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
6854         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: New file.
6855         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: New file.
6856         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: New file.
6857         * sysdeps/unix/sysv/linux/sparc/pthread_once.c: New file.
6858         * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: New file.
6859         * sysdeps/unix/sysv/linux/sparc/fork.c: New file.
6860         * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
6861         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: New file.
6862         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: New file.
6863         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: New file.
6864         * sysdeps/sparc/sparc32/pthread_spin_lock.c: New file.
6865         * sysdeps/sparc/sparc32/pthread_spin_trylock.c: New file.
6866         * sysdeps/sparc/sparc32/pthreaddef.h: New file.
6867         * sysdeps/sparc/sparc64/pthread_spin_lock.c: New file.
6868         * sysdeps/sparc/sparc64/pthread_spin_trylock.c: New file.
6869         * sysdeps/sparc/sparc64/pthread_spin_unlock.c: New file.
6870         * sysdeps/sparc/sparc64/pthreaddef.h: New file.
6871         * sysdeps/sparc/tls.h: New file.
6872         * sysdeps/sparc/tcb-offsets.sym: New file.
6873         * sysdeps/sparc/Makefile: New file.
6874         * sysdeps/sparc/td_ta_map_lwp2thr.c: New file.
6875         * init.c [__sparc__] (__NR_set_tid_address): Define.
6877 2003-08-29  Jakub Jelinek  <jakub@redhat.com>
6879         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock,
6880         _IO_release_lock): Define.
6882 2003-08-29  Jakub Jelinek  <jakuB@redhat.com>
6884         * tst-cancel4.c (tf_sigwait, tf_sigwaitinfo, tf_sigtimedwait): Add
6885         sigemptyset before sigaddset.  Reported by jreiser@BitWagon.com.
6887 2003-08-27  Ulrich Drepper  <drepper@redhat.com>
6889         * sysdeps/pthread/pthread.h (pthread_exit): Remove __THROW.
6890         (__pthread_cleanup_class): Add missing return types of member
6891         functions.
6893 2003-08-26  Steven Munroe <sjmunroe@us.ibm.com>
6895         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
6896         (lll_mutex_unlock_force): Add memory barrier between store and futex
6897         syscall.
6899 2003-08-25  Ulrich Drepper  <drepper@redhat.com>
6901         * tst-cancel4.c (do_test): Also unlink tempfname and remove
6902         tempmsg in first loop.
6904 2003-08-18  Ulrich Drepper  <drepper@redhat.com>
6906         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
6907         _POSIX_THREAD_PRIORITY_SCHEDULING.
6908         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
6910 2003-08-07  Jakub Jelinek  <jakub@redhat.com>
6912         * sysdeps/pthread/bits/libc-lock.h [_LIBC && SHARED]
6913         (__rtld_lock_default_lock_recursive,
6914         __rtld_lock_default_unlock_recursive): Define.
6915         [_LIBC && SHARED] (__rtld_lock_lock_recursive,
6916         __rtld_lock_unlock_recursive): Define using
6917         GL(_dl_rtld_*lock_recursive).
6918         * init.c (__pthread_initialize_minimal_internal): Initialize
6919         _dl_rtld_lock_recursive and _dl_rtld_unlock_recursive.
6920         Lock GL(_dl_load_lock) the same number of times as
6921         GL(_dl_load_lock) using non-mt implementation was nested.
6923         * pthreadP.h (__pthread_cleanup_upto): Add hidden_proto.
6924         * pt-longjmp.c (__pthread_cleanup_upto): Add hidden_def.
6926 2003-08-06  Jakub Jelinek  <jakub@redhat.com>
6928         * tst-cancel17.c (do_test): Make len2 maximum of page size and
6929         PIPE_BUF.
6931 2003-08-07  Jakub Jelinek  <jakub@redhat.com>
6933         * pthread_create.c (__pthread_create_2_0): Clear new_attr.cpuset.
6935 2003-08-03  Jakub Jelinek  <jakub@redhat.com>
6937         * sysdeps/pthread/createthread.c (do_clone): Move error handling
6938         to first syscall error check.  Move syscall error check for tkill
6939         into __ASSUME_CLONE_STOPPED #ifdef.
6941 2003-08-02  Ulrich Drepper  <drepper@redhat.com>
6943         * sysdeps/pthread/createthread.c (do_clone): If __ASSUME_CLONE_STOPPED
6944         is not defined, do explicit synchronization.
6945         (create_thread): Do not lock pd->lock here.  If __ASSUME_CLONE_STOPPED
6946         is not defined also unlock pd->lock for non-debugging case in case
6947         it is necessary.
6948         * pthread_create.c (start_thread): Always get and release pd->lock
6949         if __ASSUME_CLONE_STOPPED is not defined.
6950         (start_thread_debug): Removed.  Adjust users.
6951         * allocatestack.c (allocate_stack): Always initialize lock if
6952         __ASSUME_CLONE_STOPPED is not defined.
6953         * Makefile (tests): Add tst-sched1.
6954         * tst-sched1.c: New file.
6956         * sysdeps/pthread/createthread.c (do_clone): Only use
6957         sched_setschduler and pass correct parameters.
6959 2003-07-31  Jakub Jelinek  <jakub@redhat.com>
6961         * sysdeps/pthread/pthread.h (pthread_attr_setstackaddr,
6962         pthread_attr_setstacksize): Change PTHREAD_STACK_SIZE to
6963         PTHREAD_STACK_MIN in comments.
6965 2003-07-31  Jakub Jelinek  <jakub@redhat.com>
6967         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
6968         Shut up warnings if INTERNAL_SYSCALL_ERROR_P does not use its first
6969         argument.
6970         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Likewise.
6971         * pthread_condattr_setclock.c (pthread_condattr_setclock): Likewise.
6972         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Include pthreaddef.h.
6973         (__pthread_cleanup_upto): Fix prototype.
6974         (_longjmp_unwind): Adjust caller.
6975         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_timedlock):
6976         Change second argument to const struct pointer.
6977         * tst-sem8.c (main): Remove unused s2 and s3 variables.
6978         * tst-sem9.c (main): Likewise.
6979         * unwind.c: Include string.h for strlen prototype.
6981 2003-07-31  Ulrich Drepper  <drepper@redhat.com>
6983         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6984         (__pthread_cond_timedwait): Don't use cmov unless HAVE_CMOV is defined.
6985         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S:
6986         Define HAVE_CMOV.
6987         Patch by Nicholas Miell <nmiell@attbi.com>.
6989 2003-07-30  Jakub Jelinek  <jakub@redhat.com>
6991         * init.c (__pthread_initialize_minimal_internal): Initialize
6992         GL(dl_init_static_tls).
6993         * pthreadP.h (__pthread_init_static_tls): New prototype.
6994         * allocatestack.c (init_one_static_tls, __pthread_init_static_tls):
6995         New functions.
6996         * Makefile (tests): Add tst-tls4.
6997         (modules-names): Add tst-tls4moda and tst-tls4modb.
6998         ($(objpfx)tst-tls4): Link against libdl and libpthread.
6999         ($(objpfx)tst-tls4.out): Depend on tst-tls4moda.so and
7000         tst-tls4modb.so.
7001         * tst-tls4.c: New file.
7002         * tst-tls4moda.c: New file.
7003         * tst-tls4modb.c: New file.
7005 2003-06-19  Daniel Jacobowitz  <drow@mvista.com>
7007         * sysdeps/pthread/timer_create.c (timer_create): Call timer_delref
7008         before __timer_dealloc.
7009         * sysdeps/pthread/timer_routines.c (__timer_thread_find_matching):
7010         Don't call list_unlink.
7012 2003-07-29  Roland McGrath  <roland@redhat.com>
7014         * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
7016 2003-07-25  Jakub Jelinek  <jakub@redhat.com>
7018         * tst-cancel17.c (do_test): Check if aio_cancel failed.
7019         Don't reuse struct aiocb A if it failed.
7020         Write fpathconf (fds[1], _PC_PIPE_BUF) + 2 bytes using aio_write,
7021         not just one byte, as that does not block.
7023 2003-07-22  Jakub Jelinek  <jakub@redhat.com>
7025         * sysdeps/pthread/unwind-resume.c: New file.
7026         * sysdeps/pthread/Makefile (routines, shared-only-routines): Add
7027         unwind-resume in csu subdir.
7028         (CFLAGS-unwind-resume.c, CFLAGS-rt-unwind-resume.c): Compile with
7029         exceptions.
7030         (librt-sysdep_routines, librt-shared-only-routines): Add
7031         rt-unwind-resume.
7032         * sysdeps/pthread/rt-unwind-resume.c: New file.
7033         * unwind-forcedunwind.c: New file.
7034         * Makefile (libpthread-routines): Add unwind-forcedunwind.
7035         (libpthread-shared-only-routines): Likewise.
7036         (CFLAGS-unwind-forcedunwind.c): Compile with exceptions.
7037         * pthreadP.h (pthread_cancel_init): New prototype.
7038         * pthread_cancel.c (pthread_cancel): Call pthread_cancel_init.
7040         * sysdeps/pthread/createthread.c (do_thread, create_thread): Make
7041         attr argument const struct pthread_attr *.
7043         * res.c (__res_state): Return __resp.
7044         * descr.h: Include resolv.h.
7045         (struct pthread): Add res field.
7046         * pthread_create.c: Include resolv.h.
7047         (start_thread): Initialize __resp.
7048         * Makefile (tests): Add tst-_res1.
7049         (module-names): Add tst-_res1mod1, tst-_res1mod2.
7050         ($(objpfx)tst-_res1mod2.so): Depend on $(objpfx)tst-_res1mod1.so.
7051         ($(objpfx)tst-_res1): Depend on $(objpfx)tst-_res1mod2.so and
7052         libpthread.
7053         * tst-_res1.c: New file.
7054         * tst-_res1mod1.c: New file.
7055         * tst-_res1mod2.c: New file.
7057 2003-07-21  Ulrich Drepper  <drepper@redhat.com>
7059         * sysdeps/pthread/createthread.c: Don't define CLONE_STOPPED.
7061         * Makefile: Define various *-no-z-defs variables for test DSOs
7062         which has undefined symbols.
7064 2003-07-21  Steven Munroe  <sjmunroe@us.ibm.com>
7066         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
7067         Retry if the stwcx fails to store once_control.
7069 2003-07-20  Ulrich Drepper  <drepper@redhat.com>
7071         * Makefile (libpthread-routines): Add pthread_attr_getaffinity and
7072         pthread_attr_setaffinity.
7073         * Versions [libpthread] (GLIBC_2.3.3): Likewise.
7074         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: New file.
7075         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: New file.
7076         * pthread_attr_destroy.c: Free cpuset element if allocated.
7077         * pthread_create.c: Pass iattr as additional parameter to
7078         create_thread.
7079         * sysdeps/pthread/createthread.c: If attribute is provided and
7080         a new thread is created with affinity set or scheduling parameters,
7081         start thread with CLONE_STOPPED.
7082         * sysdeps/pthread/pthread.h: Declare pthread_attr_getaffinity and
7083         pthread_attr_setaffinity.
7084         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
7085         cpuset element.
7087 2003-07-15  Ulrich Drepper  <drepper@redhat.com>
7089         * tst-tcancel-wrappers.sh: lseek and llseek are not cancelation points.
7091 2003-07-14  Ulrich Drepper  <drepper@redhat.com>
7093         * sysdeps/pthread/configure.in: Require CFI directives also for
7094         ppc and s390.
7096 2003-07-15  Jakub Jelinek  <jakub@redhat.com>
7098         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
7099         Add cfi directives.
7101 2003-07-12  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
7103         * sysdeps/sh/tcb-offsets.sym: Add RESULT, TID, CANCELHANDLING and
7104         CLEANUP_JMP_BUF.
7105         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use more
7106         registers as variables.  Call __pthread_mutex_unlock_usercnt.
7107         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7108         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Store TID
7109         not self pointer in __writer.  Compare with TID to determine
7110         deadlocks.
7111         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7112         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
7113         Likewise.
7114         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
7115         Likewise.
7116         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add cancellation support.
7117         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
7118         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Define all the nice
7119         macros also when compiling librt.
7121 2003-07-11  Jakub Jelinek  <jakub@redhat.com>
7123         * Makefile (CFLAGS-pthread_once.c): Add -fexceptions
7124         -fasynchronous-unwind-tables.
7125         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
7126         (PSEUDO): Add cfi directives.
7127         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO):
7128         Likewise.
7129         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
7130         Likewise.
7132 2003-07-08  Jakub Jelinek  <jakub@redhat.com>
7134         * pthreadP.h (__pthread_unwind_next, __pthread_register_cancel,
7135         __pthread_unregister_cancel): Add prototypes and hidden_proto.
7136         * unwind.c (__pthread_unwind_next): Add hidden_def.
7137         * cleanup.c (__pthread_register_cancel, __pthread_unregister_cancel):
7138         Likewise.
7139         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
7140         Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
7141         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
7142         Likewise.
7143         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
7144         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
7145         Likewise.
7146         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once): Use
7147         HIDDEN_JUMPTARGET to call __pthread_register_cancel,
7148         __pthread_unregister_cancel and __pthread_unwind_next.
7150 2003-07-04  Jakub Jelinek  <jakub@redhat.com>
7152         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Use
7153         different symbol for the cancellation syscall wrapper and
7154         non-cancellation syscall wrapper.
7155         (PSEUDO_END): Define.
7157 2003-07-05  Richard Henderson  <rth@redhat.com>
7159         * sysdeps/alpha/elf/pt-initfini.c: Avoid .ent/.end.
7160         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_wait,
7161         lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
7162         return actual return value from the syscall, not 0.
7164 2003-07-07  Ulrich Drepper  <drepper@redhat.com>
7166         * descr.h (struct pthread): Add pid field.
7167         * allocatestack.c (allocate_stack): Initialize pid field in descriptor.
7168         (__reclaim_stacks): Likewise.
7169         * init.c (sigcancel_handler): If __ASSUME_CORRECT_SI_PID is defined
7170         also check for PID of the signal source.
7171         (__pthread_initialize_minimal_internal): Also initialize pid field
7172         of initial thread's descriptor.
7173         * pthread_cancel.c: Use tgkill instead of tkill if possible.
7174         * sysdeps/unix/sysv/linux/fork.c: Likewise.
7175         * sysdeps/unix/sysv/linux/pt-raise.c: Likewise.
7176         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
7177         * sysdeps/unix/sysv/linux/raise.c: Likewise.
7179 2003-07-05  Ulrich Drepper  <drepper@redhat.com>
7181         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_push): Renamed.
7182         Fix use of parameter.
7183         (__libc_cleanup_pop): Likewise.
7185 2003-07-04  Ulrich Drepper  <drepper@redhat.com>
7187         * init.c (sigcancel_handler): Change parameters to match handler
7188         for SA_SIGACTION.  Check signal number and code to recognize
7189         invalid invocations.
7191 2003-07-03  Roland McGrath  <roland@redhat.com>
7193         * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr):
7194         Apply sizeof (struct pthread) bias to r13 value.
7196 2003-07-03  Ulrich Drepper  <drepper@redhat.com>
7198         * sysdeps/pthread/configure.in: Require CFI directives.
7200         * sysdeps/pthread/librt-cancellation.c (__pthread_unwind): Remove
7201         definition.
7202         * pthreadP.h (__pthread_unwind): Add hidden_proto if used in
7203         libpthread compilation.
7204         * unwind.c (__pthread_unwind): Add hidden_def.
7205         * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_unwind.
7207 2003-07-01  Ulrich Drepper  <drepper@redhat.com>
7209         * libc-cancellation.c (__libc_cleanup_routine): Define.
7210         * sysdeps/pthread/bits/libc-lock.h (__pthread_cleanup_push): Define.
7211         (__pthread_cleanup_pop): Define.
7213 2003-07-01  Richard Henderson  <rth@redhat.com>
7215         * sysdeps/alpha/elf/pt-initfini.c: New file.
7216         * sysdeps/alpha/pthread_spin_lock.S: New file.
7217         * sysdeps/alpha/pthread_spin_trylock.S: New file.
7218         * sysdeps/alpha/pthreaddef.h: New file.
7219         * sysdeps/alpha/td_ta_map_lwp2thr.c: New file.
7220         * sysdeps/alpha/tls.h: New file.
7221         * sysdeps/unix/sysv/linux/alpha/Makefile: New file.
7222         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: New file.
7223         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: New file.
7224         * sysdeps/unix/sysv/linux/alpha/createthread.c: New file.
7225         * sysdeps/unix/sysv/linux/alpha/fork.c: New file.
7226         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: New file.
7227         * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: New file.
7228         * sysdeps/unix/sysv/linux/alpha/pthread_once.c: New file.
7229         * sysdeps/unix/sysv/linux/alpha/sem_post.c: New file.
7230         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
7232 2003-07-01  Ulrich Drepper  <drepper@redhat.com>
7234         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Add correct
7235         cleanup support and unwind info.
7237 2003-06-30  Ulrich Drepper  <drepper@redhat.com>
7239         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
7240         Use correct cleanup handler registration.  Add unwind info.
7241         * sysdeps/unix/sysv/linux/unwindbuf.sym: New file.
7242         * sysdeps/unix/sysv/linux/Makefile: Add rule to build unwindbuf.h.
7243         * tst-once3.c: Add cleanup handler and check it is called.
7244         * tst-once4.c: Likewise.
7245         * tst-oncex3.c: New file.
7246         * tst-oncex4.c: New file.
7247         * Makefile: Add rules to build and run tst-oncex3 and tst-oncex4.
7249 2003-06-29  Ulrich Drepper  <drepper@redhat.com>
7251         * sysdeps/pthread/configure.in: Check for C cleanup handling in gcc.
7253 2003-06-27  Ulrich Drepper  <drepper@redhat.com>
7255         * tst-cancel4.c (tf_msgrcv): Use IPC_PRIVATE in msgget call.
7256         (tf_msgsnd): Likewise.
7258         * tst-cancel4.c (tf_msgrcv): Strengthen test against valid
7259         premature returns a bit more.
7261 2003-06-26  Ulrich Drepper  <drepper@redhat.com>
7263         * sysdeps/pthread/librt-cancellation.c: Move __pthread_unwind
7264         definition to the front.
7266         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rename
7267         the cleanup functions to make the names unique.  Fix dwarf opcode
7268         un unwind table.
7269         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Rename cleanup
7270         functions to make the names unique.  Fix CFA offset for two blocks.
7272 2003-06-25  Ulrich Drepper  <drepper@redhat.com>
7274         * sysdeps/pthread/pthread.h (class __pthread_cleanup_class): Add
7275         missing closing braces.
7276         Patch by Christophe Saout <christophe@saout.de>.
7278 2003-06-24  Roland McGrath  <roland@redhat.com>
7280         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Typo fix.
7282 2003-06-24  Ulrich Drepper  <drepper@redhat.com>
7284         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: New file.
7285         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: New file.
7287         * pthreadP.h: Declare __find_thread_by_id.
7288         * allocatestack.c [HP_TIMING_AVAIL]: Define __find_thread_by_id.
7289         * pthread_clock_gettime.c: Allow using other thread's clock.
7290         * pthread_clock_settime.c: Likewise.
7291         * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
7292         * Makefile: Add rules to build and run tst-clock2.
7293         * tst-clock2.c: New file.
7295 2003-06-23  Ulrich Drepper  <drepper@redhat.com>
7297         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rewrite
7298         to use exception-based cleanup handler.
7299         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7301         * tst-cond8.c (ch): Announce that we are done.
7303         * pthreadP.h (__pthread_mutex_cond_lock): Mark with internal_function.
7305         * tst-cancel17.c (tf): Retry aio_suspend in case of EINTR.
7306         Also test aio_suspend with timeout value.
7308 2003-06-22  Ulrich Drepper  <drepper@redhat.com>
7310         * pthreadP.h: Mark __pthread_mutex_unlock_usercnt also hidden.
7311         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Add
7312         attribute_hidden.
7314         * pthreadP.h (__pthread_mutex_init_internal): Mark hidden.
7315         (__pthread_mutex_lock_internal): Likewise.
7316         (__pthread_mutex_unlock_internal): Likewise.
7317         (__pthread_mutex_unlock_usercnt): Declare.
7318         * pthread_mutex_destroy.c: Always fail if used in any way.
7319         * pthread_mutex_init.c: Update comment.
7320         * pthread_mutex_lock.c: If NO_INCR is not defined adjust __nusers.
7321         * pthread_mutex_timedlock.c: Adjust __nusers.
7322         * pthread_mutex_trylock.c: Adjust __nusers.
7323         * pthread_mutex_unlock.c: Old code is in __pthread_mutex_unlock_usercnt
7324         and public interfaces are wrapper with pass additional parameter.
7325         __pthread_mutex_unlock_usercnt does not adjust __nusers if second
7326         parameter zero.
7327         * tst-mutex8.c: New file.
7328         * Makefile (tests): Add tst-mutex8.
7329         * sysdeps/pthread/pthread_cond_timedwait.c: Call
7330         __pthread_mutex_unlock_usercnt.
7331         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
7332         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7333         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7334         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7335         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7336         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Define NO_INCR.
7337         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
7338         Add __nusers.
7339         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7340         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7341         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7342         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
7343         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
7345         * pthread_mutex_lock.c: Don't store THREAD_ID in __owner, use TID.
7346         * pthread_mutex_timedlock.c: Likewise.
7347         * pthread_mutex_trylock.c: Adjust __nusers.
7348         * pthread_mutex_unlock.c: Compare with TID not THREAD_ID.
7349         * tst-mutex9.c: New file.
7350         * Makefile (tests): Add tst-mutex9.
7351         * sysdeps/i386/tls.h: Remove THREAD_ID definition.
7352         * sysdeps/ia64/tls.h: Likewise.
7353         * sysdeps/powerpc/tls.h: Likewise.
7354         * sysdeps/s390/tls.h: Likewise.
7355         * sysdeps/sh/tls.h: Likewise.
7356         * sysdeps/x86_64/tls.h: Likewise.
7357         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
7358         Change type of __owner.
7359         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7360         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7361         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7362         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
7363         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
7365 2003-06-19  Jakub Jelinek  <jakub@redhat.com>
7367         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Move to...
7368         * sysdeps/unix/sysv/linux/sem_post.c: ...here.
7370         * sysdeps/unix/sysv/linux/sem_post.c: Move to...
7371         * sysdeps/unix/sysv/linux/powerpc/sem_post.c: ... here.  Pass nr + 1
7372         instead of nr to lll_futex_wake.  Only set errno and return -1
7373         if err < 0.
7375         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_wait,
7376         lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
7377         return actual return value from the syscall, not 0.
7379 2003-06-18  Ulrich Drepper  <drepper@redhat.com>
7381         * tst-cancel4.c (tf_msgsnd): Don't always use 100 as the type,
7382         find a random value.
7383         (tf_msgrcv): Likewise.  Also don't report msgrcv returns if
7384         errno==EIDRM.
7386         * sysdeps/unix/sysv/linux/timer_settime.c: Add prototype for
7387         compat_timer_settime.
7388         * sysdeps/unix/sysv/linux/timer_gettime.c: Add prototype for
7389         compat_timer_gettime.
7390         * sysdeps/unix/sysv/linux/timer_getoverr.c: Add prototype for
7391         compat_timer_getoverrun.
7392         * sysdeps/unix/sysv/linux/timer_delete.c: Add prototype for
7393         compat_timer_delete.
7395         * pthread_mutex_destroy.c (__pthread_mutex_destroy): For
7396         error-checking mutex detect busy mutexes.
7398 2003-06-17  Ulrich Drepper  <drepper@redhat.com>
7400         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_mutex_lock):
7401         Add ax to clobber list.
7402         (lll_mutex_cond_lock): Likewise.
7403         (lll_mutex_unlock): Likewise.
7404         (lll_lock): Likewise.
7405         (lll_unlock): Likewise.
7407         * Makefile: Add rules to build and run tst-cancel18 and tst-cancelx18.
7408         * tst-cancel18.c: New file.
7409         * tst-cancelx18.c: New file.
7411         * tst-cancel4.c: Test connect, creat, msgrcv, msgsnd, sendmsg, sendto,
7412         and tcdrain.
7414         * Makefile: Add rules to build and run tst-cancel17 and tst-cancel17x.
7415         * tst-cancel17.c: New file.
7416         * tst-cancelx17.c: New file.
7418         * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
7419         * sysdeps/unix/sysv/linux/sigwait.c: New file.
7420         * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
7422         * tst-cancel4.c: Test open, close, pread, pwrite, fsync, and msync.
7424 2003-06-16  Jakub Jelinek  <jakub@redhat.com>
7426         * sysdeps/pthread/createthread.c (create_thread): Set
7427         header.multiple_threads unconditionally.
7428         * allocatestack.c (allocate_stack): Likewise.
7429         * descr.h (struct pthread): Add header.multiple_threads
7430         unconditionally.
7431         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (CENABLE, CDISABLE):
7432         Define for librt.  #error if neither libpthread, libc nor librt.
7433         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (CENABLE, CDISABLE):
7434         Likewise.
7435         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (CENABLE,
7436         CDISABLE): Likewise.
7437         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (CENABLE,
7438         CDISABLE): Likewise.
7439         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (CENABLE,
7440         CDISABLE): Likewise.
7441         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (CENABLE,
7442         CDISABLE): Likewise.  Access header.multiple_threads outside of
7443         libc and libpthread.
7444         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (CENABLE, CDISABLE):
7445         Likewise.
7446         * sysdeps/x86_64/tls.h (tcbhead_t): Add multiple_threads.
7447         * sysdeps/x86_64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define.
7449 2003-06-17  Ulrich Drepper  <drepper@redhat.com>
7451         * tst-cancel4.c: Add tests for the socket and signal functions, pause.
7452         Also test early cancellation before the thread reaches the cancellation
7453         point.
7455         * Makefile: Compile forward.c with exceptions.
7457         * sysdeps/unix/sysv/linux/sleep.c: New file.
7459 2003-06-16  Ulrich Drepper  <drepper@redhat.com>
7461         * Makefile: Add CFLAGS definition to compile function wrappers
7462         duplicated from libc with exceptions.
7463         * tst-cancel4.c: Also check cancellation handlers.
7465         * Makefile: Add rules to build and run tst-cancel16 and
7466         tst-cancelx16.  Add missing CFLAGS definitions.
7467         * tst-cancel16.c: New file.
7468         * tst-cancelx16.c: New file.
7470 2003-06-15  Ulrich Drepper  <drepper@redhat.com>
7472         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
7473         (DL_SYSINFO_IMPLEMENTATION): Use CFI opcodes.
7474         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
7475         (DL_SYSINFO_IMPLEMENTATION): Likewise.
7477         * pthreadP.h (LIBC_CANCEL_ASYNC): Also define for librt.
7478         (LIBC_CANCEL_RESET): Likewise.
7479         Declare __librt_enable_asynccancel and __librt_disable_asynccancel.
7480         * sysdeps/pthread/Makefile (librt-sysdep_routines): Add
7481         librt-cancellation.
7482         (CFLAGS-libcrt-cancellation.c): Define.
7483         * sysdeps/pthread/librt-cancellation.c: New file.
7484         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define all the nice
7485         macros also when compiling librt.
7486         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
7487         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
7488         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
7489         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
7490         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
7491         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
7492         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
7494         * sysdeps/unix/sysv/linux/timer_create.c: Add prototype for
7495         compat_timer_create.
7497 2003-06-14  Ulrich Drepper  <drepper@redhat.com>
7499         * sysdeps/pthread/posix-timer.h (timespec_compare): Always inline.
7501         * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
7502         __register_atfork.
7503         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
7504         Add libc_hidden_def.
7506 2003-06-13  Roland McGrath  <roland@redhat.com>
7508         * sysdeps/x86_64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Pass FS
7509         constant from <sys/reg.h> to ps_get_thread_area, not register contents.
7511 2003-06-11  Ulrich Drepper  <drepper@redhat.com>
7513         * allocatestack.c (queue_stack): Always inline.
7514         * ptreadhP.h (__do_cancel): Likewise.
7516 2003-06-10  Jakub Jelinek  <jakub@redhat.com>
7518         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait): Fix
7519         a typo.
7521 2003-06-10  Ulrich Drepper  <drepper@redhat.com>
7523         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
7524         (__pthread_cond_signal): Remove incorrect second addition for
7525         cond_lock!=0.
7527 2003-06-09  Ulrich Drepper  <drepper@redhat.com>
7529         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
7530         (__pthread_cond_signal): Use correct futex pointer in
7531         __lll_mutex_lock_wait call.
7533         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
7534         (__pthread_cond_signal): Some more tweaks to handle cond_lock!=0.
7536 2003-06-08  Ulrich Drepper  <drepper@redhat.com>
7538         * sysdeps/unix/sysv/linux/s390/sem_wait.c (__new_sem_wait): Make
7539         cancelable.
7540         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
7541         Likewise.
7543         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Remove
7544         hand-written CFI generation code.  Since ENTRY/END also initiated
7545         CFI frames this caused two CFI sets to be generated.
7547 2003-06-07  Ulrich Drepper  <drepper@redhat.com>
7549         * cleanup_routine.c: New file.
7550         * Versions (libpthread) [GLIBC_2.3.3]: Add __pthread_cleanup_routine.
7551         * sysdeps/pthread/pthread.h: Add support for fully exception-based
7552         cleanup handling.
7553         * Makefile (libpthread-routines): Add cleanup_routine.
7554         Add more CFLAGS variables to compile with exceptions.  Add comments
7555         why which file needs unwind tables.
7556         (tests) [have-forced-unwind==yes]: Add tst-cancelx* and tst-cleanupx*
7557         tests.
7558         * tst-cancelx1.c: New file.
7559         * tst-cancelx2.c: New file.
7560         * tst-cancelx3.c: New file.
7561         * tst-cancelx4.c: New file.
7562         * tst-cancelx5.c: New file.
7563         * tst-cancelx6.c: New file.
7564         * tst-cancelx7.c: New file.
7565         * tst-cancelx8.c: New file.
7566         * tst-cancelx9.c: New file.
7567         * tst-cancelx10.c: New file.
7568         * tst-cancelx11.c: New file.
7569         * tst-cancelx12.c: New file.
7570         * tst-cancelx13.c: New file.
7571         * tst-cancelx14.c: New file.
7572         * tst-cancelx15.c: New file.
7573         * tst-cleanupx0.c: New file.
7574         * tst-cleanupx0.expect: New file.
7575         * tst-cleanupx1.c: New file.
7576         * tst-cleanupx2.c: New file.
7577         * tst-cleanupx3.c: New file.
7579         * tst-cleanup0.c: Make standard compliant.
7580         * tst-cleanup1.c: Likewise.
7582         * sysdeps/unix/sysv/linux/sem_timedwait.c: Add cancellation support.
7583         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
7584         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
7585         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
7586         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
7587         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
7588         * sysdeps/i386/tcb-offsets.sym: Add RESULT, CANCELHANDLING, and
7589         CLEANUP_JMP_BUF.
7590         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
7591         * tst-cancel12.c: New file.
7592         * tst-cancel13.c: New file.
7593         * tst-cancel14.c: New file.
7594         * tst-cancel15.c: New file.
7595         * Makefile (tests): Add tst-cancel12, tst-cancel13, tst-cancel14,
7596         and tst-cancel15.
7598         * tst-cancel1.c: Add some comments.
7600         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Compute relative
7601         timeout correctly.
7603 2003-06-06  Ulrich Drepper  <drepper@redhat.com>
7605         * Makefile (CFLAGS-pthread_cancel.c): Define.
7607 2003-06-05  Ulrich Drepper  <drepper@redhat.com>
7609         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_rwlock_t):
7610         Change type of __writer element to int.
7611         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7612         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7613         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7614         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7615         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
7616         * sysdeps/i386/tcb-offsets.sym: Replace SELF entry with TID entry.
7617         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
7618         * pthread_rwlock_trywrlock.c: Store TID not self pointer in __writer.
7619         Compare with TID to determine deadlocks.
7620         * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
7621         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
7622         * sysdeps/pthread/pthread_rwlock_timedwrlock.: Likewise.
7623         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
7624         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
7625         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
7626         Likewise.
7627         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
7628         Likewise.
7629         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
7630         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
7631         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
7632         Likewise.
7633         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
7634         Likewise.
7635         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
7636         * Makefile (tests): Add tst-rwlock12.
7637         * tst-rwlock12.c: New file.
7639 2003-06-05  Jakub Jelinek  <jakub@redhat.com>
7641         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait,
7642         __lll_timedlock_wait, lll_unlock_wake_cb, __lll_timedwait_tid):
7643         Remove bogus hidden_proto.
7644         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
7645         Likewise.
7646         * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_lock,
7647         lll_unlock_wake_cb, ___lll_timedwait_tid): Likewise.
7648         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (___lll_mutex_lock,
7649         ___lll_mutex_timedlock): Likewise.
7651 2003-06-04  Ulrich Drepper  <drepper@redhat.com>
7653         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
7654         (__pthread_cond_signal): Add some code to eventually handle
7655         cond_lock!=0.
7657 2003-06-01  Ulrich Drepper  <drepper@redhat.com>
7659         * Makefile (tests): Add tst-exec4.
7660         (tst-exec4-ARGS): Define.
7661         * tst-exec4.c: New file.
7663 2003-05-31  Ulrich Drepper  <drepper@redhat.com>
7665         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
7666         Also fail if tv_nsec < 0.
7667         (__lll_timedwait_tid): Likewise.
7668         * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
7669         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_timedwait_tid):
7670         Likewise.
7671         * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_timedwait_tid):
7672         Likewise.
7673         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (__lll_mutex_timedlock):
7674         Likewise.
7675         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
7676         Likewise.
7677         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_timedwait_tid):
7678         Likewise.
7679         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_timedwait_tid):
7680         Likewise.
7682         * Makefile (tests): Add tst-sem8 and tst-sem9.
7683         * tst-sem8.c: New file.
7684         * tst-sem9.c: New file.
7685         * sem_open.c: Fix creation of in_use record if the file exists but
7686         no internal record.
7688         * posix-timer.h: Remove old, unused timer_id2ptr and timer_ptr2id
7689         definitions.
7691         * sysdeps/pthread/timer_create.c (timer_create): In case
7692         evp==NULL, assign timer ID to sival_ptr.
7694         * descr.h (struct pthread_unwind_buf): Change type of prev element to
7695         struct pthread_unwind_buf *.
7696         (struct pthread): Likewise for cleanup_jmp_buf element.
7698         * cleanup.c (__pthread_register_cancel): Add cast to avoid warning.
7699         * cleanup_defer.c (__pthread_register_cancel_defer): Likewise.
7700         * unwind.c (__pthread_unwind_next): Likewise.
7702 2003-05-30  Ulrich Drepper  <drepper@redhat.com>
7704         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
7705         (lll_futex_timed_wait): Use int for futex value parameter.
7706         (lll_futex_wake): Likewise.
7707         (lll_futex_requeue): Likewise.
7709         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
7710         Replace one memory operation with one register operation.
7712         * tst-join4.c (do_test): Fix error message.
7714         * tst-rwlock6.c (do_test): Use correct format specifier.
7716         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
7717         (__lll_mutex_lock_wait): Replace one memory operation with one
7718         register operation.
7719         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S
7720         (__lll_mutex_lock_wait): Likewise.
7722         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
7723         (__lll_mutex_cond_lock): Add one to value parameter of
7724         __lll_lock_wait to reflect reality in the futex syscall.
7725         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
7726         (lll_mutex_cond_lock): Likewise.
7728 2003-05-30  Jakub Jelinek  <jakub@redhat.com>
7730         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_cond_lock):
7731         New function.
7732         (lll_mutex_cond_lock): Define.
7734 2003-05-29  Ulrich Drepper  <drepper@redhat.com>
7736         * Makefile (tests): Add tst-signal6.
7737         * tst-signal6.c: New file.
7739         * sysdeps/unix/sysv/linux/s390/lowlevellock.h
7740         (__lll_mutex_unlock_force): New function
7741         (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
7743         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
7744         (__lll_mutex_unlock_force): New function.
7745         (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
7747         * tst-rwlock7.c (do_test): Use correct format specifier.
7749         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue):
7750         Find break parameter in correct asm argument.
7752 2003-05-27  Jakub Jelinek  <jakub@redhat.com>
7754         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_clobbers):
7755         Remove out4.
7756         (lll_futex_requeue): Fix __o3 constraint, return negative errno if
7757         error occured.
7758         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
7759         Add __mutex.
7760         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_REQUEUE,
7761         lll_futex_requeue, lll_mutex_unlock_force): Define.
7763 2003-05-30  Jakub Jelinek  <jakub@redhat.com>
7765         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
7766         (pthread_cond_t): Add __mutex.
7767         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_REQUEUE,
7768         lll_futex_requeue, lll_mutex_unlock_force): Define.
7770 2003-05-28  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
7772         * sysdeps/sh/tcb-offsets.sym: Define MUTEX_FUTEX.
7773         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
7774         Add __mutex field.
7775         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (SYSCALL_WITH_INST_PAD):
7776         Define.
7777         (lll_futex_wait, lll_futex_wake): Define.
7778         * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: New file.
7779         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Try using
7780         FUTEX_REQUEUE instead of FUTEX_WAIT.
7781         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
7782         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Remember
7783         mutex which was used in condvar structure.  Call
7784         __pthread_mutex_cond_lock instead of __pthread_mutex_lock_internal.
7785         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
7787         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Don't
7788         include tcb-offsets.h.  Read wakeup value in locked region.
7789         Use the value of gbr register as THREAD_ID.
7790         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7791         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
7792         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
7794         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Remove futex related
7795         macros.
7797 2003-05-28  Ulrich Drepper  <drepper@redhat.com>
7799         * sysdeps/pthread/pthread_cond_broadcast.c
7800         (__pthread_cond_broadcast): Fix typo: MAX_INT -> INT_MAX.
7802 2003-05-26  Ulrich Drepper  <drepper@redhat.com>
7804         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Fix
7805         typo in register name.
7806         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use parameters
7807         correctly.  Actually use requeue.  Little optimization.
7808         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Store
7809         mutex address early.  Handle cancellation state as 32-bit value.
7810         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7811         Remove unnecessary label.
7813 2003-05-25  Ulrich Drepper  <drepper@redhat.com>
7815         * sysdeps/pthread/pthread_cond_broadcast.c: Try using FUTEX_REQUEUE
7816         instead of FUTEX_WAIT.
7817         * sysdeps/pthread/pthread_cond_signal.c: Likewise.
7818         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
7819         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
7820         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
7821         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
7822         * sysdeps/pthread/pthread_cond_timedwait.c: Remember mutex which was
7823         used in condvar structure.  Call __pthread_mutex_cond_lock instead
7824         of __pthread_mutex_lock_internal.
7825         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7826         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7827         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
7828         (__condvar_cleanup): Always call __pthread_mutex_cond_lock.
7829         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7830         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7831         * sysdeps/unix/sysv/linux/Makefile (libpthread-sysdep_routines):
7832         Add pthread_mutex_cond_lock.
7833         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add dep_mutex.
7834         * sysdeps/unix/sysv/linux/pthread_cond_mutex_lock.c: New file.
7835         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define
7836         lll_mutex_cond_lock.
7837         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
7838         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
7839         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
7840         Add __mutex field.
7841         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7842         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
7844         * sysdeps/i386/tcb-offsets.sym: Define MUTEX_FUTEX.
7845         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
7847         * pthreadP.h: Declare __pthread_mutex_cond_lock.
7848         * pthread_mutex_lock.c: Define LLL_MUTEX_LOCK if not already defined.
7849         Use it instead of lll_mutex_lock.  If __pthread_mutex_lock is a
7850         macro don't define aliases.
7852         * cancellation.c: Remove __pthread_enable_asynccancel_2.
7853         * pthreadP.h: Remove declaration of __pthread_enable_asynccancel_2.
7854         * sysdeps/pthread/pthread_cond_timedwait.c: Use
7855         __pthread_enable_asynccancel instead of __pthread_enable_asynccancel_2.
7856         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7857         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7858         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
7859         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7860         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7862 2003-05-17  Ulrich Drepper  <drepper@redhat.com>
7864         * sem_open.c: Fix one endless loop.  Implement correct semantics
7865         wrt opening the same semaphore more then once.
7866         * sem_close.c: Adjust for sem_open change.
7867         * semaphoreP.h: Include <semaphore.h>.  Define struct inuse_sem.
7868         Declare __sem_mappings, __sem_mappings_lock, __sem_search.
7869         * Makefile (tests): Add tst-sem7.
7870         * tst-sem7.c: New file.
7872 2003-05-16  Roland McGrath  <roland@redhat.com>
7874         * sysdeps/unix/sysv/linux/register-atfork.c (libc_freeres_fn): Fix
7875         uninitialized variable braino.
7877 2003-05-16  Ulrich Drepper  <drepper@redhat.com>
7879         * sysdeps/unix/sysv/linux/timer_gettime.c (timer_gettime): Correct
7880         test for syscall availability.
7882         * sysdeps/unix/sysv/linux/timer_settime.c (timer_settime): Set
7883         __no_posix_timers to -1 if the syscalls don't exist.
7885         * pthread_join.c (pthread_join): Set tid field of the joined
7886         thread to -1.  This isn't necessary but helps to recognize some
7887         error conditions with almost no cost.
7889         * allocatestack.c (FREE_P): Also negative values indicate an
7890         unused stack.
7892         * unwind.c: Include <unistd.h>.
7894 2003-05-14  Ulrich Drepper  <drepper@redhat.com>
7896         * Makefile ($(objpfx)$(multidir)): Add rule to create the directory.
7898 2003-05-14  Jakub Jelinek  <jakub@redhat.com>
7900         * Makefile (crti-objs, crtn-objs): New variables.
7901         (omit-deps, extra-objs): Add crtn.
7902         ($(objpfx)libpthread.so): Depend on both crti and crtn
7903         and links to them in multidir.
7904         ($(objpfx)crtn.S, $(objpfx)crtn.o): New rules.
7906 2003-05-12  Steven Munroe  <sjmunroe@us.ibm.com>
7908         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
7909         (lll_mutex_unlock): Use atomic_exchange_rel.
7911 2003-05-11  Ulrich Drepper  <drepper@redhat.com>
7913         * cond-perf.c (cons): Add missing locking around setting of alldone.
7915 2003-05-10  Ulrich Drepper  <drepper@redhat.com>
7917         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Remove futex
7918         related macros.
7919         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
7921 2003-05-09  Ulrich Drepper  <drepper@redhat.com>
7923         * tst-sem6.c: New file.
7924         * Makefile (tests): Add tst-sem6.
7926         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (___lll_mutex_unlock):
7927         Use atomic_exchange_rel instead of atomic_exchange.
7928         * sysdeps/unix/sysv/linux/lowlevellock.c (lll_unlock_wake_cb):
7929         Likewise.
7931         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Improve quality of
7932         code for lll_futex_wait and lll_futex_wake in static apps.  Use
7933         vsyscall is possible.
7935         * sysdeps/unix/sysv/linux/pthread_getaffinity.c: New file.
7936         * sysdeps/unix/sysv/linux/pthread_setaffinity.c: New file.
7937         * sysdeps/pthread/pthread.h: Declare pthread_getaffinity_np and
7938         pthread_setaffinity_np.
7939         * Versions [libpthread] (GLIBC_2.3.3): Add pthread_getaffinity_np
7940         and pthread_setaffinity_np.
7941         * Makefile (libpthread-routines): Add pthread_getaffinity and
7942         pthread_setaffinity.
7944         * allocatestack.c (allocate_stack): If ARCH_RETRY_MMAP is defined,
7945         use it in case mmap to allocate the stack fails.
7946         * sysdeps/unix/sysv/linux/x86_64/Makefile: Don't define
7947         ARCH_MAP_FLAGS here.
7948         * sysdeps/x86_64/pthreaddef.h: Define ARCH_MAP_FLAGS and
7949         ARCH_RETRY_MMAP.
7951 2003-05-08  Ulrich Drepper  <drepper@redhat.com>
7953         * sysdeps/unix/sysv/linux/fork.c: Complete rewrite of the atfork
7954         handler implementation.  It is now lockless in fork().
7955         * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
7956         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
7957         * sysdeps/unix/sysv/linux/fork.h: Don't include <link.h>.  Don't
7958         declare the __fork_*_lists.
7959         (struct fork_handler): Include pointers to all three functions.
7960         Add next, refcntr and need_signal elements.
7961         (__fork_handlers): New declaration.
7962         (__register_atfork_malloc): Remove declaration.
7963         (HAVE_register_atfork_malloc): Remove definition.
7964         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove
7965         __pthread_child_handler variable.
7966         (__libc_pthread_init): Use __register_atfork instead of explicitly
7967         adding to the list.
7968         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define lll_futex_wait
7969         and lll_futex_wake.
7970         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
7972         * unwind.c (unwind_cleanup): Print error message and then abort.  This
7973         function must never be reached.
7975         * cond-perf.c: New file.
7977 2003-05-05  Ulrich Drepper  <drepper@redhat.com>
7979         * sysdeps/i386/tls.h (TLS_INIT_TP): Include \n in error message.
7981 2003-05-04  Roland McGrath  <roland@redhat.com>
7983         * Makefile ($(objpfx)../libc.so): New target.
7985 2003-05-02  Ulrich Drepper  <drepper@redhat.com>
7987         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
7988         (pthread_condattr_t): Size is only an int, don't use long for
7989         alignment.
7990         (pthread_mutexattr_t): Likewise.
7991         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7992         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
7993         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7995 2003-05-01  Ulrich Drepper  <drepper@redhat.com>
7997         * sysdeps/i386/tls.h: Define THREAD_ID.
7998         * sysdeps/ia64/tls.h: Likewise.
7999         * sysdeps/powerpc/tls.h: Likewise.
8000         * sysdeps/s390/tls.h: Likewise.
8001         * sysdeps/sh/tls.h: Likewise.
8002         * sysdeps/x86_64/tls.h: Likewise.
8003         * pthread_mutex_lock.c: Use THREAD_ID instead of THREAD_SELF to
8004         record ownership.
8005         * pthread_mutex_timedlock.c: Likewise.
8006         * pthread_mutex_trylock.c: Likewise.
8007         * pthread_mutex_unlock.c: Likewise.
8008         * pthread_rwlock_trywrlock.c: Likewise.
8009         * sysdeps/pthread/pthread_rwlocklock_rdlock.c: Likewise.
8010         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
8011         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
8012         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
8014         * sysdeps/pthread/createthread.c (create_thread): Use CLONE_SYSVSEM
8015         flag.
8017 2003-04-29  Jakub Jelinek  <jakub@redhat.com>
8019         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
8020         (__SIZEOF_PTHREAD_COND_T): Define to 48.
8021         (pthread_rwlock_t): Add 16 bytes of pad instead of 8 before __flags.
8022         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
8023         Make __align long long instead of long.
8024         (pthread_rwlock_t): Formatting.
8025         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
8026         (pthread_rwlock_t): Formatting.
8027         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
8028         (pthread_cond_t): Make __align long long instead of long.
8029         (pthread_rwlock_t): Move __flags field to the same position as in
8030         linuxthreads.
8032 2003-04-30  Ulrich Drepper  <drepper@redhat.com>
8034         * tst-rwlock6.c (do_test): Use correct printf format specifiers.
8035         * tst-rwlock7.c (do_test): Likewise.
8037 2003-04-26  Roland McGrath  <roland@redhat.com>
8039         * Makefile ($(test-modules)): Depend on $(common-objpfx)shlib.lds.
8041 2003-04-22  Jakub Jelinek  <jakub@redhat.com>
8043         * allocatestack.c (TLS_TPADJ): Add TLS_PRE_TCB_SIZE instead of
8044         sizeof (struct pthread).
8045         (allocate_stack): Subtract TLS_PRE_TCB_SIZE bytes instead of
8046         1 struct pthread.
8047         * sysdeps/powerpc/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Define
8048         to 0.
8049         (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Define to alignment of
8050         struct pthread.
8051         (TLS_PRE_TCB_SIZE): Increase to cover tcbhead_t preceeded by pad
8052         to 32-bit bytes.
8053         (INSTALL_DTV, GET_DTV, THREAD_DTV): tcbhead_t is immediately before
8054         tcbp.
8055         (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Don't add TLS_TCB_SIZE
8056         unneccessarily.
8057         (NO_TLS_OFFSET): Define.
8058         * sysdeps/unix/sysv/linux/powerpc/createthread.c (TLS_VALUE): Don't
8059         add TLS_TCB_SIZE unnecessarily.
8061 2003-04-22  Roland McGrath  <roland@redhat.com>
8063         * Makeconfig (shared-thread-library): Reverse link order to work
8064         around linker bug.
8066 2003-04-22  Ulrich Drepper  <drepper@redhat.com>
8068         * semaphore.h: Fix typo in comment.
8070 2003-04-21  Ulrich Drepper  <drepper@redhat.com>
8072         * sysdeps/pthread/sigfillset.c: New file.
8074         * init.c (__pthread_initialize_minimal): Don't block SIGTIMER.
8075         * pthreadP.h: Make SIGTIMER and SIGCANCEL the same.
8076         * sysdeps/pthread/pthread_sigmask.c: Remove handling of SIGTIMER.
8077         * sysdeps/pthread/sigaction.c: Likewise.
8078         * sysdeps/pthread/sigprocmask.c: New file.
8079         * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): Define as
8080         __SIGRTMIN+1.
8081         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
8082         Block SIGTIMER.  Also handle SI_TKILL events and terminate thread
8083         in this case.
8085 2003-04-19  Ulrich Drepper  <drepper@redhat.com>
8087         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
8088         (DL_SYSINFO_IMPLEMENTATION): Add .eh_frame information.
8090         * sysdeps/unix/sysv/linux/unregister-atfork.c
8091         (__unregister_atfork): Don't free memory not allocated dynamically.
8093         * semaphore.h: Remove __THROW marker from cancellation points.
8094         * nptl/sysdeps/pthread/pthread.h: Likewise.
8096 2003-04-18  Ulrich Drepper  <drepper@redhat.com>
8098         * sysdeps/pthread/pthread.h: Don't mark pthread_testcancel,
8099         pthread_cancel, pthread_setcancelstate, and pthread_setcanceltype with
8100         __THROW.
8102 2003-04-16  Jakub Jelinek  <jakub@redhat.com>
8104         * tst-cancel4.c (do_test): Use %zd instead of %d when printing cnt.
8106 2003-04-15  Roland McGrath  <roland@redhat.com>
8108         * forward.c (__pthread_unwind): Tweak to avoid warning.
8110 2003-04-15  Ulrich Drepper  <drepper@redhat.com>
8112         * pthreadP.h: Move THREAD_ATOMIC_* replacements to the top.
8114 2003-04-14  Ulrich Drepper  <drepper@redhat.com>
8116         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Don't
8117         overflow CFA advance instructions.
8118         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8120 2003-04-14  Jakub Jelinek  <jakub@redhat.com>
8122         * sysdeps/i386/tls.h: Rename LOCK to LOCK_PREFIX.
8123         * sysdeps/i386/pthread_spin_lock.c: Likewise.
8124         * sysdeps/x86_64/tls.h: Likewise.  Define LOCK_PREFIX if not already
8125         defined.
8127         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Use
8128         DW_CFA_advance_loc2 for .Laddl-.Lsubl.
8129         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
8130         DW_CFA_advance_loc for .Laddl-.Lsubl.
8132 2003-04-13  Ulrich Drepper  <drepper@redhat.com>
8134         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Don't use
8135         position-independent unwind data for static libraries.
8136         Add missing unwind info.  Add comments.
8138         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Add unwind info.
8139         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8140         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8141         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8143 2003-04-12  Ulrich Drepper  <drepper@redhat.com>
8145         * Makefile: Make sure all cancellation points are compiled with
8146         exception and asynchronous unwind tables.
8148         * sysdeps/x86_64/tls.h (THREAD_SETMEM): Word around compiler bug
8149         which mishandles loading of global object addresses in PIC.
8150         (THREAD_SETMEM_NC): Likewise.
8152 2003-04-11  Ulrich Drepper  <drepper@redhat.com>
8154         * pthread.h: Define new data structure for cleanup buffer.  Declare
8155         new cleanup handler interfaces.
8156         * descr.h: Include <unwind.h> if necessary.  Define pthread_unwind_buf.
8157         (struct pthread): Add cleanup_jmp_buf pointer.  Define
8158         HAVE_CLEANUP_JMP_BUF and not HAVE_CANCELBUF.
8159         * pthreadP.h: Declare __pthread_unwind.  Define __do_cancel to use
8160         it.  Declare old cleanup handler installation functions.
8161         * cleanup.c: Rewrite.  Install handler for unwind-based cleanup
8162         handling.
8163         * cleanup_defer.c: Likewise.
8164         * cleanup_compat.c: New file.  Old cleanup code.
8165         * cleanup_def_compat.c: New file.  Old cleanup code.
8166         * pthread_create.c (start_thread): Initialize cleanup_jmp_buf element
8167         if own thread descriptor.
8168         * unwind.c: New file.
8169         * forward.c: Add __pthread_unwind.
8170         * init.c (pthread_functions): Add __pthread_unwind.
8171         * sysdeps/pthread/pthread-functions.s (struct pthread_functions):
8172         Add ptr___pthread_unwind.
8173         * Versions [GLIBC_2.3.3] (libpthread): Export new cleanup handling
8174         and unwind function.
8175         * Makefile (libpthread-routines): Add cleanup_compat,
8176         cleanup_def_compat, and unwind.  Define CFLAGS to enable unwind
8177         table generation if necessary.
8178         * version.c: Record whether unwind support is compiled in.
8179         * sysdeps/pthread/configure.in: Add checks for unwind unterfaces.
8180         * sysdeps/pthread/bits/libc-lock.h: Add prototypes of the old cleanup
8181         handler interfaces.
8182         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add quite a bit of
8183         complication to generate unwind information for syscall wrappers.
8184         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
8185         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
8186         __cleanup_fct_attribute.
8188         * Makefile: Add rules to build and run tst-cleanup0.
8189         * tst-cleanup0.c: New file.
8190         * tst-cleanup0.expect: New file.
8192         * pthread_create.c (deallocate_tsd): Don't take parameter.  Adjust
8193         caller.  Optimize to avoid often unecessary local variable.
8195 2003-04-11  Roland McGrath  <roland@redhat.com>
8197         * Makefile ($(objpfx)multidir.mk): New target, generated makefile that
8198         sets variable `multidir'; include that.
8199         (generated): Add it.
8200         ($(objpfx)$(multidir)/crti.o): New target.
8201         [$(multidir) != .] (generated-dirs, extra-objs, omit-deps): Add it.
8203 2003-04-11  Ulrich Drepper  <drepper@redhat.com>
8205         * tst-attr2.c (do_test): Add cast to avoid warning.
8206         * tst-mutex4.c (do_test): Likewise.
8208 2003-04-10  Ulrich Drepper  <drepper@redhat.com>
8210         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset CPU clocks
8211         in child.
8213 2003-04-09  Ulrich Drepper  <drepper@redhat.com>
8215         * Makefile (tests): Add tst-detach1.
8216         * tst-detach1.c: New file.
8218 2003-04-08  Ulrich Drepper  <drepper@redhat.com>
8220         * sysdeps/pthread/pthread.h: Remove duplicate
8221         pthread_cleanup_{push,pop} definitions.
8223         * tst-barrier2.c: Eliminate warnings.
8224         * tst-cancel4.c: Likewise.
8225         * tst-cond4.c: Likewise.
8226         * tst-cond6.c: Likewise.
8227         * tst-detach1.c: Likewise.
8228         * tst-rwlock4.c: Likewise.
8229         * tst-rwlock6.c: Likewise.
8230         * tst-rwlock7.c: Likewise.
8231         * tst-sem3.c: Likewise.
8232         * tst-spin2.c: Likewise.
8233         * tst-umask1.c: Likewise.
8235 2003-04-07  Ulrich Drepper  <drepper@redhat.com>
8237         * pthread_detach.c (pthread_detach): Fix test for invalid TID.
8239 2003-04-06  Ulrich Drepper  <drepper@redhat.com>
8241         * descr.h (struct pthread): Move cancelhandling member to the front.
8243 2003-04-05  Ulrich Drepper  <drepper@redhat.com>
8245         * sysdeps/unix/sysv/linux/register-atfork.c: Define malloc_prepare,
8246         malloc_parent, and malloc_child statically.
8247         (__register_atfork_malloc): New function.
8248         (free_mem): Don't free any of the malloc_* variables on the list.
8249         * sysdeps/unix/sysv/linux/fork.h: Declare __register_atfork_malloc.
8250         Define HAVE_register_atfork_malloc.
8252 2003-04-04  Ulrich Drepper  <drepper@redhat.com>
8254         * sysdeps/pthread/createthread.c (create_thread): Add some more
8255         comments explaining when to set multiple_threads and when not.
8257         * pthreadP.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
8258         THREAD_ATOMIC_BIT_SET if not already defined.
8259         * sysdeps/i386/tls.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
8260         THREAD_ATOMIC_BIT_SET:
8261         * sysdeps/x86_64/tls.h: Likewise.
8262         * cleanup_defer.c (_pthread_cleanup_push_defer): Rewrite to use
8263         THREAD_ATOMIC_CMPXCHG_VAL.
8264         (_pthread_cleanup_pop_restore): Likewise.
8265         * cancellation.c (__pthread_enable_asynccancel): Likewise.
8266         (__pthread_enable_asynccancel_2): Likewise.
8267         (__pthread_disable_asynccancel): Likewise.
8268         * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
8269         (__libc_disable_asynccancel): Likewise.
8270         * init.c (sigcancel_handler): Likewise.
8271         * pthread_setcancelstate.c (__pthread_setcancelstate): Likewise.
8272         * pthread_setcanceltype.c (__pthread_setcanceltype): Likewise.
8274 2003-04-03  Ulrich Drepper  <drepper@redhat.com>
8276         * init.c (sigcancel_handler): Don't set EXITING_BIT here.
8277         * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
8278         * pthreadP.h (__do_cancel): Set EXITING_BIT here.
8279         * Makefile (tests): Add tst-cancel11.
8280         * tst-cancel11.c: New file.
8282 2003-04-01  Ulrich Drepper  <drepper@redhat.com>
8284         * pthread_create.c (deallocate_tsd): Clear/free memory after the last
8285         round, not the first.  Use specific_used flag instead of local
8286         found_nonzero variable.  Use THREAD_[SG]ETMEM where possible.
8287         (__free_tcb): Don't call deallocate_tsd here.
8288         (start_thread): Call deallocate_tsd here.
8289         * pthread_setspecific.c: Set specific_used flag really only when
8290         needed.
8291         * Makefile (tests): Add tst-tsd3.c and tst-tsd4.
8292         * tst-tsd3.c: New file.
8293         * tst-tsd4.c: New file.
8295 2003-03-31  Ulrich Drepper  <drepper@redhat.com>
8297         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_mutex_lock):
8298         Use atomic_exchange_and_add instead of __lll_add.
8299         (__lll_mutex_timedlock): Likewise.
8300         Patch by Ian Wienand.
8302 2003-03-24  Steven Munroe  <sjmunroe@us.ibm.com>
8304         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
8305         (SINGLE_THREAD_P): Fix typo.
8306         * tst-cancel-wrappers.sh: Handle '.'ed symbols.
8308 2003-03-31  Ulrich Drepper  <drepper@redhat.com>
8310         * Makefile (tests): Add tst-align.
8311         * tst-align.c: New file.
8312         * sysdeps/i386/Makefile: Define CFLAGS-tst-align.
8314         * sysdeps/i386/tls.h (CALL_THREAD_FCT): Align stack of called
8315         function correctly.
8317         * tst-tsd2.c: Add casts to avoid warnings.
8319 2003-03-30  Ulrich Drepper  <drepper@redhat.com>
8321         * descr.h (struct pthread): Move most often used elements to the front.
8323 2003-03-29  Ulrich Drepper  <drepper@redhat.com>
8325         * Makefile (libpthread-routines): Add pthread_atfork.
8326         (libpthread-static-only-routines): Add pthread_atfork.
8328 2003-03-28  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
8330         * sysdeps/sh/tls.h: Include nptl/descr.h after the definition
8331         of TLS_DTV_AT_TP.
8332         (INSTALL_DTV): Add parens.
8333         (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
8334         Use passed descr instead of THREAD_SELF.
8335         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S
8336         (__lll_mutex_timedlock_wait): Correct expected value after
8337         spurious wakeup.
8338         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S:
8339         Release lock before waking up the waiters.
8340         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Correct exit
8341         criteria.  Reorderstruct passed to cleanup handler.  Fix
8342         handling of cancellation and failung pthread_mutex_unlock call.
8343         Use __pthread_enable_asynccancel_2 instead of
8344         __pthread_enable_asynccancel.
8345         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
8346         Return result of lock re-get if it fails.
8347         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Fix wrong argument
8348         for __pthread_cleanup_push.
8349         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Fix
8350         completely broken rwlock implementation.
8351         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
8352         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
8353         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
8354         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
8355         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
8356         * sysdeps/unix/sysv/linux/sh/sem_post.S: Fix error value.  Use
8357         versioned_symbol macro.
8358         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Use versioned_symbol macro.
8359         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
8361 2003-03-27  Ulrich Drepper  <drepper@redhat.com>
8363         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Don't declare
8364         __timer_helper_thread.  Declare __start_helper_thread, __helper_once,
8365         and __helper_tid.
8366         (struct timer): Remove th and bar field.
8367         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Remove
8368         debugging code.  Create only one helper thread.
8369         * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Don't kill
8370         helper thread.
8371         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
8372         Renamed.  Define statically.  Use thread info from siginfo.
8373         (__helper_once): New variable.
8374         (__helper_tid): New variable.
8375         (__reset_helper_control): New function.
8376         (__start_helper_thread): New function.
8378         * pthread_create.c (start_thread): Don't use setjmp inside
8379         __builtin_expect to work around gcc bug.
8381         * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Even if
8382         timer_delete syscall fails, but not with ENOSYS, set
8383         __no_posix_timers.
8385         * sysdeps/unix/sysv/linux/timer_settime.c [!__ASSUME_POSIX_TIMERS]
8386         (timer_settime): Fix typo.
8387         * sysdeps/unix/sysv/linux/timer_getoverr.c
8388         [!__ASSUME_POSIX_TIMERS] (timer_getoverrun): Likewise.
8390 2003-03-27  Jakub Jelinek  <jakub@redhat.com>
8392         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Fix
8393         offset of cleanupbuf.__prev.
8395 2003-03-26  Jakub Jelinek  <jakub@redhat.com>
8397         * sysdeps/unix/sysv/linux/timer_getoverr.c: Fix typo in name
8398         of included file.
8400 2003-03-26  Ulrich Drepper  <drepper@redhat.com>
8402         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): If EVP ==
8403         NULL provide default definition to syscall.
8405 2003-03-25  Roland McGrath  <roland@redhat.com>
8407         * sysdeps/pthread/posix-timer.h (TIMER_MAX): Define if not defined.
8408         (timer_id2ptr): Fix typo.
8410 2003-03-25  Ulrich Drepper  <drepper@redhat.com>
8412         * pthreadP.h: Define SIGCANCEL and SIGTIMER.
8413         * sysdeps/i386/pthreaddef.h: Remove SIGCANCEL definition.
8414         * sysdeps/ia64/pthreaddef.h: Likewise.
8415         * sysdeps/powerpc/pthreaddef.h: Likewise.
8416         * sysdeps/s390/pthreaddef.h: Likewise.
8417         * sysdeps/sh/pthreaddef.h: Likewise.
8418         * sysdeps/x86_64/pthreaddef.h: Likewise.
8419         * init.c (__pthread_initialize_minimal): Block SIGTIMER.
8420         * sysdeps/pthread/sigaction.c: Also prevent SIGTIMER handler from
8421         being changed.
8422         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
8423         SIGTIMER is not unblocked.
8424         * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): One more
8425         RT signal taken.
8426         * sysdeps/unix/sysv/linux/pthread_kill.c: Do not allow SIGTIMER to
8427         be send.
8428         * sysdeps/pthread/posix-timer.h (timer_id2ptr, timer_ptr2id): Just
8429         pass pointer through as ID.
8430         * sysdeps/unix/sysv/linux/bits/local_lim.h (TIMER_MAX): Removed.
8431         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: New file.
8432         * sysdeps/unix/sysv/linux/timer_create.c: New file.
8433         * sysdeps/unix/sysv/linux/timer_delete.c: New file.
8434         * sysdeps/unix/sysv/linux/timer_getoverr.c: New file.
8435         * sysdeps/unix/sysv/linux/timer_gettime.c: New file.
8436         * sysdeps/unix/sysv/linux/timer_routines.c: New file.
8437         * sysdeps/unix/sysv/linux/timer_settime.c: New file.
8438         * sysdeps/unix/sysv/linux/ia64/Versions: New file.
8439         * sysdeps/unix/sysv/linux/ia64/timer_create.c: New file.
8440         * sysdeps/unix/sysv/linux/ia64/timer_delete.c: New file.
8441         * sysdeps/unix/sysv/linux/ia64/timer_getoverr.c: New file.
8442         * sysdeps/unix/sysv/linux/ia64/timer_gettime.c: New file.
8443         * sysdeps/unix/sysv/linux/ia64/timer_settime.c: New file.
8444         * sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions: New file.
8445         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_create.c: New file.
8446         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_delete.c: New file.
8447         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_getoverr.c: New file.
8448         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_gettime.c: New file.
8449         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_settime.c: New file.
8450         * sysdeps/unix/sysv/linux/s390/s390-64/Versions: New file.
8451         * sysdeps/unix/sysv/linux/s390/s390-64/timer_create.c: New file.
8452         * sysdeps/unix/sysv/linux/s390/s390-64/timer_delete.c: New file.
8453         * sysdeps/unix/sysv/linux/s390/s390-64/timer_getoverr.c: New file.
8454         * sysdeps/unix/sysv/linux/s390/s390-64/timer_gettime.c: New file.
8455         * sysdeps/unix/sysv/linux/s390/s390-64/timer_settime.c: New file.
8456         * sysdeps/unix/sysv/linux/x86_64/Versions: New file.
8457         * sysdeps/unix/sysv/linux/x86_64/compat-timer.h: New file.
8458         * sysdeps/unix/sysv/linux/x86_64/timer_create.c: New file.
8459         * sysdeps/unix/sysv/linux/x86_64/timer_delete.c: New file.
8460         * sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c: New file.
8461         * sysdeps/unix/sysv/linux/x86_64/timer_gettime.c: New file.
8462         * sysdeps/unix/sysv/linux/x86_64/timer_settime.c: New file.
8464         * pthreadP.h: Remove FRAME_LEFT definition.
8465         * cleanup.c (_pthread_cleanup_push): Don't check for reference to
8466         already left frame.  Programs which have this problem are not POSIX
8467         compliant.
8468         * cleanup_defer.c (_pthread_cleanup_push_defer): Likewise.
8470 2003-03-24  Ulrich Drepper  <drepper@redhat.com>
8472         * sysdeps/pthread/tst-timer.c: Check return values of the
8473         functions we test.
8475 2003-03-23  Roland McGrath  <roland@redhat.com>
8477         * tst-tls3.c (do_test) [! HAVE___THREAD]: Don't test anything.
8478         * tst-tls3mod.c: Likewise.
8479         * tst-tls1.c: Likewise.
8480         * tst-tls2.c: Likewise.
8482         * tst-mutex5.c (do_test): Unlock before destroy, otherwise we invoke
8483         undefined behavior.
8485         * tst-join5.c (tf1, tf2): Add a cast.
8487         * Makeconfig (includes): Append -I$(..)nptl to this variable.
8489         * tst-barrier2.c (do_test) [! _POSIX_THREAD_PROCESS_SHARED]:
8490         Don't test anything.
8491         * tst-cond4.c: Likewise.
8492         * tst-cond6.c: Likewise.
8493         * tst-flock2.c: Likewise.
8494         * tst-mutex4.c: Likewise.
8495         * tst-rwlock4.c: Likewise.
8496         * tst-signal1.c: Likewise.
8497         * tst-spin2.c: Likewise.
8498         * tst-cond11.c [! _POSIX_CLOCK_SELECTION]: Likewise.
8500         * tst-mutex4.c: Use test-skeleton.c.
8501         * tst-spin2.c: Likewise.
8502         * tst-sysconf.c: Likewise.
8503         * tst-barrier2.c: Likewise.
8504         * tst-cond4.c: Likewise.
8505         * tst-cond6.c: Likewise.
8506         * tst-rwlock4.c: Likewise.
8507         * tst-unload.c: Likewise.
8508         * tst-flock2.c (do_test): Use return instead of exit.
8510 2003-03-22  Jakub Jelinek  <jakub@redhat.com>
8512         * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
8514 2003-03-21  Ulrich Drepper  <drepper@redhat.com>
8516         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
8517         (__lll_mutex_trylock): Use atomic_compare_and_exchange_val_acq
8518         instead of __lll_compare_and_swap.
8519         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
8520         Likewise.
8521         Removed definition if __lll_compare_and_swap.
8523         * cancellation.c: Adjust for new form of compare&exchange macros.
8524         * cleanup_defer.c: Likewise.
8525         * init.c: Likewise.
8526         * libc-cancellation.c: Likewise.
8527         * old_pthread_cond_broadcast.c: Likewise.
8528         * old_pthread_cond_signal.c: Likewise.
8529         * old_pthread_cond_timedwait.c: Likewise.
8530         * old_pthread_cond_wait.c: Likewise.
8531         * pthread_cancel.c: Likewise.
8532         * pthread_create.c: Likewise.
8533         * pthread_detach.c: Likewise.
8534         * pthread_join.c: Likewise.
8535         * pthread_key_delete.c: Likewise.
8536         * pthread_setcancelstate.c: Likewise.
8537         * pthread_setcanceltype.c: Likewise.
8538         * pthread_timedjoin.c: Likewise.
8539         * pthread_tryjoin.c: Likewise.
8540         * sysdeps/pthread/createthread.c: Likewise.
8542 2003-03-20  Ulrich Drepper  <drepper@redhat.com>
8544         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Include <atomic.h>.
8545         Remove __lll_add, __lll_dec_if_positive, and __lll_test_and_set
8546         definitions.  Replace uses with calls to atomic_* functions.
8547         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
8548         * sysdeps/unix/sysv/linux/lowlevellock.c: Replace __lll_add and
8549         __lll_test_and_set calls with atomic_exchange_and_add and
8550         atomic_exchange calls respectively.
8551         * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
8552         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
8553         * sysdeps/unix/sysv/linux/sem_trywait.c: Likewise.
8554         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
8555         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Likewise.
8556         * sysdeps/unix/sysv/linux/ia64/sem_port.c: Likewise.
8557         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
8559         * allocatestack.c (allocate_stack): Assume atomic_exchange_and_add
8560         returns the old value.
8562 2003-03-20  Martin Schwidefsky  <sky@mschwid3.boeblingen.de.ibm.com>
8564         * sysdeps/s390/pthread_spin_lock.c (pthread_spin_lock): Use type
8565         int for variable OLDVAL and correct inline assembler contraint.
8566         * sysdeps/s390/pthread_spin_trylock.c (pthread_spin_trylock): Use
8567         type int for variable OLD.
8569         * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it
8570         only for s390-32.
8571         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
8572         (SINGLE_THREAD_P): Use global variable __local_multiple_threads
8573         instead of multiple_threads field in the TCB.
8575 2003-03-19  Ulrich Drepper  <drepper@redhat.com>
8577         * sysdeps/i386/i686/bits/atomic.h: Removed.
8578         * sysdeps/i386/i586/bits/atomic.h: Removed.
8579         * sysdeps/i386/i486/bits/atomic.h: Removed.  Moved to glibc.
8580         * sysdeps/x86_64/bits/atomic.h: Removed.  Moved to glibc.
8581         * sysdeps/s390/bits/atomic.h: Removed.  Moved to glibc.
8582         * sysdeps/sh/bits/atomic.h: Removed.  Moved to glibc.
8583         * sysdeps/ia64/bits/atomic.h: Removed.  Moved to glibc.
8584         * sysdeps/powerpc/bits/atomic.h: Removed.  Moved to glibc.
8585         * atomic.h: Removed.  Moved to glibc.
8587         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Add
8588         support for clock selection.
8590         * sysdeps/pthread/pthread_cond_broadcast.c: Release lock before
8591         signalling waiters.
8593 2003-03-18  Roland McGrath  <roland@redhat.com>
8595         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
8596         Add __lll_rel_instr first.  Add memory clobber.
8597         (lll_mutex_unlock): Use __lll_test_and_set.
8598         From Paul Mackerras <paulus@samba.org>.
8600         * sysdeps/powerpc/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define
8601         unconditionally.
8602         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
8603         (SINGLE_THREAD_P):  Add `header.' prefix.
8604         From Paul Mackerras <paulus@samba.org>.
8606         * Versions (libpthread: GLIBC_2.3.2): Move pthread_tryjoin_np and
8607         pthread_timedjoin_np to ...
8608         (libpthread: GLIBC_2.3.3): ... here.
8609         (libpthread: GLIBC_2.2): Move pthread_barrierattr_getpshared there too.
8611         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
8612         Avoid shadowing VAL variable.
8614         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
8615         New macro.
8617 2003-03-18  Ulrich Drepper  <drepper@redhat.com>
8619         * Makefile (tests): Add tst-cond11.
8620         * tst-cond11.c: New file.
8622         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Reorder
8623         struct passed to cleanup handler to eliminate one more
8624         instruction.
8625         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8627         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
8628         (pthrad_cond_t): Replace __unused field with __clock.
8630         * sysdeps/pthread/pthread_cond_wait.c: Release condvar lock before
8631         waken all waiters in cleanup handler.
8632         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8633         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8635         * pthread_condattr_getclock.c: New file.
8636         * pthread_condattr_setclock.c: New file.
8637         * sysdeps/pthread/pthread.h: Declare these new functions.
8638         * Versions [GLIBC_2.3.3] (libpthread): Add the new functions.
8639         * Makefile (libpthread-routines): Add the new functions.
8640         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_condattr):
8641         Renamed field to value.  Document use of the bits.
8642         * pthread_condattr_getpshared.c: Adjust for struct pthread_condattr
8643         change.
8644         * pthread_condattr_setpshared.c: Likewise.
8645         * pthread_cond_init.c (__pthread_cond_init): Initialized __clock field.
8646         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add cond_clock symbol.
8647         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
8648         Add __clock field.
8649         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8650         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
8651         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
8652         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
8653         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
8654         Implement clock selection.
8655         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
8656         * pthread-errnos.sym: Add ENOSYS.
8657         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
8658         _POSIX_CLOCK_SELECTION.
8659         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
8661         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Remove
8662         invalid .size directive.
8664 2003-03-17  Roland McGrath  <roland@redhat.com>
8666         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
8667         Formatting tweaks.
8669 2003-03-17  Ulrich Drepper  <drepper@redhat.com>
8671         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Use __builtin_expect.
8672         Use __lll_add instead of spelling it out.  Use protected symbol names.
8673         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Use __builtin_expect.
8674         Use __lll_add.
8675         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_compare_and_swap):
8676         Renamed from lll_compare_and_swap.  Use new name where necessary.
8677         (__lll_add): Defined.
8678         (__lll_dec_if_positive): Defined.
8679         (__lll_test_and_set): Defined.
8680         * sysdeps/ia64/pthread_spin_init.c: Removed.
8681         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Removed.
8682         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Removed.
8683         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Removed.
8684         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Removed.
8685         * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: Removed.
8686         * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: Removed.
8687         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Removed.
8688         * sysdeps/ia64/bits/atomic.h: Add __builtin_expect where appropriate.
8689         * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
8690         __sync_lock_release_si.
8691         Patch by Jakub Jelinek.
8693         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
8694         Fix timeout handling.
8695         (__lll_timedwait_tid): Likewise.
8696         (lll_unlock_wake_cb): Wake up other waiters if necessary.
8697         Patch by Jakub Jelinek.
8699         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Pretty printing.
8701 2003-03-17  Roland McGrath  <roland@redhat.com>
8703         PowerPC port contributed by Paul Mackerras <paulus@samba.org>.
8704         * sysdeps/pthread/pthread_spin_init.c: New file.
8705         * sysdeps/pthread/pthread_spin_unlock.c: New file.
8706         * sysdeps/powerpc/Makefile: New file.
8707         * sysdeps/powerpc/pthread_spin_lock.c: New file.
8708         * sysdeps/powerpc/pthread_spin_trylock.c: New file.
8709         * sysdeps/powerpc/pthreaddef.h: New file.
8710         * sysdeps/powerpc/tcb-offsets.sym: New file.
8711         * sysdeps/powerpc/td_ta_map_lwp2thr.c: New file.
8712         * sysdeps/powerpc/tls.h: New file.
8713         * sysdeps/powerpc/bits/atomic.h: New file.
8714         * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: New file.
8715         * sysdeps/unix/sysv/linux/libc-lowlevellock.c: New file.
8716         * sysdeps/unix/sysv/linux/lowlevellock.c: New file.
8718         * sysdeps/unix/sysv/linux/lowlevelmutex.c: New file.
8719         * sysdeps/unix/sysv/linux/sem_post.c: New file.
8720         * sysdeps/unix/sysv/linux/sem_timedwait.c: New file.
8721         * sysdeps/unix/sysv/linux/sem_trywait.c: New file.
8722         * sysdeps/unix/sysv/linux/sem_wait.c: New file.
8723         * sysdeps/unix/sysv/linux/powerpc/Makefile: New file.
8724         * sysdeps/unix/sysv/linux/powerpc/createthread.c: New file.
8725         * sysdeps/unix/sysv/linux/powerpc/fork.c: New file.
8726         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: New file.
8727         * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: New file.
8728         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: New file.
8729         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: New file.
8730         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: New file.
8731         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
8732         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New file.
8734         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Use __gettimeofday,
8735         not gettimeofday.
8736         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Likewise.
8737         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
8738         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Likewise.
8739         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Likewise.
8740         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
8742 2003-03-17  Ulrich Drepper  <drepper@redhat.com>
8744         * sysdeps/pthread/pthread_cond_wait.c: Correct exit criteria.
8745         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
8746         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8747         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8748         Patch by Ewald Snel <ewald@rambo.its.tudelft.nl>.
8750 2003-03-16  Roland McGrath  <roland@redhat.com>
8752         * tst-fork4.c: Include <string.h>.
8753         * tst-signal2.c: Likewise.
8754         * tst-mutex5.c (do_test): exit -> return.
8755         * tst-mutex2.c: Include <stdlib.h>.
8757 2003-03-16  Ulrich Drepper  <drepper@redhat.com>
8759         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
8760         (__lll_mutex_timedlock_wait): Correct expected value after
8761         spurious wakeup.  Otherwise we would never wait again.
8763         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Work around red
8764         zone versus inline asm stupidity.  Use correct instructions.
8766         * tst-rwlock6.c: Add some more status output.
8768 2003-03-15  Roland McGrath  <roland@redhat.com>
8770         * sysdeps/pthread/configure.in: New file.
8771         * sysdeps/pthread/configure: New file (generated).
8773 2003-03-15  Ulrich Drepper  <drepper@redhat.com>
8775         * allocatestack.c (allocate_stack): Store the exact stack size of
8776         user allocated stacks.
8778 2003-03-15  Jakub Jelinek  <jakub@redhat.com>
8780         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
8781         (SINGLE_THREAD): Use `header' prefix instead of `header.data'.
8782         * sysdeps/sh/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
8783         * sysdeps/sh/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define.
8784         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
8785         Use `header.' prefix.
8786         * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
8788 2003-03-15  Ulrich Drepper  <drepper@redhat.com>
8790         * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Don't use
8791         __builtin_frame_address, use stack pointer.
8793         * sysdeps/unix/sysv/linux/jmp-unwind.c: Use CURRENT_STACK_FRAME
8794         instead of __builtin_frame_pointer.
8796 2003-03-14  Ulrich Drepper  <drepper@redhat.com>
8798         * tst-basic1.c (do_test): Add cast to avoid warning.
8799         * tst-basic2.c (do_test): Likewise.
8801         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use correct
8802         amount of stack correction.
8804         * tst-fork4.c: Use test-skeleton.c.
8806 2003-03-14  Roland McGrath  <roland@redhat.com>
8808         * init.c: Fix typo "#eli" for "#else".
8810 2003-03-14  Steven Munroe  <sjmunroe@us.ibm.com>
8812         * allocatestack.c (__stack_user): Use hidden_data_def.
8813         * pthread_create.c (__pthread_keys): Likewise.
8815         * init.c [__powerpc__] (__NR_set_tid_address): Define it.
8817 2003-03-14  Roland McGrath  <roland@redhat.com>
8819         * tst-fork4.c: New file.
8820         * Makefile (tests): Add it.
8822         * descr.h (struct pthread): Move the union out of [!TLS_DTV_AT_TP], so
8823         we always define the padding space.
8824         [!TLS_DTV_AT_TP]: Give tcbhead_t field a name, `header', since GCC
8825         stopped supporting its own extensions fully.
8826         [TLS_MULTIPLE_THREADS_IN_TCB]: Put `multiple_threads' inside a wrapper
8827         struct also called `header', so `header.multiple_threads' is the field
8828         name to use on all machines.
8829         * allocatestack.c (allocate_stack): Use `header.' prefix.
8830         * sysdeps/pthread/createthread.c (create_thread): Likewise.
8831         * pthread_create.c (__pthread_create_2_1): Likewise.
8832         * sysdeps/i386/tls.h (INSTALL_NEW_DTV, THREAD_DTV): Likewise.
8833         (THREAD_SELF): Likewise.
8834         * sysdeps/x86_64/tls.h: Likewise.
8835         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
8836         (SINGLE_THREAD_P): Likewise.
8837         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
8838         (SINGLE_THREAD_P): Likewise.
8839         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
8840         (SINGLE_THREAD_P): Likewise.
8842         * sysdeps/s390/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Use REGS[18]
8843         value directly.
8845 2003-03-14  Ulrich Drepper  <drepper@redhat.com>
8847         * pthread_create.c (start_thread): Use CALL_THREAD_FCT if defined.
8848         * sysdeps/i386/tls.h: Define CALL_THREAD_FCT.
8850         * pthread_create.c (start_thread): setjmp is expected to return 0.
8852         * sysdeps/x86_64/tls.h (THREAD_GETMEM): Mark asms volatile.
8853         (THREAD_GETMEM_NC): Likewise.
8855 2003-03-13  Ulrich Drepper  <drepper@redhat.com>
8857         * allocatestack.c (allocate_stack): If MULTI_PAGE_ALIASING is defined
8858         and the size of the stack which must be allocated is a multiple,
8859         allocate one more page.
8860         * sysdeps/i386/i686/Makefile: Don't define COLORING_INCREMENT, but
8861         MULTI_PAGE_ALIASING.
8863 2003-03-13  Roland McGrath  <roland@redhat.com>
8865         * pthread_create.c (start_thread): Set EXITING_BIT after the
8866         event-reporting (and destructors), not before.
8868 2003-03-13  Jakub Jelinek  <jakub@redhat.com>
8870         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_timed_wait,
8871         lll_futex_wake): Declare register variables as long int instead of
8872         unsigned long int.  Patch by Ian Wienand <ianw@gelato.unsw.edu.au>.
8873         Make syscall arguments clobbered by the syscall.
8874         (lll_futex_wait): Define using lll_futex_timed_wait.
8876         * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Cast regs[13]
8877         to void *.
8879         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Only declare and set
8880         PPID if [! NDEBUG].
8882         * allocatestack.c (nptl_ncreated): Only declare if
8883         COLORING_INCREMENT != 0.
8885         * pthreadP.h (__pthread_enable_asynccancel_2): New prototype.
8886         (__libc_enable_asynccancel_2): Remove prototype.
8888         * sysdeps/unix/sysv/linux/ia64/fork.c (ARCH_FORK): Swap ptid and
8889         ctid to match kernel.
8891 2003-03-12  Ulrich Drepper  <drepper@redhat.com>
8893         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add
8894         libc_multiple_threads.
8895         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Move definition of
8896         __libc_multiple_threads to...
8897         * sysdeps/unix/sysv/linux/libc_multiple_threads.c: ...here.  New file.
8899         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Remove unnecessary
8900         versioning.
8901         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
8902         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
8904         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
8905         (__pthread_once_internal): Define.
8907         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Use shlib-compat.h
8908         macros instead of .symver directly.
8909         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
8910         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
8912         * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Include tcb-offsets.h.
8913         * sysdeps/x86_64/tcb-offsets.sym: New file.
8914         * sysdeps/x86_64/Makefile: New file.
8916         * sysdeps/i386/tcb-offsets.sym: Add SELF.
8917         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use SELF
8918         to access own pthread_t in TCB.
8919         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8920         Likewise.
8921         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8922         Likewise.
8923         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8925 2003-03-12  Roland McGrath  <roland@redhat.com>
8927         * pthread-errnos.sym: New file.
8928         * Makefile (gen-as-const-headers): New variable, list that file.
8929         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include generated
8930         header <pthread-errnos.h> instead of defining errno values here.
8931         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
8932         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
8933         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
8934         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8935         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8936         Likewise.
8937         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8938         Likewise.
8939         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
8940         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8941         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
8942         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
8943         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
8944         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
8945         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
8946         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
8947         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8948         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
8949         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
8950         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
8951         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
8952         * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
8953         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
8954         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
8955         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
8956         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
8957         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
8958         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
8959         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
8960         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
8961         * sysdeps/i386/i486/pthread_spin_trylock.S: Likewise.
8962         * sysdeps/x86_64/pthread_spin_trylock.S: Likewise.
8963         * sysdeps/sh/pthread_spin_trylock.S: Likewise.
8964         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
8965         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
8967         * sysdeps/unix/sysv/linux/fork.c: Add an assert to check that
8968         CLONE_CHILD_SETTID worked.
8970 2003-03-12  Ulrich Drepper  <drepper@redhat.com>
8972         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: New
8973         file.
8974         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S: New
8975         file.
8977         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
8978         (pthread_cond_t): Add padding.
8980         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: New file.
8981         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: New file.
8982         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: New file.
8984         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
8985         (__pthread_rwlock_timedwrlock): Add missing opcode suffix.
8986         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
8987         (__pthread_rwlock_timedrdlock): Likewise.
8988         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
8989         (__pthread_rwlock_wrlock): Likewise.
8990         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
8991         (__pthread_rwlock_rdlock): Likewise.
8993         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: New file.
8995         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Return
8996         result of lock re-get if it fails.
8998 2003-03-11  Ulrich Drepper  <drepper@redhat.com>
9000         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Fix asm syntax.
9001         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
9002         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
9003         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
9004         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
9005         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
9006         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
9007         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
9008         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
9009         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
9011         * sysdeps/x86_64/tls.h (THREAD_SELF, THREAD_GETMEM, THREAD_GETMEM_NC,
9012         THREAD_SETMEM, THREAD_SETMEM_NC): Correct asm syntax.
9014         * allocatestack.c [! TLS_MULTIPLE_THREADS_IN_TCB] (allocate_stack):
9015         Initialize *__libc_multiple_threads_ptr not __libc_multiple_threads.
9016         * sysdeps/pthread/createthread.c [! TLS_MULTIPLE_THREADS_IN_TCB]
9017         (create_thread): Likewise.
9018         Define __pthread_multiple_threads and __libc_multiple_threads_ptr.
9019         * init.c (__pthread_initialize_minimal_internal): Initialize
9020         __libc_multiple_threads_ptr if necessary.
9021         * pthreadP.h: Adjust prototype for __libc_pthread_init.  Declare
9022         __pthread_multiple_threads and __libc_multiple_threads_ptr.
9023         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Define
9024         __libc_multiple_threads.
9025         (__libc_pthread_init): Return pointer to __libc_pthread_init if
9026         necessary.
9028         * sysdeps/i386/tls.h (THREAD_SETMEM): Fix one-byte variant.
9029         (THREAD_SETMEM_NC): Likewise.
9031         * sysdeps/x86_64/pthread_spin_trylock.c: Removed.
9032         * sysdeps/x86_64/pthread_spin_trylock.S: New file.
9033         * sysdeps/x86_64/pthread_spin_unlock.c: Removed.
9034         * sysdeps/x86_64/pthread_spin_unlock.S: New file.
9036         * sysdeps/i386/i486/pthread_spin_trylock.S (pthread_spin_trylock):
9037         Eliminate one entire instruction.
9039         * cancellation.c (__pthread_enable_asynccancel_2): New function.
9040         * pthreadP.h: Declare __pthread_enable_asynccancel_2.
9041         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
9042         (__pthread_cond_timedwait): Use __pthread_enable_asynccancel_2
9043         instead of __pthread_enable_asynccancel.
9044         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
9045         (__pthread_cond_wait): Likewise.
9046         * sysdeps/pthread/pthread_cond_timedwait.c
9047         (__pthread_cond_timedwait): Likewise.
9048         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
9050         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
9051         (__condvar_cleanup): Wake up all waiters in case we got signaled
9052         after being woken up but before disabling asynchronous
9053         cancellation.
9054         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
9055         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
9056         (__condvar_cleanup): Likewise.
9058         * init.c (__NR_set_tid_address): If already defined, don't redefine.
9059         Make it an error if architecture has no #if case.  Add x86-64.
9061         * sysdeps/unix/sysv/linux/x86_64/Makefile: Add flags for
9062         pt-initfini.s generation.
9064         * sysdeps/x86_64/tls.h: Include <asm/prctl.h>.
9065         (TLS_INIT_TP): Fix typo.
9067 2003-03-11  Jakub Jelinek  <jakub@redhat.com>
9069         * sysdeps/ia64/bits/atomic.h (atomic_exchange_and_add): Swap 2nd and
9070         3rd argument of __arch_compare_and_exchange_{32,64}_val_acq.
9072         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Include semaphore.h.
9073         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
9074         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Likewise.
9075         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Likewise.
9076         * sysdeps/unix/sysv/linux/s390/sem_post.c: Likewise.
9077         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
9078         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
9079         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
9081 2003-03-11  Ulrich Drepper  <drepper@redhat.com>
9083         * sysdeps/pthread/pthread_cond_timedwait.c
9084         (__pthread_cond_timedwait): Return the result of the final
9085         locking.  If it succeeds, the regular function return value.
9087         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait):
9088         Return result of the final locking.
9089         * version.c (__nptl_main): Work around problems with the strange
9090         INTERNAL_SYSCALL macro on ppc32.
9091         * init.c (__pthread_initialize_minimal_internal): Unblock
9092         SIGCANCEL in case the parent blocked it.
9093         Reported by Paul Mackerras <paulus@samba.org>.
9095         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: New file.
9096         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: New file.
9097         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: New file.
9099 2003-03-11  Jakub Jelinek  <jakub@redhat.com>
9101         * sysdeps/pthread/pthread_cond_timedwait.c
9102         (__pthread_cond_timedwait): Unlock and fail if
9103         __pthread_mutex_unlock_internal failed.
9105         * sysdeps/pthread/createthread.c (ARCH_CLONE): Define if not defined.
9106         (create_thread): Only assert PD->tcb != NULL under [TLS_TCB_AT_TP].
9107         Use ARCH_CLONE.
9108         * allocatestack.c (ALLOCATE_STACK_PARMS): New macro.
9109         [NEED_SEPARATE_REGISTER_STACK] (STACK_VARIABLES,
9110         STACK_VARIABLES_ARGS, STACK_VARIABLES_PARMS, ALLOCATE_STACK_PARMS,
9111         ALLOCATE_STACK): New macros.
9112         (TLS_TPADJ): New macro.
9113         (get_cached_stack, queue_stack, __deallocate_stack): Use TLS_TPADJ.
9114         (allocate_stack): Handle TLS_DTV_AT_TP and
9115         NEED_SEPARATE_REGISTER_STACK.  Use TLS_TPADJ.
9116         * pthread_create.c (__pthread_create_2_1) [! TLS_TCB_AT_TP]:
9117         Don't set PD->self.
9118         * init.c [__ia64__] (__NR_set_tid_address): Define.
9120         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: New file.
9121         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: New file.
9122         * sysdeps/unix/sysv/linux/ia64/fork.c: New file.
9123         * sysdeps/unix/sysv/linux/ia64/createthread.c: New file.
9124         * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: New file.
9125         * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: New file.
9126         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: New file.
9127         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: New file.
9128         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: New file.
9129         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
9130         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: New file.
9131         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: New file.
9132         * sysdeps/unix/sysv/linux/ia64/sem_post.c: New file.
9133         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: New file.
9134         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: New file.
9135         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: New file.
9136         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
9137         * sysdeps/ia64/bits/atomic.h: New file.
9138         * sysdeps/ia64/Makefile: New file.
9139         * sysdeps/ia64/pthread_spin_init.c: New file.
9140         * sysdeps/ia64/pthread_spin_lock.c: New file.
9141         * sysdeps/ia64/pthread_spin_trylock.c: New file.
9142         * sysdeps/ia64/pthread_spin_unlock.c: New file.
9143         * sysdeps/ia64/pthreaddef.h: New file.
9144         * sysdeps/ia64/tcb-offsets.sym: New file.
9145         * sysdeps/ia64/td_ta_map_lwp2thr.c: New file.
9146         * sysdeps/ia64/tls.h: New file.
9148         * sysdeps/s390/pthreaddef.h (__exit_thread_inline): Pass 1 argument
9149         to syscall instead of no arguments.
9151 2003-03-10  Ulrich Drepper  <drepper@redhat.com>
9153         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: New file.
9154         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: New file.
9155         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: New file.
9156         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: New file.
9158         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Fix error value in
9159         unused code.
9161         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: New file
9163         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
9164         lowlevelbarrier.sym.
9165         * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: New file.
9166         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S:
9167         Include lowlevelbarrier.h and don't define offsets locally.
9168         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Likewise.
9170         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
9171         (__lll_mutex_lock_wait): Reverse order of first two parameters.
9172         (__lll_mutex_timedlock_wait): Likewise.
9173         (lll_mutex_lock): Adjust asm for that.
9174         (lll_mutex_timedlock): Likewise.  Mark cx, cc, r10 as clobbered.
9175         (lll_lock): Adjust asm for operand order change.
9176         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: New file.
9177         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: New file.
9179         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_lock_wait):
9180         Reverse order of parameters.
9181         (__lll_timedwait_tid): Remove regparms attribute.
9182         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: New file.
9183         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: New file.
9185         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
9186         (__lll_timedwait_tid): Remove one unnecessary instruction.
9188         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Define
9189         __lll_mutex_timedlock_wait only for NOT_IN_libc.
9190         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Include
9191         lowlevelmutex.S.
9193         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
9194         lll_unlock_wake_cb, __lll_wait_tid, and __lll_timedwait_tid only
9195         for NOT_IN_libc.
9196         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Include
9197         lowlevellock.S.
9199         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Don't define
9200         LOCK is already defined.  Don't define __lll_mutex_timedlock_wait
9201         for libc.so.
9202         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Only
9203         define LOCK here (if UP is not defined).  The actual code is in
9204         lowlevelmutex.S.
9206         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Don't define
9207         LOCK is already defined.  Don't define lll_unlock_wake_cb and
9208         __lll_timedwait_tid for libc.so.
9209         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Only
9210         define LOCK here (if UP is not defined).  The actual code is in
9211         lowlevellock.S.
9213         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Not needed anymore.
9214         * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: Likewise.
9215         * sysdeps/unix/sysv/linux/s390/sem_post.c: Include lowlevellock.h
9216         instead of lowlevelsem.h.
9217         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
9218         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
9219         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
9221         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
9222         lowlevelrwlock.sym.
9223         * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: New file.
9224         * sysdeps/unix/sysv/linux/i386/lowlevelrwlock.h: Removed.
9225         * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: Removed.
9227         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_trylock): Fix
9228         register loading.
9229         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_trylock): Undo
9230         last changed.  D'oh.
9232         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: New file.
9234         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove declaration
9235         of __libc_locking_needed.
9236         (lll_trylock): Initialize %eax to zero.
9238         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Update
9239         pthread_cond_t definition.
9241 2003-03-10  Roland McGrath  <roland@redhat.com>
9243         * sysdeps/unix/sysv/linux/lowlevelcond.sym: New file.
9244         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add it.
9245         * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: File removed.
9246         * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: Likewise.
9247         * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: Likewise.
9249         * allocatestack.c (allocate_stack) [!TLS_MULTIPLE_THREADS_IN_TCB]:
9250         Instead of setting PD->multiple_threads, set globals
9251         __pthread_multiple_threads and __libc_multiple_threads.
9252         * sysdeps/pthread/createthread.c (create_thread): Likewise.
9253         * sysdeps/i386/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it.
9254         * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Likewise.
9256         * descr.h (struct pthread): Conditionalize first member on
9257         [!TLS_DTV_AT_TP].  Replace the `header' member with an anonymous union
9258         containing an anonymous tcbhead_t.  Move `list' member out.
9259         [TLS_MULTIPLE_THREADS_IN_TCB]: Define a `multiple_threads' member.
9260         * allocatestack.c: Remove use of `header.data.' prefix.
9261         * pthread_create.c: Likewise.
9262         * init.c (__pthread_initialize_minimal_internal): Likewise.
9263         * sysdeps/pthread/createthread.c (create_thread): Likewise.
9264         * sysdeps/i386/tls.h (INSTALL_DTV): Add parens.
9265         (THREAD_SELF, THREAD_DTV, INSTALL_NEW_DTV): No `header.data.' prefix.
9266         * sysdeps/x86_64/tls.h: Likewise.
9267         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
9268         (SINGLE_THREAD_P): Likewise.
9269         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
9270         (SINGLE_THREAD_P): Likewise.
9271         * sysdeps/i386/tls.h (tcbhead_t): Remove `list' member.
9272         * sysdeps/s390/tls.h (tcbhead_t): Likewise.
9274 2003-03-09  Ulrich Drepper  <drepper@redhat.com>
9276         * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: New file.
9278         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
9279         * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
9281         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix many
9282         leftovers from the ia32 code.
9284         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Remove unneccessary
9285         memory load.
9286         (clear_once_control): Don't load %esi.
9288         * sysdeps/x86_64/tls.h: Remove all traces of segment descriptor
9289         handling.
9291         * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
9293         * sysdeps/unix/sysv/linux/s390/createthread.c: Moved to...
9294         * sysdeps/unix/sysv/linux/createthread.c: ...here.
9296         * Makefile (tests): Add tst-cond10.
9297         * tst-cond10.c: New file.
9299 2003-03-08  Ulrich Drepper  <drepper@redhat.com>
9301         * tst-tls2.c (do_test): Add TEMP_FAILURE_RETRY around sem_wait call.
9302         * tst-signal3.c (do_test): Likewise.
9303         * tst-sem5.c (do_test): Likewise.
9304         * tst-kill6.c (do_test): Likewise.
9305         * tst-tls3.c (do_test): Likewise.  Include <errno.h>.
9307         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use add/sub instead
9308         of inc/dec.
9309         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
9310         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise
9311         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
9312         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
9313         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
9314         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
9315         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
9316         Likewise.
9317         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
9318         Likewise.
9319         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
9320         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
9321         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9322         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
9323         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
9324         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
9325         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
9326         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
9328         * allocatestack.c (allocate_stack): If mprotect() fails free the
9329         TLS memory.
9331 2003-03-07  Ulrich Drepper  <drepper@redhat.com>
9333         * sysdeps/i386/i486/bits/atomic.h: Fix a few unused definitions.
9335         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove all trace of
9336         lll_wake_tid.  This was used only to work around kernel limits in
9337         the early days.
9338         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
9339         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Likewise.
9340         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
9341         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
9343         * init.c (__static_tls_align_m1): Renamed from __static_tls_align.
9344         (__pthread_initialize_minimal_internal): Change initialization of
9345         __static_tls_align_m1 appropriately.
9346         * pthreadP.h (__static_tls_align_m1): Renamed from
9347         __static_tls_align.
9348         * allocatestack.c (allocate_stack): Use __static_tls_align_m1
9349         instead of __static_tls_align-1.
9351 2003-03-04  Ulrich Drepper  <drepper@redhat.com>
9353         * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
9355         * pthread_create.c: Define __pthread_keys using nocommon
9356         attribute, not by placing it explicitly in bss.
9357         Remove DEFINE_DEALLOC definition.  Not needed anymore.
9359         * allocatestack.c: Define ARCH_MAP_FLAGS if not already defined.
9360         Use it in mmap call to allocate stacks.
9362         * sysdeps/pthread/createthread.c (create_thread): Fix comment.
9364         * pthread_create.c (start_thread): Use THREAD_SETMEM to store
9365         result of the thread function.
9367 2003-03-03  Ulrich Drepper  <drepper@redhat.com>
9369         * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: Removed.  The generic
9370         version is just fine.
9372         * sysdeps/unix/sysv/linux/libc_pthread_init.c
9373         (__pthread_child_handler): Renamed from pthread_child_handler,
9374         exported, and marked hidden.  Change all users.
9375         * sysdeps/unix/sysv/linux/register-atfork.c (free_mem): Do not
9376         free __pthread_child_handler from child list.
9378 2003-03-03  Martin Schwidefsky  <schwidefsky@de.ibm.com>
9380         * atomic.h (atomic_exchange_and_add): Return newval, not oldval.
9382         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
9383         Fix handling of cancellation and failing pthread_mutex_unlock call.
9384         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
9385         (__pthread_cond_wait): Likewise.
9387         * sysdeps/pthread/pthread_rwlock_timedrdlock.c
9388         (pthread_rwlock_timedrdlock): Fix clobber of result variable by
9389         lll_futex_timed_wait call.
9390         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
9391         (pthread_rwlock_timedwrlock): Likewise.
9393         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
9394         Don't define lll_unlock_wake_cb and ___lll_timedwait_tid in libc.so.
9395         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Remove XXX comments.
9397         * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Fix
9398         check of lll_futex_wake return value.
9400 2003-03-03  Roland McGrath  <roland@redhat.com>
9402         * forward.c: Fix typo in __pthread_attr_init_2_0 compat_symbol decl.
9404         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
9405         Argument to ptr___pthread_cleanup_upto is __jmp_buf, not jmp_buf.
9406         * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
9408 2003-03-02  Ulrich Drepper  <drepper@redhat.com>
9410         * sysdeps/pthread/timer_create.c (timer_create): Return correct
9411         error for CPU clocks.
9413         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
9414         _POSIX_MONOTONIC_CLOCK.
9415         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
9417         * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
9418         recent kernels.
9420 2003-03-01  Ulrich Drepper  <drepper@redhat.com>
9422         * descr.h (struct pthread): Move cleanup field to the front.
9424 2003-03-01  Roland McGrath  <roland@redhat.com>
9426         * sem_open.c (sem_open): Braino fix.
9428 2003-03-01  Ulrich Drepper  <drepper@redhat.com>
9430         * sysdeps/i386/tcb-offsets.sym: Add CLEANUP and CLEANUP_PREV.
9431         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Inline
9432         __pthread_cleanup_pop functionality.
9433         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9435         * descr.h (struct pthread): Move tid field to the front now that
9436         it is often used.
9438         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S
9439         (__lll_mutex_timedlock_wait): Remove.
9440         (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
9441         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
9442         (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
9443         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
9444         (lll_unlock_wake_cb): Don't save and restore %esi.
9445         (__lll_unlock_wake): Add alignment.  Don't save, load, and restore
9446         %esi.
9447         (__lll_timedwait_tid): Add alignment.
9448         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
9449         (__lll_unlock_wake): Add alignment.  Don't save, load, and restore
9450         %esi.
9451         (__lll_timedwait_tid): Removed.
9452         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
9453         (__pthread_cond_broadcast): Don't save, load, and restore %esi.
9454         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
9455         (pthread_barrier_wait): Don't save, load, and restore %esi for
9456         last thread.
9457         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
9458         (__pthread_cond_signal): Don't save, load, and restore %esi.
9459         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
9460         (__pthread_rwlock_unlock): Don't save, load, and restore %esi.
9461         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
9462         Don't save, load, and restore %esi.
9464 2003-02-27  Ulrich Drepper  <drepper@redhat.com>
9466         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
9467         Release lock before waking up the waiters.
9469         * tst-exit1.c (do_test): Don't start more than one thread in parallel.
9471         * tst-rwlock9.c (writer_thread): Correct adding TIMEOUT.
9472         (reader_thread): Likewise.
9474         * sysdeps/pthread/pthread_rwlock_unlock.c
9475         (__pthread_rwlock_unlock): Release internal lock early.  Don't try
9476         to wake up readers if there are none.
9478         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
9479         Release internal lock before wake threads.
9481 2003-02-26  Ulrich Drepper  <drepper@redhat.com>
9483         * Makefile (tests): Add tst-rwlock10 and tst-rwlock11.
9484         * tst-rwlock8.c: Initialize lock with INIT.  Allow INIT to be
9485         predefined.
9486         * tst-rwlock9.c: Likewise.
9487         * tst-rwlock10.c: New file.
9488         * tst-rwlock11.c: New file.
9490         * Makefile (tests): Add tst-dlsym1.
9491         * tst-dlsym1.c: New file.
9493         * init.c (__pthread_initialize_minimal_internal): Set
9494         GL(dl_error_catch_tsd) to __libc_dl_error_tsd.
9495         * Versions (libc:GLIBC_PRIVATE): Export __libc_dl_error_tsd.
9497 2003-02-24  Ulrich Drepper  <drepper@redhat.com>
9499         * sem_open.c (sem_open): Fix handling of O_CREAT without O_EXCL.
9501         * tst-cond2.c: Fix sychronization with child.
9503         * tst-rwlock8.c (reader_thread): Remove unused variable.
9505         * Makefile: Add rules to build and run tst-tls3.
9506         * tst-tls3.c: New file.
9507         * tst-tls3mod.c: New file.
9509         * Makefile (tests): Add tst-rwlock8 and tst-rwlock9.
9510         * tst-rwlock8.c: New file.
9511         * tst-rwlock9.c: New file.
9512         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Fix
9513         complete broken rwlock implementation.
9514         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
9515         Likewise.
9516         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
9517         Likewise.
9518         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
9519         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
9520         * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
9521         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
9522         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
9523         * sysdeps/pthread/pthread_rwlock_unlock.c: Likewise.
9524         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
9526 2003-02-23  Roland McGrath  <roland@redhat.com>
9528         * Makefile (nptl-version): Change regexp so case sensitivity is ok.
9530 2003-02-23  Ulrich Drepper  <drepper@redhat.com>
9532         * Makefile (tests): Add tst-context1.
9533         * tst-context1.c: New file.
9535         * Makefile (tests): Add tst-tls1 and tst-tls2.
9536         * tst-tls1.c: New file.
9537         * tst-tls2.c: New file.
9539         * libc-cancellation.c (__libc_enable_asynccancel): Correct test
9540         for failed cmpxchg.
9542         * pthread_create.c (start_thread): Set EXITING_BIT early.
9544         * sysdeps/i386/tls.h (THREAD_GETMEM): Mark asm as volatile.
9545         (THREAD_GETMEM_NC): Likewise.
9547 2003-02-22  Ulrich Drepper  <drepper@redhat.com>
9549         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Shave
9550         off 3 more bytes by using offset-less instructions when possible.
9552         * Makefile: Add dependency for $(objpfx)version.d.
9554         * eintr.c (eintr_source): Add unnecessary return but the compiler
9555         insists.
9557         * tst-kill3.c: Include <unistd.h>.
9559 2003-02-21  Roland McGrath  <roland@redhat.com>
9561         * pthread_create.c (start_thread): Call __libc_thread_freeres.
9563 2003-02-21  Ulrich Drepper  <drepper@redhat.com>
9565         * Makefile (tests): Add tst-eintr1.
9566         (distribute): Add eintr.c.
9567         * tst-eintr1.c: New file.
9568         * eintr.c: New file.
9570         * pthread_cancel.c (pthread_cancel): Use tkill directly.
9572         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill):
9573         Disallow sending SIGCANCEL.
9575         * Makefile (tests): Remove tst-basic7.  Add tst-kill1, tst-kill2,
9576         tst-kill3, tst-kill4, tst-kill5, tst-kill6.
9577         * tst-kill1.c: New file.
9578         * tst-kill2.c: New file.
9579         * tst-kill3.c: New file.
9580         * tst-kill5.c: New file.
9581         * tst-kill6.c: New file.
9582         * tst-basic7.c: Renamed to...
9583         * tst-kill4.c: ...this.
9585 2003-02-21  Roland McGrath  <roland@redhat.com>
9587         * Makefile (install-lib-ldscripts): New variable.
9589 2003-02-21  Ulrich Drepper  <drepper@redhat.com>
9591         * pthreadP.h: Define INVALID_TD_P and INVALID_NOT_TERMINATED_TD_P.
9592         * pthread_cancel.c: Use INVALID_TD_P.
9593         * pthread_detach.c: Likewise.
9594         * pthread_getschedparam.c: Likewise.
9595         * pthread_setschedparam.c: Likewise.
9596         * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
9597         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
9598         * pthread_join.c: Use INVALID_NOT_TERMINATED_TD_P.
9599         * pthread_timedjoin.c: Likewise.
9601         * tst-basic7.c: Include <signal.h>.
9603         * pthread_join.c (pthread_join): Limited checking for invalid
9604         descriptors.
9605         * pthread_timedjoin.c (pthread_timedjoin_np): Likewise.
9607 2003-02-20  Ulrich Drepper  <drepper@redhat.com>
9609         * pthread_create.c (deallocate_tsd): Reset found_nonzero at the
9610         beginning of the loop.  Clear the entire first block of TSD.
9611         * Makefile (tests): Add tst-key4.
9612         * tst-key4.c: New file.
9614 2003-02-18  Ulrich Drepper  <drepper@redhat.com>
9616         * Makefile (tests): Add tst-basic7.
9617         * tst-basic7.c: New file.
9619         * pthread_create.c (deallocate_tsd): Mark as internal_function.
9620         Add some more __builtin_expect.
9622         * pthreadP.h: Define dummy version of DEBUGGING_P.
9624 2003-02-17  Ulrich Drepper  <drepper@redhat.com>
9626         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remnove
9627         _POSIX_THREAD_PRIORITY_SCHEDULING.
9628         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
9629         _XOPEN_REALTIME_THREADS.
9630         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
9632         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): The
9633         kernel returns EINVAL for PID <= 0, work around it.
9635         * Makefile (tests): Add tst-signal5.
9636         * tst-signal5.c: New file.
9638         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
9639         and LOGIN_NAME_MAX.
9641         * tst-cancel1.c (tf): Block all signals.
9643         * Makefile (tests): Add tst-basic6.
9644         * tst-basic6.c: New file.
9646         * tst-basic1.c: Add test for process ID.
9648         * Makefile (tests): Add tst-cancel10.
9649         * tst-cancel10.c: New file.
9651         * Makefile (tests): Add tst-signal4.
9652         * tst-signal4.c: New file.
9654         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use
9655         __sigismember instead of sigismember.  Add __builtin_expect.
9657 2003-02-16  Ulrich Drepper  <drepper@redhat.com>
9659         * tst-attr1.c (do_test): Add tests for pthread_setcanceltype,
9660         pthread_setcancelstate, and pthread_rwlock_setpshared.
9662         * tst-cancel7.c (do_test): Make sure the pid file exists before
9663         canceling the thread.
9665         * tst-rwlock6.c: More pthread_rwlock_timedwrlock and
9666         pthread_rwlock_timedrdlock tests.
9667         * tst-rwlock7.c: More pthread_rwlock_timedwrlock tests.
9668         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
9669         Check for invalid tv_nsec field.
9670         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
9671         Likewise.
9673         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Protect
9674         recursive mutex of overflow.
9676         * tst-attr1.c (do_test): Add test for pthread_mutexattr_setpshared.
9678         * libc-cancellation.c (__libc_enable_asynccancel): Rewrite to avoid
9679         going into an endless loop.
9680         * Makefile (tests): Add tst-cancel9.
9681         * tst-cancel9.c: New file.
9683         * pthread_cancel.c (pthread_cancel): Use the result of __pthread_kill.
9685 2003-02-15  Ulrich Drepper  <drepper@redhat.com>
9687         * tst-mutex5.c (do_test): Add more timedlock tests.
9689         * tst-mutex2.c: Tests of trylock and unlock with ERROR mutexes.
9690         * tst-mutex3.c (do_test): Add tests for trylock with RECURSIVE mutexes.
9692         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
9693         use INLINE_SYSCALL.  Error number is returned, not -1.
9695         * pthreadP.h: Mark declarations of __find_in_stack_list, __free_tcb,
9696         and __deallocate_stack with internal_function.
9697         * pthread_create.c: Adjust definitions appropriately.
9698         * allocatestack.c: Likewise.
9700         * pthread_join.c: Add one more __builtin_expect.
9701         * pthread_timedjoin.c: Likewise.
9703         * pthread_getspecific.c (__pthread_getspecific): Clear data->data
9704         not data of sequence number does not match.
9705         Add one __builtin_expect.
9707         * Makefile (tests): Add tst-clock1.
9708         * tst-clock1.c: New file.
9710         * pthread_setconcurrency.c (pthread_setconcurrency): Fail for
9711         negative arguments.
9712         * Makefile (tests): Add tst-basic5.
9713         * tst-basic5.c: New file.
9715 2003-02-14  Ulrich Drepper  <drepper@redhat.com>
9717         * Makefile (tests): Add tst-basic4.
9718         * tst-basic4.c: New file.
9720         * pthreadP.h: Add declaraction for __nptl_nthreads.
9721         * pthread_create.c: Define __nptl_nthreads
9722         (start_thread): Increment __nptl_nthreads at beginning.  Decrement
9723         after thread is done.  If then zero, call exit(0).
9724         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
9725         Add ptr_nthreads.  Define HAVE_PTR_NTHREADS.
9726         * init.c (pthread_functions): Initialize ptr_nthreads.
9727         * allocatestack.c (nptl_nthreads): Remove definition and all uses.
9728         (__reclaim_stacks): Decrement __nptl_nthreads.
9729         * sysdeps/pthread/Makefile [$(subdir)==csu] (CFLAGS-libc-start.c):
9730         Define.
9731         * Makefile (tests): Add tst-basic3.
9732         * tst-basic3.c: New file.
9734         * descr.h: Define CANCELING_BIT and CANCELING_BITMASK.  Introduce
9735         after CANCELTYPE_BIT, move the other bits up.  Update CANCEL_RESTMASK.
9736         * init.c (sigcancel_handler): Also set CANCELING_BITMASK bit in newval.
9737         * pthread_cancel.c (pthread_cancel): Likewise.  Also set CANCELING_BIT
9738         if asynchronous canceling is enabled.
9739         * pthread_join.c (pthread_join): When recognizing circular joins,
9740         take into account the other thread might be already canceled.
9741         * Makefile (tests): Add tst-join5.
9742         * tst-join5.c: New file.
9744         * Makefile (tests): Add tst-join4.
9745         * tst-join4.c: New file.
9747 2003-02-13  Ulrich Drepper  <drepper@redhat.com>
9749         * tst-cond4.c (main): Add test of pthread_attr_getpshared.
9751 2003-02-13  Martin Schwidefsky  <schwidefsky@de.ibm.com>
9753         * sysdeps/s390/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM,
9754         THREAD_SETMEM_NC): Use passed descr instead of THREAD_SELF.
9755         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind): Avoid
9756         warning.
9757         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Include <sys/time.h>
9758         to avoid warning.
9759         * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Return
9760         error if lll_futex_wake failed.
9762 2003-02-13  Ulrich Drepper  <drepper@redhat.com>
9764         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Fix
9765         handling of cancellation and failung pthread_mutex_unlock call.
9766         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9767         * Makefile (tests): Add tst-cond8 and tst-cond9.
9768         * tst-cond8.c: New file.
9769         * tst-cond9.c: New file.
9771         * tst-cond7.c (do_test): Unlock the mutex before canceling the thread.
9773         * sysdeps/pthread/pthread.h: Add missing initializers.  Protect
9774         non-standard initializers with __USE_GNU.
9776         * Makefile (tests): Add tst-cleanup3.
9777         * tst-cleanup3.c: New file.
9779 2003-02-12  Ulrich Drepper  <drepper@redhat.com>
9781         * Makefile (tests): Add tst-attr1 and tst-attr2.
9782         * tst-attr1.c: New file.
9783         * tst-attr2.c: New file.
9785         * Makefile: Add rules to build and run tst-atfork2 test.
9786         * tst-atfork2.c: New file.
9787         * tst-atfork2mod.c: New file.
9789         * sysdeps/unix/sysv/linux/unregister-atfork.c
9790         (__unregister_atfork): Free the memory allocated for the handlers
9791         after removing them from the lists.
9793         * sysdeps/unix/sysv/linux/register-atfork.c: Define memeory
9794         cleanup function.
9796         * tst-atfork1.c (do_test): Wait for the child we forked.
9797         Report error in child.
9799         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Fix comment.
9801         * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
9803 2003-02-10  Ulrich Drepper  <drepper@redhat.com>
9805         * Makefile (tests): Add tst-cancel8.
9806         * tst-cancel8.c: New file.
9808         * sysdeps/unix/sysv/linux/i386/pthread_once.S (clear_once_control): Fix
9809         clearing of control variable.
9810         * Makefile (tests): Add tst-once3 and tst-once4.
9811         * tst-once3.c: New file.
9812         * tst-once4.c: New file.
9814 2003-02-08  kaz Kojima  <kkojima@rr.iij4u.or.jp>
9816         * sysdeps/sh/Makefile: New file.
9817         * sysdeps/sh/bits/atomic.h: New file.
9818         * sysdeps/sh/pthread_spin_init.c: New file.
9819         * sysdeps/sh/pthread_spin_lock.c: New file.
9820         * sysdeps/sh/pthread_spin_trylock.S: New file.
9821         * sysdeps/sh/pthread_spin_unlock.S: New file.
9822         * sysdeps/sh/pthreaddef.h: New file.
9823         * sysdeps/sh/tcb-offsets.sym: New file.
9824         * sysdeps/sh/td_ta_map_lwp2thr.c: New file.
9825         * sysdeps/sh/tls.h: New file.
9826         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: New file.
9827         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: New file.
9828         * sysdeps/unix/sysv/linux/sh/createthread.c: New file.
9829         * sysdeps/unix/sysv/linux/sh/fork.c: New file.
9830         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: New file.
9831         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: New file.
9832         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h: New file.
9833         * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: New file.
9834         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: New file.
9835         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: New file.
9836         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: New file.
9837         * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: New file.
9838         * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
9839         * sysdeps/unix/sysv/linux/sh/pt-vfork.S: New file.
9840         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: New file.
9841         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: New file.
9842         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: New file.
9843         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: New file.
9844         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: New file.
9845         * sysdeps/unix/sysv/linux/sh/pthread_once.S: New file.
9846         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: New file.
9847         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: New file.
9848         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: New file.
9849         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: New file.
9850         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: New file.
9851         * sysdeps/unix/sysv/linux/sh/sem_post.S: New file.
9852         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: New file.
9853         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: New file.
9854         * sysdeps/unix/sysv/linux/sh/sem_wait.S: New file.
9855         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
9857 2003-02-08  Ulrich Drepper  <drepper@redhat.com>
9859         * tst-cond2.c: Rearrange code to not rely on behavior undefined
9860         according to POSIX.
9862         * tst-basic2.c (do_test): Lock mutex before creating the thread.
9864 2003-02-07  Ulrich Drepper  <drepper@redhat.com>
9866         * sysdeps/x86_64/tls.h: Remove unnecessary macros, left over from x86.
9867         (TLS_GET_FS): New #define.
9868         (TLS_SET_FS): New #define.
9869         Correct value of __NR_set_thread_area.
9871         * sysdeps/x86_64/td_ta_map_lwp2thr.c: New file.
9873 2003-02-06  Ulrich Drepper  <drepper@redhat.com>
9875         * Makefile (tests): Add tst-popen1.
9876         * tst-popen1.c: New file.
9878         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Remove wrong
9879         but inactive generalization.
9880         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9881         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
9882         Minor optimization, remove one instruction.
9883         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
9885 2003-02-04  Martin Schwidefsky  <schwidefsky@de.ibm.com>
9887         * sysdeps/unix/sysv/linux/s390/fork.c: Correct order of parameters.
9889 2003-01-31  Martin Schwidefsky  <schwidefsky@de.ibm.com>
9891         * init.c (__NR_set_tid_address): Add #ifdef for s390.
9892         * sysdeps/pthread/pthread_barrier_wait.c: New file.
9893         * sysdeps/pthread/pthread_cond_broadcast.c: New file.
9894         * sysdeps/pthread/pthread_cond_signal.c: New file.
9895         * sysdeps/pthread/pthread_cond_timedwait.c: New file.
9896         * sysdeps/pthread/pthread_cond_wait.c: New file.
9897         * sysdeps/pthread/pthread_rwlock_rdlock.c: New file.
9898         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: New file.
9899         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: New file.
9900         * sysdeps/pthread/pthread_rwlock_unlock.c: New file.
9901         * sysdeps/pthread/pthread_rwlock_wrlock.c: New file.
9902         * sysdeps/s390/Makefile: New file.
9903         * sysdeps/s390/bits/atomic.h: New file.
9904         * sysdeps/s390/pthread_spin_init.c: New file.
9905         * sysdeps/s390/pthread_spin_lock.c: New file.
9906         * sysdeps/s390/pthread_spin_trylock.c: New file.
9907         * sysdeps/s390/pthread_spin_unlock.c: New file.
9908         * sysdeps/s390/pthreaddef.h: New file.
9909         * sysdeps/s390/tcb-offsets.sym: New file.
9910         * sysdeps/s390/td_ta_map_lwp2thr.c: New file.
9911         * sysdeps/s390/tls.h: New file.
9912         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: New file.
9913         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: New file.
9914         * sysdeps/unix/sysv/linux/s390/createthread.c: New file.
9915         * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: New file.
9916         * sysdeps/unix/sysv/linux/s390/fork.c: New file.
9917         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: New file.
9918         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
9919         * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: New file.
9920         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: New file.
9921         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: New file.
9922         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: New file.
9923         * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: New file.
9924         * sysdeps/unix/sysv/linux/s390/pthread_once.c: New file.
9925         * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: New file.
9926         * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: New file.
9927         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
9928         * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
9929         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: New file.
9930         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
9931         * sysdeps/unix/sysv/linux/s390/sem_post.c: New file.
9932         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: New file.
9933         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
9934         * sysdeps/unix/sysv/linux/s390/sem_wait.c: New file.
9936 2003-02-04  Ulrich Drepper  <drepper@redhat.com>
9938         * atomic.h: Add a couple more default implementations.
9939         (atomic_compare_and_exchange_acq): Use
9940         __arch_compare_and_exchange_32_acq in return value definition.  It
9941         always exists.
9942         (atomic_bit_set): Renamed from atomic_set_bit.
9943         Add missing atomic_ prefixes.
9945         * sysdeps/pthread/bits/libc-lock.h (__libc_once): In case no
9946         thread library is available, use correct value to mark initialized
9947         once variable.
9949 2003-02-03  Ulrich Drepper  <drepper@redhat.com>
9951         * allocatestack.c (allocate_stack): Use __getpagesize instead of
9952         __sysconf to determine pagesize.
9954         * pthread_create.c: Include <atomic.h>.
9955         * allocatestack.c (allocate_stack): Implement coloring of the
9956         allocated stack memory.  Rename pagesize to pagesize_m1.  It's the
9957         size minus one.  Adjust users.
9958         * sysdeps/i386/i686/Makefile: New file.
9960 2003-02-02  Ulrich Drepper  <drepper@redhat.com>
9962         * allocatestack.c: Improve comment throughout the file.
9964         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
9965         (__lll_lock_wait): Add branch prediction.
9966         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
9967         (__lll_lock_wait): Likewise.
9968         (lll_unlock_wake_cb): Removed.
9970 2003-01-31  Ulrich Drepper  <drepper@redhat.com>
9972         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Remove
9973         _POSIX_THREAD_PRIORITY_SCHEDULING.
9975 2003-01-30  Jakub Jelinek  <jakub@redhat.com>
9977         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
9978         Fix return type of ptr___pthread_getspecific.
9980 2003-01-29  Ulrich Drepper  <drepper@redhat.com>
9982         * Makefile (tests): Add tst-umask1.
9983         (tst-umask1-ARGS): Define.
9984         * tst-umask1.c: New file.
9986 2003-01-28  Ulrich Drepper  <drepper@redhat.com>
9988         * Makefile (libpthread-routines): Remove lowlevelrwlock.  Add
9989         pthread_rwlock_rdlock, pthread_rwlock_timedrdlock,
9990         pthread_rwlock_wrlock, pthread_rwlock_timedwrlock, and
9991         pthread_rwlock_unlock.
9992         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Removed
9993         * sysdeps/unix/sysv/linux/i386/i586/lowlevelrwlock.S: Removed
9994         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Removed
9995         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: New file.
9996         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
9997         New file.
9998         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: New file.
9999         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
10000         New file.
10001         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: New file.
10002         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_rdlock.S: New file.
10003         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedrdlock.S:
10004         New file.
10005         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_wrlock.S: New file.
10006         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedwrlock.S:
10007         New file.
10008         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_unlock.S: New file.
10009         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_rdlock.S: New file.
10010         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedrdlock.S:
10011         New file.
10012         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_wrlock.S: New file.
10013         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedwrlock.S:
10014         New file.
10015         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_unlock.S: New file.
10017         * Makefile (libpthread-routines): Remove lowlevelcond and
10018         lowlevelsem.  Add sem_wait, sem_trywait, sem_timedwait, sem_post,
10019         pthread_cond_wait, pthread_cond_timedwait, pthread_cond_signal,
10020         and pthread_cond_broadcast.
10021         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Removed
10022         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Removed
10023         * sysdeps/unix/sysv/linux/i386/i586/lowlevelsem.S: Removed
10024         * sysdeps/unix/sysv/linux/i386/i586/lowlevelcond.S: Removed
10025         * sysdeps/unix/sysv/linux/i386/i686/lowlevelsem.S: Removed
10026         * sysdeps/unix/sysv/linux/i386/i686/lowlevelcond.S: Removed
10027         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: New file.
10028         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: New file.
10029         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: New file.
10030         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: New file.
10031         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: New file.
10032         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: New file.
10033         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: New file.
10034         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: New file.
10035         * sysdeps/unix/sysv/linux/i386/i586/sem_wait.S: New file.
10036         * sysdeps/unix/sysv/linux/i386/i586/sem_trywait.S: New file.
10037         * sysdeps/unix/sysv/linux/i386/i586/sem_timedwait.S: New file.
10038         * sysdeps/unix/sysv/linux/i386/i586/sem_post.S: New file.
10039         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_wait.S: New file.
10040         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_timedwait.S: New file.
10041         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_signal.S: New file.
10042         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_broadcast.S: New file.
10043         * sysdeps/unix/sysv/linux/i386/i686/sem_wait.S: New file.
10044         * sysdeps/unix/sysv/linux/i386/i686/sem_trywait.S: New file.
10045         * sysdeps/unix/sysv/linux/i386/i686/sem_timedwait.S: New file.
10046         * sysdeps/unix/sysv/linux/i386/i686/sem_post.S: New file.
10047         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_wait.S: New file.
10048         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S: New file.
10049         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_signal.S: New file.
10050         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_broadcast.S: New file.
10051         * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: New file.
10053         * sysdeps/unix/sysv/linux/i386/createthread.c: Define
10054         PREPARE_CREATE and TLS_VALUE with x86-specific bits.  All the rest
10055         of the code is moved to ...
10056         * sysdeps/pthread/createthread.c: ...here.  New file.
10058 2003-01-27  Ulrich Drepper  <drepper@redhat.com>
10060         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S
10061         (__new_sem_post): Clear %eax before returning.
10062         Reported by MAEDA Naoaki <maeda.naoaki@jp.fujitsu.com>.
10064         * Makefile (tests): Add tst-cleanup2.
10065         * tst-cleanup2.c: New file.
10067         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
10068         Interpret first parameter correctly.
10070 2003-01-17  Ulrich Drepper  <drepper@redhat.com>
10072         * Makefile (headers): Add bits/semaphore.h.
10074 2003-01-16  Jakub Jelinek  <jakub@redhat.com>
10076         * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize _head->sysinfo even
10077         if not SHARED.
10079 2003-01-14  Ulrich Drepper  <drepper@redhat.com>
10081         * sem_open.c (sem_open): Return SEM_FAILED if existing semaphore
10082         must be used and mapping failed.
10083         Reported by Luke Elliott <luke.elliott@activfinancial.com>.
10085         * Makefile (CFLAGS-pthread_self.os): Define this, not
10086         CFLAGS-pthread_self.c.
10088 2003-01-13  Ulrich Drepper  <drepper@redhat.com>
10090         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Don't export
10091         lll_unlock_wake_cb.
10093         * Makefile (libpthread-routines): Add version.  Add rules to build
10094         version.os and banner.h.
10095         * version.c: New file.
10097 2003-01-13  Jakub Jelinek  <jakub@redhat.com>
10099         * pthread_mutex_lock.c (__pthread_mutex_lock_internal): Make
10100         the alias unconditional.
10101         * pthread_mutex_unlock.c  (__pthread_mutex_unlock_internal): Likewise.
10103 2003-01-13  Ulrich Drepper  <drepper@redhat.com>
10105         * Makefile (CFLAGS-pthread_self.c): New definition.
10107 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
10109         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Add
10110         INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
10111         * sysdeps/unix/sysv/linux/raise.c (raise): Likewise.
10112         * init.c (__pthread_initialize_minimal_internal): Likewise.
10114 2003-01-07  Jakub Jelinek  <jakub@redhat.com>
10116         * pthreadP.h (__pthread_cond_timedwait): Add prototype.
10118         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
10119         (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
10120         (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
10121         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
10122         (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
10123         (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
10125 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
10127         * pthreadP.h (LIBC_CANCEL_HANDLED): Define.
10128         * pt-system.c (LIBC_CANCEL_HANDLED): Add.
10129         * tst-cancel-wrappers.sh: Remove all exceptions.
10131 2003-01-05  Ulrich Drepper  <drepper@redhat.com>
10133         * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
10134         features.  Reported by Marijn Ros <marijn@mad.scientist.com>.
10136         * sysdeps/unix/sysv/linux/jmp-unwind.c: Include <pthread-functions.h>.
10137         Use __libc_pthread_functions array if SHARED.
10139         * pthreadP.h: Move pthread_cond_2_0_t definition to...
10140         * sysdeps/unix/sysv/linux/internaltypes.h: ...here.
10142         * sysdeps/pthread/bits/libc-lock.h (__libc_ptf_call): New #define.
10143         (__libc_rwlock_rdlock, __libc_rwlock_wrlock, __libc_rwlock_unlock,
10144         __libc_key_create, __libc_getspecific, __libc_setspecific): Use
10145         __libc_ptf_call instead of __libc_maybe_call.
10146         (PTF): New #define.
10147         (__libc_cleanup_region_start): Wrap function name with PTF call.
10148         (__libc_cleanup_region_end): Likewise.
10149         (__libc_cleanup_end): Likewise.
10151         * pthread_getspecific.c: Add __pthread_getspecific_internal alias.
10152         * pthread_setspecific.c: Add __pthread_setspecific_internal alias.
10153         * pthread_key_create.c: Add __pthread_key_create_internal alias.
10154         * pthreadP.h: Add prototypes.
10156         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Add
10157         __pthread_rwlock_rdlock, __pthread_rwlock_wrlock, and
10158         __pthread_rwlock_unlock aliases.
10159         * pthreadP.h: Add prototypes for new aliases.
10161         * pthreadP.h (struct pthead_functions): Moved to...
10162         * sysdeps/pthread/pthread-functions.h: ...here.  New file.
10163         * init.c (pthread_functions): Add initializers for new elements.
10165         * cleanup_defer.c: Add __pthread_cleanup_push_defer and
10166         __pthread_cleanup_pop_restore aliases.
10167         * pthreadP.h: Add prototypes.
10169         * cleanup.c: Rename _GI_pthread_cleanup_push to __pthread_cleanup_push
10170         and _GI_pthread_cleanup_pop to __pthread_cleanup_pop.
10171         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Adjust caller.
10172         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
10173         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
10174         * pthreadP.h: Adjust prototypes and callers.
10176 2003-01-04  Ulrich Drepper  <drepper@redhat.com>
10178         * Makefile (tests): Add tst-cancel7.
10179         (tst-cancel7-ARGS): New variable.
10180         * tst-cancel7.c: New file.
10182         * old_pthread_cond_broadcast.c: Optimize initialization a bit to work
10183         around gcc defficiencies.
10184         * old_pthread_cond_signal.c: Likewise.
10185         * old_pthread_cond_timedwait.c: Likewise.
10186         * old_pthread_cond_wait.c: Likewise.
10188         * pthreadP.h (pthread_cond_2_0_t): Remove unneeded lock element.
10190 2003-01-03  Ulrich Drepper  <drepper@redhat.com>
10192         * Makefile (tests): Add tst-cond7.
10193         * tst-cond7.c: New file.
10195         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
10196         (condvar_cleanup): Get condvar address from the right place.
10198         * atomic.h: Correct definitions of atomic_full_barrier,
10199         atomic_read_barrier, atomic_write_barrier.
10201         * old_pthread_cond_broadcast.c: Make memory allocate and initialization
10202         race-free.
10203         * old_pthread_cond_signal.c: Likewise.
10204         * old_pthread_cond_timedwait.c: Likewise.
10205         * old_pthread_cond_wait.c: Likewise.
10207 2003-01-03  Jakub Jelinek  <jakub@redhat.com>
10209         * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
10211 2003-01-03  Ulrich Drepper  <drepper@redhat.com>
10213         * pthreadP.h (pthread_cond_2_0_t): New type.
10214         (struct pthread_functions): Use new type for 2.0 condvar callbacks.
10215         Use new type for the 2.0 condvar function prototypes.
10216         * forward.c: Use pthread_cond_2_0_t for 2.0 condvar functions.
10217         * old_pthread_cond_init.c: Use pthread_cond_2_0_t for condvar
10218         parameter.
10219         * old_pthread_cond_destroy.c: Likewise.
10220         * old_pthread_cond_broadcast.c: Likewise.  Lock appropriately.
10221         * old_pthread_cond_signal.c: Likewise.
10222         * old_pthread_cond_timedwait.c: Likewise.
10223         * old_pthread_cond_wait.c: Likewise.
10225         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
10226         (__pthread_cond_wait): Don't save cancellation mode and seq value
10227         in same location.
10229         * herrno.c (__h_errno_location): Don't define as weak.
10231 2003-01-02  Jakub Jelinek  <jakub@redhat.com>
10233         * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
10234         pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
10235         and pthread_cond_wait.
10236         * old_pthread_cond_broadcast.c (__old_pthread_cond_broadcast):
10237         Renamed to...
10238         (__pthread_cond_broadcast_2_0): ... this.
10239         * old_pthread_cond_destroy.c (__old_pthread_cond_destroy):
10240         Renamed to...
10241         (__pthread_cond_destroy_2_0): ... this.
10242         * old_pthread_cond_init.c (__old_pthread_cond_init):
10243         Renamed to...
10244         (__pthread_cond_init_2_0): ... this.
10245         * old_pthread_cond_signal.c (__old_pthread_cond_signal):
10246         Renamed to...
10247         (__pthread_cond_signal_2_0): ... this.
10248         * old_pthread_cond_wait.c (__old_pthread_cond_wait):
10249         Renamed to...
10250         (__pthread_cond_wait_2_0): ... this.
10251         * pthread_cond_destroy.c: Include shlib-compat.h.
10252         (pthread_cond_destroy): Change strong_alias into versioned_symbol.
10253         * pthread_cond_init.c: Include shlib-compat.h.
10254         (pthread_cond_init): Change strong_alias into versioned_symbol.
10255         * pthreadP.h (struct pthread_functions): Rename ptr_pthread_cond_*
10256         fields to ptr___pthread_cond_* and add ptr___pthread_cond_*_2_0
10257         fields.
10258         (__pthread_cond_broadcast_2_0, __pthread_cond_destroy_2_0,
10259         __pthread_cond_init_2_0, __pthread_cond_signal_2_0,
10260         __pthread_cond_wait_2_0): New prototypes.
10261         (__old_pthread_cond_broadcast, __old_pthread_cond_destroy,
10262         __old_pthread_cond_init, __old_pthread_cond_signal,
10263         __old_pthread_cond_wait): Removed.
10264         * init.c: Include shlib-compat.h.
10265         (pthread_functions): Guard ptr___pthread_attr_init_2_0
10266         initialization with SHLIB_COMPAT (GLIBC_2_0, GLIBC_2_1).
10267         Rename ptr_pthread_cond_* to ptr___pthread_cond_*, initialize
10268         ptr___pthread_cond_*_2_0 fields.
10269         * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
10270         pthread_cond_*@GLIBC_2.0 compatibility symbols.
10272         * sysdeps/pthread/sigaction.c (SIGCANCEL): Only define if
10273         LIBC_SIGACTION was not yet defined.
10274         [!defined LIBC_SIGACTION]: Define LIBC_SIGACTION, #include self.
10275         [!defined LIBC_SIGACTION] (__sigaction): New function and
10276         libc_hidden_weak.
10277         [!defined LIBC_SIGACTION] (sigaction): New weak_alias.
10278         [defined LIBC_SIGACTION]: #include_next <sigaction.c>.
10280 2003-01-02  Jakub Jelinek  <jakub@redhat.com>
10282         * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
10284 2003-01-02  Ulrich Drepper  <drepper@redhat.com>
10286         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
10287         New, larger type definition.
10288         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: New condvar
10289         implementation.
10290         * Versions [libpthread]: Add definitions for new pthread_cond_*
10291         interfaces for version GLIBC_2.3.2.
10292         * pthread_cond_init.c: Update initialization for new type definition.
10293         * Makefile (libpthread-routines): Remove pthread_cond_wait,
10294         pthread_cond_timedwait, pthread_cond_signal, and
10295         pthread_cond_broadcast.  Add old_pthread_cond_init,
10296         old_pthread_cond_destroy, old_pthread_cond_wait,
10297         old_pthread_cond_timedwait, old_pthread_cond_signal, and
10298         old_pthread_cond_broadcast.
10299         * old_pthread_cond_broadcast.c: New file.
10300         * old_pthread_cond_destroy.c: New file.
10301         * old_pthread_cond_init.c: New file.
10302         * old_pthread_cond_signal.c: New file.
10303         * old_pthread_cond_timedwait.c: New file.
10304         * old_pthread_cond_wait.c: New file.
10305         * pthreadP.h: Add prototypes for the compatibility interfaces.
10307         * pthread_cond_destroy.c: Don't include <errno.h>.
10309 2003-01-01  Ulrich Drepper  <drepper@redhat.com>
10311         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Avoid
10312         unnecessary zero offset when addressing MUTEX.
10314 2002-12-31  Ulrich Drepper  <drepper@redhat.com>
10316         * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
10317         __register_atfork.
10318         * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
10319         for __register_atfork.
10321 2002-12-31  Jakub Jelinek  <jakub@redhat.com>
10323         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use __ASSEMBLER__
10324         instead of ASSEMBLER test macro.
10326         * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
10327         __libc_current_sigrtmax): Add libc_hidden_def.
10329         * sysdeps/pthread/list.h: Remove assert.h include.
10331 2002-12-31  Ulrich Drepper  <drepper@redhat.com>
10333         * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Use
10334         __pthread_initialize_minimal_internal not
10335         __pthread_initialize_minimal.
10337 2002-12-30  Ulrich Drepper  <drepper@redhat.com>
10339         * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Mark
10340         __pthread_initialize_minimal as hidden.
10342         * init.c (__pthread_initialize_minimal_internal): Don't mark as
10343         constructor.
10345 2002-12-31  Jakub Jelinek  <jakub@redhat.com>
10347         * Makefile ($(inst_libdir)/libpthread.so): Depend on
10348         $(common-objpfx)format.lds, include that into the output script.
10349         Fix comment.
10350         (extra-B-pthread.so): Change linuxthreads/ into nptl/.
10352 2002-12-28  Andreas Jaeger  <aj@suse.de>
10354         * sysdeps/unix/sysv/linux/xstatconv.c (xstat_conv): Adjust for
10355         nsec resolution changes.
10356         (xstat64_conv): Likewise.
10357         (xstat32_conv): Likewise.
10358         * sysdeps/unix/sysv/linux/kernel_stat.h: Add nsec resolution for
10359         struct kernel_stat.
10360         * sysdeps/unix/sysv/linux/bits/stat.h: Add nsec resolution for
10361         structs stat and stat64.
10362         * time/time.h (__timespec_defined): Define for __USE_MISC.
10363         * io/sys/stat.h [__USE_MISC]: Define __need_timespec for struct stat.
10365 2002-12-30  Jakub Jelinek  <jakub@redhat.com>
10367         * forward.c (FORWARD2): Renamed from FORWARD3.  Remove unused export
10368         argument.
10369         (pthread_attr_init_2_0, pthread_attr_init_2_1): Use FORWARD macro.
10370         (pthread_exit): Use strong_alias to avoid warnings.
10371         * pthreadP.h (struct pthread_functions): Rename ptr_pthread_exit
10372         and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
10373         ptr___pthread_attr_init_2_*.
10374         * init.c (pthread_functions): Adjust.
10376 2002-12-29  Ulrich Drepper  <drepper@redhat.com>
10378         * forward.c: Make all functions available by default again.  It
10379         caused too much trouble.
10381         * pt-siglongjmp.c: Removed.
10383 2002-12-28  Jakub Jelinek  <jakub@redhat.com>
10385         * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
10386         (SYSINFO_OFFSET, MULTIPLE_THREADS_OFFSET): Remove.
10387         * sysdeps/i386/Makefile: New file.
10388         * sysdeps/i386/tcb-offsets.sym: New file.
10389         * sysdeps/pthread/tcb-offsets.h: New file.
10390         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
10391         Remove MULTIPLE_THREADS_OFFSET and SYSINFO_OFFSET checks.
10393         * sysdeps/unix/sysv/linux/Versions [libc] (GLIBC_PRIVATE): Move
10394         __register_atfork...
10395         (GLIBC_2.3.2): ...here.
10397 2002-12-28  Ulrich Drepper  <drepper@redhat.com>
10399         * sysdeps/pthread/pthread.h: Mark pthread_attr_getstackaddr and
10400         pthread_attr_setstackaddr with __attribute_deprecated__.
10402 2002-12-27  Jakub Jelinek  <jakub@redhat.com>
10404         * pt-system.c (system): Remove cancellation handling.
10405         * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
10406         cancellation routines.
10408 2002-12-28  Ulrich Drepper  <drepper@redhat.com>
10410         * descr.h: Include <dl-sysdep.h>.
10411         (struct pthread): Move header.data.list to the back of the struct.
10412         * sysdeps/i386/tls.h (tcbhead_t): Move list to the back of the struct.
10413         (MULTIPLE_THREADS_OFFSET): Adjust offset.
10414         (SYSINFO_OFFSEET): Likewise.
10416 2002-12-27  Jakub Jelinek  <jakub@redhat.com>
10418         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h (USE_DL_SYSINFO):
10419         Define.
10420         (DL_SYSINFO_DEFAULT): Cast to uintptr_t to avoid warnings.
10421         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h (NEED_DL_SYSINFO,
10422         DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION): Define.
10423         (USE_DL_SYSINFO): Undef.
10425 2002-12-22  Jakub Jelinek  <jakub@redhat.com>
10427         * Makefile (tests-reverse): Use $(objpfx)../libc.so instead of
10428         $(common-objpfx)libc.so.
10429         * tst-cancel4.c (tf_write, tf_writev): Increase buf sizes so that
10430         it is bigger than pipe buffer size even on arches with bigger
10431         page size.
10432         (tf_usleep): Cast usleep argument to useconds_t to avoid warnings.
10434 2002-12-25  Ulrich Drepper  <drepper@redhat.com>
10436         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Implement
10437         correct errno access for case that USE___THREAD is not defined.
10439 2002-12-24  Ulrich Drepper  <drepper@redhat.com>
10441         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Add missing #endif.
10442         Patch by Marijn Ros <marijn@mad.scientist.com>.
10444 2002-12-22  Roland McGrath  <roland@redhat.com>
10446         * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
10448 2002-12-20  Ulrich Drepper  <drepper@redhat.com>
10450         * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_inexpensive): Define.
10452 2002-12-19  Ulrich Drepper  <drepper@redhat.com>
10454         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Don't define
10455         NEED_DL_SYSINFO since no processor < i686 had the sysenter opcode.
10456         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: New file.
10458         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Use ENTER_KERNEL instead
10459         of int $0x80.
10460         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
10461         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Likewise.
10462         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Likewise.
10463         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
10464         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
10465         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Likewise.
10466         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Likewise.
10467         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
10469         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add support for using
10470         sysenter.
10471         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
10473         * sysdeps/i386/tls.h: Unconditionally include <dl-sysdep.h>.
10475         * allocatestack.c (allocate_stack) [NEED_DL_SYSINFO]: Set sysinfo
10476         in new TCB.
10477         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Check
10478         that sysinfo is properly initialized.
10479         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define RTLD_PRIVATE_ERRNO
10480         to 1 only for ld.so.
10482         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
10483         RTLD_CORRECT_DYNAMIC_WEAK.
10485 2002-12-19  Jakub Jelinek  <jakub@redhat.com>
10487         * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
10488         Use return 0 as 6th argument to FORWARD4.
10489         * pthread_equal.c: Include pthreadP.h instead of pthread.h.
10491 2002-12-18  Ulrich Drepper  <drepper@redhat.com>
10493         * descr.h (struct pthread) [NEED_DL_SYSINFO]: Add sysinfo member.
10494         * sysdeps/i386/tls.h (tcbhead_t): Add sysinfo member.
10495         Define SYSINFO_OFFSEET if NEED_DL_SYSINFO is defined.
10496         (INIT_SYSINFO): New #define.
10497         (TLS_TP_INIT): Use INIT_SYSINFO.
10498         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
10499         At test to make sure SYSINFO_OFFSET value is correct.
10500         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
10502 2002-12-18  Jakub Jelinek  <jakub@redhat.com>
10504         * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
10505         * sysdeps/unix/sysv/linux/raise.c (gsignal): Add weak alias to raise.
10506         * Versions [libc: GLIBC_2.0]: Add pthread_attr_init.
10507         [libpthread: GLIBC_2.1]: Remove __pthread_rwlock_init,
10508         __pthread_rwlock_destroy, __pthread_rwlock_rdlock,
10509         __pthread_rwlock_wrlock, __pthread_rwlock_unlock,
10510         __pthread_rwlock_tryrdlock and __pthread_rwlock_trywrlock.
10512 2002-12-18  Ulrich Drepper  <drepper@redhat.com>
10514         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use ENTER_KERNEL
10515         macro instead of using int $0x80 directly.
10517         * sysdeps/pthread/bits/stdio-lock.h: New file.
10518         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: New file.
10519         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: New file.
10520         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: New file.
10521         * Makefile (routines): Add libc-lowlevelmutex.
10523         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Remove
10524         __i686.get_pc_thunk.dx.
10526 2002-12-17  Jakub Jelinek  <jakub@redhat.com>
10528         * Makefile (libpthread-shared-only-routines): Add pt-allocrtsig.
10529         (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
10530         ($(objpfx)tst-cancel-wrappers.out): New rule.
10531         * tst-cancel-wrappers.sh: New test.
10532         * tst-locale1.c: Include signal.h.
10533         (uselocale): Test static linking of __libc_current_sigrt*.
10535 2002-12-17  Ulrich Drepper  <drepper@redhat.com>
10537         * Makefile (tests): Add tst-cancel6.
10538         * tst-cancel6.c: New file
10540 2002-12-17  Jakub Jelinek  <jakub@redhat.com>
10542         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
10543         Define meaningfully for assembler as well.
10544         * pthreadP.h (struct pthread_functions): Remove
10545         ptr_pthread_attr_init field.  Add ptr_pthread_attr_init_2_0
10546         and ptr_pthread_attr_init_2_1 fields.
10547         * init.c (pthread_functions): Initialize ptr_pthread_attr_init_2_0
10548         and ptr_pthread_attr_init_2_1 instead of ptr_pthread_attr_init.
10549         * forward.c (FORWARD4): Renamed from FORWARD3. Add export argument.
10550         (FORWARD3): Define using FORWARD4.
10551         (pthread_attr_init): Provide both @GLIBC_2.0 and @@GLIBC_2.1
10552         versions.
10553         * pt-system.c: Remove duplicate stdlib.h include.
10555 2002-12-16  Ulrich Drepper  <drepper@redhat.com>
10557         * sem_init.c: Define sem_init@GLIBC_2.0.
10558         * sem_destroy.c: Define sem_destroy@GLIBC_2.0.
10559         * sem_getvalue.c: Define sem_getvalue@GLIBC_2.0.
10561         * flockfile.c: Moved to...
10562         * sysdeps/pthread/flockfile.c: ...here.  New file.
10563         * funlockfile.c: Moved to...
10564         * sysdeps/pthread/funlockfile.c: ...here.  New file.
10565         * ftrylockfile.c: Moved to...
10566         * sysdeps/pthread/ftrylockfile.c: ...here.  New file.
10568 2002-12-16  Jakub Jelinek  <jakub@redhat.com>
10570         * libc-cancellation.c: Guard both function with
10571         #if !defined NOT_IN_libc.
10572         * Makefile (libpthread-routines): Use ptw-, not pt- prefix for the
10573         automatically provided pthread wrappers.
10574         * pthreadP.h (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define to
10575         CANCEL_* if IS_IN_libpthread and to dummy versions if not in libc
10576         nor in libpthread.
10577         * pt-open.c: Removed.
10578         * pt-fcntl.c: Removed.
10579         * pt-fsync.c: Removed.
10580         * pt-lseek.c: Removed.
10581         * pt-msgrcv.c: Removed.
10582         * pt-msgsnd.c: Removed.
10583         * pt-msync.c: Removed.
10584         * pt-nanosleep.c: Removed.
10585         * pt-open64.c: Removed.
10586         * pt-pause.c: Removed.
10587         * pt-pread.c: Removed.
10588         * pt-pread64.c: Removed.
10589         * pt-pwrite.c: Removed.
10590         * pt-pwrite64.c: Removed.
10591         * pt-read.c: Removed.
10592         * pt-recv.c: Removed.
10593         * pt-recvfrom.c: Removed.
10594         * pt-recvmsg.c: Removed.
10595         * pt-send.c: Removed.
10596         * pt-sendto.c: Removed.
10597         * pt-sigtimedwait.c: Removed.
10598         * pt-sigwait.c: Removed.
10599         * pt-wait.c: Removed.
10600         * pt-waitpid.c: Removed.
10601         * pt-write.c: Removed.
10602         * pt-accept.c: Removed.
10603         * pt-close.c: Removed.
10604         * pt-connect.c: Removed.
10605         * pt-lseek64.c: Removed.
10606         * pt-sendmsg.c: Removed.
10607         * pt-tcdrain.c: Removed.
10609 2002-12-15  Ulrich Drepper  <drepper@redhat.com>
10611         * init.c (__pthread_initialize_minimal_internal): Renamed from
10612         __pthread_initialize_minimal.  Make old name an alias.  This
10613         converts a normal relocation into a relative relocation.
10615         * pt-fcntl.c (__fcntl): Use fcntl64 syscall, not fcntl.
10617         * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
10618         readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
10619         * Makefile (libpthread-routines): Remove pt-creat, pt-poll,
10620         pt-pselect, pt-readv, pt-select, pt-sigpause, pt-sigsuspend,
10621         pt-sigwaitinfo, pt-waitid, and pt-writev.
10622         * pt-creat.c: Removed.
10623         * pt-poll.c: Removed.
10624         * pt-pselect.c: Removed.
10625         * pt-readv.c: Removed.
10626         * pt-select.c: Removed.
10627         * pt-sigpause.c: Removed.
10628         * pt-sigsuspend.c: Removed.
10629         * pt-sigwaitinfo.c: Removed.
10630         * pt-waitid.c: Removed.
10631         * pt-writev.c: Removed.
10633         * init.c (pthread_functions): New variable.
10634         (__pthread_initialize_minimal): Pass pointer to pthread_functions
10635         (or NULL) to __libc_pthread_init.
10636         * forward.c: Rewrite to use __libc:pthread_functions array to get
10637         function addresses.
10638         * sysdeps/unix/sysv/linux/fork.h: Remove __libc_pthread_init
10639         prototype.
10640         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
10641         Take new parameter.  Copy content of variable pointed to by it
10642         to __libc_pthread_init.
10644         * pthreadP.h (struct pthread_functions): New type.
10645         (__libc_pthread_init): Declare.
10647         * pthread_attr_destroy.c: Add namespace protected alias.
10648         * pthread_attr_getdetachstate.c: Likewise.
10649         * pthread_attr_getinheritsched.c: Likewise.
10650         * pthread_attr_getschedparam.c: Likewise.
10651         * pthread_attr_getschedpolicy.c: Likewise.
10652         * pthread_attr_getscope.c: Likewise.
10653         * pthread_attr_setdetachstate.c: Likewise.
10654         * pthread_attr_setinheritsched.c: Likewise.
10655         * pthread_attr_setschedparam.c: Likewise.
10656         * pthread_attr_setschedpolicy.c: Likewise.
10657         * pthread_attr_setscope.c: Likewise.
10658         * pthread_cond_broadcast.c: Likewise.
10659         * pthread_cond_destroy.c: Likewise.
10660         * pthread_cond_init.c: Likewise.
10661         * pthread_cond_signal.c: Likewise.
10662         * pthread_cond_wait.c: Likewise.
10663         * pthread_condattr_destroy.c: Likewise.
10664         * pthread_condattr_init.c: Likewise.
10665         * pthread_equal.c: Likewise.
10666         * pthread_exit.c: Likewise.
10667         * pthread_getschedparam.c: Likewise.
10668         * pthread_self.c: Likewise.
10669         * pthread_setcancelstate.c: Likewise.
10670         * pthread_setschedparam.c: Likewise.
10671         * pthread_mutex_destroy.c: Likewise.
10672         * pthread_mutex_init.c: Likewise.
10673         * pthreadP.h: Add prototypes for the aliases.
10675         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Set
10676         multiple_threads member in correct TCB to 1.
10678         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define
10679         SINGLE_THREAD_P.  If in libc or libpthread examine multiple_thread
10680         member of thread decriptor, otherwise return unconditionally 1.
10682 2002-12-14  Ulrich Drepper  <drepper@redhat.com>
10684         * sysdeps/unix/sysv/linux/i386/pt-socket.S: Changes folded into the
10685         regular Linux version.  Remove file.
10686         * sysdeps/unix/sysv/linux/connect.S: Likewise.  Remove file.
10687         * sysdeps/unix/sysv/linux/llseek.c: Likewise.  Remove file.
10688         * sysdeps/unix/sysv/linux/msgrcv.c: Likewise.  Remove file.
10689         * sysdeps/unix/sysv/linux/msgsnd.c: Likewise.  Remove file.
10690         * sysdeps/unix/sysv/linux/open64.c: Likewise.  Remove file.
10691         * sysdeps/unix/sysv/linux/poll.c: Likewise.  Remove file.
10692         * sysdeps/unix/sysv/linux/pread.c: Likewise.  Remove file.
10693         * sysdeps/unix/sysv/linux/pread64.c: Likewise.  Remove file.
10694         * sysdeps/unix/sysv/linux/pselect.c: Likewise.  Remove file.
10695         * sysdeps/unix/sysv/linux/pwrite.c: Likewise.  Remove file.
10696         * sysdeps/unix/sysv/linux/pwrite64.c: Likewise.  Remove file.
10697         * sysdeps/unix/sysv/linux/readv.c: Likewise.  Remove file.
10698         * sysdeps/unix/sysv/linux/recv.S: Likewise.  Remove file.
10699         * sysdeps/unix/sysv/linux/recvfrom.S: Likewise.  Remove file.
10700         * sysdeps/unix/sysv/linux/recvmsg.S: Likewise.  Remove file.
10701         * sysdeps/unix/sysv/linux/send.S: Likewise.  Remove file.
10702         * sysdeps/unix/sysv/linux/sendmsg.S: Likewise.  Remove file.
10703         * sysdeps/unix/sysv/linux/sendto.S: Likewise.  Remove file.
10704         * sysdeps/unix/sysv/linux/sigpause.c: Likewise.  Remove file.
10705         * sysdeps/unix/sysv/linux/sigsuspend.c: Likewise.  Remove file.
10706         * sysdeps/unix/sysv/linux/sigtimedwait.c: Likewise.  Remove file.
10707         * sysdeps/unix/sysv/linux/sigwait.c: Likewise.  Remove file.
10708         * sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise.  Remove file.
10709         * sysdeps/unix/sysv/linux/system.c: Likewise.  Remove file.
10710         * sysdeps/unix/sysv/linux/tcdrain.c: Likewise.  Remove file.
10711         * sysdeps/unix/sysv/linux/wait.c: Likewise.  Remove file.
10712         * sysdeps/unix/sysv/linux/waitid.c: Likewise.  Remove file.
10713         * sysdeps/unix/sysv/linux/waitpid.c: Likewise.  Remove file.
10714         * sysdeps/unix/sysv/linux/writev.c: Likewise.  Remove file.
10715         * sysdeps/unix/sysv/linux/i386/fcntl.c: Likewise.  Remove file.
10717 2002-12-14  Jakub Jelinek  <jakub@redhat.com>
10719         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
10720         * sysdeps/unix/sysv/linux/open.c: Removed.
10721         * sysdeps/unix/sysv/linux/fsync.c: Removed.
10722         * sysdeps/unix/sysv/linux/lseek.c: Removed.
10723         * sysdeps/unix/sysv/linux/msync.c: Removed.
10724         * sysdeps/unix/sysv/linux/read.c: Removed.
10725         * sysdeps/unix/sysv/linux/close.c: Removed.
10726         * sysdeps/unix/sysv/linux/creat.c: Removed.
10727         * sysdeps/unix/sysv/linux/nanosleep.c: Removed.
10728         * sysdeps/unix/sysv/linux/pause.c: Removed.
10729         * sysdeps/unix/sysv/linux/select.c: Removed.
10730         * sysdeps/unix/sysv/linux/write.c: Removed.
10732 2002-12-14  Ulrich Drepper  <drepper@redhat.com>
10734         * sysdeps/unix/sysv/linux/i386/pt-socket.S: Check multiple_threads
10735         element in TCB to see whether locking is needed.
10737         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Check that
10738         MULTIPLE_THREADS_OFFSET value is correct.
10740         * sysdeps/unix/sysv/linux/close.c: New file.
10741         * sysdeps/unix/sysv/linux/connect.S: New file.
10742         * sysdeps/unix/sysv/linux/creat.c: New file.
10743         * sysdeps/unix/sysv/linux/fsync.c: New file.
10744         * sysdeps/unix/sysv/linux/llseek.c: New file.
10745         * sysdeps/unix/sysv/linux/lseek.c: New file.
10746         * sysdeps/unix/sysv/linux/msgrcv.c: New file.
10747         * sysdeps/unix/sysv/linux/msgsnd.c: New file.
10748         * sysdeps/unix/sysv/linux/msync.c: New file.
10749         * sysdeps/unix/sysv/linux/nanosleep.c: New file.
10750         * sysdeps/unix/sysv/linux/open.c: New file.
10751         * sysdeps/unix/sysv/linux/open64.c: New file.
10752         * sysdeps/unix/sysv/linux/pause.c: New file.
10753         * sysdeps/unix/sysv/linux/poll.c: New file.
10754         * sysdeps/unix/sysv/linux/pread.c: New file.
10755         * sysdeps/unix/sysv/linux/pread64.c: New file.
10756         * sysdeps/unix/sysv/linux/pselect.c: New file.
10757         * sysdeps/unix/sysv/linux/pwrite.c: New file.
10758         * sysdeps/unix/sysv/linux/pwrite64.c: New file.
10759         * sysdeps/unix/sysv/linux/readv.c: New file.
10760         * sysdeps/unix/sysv/linux/recv.S: New file.
10761         * sysdeps/unix/sysv/linux/recvfrom.S: New file.
10762         * sysdeps/unix/sysv/linux/recvmsg.S: New file.
10763         * sysdeps/unix/sysv/linux/select.c: New file.
10764         * sysdeps/unix/sysv/linux/send.S: New file.
10765         * sysdeps/unix/sysv/linux/sendmsg.S: New file.
10766         * sysdeps/unix/sysv/linux/sendto.S: New file.
10767         * sysdeps/unix/sysv/linux/sigpause.c: New file.
10768         * sysdeps/unix/sysv/linux/sigsuspend.c: New file.
10769         * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
10770         * sysdeps/unix/sysv/linux/sigwait.c: New file.
10771         * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
10772         * sysdeps/unix/sysv/linux/system.c: New file.
10773         * sysdeps/unix/sysv/linux/tcdrain.c: New file.
10774         * sysdeps/unix/sysv/linux/wait.c: New file.
10775         * sysdeps/unix/sysv/linux/waitid.c: New file.
10776         * sysdeps/unix/sysv/linux/waitpid.c: New file.
10777         * sysdeps/unix/sysv/linux/writev.c: New file.
10778         * sysdeps/unix/sysv/linux/i386/fcntl.c: New file.
10780         * pt-readv.c: Fix comment.
10782 2002-12-14  Jakub Jelinek  <jakub@redhat.com>
10784         * tst-cleanup1.c: Include stdlib.h.
10786         * tst-cancel5.c: New test.
10787         * Makefile (tests): Add tst-cancel5.
10788         (tst-cancel5): Link against libc.so libpthread.so in that order.
10790 2002-12-13  Ulrich Drepper  <drepper@redhat.com>
10792         * forward.c (test_loaded): Prevent recursive calls.
10794         * Makefile (routines): Add libc-cancellation.
10795         * libc-cancellation.c: New file.
10796         * descr.h (struct pthread): Add multiple_threads field.
10797         * allocatestack.c (allocate_stack): Initialize multiple_header field of
10798         new thread descriptor to 1.
10799         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread):
10800         Initialize multiple_thread field after successful thread creation.
10801         * cancellation.c (__do_cancel): Move to pthreadP.h.
10802         (__pthread_enable_asynccancel): Remove parameter from __do_cancel call.
10803         (__pthread_disable_asynccancel): Add internal_function attribute.
10804         * init.c (sigcancel_handler): Remove parameter from __do_cancel call.
10805         * pthread_setcancelstate.c: Likewise.
10806         * pthread_setcanceltype.c: Likewise.
10807         * pthread_exit.c: Likewise.
10808         * pthreadP.h (CANCELLATION_P): Likewise.
10809         (__do_cancel): Define as static inline.
10810         (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): New #defines.
10811         (__libc_enable_asynccancel, __libc_disable_asynccancel): New
10812         declarations.
10813         * sysdeps/i386/tls.h (tcbhead_t): Add list and multiple_threads
10814         fields.  Define MULTIPLE_THREADS_OFFSET.
10815         * sysdeps/pthread/bits/libc-lock.h: Remove __libc_locking_needed
10816         declaration.
10817         * sysdeps/unix/sysv/linux/accept.S: New file.
10818         * sysdeps/unix/sysv/linux/read.c: New file.
10819         * sysdeps/unix/sysv/linux/write.c: New file.
10820         * sysdeps/unix/sysv/linux/i386/pt-socket.S: New file.
10821         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove definition and
10822         initialization of __libc_locking_needed.
10823         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't use
10824         __libc_locking_needed, use multiple_threads field in TCB.
10825         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
10827 2002-12-12  Ulrich Drepper  <drepper@redhat.com>
10829         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: Use i486
10830         version.
10831         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: Likewise.
10833         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Correct
10834         access to __libc_locking_needed for PIC.
10836 2002-12-12  Jakub Jelinek  <jakub@redhat.com>
10838         * sysdeps/pthread/bits/libc-lock.h (__libc_locking_needed): Only
10839         declare for libc.so.
10840         (__libc_lock_init, __libc_lock_init_recursive): Change into comma
10841         expression.
10842         (__libc_lock_lock): Put into statement expression.
10843         (__libc_lock_unlock): Remove trailing semicolon.
10844         * sysdeps/unix/sysv/linux/fork.h (__libc_pthread_init): Fix typo.
10846 2002-12-12  Roland McGrath  <roland@redhat.com>
10848         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use asm operand with
10849         "m" constraint to refer to __libc_locking_needed.  Declare it here.
10851 2002-12-12  Ulrich Drepper  <drepper@redhat.com>
10853         * sysdeps/unix/sysv/linux/fork-gen.c: Renamed to...
10854         * sysdeps/unix/sysv/linux/libc_pthread_init.c: ...this.
10855         Initialize __libc_locking_needed.
10856         * init.c (__pthread_initialize_minimal): Call __libc_pthread_init
10857         instead of __register_pthread_fork_handler.
10858         * sysdeps/pthread/bits/libc-lock.h: Declare __libc_locking_needed.
10859         * sysdeps/unix/sysv/linux/Makefile (sysdep_routimes): Replace
10860         fork-gen with libc_pthread_init.
10861         * sysdeps/unix/sysv/linux/Versions: Use __libc_pthread_init instead
10862         of __register_pthread_fork_handler.
10863         * sysdeps/unix/sysv/linux/fork.h: Declare __libc_pthread_init instead
10864         of __register_pthread_fork_handler.
10865         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use
10866         __libc_locking_needed to determine whether lock prefix can be avoided.
10867         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
10869 2002-12-11  Ulrich Drepper  <drepper@redhat.com>
10871         * Makefile (tests): Add tst-cleanup1.
10872         * tst-cleanup1.c: New file.
10873         * cancellation.c (__cleanup_thread): Removed.
10874         (__do_cancel): Remove call to __cleanup_thread.
10875         * pthreadP.h: Remove __cleanup_thread prorotype.
10877         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
10878         Remember function and argument even if cancellation handler
10879         function is not available.
10880         (__libc_cleanup_region_end): Execute registered function directly if
10881         pthread functions are not available.
10882         (__libc_cleanup_end): Likewise.
10884         * init.c (__pthread_initialize_minimal): Fix initialization in
10885         static lib by preventing gcc from being too clever.
10887 2002-12-10  Ulrich Drepper  <drepper@redhat.com>
10889         * init.c (__pthread_initialize_minimal): Remove unneccesary
10890         sigaddset call.
10892         * Makefile (tests): We can run tst-locale2 now.
10894 2002-12-09  Ulrich Drepper  <drepper@redhat.com>
10896         * Versions: Remove duplicated sigwait entry.
10898 2002-12-08  Ulrich Drepper  <drepper@redhat.com>
10900         * pthreadP.h: Enable pthread_cleanup_{push,pop} optimizations only
10901         inside libpthread.
10903         * pt-fcntl.c (__fcntl): Initialize oldtype to avoid warning.
10905         * pthreadP.h: Declare __pthread_enable_asynccancel and
10906         __pthread_disable_asynccancel.
10907         (CANCEL_ASYNC): Use __pthread_enable_asynccancel.
10908         (CANCEL_RESET): Use __pthread_disable_asynccancel.
10909         * cancellation.c (__pthread_enable_asynccancel): New function.
10910         (__pthread_disable_asynccancel): New function.
10911         * pt-accept.c: Adjust for CANCEL_ASYNC and CANCEL_RESET change.
10912         * pt-close.c: Likewise.
10913         * pt-connect.c: Likewise.
10914         * pt-creat.c: Likewise.
10915         * pt-fcntl.c: Likewise.
10916         * pt-fsync.c: Likewise.
10917         * pt-lseek.c: Likewise.
10918         * pt-lseek64.c: Likewise.
10919         * pt-msgrcv.c: Likewise.
10920         * pt-msgsnd.c: Likewise.
10921         * pt-msync.c: Likewise.
10922         * pt-nanosleep.c: Likewise.
10923         * pt-open.c: Likewise.
10924         * pt-open64.c: Likewise.
10925         * pt-pause.c: Likewise.
10926         * pt-poll.c: Likewise.
10927         * pt-pread.c: Likewise.
10928         * pt-pread64.c: Likewise.
10929         * pt-pselect.c: Likewise.
10930         * pt-pwrite.c: Likewise.
10931         * pt-pwrite64.c: Likewise.
10932         * pt-read.c: Likewise.
10933         * pt-readv.c: Likewise.
10934         * pt-recv.c: Likewise.
10935         * pt-recvfrom.c: Likewise.
10936         * pt-recvmsg.c: Likewise.
10937         * pt-select.c: Likewise.
10938         * pt-send.c: Likewise.
10939         * pt-sendmsg.c: Likewise.
10940         * pt-sendto.c: Likewise.
10941         * pt-sigpause.c: Likewise.
10942         * pt-sigsuspend.c: Likewise.
10943         * pt-sigtimedwait.c: Likewise.
10944         * pt-sigwait.c: Likewise.
10945         * pt-sigwaitinfo.c: Likewise.
10946         * pt-system.c: Likewise.
10947         * pt-tcdrain.c: Likewise.
10948         * pt-wait.c: Likewise.
10949         * pt-waitid.c: Likewise.
10950         * pt-waitpid.c: Likewise.
10951         * pt-write.c: Likewise.
10952         * pt-writev.c: Likewise.
10953         * pthread_join.c: Likewise.
10954         * pthread_timedjoin.c: Likewise.
10956         * pt-sigpause.c (sigsuspend): Call __sigsuspend.
10957         (__xpg_sigpause): New function.
10958         * Versions (libpthread:GLIBC_2.3.2): Add __xpg_sigpause.
10960 2002-12-07  Ulrich Drepper  <drepper@redhat.com>
10962         * Makefile (CFLAGS-ftrylockfile.c): Add -D_IO_MTSAFE_IO.
10964         * cleanup.c: Move declarations of _GI_pthread_cleanup_push and
10965         _GI_pthread_cleanup_pop to pthreadP.h.
10967         * ftrylockfile.c: Use _IO_lock_trylock instead of
10968         pthread_mutex_trylock.
10970         * pthreadP.h (CANCEL_ASYNC): Use __pthread_setcanceltype.
10971         (CANCEL_RESET): Likewise.
10972         (__pthread_setcanceltype_): Declare.
10973         (__pthread_mutex_lock_internal): Declare.
10974         (__pthread_mutex_unlock_internal): Declare.
10975         (__pthread_once_internal): Declare.
10976         (pthread_cleanup_push): Redefine using _GI_pthread_cleanup_push.
10977         (pthread_cleanup_pop): Redefine using _GI_pthread_cleanup_pop.
10979         * pthread_cond_timedwait.c: Use INTUSE is calls to pthread_mutex_lock
10980         and pthread_mutex_unlock.
10981         * pthread_cond_wait.c: Likewise.
10982         * pthread_mutex_lock.c: Use INTDEF to define alias if needed.
10983         * pthread_mutex_unlock.c: Likewise.
10985         * pthread_setcanceltype.c: Add additional alias
10986         __pthread_setcanceltype.
10988         * sem_unlink.c (sem_unlink): Use __pthread_once with INTDEF.
10989         * sem_open.c (sem_open): Likewise.
10990         Use __libc_open, __libc_write, and __libc_close instead of
10991         open, write, and close respectively.
10993         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_trylock_internal):
10994         Rewrite as statement expression since it must return a value.
10996         * pthread_cancel.c: Use __pthread_kill instead of pthread_kill.
10997         * sysdeps/unix/sysv/linux/pthread_kill.c: Define additional alias
10998         __pthread_kill.
11000         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Define additional
11001         alias __pthread_once_internal.
11003         * sysdeps/unix/sysv/linux/raise.c: Use libc_hidden_def for raise.
11005 2002-12-06  Ulrich Drepper  <drepper@redhat.com>
11007         * Makefile (tests): Add tst-stdio1 and tst-stdio2.
11008         * tst-stdio1.c: New file.
11009         * tst-stdio2.c: New file.
11011         * init.c (__pthread_initialize_minimal): Correct INIT_LIST_HEAD use.
11013         * Makefile (tests): Comment out tst-locale2 for now.
11014         (CFLAGS-flockfile.c, CFLAGS-funlockfile.c): Define to -D_IO_MTSAFE_IO.
11016         * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-fork.c to
11017         -D_IO_MTSAFE_IO.
11018         * sysdeps/unix/sysv/linux/fork.c: Include <bits/stdio-lock.h>.
11019         Use _IO_lock_init instead of explicit assignment.
11021         * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
11022         Define __libc_lock_* and __libc_lock_recursive macros with
11023         lowlevellock macros, not pthread mutexes.
11025         * flockfile.c: Include <bits/stdio-lock.h>.  Use _IO_lock_lock instead
11026         of pthread_mutex_lock.
11027         * funlockfile.c: Include <bits/stdio-lock.h>.  Use _IO_lock_unlock
11028         instead of pthread_mutex_unlock.
11030 2002-12-06  Roland McGrath  <roland@redhat.com>
11032         * allocatestack.c (__stack_user): Use uninitialized defn.
11033         * init.c (__pthread_initialize_minimal): Initialize it here.
11035 2002-12-05  Roland McGrath  <roland@redhat.com>
11037         * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
11038         string.
11039         * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
11041         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Add
11042         missing & here too.
11044 2002-12-05  Ulrich Drepper  <drepper@redhat.com>
11046         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
11047         lowlevellock.
11048         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: New file.
11049         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: New file.
11050         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: New file.
11051         * sysdeps/pthread/bits/libc-lock.h: Use lowlevellock implementation
11052         for __libc_lock_* macros.
11053         * Makefile (routines): Add libc-lowlevellock.
11055 2002-10-09  Roland McGrath  <roland@redhat.com>
11057         * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
11058         Under [__PIC__], call the function via the pointer fetched for
11059         comparison rather than a call by name that uses the PLT.
11060         (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
11061         (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
11062         (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
11063         (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
11064         (__libc_key_create, __libc_getspecific, __libc_setspecific): Use it.
11066 2002-12-04  Roland McGrath  <roland@redhat.com>
11068         * forward.c (pthread_self): Use FORWARD3 macro to correct return type.
11070         * sysdeps/i386/td_ta_map_lwp2thr.c: Moved from ../nptl_db.
11071         * sysdeps/generic/td_ta_map_lwp2thr.c: New file.
11073         * pthread_create.c (start_thread): Add missing & on __nptl_last_event.
11075 2002-12-04  Ulrich Drepper  <drepper@redhat.com>
11077         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Make pthread_t
11078         a completely opaque, non-integer type.
11079         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
11081 2002-12-05  Jakub Jelinek  <jakub@redhat.com>
11083         * sysdeps/i386/tls.h: Include stdlib.h.
11084         * sysdeps/x86_64/tls.h: Likewise.
11086 2002-12-04  Ulrich Drepper  <drepper@redhat.com>
11088         * Makefile (tests): Add tst-locale2.
11089         (tests-static): Likewise.
11090         * tst-locale2.c: New file.
11092         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Mark asms as
11093         volatile and add memory clobbers to lock operations.
11095 2002-12-03  Ulrich Drepper  <drepper@redhat.com>
11097         * sysdeps/i386/i686/bits/atomic.h: Use i486 version.
11098         * sysdeps/i386/i486/bits/atomic.h: New file.
11099         * sysdeps/i386/i586/bits/atomic.h: New file.
11100         * sysdeps/i386/i686/pthread_spin_trylock.S: Define HAVE_CMOV and
11101         include i486 version.
11102         * sysdeps/i386/i486/pthread_spin_trylock.S: New file.
11103         * sysdeps/i386/i586/pthread_spin_trylock.S: New file.
11104         Patch by Marijn Ros <marijn@mad.scientist.com>.
11106         * allocatestack.c (get_cached_stack): Don't crash if we first
11107         found a stack with a larger size then needed.
11108         Reported by Hui Huang <hui.huang@sun.com>.
11110         * Makefile (tests): Add tst-sysconf.
11111         * tst-sysconf.c: New file.
11113         * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine
11114         PTHREAD_THREADS_MAX.
11116 2002-12-02  Roland McGrath  <roland@redhat.com>
11118         * pthreadP.h (__stack_user, __nptl_create_event, __nptl_death_event):
11119         Declare using hidden_proto instead of attribute_hidden, so there are
11120         non-.hidden static symbols for gdb to find.
11121         (__pthread_keys): Likewise.
11122         * events.c (__nptl_create_event, __nptl_death_event): Add hidden_def.
11123         * allocatestack.c (__stack_user): Likewise.
11124         * pthread_create.c (__pthread_keys): Likewise.
11125         (__nptl_threads_events, __nptl_last_event): Make these static instead
11126         of hidden.
11127         * pthread_key_create.c (__pthread_pthread_keys_max,
11128         __pthread_pthread_key_2ndlevel_size): Renamed from __linuxthreads_*.
11130 2002-12-02  Ulrich Drepper  <drepper@redhat.com>
11132         * Makefile (tests): Add tst-locale1.  If buid-static is yes link
11133         statically.
11134         * tst-locale1.c: New file.
11136         * pthread_cond_timedwait.c: Include <stdlib.h>.
11138         * Makefile (tests): Add tst-fork2 and tst-fork3.
11139         * tst-fork2.c: New file.
11140         * tst-fork3.c: New file.
11142 2002-11-28  Ulrich Drepper  <drepper@redhat.com>
11144         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
11146         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
11147         require it to 200112L.
11149         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Use cmov
11150         instruction only if HAVE_CMOV is defined.
11151         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Define HAVE_CMOV.
11153         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: New file.
11155         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: New file.
11157         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: New file.
11159         * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: New file.
11161 2002-11-27  Ulrich Drepper  <drepper@redhat.com>
11163         * sysdeps/x86_64/bits/atomic.h: New file.
11165         * sysdeps/i386/i686/bits/atomic.h: Fix asm syntax for 8- and
11166         16-bit operations.
11168         * sysdeps/unix/sysv/linux/raise.c (raise): Use INTERNAL_SYSCALL if
11169         possible since gettid cannot fail.
11171         * sysdeps/x86_64/pthreaddef.h: New file.
11173         * sysdeps/i386/pthreaddef.h (gettid): Removed.
11175         * sysdeps/x86_64/pthread_spin_init.c: New file.
11176         * sysdeps/x86_64/pthread_spin_lock.c: New file.
11177         * sysdeps/x86_64/pthread_spin_trylock.c: New file.
11178         * sysdeps/x86_64/pthread_spin_unlock.c: New file.
11180         * sysdeps/i386/i686/pthread_spin_trylock.S (pthread_spin_trylock):
11181         Add missing lock prefix.  Minute optimization.
11183         * tst-spin2.c (main): Also check successful trylock call.
11185         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use correct
11186         syscall.  Fix typo in case INTERNAL_SYSCALL is not used.
11188         * sysdeps/i386/pthread_spin_destroy.c: Moved to...
11189         * sysdeps/pthread/pthread_spin_destroy.c: ...here.  New file.
11191         * sysdeps/i386/pthread_sigmask.c: Removed.  Use the generic code.
11192         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Return correct
11193         value in case of an error.  Add support for INTERNAL_SYSCALL.
11195         * sysdeps/i386/pthread_sigmask.c (pthread_sigmask): Return correct
11196         value in case of an error.
11198         * sysdeps/x86_64/tls.h: New file.
11200 2002-11-26  Ulrich Drepper  <drepper@redhat.com>
11202         * sysdeps/i386/tls.h (THREAD_GETMEM_NC): Change interface.  It now
11203         takes the array member name and the index as parameters.
11204         (THREAD_SETMEM_NC): Likewise.
11205         * pthread_getspecific.c: Use new THREAD_GETMEM_NC interface.
11206         * pthread_setspecific.c: Use new THREAD_GETMEM_NC and THREAD_SETMEM_NC
11207         interfaces.
11209         * sysdeps/i386/tls.h (THREAD_SETMEM): Use size of member element
11210         to decide which code to use.
11211         (THREAD_SETMEM_NC): Likewise.
11213         * allocatestack.c (queue_stack): Don't remove stack from list here.
11214         Do it in the caller.  Correct condition to prematurely terminate
11215         loop to free stacks.
11216         (__deallocate_stack): Remove stack from list here.
11218 2002-11-26  Ulrich Drepper  <drepper@redhat.com>
11220         * Makefile (tests): Add tst-stack1.
11221         * tst-stack1.c: New file.
11223         * allocatestack.c (allocate_stack): Initialize the TCB on a user
11224         provided stack.
11226         * pthread_attr_getstack.c: Return bottom of the thread area.
11228 2002-11-25  Ulrich Drepper  <drepper@redhat.com>
11230         * Makefile (libpthread-routines): Add pt-allocrtsig and
11231         pthread_kill_other_threads.
11232         * pt-allocrtsig.c: New file.
11233         * pthread_kill_other_threads.c: New file.
11234         * sysdeps/unix/sysv/linux/allocrtsig.c: Add additional aliases for
11235         all three functions.
11236         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
11237         allocrtsig.
11238         * sysdeps/unix/sysv/linux/Versions (libc:GLIBC_PRIVATE): Export
11239         __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
11240         and __libc_allocate_rtsig_private.
11241         * Versions (libpthread): Export pthread_kill_other_threads_np,
11242         __libc_current_sigrtmin, and __libc_current_sigrtmax.
11244 2002-11-24  Ulrich Drepper  <drepper@redhat.com>
11246         * allocatestack.c (allocate_stack): stackaddr in attribute points to
11247         the end of the stack.  Adjust computations.
11248         When mprotect call fails dequeue stack and free it.
11249         * pthread_attr_setstack.c: Store top of the stack in stackaddr
11250         attribute.
11251         * pthread_getattr_np.c: Likewise.
11253         * descr.h (IS_DETACHED): Add some more parenthesis to prevent
11254         surprises.
11256 2002-11-23  Ulrich Drepper  <drepper@redhat.com>
11258         * sysdeps/pthread/pthread.h (pthread_self): __THROW must come before
11259         attribute definitions.  Patch by Luca Barbieri <ldb@ldb.ods.org>.
11261 2002-11-22  Ulrich Drepper  <drepper@redhat.com>
11263         * pthread_getspecific.c: Optimize access to first 2nd-level array.
11264         * pthread_setspecific.c: Likewise.
11266 2002-11-21  Ulrich Drepper  <drepper@redhat.com>
11268         * sysdeps/unix/sysv/linux/i386/createthread.c: Remove CLONE_ flags
11269         definitions.  Get them from the official place.
11270         * sysdeps/unix/sysv/linux/i386/fork.c: Likewise.
11272         * sysdeps/unix/sysv/linux/i386/createthread.c: Update CLONE_* flags.
11273         Use new CLONE_ flags in clone() calls.
11275         * sysdeps/unix/sysv/linux/fork.c: Use ARCH_FORK to actually fork.
11276         * sysdeps/unix/sysv/linux/i386/fork.c: New file.
11278         * Versions: Add pthread_* functions for libc.
11279         * forward.c: New file.
11281         * sysdeps/pthread/Makefile (libpthread-sysdeps_routines): Add
11282         errno-loc.
11283         * herrno.c: New file.
11284         * res.c: New file.
11286         * Makefile (libpthread-routines): Remove sem_post, sem_wait,
11287         sem_trywait, and sem_timedwait.  Add herrno and res.
11288         * sem_init.c: Don't initialize lock and waiters members.
11289         * sem_open.c: Likewise.
11290         * sem_post.c: Removed.
11291         * sem_wait.c: Removed.
11292         * sem_trywait.c: Removed.
11293         * sem_timedwait.c: Removed.
11294         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Complete rewrite.
11295         Includes full implementations of sem_post, sem_wait, sem_trywait,
11296         and sem_timedwait.
11297         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Adjust
11298         for new implementation.
11299         * sysdeps/unix/sysv/linux/internaltypes.h (struct sem): Remove lock
11300         and waiters fields.
11302         * tst-sem3.c: Improve error message.
11303         * tst-signal3.c: Likewise.
11305         * init.c (__pthread_initialize_minimal): Use set_tid_address syscall
11306         to tell the kernel about the termination futex and to initialize tid
11307         member.  Don't initialize main_thread.
11308         * descr.h (struct pthread): Remove main_thread member.
11309         * cancelllation.c (__do_cancel): Remove code handling main thread.
11310         The main thread is not special anymore.
11312         * allocatestack.c (__reclaim_stacks): Mark stacks as unused.  Add
11313         size of the stacks to stack_cache_actsize.
11315         * pt-readv.c: Add missing "defined".
11316         * pt-sigwait.c: Likewise.
11317         * pt-writev.c: Likewise.
11319 2002-11-09  Ulrich Drepper  <drepper@redhat.com>
11321         * Versions: Export __connect from libpthread.
11322         Patch by Luca Barbieri <ldb@ldb.ods.org>.
11324         * Makefile (libpthread-routines): Add pt-raise.
11325         * sysdeps/unix/sysv/linux/raise.c: New file.
11326         * sysdeps/unix/sysv/linux/pt-raise.c: New file.
11327         * sysdeps/generic/pt-raise.c: New file.
11329         * pthread_cond_init.c: Initialize all data elements of the condvar
11330         structure.  Patch by Luca Barbieri <ldb@ldb.ods.org>.
11332         * pthread_attr_init.c: Actually implement 2.0 compatibility version.
11333         * pthread_create.c: Likewise.
11335         * Makefile (tests): Add tst-key1, tst-key2, tst-key3.
11336         * tst-key1.c: New file.
11337         * tst-key2.c: New file.
11338         * tst-key3.c: New file.
11340         * Versions: Export pthread_detach for version GLIBC_2.0.
11341         Reported by Saurabh Desai <sdesai@austin.ibm.com>.
11343 2002-11-08  Ulrich Drepper  <drepper@redhat.com>
11345         * pthread_key_create.c: Terminate search after an unused key was found.
11346         Patch by Luca Barbieri <ldb@ldb.ods.org>.
11348         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Return zero.
11349         Patch by Luca Barbieri <ldb@ldb.ods.org>.
11351 2002-10-10  Ulrich Drepper  <drepper@redhat.com>
11353         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Use slow generic
11354         dynamic lookup for errno in PIC.
11356         * allocatestack.c (get_cached_stack): Rearrange code slightly to
11357         release the stack lock as soon as possible.
11358         Call _dl_allocate_tls_init for TCB from the cache to re-initialize
11359         the static TLS block.
11360         (allocate_stack): Call _dl_allocate_tls_init for user-provided stack.
11362         * cancellation.c: Renamed from cancelation.c.
11363         * Makefile: Adjust accordingly.
11364         * pthreadP.h (CANCELLATION_P): Renamed from CANCELATION_P.
11365         * cleanup_defer.c: Use CANCELLATION_P.
11366         * pthread_testcancel.c: Likewise.
11367         * descr.h: Fix spelling in comments.
11368         * init.c: Likewise.
11369         * pthread_getattr_np.c: Likewise.
11370         * pthread_getschedparam.c: Likewise.
11371         * pthread_setschedparam.c: Likewise.
11372         * Versions: Likewise.
11374         * pt-pselect.c: New file.
11375         * Makefile (libpthread-routines): Add pt-pselect.
11376         * Versions: Add pselect.
11378         * tst-cancel4.c: New file.
11379         * Makefile (tests): Add tst-cancel4.
11381 2002-10-09  Ulrich Drepper  <drepper@redhat.com>
11383         * pthread_mutex_lock.c: Always record lock ownership.
11384         * pthread_mutex_timedlock.c: Likewise.
11385         * pthread_mutex_trylock.c: Likewise.
11387         * pt-readv.c: New file.
11388         * pt-writev.c: New file.
11389         * pt-creat.c: New file.
11390         * pt-msgrcv.c: New file.
11391         * pt-msgsnd.c: New file.
11392         * pt-poll.c: New file.
11393         * pt-select.c: New file.
11394         * pt-sigpause.c: New file.
11395         * pt-sigsuspend.c: New file.
11396         * pt-sigwait.c: New file.
11397         * pt-sigwaitinfo.c: New file.
11398         * pt-waitid.c: New file.
11399         * Makefile (libpthread-routines): Add pt-readv, pt-writev, pt-creat,
11400         pt-msgrcv, pt-msgsnd, pt-poll, pt-select, pt-sigpause, pt-sigsuspend,
11401         pt-sigwait, pt-sigwaitinfo, and pt-waitid.
11402         * Versions: Add all the new functions.
11404         * tst-exit1.c: New file.
11405         * Makefile (tests): Add tst-exit1.
11407         * sem_timedwait.c: Minor optimization for more optimal fastpath.
11409 2002-10-08  Ulrich Drepper  <drepper@redhat.com>
11411         * pt-fcntl.c: Only enable asynchronous cancellation for F_SETLKW.
11413         * pthread_join.c: Enable asynchronous cancellation around lll_wait_tid
11414         call.  pthread_join is an official cancellation point.
11415         * pthread_timedjoin.c: Likewise.
11417         * pthread_cond_wait.c: Revert order in which internal lock are dropped
11418         and the condvar's mutex are retrieved.
11419         * pthread_cond_timedwait.c: Likewise.
11420         Reported by dice@saros.East.Sun.COM.
11422 2002-10-07  Ulrich Drepper  <drepper@redhat.com>
11424         * pthreadP.h: Cut out all type definitions and move them...
11425         * sysdeps/unix/sysv/linux/internaltypes.h: ...here.  New file.
11426         * pthreadP.h: Include <internaltypes.h>.
11428         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Little
11429         performance tweaks.
11431         * sem_trywait.c: Shuffle #includes around to get right order.
11432         * sem_timedwait.c: Likewise.
11433         * sem_post.c: Likewise.
11434         * sem_wait.c: Likewise.
11436         * nptl 0.3 released.
11438         * Makefile (tests): Add tst-signal3.
11439         * tst-signal3.c: New file.
11441 2002-10-05  Ulrich Drepper  <drepper@redhat.com>
11443         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Tell the compiler that
11444         the asms modify the sem object.
11445         (__lll_sem_timedwait): Now takes struct sem* as first parameter.
11447         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h (sem_t): Don't expose
11448         the actual members.
11449         * pthreadP.h (struct sem): New type.  Actual semaphore type.
11450         * semaphoreP.h: Include pthreadP.h.
11451         * sem_getvalue.c: Adjust to sem_t change.
11452         * sem_init.c: Likewise.
11453         * sem_open.c: Likewise.
11454         * sem_post.c: Likewise.
11455         * sem_timedwait.c: Likewise.
11456         * sem_trywait.c: Likewise.
11457         * sem_wait.c: Likewise.
11459 2002-10-04  Ulrich Drepper  <drepper@redhat.com>
11461         * Makefile (tests): Add tst-basic2, tst-exec1, tst-exec3, tst-exec3.
11462         * tst-basic2.c: New file.
11463         * tst-exec1.c: New file.
11464         * tst-exec2.c: New file.
11465         * tst-exec3.c: New file.
11467         * tst-fork1.c: Remove extra */.
11469         * nptl 0.2 released.  The API for IA-32 is complete.