1 2012-01-07 Ulrich Drepper <drepper@gmail.com>
4 * pthreadP.h: Use const instead of __const.
5 * semaphore.h: Likewise.
6 * sysdeps/pthread/bits/libc-lock.h: Likewise.
7 * sysdeps/pthread/bits/sigthread.h: Likewise.
8 * sysdeps/pthread/pthread.h: Likewise.
10 * Makefile: Remove elf=yes test, only ELF is supported.
12 * shlib-versions: Remove entries for ports architectures.
14 In case anyone cares, the IA-64 architecture could move to ports.
15 * sysdeps/ia64/*: Removed.
16 * sysdeps/unix/sysv/linux/ia64/*: Removed.
18 2011-12-22 Ulrich Drepper <drepper@gmail.com>
20 * sysdeps/pthread/gai_misc.h (__gai_create_helper_thread): Use
21 __pthread_get_minstack.
22 * sysdeps/unix/sysv/linux/mq_notify.c (init_mq_netlink): Likewise.
25 * sysdeps/unix/sysv/linux/timer_routines.c: Get minimum stack size
26 through __pthread_get_minstack.
27 * nptl-init.c (__pthread_initialize_minimal_internal): Get page size
28 directly from _rtld_global_ro.
29 (__pthread_get_minstack): New function.
30 * pthreadP.h: Declare __pthread_get_minstack.
31 * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_get_minstack.
33 2011-12-21 Ulrich Drepper <drepper@gmail.com>
36 * sysdeps/unix/sysv/linux/pthread_getname.c (pthread_getname_np):
37 Correct reading name from file.
39 2011-12-14 Carlos O'Donell <carlos@systemhalted.org>
41 * allocatestack.c (allocate_stack): Return errno on failure.
43 2011-12-14 Jeff Law <law@redhat.com>
46 * pthread_create.c (__pthread_create_2_1): Translate ENOMEM to EAGAIN.
48 2011-11-28 Andreas Schwab <schwab@redhat.com>
50 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Handle
51 EAGAIN from FUTEX_WAIT_REQUEUE_PI.
52 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
54 2011-11-15 Ulrich Drepper <drepper@gmail.com>
56 * pthread_getattr_np.c (pthread_getattr_np): Set FD_CLOEXEC for
59 2011-10-29 Ulrich Drepper <drepper@gmail.com>
62 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
63 (__pthread_cond_timedwait): Initialize %r15 correctly also for code
64 path for kernels with FUTEX_CLOCK_REALTIME.
65 Debugged by H.J. Lu <hjl.tools@gmail.com>.
67 2011-10-27 Andreas Schwab <schwab@redhat.com>
70 * sysdeps/pthread/pthread.h: Use __THREADNL instead of __THREAD
71 for memory synchronization functions.
72 * semaphore.h: Likewise.
74 2011-10-24 Ulrich Drepper <drepper@gmail.com>
76 * tst-cancel7.c: Avoid warning.
77 * tst-mutex6.c: Likewise.
78 * tst-mutex9.c: Likewise.
79 * tst-mutexpi6.c: Likewise.
81 2011-10-23 Ulrich Drepper <drepper@gmail.com>
83 * sysdeps/i386/tls.h: Remove #include <list.h>.
85 2011-10-15 Ulrich Drepper <drepper@gmail.com>
87 * pthread_create.c (start_thread): Call __ctype_init.
89 2011-09-15 Andreas Schwab <schwab@redhat.com>
91 * sysdeps/pthread/list.h: Define only list_t if __need_list_t is
93 (list_add): Add atomic_write_barrier.
94 * descr.h: Define __need_list_t before including <list.h>.
95 * nptl-init.c: Include <list.h>
96 * allocatestack.c: Likewise.
98 2011-09-11 Ulrich Drepper <drepper@gmail.com>
100 * sysdeps/i386/tls.h: Remove HAVE_TLS_SUPPORT test.
101 * sysdeps/ia64/tls.h: Likewise.
102 * sysdeps/powerpc/tls.h: Likewise.
103 * sysdeps/s390/tls.h: Likewise.
104 * sysdeps/sh/tls.h: Likewise.
105 * sysdeps/sparc/tls.h: Likewise.
106 * sysdeps/x86_64/tls.h: Likewise.
108 2011-09-10 Ulrich Drepper <drepper@gmail.com>
110 * sysdeps/pthread/malloc-machine.h: Define MUTEX_INITIALIZER.
112 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Don't handle
114 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
115 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
116 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
117 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
118 * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
119 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
120 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
121 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
122 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
123 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
124 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
125 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
127 * tst-tls1.c: Support for __thread is now mandatory.
128 * tst-tls2.c: Likewise.
129 * tst-tls3.c: Likewise.
130 * tst-tls3mod.c: Likewise.
131 * tst-tls4.c: Likewise.
132 * tst-tls4moda.c: Likewise.
133 * tst-tls4modb.c: Likewise.
134 * tst-tls5.h: Likewise.
136 2011-09-08 Ulrich Drepper <drepper@gmail.com>
139 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
140 (pthread_rwlock_timedwrlock): Use correct macro in test.
141 Patch by H.J. Lu <hongjiu.lu@intel.com>.
143 2011-09-06 Ulrich Drepper <drepper@gmail.com>
145 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait): Don't
146 use gettimeofday vsyscall, just call gettimeofday.
147 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
148 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
149 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
151 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
153 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
154 Simplify __vdso_clock_gettime use.
156 2011-09-05 David S. Miller <davem@davemloft.net>
158 * sysdeps/unix/sysv/linux/sem_timedwait.c (do_futex_timed_wait):
160 (sem_timedwait): Call it to force an exception region around
161 the async cancel enable and the futex operation.
162 * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c: Likewise.
163 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: Likewise.
164 * sysdeps/unix/sysv/linux/sem_wait.c (do_futex_wait): New function.
165 (__new_sem_wait): Call it to force an exception region around
166 the async cancel enable and the futex operation.
167 * sysdeps/unix/sysv/linux/sparc/sem_wait.c: Likewise.
168 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: Likewise.
170 2011-08-31 Andreas Schwab <schwab@redhat.com>
172 * allocatestack.c (setxid_mark_thread): Ensure that the exiting
175 2011-08-20 David S. Miller <davem@davemloft.net>
177 * Makefile (tst-cleanup0.out): Fix typo in output redirection.
179 2011-08-14 Roland McGrath <roland@hack.frob.com>
181 * sysdeps/i386/pthreaddef.h (TCB_ALIGNMENT): Set to 64, optimal on Atom.
182 * sysdeps/x86_64/pthreaddef.h (TCB_ALIGNMENT): Likewise.
184 2011-08-08 Andreas Schwab <schwab@redhat.com>
186 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Maintain aligned
188 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
189 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
191 2011-07-22 Ulrich Drepper <drepper@gmail.com>
193 * sysdeps/pthread/unwind-forcedunwind.c (_Unwind_Resume): Add read
195 (__gcc_personality_v0): Likewise.
196 (_Unwind_ForcedUnwind): Likewise.
197 (_Unwind_GetCFA): Likewise.
199 2011-07-14 Roland McGrath <roland@hack.frob.com>
201 * allocatestack.c (__reclaim_stacks): Use uintptr_t cast rather than
204 2011-06-30 Ulrich Drepper <drepper@gmail.com>
206 * nptl-init.c (__nptl_set_robust): New function.
207 (pthread_functions): Add reference.
208 * npthreadP.h: Declare __nptl_set_robust.
209 * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
210 ptr_set_robust member.
211 * sysdeps/unix/sysv/linux/fork.c: Call set_robust_list syscall in
212 child if threads are used.
214 2011-06-14 Andreas Jaeger <aj@suse.de>
216 * pthread_rwlock_init.c: Include <string.h> for memset declaration.
218 2011-05-11 Ulrich Drepper <drepper@gmail.com>
221 * allocatestack.c (allocate_stack): Convert ENOMEM error to EAGAIN.
223 2011-04-10 Ulrich Drepper <drepper@gmail.com>
226 * allocatestack.c (get_cached_stack): Deallocate DTV entries before
228 Patch partly by Robert Rex <robert.rex@exasol.com>.
230 2011-01-19 Roland McGrath <roland@redhat.com>
232 * pthread_cond_wait.c (__pthread_cond_wait): Fix comment typo.
233 * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
234 * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Likewise.
235 * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
236 * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock): Likewise.
237 * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock): Likewise.
239 2011-01-16 Andreas Schwab <schwab@linux-m68k.org>
241 * Makefile (test-extras): Add tst-cleanup4aux.
243 2011-01-14 Ulrich Drepper <drepper@gmail.com>
246 * sysdeps/pthread/setxid.h (__SETXID_1): Add cast to assignment.
247 (__SETXID_2): Likewise.
248 (__SETXID_3): Likewise.
250 2011-01-13 Ulrich Drepper <drepper@gmail.com>
253 * Versions [libc] (GLIBC_PRIVATE): Export __libc_alloca_cutoff.
254 * alloca_cutoff.c: Add libc_hidden_def.
256 2010-10-13 H.J. Lu <hongjiu.lu@intel.com>
259 * sysdeps/x86_64/pthreaddef.h (TCB_ALIGNMENT): Changed to 32.
260 * sysdeps/x86_64/tls.h (TLS_TCB_ALIGN): Defined with alignment
263 2010-09-21 Andreas Schwab <schwab@redhat.com>
265 * sysdeps/pthread/pthread.h (pthread_cleanup_push)
266 [!__EXCEPTIONS]: Mangle local variable not_first_call.
267 (pthread_cleanup_push_defer_np): Likewise.
269 2010-09-03 Ulrich Drepper <drepper@redhat.com>
271 * sysdeps/pthread/allocalim.h (__libc_use_alloca): Expect blocks are
274 2010-08-10 Dinakar Guniguntala <dino@in.ibm.com>
275 Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
277 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: If
278 FUTEX_WAKE_OP fails make sure to call FUTEX_WAKE instead.
280 2010-08-12 H.J. Lu <hongjiu.lu@intel.com>
282 * sysdeps/unix/sysv/linux/i386/Makefile: New file.
284 2010-05-01 Alan Modra <amodra@gmail.com>
286 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
287 (PSEUDO): Use correct cr save. Don't use wrong parm save area
288 to save temps. Correct cfi for possible later frame manipulation.
289 (DOCARGS_1, UNDOCARGS_1): Use the correct parm save area.
290 (DOCARGS_2, UNDOCARGS_2, DOCARGS_3, UNDOCARGS_3): Likewise.
291 (DOCARGS_4, UNDOCARGS_4, DOCARGS_5, UNDOCARGS_5): Likewise.
292 (DOCARGS_6, UNDOCARGS_6): Likewise.
293 (CENABLE, CDISABLE): Add nops for non-shared calls.
295 2010-07-06 Andreas Schwab <schwab@redhat.com>
297 * sysdeps/unix/sysv/linux/pthread_getname.c (pthread_getname_np):
300 2010-07-03 Ulrich Drepper <drepper@redhat.com>
302 * tst-abstime.c (do_test): Some more cleanups
304 2010-07-02 Ulrich Drepper <drepper@redhat.com>
306 * tst-abstime.c: Correct testing and add test for sem_timedwait.
308 2010-07-01 Andreas Schwab <schwab@redhat.com>
309 Ulrich Drepper <drepper@redhat.com>
311 * Makefile (tests): Add tst-abstime.
312 * tst-abstime.c: New file.
313 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
314 (__lll_timedlock_wait): Check for timestamp before the Epoch.
315 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
316 (__lll_timedlock_wait): Likewise.
317 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
318 (__lll_robust_timedlock_wait): Likewise.
319 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
320 (__pthread_cond_timedwait): Likewise.
321 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
322 (pthread_rwlock_timedrdlock): Likewise.
323 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
324 (pthread_rwlock_timedwrlock): Likewise.
325 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
328 2010-07-01 Ulrich Drepper <drepper@redhat.com>
330 * Makefile (tst-_res1): Add tst-_res1mod1 to dependency list.
332 2010-06-01 Takashi Yoshii <takashi.yoshii.zj@renesas.com>
334 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Fix incorrect
335 location of ifndef __ASSUME_FUTEX_CLOCK_REALTIME.
337 2010-04-09 Ulrich Drepper <drepper@redhat.com>
340 * sysdeps/unix/sysv/linux/pthread_getname.c: New file.
341 * sysdeps/unix/sysv/linux/pthread_setname.c: New file.
342 * nptl/sysdeps/pthread/pthread.h: Declare pthread_getname and
344 * Makefile (libpthread-routines): Add pthread_getname and
346 * Versions: Export pthread_getname and pthread_setname for GLIBC_2.12.
348 2010-04-05 Thomas Schwinge <thomas@schwinge.name>
350 * sysdeps/pthread/unwind-resume.c: Moved to main tree sysdeps/gnu/.
351 * sysdeps/pthread/rt-unwind-resume.c: Likewise.
352 * sysdeps/pthread/Makefile: Remove csu section and rt section's
353 unwind-resume bits, now in main tree sysdeps/gnu/Makefile instead.
355 2010-03-23 Luis Machado <luisgpm@br.ibm.com>
357 * pthread_cond_timedwait.c: Add check for
358 HAVE_CLOCK_GETTIME_VSYSCALL to use VDSO whenever possible.
359 (pthread_cond_timedwait): Use INTERNAL_VSYSCALL instead of
362 2010-03-09 Ulrich Drepper <drepper@redhat.com>
364 * pthread_create.c (__pthread_create_2_1): If priorities are incorrect
365 and the call fails wake eventually waiting setxid threads. Don't free
366 stack here if we try starting a thread.
367 * sysdeps/pthread/createthread.c (do_clone): Only wake setxid waiter
368 if the clone call failed.
370 2010-03-08 Andreas Schwab <schwab@redhat.com>
372 * pthread_create.c (__pthread_create_2_1): Don't set setxid_futex.
373 * allocatestack.c (get_cached_stack): Set setxid_futex.
374 (allocate_stack): Likewise.
376 2010-03-05 Andreas Schwab <schwab@redhat.com>
377 Ulrich Drepper <drepper@redhat.com>
379 * allocatestack.c (setxid_mark_thread): Delay handling of thread if
380 it is creating a thread or it is just being created.
381 * pthread_create.c (start_thread): Wake setxid thread if it is
383 (__pthread_create_2_1): Initialize setxid_futex.
384 * sysdeps/pthread/createthread.c (do_clone): Wake setxid thread if it
387 2010-01-15 Ulrich Drepper <drepper@redhat.com>
389 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
391 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
393 2010-01-15 Michal Schmidt <mschmidt@redhat.com>
395 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
396 Fix pthread_cond_timedwait with requeue-PI.
397 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
398 Fix pthread_cond_wait with requeue-PI.
400 2010-01-14 Ulrich Drepper <drepper@redhat.com>
402 * Versions: Add pthread_mutex_consistent, pthread_mutexattr_getrobust,
403 and pthread_mutexattr_setrobust for GLIBC_2.12.
404 * pthread_mutex_consistent.c: Define alias pthread_mutex_consistent.
405 * pthread_mutexattr_getrobust.c: Define alias
406 pthread_mutexattr_getrobust.
407 * pthread_mutexattr_setrobust.c: Define alias
408 pthread_mutexattr_setrobust.
410 2010-01-12 Ulrich Drepper <drepper@redhat.com>
412 * sysdeps/pthread/pthread.h: Cleanup. Fix up for XPG7.
414 2010-01-08 Ulrich Drepper <drepper@redhat.com>
416 * sysdeps/pthread/pthread.h: Fix pthread_mutex_consistent declaration.
418 2009-12-18 Thomas Schwinge <thomas@codesourcery.com>
420 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c (_init): Don't
422 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c (_init): Likewise.
424 2009-12-17 Ulrich Drepper <drepper@redhat.com>
426 * pthread_rwlock_init.c (__pthread_rwlock_init): Simplify code by
429 2009-12-01 Dinakar Guniguntala <dino@in.ibm.com>
431 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.h: Define
432 FUTEX_WAIT_REQUEUE_PI and FUTEX_CMP_REQUEUE_PI.
433 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: If mutex
434 is a non robust PI mutex, then use FUTEX_CMP_REQUEUE_PI.
435 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
436 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: If mutex
437 is a non robust PI mutex, then use FUTEX_WAIT_REQUEUE_PI.
438 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
440 2009-12-12 Ulrich Drepper <drepper@redhat.com>
442 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
443 Don't update nwaiters after invalid timeout is recognized.
445 2009-11-27 Thomas Schwinge <thomas@codesourcery.com>
447 * sysdeps/unix/sysv/linux/sh/pt-initfini.c (_init): Don't call
450 2009-11-27 Andreas Schwab <schwab@redhat.com>
452 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Reload
453 THREAD_SELF->cancelhandling after returning from futex call.
455 2009-11-24 Ulrich Drepper <drepper@redhat.com>
457 * tst-sem13.c: New file.
458 * Makefile (tests): Add tst-sem13.
460 2009-11-22 Roland McGrath <roland@redhat.com>
462 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: # include "i686/dl-sysdep.h"
463 instead of recapitulating its contents.
465 2009-11-18 Ulrich Drepper <drepper@redhat.com>
467 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Minor
468 optimizations and cleanups.
470 2009-11-18 Dinakar Guniguntala <dino@in.ibm.com>
472 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
473 Remove redundant code. Fix cfi offsets.
474 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
477 2009-11-17 Ulrich Drepper <drepper@redhat.com>
479 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Minimally
480 reduce size of unwind info.
482 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Convert to use
484 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
485 Based on a patch by Dinakar Guniguntala <dino@in.ibm.com>.
487 2009-11-03 Andreas Schwab <schwab@linux-m68k.org>
490 * sysdeps/pthread/unwind-resume.c: Include <libgcc_s.h> and use
492 * sysdeps/pthread/unwind-forcedunwind.c: Likewise.
494 2009-10-30 Ulrich Drepper <drepper@redhat.com>
496 * tst-sem11.c (main): Rewrite to avoid aliasing problems.
499 * allocatestack.c (__nptl_setxid): Perform the operation in multiple
500 steps to avoid races with creation and terminations.
501 * nptl-init.c (sighandler_setxid): Adjust.
502 Patch by Daniel Jacobowitz.
504 2009-09-07 Andreas Schwab <schwab@redhat.com>
506 * sysdeps/pthread/bits/libc-lock.h (BP_SYM): Remove space before paren.
508 2009-09-02 Suzuki K P <suzuki@in.ibm.com>
509 Joseph Myers <joseph@codesourcery.com>
512 * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
513 Initialize the sigev_notify field for newly created timer to make sure
514 the timer gets deleted from the active timer's list upon timer_delete.
516 2009-08-27 Andrew Stubbs <ams@codesourcery.com>
518 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
519 Correct a logic error.
521 2009-08-25 Ulrich Drepper <drepper@redhat.com>
523 * sysdeps/x86_64/tls.h (RTLD_ENABLE_FOREIGN_CALL): Store old value
524 of the field in local variables.
525 (RTLD_FINALIZE_FOREIGN_CALL): Restore rtld_must_xmm_save from local
526 variable and don't unconditionally clear it.
528 2009-08-24 Ulrich Drepper <drepper@redhat.com>
530 * pthread_create.c (start_thread): Hint to the kernel that memory for
531 the stack can be reused. We do not mark all the memory. The part
532 still in use and some reserve are kept.
534 2009-08-23 Ulrich Drepper <drepper@redhat.com>
536 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Clean up namespace.
538 2009-08-11 Ulrich Drepper <drepper@redhat.com>
540 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Add CFI
543 2009-08-10 Ulrich Drepper <drepper@redhat.com>
545 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Add CFI
547 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
549 2009-08-10 Andreas Schwab <schwab@redhat.com>
551 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
552 (__pthread_cond_signal): Don't clobber register used for syscall
555 2009-08-08 Ulrich Drepper <drepper@redhat.com>
557 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
558 Optimize code path used when FUTEX_CLOCK_REALTIME is supported.
560 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
561 (__pthread_cond_wait): Optimize by avoiding use of callee-safe
564 2009-08-07 Ulrich Drepper <drepper@redhat.com>
566 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Little optimizations
567 enabled by the special *_asynccancel functions.
568 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
569 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
571 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Include lowlevellock.h.
573 2009-08-04 Ulrich Drepper <drepper@redhat.com>
575 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: New file.
576 * sysdeps/unix/sysv/linux/x86_64/libc-cancellation.S: New file.
577 * sysdeps/unix/sysv/linux/x86_64/librt-cancellation.S: New file.
578 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Optimize
579 since we can assume the special __*_{en,dis}able_asynccancel
581 (PUSHARGS_*, POPARGS_*, SAVESTK_*, RESTSTK_*): Removed.
582 * sysdeps/x86_64/tcb-offsets.sym: Add cancellation-related bits
583 and PTHREAD_CANCELED.
585 2009-07-31 Ulrich Drepper <drepper@redhat.com>
587 * descr.h: Better definition of *_BITMASK macros for cancellation.
589 2009-07-29 Ulrich Drepper <drepper@redhat.com>
591 * sysdeps/x86_64/tls.h (TLS_TCB_ALIGN): Define explicitly to 32.
593 * sysdeps/x86_64/tls.h (tcbhead_t): Add room for SSE registers the
594 dynamic linker might have to save.
595 Define RTLD_CHECK_FOREIGN_CALL, RTLD_ENABLE_FOREIGN_CALL,
596 RTLD_PREPARE_FOREIGN_CALL, and RTLD_FINALIZE_FOREIGN_CALL. Pretty
599 * sysdeps/x86_64/tcb-offsets.sym: Add RTLD_SAVESPACE_SSE.
601 2009-07-28 Ulrich Drepper <drepper@redhat.com>
603 * pthread_mutex_lock.c [NO_INCR] (__pthread_mutex_cond_lock_adjust):
605 * pthreadP.h: Declare __pthread_mutex_cond_lock_adjust.
606 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: Add ROBUST_BIT.
607 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Don't use
608 requeue_pi for robust mutexes.
609 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
610 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
611 Don't only skip __pthread_mutex_cond_lock. Call instead
612 __pthread_mutex_cond_lock_adjust.
613 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
615 * pthread_mutex_unlock.c (__pthread_mutex_unlock_full): Minor
616 optimization of PI mutex handling.
618 2009-07-27 Ulrich Drepper <drepper@redhat.com>
621 * pthread_mutex_unlock.c (__pthread_mutex_unlock_full): Use _rel
622 instead of of _acq variants of cmpxchg.
624 2009-07-23 Ulrich Drepper <drepper@redhat.com>
626 * sysdeps/x86_64/configure.in: New file.
628 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix error
629 path when not using absolute timeout futex.
631 2009-07-20 Ulrich Drepper <drepper@redhat.com>
633 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Minor
634 optimizations of last changes.
635 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
637 2009-07-19 Ulrich Drepper <drepper@redhat.com>
639 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
640 FUTEX_WAIT_REQUEUE_PI and FUTEX_CMP_REQUEUE_PI.
641 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: If mutex
642 is a PI mutex, then use FUTEX_CMP_REQUEUE_PI.
643 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
644 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: If mutex
645 is a PI mutex, then use FUTEX_WAIT_REQUEUE_PI.
646 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
648 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
649 (__pthread_cond_timedwait): Make more robust.
651 2009-07-18 Ulrich Drepper <drepper@redhat.com>
653 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
654 (__lll_robust_timedlock_wait): If possible use FUTEX_WAIT_BITSET to
655 directly use absolute timeout.
657 * tst-sem5.c (do_test): Add test for premature timeout.
658 * Makefile: Linu tst-sem5 with librt.
660 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
661 (pthread_rwlock_timedwrlock): If possible use FUTEX_WAIT_BITSET to
662 directly use absolute timeout.
663 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
664 (pthread_rwlock_timedrdlock): Likewise.
666 * tst-cond11.c (run_test): Add test to check that the timeout is
669 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
670 (__pthread_cond_timedwait): If possible use FUTEX_WAIT_BITSET to
671 directly use absolute timeout.
673 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
674 (__pthread_cond_wait): Convert to using exception handler instead of
675 registered unwind buffer.
676 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
677 (__pthread_cond_timedwait): Likewise.
679 2009-07-17 Ulrich Drepper <drepper@redhat.com>
681 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
682 If possible use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME to directly
683 use absolute timeout.
685 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Optimize
686 handling of uncontested semaphore.
688 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
689 (__condvar_cleanup): Rewrite to use cfi directives instead of
690 hand-coded unwind tables.
691 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S (__pthread_once):
693 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
694 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
697 2009-06-12 Ulrich Drepper <drepper@redhat.com>
699 * Makefile (libpthread-routines): Add pthread_sigqueue.
700 * Versions: Add pthread_sigqueue for GLIBC_2.11.
701 * sysdeps/pthread/bits/sigthread.h: Declare pthread_sigqueue.
702 * sysdeps/unix/sysv/linux/pthread_sigqueue.c: New file.
704 2009-06-11 Ulrich Drepper <drepper@redhat.com>
707 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
708 (LOAD_FUTEX_WAIT_ABS): Fix futex parameter in case private futexes
710 Patch by Bryan Kadzban <bz-glibc@kdzbn.homelinux.net>.
712 2009-05-16 Ulrich Drepper <drepper@redhat.com>
714 * libc-cancellation.c: Move __libc_cleanup_routine to...
715 * libc-cleanup.c: ...here. New file.
716 * Makefile (routines): Add libc-cleanup.
718 * cancellation.c (__pthread_disable_asynccancel): Remove unnecessary
720 * libc-cancellation.c: Use <nptl/cancellation.c: to define the code.
721 * sysdeps/pthread/librt-cancellation.c: Likewise.
724 * nptl-init.c: Renamed from init.c.
725 * Makefile: Change all occurences of init.c to nptl-init.c.
727 2009-05-15 Ulrich Drepper <drepper@redhat.com>
729 * cancellation.c (__pthread_disable_asynccancel): Correct the bits
730 to test when deciding on the delay.
731 * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
732 * pthread_cancel.c: Close race between deciding on sending a signal
733 and setting the CANCELING_BIT bit.
735 * cancellation.c (__pthread_disable_asynccancel): Don't return if
737 * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
739 2009-04-27 Ulrich Drepper <drepper@redhat.com>
741 * cancellation.c (__pthread_disable_asynccancel): Use THREAD_ATOMIC_AND
743 * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
744 * sysdeps/x86_64/tls.h: Define THREAD_ATOMIC_AND.
745 * sysdeps/i386/tls.h: Likewise.
746 (tcbhead_t): Add __private_tm member.
748 2009-04-26 Ulrich Drepper <drepper@redhat.com>
750 * sem_open.c (sem_open): Rewrite initialization of initsem to
753 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
754 Avoid warning by using may_alias attribute on ptrhack.
756 2009-04-22 Ulrich Drepper <drepper@redhat.com>
759 * pthread_attr_setschedparam.c (__pthread_attr_setschedparam):
760 Check policy and priority for validity.
761 Patch mostly by Zhang Xiliang <zhangxiliang@cn.fujitsu.com>.
763 2009-03-15 Ulrich Drepper <drepper@redhat.com>
765 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
766 (__pthread_cond_timedwait): Change to use cfi directives instead of
767 hand-coded unwind sections.
769 2009-03-10 Ulrich Drepper <drepper@redhat.com>
771 * init.c (nptl_freeres): Compile only for SHARED.
773 2009-03-09 Jakub Jelinek <jakub@redhat.com>
775 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Define
776 FUTEX_WAIT_BITSET, FUTEX_WAKE_BITSET, FUTEX_CLOCK_REALTIME and
777 FUTEX_BITSET_MATCH_ANY.
779 2009-02-27 Roland McGrath <roland@redhat.com>
781 * init.c (__nptl_initial_report_events): Mark __attribute_used__.
782 * pthread_create.c (__nptl_threads_events, __nptl_last_event): Likewise.
784 2009-02-26 Ulrich Drepper <drepper@redhat.com>
786 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
787 _POSIX_THREAD_ROBUST_PRIO_INHERIT and
788 _POSIX_THREAD_ROBUST_PRIO_PROTECT. Reset value of macros from
791 2009-02-25 Ulrich Drepper <drepper@redhat.com>
793 * sysdeps/pthread/pthread.h: The robust mutex functions are in
796 2009-02-24 Ulrich Drepper <drepper@redhat.com>
798 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_BITS_POSIX_OPT_H):
799 Unify name of include protector macro.
801 2009-02-14 SUGIOKA Toshinobu <sugioka@itonet.co.jp>
803 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
804 LOAD_FUTEX_WAIT_ABS even if (FUTEX_WAIT == 0).
806 2009-01-29 Ulrich Drepper <drepper@redhat.com>
808 * sysdeps/pthread/unwind-forcedunwind.c: Encrypt all function
811 * allocatestack.c (__free_stacks): Renamed from free_stacks.
812 (__free_stack_cache): Removed. Change callers to call __free_stacks.
813 * init.c (nptl_freeres): New function.
814 (pthread_functions): Initialize ptr_freeres to nptl_freeres.
815 * pthreadP.h: Don't declare __free_stack_cache. Declare __free_stacks.
816 * sysdeps/pthread/unwind-forcedunwind.c (libgcc_s_handle): New
818 (pthread_cancel_init): Depend in libgcc_s_handle for decision to
819 load DSO. Assign last.
820 (__unwind_freeres): New function.
822 * allocatestack.c (__reclaim_stacks): Reset in_flight_stack later
823 for better debugging. No need to use stack_list_add here.
825 2009-01-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
827 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
828 (__lll_timedlock_wait): Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME
829 instead of computing relative timeout.
830 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
831 FUTEX_CLOCK_REALTIME and FUTEX_BITSET_MATCH_ANY.
833 2009-01-25 Ulrich Drepper <drepper@redhat.com>
835 * pthread_mutex_lock.c (__pthread_mutex_lock): Remove unused label out.
837 2009-01-08 Ulrich Drepper <drepper@redhat.com>
839 * sysdeps/pthread/list.h (list_add): Initialize new element first.
840 (list_add_tail): Removed.
842 2009-01-07 Ulrich Drepper <drepper@redhat.com>
844 * (in_flight_stack): New variable.
845 (stack_list_del): New function. Use instead of list_del.
846 (stack_list_add): New function. Use instead of list_add when adding to
847 stack_cache and stack_used lists.
848 (__reclaim_stacks): Complete operations on stack_cache and stack_used lists
849 when the fork call interrupted another thread.
851 2009-01-04 Ulrich Drepper <drepper@redhat.com>
853 * init.c (__pthread_initialize_minimal_internal): Optimize test
854 FUTEX_CLOCK_REALTIME a bit.
856 2009-01-03 Ulrich Drepper <drepper@redhat.com>
858 * init.c (__pthread_initialize_minimal_internal): Cheat a bit by
859 only passing five parameters to FUTEX_WAIT_BITSET call.
861 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
862 (__lll_timedlock_wait): Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME
863 instead of computing relative timeout.
865 2009-01-02 Ulrich Drepper <drepper@redhat.com>
867 * init.c (__pthread_initialize_minimal_internal): Check for
868 FUTEX_CLOCK_REALTIME flag.
869 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
870 Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME instead of computing
873 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
874 FUTEX_CLOCK_REALTIME and FUTEX_BITSET_MATCH_ANY.
875 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
876 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
877 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
878 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
880 2008-12-09 Ulrich Drepper <drepper@redhat.com>
882 * sysdeps/pthread/pthread.h (pthread_cleanup_pop): Use { } as empty
883 loop body instead of ; to avoid gcc warnings.
884 (pthread_cleanup_pop_restore_np): Likewise.
885 Patch by Caolán McNamara <caolanm@redhat.com>.
887 2008-12-09 Jakub Jelinek <jakub@redhat.com>
889 * pthread_mutex_lock.c (__pthread_mutex_lock): Handle only the
890 fast path here, for robust/PI/PP mutexes call
891 __pthread_mutex_lock_full. Don't use switch, instead use a series
892 of ifs according to their probability.
893 (__pthread_mutex_lock_full): New function.
894 * pthread_mutex_unlock.c: Include assert.h.
895 (__pthread_mutex_unlock_usercnt): Handle only the
896 fast path here, for robust/PI/PP mutexes call
897 __pthread_mutex_unlock_full. Don't use switch, instead use a series
898 of ifs according to their probability.
899 (__pthread_mutex_unlock_full): New function.
900 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c
901 (__pthread_mutex_lock_full): Define.
903 2008-12-08 Ulrich Drepper <drepper@redhat.com>
905 * sysdeps/x86_64/tls.h (tcbhead_t): Add fields reserved for TM
906 implementation. Add necessary padding and.
907 * descr.h (struct pthread): Increase padding for tcbhead_t to 24
910 2008-12-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
912 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define FUTEX_WAIT_BITSET
913 and FUTEX_WAKE_BITSET.
915 2008-12-02 Ulrich Drepper <drepper@redhat.com>
917 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_WAIT_BITSET
918 and FUTEX_WAKE_BITSET.
919 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
920 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
921 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
922 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
924 2008-11-25 Roland McGrath <roland@redhat.com>
926 * sysdeps/alpha, sysdeps/unix/sysv/linux/alpha:
927 Subdirectories moved to ports repository as
928 sysdeps/.../nptl subdirectories.
930 2008-11-12 Jakub Jelinek <jakub@redhat.com>
933 * pthread_condattr_setclock.c (pthread_condattr_setclock): Fix masking
935 * pthread_cond_init.c (__pthread_cond_init): Fix
936 cond->__data.__nwaiters initialization.
937 * Makefile (tests): Add tst-cond23.
938 * tst-cond23.c: New test.
940 2008-11-07 Jakub Jelinek <jakub@redhat.com>
942 * sysdeps/pthread/malloc-machine.h (MALLOC): Adjust __libc_tsd_define
944 (tsd_setspecific, tsd_getspecific): Adjust __libc_tsd_{set,get}
947 2008-11-01 Ulrich Drepper <drepper@redhat.com>
950 * pthread_mutex_lock.c: Add support for private PI mutexes.
951 * pthread_mutex_timedlock.c: Likewise.
952 * pthread_mutex_trylock.c: Likewise.
953 * pthread_mutex_unlock.c: Likewise.
954 Patch mostly by Ben Jackson <ben@ben.com>.
956 2008-10-31 Ulrich Drepper <drepper@redhat.com>
959 * sysdeps/pthread/gai_misc.h (__gai_create_helper_thread):
960 Increase stack size for helper thread.
962 2008-10-06 Martin Schwidefsky <schwidefsky@de.ibm.com>
964 * sysdeps/s390/tls.h (THREAD_SET_STACK_GUARD): Add empty inline
965 assembly with a clobber list for access registers a0 and a1.
967 2008-09-11 Martin Schwidefsky <schwidefsky@de.ibm.com>
969 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Add memory barrier
970 to force runp->refcntr to be read from memory.
972 2008-09-08 Richard Guenther <rguenther@suse.de>
974 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_lock,
975 lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
976 lll_timedlock, lll_robust_timedlock, lll_unlock,
977 lll_robust_unlock): Promote private to int.
979 2008-08-15 Ulrich Drepper <drepper@redhat.com>
981 * sysdeps/x86_64/pthreaddef.h: Remove ARCH_MAP_FLAGS and
982 ARCH_RETRY_MMAP definitions.
983 * allocatestack.c: Remove definition of ARCH_MAP_FLAGS.
984 Define MAP_STACK when not defined.
985 (allocate_stack): Use MAP_STACK instead of ARCH_MAP_FLAGS. Remove
986 handling of ARCH_RETRY_MMAP.
988 2008-07-30 Ulrich Drepper <drepper@redhat.com>
990 * tst-align2.c (f): Print message that f is reached.
992 2008-04-28 Hiroki Kaminaga <kaminaga@sm.sony.co.jp>
995 * sysdeps/powerpc/tcb-offsets.sym (PRIVATE_FUTEX_OFFSET): Guard symbol
996 definition with #ifndef __ASSUME_PRIVATE_FUTEX.
998 2008-07-25 Ulrich Drepper <drepper@redhat.com>
1000 * sysdeps/unix/sysv/linux/mq_notify.c (init_mq_netlink): Use
1001 SOCK_CLOEXEC if possible.
1003 2008-05-29 Ulrich Drepper <drepper@redhat.com>
1005 * Makefile (tests): Add tst-rwlock2a.
1006 * tst-rwlock2.c: Use TYPE macro to decide what rwlock type to use.
1007 * tst-rwlock2a.c: New file.
1009 2008-06-12 Ulrich Drepper <drepper@redhat.com>
1011 * sysdeps/pthread/pthread.h: Remove inadvertant checkin.
1013 2008-05-17 Samuel Thibault <samuel.thibault@ens-lyon.org>
1015 * sysdeps/pthread/pthread.h: Fix typo in comment.
1017 2008-05-28 Ulrich Drepper <drepper@redhat.com>
1019 * sysdeps/pthread/createthread.c (do_clone): Pass accurate length
1020 of CPU set to the kernel.
1022 2008-05-23 Paul Pluzhnikov <ppluzhnikov@google.com>
1024 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Add
1026 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
1027 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
1028 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
1029 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
1030 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
1031 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
1033 2008-05-22 Paul Pluzhnikov <ppluzhnikov@google.com>
1035 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S: Add
1037 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1039 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
1041 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1044 2008-05-26 Ulrich Drepper <drepper@redhat.com>
1046 * tst-typesizes.c: Explicitly check __SIZEOF_PTHREAD_* constants.
1048 2008-05-20 Jakub Jelinek <jakub@redhat.com>
1050 David S. Miller <davem@davemloft.net>
1052 * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: New file.
1054 2008-05-10 Ulrich Drepper <drepper@redhat.com>
1056 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Access
1057 __pshared correctly.
1058 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1060 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1062 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
1064 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
1066 Reported by Clemens Kolbitsch <clemens.kol@gmx.at>.
1068 2008-04-14 David S. Miller <davem@davemloft.net>
1070 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
1071 (__old_sem_wait): Fix argument to lll_futex_wait().
1073 2007-11-26 Daniel Jacobowitz <dan@codesourcery.com>
1075 * pthread_create.c: Require pthread_mutex_trylock and
1076 pthread_key_delete for libgcc.
1078 2008-04-08 Jakub Jelinek <jakub@redhat.com>
1081 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h
1082 (lll_futex_wake_unlock): Add private argument to the pre-v9 macro.
1083 Patch by Sunil Amitkumar Janki <devel.sjanki@gmail.com>.
1085 2008-03-27 Ulrich Drepper <drepper@redhat.com>
1087 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine ARG_MAX if
1088 <linux/limits.h> has defined it.
1089 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
1090 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
1091 * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
1092 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
1094 2008-03-18 Jakub Jelinek <jakub@redhat.com>
1096 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Use __ASSEMBLER__ instead
1098 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
1099 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Likewise.
1101 2008-03-14 Ulrich Drepper <drepper@redhat.com>
1103 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
1104 HAVE_DL_DISCOVER_OSVERSION.
1105 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
1106 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Likewise.
1108 2008-03-07 Ulrich Drepper <drepper@redhat.com>
1111 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Change
1112 _POSIX_CHOWN_RESTRICTED value to zero.
1114 2008-01-31 Roland McGrath <roland@redhat.com>
1116 * Makefile (omit-deps): Variable removed.
1118 2008-01-30 Ulrich Drepper <drepper@redhat.com>
1120 * sysdeps/unix/sysv/linux/x86_64/sem_post.S (sem_post): Avoid
1121 unnecessary addr32 prefix.
1123 2008-01-29 Roland McGrath <roland@redhat.com>
1125 * Makeconfig (ptw-CPPFLAGS, sysd-rules-patterns): New variables.
1127 2008-01-22 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1129 * sysdeps/unix/sysv/linux/sh/sem_post.S: Don't overflow value field.
1131 2008-01-21 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1133 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XADD): Use
1135 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
1136 (__lll_lock_wait_private): Fix typo.
1137 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
1138 (pthread_barrier_wait): Likewise. Adjust XADD use.
1139 * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
1141 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S
1142 (pthread_rwlock_timedrdlock): Return correct return value.
1143 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S
1144 (pthread_rwlock_timedwrlock): Likewise.
1146 2008-01-15 Ulrich Drepper <drepper@redhat.com>
1148 * tst-eintr2.c (do_test): make sure that if mutex_lock in main
1149 thread returns the program exits with an error code.
1151 2008-01-10 Ulrich Drepper <drepper@redhat.com>
1153 * pthread-errnos.sym: Add EOVERFLOW.
1154 * sysdeps/unix/sysv/linux/structsem.sym: Add SEM_VALUE_MAX.
1155 * sysdeps/unix/sysv/linux/sem_post.c: Don't overflow value field.
1156 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
1157 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
1159 2007-12-14 Ulrich Drepper <drepper@redhat.com>
1161 * sysdeps/x86_64/pthreaddef.h (ARCH_RETRY_MMAP): Take additional
1162 parameter. Passed it as permission to mmap.
1163 * allocatestack.c (allocate_stack): Pass prot as second parameter
1166 2007-12-12 Ulrich Drepper <drepper@redhat.com>
1168 * tst-basic7.c: Allocate memory for the stack.
1171 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S [!SHARED]
1172 (__pthread_cond_timedwait): Don't use VDSO.
1173 Patch by Michal Januszewski.
1175 2007-12-07 Ulrich Drepper <drepper@redhat.com>
1178 * sysdeps/pthread/pthread.h [!__EXCEPTIONS] (pthread_cleanup_pop):
1179 Allow label before pthread_cleanup_pop.
1180 (pthread_cleanup_pop_restore_np): Likewise.
1182 2007-12-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1184 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
1185 Store 2 before returning ETIMEDOUT.
1187 2007-11-23 Ulrich Drepper <drepper@redhat.com>
1189 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
1190 Store 2 before returning ETIMEDOUT.
1191 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise
1192 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
1193 (__lll_lock_wait_private): Optimize.
1194 (__lll_lock_wait): Likewise.
1196 2007-11-20 Jakub Jelinek <jakub@redhat.com>
1198 * sysdeps/pthread/pthread.h (pthread_cleanup_push,
1199 pthread_cleanup_push_defer_np): Add extra (void *) cast to shut up
1200 g++ 4.1 and 4.2 -Wstrict-aliasing warnings.
1202 2007-11-08 Ulrich Drepper <drepper@redhat.com>
1205 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
1206 If we time out, try one last time to lock the futex to avoid
1207 losing a wakeup signal.
1208 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
1209 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
1212 * sysdeps/pthread/createthread.c (do_clone): Translate clone error
1215 2007-11-07 Ulrich Drepper <drepper@redhat.com>
1218 * allocatestack.c (allocate_stack): Change ENOMEM error in case
1219 mmap failed to EAGAIN.
1220 * Makefile (tests): Add tst-basic7.
1221 * tst-basic7.c: New file.
1223 2007-11-05 Ulrich Drepper <drepper@redhat.com>
1225 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
1226 Use __linkin_atfork.
1228 2007-11-03 Mike Frysinger <vapier@gentoo.org>
1230 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (LOAD_FUTEX_WAIT): Add
1231 missing line continuations.
1232 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S (LOAD_FUTEX_WAIT,
1233 LOAD_FUTEX_WAKE): Likewise. Also add missing 3rd parameter.
1235 2007-10-28 Ulrich Drepper <drepper@redhat.com>
1238 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Declare
1239 __active_timer_sigev_thread and __active_timer_sigev_thread_lock.
1240 (struct timer): Add next element.
1241 * sysdeps/unix/sysv/linux/timer_create.c: For SIGEV_THREAD timers,
1242 enqueue timer structure into __active_timer_sigev_thread list.
1243 * sysdeps/unix/sysv/linux/timer_delete.c: For SIGEV_THREAD timers,
1244 remove timer struct from __active_timer_sigev_thread.
1245 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
1246 Before using timer structure make sure it is still on the
1247 __active_timer_sigev_thread list. Keep lock until done.
1248 Define __active_timer_sigev_thread and
1249 __active_timer_sigev_thread_lock.
1251 2007-10-27 Ulrich Drepper <drepper@redhat.com>
1253 * sysdeps/pthread/malloc-machine.h: Define ATFORK_MEM.
1254 Redefine thread_atfork for use of ATFORK_MEM.
1255 * sysdeps/unix/sysv/linux/fork.h: Define __linkin_atfork.
1256 * sysdeps/unix/sysv/linux/register-atfork.c (__linkin_atfork): New
1258 * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
1259 Use atomic operation when removing first element of list.
1261 2007-10-17 Jakub Jelinek <jakub@redhat.com>
1263 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__old_sem_post): New
1264 routine instead of an alias to __new_sem_post.
1266 2007-10-15 Jakub Jelinek <jakub@redhat.com>
1268 * init.c (__pthread_initialize_minimal): Initialize word to appease
1271 2007-10-10 Jakub Jelinek <jakub@redhat.com>
1273 * sysdeps/pthread/bits/libc-lock.h (__libc_rwlock_init): Inside of
1274 libc.so just clear NAME.
1275 (__libc_rwlock_fini): Nop inside of libc.so.
1276 * tst-initializers1.c (main): Test if PTHREAD_RWLOCK_INITIALIZER is
1279 2007-09-02 Ulrich Drepper <drepper@redhat.com>
1281 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
1282 (__pthread_cond_wait): Fix unlocking of internal lock after mutex
1284 Patch by Luca Barbieri <luca.barbieri@gmail.com>.
1286 2007-08-21 Ulrich Drepper <drepper@redhat.com>
1289 * allocatestack.c (__reclaim_stacks): Clear the TSD in the
1290 reclaimed stack if necessary.
1291 * Makefile (tests): Add tst-tsd6.
1292 * tst-tsd6.c: New file.
1294 2007-08-21 Jakub Jelinek <jakub@redhat.com>
1296 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_dead):
1297 Add private argument.
1299 2007-08-20 Ulrich Drepper <drepper@redhat.com>
1301 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1302 (__pthread_cond_timedwait): Use clock_gettime from VDSO if possible.
1304 2007-08-16 Jakub Jelinek <jakub@redhat.com>
1306 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h
1307 (__lll_robust_timedlock): Pass private as last argument to
1308 __lll_robust_timedlock_wait.
1309 (__lll_unlock): Fix a pasto.
1311 2007-08-15 Jakub Jelinek <jakub@redhat.com>
1313 * sysdeps/unix/sysv/linux/sparc/internaltypes.h (sparc_new_sem,
1314 sparc_old_sem): New structs.
1315 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
1316 (__sem_wait_cleanup): New function.
1317 (__new_sem_wait): Use sparc_new_sem structure. Bump and afterwards
1318 decrease nwaiters. Register __sem_wait_cleanup as cleanup handler.
1319 Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
1321 (__old_sem_wait): New function.
1322 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: Include
1323 nptl/sysdeps/unix/sysv/linux/sparc version.
1324 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c:
1326 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: Likewise.
1327 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c
1328 (__new_sem_trywait): Use sparc_old_sem structure.
1329 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c
1330 (sem_timedwait): Use sparc_new_sem structure. Bump and afterwards
1331 decrease nwaiters. Register __sem_wait_cleanup as cleanup handler.
1332 Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
1333 lll_futex_timed_wait.
1334 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c (__new_sem_post):
1335 Use sparc_new_sem structure. Only wake if nwaiters > 0. Pass
1336 isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
1338 (__old_sem_post): New function.
1339 * sysdeps/unix/sysv/linux/sparc/sem_wait.c: New file.
1340 * sysdeps/unix/sysv/linux/sparc/sem_init.c: New file.
1341 * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c: New file.
1342 * sysdeps/unix/sysv/linux/sparc/sem_post.c: New file.
1343 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: Remove.
1344 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: Remove.
1346 2007-08-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1348 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
1349 (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
1350 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
1351 Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
1352 * sysdeps/unix/sysv/linux/shpthread_cond_signal.S
1353 (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
1354 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
1356 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
1357 kernel-features.h and tcb-offsets.h.
1358 (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
1359 lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
1361 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
1363 (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE
1364 to lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
1366 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use #ifdef
1367 __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
1368 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
1369 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
1370 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
1371 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
1372 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
1374 2007-08-14 Jakub Jelinek <jakub@redhat.com>
1376 * sysdeps/unix/sysv/linux/lowlevellock.c: Comment fix.
1377 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
1378 (__lll_timedwait_tid): Pass LLL_SHARED as 4th argument to
1379 lll_futex_timed_wait.
1381 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (__lll_unlock,
1382 __lll_robust_unlock): Rewrite as macros instead of inline functions.
1383 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_unlock,
1384 __lll_robust_unlock, __lll_wait_tid): Likewise.
1386 2007-08-13 Jakub Jelinek <jakub@redhat.com>
1388 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
1390 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
1391 (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
1392 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
1393 Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
1394 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
1395 (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
1396 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
1397 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Include
1399 (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
1400 lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
1401 process private. Switch DW_CFA_advance_loc1 and some
1402 DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
1403 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
1404 (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE to
1405 lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
1406 process private. Switch DW_CFA_advance_loc{1,2} and some
1407 DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
1408 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use
1409 #ifdef __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
1410 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1412 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
1413 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
1414 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1416 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
1417 (__pthread_cond_broadcast): Compare %r8 instead of
1418 dep_mutex-cond_*(%rdi) with $-1.
1419 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
1420 (__pthread_cond_signal): Xor FUTEX_WAKE_OP with FUTEX_WAKE instead
1423 2007-08-13 Ulrich Drepper <drepper@redhat.com>
1425 * sysdeps/unix/sysv/linux/i386/i786/Implies: New file.
1427 2007-08-13 Jakub Jelinek <jakub@redhat.com>
1429 * allocatestack.c: Include kernel-features.h.
1430 * pthread_create.c: Likewise.
1431 * pthread_mutex_init.c: Likewise.
1433 * pthread_cond_timedwait.c: Likewise.
1434 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
1435 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
1436 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
1437 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
1438 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
1439 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1440 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1442 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1444 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
1445 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
1446 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
1447 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
1449 2007-08-12 Jakub Jelinek <jakub@redhat.com>
1451 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
1452 [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
1453 byte elements. One of them is the new __shared element.
1454 [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
1455 adjust names of other padding elements.
1456 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
1457 [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
1458 byte elements. One of them is the new __shared element.
1459 [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
1460 adjust names of other padding elements.
1461 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_rwlock_t):
1462 Renamed __pad1 element to __shared, adjust names of other padding
1464 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
1465 (pthread_rwlock_t): Likewise.
1466 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock): Fix a
1469 2007-08-09 Anton Blanchard <anton@samba.org>
1471 * sysdeps/unix/sysv/linux/powerpc/pthread_spin_unlock.c: New file.
1473 2007-08-12 Ulrich Drepper <drepper@redhat.com>
1475 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Include
1476 <kernel-features.h>.
1477 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1479 2007-08-11 Ulrich Drepper <drepper@redhat.com>
1481 * pthreadP.h (PTHREAD_ROBUST_MUTEX_PSHARED): Define.
1482 * pthread_mutex_lock.c: Use it instead of PTHREAD_MUTEX_PSHARED when
1483 dealing with robust mutexes.
1484 * pthread_mutex_timedlock.c: Likewise.
1485 * pthread_mutex_trylock.c: Likewise.
1486 * pthread_mutex_unlock.c: Likewise.
1487 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
1489 2007-08-06 Jakub Jelinek <jakub@redhat.com>
1491 * pthreadP.h (PTHREAD_MUTEX_PSHARED_BIT): Define.
1492 (PTHREAD_MUTEX_TYPE): Mask __kind with 127.
1493 (PTHREAD_MUTEX_PSHARED): Define.
1494 * pthread_mutex_init.c (__pthread_mutex_init): Set
1495 PTHREAD_MUTEX_PSHARED_BIT for pshared or robust
1497 * pthread_mutex_lock.c (LLL_MUTEX_LOCK): Take mutex as argument
1498 instead of its __data.__lock field, pass PTHREAD_MUTEX_PSHARED
1499 as second argument to lll_lock.
1500 (LLL_MUTEX_TRYLOCK): Take mutex as argument
1501 instead of its __data.__lock field.
1502 (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
1503 __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
1505 (__pthread_mutex_lock): Update LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
1506 LLL_ROBUST_MUTEX_LOCK users, use PTHREAD_MUTEX_TYPE (mutex)
1507 instead of mutex->__data.__kind directly, pass
1508 PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock and lll_futex_wait.
1509 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Use
1510 PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
1511 directly, pass PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock.
1512 (pthread_mutex_timedlock): Pass PTHREAD_MUTEX_PSHARED (mutex)
1513 to lll_timedlock, lll_robust_timedlock, lll_unlock and
1514 lll_futex_timed_wait. Use PTHREAD_MUTEX_TYPE (mutex) instead
1515 of mutex->__data.__kind directly.
1516 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Pass
1517 PTHREAD_MUTEX_PSHARED (mutex) to lll_timedlock,
1518 lll_robust_timedlock, lll_unlock and lll_futex_timed_wait. Use
1519 PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind directly.
1520 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Pass
1521 PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock, lll_robust_unlock
1523 * pthread_mutex_setprioceiling.c (pthread_mutex_setprioceiling): Pass
1524 PTHREAD_MUTEX_PSHARED (mutex) to lll_futex_wait and lll_futex_wake.
1525 Use PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
1527 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK):
1528 Take mutex as argument instead of its __data.__lock field, pass
1529 PTHREAD_MUTEX_PSHARED as second argument to lll_cond_lock.
1530 (LLL_MUTEX_TRYLOCK): Take mutex as argument instead of its
1531 __data.__lock field.
1532 (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
1533 __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
1534 to lll_robust_cond_lock.
1535 * pthread_cond_broadcast.c (__pthread_cond_broadcast): Add pshared
1536 variable, pass it to lll_lock, lll_unlock, lll_futex_requeue and
1537 lll_futex_wake. Don't use lll_futex_requeue if dependent mutex
1538 has PTHREAD_MUTEX_PSHARED_BIT bit set in its __data.__kind.
1539 * pthread_cond_destroy.c (__pthread_cond_destroy): Add pshared
1540 variable, pass it to lll_lock, lll_unlock, lll_futex_wake and
1542 * pthread_cond_signal.c (__pthread_cond_signal): Add pshared
1543 variable, pass it to lll_lock, lll_unlock, lll_futex_wake_unlock and
1545 * pthread_cond_timedwait.c (__pthread_cond_wait): Add
1546 pshared variable, pass it to lll_lock, lll_unlock,
1547 lll_futex_timedwait and lll_futex_wake.
1548 * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait): Add
1549 pshared variable, pass it to lll_lock, lll_unlock, lll_futex_wait
1551 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_requeue,
1552 lll_futex_wake_unlock): Add private argument, use __lll_private_flag
1554 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue,
1555 lll_futex_wake_unlock): Likewise.
1556 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_requeue):
1558 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_futex_requeue,
1559 lll_futex_wake_unlock): Likewise.
1560 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_requeue):
1562 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue,
1563 lll_futex_wake_unlock): Likewise.
1564 (lll_futex_wake): Fix a typo.
1565 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym (PS_BIT): Add.
1566 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
1567 (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
1568 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
1569 Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
1570 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
1571 (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
1572 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
1573 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1574 (__pthread_cond_timedwait): Likewise.
1575 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
1576 (__condvar_cleanup, __pthread_cond_wait): Likewise.
1578 2007-08-05 Jakub Jelinek <jakub@redhat.com>
1580 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
1581 Don't use CGOTSETUP and CGOTRESTORE macros.
1582 (CGOTSETUP, CGOTRESTORE): Remove.
1583 <IS_IN_rtld> (CENABLE, CDISABLE): Don't use JUMPTARGET, branch to
1586 2007-08-01 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1588 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Remove
1589 definitions for private futexes.
1590 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Include
1591 kernel-features.h and lowlevellock.h. Use private futexes if
1593 (__lll_lock_wait_private, __lll_unlock_wake_private): New.
1594 (__lll_mutex_lock_wait): Rename to
1595 (__lll_lock_wait): ... this. Don't compile in for libc.so.
1596 (__lll_mutex_timedlock_wait): Rename to ...
1597 (__lll_timedlock_wait): ... this. Use __NR_gettimeofday.
1598 Don't compile in for libc.so.
1599 (__lll_mutex_unlock_wake): Rename to ...
1600 (__lll_unlock_wake): ... this. Don't compile in for libc.so.
1601 (__lll_timedwait_tid): Use __NR_gettimeofday.
1602 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Allow including
1603 the header from assembler. Renamed all lll_mutex_* resp.
1604 lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
1605 Renamed all LLL_MUTEX_LOCK_* macros to LLL_LOCK_*.
1606 (FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE):
1608 (__lll_lock_wait_private): Add prototype.
1609 (__lll_lock_wait, __lll_timedlock_wait, __lll_robust_lock_wait,
1610 __lll_robust_timedlock_wait, __lll_unlock_wake_private,
1611 __lll_unlock_wake): Likewise.
1612 (lll_lock): Add private argument. Call __lll_lock_wait_private
1613 if private is constant LLL_PRIVATE.
1614 (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
1615 lll_timedlock, lll_robust_timedlock): Add private argument.
1616 (lll_unlock): Add private argument. Call __lll_unlock_wake_private
1617 if private is constant LLL_PRIVATE.
1618 (lll_robust_unlock, lll_robust_dead): Add private argument.
1619 (lll_lock_t): Remove.
1620 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
1621 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
1622 lll_cond_wake, lll_cond_broadcast): Remove.
1623 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: Include
1624 kernel-features.h and lowlevellock.h.
1625 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
1626 (LOAD_FUTEX_WAIT): Define.
1627 (__lll_robust_mutex_lock_wait): Rename to ...
1628 (__lll_robust_lock_wait): ... this. Add private argument.
1629 Use LOAD_FUTEX_WAIT macro.
1630 (__lll_robust_mutex_timedlock_wait): Rename to ...
1631 (__lll_robust_timedlock_wait): ... this. Add private argument.
1632 Use __NR_gettimeofday. Use LOAD_FUTEX_WAIT macro.
1633 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Include
1635 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
1636 (pthread_barrier_wait): Use __lll_{lock,unlock}_* instead of
1637 __lll_mutex_{lock,unlock}_*.
1638 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Include
1639 lowlevellock.h and pthread-errnos.h.
1640 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
1641 FUTEX_CMP_REQUEUE, EINVAL): Remove.
1642 (__pthread_cond_broadcast): Use __lll_{lock,unlock}_* instead of
1643 __lll_mutex_{lock,unlock}_*.
1644 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Include
1645 lowlevellock.h and pthread-errnos.h.
1646 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE, EINVAL): Remove.
1647 (__pthread_cond_signal): Use __lll_{lock,unlock}_* instead of
1648 __lll_mutex_{lock,unlock}_*.
1649 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
1651 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE): Remove.
1652 (__pthread_cond_timedwait): Use __lll_{lock,unlock}_* instead of
1653 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
1654 (__condvar_tw_cleanup): Likewise.
1655 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
1657 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
1658 (__pthread_cond_wait): Use __lll_{lock,unlock}_* instead of
1659 __lll_mutex_{lock,unlock}_*.
1660 ( __condvar_w_cleanup): Likewise.
1661 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Include lowlevellock.h.
1662 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
1663 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Include
1665 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
1666 (__pthread_rwlock_rdlock): Use __lll_{lock,unlock}_* instead of
1667 __lll_mutex_{lock,unlock}_*.
1668 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Include
1670 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
1671 FUTEX_PRIVATE_FLAG): Remove.
1672 (pthread_rwlock_timedrdlock): Use __lll_{lock,unlock}_* instead of
1673 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
1674 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Include
1676 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
1677 FUTEX_PRIVATE_FLAG): Remove.
1678 (pthread_rwlock_timedwrlock): Use __lll_{lock,unlock}_* instead of
1679 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
1680 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Include
1682 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
1683 (__pthread_rwlock_unlock): Use __lll_{lock,unlock}_* instead of
1684 __lll_mutex_{lock,unlock}_*.
1685 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Include
1687 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
1688 (__pthread_rwlock_wrlock): Use __lll_{lock,unlock}_* instead of
1689 __lll_mutex_{lock,unlock}_*.
1690 * sysdeps/unix/sysv/linux/sh/sem_post.S: Include lowlevellock.h.
1691 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
1692 (__new_sem_post): Use standard initial exec code sequences.
1693 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Include
1695 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
1696 FUTEX_PRIVATE_FLAG): Remove.
1697 (sem_timedwait): Use __NR_gettimeofday. Use standard initial
1698 exec code sequences.
1699 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Include lowlevellock.h.
1700 (__new_sem_trywait): Use standard initial exec code sequences.
1701 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Include lowlevellock.h.
1702 (__new_sem_wait): Use standard initial exec code sequences.
1704 2007-07-31 Anton Blanchard <anton@samba.org>
1706 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
1707 Use __asm __volatile (__lll_acq_instr ::: "memory") instead of
1708 atomic_full_barrier.
1710 2007-07-31 Jakub Jelinek <jakub@redhat.com>
1712 * allocatestack.c (stack_cache_lock): Change type to int.
1713 (get_cached_stack, allocate_stack, __deallocate_stack,
1714 __make_stacks_executable, __find_thread_by_id, __nptl_setxid,
1715 __pthread_init_static_tls, __wait_lookup_done): Add LLL_PRIVATE
1716 as second argument to lll_lock and lll_unlock macros on
1718 * pthread_create.c (__find_in_stack_list): Likewise.
1719 (start_thread): Similarly with pd->lock. Use lll_robust_dead
1720 macro instead of lll_robust_mutex_dead, pass LLL_SHARED to it
1722 * descr.h (struct pthread): Change lock and setxid_futex field
1724 * old_pthread_cond_broadcast.c (__pthread_cond_broadcast_2_0): Use
1725 LLL_LOCK_INITIALIZER instead of LLL_MUTEX_LOCK_INITIALIZER.
1726 * old_pthread_cond_signal.c (__pthread_cond_signal_2_0): Likewise.
1727 * old_pthread_cond_timedwait.c (__pthread_cond_timedwait_2_0):
1729 * old_pthread_cond_wait.c (__pthread_cond_wait_2_0): Likewise.
1730 * pthread_cond_init.c (__pthread_cond_init): Likewise.
1731 * pthreadP.h (__attr_list_lock): Change type to int.
1732 * pthread_attr_init.c (__attr_list_lock): Likewise.
1733 * pthread_barrier_destroy.c (pthread_barrier_destroy): Pass
1734 ibarrier->private ^ FUTEX_PRIVATE_FLAG as second argument to
1736 * pthread_barrier_wait.c (pthread_barrier_wait): Likewise and
1737 also for lll_futex_{wake,wait}.
1738 * pthread_barrier_init.c (pthread_barrier_init): Make iattr
1740 * pthread_cond_broadcast.c (__pthread_cond_broadcast): Pass
1741 LLL_SHARED as second argument to lll_{,un}lock.
1742 * pthread_cond_destroy.c (__pthread_cond_destroy): Likewise.
1743 * pthread_cond_signal.c (__pthread_cond_singal): Likewise.
1744 * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
1745 * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait):
1747 * pthread_getattr_np.c (pthread_getattr_np): Add LLL_PRIVATE
1748 as second argument to lll_{,un}lock macros on pd->lock.
1749 * pthread_getschedparam.c (__pthread_getschedparam): Likewise.
1750 * pthread_setschedparam.c (__pthread_setschedparam): Likewise.
1751 * pthread_setschedprio.c (pthread_setschedprio): Likewise.
1752 * tpp.c (__pthread_tpp_change_priority, __pthread_current_priority):
1754 * sysdeps/pthread/createthread.c (do_clone, create_thread):
1756 * pthread_once.c (once_lock): Change type to int.
1757 (__pthread_once): Pass LLL_PRIVATE as second argument to
1758 lll_{,un}lock macros on once_lock.
1759 * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Use
1760 lll_{,un}lock macros instead of lll_mutex_{,un}lock, pass
1761 rwlock->__data.__shared as second argument to them and similarly
1763 * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock):
1765 * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock):
1767 * pthread_rwlock_tryrdlock.c (__pthread_rwlock_tryrdlock): Likewise.
1768 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Likewise.
1769 * pthread_rwlock_unlock.c (__pthread_rwlock_unlock): Likewise.
1770 * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
1771 * sem_close.c (sem_close): Pass LLL_PRIVATE as second argument
1772 to lll_{,un}lock macros on __sem_mappings_lock.
1773 * sem_open.c (check_add_mapping): Likewise.
1774 (__sem_mappings_lock): Change type to int.
1775 * semaphoreP.h (__sem_mappings_lock): Likewise.
1776 * pthread_mutex_lock.c (LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
1777 LLL_ROBUST_MUTEX_LOCK): Use lll_{,try,robust_}lock macros
1778 instead of lll_*mutex_*, pass LLL_SHARED as last
1780 (__pthread_mutex_lock): Use lll_unlock instead of lll_mutex_unlock,
1781 pass LLL_SHARED as last argument.
1782 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK,
1783 LLL_MUTEX_TRYLOCK, LLL_ROBUST_MUTEX_LOCK): Use
1784 lll_{cond_,cond_try,robust_cond}lock macros instead of lll_*mutex_*,
1785 pass LLL_SHARED as last argument.
1786 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
1787 lll_{timed,try,robust_timed,un}lock instead of lll_*mutex*, pass
1788 LLL_SHARED as last argument.
1789 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Similarly.
1790 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt):
1792 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_lock,
1793 __libc_lock_lock_recursive, __libc_lock_unlock,
1794 __libc_lock_unlock_recursive): Pass LLL_PRIVATE as second
1795 argument to lll_{,un}lock.
1796 * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_lock,
1797 _IO_lock_unlock): Likewise.
1798 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Don't use
1800 * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
1801 Pass LLL_PRIVATE as second argument to lll_{,un}lock macros on
1803 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork,
1804 free_mem): Likewise.
1805 (__fork_lock): Change type to int.
1806 * sysdeps/unix/sysv/linux/fork.h (__fork_lock): Likewise.
1807 * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Pass
1808 isem->private ^ FUTEX_PRIVATE_FLAG as second argument to
1810 * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
1811 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Likewise.
1812 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait_private):
1814 (__lll_lock_wait, __lll_timedlock_wait): Add private argument and
1815 pass it through to lll_futex_*wait, only compile in when
1817 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
1818 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): Add private
1819 argument and pass it through to lll_futex_*wait.
1820 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Renamed all
1821 lll_mutex_* resp. lll_robust_mutex_* macros to lll_* resp.
1822 lll_robust_*. Renamed all __lll_mutex_* resp. __lll_robust_mutex_*
1823 inline functions to __lll_* resp. __lll_robust_*.
1824 (LLL_MUTEX_LOCK_INITIALIZER): Remove.
1825 (lll_mutex_dead): Add private argument.
1826 (__lll_lock_wait_private): New prototype.
1827 (__lll_lock_wait, __lll_robust_lock_wait, __lll_lock_timedwait,
1828 __lll_robust_lock_timedwait): Add private argument to prototypes.
1829 (__lll_lock): Add private argument, if it is constant LLL_PRIVATE,
1830 call __lll_lock_wait_private, otherwise pass private to
1832 (__lll_robust_lock, __lll_cond_lock, __lll_timedlock,
1833 __lll_robust_timedlock): Add private argument, pass it to
1834 __lll_*wait functions.
1835 (__lll_unlock): Add private argument, if it is constant LLL_PRIVATE,
1836 call __lll_unlock_wake_private, otherwise pass private to
1838 (__lll_robust_unlock): Add private argument, pass it to
1839 __lll_robust_unlock_wake.
1840 (lll_lock, lll_robust_lock, lll_cond_lock, lll_timedlock,
1841 lll_robust_timedlock, lll_unlock, lll_robust_unlock): Add private
1842 argument, pass it through to __lll_* inline function.
1843 (__lll_mutex_unlock_force, lll_mutex_unlock_force): Remove.
1844 (lll_lock_t): Remove.
1845 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
1846 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
1847 lll_cond_wake, lll_cond_broadcast): Remove.
1848 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
1849 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
1850 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
1851 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
1852 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Allow including
1853 the header from assembler. Renamed all lll_mutex_* resp.
1854 lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
1855 (LOCK, FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP,
1856 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
1857 (LLL_MUTEX_LOCK_INITIALIZER, LLL_MUTEX_LOCK_INITIALIZER_LOCKED,
1858 LLL_MUTEX_LOCK_INITIALIZER_WAITERS): Remove.
1859 (__lll_mutex_lock_wait, __lll_mutex_timedlock_wait,
1860 __lll_mutex_unlock_wake, __lll_lock_wait, __lll_unlock_wake):
1862 (__lll_trylock_asm, __lll_lock_asm_start, __lll_unlock_asm): Define.
1863 (lll_robust_trylock, lll_cond_trylock): Use LLL_LOCK_INITIALIZER*
1864 rather than LLL_MUTEX_LOCK_INITIALIZER* macros.
1865 (lll_trylock): Likewise, use __lll_trylock_asm, pass
1866 MULTIPLE_THREADS_OFFSET as another asm operand.
1867 (lll_lock): Add private argument, use __lll_lock_asm_start, pass
1868 MULTIPLE_THREADS_OFFSET as last asm operand, call
1869 __lll_lock_wait_private if private is constant LLL_PRIVATE,
1870 otherwise pass private as another argument to __lll_lock_wait.
1871 (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
1872 lll_timedlock, lll_robust_timedlock): Add private argument, pass
1873 private as another argument to __lll_*lock_wait call.
1874 (lll_unlock): Add private argument, use __lll_unlock_asm, pass
1875 MULTIPLE_THREADS_OFFSET as another asm operand, call
1876 __lll_unlock_wake_private if private is constant LLL_PRIVATE,
1877 otherwise pass private as another argument to __lll_unlock_wake.
1878 (lll_robust_unlock): Add private argument, pass private as another
1879 argument to __lll_unlock_wake.
1880 (lll_robust_dead): Add private argument, use __lll_private_flag
1882 (lll_islocked): Use LLL_LOCK_INITIALIZER instead of
1883 LLL_MUTEX_LOCK_INITIALIZER.
1884 (lll_lock_t): Remove.
1885 (LLL_LOCK_INITIALIZER_WAITERS): Define.
1886 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
1887 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
1888 lll_cond_wake, lll_cond_broadcast): Remove.
1889 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
1890 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Revert
1891 2007-05-2{3,9} changes.
1892 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Include
1893 kernel-features.h and lowlevellock.h.
1894 (LOAD_PRIVATE_FUTEX_WAIT): Define.
1895 (LOAD_FUTEX_WAIT): Rewritten.
1896 (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
1898 (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
1899 (__lll_mutex_lock_wait): Rename to ...
1900 (__lll_lock_wait): ... this. Take futex addr from %edx instead of
1901 %ecx, %ecx is now private argument. Don't compile in for libc.so.
1902 (__lll_mutex_timedlock_wait): Rename to ...
1903 (__lll_timedlock_wait): ... this. Use __NR_gettimeofday. %esi
1904 contains private argument. Don't compile in for libc.so.
1905 (__lll_mutex_unlock_wake): Rename to ...
1906 (__lll_unlock_wake): ... this. %ecx contains private argument.
1907 Don't compile in for libc.so.
1908 (__lll_timedwait_tid): Use __NR_gettimeofday.
1909 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Include
1910 kernel-features.h and lowlevellock.h.
1911 (LOAD_FUTEX_WAIT): Define.
1912 (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
1914 (__lll_robust_mutex_lock_wait): Rename to ...
1915 (__lll_robust_lock_wait): ... this. Futex addr is now in %edx
1916 argument, %ecx argument contains private. Use LOAD_FUTEX_WAIT
1918 (__lll_robust_mutex_timedlock_wait): Rename to ...
1919 (__lll_robust_timedlock_wait): ... this. Use __NR_gettimeofday.
1920 %esi argument contains private, use LOAD_FUTEX_WAIT macro.
1921 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Include
1923 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1924 (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
1925 PRIVATE(%ebx) ^ LLL_SHARED as private argument in %ecx to
1926 __lll_lock_wait and __lll_unlock_wake, pass MUTEX(%ebx) address
1927 to __lll_lock_wait in %edx.
1928 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
1929 Include lowlevellock.h and pthread-errnos.h.
1930 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
1931 FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
1932 (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*, pass
1933 cond_lock address in %edx rather than %ecx to __lll_lock_wait,
1934 pass LLL_SHARED in %ecx to both __lll_lock_wait and
1936 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
1937 Include lowlevellock.h and pthread-errnos.h.
1938 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
1939 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
1940 (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*, pass
1941 cond_lock address in %edx rather than %ecx to __lll_lock_wait,
1942 pass LLL_SHARED in %ecx to both __lll_lock_wait and
1944 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
1945 Include lowlevellock.h.
1946 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
1948 (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*, pass
1949 cond_lock address in %edx rather than %ecx to __lll_lock_wait,
1950 pass LLL_SHARED in %ecx to both __lll_lock_wait and
1951 __lll_unlock_wake. Use __NR_gettimeofday.
1952 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
1953 Include lowlevellock.h.
1954 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1955 (__pthread_cond_wait, __condvar_w_cleanup): Rename __lll_mutex_*
1956 to __lll_*, pass cond_lock address in %edx rather than %ecx to
1957 __lll_lock_wait, pass LLL_SHARED in %ecx to both __lll_lock_wait
1958 and __lll_unlock_wake.
1959 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S:
1960 Include lowlevellock.h.
1961 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1962 (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*, pass
1963 MUTEX(%ebx) address in %edx rather than %ecx to
1964 __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
1965 and __lll_unlock_wake. Move return value from %ecx to %edx
1967 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1968 Include lowlevellock.h.
1969 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
1971 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
1972 MUTEX(%ebp) address in %edx rather than %ecx to
1973 __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
1974 and __lll_unlock_wake. Move return value from %ecx to %edx
1975 register. Use __NR_gettimeofday.
1976 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1977 Include lowlevellock.h.
1978 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
1980 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
1981 MUTEX(%ebp) address in %edx rather than %ecx to
1982 __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
1983 and __lll_unlock_wake. Move return value from %ecx to %edx
1984 register. Use __NR_gettimeofday.
1985 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
1986 Include lowlevellock.h.
1987 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1988 (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*, pass
1989 MUTEX(%edi) address in %edx rather than %ecx to
1990 __lll_lock_wait, pass PSHARED(%edi) in %ecx to both __lll_lock_wait
1991 and __lll_unlock_wake.
1992 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
1993 Include lowlevellock.h.
1994 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1995 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
1996 MUTEX(%ebx) address in %edx rather than %ecx to
1997 __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
1998 and __lll_unlock_wake. Move return value from %ecx to %edx
2000 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Include
2002 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
2004 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Include lowlevellock.h.
2005 (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
2006 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Include
2008 (LOCK, SYS_futex, SYS_gettimeofday, FUTEX_WAIT): Don't define.
2009 (sem_timedwait): Use __NR_gettimeofday.
2010 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Include
2012 (LOCK): Don't define.
2013 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include
2015 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
2016 * sysdeps/unix/sysv/linux/powerpc/sem_post.c: Wake only when there
2018 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Revert
2019 2007-05-2{3,9} changes.
2020 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Include
2021 kernel-features.h and lowlevellock.h.
2022 (LOAD_PRIVATE_FUTEX_WAIT): Define.
2023 (LOAD_FUTEX_WAIT): Rewritten.
2024 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
2025 (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
2026 (__lll_mutex_lock_wait): Rename to ...
2027 (__lll_lock_wait): ... this. %esi is now private argument.
2028 Don't compile in for libc.so.
2029 (__lll_mutex_timedlock_wait): Rename to ...
2030 (__lll_timedlock_wait): ... this. %esi contains private argument.
2031 Don't compile in for libc.so.
2032 (__lll_mutex_unlock_wake): Rename to ...
2033 (__lll_unlock_wake): ... this. %esi contains private argument.
2034 Don't compile in for libc.so.
2035 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Include
2036 kernel-features.h and lowlevellock.h.
2037 (LOAD_FUTEX_WAIT): Define.
2038 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
2039 (__lll_robust_mutex_lock_wait): Rename to ...
2040 (__lll_robust_lock_wait): ... this. %esi argument contains private.
2041 Use LOAD_FUTEX_WAIT macro.
2042 (__lll_robust_mutex_timedlock_wait): Rename to ...
2043 (__lll_robust_timedlock_wait): ... this. %esi argument contains
2044 private, use LOAD_FUTEX_WAIT macro.
2045 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Include
2047 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2048 (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
2049 PRIVATE(%rdi) ^ LLL_SHARED as private argument in %esi to
2050 __lll_lock_wait and __lll_unlock_wake.
2051 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S:
2052 Include lowlevellock.h and pthread-errnos.h.
2053 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
2054 FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
2055 (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*,
2056 pass LLL_SHARED in %esi to both __lll_lock_wait and
2058 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S:
2059 Include lowlevellock.h and pthread-errnos.h.
2060 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
2061 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
2062 (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*,
2063 pass LLL_SHARED in %esi to both __lll_lock_wait and
2065 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:
2066 Include lowlevellock.h.
2067 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2068 (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*,
2069 pass LLL_SHARED in %esi to both __lll_lock_wait and
2071 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
2072 Include lowlevellock.h.
2073 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2074 (__pthread_cond_wait, __condvar_cleanup): Rename __lll_mutex_*
2075 to __lll_*, pass LLL_SHARED in %esi to both __lll_lock_wait
2076 and __lll_unlock_wake.
2077 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S:
2078 Include lowlevellock.h.
2079 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
2081 (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*,
2082 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
2083 and __lll_unlock_wake.
2084 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
2085 Include lowlevellock.h.
2086 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
2088 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
2089 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
2090 and __lll_unlock_wake.
2091 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
2092 Include lowlevellock.h.
2093 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
2095 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
2096 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
2097 and __lll_unlock_wake.
2098 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S:
2099 Include lowlevellock.h.
2100 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
2102 (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*,
2103 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
2104 and __lll_unlock_wake.
2105 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S:
2106 Include lowlevellock.h.
2107 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
2109 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
2110 pass PSHARED(%rdi) in %ecx to both __lll_lock_wait
2111 and __lll_unlock_wake.
2112 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Include
2114 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
2116 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Include lowlevellock.h.
2117 (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
2118 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Include
2120 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
2121 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Include
2123 (LOCK): Don't define.
2124 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Include
2126 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
2127 * sysdeps/unix/sysv/linux/sparc/internaltypes.h: New file.
2128 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_destroy.c: New file.
2129 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_init.c: New file.
2130 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_wait.c: New file.
2131 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
2132 (__lll_lock_wait_private): New function.
2133 (__lll_lock_wait, __lll_timedlock_wait): Add private argument, pass
2134 it to lll_futex_*wait. Don't compile in for libc.so.
2135 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c:
2137 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c
2138 (struct sparc_pthread_barrier): Remove.
2139 (pthread_barrier_wait): Use union sparc_pthread_barrier instead of
2140 struct sparc_pthread_barrier. Pass
2141 ibarrier->s.pshared ? LLL_SHARED : LLL_PRIVATE to lll_{,un}lock
2142 and lll_futex_wait macros.
2143 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
2145 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
2146 Include sparc pthread_barrier_wait.c instead of generic one.
2148 2007-07-30 Jakub Jelinek <jakub@redhat.com>
2150 * tst-rwlock14.c (do_test): Avoid warnings on 32-bit arches.
2152 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
2153 (pthread_rwlock_timedrdlock): Copy futex retval to %esi rather than
2155 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
2156 (pthread_rwlock_timedwrlock): Likewise.
2157 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
2158 (__pthread_rwlock_unlock): Fix MUTEX != 0 args to __lll_*.
2160 2007-07-31 Jakub Jelinek <jakub@redhat.com>
2162 * sysdeps/sparc/tls.h (tcbhead_t): Add private_futex field.
2164 2007-07-26 Jakub Jelinek <jakub@redhat.com>
2166 * tst-locale2.c (useless): Add return statement.
2168 2007-07-24 Jakub Jelinek <jakub@redhat.com>
2170 * allocatestack.c (__nptl_setxid, __wait_lookup_done): Replace
2171 lll_private_futex_* (*) with lll_futex_* (*, LLL_PRIVATE).
2172 * pthread_create.c (start_thread): Likewise.
2173 * init.c (sighandler_setxid): Likewise.
2174 * sysdeps/alpha/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
2175 * sysdeps/ia64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
2176 * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
2177 * sysdeps/s390/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
2178 * sysdeps/powerpc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
2179 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
2180 * sysdeps/sparc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
2181 * sysdeps/sh/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
2182 * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY, AIO_MISC_WAIT):
2184 * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY, GAI_MISC_WAIT):
2186 * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
2188 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_waitzero,
2189 __rtld_notify): Likewise.
2190 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Likewise.
2191 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (clear_once_control,
2192 __pthread_once): Likewise.
2193 * sysdeps/unix/sysv/linux/alpha/pthread_once.c (clear_once_control,
2194 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
2195 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_PRIVATE_FLAG,
2196 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
2197 (lll_futex_wait): Add private argument, define as wrapper around
2198 lll_futex_timed_wait.
2199 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
2200 use __lll_private_flag macro.
2201 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
2202 __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
2203 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (clear_once_control,
2204 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
2205 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_PRIVATE_FLAG,
2206 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
2207 (lll_futex_wait): Add private argument, define as wrapper around
2208 lll_futex_timed_wait.
2209 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
2210 use __lll_private_flag macro.
2211 (__lll_mutex_unlock, __lll_robust_mutex_unlock, lll_wait_tid,
2212 __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
2213 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
2215 (lll_futex_timed_wait, lll_futex_wake): Use it.
2216 (lll_private_futex_wait, lll_private_futex_timed_wait,
2217 lll_private_futex_wake): Removed.
2218 * sysdeps/unix/sysv/linux/s390/pthread_once.c (clear_once_control,
2219 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
2220 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_PRIVATE_FLAG,
2221 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
2222 (lll_futex_wait): Add private argument, define as wrapper around
2223 lll_futex_timed_wait.
2224 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
2225 use __lll_private_flag macro.
2226 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
2227 lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
2229 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
2230 (lll_private_futex_wait, lll_private_futex_timed_wait,
2231 lll_private_futex_wake): Removed.
2232 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_private_flag):
2233 Fix !__ASSUME_PRIVATE_FUTEX non-constant private case.
2234 (lll_private_futex_wait, lll_private_futex_timed_wait,
2235 lll_private_futex_wake): Removed.
2236 * sysdeps/unix/sysv/linux/sparc/pthread_once.c (clear_once_control,
2237 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
2238 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_PRIVATE_FLAG,
2239 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
2240 (lll_futex_wait): Add private argument, define as wrapper around
2241 lll_futex_timed_wait.
2242 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
2243 use __lll_private_flag macro.
2244 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
2245 lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
2247 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (__lll_private_flag):
2249 (lll_futex_timed_wait, lll_futex_wake): Use it.
2250 (lll_private_futex_wait, lll_private_futex_timed_wait,
2251 lll_private_futex_wake): Removed.
2253 2007-07-27 Jakub Jelinek <jakub@redhat.com>
2255 * sysdeps/sparc/tls.h (tcbhead_t): Move gscope_flag to the end
2256 of the structure for sparc32.
2258 2007-07-26 Aurelien Jarno <aurelien@aurel32.net>
2260 * sysdeps/sparc/tls.h (tcbhead_t): Add gscope_flag.
2262 2007-07-23 Ulrich Drepper <drepper@redhat.com>
2264 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
2265 code used when private futexes are assumed.
2266 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
2269 2007-07-23 Jakub Jelinek <jakub@redhat.com>
2271 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
2272 (__lll_private_flag): Define.
2273 (lll_futex_wait): Define as a wrapper around lll_futex_timed_wait.
2274 (lll_futex_timed_wait, lll_futex_wake, lll_futex_wake_unlock): Use
2276 (lll_private_futex_wait, lll_private_futex_timedwait,
2277 lll_private_futex_wake): Define as wrapper around non-_private
2279 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
2280 (__lll_private_flag): Define.
2281 (lll_futex_timed_wait, lll_futex_wake): Use __lll_private_flag.
2282 (lll_private_futex_wait, lll_private_futex_timedwait,
2283 lll_private_futex_wake): Define as wrapper around non-_private
2286 2007-07-10 Steven Munroe <sjmunroe@us.ibm.com>
2288 * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Add LLL_SHARED
2289 parameter to lll_futex_wait call.
2290 * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
2292 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
2293 Replace lll_futex_wait with lll_private_futex_wait.
2294 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
2295 Add LLL_SHARED parameter to lll_futex_wake().
2297 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define LLL_PRIVATE
2298 LLL_SHARED, lll_private_futex_wait, lll_private_futex_timed_wait and
2299 lll_private_futex_wake.
2300 (lll_futex_wait): Add private parameter. Adjust FUTEX_PRIVATE_FLAG
2301 bit from private parm before syscall.
2302 (lll_futex_timed_wait): Likewise.
2303 (lll_futex_wake): Likewise.
2304 (lll_futex_wake_unlock): Likewise.
2305 (lll_mutex_unlock): Add LLL_SHARED parm to lll_futex_wake call.
2306 (lll_robust_mutex_unlock): Likewise.
2307 (lll_mutex_unlock_force): Likewise.
2308 (lll_wait_tid): Add LLL_SHARED parm to lll_futex_wait call.
2310 2007-07-23 Ulrich Drepper <drepper@redhat.com>
2312 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
2313 compilation when unconditionally using private futexes.
2314 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
2315 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
2317 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
2318 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
2320 2007-07-17 Jakub Jelinek <jakub@redhat.com>
2322 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock_clear_flags2):
2325 2007-07-06 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2327 * sysdeps/sh/tls.h: Include stdlib.h, list.h, sysdep.h and
2330 2007-05-16 Roland McGrath <roland@redhat.com>
2332 * init.c (__nptl_initial_report_events): New variable.
2333 (__pthread_initialize_minimal_internal): Initialize pd->report_events
2336 2007-06-22 Jakub Jelinek <jakub@redhat.com>
2338 * pthread_getattr_np.c (pthread_getattr_np): Clear cpuset and
2339 cpusetsize if pthread_getaffinity_np failed with ENOSYS.
2341 2007-06-19 Ulrich Drepper <drepper@redhat.com>
2343 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Remove mrlock
2346 2007-06-18 Ulrich Drepper <drepper@redhat.com>
2348 * pthreadP.h: Define PTHREAD_MUTEX_TYPE.
2349 * phtread_mutex_lock.c: Use PTHREAD_MUTEX_TYPE.
2350 * pthread_mutex_timedlock.c: Likewise.
2351 * pthread_mutex_trylock.c: Likewise.
2352 * pthread_mutex_unlock.c: Likewise.
2354 2007-06-17 Andreas Schwab <schwab@suse.de>
2356 * sysdeps/pthread/pt-initfini.c: Tell gcc about the nonstandard
2359 2007-06-17 Ulrich Drepper <drepper@redhat.com>
2361 * allocatestack.c (allocate_stack): Make code compile if
2362 __ASSUME_PRIVATE_FUTEX is set.
2364 2007-06-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2366 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S:
2367 (__pthread_rwlock_rdlock): Don't use non SH-3/4 instruction.
2368 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S:
2369 (__pthread_rwlock_wrlock): Likewise.
2370 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
2371 (pthread_rwlock_timedrdlock): Likewise.
2372 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
2373 (pthread_rwlock_timedwrlock): Likewise.
2374 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S:
2375 (__pthread_rwlock_unlock): Likewise.
2377 2007-06-10 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2379 * sysdeps/sh/tcb-offsets.sym: Add PRIVATE_FUTEX.
2380 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Include endian.h.
2381 Split __flags into __flags, __shared, __pad1 and __pad2.
2382 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Use private
2383 futexes if they are available.
2384 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Adjust so that change
2385 in libc-lowlevellock.S allow using private futexes.
2386 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
2387 FUTEX_PRIVATE_FLAG. Add additional parameter to lll_futex_wait,
2388 lll_futex_timed_wait and lll_futex_wake. Change lll_futex_wait
2389 to call lll_futex_timed_wait. Add lll_private_futex_wait,
2390 lll_private_futex_timed_wait and lll_private_futex_wake.
2391 (lll_robust_mutex_unlock): Fix typo.
2392 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Use private
2393 field in futex command setup.
2394 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Use
2395 COND_NWAITERS_SHIFT instead of COND_CLOCK_BITS.
2396 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
2397 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use private futexes
2398 if they are available. Remove clear_once_control.
2399 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Use private
2400 futexes if they are available.
2401 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
2402 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
2403 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
2404 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
2405 * sysdeps/unix/sysv/linux/sh/sem_post.S: Add private futex support.
2406 Wake only when there are waiters.
2407 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add private futex
2408 support. Indicate that there are waiters. Remove unnecessary
2409 extra cancellation test.
2410 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise. Removed
2411 left-over duplication of __sem_wait_cleanup.
2413 2007-06-07 Ulrich Drepper <drepper@redhat.com>
2415 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Add additional
2416 parameter to lll_futex_wait, lll_futex_timed_wait, and
2417 lll_futex_wake. Change lll_futex_wait to call lll_futex_timed_wait.
2418 Add lll_private_futex_wait, lll_private_futex_timed_wait, and
2419 lll_private_futex_wake.
2420 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
2421 * allocatestack.c: Adjust use of lll_futex_* macros.
2423 * lowlevellock.h: Likewise.
2424 * pthread_barrier_wait.c: Likewise.
2425 * pthread_cond_broadcast.c: Likewise.
2426 * pthread_cond_destroy.c: Likewise.
2427 * pthread_cond_signal.c: Likewise.
2428 * pthread_cond_timedwait.c: Likewise.
2429 * pthread_cond_wait.c: Likewise.
2430 * pthread_create.c: Likewise.
2431 * pthread_mutex_lock.c: Likewise.
2432 * pthread_mutex_setprioceiling.c: Likewise.
2433 * pthread_mutex_timedlock.c: Likewise.
2434 * pthread_mutex_unlock.c: Likewise.
2435 * pthread_rwlock_timedrdlock.c: Likewise.
2436 * pthread_rwlock_timedwrlock.c: Likewise.
2437 * pthread_rwlock_unlock.c: Likewise.
2438 * sysdeps/alpha/tls.h: Likewise.
2439 * sysdeps/i386/tls.h: Likewise.
2440 * sysdeps/ia64/tls.h: Likewise.
2441 * sysdeps/powerpc/tls.h: Likewise.
2442 * sysdeps/pthread/aio_misc.h: Likewise.
2443 * sysdeps/pthread/gai_misc.h: Likewise.
2444 * sysdeps/s390/tls.h: Likewise.
2445 * sysdeps/sh/tls.h: Likewise.
2446 * sysdeps/sparc/tls.h: Likewise.
2447 * sysdeps/unix/sysv/linux/fork.c: Likewise.
2448 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
2449 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: Likewise.
2450 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Likewise.
2451 * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
2452 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
2453 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
2454 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
2455 * sysdeps/unix/sysv/linux/sparc/pthread_once.c: Likewise.
2456 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c:
2458 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: Likewise.
2459 * sysdeps/x86_64/tls.h: Likewise.
2461 2007-05-29 Ulrich Drepper <drepper@redhat.com>
2463 * pthread_getattr_np.c: No need to install a cancellation handler,
2464 this is no cancellation point.
2465 * pthread_getschedparam.c: Likewise.
2466 * pthread_setschedparam.c: Likewise.
2467 * pthread_setschedprio.c: Likewise.
2468 * sysdeps/unix/sysv/linux/lowlevellock.c: Remove all traces of
2470 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
2471 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
2472 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
2473 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2474 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2475 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2476 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
2477 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
2478 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
2479 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: Likewise.
2480 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
2481 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2483 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Checking
2484 whether there are more than one thread makes no sense here since
2485 we only call the slow path if the locks are taken.
2486 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Likewise.
2488 * sysdeps/unix/sysv/linux/internaltypes.h: Introduce
2489 COND_NWAITERS_SHIFT.
2490 * pthread_cond_destroy.c: Use COND_NWAITERS_SHIFT instead of
2492 * pthread_cond_init.c: Likewise.
2493 * pthread_cond_timedwait.c: Likewise.
2494 * pthread_cond_wait.c: Likewise.
2495 * pthread_condattr_getclock.c: Likewise.
2496 * pthread_condattr_setclock.c: Likewise.
2497 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Likewise.
2498 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2499 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
2500 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
2501 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2503 2007-05-28 Jakub Jelinek <jakub@redhat.com>
2505 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c: Include
2508 * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Use explicit
2510 (THREAD_GSCOPE_GET_FLAG): Remove.
2511 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Remove.
2512 * allocatestack.c (__wait_lookup_done): Revert 2007-05-24
2514 * sysdeps/powerpc/tls.h (tcbhead_t): Remove gscope_flag.
2515 (THREAD_GSCOPE_GET_FLAG): Remove.
2516 (THREAD_GSCOPE_RESET_FLAG): Use THREAD_SELF->header.gscope_flag
2517 instead of THREAD_GSCOPE_GET_FLAG.
2518 (THREAD_GSCOPE_SET_FLAG): Likewise. Add atomic_write_barrier after
2520 * sysdeps/s390/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
2521 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
2522 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
2523 THREAD_GSCOPE_WAIT): Define.
2524 * sysdeps/sparc/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
2525 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
2526 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
2527 THREAD_GSCOPE_WAIT): Define.
2528 * sysdeps/sh/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
2529 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
2530 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
2531 THREAD_GSCOPE_WAIT): Define.
2532 * sysdeps/ia64/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
2533 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
2534 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
2535 THREAD_GSCOPE_WAIT): Define.
2537 2007-05-24 Richard Henderson <rth@redhat.com>
2539 * descr.h (struct pthread): Add header.gscope_flag.
2540 * sysdeps/alpha/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
2541 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
2542 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
2543 THREAD_GSCOPE_WAIT): Define.
2545 2007-05-27 Ulrich Drepper <drepper@redhat.com>
2547 * init.c: Make it compile with older kernel headers.
2549 * tst-initializers1.c: Show through exit code which test failed.
2551 * pthread_rwlock_init.c: Also initialize __shared field.
2552 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Split __flags
2553 element in rwlock structure into four byte elements. One of them is
2554 the new __shared element.
2555 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h [__WORDSIZE=32]:
2557 [__WORDSIZE=64]: Renamed __pad1 element int rwlock structure to
2558 __shared, adjust names of other padding elements.
2559 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2560 * sysdeps/pthread/pthread.h: Adjust rwlock initializers.
2561 * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: Add PSHARED.
2562 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define
2564 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Change main
2565 futex to use private operations if possible.
2566 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
2568 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
2570 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
2571 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
2572 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
2573 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2575 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2577 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
2578 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
2580 2007-05-26 Ulrich Drepper <drepper@redhat.com>
2582 * pthreadP.h (PTHREAD_RWLOCK_PREFER_READER_P): Define.
2583 * pthread_rwlock_rdlock.c: Use PTHREAD_RWLOCK_PREFER_READER_P.
2584 * pthread_rwlock_timedrdlock.c: Likewise.
2585 * pthread_rwlock_tryrdlock.c: Likewise.
2587 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S (sem_trywait): Tiny
2590 * sysdeps/unix/sysv/linux/sem_wait.c: Add missing break.
2591 * sysdeps/unix/sysv/linux/sem_timedwait.c: Removed left-over
2592 duplication of __sem_wait_cleanup.
2594 * allocatestack.c: Revert last change.
2596 * sysdeps/i386/tls.h: Likewise.
2597 * sysdeps/x86_64/tls.h: Likewise.
2598 * descr.h [TLS_DTV_AT_TP] (struct pthread): Add private_futex field to
2600 * sysdeps/powerpc/tcb-offsets.sym: Add PRIVATE_FUTEX_OFFSET.
2602 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_barrier):
2604 * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: Add PRIVATE definition.
2605 * pthread_barrier_init.c: Set private flag if pshared and private
2606 futexes are supported.
2607 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Use
2608 private field in futex command setup.
2609 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
2611 2007-05-25 Ulrich Drepper <drepper@redhat.com>
2613 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Add private futex
2615 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
2616 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
2617 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
2618 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
2619 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
2621 * semaphoreP.h: Declare __old_sem_init and __old_sem_wait.
2622 * sem_init.c (__new_sem_init): Rewrite to initialize all three
2623 fields in the structure.
2624 (__old_sem_init): New function.
2625 * sem_open.c: Initialize all fields of the structure.
2626 * sem_getvalue.c: Adjust for renamed element.
2627 * sysdeps/unix/sysv/linux/Makefile [subdir=nptl]
2628 (gen-as-const-headers): Add structsem.sym.
2629 * sysdeps/unix/sysv/linux/structsem.sym: New file.
2630 * sysdeps/unix/sysv/linux/internaltypes.h: Rename struct sem to
2631 struct new_sem. Add struct old_sem.
2632 * sysdeps/unix/sysv/linux/sem_post.c: Wake only when there are waiters.
2633 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
2634 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
2635 * sysdeps/unix/sysv/linux/sem_wait.c: Indicate that there are waiters.
2636 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
2637 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
2638 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
2639 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
2640 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
2641 * Makefile (tests): Add tst-sem10, tst-sem11, tst-sem12.
2642 * tst-sem10.c: New file.
2643 * tst-sem11.c: New file.
2644 * tst-sem12.c: New file.
2645 * tst-typesizes.c: Test struct new_sem and struct old_sem instead
2648 2007-05-25 Ulrich Drepper <drepper@redhat.com>
2649 Jakub Jelinek <jakub@redhat.com>
2651 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
2652 Move __pthread_enable_asynccancel right before futex syscall.
2653 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
2656 2007-05-24 Jakub Jelinek <jakub@redhat.com>
2658 * sysdeps/i386/tls.h (THREAD_SET_PRIVATE_FUTEX,
2659 THREAD_COPY_PRIVATE_FUTEX): Define.
2660 * sysdeps/x86_64/tls.h (THREAD_SET_PRIVATE_FUTEX,
2661 THREAD_COPY_PRIVATE_FUTEX): Define.
2662 * allocatestack.c (allocate_stack): Use THREAD_COPY_PRIVATE_FUTEX.
2663 * init.c (__pthread_initialize_minimal_internal): Use
2664 THREAD_SET_PRIVATE_FUTEX.
2666 * sysdeps/powerpc/tls.h (tcbhead_t): Add gscope_flag.
2667 (THREAD_GSCOPE_FLAG_UNUSED, THREAD_GSCOPE_FLAG_USED,
2668 THREAD_GSCOPE_FLAG_WAIT): Define.
2669 (THREAD_GSCOPE_GET_FLAG, THREAD_GSCOPE_SET_FLAG,
2670 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_WAIT): Define.
2671 * sysdeps/i386/tls.h (THREAD_GSCOPE_WAIT): Don't use
2673 (THREAD_GSCOPE_GET_FLAG): Define.
2674 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Define.
2675 * allocatestack.c (__wait_lookup_done): Use THREAD_GSCOPE_GET_FLAG
2676 instead of ->header.gscope_flag directly.
2678 2007-05-23 Ulrich Drepper <drepper@redhat.com>
2680 * init.c (__pthread_initialize_minimal_internal): Check whether
2681 private futexes are available.
2682 * allocatestack.c (allocate_stack): Copy private_futex field from
2683 current thread into the new stack.
2684 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Use private
2685 futexes if they are available.
2686 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise
2687 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Adjust so that change
2688 in libc-lowlevellock.S allow using private futexes.
2689 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
2690 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
2692 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
2693 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use private futexes
2694 if they are available.
2695 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
2696 * sysdeps/x86_64/tcb-offsets.sym: Add PRIVATE_FUTEX.
2697 * sysdeps/i386/tcb-offsets.sym: Likewise.
2698 * sysdeps/x86_64/tls.h (tcbhead_t): Add private_futex field.
2699 * sysdeps/i386/tls.h (tcbhead_t): Likewise.
2701 2007-05-21 Ulrich Drepper <drepper@redhat.com>
2703 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
2704 Remove ptr_wait_lookup_done again.
2705 * init.c (pthread_functions): Don't add .ptr_wait_lookup_done here.
2706 (__pthread_initialize_minimal_internal): Initialize
2707 _dl_wait_lookup_done pointer in _rtld_global directly.
2708 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
2709 Remove code to code _dl_wait_lookup_done.
2710 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_WAIT): The pointer is not
2713 2007-05-21 Jakub Jelinek <jakub@redhat.com>
2715 * tst-robust9.c (do_test): Don't fail if ENABLE_PI and
2716 pthread_mutex_init failed with ENOTSUP.
2718 2007-05-19 Ulrich Drepper <drepper@redhat.com>
2720 * allocatestack.c (__wait_lookup_done): New function.
2721 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
2722 Add ptr_wait_lookup_done.
2723 * init.c (pthread_functions): Initialize .ptr_wait_lookup_done.
2724 * pthreadP.h: Declare __wait_lookup_done.
2725 * sysdeps/i386/tls.h (tcbhead_t): Add gscope_flag.
2726 Define macros to implement reference handling of global scope.
2727 * sysdeps/x86_64/tls.h: Likewise.
2728 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
2729 Initialize GL(dl_wait_lookup_done).
2731 2007-05-17 Ulrich Drepper <drepper@redhat.com>
2734 * pthread_mutex_lock.c: Preserve FUTEX_WAITERS bit when dead owner
2736 * pthread_mutex_timedlock.c: Likewise.
2737 * pthread_mutex_trylock.c: Likewise.
2738 Patch in part by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
2740 * Makefile (tests): Add tst-robust9 and tst-robustpi9.
2741 * tst-robust9.c: New file.
2742 * tst-robustpi9.c: New file.
2744 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Remove
2745 unnecessary extra cancellation test.
2747 2007-05-14 Ulrich Drepper <drepper@redhat.com>
2749 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Remove unnecessary
2750 extra cancellation test.
2751 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
2753 2007-05-10 Ulrich Drepper <drepper@redhat.com>
2755 * descr.h (struct pthread): Rearrange members to fill hole in
2758 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
2759 (__pthread_setaffinity_new): If syscall was successful and
2760 RESET_VGETCPU_CACHE is defined, use it before returning.
2761 * sysdeps/unix/sysv/linux/x86_64/pthread_setaffinity.c: New file.
2763 2007-05-10 Jakub Jelinek <jakub@redhat.com>
2766 * tst-align2.c: Include stackinfo.h.
2767 * tst-getpid1.c: Likewise.
2769 2007-05-02 Carlos O'Donell <carlos@systemhalted.org>
2772 * tst-align2.c (do_test): Add _STACK_GROWS_UP case.
2773 * tst-getpid1.c (do_test): Likewise.
2776 * allocatestack.c (change_stack_perm): Add _STACK_GROWS_UP case.
2777 (allocate_stack): Likewise.
2779 2007-05-07 Ulrich Drepper <drepper@redhat.com>
2781 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
2782 (__lll_robust_lock_wait): Fix race caused by reloading of futex value.
2783 (__lll_robust_timedlock_wait): Likewise.
2784 Reported by Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>.
2786 2007-05-06 Mike Frysinger <vapier@gentoo.org>
2789 * tst-cancel-wrappers.sh: Set C["fdatasync"] to 1.
2790 * tst-cancel4.c (tf_fdatasync): New test.
2792 2007-04-27 Ulrich Drepper <drepper@redhat.com>
2795 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Treat error
2796 check mutexes like normal mutexes.
2799 * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
2800 Initialize the whole sigevent structure to appease valgrind.
2802 2007-04-25 Ulrich Drepper <drepper@redhat.com>
2804 * sysdeps/x86_64/tls.h (tcbhead_t): Add vgetcpu_cache.
2805 * sysdeps/x86_64/tcb-offsets.sym: Add VGETCPU_CACHE_OFFSET.
2807 2007-04-06 Ulrich Drepper <drepper@redhat.com>
2809 * tst-locale1.c: Avoid warnings.
2810 * tst-locale2.c: Likewise.
2812 2007-03-19 Steven Munroe <sjmunroe@us.ibm.com>
2814 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
2815 (__lll_robust_trylock): Add MUTEX_HINT_ACQ to lwarx instruction.
2817 2007-03-16 Jakub Jelinek <jakub@redhat.com>
2819 * sysdeps/pthread/bits/libc-lock.h: Use __extern_inline and
2820 __extern_always_inline where appropriate.
2821 * sysdeps/pthread/pthread.h: Likewise.
2823 2007-03-13 Richard Henderson <rth@redhat.com>
2825 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Use two
2826 separate cfi regions for the two subsections.
2828 2007-02-25 Ulrich Drepper <drepper@redhat.com>
2830 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset refcntr in
2831 new thread, don't just decrement it.
2832 Patch by Suzuki K P <suzuki@in.ibm.com>.
2834 2007-02-21 Ulrich Drepper <drepper@redhat.com>
2836 * sysdeps/pthread/pthread-functions.h: Correct last patch, correct
2837 PTHFCT_CALL definition.
2839 2007-02-18 Ulrich Drepper <drepper@redhat.com>
2841 * sysdeps/pthread/pthread-functions.h: If PTR_DEMANGLE is not
2842 available, don't use it.
2844 2007-02-09 Jakub Jelinek <jakub@redhat.com>
2846 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
2847 (__lll_mutex_timedlock_wait): Use correct pointer when we don't
2848 call into the kernel to delay.
2850 2007-01-18 Ulrich Drepper <drepper@redhat.com>
2852 * tst-initializers1.c: We want to test the initializers as seen
2853 outside of libc, so undefined _LIBC.
2855 * pthread_join.c (cleanup): Avoid warning.
2857 2007-01-17 Ulrich Drepper <drepper@redhat.com>
2859 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
2860 (__lll_timedwait_tid): Add unwind info.
2862 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Don't just copy the
2863 function table, mangle the pointers.
2864 * sysdeps/pthread/pthread-functions.h: Define PTHFCT_CALL.
2865 * forward.c: Use PTHFCT_CALL and __libc_pthread_functions_init.
2866 * sysdeps/pthread/bits/libc-lock.h: When using __libc_pthread_functions
2867 demangle pointers before use.
2868 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Use PTHFCT_CALL to
2870 * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
2871 * sysdeps/pthread/setxid.h: Likewise.
2873 2007-01-12 Ulrich Drepper <drepper@redhat.com>
2875 * tst-rwlock7.c: Show some more information in case of correct
2878 2007-01-11 Ulrich Drepper <drepper@redhat.com>
2880 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
2881 (lll_futex_timed_wait): Undo part of last change, don't negate
2884 2007-01-10 Ulrich Drepper <drepper@redhat.com>
2886 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Cleanups. Define
2887 FUTEX_CMP_REQUEUE and lll_futex_requeue.
2889 2006-12-28 David S. Miller <davem@davemloft.net>
2891 * shlib-versions: Fix sparc64 linux target specification.
2893 2007-01-10 Jakub Jelinek <jakub@redhat.com>
2895 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
2896 Adjust include path for pthread_barrier_wait.c move.
2898 2006-12-21 Jakub Jelinek <jakub@redhat.com>
2900 * sysdeps/unix/sysv/linux/pthread_kill.c (pthread_kill): Make sure
2901 tid isn't reread from pd->tid in between ESRCH test and the syscall.
2903 2006-12-06 Jakub Jelinek <jakub@redhat.com>
2905 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Handle
2906 6 argument cancellable syscalls.
2907 (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
2908 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO): Handle
2909 6 argument cancellable syscalls.
2910 (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
2912 2006-12-09 Ulrich Drepper <drepper@redhat.com>
2914 * sysdeps/unix/sysv/linux/rtld-lowlevel.h
2915 (__rtld_mrlock_initialize): Add missing closing parenthesis.
2917 2006-10-30 Jakub Jelinek <jakub@redhat.com>
2919 * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
2920 __sync_lock_release instead of __sync_lock_release_si.
2922 2006-10-29 Jakub Jelinek <jakub@redhat.com>
2924 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (RTLD_SINGLE_THREAD_P):
2926 (SINGLE_THREAD_P): Define to 1 if IS_IN_rtld.
2927 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Likewise.
2928 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
2929 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
2930 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
2931 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
2932 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
2933 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
2934 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
2935 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
2936 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
2938 2006-10-27 Ulrich Drepper <drepper@redhat.com>
2940 * sysdeps/pthread/pthread_barrier_wait.c: Move to...
2941 * pthread_barrier_wait.c: ...here.
2942 * sysdeps/pthread/pthread_cond_broadcast.c: Move to...
2943 * pthread_cond_broadcast.c: ...here.
2944 * sysdeps/pthread/pthread_cond_signal.c: Move to...
2945 * pthread_cond_signal.c: ...here.
2946 * sysdeps/pthread/pthread_cond_timedwait.c: Move to...
2947 * pthread_cond_timedwait.c: ...here.
2948 * sysdeps/pthread/pthread_cond_wait.c: Move to...
2949 * pthread_cond_wait.c: ...here.
2950 * sysdeps/pthread/pthread_once.c: Move to...
2951 * pthread_once.c: ...here.
2952 * sysdeps/pthread/pthread_rwlock_rdlock.c: Move to...
2953 * pthread_rwlock_rdlock.c: ...here.
2954 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Move to...
2955 * pthread_rwlock_timedrdlock.c: ...here.
2956 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Move to...
2957 * pthread_rwlock_timedwrlock.c: ...here.
2958 * sysdeps/pthread/pthread_rwlock_unlock.c: Move to...
2959 * pthread_rwlock_unlock.c: ...here.
2960 * sysdeps/pthread/pthread_rwlock_wrlock.c: Move to...
2961 * pthread_rwlock_wrlock.c: ...here.
2962 * sysdeps/pthread/pthread_spin_destroy.c: Move to...
2963 * pthread_spin_destroy.c: ...here.
2964 * sysdeps/pthread/pthread_spin_init.c: Move to...
2965 * pthread_spin_init.c: ...here.
2966 * sysdeps/pthread/pthread_spin_unlock.c: Move to...
2967 * pthread_spin_unlock.c: ...here.
2968 * sysdeps/pthread/pthread_getcpuclockid.c: Move to...
2969 * pthread_getcpuclockid.c: ...here.
2971 * init.c: USE_TLS support is now always enabled.
2972 * tst-tls5.h: Likewise.
2973 * sysdeps/alpha/tls.h: Likewise.
2974 * sysdeps/i386/tls.h: Likewise.
2975 * sysdeps/ia64/tls.h: Likewise.
2976 * sysdeps/powerpc/tls.h: Likewise.
2977 * sysdeps/s390/tls.h: Likewise.
2978 * sysdeps/sh/tls.h: Likewise.
2979 * sysdeps/sparc/tls.h: Likewise.
2980 * sysdeps/x86_64/tls.h: Likewise.
2982 2006-10-27 Jakub Jelinek <jakub@redhat.com>
2984 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
2985 __rtld_mrlock_change): Update oldval if atomic compare and exchange
2988 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
2989 Define to THREAD_SELF->header.multiple_threads.
2990 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
2992 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
2994 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
2995 (SINGLE_THREAD_P): Likewise.
2996 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
2997 (SINGLE_THREAD_P): Likewise.
2998 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
2999 (SINGLE_THREAD_P): Likewise.
3000 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
3001 (SINGLE_THREAD_P): Likewise.
3002 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (SINGLE_THREAD_P):
3004 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
3005 (SINGLE_THREAD_P): Likewise.
3006 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
3007 (SINGLE_THREAD_P): Likewise.
3008 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (SINGLE_THREAD_P):
3011 2006-10-26 Jakub Jelinek <jakub@redhat.com>
3013 * pthread_attr_setstacksize.c (NEW_VERNUM): Define to GLIBC_2_3_3
3014 by default rather than 2_3_3.
3016 2006-10-17 Jakub Jelinek <jakub@redhat.com>
3018 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
3019 __rtld_mrlock_unlock, __rtld_mrlock_change, __rtld_mrlock_done): Use
3020 atomic_* instead of catomic_* macros.
3022 2006-10-12 Ulrich Drepper <drepper@redhat.com>
3025 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add SEM_VALUE_MAX.
3026 * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
3027 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
3028 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
3029 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
3030 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Remove SEM_VALUE_MAX.
3031 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
3032 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
3033 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
3034 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: Likewise.
3035 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
3036 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
3037 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
3039 2006-10-11 Ulrich Drepper <drepper@redhat.com>
3041 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add support for
3042 cancelable syscalls with six parameters.
3044 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Use catomic_*
3045 operations instead of atomic_*.
3047 2006-10-09 Ulrich Drepper <drepper@redhat.com>
3049 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: New file..
3051 2006-10-07 Ulrich Drepper <drepper@redhat.com>
3053 * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: New file.
3054 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstack.c: New file.
3055 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c:
3057 * pthread_attr_setstack.c: Allow overwriting the version number of the
3059 * pthread_attr_setstacksize.c: Likewise.
3060 (__old_pthread_attr_setstacksize): If STACKSIZE_ADJUST is defined use
3062 * sysdeps/unix/sysv/linux/powerpc/Versions (libpthread): Add
3063 pthread_attr_setstack and pthread_attr_setstacksize to GLIBC_2.6.
3065 2006-09-24 Ulrich Drepper <drepper@redhat.com>
3068 * descr.h (ENQUEUE_MUTEX_BOTH): Add cast to avoid warning.
3069 Patch by Petr Baudis.
3071 2006-09-18 Jakub Jelinek <jakub@redhat.com>
3073 * tst-kill4.c (do_test): Explicitly set tf thread's stack size.
3075 * tst-cancel2.c (tf): Loop as long as something was written.
3077 2006-09-12 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3079 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: For PI
3080 mutexes wake all mutexes.
3081 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Don't increment
3082 WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
3083 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
3085 2006-09-12 Ulrich Drepper <drepper@redhat.com>
3087 * tst-cond22.c (tf): Slight changes to the pthread_cond_wait use
3088 to guarantee the thread is always canceled.
3090 2006-09-08 Jakub Jelinek <jakub@redhat.com>
3092 * tst-cond22.c: Include pthread.h instead of pthreadP.h.
3094 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Only
3095 increase FUTEX if increasing WAKEUP_SEQ. Fix comment typo.
3096 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
3097 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3098 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3100 2006-09-08 Ulrich Drepper <drepper@redhat.com>
3103 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Don't
3104 increment WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
3105 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
3106 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3107 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3108 * Makefile (tests): Add tst-cond22.
3109 * tst-cond22.c: New file.
3111 2006-09-05 Ulrich Drepper <drepper@redhat.com>
3114 * descr.h (struct pthread): Add parent_cancelhandling.
3115 * sysdeps/pthread/createthread.c (create_thread): Pass parent
3116 cancelhandling value to child.
3117 * pthread_create.c (start_thread): If parent thread was canceled
3118 reset the SIGCANCEL mask.
3119 * Makefile (tests): Add tst-cancel25.
3120 * tst-cancel25.c: New file.
3122 2006-09-05 Jakub Jelinek <jakub@redhat.com>
3123 Ulrich Drepper <drepper@redhat.com>
3125 * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY): Don't decrement
3126 counterp if it is already zero.
3127 * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY): Likewise..
3129 2006-03-04 Jakub Jelinek <jakub@redhat.com>
3130 Roland McGrath <roland@redhat.com>
3132 * sysdeps/unix/sysv/linux/i386/lowlevellock.h
3133 (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
3134 LLL_STUB_UNWIND_INFO_3, LLL_STUB_UNWIND_INFO_4): Define.
3135 (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
3136 lll_robust_mutex_cond_lock, lll_mutex_timedlock,
3137 lll_robust_mutex_timedlock, lll_mutex_unlock,
3138 lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
3139 Add _L_*_ symbols around the subsection.
3140 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Add unwind info.
3141 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Likewise.
3143 2006-03-03 Jakub Jelinek <jakub@redhat.com>
3144 Roland McGrath <roland@redhat.com>
3146 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
3147 (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
3148 LLL_STUB_UNWIND_INFO_5, LLL_STUB_UNWIND_INFO_6): Define.
3149 (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
3150 lll_robust_mutex_cond_lock, lll_mutex_timedlock,
3151 lll_robust_mutex_timedlock, lll_mutex_unlock,
3152 lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
3153 Add _L_*_ symbols around the subsection.
3154 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Add unwind info.
3155 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
3157 2006-08-31 Ulrich Drepper <drepper@redhat.com>
3159 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Undo last
3160 change because it can disturb too much existing code. If real hard
3161 reader preference is needed we'll introduce another type.
3162 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
3163 (pthread_rwlock_timedwrlock): Likewise.
3164 * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
3167 2006-08-30 Ulrich Drepper <drepper@redhat.com>
3169 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Respect
3171 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
3172 (pthread_rwlock_timedwrlock): Likewise.
3173 * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
3176 2006-08-25 Jakub Jelinek <jakub@redhat.com>
3178 * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libpthread):
3179 Only define ifdef SHARED.
3181 2006-08-23 Ulrich Drepper <drepper@redhat.com>
3183 * allocatestack.c (queue_stack): Move freeing of surplus stacks to...
3184 (free_stacks): ...here.
3185 (__free_stack_cache): New function.
3186 * pthreadP.h: Declare __free_stack_cache.
3187 * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
3189 * init.c (pthread_functions): Initialize ptr_freeres.
3190 * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libptread):
3191 New freeres function.
3193 2006-07-30 Joseph S. Myers <joseph@codesourcery.com>
3196 * Makefile (extra-objs): Add modules to extra-test-objs instead.
3198 2006-08-20 Ulrich Drepper <drepper@redhat.com>
3200 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
3201 _XOPEN_REALTIME_THREADS.
3203 2006-08-15 Jakub Jelinek <jakub@redhat.com>
3205 * sysdeps/unix/sysv/linux/clock_settime.c (INTERNAL_VSYSCALL): Use
3206 HAVE_CLOCK_GETRES_VSYSCALL as guard macro rather than
3207 HAVE_CLOCK_GETTIME_VSYSCALL.
3208 (maybe_syscall_settime_cpu): Use plain INTERNAL_VSYSCALL here.
3210 2006-08-14 Jakub Jelinek <jakub@redhat.com>
3212 * sysdeps/unix/sysv/linux/bits/posix_opt.h
3213 (_POSIX_THREAD_PRIO_PROTECT): Define to 200112L.
3214 * descr.h (struct priority_protection_data): New type.
3215 (struct pthread): Add tpp field.
3216 * pthreadP.h (PTHREAD_MUTEX_PP_NORMAL_NP,
3217 PTHREAD_MUTEX_PP_RECURSIVE_NP, PTHREAD_MUTEX_PP_ERRORCHECK_NP,
3218 PTHREAD_MUTEX_PP_ADAPTIVE_NP): New enum values.
3219 * pthread_mutex_init.c (__pthread_mutex_init): Handle non-robust
3221 * pthread_mutex_lock.c (__pthread_mutex_lock): Handle TPP mutexes.
3222 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Likewise.
3223 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Likewise.
3224 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Likewise.
3226 * pthread_setschedparam.c (__pthread_setschedparam): Handle priority
3228 * pthread_setschedprio.c (pthread_setschedprio): Likewise.
3229 * pthread_mutexattr_getprioceiling.c
3230 (pthread_mutexattr_getprioceiling): If ceiling is 0, ensure it is
3231 in the SCHED_FIFO priority range.
3232 * pthread_mutexattr_setprioceiling.c
3233 (pthread_mutexattr_setprioceiling): Fix prioceiling validation.
3234 * pthread_mutex_getprioceiling.c (pthread_mutex_getprioceiling): Fail
3235 if mutex is not TPP. Ceiling is now in __data.__lock.
3236 * pthread_mutex_setprioceiling.c: Include stdbool.h.
3237 (pthread_mutex_setprioceiling): Fix prioceiling validation. Ceiling
3238 is now in __data.__lock. Add locking.
3239 * pthread_create.c (__free_tcb): Free pd->tpp structure.
3240 * Makefile (libpthread-routines): Add tpp.
3241 (xtests): Add tst-mutexpp1, tst-mutexpp6 and tst-mutexpp10.
3242 * tst-tpp.h: New file.
3243 * tst-mutexpp1.c: New file.
3244 * tst-mutexpp6.c: New file.
3245 * tst-mutexpp10.c: New file.
3246 * tst-mutex1.c (TEST_FUNCTION): Don't redefine if already defined.
3247 * tst-mutex6.c (TEST_FUNCTION): Likewise.
3249 2006-08-12 Ulrich Drepper <drepper@redhat.com>
3252 * pthread_join.c (pthread_join): Account for self being canceled
3253 when checking for deadlocks.
3254 * tst-join5.c: Cleanups. Allow to be used in tst-join6.
3255 (tf1): Don't print anything after pthread_join returns, this would be
3256 another cancellation point.
3258 * tst-join6.c: New file.
3259 * Makefile (tests): Add tst-join6.
3261 2006-08-03 Ulrich Drepper <drepper@redhat.com>
3264 * pthread_setspecific.c (__pthread_setspecific): Check
3265 out-of-range index before checking for unused key.
3267 * sysdeps/pthread/gai_misc.h: New file.
3269 2006-08-01 Ulrich Drepper <drepper@redhat.com>
3271 * sysdeps/unix/sysv/linux/i386/smp.h: New file. Old Linux-specific
3272 file. Don't use sysctl.
3273 * sysdeps/unix/sysv/linux/smp.h: Always assume SMP. Archs can
3274 overwrite the file if this is likely not true.
3276 2006-07-31 Daniel Jacobowitz <dan@codesourcery.com>
3278 * allocatestack.c (__reclaim_stacks): Reset the PID on cached stacks.
3279 * Makefile (tests): Add tst-getpid3.
3280 * tst-getpid3.c: New file.
3282 2006-07-30 Roland McGrath <roland@redhat.com>
3284 * Makefile (libpthread-routines): Add ptw-sigsuspend.
3286 * sysdeps/unix/sysv/linux/i386/not-cancel.h
3287 (pause_not_cancel): New macro.
3288 (nanosleep_not_cancel): New macro.
3289 (sigsuspend_not_cancel): New macro.
3290 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
3291 nanosleep_not_cancel macro from <not-cancel.h>.
3292 * pthread_mutex_lock.c (__pthread_mutex_lock): Use pause_not_cancel
3293 macro from <not-cancel.h>.
3295 2006-07-28 Ulrich Drepper <drepper@redhat.com>
3296 Jakub Jelinek <jakub@redhat.com>
3298 * descr.h: Change ENQUEUE_MUTEX and DEQUEUE_MUTEX for bit 0
3299 notification of PI mutex. Add ENQUEUE_MUTEX_PI.
3300 * pthreadP.h: Define PTHREAD_MUTEX_PI_* macros for PI mutex types.
3301 * pthread_mutex_setprioceilining.c: Adjust for mutex type name change.
3302 * pthread_mutex_init.c: Add support for priority inheritance mutex.
3303 * pthread_mutex_lock.c: Likewise.
3304 * pthread_mutex_timedlock.c: Likewise.
3305 * pthread_mutex_trylock.c: Likewise.
3306 * pthread_mutex_unlock.c: Likewise.
3307 * sysdeps/pthread/pthread_cond_broadcast.c: For PI mutexes wake
3309 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.c: Likewise.
3310 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.c: Likewise.
3311 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: New file.
3312 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-header): Add
3313 pthread-pi-defines.sym.
3314 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_LOCK_PI,
3315 FUTEX_UNLOCK_PI, and FUTEX_TRYLOCK_PI.
3316 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
3317 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
3318 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
3319 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
3320 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
3321 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
3322 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
3323 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
3324 _POSIX_THREAD_PRIO_INHERIT to 200112L.
3325 * tst-mutex1.c: Adjust to allow use in PI mutex test.
3326 * tst-mutex2.c: Likewise.
3327 * tst-mutex3.c: Likewise.
3328 * tst-mutex4.c: Likewise.
3329 * tst-mutex5.c: Likewise.
3330 * tst-mutex6.c: Likewise.
3331 * tst-mutex7.c: Likewise.
3332 * tst-mutex7a.c: Likewise.
3333 * tst-mutex8.c: Likewise.
3334 * tst-mutex9.c: Likewise.
3335 * tst-robust1.c: Likewise.
3336 * tst-robust7.c: Likewise.
3337 * tst-robust8.c: Likewise.
3338 * tst-mutexpi1.c: New file.
3339 * tst-mutexpi2.c: New file.
3340 * tst-mutexpi3.c: New file.
3341 * tst-mutexpi4.c: New file.
3342 * tst-mutexpi5.c: New file.
3343 * tst-mutexpi6.c: New file.
3344 * tst-mutexpi7.c: New file.
3345 * tst-mutexpi7a.c: New file.
3346 * tst-mutexpi8.c: New file.
3347 * tst-mutexpi9.c: New file.
3348 * tst-robust1.c: New file.
3349 * tst-robust2.c: New file.
3350 * tst-robust3.c: New file.
3351 * tst-robust4.c: New file.
3352 * tst-robust5.c: New file.
3353 * tst-robust6.c: New file.
3354 * tst-robust7.c: New file.
3355 * tst-robust8.c: New file.
3356 * Makefile (tests): Add the new tests.
3358 * pthread_create.c (start_thread): Add some casts to avoid warnings.
3359 * pthread_mutex_destroy.c: Remove unneeded label.
3361 2006-07-01 Ulrich Drepper <drepper@redhat.com>
3363 * pthread_mutex_init.c (__pthread_mutex_init): Move some
3364 computations to compile time.
3366 2006-06-04 Ulrich Drepper <drepper@redhat.com>
3368 * sysdeps/pthread/pthread.h: Add pthread_equal inline version.
3370 2006-05-15 Ulrich Drepper <drepper@redhat.com>
3372 * sysdeps/unix/sysv/linux/fork.h: Mark __fork_handlers as hidden.
3374 2006-05-11 Ulrich Drepper <drepper@redhat.com>
3376 * pthread_key_create.c (__pthread_key_create): Do away with
3377 __pthread_keys_lock.
3379 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
3380 (__kernel_cpumask_size): Mark as hidden.
3381 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
3383 * sem_open.c (__sem_mappings_lock): Mark as hidden.
3384 * semaphoreP.h (__sem_mappings_lock): Likewise.
3386 2006-05-10 Ulrich Drepper <drepper@redhat.com>
3388 * pthread_atfork.c: Mark __dso_handle as hidden.
3390 2006-05-09 Ulrich Drepper <drepper@redhat.com>
3393 * sysdeps/pthread/unwind-forcedunwind.c: Different solution for
3394 the reload problem. Change the one path in pthread_cancel_init
3395 which causes the problem. Force gcc to reload. Simplify callers.
3396 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c
3397 (_Unwind_GetBSP): Undo last patch.
3399 2006-05-07 Ulrich Drepper <drepper@redhat.com>
3401 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: Make sure the
3402 function pointer is reloaded after pthread_cancel_init calls.
3405 * sysdeps/pthread/unwind-forcedunwind.c: Make sure functions
3406 pointers are reloaded after pthread_cancel_init calls.
3408 2006-05-01 Ulrich Drepper <drepper@redhat.com>
3410 * sysdeps/pthread/allocalim.h (__libc_use_alloca): Mark with
3413 2006-04-27 Ulrich Drepper <drepper@redhat.com>
3415 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
3416 Allocate new object which is passed to timer_sigev_thread so that
3417 the timer can be deleted before the new thread is scheduled.
3419 2006-04-26 Roland McGrath <roland@redhat.com>
3421 * sysdeps/x86_64/tls.h: Include <asm/prctl.h> inside [! __ASSEMBLER__].
3423 2006-04-08 Ulrich Drepper <drepper@redhat.com>
3425 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove branch predicion
3426 suffix for conditional jumps.
3427 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
3428 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
3429 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
3430 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
3431 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
3432 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
3434 * init.c (sigcancel_handler): Compare with correct PID even if the
3435 thread is in the middle of a fork call.
3436 (sighandler_setxid): Likewise.
3437 Reported by Suzuki K P <suzuki@in.ibm.com> .
3439 2006-04-07 Jakub Jelinek <jakub@redhat.com>
3441 * pthreadP.h (FUTEX_TID_MASK): Sync with kernel.
3443 2006-04-06 Ulrich Drepper <drepper@redhat.com>
3445 * pthread_getattr_np.c (pthread_getattr_np): Close fp if getrlimit
3446 fails [Coverity CID 105].
3448 2006-04-05 Ulrich Drepper <drepper@redhat.com>
3450 * sysdeps/pthread/pthread.h: Add nonnull attributes.
3452 2006-04-03 Steven Munroe <sjmunroe@us.ibm.com>
3455 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h [_ARCH_PWR4]:
3456 Define __lll_rel_instr using lwsync.
3458 2006-03-27 Ulrich Drepper <drepper@redhat.com>
3460 * allocatestack.c (allocate_stack): Always initialize robust_head.
3461 * descr.h: Define struct robust_list_head.
3462 (struct pthread): Use robust_list_head in robust mutex list definition.
3463 Adjust ENQUEUE_MUTEX and DEQUEUE_MUTEX.
3464 * init.c [!__ASSUME_SET_ROBUST_LIST] (__set_robust_list_avail): Define.
3465 (__pthread_initialize_minimal_internal): Register robust_list with
3467 * pthreadP.h: Remove PRIVATE_ from PTHREAD_MUTEX_ROBUST_* names.
3468 Declare __set_robust_list_avail.
3469 * pthread_create.c (start_thread): Register robust_list of new thread.
3470 [!__ASSUME_SET_ROBUST_LIST]: If robust_list is not empty wake up
3472 * pthread_mutex_destroy.c: For robust mutexes don't look at the
3473 number of users, it's unreliable.
3474 * pthread_mutex_init.c: Allow use of pshared robust mutexes if
3475 set_robust_list syscall is available.
3476 * pthread_mutex_consistent.c: Adjust for PTHREAD_MUTEX_ROBUST_* rename.
3477 * pthread_mutex_lock.c: Simplify robust mutex code a bit.
3478 Set robust_head.list_op_pending before trying to lock a robust mutex.
3479 * pthread_mutex_timedlock.c: Likewise.
3480 * pthread_mutex_trylock.c: Likewise.
3481 * pthread_mutex_unlock.c: Likewise for unlocking.
3482 * Makefile (tests): Add tst-robust8.
3483 * tst-robust8.c: New file.
3485 2006-03-08 Andreas Schwab <schwab@suse.de>
3487 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h
3488 (DL_SYSINFO_IMPLEMENTATION): Add missing newline.
3490 2006-03-05 Roland McGrath <roland@redhat.com>
3492 * configure (libc_add_on): Disable add-on when $add_ons_automatic = yes
3493 and $config_os doesn't match *linux*.
3495 2006-03-05 David S. Miller <davem@sunset.davemloft.net>
3497 * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S:
3498 Use __syscall_error.
3499 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
3500 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: Likewise.
3501 * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: Likewise.
3502 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
3503 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: Likewise.
3504 * sysdeps/unix/sysv/linux/sparc/Makefile: New file.
3506 2006-03-02 Ulrich Drepper <drepper@redhat.com>
3508 * sysdeps/unix/sysv/linux/aio_misc.h: Various cleanups.
3510 2006-03-01 Ulrich Drepper <drepper@redhat.com>
3512 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
3513 (__lll_robust_lock_wait): Also set FUTEX_WAITERS bit if we got the
3515 (__lll_robust_timedlock_wait): Likewise.
3516 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S
3517 (__lll_robust_lock_wait): Likewise.
3518 (__lll_robust_timedlock_wait): Likewise.
3519 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
3520 (__lll_robust_lock_wait): Likewise.
3521 (__lll_robust_timedlock_wait): Likewise.
3523 2006-03-01 Jakub Jelinek <jakub@redhat.com>
3525 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_robust_mutex_dead,
3526 lll_robust_mutex_trylock, lll_robust_mutex_lock,
3527 lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
3528 lll_robust_mutex_unlock): Define.
3529 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
3531 2006-02-28 H.J. Lu <hongjiu.lu@intel.com>
3533 * sysdeps/unix/sysv/linux/ia64/clone2.S: Include <clone2.S>
3534 instead of <clone.S>.
3536 2006-02-27 Jakub Jelinek <jakub@redhat.com>
3538 * Makefile (libpthread-routines): Add
3539 pthread_mutexattr_[sg]etprotocol, pthread_mutexattr_[sg]etprioceiling
3540 and pthread_mutex_[sg]etprioceiling.
3541 * Versions (GLIBC_2.4): Export pthread_mutexattr_getprotocol,
3542 pthread_mutexattr_setprotocol, pthread_mutexattr_getprioceiling,
3543 pthread_mutexattr_setprioceiling, pthread_mutex_getprioceiling and
3544 pthread_mutex_setprioceiling.
3545 * sysdeps/pthread/pthread.h (PTHREAD_PRIO_NONE, PTHREAD_PRIO_INHERIT,
3546 PTHREAD_PRIO_PROTECT): New enum values.
3547 (pthread_mutexattr_getprotocol, pthread_mutexattr_setprotocol,
3548 pthread_mutexattr_getprioceiling, pthread_mutexattr_setprioceiling,
3549 pthread_mutex_getprioceiling, pthread_mutex_setprioceiling): New
3551 * pthreadP.h (PTHREAD_MUTEX_PRIO_INHERIT_PRIVATE_NP,
3552 PTHREAD_MUTEX_PRIO_PROTECT_PRIVATE_NP): New enum values.
3553 (PTHREAD_MUTEX_PRIO_CEILING_SHIFT, PTHREAD_MUTEX_PRIO_CEILING_MASK):
3555 (PTHREAD_MUTEXATTR_PROTOCOL_SHIFT, PTHREAD_MUTEXATTR_PROTOCOL_MASK,
3556 PTHREAD_MUTEXATTR_PRIO_CEILING_SHIFT,
3557 PTHREAD_MUTEXATTR_PRIO_CEILING_MASK): Define.
3558 (PTHREAD_MUTEXATTR_FLAG_BITS): Or in PTHREAD_MUTEXATTR_PROTOCOL_MASK
3559 and PTHREAD_MUTEXATTR_PRIO_CEILING_MASK.
3560 * pthread_mutex_init.c (__pthread_mutex_init): For the time being
3561 return ENOTSUP for PTHREAD_PRIO_INHERIT or PTHREAD_PRIO_PROTECT
3563 * pthread_mutex_getprioceiling.c: New file.
3564 * pthread_mutex_setprioceiling.c: New file.
3565 * pthread_mutexattr_getprioceiling.c: New file.
3566 * pthread_mutexattr_setprioceiling.c: New file.
3567 * pthread_mutexattr_getprotocol.c: New file.
3568 * pthread_mutexattr_setprotocol.c: New file.
3570 2006-02-27 Daniel Jacobowitz <dan@codesourcery.com>
3572 * sysdeps/unix/sysv/linux/aio_misc.h: Include <limits.h>.
3574 2006-02-27 Roland McGrath <roland@redhat.com>
3576 * sysdeps/pthread/Subdirs: List nptl here too.
3577 * configure (libc_add_on_canonical): New variable.
3579 * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: Use #include_next.
3581 * sysdeps/unix/sysv/linux/sleep.c: Use #include_next after #include of
3582 self to get main source tree's file.
3583 * sysdeps/unix/sysv/linux/alpha/clone.S: Likewise.
3584 * sysdeps/unix/sysv/linux/i386/clone.S: Likewise.
3585 * sysdeps/unix/sysv/linux/i386/vfork.S: Likewise.
3586 * sysdeps/unix/sysv/linux/ia64/clone2.S: Likewise.
3587 * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: Likewise.
3588 * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: Likewise.
3589 * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: Likewise.
3590 * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: Likewise.
3591 * sysdeps/unix/sysv/linux/sh/clone.S: Likewise.
3592 * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: Likewise.
3593 * sysdeps/unix/sysv/linux/sparc/sparc64/clone.S: Likewise.
3594 * sysdeps/unix/sysv/linux/x86_64/clone.S: Likewise.
3595 * sysdeps/unix/sysv/linux/x86_64/vfork.S: Likewise.
3597 * Makefile: Use $(sysdirs) in vpath directive.
3599 * sysdeps/pthread/Makefile (CFLAGS-libc-start.c): Variable removed.
3600 (CPPFLAGS-timer_routines.c): Likewise.
3602 * Makeconfig (includes): Variable removed.
3604 2006-02-26 Roland McGrath <roland@redhat.com>
3606 * sysdeps/generic/pt-raise.c: Moved to ...
3607 * pt-raise.c: ... here.
3608 * sysdeps/generic/lowlevellock.h: Moved to ...
3609 * lowlevellock.h: ... here.
3611 2006-02-23 Roland McGrath <roland@redhat.com>
3613 * descr.h (struct pthread): Add final member `end_padding'.
3614 (PTHREAD_STRUCT_END_PADDING): Use it.
3616 2006-02-20 Roland McGrath <roland@redhat.com>
3618 * sysdeps/mips: Directory removed, saved in ports repository.
3619 * sysdeps/unix/sysv/linux/mips: Likewise.
3621 2006-02-18 Ulrich Drepper <drepper@redhat.com>
3623 * tst-robust1.c: Add second mutex to check that the mutex list is
3626 2006-02-17 Jakub Jelinek <jakub@redhat.com>
3628 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_mutex_dead,
3629 lll_robust_mutex_trylock, lll_robust_mutex_lock,
3630 lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
3631 lll_robust_mutex_unlock): New macros.
3632 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
3633 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
3634 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
3635 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
3636 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: New file.
3638 2006-02-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3640 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Add lll_robust_mutex_*
3642 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: New file.
3644 2006-02-17 Ulrich Drepper <drepper@redhat.com>
3646 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
3647 (lll_robust_mutex_unlock): Avoid unnecessary wakeups.
3648 * sysdeps/unix/sysv/linux/i386/lowlevellock.h
3649 (lll_robust_mutex_unlock): Likewise.
3651 2006-02-13 Jakub Jelinek <jakub@redhat.com>
3653 * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX):
3654 Set robust_list.__next rather than robust_list.
3655 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
3656 (__pthread_list_t): New typedef.
3657 (pthread_mutex_t): Replace __next and __prev fields with __list.
3658 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
3659 (__pthread_list_t): New typedef.
3660 (pthread_mutex_t): Replace __next and __prev fields with __list.
3661 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
3662 (__pthread_list_t, __pthread_slist_t): New typedefs.
3663 (pthread_mutex_t): Replace __next and __prev fields with __list.
3664 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
3665 (__pthread_list_t, __pthread_slist_t): New typedefs.
3666 (pthread_mutex_t): Replace __next and __prev fields with __list.
3667 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
3668 (__pthread_list_t, __pthread_slist_t): New typedefs.
3669 (pthread_mutex_t): Replace __next and __prev fields with __list.
3670 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h
3671 (__pthread_slist_t): New typedef.
3672 (pthread_mutex_t): Replace __next field with __list.
3674 2006-02-15 Ulrich Drepper <drepper@redhat.com>
3676 * pthreadP.h: Define PTHREAD_MUTEX_INCONSISTENT instead of
3677 PTHREAD_MUTEX_OWNERDEAD.
3678 (PTHREAD_MUTEX_ROBUST_PRIVATE_NP): Define as 16, not 256.
3679 Define FUTEX_WAITERS, FUTEX_OWNER_DIED, FUTEX_TID_MASK.
3680 * Makefile (libpthread-routines): Add lowlevelrobustlock.
3681 * pthread_create.c (start_thread): Very much simplify robust_list loop.
3682 * pthread_mutex_consistent.c: Inconsistent mutex have __owner now set
3683 to PTHREAD_MUTEX_INCONSISTENT.
3684 * pthread_mutex_destroy.c: Allow destroying of inconsistent mutexes.
3685 * pthread_mutex_lock.c: Reimplement robust mutex handling.
3686 * pthread_mutex_trylock.c: Likewise.
3687 * pthread_mutex_timedlock.c: Likewise.
3688 * pthread_mutex_unlock.c: Likewise.
3689 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
3690 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
3691 lowlevelrobustlock.sym.
3692 * sysdeps/unix/sysv/linux/lowlevelrobustlock.sym: New file.
3693 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add lll_robust_mutex_*
3695 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
3696 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: New file.
3697 * sysdeps/unix/sysv/linux/i386/i586/lowlevelrobustlock.S: New file.
3698 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrobustlock.S: New file.
3699 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: New file.
3701 2006-02-12 Ulrich Drepper <drepper@redhat.com>
3703 * allocatestack.c (allocate_stack): Initialize robust_list.
3704 * init.c (__pthread_initialize_minimal_internal): Likewise.
3705 * descr.h (struct xid_command): Pretty printing.
3706 (struct pthread): Use __pthread_list_t or __pthread_slist_t for
3707 robust_list. Adjust macros.
3708 * pthread_create.c (start_thread): Adjust robust_list handling.
3709 * phtread_mutex_unlock.c: Don't allow unlocking from any thread
3710 but the owner for all robust mutex types.
3711 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
3712 __pthread_list_t and __pthread_slist_t. Use them in pthread_mutex_t.
3713 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3714 * sysdeps/pthread/pthread.h: Adjust mutex initializers.
3716 * sysdeps/unix/sysv/linux/i386/not-cancel.h: Define openat_not_cancel,
3717 openat_not_cancel_3, openat64_not_cancel, and openat64_not_cancel_3.
3719 2006-02-08 Jakub Jelinek <jakub@redhat.com>
3721 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait,
3722 lll_futex_timedwait, lll_wait_tid): Add "memory" clobber.
3724 2006-01-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3726 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_futex_wait):
3728 (lll_futex_timed_wait): Define.
3730 2006-01-19 Ulrich Drepper <drepper@redhat.com>
3732 * tst-cancel4.c: Test ppoll.
3734 2006-01-18 Andreas Jaeger <aj@suse.de>
3737 * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h
3738 (pthread_mutex_t): Follow changes for other archs. Based on patch
3739 by Jim Gifford <patches@jg555.com>.
3741 2006-01-13 Richard Henderson <rth@redhat.com>
3743 * sysdeps/alpha/tls.h (tcbhead_t): Rename member to __private.
3745 2006-01-10 Roland McGrath <roland@redhat.com>
3747 * sysdeps/alpha/jmpbuf-unwind.h: File moved to main source tree.
3748 * sysdeps/i386/jmpbuf-unwind.h: Likewise.
3749 * sysdeps/mips/jmpbuf-unwind.h: Likewise.
3750 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
3751 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
3752 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
3753 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
3754 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
3755 * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
3756 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
3758 2006-01-09 Roland McGrath <roland@redhat.com>
3760 * tst-initializers1-c89.c: New file.
3761 * tst-initializers1-c99.c: New file.
3762 * tst-initializers1-gnu89.c: New file.
3763 * tst-initializers1-gnu99.c: New file.
3764 * Makefile (tests): Add them.
3765 (CFLAGS-tst-initializers1-c89.c): New variable.
3766 (CFLAGS-tst-initializers1-c99.c): New variable.
3767 (CFLAGS-tst-initializers1-gnu89.c): New variable.
3768 (CFLAGS-tst-initializers1-gnu99.c): New variable.
3770 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
3771 Use __extension__ on anonymous union definition.
3772 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3773 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
3774 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3775 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3776 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
3778 2006-01-08 Jakub Jelinek <jakub@redhat.com>
3780 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
3781 Don't give the union a name because it changes the mangled name.
3782 Instead name the struct for __data.
3783 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_mutex_t):
3785 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_mutex_t):
3788 2006-01-09 Jakub Jelinek <jakub@redhat.com>
3790 * sysdeps/sparc/sparc64/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Add
3791 stack bias to mc_ftp field.
3793 2006-01-07 Ulrich Drepper <drepper@redhat.com>
3795 * sysdeps/pthread/aio_misc.h (AIO_MISC_WAIT): Work around gcc
3796 being too clever and reloading the futex value where it shouldn't.
3798 2006-01-06 Ulrich Drepper <drepper@redhat.com>
3800 * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX): Use
3803 2006-01-06 Jakub Jelinek <jakub@redhat.com>
3805 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
3808 2006-01-06 Ulrich Drepper <drepper@redhat.com>
3810 * sysdeps/ia64/tls.h (tcbhead_t): Rename private member to __private.
3811 * sysdeps/ia64/tcb-offsets.sym: Adjust for private->__private
3812 rename in tcbhead_t.
3814 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
3815 Don't give the union a name because it changes the mangled name.
3816 Instead name the struct for __data.
3817 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3818 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3819 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3820 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3821 * pthread_create.c (start_thread): Adjust robust mutex free loop.
3822 * descr.h (ENQUEUE_MUTEX, DEQUEUE_MUTEX): Adjust.
3824 2006-01-05 Ulrich Drepper <drepper@redhat.com>
3826 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
3828 (lll_futex_timed_wait): Define.
3829 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
3830 * sysdeps/pthread/aio_misc.h: New file.
3832 2006-01-03 Joseph S. Myers <joseph@codesourcery.com>
3834 * Makefile ($(objpfx)$(multidir)): Use mkdir -p.
3836 2006-01-03 Steven Munroe <sjmunroe@us.ibm.com>
3838 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
3839 (PSEUDO): Remove redundant cfi_startproc and cfi_endproc directives.
3840 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
3842 2006-01-04 Ulrich Drepper <drepper@redhat.com>
3844 * tst-cancel24.cc: Use C headers instead of C++ headers.
3846 2006-01-03 Jakub Jelinek <jakub@redhat.com>
3848 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Remove #error for
3849 sparc-linux configured glibc.
3850 (lll_futex_wake_unlock): Define to 1 for sparc-linux configured glibc.
3851 (__lll_mutex_trylock, __lll_mutex_cond_trylock, __lll_mutex_lock,
3852 __lll_mutex_cond_lock, __lll_mutex_timedlock): Use
3853 atomic_compare_and_exchange_val_24_acq instead of
3854 atomic_compare_and_exchange_val_acq.
3855 (lll_mutex_unlock, lll_mutex_unlock_force): Use atomic_exchange_24_rel
3856 instead of atomic_exchange_rel.
3857 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: New file.
3858 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c: New
3860 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c: New
3862 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: New file.
3863 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: New file.
3864 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: New file.
3865 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c: New file.
3866 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: New file.
3867 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
3869 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
3871 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: New file.
3872 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: New file.
3873 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c: New
3875 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_trywait.c: New
3877 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: New file.
3879 2006-01-03 Ulrich Drepper <drepper@redhat.com>
3881 * sysdeps/pthread/pthread.h [__WORDSIZE==64]: Don't use cast in
3884 2006-01-02 Jakub Jelinek <jakub@redhat.com>
3886 * sysdeps/sparc/tls.h (tcbhead_t): Add pointer_guard field.
3887 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
3888 THREAD_COPY_POINTER_GUARD): Define.
3889 * sysdeps/sparc/tcb-offsets.sym (POINTER_GUARD): Define.
3890 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Revert 2005-12-27 changes.
3892 2006-01-01 Ulrich Drepper <drepper@redhat.com>
3894 * version.c: Update copyright year.
3896 2005-12-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3898 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Remove explicit
3899 .eh_frame section, use cfi_* directives.
3900 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Add cfi instrumentation.
3902 2005-12-30 Ulrich Drepper <drepper@redhat.com>
3904 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Undo last change for
3907 2005-12-29 Ulrich Drepper <drepper@redhat.com>
3909 * sysdeps/pthread/sigaction.c: Removed.
3910 * sigaction.c: New file.
3911 * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-sigaction.c.
3913 2005-12-28 Ulrich Drepper <drepper@redhat.com>
3915 * Makefile (tests): Add tst-signal7.
3916 * tst-signal7.c: New file.
3918 2005-12-27 Roland McGrath <roland@redhat.com>
3920 * sysdeps/x86_64/jmpbuf-unwind.h (_jmpbuf_sp): New inline function.
3921 (_JMPBUF_UNWINDS_ADJ): Use it, to PTR_DEMANGLE before comparison.
3922 * sysdeps/alpha/jmpbuf-unwind.h: Likewise.
3923 * sysdeps/i386/jmpbuf-unwind.h: Likewise.
3924 * sysdeps/mips/jmpbuf-unwind.h: Likewise.
3925 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
3926 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
3927 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
3928 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
3929 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
3930 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
3932 2005-12-27 Jakub Jelinek <jakub@redhat.com>
3934 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Add __next
3935 and __prev field to pthread_mutex_t.
3936 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3937 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3938 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3939 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
3940 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Add __next field
3943 2005-12-26 Ulrich Drepper <drepper@redhat.com>
3945 * pthreadP.h: Define PTHREAD_MUTEX_ROBUST_PRIVATE_NP,
3946 PTHREAD_MUTEX_ROBUST_PRIVATE_RECURSIVE_NP,
3947 PTHREAD_MUTEX_ROBUST_PRIVATE_ERRORCHECK_NP,
3948 PTHREAD_MUTEX_ROBUST_PRIVATE_ADAPTIVE_NP,
3949 PTHREAD_MUTEXATTR_FLAG_ROBUST, PTHREAD_MUTEXATTR_FLAG_PSHARED,
3950 and PTHREAD_MUTEXATTR_FLAG_BITS.
3951 * descr.h (struct pthread): Add robust_list field and define
3952 ENQUEUE_MUTEX and DEQUEUE_MUTEX macros.
3953 * pthread_mutexattr_getrobust.c: New file.
3954 * pthread_mutexattr_setrobust.c: New file.
3955 * pthread_mutex_consistent.c: New file.
3956 * sysdeps/pthread/pthread.h: Declare pthread_mutexattr_getrobust,
3957 pthread_mutexattr_setrobust, and pthread_mutex_consistent.
3958 Define PTHREAD_MUTEX_STALLED_NP and PTHREAD_MUTEX_ROBUST_NP.
3959 Adjust pthread_mutex_t initializers.
3960 * nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Add __next
3961 field to pthread_mutex_t.
3962 * nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Add __next
3963 and __prev field to pthread_mutex_t.
3964 * Versions [GLIBC_2.4]: Export pthread_mutexattr_getrobust_np,
3965 pthread_mutexattr_setrobust_np, and pthread_mutex_consistent_np.
3966 * pthread_mutexattr_getpshared.c: Use PTHREAD_MUTEXATTR_FLAG_PSHARED
3967 and PTHREAD_MUTEXATTR_FLAG_BITS macros instead of magic numbers.
3968 * pthread_mutexattr_gettype.c: Likewise.
3969 * pthread_mutexattr_setpshared.c: Likewise.
3970 * pthread_mutexattr_settype.c: Likewise.
3971 * pthread_mutex_init.c: Reject robust+pshared attribute for now.
3972 Initialize mutex kind according to robust flag.
3973 * pthread_mutex_lock.c: Implement local robust mutex.
3974 * pthread_mutex_timedlock.c: Likewise.
3975 * pthread_mutex_trylock.c: Likewise.
3976 * pthread_mutex_unlock.c: Likewise.
3977 * pthread_create.c (start_thread): Mark robust mutexes which remained
3979 * tst-robust1.c: New file.
3980 * tst-robust2.c: New file.
3981 * tst-robust3.c: New file.
3982 * tst-robust4.c: New file.
3983 * tst-robust5.c: New file.
3984 * tst-robust6.c: New file.
3985 * tst-robust7.c: New file.
3986 * Makefile (libpthread-routines): Add pthread_mutexattr_getrobust,
3987 pthread_mutexattr_setrobust, and pthread_mutex_consistent.
3988 (tests): Add tst-robust1, tst-robust2, tst-robust3, tst-robust4,
3989 tst-robust5, tst-robust6, and tst-robust7.
3991 * tst-typesizes.c: New file.
3992 * Makefile (tests): Add tst-typesizes.
3994 * tst-once3.c: More debug output.
3996 2005-12-24 Ulrich Drepper <drepper@redhat.com>
3998 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Add break
3999 missing after last change.
4001 * version.c: Update copyright year.
4003 2005-12-23 Ulrich Drepper <drepper@redhat.com>
4005 * pthread_mutex_destroy.c: Set mutex type to an invalid value.
4006 * pthread_mutex_lock.c: Return EINVAL for invalid mutex type.
4007 * pthread_mutex_trylock.c: Likewise.
4008 * pthread_mutex_timedlock.c: Likewise.
4009 * pthread_mutex_unlock.c: Likewise.
4011 2005-12-22 Roland McGrath <roland@redhat.com>
4013 * sysdeps/pthread/sigaction.c: Use "" instead of <> to include self,
4014 so that #include_next's search location is not reset to the -I..
4015 directory where <nptl/...> can be found.
4017 2005-12-22 Ulrich Drepper <drepper@redhat.com>
4020 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
4021 Fix unwind info. Remove useless branch prediction prefix.
4022 * tst-cancel24.cc: New file.
4023 * Makefile: Add rules to build and run tst-cancel24.
4025 2005-12-21 Roland McGrath <roland@redhat.com>
4027 * libc-cancellation.c: Use <> rather than "" #includes.
4028 * pt-cleanup.c: Likewise.
4029 * pthread_create.c: Likewise.
4030 * pthread_join.c: Likewise.
4031 * pthread_timedjoin.c: Likewise.
4032 * pthread_tryjoin.c: Likewise.
4033 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Likewise.
4034 * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
4035 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
4036 * unwind.c: Likewise.
4038 2005-12-19 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4040 * sysdeps/sh/tcb-offsets.sym: Add POINTER_GUARD.
4041 * sysdeps/sh/tls.h (tcbhead_t): Remove private and add pointer_guard.
4042 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
4043 THREAD_COPY_POINTER_GUARD): Define.
4045 2005-12-19 Jakub Jelinek <jakub@redhat.com>
4047 * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): Make room for 2 uintptr_t's
4049 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
4050 THREAD_COPY_POINTER_GUARD): Define.
4051 * sysdeps/powerpc/tcb-offsets.sym (POINTER_GUARD): Add.
4052 * sysdeps/powerpc/tls.h (tcbhead_t): Add pointer_guard field.
4053 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
4054 THREAD_COPY_POINTER_GUARD): Define.
4055 * sysdeps/s390/tcb-offsets.sym (STACK_GUARD): Add.
4056 * sysdeps/s390/tls.h (THREAD_GET_POINTER_GUARD,
4057 THREAD_SET_POINTER_GUARD, THREAD_COPY_POINTER_GUARD): Define.
4058 * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S (__ia64_longjmp):
4059 Use PTR_DEMANGLE for B0 if defined.
4061 2005-12-17 Ulrich Drepper <drepper@redhat.com>
4063 * pthread_create.c (__pthread_create_2_1): Use
4064 THREAD_COPY_POINTER_GUARD if available.
4065 * sysdeps/i386/tcb-offsets.sym: Add POINTER_GUARD.
4066 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
4067 * sysdeps/i386/tls.h (tcbhead_t): Add pointer_guard.
4068 Define THREAD_SET_POINTER_GUARD and THREAD_COPY_POINTER_GUARD.
4069 * sysdeps/x86_64/tls.h: Likewise.
4071 2005-12-15 Roland McGrath <roland@redhat.com>
4073 * sysdeps/unix/sysv/linux/mq_notify.c: Don't use sysdeps/generic.
4075 2005-12-13 Ulrich Drepper <drepper@redhat.com>
4077 * sysdeps/pthread/sigfillset.c: Adjust for files moved out of
4079 * errno-loc.c: New file.
4081 2005-12-12 Roland McGrath <roland@redhat.com>
4083 * init.c (__pthread_initialize_minimal_internal): Do __static_tls_size
4084 adjustments before choosing stack size. Update minimum stack size
4085 calculation to match allocate_stack change.
4087 2005-12-12 Ulrich Drepper <drepper@redhat.com>
4089 * allocatestack.c (allocate_stack): Don't demand that there is an
4090 additional full page available on the stack beside guard, TLS, the
4093 2005-11-24 Ulrich Drepper <drepper@redhat.com>
4095 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
4096 (__cleanup_fct_attribute): Use __regparm__ not regparm.
4098 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: When
4099 compiling 32-bit code we must define __cleanup_fct_attribute.
4101 005-11-24 Jakub Jelinek <jakub@redhat.com>
4104 * sysdeps/pthread/pthread.h (__pthread_unwind_next): Use
4105 __attribute__ instead of __attribute.
4106 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
4107 (__cleanup_fct_attribute): Likewise.
4109 2005-11-17 Jakub Jelinek <jakub@redhat.com>
4111 * sysdeps/pthread/unwind-forcedunwind.c (pthread_cancel_init): Put
4112 a write barrier before writing libgcc_s_getcfa.
4114 2005-11-06 Ulrich Drepper <drepper@redhat.com>
4116 * sysdeps/unix/sysv/linux/configure: Removed.
4118 2005-11-05 Ulrich Drepper <drepper@redhat.com>
4120 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Remove trace of
4121 optional init_array/fini_array support.
4123 2005-10-24 Roland McGrath <roland@redhat.com>
4125 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Remove unnecessary
4126 versioned_symbol use.
4128 2005-10-16 Roland McGrath <roland@redhat.com>
4130 * init.c (__pthread_initialize_minimal_internal): Even when using a
4131 compile-time default stack size, apply the minimum that allocate_stack
4132 will require, and round up to page size.
4134 2005-10-10 Daniel Jacobowitz <dan@codesourcery.com>
4136 * Makefile ($(test-modules)): Remove static pattern rule.
4138 2005-10-14 Jakub Jelinek <jakub@redhat.com>
4139 Ulrich Drepper <drepper@redhat.com>
4141 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix stack
4142 alignment in callback function.
4143 * Makefile: Add rules to build and run tst-align3.
4144 * tst-align3.c: New file.
4146 2005-10-03 Jakub Jelinek <jakub@redhat.com>
4148 * allocatestack.c (setxid_signal_thread): Add
4149 INTERNAL_SYSCALL_DECL (err).
4151 2005-10-02 Jakub Jelinek <jakub@redhat.com>
4153 * allocatestack.c (setxid_signal_thread): Need to use
4154 atomic_compare_and_exchange_bool_acq.
4156 2005-10-01 Ulrich Drepper <drepper@redhat.com>
4157 Jakub Jelinek <jakub@redhat.com>
4159 * descr.h: Define SETXID_BIT and SETXID_BITMASK. Adjust
4161 (struct pthread): Move specific_used field to avoid padding.
4162 Add setxid_futex field.
4163 * init.c (sighandler_setxid): Reset setxid flag and release the
4165 * allocatestack.c (setxid_signal_thread): New function. Broken
4166 out of the bodies of the two loops in __nptl_setxid. For undetached
4167 threads check whether they are exiting and if yes, don't send a signal.
4168 (__nptl_setxid): Simplify loops by using setxid_signal_thread.
4169 * pthread_create.c (start_thread): For undetached threads, check
4170 whether setxid bit is set. If yes, wait until signal has been
4173 * allocatestack.c (STACK_VARIABLES): Initialize them.
4174 * pthread_create.c (__pthread_create_2_1): Initialize pd.
4176 2004-09-02 Jakub Jelinek <jakub@redhat.com>
4178 * pthread_cond_destroy.c (__pthread_cond_destroy): If there are
4179 waiters, awake all waiters on the associated mutex.
4181 2005-09-22 Roland McGrath <roland@redhat.com>
4183 * perf.c [__x86_64__] (HP_TIMING_NOW): New macro (copied from
4184 ../sysdeps/x86_64/hp-timing.h).
4186 2005-08-29 Jakub Jelinek <jakub@redhat.com>
4188 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_WAKE_OP,
4189 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
4190 (lll_futex_wake_unlock): Define.
4191 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_WAKE_OP,
4192 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
4193 (lll_futex_wake_unlock): Define.
4194 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_WAKE_OP,
4195 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
4196 (lll_futex_wake_unlock): Define.
4197 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_WAKE_OP,
4198 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
4199 (lll_futex_wake_unlock): Define.
4200 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_WAKE_OP,
4201 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
4202 (lll_futex_wake_unlock): Define.
4203 * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal): Use
4204 lll_futex_wake_unlock.
4205 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
4206 (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
4207 (__pthread_cond_signal): Use FUTEX_WAKE_OP.
4208 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
4209 (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
4210 (__pthread_cond_signal): Use FUTEX_WAKE_OP.
4212 2005-09-05 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4214 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
4215 Fix typo in register name.
4217 2005-08-23 Ulrich Drepper <drepper@redhat.com>
4219 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
4220 Use __sigfillset. Document that sigfillset does the right thing wrt
4223 2005-07-11 Jakub Jelinek <jakub@redhat.com>
4226 * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER,
4227 PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP,
4228 PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP,
4229 PTHREAD_MUTEX_ADAPTIVE_NP, PTHREAD_RWLOCK_INITIALIZER,
4230 PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP,
4231 PTHREAD_COND_INITIALIZER): Supply zeros for all fields
4233 * Makefile (tests): Add tst-initializers1.
4234 (CFLAGS-tst-initializers1.c): Set.
4235 * tst-initializers1.c: New test.
4237 2005-07-11 Jakub Jelinek <jakub@redhat.com>
4239 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_rwlock_t):
4240 Make sure __flags are located at offset 48 from the start of the
4243 2005-07-02 Roland McGrath <roland@redhat.com>
4245 * Makeconfig: Comment fix.
4247 2005-07-05 Jakub Jelinek <jakub@redhat.com>
4249 * descr.h (PTHREAD_STRUCT_END_PADDING): Define.
4250 * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): If PTHREAD_STRUCT_END_PADDING
4251 is smaller than 8 bytes, increase TLS_PRE_TCB_SIZE by 16 bytes.
4252 (THREAD_SYSINFO, THREAD_SELF, DB_THREAD_SELF): Don't assume
4253 TLS_PRE_TCB_SIZE is sizeof (struct pthread).
4254 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
4255 * sysdeps/ia64/tcb-offsets.sym (PID, TID, MULTIPLE_THREADS_OFFSET):
4256 Use TLS_PRE_TCB_SIZE instead of sizeof (struct pthread).
4257 * sysdeps/unix/sysv/linux/ia64/createthread.c (TLS_VALUE): Don't
4258 assume TLS_PRE_TCB_SIZE is sizeof (struct pthread).
4260 2005-06-25 Jakub Jelinek <jakub@redhat.com>
4262 * sysdeps/i386/tls.h (tcbhead_t): Add stack_guard field.
4263 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
4264 * sysdeps/x86_64/tls.h (tcbhead_t): Add sysinfo and stack_guard
4266 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
4267 * sysdeps/s390/tls.h (tcbhead_t): Add stack_guard
4268 field. Put in sysinfo field unconditionally.
4269 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
4270 * sysdeps/powerpc/tls.h (tcbhead_t): Add stack_guard field.
4271 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
4272 * sysdeps/sparc/tls.h (tcbhead_t): Add sysinfo and stack_guard
4274 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
4275 * pthread_create.c (__pthread_create_2_1): Use
4276 THREAD_COPY_STACK_GUARD macro.
4277 * Makefile: Add rules to build and run tst-stackguard1{,-static}
4279 * tst-stackguard1.c: New file.
4280 * tst-stackguard1-static.c: New file.
4282 2005-06-14 Alan Modra <amodra@bigpond.net.au>
4284 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
4285 Invoke CGOTSETUP and CGOTRESTORE.
4286 (CGOTSETUP, CGOTRESTORE): Define.
4288 2005-05-29 Richard Henderson <rth@redhat.com>
4290 * tst-cancel4.c (WRITE_BUFFER_SIZE): New.
4291 (tf_write, tf_writev): Use it.
4292 (do_test): Use socketpair instead of pipe. Set SO_SNDBUF to
4295 2005-05-23 Jakub Jelinek <jakub@redhat.com>
4297 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
4298 [IS_IN_librt] (CENABLE, CDISABLE): Use JUMPTARGET instead of
4299 __librt_*_asynccancel@local.
4301 2005-05-17 Alan Modra <amodra@bigpond.net.au>
4303 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Delete
4304 all occurrences of JUMPTARGET. Instead append @local to labels.
4306 2005-05-20 Jakub Jelinek <jakub@redhat.com>
4308 * sysdeps/i386/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN): Define to
4309 size/alignment of struct pthread rather than tcbhead_t.
4310 * sysdeps/x86_64/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
4312 * sysdeps/s390/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
4314 * sysdeps/sparc/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
4317 2005-05-19 Richard Henderson <rth@redhat.com>
4319 * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use
4320 __sync_val_compare_and_swap, not explicit _si variant.
4321 * sysdeps/ia64/pthread_spin_trylock.c (pthread_spin_trylock): Likewise.
4323 2005-05-03 Ulrich Drepper <drepper@redhat.com>
4326 * sysdeps/pthread/pthread.h: Avoid empty initializers.
4328 2005-05-03 Jakub Jelinek <jakub@redhat.com>
4330 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Remove explicit
4331 .eh_frame section, use cfi_* directives.
4333 2005-04-27 Jakub Jelinek <jakub@redhat.com>
4335 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: Use <> instead
4338 2005-04-27 Ulrich Drepper <drepper@redhat.com>
4341 * tst-cancel17.c (do_test): Add arbitrary factor to make sure
4344 2005-04-27 Roland McGrath <roland@redhat.com>
4346 * Makefile (tests): Remove tst-clock2.
4348 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Handle
4349 CLOCK_PROCESS_CPUTIME_ID and CLOCK_PROCESS_THREAD_ID specially,
4350 translating to the kernel clockid_t for our own process/thread clock.
4352 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: New file.
4354 2005-04-15 Jakub Jelinek <jakub@redhat.com>
4356 * old_pthread_cond_init.c: Include <errno.h>.
4357 (__pthread_cond_init_2_0): Fail with EINVAL if COND_ATTR is
4358 process shared or uses clock other than CLOCK_REALTIME.
4359 * pthread_cond_init.c (__pthread_cond_init): Remove bogus comment.
4361 2005-04-13 David S. Miller <davem@davemloft.net>
4363 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: New file.
4364 * sysdeps/sparc/sparc64/clone.S: New file.
4366 2005-04-05 Jakub Jelinek <jakub@redhat.com>
4369 * sysdeps/pthread/pthread.h (__pthread_cleanup_routine): Use
4370 __inline instead of inline.
4371 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_routine): Likewise.
4373 2005-03-31 Jakub Jelinek <jakub@redhat.com>
4375 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Use
4376 functionally equivalent, but shorter instructions.
4377 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
4378 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
4379 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
4381 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
4382 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
4383 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
4384 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
4385 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4386 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
4387 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
4389 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
4390 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
4391 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4392 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
4393 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
4395 2005-03-28 Daniel Jacobowitz <dan@codesourcery.com>
4397 * sysdeps/mips/Makefile: New file.
4398 * sysdeps/mips/nptl-sysdep.S: New file.
4399 * sysdeps/mips/tcb-offsets.sym: New file.
4400 * sysdeps/mips/pthread_spin_lock.S: New file.
4401 * sysdeps/mips/pthread_spin_trylock.S: New file.
4402 * sysdeps/mips/pthreaddef.h: New file.
4403 * sysdeps/mips/tls.h: New file.
4404 * sysdeps/mips/jmpbuf-unwind.h: New file.
4405 * sysdeps/unix/sysv/linux/mips/lowlevellock.h: New file.
4406 * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h: New file.
4407 * sysdeps/unix/sysv/linux/mips/bits/semaphore.h: New file.
4408 * sysdeps/unix/sysv/linux/mips/pthread_once.c: New file.
4409 * sysdeps/unix/sysv/linux/mips/fork.c: New file.
4410 * sysdeps/unix/sysv/linux/mips/pt-vfork.S: New file.
4411 * sysdeps/unix/sysv/linux/mips/vfork.S: New file.
4412 * sysdeps/unix/sysv/linux/mips/clone.S: New file.
4413 * sysdeps/unix/sysv/linux/mips/createthread.c: New file.
4414 * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: New file.
4416 2005-03-23 Ulrich Drepper <drepper@redhat.com>
4419 * pthread_create.c (__pthread_create_2_1): Rename syscall error
4422 2005-03-10 Jakub Jelinek <jakub@redhat.com>
4424 * tst-getpid1.c (do_test): Align stack passed to clone{2,}.
4426 2005-02-25 Roland McGrath <roland@redhat.com>
4428 * alloca_cutoff.c: Correct license text.
4429 * tst-unload.c: Likewise.
4430 * sysdeps/pthread/allocalim.h: Likewise.
4431 * sysdeps/pthread/pt-initfini.c: Likewise.
4432 * sysdeps/pthread/bits/libc-lock.h: Likewise.
4433 * sysdeps/pthread/bits/sigthread.h: Likewise.
4434 * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
4435 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
4437 2005-02-16 Roland McGrath <roland@redhat.com>
4439 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
4440 Use unsigned int * for ptr_nthreads.
4442 2005-02-14 Alan Modra <amodra@bigpond.net.au>
4445 * sysdeps/powerpc/tcb-offsets.sym (thread_offsetof): Redefine to suit
4448 2005-02-07 Richard Henderson <rth@redhat.com>
4451 * sysdeps/pthread/pthread.h (__sigsetjmp): Use pointer as first
4454 2004-11-03 Marcus Brinkmann <marcus@gnu.org>
4456 * sysdeps/generic/lowlevellock.h (__generic_mutex_unlock): Fix
4457 order of arguments in invocation of atomic_add_zero.
4459 2005-01-26 Jakub Jelinek <jakub@redhat.com>
4462 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S (__new_sem_trywait):
4463 Use direct %gs segment access or, if NO_TLS_DIRECT_SEG_REFS,
4464 at least gotntpoff relocation and addition.
4465 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
4467 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
4469 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
4472 2005-01-06 Ulrich Drepper <drepper@redhat.com>
4474 * allocatestack.c (init_one_static_tls): Adjust initialization of DTV
4475 entry for static tls deallocation fix.
4476 * sysdeps/alpha/tls.h (dtv_t): Change pointer type to be struct which
4477 also contains information whether the memory pointed to is static
4479 * sysdeps/i386/tls.h: Likewise.
4480 * sysdeps/ia64/tls.h: Likewise.
4481 * sysdeps/powerpc/tls.h: Likewise.
4482 * sysdeps/s390/tls.h: Likewise.
4483 * sysdeps/sh/tls.h: Likewise.
4484 * sysdeps/sparc/tls.h: Likewise.
4485 * sysdeps/x86_64/tls.h: Likewise.
4487 2004-12-27 Ulrich Drepper <drepper@redhat.com>
4489 * init.c (__pthread_initialize_minimal_internal): Use __sigemptyset.
4491 2004-12-21 Jakub Jelinek <jakub@redhat.com>
4493 * sysdeps/i386/tls.h (CALL_THREAD_FCT): Maintain 16 byte alignment of
4495 * Makefile (tests): Add tst-align2.
4496 * tst-align2.c: New test.
4497 * sysdeps/i386/Makefile (CFLAGS-tst-align{,2}.c): Add
4498 -mpreferred-stack-boundary=4.
4500 2004-12-18 Roland McGrath <roland@redhat.com>
4502 * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h:
4503 New file removed withdrawn for the moment.
4505 2004-12-17 Richard Henderson <rth@redhat.com>
4507 * sysdeps/unix/sysv/linux/alpha/clone.S: New file.
4508 * sysdeps/alpha/tcb-offsets.sym (TID_OFFSET): New.
4510 2004-12-16 Ulrich Drepper <drepper@redhat.com>
4512 * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h: New file.
4513 Increased PTHREAD_STACK_MIN.
4515 * tst-context1.c (stacks): Use bigger stack size.
4517 2004-12-16 Jakub Jelinek <jakub@redhat.com>
4519 * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: New file.
4520 * sysdeps/sparc/tcb-offsets.sym: Add TID.
4522 2004-12-15 Jakub Jelinek <jakub@redhat.com>
4524 * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: New file.
4525 * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: New file.
4526 * sysdeps/s390/tcb-offsets.sym (TID): Add.
4528 2004-12-15 Ulrich Drepper <drepper@redhat.com>
4530 * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: New file.
4532 2004-12-14 Ulrich Drepper <drepper@redhat.com>
4534 * sysdeps/powerpc/tcb-offsets.sym: Add TID.
4535 * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: New file.
4537 * tst-getpid1.c: If child crashes, report this first. Print which
4540 2004-12-09 Ulrich Drepper <drepper@redhat.com>
4542 * init.c (__pthread_initialize_minimal_internal): Also unblock
4545 2004-12-01 Jakub Jelinek <jakub@redhat.com>
4547 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_CPUTIME,
4548 _POSIX_THREAD_CPUTIME): Define to 0.
4549 * sysdeps/pthread/timer_create.c (timer_create): Remove unused code
4550 handling CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID.
4551 * sysdeps/pthread/timer_routines.c (__timer_signal_thread_pclk,
4552 __timer_signal_thread_tclk): Remove.
4553 (init_module): Remove their initialization.
4554 (thread_cleanup): Remove their cleanup assertions.
4555 * sysdeps/pthread/posix-timer.h (__timer_signal_thread_pclk,
4556 __timer_signal_thread_tclk): Remove.
4557 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Removed.
4558 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Removed.
4559 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Removed.
4561 2004-12-07 Jakub Jelinek <jakub@redhat.com>
4563 * sysdeps/ia64/tcb-offsets.sym (TID): Add.
4564 * sysdeps/unix/sysv/linux/ia64/clone2.S: New file.
4566 * Makefile (tests): Add tst-getpid2.
4567 * tst-getpid1.c (TEST_CLONE_FLAGS): Define.
4568 (do_test): Use it. Use __clone2 instead of clone on ia64.
4569 * tst-getpid2.c: New test.
4571 2004-12-07 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4573 * sysdeps/unix/sysv/linux/sh/clone.S: New file.
4575 2004-12-04 Ulrich Drepper <drepper@redhat.com>
4577 * Makefile (tests): Add tst-getpid1.
4578 * tst-getpid1.c: New file.
4579 * sysdeps/unix/sysv/linux/i386/clone.S: New file.
4580 * sysdeps/unix/sysv/linux/x86_64/clone.S: New file.
4582 2004-12-02 Roland McGrath <roland@redhat.com>
4584 * Makefile (libpthread-nonshared): Variable removed.
4585 ($(objpfx)libpthread_nonshared.a): Target removed.
4586 ($(inst_libdir)/libpthread_nonshared.a): Likewise.
4587 These are now handled by generic magic from
4588 libpthread-static-only-routines being set.
4590 2004-11-27 Ulrich Drepper <drepper@redhat.com>
4592 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_PRIORITIZED_IO,
4593 _POSIX2_CHAR_TERM, _POSIX_THREAD_PRIO_INHERIT,
4594 _POSIX_THREAD_PRIO_PROTECT): Define.
4595 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
4596 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
4597 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
4599 2004-11-26 Jakub Jelinek <jakub@redhat.com>
4601 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_ADVISORY_INFO,
4602 _POSIX_SPORADIC_SERVER, _POSIX_THREAD_SPORADIC_SERVER, _POSIX_TRACE,
4603 _POSIX_TRACE_EVENT_FILTER, _POSIX_TRACE_INHERIT, _POSIX_TRACE_LOG,
4604 _POSIX_TYPED_MEMORY_OBJECTS, _POSIX_IPV6, _POSIX_RAW_SOCKETS): Define.
4605 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
4606 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
4607 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
4609 2004-11-24 Ulrich Drepper <drepper@redhat.com>
4611 * sysdeps/x86_64/Makefile [nptl]: Define CFLAGS-pthread_create.c.
4613 * Makefile (libpthread-routines): Add pthread_setschedprio.
4614 * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setschedprio.
4615 * sysdeps/pthread/pthread.h: Declare pthread_setschedprio.
4616 * pthread_setschedprio.c: New file.
4618 2004-11-20 Jakub Jelinek <jakub@redhat.com>
4620 * pthread_create.c (pthread_cancel): Add PTHREAD_STATIC_FN_REQUIRE.
4621 * pthread_cancel.c (pthread_create): Likewise.
4623 * Makefile (libpthread-routines): Add vars.
4624 * sysdeps/pthread/createthread.c (__pthread_multiple_threads): Remove.
4625 * init.c (__default_stacksize, __is_smp): Remove.
4627 * pthreadP.h (__find_thread_by_id): If !SHARED, add weak_function
4628 and define a wrapper macro.
4629 (PTHREAD_STATIC_FN_REQUIRE): Define.
4630 * allocatestack.c (__find_thread_by_id): Undefine.
4631 * pthread_create (__pthread_keys): Remove.
4632 (pthread_mutex_lock, pthread_mutex_unlock, pthread_once,
4633 pthread_key_create, pthread_setspecific, pthread_getspecific): Add
4634 PTHREAD_STATIC_FN_REQUIRE.
4636 2004-11-18 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4638 * sysdeps/sh/tls.h (DB_THREAD_SELF): Set the correct bias
4639 parameter to REGISTER macro.
4641 2004-11-17 Roland McGrath <roland@redhat.com>
4643 * sysdeps/unix/sysv/linux/timer_routines.c (__start_helper_thread):
4644 Make sure SIGCANCEL is blocked as well.
4646 2004-11-10 Jakub Jelinek <jakub@redhat.com>
4648 * sysdeps/pthread/setxid.h: New file.
4649 * sysdeps/pthread/pthread-functions.h (HAVE_PTR__NPTL_SETXID): Remove.
4650 (struct xid_command): Add forward decl.
4651 (struct pthread_functions): Change return type of __nptl_setxid hook
4653 * pthreadP.h (__nptl_setxid): Change return type to int.
4654 * allocatestack.c (__nptl_setxid): Call INTERNAL_SYSCALL_NCS in the
4655 calling thread, return its return value and set errno on failure.
4656 * descr.h (struct xid_command): Change id type to long array.
4658 * Makefile: Add rules to build and test tst-setuid1 and
4660 * tst-setuid1.c: New test.
4661 * tst-setuid1-static.c: New test.
4663 2004-11-10 Jakub Jelinek <jakub@redhat.com>
4665 * Makefile (tests): Add tst-exit3.
4666 * tst-exit3.c: New test.
4668 2004-11-09 Ulrich Drepper <drepper@redhat.com>
4670 * Makefile (tests): Add tst-exit2.
4671 * tst-exit2.c: New file.
4673 2004-11-09 Roland McGrath <roland@redhat.com>
4676 * sysdeps/pthread/createthread.c (do_clone): Increment __nptl_nthreads
4677 here, before calling clone.
4678 * pthread_create.c (start_thread): Don't do it here.
4680 2004-11-02 Jakub Jelinek <jakub@redhat.com>
4682 * sysdeps/unix/sysv/linux/smp.h: Include <errno.h>.
4684 2004-10-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4686 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
4687 Set ETIMEDOUT to errno when time is up. Tweak to avoid
4690 2004-10-28 Jakub Jelinek <jakub@redhat.com>
4692 * pthread_create.c (__pthread_create_2_1): Avoid leaking stacks
4693 if sched_priority is not between minprio and maxprio.
4695 2004-10-25 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4697 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
4698 (__pthread_cond_timedwait): Use clock_gettime syscall if exists.
4700 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
4701 (__lll_mutex_timedlock_wait): Fix a bad branch condition.
4703 2004-10-24 Ulrich Drepper <drepper@redhat.com>
4705 * sysdeps/unix/sysv/linux/smp.h (is_smp_system): Use
4706 not-cancelable I/O functions.
4708 2004-10-21 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4710 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
4711 (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
4712 make sure 2 is stored in the futex and we looked at the old value.
4713 Fix a few other problems to return the correct value.
4715 2004-10-14 Richard Henderson <rth@redhat.com>
4717 * sysdeps/alpha/tcb-offsets.sym (thread_offsetof): Redefine to
4720 2004-10-06 Jakub Jelinek <jakub@redhat.com>
4722 * sysdeps/unix/sysv/linux/jmp-unwind.c: Include pthreadP.h instead
4723 of pthread-functions.h and pthreaddef.h.
4724 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Likewise.
4726 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
4727 Change __data.__nwaiters from int to unsigned int.
4729 * tst-clock2.c (do_test): Don't fail if _POSIX_THREAD_CPUTIME == 0 and
4730 sysconf (_SC_THREAD_CPUTIME) returns negative value.
4732 * allocatestack.c (__find_thread_by_id): Move attribute_hidden
4735 * sysdeps/s390/jmpbuf-unwind.h: Include bits/wordsize.h.
4736 (JMPBUF_CFA_UNWINDS_ADJ): Subtract 96 resp. 160 bytes from CFA.
4738 2004-10-06 Ulrich Drepper <drepper@redhat.com>
4740 * tst-cancel4.c (tf_msgrcv): Check for failure in msgget. If the
4741 test fails, remove message queue.
4742 (tf_msgsnd): Likewise.
4744 2004-10-05 Jakub Jelinek <jakub@redhat.com>
4746 * tst-clock1.c: Change #ifdef to #if defined.
4747 * tst-clock2.c: Likewise.
4748 * tst-cond11.c: Likewise.
4750 * sysdeps/pthread/timer_create.c (timer_create): Use
4751 defined _POSIX_CPUTIME && _POSIX_CPUTIME >= 0 instead of
4752 defined CLOCK_PROCESS_CPUTIME_ID #ifs and similarly for
4755 2004-10-05 Jakub Jelinek <jakub@redhat.com>
4757 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h (_POSIX_CPUTIME,
4758 _POSIX_THREAD_CPUTIME): Define to 0.
4760 2004-10-04 Ulrich Drepper <drepper@redhat.com>
4762 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Define _POSIX_CPUTIME
4763 and _POSIX_THREAD_CPUTIME to zero.
4764 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
4765 * tst-barrier2.c: Fix testing for POSIX feature.
4766 * tst-clock1.c: Likewise.
4767 * tst-clock2.c: Likewise.
4768 * tst-cond11.c: Likewise.
4769 * tst-cond4.c: Likewise.
4770 * tst-cond6.c: Likewise.
4771 * tst-flock2.c: Likewise.
4772 * tst-mutex4.c: Likewise.
4773 * tst-mutex9.c: Likewise.
4774 * tst-rwlock12.c: Likewise.
4775 * tst-rwlock4.c: Likewise.
4776 * tst-signal1.c: Likewise.
4777 * tst-spin2.c: Likewise.
4778 * sysdeps/pthread/posix-timer.h: Likewise.
4779 * sysdeps/pthread/timer_create.c: Likewise.
4780 * sysdeps/pthread/timer_routines.c: Likewise.
4782 2004-10-01 Ulrich Drepper <drepper@redhat.com>
4784 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4785 (__lll_mutex_timedlock_wait): Address futex correctly.
4787 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
4788 (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
4789 make sure 2 is stored in the futex and we looked at the old value.
4790 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4791 (__lll_mutex_timedlock_wait): Likewise. Fix a few other problems
4792 which might very well made the code not working at all before.
4795 2004-09-28 Ulrich Drepper <drepper@redhat.com>
4797 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
4798 allow SIGSETXID to be sent.
4799 * sysdeps/pthread/sigaction.c (__sigaction): Don't allow action
4800 for SIGSETXID to be defined.
4801 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
4802 SIGSETXID cannot be blocked.
4804 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4805 Add __extension__ to long long types.
4806 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4807 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4808 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4809 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4810 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
4811 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4812 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4814 2004-09-25 Ulrich Drepper <drepper@redhat.com>
4816 * descr.h (struct pthread): Add stopped_start field.
4817 * sysdeps/pthread/createthread.c (create_thread): Set
4818 start_stopped flag in descriptor for new thread appropriately.
4819 * pthread_create.c (start_thread): Only take lock to be stopped on
4820 startup if stopped_start flag says so.
4822 2004-09-24 Ulrich Drepper <drepper@redhat.com>
4824 * pthread_create.c (__pthread_create_2_1): Remember whether thread
4825 is created detached and if yes, do not try to free the stack in case
4826 the thread creation failed.
4827 * sysdeps/pthread/createthread.c (do_clone): Free stack here if clone
4828 call fails. Don't depend on INTERNAL_SYSCALL_ERRNO return zero in
4829 case there has been no error. [BZ #405]
4831 * pthread_create.c (start_thread): Don't wait for scheduler data
4832 etc to be set at the beginning of the function. The cancellation
4833 infrastructure must have been set up. And enable async
4834 cancellation before potentially going to sleep. [BZ #401]
4836 2004-09-20 Ulrich Drepper <drepper@redhat.com>
4838 * Versions: Remove exports for pthread_set*id_np functions.
4839 * sysdeps/pthread/pthread.h: Remove pthread_set*id_np prototypes
4841 * Makefile: Don't build pthread_set*id code for now.
4843 2004-09-19 Ulrich Drepper <drepper@redhat.com>
4845 * sysdeps/unix/sysv/linux/allocrtsig.c: Allocate second signal for
4847 * allocatestack.c (__nptl_setxid): New function.
4848 * descr.h (struct xid_command): Define type.
4849 * init.c (pthread_functions): Add ptr__nptl_setxid initialization.
4850 (sighandler_setxid): New function.
4851 (__pthread_initialize_minimal): Register sighandler_setxid for
4853 * pt-allocrtsig.c: Update comment.
4854 * pthreadP.h: Define SIGSETXID. Declare __xidcmd variable.
4855 Declare __nptl_setxid.
4856 * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_setxid.
4857 * sysdeps/pthread/pthread.h: Declare pthread_setgid_np,
4858 pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
4859 pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
4860 and pthread_setresuid_np.
4861 * pthread_setgid_np.c: New file.
4862 * pthread_setuid_np.c: New file.
4863 * pthread_setegid_np.c: New file.
4864 * pthread_seteuid_np.c: New file.
4865 * pthread_setregid_np.c: New file.
4866 * pthread_setreuid_np.c: New file.
4867 * pthread_setresgid_np.c: New file.
4868 * pthread_setresuid_np.c: New file.
4869 * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setgid_np,
4870 pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
4871 pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
4872 and pthread_setresuid_np.
4873 * Makefile (libpthread-routines): Add pthread_setuid, pthread_seteuid,
4874 pthread_setreuid, pthread_setresuid, pthread_setgid, pthread_setegid,
4875 pthread_setregid, and pthread_setresgid.
4877 2004-09-18 Ulrich Drepper <drepper@redhat.com>
4879 * allocatestack.c (allocate_stack): Return EAGAIN instead of
4880 ENOMEM when out of memory.
4882 2004-09-10 Roland McGrath <roland@redhat.com>
4885 * allocatestack.c (allocate_stack): Remove [__ASSUME_CLONE_STOPPED]
4886 code, since we don't try to use the broken CLONE_STOPPED any more.
4887 * pthread_create.c (start_thread): Likewise.
4889 2004-09-15 Richard Henderson <rth@redhat.com>
4891 * sysdeps/unix/sysv/linux/alpha/vfork.S: Use libc_hidden_def.
4893 2004-09-01 David Mosberger <davidm@hpl.hp.com>
4895 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h
4896 (__libc_unwind_longjmp): Delete macro and declare as function.
4897 * sysdeps/unix/sysv/linux/ia64/Makefile (sysdep_routines): Mention
4898 __ia64_longjmp, sigstack_longjmp, and __sigstack_longjmp for
4900 * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S: New file.
4901 * sysdeps/unix/sysv/linux/ia64/__sigstack_longjmp.c: New file.
4902 * sysdeps/unix/sysv/linux/ia64/unwind_longjmp.c: New file.
4904 2004-09-12 Ulrich Drepper <drepper@redhat.com>
4906 * sysdeps/pthread/pthread.h: Make rwlock prototypes available also
4908 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define rwlock
4909 types also for __USE_XOPEN2K.
4910 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4911 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4912 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4913 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4914 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4915 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4916 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4919 2004-09-08 Ulrich Drepper <drepper@redhat.com>
4921 * sysdeps/pthread/pthread.h
4922 (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Make safe for C++.
4923 (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
4924 (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
4925 (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Likewise.
4928 2004-09-07 Ulrich Drepper <drepper@redhat.com>
4930 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Allow
4931 PSEUDO to be used with . prefix.
4933 * sysdeps/unix/sysv/linux/alpha/pthread_once.c (__pthread_once):
4934 Use atomic_increment instead of atomic_exchange_and_add.
4935 * sysdeps/unix/sysv/linux/sparc/pthread_once.c (__pthread_once):
4937 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
4939 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
4942 * allocatestack.c (allocate_stack): Use atomic_increment_val
4943 instead of atomic_exchange_and_add.
4944 * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Likewise.
4945 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
4947 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
4950 * sysdeps/pthread/pthread.h (pthread_once): Remove __THROW since
4951 the initialization function might throw.
4953 2005-09-05 Richard Henderson <rth@redhat.com>
4955 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
4956 Move definition inside libpthread, libc, librt check. Provide
4957 definition for rtld.
4959 2004-09-02 Ulrich Drepper <drepper@redhat.com>
4961 * sysdeps/alpha/jmpbuf-unwind.h: Define __libc_unwind_longjmp.
4962 * sysdeps/i386/jmpbuf-unwind.h: Likewise
4963 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
4964 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
4965 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
4966 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
4967 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
4968 * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
4971 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
4972 Rename __data.__clock to __data.__nwaiters, make it unsigned int.
4973 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
4975 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
4976 Decrement __nwaiters. If pthread_cond_destroy has been called and
4977 this is the last waiter, signal pthread_cond_destroy caller and
4978 avoid using the pthread_cond_t structure after unlock.
4979 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4980 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4981 Read clock type from the least significant bits of __nwaiters instead
4983 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4984 * sysdeps/unix/sysv/linux/internaltypes.h: Define COND_CLOCK_BITS.
4986 2004-08-31 Jakub Jelinek <jakub@redhat.com>
4989 * Makefile (tests): Add tst-cond20 and tst-cond21.
4990 * tst-cond20.c: New test.
4991 * tst-cond21.c: New test.
4992 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
4993 (pthread_cond_t): Rename __data.__clock to __data.__nwaiters, make
4995 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
4997 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
4998 (pthread_cond_t): Likewise.
4999 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
5001 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
5003 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
5005 * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_clock): Remove.
5006 (cond_nwaiters): New.
5008 * pthread_cond_destroy.c (__pthread_cond_destroy): Return EBUSY
5009 if there are waiters not signalled yet.
5010 Wait until all already signalled waiters wake up.
5011 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Decrement
5012 __nwaiters. If pthread_cond_destroy has been called and this is the
5013 last waiter, signal pthread_cond_destroy caller and avoid using
5014 the pthread_cond_t structure after unlock.
5015 (__pthread_cond_wait): Increment __nwaiters in the beginning,
5016 decrement it when leaving. If pthread_cond_destroy has been called
5017 and this is the last waiter, signal pthread_cond_destroy caller.
5018 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
5019 Likewise. Read clock type from the least significant bits of
5020 __nwaiters instead of __clock.
5021 * pthread_condattr_setclock.c (pthread_condattr_setclock): Check
5022 whether clock ID can be encoded in COND_CLOCK_BITS bits.
5023 * pthread_condattr_getclock.c (pthread_condattr_getclock): Decode
5024 clock type just from the last COND_CLOCK_BITS bits of value.
5025 * pthread_cond_init.c (__pthread_cond_init): Initialize __nwaiters
5026 instead of __clock, just from second bit of condattr's value.
5028 2004-08-30 Jakub Jelinek <jakub@redhat.com>
5030 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Include
5031 bits/wordsize.h. Make the header match i386 header when __WORDSIZE
5033 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
5035 2004-08-15 Roland McGrath <roland@frob.com>
5037 * pthread_atfork.c: Update copyright terms including special exception
5038 for these trivial files, which are statically linked into executables
5039 that use dynamic linking for the significant library code.
5041 2004-08-09 Jakub Jelinek <jakub@redhat.com>
5043 * DESIGN-rwlock.txt: Add decreasing of nr_readers_queued to
5044 pthread_rwlock_rdlock.
5045 * sysdeps/pthread/pthread_rwlock_rdlock (__pthread_rwlock_rdlock):
5046 Decrease __nr_readers_queued after reacquiring lock.
5047 * sysdeps/pthread/pthread_rwlock_timedrdlock
5048 (pthread_rwlock_timedrdlock): Likewise.
5049 Reported by Bob Cook <bobcook47@hotmail.com>.
5051 2004-08-11 Jakub Jelinek <jakub@redhat.com>
5053 * tst-rwlock14.c (tf): Read main thread handle from *ARG
5054 before pthread_barrier_wait.
5056 2004-08-07 Ulrich Drepper <drepper@redhat.com>
5058 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
5059 Remove unnecessary exception handling data.
5061 2004-07-23 Jakub Jelinek <jakub@redhat.com>
5064 * sysdeps/pthread/pthread.h (pthread_getcpuclockid): Use __clockid_t
5065 instead of clockid_t.
5067 2004-07-21 Roland McGrath <roland@redhat.com>
5069 * Makefile ($(objpfx)multidir.mk): Use $(make-target-directory).
5071 2004-07-19 Roland McGrath <roland@redhat.com>
5073 * tst-cancel4.c (tf_waitid): Use WEXITED flag bit if available.
5075 2004-07-02 Roland McGrath <roland@redhat.com>
5077 * configure: Don't exit.
5079 2004-07-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5081 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
5082 (__pthread_cond_timedwait): Check for invalid nanosecond in
5085 2004-07-07 Ulrich Drepper <drepper@redhat.com>
5087 * Makefile: Add rules to build and run tst-fini1.
5088 * tst-fini1.c: New file.
5089 * tst-fini1mod.c: New file.
5091 2004-07-05 Ulrich Drepper <drepper@redhat.com>
5093 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define NO_CANCELLATION
5094 if no cancellation support is needed.
5095 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
5096 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
5097 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
5098 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
5099 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
5100 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
5101 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
5102 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
5103 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
5105 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define __NR_futex
5106 only if not already defined.
5108 2004-07-05 Jakub Jelinek <jakub@redhat.com>
5110 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_unlock): Use
5111 constraint "m" instead of "0" for futex.
5113 * shlib-versions: Add powerpc64-.*-linux.*.
5115 2004-07-04 Jakub Jelinek <jakub@redhat.com>
5117 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
5118 (pthread_rwlock_timedrdlock): Use cmpq instead of cmpl to check
5120 * tst-rwlock14.c (do_test): Test for invalid tv_nsec equal to
5121 1 billion and 64-bit tv_nsec which is valid when truncated to 32
5124 2004-06-29 Roland McGrath <roland@redhat.com>
5126 * Banner: NPTL no longer has its own version number.
5127 * Makefile (nptl-version): Variable removed.
5128 * sysdeps/pthread/Makefile (CFLAGS-confstr.c): Set LIBPTHREAD_VERSION
5129 using $(version), the glibc version number.
5131 2004-06-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5133 * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
5134 Fix branch offset for a PLT entry.
5135 * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
5137 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
5139 * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
5141 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait):
5144 2004-06-28 Jakub Jelinek <jakub@redhat.com>
5146 * sysdeps/alpha/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define
5149 2004-06-28 Jakub Jelinek <jakub@redhat.com>
5151 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
5152 (pthread_rwlock_timedwrlock): Return EINVAL if tv_nsec is negative,
5154 * sysdeps/pthread/pthread_rwlock_timedrdlock.c
5155 (pthread_rwlock_timedrdlock): Likewise.
5157 2004-06-22 Jakub Jelinek <jakub@redhat.com>
5159 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
5160 Set __r7 to val, not mutex.
5162 2004-06-27 Ulrich Drepper <drepper@redhat.com>
5164 * Makefile: Add rules to build tst-rwlock14.
5165 * tst-rwlock14.c: New file.
5167 2004-06-24 Boris Hu <boris.hu@intel.com>
5169 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Add timeout validation
5171 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
5173 2004-06-19 Andreas Jaeger <aj@suse.de>
5175 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix
5176 assembler in last patch.
5178 2004-06-17 Ulrich Drepper <drepper@redhat.com>
5180 * sysdeps/pthread/pthread_cond_timedwait.c
5181 (__pthread_cond_timedwait): Also check for negativ nanoseconds.
5182 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5183 (__pthread_cond_timedwait): Check for invalid nanosecond in
5185 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5186 * tst-cond19.c: New file.
5187 * Makefile: Add rules to build and run tst-cond19.
5189 2004-06-15 Steven Munroe <sjmunroe@us.ibm.com>
5191 * tst-context1.c (GUARD_PATTERN): Defined.
5192 (tst_context_t): Define struct containing ucontext_t & guard words.
5193 (ctx): Declare as an array of tst_context_t.
5194 (fct): Verify uc_link & guard words are still valid.
5195 (tf): Initialize guard words in ctx. Adjust ctx refs for new struct.
5197 2004-06-13 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5199 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
5200 Add __data.__futex field, reshuffle __data.__clock.
5201 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
5202 (__pthread_cond_signal): Increment __futex at the same time as
5203 __wakeup_seq or __total_seq. Pass address of __futex instead of
5204 address of low 32-bits of __wakeup_seq to futex syscall.
5205 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
5206 (__pthread_cond_wait): Likewise. Pass __futex value from before
5207 releasing internal lock to FUTEX_WAIT.
5208 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
5209 (__pthread_cond_timedwait): Likewise.
5210 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
5211 (FUTEX_CMP_REQUEUE): Define.
5212 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
5213 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
5214 Pass __futex value from before the unlock and __futex address instead
5215 of address of low 32-bits of __wakeup_seq to futex syscall.
5216 Fallback to FUTEX_WAKE all on any errors.
5218 2004-06-08 Jakub Jelinek <jakub@redhat.com>
5220 * pthread_mutexattr_getpshared.c (pthread_mutex_getpshared): Fix
5222 * pthread_mutexattr_gettype.c (pthread_mutexattr_gettype): Likewise.
5223 * pthread_mutexattr_init.c (__pthread_mutexattr_init): Likewise.
5224 * pthread_mutexattr_settype.c (__pthread_mutexattr_settype): Likewise.
5225 * pthread_mutexattr_setpshared.c (pthread_mutexattr_setpshared):
5226 Likewise. Reported by Bob Cook <bobcook47@hotmail.com>.
5228 2004-06-11 Martin Schwidefsky <schwidefsky@de.ibm.com>
5230 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_compare_and_swap):
5231 Add memory clobber to inline assembly.
5232 (__lll_mutex_trylock): Likewise.
5233 (__lll_mutex_cond_trylock): Likewise.
5235 2004-06-07 Martin Schwidefsky <schwidefsky@de.ibm.com>
5237 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
5238 Pass val argument as 6th system call argument in %r7.
5240 2004-05-21 Jakub Jelinek <jakub@redhat.com>
5242 * Makefile (tests): Add tst-cond16.
5243 * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_futex): Add.
5244 * pthread_cond_init.c (__pthread_cond_init): Clear __data.__futex.
5245 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
5246 Add __data.__futex field, reshuffle __data.__clock.
5247 * sysdeps/unix/sysv/linux/i386/pthread_cond_signal.S
5248 (__pthread_cond_signal): Increment __futex at the same time as
5249 __wakeup_seq or __total_seq. Pass address of __futex instead of
5250 address of low 32-bits of __wakeup_seq to futex syscall.
5251 * sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S
5252 (__pthread_cond_wait): Likewise. Pass __futex value from before
5253 releasing internal lock to FUTEX_WAIT.
5254 * sysdeps/unix/sysv/linux/i386/pthread_cond_timedwait.S
5255 (__pthread_cond_timedwait): Likewise.
5256 * sysdeps/unix/sysv/linux/i386/pthread_cond_broadcast.S
5257 (FUTEX_CMP_REQUEUE): Define.
5258 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
5259 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
5260 Pass __futex value from before the unlock and __futex address instead
5261 of address of low 32-bits of __wakeup_seq to futex syscall.
5262 Fallback to FUTEX_WAKE all on any errors.
5263 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_CMP_REQUEUE):
5265 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
5266 internally. Return non-zero if error, zero if success.
5267 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
5268 Add __data.__futex field, reshuffle __data.__clock.
5269 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_CMP_REQUEUE):
5271 (lll_futex_requeue): Add val argument, return 1 unconditionally
5273 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
5274 Add __data.__futex field, reshuffle __data.__clock.
5275 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_CMP_REQUEUE):
5277 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
5278 internally. Return non-zero if error, zero if success.
5279 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
5280 (pthread_cond_t): Add __data.__futex field, reshuffle __data.__clock.
5281 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_CMP_REQUEUE):
5283 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
5284 internally. Return non-zero if error, zero if success.
5285 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
5286 Add __data.__futex field, reshuffle __data.__clock.
5287 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_CMP_REQUEUE):
5289 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
5290 internally. Return non-zero if error, zero if success.
5291 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
5292 Add __data.__futex field, reshuffle __data.__clock.
5293 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
5294 Add __data.__futex field, reshuffle __data.__clock.
5295 * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal):
5296 Increment __futex at the same time as __wakeup_seq or __total_seq.
5297 Pass address of __futex instead of address of low 32-bits of
5298 __wakeup_seq to futex syscall.
5299 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
5300 Pass __futex value from before releasing internal lock
5302 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
5303 Likewise. Avoid unnecessary shadowing of variables.
5304 * sysdeps/pthread/pthread_cond_broadcast.c (__pthread_cond_broadcast):
5305 Set __futex to 2 * __total_seq. Pass __futex value from before the
5306 unlock and __futex address instead of address of low 32-bits of
5307 __wakeup_seq to futex_requeue macro, adjust for new return value
5309 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
5310 (__pthread_cond_signal): Increment __futex at the same time as
5311 __wakeup_seq or __total_seq. Pass address of __futex instead of
5312 address of low 32-bits of __wakeup_seq to futex syscall.
5313 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
5314 (__pthread_cond_wait): Likewise. Pass __futex value from before
5315 releasing internal lock to FUTEX_WAIT.
5316 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
5317 (__pthread_cond_timedwait): Likewise.
5318 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
5319 (FUTEX_CMP_REQUEUE): Define.
5320 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
5321 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
5322 Pass __futex value from before the unlock and __futex address instead
5323 of address of low 32-bits of __wakeup_seq to futex syscall.
5324 Fallback to FUTEX_WAKE all on any errors.
5326 2004-06-03 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5328 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_mutex_lock):
5329 Add nop to align the end of critical section.
5330 (lll_mutex_cond_lock, lll_mutex_timedlock): Likewise.
5332 2004-06-01 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5334 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
5335 Add __broadcast_seq field.
5336 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Mark
5337 all waiters as woken with woken_seq and bump broadcast counter.
5338 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use new
5339 __broadcast_seq. Increment __woken_seq correctly when cleanuped.
5340 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
5341 Comment typo fixes. Avoid returning -ETIMEDOUT.
5343 2004-06-01 Ulrich Drepper <drepper@redhat.com>
5345 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5346 (__condvar_tw_cleanup): Fix access to saved broadcast_seq value.
5347 Reported by Kaz Kojima.
5349 2004-05-25 Jakub Jelinek <jakub@redhat.com>
5351 * sysdeps/unix/sysv/linux/aio_misc.h: New file.
5353 2004-05-21 Jakub Jelinek <jakub@redhat.com>
5355 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Compare
5356 __broadcast_seq with bc_seq after acquiring internal lock instead of
5359 2004-05-18 Jakub Jelinek <jakub@redhat.com>
5361 * Makefile (.NOTPARALLEL): Only serialize make check/xcheck, not
5363 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5364 (__pthread_cond_timedwait): Avoid returning -ETIMEDOUT.
5365 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
5366 (pthread_cond_t): Add __data.__broadcast_seq field.
5367 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
5368 (FRAME_SIZE): Define.
5369 (__pthread_cond_timedwait): Use it. Store/check broadcast_seq.
5371 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S (FRAME_SIZE):
5373 (__pthread_cond_wait): Use it. Store/check broadcast_seq. Comment
5375 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
5376 (__pthread_cond_broadcast): Increment broadcast_seq. Comment typo
5379 2004-05-18 Ulrich Drepper <drepper@redhat.com>
5381 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add broadcast_seq entry.
5382 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
5383 Add __broadcast_seq field.
5384 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5385 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5386 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5387 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
5388 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5389 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Mark
5390 all waiters as woken with woken_seq and bump broadcast counter.
5391 * sysdeps/pthread/pthread_cond_broadcast.c: Likewise.
5392 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use new
5393 __broadcast_seq field.
5394 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5395 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
5396 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
5397 * pthread_cond_init.c: Initialize __broadcast_seq field.
5398 * Makefile (tests): Add tst-cond17 and tst-cond18.
5399 Add .NOTPARALLEL goal.
5400 * tst-cond16.c: New file. From Jakub.
5401 * tst-cond17.c: New file. From Jakub.
5402 * tst-cond18.c: New file. From Jakub.
5404 2004-05-16 Ulrich Drepper <drepper@redhat.com>
5406 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Correct some
5409 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
5410 Parametrize frame size. Correct some unwind info.
5411 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5413 2004-05-04 Jakub Jelinek <jakub@redhat.com>
5415 * tst-stack3.c: Note testing functionality beyond POSIX.
5417 2004-05-04 Jakub Jelinek <jakub@redhat.com>
5419 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (USE___THREAD):
5420 Change conditional from ifdef to if.
5422 2004-04-23 Jakub Jelinek <jakub@redhat.com>
5424 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SYSDEP_CANCEL_ERRNO,
5425 SYSDEP_CANCEL_ERROR): Define.
5428 2004-05-01 Jakub Jelinek <jakub@redhat.com>
5430 * Versions (libpthread): Remove __pthread_cleanup_upto@@GLIBC_PRIVATE.
5432 2004-04-20 Jakub Jelinek <jakub@redhat.com>
5434 * sem_unlink.c (sem_unlink): Change EPERM into EACCES.
5436 2004-04-19 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5438 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Add frame info.
5439 Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
5440 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Remove unneeded frame
5441 info. Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
5443 2004-04-19 Ulrich Drepper <drepper@redhat.com>
5445 * sysdeps/unix/sysv/linux/timer_routines.c: Make sure helper
5446 thread has all signals blocked.
5448 2004-04-18 Andreas Jaeger <aj@suse.de>
5450 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h
5451 (SEM_VALUE_MAX): Add missing brace.
5453 2004-04-17 Jakub Jelinek <jakub@redhat.com>
5455 * sysdeps/pthread/Makefile (tests): Add tst-mqueue8x
5457 (CFLAGS-tst-mqueue8x.c): Add -fexceptions.
5458 * sysdeps/pthread/tst-mqueue8x.c: New test.
5459 * tst-cancel4.c: Update comment about message queues.
5461 * sysdeps/pthread/timer_gettime.c (timer_gettime): For expired timer
5462 return it_value { 0, 0 }.
5463 * sysdeps/pthread/timer_create.c (timer_create): Handle SIGEV_NONE
5465 * sysdeps/pthread/timer_routines.c (thread_expire_timer): Remove
5466 assertion for SIGEV_NONE.
5467 (thread_attr_compare): Compare all attributes, not just a partial
5470 2004-04-17 Jakub Jelinek <jakub@redhat.com>
5472 * sysdeps/unix/sysv/linux/mq_notify.c: Include stdlib.h.
5474 2004-04-17 Ulrich Drepper <drepper@redhat.com>
5476 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h (SEM_VALUE_MAX):
5477 Just use a plain number.
5478 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
5479 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
5480 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
5481 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
5482 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
5483 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
5484 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
5486 2004-04-16 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5488 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Remove unneeded
5490 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
5492 2004-04-15 Jakub Jelinek <jakub@redhat.com>
5494 * sysdeps/unix/sysv/linux/timer_routines.c: Include errno.h.
5495 (timer_helper_thread): Use inline rt_sigtimedwait syscall instead
5496 of calling sigwaitinfo.
5498 2004-04-16 Ulrich Drepper <drepper@redhat.com>
5500 * allocatestack.c (allocate_stack): Set reported_guardsize
5502 * pthread_getattr_np.c (pthread_getattr_np): Use
5503 reported_guardsize instead of guardsize.
5504 * descr.h (struct pthread): Add reported_guardsize field.
5506 2004-04-13 Jakub Jelinek <jakub@redhat.com>
5508 * sysdeps/unix/sysv/linux/mq_notify.c: Shut up GCC warning.
5510 2004-04-12 Ulrich Drepper <drepper@redhat.com>
5512 * sysdeps/unix/sysv/linux/mq-notify.c: New file.
5514 2004-04-08 Jakub Jelinek <jakub@redhat.com>
5516 * sysdeps/unix/sysv/linux/bits/local_lim.h (MQ_PRIO_MAX): Define.
5517 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h (MQ_PRIO_MAX): Define.
5518 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h (MQ_PRIO_MAX): Define.
5519 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h (MQ_PRIO_MAX): Define.
5520 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
5522 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
5523 (_POSIX_MESSAGE_PASSING): Define.
5524 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h
5525 (_POSIX_MESSAGE_PASSING): Define.
5526 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h
5527 (_POSIX_MESSAGE_PASSING): Define.
5529 2004-04-04 Ulrich Drepper <drepper@redhat.com>
5531 * tst-context1.c (fct): Check whether correct stack is used.
5533 2004-04-03 Ulrich Drepper <drepper@redhat.com>
5535 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Never use
5536 matching constraints for asm mem parameters.
5538 * tst-clock2.c (tf): Don't define unless needed.
5540 2004-03-30 H.J. Lu <hongjiu.lu@intel.com>
5542 * Makefile (link-libc-static): Use $(static-gnulib) instead of
5545 2004-03-30 Ulrich Drepper <drepper@redhat.com>
5547 * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_deallocate_tsd.
5548 * init.c (pthread_functions): Add ptr__nptl_deallocate_tsd.
5549 * pthreadP.h: Declare __nptl_deallocate_tsd.
5550 * pthread_create.c (deallocate_tsd): Remove to __nptl_deallocate_tsd.
5553 * Makefile (tests): Add tst-tsd5.
5554 * tst-tsd5.c: New file.
5556 2004-03-29 Ulrich Drepper <drepper@redhat.com>
5558 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
5559 (__pthread_attr_setaffinity_old): Prepend GLIBC_ to version names
5560 is SHLIB_COMPAT check.
5561 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
5562 (__pthread_attr_getaffinity_old): Likewise.
5563 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
5564 (__pthread_getaffinity_old): Likewise.
5565 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
5566 (__pthread_setaffinity_old): Likewise.
5568 2004-03-26 Ulrich Drepper <drepper@redhat.com>
5570 * allocatestack.c (_make_stacks_executable): Call
5571 _dl_make_stack_executable first.
5573 2004-03-24 Roland McGrath <roland@redhat.com>
5575 * sysdeps/i386/pthread_spin_lock.c (pthread_spin_lock): Use "m"
5576 constraint instead of "0".
5578 2004-03-24 Ulrich Drepper <drepper@redhat.com>
5580 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
5581 (lll_mutex_cond_trylock): Define as wrapper around __lll_cond_trylock.
5583 * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Reorganize
5584 code to avoid warning.
5586 2004-03-24 Andreas Jaeger <aj@suse.de>
5588 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
5589 (__pthread_attr_setaffinity_old): Remove const.
5591 2004-03-23 Ulrich Drepper <drepper@redhat.com>
5593 * sysdeps/unix/sysv/linux/smp.h: New file.
5594 * sysdeps/unix/sysv/linux/sh/smp.h: New file.
5595 * init.c: Define __is_smp.
5596 (__pthread_initialize_minimal_internal): Call is_smp_system to
5597 initialize __is_smp.
5598 * pthreadP.h: Declare __is_smp.
5599 Define MAX_ADAPTIVE_COUNT is necessary.
5600 * pthread_mutex_init.c: Add comment regarding __spins field.
5601 * pthread_mutex_lock.c: Implement adaptive mutex type.
5602 * pthread_mutex_timedlock.c: Likewise.
5603 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
5604 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
5606 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
5607 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5608 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5609 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
5610 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5611 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5612 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5613 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define
5614 lll_mutex_cond_trylock.
5615 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5616 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
5617 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5618 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5619 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
5620 Define BUSY_WAIT_NOP.
5621 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5622 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5624 * tst-mutex5.c: Add support for testing adaptive mutexes.
5625 * tst-mutex7.c: Likewise.
5626 * tst-mutex5a.c: New file.
5627 * tst-mutex7a.c: New file.
5628 * Makefile (tests): Add tst-mutex5a and tst-mutex7a.
5630 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
5631 (__lll_mutex_timedlock_wait): Preserve r8 and r9 since the
5632 vgettimeofday call might destroy the content.
5634 * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use hint
5637 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
5638 No need to restrict type of ret. Make it int. Add comment.
5640 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
5641 Remove unnecessary setne instruction.
5643 2004-03-22 Jakub Jelinek <jakub@redhat.com>
5645 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
5646 (__pthread_getaffinity_new): Use INT_MAX instead of UINT_MAX.
5647 * pthread_getattr_np.c (pthread_getattr_np): Double size every cycle.
5648 If realloc fails, break out of the loop.
5650 2004-03-20 Andreas Jaeger <aj@suse.de>
5652 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
5653 (__pthread_setaffinity_old): Fix interface.
5654 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
5655 (__pthread_getaffinity_old): Likewise.
5657 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
5658 (__pthread_setaffinity_new): Remove duplicate declaration.
5660 2004-03-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5662 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Save
5663 the return value to a safe register.
5664 (CDISABLE): Set the function argument correctly.
5666 2004-03-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5668 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XCHG): Define.
5669 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
5670 Rewrite so that only one locked memory operation per round is needed.
5671 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
5672 (pthread_barrier_wait): After wakeup, release lock only when the
5673 last thread stopped using the barrier object.
5674 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
5675 (__pthread_cond_wait): Don't store mutex address if the current
5676 value is ~0l. Add correct cleanup support and unwind info.
5677 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
5678 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
5679 (__pthread_cond_broadcast): Don't use requeue for pshared condvars.
5680 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Update comment.
5681 * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
5682 Add correct cleanup support and unwind info.
5683 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
5684 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Add unwind
5685 information for syscall wrappers.
5687 2004-03-18 Ulrich Drepper <drepper@redhat.com>
5689 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
5690 cpusetsize field, remove next.
5691 * sysdeps/pthread/pthread.h (pthread_getaffinity_np): Add new second
5692 parameter for size of the CPU set.
5693 (pthread_setaffinity_np): Likewise.
5694 (pthread_attr_getaffinity_np): Likewise.
5695 (pthread_attr_setaffinity_np): Likewise.
5696 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: Implement
5697 interface change, keep compatibility code.
5698 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
5699 * sysdeps/unix/sysv/linux/pthread_getaffinity.c: Likewise.
5700 * sysdeps/unix/sysv/linux/pthread_setaffinity.c: Likewise.
5701 * pthreadP.h: Remove hidden_proto for pthread_getaffinity_np. Declare
5702 __pthread_getaffinity_np.
5703 * Versions: Add version for changed interfaces.
5704 * tst-attr3.c: Adjust test for interface change.
5705 * pthread_getattr_np.c: Query the kernel about the affinity mask with
5706 increasing buffer sizes.
5707 * pthread_attr_destroy.c: Remove unused list handling.
5708 * pthread_attr_init.c: Likewise.
5710 2004-03-17 Roland McGrath <roland@redhat.com>
5712 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Pass missing
5713 first argument to clock_getres so we ever enable kernel timers.
5715 2004-03-15 Ulrich Weigand <uweigand@de.ibm.com>
5717 * init.c (nptl_version): Add __attribute_used__ to nptl_version.
5719 2004-03-12 Richard Henderson <rth@redhat.com>
5721 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Propagate
5722 oldvalue from CENABLE to CDISABLE.
5724 2004-03-12 Ulrich Drepper <drepper@redhat.com>
5726 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define HOST_NAME_MAX.
5727 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
5728 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
5729 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
5731 2004-03-11 Richard Henderson <rth@redhat.com>
5733 * sysdeps/alpha/tcb-offsets.sym (PID_OFFSET): New.
5734 * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: Save/restore PID.
5735 * sysdeps/unix/sysv/linux/alpha/vfork.S: New file.
5737 2004-03-11 Jakub Jelinek <jakub@redhat.com>
5739 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Use jgnl
5740 instead of jnl instruction to jump to SYSCALL_ERROR_LABEL.
5741 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S (__vfork): Likewise.
5743 2004-03-11 Jakub Jelinek <jakub@redhat.com>
5745 * forward.c (__pthread_cond_broadcast_2_0,
5746 __pthread_cond_destroy_2_0, __pthread_cond_init_2_0,
5747 __pthread_cond_signal_2_0, __pthread_cond_wait_2_0,
5748 __pthread_cond_timedwait_2_0): Use return 0 as defaction instead of 0.
5750 2004-03-11 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5752 * sysdeps/sh/tcb-offsets.sym: Add PID.
5753 * sysdeps/unix/sysv/linux/sh/pt-vfork.S: Properly handle PID cache.
5754 * sysdeps/unix/sysv/linux/sh/vfork.S: New file.
5756 2004-03-10 Ulrich Drepper <drepper@redhat.com>
5758 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: No need to
5759 include <sysdep-cancel.h>, vfork is no cancellation point.
5760 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: Likewise.
5761 * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: Likewise.
5762 * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: Likewise.
5764 2004-03-10 Jakub Jelinek <jakub@redhat.com>
5766 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Add
5768 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
5769 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
5771 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S (__vfork):
5773 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
5774 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
5775 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Include tcb-offsets.h.
5776 * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Use DO_CALL instead
5777 of DO_CALL_VIA_BREAK. Work around a gas problem.
5779 * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: Remove.
5780 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: New file.
5781 * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: New file.
5782 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: New file.
5783 * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: New file.
5784 * sysdeps/powerpc/tcb-offsets.sym: Add PID.
5786 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S (__vfork): Don't use
5787 a local register for saving old PID. Negate PID in parent upon exit.
5789 * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: Include
5791 (__vfork): Negate PID if non-zero and set to INT_MIN if zero
5792 before syscall, set to the old value in the parent afterwards.
5793 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: New file.
5794 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: Include
5796 (__vfork): Negate PID if non-zero and set to INT_MIN if zero
5797 before syscall, set to the old value in the parent afterwards.
5798 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: New file.
5799 * sysdeps/s390/tcb-offsets.sym: Add PID.
5801 * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: Remove.
5802 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: New file.
5803 * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S: New file.
5804 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: New file.
5805 * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: New file.
5806 * sysdeps/sparc/tcb-offsets.sym: Add PID.
5808 2004-03-10 Andreas Schwab <schwab@suse.de>
5810 * sysdeps/ia64/tcb-offsets.sym: Add PID.
5811 * sysdeps/unix/sysv/linux/ia64/vfork.S: New file.
5812 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Properly handle PID cache.
5814 2004-03-09 Jakub Jelinek <jakub@redhat.com>
5816 * tst-cancel20.c (do_one_test): Clear in_sh_body first.
5817 * tst-cancel21.c (do_one_test): Likewise.
5818 Reported by Gordon Jin <gordon.jin@intel.com>.
5820 2004-02-09 Jakub Jelinek <jakub@redhat.com>
5822 * sysdeps/unix/sysv/linux/i386/vfork.S (SAVE_PID): Negate PID
5823 if non-zero and set to INT_MIN if zero.
5824 * sysdeps/unix/sysv/linux/x86_64/vfork.S (SAVE_PID): Likewise.
5825 * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Include tcb-offsets.h.
5826 (SAVE_PID, RESTORE_PID): Define.
5828 * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: Include tcb-offsets.h.
5829 Use relative path to avoid including NPTL i386/vfork.S.
5830 (SAVE_PID, RESTORE_PID): Define.
5831 * sysdeps/unix/sysv/linux/raise.c: Include limits.h.
5832 (raise): Handle THREAD_SELF->pid INT_MIN the same as 0.
5833 * Makefile (tests): Add tst-vfork1, tst-vfork2, tst-vfork1x and
5835 (tests-reverse): Add tst-vfork1x and tst-vfork2x.
5836 * tst-vfork1.c: New test.
5837 * tst-vfork2.c: New test.
5838 * tst-vfork1x.c: New test.
5839 * tst-vfork2x.c: New test.
5841 2004-03-08 Ulrich Drepper <drepper@redhat.com>
5843 * sysdeps/i386/tcb-offsets.sym: Add PID.
5844 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
5845 * sysdeps/unix/sysv/linux/i386/vfork.S: New file.
5846 * sysdeps/unix/sysv/linux/x86_64/vfork.S: New file.
5848 2004-03-08 Steven Munroe <sjmunroe@us.ibm.com>
5850 * sysdeps/unix/sysv/linux/powerpc/Versions: Remove leading tabs.
5852 2004-03-08 H.J. Lu <hongjiu.lu@intel.com>
5854 * sysdeps/s390/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
5857 2004-03-07 Ulrich Drepper <drepper@redhat.com>
5859 * sysdeps/ia64/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
5862 * tst-once4.c: Remove unnecessary macro definition.
5864 * tst-mutex7.c (do_test): Limit thread stack size.
5865 * tst-once2.c (do_test): Likewise.
5866 * tst-tls3.c (do_test): Likewise.
5867 * tst-tls1.c (do_test): Likewise.
5868 * tst-signal3.c (do_test): Likewise.
5869 * tst-kill6.c (do_test): Likewise.
5870 * tst-key4.c (do_test): Likewise.
5871 * tst-join4.c (do_test): Likewise.
5872 * tst-fork1.c (do_test): Likewise.
5873 * tst-context1.c (do_test): Likewise.
5874 * tst-cond2.c (do_test): Likewise.
5875 * tst-cond10.c (do_test): Likewise.
5876 * tst-clock2.c (do_test): Likewise.
5877 * tst-cancel10.c (do_test): Likewise.
5878 * tst-basic2.c (do_test): Likewise.
5879 * tst-barrier4.c (do_test): Likewise.
5881 2004-03-05 Ulrich Drepper <drepper@redhat.com>
5883 * sysdeps/i386/tls.h: Use GLRO instead of GL where appropriate.
5885 2004-03-01 Ulrich Drepper <drepper@redhat.com>
5887 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5888 (__pthread_cond_timedwait): Optimize wakeup test.
5889 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
5890 (__pthread_cond_wait): Likewise.
5891 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
5892 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
5895 2004-02-29 Ulrich Drepper <drepper@redhat.com>
5897 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
5898 (__lll_mutex_lock_wait): Optimize a bit more. Just one copy of
5899 the atomic instruction needed.
5900 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
5901 (__lll_mutex_lock_wait): Likewise.
5903 2004-02-28 Ulrich Drepper <drepper@redhat.com>
5905 * Makefile (tests): Add tst-cond14 and tst-cond15.
5906 * tst-cond14.c: New file.
5907 * tst-cond15.c: New file.
5909 2004-02-27 Ulrich Drepper <drepper@redhat.com>
5911 * sysdeps/pthread/createthread.c (create_thread): Remove use of
5912 CLONE_STOPPED. We cannot use SIGCONT which means CLONE_STOPPED
5913 needs to be implemented differently to be useful.
5915 2004-02-26 Ulrich Drepper <drepper@redhat.com>
5917 * pthread_attr_setschedparam.c: Don't test priority against limits
5918 here. Set ATTR_FLAG_SCHED_SET flag.
5919 * pthread_attr_setschedpolicy.c: Set ATTR_FLAG_POLICY_SET flag.
5920 * pthread_create.c (__pthread_create_2_1): Copy scheduling attributes
5921 from parent thread to child. If attribute is used and scheduling
5922 parameters are not inherited, copy parameters from attribute or
5923 compute them. Check priority value.
5924 * pthread_getschedparam.c: If the parameters aren't known yet get
5925 them from the kernel.
5926 * pthread_setschedparam.c: Set ATTR_FLAG_SCHED_SET and
5927 ATTR_FLAG_POLICY_SET flag for thread.
5928 * sysdeps/unix/sysv/linux/internaltypes.h: Define ATTR_FLAG_SCHED_SET
5929 and ATTR_FLAG_POLICY_SET.
5931 * sysdeps/pthread/createthread.c: Use tgkill if possible.
5933 * pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr): Don't
5934 fail if stack address hasn't been set. Just return 0.
5936 2004-02-25 Ulrich Drepper <drepper@redhat.com>
5938 * Makefile (tests-nolibpthread): Add tst-unload. Don't link with
5939 libpthread for the files in this list.
5940 (CFLAGS-tst-unload): Removed.
5941 * tst-unload.c (do_test): Don't use complete path for
5944 * Makefile: Define sonames for tst-tls5mod, tst-_res1mod1, and
5947 2004-02-22 Ulrich Drepper <drepper@redhat.com>
5949 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
5950 (__lll_mutex_lock_wait): Rewrite so that only one locked memory
5951 operation per round is needed.
5952 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
5953 (__lll_mutex_lock_wait): Likewise.
5955 2004-02-20 Ulrich Drepper <drepper@redhat.com>
5957 * tst-cancel9.c (cleanup): Don't print to stderr.
5959 2004-02-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5961 * sysdeps/sh/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Fix variable name.
5963 2004-02-20 Jakub Jelinek <jakub@redhat.com>
5965 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
5966 (__syscall_error_handler2): Call CDISABLE.
5967 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
5968 (__syscall_error_handler2): Call CDISABLE.
5970 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
5971 Release lock before the loop, don't reacquire it.
5973 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h (DL_ARGV_NOT_RELRO): Define.
5975 2004-02-19 Andreas Schwab <schwab@suse.de>
5977 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
5980 2004-02-18 Ulrich Drepper <drepper@redhat.com>
5982 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
5983 (pthread_barrier_wait): After wakeup, release lock only when the
5984 last thread stopped using the barrier object.
5985 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S
5986 (pthread_barrier_wait): Likewise.
5987 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
5989 * Makefile (tests): Add tst-barrier4.
5990 * tst-barrier4.c: New file.
5992 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5993 (__pthread_cond_timedwait): Perform timeout test while holding
5994 internal lock to prevent wakeup race.
5995 Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
5996 * sysdeps/pthread/pthread_cond_timedwait.c
5997 (__pthread_cond_timedwait): Likewise.
5998 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
5999 (__pthread_cond_timedwait): Likewise.
6001 2004-02-18 Jakub Jelinek <jakub@redhat.com>
6003 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S
6004 (__pthread_rwlock_unlock): Access WRITER as 32-bit value.
6005 * Makefile (tests): Add tst-rwlock13.
6006 * tst-rwlock13.c: New test.
6008 2004-02-16 Ulrich Drepper <drepper@redhat.com>
6010 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6011 (__condvar_tw_cleanup): Little optimization.
6012 Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
6014 2004-02-16 Steven Munroe <sjmunroe@us.ibm.com>
6016 * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: Replace libc with
6017 libpthread as "lib" parameter to SHLIB_COMPAT.
6018 (__novmx_siglongjmp): Fix typo in function name.
6019 (__novmx_longjmp): Fix typo in function name.
6021 2004-02-13 Ulrich Drepper <drepper@redhat.com>
6023 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Add a
6026 * sysdeps/generic/pt-longjmp.c: Moved to...
6027 * sysdeps/pthread/pt-longjmp.c: ...here. New file.
6029 2004-01-29 Steven Munroe <sjmunroe@us.ibm.com>
6031 * Makefile (libpthread-routines): Add pt-cleanup.
6032 * pt-longjmp.c: Removed.
6033 * pt-cleanup.c: Copied __pthread_cleanup_upto to here. New file.
6034 * sysdeps/generic/pt-longjmp.c: Copied longjmp to here. New file.
6035 * sysdeps/unix/sysv/linux/powerpc/Versions: New file.
6036 Version longjmp, siglongjmp for GLIBC_2.3.4.
6037 * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: New File.
6039 2004-02-13 Ulrich Drepper <drepper@redhat.com>
6041 * sysdeps/pthread/pthread_cond_timedwait.c
6042 (__pthread_cond_timedwait): Optimize. Drop internal lock earlier.
6043 Reuse code. Add __builtin_expects.
6045 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6046 (__pthread_cond_timedwait): Get internal lock in case timeout has
6047 passed before the futex syscall.
6048 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6050 2004-01-20 Ulrich Drepper <drepper@redhat.com>
6052 * allocatestack.c: Pretty printing.
6054 * sysdeps/pthread/createthread.c (create_thread): Don't add
6055 CLONE_DETACHED bit if it is not necessary.
6057 2004-01-16 Ulrich Drepper <drepper@redhat.com>
6059 * pthread_getattr_np.c: Include ldsodefs.h.
6061 2004-01-16 Richard Henderson <rth@redhat.com>
6063 * allocatestack.c: Don't declare __libc_stack_end.
6064 * init.c (__pthread_initialize_minimal_internal): Likewise.
6065 * pthread_getattr_np.c (pthread_getattr_np): Likewise.
6067 2004-01-15 Richard Henderson <rth@redhat.com>
6069 * sysdeps/alpha/tls.h (tcbhead_t): Add private.
6070 (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE,
6071 TLS_PRE_TCB_SIZE, TLS_TCB_ALIGN, INSTALL_DTV, INSTALL_NEW_DTV,
6072 GET_DTV, THREAD_DTV, THREAD_SELF, DB_THREAD_SELF): Match ia64.
6073 (TLS_TCB_OFFSET, THREAD_ID, NO_TLS_OFFSET): Remove.
6074 (THREAD_GETMEM, THREAD_GETMEM_NC): Simplify.
6075 (THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
6076 * sysdeps/unix/sysv/linux/alpha/createthread.c (TLS_VALUE): Match ia64.
6078 2004-01-14 Ulrich Drepper <drepper@redhat.com>
6080 * init.c (pthread_functions): Make array const.
6082 2004-01-13 Ulrich Drepper <drepper@redhat.com>
6084 * allocatestack.c (__make_stacks_executable): Change interface.
6085 Check parameters. Pass parameter on to libc counterpart.
6086 * pthreadP.h: Change declaration.
6088 2004-01-13 Richard Henderson <rth@redhat.com>
6090 * pthread_attr_setstack.c (__old_pthread_attr_setstack): Use
6092 * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize):
6095 * sysdeps/alpha/Makefile: New file.
6096 * sysdeps/alpha/tcb-offsets.sym: New file.
6097 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
6098 Use MULTIPLE_THREADS_OFFSET to implement !libpthread !libc version.
6100 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Rewrite based
6103 2004-01-08 Jakub Jelinek <jakub@redhat.com>
6105 * Makefile (tests): Add tst-backtrace1.
6106 * tst-backtrace1.c: New test.
6108 2003-12-11 Ulrich Weigand <uweigand@de.ibm.com>
6110 * sysdeps/alpha/tls.h (DB_THREAD_SELF): Pass bit size of thread
6111 register as second parameter to the REGISTER macro.
6112 * sysdeps/ia64/tls.h (DB_THREAD_SELF): Likewise.
6113 * sysdeps/powerpc/tls.h (DB_THREAD_SELF): Likewise.
6114 * sysdeps/sh/tls.h (DB_THREAD_SELF): Likewise.
6115 * sysdeps/sparc/tls.h (DB_THREAD_SELF): Likewise.
6116 * sysdeps/s390/tls.h (DB_THREAD_SELF): Pass __WORDSIZE as bit size
6117 of thread register as second parameter to REGISTER macro in 64 case.
6119 2004-01-03 Ulrich Drepper <drepper@redhat.com>
6121 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Removed.
6122 (CFLAGS-getpid.o): Defined.
6123 (CFLAGS-getpid.os): Defined.
6125 2003-12-31 Ulrich Drepper <drepper@redhat.com>
6127 * pthread_getattr_np.c (pthread_getattr_np): Make sure stack info
6128 returned for main thread does not overlap with any other VMA.
6129 Patch by Jakub Jelinek.
6131 2003-12-29 Jakub Jelinek <jakub@redhat.com>
6133 * tst-raise1.c: Include stdio.h.
6135 2003-12-23 Jakub Jelinek <jakub@redhat.com>
6137 * sysdeps/unix/sysv/linux/raise.c (raise): Protect pid = selftid
6138 setting with __ASSUME_TGKILL || defined __NR_tgkill.
6139 If pid is 0, set it to selftid.
6140 * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Make inline.
6141 Don't set self->pid but self->tid. If self->pid == 0 and self->tid
6142 != 0, return self->tid without doing a syscall.
6143 * descr.h (struct pthread): Move pid field after tid.
6145 * Makefile (tests): Add tst-raise1.
6146 * tst-raise1.c: New file.
6148 2003-12-23 Roland McGrath <roland@redhat.com>
6150 * tst-oddstacklimit.c: New file.
6151 * Makefile (tests): Add it.
6152 (tst-oddstacklimit-ENV): New variable.
6154 * init.c (__pthread_initialize_minimal_internal): Round stack rlimit
6155 value up to page size for __default_stacksize.
6157 2003-12-21 Ulrich Drepper <drepper@redhat.com>
6159 * Makefile (tests): Add tst-eintr5.
6160 * tst-eintr5.c: New file.
6162 * eintr.c (eintr_source): Prevent sending signal to self.
6164 * tst-eintr2.c (tf1): Improve error message.
6166 2003-12-20 Ulrich Drepper <drepper@redhat.com>
6168 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Define.
6169 * sysdeps/unix/sysv/linux/getpid.c: New file.
6170 * pthread_cancel.c: Add comment explaining use of PID field.
6171 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
6172 * pthread_getattr_np.c: Use abs() when comparing PID and TID fields.
6173 * sysdeps/unix/sysv/linux/fork.c: Negate PID field of parent
6174 temporarily to signal the field must not be relied on and updated
6176 * sysdeps/unix/sysv/linux/pt-raise.c: Handle case where PID is
6177 temporarily negative.
6178 * sysdeps/unix/sysv/linux/raise.c: Likewise.
6180 2003-12-19 Ulrich Drepper <drepper@redhat.com>
6182 * eintr.c (setup_eintr): Add new parameter. Pass to thread function.
6183 (eintr_source): If ARG != NULL, use pthread_kill.
6184 * tst-eintr1.c: Adjust for this change.
6185 * tst-eintr2.c: Likewise.
6186 * Makefile (tests): Add tst-eintr3 and tst-eintr4.
6187 * tst-eintr3.c: New file.
6188 * tst-eintr4.c: New file.
6190 2003-12-19 Jakub Jelinek <jakub@redhat.com>
6192 * libc-cancellation.c (__libc_enable_asynccancel): Don't cancel
6193 if CANCELSTATE_BITMASK is set.
6194 * sysdeps/pthread/librt-cancellation.c (__librt_enable_asynccancel):
6197 * Makefile (tests): Add tst-cancel22 and tst-cancel23.
6198 (tests-reverse): Add tst-cancel23.
6199 * tst-cancel22.c: New test.
6200 * tst-cancel23.c: New test.
6202 2003-12-18 Ulrich Drepper <drepper@redhat.com>
6204 * tst-eintr1.c: Better error messages.
6206 * Makefile (tests): Add tst-eintr2.
6207 * tst-eintr2.c: New file.
6209 2003-12-18 Jakub Jelinek <jakub@redhat.com>
6211 * Makefile (tests): Add tst-cancel21 and tst-cancelx21.
6212 (CFLAGS-tst-cancelx21.c): Set.
6213 * tst-cancel21.c: New test.
6214 * tst-cancelx21.c: New test.
6216 * unwind.c (FRAME_LEFT): Add adj argument. Subtract it from each
6218 (unwind_stop): Use _JMPBUF_CFA_UNWINDS_ADJ macro instead of
6219 _JMPBUF_CFA_UNWINDS. Adjust FRAME_LEFT invocations.
6220 * pt-longjmp.c: Include jmpbuf-unwind.h.
6221 (__pthread_cleanup_upto): Use _JMPBUF_UNWINDS_ADJ macro instead of
6222 _JMPBUF_UNWINDS. Adjust compared pointers.
6223 * init.c (__pthread_initialize_minimal_internal): Initialize
6224 pd->stackblock_size.
6225 * sysdeps/pthread/jmpbuf-unwind.h: Removed.
6226 * sysdeps/alpha/jmpbuf-unwind.h: New file.
6227 * sysdeps/i386/jmpbuf-unwind.h: New file.
6228 * sysdeps/powerpc/jmpbuf-unwind.h: New file.
6229 * sysdeps/s390/jmpbuf-unwind.h: New file.
6230 * sysdeps/sh/jmpbuf-unwind.h: New file.
6231 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: New file.
6232 * sysdeps/x86_64/jmpbuf-unwind.h: New file.
6233 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Include stdint.h.
6234 (_JMPBUF_CFA_UNWINDS): Remove.
6235 (_JMPBUF_CFA_UNWINDS_ADJ, _JMPBUF_UNWINDS_ADJ): Define.
6237 2003-12-12 Jakub Jelinek <jakub@redhat.com>
6239 * Makefile (tests): Add tst-cancel20 and tst-cancelx20.
6240 (CFLAGS-tst-cancelx20.c): Set.
6241 * tst-cancel20.c: New test.
6242 * tst-cancelx20.c: New test.
6244 2003-12-17 Ulrich Drepper <drepper@redhat.com>
6246 * init.c (__pthread_initialize_minimal_internal): Don't treat
6247 architectures with separate register stack special here when
6248 computing default stack size.
6250 2003-12-17 Roland McGrath <roland@redhat.com>
6252 * Makefile (tst-cancelx7-ARGS): New variable.
6253 Reportd by Greg Schafer <gschafer@zip.com.au>.
6255 2003-12-17 Jakub Jelinek <jakub@redhat.com>
6257 * Makefile (tests): Add tst-stack3. Depend on $(objpfx)tst-stack3-mem.
6258 (generated): Add tst-stack3.mtrace and tst-stack3-mem.
6259 (tst-stack3-ENV): Set.
6260 ($(objpfx)tst-stack3-mem): New.
6261 * tst-stack3.c: New test.
6263 2003-12-10 David Mosberger <davidm@hpl.hp.com>
6265 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init_EPILOG_BEGINS):
6266 Add unwind directives. Drop unused .regstk directive.
6267 (_fini_EPILOG_BEGINS): Add unwind directives.
6269 2003-12-11 Ulrich Drepper <drepper@redhat.com>
6271 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
6272 Assume parameter is a pointer.
6273 (lll_futex_wake): Likewise.
6274 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_wait):
6276 (lll_futex_wake): Likewise.
6277 Reported by Boris Hu.
6278 * sysdeps/unix/sysv/linux/unregister-atfork.c
6279 (__unregister_atfork): Pass pointer to refcntr to lll_futex_wait.
6281 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Simplify a bit.
6283 2003-12-10 Ulrich Drepper <drepper@redhat.com>
6285 * sysdeps/pthread/bits/libc-lock.h (__rtld_lock_initialize): Define.
6286 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Call
6287 __rtld_lock_initialize for ld.so lock.
6288 Patch in part by Adam Li <adam.li@intel.com>.
6290 2003-12-02 David Mosberger <davidm@hpl.hp.com>
6292 * Makefile (link-libc-static): Remove -lgcc_eh---it's already mentioned
6293 in $(gnulib). Also, remove stale comment.
6295 2003-11-12 David Mosberger <davidm@hpl.hp.com>
6297 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Take
6298 advantage of new syscall stub and optimize accordingly.
6300 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__NR_futex): Rename
6301 from SYS_futex, to match expectations of
6302 sysdep.h:DO_INLINE_SYSCALL.
6303 (lll_futex_clobbers): Remove.
6304 (lll_futex_timed_wait): Rewrite in terms of DO_INLINE_SYSCALL.
6305 (lll_futex_wake): Likewise.
6306 (lll_futex_requeue): Likewise.
6307 (__lll_mutex_trylock): Rewrite to a macro, so we can include this
6308 file before DO_INLINE_SYSCALL is defined (proposed by Jakub
6310 (__lll_mutex_lock): Likewise.
6311 (__lll_mutex_cond_lock): Likewise.
6312 (__lll_mutex_timed_lock): Likewise.
6313 (__lll_mutex_unlock): Likewise.
6314 (__lll_mutex_unlock_force): Likewise.
6316 * sysdeps/ia64/tls.h: Move declaration of __thread_self up so it
6317 comes before the include of <sysdep.h>.
6318 (THREAD_SELF_SYSINFO): New macro.
6319 (THREAD_SYSINFO): Likewise.
6320 (INIT_SYSINFO): New macro.
6321 (TLS_INIT_TP): Call INIT_SYSINFO.
6323 * sysdeps/ia64/tcb-offsets.sym: Add SYSINFO_OFFSET.
6325 * sysdeps/pthread/createthread.c (create_thread): Use
6326 THREAD_SELF_SYSINFO and THREAD_SYSINFO instead of open code.
6327 * allocatestack.c (allocate_stack): Use THREAD_SYSINFO and
6328 THREAD_SELF_SYSINFO instead of open code.
6329 * sysdeps/i386/tls.h (THREAD_SELF_SYSINFO): New macro.
6330 (THREAD_SYSINFO): Likewise.
6332 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: New file.
6334 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Work around gas problem.
6336 2003-12-06 Ulrich Drepper <drepper@redhat.com>
6338 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Use .init_array
6339 instead of .init. Patch by David Mosberger.
6341 2003-11-30 Thorsten Kukuk <kukuk@suse.de>
6343 * sysdeps/pthread/configure.in: Remove broken declaration in C
6344 cleanup handling check.
6346 2003-11-30 Andreas Jaeger <aj@suse.de>
6348 * Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time).
6349 * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
6352 2003-11-27 Jakub Jelinek <jakub@redhat.com>
6354 * sysdeps/unix/sysv/linux/internaltypes.h (ATTR_FLAG_OLDATTR): Define.
6355 * pthread_attr_destroy.c: Include shlib-compat.h.
6356 (__pthread_attr_destroy): Return immediately if ATTR_FLAG_OLDATTR
6357 is set in iattr->flags.
6358 * pthread_attr_init.c (__pthread_attr_init_2_0): Set ATTR_FLAG_OLDATTR.
6360 2003-11-21 Jakub Jelinek <jakub@redhat.com>
6362 * Makefile (distribute): Add tst-cleanup4aux.c.
6364 * tst-cond12.c (prepare): Add prototype. Move after test-skeleton.c
6367 2003-11-21 Ulrich Drepper <drepper@redhat.com>
6369 * tst-cond12.c (do_test): If USE_COND_SIGNAL is defined, use
6370 pthread_cond_signal.
6372 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Don't
6373 store mutex address if the current value is ~0l.
6374 * sysdeps/pthread/pthread_cond_timedwait.c
6375 (__pthread_cond_timedwait): Likewise.
6376 * sysdeps/pthread/pthread_cond_broadcast.c
6377 (__pthread_cond_broadcast): Don't use requeue for pshared
6380 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
6381 (__pthread_cond_wait): Don't store mutex address if the current
6383 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
6384 (__pthread_cond_timedwait): Likewise.
6385 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
6386 (__pthread_cond_broadcast): Don't use requeue for pshared
6389 * pthread_cond_init.c (__pthread_cond_init): Initialize __mutex
6390 element with ~0l for pshared condvars, with NULL otherwise.
6392 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
6393 (__pthread_cond_wait): Don't store mutex address if the current
6395 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6396 (__pthread_cond_timedwait): Likewise.
6397 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
6398 (__pthread_cond_broadcast): Don't use requeue for pshared
6401 * Makefile: Add rules to build and run tst-cond12 and tst-cond13.
6402 * tst-cond12.c: New file.
6403 * tst-cond13.c: New file.
6405 2003-11-17 Ulrich Drepper <drepper@redhat.com>
6407 * sysdeps/pthread/configure.in: Make missing forced unwind support
6410 2003-11-11 Ulrich Drepper <drepper@redhat.com>
6412 * pthreadP.h: Don't declare __pthread_unwind as weak inside libpthread.
6414 2003-11-06 Ulrich Drepper <drepper@redhat.com>
6416 * Makefile: Add magic to clean up correctly.
6418 2003-11-05 Jakub Jelinek <jakub@redhat.com>
6420 * unwind.c (FRAME_LEFT): Define.
6421 (unwind_stop): Handle old style cleanups here.
6422 (__pthread_unwind): Handle old style cleanups only if
6423 !HAVE_FORCED_UNWIND.
6424 * Makefile (tests): Add tst-cleanup4 and tst-cleanupx4.
6425 (CFLAGS-tst-cleanupx4.c): Add -fexceptions.
6426 ($(objpfx)tst-cleanup4): Depend on $(objpfx)tst-cleanup4aux.o.
6427 ($(objpfx)tst-cleanupx4): Likewise.
6428 * tst-cleanup4.c: New test.
6429 * tst-cleanup4aux.c: New.
6430 * tst-cleanupx4.c: New test.
6432 2003-11-04 Ulrich Drepper <drepper@redhat.com>
6434 * sysdeps/pthread/bits/stdio-lock.h: Use lll_*lock instead of
6435 lll_mutex_*lock macros to skip atomic operations on some archs.
6437 2003-11-03 Ulrich Drepper <drepper@redhat.com>
6439 * sysdeps/pthread/tst-timer.c (main): Initialize
6440 sigev2.sigev_value as well.
6442 2003-10-15 Roland McGrath <roland@redhat.com>
6444 * sysdeps/pthread/configure.in: Barf if visibility attribute support
6446 * sysdeps/pthread/configure: Regenerated.
6448 2003-10-09 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6450 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Completely revamp the
6451 locking macros. No distinction between normal and mutex locking
6453 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Rewrite mutex locking.
6454 Merge bits from lowlevelmutex.S we still need.
6455 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Remove.
6456 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
6457 * sysdeps/unix/sysv/linux/sh/not-cancel.h: New file.
6458 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Adjust for
6459 new mutex implementation.
6460 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Likewise.
6461 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
6462 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
6463 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
6464 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
6465 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
6466 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
6467 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
6468 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
6469 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO): Also defined
6470 symbol for entry point to avoid cancellation.
6472 2003-10-07 Jakub Jelinek <jakub@redhat.com>
6474 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Backout 2003-10-02
6476 (SAVE_OLDTYPE_0): Fix a typo.
6478 2003-10-03 Ulrich Drepper <drepper@redhat.com>
6480 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
6481 Check __sigsetjmp return value. Reported by Daniel Jacobowitz.
6483 2003-10-02 Ulrich Drepper <drepper@redhat.com>
6485 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (DOCARGS_1): Use
6488 2003-10-02 Jakub Jelinek <jakub@redhat.com>
6490 * Makefile (tests): Add tst-cancel19.
6491 * tst-cancel19.c: New test.
6493 2003-10-02 Ulrich Drepper <drepper@redhat.com>
6495 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix saving and
6496 restoring of the old cancellation type.
6498 2003-09-30 Jakub Jelinek <jakub@redhat.com>
6500 * sysdeps/pthread/malloc-machine.h: Remove misleading comment.
6502 2003-09-27 Wolfram Gloger <wg@malloc.de>
6504 * sysdeps/pthread/malloc-machine.h: New file
6506 2003-09-24 Roland McGrath <roland@redhat.com>
6508 * allocatestack.c (__make_stacks_executable): Don't ignore return
6509 value from _dl_make_stack_executable.
6511 2003-09-24 Ulrich Drepper <drepper@redhat.com>
6513 * allocatestack.c (__make_stacks_executable): Also change
6514 permission of the currently unused stacks.
6516 * allocatestack.c (change_stack_perm): Split out from
6517 __make_stacks_executable.
6518 (allocate_stack): If the required permission changed between the time
6519 we started preparing the stack and queueing it, change the permission.
6520 (__make_stacks_executable): Call change_stack_perm.
6522 * Makefile: Build tst-execstack-mod locally.
6523 * tst-execstack-mod.c: New file.
6525 2003-09-23 Jakub Jelinek <jakub@redhat.com>
6527 * Makefile (tests): Only add tst-execstack if have-z-execstack is yes.
6529 2003-09-23 Roland McGrath <roland@redhat.com>
6531 * tst-execstack.c: New file.
6532 * Makefile (tests): Add it.
6533 ($(objpfx)tst-execstack, $(objpfx)tst-execstack.out): New targets.
6534 (LDFLAGS-tst-execstack): New variable.
6536 * allocatestack.c (allocate_stack): Use GL(dl_stack_flags) to decide
6537 whether to use PROT_EXEC for stack mmap.
6538 (__make_stacks_executable): New function.
6539 * pthreadP.h: Declare it.
6540 * init.c (__pthread_initialize_minimal_internal): Set
6541 GL(dl_make_stack_executable_hook) to that.
6543 2003-09-22 Ulrich Drepper <drepper@redhat.com>
6545 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Adjust for latest
6546 recommendation from AMD re avoidance of lock prefix.
6548 2003-09-22 Jakub Jelinek <jakub@redhat.com>
6550 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait): Use
6551 lll_futex_timed_wait instead of lll_futex_wait.
6552 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Removed.
6553 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Removed.
6554 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: Removed.
6555 * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: Removed.
6556 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Removed.
6557 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Removed.
6558 * sysdeps/unix/sysv/linux/s390/sem_post.c: Removed.
6559 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Removed.
6560 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Include atomic.h.
6561 Completely revamp the locking macros. No distinction between
6562 normal and mutex locking anymore.
6563 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
6564 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock_wait,
6565 __lll_lock_timedwait): Fix prototypes.
6566 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_lock_wait,
6567 __lll_lock_timedwait): Likewise.
6568 (lll_mutex_lock, lll_mutex_cond_lock): Use _val instead of _bool
6569 macros, add __builtin_expect.
6570 (lll_mutex_timedlock): Likewise. Fix return value.
6571 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Removed.
6572 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: Removed.
6573 * sysdeps/unix/sysv/linux/i386/i586/lowlevelmutex.S: Removed.
6574 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: Removed.
6575 * sysdeps/unix/sysv/linux/i386/i686/lowlevelmutex.S: Removed.
6576 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: Removed.
6577 * sysdeps/unix/sysv/linux/lowlevelmutex.c: Removed.
6578 * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: Removed.
6580 2003-09-22 Ulrich Drepper <drepper@redhat.com>
6582 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
6583 (__lll_mutex_lock_wait): Minor optimization to avoid one atomic
6584 operation if possible.
6586 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Don't play tricks
6587 like jumping over the lock prefix.
6589 2003-09-21 Ulrich Drepper <drepper@redhat.com>
6591 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Completely revamp the
6592 locking macros. No distinction between normal and mutex locking
6594 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
6595 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
6596 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
6597 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Rewrite mutex
6598 locking. Merge bits from lowlevelmutex.S we still need.
6599 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
6600 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
6601 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Removed.
6602 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Removed.
6603 * Makefile (routines): Remove libc-lowlevelmutex.
6604 (libpthread-rountines): Remove lowlevelmutex.
6605 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Adjust
6606 for new mutex implementation.
6607 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
6608 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6609 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6610 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
6611 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
6613 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
6615 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
6616 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
6617 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise
6618 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
6619 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6620 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6621 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
6622 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
6624 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
6626 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
6627 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
6628 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
6630 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
6631 * sysdeps/pthread/pthread_cond_signal.c: Don't use requeue.
6633 2003-09-20 Ulrich Drepper <drepper@redhat.com>
6635 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't match memory
6636 in parameters of asm with output parameters.
6638 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Change
6639 type of DECR parameter to int.
6640 * pthreadP.h: Adjust prototype of __pthread_mutex_unlock_usercnt.
6642 2003-09-18 Jakub Jelinek <jakub@redhat.com>
6644 * tst-attr3.c (tf, do_test): Print stack start/end/size and
6645 guardsize for each thread.
6647 2003-09-17 Jakub Jelinek <jakub@redhat.com>
6649 * sysdeps/pthread/pthread.h (pthread_getattr_np): Clarify usage.
6650 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
6651 (pthread_attr_setaffinity_np): Handle cpuset == NULL.
6653 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
6654 (pthread_attr_getaffinity_np): Don't segfault if iattr->cpuset is
6656 * pthread_getattr_np.c: Set cpuset using pthread_getaffinity_np.
6657 * pthreadP.h (pthread_getaffinity_np): Add hidden_proto.
6658 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
6659 (pthread_getaffinity_np): Add hidden_def.
6661 * Makefile (tests): Add tst-attr3.
6662 * tst-attr3.c: New test.
6664 * sysdeps/i386/Makefile (CFLAGS-tst-align.c): Remove.
6666 2003-09-15 Jakub Jelinek <jakub@redhat.com>
6668 * sysdeps/i386/Makefile (CFLAGS-pthread_create.c,
6669 CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
6671 2003-09-17 Jakub Jelinek <jakub@redhat.com>
6673 * Makefile (CFLAGS-tst-align.c): Add $(stack-align-test-flags).
6674 * tst-align.c: Include tst-stack-align.h.
6675 (tf, do_test): Use TEST_STACK_ALIGN macro.
6677 2003-09-17 Ulrich Drepper <drepper@redhat.com>
6679 * pthread_attr_init.c (__pthread_attr_init_2_0): Remove unused
6682 2003-09-16 Ulrich Drepper <drepper@redhat.com>
6684 * pthread_getattr_np.c (pthread_getattr_np): Correctly fill in the
6685 stack-related values for the initial thread.
6687 2003-09-15 Jakub Jelinek <jakub@redhat.com>
6689 * Makefile (CFLAGS-pthread_once.c): Add $(uses-callbacks).
6691 2003-09-11 Ulrich Drepper <drepper@redhat.com>
6693 * pthread_mutex_lock.c: Minor code rearrangements.
6695 2003-09-05 Roland McGrath <roland@redhat.com>
6697 * pthread_create.c (__pthread_pthread_sizeof_descr): Removed.
6698 Instead, include ../nptl_db/db_info.c to do its magic.
6699 * pthread_key_create.c (__pthread_pthread_keys_max): Removed.
6700 (__pthread_pthread_key_2ndlevel_size): Likewise.
6701 * sysdeps/alpha/tls.h (DB_THREAD_SELF): New macro.
6702 * sysdeps/i386/tls.h (DB_THREAD_SELF): New macro.
6703 * sysdeps/ia64/tls.h (DB_THREAD_SELF): New macro.
6704 * sysdeps/powerpc/tls.h (DB_THREAD_SELF): New macro.
6705 * sysdeps/s390/tls.h (DB_THREAD_SELF): New macro.
6706 * sysdeps/sh/tls.h (DB_THREAD_SELF): New macro.
6707 * sysdeps/sparc/tls.h (DB_THREAD_SELF): New macro.
6708 * sysdeps/x86_64/tls.h (DB_THREAD_SELF): New macro.
6709 * sysdeps/alpha/td_ta_map_lwp2thr.c: File removed.
6710 * sysdeps/generic/td_ta_map_lwp2thr.c: File removed.
6711 * sysdeps/i386/td_ta_map_lwp2thr.c: File removed.
6712 * sysdeps/ia64/td_ta_map_lwp2thr.c: File removed.
6713 * sysdeps/powerpc/td_ta_map_lwp2thr.c: File removed.
6714 * sysdeps/s390/td_ta_map_lwp2thr.c: File removed.
6715 * sysdeps/sh/td_ta_map_lwp2thr.c: File removed.
6716 * sysdeps/sparc/td_ta_map_lwp2thr.c: File removed.
6717 * sysdeps/x86_64/td_ta_map_lwp2thr.c: File removed.
6719 2003-09-08 Ulrich Drepper <drepper@redhat.com>
6721 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Change type
6722 of pthread_t to be compatible with LT.
6723 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
6724 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6725 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6726 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6727 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
6728 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6729 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
6731 2003-09-04 Ulrich Drepper <drepper@redhat.com>
6733 * sysdeps/unix/sysv/linux/i386/not-cancel.h (fcntl_not_cancel): Define.
6735 2003-09-04 Jakub Jelinek <jakub@redhat.com>
6737 * unwind-forcedunwind.c: Move to...
6738 * sysdeps/pthread/unwind-forcedunwind.c: ...here.
6739 (pthread_cancel_init): Use ARCH_CANCEL_INIT if defined.
6740 * sysdeps/pthread/jmpbuf-unwind.h: New file.
6741 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: New file.
6742 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: New file.
6743 * unwind.c: Include jmpbuf-unwind.h.
6744 (unwind_stop): Use _JMPBUF_CFA_UNWINDS macro.
6746 2003-09-02 Jakub Jelinek <jakub@redhat.com>
6748 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: New file.
6749 * sysdeps/unix/sysv/linux/ia64/Versions (libpthread): Export
6750 pthread_attr_setstack and pthread_attr_setstacksize @@GLIBC_2.3.3.
6751 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: New file.
6752 * sysdeps/unix/sysv/linux/alpha/Versions: New file.
6753 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: New file.
6754 * sysdeps/unix/sysv/linux/sparc/Versions: New file.
6755 * pthread_attr_setstack.c (__old_pthread_attr_setstack): New function.
6756 (pthread_attr_setstack): If PTHREAD_STACK_MIN != 16384, export
6757 as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.2.
6758 * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize): New
6760 (pthread_attr_setstacksize): If PTHREAD_STACK_MIN != 16384, export
6761 as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.1.
6762 * Makefile (tests): Add tst-stack2.
6763 * tst-stack2.c: New test.
6764 * tst-stack1.c: Include limits.h and sys/param.h.
6765 (do_test): Set size to MAX (4 * getpagesize (), PTHREAD_STACK_MIN).
6767 * pthread_condattr_setpshared.c: Include errno.h.
6768 (pthread_condattr_setpshared): Return EINVAL if pshared
6769 is neither PTHREAD_PROCESS_PRIVATE nor PTHREAD_PROCESS_SHARED.
6771 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Also
6772 defined symbol for entry point to avoid cancellation.
6773 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
6775 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
6777 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
6779 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h (PSEUDO):
6781 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
6783 * sysdeps/unix/sysv/linux/i386/not-cancel.h (__open_nocancel,
6784 __close_nocancel, __read_nocancel, __write_nocancel,
6785 __waitpid_nocancel): Add attribute_hidden. If not in libc.so,
6786 libpthread.so or librt.so, define to corresponding function
6787 without _nocancel suffix.
6788 * sysdeps/unix/sysv/linux/s390/not-cancel.h: New file.
6789 * sysdeps/unix/sysv/linux/powerpc/not-cancel.h: New file.
6790 * sysdeps/unix/sysv/linux/sparc/not-cancel.h: New file.
6792 * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: Fix a typo.
6794 2003-09-02 Ulrich Drepper <drepper@redhat.com>
6796 * sysdeps/unix/sysv/linux/i386/not-cancel.h: New file.
6797 * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: New file.
6799 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Make sure the code
6800 in subsections has a symbol associated with it.
6802 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Also
6803 defined symbol for entry point to avoid cancellation.
6804 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Likewise.
6806 2003-09-01 Jakub Jelinek <jakub@redhat.com>
6808 * Makefile (tests): Add tst-tls5.
6809 (module-names): Add tst-tls5mod{,a,b,c,d,e,f}.
6810 ($(objpfx)tst-tls5mod{,a,b,c,d,e,f}.so-no-z-defs): Set to yes.
6811 ($(objpfx)tst-tls5): New.
6812 ($(objpfx)tst-tls6.out): Likewise.
6813 (tests): Depend on $(objpfx)tst-tls6.out.
6814 * tst-tls3.c: Include stdint.h and pthreaddef.h.
6815 (do_test): Check pthread_self () return value alignment.
6816 * tst-tls3mod.c: Include stdint.h and pthreaddef.h.
6817 (tf): Check pthread_self () return value alignment.
6818 * tst-tls5.c: New test.
6820 * tst-tls5mod.c: New.
6821 * tst-tls5moda.c: New.
6822 * tst-tls5modb.c: New.
6823 * tst-tls5modc.c: New.
6824 * tst-tls5modd.c: New.
6825 * tst-tls5mode.c: New.
6826 * tst-tls5modf.c: New.
6827 * tst-tls6.sh: New test.
6829 * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Add
6830 ptr___pthread_cond_timedwait and ptr___pthread_cond_timedwait_2_0.
6831 * init.c (pthread_functions): Initialize them.
6832 * forward.c (pthread_cond_timedwait@GLIBC_2.0,
6833 pthread_cond_timedwait@@GLIBC_2.3.2): New forwards.
6834 * Versions (libc): Export pthread_cond_timedwait@GLIBC_2.0,
6835 pthread_cond_timedwait@@GLIBC_2.3.2.
6837 2003-09-01 Jakub Jelinek <jakub@redhat.com>
6839 * sysdeps/unix/sysv/linux/alpha/timer_create.c: New file.
6840 * sysdeps/unix/sysv/linux/alpha/timer_delete.c: New file.
6841 * sysdeps/unix/sysv/linux/alpha/timer_getoverr.c: New file.
6842 * sysdeps/unix/sysv/linux/alpha/timer_gettime.c: New file.
6843 * sysdeps/unix/sysv/linux/alpha/timer_settime.c: New file.
6844 * sysdeps/unix/sysv/linux/alpha/Versions: New file.
6846 * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
6848 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Define
6849 _POSIX_THREAD_PRIORITY_SCHEDULING.
6850 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
6852 2003-08-31 Ulrich Drepper <drepper@redhat.com>
6854 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock): Avoid
6855 nested function, use static inline function from libio.h.
6856 Code by Richard Henderson.
6858 * sysdeps/pthread/bits/libc-lock.h: Mark pthread_setcancelstate as
6861 2003-08-30 Jakub Jelinek <jakub@redhat.com>
6863 * sysdeps/unix/sysv/linux/sparc/sparc64/Versions: New file.
6864 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_create.c: New file.
6865 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_delete.c: New file.
6866 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_getoverr.c: New file.
6867 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_gettime.c: New file.
6868 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_settime.c: New file.
6869 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
6870 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
6871 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: New file.
6872 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: New file.
6873 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: New file.
6874 * sysdeps/unix/sysv/linux/sparc/pthread_once.c: New file.
6875 * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: New file.
6876 * sysdeps/unix/sysv/linux/sparc/fork.c: New file.
6877 * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
6878 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: New file.
6879 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: New file.
6880 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: New file.
6881 * sysdeps/sparc/sparc32/pthread_spin_lock.c: New file.
6882 * sysdeps/sparc/sparc32/pthread_spin_trylock.c: New file.
6883 * sysdeps/sparc/sparc32/pthreaddef.h: New file.
6884 * sysdeps/sparc/sparc64/pthread_spin_lock.c: New file.
6885 * sysdeps/sparc/sparc64/pthread_spin_trylock.c: New file.
6886 * sysdeps/sparc/sparc64/pthread_spin_unlock.c: New file.
6887 * sysdeps/sparc/sparc64/pthreaddef.h: New file.
6888 * sysdeps/sparc/tls.h: New file.
6889 * sysdeps/sparc/tcb-offsets.sym: New file.
6890 * sysdeps/sparc/Makefile: New file.
6891 * sysdeps/sparc/td_ta_map_lwp2thr.c: New file.
6892 * init.c [__sparc__] (__NR_set_tid_address): Define.
6894 2003-08-29 Jakub Jelinek <jakub@redhat.com>
6896 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock,
6897 _IO_release_lock): Define.
6899 2003-08-29 Jakub Jelinek <jakuB@redhat.com>
6901 * tst-cancel4.c (tf_sigwait, tf_sigwaitinfo, tf_sigtimedwait): Add
6902 sigemptyset before sigaddset. Reported by jreiser@BitWagon.com.
6904 2003-08-27 Ulrich Drepper <drepper@redhat.com>
6906 * sysdeps/pthread/pthread.h (pthread_exit): Remove __THROW.
6907 (__pthread_cleanup_class): Add missing return types of member
6910 2003-08-26 Steven Munroe <sjmunroe@us.ibm.com>
6912 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
6913 (lll_mutex_unlock_force): Add memory barrier between store and futex
6916 2003-08-25 Ulrich Drepper <drepper@redhat.com>
6918 * tst-cancel4.c (do_test): Also unlink tempfname and remove
6919 tempmsg in first loop.
6921 2003-08-18 Ulrich Drepper <drepper@redhat.com>
6923 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
6924 _POSIX_THREAD_PRIORITY_SCHEDULING.
6925 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
6927 2003-08-07 Jakub Jelinek <jakub@redhat.com>
6929 * sysdeps/pthread/bits/libc-lock.h [_LIBC && SHARED]
6930 (__rtld_lock_default_lock_recursive,
6931 __rtld_lock_default_unlock_recursive): Define.
6932 [_LIBC && SHARED] (__rtld_lock_lock_recursive,
6933 __rtld_lock_unlock_recursive): Define using
6934 GL(_dl_rtld_*lock_recursive).
6935 * init.c (__pthread_initialize_minimal_internal): Initialize
6936 _dl_rtld_lock_recursive and _dl_rtld_unlock_recursive.
6937 Lock GL(_dl_load_lock) the same number of times as
6938 GL(_dl_load_lock) using non-mt implementation was nested.
6940 * pthreadP.h (__pthread_cleanup_upto): Add hidden_proto.
6941 * pt-longjmp.c (__pthread_cleanup_upto): Add hidden_def.
6943 2003-08-06 Jakub Jelinek <jakub@redhat.com>
6945 * tst-cancel17.c (do_test): Make len2 maximum of page size and
6948 2003-08-07 Jakub Jelinek <jakub@redhat.com>
6950 * pthread_create.c (__pthread_create_2_0): Clear new_attr.cpuset.
6952 2003-08-03 Jakub Jelinek <jakub@redhat.com>
6954 * sysdeps/pthread/createthread.c (do_clone): Move error handling
6955 to first syscall error check. Move syscall error check for tkill
6956 into __ASSUME_CLONE_STOPPED #ifdef.
6958 2003-08-02 Ulrich Drepper <drepper@redhat.com>
6960 * sysdeps/pthread/createthread.c (do_clone): If __ASSUME_CLONE_STOPPED
6961 is not defined, do explicit synchronization.
6962 (create_thread): Do not lock pd->lock here. If __ASSUME_CLONE_STOPPED
6963 is not defined also unlock pd->lock for non-debugging case in case
6965 * pthread_create.c (start_thread): Always get and release pd->lock
6966 if __ASSUME_CLONE_STOPPED is not defined.
6967 (start_thread_debug): Removed. Adjust users.
6968 * allocatestack.c (allocate_stack): Always initialize lock if
6969 __ASSUME_CLONE_STOPPED is not defined.
6970 * Makefile (tests): Add tst-sched1.
6971 * tst-sched1.c: New file.
6973 * sysdeps/pthread/createthread.c (do_clone): Only use
6974 sched_setschduler and pass correct parameters.
6976 2003-07-31 Jakub Jelinek <jakub@redhat.com>
6978 * sysdeps/pthread/pthread.h (pthread_attr_setstackaddr,
6979 pthread_attr_setstacksize): Change PTHREAD_STACK_SIZE to
6980 PTHREAD_STACK_MIN in comments.
6982 2003-07-31 Jakub Jelinek <jakub@redhat.com>
6984 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
6985 Shut up warnings if INTERNAL_SYSCALL_ERROR_P does not use its first
6987 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Likewise.
6988 * pthread_condattr_setclock.c (pthread_condattr_setclock): Likewise.
6989 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Include pthreaddef.h.
6990 (__pthread_cleanup_upto): Fix prototype.
6991 (_longjmp_unwind): Adjust caller.
6992 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_timedlock):
6993 Change second argument to const struct pointer.
6994 * tst-sem8.c (main): Remove unused s2 and s3 variables.
6995 * tst-sem9.c (main): Likewise.
6996 * unwind.c: Include string.h for strlen prototype.
6998 2003-07-31 Ulrich Drepper <drepper@redhat.com>
7000 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7001 (__pthread_cond_timedwait): Don't use cmov unless HAVE_CMOV is defined.
7002 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S:
7004 Patch by Nicholas Miell <nmiell@attbi.com>.
7006 2003-07-30 Jakub Jelinek <jakub@redhat.com>
7008 * init.c (__pthread_initialize_minimal_internal): Initialize
7009 GL(dl_init_static_tls).
7010 * pthreadP.h (__pthread_init_static_tls): New prototype.
7011 * allocatestack.c (init_one_static_tls, __pthread_init_static_tls):
7013 * Makefile (tests): Add tst-tls4.
7014 (modules-names): Add tst-tls4moda and tst-tls4modb.
7015 ($(objpfx)tst-tls4): Link against libdl and libpthread.
7016 ($(objpfx)tst-tls4.out): Depend on tst-tls4moda.so and
7018 * tst-tls4.c: New file.
7019 * tst-tls4moda.c: New file.
7020 * tst-tls4modb.c: New file.
7022 2003-06-19 Daniel Jacobowitz <drow@mvista.com>
7024 * sysdeps/pthread/timer_create.c (timer_create): Call timer_delref
7025 before __timer_dealloc.
7026 * sysdeps/pthread/timer_routines.c (__timer_thread_find_matching):
7027 Don't call list_unlink.
7029 2003-07-29 Roland McGrath <roland@redhat.com>
7031 * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
7033 2003-07-25 Jakub Jelinek <jakub@redhat.com>
7035 * tst-cancel17.c (do_test): Check if aio_cancel failed.
7036 Don't reuse struct aiocb A if it failed.
7037 Write fpathconf (fds[1], _PC_PIPE_BUF) + 2 bytes using aio_write,
7038 not just one byte, as that does not block.
7040 2003-07-22 Jakub Jelinek <jakub@redhat.com>
7042 * sysdeps/pthread/unwind-resume.c: New file.
7043 * sysdeps/pthread/Makefile (routines, shared-only-routines): Add
7044 unwind-resume in csu subdir.
7045 (CFLAGS-unwind-resume.c, CFLAGS-rt-unwind-resume.c): Compile with
7047 (librt-sysdep_routines, librt-shared-only-routines): Add
7049 * sysdeps/pthread/rt-unwind-resume.c: New file.
7050 * unwind-forcedunwind.c: New file.
7051 * Makefile (libpthread-routines): Add unwind-forcedunwind.
7052 (libpthread-shared-only-routines): Likewise.
7053 (CFLAGS-unwind-forcedunwind.c): Compile with exceptions.
7054 * pthreadP.h (pthread_cancel_init): New prototype.
7055 * pthread_cancel.c (pthread_cancel): Call pthread_cancel_init.
7057 * sysdeps/pthread/createthread.c (do_thread, create_thread): Make
7058 attr argument const struct pthread_attr *.
7060 * res.c (__res_state): Return __resp.
7061 * descr.h: Include resolv.h.
7062 (struct pthread): Add res field.
7063 * pthread_create.c: Include resolv.h.
7064 (start_thread): Initialize __resp.
7065 * Makefile (tests): Add tst-_res1.
7066 (module-names): Add tst-_res1mod1, tst-_res1mod2.
7067 ($(objpfx)tst-_res1mod2.so): Depend on $(objpfx)tst-_res1mod1.so.
7068 ($(objpfx)tst-_res1): Depend on $(objpfx)tst-_res1mod2.so and
7070 * tst-_res1.c: New file.
7071 * tst-_res1mod1.c: New file.
7072 * tst-_res1mod2.c: New file.
7074 2003-07-21 Ulrich Drepper <drepper@redhat.com>
7076 * sysdeps/pthread/createthread.c: Don't define CLONE_STOPPED.
7078 * Makefile: Define various *-no-z-defs variables for test DSOs
7079 which has undefined symbols.
7081 2003-07-21 Steven Munroe <sjmunroe@us.ibm.com>
7083 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
7084 Retry if the stwcx fails to store once_control.
7086 2003-07-20 Ulrich Drepper <drepper@redhat.com>
7088 * Makefile (libpthread-routines): Add pthread_attr_getaffinity and
7089 pthread_attr_setaffinity.
7090 * Versions [libpthread] (GLIBC_2.3.3): Likewise.
7091 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: New file.
7092 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: New file.
7093 * pthread_attr_destroy.c: Free cpuset element if allocated.
7094 * pthread_create.c: Pass iattr as additional parameter to
7096 * sysdeps/pthread/createthread.c: If attribute is provided and
7097 a new thread is created with affinity set or scheduling parameters,
7098 start thread with CLONE_STOPPED.
7099 * sysdeps/pthread/pthread.h: Declare pthread_attr_getaffinity and
7100 pthread_attr_setaffinity.
7101 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
7104 2003-07-15 Ulrich Drepper <drepper@redhat.com>
7106 * tst-tcancel-wrappers.sh: lseek and llseek are not cancelation points.
7108 2003-07-14 Ulrich Drepper <drepper@redhat.com>
7110 * sysdeps/pthread/configure.in: Require CFI directives also for
7113 2003-07-15 Jakub Jelinek <jakub@redhat.com>
7115 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
7118 2003-07-12 Kaz Kojima <kkojima@rr.iij4u.or.jp>
7120 * sysdeps/sh/tcb-offsets.sym: Add RESULT, TID, CANCELHANDLING and
7122 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use more
7123 registers as variables. Call __pthread_mutex_unlock_usercnt.
7124 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7125 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Store TID
7126 not self pointer in __writer. Compare with TID to determine
7128 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7129 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
7131 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
7133 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add cancellation support.
7134 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
7135 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Define all the nice
7136 macros also when compiling librt.
7138 2003-07-11 Jakub Jelinek <jakub@redhat.com>
7140 * Makefile (CFLAGS-pthread_once.c): Add -fexceptions
7141 -fasynchronous-unwind-tables.
7142 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
7143 (PSEUDO): Add cfi directives.
7144 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO):
7146 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
7149 2003-07-08 Jakub Jelinek <jakub@redhat.com>
7151 * pthreadP.h (__pthread_unwind_next, __pthread_register_cancel,
7152 __pthread_unregister_cancel): Add prototypes and hidden_proto.
7153 * unwind.c (__pthread_unwind_next): Add hidden_def.
7154 * cleanup.c (__pthread_register_cancel, __pthread_unregister_cancel):
7156 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
7157 Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
7158 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
7160 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
7161 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
7163 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once): Use
7164 HIDDEN_JUMPTARGET to call __pthread_register_cancel,
7165 __pthread_unregister_cancel and __pthread_unwind_next.
7167 2003-07-04 Jakub Jelinek <jakub@redhat.com>
7169 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Use
7170 different symbol for the cancellation syscall wrapper and
7171 non-cancellation syscall wrapper.
7172 (PSEUDO_END): Define.
7174 2003-07-05 Richard Henderson <rth@redhat.com>
7176 * sysdeps/alpha/elf/pt-initfini.c: Avoid .ent/.end.
7177 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_wait,
7178 lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
7179 return actual return value from the syscall, not 0.
7181 2003-07-07 Ulrich Drepper <drepper@redhat.com>
7183 * descr.h (struct pthread): Add pid field.
7184 * allocatestack.c (allocate_stack): Initialize pid field in descriptor.
7185 (__reclaim_stacks): Likewise.
7186 * init.c (sigcancel_handler): If __ASSUME_CORRECT_SI_PID is defined
7187 also check for PID of the signal source.
7188 (__pthread_initialize_minimal_internal): Also initialize pid field
7189 of initial thread's descriptor.
7190 * pthread_cancel.c: Use tgkill instead of tkill if possible.
7191 * sysdeps/unix/sysv/linux/fork.c: Likewise.
7192 * sysdeps/unix/sysv/linux/pt-raise.c: Likewise.
7193 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
7194 * sysdeps/unix/sysv/linux/raise.c: Likewise.
7196 2003-07-05 Ulrich Drepper <drepper@redhat.com>
7198 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_push): Renamed.
7199 Fix use of parameter.
7200 (__libc_cleanup_pop): Likewise.
7202 2003-07-04 Ulrich Drepper <drepper@redhat.com>
7204 * init.c (sigcancel_handler): Change parameters to match handler
7205 for SA_SIGACTION. Check signal number and code to recognize
7206 invalid invocations.
7208 2003-07-03 Roland McGrath <roland@redhat.com>
7210 * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr):
7211 Apply sizeof (struct pthread) bias to r13 value.
7213 2003-07-03 Ulrich Drepper <drepper@redhat.com>
7215 * sysdeps/pthread/configure.in: Require CFI directives.
7217 * sysdeps/pthread/librt-cancellation.c (__pthread_unwind): Remove
7219 * pthreadP.h (__pthread_unwind): Add hidden_proto if used in
7220 libpthread compilation.
7221 * unwind.c (__pthread_unwind): Add hidden_def.
7222 * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_unwind.
7224 2003-07-01 Ulrich Drepper <drepper@redhat.com>
7226 * libc-cancellation.c (__libc_cleanup_routine): Define.
7227 * sysdeps/pthread/bits/libc-lock.h (__pthread_cleanup_push): Define.
7228 (__pthread_cleanup_pop): Define.
7230 2003-07-01 Richard Henderson <rth@redhat.com>
7232 * sysdeps/alpha/elf/pt-initfini.c: New file.
7233 * sysdeps/alpha/pthread_spin_lock.S: New file.
7234 * sysdeps/alpha/pthread_spin_trylock.S: New file.
7235 * sysdeps/alpha/pthreaddef.h: New file.
7236 * sysdeps/alpha/td_ta_map_lwp2thr.c: New file.
7237 * sysdeps/alpha/tls.h: New file.
7238 * sysdeps/unix/sysv/linux/alpha/Makefile: New file.
7239 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: New file.
7240 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: New file.
7241 * sysdeps/unix/sysv/linux/alpha/createthread.c: New file.
7242 * sysdeps/unix/sysv/linux/alpha/fork.c: New file.
7243 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: New file.
7244 * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: New file.
7245 * sysdeps/unix/sysv/linux/alpha/pthread_once.c: New file.
7246 * sysdeps/unix/sysv/linux/alpha/sem_post.c: New file.
7247 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
7249 2003-07-01 Ulrich Drepper <drepper@redhat.com>
7251 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Add correct
7252 cleanup support and unwind info.
7254 2003-06-30 Ulrich Drepper <drepper@redhat.com>
7256 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
7257 Use correct cleanup handler registration. Add unwind info.
7258 * sysdeps/unix/sysv/linux/unwindbuf.sym: New file.
7259 * sysdeps/unix/sysv/linux/Makefile: Add rule to build unwindbuf.h.
7260 * tst-once3.c: Add cleanup handler and check it is called.
7261 * tst-once4.c: Likewise.
7262 * tst-oncex3.c: New file.
7263 * tst-oncex4.c: New file.
7264 * Makefile: Add rules to build and run tst-oncex3 and tst-oncex4.
7266 2003-06-29 Ulrich Drepper <drepper@redhat.com>
7268 * sysdeps/pthread/configure.in: Check for C cleanup handling in gcc.
7270 2003-06-27 Ulrich Drepper <drepper@redhat.com>
7272 * tst-cancel4.c (tf_msgrcv): Use IPC_PRIVATE in msgget call.
7273 (tf_msgsnd): Likewise.
7275 * tst-cancel4.c (tf_msgrcv): Strengthen test against valid
7276 premature returns a bit more.
7278 2003-06-26 Ulrich Drepper <drepper@redhat.com>
7280 * sysdeps/pthread/librt-cancellation.c: Move __pthread_unwind
7281 definition to the front.
7283 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rename
7284 the cleanup functions to make the names unique. Fix dwarf opcode
7286 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Rename cleanup
7287 functions to make the names unique. Fix CFA offset for two blocks.
7289 2003-06-25 Ulrich Drepper <drepper@redhat.com>
7291 * sysdeps/pthread/pthread.h (class __pthread_cleanup_class): Add
7292 missing closing braces.
7293 Patch by Christophe Saout <christophe@saout.de>.
7295 2003-06-24 Roland McGrath <roland@redhat.com>
7297 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Typo fix.
7299 2003-06-24 Ulrich Drepper <drepper@redhat.com>
7301 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: New file.
7302 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: New file.
7304 * pthreadP.h: Declare __find_thread_by_id.
7305 * allocatestack.c [HP_TIMING_AVAIL]: Define __find_thread_by_id.
7306 * pthread_clock_gettime.c: Allow using other thread's clock.
7307 * pthread_clock_settime.c: Likewise.
7308 * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
7309 * Makefile: Add rules to build and run tst-clock2.
7310 * tst-clock2.c: New file.
7312 2003-06-23 Ulrich Drepper <drepper@redhat.com>
7314 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rewrite
7315 to use exception-based cleanup handler.
7316 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7318 * tst-cond8.c (ch): Announce that we are done.
7320 * pthreadP.h (__pthread_mutex_cond_lock): Mark with internal_function.
7322 * tst-cancel17.c (tf): Retry aio_suspend in case of EINTR.
7323 Also test aio_suspend with timeout value.
7325 2003-06-22 Ulrich Drepper <drepper@redhat.com>
7327 * pthreadP.h: Mark __pthread_mutex_unlock_usercnt also hidden.
7328 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Add
7331 * pthreadP.h (__pthread_mutex_init_internal): Mark hidden.
7332 (__pthread_mutex_lock_internal): Likewise.
7333 (__pthread_mutex_unlock_internal): Likewise.
7334 (__pthread_mutex_unlock_usercnt): Declare.
7335 * pthread_mutex_destroy.c: Always fail if used in any way.
7336 * pthread_mutex_init.c: Update comment.
7337 * pthread_mutex_lock.c: If NO_INCR is not defined adjust __nusers.
7338 * pthread_mutex_timedlock.c: Adjust __nusers.
7339 * pthread_mutex_trylock.c: Adjust __nusers.
7340 * pthread_mutex_unlock.c: Old code is in __pthread_mutex_unlock_usercnt
7341 and public interfaces are wrapper with pass additional parameter.
7342 __pthread_mutex_unlock_usercnt does not adjust __nusers if second
7344 * tst-mutex8.c: New file.
7345 * Makefile (tests): Add tst-mutex8.
7346 * sysdeps/pthread/pthread_cond_timedwait.c: Call
7347 __pthread_mutex_unlock_usercnt.
7348 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
7349 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7350 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7351 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7352 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7353 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Define NO_INCR.
7354 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
7356 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7357 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7358 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7359 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
7360 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
7362 * pthread_mutex_lock.c: Don't store THREAD_ID in __owner, use TID.
7363 * pthread_mutex_timedlock.c: Likewise.
7364 * pthread_mutex_trylock.c: Adjust __nusers.
7365 * pthread_mutex_unlock.c: Compare with TID not THREAD_ID.
7366 * tst-mutex9.c: New file.
7367 * Makefile (tests): Add tst-mutex9.
7368 * sysdeps/i386/tls.h: Remove THREAD_ID definition.
7369 * sysdeps/ia64/tls.h: Likewise.
7370 * sysdeps/powerpc/tls.h: Likewise.
7371 * sysdeps/s390/tls.h: Likewise.
7372 * sysdeps/sh/tls.h: Likewise.
7373 * sysdeps/x86_64/tls.h: Likewise.
7374 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
7375 Change type of __owner.
7376 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7377 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7378 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7379 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
7380 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
7382 2003-06-19 Jakub Jelinek <jakub@redhat.com>
7384 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Move to...
7385 * sysdeps/unix/sysv/linux/sem_post.c: ...here.
7387 * sysdeps/unix/sysv/linux/sem_post.c: Move to...
7388 * sysdeps/unix/sysv/linux/powerpc/sem_post.c: ... here. Pass nr + 1
7389 instead of nr to lll_futex_wake. Only set errno and return -1
7392 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_wait,
7393 lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
7394 return actual return value from the syscall, not 0.
7396 2003-06-18 Ulrich Drepper <drepper@redhat.com>
7398 * tst-cancel4.c (tf_msgsnd): Don't always use 100 as the type,
7399 find a random value.
7400 (tf_msgrcv): Likewise. Also don't report msgrcv returns if
7403 * sysdeps/unix/sysv/linux/timer_settime.c: Add prototype for
7404 compat_timer_settime.
7405 * sysdeps/unix/sysv/linux/timer_gettime.c: Add prototype for
7406 compat_timer_gettime.
7407 * sysdeps/unix/sysv/linux/timer_getoverr.c: Add prototype for
7408 compat_timer_getoverrun.
7409 * sysdeps/unix/sysv/linux/timer_delete.c: Add prototype for
7410 compat_timer_delete.
7412 * pthread_mutex_destroy.c (__pthread_mutex_destroy): For
7413 error-checking mutex detect busy mutexes.
7415 2003-06-17 Ulrich Drepper <drepper@redhat.com>
7417 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_mutex_lock):
7418 Add ax to clobber list.
7419 (lll_mutex_cond_lock): Likewise.
7420 (lll_mutex_unlock): Likewise.
7421 (lll_lock): Likewise.
7422 (lll_unlock): Likewise.
7424 * Makefile: Add rules to build and run tst-cancel18 and tst-cancelx18.
7425 * tst-cancel18.c: New file.
7426 * tst-cancelx18.c: New file.
7428 * tst-cancel4.c: Test connect, creat, msgrcv, msgsnd, sendmsg, sendto,
7431 * Makefile: Add rules to build and run tst-cancel17 and tst-cancel17x.
7432 * tst-cancel17.c: New file.
7433 * tst-cancelx17.c: New file.
7435 * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
7436 * sysdeps/unix/sysv/linux/sigwait.c: New file.
7437 * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
7439 * tst-cancel4.c: Test open, close, pread, pwrite, fsync, and msync.
7441 2003-06-16 Jakub Jelinek <jakub@redhat.com>
7443 * sysdeps/pthread/createthread.c (create_thread): Set
7444 header.multiple_threads unconditionally.
7445 * allocatestack.c (allocate_stack): Likewise.
7446 * descr.h (struct pthread): Add header.multiple_threads
7448 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (CENABLE, CDISABLE):
7449 Define for librt. #error if neither libpthread, libc nor librt.
7450 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (CENABLE, CDISABLE):
7452 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (CENABLE,
7453 CDISABLE): Likewise.
7454 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (CENABLE,
7455 CDISABLE): Likewise.
7456 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (CENABLE,
7457 CDISABLE): Likewise.
7458 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (CENABLE,
7459 CDISABLE): Likewise. Access header.multiple_threads outside of
7460 libc and libpthread.
7461 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (CENABLE, CDISABLE):
7463 * sysdeps/x86_64/tls.h (tcbhead_t): Add multiple_threads.
7464 * sysdeps/x86_64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define.
7466 2003-06-17 Ulrich Drepper <drepper@redhat.com>
7468 * tst-cancel4.c: Add tests for the socket and signal functions, pause.
7469 Also test early cancellation before the thread reaches the cancellation
7472 * Makefile: Compile forward.c with exceptions.
7474 * sysdeps/unix/sysv/linux/sleep.c: New file.
7476 2003-06-16 Ulrich Drepper <drepper@redhat.com>
7478 * Makefile: Add CFLAGS definition to compile function wrappers
7479 duplicated from libc with exceptions.
7480 * tst-cancel4.c: Also check cancellation handlers.
7482 * Makefile: Add rules to build and run tst-cancel16 and
7483 tst-cancelx16. Add missing CFLAGS definitions.
7484 * tst-cancel16.c: New file.
7485 * tst-cancelx16.c: New file.
7487 2003-06-15 Ulrich Drepper <drepper@redhat.com>
7489 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
7490 (DL_SYSINFO_IMPLEMENTATION): Use CFI opcodes.
7491 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
7492 (DL_SYSINFO_IMPLEMENTATION): Likewise.
7494 * pthreadP.h (LIBC_CANCEL_ASYNC): Also define for librt.
7495 (LIBC_CANCEL_RESET): Likewise.
7496 Declare __librt_enable_asynccancel and __librt_disable_asynccancel.
7497 * sysdeps/pthread/Makefile (librt-sysdep_routines): Add
7499 (CFLAGS-libcrt-cancellation.c): Define.
7500 * sysdeps/pthread/librt-cancellation.c: New file.
7501 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define all the nice
7502 macros also when compiling librt.
7503 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
7504 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
7505 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
7506 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
7507 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
7508 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
7509 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
7511 * sysdeps/unix/sysv/linux/timer_create.c: Add prototype for
7512 compat_timer_create.
7514 2003-06-14 Ulrich Drepper <drepper@redhat.com>
7516 * sysdeps/pthread/posix-timer.h (timespec_compare): Always inline.
7518 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
7520 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
7521 Add libc_hidden_def.
7523 2003-06-13 Roland McGrath <roland@redhat.com>
7525 * sysdeps/x86_64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Pass FS
7526 constant from <sys/reg.h> to ps_get_thread_area, not register contents.
7528 2003-06-11 Ulrich Drepper <drepper@redhat.com>
7530 * allocatestack.c (queue_stack): Always inline.
7531 * ptreadhP.h (__do_cancel): Likewise.
7533 2003-06-10 Jakub Jelinek <jakub@redhat.com>
7535 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait): Fix
7538 2003-06-10 Ulrich Drepper <drepper@redhat.com>
7540 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
7541 (__pthread_cond_signal): Remove incorrect second addition for
7544 2003-06-09 Ulrich Drepper <drepper@redhat.com>
7546 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
7547 (__pthread_cond_signal): Use correct futex pointer in
7548 __lll_mutex_lock_wait call.
7550 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
7551 (__pthread_cond_signal): Some more tweaks to handle cond_lock!=0.
7553 2003-06-08 Ulrich Drepper <drepper@redhat.com>
7555 * sysdeps/unix/sysv/linux/s390/sem_wait.c (__new_sem_wait): Make
7557 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
7560 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Remove
7561 hand-written CFI generation code. Since ENTRY/END also initiated
7562 CFI frames this caused two CFI sets to be generated.
7564 2003-06-07 Ulrich Drepper <drepper@redhat.com>
7566 * cleanup_routine.c: New file.
7567 * Versions (libpthread) [GLIBC_2.3.3]: Add __pthread_cleanup_routine.
7568 * sysdeps/pthread/pthread.h: Add support for fully exception-based
7570 * Makefile (libpthread-routines): Add cleanup_routine.
7571 Add more CFLAGS variables to compile with exceptions. Add comments
7572 why which file needs unwind tables.
7573 (tests) [have-forced-unwind==yes]: Add tst-cancelx* and tst-cleanupx*
7575 * tst-cancelx1.c: New file.
7576 * tst-cancelx2.c: New file.
7577 * tst-cancelx3.c: New file.
7578 * tst-cancelx4.c: New file.
7579 * tst-cancelx5.c: New file.
7580 * tst-cancelx6.c: New file.
7581 * tst-cancelx7.c: New file.
7582 * tst-cancelx8.c: New file.
7583 * tst-cancelx9.c: New file.
7584 * tst-cancelx10.c: New file.
7585 * tst-cancelx11.c: New file.
7586 * tst-cancelx12.c: New file.
7587 * tst-cancelx13.c: New file.
7588 * tst-cancelx14.c: New file.
7589 * tst-cancelx15.c: New file.
7590 * tst-cleanupx0.c: New file.
7591 * tst-cleanupx0.expect: New file.
7592 * tst-cleanupx1.c: New file.
7593 * tst-cleanupx2.c: New file.
7594 * tst-cleanupx3.c: New file.
7596 * tst-cleanup0.c: Make standard compliant.
7597 * tst-cleanup1.c: Likewise.
7599 * sysdeps/unix/sysv/linux/sem_timedwait.c: Add cancellation support.
7600 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
7601 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
7602 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
7603 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
7604 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
7605 * sysdeps/i386/tcb-offsets.sym: Add RESULT, CANCELHANDLING, and
7607 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
7608 * tst-cancel12.c: New file.
7609 * tst-cancel13.c: New file.
7610 * tst-cancel14.c: New file.
7611 * tst-cancel15.c: New file.
7612 * Makefile (tests): Add tst-cancel12, tst-cancel13, tst-cancel14,
7615 * tst-cancel1.c: Add some comments.
7617 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Compute relative
7620 2003-06-06 Ulrich Drepper <drepper@redhat.com>
7622 * Makefile (CFLAGS-pthread_cancel.c): Define.
7624 2003-06-05 Ulrich Drepper <drepper@redhat.com>
7626 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_rwlock_t):
7627 Change type of __writer element to int.
7628 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7629 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7630 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7631 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7632 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
7633 * sysdeps/i386/tcb-offsets.sym: Replace SELF entry with TID entry.
7634 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
7635 * pthread_rwlock_trywrlock.c: Store TID not self pointer in __writer.
7636 Compare with TID to determine deadlocks.
7637 * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
7638 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
7639 * sysdeps/pthread/pthread_rwlock_timedwrlock.: Likewise.
7640 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
7641 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
7642 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
7644 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
7646 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
7647 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
7648 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
7650 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
7652 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
7653 * Makefile (tests): Add tst-rwlock12.
7654 * tst-rwlock12.c: New file.
7656 2003-06-05 Jakub Jelinek <jakub@redhat.com>
7658 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait,
7659 __lll_timedlock_wait, lll_unlock_wake_cb, __lll_timedwait_tid):
7660 Remove bogus hidden_proto.
7661 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
7663 * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_lock,
7664 lll_unlock_wake_cb, ___lll_timedwait_tid): Likewise.
7665 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (___lll_mutex_lock,
7666 ___lll_mutex_timedlock): Likewise.
7668 2003-06-04 Ulrich Drepper <drepper@redhat.com>
7670 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
7671 (__pthread_cond_signal): Add some code to eventually handle
7674 2003-06-01 Ulrich Drepper <drepper@redhat.com>
7676 * Makefile (tests): Add tst-exec4.
7677 (tst-exec4-ARGS): Define.
7678 * tst-exec4.c: New file.
7680 2003-05-31 Ulrich Drepper <drepper@redhat.com>
7682 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
7683 Also fail if tv_nsec < 0.
7684 (__lll_timedwait_tid): Likewise.
7685 * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
7686 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_timedwait_tid):
7688 * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_timedwait_tid):
7690 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (__lll_mutex_timedlock):
7692 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
7694 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_timedwait_tid):
7696 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_timedwait_tid):
7699 * Makefile (tests): Add tst-sem8 and tst-sem9.
7700 * tst-sem8.c: New file.
7701 * tst-sem9.c: New file.
7702 * sem_open.c: Fix creation of in_use record if the file exists but
7705 * posix-timer.h: Remove old, unused timer_id2ptr and timer_ptr2id
7708 * sysdeps/pthread/timer_create.c (timer_create): In case
7709 evp==NULL, assign timer ID to sival_ptr.
7711 * descr.h (struct pthread_unwind_buf): Change type of prev element to
7712 struct pthread_unwind_buf *.
7713 (struct pthread): Likewise for cleanup_jmp_buf element.
7715 * cleanup.c (__pthread_register_cancel): Add cast to avoid warning.
7716 * cleanup_defer.c (__pthread_register_cancel_defer): Likewise.
7717 * unwind.c (__pthread_unwind_next): Likewise.
7719 2003-05-30 Ulrich Drepper <drepper@redhat.com>
7721 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
7722 (lll_futex_timed_wait): Use int for futex value parameter.
7723 (lll_futex_wake): Likewise.
7724 (lll_futex_requeue): Likewise.
7726 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
7727 Replace one memory operation with one register operation.
7729 * tst-join4.c (do_test): Fix error message.
7731 * tst-rwlock6.c (do_test): Use correct format specifier.
7733 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
7734 (__lll_mutex_lock_wait): Replace one memory operation with one
7736 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S
7737 (__lll_mutex_lock_wait): Likewise.
7739 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
7740 (__lll_mutex_cond_lock): Add one to value parameter of
7741 __lll_lock_wait to reflect reality in the futex syscall.
7742 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
7743 (lll_mutex_cond_lock): Likewise.
7745 2003-05-30 Jakub Jelinek <jakub@redhat.com>
7747 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_cond_lock):
7749 (lll_mutex_cond_lock): Define.
7751 2003-05-29 Ulrich Drepper <drepper@redhat.com>
7753 * Makefile (tests): Add tst-signal6.
7754 * tst-signal6.c: New file.
7756 * sysdeps/unix/sysv/linux/s390/lowlevellock.h
7757 (__lll_mutex_unlock_force): New function
7758 (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
7760 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
7761 (__lll_mutex_unlock_force): New function.
7762 (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
7764 * tst-rwlock7.c (do_test): Use correct format specifier.
7766 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue):
7767 Find break parameter in correct asm argument.
7769 2003-05-27 Jakub Jelinek <jakub@redhat.com>
7771 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_clobbers):
7773 (lll_futex_requeue): Fix __o3 constraint, return negative errno if
7775 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
7777 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_REQUEUE,
7778 lll_futex_requeue, lll_mutex_unlock_force): Define.
7780 2003-05-30 Jakub Jelinek <jakub@redhat.com>
7782 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
7783 (pthread_cond_t): Add __mutex.
7784 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_REQUEUE,
7785 lll_futex_requeue, lll_mutex_unlock_force): Define.
7787 2003-05-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
7789 * sysdeps/sh/tcb-offsets.sym: Define MUTEX_FUTEX.
7790 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
7792 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (SYSCALL_WITH_INST_PAD):
7794 (lll_futex_wait, lll_futex_wake): Define.
7795 * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: New file.
7796 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Try using
7797 FUTEX_REQUEUE instead of FUTEX_WAIT.
7798 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
7799 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Remember
7800 mutex which was used in condvar structure. Call
7801 __pthread_mutex_cond_lock instead of __pthread_mutex_lock_internal.
7802 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
7804 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Don't
7805 include tcb-offsets.h. Read wakeup value in locked region.
7806 Use the value of gbr register as THREAD_ID.
7807 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7808 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
7809 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
7811 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Remove futex related
7814 2003-05-28 Ulrich Drepper <drepper@redhat.com>
7816 * sysdeps/pthread/pthread_cond_broadcast.c
7817 (__pthread_cond_broadcast): Fix typo: MAX_INT -> INT_MAX.
7819 2003-05-26 Ulrich Drepper <drepper@redhat.com>
7821 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Fix
7822 typo in register name.
7823 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use parameters
7824 correctly. Actually use requeue. Little optimization.
7825 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Store
7826 mutex address early. Handle cancellation state as 32-bit value.
7827 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7828 Remove unnecessary label.
7830 2003-05-25 Ulrich Drepper <drepper@redhat.com>
7832 * sysdeps/pthread/pthread_cond_broadcast.c: Try using FUTEX_REQUEUE
7833 instead of FUTEX_WAIT.
7834 * sysdeps/pthread/pthread_cond_signal.c: Likewise.
7835 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
7836 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
7837 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
7838 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
7839 * sysdeps/pthread/pthread_cond_timedwait.c: Remember mutex which was
7840 used in condvar structure. Call __pthread_mutex_cond_lock instead
7841 of __pthread_mutex_lock_internal.
7842 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7843 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7844 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
7845 (__condvar_cleanup): Always call __pthread_mutex_cond_lock.
7846 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7847 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7848 * sysdeps/unix/sysv/linux/Makefile (libpthread-sysdep_routines):
7849 Add pthread_mutex_cond_lock.
7850 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add dep_mutex.
7851 * sysdeps/unix/sysv/linux/pthread_cond_mutex_lock.c: New file.
7852 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define
7853 lll_mutex_cond_lock.
7854 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
7855 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
7856 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
7858 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7859 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
7861 * sysdeps/i386/tcb-offsets.sym: Define MUTEX_FUTEX.
7862 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
7864 * pthreadP.h: Declare __pthread_mutex_cond_lock.
7865 * pthread_mutex_lock.c: Define LLL_MUTEX_LOCK if not already defined.
7866 Use it instead of lll_mutex_lock. If __pthread_mutex_lock is a
7867 macro don't define aliases.
7869 * cancellation.c: Remove __pthread_enable_asynccancel_2.
7870 * pthreadP.h: Remove declaration of __pthread_enable_asynccancel_2.
7871 * sysdeps/pthread/pthread_cond_timedwait.c: Use
7872 __pthread_enable_asynccancel instead of __pthread_enable_asynccancel_2.
7873 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7874 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7875 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
7876 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7877 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7879 2003-05-17 Ulrich Drepper <drepper@redhat.com>
7881 * sem_open.c: Fix one endless loop. Implement correct semantics
7882 wrt opening the same semaphore more then once.
7883 * sem_close.c: Adjust for sem_open change.
7884 * semaphoreP.h: Include <semaphore.h>. Define struct inuse_sem.
7885 Declare __sem_mappings, __sem_mappings_lock, __sem_search.
7886 * Makefile (tests): Add tst-sem7.
7887 * tst-sem7.c: New file.
7889 2003-05-16 Roland McGrath <roland@redhat.com>
7891 * sysdeps/unix/sysv/linux/register-atfork.c (libc_freeres_fn): Fix
7892 uninitialized variable braino.
7894 2003-05-16 Ulrich Drepper <drepper@redhat.com>
7896 * sysdeps/unix/sysv/linux/timer_gettime.c (timer_gettime): Correct
7897 test for syscall availability.
7899 * sysdeps/unix/sysv/linux/timer_settime.c (timer_settime): Set
7900 __no_posix_timers to -1 if the syscalls don't exist.
7902 * pthread_join.c (pthread_join): Set tid field of the joined
7903 thread to -1. This isn't necessary but helps to recognize some
7904 error conditions with almost no cost.
7906 * allocatestack.c (FREE_P): Also negative values indicate an
7909 * unwind.c: Include <unistd.h>.
7911 2003-05-14 Ulrich Drepper <drepper@redhat.com>
7913 * Makefile ($(objpfx)$(multidir)): Add rule to create the directory.
7915 2003-05-14 Jakub Jelinek <jakub@redhat.com>
7917 * Makefile (crti-objs, crtn-objs): New variables.
7918 (omit-deps, extra-objs): Add crtn.
7919 ($(objpfx)libpthread.so): Depend on both crti and crtn
7920 and links to them in multidir.
7921 ($(objpfx)crtn.S, $(objpfx)crtn.o): New rules.
7923 2003-05-12 Steven Munroe <sjmunroe@us.ibm.com>
7925 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
7926 (lll_mutex_unlock): Use atomic_exchange_rel.
7928 2003-05-11 Ulrich Drepper <drepper@redhat.com>
7930 * cond-perf.c (cons): Add missing locking around setting of alldone.
7932 2003-05-10 Ulrich Drepper <drepper@redhat.com>
7934 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Remove futex
7936 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
7938 2003-05-09 Ulrich Drepper <drepper@redhat.com>
7940 * tst-sem6.c: New file.
7941 * Makefile (tests): Add tst-sem6.
7943 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (___lll_mutex_unlock):
7944 Use atomic_exchange_rel instead of atomic_exchange.
7945 * sysdeps/unix/sysv/linux/lowlevellock.c (lll_unlock_wake_cb):
7948 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Improve quality of
7949 code for lll_futex_wait and lll_futex_wake in static apps. Use
7950 vsyscall is possible.
7952 * sysdeps/unix/sysv/linux/pthread_getaffinity.c: New file.
7953 * sysdeps/unix/sysv/linux/pthread_setaffinity.c: New file.
7954 * sysdeps/pthread/pthread.h: Declare pthread_getaffinity_np and
7955 pthread_setaffinity_np.
7956 * Versions [libpthread] (GLIBC_2.3.3): Add pthread_getaffinity_np
7957 and pthread_setaffinity_np.
7958 * Makefile (libpthread-routines): Add pthread_getaffinity and
7959 pthread_setaffinity.
7961 * allocatestack.c (allocate_stack): If ARCH_RETRY_MMAP is defined,
7962 use it in case mmap to allocate the stack fails.
7963 * sysdeps/unix/sysv/linux/x86_64/Makefile: Don't define
7964 ARCH_MAP_FLAGS here.
7965 * sysdeps/x86_64/pthreaddef.h: Define ARCH_MAP_FLAGS and
7968 2003-05-08 Ulrich Drepper <drepper@redhat.com>
7970 * sysdeps/unix/sysv/linux/fork.c: Complete rewrite of the atfork
7971 handler implementation. It is now lockless in fork().
7972 * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
7973 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
7974 * sysdeps/unix/sysv/linux/fork.h: Don't include <link.h>. Don't
7975 declare the __fork_*_lists.
7976 (struct fork_handler): Include pointers to all three functions.
7977 Add next, refcntr and need_signal elements.
7978 (__fork_handlers): New declaration.
7979 (__register_atfork_malloc): Remove declaration.
7980 (HAVE_register_atfork_malloc): Remove definition.
7981 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove
7982 __pthread_child_handler variable.
7983 (__libc_pthread_init): Use __register_atfork instead of explicitly
7985 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define lll_futex_wait
7987 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
7989 * unwind.c (unwind_cleanup): Print error message and then abort. This
7990 function must never be reached.
7992 * cond-perf.c: New file.
7994 2003-05-05 Ulrich Drepper <drepper@redhat.com>
7996 * sysdeps/i386/tls.h (TLS_INIT_TP): Include \n in error message.
7998 2003-05-04 Roland McGrath <roland@redhat.com>
8000 * Makefile ($(objpfx)../libc.so): New target.
8002 2003-05-02 Ulrich Drepper <drepper@redhat.com>
8004 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
8005 (pthread_condattr_t): Size is only an int, don't use long for
8007 (pthread_mutexattr_t): Likewise.
8008 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8009 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
8010 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
8012 2003-05-01 Ulrich Drepper <drepper@redhat.com>
8014 * sysdeps/i386/tls.h: Define THREAD_ID.
8015 * sysdeps/ia64/tls.h: Likewise.
8016 * sysdeps/powerpc/tls.h: Likewise.
8017 * sysdeps/s390/tls.h: Likewise.
8018 * sysdeps/sh/tls.h: Likewise.
8019 * sysdeps/x86_64/tls.h: Likewise.
8020 * pthread_mutex_lock.c: Use THREAD_ID instead of THREAD_SELF to
8022 * pthread_mutex_timedlock.c: Likewise.
8023 * pthread_mutex_trylock.c: Likewise.
8024 * pthread_mutex_unlock.c: Likewise.
8025 * pthread_rwlock_trywrlock.c: Likewise.
8026 * sysdeps/pthread/pthread_rwlocklock_rdlock.c: Likewise.
8027 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
8028 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
8029 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
8031 * sysdeps/pthread/createthread.c (create_thread): Use CLONE_SYSVSEM
8034 2003-04-29 Jakub Jelinek <jakub@redhat.com>
8036 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
8037 (__SIZEOF_PTHREAD_COND_T): Define to 48.
8038 (pthread_rwlock_t): Add 16 bytes of pad instead of 8 before __flags.
8039 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
8040 Make __align long long instead of long.
8041 (pthread_rwlock_t): Formatting.
8042 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
8043 (pthread_rwlock_t): Formatting.
8044 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
8045 (pthread_cond_t): Make __align long long instead of long.
8046 (pthread_rwlock_t): Move __flags field to the same position as in
8049 2003-04-30 Ulrich Drepper <drepper@redhat.com>
8051 * tst-rwlock6.c (do_test): Use correct printf format specifiers.
8052 * tst-rwlock7.c (do_test): Likewise.
8054 2003-04-26 Roland McGrath <roland@redhat.com>
8056 * Makefile ($(test-modules)): Depend on $(common-objpfx)shlib.lds.
8058 2003-04-22 Jakub Jelinek <jakub@redhat.com>
8060 * allocatestack.c (TLS_TPADJ): Add TLS_PRE_TCB_SIZE instead of
8061 sizeof (struct pthread).
8062 (allocate_stack): Subtract TLS_PRE_TCB_SIZE bytes instead of
8064 * sysdeps/powerpc/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Define
8066 (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Define to alignment of
8068 (TLS_PRE_TCB_SIZE): Increase to cover tcbhead_t preceeded by pad
8070 (INSTALL_DTV, GET_DTV, THREAD_DTV): tcbhead_t is immediately before
8072 (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Don't add TLS_TCB_SIZE
8074 (NO_TLS_OFFSET): Define.
8075 * sysdeps/unix/sysv/linux/powerpc/createthread.c (TLS_VALUE): Don't
8076 add TLS_TCB_SIZE unnecessarily.
8078 2003-04-22 Roland McGrath <roland@redhat.com>
8080 * Makeconfig (shared-thread-library): Reverse link order to work
8083 2003-04-22 Ulrich Drepper <drepper@redhat.com>
8085 * semaphore.h: Fix typo in comment.
8087 2003-04-21 Ulrich Drepper <drepper@redhat.com>
8089 * sysdeps/pthread/sigfillset.c: New file.
8091 * init.c (__pthread_initialize_minimal): Don't block SIGTIMER.
8092 * pthreadP.h: Make SIGTIMER and SIGCANCEL the same.
8093 * sysdeps/pthread/pthread_sigmask.c: Remove handling of SIGTIMER.
8094 * sysdeps/pthread/sigaction.c: Likewise.
8095 * sysdeps/pthread/sigprocmask.c: New file.
8096 * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): Define as
8098 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
8099 Block SIGTIMER. Also handle SI_TKILL events and terminate thread
8102 2003-04-19 Ulrich Drepper <drepper@redhat.com>
8104 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
8105 (DL_SYSINFO_IMPLEMENTATION): Add .eh_frame information.
8107 * sysdeps/unix/sysv/linux/unregister-atfork.c
8108 (__unregister_atfork): Don't free memory not allocated dynamically.
8110 * semaphore.h: Remove __THROW marker from cancellation points.
8111 * nptl/sysdeps/pthread/pthread.h: Likewise.
8113 2003-04-18 Ulrich Drepper <drepper@redhat.com>
8115 * sysdeps/pthread/pthread.h: Don't mark pthread_testcancel,
8116 pthread_cancel, pthread_setcancelstate, and pthread_setcanceltype with
8119 2003-04-16 Jakub Jelinek <jakub@redhat.com>
8121 * tst-cancel4.c (do_test): Use %zd instead of %d when printing cnt.
8123 2003-04-15 Roland McGrath <roland@redhat.com>
8125 * forward.c (__pthread_unwind): Tweak to avoid warning.
8127 2003-04-15 Ulrich Drepper <drepper@redhat.com>
8129 * pthreadP.h: Move THREAD_ATOMIC_* replacements to the top.
8131 2003-04-14 Ulrich Drepper <drepper@redhat.com>
8133 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Don't
8134 overflow CFA advance instructions.
8135 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8137 2003-04-14 Jakub Jelinek <jakub@redhat.com>
8139 * sysdeps/i386/tls.h: Rename LOCK to LOCK_PREFIX.
8140 * sysdeps/i386/pthread_spin_lock.c: Likewise.
8141 * sysdeps/x86_64/tls.h: Likewise. Define LOCK_PREFIX if not already
8144 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Use
8145 DW_CFA_advance_loc2 for .Laddl-.Lsubl.
8146 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
8147 DW_CFA_advance_loc for .Laddl-.Lsubl.
8149 2003-04-13 Ulrich Drepper <drepper@redhat.com>
8151 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Don't use
8152 position-independent unwind data for static libraries.
8153 Add missing unwind info. Add comments.
8155 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Add unwind info.
8156 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8157 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8158 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8160 2003-04-12 Ulrich Drepper <drepper@redhat.com>
8162 * Makefile: Make sure all cancellation points are compiled with
8163 exception and asynchronous unwind tables.
8165 * sysdeps/x86_64/tls.h (THREAD_SETMEM): Word around compiler bug
8166 which mishandles loading of global object addresses in PIC.
8167 (THREAD_SETMEM_NC): Likewise.
8169 2003-04-11 Ulrich Drepper <drepper@redhat.com>
8171 * pthread.h: Define new data structure for cleanup buffer. Declare
8172 new cleanup handler interfaces.
8173 * descr.h: Include <unwind.h> if necessary. Define pthread_unwind_buf.
8174 (struct pthread): Add cleanup_jmp_buf pointer. Define
8175 HAVE_CLEANUP_JMP_BUF and not HAVE_CANCELBUF.
8176 * pthreadP.h: Declare __pthread_unwind. Define __do_cancel to use
8177 it. Declare old cleanup handler installation functions.
8178 * cleanup.c: Rewrite. Install handler for unwind-based cleanup
8180 * cleanup_defer.c: Likewise.
8181 * cleanup_compat.c: New file. Old cleanup code.
8182 * cleanup_def_compat.c: New file. Old cleanup code.
8183 * pthread_create.c (start_thread): Initialize cleanup_jmp_buf element
8184 if own thread descriptor.
8185 * unwind.c: New file.
8186 * forward.c: Add __pthread_unwind.
8187 * init.c (pthread_functions): Add __pthread_unwind.
8188 * sysdeps/pthread/pthread-functions.s (struct pthread_functions):
8189 Add ptr___pthread_unwind.
8190 * Versions [GLIBC_2.3.3] (libpthread): Export new cleanup handling
8191 and unwind function.
8192 * Makefile (libpthread-routines): Add cleanup_compat,
8193 cleanup_def_compat, and unwind. Define CFLAGS to enable unwind
8194 table generation if necessary.
8195 * version.c: Record whether unwind support is compiled in.
8196 * sysdeps/pthread/configure.in: Add checks for unwind unterfaces.
8197 * sysdeps/pthread/bits/libc-lock.h: Add prototypes of the old cleanup
8199 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add quite a bit of
8200 complication to generate unwind information for syscall wrappers.
8201 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
8202 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
8203 __cleanup_fct_attribute.
8205 * Makefile: Add rules to build and run tst-cleanup0.
8206 * tst-cleanup0.c: New file.
8207 * tst-cleanup0.expect: New file.
8209 * pthread_create.c (deallocate_tsd): Don't take parameter. Adjust
8210 caller. Optimize to avoid often unecessary local variable.
8212 2003-04-11 Roland McGrath <roland@redhat.com>
8214 * Makefile ($(objpfx)multidir.mk): New target, generated makefile that
8215 sets variable `multidir'; include that.
8216 (generated): Add it.
8217 ($(objpfx)$(multidir)/crti.o): New target.
8218 [$(multidir) != .] (generated-dirs, extra-objs, omit-deps): Add it.
8220 2003-04-11 Ulrich Drepper <drepper@redhat.com>
8222 * tst-attr2.c (do_test): Add cast to avoid warning.
8223 * tst-mutex4.c (do_test): Likewise.
8225 2003-04-10 Ulrich Drepper <drepper@redhat.com>
8227 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset CPU clocks
8230 2003-04-09 Ulrich Drepper <drepper@redhat.com>
8232 * Makefile (tests): Add tst-detach1.
8233 * tst-detach1.c: New file.
8235 2003-04-08 Ulrich Drepper <drepper@redhat.com>
8237 * sysdeps/pthread/pthread.h: Remove duplicate
8238 pthread_cleanup_{push,pop} definitions.
8240 * tst-barrier2.c: Eliminate warnings.
8241 * tst-cancel4.c: Likewise.
8242 * tst-cond4.c: Likewise.
8243 * tst-cond6.c: Likewise.
8244 * tst-detach1.c: Likewise.
8245 * tst-rwlock4.c: Likewise.
8246 * tst-rwlock6.c: Likewise.
8247 * tst-rwlock7.c: Likewise.
8248 * tst-sem3.c: Likewise.
8249 * tst-spin2.c: Likewise.
8250 * tst-umask1.c: Likewise.
8252 2003-04-07 Ulrich Drepper <drepper@redhat.com>
8254 * pthread_detach.c (pthread_detach): Fix test for invalid TID.
8256 2003-04-06 Ulrich Drepper <drepper@redhat.com>
8258 * descr.h (struct pthread): Move cancelhandling member to the front.
8260 2003-04-05 Ulrich Drepper <drepper@redhat.com>
8262 * sysdeps/unix/sysv/linux/register-atfork.c: Define malloc_prepare,
8263 malloc_parent, and malloc_child statically.
8264 (__register_atfork_malloc): New function.
8265 (free_mem): Don't free any of the malloc_* variables on the list.
8266 * sysdeps/unix/sysv/linux/fork.h: Declare __register_atfork_malloc.
8267 Define HAVE_register_atfork_malloc.
8269 2003-04-04 Ulrich Drepper <drepper@redhat.com>
8271 * sysdeps/pthread/createthread.c (create_thread): Add some more
8272 comments explaining when to set multiple_threads and when not.
8274 * pthreadP.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
8275 THREAD_ATOMIC_BIT_SET if not already defined.
8276 * sysdeps/i386/tls.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
8277 THREAD_ATOMIC_BIT_SET:
8278 * sysdeps/x86_64/tls.h: Likewise.
8279 * cleanup_defer.c (_pthread_cleanup_push_defer): Rewrite to use
8280 THREAD_ATOMIC_CMPXCHG_VAL.
8281 (_pthread_cleanup_pop_restore): Likewise.
8282 * cancellation.c (__pthread_enable_asynccancel): Likewise.
8283 (__pthread_enable_asynccancel_2): Likewise.
8284 (__pthread_disable_asynccancel): Likewise.
8285 * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
8286 (__libc_disable_asynccancel): Likewise.
8287 * init.c (sigcancel_handler): Likewise.
8288 * pthread_setcancelstate.c (__pthread_setcancelstate): Likewise.
8289 * pthread_setcanceltype.c (__pthread_setcanceltype): Likewise.
8291 2003-04-03 Ulrich Drepper <drepper@redhat.com>
8293 * init.c (sigcancel_handler): Don't set EXITING_BIT here.
8294 * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
8295 * pthreadP.h (__do_cancel): Set EXITING_BIT here.
8296 * Makefile (tests): Add tst-cancel11.
8297 * tst-cancel11.c: New file.
8299 2003-04-01 Ulrich Drepper <drepper@redhat.com>
8301 * pthread_create.c (deallocate_tsd): Clear/free memory after the last
8302 round, not the first. Use specific_used flag instead of local
8303 found_nonzero variable. Use THREAD_[SG]ETMEM where possible.
8304 (__free_tcb): Don't call deallocate_tsd here.
8305 (start_thread): Call deallocate_tsd here.
8306 * pthread_setspecific.c: Set specific_used flag really only when
8308 * Makefile (tests): Add tst-tsd3.c and tst-tsd4.
8309 * tst-tsd3.c: New file.
8310 * tst-tsd4.c: New file.
8312 2003-03-31 Ulrich Drepper <drepper@redhat.com>
8314 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_mutex_lock):
8315 Use atomic_exchange_and_add instead of __lll_add.
8316 (__lll_mutex_timedlock): Likewise.
8317 Patch by Ian Wienand.
8319 2003-03-24 Steven Munroe <sjmunroe@us.ibm.com>
8321 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
8322 (SINGLE_THREAD_P): Fix typo.
8323 * tst-cancel-wrappers.sh: Handle '.'ed symbols.
8325 2003-03-31 Ulrich Drepper <drepper@redhat.com>
8327 * Makefile (tests): Add tst-align.
8328 * tst-align.c: New file.
8329 * sysdeps/i386/Makefile: Define CFLAGS-tst-align.
8331 * sysdeps/i386/tls.h (CALL_THREAD_FCT): Align stack of called
8334 * tst-tsd2.c: Add casts to avoid warnings.
8336 2003-03-30 Ulrich Drepper <drepper@redhat.com>
8338 * descr.h (struct pthread): Move most often used elements to the front.
8340 2003-03-29 Ulrich Drepper <drepper@redhat.com>
8342 * Makefile (libpthread-routines): Add pthread_atfork.
8343 (libpthread-static-only-routines): Add pthread_atfork.
8345 2003-03-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
8347 * sysdeps/sh/tls.h: Include nptl/descr.h after the definition
8349 (INSTALL_DTV): Add parens.
8350 (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
8351 Use passed descr instead of THREAD_SELF.
8352 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S
8353 (__lll_mutex_timedlock_wait): Correct expected value after
8355 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S:
8356 Release lock before waking up the waiters.
8357 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Correct exit
8358 criteria. Reorderstruct passed to cleanup handler. Fix
8359 handling of cancellation and failung pthread_mutex_unlock call.
8360 Use __pthread_enable_asynccancel_2 instead of
8361 __pthread_enable_asynccancel.
8362 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
8363 Return result of lock re-get if it fails.
8364 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Fix wrong argument
8365 for __pthread_cleanup_push.
8366 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Fix
8367 completely broken rwlock implementation.
8368 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
8369 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
8370 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
8371 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
8372 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
8373 * sysdeps/unix/sysv/linux/sh/sem_post.S: Fix error value. Use
8374 versioned_symbol macro.
8375 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Use versioned_symbol macro.
8376 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
8378 2003-03-27 Ulrich Drepper <drepper@redhat.com>
8380 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Don't declare
8381 __timer_helper_thread. Declare __start_helper_thread, __helper_once,
8383 (struct timer): Remove th and bar field.
8384 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Remove
8385 debugging code. Create only one helper thread.
8386 * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Don't kill
8388 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
8389 Renamed. Define statically. Use thread info from siginfo.
8390 (__helper_once): New variable.
8391 (__helper_tid): New variable.
8392 (__reset_helper_control): New function.
8393 (__start_helper_thread): New function.
8395 * pthread_create.c (start_thread): Don't use setjmp inside
8396 __builtin_expect to work around gcc bug.
8398 * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Even if
8399 timer_delete syscall fails, but not with ENOSYS, set
8402 * sysdeps/unix/sysv/linux/timer_settime.c [!__ASSUME_POSIX_TIMERS]
8403 (timer_settime): Fix typo.
8404 * sysdeps/unix/sysv/linux/timer_getoverr.c
8405 [!__ASSUME_POSIX_TIMERS] (timer_getoverrun): Likewise.
8407 2003-03-27 Jakub Jelinek <jakub@redhat.com>
8409 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Fix
8410 offset of cleanupbuf.__prev.
8412 2003-03-26 Jakub Jelinek <jakub@redhat.com>
8414 * sysdeps/unix/sysv/linux/timer_getoverr.c: Fix typo in name
8417 2003-03-26 Ulrich Drepper <drepper@redhat.com>
8419 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): If EVP ==
8420 NULL provide default definition to syscall.
8422 2003-03-25 Roland McGrath <roland@redhat.com>
8424 * sysdeps/pthread/posix-timer.h (TIMER_MAX): Define if not defined.
8425 (timer_id2ptr): Fix typo.
8427 2003-03-25 Ulrich Drepper <drepper@redhat.com>
8429 * pthreadP.h: Define SIGCANCEL and SIGTIMER.
8430 * sysdeps/i386/pthreaddef.h: Remove SIGCANCEL definition.
8431 * sysdeps/ia64/pthreaddef.h: Likewise.
8432 * sysdeps/powerpc/pthreaddef.h: Likewise.
8433 * sysdeps/s390/pthreaddef.h: Likewise.
8434 * sysdeps/sh/pthreaddef.h: Likewise.
8435 * sysdeps/x86_64/pthreaddef.h: Likewise.
8436 * init.c (__pthread_initialize_minimal): Block SIGTIMER.
8437 * sysdeps/pthread/sigaction.c: Also prevent SIGTIMER handler from
8439 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
8440 SIGTIMER is not unblocked.
8441 * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): One more
8443 * sysdeps/unix/sysv/linux/pthread_kill.c: Do not allow SIGTIMER to
8445 * sysdeps/pthread/posix-timer.h (timer_id2ptr, timer_ptr2id): Just
8446 pass pointer through as ID.
8447 * sysdeps/unix/sysv/linux/bits/local_lim.h (TIMER_MAX): Removed.
8448 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: New file.
8449 * sysdeps/unix/sysv/linux/timer_create.c: New file.
8450 * sysdeps/unix/sysv/linux/timer_delete.c: New file.
8451 * sysdeps/unix/sysv/linux/timer_getoverr.c: New file.
8452 * sysdeps/unix/sysv/linux/timer_gettime.c: New file.
8453 * sysdeps/unix/sysv/linux/timer_routines.c: New file.
8454 * sysdeps/unix/sysv/linux/timer_settime.c: New file.
8455 * sysdeps/unix/sysv/linux/ia64/Versions: New file.
8456 * sysdeps/unix/sysv/linux/ia64/timer_create.c: New file.
8457 * sysdeps/unix/sysv/linux/ia64/timer_delete.c: New file.
8458 * sysdeps/unix/sysv/linux/ia64/timer_getoverr.c: New file.
8459 * sysdeps/unix/sysv/linux/ia64/timer_gettime.c: New file.
8460 * sysdeps/unix/sysv/linux/ia64/timer_settime.c: New file.
8461 * sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions: New file.
8462 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_create.c: New file.
8463 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_delete.c: New file.
8464 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_getoverr.c: New file.
8465 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_gettime.c: New file.
8466 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_settime.c: New file.
8467 * sysdeps/unix/sysv/linux/s390/s390-64/Versions: New file.
8468 * sysdeps/unix/sysv/linux/s390/s390-64/timer_create.c: New file.
8469 * sysdeps/unix/sysv/linux/s390/s390-64/timer_delete.c: New file.
8470 * sysdeps/unix/sysv/linux/s390/s390-64/timer_getoverr.c: New file.
8471 * sysdeps/unix/sysv/linux/s390/s390-64/timer_gettime.c: New file.
8472 * sysdeps/unix/sysv/linux/s390/s390-64/timer_settime.c: New file.
8473 * sysdeps/unix/sysv/linux/x86_64/Versions: New file.
8474 * sysdeps/unix/sysv/linux/x86_64/compat-timer.h: New file.
8475 * sysdeps/unix/sysv/linux/x86_64/timer_create.c: New file.
8476 * sysdeps/unix/sysv/linux/x86_64/timer_delete.c: New file.
8477 * sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c: New file.
8478 * sysdeps/unix/sysv/linux/x86_64/timer_gettime.c: New file.
8479 * sysdeps/unix/sysv/linux/x86_64/timer_settime.c: New file.
8481 * pthreadP.h: Remove FRAME_LEFT definition.
8482 * cleanup.c (_pthread_cleanup_push): Don't check for reference to
8483 already left frame. Programs which have this problem are not POSIX
8485 * cleanup_defer.c (_pthread_cleanup_push_defer): Likewise.
8487 2003-03-24 Ulrich Drepper <drepper@redhat.com>
8489 * sysdeps/pthread/tst-timer.c: Check return values of the
8492 2003-03-23 Roland McGrath <roland@redhat.com>
8494 * tst-tls3.c (do_test) [! HAVE___THREAD]: Don't test anything.
8495 * tst-tls3mod.c: Likewise.
8496 * tst-tls1.c: Likewise.
8497 * tst-tls2.c: Likewise.
8499 * tst-mutex5.c (do_test): Unlock before destroy, otherwise we invoke
8502 * tst-join5.c (tf1, tf2): Add a cast.
8504 * Makeconfig (includes): Append -I$(..)nptl to this variable.
8506 * tst-barrier2.c (do_test) [! _POSIX_THREAD_PROCESS_SHARED]:
8507 Don't test anything.
8508 * tst-cond4.c: Likewise.
8509 * tst-cond6.c: Likewise.
8510 * tst-flock2.c: Likewise.
8511 * tst-mutex4.c: Likewise.
8512 * tst-rwlock4.c: Likewise.
8513 * tst-signal1.c: Likewise.
8514 * tst-spin2.c: Likewise.
8515 * tst-cond11.c [! _POSIX_CLOCK_SELECTION]: Likewise.
8517 * tst-mutex4.c: Use test-skeleton.c.
8518 * tst-spin2.c: Likewise.
8519 * tst-sysconf.c: Likewise.
8520 * tst-barrier2.c: Likewise.
8521 * tst-cond4.c: Likewise.
8522 * tst-cond6.c: Likewise.
8523 * tst-rwlock4.c: Likewise.
8524 * tst-unload.c: Likewise.
8525 * tst-flock2.c (do_test): Use return instead of exit.
8527 2003-03-22 Jakub Jelinek <jakub@redhat.com>
8529 * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
8531 2003-03-21 Ulrich Drepper <drepper@redhat.com>
8533 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
8534 (__lll_mutex_trylock): Use atomic_compare_and_exchange_val_acq
8535 instead of __lll_compare_and_swap.
8536 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
8538 Removed definition if __lll_compare_and_swap.
8540 * cancellation.c: Adjust for new form of compare&exchange macros.
8541 * cleanup_defer.c: Likewise.
8543 * libc-cancellation.c: Likewise.
8544 * old_pthread_cond_broadcast.c: Likewise.
8545 * old_pthread_cond_signal.c: Likewise.
8546 * old_pthread_cond_timedwait.c: Likewise.
8547 * old_pthread_cond_wait.c: Likewise.
8548 * pthread_cancel.c: Likewise.
8549 * pthread_create.c: Likewise.
8550 * pthread_detach.c: Likewise.
8551 * pthread_join.c: Likewise.
8552 * pthread_key_delete.c: Likewise.
8553 * pthread_setcancelstate.c: Likewise.
8554 * pthread_setcanceltype.c: Likewise.
8555 * pthread_timedjoin.c: Likewise.
8556 * pthread_tryjoin.c: Likewise.
8557 * sysdeps/pthread/createthread.c: Likewise.
8559 2003-03-20 Ulrich Drepper <drepper@redhat.com>
8561 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Include <atomic.h>.
8562 Remove __lll_add, __lll_dec_if_positive, and __lll_test_and_set
8563 definitions. Replace uses with calls to atomic_* functions.
8564 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
8565 * sysdeps/unix/sysv/linux/lowlevellock.c: Replace __lll_add and
8566 __lll_test_and_set calls with atomic_exchange_and_add and
8567 atomic_exchange calls respectively.
8568 * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
8569 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
8570 * sysdeps/unix/sysv/linux/sem_trywait.c: Likewise.
8571 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
8572 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Likewise.
8573 * sysdeps/unix/sysv/linux/ia64/sem_port.c: Likewise.
8574 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
8576 * allocatestack.c (allocate_stack): Assume atomic_exchange_and_add
8577 returns the old value.
8579 2003-03-20 Martin Schwidefsky <sky@mschwid3.boeblingen.de.ibm.com>
8581 * sysdeps/s390/pthread_spin_lock.c (pthread_spin_lock): Use type
8582 int for variable OLDVAL and correct inline assembler contraint.
8583 * sysdeps/s390/pthread_spin_trylock.c (pthread_spin_trylock): Use
8584 type int for variable OLD.
8586 * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it
8588 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
8589 (SINGLE_THREAD_P): Use global variable __local_multiple_threads
8590 instead of multiple_threads field in the TCB.
8592 2003-03-19 Ulrich Drepper <drepper@redhat.com>
8594 * sysdeps/i386/i686/bits/atomic.h: Removed.
8595 * sysdeps/i386/i586/bits/atomic.h: Removed.
8596 * sysdeps/i386/i486/bits/atomic.h: Removed. Moved to glibc.
8597 * sysdeps/x86_64/bits/atomic.h: Removed. Moved to glibc.
8598 * sysdeps/s390/bits/atomic.h: Removed. Moved to glibc.
8599 * sysdeps/sh/bits/atomic.h: Removed. Moved to glibc.
8600 * sysdeps/ia64/bits/atomic.h: Removed. Moved to glibc.
8601 * sysdeps/powerpc/bits/atomic.h: Removed. Moved to glibc.
8602 * atomic.h: Removed. Moved to glibc.
8604 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Add
8605 support for clock selection.
8607 * sysdeps/pthread/pthread_cond_broadcast.c: Release lock before
8610 2003-03-18 Roland McGrath <roland@redhat.com>
8612 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
8613 Add __lll_rel_instr first. Add memory clobber.
8614 (lll_mutex_unlock): Use __lll_test_and_set.
8615 From Paul Mackerras <paulus@samba.org>.
8617 * sysdeps/powerpc/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define
8619 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
8620 (SINGLE_THREAD_P): Add `header.' prefix.
8621 From Paul Mackerras <paulus@samba.org>.
8623 * Versions (libpthread: GLIBC_2.3.2): Move pthread_tryjoin_np and
8624 pthread_timedjoin_np to ...
8625 (libpthread: GLIBC_2.3.3): ... here.
8626 (libpthread: GLIBC_2.2): Move pthread_barrierattr_getpshared there too.
8628 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
8629 Avoid shadowing VAL variable.
8631 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
8634 2003-03-18 Ulrich Drepper <drepper@redhat.com>
8636 * Makefile (tests): Add tst-cond11.
8637 * tst-cond11.c: New file.
8639 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Reorder
8640 struct passed to cleanup handler to eliminate one more
8642 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8644 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
8645 (pthrad_cond_t): Replace __unused field with __clock.
8647 * sysdeps/pthread/pthread_cond_wait.c: Release condvar lock before
8648 waken all waiters in cleanup handler.
8649 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8650 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8652 * pthread_condattr_getclock.c: New file.
8653 * pthread_condattr_setclock.c: New file.
8654 * sysdeps/pthread/pthread.h: Declare these new functions.
8655 * Versions [GLIBC_2.3.3] (libpthread): Add the new functions.
8656 * Makefile (libpthread-routines): Add the new functions.
8657 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_condattr):
8658 Renamed field to value. Document use of the bits.
8659 * pthread_condattr_getpshared.c: Adjust for struct pthread_condattr
8661 * pthread_condattr_setpshared.c: Likewise.
8662 * pthread_cond_init.c (__pthread_cond_init): Initialized __clock field.
8663 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add cond_clock symbol.
8664 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
8666 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8667 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
8668 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
8669 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
8670 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
8671 Implement clock selection.
8672 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
8673 * pthread-errnos.sym: Add ENOSYS.
8674 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
8675 _POSIX_CLOCK_SELECTION.
8676 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
8678 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Remove
8679 invalid .size directive.
8681 2003-03-17 Roland McGrath <roland@redhat.com>
8683 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
8686 2003-03-17 Ulrich Drepper <drepper@redhat.com>
8688 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Use __builtin_expect.
8689 Use __lll_add instead of spelling it out. Use protected symbol names.
8690 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Use __builtin_expect.
8692 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_compare_and_swap):
8693 Renamed from lll_compare_and_swap. Use new name where necessary.
8694 (__lll_add): Defined.
8695 (__lll_dec_if_positive): Defined.
8696 (__lll_test_and_set): Defined.
8697 * sysdeps/ia64/pthread_spin_init.c: Removed.
8698 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Removed.
8699 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Removed.
8700 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Removed.
8701 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Removed.
8702 * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: Removed.
8703 * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: Removed.
8704 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Removed.
8705 * sysdeps/ia64/bits/atomic.h: Add __builtin_expect where appropriate.
8706 * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
8707 __sync_lock_release_si.
8708 Patch by Jakub Jelinek.
8710 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
8711 Fix timeout handling.
8712 (__lll_timedwait_tid): Likewise.
8713 (lll_unlock_wake_cb): Wake up other waiters if necessary.
8714 Patch by Jakub Jelinek.
8716 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Pretty printing.
8718 2003-03-17 Roland McGrath <roland@redhat.com>
8720 PowerPC port contributed by Paul Mackerras <paulus@samba.org>.
8721 * sysdeps/pthread/pthread_spin_init.c: New file.
8722 * sysdeps/pthread/pthread_spin_unlock.c: New file.
8723 * sysdeps/powerpc/Makefile: New file.
8724 * sysdeps/powerpc/pthread_spin_lock.c: New file.
8725 * sysdeps/powerpc/pthread_spin_trylock.c: New file.
8726 * sysdeps/powerpc/pthreaddef.h: New file.
8727 * sysdeps/powerpc/tcb-offsets.sym: New file.
8728 * sysdeps/powerpc/td_ta_map_lwp2thr.c: New file.
8729 * sysdeps/powerpc/tls.h: New file.
8730 * sysdeps/powerpc/bits/atomic.h: New file.
8731 * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: New file.
8732 * sysdeps/unix/sysv/linux/libc-lowlevellock.c: New file.
8733 * sysdeps/unix/sysv/linux/lowlevellock.c: New file.
8735 * sysdeps/unix/sysv/linux/lowlevelmutex.c: New file.
8736 * sysdeps/unix/sysv/linux/sem_post.c: New file.
8737 * sysdeps/unix/sysv/linux/sem_timedwait.c: New file.
8738 * sysdeps/unix/sysv/linux/sem_trywait.c: New file.
8739 * sysdeps/unix/sysv/linux/sem_wait.c: New file.
8740 * sysdeps/unix/sysv/linux/powerpc/Makefile: New file.
8741 * sysdeps/unix/sysv/linux/powerpc/createthread.c: New file.
8742 * sysdeps/unix/sysv/linux/powerpc/fork.c: New file.
8743 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: New file.
8744 * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: New file.
8745 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: New file.
8746 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: New file.
8747 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: New file.
8748 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
8749 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New file.
8751 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Use __gettimeofday,
8753 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Likewise.
8754 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
8755 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Likewise.
8756 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Likewise.
8757 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
8759 2003-03-17 Ulrich Drepper <drepper@redhat.com>
8761 * sysdeps/pthread/pthread_cond_wait.c: Correct exit criteria.
8762 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
8763 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8764 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8765 Patch by Ewald Snel <ewald@rambo.its.tudelft.nl>.
8767 2003-03-16 Roland McGrath <roland@redhat.com>
8769 * tst-fork4.c: Include <string.h>.
8770 * tst-signal2.c: Likewise.
8771 * tst-mutex5.c (do_test): exit -> return.
8772 * tst-mutex2.c: Include <stdlib.h>.
8774 2003-03-16 Ulrich Drepper <drepper@redhat.com>
8776 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
8777 (__lll_mutex_timedlock_wait): Correct expected value after
8778 spurious wakeup. Otherwise we would never wait again.
8780 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Work around red
8781 zone versus inline asm stupidity. Use correct instructions.
8783 * tst-rwlock6.c: Add some more status output.
8785 2003-03-15 Roland McGrath <roland@redhat.com>
8787 * sysdeps/pthread/configure.in: New file.
8788 * sysdeps/pthread/configure: New file (generated).
8790 2003-03-15 Ulrich Drepper <drepper@redhat.com>
8792 * allocatestack.c (allocate_stack): Store the exact stack size of
8793 user allocated stacks.
8795 2003-03-15 Jakub Jelinek <jakub@redhat.com>
8797 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
8798 (SINGLE_THREAD): Use `header' prefix instead of `header.data'.
8799 * sysdeps/sh/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
8800 * sysdeps/sh/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define.
8801 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
8802 Use `header.' prefix.
8803 * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
8805 2003-03-15 Ulrich Drepper <drepper@redhat.com>
8807 * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Don't use
8808 __builtin_frame_address, use stack pointer.
8810 * sysdeps/unix/sysv/linux/jmp-unwind.c: Use CURRENT_STACK_FRAME
8811 instead of __builtin_frame_pointer.
8813 2003-03-14 Ulrich Drepper <drepper@redhat.com>
8815 * tst-basic1.c (do_test): Add cast to avoid warning.
8816 * tst-basic2.c (do_test): Likewise.
8818 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use correct
8819 amount of stack correction.
8821 * tst-fork4.c: Use test-skeleton.c.
8823 2003-03-14 Roland McGrath <roland@redhat.com>
8825 * init.c: Fix typo "#eli" for "#else".
8827 2003-03-14 Steven Munroe <sjmunroe@us.ibm.com>
8829 * allocatestack.c (__stack_user): Use hidden_data_def.
8830 * pthread_create.c (__pthread_keys): Likewise.
8832 * init.c [__powerpc__] (__NR_set_tid_address): Define it.
8834 2003-03-14 Roland McGrath <roland@redhat.com>
8836 * tst-fork4.c: New file.
8837 * Makefile (tests): Add it.
8839 * descr.h (struct pthread): Move the union out of [!TLS_DTV_AT_TP], so
8840 we always define the padding space.
8841 [!TLS_DTV_AT_TP]: Give tcbhead_t field a name, `header', since GCC
8842 stopped supporting its own extensions fully.
8843 [TLS_MULTIPLE_THREADS_IN_TCB]: Put `multiple_threads' inside a wrapper
8844 struct also called `header', so `header.multiple_threads' is the field
8845 name to use on all machines.
8846 * allocatestack.c (allocate_stack): Use `header.' prefix.
8847 * sysdeps/pthread/createthread.c (create_thread): Likewise.
8848 * pthread_create.c (__pthread_create_2_1): Likewise.
8849 * sysdeps/i386/tls.h (INSTALL_NEW_DTV, THREAD_DTV): Likewise.
8850 (THREAD_SELF): Likewise.
8851 * sysdeps/x86_64/tls.h: Likewise.
8852 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
8853 (SINGLE_THREAD_P): Likewise.
8854 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
8855 (SINGLE_THREAD_P): Likewise.
8856 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
8857 (SINGLE_THREAD_P): Likewise.
8859 * sysdeps/s390/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Use REGS[18]
8862 2003-03-14 Ulrich Drepper <drepper@redhat.com>
8864 * pthread_create.c (start_thread): Use CALL_THREAD_FCT if defined.
8865 * sysdeps/i386/tls.h: Define CALL_THREAD_FCT.
8867 * pthread_create.c (start_thread): setjmp is expected to return 0.
8869 * sysdeps/x86_64/tls.h (THREAD_GETMEM): Mark asms volatile.
8870 (THREAD_GETMEM_NC): Likewise.
8872 2003-03-13 Ulrich Drepper <drepper@redhat.com>
8874 * allocatestack.c (allocate_stack): If MULTI_PAGE_ALIASING is defined
8875 and the size of the stack which must be allocated is a multiple,
8876 allocate one more page.
8877 * sysdeps/i386/i686/Makefile: Don't define COLORING_INCREMENT, but
8878 MULTI_PAGE_ALIASING.
8880 2003-03-13 Roland McGrath <roland@redhat.com>
8882 * pthread_create.c (start_thread): Set EXITING_BIT after the
8883 event-reporting (and destructors), not before.
8885 2003-03-13 Jakub Jelinek <jakub@redhat.com>
8887 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_timed_wait,
8888 lll_futex_wake): Declare register variables as long int instead of
8889 unsigned long int. Patch by Ian Wienand <ianw@gelato.unsw.edu.au>.
8890 Make syscall arguments clobbered by the syscall.
8891 (lll_futex_wait): Define using lll_futex_timed_wait.
8893 * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Cast regs[13]
8896 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Only declare and set
8899 * allocatestack.c (nptl_ncreated): Only declare if
8900 COLORING_INCREMENT != 0.
8902 * pthreadP.h (__pthread_enable_asynccancel_2): New prototype.
8903 (__libc_enable_asynccancel_2): Remove prototype.
8905 * sysdeps/unix/sysv/linux/ia64/fork.c (ARCH_FORK): Swap ptid and
8906 ctid to match kernel.
8908 2003-03-12 Ulrich Drepper <drepper@redhat.com>
8910 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add
8911 libc_multiple_threads.
8912 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Move definition of
8913 __libc_multiple_threads to...
8914 * sysdeps/unix/sysv/linux/libc_multiple_threads.c: ...here. New file.
8916 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Remove unnecessary
8918 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
8919 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
8921 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
8922 (__pthread_once_internal): Define.
8924 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Use shlib-compat.h
8925 macros instead of .symver directly.
8926 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
8927 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
8929 * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Include tcb-offsets.h.
8930 * sysdeps/x86_64/tcb-offsets.sym: New file.
8931 * sysdeps/x86_64/Makefile: New file.
8933 * sysdeps/i386/tcb-offsets.sym: Add SELF.
8934 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use SELF
8935 to access own pthread_t in TCB.
8936 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8938 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8940 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8942 2003-03-12 Roland McGrath <roland@redhat.com>
8944 * pthread-errnos.sym: New file.
8945 * Makefile (gen-as-const-headers): New variable, list that file.
8946 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include generated
8947 header <pthread-errnos.h> instead of defining errno values here.
8948 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
8949 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
8950 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
8951 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8952 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8954 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8956 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
8957 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8958 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
8959 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
8960 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
8961 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
8962 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
8963 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
8964 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8965 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
8966 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
8967 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
8968 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
8969 * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
8970 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
8971 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
8972 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
8973 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
8974 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
8975 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
8976 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
8977 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
8978 * sysdeps/i386/i486/pthread_spin_trylock.S: Likewise.
8979 * sysdeps/x86_64/pthread_spin_trylock.S: Likewise.
8980 * sysdeps/sh/pthread_spin_trylock.S: Likewise.
8981 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
8982 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
8984 * sysdeps/unix/sysv/linux/fork.c: Add an assert to check that
8985 CLONE_CHILD_SETTID worked.
8987 2003-03-12 Ulrich Drepper <drepper@redhat.com>
8989 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: New
8991 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S: New
8994 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
8995 (pthread_cond_t): Add padding.
8997 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: New file.
8998 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: New file.
8999 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: New file.
9001 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
9002 (__pthread_rwlock_timedwrlock): Add missing opcode suffix.
9003 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
9004 (__pthread_rwlock_timedrdlock): Likewise.
9005 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
9006 (__pthread_rwlock_wrlock): Likewise.
9007 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
9008 (__pthread_rwlock_rdlock): Likewise.
9010 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: New file.
9012 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Return
9013 result of lock re-get if it fails.
9015 2003-03-11 Ulrich Drepper <drepper@redhat.com>
9017 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Fix asm syntax.
9018 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
9019 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
9020 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
9021 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
9022 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
9023 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
9024 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
9025 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
9026 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
9028 * sysdeps/x86_64/tls.h (THREAD_SELF, THREAD_GETMEM, THREAD_GETMEM_NC,
9029 THREAD_SETMEM, THREAD_SETMEM_NC): Correct asm syntax.
9031 * allocatestack.c [! TLS_MULTIPLE_THREADS_IN_TCB] (allocate_stack):
9032 Initialize *__libc_multiple_threads_ptr not __libc_multiple_threads.
9033 * sysdeps/pthread/createthread.c [! TLS_MULTIPLE_THREADS_IN_TCB]
9034 (create_thread): Likewise.
9035 Define __pthread_multiple_threads and __libc_multiple_threads_ptr.
9036 * init.c (__pthread_initialize_minimal_internal): Initialize
9037 __libc_multiple_threads_ptr if necessary.
9038 * pthreadP.h: Adjust prototype for __libc_pthread_init. Declare
9039 __pthread_multiple_threads and __libc_multiple_threads_ptr.
9040 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Define
9041 __libc_multiple_threads.
9042 (__libc_pthread_init): Return pointer to __libc_pthread_init if
9045 * sysdeps/i386/tls.h (THREAD_SETMEM): Fix one-byte variant.
9046 (THREAD_SETMEM_NC): Likewise.
9048 * sysdeps/x86_64/pthread_spin_trylock.c: Removed.
9049 * sysdeps/x86_64/pthread_spin_trylock.S: New file.
9050 * sysdeps/x86_64/pthread_spin_unlock.c: Removed.
9051 * sysdeps/x86_64/pthread_spin_unlock.S: New file.
9053 * sysdeps/i386/i486/pthread_spin_trylock.S (pthread_spin_trylock):
9054 Eliminate one entire instruction.
9056 * cancellation.c (__pthread_enable_asynccancel_2): New function.
9057 * pthreadP.h: Declare __pthread_enable_asynccancel_2.
9058 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
9059 (__pthread_cond_timedwait): Use __pthread_enable_asynccancel_2
9060 instead of __pthread_enable_asynccancel.
9061 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
9062 (__pthread_cond_wait): Likewise.
9063 * sysdeps/pthread/pthread_cond_timedwait.c
9064 (__pthread_cond_timedwait): Likewise.
9065 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
9067 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
9068 (__condvar_cleanup): Wake up all waiters in case we got signaled
9069 after being woken up but before disabling asynchronous
9071 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
9072 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
9073 (__condvar_cleanup): Likewise.
9075 * init.c (__NR_set_tid_address): If already defined, don't redefine.
9076 Make it an error if architecture has no #if case. Add x86-64.
9078 * sysdeps/unix/sysv/linux/x86_64/Makefile: Add flags for
9079 pt-initfini.s generation.
9081 * sysdeps/x86_64/tls.h: Include <asm/prctl.h>.
9082 (TLS_INIT_TP): Fix typo.
9084 2003-03-11 Jakub Jelinek <jakub@redhat.com>
9086 * sysdeps/ia64/bits/atomic.h (atomic_exchange_and_add): Swap 2nd and
9087 3rd argument of __arch_compare_and_exchange_{32,64}_val_acq.
9089 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Include semaphore.h.
9090 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
9091 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Likewise.
9092 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Likewise.
9093 * sysdeps/unix/sysv/linux/s390/sem_post.c: Likewise.
9094 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
9095 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
9096 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
9098 2003-03-11 Ulrich Drepper <drepper@redhat.com>
9100 * sysdeps/pthread/pthread_cond_timedwait.c
9101 (__pthread_cond_timedwait): Return the result of the final
9102 locking. If it succeeds, the regular function return value.
9104 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait):
9105 Return result of the final locking.
9106 * version.c (__nptl_main): Work around problems with the strange
9107 INTERNAL_SYSCALL macro on ppc32.
9108 * init.c (__pthread_initialize_minimal_internal): Unblock
9109 SIGCANCEL in case the parent blocked it.
9110 Reported by Paul Mackerras <paulus@samba.org>.
9112 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: New file.
9113 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: New file.
9114 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: New file.
9116 2003-03-11 Jakub Jelinek <jakub@redhat.com>
9118 * sysdeps/pthread/pthread_cond_timedwait.c
9119 (__pthread_cond_timedwait): Unlock and fail if
9120 __pthread_mutex_unlock_internal failed.
9122 * sysdeps/pthread/createthread.c (ARCH_CLONE): Define if not defined.
9123 (create_thread): Only assert PD->tcb != NULL under [TLS_TCB_AT_TP].
9125 * allocatestack.c (ALLOCATE_STACK_PARMS): New macro.
9126 [NEED_SEPARATE_REGISTER_STACK] (STACK_VARIABLES,
9127 STACK_VARIABLES_ARGS, STACK_VARIABLES_PARMS, ALLOCATE_STACK_PARMS,
9128 ALLOCATE_STACK): New macros.
9129 (TLS_TPADJ): New macro.
9130 (get_cached_stack, queue_stack, __deallocate_stack): Use TLS_TPADJ.
9131 (allocate_stack): Handle TLS_DTV_AT_TP and
9132 NEED_SEPARATE_REGISTER_STACK. Use TLS_TPADJ.
9133 * pthread_create.c (__pthread_create_2_1) [! TLS_TCB_AT_TP]:
9135 * init.c [__ia64__] (__NR_set_tid_address): Define.
9137 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: New file.
9138 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: New file.
9139 * sysdeps/unix/sysv/linux/ia64/fork.c: New file.
9140 * sysdeps/unix/sysv/linux/ia64/createthread.c: New file.
9141 * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: New file.
9142 * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: New file.
9143 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: New file.
9144 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: New file.
9145 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: New file.
9146 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
9147 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: New file.
9148 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: New file.
9149 * sysdeps/unix/sysv/linux/ia64/sem_post.c: New file.
9150 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: New file.
9151 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: New file.
9152 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: New file.
9153 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
9154 * sysdeps/ia64/bits/atomic.h: New file.
9155 * sysdeps/ia64/Makefile: New file.
9156 * sysdeps/ia64/pthread_spin_init.c: New file.
9157 * sysdeps/ia64/pthread_spin_lock.c: New file.
9158 * sysdeps/ia64/pthread_spin_trylock.c: New file.
9159 * sysdeps/ia64/pthread_spin_unlock.c: New file.
9160 * sysdeps/ia64/pthreaddef.h: New file.
9161 * sysdeps/ia64/tcb-offsets.sym: New file.
9162 * sysdeps/ia64/td_ta_map_lwp2thr.c: New file.
9163 * sysdeps/ia64/tls.h: New file.
9165 * sysdeps/s390/pthreaddef.h (__exit_thread_inline): Pass 1 argument
9166 to syscall instead of no arguments.
9168 2003-03-10 Ulrich Drepper <drepper@redhat.com>
9170 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: New file.
9171 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: New file.
9172 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: New file.
9173 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: New file.
9175 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Fix error value in
9178 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: New file
9180 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
9181 lowlevelbarrier.sym.
9182 * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: New file.
9183 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S:
9184 Include lowlevelbarrier.h and don't define offsets locally.
9185 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Likewise.
9187 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
9188 (__lll_mutex_lock_wait): Reverse order of first two parameters.
9189 (__lll_mutex_timedlock_wait): Likewise.
9190 (lll_mutex_lock): Adjust asm for that.
9191 (lll_mutex_timedlock): Likewise. Mark cx, cc, r10 as clobbered.
9192 (lll_lock): Adjust asm for operand order change.
9193 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: New file.
9194 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: New file.
9196 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_lock_wait):
9197 Reverse order of parameters.
9198 (__lll_timedwait_tid): Remove regparms attribute.
9199 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: New file.
9200 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: New file.
9202 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
9203 (__lll_timedwait_tid): Remove one unnecessary instruction.
9205 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Define
9206 __lll_mutex_timedlock_wait only for NOT_IN_libc.
9207 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Include
9210 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
9211 lll_unlock_wake_cb, __lll_wait_tid, and __lll_timedwait_tid only
9213 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Include
9216 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Don't define
9217 LOCK is already defined. Don't define __lll_mutex_timedlock_wait
9219 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Only
9220 define LOCK here (if UP is not defined). The actual code is in
9223 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Don't define
9224 LOCK is already defined. Don't define lll_unlock_wake_cb and
9225 __lll_timedwait_tid for libc.so.
9226 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Only
9227 define LOCK here (if UP is not defined). The actual code is in
9230 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Not needed anymore.
9231 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: Likewise.
9232 * sysdeps/unix/sysv/linux/s390/sem_post.c: Include lowlevellock.h
9233 instead of lowlevelsem.h.
9234 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
9235 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
9236 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
9238 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
9240 * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: New file.
9241 * sysdeps/unix/sysv/linux/i386/lowlevelrwlock.h: Removed.
9242 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: Removed.
9244 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_trylock): Fix
9246 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_trylock): Undo
9249 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: New file.
9251 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove declaration
9252 of __libc_locking_needed.
9253 (lll_trylock): Initialize %eax to zero.
9255 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Update
9256 pthread_cond_t definition.
9258 2003-03-10 Roland McGrath <roland@redhat.com>
9260 * sysdeps/unix/sysv/linux/lowlevelcond.sym: New file.
9261 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add it.
9262 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: File removed.
9263 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: Likewise.
9264 * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: Likewise.
9266 * allocatestack.c (allocate_stack) [!TLS_MULTIPLE_THREADS_IN_TCB]:
9267 Instead of setting PD->multiple_threads, set globals
9268 __pthread_multiple_threads and __libc_multiple_threads.
9269 * sysdeps/pthread/createthread.c (create_thread): Likewise.
9270 * sysdeps/i386/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it.
9271 * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Likewise.
9273 * descr.h (struct pthread): Conditionalize first member on
9274 [!TLS_DTV_AT_TP]. Replace the `header' member with an anonymous union
9275 containing an anonymous tcbhead_t. Move `list' member out.
9276 [TLS_MULTIPLE_THREADS_IN_TCB]: Define a `multiple_threads' member.
9277 * allocatestack.c: Remove use of `header.data.' prefix.
9278 * pthread_create.c: Likewise.
9279 * init.c (__pthread_initialize_minimal_internal): Likewise.
9280 * sysdeps/pthread/createthread.c (create_thread): Likewise.
9281 * sysdeps/i386/tls.h (INSTALL_DTV): Add parens.
9282 (THREAD_SELF, THREAD_DTV, INSTALL_NEW_DTV): No `header.data.' prefix.
9283 * sysdeps/x86_64/tls.h: Likewise.
9284 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
9285 (SINGLE_THREAD_P): Likewise.
9286 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
9287 (SINGLE_THREAD_P): Likewise.
9288 * sysdeps/i386/tls.h (tcbhead_t): Remove `list' member.
9289 * sysdeps/s390/tls.h (tcbhead_t): Likewise.
9291 2003-03-09 Ulrich Drepper <drepper@redhat.com>
9293 * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: New file.
9295 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
9296 * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
9298 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix many
9299 leftovers from the ia32 code.
9301 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Remove unneccessary
9303 (clear_once_control): Don't load %esi.
9305 * sysdeps/x86_64/tls.h: Remove all traces of segment descriptor
9308 * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
9310 * sysdeps/unix/sysv/linux/s390/createthread.c: Moved to...
9311 * sysdeps/unix/sysv/linux/createthread.c: ...here.
9313 * Makefile (tests): Add tst-cond10.
9314 * tst-cond10.c: New file.
9316 2003-03-08 Ulrich Drepper <drepper@redhat.com>
9318 * tst-tls2.c (do_test): Add TEMP_FAILURE_RETRY around sem_wait call.
9319 * tst-signal3.c (do_test): Likewise.
9320 * tst-sem5.c (do_test): Likewise.
9321 * tst-kill6.c (do_test): Likewise.
9322 * tst-tls3.c (do_test): Likewise. Include <errno.h>.
9324 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use add/sub instead
9326 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
9327 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise
9328 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
9329 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
9330 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
9331 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
9332 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
9334 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
9336 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
9337 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
9338 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9339 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
9340 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
9341 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
9342 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
9343 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
9345 * allocatestack.c (allocate_stack): If mprotect() fails free the
9348 2003-03-07 Ulrich Drepper <drepper@redhat.com>
9350 * sysdeps/i386/i486/bits/atomic.h: Fix a few unused definitions.
9352 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove all trace of
9353 lll_wake_tid. This was used only to work around kernel limits in
9355 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
9356 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Likewise.
9357 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
9358 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
9360 * init.c (__static_tls_align_m1): Renamed from __static_tls_align.
9361 (__pthread_initialize_minimal_internal): Change initialization of
9362 __static_tls_align_m1 appropriately.
9363 * pthreadP.h (__static_tls_align_m1): Renamed from
9365 * allocatestack.c (allocate_stack): Use __static_tls_align_m1
9366 instead of __static_tls_align-1.
9368 2003-03-04 Ulrich Drepper <drepper@redhat.com>
9370 * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
9372 * pthread_create.c: Define __pthread_keys using nocommon
9373 attribute, not by placing it explicitly in bss.
9374 Remove DEFINE_DEALLOC definition. Not needed anymore.
9376 * allocatestack.c: Define ARCH_MAP_FLAGS if not already defined.
9377 Use it in mmap call to allocate stacks.
9379 * sysdeps/pthread/createthread.c (create_thread): Fix comment.
9381 * pthread_create.c (start_thread): Use THREAD_SETMEM to store
9382 result of the thread function.
9384 2003-03-03 Ulrich Drepper <drepper@redhat.com>
9386 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: Removed. The generic
9387 version is just fine.
9389 * sysdeps/unix/sysv/linux/libc_pthread_init.c
9390 (__pthread_child_handler): Renamed from pthread_child_handler,
9391 exported, and marked hidden. Change all users.
9392 * sysdeps/unix/sysv/linux/register-atfork.c (free_mem): Do not
9393 free __pthread_child_handler from child list.
9395 2003-03-03 Martin Schwidefsky <schwidefsky@de.ibm.com>
9397 * atomic.h (atomic_exchange_and_add): Return newval, not oldval.
9399 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
9400 Fix handling of cancellation and failing pthread_mutex_unlock call.
9401 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
9402 (__pthread_cond_wait): Likewise.
9404 * sysdeps/pthread/pthread_rwlock_timedrdlock.c
9405 (pthread_rwlock_timedrdlock): Fix clobber of result variable by
9406 lll_futex_timed_wait call.
9407 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
9408 (pthread_rwlock_timedwrlock): Likewise.
9410 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
9411 Don't define lll_unlock_wake_cb and ___lll_timedwait_tid in libc.so.
9412 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Remove XXX comments.
9414 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Fix
9415 check of lll_futex_wake return value.
9417 2003-03-03 Roland McGrath <roland@redhat.com>
9419 * forward.c: Fix typo in __pthread_attr_init_2_0 compat_symbol decl.
9421 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
9422 Argument to ptr___pthread_cleanup_upto is __jmp_buf, not jmp_buf.
9423 * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
9425 2003-03-02 Ulrich Drepper <drepper@redhat.com>
9427 * sysdeps/pthread/timer_create.c (timer_create): Return correct
9428 error for CPU clocks.
9430 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
9431 _POSIX_MONOTONIC_CLOCK.
9432 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
9434 * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
9437 2003-03-01 Ulrich Drepper <drepper@redhat.com>
9439 * descr.h (struct pthread): Move cleanup field to the front.
9441 2003-03-01 Roland McGrath <roland@redhat.com>
9443 * sem_open.c (sem_open): Braino fix.
9445 2003-03-01 Ulrich Drepper <drepper@redhat.com>
9447 * sysdeps/i386/tcb-offsets.sym: Add CLEANUP and CLEANUP_PREV.
9448 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Inline
9449 __pthread_cleanup_pop functionality.
9450 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9452 * descr.h (struct pthread): Move tid field to the front now that
9455 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S
9456 (__lll_mutex_timedlock_wait): Remove.
9457 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
9458 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
9459 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
9460 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
9461 (lll_unlock_wake_cb): Don't save and restore %esi.
9462 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
9464 (__lll_timedwait_tid): Add alignment.
9465 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
9466 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
9468 (__lll_timedwait_tid): Removed.
9469 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
9470 (__pthread_cond_broadcast): Don't save, load, and restore %esi.
9471 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
9472 (pthread_barrier_wait): Don't save, load, and restore %esi for
9474 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
9475 (__pthread_cond_signal): Don't save, load, and restore %esi.
9476 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
9477 (__pthread_rwlock_unlock): Don't save, load, and restore %esi.
9478 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
9479 Don't save, load, and restore %esi.
9481 2003-02-27 Ulrich Drepper <drepper@redhat.com>
9483 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
9484 Release lock before waking up the waiters.
9486 * tst-exit1.c (do_test): Don't start more than one thread in parallel.
9488 * tst-rwlock9.c (writer_thread): Correct adding TIMEOUT.
9489 (reader_thread): Likewise.
9491 * sysdeps/pthread/pthread_rwlock_unlock.c
9492 (__pthread_rwlock_unlock): Release internal lock early. Don't try
9493 to wake up readers if there are none.
9495 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
9496 Release internal lock before wake threads.
9498 2003-02-26 Ulrich Drepper <drepper@redhat.com>
9500 * Makefile (tests): Add tst-rwlock10 and tst-rwlock11.
9501 * tst-rwlock8.c: Initialize lock with INIT. Allow INIT to be
9503 * tst-rwlock9.c: Likewise.
9504 * tst-rwlock10.c: New file.
9505 * tst-rwlock11.c: New file.
9507 * Makefile (tests): Add tst-dlsym1.
9508 * tst-dlsym1.c: New file.
9510 * init.c (__pthread_initialize_minimal_internal): Set
9511 GL(dl_error_catch_tsd) to __libc_dl_error_tsd.
9512 * Versions (libc:GLIBC_PRIVATE): Export __libc_dl_error_tsd.
9514 2003-02-24 Ulrich Drepper <drepper@redhat.com>
9516 * sem_open.c (sem_open): Fix handling of O_CREAT without O_EXCL.
9518 * tst-cond2.c: Fix sychronization with child.
9520 * tst-rwlock8.c (reader_thread): Remove unused variable.
9522 * Makefile: Add rules to build and run tst-tls3.
9523 * tst-tls3.c: New file.
9524 * tst-tls3mod.c: New file.
9526 * Makefile (tests): Add tst-rwlock8 and tst-rwlock9.
9527 * tst-rwlock8.c: New file.
9528 * tst-rwlock9.c: New file.
9529 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Fix
9530 complete broken rwlock implementation.
9531 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
9533 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
9535 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
9536 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
9537 * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
9538 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
9539 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
9540 * sysdeps/pthread/pthread_rwlock_unlock.c: Likewise.
9541 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
9543 2003-02-23 Roland McGrath <roland@redhat.com>
9545 * Makefile (nptl-version): Change regexp so case sensitivity is ok.
9547 2003-02-23 Ulrich Drepper <drepper@redhat.com>
9549 * Makefile (tests): Add tst-context1.
9550 * tst-context1.c: New file.
9552 * Makefile (tests): Add tst-tls1 and tst-tls2.
9553 * tst-tls1.c: New file.
9554 * tst-tls2.c: New file.
9556 * libc-cancellation.c (__libc_enable_asynccancel): Correct test
9559 * pthread_create.c (start_thread): Set EXITING_BIT early.
9561 * sysdeps/i386/tls.h (THREAD_GETMEM): Mark asm as volatile.
9562 (THREAD_GETMEM_NC): Likewise.
9564 2003-02-22 Ulrich Drepper <drepper@redhat.com>
9566 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Shave
9567 off 3 more bytes by using offset-less instructions when possible.
9569 * Makefile: Add dependency for $(objpfx)version.d.
9571 * eintr.c (eintr_source): Add unnecessary return but the compiler
9574 * tst-kill3.c: Include <unistd.h>.
9576 2003-02-21 Roland McGrath <roland@redhat.com>
9578 * pthread_create.c (start_thread): Call __libc_thread_freeres.
9580 2003-02-21 Ulrich Drepper <drepper@redhat.com>
9582 * Makefile (tests): Add tst-eintr1.
9583 (distribute): Add eintr.c.
9584 * tst-eintr1.c: New file.
9585 * eintr.c: New file.
9587 * pthread_cancel.c (pthread_cancel): Use tkill directly.
9589 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill):
9590 Disallow sending SIGCANCEL.
9592 * Makefile (tests): Remove tst-basic7. Add tst-kill1, tst-kill2,
9593 tst-kill3, tst-kill4, tst-kill5, tst-kill6.
9594 * tst-kill1.c: New file.
9595 * tst-kill2.c: New file.
9596 * tst-kill3.c: New file.
9597 * tst-kill5.c: New file.
9598 * tst-kill6.c: New file.
9599 * tst-basic7.c: Renamed to...
9600 * tst-kill4.c: ...this.
9602 2003-02-21 Roland McGrath <roland@redhat.com>
9604 * Makefile (install-lib-ldscripts): New variable.
9606 2003-02-21 Ulrich Drepper <drepper@redhat.com>
9608 * pthreadP.h: Define INVALID_TD_P and INVALID_NOT_TERMINATED_TD_P.
9609 * pthread_cancel.c: Use INVALID_TD_P.
9610 * pthread_detach.c: Likewise.
9611 * pthread_getschedparam.c: Likewise.
9612 * pthread_setschedparam.c: Likewise.
9613 * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
9614 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
9615 * pthread_join.c: Use INVALID_NOT_TERMINATED_TD_P.
9616 * pthread_timedjoin.c: Likewise.
9618 * tst-basic7.c: Include <signal.h>.
9620 * pthread_join.c (pthread_join): Limited checking for invalid
9622 * pthread_timedjoin.c (pthread_timedjoin_np): Likewise.
9624 2003-02-20 Ulrich Drepper <drepper@redhat.com>
9626 * pthread_create.c (deallocate_tsd): Reset found_nonzero at the
9627 beginning of the loop. Clear the entire first block of TSD.
9628 * Makefile (tests): Add tst-key4.
9629 * tst-key4.c: New file.
9631 2003-02-18 Ulrich Drepper <drepper@redhat.com>
9633 * Makefile (tests): Add tst-basic7.
9634 * tst-basic7.c: New file.
9636 * pthread_create.c (deallocate_tsd): Mark as internal_function.
9637 Add some more __builtin_expect.
9639 * pthreadP.h: Define dummy version of DEBUGGING_P.
9641 2003-02-17 Ulrich Drepper <drepper@redhat.com>
9643 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remnove
9644 _POSIX_THREAD_PRIORITY_SCHEDULING.
9645 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
9646 _XOPEN_REALTIME_THREADS.
9647 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
9649 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): The
9650 kernel returns EINVAL for PID <= 0, work around it.
9652 * Makefile (tests): Add tst-signal5.
9653 * tst-signal5.c: New file.
9655 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
9658 * tst-cancel1.c (tf): Block all signals.
9660 * Makefile (tests): Add tst-basic6.
9661 * tst-basic6.c: New file.
9663 * tst-basic1.c: Add test for process ID.
9665 * Makefile (tests): Add tst-cancel10.
9666 * tst-cancel10.c: New file.
9668 * Makefile (tests): Add tst-signal4.
9669 * tst-signal4.c: New file.
9671 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use
9672 __sigismember instead of sigismember. Add __builtin_expect.
9674 2003-02-16 Ulrich Drepper <drepper@redhat.com>
9676 * tst-attr1.c (do_test): Add tests for pthread_setcanceltype,
9677 pthread_setcancelstate, and pthread_rwlock_setpshared.
9679 * tst-cancel7.c (do_test): Make sure the pid file exists before
9680 canceling the thread.
9682 * tst-rwlock6.c: More pthread_rwlock_timedwrlock and
9683 pthread_rwlock_timedrdlock tests.
9684 * tst-rwlock7.c: More pthread_rwlock_timedwrlock tests.
9685 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
9686 Check for invalid tv_nsec field.
9687 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
9690 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Protect
9691 recursive mutex of overflow.
9693 * tst-attr1.c (do_test): Add test for pthread_mutexattr_setpshared.
9695 * libc-cancellation.c (__libc_enable_asynccancel): Rewrite to avoid
9696 going into an endless loop.
9697 * Makefile (tests): Add tst-cancel9.
9698 * tst-cancel9.c: New file.
9700 * pthread_cancel.c (pthread_cancel): Use the result of __pthread_kill.
9702 2003-02-15 Ulrich Drepper <drepper@redhat.com>
9704 * tst-mutex5.c (do_test): Add more timedlock tests.
9706 * tst-mutex2.c: Tests of trylock and unlock with ERROR mutexes.
9707 * tst-mutex3.c (do_test): Add tests for trylock with RECURSIVE mutexes.
9709 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
9710 use INLINE_SYSCALL. Error number is returned, not -1.
9712 * pthreadP.h: Mark declarations of __find_in_stack_list, __free_tcb,
9713 and __deallocate_stack with internal_function.
9714 * pthread_create.c: Adjust definitions appropriately.
9715 * allocatestack.c: Likewise.
9717 * pthread_join.c: Add one more __builtin_expect.
9718 * pthread_timedjoin.c: Likewise.
9720 * pthread_getspecific.c (__pthread_getspecific): Clear data->data
9721 not data of sequence number does not match.
9722 Add one __builtin_expect.
9724 * Makefile (tests): Add tst-clock1.
9725 * tst-clock1.c: New file.
9727 * pthread_setconcurrency.c (pthread_setconcurrency): Fail for
9729 * Makefile (tests): Add tst-basic5.
9730 * tst-basic5.c: New file.
9732 2003-02-14 Ulrich Drepper <drepper@redhat.com>
9734 * Makefile (tests): Add tst-basic4.
9735 * tst-basic4.c: New file.
9737 * pthreadP.h: Add declaraction for __nptl_nthreads.
9738 * pthread_create.c: Define __nptl_nthreads
9739 (start_thread): Increment __nptl_nthreads at beginning. Decrement
9740 after thread is done. If then zero, call exit(0).
9741 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
9742 Add ptr_nthreads. Define HAVE_PTR_NTHREADS.
9743 * init.c (pthread_functions): Initialize ptr_nthreads.
9744 * allocatestack.c (nptl_nthreads): Remove definition and all uses.
9745 (__reclaim_stacks): Decrement __nptl_nthreads.
9746 * sysdeps/pthread/Makefile [$(subdir)==csu] (CFLAGS-libc-start.c):
9748 * Makefile (tests): Add tst-basic3.
9749 * tst-basic3.c: New file.
9751 * descr.h: Define CANCELING_BIT and CANCELING_BITMASK. Introduce
9752 after CANCELTYPE_BIT, move the other bits up. Update CANCEL_RESTMASK.
9753 * init.c (sigcancel_handler): Also set CANCELING_BITMASK bit in newval.
9754 * pthread_cancel.c (pthread_cancel): Likewise. Also set CANCELING_BIT
9755 if asynchronous canceling is enabled.
9756 * pthread_join.c (pthread_join): When recognizing circular joins,
9757 take into account the other thread might be already canceled.
9758 * Makefile (tests): Add tst-join5.
9759 * tst-join5.c: New file.
9761 * Makefile (tests): Add tst-join4.
9762 * tst-join4.c: New file.
9764 2003-02-13 Ulrich Drepper <drepper@redhat.com>
9766 * tst-cond4.c (main): Add test of pthread_attr_getpshared.
9768 2003-02-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
9770 * sysdeps/s390/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM,
9771 THREAD_SETMEM_NC): Use passed descr instead of THREAD_SELF.
9772 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind): Avoid
9774 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Include <sys/time.h>
9776 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Return
9777 error if lll_futex_wake failed.
9779 2003-02-13 Ulrich Drepper <drepper@redhat.com>
9781 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Fix
9782 handling of cancellation and failung pthread_mutex_unlock call.
9783 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9784 * Makefile (tests): Add tst-cond8 and tst-cond9.
9785 * tst-cond8.c: New file.
9786 * tst-cond9.c: New file.
9788 * tst-cond7.c (do_test): Unlock the mutex before canceling the thread.
9790 * sysdeps/pthread/pthread.h: Add missing initializers. Protect
9791 non-standard initializers with __USE_GNU.
9793 * Makefile (tests): Add tst-cleanup3.
9794 * tst-cleanup3.c: New file.
9796 2003-02-12 Ulrich Drepper <drepper@redhat.com>
9798 * Makefile (tests): Add tst-attr1 and tst-attr2.
9799 * tst-attr1.c: New file.
9800 * tst-attr2.c: New file.
9802 * Makefile: Add rules to build and run tst-atfork2 test.
9803 * tst-atfork2.c: New file.
9804 * tst-atfork2mod.c: New file.
9806 * sysdeps/unix/sysv/linux/unregister-atfork.c
9807 (__unregister_atfork): Free the memory allocated for the handlers
9808 after removing them from the lists.
9810 * sysdeps/unix/sysv/linux/register-atfork.c: Define memeory
9813 * tst-atfork1.c (do_test): Wait for the child we forked.
9814 Report error in child.
9816 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Fix comment.
9818 * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
9820 2003-02-10 Ulrich Drepper <drepper@redhat.com>
9822 * Makefile (tests): Add tst-cancel8.
9823 * tst-cancel8.c: New file.
9825 * sysdeps/unix/sysv/linux/i386/pthread_once.S (clear_once_control): Fix
9826 clearing of control variable.
9827 * Makefile (tests): Add tst-once3 and tst-once4.
9828 * tst-once3.c: New file.
9829 * tst-once4.c: New file.
9831 2003-02-08 kaz Kojima <kkojima@rr.iij4u.or.jp>
9833 * sysdeps/sh/Makefile: New file.
9834 * sysdeps/sh/bits/atomic.h: New file.
9835 * sysdeps/sh/pthread_spin_init.c: New file.
9836 * sysdeps/sh/pthread_spin_lock.c: New file.
9837 * sysdeps/sh/pthread_spin_trylock.S: New file.
9838 * sysdeps/sh/pthread_spin_unlock.S: New file.
9839 * sysdeps/sh/pthreaddef.h: New file.
9840 * sysdeps/sh/tcb-offsets.sym: New file.
9841 * sysdeps/sh/td_ta_map_lwp2thr.c: New file.
9842 * sysdeps/sh/tls.h: New file.
9843 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: New file.
9844 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: New file.
9845 * sysdeps/unix/sysv/linux/sh/createthread.c: New file.
9846 * sysdeps/unix/sysv/linux/sh/fork.c: New file.
9847 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: New file.
9848 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: New file.
9849 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h: New file.
9850 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: New file.
9851 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: New file.
9852 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: New file.
9853 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: New file.
9854 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: New file.
9855 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
9856 * sysdeps/unix/sysv/linux/sh/pt-vfork.S: New file.
9857 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: New file.
9858 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: New file.
9859 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: New file.
9860 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: New file.
9861 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: New file.
9862 * sysdeps/unix/sysv/linux/sh/pthread_once.S: New file.
9863 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: New file.
9864 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: New file.
9865 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: New file.
9866 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: New file.
9867 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: New file.
9868 * sysdeps/unix/sysv/linux/sh/sem_post.S: New file.
9869 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: New file.
9870 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: New file.
9871 * sysdeps/unix/sysv/linux/sh/sem_wait.S: New file.
9872 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
9874 2003-02-08 Ulrich Drepper <drepper@redhat.com>
9876 * tst-cond2.c: Rearrange code to not rely on behavior undefined
9879 * tst-basic2.c (do_test): Lock mutex before creating the thread.
9881 2003-02-07 Ulrich Drepper <drepper@redhat.com>
9883 * sysdeps/x86_64/tls.h: Remove unnecessary macros, left over from x86.
9884 (TLS_GET_FS): New #define.
9885 (TLS_SET_FS): New #define.
9886 Correct value of __NR_set_thread_area.
9888 * sysdeps/x86_64/td_ta_map_lwp2thr.c: New file.
9890 2003-02-06 Ulrich Drepper <drepper@redhat.com>
9892 * Makefile (tests): Add tst-popen1.
9893 * tst-popen1.c: New file.
9895 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Remove wrong
9896 but inactive generalization.
9897 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9898 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
9899 Minor optimization, remove one instruction.
9900 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
9902 2003-02-04 Martin Schwidefsky <schwidefsky@de.ibm.com>
9904 * sysdeps/unix/sysv/linux/s390/fork.c: Correct order of parameters.
9906 2003-01-31 Martin Schwidefsky <schwidefsky@de.ibm.com>
9908 * init.c (__NR_set_tid_address): Add #ifdef for s390.
9909 * sysdeps/pthread/pthread_barrier_wait.c: New file.
9910 * sysdeps/pthread/pthread_cond_broadcast.c: New file.
9911 * sysdeps/pthread/pthread_cond_signal.c: New file.
9912 * sysdeps/pthread/pthread_cond_timedwait.c: New file.
9913 * sysdeps/pthread/pthread_cond_wait.c: New file.
9914 * sysdeps/pthread/pthread_rwlock_rdlock.c: New file.
9915 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: New file.
9916 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: New file.
9917 * sysdeps/pthread/pthread_rwlock_unlock.c: New file.
9918 * sysdeps/pthread/pthread_rwlock_wrlock.c: New file.
9919 * sysdeps/s390/Makefile: New file.
9920 * sysdeps/s390/bits/atomic.h: New file.
9921 * sysdeps/s390/pthread_spin_init.c: New file.
9922 * sysdeps/s390/pthread_spin_lock.c: New file.
9923 * sysdeps/s390/pthread_spin_trylock.c: New file.
9924 * sysdeps/s390/pthread_spin_unlock.c: New file.
9925 * sysdeps/s390/pthreaddef.h: New file.
9926 * sysdeps/s390/tcb-offsets.sym: New file.
9927 * sysdeps/s390/td_ta_map_lwp2thr.c: New file.
9928 * sysdeps/s390/tls.h: New file.
9929 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: New file.
9930 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: New file.
9931 * sysdeps/unix/sysv/linux/s390/createthread.c: New file.
9932 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: New file.
9933 * sysdeps/unix/sysv/linux/s390/fork.c: New file.
9934 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: New file.
9935 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
9936 * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: New file.
9937 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: New file.
9938 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: New file.
9939 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: New file.
9940 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: New file.
9941 * sysdeps/unix/sysv/linux/s390/pthread_once.c: New file.
9942 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: New file.
9943 * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: New file.
9944 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
9945 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
9946 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: New file.
9947 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
9948 * sysdeps/unix/sysv/linux/s390/sem_post.c: New file.
9949 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: New file.
9950 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
9951 * sysdeps/unix/sysv/linux/s390/sem_wait.c: New file.
9953 2003-02-04 Ulrich Drepper <drepper@redhat.com>
9955 * atomic.h: Add a couple more default implementations.
9956 (atomic_compare_and_exchange_acq): Use
9957 __arch_compare_and_exchange_32_acq in return value definition. It
9959 (atomic_bit_set): Renamed from atomic_set_bit.
9960 Add missing atomic_ prefixes.
9962 * sysdeps/pthread/bits/libc-lock.h (__libc_once): In case no
9963 thread library is available, use correct value to mark initialized
9966 2003-02-03 Ulrich Drepper <drepper@redhat.com>
9968 * allocatestack.c (allocate_stack): Use __getpagesize instead of
9969 __sysconf to determine pagesize.
9971 * pthread_create.c: Include <atomic.h>.
9972 * allocatestack.c (allocate_stack): Implement coloring of the
9973 allocated stack memory. Rename pagesize to pagesize_m1. It's the
9974 size minus one. Adjust users.
9975 * sysdeps/i386/i686/Makefile: New file.
9977 2003-02-02 Ulrich Drepper <drepper@redhat.com>
9979 * allocatestack.c: Improve comment throughout the file.
9981 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
9982 (__lll_lock_wait): Add branch prediction.
9983 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
9984 (__lll_lock_wait): Likewise.
9985 (lll_unlock_wake_cb): Removed.
9987 2003-01-31 Ulrich Drepper <drepper@redhat.com>
9989 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Remove
9990 _POSIX_THREAD_PRIORITY_SCHEDULING.
9992 2003-01-30 Jakub Jelinek <jakub@redhat.com>
9994 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
9995 Fix return type of ptr___pthread_getspecific.
9997 2003-01-29 Ulrich Drepper <drepper@redhat.com>
9999 * Makefile (tests): Add tst-umask1.
10000 (tst-umask1-ARGS): Define.
10001 * tst-umask1.c: New file.
10003 2003-01-28 Ulrich Drepper <drepper@redhat.com>
10005 * Makefile (libpthread-routines): Remove lowlevelrwlock. Add
10006 pthread_rwlock_rdlock, pthread_rwlock_timedrdlock,
10007 pthread_rwlock_wrlock, pthread_rwlock_timedwrlock, and
10008 pthread_rwlock_unlock.
10009 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Removed
10010 * sysdeps/unix/sysv/linux/i386/i586/lowlevelrwlock.S: Removed
10011 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Removed
10012 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: New file.
10013 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
10015 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: New file.
10016 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
10018 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: New file.
10019 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_rdlock.S: New file.
10020 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedrdlock.S:
10022 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_wrlock.S: New file.
10023 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedwrlock.S:
10025 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_unlock.S: New file.
10026 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_rdlock.S: New file.
10027 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedrdlock.S:
10029 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_wrlock.S: New file.
10030 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedwrlock.S:
10032 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_unlock.S: New file.
10034 * Makefile (libpthread-routines): Remove lowlevelcond and
10035 lowlevelsem. Add sem_wait, sem_trywait, sem_timedwait, sem_post,
10036 pthread_cond_wait, pthread_cond_timedwait, pthread_cond_signal,
10037 and pthread_cond_broadcast.
10038 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Removed
10039 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Removed
10040 * sysdeps/unix/sysv/linux/i386/i586/lowlevelsem.S: Removed
10041 * sysdeps/unix/sysv/linux/i386/i586/lowlevelcond.S: Removed
10042 * sysdeps/unix/sysv/linux/i386/i686/lowlevelsem.S: Removed
10043 * sysdeps/unix/sysv/linux/i386/i686/lowlevelcond.S: Removed
10044 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: New file.
10045 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: New file.
10046 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: New file.
10047 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: New file.
10048 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: New file.
10049 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: New file.
10050 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: New file.
10051 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: New file.
10052 * sysdeps/unix/sysv/linux/i386/i586/sem_wait.S: New file.
10053 * sysdeps/unix/sysv/linux/i386/i586/sem_trywait.S: New file.
10054 * sysdeps/unix/sysv/linux/i386/i586/sem_timedwait.S: New file.
10055 * sysdeps/unix/sysv/linux/i386/i586/sem_post.S: New file.
10056 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_wait.S: New file.
10057 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_timedwait.S: New file.
10058 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_signal.S: New file.
10059 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_broadcast.S: New file.
10060 * sysdeps/unix/sysv/linux/i386/i686/sem_wait.S: New file.
10061 * sysdeps/unix/sysv/linux/i386/i686/sem_trywait.S: New file.
10062 * sysdeps/unix/sysv/linux/i386/i686/sem_timedwait.S: New file.
10063 * sysdeps/unix/sysv/linux/i386/i686/sem_post.S: New file.
10064 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_wait.S: New file.
10065 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S: New file.
10066 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_signal.S: New file.
10067 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_broadcast.S: New file.
10068 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: New file.
10070 * sysdeps/unix/sysv/linux/i386/createthread.c: Define
10071 PREPARE_CREATE and TLS_VALUE with x86-specific bits. All the rest
10072 of the code is moved to ...
10073 * sysdeps/pthread/createthread.c: ...here. New file.
10075 2003-01-27 Ulrich Drepper <drepper@redhat.com>
10077 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S
10078 (__new_sem_post): Clear %eax before returning.
10079 Reported by MAEDA Naoaki <maeda.naoaki@jp.fujitsu.com>.
10081 * Makefile (tests): Add tst-cleanup2.
10082 * tst-cleanup2.c: New file.
10084 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
10085 Interpret first parameter correctly.
10087 2003-01-17 Ulrich Drepper <drepper@redhat.com>
10089 * Makefile (headers): Add bits/semaphore.h.
10091 2003-01-16 Jakub Jelinek <jakub@redhat.com>
10093 * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize _head->sysinfo even
10096 2003-01-14 Ulrich Drepper <drepper@redhat.com>
10098 * sem_open.c (sem_open): Return SEM_FAILED if existing semaphore
10099 must be used and mapping failed.
10100 Reported by Luke Elliott <luke.elliott@activfinancial.com>.
10102 * Makefile (CFLAGS-pthread_self.os): Define this, not
10103 CFLAGS-pthread_self.c.
10105 2003-01-13 Ulrich Drepper <drepper@redhat.com>
10107 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Don't export
10108 lll_unlock_wake_cb.
10110 * Makefile (libpthread-routines): Add version. Add rules to build
10111 version.os and banner.h.
10112 * version.c: New file.
10114 2003-01-13 Jakub Jelinek <jakub@redhat.com>
10116 * pthread_mutex_lock.c (__pthread_mutex_lock_internal): Make
10117 the alias unconditional.
10118 * pthread_mutex_unlock.c (__pthread_mutex_unlock_internal): Likewise.
10120 2003-01-13 Ulrich Drepper <drepper@redhat.com>
10122 * Makefile (CFLAGS-pthread_self.c): New definition.
10124 2003-01-06 Jakub Jelinek <jakub@redhat.com>
10126 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Add
10127 INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
10128 * sysdeps/unix/sysv/linux/raise.c (raise): Likewise.
10129 * init.c (__pthread_initialize_minimal_internal): Likewise.
10131 2003-01-07 Jakub Jelinek <jakub@redhat.com>
10133 * pthreadP.h (__pthread_cond_timedwait): Add prototype.
10135 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
10136 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
10137 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
10138 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
10139 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
10140 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
10142 2003-01-06 Jakub Jelinek <jakub@redhat.com>
10144 * pthreadP.h (LIBC_CANCEL_HANDLED): Define.
10145 * pt-system.c (LIBC_CANCEL_HANDLED): Add.
10146 * tst-cancel-wrappers.sh: Remove all exceptions.
10148 2003-01-05 Ulrich Drepper <drepper@redhat.com>
10150 * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
10151 features. Reported by Marijn Ros <marijn@mad.scientist.com>.
10153 * sysdeps/unix/sysv/linux/jmp-unwind.c: Include <pthread-functions.h>.
10154 Use __libc_pthread_functions array if SHARED.
10156 * pthreadP.h: Move pthread_cond_2_0_t definition to...
10157 * sysdeps/unix/sysv/linux/internaltypes.h: ...here.
10159 * sysdeps/pthread/bits/libc-lock.h (__libc_ptf_call): New #define.
10160 (__libc_rwlock_rdlock, __libc_rwlock_wrlock, __libc_rwlock_unlock,
10161 __libc_key_create, __libc_getspecific, __libc_setspecific): Use
10162 __libc_ptf_call instead of __libc_maybe_call.
10163 (PTF): New #define.
10164 (__libc_cleanup_region_start): Wrap function name with PTF call.
10165 (__libc_cleanup_region_end): Likewise.
10166 (__libc_cleanup_end): Likewise.
10168 * pthread_getspecific.c: Add __pthread_getspecific_internal alias.
10169 * pthread_setspecific.c: Add __pthread_setspecific_internal alias.
10170 * pthread_key_create.c: Add __pthread_key_create_internal alias.
10171 * pthreadP.h: Add prototypes.
10173 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Add
10174 __pthread_rwlock_rdlock, __pthread_rwlock_wrlock, and
10175 __pthread_rwlock_unlock aliases.
10176 * pthreadP.h: Add prototypes for new aliases.
10178 * pthreadP.h (struct pthead_functions): Moved to...
10179 * sysdeps/pthread/pthread-functions.h: ...here. New file.
10180 * init.c (pthread_functions): Add initializers for new elements.
10182 * cleanup_defer.c: Add __pthread_cleanup_push_defer and
10183 __pthread_cleanup_pop_restore aliases.
10184 * pthreadP.h: Add prototypes.
10186 * cleanup.c: Rename _GI_pthread_cleanup_push to __pthread_cleanup_push
10187 and _GI_pthread_cleanup_pop to __pthread_cleanup_pop.
10188 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Adjust caller.
10189 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
10190 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
10191 * pthreadP.h: Adjust prototypes and callers.
10193 2003-01-04 Ulrich Drepper <drepper@redhat.com>
10195 * Makefile (tests): Add tst-cancel7.
10196 (tst-cancel7-ARGS): New variable.
10197 * tst-cancel7.c: New file.
10199 * old_pthread_cond_broadcast.c: Optimize initialization a bit to work
10200 around gcc defficiencies.
10201 * old_pthread_cond_signal.c: Likewise.
10202 * old_pthread_cond_timedwait.c: Likewise.
10203 * old_pthread_cond_wait.c: Likewise.
10205 * pthreadP.h (pthread_cond_2_0_t): Remove unneeded lock element.
10207 2003-01-03 Ulrich Drepper <drepper@redhat.com>
10209 * Makefile (tests): Add tst-cond7.
10210 * tst-cond7.c: New file.
10212 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
10213 (condvar_cleanup): Get condvar address from the right place.
10215 * atomic.h: Correct definitions of atomic_full_barrier,
10216 atomic_read_barrier, atomic_write_barrier.
10218 * old_pthread_cond_broadcast.c: Make memory allocate and initialization
10220 * old_pthread_cond_signal.c: Likewise.
10221 * old_pthread_cond_timedwait.c: Likewise.
10222 * old_pthread_cond_wait.c: Likewise.
10224 2003-01-03 Jakub Jelinek <jakub@redhat.com>
10226 * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
10228 2003-01-03 Ulrich Drepper <drepper@redhat.com>
10230 * pthreadP.h (pthread_cond_2_0_t): New type.
10231 (struct pthread_functions): Use new type for 2.0 condvar callbacks.
10232 Use new type for the 2.0 condvar function prototypes.
10233 * forward.c: Use pthread_cond_2_0_t for 2.0 condvar functions.
10234 * old_pthread_cond_init.c: Use pthread_cond_2_0_t for condvar
10236 * old_pthread_cond_destroy.c: Likewise.
10237 * old_pthread_cond_broadcast.c: Likewise. Lock appropriately.
10238 * old_pthread_cond_signal.c: Likewise.
10239 * old_pthread_cond_timedwait.c: Likewise.
10240 * old_pthread_cond_wait.c: Likewise.
10242 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
10243 (__pthread_cond_wait): Don't save cancellation mode and seq value
10246 * herrno.c (__h_errno_location): Don't define as weak.
10248 2003-01-02 Jakub Jelinek <jakub@redhat.com>
10250 * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
10251 pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
10252 and pthread_cond_wait.
10253 * old_pthread_cond_broadcast.c (__old_pthread_cond_broadcast):
10255 (__pthread_cond_broadcast_2_0): ... this.
10256 * old_pthread_cond_destroy.c (__old_pthread_cond_destroy):
10258 (__pthread_cond_destroy_2_0): ... this.
10259 * old_pthread_cond_init.c (__old_pthread_cond_init):
10261 (__pthread_cond_init_2_0): ... this.
10262 * old_pthread_cond_signal.c (__old_pthread_cond_signal):
10264 (__pthread_cond_signal_2_0): ... this.
10265 * old_pthread_cond_wait.c (__old_pthread_cond_wait):
10267 (__pthread_cond_wait_2_0): ... this.
10268 * pthread_cond_destroy.c: Include shlib-compat.h.
10269 (pthread_cond_destroy): Change strong_alias into versioned_symbol.
10270 * pthread_cond_init.c: Include shlib-compat.h.
10271 (pthread_cond_init): Change strong_alias into versioned_symbol.
10272 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_cond_*
10273 fields to ptr___pthread_cond_* and add ptr___pthread_cond_*_2_0
10275 (__pthread_cond_broadcast_2_0, __pthread_cond_destroy_2_0,
10276 __pthread_cond_init_2_0, __pthread_cond_signal_2_0,
10277 __pthread_cond_wait_2_0): New prototypes.
10278 (__old_pthread_cond_broadcast, __old_pthread_cond_destroy,
10279 __old_pthread_cond_init, __old_pthread_cond_signal,
10280 __old_pthread_cond_wait): Removed.
10281 * init.c: Include shlib-compat.h.
10282 (pthread_functions): Guard ptr___pthread_attr_init_2_0
10283 initialization with SHLIB_COMPAT (GLIBC_2_0, GLIBC_2_1).
10284 Rename ptr_pthread_cond_* to ptr___pthread_cond_*, initialize
10285 ptr___pthread_cond_*_2_0 fields.
10286 * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
10287 pthread_cond_*@GLIBC_2.0 compatibility symbols.
10289 * sysdeps/pthread/sigaction.c (SIGCANCEL): Only define if
10290 LIBC_SIGACTION was not yet defined.
10291 [!defined LIBC_SIGACTION]: Define LIBC_SIGACTION, #include self.
10292 [!defined LIBC_SIGACTION] (__sigaction): New function and
10294 [!defined LIBC_SIGACTION] (sigaction): New weak_alias.
10295 [defined LIBC_SIGACTION]: #include_next <sigaction.c>.
10297 2003-01-02 Jakub Jelinek <jakub@redhat.com>
10299 * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
10301 2003-01-02 Ulrich Drepper <drepper@redhat.com>
10303 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
10304 New, larger type definition.
10305 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: New condvar
10307 * Versions [libpthread]: Add definitions for new pthread_cond_*
10308 interfaces for version GLIBC_2.3.2.
10309 * pthread_cond_init.c: Update initialization for new type definition.
10310 * Makefile (libpthread-routines): Remove pthread_cond_wait,
10311 pthread_cond_timedwait, pthread_cond_signal, and
10312 pthread_cond_broadcast. Add old_pthread_cond_init,
10313 old_pthread_cond_destroy, old_pthread_cond_wait,
10314 old_pthread_cond_timedwait, old_pthread_cond_signal, and
10315 old_pthread_cond_broadcast.
10316 * old_pthread_cond_broadcast.c: New file.
10317 * old_pthread_cond_destroy.c: New file.
10318 * old_pthread_cond_init.c: New file.
10319 * old_pthread_cond_signal.c: New file.
10320 * old_pthread_cond_timedwait.c: New file.
10321 * old_pthread_cond_wait.c: New file.
10322 * pthreadP.h: Add prototypes for the compatibility interfaces.
10324 * pthread_cond_destroy.c: Don't include <errno.h>.
10326 2003-01-01 Ulrich Drepper <drepper@redhat.com>
10328 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Avoid
10329 unnecessary zero offset when addressing MUTEX.
10331 2002-12-31 Ulrich Drepper <drepper@redhat.com>
10333 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
10335 * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
10336 for __register_atfork.
10338 2002-12-31 Jakub Jelinek <jakub@redhat.com>
10340 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use __ASSEMBLER__
10341 instead of ASSEMBLER test macro.
10343 * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
10344 __libc_current_sigrtmax): Add libc_hidden_def.
10346 * sysdeps/pthread/list.h: Remove assert.h include.
10348 2002-12-31 Ulrich Drepper <drepper@redhat.com>
10350 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Use
10351 __pthread_initialize_minimal_internal not
10352 __pthread_initialize_minimal.
10354 2002-12-30 Ulrich Drepper <drepper@redhat.com>
10356 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Mark
10357 __pthread_initialize_minimal as hidden.
10359 * init.c (__pthread_initialize_minimal_internal): Don't mark as
10362 2002-12-31 Jakub Jelinek <jakub@redhat.com>
10364 * Makefile ($(inst_libdir)/libpthread.so): Depend on
10365 $(common-objpfx)format.lds, include that into the output script.
10367 (extra-B-pthread.so): Change linuxthreads/ into nptl/.
10369 2002-12-28 Andreas Jaeger <aj@suse.de>
10371 * sysdeps/unix/sysv/linux/xstatconv.c (xstat_conv): Adjust for
10372 nsec resolution changes.
10373 (xstat64_conv): Likewise.
10374 (xstat32_conv): Likewise.
10375 * sysdeps/unix/sysv/linux/kernel_stat.h: Add nsec resolution for
10376 struct kernel_stat.
10377 * sysdeps/unix/sysv/linux/bits/stat.h: Add nsec resolution for
10378 structs stat and stat64.
10379 * time/time.h (__timespec_defined): Define for __USE_MISC.
10380 * io/sys/stat.h [__USE_MISC]: Define __need_timespec for struct stat.
10382 2002-12-30 Jakub Jelinek <jakub@redhat.com>
10384 * forward.c (FORWARD2): Renamed from FORWARD3. Remove unused export
10386 (pthread_attr_init_2_0, pthread_attr_init_2_1): Use FORWARD macro.
10387 (pthread_exit): Use strong_alias to avoid warnings.
10388 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_exit
10389 and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
10390 ptr___pthread_attr_init_2_*.
10391 * init.c (pthread_functions): Adjust.
10393 2002-12-29 Ulrich Drepper <drepper@redhat.com>
10395 * forward.c: Make all functions available by default again. It
10396 caused too much trouble.
10398 * pt-siglongjmp.c: Removed.
10400 2002-12-28 Jakub Jelinek <jakub@redhat.com>
10402 * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
10403 (SYSINFO_OFFSET, MULTIPLE_THREADS_OFFSET): Remove.
10404 * sysdeps/i386/Makefile: New file.
10405 * sysdeps/i386/tcb-offsets.sym: New file.
10406 * sysdeps/pthread/tcb-offsets.h: New file.
10407 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
10408 Remove MULTIPLE_THREADS_OFFSET and SYSINFO_OFFSET checks.
10410 * sysdeps/unix/sysv/linux/Versions [libc] (GLIBC_PRIVATE): Move
10411 __register_atfork...
10412 (GLIBC_2.3.2): ...here.
10414 2002-12-28 Ulrich Drepper <drepper@redhat.com>
10416 * sysdeps/pthread/pthread.h: Mark pthread_attr_getstackaddr and
10417 pthread_attr_setstackaddr with __attribute_deprecated__.
10419 2002-12-27 Jakub Jelinek <jakub@redhat.com>
10421 * pt-system.c (system): Remove cancellation handling.
10422 * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
10423 cancellation routines.
10425 2002-12-28 Ulrich Drepper <drepper@redhat.com>
10427 * descr.h: Include <dl-sysdep.h>.
10428 (struct pthread): Move header.data.list to the back of the struct.
10429 * sysdeps/i386/tls.h (tcbhead_t): Move list to the back of the struct.
10430 (MULTIPLE_THREADS_OFFSET): Adjust offset.
10431 (SYSINFO_OFFSEET): Likewise.
10433 2002-12-27 Jakub Jelinek <jakub@redhat.com>
10435 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h (USE_DL_SYSINFO):
10437 (DL_SYSINFO_DEFAULT): Cast to uintptr_t to avoid warnings.
10438 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h (NEED_DL_SYSINFO,
10439 DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION): Define.
10440 (USE_DL_SYSINFO): Undef.
10442 2002-12-22 Jakub Jelinek <jakub@redhat.com>
10444 * Makefile (tests-reverse): Use $(objpfx)../libc.so instead of
10445 $(common-objpfx)libc.so.
10446 * tst-cancel4.c (tf_write, tf_writev): Increase buf sizes so that
10447 it is bigger than pipe buffer size even on arches with bigger
10449 (tf_usleep): Cast usleep argument to useconds_t to avoid warnings.
10451 2002-12-25 Ulrich Drepper <drepper@redhat.com>
10453 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Implement
10454 correct errno access for case that USE___THREAD is not defined.
10456 2002-12-24 Ulrich Drepper <drepper@redhat.com>
10458 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Add missing #endif.
10459 Patch by Marijn Ros <marijn@mad.scientist.com>.
10461 2002-12-22 Roland McGrath <roland@redhat.com>
10463 * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
10465 2002-12-20 Ulrich Drepper <drepper@redhat.com>
10467 * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_inexpensive): Define.
10469 2002-12-19 Ulrich Drepper <drepper@redhat.com>
10471 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Don't define
10472 NEED_DL_SYSINFO since no processor < i686 had the sysenter opcode.
10473 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: New file.
10475 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Use ENTER_KERNEL instead
10477 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
10478 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Likewise.
10479 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Likewise.
10480 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
10481 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
10482 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Likewise.
10483 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Likewise.
10484 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
10486 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add support for using
10488 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
10490 * sysdeps/i386/tls.h: Unconditionally include <dl-sysdep.h>.
10492 * allocatestack.c (allocate_stack) [NEED_DL_SYSINFO]: Set sysinfo
10494 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Check
10495 that sysinfo is properly initialized.
10496 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define RTLD_PRIVATE_ERRNO
10497 to 1 only for ld.so.
10499 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
10500 RTLD_CORRECT_DYNAMIC_WEAK.
10502 2002-12-19 Jakub Jelinek <jakub@redhat.com>
10504 * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
10505 Use return 0 as 6th argument to FORWARD4.
10506 * pthread_equal.c: Include pthreadP.h instead of pthread.h.
10508 2002-12-18 Ulrich Drepper <drepper@redhat.com>
10510 * descr.h (struct pthread) [NEED_DL_SYSINFO]: Add sysinfo member.
10511 * sysdeps/i386/tls.h (tcbhead_t): Add sysinfo member.
10512 Define SYSINFO_OFFSEET if NEED_DL_SYSINFO is defined.
10513 (INIT_SYSINFO): New #define.
10514 (TLS_TP_INIT): Use INIT_SYSINFO.
10515 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
10516 At test to make sure SYSINFO_OFFSET value is correct.
10517 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
10519 2002-12-18 Jakub Jelinek <jakub@redhat.com>
10521 * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
10522 * sysdeps/unix/sysv/linux/raise.c (gsignal): Add weak alias to raise.
10523 * Versions [libc: GLIBC_2.0]: Add pthread_attr_init.
10524 [libpthread: GLIBC_2.1]: Remove __pthread_rwlock_init,
10525 __pthread_rwlock_destroy, __pthread_rwlock_rdlock,
10526 __pthread_rwlock_wrlock, __pthread_rwlock_unlock,
10527 __pthread_rwlock_tryrdlock and __pthread_rwlock_trywrlock.
10529 2002-12-18 Ulrich Drepper <drepper@redhat.com>
10531 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use ENTER_KERNEL
10532 macro instead of using int $0x80 directly.
10534 * sysdeps/pthread/bits/stdio-lock.h: New file.
10535 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: New file.
10536 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: New file.
10537 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: New file.
10538 * Makefile (routines): Add libc-lowlevelmutex.
10540 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Remove
10541 __i686.get_pc_thunk.dx.
10543 2002-12-17 Jakub Jelinek <jakub@redhat.com>
10545 * Makefile (libpthread-shared-only-routines): Add pt-allocrtsig.
10546 (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
10547 ($(objpfx)tst-cancel-wrappers.out): New rule.
10548 * tst-cancel-wrappers.sh: New test.
10549 * tst-locale1.c: Include signal.h.
10550 (uselocale): Test static linking of __libc_current_sigrt*.
10552 2002-12-17 Ulrich Drepper <drepper@redhat.com>
10554 * Makefile (tests): Add tst-cancel6.
10555 * tst-cancel6.c: New file
10557 2002-12-17 Jakub Jelinek <jakub@redhat.com>
10559 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
10560 Define meaningfully for assembler as well.
10561 * pthreadP.h (struct pthread_functions): Remove
10562 ptr_pthread_attr_init field. Add ptr_pthread_attr_init_2_0
10563 and ptr_pthread_attr_init_2_1 fields.
10564 * init.c (pthread_functions): Initialize ptr_pthread_attr_init_2_0
10565 and ptr_pthread_attr_init_2_1 instead of ptr_pthread_attr_init.
10566 * forward.c (FORWARD4): Renamed from FORWARD3. Add export argument.
10567 (FORWARD3): Define using FORWARD4.
10568 (pthread_attr_init): Provide both @GLIBC_2.0 and @@GLIBC_2.1
10570 * pt-system.c: Remove duplicate stdlib.h include.
10572 2002-12-16 Ulrich Drepper <drepper@redhat.com>
10574 * sem_init.c: Define sem_init@GLIBC_2.0.
10575 * sem_destroy.c: Define sem_destroy@GLIBC_2.0.
10576 * sem_getvalue.c: Define sem_getvalue@GLIBC_2.0.
10578 * flockfile.c: Moved to...
10579 * sysdeps/pthread/flockfile.c: ...here. New file.
10580 * funlockfile.c: Moved to...
10581 * sysdeps/pthread/funlockfile.c: ...here. New file.
10582 * ftrylockfile.c: Moved to...
10583 * sysdeps/pthread/ftrylockfile.c: ...here. New file.
10585 2002-12-16 Jakub Jelinek <jakub@redhat.com>
10587 * libc-cancellation.c: Guard both function with
10588 #if !defined NOT_IN_libc.
10589 * Makefile (libpthread-routines): Use ptw-, not pt- prefix for the
10590 automatically provided pthread wrappers.
10591 * pthreadP.h (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define to
10592 CANCEL_* if IS_IN_libpthread and to dummy versions if not in libc
10594 * pt-open.c: Removed.
10595 * pt-fcntl.c: Removed.
10596 * pt-fsync.c: Removed.
10597 * pt-lseek.c: Removed.
10598 * pt-msgrcv.c: Removed.
10599 * pt-msgsnd.c: Removed.
10600 * pt-msync.c: Removed.
10601 * pt-nanosleep.c: Removed.
10602 * pt-open64.c: Removed.
10603 * pt-pause.c: Removed.
10604 * pt-pread.c: Removed.
10605 * pt-pread64.c: Removed.
10606 * pt-pwrite.c: Removed.
10607 * pt-pwrite64.c: Removed.
10608 * pt-read.c: Removed.
10609 * pt-recv.c: Removed.
10610 * pt-recvfrom.c: Removed.
10611 * pt-recvmsg.c: Removed.
10612 * pt-send.c: Removed.
10613 * pt-sendto.c: Removed.
10614 * pt-sigtimedwait.c: Removed.
10615 * pt-sigwait.c: Removed.
10616 * pt-wait.c: Removed.
10617 * pt-waitpid.c: Removed.
10618 * pt-write.c: Removed.
10619 * pt-accept.c: Removed.
10620 * pt-close.c: Removed.
10621 * pt-connect.c: Removed.
10622 * pt-lseek64.c: Removed.
10623 * pt-sendmsg.c: Removed.
10624 * pt-tcdrain.c: Removed.
10626 2002-12-15 Ulrich Drepper <drepper@redhat.com>
10628 * init.c (__pthread_initialize_minimal_internal): Renamed from
10629 __pthread_initialize_minimal. Make old name an alias. This
10630 converts a normal relocation into a relative relocation.
10632 * pt-fcntl.c (__fcntl): Use fcntl64 syscall, not fcntl.
10634 * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
10635 readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
10636 * Makefile (libpthread-routines): Remove pt-creat, pt-poll,
10637 pt-pselect, pt-readv, pt-select, pt-sigpause, pt-sigsuspend,
10638 pt-sigwaitinfo, pt-waitid, and pt-writev.
10639 * pt-creat.c: Removed.
10640 * pt-poll.c: Removed.
10641 * pt-pselect.c: Removed.
10642 * pt-readv.c: Removed.
10643 * pt-select.c: Removed.
10644 * pt-sigpause.c: Removed.
10645 * pt-sigsuspend.c: Removed.
10646 * pt-sigwaitinfo.c: Removed.
10647 * pt-waitid.c: Removed.
10648 * pt-writev.c: Removed.
10650 * init.c (pthread_functions): New variable.
10651 (__pthread_initialize_minimal): Pass pointer to pthread_functions
10652 (or NULL) to __libc_pthread_init.
10653 * forward.c: Rewrite to use __libc:pthread_functions array to get
10654 function addresses.
10655 * sysdeps/unix/sysv/linux/fork.h: Remove __libc_pthread_init
10657 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
10658 Take new parameter. Copy content of variable pointed to by it
10659 to __libc_pthread_init.
10661 * pthreadP.h (struct pthread_functions): New type.
10662 (__libc_pthread_init): Declare.
10664 * pthread_attr_destroy.c: Add namespace protected alias.
10665 * pthread_attr_getdetachstate.c: Likewise.
10666 * pthread_attr_getinheritsched.c: Likewise.
10667 * pthread_attr_getschedparam.c: Likewise.
10668 * pthread_attr_getschedpolicy.c: Likewise.
10669 * pthread_attr_getscope.c: Likewise.
10670 * pthread_attr_setdetachstate.c: Likewise.
10671 * pthread_attr_setinheritsched.c: Likewise.
10672 * pthread_attr_setschedparam.c: Likewise.
10673 * pthread_attr_setschedpolicy.c: Likewise.
10674 * pthread_attr_setscope.c: Likewise.
10675 * pthread_cond_broadcast.c: Likewise.
10676 * pthread_cond_destroy.c: Likewise.
10677 * pthread_cond_init.c: Likewise.
10678 * pthread_cond_signal.c: Likewise.
10679 * pthread_cond_wait.c: Likewise.
10680 * pthread_condattr_destroy.c: Likewise.
10681 * pthread_condattr_init.c: Likewise.
10682 * pthread_equal.c: Likewise.
10683 * pthread_exit.c: Likewise.
10684 * pthread_getschedparam.c: Likewise.
10685 * pthread_self.c: Likewise.
10686 * pthread_setcancelstate.c: Likewise.
10687 * pthread_setschedparam.c: Likewise.
10688 * pthread_mutex_destroy.c: Likewise.
10689 * pthread_mutex_init.c: Likewise.
10690 * pthreadP.h: Add prototypes for the aliases.
10692 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Set
10693 multiple_threads member in correct TCB to 1.
10695 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define
10696 SINGLE_THREAD_P. If in libc or libpthread examine multiple_thread
10697 member of thread decriptor, otherwise return unconditionally 1.
10699 2002-12-14 Ulrich Drepper <drepper@redhat.com>
10701 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Changes folded into the
10702 regular Linux version. Remove file.
10703 * sysdeps/unix/sysv/linux/connect.S: Likewise. Remove file.
10704 * sysdeps/unix/sysv/linux/llseek.c: Likewise. Remove file.
10705 * sysdeps/unix/sysv/linux/msgrcv.c: Likewise. Remove file.
10706 * sysdeps/unix/sysv/linux/msgsnd.c: Likewise. Remove file.
10707 * sysdeps/unix/sysv/linux/open64.c: Likewise. Remove file.
10708 * sysdeps/unix/sysv/linux/poll.c: Likewise. Remove file.
10709 * sysdeps/unix/sysv/linux/pread.c: Likewise. Remove file.
10710 * sysdeps/unix/sysv/linux/pread64.c: Likewise. Remove file.
10711 * sysdeps/unix/sysv/linux/pselect.c: Likewise. Remove file.
10712 * sysdeps/unix/sysv/linux/pwrite.c: Likewise. Remove file.
10713 * sysdeps/unix/sysv/linux/pwrite64.c: Likewise. Remove file.
10714 * sysdeps/unix/sysv/linux/readv.c: Likewise. Remove file.
10715 * sysdeps/unix/sysv/linux/recv.S: Likewise. Remove file.
10716 * sysdeps/unix/sysv/linux/recvfrom.S: Likewise. Remove file.
10717 * sysdeps/unix/sysv/linux/recvmsg.S: Likewise. Remove file.
10718 * sysdeps/unix/sysv/linux/send.S: Likewise. Remove file.
10719 * sysdeps/unix/sysv/linux/sendmsg.S: Likewise. Remove file.
10720 * sysdeps/unix/sysv/linux/sendto.S: Likewise. Remove file.
10721 * sysdeps/unix/sysv/linux/sigpause.c: Likewise. Remove file.
10722 * sysdeps/unix/sysv/linux/sigsuspend.c: Likewise. Remove file.
10723 * sysdeps/unix/sysv/linux/sigtimedwait.c: Likewise. Remove file.
10724 * sysdeps/unix/sysv/linux/sigwait.c: Likewise. Remove file.
10725 * sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise. Remove file.
10726 * sysdeps/unix/sysv/linux/system.c: Likewise. Remove file.
10727 * sysdeps/unix/sysv/linux/tcdrain.c: Likewise. Remove file.
10728 * sysdeps/unix/sysv/linux/wait.c: Likewise. Remove file.
10729 * sysdeps/unix/sysv/linux/waitid.c: Likewise. Remove file.
10730 * sysdeps/unix/sysv/linux/waitpid.c: Likewise. Remove file.
10731 * sysdeps/unix/sysv/linux/writev.c: Likewise. Remove file.
10732 * sysdeps/unix/sysv/linux/i386/fcntl.c: Likewise. Remove file.
10734 2002-12-14 Jakub Jelinek <jakub@redhat.com>
10736 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
10737 * sysdeps/unix/sysv/linux/open.c: Removed.
10738 * sysdeps/unix/sysv/linux/fsync.c: Removed.
10739 * sysdeps/unix/sysv/linux/lseek.c: Removed.
10740 * sysdeps/unix/sysv/linux/msync.c: Removed.
10741 * sysdeps/unix/sysv/linux/read.c: Removed.
10742 * sysdeps/unix/sysv/linux/close.c: Removed.
10743 * sysdeps/unix/sysv/linux/creat.c: Removed.
10744 * sysdeps/unix/sysv/linux/nanosleep.c: Removed.
10745 * sysdeps/unix/sysv/linux/pause.c: Removed.
10746 * sysdeps/unix/sysv/linux/select.c: Removed.
10747 * sysdeps/unix/sysv/linux/write.c: Removed.
10749 2002-12-14 Ulrich Drepper <drepper@redhat.com>
10751 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Check multiple_threads
10752 element in TCB to see whether locking is needed.
10754 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Check that
10755 MULTIPLE_THREADS_OFFSET value is correct.
10757 * sysdeps/unix/sysv/linux/close.c: New file.
10758 * sysdeps/unix/sysv/linux/connect.S: New file.
10759 * sysdeps/unix/sysv/linux/creat.c: New file.
10760 * sysdeps/unix/sysv/linux/fsync.c: New file.
10761 * sysdeps/unix/sysv/linux/llseek.c: New file.
10762 * sysdeps/unix/sysv/linux/lseek.c: New file.
10763 * sysdeps/unix/sysv/linux/msgrcv.c: New file.
10764 * sysdeps/unix/sysv/linux/msgsnd.c: New file.
10765 * sysdeps/unix/sysv/linux/msync.c: New file.
10766 * sysdeps/unix/sysv/linux/nanosleep.c: New file.
10767 * sysdeps/unix/sysv/linux/open.c: New file.
10768 * sysdeps/unix/sysv/linux/open64.c: New file.
10769 * sysdeps/unix/sysv/linux/pause.c: New file.
10770 * sysdeps/unix/sysv/linux/poll.c: New file.
10771 * sysdeps/unix/sysv/linux/pread.c: New file.
10772 * sysdeps/unix/sysv/linux/pread64.c: New file.
10773 * sysdeps/unix/sysv/linux/pselect.c: New file.
10774 * sysdeps/unix/sysv/linux/pwrite.c: New file.
10775 * sysdeps/unix/sysv/linux/pwrite64.c: New file.
10776 * sysdeps/unix/sysv/linux/readv.c: New file.
10777 * sysdeps/unix/sysv/linux/recv.S: New file.
10778 * sysdeps/unix/sysv/linux/recvfrom.S: New file.
10779 * sysdeps/unix/sysv/linux/recvmsg.S: New file.
10780 * sysdeps/unix/sysv/linux/select.c: New file.
10781 * sysdeps/unix/sysv/linux/send.S: New file.
10782 * sysdeps/unix/sysv/linux/sendmsg.S: New file.
10783 * sysdeps/unix/sysv/linux/sendto.S: New file.
10784 * sysdeps/unix/sysv/linux/sigpause.c: New file.
10785 * sysdeps/unix/sysv/linux/sigsuspend.c: New file.
10786 * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
10787 * sysdeps/unix/sysv/linux/sigwait.c: New file.
10788 * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
10789 * sysdeps/unix/sysv/linux/system.c: New file.
10790 * sysdeps/unix/sysv/linux/tcdrain.c: New file.
10791 * sysdeps/unix/sysv/linux/wait.c: New file.
10792 * sysdeps/unix/sysv/linux/waitid.c: New file.
10793 * sysdeps/unix/sysv/linux/waitpid.c: New file.
10794 * sysdeps/unix/sysv/linux/writev.c: New file.
10795 * sysdeps/unix/sysv/linux/i386/fcntl.c: New file.
10797 * pt-readv.c: Fix comment.
10799 2002-12-14 Jakub Jelinek <jakub@redhat.com>
10801 * tst-cleanup1.c: Include stdlib.h.
10803 * tst-cancel5.c: New test.
10804 * Makefile (tests): Add tst-cancel5.
10805 (tst-cancel5): Link against libc.so libpthread.so in that order.
10807 2002-12-13 Ulrich Drepper <drepper@redhat.com>
10809 * forward.c (test_loaded): Prevent recursive calls.
10811 * Makefile (routines): Add libc-cancellation.
10812 * libc-cancellation.c: New file.
10813 * descr.h (struct pthread): Add multiple_threads field.
10814 * allocatestack.c (allocate_stack): Initialize multiple_header field of
10815 new thread descriptor to 1.
10816 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread):
10817 Initialize multiple_thread field after successful thread creation.
10818 * cancellation.c (__do_cancel): Move to pthreadP.h.
10819 (__pthread_enable_asynccancel): Remove parameter from __do_cancel call.
10820 (__pthread_disable_asynccancel): Add internal_function attribute.
10821 * init.c (sigcancel_handler): Remove parameter from __do_cancel call.
10822 * pthread_setcancelstate.c: Likewise.
10823 * pthread_setcanceltype.c: Likewise.
10824 * pthread_exit.c: Likewise.
10825 * pthreadP.h (CANCELLATION_P): Likewise.
10826 (__do_cancel): Define as static inline.
10827 (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): New #defines.
10828 (__libc_enable_asynccancel, __libc_disable_asynccancel): New
10830 * sysdeps/i386/tls.h (tcbhead_t): Add list and multiple_threads
10831 fields. Define MULTIPLE_THREADS_OFFSET.
10832 * sysdeps/pthread/bits/libc-lock.h: Remove __libc_locking_needed
10834 * sysdeps/unix/sysv/linux/accept.S: New file.
10835 * sysdeps/unix/sysv/linux/read.c: New file.
10836 * sysdeps/unix/sysv/linux/write.c: New file.
10837 * sysdeps/unix/sysv/linux/i386/pt-socket.S: New file.
10838 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove definition and
10839 initialization of __libc_locking_needed.
10840 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't use
10841 __libc_locking_needed, use multiple_threads field in TCB.
10842 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
10844 2002-12-12 Ulrich Drepper <drepper@redhat.com>
10846 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: Use i486
10848 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: Likewise.
10850 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Correct
10851 access to __libc_locking_needed for PIC.
10853 2002-12-12 Jakub Jelinek <jakub@redhat.com>
10855 * sysdeps/pthread/bits/libc-lock.h (__libc_locking_needed): Only
10856 declare for libc.so.
10857 (__libc_lock_init, __libc_lock_init_recursive): Change into comma
10859 (__libc_lock_lock): Put into statement expression.
10860 (__libc_lock_unlock): Remove trailing semicolon.
10861 * sysdeps/unix/sysv/linux/fork.h (__libc_pthread_init): Fix typo.
10863 2002-12-12 Roland McGrath <roland@redhat.com>
10865 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use asm operand with
10866 "m" constraint to refer to __libc_locking_needed. Declare it here.
10868 2002-12-12 Ulrich Drepper <drepper@redhat.com>
10870 * sysdeps/unix/sysv/linux/fork-gen.c: Renamed to...
10871 * sysdeps/unix/sysv/linux/libc_pthread_init.c: ...this.
10872 Initialize __libc_locking_needed.
10873 * init.c (__pthread_initialize_minimal): Call __libc_pthread_init
10874 instead of __register_pthread_fork_handler.
10875 * sysdeps/pthread/bits/libc-lock.h: Declare __libc_locking_needed.
10876 * sysdeps/unix/sysv/linux/Makefile (sysdep_routimes): Replace
10877 fork-gen with libc_pthread_init.
10878 * sysdeps/unix/sysv/linux/Versions: Use __libc_pthread_init instead
10879 of __register_pthread_fork_handler.
10880 * sysdeps/unix/sysv/linux/fork.h: Declare __libc_pthread_init instead
10881 of __register_pthread_fork_handler.
10882 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use
10883 __libc_locking_needed to determine whether lock prefix can be avoided.
10884 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
10886 2002-12-11 Ulrich Drepper <drepper@redhat.com>
10888 * Makefile (tests): Add tst-cleanup1.
10889 * tst-cleanup1.c: New file.
10890 * cancellation.c (__cleanup_thread): Removed.
10891 (__do_cancel): Remove call to __cleanup_thread.
10892 * pthreadP.h: Remove __cleanup_thread prorotype.
10894 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
10895 Remember function and argument even if cancellation handler
10896 function is not available.
10897 (__libc_cleanup_region_end): Execute registered function directly if
10898 pthread functions are not available.
10899 (__libc_cleanup_end): Likewise.
10901 * init.c (__pthread_initialize_minimal): Fix initialization in
10902 static lib by preventing gcc from being too clever.
10904 2002-12-10 Ulrich Drepper <drepper@redhat.com>
10906 * init.c (__pthread_initialize_minimal): Remove unneccesary
10909 * Makefile (tests): We can run tst-locale2 now.
10911 2002-12-09 Ulrich Drepper <drepper@redhat.com>
10913 * Versions: Remove duplicated sigwait entry.
10915 2002-12-08 Ulrich Drepper <drepper@redhat.com>
10917 * pthreadP.h: Enable pthread_cleanup_{push,pop} optimizations only
10920 * pt-fcntl.c (__fcntl): Initialize oldtype to avoid warning.
10922 * pthreadP.h: Declare __pthread_enable_asynccancel and
10923 __pthread_disable_asynccancel.
10924 (CANCEL_ASYNC): Use __pthread_enable_asynccancel.
10925 (CANCEL_RESET): Use __pthread_disable_asynccancel.
10926 * cancellation.c (__pthread_enable_asynccancel): New function.
10927 (__pthread_disable_asynccancel): New function.
10928 * pt-accept.c: Adjust for CANCEL_ASYNC and CANCEL_RESET change.
10929 * pt-close.c: Likewise.
10930 * pt-connect.c: Likewise.
10931 * pt-creat.c: Likewise.
10932 * pt-fcntl.c: Likewise.
10933 * pt-fsync.c: Likewise.
10934 * pt-lseek.c: Likewise.
10935 * pt-lseek64.c: Likewise.
10936 * pt-msgrcv.c: Likewise.
10937 * pt-msgsnd.c: Likewise.
10938 * pt-msync.c: Likewise.
10939 * pt-nanosleep.c: Likewise.
10940 * pt-open.c: Likewise.
10941 * pt-open64.c: Likewise.
10942 * pt-pause.c: Likewise.
10943 * pt-poll.c: Likewise.
10944 * pt-pread.c: Likewise.
10945 * pt-pread64.c: Likewise.
10946 * pt-pselect.c: Likewise.
10947 * pt-pwrite.c: Likewise.
10948 * pt-pwrite64.c: Likewise.
10949 * pt-read.c: Likewise.
10950 * pt-readv.c: Likewise.
10951 * pt-recv.c: Likewise.
10952 * pt-recvfrom.c: Likewise.
10953 * pt-recvmsg.c: Likewise.
10954 * pt-select.c: Likewise.
10955 * pt-send.c: Likewise.
10956 * pt-sendmsg.c: Likewise.
10957 * pt-sendto.c: Likewise.
10958 * pt-sigpause.c: Likewise.
10959 * pt-sigsuspend.c: Likewise.
10960 * pt-sigtimedwait.c: Likewise.
10961 * pt-sigwait.c: Likewise.
10962 * pt-sigwaitinfo.c: Likewise.
10963 * pt-system.c: Likewise.
10964 * pt-tcdrain.c: Likewise.
10965 * pt-wait.c: Likewise.
10966 * pt-waitid.c: Likewise.
10967 * pt-waitpid.c: Likewise.
10968 * pt-write.c: Likewise.
10969 * pt-writev.c: Likewise.
10970 * pthread_join.c: Likewise.
10971 * pthread_timedjoin.c: Likewise.
10973 * pt-sigpause.c (sigsuspend): Call __sigsuspend.
10974 (__xpg_sigpause): New function.
10975 * Versions (libpthread:GLIBC_2.3.2): Add __xpg_sigpause.
10977 2002-12-07 Ulrich Drepper <drepper@redhat.com>
10979 * Makefile (CFLAGS-ftrylockfile.c): Add -D_IO_MTSAFE_IO.
10981 * cleanup.c: Move declarations of _GI_pthread_cleanup_push and
10982 _GI_pthread_cleanup_pop to pthreadP.h.
10984 * ftrylockfile.c: Use _IO_lock_trylock instead of
10985 pthread_mutex_trylock.
10987 * pthreadP.h (CANCEL_ASYNC): Use __pthread_setcanceltype.
10988 (CANCEL_RESET): Likewise.
10989 (__pthread_setcanceltype_): Declare.
10990 (__pthread_mutex_lock_internal): Declare.
10991 (__pthread_mutex_unlock_internal): Declare.
10992 (__pthread_once_internal): Declare.
10993 (pthread_cleanup_push): Redefine using _GI_pthread_cleanup_push.
10994 (pthread_cleanup_pop): Redefine using _GI_pthread_cleanup_pop.
10996 * pthread_cond_timedwait.c: Use INTUSE is calls to pthread_mutex_lock
10997 and pthread_mutex_unlock.
10998 * pthread_cond_wait.c: Likewise.
10999 * pthread_mutex_lock.c: Use INTDEF to define alias if needed.
11000 * pthread_mutex_unlock.c: Likewise.
11002 * pthread_setcanceltype.c: Add additional alias
11003 __pthread_setcanceltype.
11005 * sem_unlink.c (sem_unlink): Use __pthread_once with INTDEF.
11006 * sem_open.c (sem_open): Likewise.
11007 Use __libc_open, __libc_write, and __libc_close instead of
11008 open, write, and close respectively.
11010 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_trylock_internal):
11011 Rewrite as statement expression since it must return a value.
11013 * pthread_cancel.c: Use __pthread_kill instead of pthread_kill.
11014 * sysdeps/unix/sysv/linux/pthread_kill.c: Define additional alias
11017 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Define additional
11018 alias __pthread_once_internal.
11020 * sysdeps/unix/sysv/linux/raise.c: Use libc_hidden_def for raise.
11022 2002-12-06 Ulrich Drepper <drepper@redhat.com>
11024 * Makefile (tests): Add tst-stdio1 and tst-stdio2.
11025 * tst-stdio1.c: New file.
11026 * tst-stdio2.c: New file.
11028 * init.c (__pthread_initialize_minimal): Correct INIT_LIST_HEAD use.
11030 * Makefile (tests): Comment out tst-locale2 for now.
11031 (CFLAGS-flockfile.c, CFLAGS-funlockfile.c): Define to -D_IO_MTSAFE_IO.
11033 * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-fork.c to
11035 * sysdeps/unix/sysv/linux/fork.c: Include <bits/stdio-lock.h>.
11036 Use _IO_lock_init instead of explicit assignment.
11038 * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
11039 Define __libc_lock_* and __libc_lock_recursive macros with
11040 lowlevellock macros, not pthread mutexes.
11042 * flockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_lock instead
11043 of pthread_mutex_lock.
11044 * funlockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_unlock
11045 instead of pthread_mutex_unlock.
11047 2002-12-06 Roland McGrath <roland@redhat.com>
11049 * allocatestack.c (__stack_user): Use uninitialized defn.
11050 * init.c (__pthread_initialize_minimal): Initialize it here.
11052 2002-12-05 Roland McGrath <roland@redhat.com>
11054 * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
11056 * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
11058 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Add
11059 missing & here too.
11061 2002-12-05 Ulrich Drepper <drepper@redhat.com>
11063 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
11065 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: New file.
11066 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: New file.
11067 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: New file.
11068 * sysdeps/pthread/bits/libc-lock.h: Use lowlevellock implementation
11069 for __libc_lock_* macros.
11070 * Makefile (routines): Add libc-lowlevellock.
11072 2002-10-09 Roland McGrath <roland@redhat.com>
11074 * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
11075 Under [__PIC__], call the function via the pointer fetched for
11076 comparison rather than a call by name that uses the PLT.
11077 (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
11078 (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
11079 (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
11080 (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
11081 (__libc_key_create, __libc_getspecific, __libc_setspecific): Use it.
11083 2002-12-04 Roland McGrath <roland@redhat.com>
11085 * forward.c (pthread_self): Use FORWARD3 macro to correct return type.
11087 * sysdeps/i386/td_ta_map_lwp2thr.c: Moved from ../nptl_db.
11088 * sysdeps/generic/td_ta_map_lwp2thr.c: New file.
11090 * pthread_create.c (start_thread): Add missing & on __nptl_last_event.
11092 2002-12-04 Ulrich Drepper <drepper@redhat.com>
11094 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Make pthread_t
11095 a completely opaque, non-integer type.
11096 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
11098 2002-12-05 Jakub Jelinek <jakub@redhat.com>
11100 * sysdeps/i386/tls.h: Include stdlib.h.
11101 * sysdeps/x86_64/tls.h: Likewise.
11103 2002-12-04 Ulrich Drepper <drepper@redhat.com>
11105 * Makefile (tests): Add tst-locale2.
11106 (tests-static): Likewise.
11107 * tst-locale2.c: New file.
11109 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Mark asms as
11110 volatile and add memory clobbers to lock operations.
11112 2002-12-03 Ulrich Drepper <drepper@redhat.com>
11114 * sysdeps/i386/i686/bits/atomic.h: Use i486 version.
11115 * sysdeps/i386/i486/bits/atomic.h: New file.
11116 * sysdeps/i386/i586/bits/atomic.h: New file.
11117 * sysdeps/i386/i686/pthread_spin_trylock.S: Define HAVE_CMOV and
11118 include i486 version.
11119 * sysdeps/i386/i486/pthread_spin_trylock.S: New file.
11120 * sysdeps/i386/i586/pthread_spin_trylock.S: New file.
11121 Patch by Marijn Ros <marijn@mad.scientist.com>.
11123 * allocatestack.c (get_cached_stack): Don't crash if we first
11124 found a stack with a larger size then needed.
11125 Reported by Hui Huang <hui.huang@sun.com>.
11127 * Makefile (tests): Add tst-sysconf.
11128 * tst-sysconf.c: New file.
11130 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine
11131 PTHREAD_THREADS_MAX.
11133 2002-12-02 Roland McGrath <roland@redhat.com>
11135 * pthreadP.h (__stack_user, __nptl_create_event, __nptl_death_event):
11136 Declare using hidden_proto instead of attribute_hidden, so there are
11137 non-.hidden static symbols for gdb to find.
11138 (__pthread_keys): Likewise.
11139 * events.c (__nptl_create_event, __nptl_death_event): Add hidden_def.
11140 * allocatestack.c (__stack_user): Likewise.
11141 * pthread_create.c (__pthread_keys): Likewise.
11142 (__nptl_threads_events, __nptl_last_event): Make these static instead
11144 * pthread_key_create.c (__pthread_pthread_keys_max,
11145 __pthread_pthread_key_2ndlevel_size): Renamed from __linuxthreads_*.
11147 2002-12-02 Ulrich Drepper <drepper@redhat.com>
11149 * Makefile (tests): Add tst-locale1. If buid-static is yes link
11151 * tst-locale1.c: New file.
11153 * pthread_cond_timedwait.c: Include <stdlib.h>.
11155 * Makefile (tests): Add tst-fork2 and tst-fork3.
11156 * tst-fork2.c: New file.
11157 * tst-fork3.c: New file.
11159 2002-11-28 Ulrich Drepper <drepper@redhat.com>
11161 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
11163 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
11164 require it to 200112L.
11166 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Use cmov
11167 instruction only if HAVE_CMOV is defined.
11168 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Define HAVE_CMOV.
11170 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: New file.
11172 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: New file.
11174 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: New file.
11176 * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: New file.
11178 2002-11-27 Ulrich Drepper <drepper@redhat.com>
11180 * sysdeps/x86_64/bits/atomic.h: New file.
11182 * sysdeps/i386/i686/bits/atomic.h: Fix asm syntax for 8- and
11185 * sysdeps/unix/sysv/linux/raise.c (raise): Use INTERNAL_SYSCALL if
11186 possible since gettid cannot fail.
11188 * sysdeps/x86_64/pthreaddef.h: New file.
11190 * sysdeps/i386/pthreaddef.h (gettid): Removed.
11192 * sysdeps/x86_64/pthread_spin_init.c: New file.
11193 * sysdeps/x86_64/pthread_spin_lock.c: New file.
11194 * sysdeps/x86_64/pthread_spin_trylock.c: New file.
11195 * sysdeps/x86_64/pthread_spin_unlock.c: New file.
11197 * sysdeps/i386/i686/pthread_spin_trylock.S (pthread_spin_trylock):
11198 Add missing lock prefix. Minute optimization.
11200 * tst-spin2.c (main): Also check successful trylock call.
11202 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use correct
11203 syscall. Fix typo in case INTERNAL_SYSCALL is not used.
11205 * sysdeps/i386/pthread_spin_destroy.c: Moved to...
11206 * sysdeps/pthread/pthread_spin_destroy.c: ...here. New file.
11208 * sysdeps/i386/pthread_sigmask.c: Removed. Use the generic code.
11209 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Return correct
11210 value in case of an error. Add support for INTERNAL_SYSCALL.
11212 * sysdeps/i386/pthread_sigmask.c (pthread_sigmask): Return correct
11213 value in case of an error.
11215 * sysdeps/x86_64/tls.h: New file.
11217 2002-11-26 Ulrich Drepper <drepper@redhat.com>
11219 * sysdeps/i386/tls.h (THREAD_GETMEM_NC): Change interface. It now
11220 takes the array member name and the index as parameters.
11221 (THREAD_SETMEM_NC): Likewise.
11222 * pthread_getspecific.c: Use new THREAD_GETMEM_NC interface.
11223 * pthread_setspecific.c: Use new THREAD_GETMEM_NC and THREAD_SETMEM_NC
11226 * sysdeps/i386/tls.h (THREAD_SETMEM): Use size of member element
11227 to decide which code to use.
11228 (THREAD_SETMEM_NC): Likewise.
11230 * allocatestack.c (queue_stack): Don't remove stack from list here.
11231 Do it in the caller. Correct condition to prematurely terminate
11232 loop to free stacks.
11233 (__deallocate_stack): Remove stack from list here.
11235 2002-11-26 Ulrich Drepper <drepper@redhat.com>
11237 * Makefile (tests): Add tst-stack1.
11238 * tst-stack1.c: New file.
11240 * allocatestack.c (allocate_stack): Initialize the TCB on a user
11243 * pthread_attr_getstack.c: Return bottom of the thread area.
11245 2002-11-25 Ulrich Drepper <drepper@redhat.com>
11247 * Makefile (libpthread-routines): Add pt-allocrtsig and
11248 pthread_kill_other_threads.
11249 * pt-allocrtsig.c: New file.
11250 * pthread_kill_other_threads.c: New file.
11251 * sysdeps/unix/sysv/linux/allocrtsig.c: Add additional aliases for
11252 all three functions.
11253 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
11255 * sysdeps/unix/sysv/linux/Versions (libc:GLIBC_PRIVATE): Export
11256 __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
11257 and __libc_allocate_rtsig_private.
11258 * Versions (libpthread): Export pthread_kill_other_threads_np,
11259 __libc_current_sigrtmin, and __libc_current_sigrtmax.
11261 2002-11-24 Ulrich Drepper <drepper@redhat.com>
11263 * allocatestack.c (allocate_stack): stackaddr in attribute points to
11264 the end of the stack. Adjust computations.
11265 When mprotect call fails dequeue stack and free it.
11266 * pthread_attr_setstack.c: Store top of the stack in stackaddr
11268 * pthread_getattr_np.c: Likewise.
11270 * descr.h (IS_DETACHED): Add some more parenthesis to prevent
11273 2002-11-23 Ulrich Drepper <drepper@redhat.com>
11275 * sysdeps/pthread/pthread.h (pthread_self): __THROW must come before
11276 attribute definitions. Patch by Luca Barbieri <ldb@ldb.ods.org>.
11278 2002-11-22 Ulrich Drepper <drepper@redhat.com>
11280 * pthread_getspecific.c: Optimize access to first 2nd-level array.
11281 * pthread_setspecific.c: Likewise.
11283 2002-11-21 Ulrich Drepper <drepper@redhat.com>
11285 * sysdeps/unix/sysv/linux/i386/createthread.c: Remove CLONE_ flags
11286 definitions. Get them from the official place.
11287 * sysdeps/unix/sysv/linux/i386/fork.c: Likewise.
11289 * sysdeps/unix/sysv/linux/i386/createthread.c: Update CLONE_* flags.
11290 Use new CLONE_ flags in clone() calls.
11292 * sysdeps/unix/sysv/linux/fork.c: Use ARCH_FORK to actually fork.
11293 * sysdeps/unix/sysv/linux/i386/fork.c: New file.
11295 * Versions: Add pthread_* functions for libc.
11296 * forward.c: New file.
11298 * sysdeps/pthread/Makefile (libpthread-sysdeps_routines): Add
11300 * herrno.c: New file.
11303 * Makefile (libpthread-routines): Remove sem_post, sem_wait,
11304 sem_trywait, and sem_timedwait. Add herrno and res.
11305 * sem_init.c: Don't initialize lock and waiters members.
11306 * sem_open.c: Likewise.
11307 * sem_post.c: Removed.
11308 * sem_wait.c: Removed.
11309 * sem_trywait.c: Removed.
11310 * sem_timedwait.c: Removed.
11311 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Complete rewrite.
11312 Includes full implementations of sem_post, sem_wait, sem_trywait,
11314 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Adjust
11315 for new implementation.
11316 * sysdeps/unix/sysv/linux/internaltypes.h (struct sem): Remove lock
11317 and waiters fields.
11319 * tst-sem3.c: Improve error message.
11320 * tst-signal3.c: Likewise.
11322 * init.c (__pthread_initialize_minimal): Use set_tid_address syscall
11323 to tell the kernel about the termination futex and to initialize tid
11324 member. Don't initialize main_thread.
11325 * descr.h (struct pthread): Remove main_thread member.
11326 * cancelllation.c (__do_cancel): Remove code handling main thread.
11327 The main thread is not special anymore.
11329 * allocatestack.c (__reclaim_stacks): Mark stacks as unused. Add
11330 size of the stacks to stack_cache_actsize.
11332 * pt-readv.c: Add missing "defined".
11333 * pt-sigwait.c: Likewise.
11334 * pt-writev.c: Likewise.
11336 2002-11-09 Ulrich Drepper <drepper@redhat.com>
11338 * Versions: Export __connect from libpthread.
11339 Patch by Luca Barbieri <ldb@ldb.ods.org>.
11341 * Makefile (libpthread-routines): Add pt-raise.
11342 * sysdeps/unix/sysv/linux/raise.c: New file.
11343 * sysdeps/unix/sysv/linux/pt-raise.c: New file.
11344 * sysdeps/generic/pt-raise.c: New file.
11346 * pthread_cond_init.c: Initialize all data elements of the condvar
11347 structure. Patch by Luca Barbieri <ldb@ldb.ods.org>.
11349 * pthread_attr_init.c: Actually implement 2.0 compatibility version.
11350 * pthread_create.c: Likewise.
11352 * Makefile (tests): Add tst-key1, tst-key2, tst-key3.
11353 * tst-key1.c: New file.
11354 * tst-key2.c: New file.
11355 * tst-key3.c: New file.
11357 * Versions: Export pthread_detach for version GLIBC_2.0.
11358 Reported by Saurabh Desai <sdesai@austin.ibm.com>.
11360 2002-11-08 Ulrich Drepper <drepper@redhat.com>
11362 * pthread_key_create.c: Terminate search after an unused key was found.
11363 Patch by Luca Barbieri <ldb@ldb.ods.org>.
11365 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Return zero.
11366 Patch by Luca Barbieri <ldb@ldb.ods.org>.
11368 2002-10-10 Ulrich Drepper <drepper@redhat.com>
11370 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Use slow generic
11371 dynamic lookup for errno in PIC.
11373 * allocatestack.c (get_cached_stack): Rearrange code slightly to
11374 release the stack lock as soon as possible.
11375 Call _dl_allocate_tls_init for TCB from the cache to re-initialize
11376 the static TLS block.
11377 (allocate_stack): Call _dl_allocate_tls_init for user-provided stack.
11379 * cancellation.c: Renamed from cancelation.c.
11380 * Makefile: Adjust accordingly.
11381 * pthreadP.h (CANCELLATION_P): Renamed from CANCELATION_P.
11382 * cleanup_defer.c: Use CANCELLATION_P.
11383 * pthread_testcancel.c: Likewise.
11384 * descr.h: Fix spelling in comments.
11385 * init.c: Likewise.
11386 * pthread_getattr_np.c: Likewise.
11387 * pthread_getschedparam.c: Likewise.
11388 * pthread_setschedparam.c: Likewise.
11389 * Versions: Likewise.
11391 * pt-pselect.c: New file.
11392 * Makefile (libpthread-routines): Add pt-pselect.
11393 * Versions: Add pselect.
11395 * tst-cancel4.c: New file.
11396 * Makefile (tests): Add tst-cancel4.
11398 2002-10-09 Ulrich Drepper <drepper@redhat.com>
11400 * pthread_mutex_lock.c: Always record lock ownership.
11401 * pthread_mutex_timedlock.c: Likewise.
11402 * pthread_mutex_trylock.c: Likewise.
11404 * pt-readv.c: New file.
11405 * pt-writev.c: New file.
11406 * pt-creat.c: New file.
11407 * pt-msgrcv.c: New file.
11408 * pt-msgsnd.c: New file.
11409 * pt-poll.c: New file.
11410 * pt-select.c: New file.
11411 * pt-sigpause.c: New file.
11412 * pt-sigsuspend.c: New file.
11413 * pt-sigwait.c: New file.
11414 * pt-sigwaitinfo.c: New file.
11415 * pt-waitid.c: New file.
11416 * Makefile (libpthread-routines): Add pt-readv, pt-writev, pt-creat,
11417 pt-msgrcv, pt-msgsnd, pt-poll, pt-select, pt-sigpause, pt-sigsuspend,
11418 pt-sigwait, pt-sigwaitinfo, and pt-waitid.
11419 * Versions: Add all the new functions.
11421 * tst-exit1.c: New file.
11422 * Makefile (tests): Add tst-exit1.
11424 * sem_timedwait.c: Minor optimization for more optimal fastpath.
11426 2002-10-08 Ulrich Drepper <drepper@redhat.com>
11428 * pt-fcntl.c: Only enable asynchronous cancellation for F_SETLKW.
11430 * pthread_join.c: Enable asynchronous cancellation around lll_wait_tid
11431 call. pthread_join is an official cancellation point.
11432 * pthread_timedjoin.c: Likewise.
11434 * pthread_cond_wait.c: Revert order in which internal lock are dropped
11435 and the condvar's mutex are retrieved.
11436 * pthread_cond_timedwait.c: Likewise.
11437 Reported by dice@saros.East.Sun.COM.
11439 2002-10-07 Ulrich Drepper <drepper@redhat.com>
11441 * pthreadP.h: Cut out all type definitions and move them...
11442 * sysdeps/unix/sysv/linux/internaltypes.h: ...here. New file.
11443 * pthreadP.h: Include <internaltypes.h>.
11445 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Little
11446 performance tweaks.
11448 * sem_trywait.c: Shuffle #includes around to get right order.
11449 * sem_timedwait.c: Likewise.
11450 * sem_post.c: Likewise.
11451 * sem_wait.c: Likewise.
11453 * nptl 0.3 released.
11455 * Makefile (tests): Add tst-signal3.
11456 * tst-signal3.c: New file.
11458 2002-10-05 Ulrich Drepper <drepper@redhat.com>
11460 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Tell the compiler that
11461 the asms modify the sem object.
11462 (__lll_sem_timedwait): Now takes struct sem* as first parameter.
11464 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h (sem_t): Don't expose
11465 the actual members.
11466 * pthreadP.h (struct sem): New type. Actual semaphore type.
11467 * semaphoreP.h: Include pthreadP.h.
11468 * sem_getvalue.c: Adjust to sem_t change.
11469 * sem_init.c: Likewise.
11470 * sem_open.c: Likewise.
11471 * sem_post.c: Likewise.
11472 * sem_timedwait.c: Likewise.
11473 * sem_trywait.c: Likewise.
11474 * sem_wait.c: Likewise.
11476 2002-10-04 Ulrich Drepper <drepper@redhat.com>
11478 * Makefile (tests): Add tst-basic2, tst-exec1, tst-exec3, tst-exec3.
11479 * tst-basic2.c: New file.
11480 * tst-exec1.c: New file.
11481 * tst-exec2.c: New file.
11482 * tst-exec3.c: New file.
11484 * tst-fork1.c: Remove extra */.
11486 * nptl 0.2 released. The API for IA-32 is complete.