1 2010-01-14 Ulrich Drepper <drepper@redhat.com>
3 * Versions: Add pthread_mutex_consistent, pthread_mutexattr_getrobust,
4 and pthread_mutexattr_setrobust for GLIBC_2.12.
5 * pthread_mutex_consistent.c: Define alias pthread_mutex_consistent.
6 * pthread_mutexattr_getrobust.c: Define alias
7 pthread_mutexattr_getrobust.
8 * pthread_mutexattr_setrobust.c: Define alias
9 pthread_mutexattr_setrobust.
11 2010-01-12 Ulrich Drepper <drepper@redhat.com>
13 * sysdeps/pthread/pthread.h: Cleanup. Fix up for XPG7.
15 2010-01-08 Ulrich Drepper <drepper@redhat.com>
17 * sysdeps/pthread/pthread.h: Fix pthread_mutex_consistent declaration.
19 2009-12-18 Thomas Schwinge <thomas@codesourcery.com>
21 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c (_init): Don't
23 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c (_init): Likewise.
25 2009-12-17 Ulrich Drepper <drepper@redhat.com>
27 * pthread_rwlock_init.c (__pthread_rwlock_init): Simplify code by
30 2009-12-01 Dinakar Guniguntala <dino@in.ibm.com>
32 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.h: Define
33 FUTEX_WAIT_REQUEUE_PI and FUTEX_CMP_REQUEUE_PI.
34 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: If mutex
35 is a non robust PI mutex, then use FUTEX_CMP_REQUEUE_PI.
36 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
37 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: If mutex
38 is a non robust PI mutex, then use FUTEX_WAIT_REQUEUE_PI.
39 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
41 2009-12-12 Ulrich Drepper <drepper@redhat.com>
43 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
44 Don't update nwaiters after invalid timeout is recognized.
46 2009-11-27 Thomas Schwinge <thomas@codesourcery.com>
48 * sysdeps/unix/sysv/linux/sh/pt-initfini.c (_init): Don't call
51 2009-11-27 Andreas Schwab <schwab@redhat.com>
53 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Reload
54 THREAD_SELF->cancelhandling after returning from futex call.
56 2009-11-24 Ulrich Drepper <drepper@redhat.com>
58 * tst-sem13.c: New file.
59 * Makefile (tests): Add tst-sem13.
61 2009-11-22 Roland McGrath <roland@redhat.com>
63 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: # include "i686/dl-sysdep.h"
64 instead of recapitulating its contents.
66 2009-11-18 Ulrich Drepper <drepper@redhat.com>
68 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Minor
69 optimizations and cleanups.
71 2009-11-18 Dinakar Guniguntala <dino@in.ibm.com>
73 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
74 Remove redundant code. Fix cfi offsets.
75 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
78 2009-11-17 Ulrich Drepper <drepper@redhat.com>
80 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Minimally
81 reduce size of unwind info.
83 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Convert to use
85 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
86 Based on a patch by Dinakar Guniguntala <dino@in.ibm.com>.
88 2009-11-03 Andreas Schwab <schwab@linux-m68k.org>
91 * sysdeps/pthread/unwind-resume.c: Include <libgcc_s.h> and use
93 * sysdeps/pthread/unwind-forcedunwind.c: Likewise.
95 2009-10-30 Ulrich Drepper <drepper@redhat.com>
97 * tst-sem11.c (main): Rewrite to avoid aliasing problems.
100 * allocatestack.c (__nptl_setxid): Perform the operation in multiple
101 steps to avoid races with creation and terminations.
102 * nptl-init.c (sighandler_setxid): Adjust.
103 Patch by Daniel Jacobowitz.
105 2009-09-07 Andreas Schwab <schwab@redhat.com>
107 * sysdeps/pthread/bits/libc-lock.h (BP_SYM): Remove space before paren.
109 2009-09-02 Suzuki K P <suzuki@in.ibm.com>
110 Joseph Myers <joseph@codesourcery.com>
113 * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
114 Initialize the sigev_notify field for newly created timer to make sure
115 the timer gets deleted from the active timer's list upon timer_delete.
117 2009-08-27 Andrew Stubbs <ams@codesourcery.com>
119 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
120 Correct a logic error.
122 2009-08-25 Ulrich Drepper <drepper@redhat.com>
124 * sysdeps/x86_64/tls.h (RTLD_ENABLE_FOREIGN_CALL): Store old value
125 of the field in local variables.
126 (RTLD_FINALIZE_FOREIGN_CALL): Restore rtld_must_xmm_save from local
127 variable and don't unconditionally clear it.
129 2009-08-24 Ulrich Drepper <drepper@redhat.com>
131 * pthread_create.c (start_thread): Hint to the kernel that memory for
132 the stack can be reused. We do not mark all the memory. The part
133 still in use and some reserve are kept.
135 2009-08-23 Ulrich Drepper <drepper@redhat.com>
137 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Clean up namespace.
139 2009-08-11 Ulrich Drepper <drepper@redhat.com>
141 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Add CFI
144 2009-08-10 Ulrich Drepper <drepper@redhat.com>
146 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Add CFI
148 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
150 2009-08-10 Andreas Schwab <schwab@redhat.com>
152 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
153 (__pthread_cond_signal): Don't clobber register used for syscall
156 2009-08-08 Ulrich Drepper <drepper@redhat.com>
158 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
159 Optimize code path used when FUTEX_CLOCK_REALTIME is supported.
161 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
162 (__pthread_cond_wait): Optimize by avoiding use of callee-safe
165 2009-08-07 Ulrich Drepper <drepper@redhat.com>
167 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Little optimizations
168 enabled by the special *_asynccancel functions.
169 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
170 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
172 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Include lowlevellock.h.
174 2009-08-04 Ulrich Drepper <drepper@redhat.com>
176 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: New file.
177 * sysdeps/unix/sysv/linux/x86_64/libc-cancellation.S: New file.
178 * sysdeps/unix/sysv/linux/x86_64/librt-cancellation.S: New file.
179 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Optimize
180 since we can assume the special __*_{en,dis}able_asynccancel
182 (PUSHARGS_*, POPARGS_*, SAVESTK_*, RESTSTK_*): Removed.
183 * sysdeps/x86_64/tcb-offsets.sym: Add cancellation-related bits
184 and PTHREAD_CANCELED.
186 2009-07-31 Ulrich Drepper <drepper@redhat.com>
188 * descr.h: Better definition of *_BITMASK macros for cancellation.
190 2009-07-29 Ulrich Drepper <drepper@redhat.com>
192 * sysdeps/x86_64/tls.h (TLS_TCB_ALIGN): Define explicitly to 32.
194 * sysdeps/x86_64/tls.h (tcbhead_t): Add room for SSE registers the
195 dynamic linker might have to save.
196 Define RTLD_CHECK_FOREIGN_CALL, RTLD_ENABLE_FOREIGN_CALL,
197 RTLD_PREPARE_FOREIGN_CALL, and RTLD_FINALIZE_FOREIGN_CALL. Pretty
200 * sysdeps/x86_64/tcb-offsets.sym: Add RTLD_SAVESPACE_SSE.
202 2009-07-28 Ulrich Drepper <drepper@redhat.com>
204 * pthread_mutex_lock.c [NO_INCR] (__pthread_mutex_cond_lock_adjust):
206 * pthreadP.h: Declare __pthread_mutex_cond_lock_adjust.
207 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: Add ROBUST_BIT.
208 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Don't use
209 requeue_pi for robust mutexes.
210 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
211 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
212 Don't only skip __pthread_mutex_cond_lock. Call instead
213 __pthread_mutex_cond_lock_adjust.
214 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
216 * pthread_mutex_unlock.c (__pthread_mutex_unlock_full): Minor
217 optimization of PI mutex handling.
219 2009-07-27 Ulrich Drepper <drepper@redhat.com>
222 * pthread_mutex_unlock.c (__pthread_mutex_unlock_full): Use _rel
223 instead of of _acq variants of cmpxchg.
225 2009-07-23 Ulrich Drepper <drepper@redhat.com>
227 * sysdeps/x86_64/configure.in: New file.
229 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix error
230 path when not using absolute timeout futex.
232 2009-07-20 Ulrich Drepper <drepper@redhat.com>
234 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Minor
235 optimizations of last changes.
236 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
238 2009-07-19 Ulrich Drepper <drepper@redhat.com>
240 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
241 FUTEX_WAIT_REQUEUE_PI and FUTEX_CMP_REQUEUE_PI.
242 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: If mutex
243 is a PI mutex, then use FUTEX_CMP_REQUEUE_PI.
244 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
245 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: If mutex
246 is a PI mutex, then use FUTEX_WAIT_REQUEUE_PI.
247 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
249 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
250 (__pthread_cond_timedwait): Make more robust.
252 2009-07-18 Ulrich Drepper <drepper@redhat.com>
254 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
255 (__lll_robust_timedlock_wait): If possible use FUTEX_WAIT_BITSET to
256 directly use absolute timeout.
258 * tst-sem5.c (do_test): Add test for premature timeout.
259 * Makefile: Linu tst-sem5 with librt.
261 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
262 (pthread_rwlock_timedwrlock): If possible use FUTEX_WAIT_BITSET to
263 directly use absolute timeout.
264 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
265 (pthread_rwlock_timedrdlock): Likewise.
267 * tst-cond11.c (run_test): Add test to check that the timeout is
270 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
271 (__pthread_cond_timedwait): If possible use FUTEX_WAIT_BITSET to
272 directly use absolute timeout.
274 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
275 (__pthread_cond_wait): Convert to using exception handler instead of
276 registered unwind buffer.
277 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
278 (__pthread_cond_timedwait): Likewise.
280 2009-07-17 Ulrich Drepper <drepper@redhat.com>
282 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
283 If possible use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME to directly
284 use absolute timeout.
286 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Optimize
287 handling of uncontested semaphore.
289 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
290 (__condvar_cleanup): Rewrite to use cfi directives instead of
291 hand-coded unwind tables.
292 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S (__pthread_once):
294 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
295 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
298 2009-06-12 Ulrich Drepper <drepper@redhat.com>
300 * Makefile (libpthread-routines): Add pthread_sigqueue.
301 * Versions: Add pthread_sigqueue for GLIBC_2.11.
302 * sysdeps/pthread/bits/sigthread.h: Declare pthread_sigqueue.
303 * sysdeps/unix/sysv/linux/pthread_sigqueue.c: New file.
305 2009-06-11 Ulrich Drepper <drepper@redhat.com>
308 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
309 (LOAD_FUTEX_WAIT_ABS): Fix futex parameter in case private futexes
311 Patch by Bryan Kadzban <bz-glibc@kdzbn.homelinux.net>.
313 2009-05-16 Ulrich Drepper <drepper@redhat.com>
315 * libc-cancellation.c: Move __libc_cleanup_routine to...
316 * libc-cleanup.c: ...here. New file.
317 * Makefile (routines): Add libc-cleanup.
319 * cancellation.c (__pthread_disable_asynccancel): Remove unnecessary
321 * libc-cancellation.c: Use <nptl/cancellation.c: to define the code.
322 * sysdeps/pthread/librt-cancellation.c: Likewise.
325 * nptl-init.c: Renamed from init.c.
326 * Makefile: Change all occurences of init.c to nptl-init.c.
328 2009-05-15 Ulrich Drepper <drepper@redhat.com>
330 * cancellation.c (__pthread_disable_asynccancel): Correct the bits
331 to test when deciding on the delay.
332 * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
333 * pthread_cancel.c: Close race between deciding on sending a signal
334 and setting the CANCELING_BIT bit.
336 * cancellation.c (__pthread_disable_asynccancel): Don't return if
338 * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
340 2009-04-27 Ulrich Drepper <drepper@redhat.com>
342 * cancellation.c (__pthread_disable_asynccancel): Use THREAD_ATOMIC_AND
344 * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
345 * sysdeps/x86_64/tls.h: Define THREAD_ATOMIC_AND.
346 * sysdeps/i386/tls.h: Likewise.
347 (tcbhead_t): Add __private_tm member.
349 2009-04-26 Ulrich Drepper <drepper@redhat.com>
351 * sem_open.c (sem_open): Rewrite initialization of initsem to
354 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
355 Avoid warning by using may_alias attribute on ptrhack.
357 2009-04-22 Ulrich Drepper <drepper@redhat.com>
360 * pthread_attr_setschedparam.c (__pthread_attr_setschedparam):
361 Check policy and priority for validity.
362 Patch mostly by Zhang Xiliang <zhangxiliang@cn.fujitsu.com>.
364 2009-03-15 Ulrich Drepper <drepper@redhat.com>
366 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
367 (__pthread_cond_timedwait): Change to use cfi directives instead of
368 hand-coded unwind sections.
370 2009-03-10 Ulrich Drepper <drepper@redhat.com>
372 * init.c (nptl_freeres): Compile only for SHARED.
374 2009-03-09 Jakub Jelinek <jakub@redhat.com>
376 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Define
377 FUTEX_WAIT_BITSET, FUTEX_WAKE_BITSET, FUTEX_CLOCK_REALTIME and
378 FUTEX_BITSET_MATCH_ANY.
380 2009-02-27 Roland McGrath <roland@redhat.com>
382 * init.c (__nptl_initial_report_events): Mark __attribute_used__.
383 * pthread_create.c (__nptl_threads_events, __nptl_last_event): Likewise.
385 2009-02-26 Ulrich Drepper <drepper@redhat.com>
387 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
388 _POSIX_THREAD_ROBUST_PRIO_INHERIT and
389 _POSIX_THREAD_ROBUST_PRIO_PROTECT. Reset value of macros from
392 2009-02-25 Ulrich Drepper <drepper@redhat.com>
394 * sysdeps/pthread/pthread.h: The robust mutex functions are in
397 2009-02-24 Ulrich Drepper <drepper@redhat.com>
399 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_BITS_POSIX_OPT_H):
400 Unify name of include protector macro.
402 2009-02-14 SUGIOKA Toshinobu <sugioka@itonet.co.jp>
404 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
405 LOAD_FUTEX_WAIT_ABS even if (FUTEX_WAIT == 0).
407 2009-01-29 Ulrich Drepper <drepper@redhat.com>
409 * sysdeps/pthread/unwind-forcedunwind.c: Encrypt all function
412 * allocatestack.c (__free_stacks): Renamed from free_stacks.
413 (__free_stack_cache): Removed. Change callers to call __free_stacks.
414 * init.c (nptl_freeres): New function.
415 (pthread_functions): Initialize ptr_freeres to nptl_freeres.
416 * pthreadP.h: Don't declare __free_stack_cache. Declare __free_stacks.
417 * sysdeps/pthread/unwind-forcedunwind.c (libgcc_s_handle): New
419 (pthread_cancel_init): Depend in libgcc_s_handle for decision to
420 load DSO. Assign last.
421 (__unwind_freeres): New function.
423 * allocatestack.c (__reclaim_stacks): Reset in_flight_stack later
424 for better debugging. No need to use stack_list_add here.
426 2009-01-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
428 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
429 (__lll_timedlock_wait): Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME
430 instead of computing relative timeout.
431 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
432 FUTEX_CLOCK_REALTIME and FUTEX_BITSET_MATCH_ANY.
434 2009-01-25 Ulrich Drepper <drepper@redhat.com>
436 * pthread_mutex_lock.c (__pthread_mutex_lock): Remove unused label out.
438 2009-01-08 Ulrich Drepper <drepper@redhat.com>
440 * sysdeps/pthread/list.h (list_add): Initialize new element first.
441 (list_add_tail): Removed.
443 2009-01-07 Ulrich Drepper <drepper@redhat.com>
445 * (in_flight_stack): New variable.
446 (stack_list_del): New function. Use instead of list_del.
447 (stack_list_add): New function. Use instead of list_add when adding to
448 stack_cache and stack_used lists.
449 (__reclaim_stacks): Complete operations on stack_cache and stack_used lists
450 when the fork call interrupted another thread.
452 2009-01-04 Ulrich Drepper <drepper@redhat.com>
454 * init.c (__pthread_initialize_minimal_internal): Optimize test
455 FUTEX_CLOCK_REALTIME a bit.
457 2009-01-03 Ulrich Drepper <drepper@redhat.com>
459 * init.c (__pthread_initialize_minimal_internal): Cheat a bit by
460 only passing five parameters to FUTEX_WAIT_BITSET call.
462 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
463 (__lll_timedlock_wait): Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME
464 instead of computing relative timeout.
466 2009-01-02 Ulrich Drepper <drepper@redhat.com>
468 * init.c (__pthread_initialize_minimal_internal): Check for
469 FUTEX_CLOCK_REALTIME flag.
470 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
471 Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME instead of computing
474 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
475 FUTEX_CLOCK_REALTIME and FUTEX_BITSET_MATCH_ANY.
476 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
477 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
478 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
479 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
481 2008-12-09 Ulrich Drepper <drepper@redhat.com>
483 * sysdeps/pthread/pthread.h (pthread_cleanup_pop): Use { } as empty
484 loop body instead of ; to avoid gcc warnings.
485 (pthread_cleanup_pop_restore_np): Likewise.
486 Patch by Caolán McNamara <caolanm@redhat.com>.
488 2008-12-09 Jakub Jelinek <jakub@redhat.com>
490 * pthread_mutex_lock.c (__pthread_mutex_lock): Handle only the
491 fast path here, for robust/PI/PP mutexes call
492 __pthread_mutex_lock_full. Don't use switch, instead use a series
493 of ifs according to their probability.
494 (__pthread_mutex_lock_full): New function.
495 * pthread_mutex_unlock.c: Include assert.h.
496 (__pthread_mutex_unlock_usercnt): Handle only the
497 fast path here, for robust/PI/PP mutexes call
498 __pthread_mutex_unlock_full. Don't use switch, instead use a series
499 of ifs according to their probability.
500 (__pthread_mutex_unlock_full): New function.
501 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c
502 (__pthread_mutex_lock_full): Define.
504 2008-12-08 Ulrich Drepper <drepper@redhat.com>
506 * sysdeps/x86_64/tls.h (tcbhead_t): Add fields reserved for TM
507 implementation. Add necessary padding and.
508 * descr.h (struct pthread): Increase padding for tcbhead_t to 24
511 2008-12-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
513 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define FUTEX_WAIT_BITSET
514 and FUTEX_WAKE_BITSET.
516 2008-12-02 Ulrich Drepper <drepper@redhat.com>
518 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_WAIT_BITSET
519 and FUTEX_WAKE_BITSET.
520 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
521 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
522 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
523 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
525 2008-11-25 Roland McGrath <roland@redhat.com>
527 * sysdeps/alpha, sysdeps/unix/sysv/linux/alpha:
528 Subdirectories moved to ports repository as
529 sysdeps/.../nptl subdirectories.
531 2008-11-12 Jakub Jelinek <jakub@redhat.com>
534 * pthread_condattr_setclock.c (pthread_condattr_setclock): Fix masking
536 * pthread_cond_init.c (__pthread_cond_init): Fix
537 cond->__data.__nwaiters initialization.
538 * Makefile (tests): Add tst-cond23.
539 * tst-cond23.c: New test.
541 2008-11-07 Jakub Jelinek <jakub@redhat.com>
543 * sysdeps/pthread/malloc-machine.h (MALLOC): Adjust __libc_tsd_define
545 (tsd_setspecific, tsd_getspecific): Adjust __libc_tsd_{set,get}
548 2008-11-01 Ulrich Drepper <drepper@redhat.com>
551 * pthread_mutex_lock.c: Add support for private PI mutexes.
552 * pthread_mutex_timedlock.c: Likewise.
553 * pthread_mutex_trylock.c: Likewise.
554 * pthread_mutex_unlock.c: Likewise.
555 Patch mostly by Ben Jackson <ben@ben.com>.
557 2008-10-31 Ulrich Drepper <drepper@redhat.com>
560 * sysdeps/pthread/gai_misc.h (__gai_create_helper_thread):
561 Increase stack size for helper thread.
563 2008-10-06 Martin Schwidefsky <schwidefsky@de.ibm.com>
565 * sysdeps/s390/tls.h (THREAD_SET_STACK_GUARD): Add empty inline
566 assembly with a clobber list for access registers a0 and a1.
568 2008-09-11 Martin Schwidefsky <schwidefsky@de.ibm.com>
570 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Add memory barrier
571 to force runp->refcntr to be read from memory.
573 2008-09-08 Richard Guenther <rguenther@suse.de>
575 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_lock,
576 lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
577 lll_timedlock, lll_robust_timedlock, lll_unlock,
578 lll_robust_unlock): Promote private to int.
580 2008-08-15 Ulrich Drepper <drepper@redhat.com>
582 * sysdeps/x86_64/pthreaddef.h: Remove ARCH_MAP_FLAGS and
583 ARCH_RETRY_MMAP definitions.
584 * allocatestack.c: Remove definition of ARCH_MAP_FLAGS.
585 Define MAP_STACK when not defined.
586 (allocate_stack): Use MAP_STACK instead of ARCH_MAP_FLAGS. Remove
587 handling of ARCH_RETRY_MMAP.
589 2008-07-30 Ulrich Drepper <drepper@redhat.com>
591 * tst-align2.c (f): Print message that f is reached.
593 2008-04-28 Hiroki Kaminaga <kaminaga@sm.sony.co.jp>
596 * sysdeps/powerpc/tcb-offsets.sym (PRIVATE_FUTEX_OFFSET): Guard symbol
597 definition with #ifndef __ASSUME_PRIVATE_FUTEX.
599 2008-07-25 Ulrich Drepper <drepper@redhat.com>
601 * sysdeps/unix/sysv/linux/mq_notify.c (init_mq_netlink): Use
602 SOCK_CLOEXEC if possible.
604 2008-05-29 Ulrich Drepper <drepper@redhat.com>
606 * Makefile (tests): Add tst-rwlock2a.
607 * tst-rwlock2.c: Use TYPE macro to decide what rwlock type to use.
608 * tst-rwlock2a.c: New file.
610 2008-06-12 Ulrich Drepper <drepper@redhat.com>
612 * sysdeps/pthread/pthread.h: Remove inadvertant checkin.
614 2008-05-17 Samuel Thibault <samuel.thibault@ens-lyon.org>
616 * sysdeps/pthread/pthread.h: Fix typo in comment.
618 2008-05-28 Ulrich Drepper <drepper@redhat.com>
620 * sysdeps/pthread/createthread.c (do_clone): Pass accurate length
621 of CPU set to the kernel.
623 2008-05-23 Paul Pluzhnikov <ppluzhnikov@google.com>
625 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Add
627 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
628 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
629 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
630 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
631 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
632 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
634 2008-05-22 Paul Pluzhnikov <ppluzhnikov@google.com>
636 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S: Add
638 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
640 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
642 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
645 2008-05-26 Ulrich Drepper <drepper@redhat.com>
647 * tst-typesizes.c: Explicitly check __SIZEOF_PTHREAD_* constants.
649 2008-05-20 Jakub Jelinek <jakub@redhat.com>
651 David S. Miller <davem@davemloft.net>
653 * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: New file.
655 2008-05-10 Ulrich Drepper <drepper@redhat.com>
657 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Access
659 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
661 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
663 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
665 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
667 Reported by Clemens Kolbitsch <clemens.kol@gmx.at>.
669 2008-04-14 David S. Miller <davem@davemloft.net>
671 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
672 (__old_sem_wait): Fix argument to lll_futex_wait().
674 2007-11-26 Daniel Jacobowitz <dan@codesourcery.com>
676 * pthread_create.c: Require pthread_mutex_trylock and
677 pthread_key_delete for libgcc.
679 2008-04-08 Jakub Jelinek <jakub@redhat.com>
682 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h
683 (lll_futex_wake_unlock): Add private argument to the pre-v9 macro.
684 Patch by Sunil Amitkumar Janki <devel.sjanki@gmail.com>.
686 2008-03-27 Ulrich Drepper <drepper@redhat.com>
688 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine ARG_MAX if
689 <linux/limits.h> has defined it.
690 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
691 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
692 * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
693 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
695 2008-03-18 Jakub Jelinek <jakub@redhat.com>
697 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Use __ASSEMBLER__ instead
699 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
700 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Likewise.
702 2008-03-14 Ulrich Drepper <drepper@redhat.com>
704 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
705 HAVE_DL_DISCOVER_OSVERSION.
706 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
707 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Likewise.
709 2008-03-07 Ulrich Drepper <drepper@redhat.com>
712 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Change
713 _POSIX_CHOWN_RESTRICTED value to zero.
715 2008-01-31 Roland McGrath <roland@redhat.com>
717 * Makefile (omit-deps): Variable removed.
719 2008-01-30 Ulrich Drepper <drepper@redhat.com>
721 * sysdeps/unix/sysv/linux/x86_64/sem_post.S (sem_post): Avoid
722 unnecessary addr32 prefix.
724 2008-01-29 Roland McGrath <roland@redhat.com>
726 * Makeconfig (ptw-CPPFLAGS, sysd-rules-patterns): New variables.
728 2008-01-22 Kaz Kojima <kkojima@rr.iij4u.or.jp>
730 * sysdeps/unix/sysv/linux/sh/sem_post.S: Don't overflow value field.
732 2008-01-21 Kaz Kojima <kkojima@rr.iij4u.or.jp>
734 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XADD): Use
736 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
737 (__lll_lock_wait_private): Fix typo.
738 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
739 (pthread_barrier_wait): Likewise. Adjust XADD use.
740 * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
742 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S
743 (pthread_rwlock_timedrdlock): Return correct return value.
744 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S
745 (pthread_rwlock_timedwrlock): Likewise.
747 2008-01-15 Ulrich Drepper <drepper@redhat.com>
749 * tst-eintr2.c (do_test): make sure that if mutex_lock in main
750 thread returns the program exits with an error code.
752 2008-01-10 Ulrich Drepper <drepper@redhat.com>
754 * pthread-errnos.sym: Add EOVERFLOW.
755 * sysdeps/unix/sysv/linux/structsem.sym: Add SEM_VALUE_MAX.
756 * sysdeps/unix/sysv/linux/sem_post.c: Don't overflow value field.
757 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
758 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
760 2007-12-14 Ulrich Drepper <drepper@redhat.com>
762 * sysdeps/x86_64/pthreaddef.h (ARCH_RETRY_MMAP): Take additional
763 parameter. Passed it as permission to mmap.
764 * allocatestack.c (allocate_stack): Pass prot as second parameter
767 2007-12-12 Ulrich Drepper <drepper@redhat.com>
769 * tst-basic7.c: Allocate memory for the stack.
772 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S [!SHARED]
773 (__pthread_cond_timedwait): Don't use VDSO.
774 Patch by Michal Januszewski.
776 2007-12-07 Ulrich Drepper <drepper@redhat.com>
779 * sysdeps/pthread/pthread.h [!__EXCEPTIONS] (pthread_cleanup_pop):
780 Allow label before pthread_cleanup_pop.
781 (pthread_cleanup_pop_restore_np): Likewise.
783 2007-12-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
785 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
786 Store 2 before returning ETIMEDOUT.
788 2007-11-23 Ulrich Drepper <drepper@redhat.com>
790 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
791 Store 2 before returning ETIMEDOUT.
792 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise
793 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
794 (__lll_lock_wait_private): Optimize.
795 (__lll_lock_wait): Likewise.
797 2007-11-20 Jakub Jelinek <jakub@redhat.com>
799 * sysdeps/pthread/pthread.h (pthread_cleanup_push,
800 pthread_cleanup_push_defer_np): Add extra (void *) cast to shut up
801 g++ 4.1 and 4.2 -Wstrict-aliasing warnings.
803 2007-11-08 Ulrich Drepper <drepper@redhat.com>
806 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
807 If we time out, try one last time to lock the futex to avoid
808 losing a wakeup signal.
809 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
810 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
813 * sysdeps/pthread/createthread.c (do_clone): Translate clone error
816 2007-11-07 Ulrich Drepper <drepper@redhat.com>
819 * allocatestack.c (allocate_stack): Change ENOMEM error in case
820 mmap failed to EAGAIN.
821 * Makefile (tests): Add tst-basic7.
822 * tst-basic7.c: New file.
824 2007-11-05 Ulrich Drepper <drepper@redhat.com>
826 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
829 2007-11-03 Mike Frysinger <vapier@gentoo.org>
831 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (LOAD_FUTEX_WAIT): Add
832 missing line continuations.
833 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S (LOAD_FUTEX_WAIT,
834 LOAD_FUTEX_WAKE): Likewise. Also add missing 3rd parameter.
836 2007-10-28 Ulrich Drepper <drepper@redhat.com>
839 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Declare
840 __active_timer_sigev_thread and __active_timer_sigev_thread_lock.
841 (struct timer): Add next element.
842 * sysdeps/unix/sysv/linux/timer_create.c: For SIGEV_THREAD timers,
843 enqueue timer structure into __active_timer_sigev_thread list.
844 * sysdeps/unix/sysv/linux/timer_delete.c: For SIGEV_THREAD timers,
845 remove timer struct from __active_timer_sigev_thread.
846 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
847 Before using timer structure make sure it is still on the
848 __active_timer_sigev_thread list. Keep lock until done.
849 Define __active_timer_sigev_thread and
850 __active_timer_sigev_thread_lock.
852 2007-10-27 Ulrich Drepper <drepper@redhat.com>
854 * sysdeps/pthread/malloc-machine.h: Define ATFORK_MEM.
855 Redefine thread_atfork for use of ATFORK_MEM.
856 * sysdeps/unix/sysv/linux/fork.h: Define __linkin_atfork.
857 * sysdeps/unix/sysv/linux/register-atfork.c (__linkin_atfork): New
859 * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
860 Use atomic operation when removing first element of list.
862 2007-10-17 Jakub Jelinek <jakub@redhat.com>
864 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__old_sem_post): New
865 routine instead of an alias to __new_sem_post.
867 2007-10-15 Jakub Jelinek <jakub@redhat.com>
869 * init.c (__pthread_initialize_minimal): Initialize word to appease
872 2007-10-10 Jakub Jelinek <jakub@redhat.com>
874 * sysdeps/pthread/bits/libc-lock.h (__libc_rwlock_init): Inside of
875 libc.so just clear NAME.
876 (__libc_rwlock_fini): Nop inside of libc.so.
877 * tst-initializers1.c (main): Test if PTHREAD_RWLOCK_INITIALIZER is
880 2007-09-02 Ulrich Drepper <drepper@redhat.com>
882 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
883 (__pthread_cond_wait): Fix unlocking of internal lock after mutex
885 Patch by Luca Barbieri <luca.barbieri@gmail.com>.
887 2007-08-21 Ulrich Drepper <drepper@redhat.com>
890 * allocatestack.c (__reclaim_stacks): Clear the TSD in the
891 reclaimed stack if necessary.
892 * Makefile (tests): Add tst-tsd6.
893 * tst-tsd6.c: New file.
895 2007-08-21 Jakub Jelinek <jakub@redhat.com>
897 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_dead):
898 Add private argument.
900 2007-08-20 Ulrich Drepper <drepper@redhat.com>
902 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
903 (__pthread_cond_timedwait): Use clock_gettime from VDSO if possible.
905 2007-08-16 Jakub Jelinek <jakub@redhat.com>
907 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h
908 (__lll_robust_timedlock): Pass private as last argument to
909 __lll_robust_timedlock_wait.
910 (__lll_unlock): Fix a pasto.
912 2007-08-15 Jakub Jelinek <jakub@redhat.com>
914 * sysdeps/unix/sysv/linux/sparc/internaltypes.h (sparc_new_sem,
915 sparc_old_sem): New structs.
916 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
917 (__sem_wait_cleanup): New function.
918 (__new_sem_wait): Use sparc_new_sem structure. Bump and afterwards
919 decrease nwaiters. Register __sem_wait_cleanup as cleanup handler.
920 Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
922 (__old_sem_wait): New function.
923 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: Include
924 nptl/sysdeps/unix/sysv/linux/sparc version.
925 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c:
927 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: Likewise.
928 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c
929 (__new_sem_trywait): Use sparc_old_sem structure.
930 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c
931 (sem_timedwait): Use sparc_new_sem structure. Bump and afterwards
932 decrease nwaiters. Register __sem_wait_cleanup as cleanup handler.
933 Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
934 lll_futex_timed_wait.
935 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c (__new_sem_post):
936 Use sparc_new_sem structure. Only wake if nwaiters > 0. Pass
937 isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
939 (__old_sem_post): New function.
940 * sysdeps/unix/sysv/linux/sparc/sem_wait.c: New file.
941 * sysdeps/unix/sysv/linux/sparc/sem_init.c: New file.
942 * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c: New file.
943 * sysdeps/unix/sysv/linux/sparc/sem_post.c: New file.
944 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: Remove.
945 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: Remove.
947 2007-08-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
949 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
950 (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
951 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
952 Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
953 * sysdeps/unix/sysv/linux/shpthread_cond_signal.S
954 (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
955 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
957 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
958 kernel-features.h and tcb-offsets.h.
959 (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
960 lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
962 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
964 (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE
965 to lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
967 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use #ifdef
968 __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
969 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
970 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
971 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
972 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
973 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
975 2007-08-14 Jakub Jelinek <jakub@redhat.com>
977 * sysdeps/unix/sysv/linux/lowlevellock.c: Comment fix.
978 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
979 (__lll_timedwait_tid): Pass LLL_SHARED as 4th argument to
980 lll_futex_timed_wait.
982 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (__lll_unlock,
983 __lll_robust_unlock): Rewrite as macros instead of inline functions.
984 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_unlock,
985 __lll_robust_unlock, __lll_wait_tid): Likewise.
987 2007-08-13 Jakub Jelinek <jakub@redhat.com>
989 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
991 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
992 (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
993 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
994 Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
995 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
996 (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
997 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
998 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Include
1000 (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
1001 lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
1002 process private. Switch DW_CFA_advance_loc1 and some
1003 DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
1004 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
1005 (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE to
1006 lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
1007 process private. Switch DW_CFA_advance_loc{1,2} and some
1008 DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
1009 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use
1010 #ifdef __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
1011 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1013 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
1014 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
1015 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1017 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
1018 (__pthread_cond_broadcast): Compare %r8 instead of
1019 dep_mutex-cond_*(%rdi) with $-1.
1020 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
1021 (__pthread_cond_signal): Xor FUTEX_WAKE_OP with FUTEX_WAKE instead
1024 2007-08-13 Ulrich Drepper <drepper@redhat.com>
1026 * sysdeps/unix/sysv/linux/i386/i786/Implies: New file.
1028 2007-08-13 Jakub Jelinek <jakub@redhat.com>
1030 * allocatestack.c: Include kernel-features.h.
1031 * pthread_create.c: Likewise.
1032 * pthread_mutex_init.c: Likewise.
1034 * pthread_cond_timedwait.c: Likewise.
1035 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
1036 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
1037 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
1038 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
1039 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
1040 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1041 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1043 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1045 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
1046 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
1047 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
1048 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
1050 2007-08-12 Jakub Jelinek <jakub@redhat.com>
1052 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
1053 [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
1054 byte elements. One of them is the new __shared element.
1055 [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
1056 adjust names of other padding elements.
1057 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
1058 [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
1059 byte elements. One of them is the new __shared element.
1060 [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
1061 adjust names of other padding elements.
1062 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_rwlock_t):
1063 Renamed __pad1 element to __shared, adjust names of other padding
1065 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
1066 (pthread_rwlock_t): Likewise.
1067 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock): Fix a
1070 2007-08-09 Anton Blanchard <anton@samba.org>
1072 * sysdeps/unix/sysv/linux/powerpc/pthread_spin_unlock.c: New file.
1074 2007-08-12 Ulrich Drepper <drepper@redhat.com>
1076 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Include
1077 <kernel-features.h>.
1078 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1080 2007-08-11 Ulrich Drepper <drepper@redhat.com>
1082 * pthreadP.h (PTHREAD_ROBUST_MUTEX_PSHARED): Define.
1083 * pthread_mutex_lock.c: Use it instead of PTHREAD_MUTEX_PSHARED when
1084 dealing with robust mutexes.
1085 * pthread_mutex_timedlock.c: Likewise.
1086 * pthread_mutex_trylock.c: Likewise.
1087 * pthread_mutex_unlock.c: Likewise.
1088 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
1090 2007-08-06 Jakub Jelinek <jakub@redhat.com>
1092 * pthreadP.h (PTHREAD_MUTEX_PSHARED_BIT): Define.
1093 (PTHREAD_MUTEX_TYPE): Mask __kind with 127.
1094 (PTHREAD_MUTEX_PSHARED): Define.
1095 * pthread_mutex_init.c (__pthread_mutex_init): Set
1096 PTHREAD_MUTEX_PSHARED_BIT for pshared or robust
1098 * pthread_mutex_lock.c (LLL_MUTEX_LOCK): Take mutex as argument
1099 instead of its __data.__lock field, pass PTHREAD_MUTEX_PSHARED
1100 as second argument to lll_lock.
1101 (LLL_MUTEX_TRYLOCK): Take mutex as argument
1102 instead of its __data.__lock field.
1103 (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
1104 __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
1106 (__pthread_mutex_lock): Update LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
1107 LLL_ROBUST_MUTEX_LOCK users, use PTHREAD_MUTEX_TYPE (mutex)
1108 instead of mutex->__data.__kind directly, pass
1109 PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock and lll_futex_wait.
1110 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Use
1111 PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
1112 directly, pass PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock.
1113 (pthread_mutex_timedlock): Pass PTHREAD_MUTEX_PSHARED (mutex)
1114 to lll_timedlock, lll_robust_timedlock, lll_unlock and
1115 lll_futex_timed_wait. Use PTHREAD_MUTEX_TYPE (mutex) instead
1116 of mutex->__data.__kind directly.
1117 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Pass
1118 PTHREAD_MUTEX_PSHARED (mutex) to lll_timedlock,
1119 lll_robust_timedlock, lll_unlock and lll_futex_timed_wait. Use
1120 PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind directly.
1121 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Pass
1122 PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock, lll_robust_unlock
1124 * pthread_mutex_setprioceiling.c (pthread_mutex_setprioceiling): Pass
1125 PTHREAD_MUTEX_PSHARED (mutex) to lll_futex_wait and lll_futex_wake.
1126 Use PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
1128 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK):
1129 Take mutex as argument instead of its __data.__lock field, pass
1130 PTHREAD_MUTEX_PSHARED as second argument to lll_cond_lock.
1131 (LLL_MUTEX_TRYLOCK): Take mutex as argument instead of its
1132 __data.__lock field.
1133 (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
1134 __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
1135 to lll_robust_cond_lock.
1136 * pthread_cond_broadcast.c (__pthread_cond_broadcast): Add pshared
1137 variable, pass it to lll_lock, lll_unlock, lll_futex_requeue and
1138 lll_futex_wake. Don't use lll_futex_requeue if dependent mutex
1139 has PTHREAD_MUTEX_PSHARED_BIT bit set in its __data.__kind.
1140 * pthread_cond_destroy.c (__pthread_cond_destroy): Add pshared
1141 variable, pass it to lll_lock, lll_unlock, lll_futex_wake and
1143 * pthread_cond_signal.c (__pthread_cond_signal): Add pshared
1144 variable, pass it to lll_lock, lll_unlock, lll_futex_wake_unlock and
1146 * pthread_cond_timedwait.c (__pthread_cond_wait): Add
1147 pshared variable, pass it to lll_lock, lll_unlock,
1148 lll_futex_timedwait and lll_futex_wake.
1149 * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait): Add
1150 pshared variable, pass it to lll_lock, lll_unlock, lll_futex_wait
1152 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_requeue,
1153 lll_futex_wake_unlock): Add private argument, use __lll_private_flag
1155 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue,
1156 lll_futex_wake_unlock): Likewise.
1157 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_requeue):
1159 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_futex_requeue,
1160 lll_futex_wake_unlock): Likewise.
1161 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_requeue):
1163 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue,
1164 lll_futex_wake_unlock): Likewise.
1165 (lll_futex_wake): Fix a typo.
1166 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym (PS_BIT): Add.
1167 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
1168 (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
1169 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
1170 Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
1171 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
1172 (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
1173 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
1174 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1175 (__pthread_cond_timedwait): Likewise.
1176 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
1177 (__condvar_cleanup, __pthread_cond_wait): Likewise.
1179 2007-08-05 Jakub Jelinek <jakub@redhat.com>
1181 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
1182 Don't use CGOTSETUP and CGOTRESTORE macros.
1183 (CGOTSETUP, CGOTRESTORE): Remove.
1184 <IS_IN_rtld> (CENABLE, CDISABLE): Don't use JUMPTARGET, branch to
1187 2007-08-01 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1189 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Remove
1190 definitions for private futexes.
1191 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Include
1192 kernel-features.h and lowlevellock.h. Use private futexes if
1194 (__lll_lock_wait_private, __lll_unlock_wake_private): New.
1195 (__lll_mutex_lock_wait): Rename to
1196 (__lll_lock_wait): ... this. Don't compile in for libc.so.
1197 (__lll_mutex_timedlock_wait): Rename to ...
1198 (__lll_timedlock_wait): ... this. Use __NR_gettimeofday.
1199 Don't compile in for libc.so.
1200 (__lll_mutex_unlock_wake): Rename to ...
1201 (__lll_unlock_wake): ... this. Don't compile in for libc.so.
1202 (__lll_timedwait_tid): Use __NR_gettimeofday.
1203 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Allow including
1204 the header from assembler. Renamed all lll_mutex_* resp.
1205 lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
1206 Renamed all LLL_MUTEX_LOCK_* macros to LLL_LOCK_*.
1207 (FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE):
1209 (__lll_lock_wait_private): Add prototype.
1210 (__lll_lock_wait, __lll_timedlock_wait, __lll_robust_lock_wait,
1211 __lll_robust_timedlock_wait, __lll_unlock_wake_private,
1212 __lll_unlock_wake): Likewise.
1213 (lll_lock): Add private argument. Call __lll_lock_wait_private
1214 if private is constant LLL_PRIVATE.
1215 (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
1216 lll_timedlock, lll_robust_timedlock): Add private argument.
1217 (lll_unlock): Add private argument. Call __lll_unlock_wake_private
1218 if private is constant LLL_PRIVATE.
1219 (lll_robust_unlock, lll_robust_dead): Add private argument.
1220 (lll_lock_t): Remove.
1221 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
1222 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
1223 lll_cond_wake, lll_cond_broadcast): Remove.
1224 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: Include
1225 kernel-features.h and lowlevellock.h.
1226 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
1227 (LOAD_FUTEX_WAIT): Define.
1228 (__lll_robust_mutex_lock_wait): Rename to ...
1229 (__lll_robust_lock_wait): ... this. Add private argument.
1230 Use LOAD_FUTEX_WAIT macro.
1231 (__lll_robust_mutex_timedlock_wait): Rename to ...
1232 (__lll_robust_timedlock_wait): ... this. Add private argument.
1233 Use __NR_gettimeofday. Use LOAD_FUTEX_WAIT macro.
1234 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Include
1236 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
1237 (pthread_barrier_wait): Use __lll_{lock,unlock}_* instead of
1238 __lll_mutex_{lock,unlock}_*.
1239 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Include
1240 lowlevellock.h and pthread-errnos.h.
1241 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
1242 FUTEX_CMP_REQUEUE, EINVAL): Remove.
1243 (__pthread_cond_broadcast): Use __lll_{lock,unlock}_* instead of
1244 __lll_mutex_{lock,unlock}_*.
1245 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Include
1246 lowlevellock.h and pthread-errnos.h.
1247 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE, EINVAL): Remove.
1248 (__pthread_cond_signal): Use __lll_{lock,unlock}_* instead of
1249 __lll_mutex_{lock,unlock}_*.
1250 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
1252 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE): Remove.
1253 (__pthread_cond_timedwait): Use __lll_{lock,unlock}_* instead of
1254 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
1255 (__condvar_tw_cleanup): Likewise.
1256 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
1258 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
1259 (__pthread_cond_wait): Use __lll_{lock,unlock}_* instead of
1260 __lll_mutex_{lock,unlock}_*.
1261 ( __condvar_w_cleanup): Likewise.
1262 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Include lowlevellock.h.
1263 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
1264 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Include
1266 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
1267 (__pthread_rwlock_rdlock): Use __lll_{lock,unlock}_* instead of
1268 __lll_mutex_{lock,unlock}_*.
1269 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Include
1271 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
1272 FUTEX_PRIVATE_FLAG): Remove.
1273 (pthread_rwlock_timedrdlock): Use __lll_{lock,unlock}_* instead of
1274 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
1275 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Include
1277 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
1278 FUTEX_PRIVATE_FLAG): Remove.
1279 (pthread_rwlock_timedwrlock): Use __lll_{lock,unlock}_* instead of
1280 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
1281 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Include
1283 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
1284 (__pthread_rwlock_unlock): Use __lll_{lock,unlock}_* instead of
1285 __lll_mutex_{lock,unlock}_*.
1286 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Include
1288 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
1289 (__pthread_rwlock_wrlock): Use __lll_{lock,unlock}_* instead of
1290 __lll_mutex_{lock,unlock}_*.
1291 * sysdeps/unix/sysv/linux/sh/sem_post.S: Include lowlevellock.h.
1292 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
1293 (__new_sem_post): Use standard initial exec code sequences.
1294 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Include
1296 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
1297 FUTEX_PRIVATE_FLAG): Remove.
1298 (sem_timedwait): Use __NR_gettimeofday. Use standard initial
1299 exec code sequences.
1300 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Include lowlevellock.h.
1301 (__new_sem_trywait): Use standard initial exec code sequences.
1302 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Include lowlevellock.h.
1303 (__new_sem_wait): Use standard initial exec code sequences.
1305 2007-07-31 Anton Blanchard <anton@samba.org>
1307 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
1308 Use __asm __volatile (__lll_acq_instr ::: "memory") instead of
1309 atomic_full_barrier.
1311 2007-07-31 Jakub Jelinek <jakub@redhat.com>
1313 * allocatestack.c (stack_cache_lock): Change type to int.
1314 (get_cached_stack, allocate_stack, __deallocate_stack,
1315 __make_stacks_executable, __find_thread_by_id, __nptl_setxid,
1316 __pthread_init_static_tls, __wait_lookup_done): Add LLL_PRIVATE
1317 as second argument to lll_lock and lll_unlock macros on
1319 * pthread_create.c (__find_in_stack_list): Likewise.
1320 (start_thread): Similarly with pd->lock. Use lll_robust_dead
1321 macro instead of lll_robust_mutex_dead, pass LLL_SHARED to it
1323 * descr.h (struct pthread): Change lock and setxid_futex field
1325 * old_pthread_cond_broadcast.c (__pthread_cond_broadcast_2_0): Use
1326 LLL_LOCK_INITIALIZER instead of LLL_MUTEX_LOCK_INITIALIZER.
1327 * old_pthread_cond_signal.c (__pthread_cond_signal_2_0): Likewise.
1328 * old_pthread_cond_timedwait.c (__pthread_cond_timedwait_2_0):
1330 * old_pthread_cond_wait.c (__pthread_cond_wait_2_0): Likewise.
1331 * pthread_cond_init.c (__pthread_cond_init): Likewise.
1332 * pthreadP.h (__attr_list_lock): Change type to int.
1333 * pthread_attr_init.c (__attr_list_lock): Likewise.
1334 * pthread_barrier_destroy.c (pthread_barrier_destroy): Pass
1335 ibarrier->private ^ FUTEX_PRIVATE_FLAG as second argument to
1337 * pthread_barrier_wait.c (pthread_barrier_wait): Likewise and
1338 also for lll_futex_{wake,wait}.
1339 * pthread_barrier_init.c (pthread_barrier_init): Make iattr
1341 * pthread_cond_broadcast.c (__pthread_cond_broadcast): Pass
1342 LLL_SHARED as second argument to lll_{,un}lock.
1343 * pthread_cond_destroy.c (__pthread_cond_destroy): Likewise.
1344 * pthread_cond_signal.c (__pthread_cond_singal): Likewise.
1345 * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
1346 * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait):
1348 * pthread_getattr_np.c (pthread_getattr_np): Add LLL_PRIVATE
1349 as second argument to lll_{,un}lock macros on pd->lock.
1350 * pthread_getschedparam.c (__pthread_getschedparam): Likewise.
1351 * pthread_setschedparam.c (__pthread_setschedparam): Likewise.
1352 * pthread_setschedprio.c (pthread_setschedprio): Likewise.
1353 * tpp.c (__pthread_tpp_change_priority, __pthread_current_priority):
1355 * sysdeps/pthread/createthread.c (do_clone, create_thread):
1357 * pthread_once.c (once_lock): Change type to int.
1358 (__pthread_once): Pass LLL_PRIVATE as second argument to
1359 lll_{,un}lock macros on once_lock.
1360 * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Use
1361 lll_{,un}lock macros instead of lll_mutex_{,un}lock, pass
1362 rwlock->__data.__shared as second argument to them and similarly
1364 * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock):
1366 * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock):
1368 * pthread_rwlock_tryrdlock.c (__pthread_rwlock_tryrdlock): Likewise.
1369 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Likewise.
1370 * pthread_rwlock_unlock.c (__pthread_rwlock_unlock): Likewise.
1371 * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
1372 * sem_close.c (sem_close): Pass LLL_PRIVATE as second argument
1373 to lll_{,un}lock macros on __sem_mappings_lock.
1374 * sem_open.c (check_add_mapping): Likewise.
1375 (__sem_mappings_lock): Change type to int.
1376 * semaphoreP.h (__sem_mappings_lock): Likewise.
1377 * pthread_mutex_lock.c (LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
1378 LLL_ROBUST_MUTEX_LOCK): Use lll_{,try,robust_}lock macros
1379 instead of lll_*mutex_*, pass LLL_SHARED as last
1381 (__pthread_mutex_lock): Use lll_unlock instead of lll_mutex_unlock,
1382 pass LLL_SHARED as last argument.
1383 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK,
1384 LLL_MUTEX_TRYLOCK, LLL_ROBUST_MUTEX_LOCK): Use
1385 lll_{cond_,cond_try,robust_cond}lock macros instead of lll_*mutex_*,
1386 pass LLL_SHARED as last argument.
1387 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
1388 lll_{timed,try,robust_timed,un}lock instead of lll_*mutex*, pass
1389 LLL_SHARED as last argument.
1390 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Similarly.
1391 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt):
1393 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_lock,
1394 __libc_lock_lock_recursive, __libc_lock_unlock,
1395 __libc_lock_unlock_recursive): Pass LLL_PRIVATE as second
1396 argument to lll_{,un}lock.
1397 * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_lock,
1398 _IO_lock_unlock): Likewise.
1399 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Don't use
1401 * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
1402 Pass LLL_PRIVATE as second argument to lll_{,un}lock macros on
1404 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork,
1405 free_mem): Likewise.
1406 (__fork_lock): Change type to int.
1407 * sysdeps/unix/sysv/linux/fork.h (__fork_lock): Likewise.
1408 * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Pass
1409 isem->private ^ FUTEX_PRIVATE_FLAG as second argument to
1411 * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
1412 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Likewise.
1413 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait_private):
1415 (__lll_lock_wait, __lll_timedlock_wait): Add private argument and
1416 pass it through to lll_futex_*wait, only compile in when
1418 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
1419 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): Add private
1420 argument and pass it through to lll_futex_*wait.
1421 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Renamed all
1422 lll_mutex_* resp. lll_robust_mutex_* macros to lll_* resp.
1423 lll_robust_*. Renamed all __lll_mutex_* resp. __lll_robust_mutex_*
1424 inline functions to __lll_* resp. __lll_robust_*.
1425 (LLL_MUTEX_LOCK_INITIALIZER): Remove.
1426 (lll_mutex_dead): Add private argument.
1427 (__lll_lock_wait_private): New prototype.
1428 (__lll_lock_wait, __lll_robust_lock_wait, __lll_lock_timedwait,
1429 __lll_robust_lock_timedwait): Add private argument to prototypes.
1430 (__lll_lock): Add private argument, if it is constant LLL_PRIVATE,
1431 call __lll_lock_wait_private, otherwise pass private to
1433 (__lll_robust_lock, __lll_cond_lock, __lll_timedlock,
1434 __lll_robust_timedlock): Add private argument, pass it to
1435 __lll_*wait functions.
1436 (__lll_unlock): Add private argument, if it is constant LLL_PRIVATE,
1437 call __lll_unlock_wake_private, otherwise pass private to
1439 (__lll_robust_unlock): Add private argument, pass it to
1440 __lll_robust_unlock_wake.
1441 (lll_lock, lll_robust_lock, lll_cond_lock, lll_timedlock,
1442 lll_robust_timedlock, lll_unlock, lll_robust_unlock): Add private
1443 argument, pass it through to __lll_* inline function.
1444 (__lll_mutex_unlock_force, lll_mutex_unlock_force): Remove.
1445 (lll_lock_t): Remove.
1446 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
1447 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
1448 lll_cond_wake, lll_cond_broadcast): Remove.
1449 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
1450 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
1451 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
1452 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
1453 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Allow including
1454 the header from assembler. Renamed all lll_mutex_* resp.
1455 lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
1456 (LOCK, FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP,
1457 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
1458 (LLL_MUTEX_LOCK_INITIALIZER, LLL_MUTEX_LOCK_INITIALIZER_LOCKED,
1459 LLL_MUTEX_LOCK_INITIALIZER_WAITERS): Remove.
1460 (__lll_mutex_lock_wait, __lll_mutex_timedlock_wait,
1461 __lll_mutex_unlock_wake, __lll_lock_wait, __lll_unlock_wake):
1463 (__lll_trylock_asm, __lll_lock_asm_start, __lll_unlock_asm): Define.
1464 (lll_robust_trylock, lll_cond_trylock): Use LLL_LOCK_INITIALIZER*
1465 rather than LLL_MUTEX_LOCK_INITIALIZER* macros.
1466 (lll_trylock): Likewise, use __lll_trylock_asm, pass
1467 MULTIPLE_THREADS_OFFSET as another asm operand.
1468 (lll_lock): Add private argument, use __lll_lock_asm_start, pass
1469 MULTIPLE_THREADS_OFFSET as last asm operand, call
1470 __lll_lock_wait_private if private is constant LLL_PRIVATE,
1471 otherwise pass private as another argument to __lll_lock_wait.
1472 (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
1473 lll_timedlock, lll_robust_timedlock): Add private argument, pass
1474 private as another argument to __lll_*lock_wait call.
1475 (lll_unlock): Add private argument, use __lll_unlock_asm, pass
1476 MULTIPLE_THREADS_OFFSET as another asm operand, call
1477 __lll_unlock_wake_private if private is constant LLL_PRIVATE,
1478 otherwise pass private as another argument to __lll_unlock_wake.
1479 (lll_robust_unlock): Add private argument, pass private as another
1480 argument to __lll_unlock_wake.
1481 (lll_robust_dead): Add private argument, use __lll_private_flag
1483 (lll_islocked): Use LLL_LOCK_INITIALIZER instead of
1484 LLL_MUTEX_LOCK_INITIALIZER.
1485 (lll_lock_t): Remove.
1486 (LLL_LOCK_INITIALIZER_WAITERS): Define.
1487 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
1488 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
1489 lll_cond_wake, lll_cond_broadcast): Remove.
1490 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
1491 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Revert
1492 2007-05-2{3,9} changes.
1493 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Include
1494 kernel-features.h and lowlevellock.h.
1495 (LOAD_PRIVATE_FUTEX_WAIT): Define.
1496 (LOAD_FUTEX_WAIT): Rewritten.
1497 (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
1499 (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
1500 (__lll_mutex_lock_wait): Rename to ...
1501 (__lll_lock_wait): ... this. Take futex addr from %edx instead of
1502 %ecx, %ecx is now private argument. Don't compile in for libc.so.
1503 (__lll_mutex_timedlock_wait): Rename to ...
1504 (__lll_timedlock_wait): ... this. Use __NR_gettimeofday. %esi
1505 contains private argument. Don't compile in for libc.so.
1506 (__lll_mutex_unlock_wake): Rename to ...
1507 (__lll_unlock_wake): ... this. %ecx contains private argument.
1508 Don't compile in for libc.so.
1509 (__lll_timedwait_tid): Use __NR_gettimeofday.
1510 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Include
1511 kernel-features.h and lowlevellock.h.
1512 (LOAD_FUTEX_WAIT): Define.
1513 (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
1515 (__lll_robust_mutex_lock_wait): Rename to ...
1516 (__lll_robust_lock_wait): ... this. Futex addr is now in %edx
1517 argument, %ecx argument contains private. Use LOAD_FUTEX_WAIT
1519 (__lll_robust_mutex_timedlock_wait): Rename to ...
1520 (__lll_robust_timedlock_wait): ... this. Use __NR_gettimeofday.
1521 %esi argument contains private, use LOAD_FUTEX_WAIT macro.
1522 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Include
1524 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1525 (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
1526 PRIVATE(%ebx) ^ LLL_SHARED as private argument in %ecx to
1527 __lll_lock_wait and __lll_unlock_wake, pass MUTEX(%ebx) address
1528 to __lll_lock_wait in %edx.
1529 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
1530 Include lowlevellock.h and pthread-errnos.h.
1531 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
1532 FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
1533 (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*, pass
1534 cond_lock address in %edx rather than %ecx to __lll_lock_wait,
1535 pass LLL_SHARED in %ecx to both __lll_lock_wait and
1537 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
1538 Include lowlevellock.h and pthread-errnos.h.
1539 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
1540 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
1541 (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*, pass
1542 cond_lock address in %edx rather than %ecx to __lll_lock_wait,
1543 pass LLL_SHARED in %ecx to both __lll_lock_wait and
1545 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
1546 Include lowlevellock.h.
1547 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
1549 (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*, pass
1550 cond_lock address in %edx rather than %ecx to __lll_lock_wait,
1551 pass LLL_SHARED in %ecx to both __lll_lock_wait and
1552 __lll_unlock_wake. Use __NR_gettimeofday.
1553 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
1554 Include lowlevellock.h.
1555 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1556 (__pthread_cond_wait, __condvar_w_cleanup): Rename __lll_mutex_*
1557 to __lll_*, pass cond_lock address in %edx rather than %ecx to
1558 __lll_lock_wait, pass LLL_SHARED in %ecx to both __lll_lock_wait
1559 and __lll_unlock_wake.
1560 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S:
1561 Include lowlevellock.h.
1562 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1563 (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*, pass
1564 MUTEX(%ebx) address in %edx rather than %ecx to
1565 __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
1566 and __lll_unlock_wake. Move return value from %ecx to %edx
1568 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1569 Include lowlevellock.h.
1570 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
1572 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
1573 MUTEX(%ebp) address in %edx rather than %ecx to
1574 __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
1575 and __lll_unlock_wake. Move return value from %ecx to %edx
1576 register. Use __NR_gettimeofday.
1577 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1578 Include lowlevellock.h.
1579 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
1581 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
1582 MUTEX(%ebp) address in %edx rather than %ecx to
1583 __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
1584 and __lll_unlock_wake. Move return value from %ecx to %edx
1585 register. Use __NR_gettimeofday.
1586 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
1587 Include lowlevellock.h.
1588 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1589 (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*, pass
1590 MUTEX(%edi) address in %edx rather than %ecx to
1591 __lll_lock_wait, pass PSHARED(%edi) in %ecx to both __lll_lock_wait
1592 and __lll_unlock_wake.
1593 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
1594 Include lowlevellock.h.
1595 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1596 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
1597 MUTEX(%ebx) address in %edx rather than %ecx to
1598 __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
1599 and __lll_unlock_wake. Move return value from %ecx to %edx
1601 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Include
1603 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
1605 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Include lowlevellock.h.
1606 (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
1607 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Include
1609 (LOCK, SYS_futex, SYS_gettimeofday, FUTEX_WAIT): Don't define.
1610 (sem_timedwait): Use __NR_gettimeofday.
1611 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Include
1613 (LOCK): Don't define.
1614 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include
1616 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
1617 * sysdeps/unix/sysv/linux/powerpc/sem_post.c: Wake only when there
1619 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Revert
1620 2007-05-2{3,9} changes.
1621 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Include
1622 kernel-features.h and lowlevellock.h.
1623 (LOAD_PRIVATE_FUTEX_WAIT): Define.
1624 (LOAD_FUTEX_WAIT): Rewritten.
1625 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
1626 (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
1627 (__lll_mutex_lock_wait): Rename to ...
1628 (__lll_lock_wait): ... this. %esi is now private argument.
1629 Don't compile in for libc.so.
1630 (__lll_mutex_timedlock_wait): Rename to ...
1631 (__lll_timedlock_wait): ... this. %esi contains private argument.
1632 Don't compile in for libc.so.
1633 (__lll_mutex_unlock_wake): Rename to ...
1634 (__lll_unlock_wake): ... this. %esi contains private argument.
1635 Don't compile in for libc.so.
1636 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Include
1637 kernel-features.h and lowlevellock.h.
1638 (LOAD_FUTEX_WAIT): Define.
1639 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
1640 (__lll_robust_mutex_lock_wait): Rename to ...
1641 (__lll_robust_lock_wait): ... this. %esi argument contains private.
1642 Use LOAD_FUTEX_WAIT macro.
1643 (__lll_robust_mutex_timedlock_wait): Rename to ...
1644 (__lll_robust_timedlock_wait): ... this. %esi argument contains
1645 private, use LOAD_FUTEX_WAIT macro.
1646 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Include
1648 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1649 (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
1650 PRIVATE(%rdi) ^ LLL_SHARED as private argument in %esi to
1651 __lll_lock_wait and __lll_unlock_wake.
1652 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S:
1653 Include lowlevellock.h and pthread-errnos.h.
1654 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
1655 FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
1656 (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*,
1657 pass LLL_SHARED in %esi to both __lll_lock_wait and
1659 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S:
1660 Include lowlevellock.h and pthread-errnos.h.
1661 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
1662 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
1663 (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*,
1664 pass LLL_SHARED in %esi to both __lll_lock_wait and
1666 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:
1667 Include lowlevellock.h.
1668 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1669 (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*,
1670 pass LLL_SHARED in %esi to both __lll_lock_wait and
1672 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
1673 Include lowlevellock.h.
1674 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1675 (__pthread_cond_wait, __condvar_cleanup): Rename __lll_mutex_*
1676 to __lll_*, pass LLL_SHARED in %esi to both __lll_lock_wait
1677 and __lll_unlock_wake.
1678 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S:
1679 Include lowlevellock.h.
1680 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1682 (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*,
1683 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
1684 and __lll_unlock_wake.
1685 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
1686 Include lowlevellock.h.
1687 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1689 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
1690 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
1691 and __lll_unlock_wake.
1692 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1693 Include lowlevellock.h.
1694 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1696 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
1697 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
1698 and __lll_unlock_wake.
1699 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S:
1700 Include lowlevellock.h.
1701 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1703 (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*,
1704 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
1705 and __lll_unlock_wake.
1706 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S:
1707 Include lowlevellock.h.
1708 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1710 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
1711 pass PSHARED(%rdi) in %ecx to both __lll_lock_wait
1712 and __lll_unlock_wake.
1713 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Include
1715 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
1717 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Include lowlevellock.h.
1718 (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
1719 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Include
1721 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
1722 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Include
1724 (LOCK): Don't define.
1725 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Include
1727 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
1728 * sysdeps/unix/sysv/linux/sparc/internaltypes.h: New file.
1729 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_destroy.c: New file.
1730 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_init.c: New file.
1731 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_wait.c: New file.
1732 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
1733 (__lll_lock_wait_private): New function.
1734 (__lll_lock_wait, __lll_timedlock_wait): Add private argument, pass
1735 it to lll_futex_*wait. Don't compile in for libc.so.
1736 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c:
1738 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c
1739 (struct sparc_pthread_barrier): Remove.
1740 (pthread_barrier_wait): Use union sparc_pthread_barrier instead of
1741 struct sparc_pthread_barrier. Pass
1742 ibarrier->s.pshared ? LLL_SHARED : LLL_PRIVATE to lll_{,un}lock
1743 and lll_futex_wait macros.
1744 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
1746 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
1747 Include sparc pthread_barrier_wait.c instead of generic one.
1749 2007-07-30 Jakub Jelinek <jakub@redhat.com>
1751 * tst-rwlock14.c (do_test): Avoid warnings on 32-bit arches.
1753 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
1754 (pthread_rwlock_timedrdlock): Copy futex retval to %esi rather than
1756 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
1757 (pthread_rwlock_timedwrlock): Likewise.
1758 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
1759 (__pthread_rwlock_unlock): Fix MUTEX != 0 args to __lll_*.
1761 2007-07-31 Jakub Jelinek <jakub@redhat.com>
1763 * sysdeps/sparc/tls.h (tcbhead_t): Add private_futex field.
1765 2007-07-26 Jakub Jelinek <jakub@redhat.com>
1767 * tst-locale2.c (useless): Add return statement.
1769 2007-07-24 Jakub Jelinek <jakub@redhat.com>
1771 * allocatestack.c (__nptl_setxid, __wait_lookup_done): Replace
1772 lll_private_futex_* (*) with lll_futex_* (*, LLL_PRIVATE).
1773 * pthread_create.c (start_thread): Likewise.
1774 * init.c (sighandler_setxid): Likewise.
1775 * sysdeps/alpha/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1776 * sysdeps/ia64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1777 * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1778 * sysdeps/s390/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1779 * sysdeps/powerpc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1780 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1781 * sysdeps/sparc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1782 * sysdeps/sh/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1783 * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY, AIO_MISC_WAIT):
1785 * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY, GAI_MISC_WAIT):
1787 * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
1789 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_waitzero,
1790 __rtld_notify): Likewise.
1791 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Likewise.
1792 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (clear_once_control,
1793 __pthread_once): Likewise.
1794 * sysdeps/unix/sysv/linux/alpha/pthread_once.c (clear_once_control,
1795 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1796 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1797 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1798 (lll_futex_wait): Add private argument, define as wrapper around
1799 lll_futex_timed_wait.
1800 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1801 use __lll_private_flag macro.
1802 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
1803 __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
1804 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (clear_once_control,
1805 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1806 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1807 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1808 (lll_futex_wait): Add private argument, define as wrapper around
1809 lll_futex_timed_wait.
1810 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1811 use __lll_private_flag macro.
1812 (__lll_mutex_unlock, __lll_robust_mutex_unlock, lll_wait_tid,
1813 __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
1814 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
1816 (lll_futex_timed_wait, lll_futex_wake): Use it.
1817 (lll_private_futex_wait, lll_private_futex_timed_wait,
1818 lll_private_futex_wake): Removed.
1819 * sysdeps/unix/sysv/linux/s390/pthread_once.c (clear_once_control,
1820 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1821 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1822 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1823 (lll_futex_wait): Add private argument, define as wrapper around
1824 lll_futex_timed_wait.
1825 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1826 use __lll_private_flag macro.
1827 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
1828 lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
1830 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
1831 (lll_private_futex_wait, lll_private_futex_timed_wait,
1832 lll_private_futex_wake): Removed.
1833 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_private_flag):
1834 Fix !__ASSUME_PRIVATE_FUTEX non-constant private case.
1835 (lll_private_futex_wait, lll_private_futex_timed_wait,
1836 lll_private_futex_wake): Removed.
1837 * sysdeps/unix/sysv/linux/sparc/pthread_once.c (clear_once_control,
1838 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1839 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1840 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1841 (lll_futex_wait): Add private argument, define as wrapper around
1842 lll_futex_timed_wait.
1843 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1844 use __lll_private_flag macro.
1845 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
1846 lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
1848 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (__lll_private_flag):
1850 (lll_futex_timed_wait, lll_futex_wake): Use it.
1851 (lll_private_futex_wait, lll_private_futex_timed_wait,
1852 lll_private_futex_wake): Removed.
1854 2007-07-27 Jakub Jelinek <jakub@redhat.com>
1856 * sysdeps/sparc/tls.h (tcbhead_t): Move gscope_flag to the end
1857 of the structure for sparc32.
1859 2007-07-26 Aurelien Jarno <aurelien@aurel32.net>
1861 * sysdeps/sparc/tls.h (tcbhead_t): Add gscope_flag.
1863 2007-07-23 Ulrich Drepper <drepper@redhat.com>
1865 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
1866 code used when private futexes are assumed.
1867 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1870 2007-07-23 Jakub Jelinek <jakub@redhat.com>
1872 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
1873 (__lll_private_flag): Define.
1874 (lll_futex_wait): Define as a wrapper around lll_futex_timed_wait.
1875 (lll_futex_timed_wait, lll_futex_wake, lll_futex_wake_unlock): Use
1877 (lll_private_futex_wait, lll_private_futex_timedwait,
1878 lll_private_futex_wake): Define as wrapper around non-_private
1880 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
1881 (__lll_private_flag): Define.
1882 (lll_futex_timed_wait, lll_futex_wake): Use __lll_private_flag.
1883 (lll_private_futex_wait, lll_private_futex_timedwait,
1884 lll_private_futex_wake): Define as wrapper around non-_private
1887 2007-07-10 Steven Munroe <sjmunroe@us.ibm.com>
1889 * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Add LLL_SHARED
1890 parameter to lll_futex_wait call.
1891 * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
1893 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
1894 Replace lll_futex_wait with lll_private_futex_wait.
1895 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
1896 Add LLL_SHARED parameter to lll_futex_wake().
1898 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define LLL_PRIVATE
1899 LLL_SHARED, lll_private_futex_wait, lll_private_futex_timed_wait and
1900 lll_private_futex_wake.
1901 (lll_futex_wait): Add private parameter. Adjust FUTEX_PRIVATE_FLAG
1902 bit from private parm before syscall.
1903 (lll_futex_timed_wait): Likewise.
1904 (lll_futex_wake): Likewise.
1905 (lll_futex_wake_unlock): Likewise.
1906 (lll_mutex_unlock): Add LLL_SHARED parm to lll_futex_wake call.
1907 (lll_robust_mutex_unlock): Likewise.
1908 (lll_mutex_unlock_force): Likewise.
1909 (lll_wait_tid): Add LLL_SHARED parm to lll_futex_wait call.
1911 2007-07-23 Ulrich Drepper <drepper@redhat.com>
1913 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
1914 compilation when unconditionally using private futexes.
1915 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
1916 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1918 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
1919 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
1921 2007-07-17 Jakub Jelinek <jakub@redhat.com>
1923 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock_clear_flags2):
1926 2007-07-06 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1928 * sysdeps/sh/tls.h: Include stdlib.h, list.h, sysdep.h and
1931 2007-05-16 Roland McGrath <roland@redhat.com>
1933 * init.c (__nptl_initial_report_events): New variable.
1934 (__pthread_initialize_minimal_internal): Initialize pd->report_events
1937 2007-06-22 Jakub Jelinek <jakub@redhat.com>
1939 * pthread_getattr_np.c (pthread_getattr_np): Clear cpuset and
1940 cpusetsize if pthread_getaffinity_np failed with ENOSYS.
1942 2007-06-19 Ulrich Drepper <drepper@redhat.com>
1944 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Remove mrlock
1947 2007-06-18 Ulrich Drepper <drepper@redhat.com>
1949 * pthreadP.h: Define PTHREAD_MUTEX_TYPE.
1950 * phtread_mutex_lock.c: Use PTHREAD_MUTEX_TYPE.
1951 * pthread_mutex_timedlock.c: Likewise.
1952 * pthread_mutex_trylock.c: Likewise.
1953 * pthread_mutex_unlock.c: Likewise.
1955 2007-06-17 Andreas Schwab <schwab@suse.de>
1957 * sysdeps/pthread/pt-initfini.c: Tell gcc about the nonstandard
1960 2007-06-17 Ulrich Drepper <drepper@redhat.com>
1962 * allocatestack.c (allocate_stack): Make code compile if
1963 __ASSUME_PRIVATE_FUTEX is set.
1965 2007-06-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1967 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S:
1968 (__pthread_rwlock_rdlock): Don't use non SH-3/4 instruction.
1969 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S:
1970 (__pthread_rwlock_wrlock): Likewise.
1971 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
1972 (pthread_rwlock_timedrdlock): Likewise.
1973 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
1974 (pthread_rwlock_timedwrlock): Likewise.
1975 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S:
1976 (__pthread_rwlock_unlock): Likewise.
1978 2007-06-10 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1980 * sysdeps/sh/tcb-offsets.sym: Add PRIVATE_FUTEX.
1981 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Include endian.h.
1982 Split __flags into __flags, __shared, __pad1 and __pad2.
1983 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Use private
1984 futexes if they are available.
1985 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Adjust so that change
1986 in libc-lowlevellock.S allow using private futexes.
1987 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
1988 FUTEX_PRIVATE_FLAG. Add additional parameter to lll_futex_wait,
1989 lll_futex_timed_wait and lll_futex_wake. Change lll_futex_wait
1990 to call lll_futex_timed_wait. Add lll_private_futex_wait,
1991 lll_private_futex_timed_wait and lll_private_futex_wake.
1992 (lll_robust_mutex_unlock): Fix typo.
1993 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Use private
1994 field in futex command setup.
1995 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Use
1996 COND_NWAITERS_SHIFT instead of COND_CLOCK_BITS.
1997 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
1998 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use private futexes
1999 if they are available. Remove clear_once_control.
2000 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Use private
2001 futexes if they are available.
2002 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
2003 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
2004 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
2005 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
2006 * sysdeps/unix/sysv/linux/sh/sem_post.S: Add private futex support.
2007 Wake only when there are waiters.
2008 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add private futex
2009 support. Indicate that there are waiters. Remove unnecessary
2010 extra cancellation test.
2011 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise. Removed
2012 left-over duplication of __sem_wait_cleanup.
2014 2007-06-07 Ulrich Drepper <drepper@redhat.com>
2016 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Add additional
2017 parameter to lll_futex_wait, lll_futex_timed_wait, and
2018 lll_futex_wake. Change lll_futex_wait to call lll_futex_timed_wait.
2019 Add lll_private_futex_wait, lll_private_futex_timed_wait, and
2020 lll_private_futex_wake.
2021 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
2022 * allocatestack.c: Adjust use of lll_futex_* macros.
2024 * lowlevellock.h: Likewise.
2025 * pthread_barrier_wait.c: Likewise.
2026 * pthread_cond_broadcast.c: Likewise.
2027 * pthread_cond_destroy.c: Likewise.
2028 * pthread_cond_signal.c: Likewise.
2029 * pthread_cond_timedwait.c: Likewise.
2030 * pthread_cond_wait.c: Likewise.
2031 * pthread_create.c: Likewise.
2032 * pthread_mutex_lock.c: Likewise.
2033 * pthread_mutex_setprioceiling.c: Likewise.
2034 * pthread_mutex_timedlock.c: Likewise.
2035 * pthread_mutex_unlock.c: Likewise.
2036 * pthread_rwlock_timedrdlock.c: Likewise.
2037 * pthread_rwlock_timedwrlock.c: Likewise.
2038 * pthread_rwlock_unlock.c: Likewise.
2039 * sysdeps/alpha/tls.h: Likewise.
2040 * sysdeps/i386/tls.h: Likewise.
2041 * sysdeps/ia64/tls.h: Likewise.
2042 * sysdeps/powerpc/tls.h: Likewise.
2043 * sysdeps/pthread/aio_misc.h: Likewise.
2044 * sysdeps/pthread/gai_misc.h: Likewise.
2045 * sysdeps/s390/tls.h: Likewise.
2046 * sysdeps/sh/tls.h: Likewise.
2047 * sysdeps/sparc/tls.h: Likewise.
2048 * sysdeps/unix/sysv/linux/fork.c: Likewise.
2049 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
2050 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: Likewise.
2051 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Likewise.
2052 * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
2053 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
2054 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
2055 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
2056 * sysdeps/unix/sysv/linux/sparc/pthread_once.c: Likewise.
2057 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c:
2059 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: Likewise.
2060 * sysdeps/x86_64/tls.h: Likewise.
2062 2007-05-29 Ulrich Drepper <drepper@redhat.com>
2064 * pthread_getattr_np.c: No need to install a cancellation handler,
2065 this is no cancellation point.
2066 * pthread_getschedparam.c: Likewise.
2067 * pthread_setschedparam.c: Likewise.
2068 * pthread_setschedprio.c: Likewise.
2069 * sysdeps/unix/sysv/linux/lowlevellock.c: Remove all traces of
2071 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
2072 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
2073 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
2074 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2075 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2076 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2077 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
2078 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
2079 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
2080 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: Likewise.
2081 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
2082 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2084 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Checking
2085 whether there are more than one thread makes no sense here since
2086 we only call the slow path if the locks are taken.
2087 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Likewise.
2089 * sysdeps/unix/sysv/linux/internaltypes.h: Introduce
2090 COND_NWAITERS_SHIFT.
2091 * pthread_cond_destroy.c: Use COND_NWAITERS_SHIFT instead of
2093 * pthread_cond_init.c: Likewise.
2094 * pthread_cond_timedwait.c: Likewise.
2095 * pthread_cond_wait.c: Likewise.
2096 * pthread_condattr_getclock.c: Likewise.
2097 * pthread_condattr_setclock.c: Likewise.
2098 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Likewise.
2099 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2100 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
2101 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
2102 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2104 2007-05-28 Jakub Jelinek <jakub@redhat.com>
2106 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c: Include
2109 * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Use explicit
2111 (THREAD_GSCOPE_GET_FLAG): Remove.
2112 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Remove.
2113 * allocatestack.c (__wait_lookup_done): Revert 2007-05-24
2115 * sysdeps/powerpc/tls.h (tcbhead_t): Remove gscope_flag.
2116 (THREAD_GSCOPE_GET_FLAG): Remove.
2117 (THREAD_GSCOPE_RESET_FLAG): Use THREAD_SELF->header.gscope_flag
2118 instead of THREAD_GSCOPE_GET_FLAG.
2119 (THREAD_GSCOPE_SET_FLAG): Likewise. Add atomic_write_barrier after
2121 * sysdeps/s390/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
2122 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
2123 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
2124 THREAD_GSCOPE_WAIT): Define.
2125 * sysdeps/sparc/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
2126 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
2127 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
2128 THREAD_GSCOPE_WAIT): Define.
2129 * sysdeps/sh/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
2130 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
2131 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
2132 THREAD_GSCOPE_WAIT): Define.
2133 * sysdeps/ia64/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
2134 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
2135 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
2136 THREAD_GSCOPE_WAIT): Define.
2138 2007-05-24 Richard Henderson <rth@redhat.com>
2140 * descr.h (struct pthread): Add header.gscope_flag.
2141 * sysdeps/alpha/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
2142 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
2143 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
2144 THREAD_GSCOPE_WAIT): Define.
2146 2007-05-27 Ulrich Drepper <drepper@redhat.com>
2148 * init.c: Make it compile with older kernel headers.
2150 * tst-initializers1.c: Show through exit code which test failed.
2152 * pthread_rwlock_init.c: Also initialize __shared field.
2153 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Split __flags
2154 element in rwlock structure into four byte elements. One of them is
2155 the new __shared element.
2156 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h [__WORDSIZE=32]:
2158 [__WORDSIZE=64]: Renamed __pad1 element int rwlock structure to
2159 __shared, adjust names of other padding elements.
2160 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2161 * sysdeps/pthread/pthread.h: Adjust rwlock initializers.
2162 * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: Add PSHARED.
2163 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define
2165 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Change main
2166 futex to use private operations if possible.
2167 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
2169 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
2171 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
2172 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
2173 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
2174 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2176 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2178 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
2179 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
2181 2007-05-26 Ulrich Drepper <drepper@redhat.com>
2183 * pthreadP.h (PTHREAD_RWLOCK_PREFER_READER_P): Define.
2184 * pthread_rwlock_rdlock.c: Use PTHREAD_RWLOCK_PREFER_READER_P.
2185 * pthread_rwlock_timedrdlock.c: Likewise.
2186 * pthread_rwlock_tryrdlock.c: Likewise.
2188 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S (sem_trywait): Tiny
2191 * sysdeps/unix/sysv/linux/sem_wait.c: Add missing break.
2192 * sysdeps/unix/sysv/linux/sem_timedwait.c: Removed left-over
2193 duplication of __sem_wait_cleanup.
2195 * allocatestack.c: Revert last change.
2197 * sysdeps/i386/tls.h: Likewise.
2198 * sysdeps/x86_64/tls.h: Likewise.
2199 * descr.h [TLS_DTV_AT_TP] (struct pthread): Add private_futex field to
2201 * sysdeps/powerpc/tcb-offsets.sym: Add PRIVATE_FUTEX_OFFSET.
2203 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_barrier):
2205 * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: Add PRIVATE definition.
2206 * pthread_barrier_init.c: Set private flag if pshared and private
2207 futexes are supported.
2208 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Use
2209 private field in futex command setup.
2210 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
2212 2007-05-25 Ulrich Drepper <drepper@redhat.com>
2214 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Add private futex
2216 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
2217 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
2218 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
2219 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
2220 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
2222 * semaphoreP.h: Declare __old_sem_init and __old_sem_wait.
2223 * sem_init.c (__new_sem_init): Rewrite to initialize all three
2224 fields in the structure.
2225 (__old_sem_init): New function.
2226 * sem_open.c: Initialize all fields of the structure.
2227 * sem_getvalue.c: Adjust for renamed element.
2228 * sysdeps/unix/sysv/linux/Makefile [subdir=nptl]
2229 (gen-as-const-headers): Add structsem.sym.
2230 * sysdeps/unix/sysv/linux/structsem.sym: New file.
2231 * sysdeps/unix/sysv/linux/internaltypes.h: Rename struct sem to
2232 struct new_sem. Add struct old_sem.
2233 * sysdeps/unix/sysv/linux/sem_post.c: Wake only when there are waiters.
2234 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
2235 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
2236 * sysdeps/unix/sysv/linux/sem_wait.c: Indicate that there are waiters.
2237 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
2238 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
2239 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
2240 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
2241 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
2242 * Makefile (tests): Add tst-sem10, tst-sem11, tst-sem12.
2243 * tst-sem10.c: New file.
2244 * tst-sem11.c: New file.
2245 * tst-sem12.c: New file.
2246 * tst-typesizes.c: Test struct new_sem and struct old_sem instead
2249 2007-05-25 Ulrich Drepper <drepper@redhat.com>
2250 Jakub Jelinek <jakub@redhat.com>
2252 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
2253 Move __pthread_enable_asynccancel right before futex syscall.
2254 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
2257 2007-05-24 Jakub Jelinek <jakub@redhat.com>
2259 * sysdeps/i386/tls.h (THREAD_SET_PRIVATE_FUTEX,
2260 THREAD_COPY_PRIVATE_FUTEX): Define.
2261 * sysdeps/x86_64/tls.h (THREAD_SET_PRIVATE_FUTEX,
2262 THREAD_COPY_PRIVATE_FUTEX): Define.
2263 * allocatestack.c (allocate_stack): Use THREAD_COPY_PRIVATE_FUTEX.
2264 * init.c (__pthread_initialize_minimal_internal): Use
2265 THREAD_SET_PRIVATE_FUTEX.
2267 * sysdeps/powerpc/tls.h (tcbhead_t): Add gscope_flag.
2268 (THREAD_GSCOPE_FLAG_UNUSED, THREAD_GSCOPE_FLAG_USED,
2269 THREAD_GSCOPE_FLAG_WAIT): Define.
2270 (THREAD_GSCOPE_GET_FLAG, THREAD_GSCOPE_SET_FLAG,
2271 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_WAIT): Define.
2272 * sysdeps/i386/tls.h (THREAD_GSCOPE_WAIT): Don't use
2274 (THREAD_GSCOPE_GET_FLAG): Define.
2275 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Define.
2276 * allocatestack.c (__wait_lookup_done): Use THREAD_GSCOPE_GET_FLAG
2277 instead of ->header.gscope_flag directly.
2279 2007-05-23 Ulrich Drepper <drepper@redhat.com>
2281 * init.c (__pthread_initialize_minimal_internal): Check whether
2282 private futexes are available.
2283 * allocatestack.c (allocate_stack): Copy private_futex field from
2284 current thread into the new stack.
2285 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Use private
2286 futexes if they are available.
2287 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise
2288 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Adjust so that change
2289 in libc-lowlevellock.S allow using private futexes.
2290 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
2291 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
2293 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
2294 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use private futexes
2295 if they are available.
2296 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
2297 * sysdeps/x86_64/tcb-offsets.sym: Add PRIVATE_FUTEX.
2298 * sysdeps/i386/tcb-offsets.sym: Likewise.
2299 * sysdeps/x86_64/tls.h (tcbhead_t): Add private_futex field.
2300 * sysdeps/i386/tls.h (tcbhead_t): Likewise.
2302 2007-05-21 Ulrich Drepper <drepper@redhat.com>
2304 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
2305 Remove ptr_wait_lookup_done again.
2306 * init.c (pthread_functions): Don't add .ptr_wait_lookup_done here.
2307 (__pthread_initialize_minimal_internal): Initialize
2308 _dl_wait_lookup_done pointer in _rtld_global directly.
2309 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
2310 Remove code to code _dl_wait_lookup_done.
2311 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_WAIT): The pointer is not
2314 2007-05-21 Jakub Jelinek <jakub@redhat.com>
2316 * tst-robust9.c (do_test): Don't fail if ENABLE_PI and
2317 pthread_mutex_init failed with ENOTSUP.
2319 2007-05-19 Ulrich Drepper <drepper@redhat.com>
2321 * allocatestack.c (__wait_lookup_done): New function.
2322 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
2323 Add ptr_wait_lookup_done.
2324 * init.c (pthread_functions): Initialize .ptr_wait_lookup_done.
2325 * pthreadP.h: Declare __wait_lookup_done.
2326 * sysdeps/i386/tls.h (tcbhead_t): Add gscope_flag.
2327 Define macros to implement reference handling of global scope.
2328 * sysdeps/x86_64/tls.h: Likewise.
2329 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
2330 Initialize GL(dl_wait_lookup_done).
2332 2007-05-17 Ulrich Drepper <drepper@redhat.com>
2335 * pthread_mutex_lock.c: Preserve FUTEX_WAITERS bit when dead owner
2337 * pthread_mutex_timedlock.c: Likewise.
2338 * pthread_mutex_trylock.c: Likewise.
2339 Patch in part by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
2341 * Makefile (tests): Add tst-robust9 and tst-robustpi9.
2342 * tst-robust9.c: New file.
2343 * tst-robustpi9.c: New file.
2345 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Remove
2346 unnecessary extra cancellation test.
2348 2007-05-14 Ulrich Drepper <drepper@redhat.com>
2350 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Remove unnecessary
2351 extra cancellation test.
2352 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
2354 2007-05-10 Ulrich Drepper <drepper@redhat.com>
2356 * descr.h (struct pthread): Rearrange members to fill hole in
2359 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
2360 (__pthread_setaffinity_new): If syscall was successful and
2361 RESET_VGETCPU_CACHE is defined, use it before returning.
2362 * sysdeps/unix/sysv/linux/x86_64/pthread_setaffinity.c: New file.
2364 2007-05-10 Jakub Jelinek <jakub@redhat.com>
2367 * tst-align2.c: Include stackinfo.h.
2368 * tst-getpid1.c: Likewise.
2370 2007-05-02 Carlos O'Donell <carlos@systemhalted.org>
2373 * tst-align2.c (do_test): Add _STACK_GROWS_UP case.
2374 * tst-getpid1.c (do_test): Likewise.
2377 * allocatestack.c (change_stack_perm): Add _STACK_GROWS_UP case.
2378 (allocate_stack): Likewise.
2380 2007-05-07 Ulrich Drepper <drepper@redhat.com>
2382 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
2383 (__lll_robust_lock_wait): Fix race caused by reloading of futex value.
2384 (__lll_robust_timedlock_wait): Likewise.
2385 Reported by Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>.
2387 2007-05-06 Mike Frysinger <vapier@gentoo.org>
2390 * tst-cancel-wrappers.sh: Set C["fdatasync"] to 1.
2391 * tst-cancel4.c (tf_fdatasync): New test.
2393 2007-04-27 Ulrich Drepper <drepper@redhat.com>
2396 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Treat error
2397 check mutexes like normal mutexes.
2400 * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
2401 Initialize the whole sigevent structure to appease valgrind.
2403 2007-04-25 Ulrich Drepper <drepper@redhat.com>
2405 * sysdeps/x86_64/tls.h (tcbhead_t): Add vgetcpu_cache.
2406 * sysdeps/x86_64/tcb-offsets.sym: Add VGETCPU_CACHE_OFFSET.
2408 2007-04-06 Ulrich Drepper <drepper@redhat.com>
2410 * tst-locale1.c: Avoid warnings.
2411 * tst-locale2.c: Likewise.
2413 2007-03-19 Steven Munroe <sjmunroe@us.ibm.com>
2415 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
2416 (__lll_robust_trylock): Add MUTEX_HINT_ACQ to lwarx instruction.
2418 2007-03-16 Jakub Jelinek <jakub@redhat.com>
2420 * sysdeps/pthread/bits/libc-lock.h: Use __extern_inline and
2421 __extern_always_inline where appropriate.
2422 * sysdeps/pthread/pthread.h: Likewise.
2424 2007-03-13 Richard Henderson <rth@redhat.com>
2426 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Use two
2427 separate cfi regions for the two subsections.
2429 2007-02-25 Ulrich Drepper <drepper@redhat.com>
2431 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset refcntr in
2432 new thread, don't just decrement it.
2433 Patch by Suzuki K P <suzuki@in.ibm.com>.
2435 2007-02-21 Ulrich Drepper <drepper@redhat.com>
2437 * sysdeps/pthread/pthread-functions.h: Correct last patch, correct
2438 PTHFCT_CALL definition.
2440 2007-02-18 Ulrich Drepper <drepper@redhat.com>
2442 * sysdeps/pthread/pthread-functions.h: If PTR_DEMANGLE is not
2443 available, don't use it.
2445 2007-02-09 Jakub Jelinek <jakub@redhat.com>
2447 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
2448 (__lll_mutex_timedlock_wait): Use correct pointer when we don't
2449 call into the kernel to delay.
2451 2007-01-18 Ulrich Drepper <drepper@redhat.com>
2453 * tst-initializers1.c: We want to test the initializers as seen
2454 outside of libc, so undefined _LIBC.
2456 * pthread_join.c (cleanup): Avoid warning.
2458 2007-01-17 Ulrich Drepper <drepper@redhat.com>
2460 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
2461 (__lll_timedwait_tid): Add unwind info.
2463 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Don't just copy the
2464 function table, mangle the pointers.
2465 * sysdeps/pthread/pthread-functions.h: Define PTHFCT_CALL.
2466 * forward.c: Use PTHFCT_CALL and __libc_pthread_functions_init.
2467 * sysdeps/pthread/bits/libc-lock.h: When using __libc_pthread_functions
2468 demangle pointers before use.
2469 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Use PTHFCT_CALL to
2471 * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
2472 * sysdeps/pthread/setxid.h: Likewise.
2474 2007-01-12 Ulrich Drepper <drepper@redhat.com>
2476 * tst-rwlock7.c: Show some more information in case of correct
2479 2007-01-11 Ulrich Drepper <drepper@redhat.com>
2481 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
2482 (lll_futex_timed_wait): Undo part of last change, don't negate
2485 2007-01-10 Ulrich Drepper <drepper@redhat.com>
2487 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Cleanups. Define
2488 FUTEX_CMP_REQUEUE and lll_futex_requeue.
2490 2006-12-28 David S. Miller <davem@davemloft.net>
2492 * shlib-versions: Fix sparc64 linux target specification.
2494 2007-01-10 Jakub Jelinek <jakub@redhat.com>
2496 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
2497 Adjust include path for pthread_barrier_wait.c move.
2499 2006-12-21 Jakub Jelinek <jakub@redhat.com>
2501 * sysdeps/unix/sysv/linux/pthread_kill.c (pthread_kill): Make sure
2502 tid isn't reread from pd->tid in between ESRCH test and the syscall.
2504 2006-12-06 Jakub Jelinek <jakub@redhat.com>
2506 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Handle
2507 6 argument cancellable syscalls.
2508 (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
2509 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO): Handle
2510 6 argument cancellable syscalls.
2511 (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
2513 2006-12-09 Ulrich Drepper <drepper@redhat.com>
2515 * sysdeps/unix/sysv/linux/rtld-lowlevel.h
2516 (__rtld_mrlock_initialize): Add missing closing parenthesis.
2518 2006-10-30 Jakub Jelinek <jakub@redhat.com>
2520 * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
2521 __sync_lock_release instead of __sync_lock_release_si.
2523 2006-10-29 Jakub Jelinek <jakub@redhat.com>
2525 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (RTLD_SINGLE_THREAD_P):
2527 (SINGLE_THREAD_P): Define to 1 if IS_IN_rtld.
2528 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Likewise.
2529 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
2530 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
2531 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
2532 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
2533 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
2534 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
2535 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
2536 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
2537 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
2539 2006-10-27 Ulrich Drepper <drepper@redhat.com>
2541 * sysdeps/pthread/pthread_barrier_wait.c: Move to...
2542 * pthread_barrier_wait.c: ...here.
2543 * sysdeps/pthread/pthread_cond_broadcast.c: Move to...
2544 * pthread_cond_broadcast.c: ...here.
2545 * sysdeps/pthread/pthread_cond_signal.c: Move to...
2546 * pthread_cond_signal.c: ...here.
2547 * sysdeps/pthread/pthread_cond_timedwait.c: Move to...
2548 * pthread_cond_timedwait.c: ...here.
2549 * sysdeps/pthread/pthread_cond_wait.c: Move to...
2550 * pthread_cond_wait.c: ...here.
2551 * sysdeps/pthread/pthread_once.c: Move to...
2552 * pthread_once.c: ...here.
2553 * sysdeps/pthread/pthread_rwlock_rdlock.c: Move to...
2554 * pthread_rwlock_rdlock.c: ...here.
2555 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Move to...
2556 * pthread_rwlock_timedrdlock.c: ...here.
2557 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Move to...
2558 * pthread_rwlock_timedwrlock.c: ...here.
2559 * sysdeps/pthread/pthread_rwlock_unlock.c: Move to...
2560 * pthread_rwlock_unlock.c: ...here.
2561 * sysdeps/pthread/pthread_rwlock_wrlock.c: Move to...
2562 * pthread_rwlock_wrlock.c: ...here.
2563 * sysdeps/pthread/pthread_spin_destroy.c: Move to...
2564 * pthread_spin_destroy.c: ...here.
2565 * sysdeps/pthread/pthread_spin_init.c: Move to...
2566 * pthread_spin_init.c: ...here.
2567 * sysdeps/pthread/pthread_spin_unlock.c: Move to...
2568 * pthread_spin_unlock.c: ...here.
2569 * sysdeps/pthread/pthread_getcpuclockid.c: Move to...
2570 * pthread_getcpuclockid.c: ...here.
2572 * init.c: USE_TLS support is now always enabled.
2573 * tst-tls5.h: Likewise.
2574 * sysdeps/alpha/tls.h: Likewise.
2575 * sysdeps/i386/tls.h: Likewise.
2576 * sysdeps/ia64/tls.h: Likewise.
2577 * sysdeps/powerpc/tls.h: Likewise.
2578 * sysdeps/s390/tls.h: Likewise.
2579 * sysdeps/sh/tls.h: Likewise.
2580 * sysdeps/sparc/tls.h: Likewise.
2581 * sysdeps/x86_64/tls.h: Likewise.
2583 2006-10-27 Jakub Jelinek <jakub@redhat.com>
2585 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
2586 __rtld_mrlock_change): Update oldval if atomic compare and exchange
2589 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
2590 Define to THREAD_SELF->header.multiple_threads.
2591 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
2593 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
2595 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
2596 (SINGLE_THREAD_P): Likewise.
2597 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
2598 (SINGLE_THREAD_P): Likewise.
2599 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
2600 (SINGLE_THREAD_P): Likewise.
2601 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
2602 (SINGLE_THREAD_P): Likewise.
2603 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (SINGLE_THREAD_P):
2605 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
2606 (SINGLE_THREAD_P): Likewise.
2607 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
2608 (SINGLE_THREAD_P): Likewise.
2609 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (SINGLE_THREAD_P):
2612 2006-10-26 Jakub Jelinek <jakub@redhat.com>
2614 * pthread_attr_setstacksize.c (NEW_VERNUM): Define to GLIBC_2_3_3
2615 by default rather than 2_3_3.
2617 2006-10-17 Jakub Jelinek <jakub@redhat.com>
2619 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
2620 __rtld_mrlock_unlock, __rtld_mrlock_change, __rtld_mrlock_done): Use
2621 atomic_* instead of catomic_* macros.
2623 2006-10-12 Ulrich Drepper <drepper@redhat.com>
2626 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add SEM_VALUE_MAX.
2627 * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
2628 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
2629 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
2630 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
2631 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Remove SEM_VALUE_MAX.
2632 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
2633 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
2634 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
2635 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: Likewise.
2636 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
2637 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
2638 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
2640 2006-10-11 Ulrich Drepper <drepper@redhat.com>
2642 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add support for
2643 cancelable syscalls with six parameters.
2645 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Use catomic_*
2646 operations instead of atomic_*.
2648 2006-10-09 Ulrich Drepper <drepper@redhat.com>
2650 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: New file..
2652 2006-10-07 Ulrich Drepper <drepper@redhat.com>
2654 * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: New file.
2655 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstack.c: New file.
2656 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c:
2658 * pthread_attr_setstack.c: Allow overwriting the version number of the
2660 * pthread_attr_setstacksize.c: Likewise.
2661 (__old_pthread_attr_setstacksize): If STACKSIZE_ADJUST is defined use
2663 * sysdeps/unix/sysv/linux/powerpc/Versions (libpthread): Add
2664 pthread_attr_setstack and pthread_attr_setstacksize to GLIBC_2.6.
2666 2006-09-24 Ulrich Drepper <drepper@redhat.com>
2669 * descr.h (ENQUEUE_MUTEX_BOTH): Add cast to avoid warning.
2670 Patch by Petr Baudis.
2672 2006-09-18 Jakub Jelinek <jakub@redhat.com>
2674 * tst-kill4.c (do_test): Explicitly set tf thread's stack size.
2676 * tst-cancel2.c (tf): Loop as long as something was written.
2678 2006-09-12 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2680 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: For PI
2681 mutexes wake all mutexes.
2682 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Don't increment
2683 WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
2684 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
2686 2006-09-12 Ulrich Drepper <drepper@redhat.com>
2688 * tst-cond22.c (tf): Slight changes to the pthread_cond_wait use
2689 to guarantee the thread is always canceled.
2691 2006-09-08 Jakub Jelinek <jakub@redhat.com>
2693 * tst-cond22.c: Include pthread.h instead of pthreadP.h.
2695 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Only
2696 increase FUTEX if increasing WAKEUP_SEQ. Fix comment typo.
2697 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
2698 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2699 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2701 2006-09-08 Ulrich Drepper <drepper@redhat.com>
2704 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Don't
2705 increment WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
2706 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
2707 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2708 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2709 * Makefile (tests): Add tst-cond22.
2710 * tst-cond22.c: New file.
2712 2006-09-05 Ulrich Drepper <drepper@redhat.com>
2715 * descr.h (struct pthread): Add parent_cancelhandling.
2716 * sysdeps/pthread/createthread.c (create_thread): Pass parent
2717 cancelhandling value to child.
2718 * pthread_create.c (start_thread): If parent thread was canceled
2719 reset the SIGCANCEL mask.
2720 * Makefile (tests): Add tst-cancel25.
2721 * tst-cancel25.c: New file.
2723 2006-09-05 Jakub Jelinek <jakub@redhat.com>
2724 Ulrich Drepper <drepper@redhat.com>
2726 * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY): Don't decrement
2727 counterp if it is already zero.
2728 * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY): Likewise..
2730 2006-03-04 Jakub Jelinek <jakub@redhat.com>
2731 Roland McGrath <roland@redhat.com>
2733 * sysdeps/unix/sysv/linux/i386/lowlevellock.h
2734 (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
2735 LLL_STUB_UNWIND_INFO_3, LLL_STUB_UNWIND_INFO_4): Define.
2736 (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
2737 lll_robust_mutex_cond_lock, lll_mutex_timedlock,
2738 lll_robust_mutex_timedlock, lll_mutex_unlock,
2739 lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
2740 Add _L_*_ symbols around the subsection.
2741 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Add unwind info.
2742 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Likewise.
2744 2006-03-03 Jakub Jelinek <jakub@redhat.com>
2745 Roland McGrath <roland@redhat.com>
2747 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
2748 (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
2749 LLL_STUB_UNWIND_INFO_5, LLL_STUB_UNWIND_INFO_6): Define.
2750 (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
2751 lll_robust_mutex_cond_lock, lll_mutex_timedlock,
2752 lll_robust_mutex_timedlock, lll_mutex_unlock,
2753 lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
2754 Add _L_*_ symbols around the subsection.
2755 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Add unwind info.
2756 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
2758 2006-08-31 Ulrich Drepper <drepper@redhat.com>
2760 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Undo last
2761 change because it can disturb too much existing code. If real hard
2762 reader preference is needed we'll introduce another type.
2763 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
2764 (pthread_rwlock_timedwrlock): Likewise.
2765 * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
2768 2006-08-30 Ulrich Drepper <drepper@redhat.com>
2770 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Respect
2772 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
2773 (pthread_rwlock_timedwrlock): Likewise.
2774 * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
2777 2006-08-25 Jakub Jelinek <jakub@redhat.com>
2779 * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libpthread):
2780 Only define ifdef SHARED.
2782 2006-08-23 Ulrich Drepper <drepper@redhat.com>
2784 * allocatestack.c (queue_stack): Move freeing of surplus stacks to...
2785 (free_stacks): ...here.
2786 (__free_stack_cache): New function.
2787 * pthreadP.h: Declare __free_stack_cache.
2788 * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
2790 * init.c (pthread_functions): Initialize ptr_freeres.
2791 * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libptread):
2792 New freeres function.
2794 2006-07-30 Joseph S. Myers <joseph@codesourcery.com>
2797 * Makefile (extra-objs): Add modules to extra-test-objs instead.
2799 2006-08-20 Ulrich Drepper <drepper@redhat.com>
2801 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
2802 _XOPEN_REALTIME_THREADS.
2804 2006-08-15 Jakub Jelinek <jakub@redhat.com>
2806 * sysdeps/unix/sysv/linux/clock_settime.c (INTERNAL_VSYSCALL): Use
2807 HAVE_CLOCK_GETRES_VSYSCALL as guard macro rather than
2808 HAVE_CLOCK_GETTIME_VSYSCALL.
2809 (maybe_syscall_settime_cpu): Use plain INTERNAL_VSYSCALL here.
2811 2006-08-14 Jakub Jelinek <jakub@redhat.com>
2813 * sysdeps/unix/sysv/linux/bits/posix_opt.h
2814 (_POSIX_THREAD_PRIO_PROTECT): Define to 200112L.
2815 * descr.h (struct priority_protection_data): New type.
2816 (struct pthread): Add tpp field.
2817 * pthreadP.h (PTHREAD_MUTEX_PP_NORMAL_NP,
2818 PTHREAD_MUTEX_PP_RECURSIVE_NP, PTHREAD_MUTEX_PP_ERRORCHECK_NP,
2819 PTHREAD_MUTEX_PP_ADAPTIVE_NP): New enum values.
2820 * pthread_mutex_init.c (__pthread_mutex_init): Handle non-robust
2822 * pthread_mutex_lock.c (__pthread_mutex_lock): Handle TPP mutexes.
2823 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Likewise.
2824 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Likewise.
2825 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Likewise.
2827 * pthread_setschedparam.c (__pthread_setschedparam): Handle priority
2829 * pthread_setschedprio.c (pthread_setschedprio): Likewise.
2830 * pthread_mutexattr_getprioceiling.c
2831 (pthread_mutexattr_getprioceiling): If ceiling is 0, ensure it is
2832 in the SCHED_FIFO priority range.
2833 * pthread_mutexattr_setprioceiling.c
2834 (pthread_mutexattr_setprioceiling): Fix prioceiling validation.
2835 * pthread_mutex_getprioceiling.c (pthread_mutex_getprioceiling): Fail
2836 if mutex is not TPP. Ceiling is now in __data.__lock.
2837 * pthread_mutex_setprioceiling.c: Include stdbool.h.
2838 (pthread_mutex_setprioceiling): Fix prioceiling validation. Ceiling
2839 is now in __data.__lock. Add locking.
2840 * pthread_create.c (__free_tcb): Free pd->tpp structure.
2841 * Makefile (libpthread-routines): Add tpp.
2842 (xtests): Add tst-mutexpp1, tst-mutexpp6 and tst-mutexpp10.
2843 * tst-tpp.h: New file.
2844 * tst-mutexpp1.c: New file.
2845 * tst-mutexpp6.c: New file.
2846 * tst-mutexpp10.c: New file.
2847 * tst-mutex1.c (TEST_FUNCTION): Don't redefine if already defined.
2848 * tst-mutex6.c (TEST_FUNCTION): Likewise.
2850 2006-08-12 Ulrich Drepper <drepper@redhat.com>
2853 * pthread_join.c (pthread_join): Account for self being canceled
2854 when checking for deadlocks.
2855 * tst-join5.c: Cleanups. Allow to be used in tst-join6.
2856 (tf1): Don't print anything after pthread_join returns, this would be
2857 another cancellation point.
2859 * tst-join6.c: New file.
2860 * Makefile (tests): Add tst-join6.
2862 2006-08-03 Ulrich Drepper <drepper@redhat.com>
2865 * pthread_setspecific.c (__pthread_setspecific): Check
2866 out-of-range index before checking for unused key.
2868 * sysdeps/pthread/gai_misc.h: New file.
2870 2006-08-01 Ulrich Drepper <drepper@redhat.com>
2872 * sysdeps/unix/sysv/linux/i386/smp.h: New file. Old Linux-specific
2873 file. Don't use sysctl.
2874 * sysdeps/unix/sysv/linux/smp.h: Always assume SMP. Archs can
2875 overwrite the file if this is likely not true.
2877 2006-07-31 Daniel Jacobowitz <dan@codesourcery.com>
2879 * allocatestack.c (__reclaim_stacks): Reset the PID on cached stacks.
2880 * Makefile (tests): Add tst-getpid3.
2881 * tst-getpid3.c: New file.
2883 2006-07-30 Roland McGrath <roland@redhat.com>
2885 * Makefile (libpthread-routines): Add ptw-sigsuspend.
2887 * sysdeps/unix/sysv/linux/i386/not-cancel.h
2888 (pause_not_cancel): New macro.
2889 (nanosleep_not_cancel): New macro.
2890 (sigsuspend_not_cancel): New macro.
2891 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
2892 nanosleep_not_cancel macro from <not-cancel.h>.
2893 * pthread_mutex_lock.c (__pthread_mutex_lock): Use pause_not_cancel
2894 macro from <not-cancel.h>.
2896 2006-07-28 Ulrich Drepper <drepper@redhat.com>
2897 Jakub Jelinek <jakub@redhat.com>
2899 * descr.h: Change ENQUEUE_MUTEX and DEQUEUE_MUTEX for bit 0
2900 notification of PI mutex. Add ENQUEUE_MUTEX_PI.
2901 * pthreadP.h: Define PTHREAD_MUTEX_PI_* macros for PI mutex types.
2902 * pthread_mutex_setprioceilining.c: Adjust for mutex type name change.
2903 * pthread_mutex_init.c: Add support for priority inheritance mutex.
2904 * pthread_mutex_lock.c: Likewise.
2905 * pthread_mutex_timedlock.c: Likewise.
2906 * pthread_mutex_trylock.c: Likewise.
2907 * pthread_mutex_unlock.c: Likewise.
2908 * sysdeps/pthread/pthread_cond_broadcast.c: For PI mutexes wake
2910 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.c: Likewise.
2911 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.c: Likewise.
2912 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: New file.
2913 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-header): Add
2914 pthread-pi-defines.sym.
2915 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_LOCK_PI,
2916 FUTEX_UNLOCK_PI, and FUTEX_TRYLOCK_PI.
2917 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2918 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
2919 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2920 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2921 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2922 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
2923 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
2924 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
2925 _POSIX_THREAD_PRIO_INHERIT to 200112L.
2926 * tst-mutex1.c: Adjust to allow use in PI mutex test.
2927 * tst-mutex2.c: Likewise.
2928 * tst-mutex3.c: Likewise.
2929 * tst-mutex4.c: Likewise.
2930 * tst-mutex5.c: Likewise.
2931 * tst-mutex6.c: Likewise.
2932 * tst-mutex7.c: Likewise.
2933 * tst-mutex7a.c: Likewise.
2934 * tst-mutex8.c: Likewise.
2935 * tst-mutex9.c: Likewise.
2936 * tst-robust1.c: Likewise.
2937 * tst-robust7.c: Likewise.
2938 * tst-robust8.c: Likewise.
2939 * tst-mutexpi1.c: New file.
2940 * tst-mutexpi2.c: New file.
2941 * tst-mutexpi3.c: New file.
2942 * tst-mutexpi4.c: New file.
2943 * tst-mutexpi5.c: New file.
2944 * tst-mutexpi6.c: New file.
2945 * tst-mutexpi7.c: New file.
2946 * tst-mutexpi7a.c: New file.
2947 * tst-mutexpi8.c: New file.
2948 * tst-mutexpi9.c: New file.
2949 * tst-robust1.c: New file.
2950 * tst-robust2.c: New file.
2951 * tst-robust3.c: New file.
2952 * tst-robust4.c: New file.
2953 * tst-robust5.c: New file.
2954 * tst-robust6.c: New file.
2955 * tst-robust7.c: New file.
2956 * tst-robust8.c: New file.
2957 * Makefile (tests): Add the new tests.
2959 * pthread_create.c (start_thread): Add some casts to avoid warnings.
2960 * pthread_mutex_destroy.c: Remove unneeded label.
2962 2006-07-01 Ulrich Drepper <drepper@redhat.com>
2964 * pthread_mutex_init.c (__pthread_mutex_init): Move some
2965 computations to compile time.
2967 2006-06-04 Ulrich Drepper <drepper@redhat.com>
2969 * sysdeps/pthread/pthread.h: Add pthread_equal inline version.
2971 2006-05-15 Ulrich Drepper <drepper@redhat.com>
2973 * sysdeps/unix/sysv/linux/fork.h: Mark __fork_handlers as hidden.
2975 2006-05-11 Ulrich Drepper <drepper@redhat.com>
2977 * pthread_key_create.c (__pthread_key_create): Do away with
2978 __pthread_keys_lock.
2980 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
2981 (__kernel_cpumask_size): Mark as hidden.
2982 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
2984 * sem_open.c (__sem_mappings_lock): Mark as hidden.
2985 * semaphoreP.h (__sem_mappings_lock): Likewise.
2987 2006-05-10 Ulrich Drepper <drepper@redhat.com>
2989 * pthread_atfork.c: Mark __dso_handle as hidden.
2991 2006-05-09 Ulrich Drepper <drepper@redhat.com>
2994 * sysdeps/pthread/unwind-forcedunwind.c: Different solution for
2995 the reload problem. Change the one path in pthread_cancel_init
2996 which causes the problem. Force gcc to reload. Simplify callers.
2997 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c
2998 (_Unwind_GetBSP): Undo last patch.
3000 2006-05-07 Ulrich Drepper <drepper@redhat.com>
3002 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: Make sure the
3003 function pointer is reloaded after pthread_cancel_init calls.
3006 * sysdeps/pthread/unwind-forcedunwind.c: Make sure functions
3007 pointers are reloaded after pthread_cancel_init calls.
3009 2006-05-01 Ulrich Drepper <drepper@redhat.com>
3011 * sysdeps/pthread/allocalim.h (__libc_use_alloca): Mark with
3014 2006-04-27 Ulrich Drepper <drepper@redhat.com>
3016 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
3017 Allocate new object which is passed to timer_sigev_thread so that
3018 the timer can be deleted before the new thread is scheduled.
3020 2006-04-26 Roland McGrath <roland@redhat.com>
3022 * sysdeps/x86_64/tls.h: Include <asm/prctl.h> inside [! __ASSEMBLER__].
3024 2006-04-08 Ulrich Drepper <drepper@redhat.com>
3026 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove branch predicion
3027 suffix for conditional jumps.
3028 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
3029 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
3030 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
3031 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
3032 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
3033 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
3035 * init.c (sigcancel_handler): Compare with correct PID even if the
3036 thread is in the middle of a fork call.
3037 (sighandler_setxid): Likewise.
3038 Reported by Suzuki K P <suzuki@in.ibm.com> .
3040 2006-04-07 Jakub Jelinek <jakub@redhat.com>
3042 * pthreadP.h (FUTEX_TID_MASK): Sync with kernel.
3044 2006-04-06 Ulrich Drepper <drepper@redhat.com>
3046 * pthread_getattr_np.c (pthread_getattr_np): Close fp if getrlimit
3047 fails [Coverity CID 105].
3049 2006-04-05 Ulrich Drepper <drepper@redhat.com>
3051 * sysdeps/pthread/pthread.h: Add nonnull attributes.
3053 2006-04-03 Steven Munroe <sjmunroe@us.ibm.com>
3056 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h [_ARCH_PWR4]:
3057 Define __lll_rel_instr using lwsync.
3059 2006-03-27 Ulrich Drepper <drepper@redhat.com>
3061 * allocatestack.c (allocate_stack): Always initialize robust_head.
3062 * descr.h: Define struct robust_list_head.
3063 (struct pthread): Use robust_list_head in robust mutex list definition.
3064 Adjust ENQUEUE_MUTEX and DEQUEUE_MUTEX.
3065 * init.c [!__ASSUME_SET_ROBUST_LIST] (__set_robust_list_avail): Define.
3066 (__pthread_initialize_minimal_internal): Register robust_list with
3068 * pthreadP.h: Remove PRIVATE_ from PTHREAD_MUTEX_ROBUST_* names.
3069 Declare __set_robust_list_avail.
3070 * pthread_create.c (start_thread): Register robust_list of new thread.
3071 [!__ASSUME_SET_ROBUST_LIST]: If robust_list is not empty wake up
3073 * pthread_mutex_destroy.c: For robust mutexes don't look at the
3074 number of users, it's unreliable.
3075 * pthread_mutex_init.c: Allow use of pshared robust mutexes if
3076 set_robust_list syscall is available.
3077 * pthread_mutex_consistent.c: Adjust for PTHREAD_MUTEX_ROBUST_* rename.
3078 * pthread_mutex_lock.c: Simplify robust mutex code a bit.
3079 Set robust_head.list_op_pending before trying to lock a robust mutex.
3080 * pthread_mutex_timedlock.c: Likewise.
3081 * pthread_mutex_trylock.c: Likewise.
3082 * pthread_mutex_unlock.c: Likewise for unlocking.
3083 * Makefile (tests): Add tst-robust8.
3084 * tst-robust8.c: New file.
3086 2006-03-08 Andreas Schwab <schwab@suse.de>
3088 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h
3089 (DL_SYSINFO_IMPLEMENTATION): Add missing newline.
3091 2006-03-05 Roland McGrath <roland@redhat.com>
3093 * configure (libc_add_on): Disable add-on when $add_ons_automatic = yes
3094 and $config_os doesn't match *linux*.
3096 2006-03-05 David S. Miller <davem@sunset.davemloft.net>
3098 * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S:
3099 Use __syscall_error.
3100 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
3101 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: Likewise.
3102 * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: Likewise.
3103 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
3104 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: Likewise.
3105 * sysdeps/unix/sysv/linux/sparc/Makefile: New file.
3107 2006-03-02 Ulrich Drepper <drepper@redhat.com>
3109 * sysdeps/unix/sysv/linux/aio_misc.h: Various cleanups.
3111 2006-03-01 Ulrich Drepper <drepper@redhat.com>
3113 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
3114 (__lll_robust_lock_wait): Also set FUTEX_WAITERS bit if we got the
3116 (__lll_robust_timedlock_wait): Likewise.
3117 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S
3118 (__lll_robust_lock_wait): Likewise.
3119 (__lll_robust_timedlock_wait): Likewise.
3120 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
3121 (__lll_robust_lock_wait): Likewise.
3122 (__lll_robust_timedlock_wait): Likewise.
3124 2006-03-01 Jakub Jelinek <jakub@redhat.com>
3126 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_robust_mutex_dead,
3127 lll_robust_mutex_trylock, lll_robust_mutex_lock,
3128 lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
3129 lll_robust_mutex_unlock): Define.
3130 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
3132 2006-02-28 H.J. Lu <hongjiu.lu@intel.com>
3134 * sysdeps/unix/sysv/linux/ia64/clone2.S: Include <clone2.S>
3135 instead of <clone.S>.
3137 2006-02-27 Jakub Jelinek <jakub@redhat.com>
3139 * Makefile (libpthread-routines): Add
3140 pthread_mutexattr_[sg]etprotocol, pthread_mutexattr_[sg]etprioceiling
3141 and pthread_mutex_[sg]etprioceiling.
3142 * Versions (GLIBC_2.4): Export pthread_mutexattr_getprotocol,
3143 pthread_mutexattr_setprotocol, pthread_mutexattr_getprioceiling,
3144 pthread_mutexattr_setprioceiling, pthread_mutex_getprioceiling and
3145 pthread_mutex_setprioceiling.
3146 * sysdeps/pthread/pthread.h (PTHREAD_PRIO_NONE, PTHREAD_PRIO_INHERIT,
3147 PTHREAD_PRIO_PROTECT): New enum values.
3148 (pthread_mutexattr_getprotocol, pthread_mutexattr_setprotocol,
3149 pthread_mutexattr_getprioceiling, pthread_mutexattr_setprioceiling,
3150 pthread_mutex_getprioceiling, pthread_mutex_setprioceiling): New
3152 * pthreadP.h (PTHREAD_MUTEX_PRIO_INHERIT_PRIVATE_NP,
3153 PTHREAD_MUTEX_PRIO_PROTECT_PRIVATE_NP): New enum values.
3154 (PTHREAD_MUTEX_PRIO_CEILING_SHIFT, PTHREAD_MUTEX_PRIO_CEILING_MASK):
3156 (PTHREAD_MUTEXATTR_PROTOCOL_SHIFT, PTHREAD_MUTEXATTR_PROTOCOL_MASK,
3157 PTHREAD_MUTEXATTR_PRIO_CEILING_SHIFT,
3158 PTHREAD_MUTEXATTR_PRIO_CEILING_MASK): Define.
3159 (PTHREAD_MUTEXATTR_FLAG_BITS): Or in PTHREAD_MUTEXATTR_PROTOCOL_MASK
3160 and PTHREAD_MUTEXATTR_PRIO_CEILING_MASK.
3161 * pthread_mutex_init.c (__pthread_mutex_init): For the time being
3162 return ENOTSUP for PTHREAD_PRIO_INHERIT or PTHREAD_PRIO_PROTECT
3164 * pthread_mutex_getprioceiling.c: New file.
3165 * pthread_mutex_setprioceiling.c: New file.
3166 * pthread_mutexattr_getprioceiling.c: New file.
3167 * pthread_mutexattr_setprioceiling.c: New file.
3168 * pthread_mutexattr_getprotocol.c: New file.
3169 * pthread_mutexattr_setprotocol.c: New file.
3171 2006-02-27 Daniel Jacobowitz <dan@codesourcery.com>
3173 * sysdeps/unix/sysv/linux/aio_misc.h: Include <limits.h>.
3175 2006-02-27 Roland McGrath <roland@redhat.com>
3177 * sysdeps/pthread/Subdirs: List nptl here too.
3178 * configure (libc_add_on_canonical): New variable.
3180 * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: Use #include_next.
3182 * sysdeps/unix/sysv/linux/sleep.c: Use #include_next after #include of
3183 self to get main source tree's file.
3184 * sysdeps/unix/sysv/linux/alpha/clone.S: Likewise.
3185 * sysdeps/unix/sysv/linux/i386/clone.S: Likewise.
3186 * sysdeps/unix/sysv/linux/i386/vfork.S: Likewise.
3187 * sysdeps/unix/sysv/linux/ia64/clone2.S: Likewise.
3188 * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: Likewise.
3189 * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: Likewise.
3190 * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: Likewise.
3191 * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: Likewise.
3192 * sysdeps/unix/sysv/linux/sh/clone.S: Likewise.
3193 * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: Likewise.
3194 * sysdeps/unix/sysv/linux/sparc/sparc64/clone.S: Likewise.
3195 * sysdeps/unix/sysv/linux/x86_64/clone.S: Likewise.
3196 * sysdeps/unix/sysv/linux/x86_64/vfork.S: Likewise.
3198 * Makefile: Use $(sysdirs) in vpath directive.
3200 * sysdeps/pthread/Makefile (CFLAGS-libc-start.c): Variable removed.
3201 (CPPFLAGS-timer_routines.c): Likewise.
3203 * Makeconfig (includes): Variable removed.
3205 2006-02-26 Roland McGrath <roland@redhat.com>
3207 * sysdeps/generic/pt-raise.c: Moved to ...
3208 * pt-raise.c: ... here.
3209 * sysdeps/generic/lowlevellock.h: Moved to ...
3210 * lowlevellock.h: ... here.
3212 2006-02-23 Roland McGrath <roland@redhat.com>
3214 * descr.h (struct pthread): Add final member `end_padding'.
3215 (PTHREAD_STRUCT_END_PADDING): Use it.
3217 2006-02-20 Roland McGrath <roland@redhat.com>
3219 * sysdeps/mips: Directory removed, saved in ports repository.
3220 * sysdeps/unix/sysv/linux/mips: Likewise.
3222 2006-02-18 Ulrich Drepper <drepper@redhat.com>
3224 * tst-robust1.c: Add second mutex to check that the mutex list is
3227 2006-02-17 Jakub Jelinek <jakub@redhat.com>
3229 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_mutex_dead,
3230 lll_robust_mutex_trylock, lll_robust_mutex_lock,
3231 lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
3232 lll_robust_mutex_unlock): New macros.
3233 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
3234 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
3235 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
3236 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
3237 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: New file.
3239 2006-02-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3241 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Add lll_robust_mutex_*
3243 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: New file.
3245 2006-02-17 Ulrich Drepper <drepper@redhat.com>
3247 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
3248 (lll_robust_mutex_unlock): Avoid unnecessary wakeups.
3249 * sysdeps/unix/sysv/linux/i386/lowlevellock.h
3250 (lll_robust_mutex_unlock): Likewise.
3252 2006-02-13 Jakub Jelinek <jakub@redhat.com>
3254 * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX):
3255 Set robust_list.__next rather than robust_list.
3256 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
3257 (__pthread_list_t): New typedef.
3258 (pthread_mutex_t): Replace __next and __prev fields with __list.
3259 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
3260 (__pthread_list_t): New typedef.
3261 (pthread_mutex_t): Replace __next and __prev fields with __list.
3262 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
3263 (__pthread_list_t, __pthread_slist_t): New typedefs.
3264 (pthread_mutex_t): Replace __next and __prev fields with __list.
3265 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
3266 (__pthread_list_t, __pthread_slist_t): New typedefs.
3267 (pthread_mutex_t): Replace __next and __prev fields with __list.
3268 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
3269 (__pthread_list_t, __pthread_slist_t): New typedefs.
3270 (pthread_mutex_t): Replace __next and __prev fields with __list.
3271 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h
3272 (__pthread_slist_t): New typedef.
3273 (pthread_mutex_t): Replace __next field with __list.
3275 2006-02-15 Ulrich Drepper <drepper@redhat.com>
3277 * pthreadP.h: Define PTHREAD_MUTEX_INCONSISTENT instead of
3278 PTHREAD_MUTEX_OWNERDEAD.
3279 (PTHREAD_MUTEX_ROBUST_PRIVATE_NP): Define as 16, not 256.
3280 Define FUTEX_WAITERS, FUTEX_OWNER_DIED, FUTEX_TID_MASK.
3281 * Makefile (libpthread-routines): Add lowlevelrobustlock.
3282 * pthread_create.c (start_thread): Very much simplify robust_list loop.
3283 * pthread_mutex_consistent.c: Inconsistent mutex have __owner now set
3284 to PTHREAD_MUTEX_INCONSISTENT.
3285 * pthread_mutex_destroy.c: Allow destroying of inconsistent mutexes.
3286 * pthread_mutex_lock.c: Reimplement robust mutex handling.
3287 * pthread_mutex_trylock.c: Likewise.
3288 * pthread_mutex_timedlock.c: Likewise.
3289 * pthread_mutex_unlock.c: Likewise.
3290 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
3291 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
3292 lowlevelrobustlock.sym.
3293 * sysdeps/unix/sysv/linux/lowlevelrobustlock.sym: New file.
3294 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add lll_robust_mutex_*
3296 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
3297 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: New file.
3298 * sysdeps/unix/sysv/linux/i386/i586/lowlevelrobustlock.S: New file.
3299 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrobustlock.S: New file.
3300 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: New file.
3302 2006-02-12 Ulrich Drepper <drepper@redhat.com>
3304 * allocatestack.c (allocate_stack): Initialize robust_list.
3305 * init.c (__pthread_initialize_minimal_internal): Likewise.
3306 * descr.h (struct xid_command): Pretty printing.
3307 (struct pthread): Use __pthread_list_t or __pthread_slist_t for
3308 robust_list. Adjust macros.
3309 * pthread_create.c (start_thread): Adjust robust_list handling.
3310 * phtread_mutex_unlock.c: Don't allow unlocking from any thread
3311 but the owner for all robust mutex types.
3312 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
3313 __pthread_list_t and __pthread_slist_t. Use them in pthread_mutex_t.
3314 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3315 * sysdeps/pthread/pthread.h: Adjust mutex initializers.
3317 * sysdeps/unix/sysv/linux/i386/not-cancel.h: Define openat_not_cancel,
3318 openat_not_cancel_3, openat64_not_cancel, and openat64_not_cancel_3.
3320 2006-02-08 Jakub Jelinek <jakub@redhat.com>
3322 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait,
3323 lll_futex_timedwait, lll_wait_tid): Add "memory" clobber.
3325 2006-01-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3327 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_futex_wait):
3329 (lll_futex_timed_wait): Define.
3331 2006-01-19 Ulrich Drepper <drepper@redhat.com>
3333 * tst-cancel4.c: Test ppoll.
3335 2006-01-18 Andreas Jaeger <aj@suse.de>
3338 * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h
3339 (pthread_mutex_t): Follow changes for other archs. Based on patch
3340 by Jim Gifford <patches@jg555.com>.
3342 2006-01-13 Richard Henderson <rth@redhat.com>
3344 * sysdeps/alpha/tls.h (tcbhead_t): Rename member to __private.
3346 2006-01-10 Roland McGrath <roland@redhat.com>
3348 * sysdeps/alpha/jmpbuf-unwind.h: File moved to main source tree.
3349 * sysdeps/i386/jmpbuf-unwind.h: Likewise.
3350 * sysdeps/mips/jmpbuf-unwind.h: Likewise.
3351 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
3352 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
3353 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
3354 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
3355 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
3356 * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
3357 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
3359 2006-01-09 Roland McGrath <roland@redhat.com>
3361 * tst-initializers1-c89.c: New file.
3362 * tst-initializers1-c99.c: New file.
3363 * tst-initializers1-gnu89.c: New file.
3364 * tst-initializers1-gnu99.c: New file.
3365 * Makefile (tests): Add them.
3366 (CFLAGS-tst-initializers1-c89.c): New variable.
3367 (CFLAGS-tst-initializers1-c99.c): New variable.
3368 (CFLAGS-tst-initializers1-gnu89.c): New variable.
3369 (CFLAGS-tst-initializers1-gnu99.c): New variable.
3371 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
3372 Use __extension__ on anonymous union definition.
3373 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3374 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
3375 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3376 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3377 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
3379 2006-01-08 Jakub Jelinek <jakub@redhat.com>
3381 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
3382 Don't give the union a name because it changes the mangled name.
3383 Instead name the struct for __data.
3384 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_mutex_t):
3386 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_mutex_t):
3389 2006-01-09 Jakub Jelinek <jakub@redhat.com>
3391 * sysdeps/sparc/sparc64/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Add
3392 stack bias to mc_ftp field.
3394 2006-01-07 Ulrich Drepper <drepper@redhat.com>
3396 * sysdeps/pthread/aio_misc.h (AIO_MISC_WAIT): Work around gcc
3397 being too clever and reloading the futex value where it shouldn't.
3399 2006-01-06 Ulrich Drepper <drepper@redhat.com>
3401 * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX): Use
3404 2006-01-06 Jakub Jelinek <jakub@redhat.com>
3406 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
3409 2006-01-06 Ulrich Drepper <drepper@redhat.com>
3411 * sysdeps/ia64/tls.h (tcbhead_t): Rename private member to __private.
3412 * sysdeps/ia64/tcb-offsets.sym: Adjust for private->__private
3413 rename in tcbhead_t.
3415 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
3416 Don't give the union a name because it changes the mangled name.
3417 Instead name the struct for __data.
3418 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3419 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3420 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3421 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3422 * pthread_create.c (start_thread): Adjust robust mutex free loop.
3423 * descr.h (ENQUEUE_MUTEX, DEQUEUE_MUTEX): Adjust.
3425 2006-01-05 Ulrich Drepper <drepper@redhat.com>
3427 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
3429 (lll_futex_timed_wait): Define.
3430 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
3431 * sysdeps/pthread/aio_misc.h: New file.
3433 2006-01-03 Joseph S. Myers <joseph@codesourcery.com>
3435 * Makefile ($(objpfx)$(multidir)): Use mkdir -p.
3437 2006-01-03 Steven Munroe <sjmunroe@us.ibm.com>
3439 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
3440 (PSEUDO): Remove redundant cfi_startproc and cfi_endproc directives.
3441 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
3443 2006-01-04 Ulrich Drepper <drepper@redhat.com>
3445 * tst-cancel24.cc: Use C headers instead of C++ headers.
3447 2006-01-03 Jakub Jelinek <jakub@redhat.com>
3449 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Remove #error for
3450 sparc-linux configured glibc.
3451 (lll_futex_wake_unlock): Define to 1 for sparc-linux configured glibc.
3452 (__lll_mutex_trylock, __lll_mutex_cond_trylock, __lll_mutex_lock,
3453 __lll_mutex_cond_lock, __lll_mutex_timedlock): Use
3454 atomic_compare_and_exchange_val_24_acq instead of
3455 atomic_compare_and_exchange_val_acq.
3456 (lll_mutex_unlock, lll_mutex_unlock_force): Use atomic_exchange_24_rel
3457 instead of atomic_exchange_rel.
3458 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: New file.
3459 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c: New
3461 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c: New
3463 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: New file.
3464 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: New file.
3465 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: New file.
3466 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c: New file.
3467 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: New file.
3468 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
3470 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
3472 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: New file.
3473 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: New file.
3474 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c: New
3476 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_trywait.c: New
3478 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: New file.
3480 2006-01-03 Ulrich Drepper <drepper@redhat.com>
3482 * sysdeps/pthread/pthread.h [__WORDSIZE==64]: Don't use cast in
3485 2006-01-02 Jakub Jelinek <jakub@redhat.com>
3487 * sysdeps/sparc/tls.h (tcbhead_t): Add pointer_guard field.
3488 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
3489 THREAD_COPY_POINTER_GUARD): Define.
3490 * sysdeps/sparc/tcb-offsets.sym (POINTER_GUARD): Define.
3491 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Revert 2005-12-27 changes.
3493 2006-01-01 Ulrich Drepper <drepper@redhat.com>
3495 * version.c: Update copyright year.
3497 2005-12-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3499 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Remove explicit
3500 .eh_frame section, use cfi_* directives.
3501 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Add cfi instrumentation.
3503 2005-12-30 Ulrich Drepper <drepper@redhat.com>
3505 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Undo last change for
3508 2005-12-29 Ulrich Drepper <drepper@redhat.com>
3510 * sysdeps/pthread/sigaction.c: Removed.
3511 * sigaction.c: New file.
3512 * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-sigaction.c.
3514 2005-12-28 Ulrich Drepper <drepper@redhat.com>
3516 * Makefile (tests): Add tst-signal7.
3517 * tst-signal7.c: New file.
3519 2005-12-27 Roland McGrath <roland@redhat.com>
3521 * sysdeps/x86_64/jmpbuf-unwind.h (_jmpbuf_sp): New inline function.
3522 (_JMPBUF_UNWINDS_ADJ): Use it, to PTR_DEMANGLE before comparison.
3523 * sysdeps/alpha/jmpbuf-unwind.h: Likewise.
3524 * sysdeps/i386/jmpbuf-unwind.h: Likewise.
3525 * sysdeps/mips/jmpbuf-unwind.h: Likewise.
3526 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
3527 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
3528 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
3529 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
3530 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
3531 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
3533 2005-12-27 Jakub Jelinek <jakub@redhat.com>
3535 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Add __next
3536 and __prev field to pthread_mutex_t.
3537 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3538 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3539 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3540 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
3541 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Add __next field
3544 2005-12-26 Ulrich Drepper <drepper@redhat.com>
3546 * pthreadP.h: Define PTHREAD_MUTEX_ROBUST_PRIVATE_NP,
3547 PTHREAD_MUTEX_ROBUST_PRIVATE_RECURSIVE_NP,
3548 PTHREAD_MUTEX_ROBUST_PRIVATE_ERRORCHECK_NP,
3549 PTHREAD_MUTEX_ROBUST_PRIVATE_ADAPTIVE_NP,
3550 PTHREAD_MUTEXATTR_FLAG_ROBUST, PTHREAD_MUTEXATTR_FLAG_PSHARED,
3551 and PTHREAD_MUTEXATTR_FLAG_BITS.
3552 * descr.h (struct pthread): Add robust_list field and define
3553 ENQUEUE_MUTEX and DEQUEUE_MUTEX macros.
3554 * pthread_mutexattr_getrobust.c: New file.
3555 * pthread_mutexattr_setrobust.c: New file.
3556 * pthread_mutex_consistent.c: New file.
3557 * sysdeps/pthread/pthread.h: Declare pthread_mutexattr_getrobust,
3558 pthread_mutexattr_setrobust, and pthread_mutex_consistent.
3559 Define PTHREAD_MUTEX_STALLED_NP and PTHREAD_MUTEX_ROBUST_NP.
3560 Adjust pthread_mutex_t initializers.
3561 * nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Add __next
3562 field to pthread_mutex_t.
3563 * nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Add __next
3564 and __prev field to pthread_mutex_t.
3565 * Versions [GLIBC_2.4]: Export pthread_mutexattr_getrobust_np,
3566 pthread_mutexattr_setrobust_np, and pthread_mutex_consistent_np.
3567 * pthread_mutexattr_getpshared.c: Use PTHREAD_MUTEXATTR_FLAG_PSHARED
3568 and PTHREAD_MUTEXATTR_FLAG_BITS macros instead of magic numbers.
3569 * pthread_mutexattr_gettype.c: Likewise.
3570 * pthread_mutexattr_setpshared.c: Likewise.
3571 * pthread_mutexattr_settype.c: Likewise.
3572 * pthread_mutex_init.c: Reject robust+pshared attribute for now.
3573 Initialize mutex kind according to robust flag.
3574 * pthread_mutex_lock.c: Implement local robust mutex.
3575 * pthread_mutex_timedlock.c: Likewise.
3576 * pthread_mutex_trylock.c: Likewise.
3577 * pthread_mutex_unlock.c: Likewise.
3578 * pthread_create.c (start_thread): Mark robust mutexes which remained
3580 * tst-robust1.c: New file.
3581 * tst-robust2.c: New file.
3582 * tst-robust3.c: New file.
3583 * tst-robust4.c: New file.
3584 * tst-robust5.c: New file.
3585 * tst-robust6.c: New file.
3586 * tst-robust7.c: New file.
3587 * Makefile (libpthread-routines): Add pthread_mutexattr_getrobust,
3588 pthread_mutexattr_setrobust, and pthread_mutex_consistent.
3589 (tests): Add tst-robust1, tst-robust2, tst-robust3, tst-robust4,
3590 tst-robust5, tst-robust6, and tst-robust7.
3592 * tst-typesizes.c: New file.
3593 * Makefile (tests): Add tst-typesizes.
3595 * tst-once3.c: More debug output.
3597 2005-12-24 Ulrich Drepper <drepper@redhat.com>
3599 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Add break
3600 missing after last change.
3602 * version.c: Update copyright year.
3604 2005-12-23 Ulrich Drepper <drepper@redhat.com>
3606 * pthread_mutex_destroy.c: Set mutex type to an invalid value.
3607 * pthread_mutex_lock.c: Return EINVAL for invalid mutex type.
3608 * pthread_mutex_trylock.c: Likewise.
3609 * pthread_mutex_timedlock.c: Likewise.
3610 * pthread_mutex_unlock.c: Likewise.
3612 2005-12-22 Roland McGrath <roland@redhat.com>
3614 * sysdeps/pthread/sigaction.c: Use "" instead of <> to include self,
3615 so that #include_next's search location is not reset to the -I..
3616 directory where <nptl/...> can be found.
3618 2005-12-22 Ulrich Drepper <drepper@redhat.com>
3621 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
3622 Fix unwind info. Remove useless branch prediction prefix.
3623 * tst-cancel24.cc: New file.
3624 * Makefile: Add rules to build and run tst-cancel24.
3626 2005-12-21 Roland McGrath <roland@redhat.com>
3628 * libc-cancellation.c: Use <> rather than "" #includes.
3629 * pt-cleanup.c: Likewise.
3630 * pthread_create.c: Likewise.
3631 * pthread_join.c: Likewise.
3632 * pthread_timedjoin.c: Likewise.
3633 * pthread_tryjoin.c: Likewise.
3634 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Likewise.
3635 * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
3636 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
3637 * unwind.c: Likewise.
3639 2005-12-19 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3641 * sysdeps/sh/tcb-offsets.sym: Add POINTER_GUARD.
3642 * sysdeps/sh/tls.h (tcbhead_t): Remove private and add pointer_guard.
3643 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
3644 THREAD_COPY_POINTER_GUARD): Define.
3646 2005-12-19 Jakub Jelinek <jakub@redhat.com>
3648 * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): Make room for 2 uintptr_t's
3650 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
3651 THREAD_COPY_POINTER_GUARD): Define.
3652 * sysdeps/powerpc/tcb-offsets.sym (POINTER_GUARD): Add.
3653 * sysdeps/powerpc/tls.h (tcbhead_t): Add pointer_guard field.
3654 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
3655 THREAD_COPY_POINTER_GUARD): Define.
3656 * sysdeps/s390/tcb-offsets.sym (STACK_GUARD): Add.
3657 * sysdeps/s390/tls.h (THREAD_GET_POINTER_GUARD,
3658 THREAD_SET_POINTER_GUARD, THREAD_COPY_POINTER_GUARD): Define.
3659 * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S (__ia64_longjmp):
3660 Use PTR_DEMANGLE for B0 if defined.
3662 2005-12-17 Ulrich Drepper <drepper@redhat.com>
3664 * pthread_create.c (__pthread_create_2_1): Use
3665 THREAD_COPY_POINTER_GUARD if available.
3666 * sysdeps/i386/tcb-offsets.sym: Add POINTER_GUARD.
3667 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
3668 * sysdeps/i386/tls.h (tcbhead_t): Add pointer_guard.
3669 Define THREAD_SET_POINTER_GUARD and THREAD_COPY_POINTER_GUARD.
3670 * sysdeps/x86_64/tls.h: Likewise.
3672 2005-12-15 Roland McGrath <roland@redhat.com>
3674 * sysdeps/unix/sysv/linux/mq_notify.c: Don't use sysdeps/generic.
3676 2005-12-13 Ulrich Drepper <drepper@redhat.com>
3678 * sysdeps/pthread/sigfillset.c: Adjust for files moved out of
3680 * errno-loc.c: New file.
3682 2005-12-12 Roland McGrath <roland@redhat.com>
3684 * init.c (__pthread_initialize_minimal_internal): Do __static_tls_size
3685 adjustments before choosing stack size. Update minimum stack size
3686 calculation to match allocate_stack change.
3688 2005-12-12 Ulrich Drepper <drepper@redhat.com>
3690 * allocatestack.c (allocate_stack): Don't demand that there is an
3691 additional full page available on the stack beside guard, TLS, the
3694 2005-11-24 Ulrich Drepper <drepper@redhat.com>
3696 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
3697 (__cleanup_fct_attribute): Use __regparm__ not regparm.
3699 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: When
3700 compiling 32-bit code we must define __cleanup_fct_attribute.
3702 005-11-24 Jakub Jelinek <jakub@redhat.com>
3705 * sysdeps/pthread/pthread.h (__pthread_unwind_next): Use
3706 __attribute__ instead of __attribute.
3707 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
3708 (__cleanup_fct_attribute): Likewise.
3710 2005-11-17 Jakub Jelinek <jakub@redhat.com>
3712 * sysdeps/pthread/unwind-forcedunwind.c (pthread_cancel_init): Put
3713 a write barrier before writing libgcc_s_getcfa.
3715 2005-11-06 Ulrich Drepper <drepper@redhat.com>
3717 * sysdeps/unix/sysv/linux/configure: Removed.
3719 2005-11-05 Ulrich Drepper <drepper@redhat.com>
3721 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Remove trace of
3722 optional init_array/fini_array support.
3724 2005-10-24 Roland McGrath <roland@redhat.com>
3726 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Remove unnecessary
3727 versioned_symbol use.
3729 2005-10-16 Roland McGrath <roland@redhat.com>
3731 * init.c (__pthread_initialize_minimal_internal): Even when using a
3732 compile-time default stack size, apply the minimum that allocate_stack
3733 will require, and round up to page size.
3735 2005-10-10 Daniel Jacobowitz <dan@codesourcery.com>
3737 * Makefile ($(test-modules)): Remove static pattern rule.
3739 2005-10-14 Jakub Jelinek <jakub@redhat.com>
3740 Ulrich Drepper <drepper@redhat.com>
3742 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix stack
3743 alignment in callback function.
3744 * Makefile: Add rules to build and run tst-align3.
3745 * tst-align3.c: New file.
3747 2005-10-03 Jakub Jelinek <jakub@redhat.com>
3749 * allocatestack.c (setxid_signal_thread): Add
3750 INTERNAL_SYSCALL_DECL (err).
3752 2005-10-02 Jakub Jelinek <jakub@redhat.com>
3754 * allocatestack.c (setxid_signal_thread): Need to use
3755 atomic_compare_and_exchange_bool_acq.
3757 2005-10-01 Ulrich Drepper <drepper@redhat.com>
3758 Jakub Jelinek <jakub@redhat.com>
3760 * descr.h: Define SETXID_BIT and SETXID_BITMASK. Adjust
3762 (struct pthread): Move specific_used field to avoid padding.
3763 Add setxid_futex field.
3764 * init.c (sighandler_setxid): Reset setxid flag and release the
3766 * allocatestack.c (setxid_signal_thread): New function. Broken
3767 out of the bodies of the two loops in __nptl_setxid. For undetached
3768 threads check whether they are exiting and if yes, don't send a signal.
3769 (__nptl_setxid): Simplify loops by using setxid_signal_thread.
3770 * pthread_create.c (start_thread): For undetached threads, check
3771 whether setxid bit is set. If yes, wait until signal has been
3774 * allocatestack.c (STACK_VARIABLES): Initialize them.
3775 * pthread_create.c (__pthread_create_2_1): Initialize pd.
3777 2004-09-02 Jakub Jelinek <jakub@redhat.com>
3779 * pthread_cond_destroy.c (__pthread_cond_destroy): If there are
3780 waiters, awake all waiters on the associated mutex.
3782 2005-09-22 Roland McGrath <roland@redhat.com>
3784 * perf.c [__x86_64__] (HP_TIMING_NOW): New macro (copied from
3785 ../sysdeps/x86_64/hp-timing.h).
3787 2005-08-29 Jakub Jelinek <jakub@redhat.com>
3789 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_WAKE_OP,
3790 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3791 (lll_futex_wake_unlock): Define.
3792 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_WAKE_OP,
3793 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3794 (lll_futex_wake_unlock): Define.
3795 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_WAKE_OP,
3796 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3797 (lll_futex_wake_unlock): Define.
3798 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_WAKE_OP,
3799 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3800 (lll_futex_wake_unlock): Define.
3801 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_WAKE_OP,
3802 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3803 (lll_futex_wake_unlock): Define.
3804 * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal): Use
3805 lll_futex_wake_unlock.
3806 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
3807 (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3808 (__pthread_cond_signal): Use FUTEX_WAKE_OP.
3809 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
3810 (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3811 (__pthread_cond_signal): Use FUTEX_WAKE_OP.
3813 2005-09-05 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3815 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
3816 Fix typo in register name.
3818 2005-08-23 Ulrich Drepper <drepper@redhat.com>
3820 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
3821 Use __sigfillset. Document that sigfillset does the right thing wrt
3824 2005-07-11 Jakub Jelinek <jakub@redhat.com>
3827 * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER,
3828 PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP,
3829 PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP,
3830 PTHREAD_MUTEX_ADAPTIVE_NP, PTHREAD_RWLOCK_INITIALIZER,
3831 PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP,
3832 PTHREAD_COND_INITIALIZER): Supply zeros for all fields
3834 * Makefile (tests): Add tst-initializers1.
3835 (CFLAGS-tst-initializers1.c): Set.
3836 * tst-initializers1.c: New test.
3838 2005-07-11 Jakub Jelinek <jakub@redhat.com>
3840 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_rwlock_t):
3841 Make sure __flags are located at offset 48 from the start of the
3844 2005-07-02 Roland McGrath <roland@redhat.com>
3846 * Makeconfig: Comment fix.
3848 2005-07-05 Jakub Jelinek <jakub@redhat.com>
3850 * descr.h (PTHREAD_STRUCT_END_PADDING): Define.
3851 * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): If PTHREAD_STRUCT_END_PADDING
3852 is smaller than 8 bytes, increase TLS_PRE_TCB_SIZE by 16 bytes.
3853 (THREAD_SYSINFO, THREAD_SELF, DB_THREAD_SELF): Don't assume
3854 TLS_PRE_TCB_SIZE is sizeof (struct pthread).
3855 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3856 * sysdeps/ia64/tcb-offsets.sym (PID, TID, MULTIPLE_THREADS_OFFSET):
3857 Use TLS_PRE_TCB_SIZE instead of sizeof (struct pthread).
3858 * sysdeps/unix/sysv/linux/ia64/createthread.c (TLS_VALUE): Don't
3859 assume TLS_PRE_TCB_SIZE is sizeof (struct pthread).
3861 2005-06-25 Jakub Jelinek <jakub@redhat.com>
3863 * sysdeps/i386/tls.h (tcbhead_t): Add stack_guard field.
3864 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3865 * sysdeps/x86_64/tls.h (tcbhead_t): Add sysinfo and stack_guard
3867 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3868 * sysdeps/s390/tls.h (tcbhead_t): Add stack_guard
3869 field. Put in sysinfo field unconditionally.
3870 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3871 * sysdeps/powerpc/tls.h (tcbhead_t): Add stack_guard field.
3872 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3873 * sysdeps/sparc/tls.h (tcbhead_t): Add sysinfo and stack_guard
3875 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3876 * pthread_create.c (__pthread_create_2_1): Use
3877 THREAD_COPY_STACK_GUARD macro.
3878 * Makefile: Add rules to build and run tst-stackguard1{,-static}
3880 * tst-stackguard1.c: New file.
3881 * tst-stackguard1-static.c: New file.
3883 2005-06-14 Alan Modra <amodra@bigpond.net.au>
3885 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
3886 Invoke CGOTSETUP and CGOTRESTORE.
3887 (CGOTSETUP, CGOTRESTORE): Define.
3889 2005-05-29 Richard Henderson <rth@redhat.com>
3891 * tst-cancel4.c (WRITE_BUFFER_SIZE): New.
3892 (tf_write, tf_writev): Use it.
3893 (do_test): Use socketpair instead of pipe. Set SO_SNDBUF to
3896 2005-05-23 Jakub Jelinek <jakub@redhat.com>
3898 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
3899 [IS_IN_librt] (CENABLE, CDISABLE): Use JUMPTARGET instead of
3900 __librt_*_asynccancel@local.
3902 2005-05-17 Alan Modra <amodra@bigpond.net.au>
3904 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Delete
3905 all occurrences of JUMPTARGET. Instead append @local to labels.
3907 2005-05-20 Jakub Jelinek <jakub@redhat.com>
3909 * sysdeps/i386/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN): Define to
3910 size/alignment of struct pthread rather than tcbhead_t.
3911 * sysdeps/x86_64/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
3913 * sysdeps/s390/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
3915 * sysdeps/sparc/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
3918 2005-05-19 Richard Henderson <rth@redhat.com>
3920 * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use
3921 __sync_val_compare_and_swap, not explicit _si variant.
3922 * sysdeps/ia64/pthread_spin_trylock.c (pthread_spin_trylock): Likewise.
3924 2005-05-03 Ulrich Drepper <drepper@redhat.com>
3927 * sysdeps/pthread/pthread.h: Avoid empty initializers.
3929 2005-05-03 Jakub Jelinek <jakub@redhat.com>
3931 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Remove explicit
3932 .eh_frame section, use cfi_* directives.
3934 2005-04-27 Jakub Jelinek <jakub@redhat.com>
3936 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: Use <> instead
3939 2005-04-27 Ulrich Drepper <drepper@redhat.com>
3942 * tst-cancel17.c (do_test): Add arbitrary factor to make sure
3945 2005-04-27 Roland McGrath <roland@redhat.com>
3947 * Makefile (tests): Remove tst-clock2.
3949 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Handle
3950 CLOCK_PROCESS_CPUTIME_ID and CLOCK_PROCESS_THREAD_ID specially,
3951 translating to the kernel clockid_t for our own process/thread clock.
3953 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: New file.
3955 2005-04-15 Jakub Jelinek <jakub@redhat.com>
3957 * old_pthread_cond_init.c: Include <errno.h>.
3958 (__pthread_cond_init_2_0): Fail with EINVAL if COND_ATTR is
3959 process shared or uses clock other than CLOCK_REALTIME.
3960 * pthread_cond_init.c (__pthread_cond_init): Remove bogus comment.
3962 2005-04-13 David S. Miller <davem@davemloft.net>
3964 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: New file.
3965 * sysdeps/sparc/sparc64/clone.S: New file.
3967 2005-04-05 Jakub Jelinek <jakub@redhat.com>
3970 * sysdeps/pthread/pthread.h (__pthread_cleanup_routine): Use
3971 __inline instead of inline.
3972 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_routine): Likewise.
3974 2005-03-31 Jakub Jelinek <jakub@redhat.com>
3976 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Use
3977 functionally equivalent, but shorter instructions.
3978 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
3979 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
3980 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
3982 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
3983 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
3984 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
3985 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
3986 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3987 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
3988 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3990 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
3991 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
3992 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3993 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
3994 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
3996 2005-03-28 Daniel Jacobowitz <dan@codesourcery.com>
3998 * sysdeps/mips/Makefile: New file.
3999 * sysdeps/mips/nptl-sysdep.S: New file.
4000 * sysdeps/mips/tcb-offsets.sym: New file.
4001 * sysdeps/mips/pthread_spin_lock.S: New file.
4002 * sysdeps/mips/pthread_spin_trylock.S: New file.
4003 * sysdeps/mips/pthreaddef.h: New file.
4004 * sysdeps/mips/tls.h: New file.
4005 * sysdeps/mips/jmpbuf-unwind.h: New file.
4006 * sysdeps/unix/sysv/linux/mips/lowlevellock.h: New file.
4007 * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h: New file.
4008 * sysdeps/unix/sysv/linux/mips/bits/semaphore.h: New file.
4009 * sysdeps/unix/sysv/linux/mips/pthread_once.c: New file.
4010 * sysdeps/unix/sysv/linux/mips/fork.c: New file.
4011 * sysdeps/unix/sysv/linux/mips/pt-vfork.S: New file.
4012 * sysdeps/unix/sysv/linux/mips/vfork.S: New file.
4013 * sysdeps/unix/sysv/linux/mips/clone.S: New file.
4014 * sysdeps/unix/sysv/linux/mips/createthread.c: New file.
4015 * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: New file.
4017 2005-03-23 Ulrich Drepper <drepper@redhat.com>
4020 * pthread_create.c (__pthread_create_2_1): Rename syscall error
4023 2005-03-10 Jakub Jelinek <jakub@redhat.com>
4025 * tst-getpid1.c (do_test): Align stack passed to clone{2,}.
4027 2005-02-25 Roland McGrath <roland@redhat.com>
4029 * alloca_cutoff.c: Correct license text.
4030 * tst-unload.c: Likewise.
4031 * sysdeps/pthread/allocalim.h: Likewise.
4032 * sysdeps/pthread/pt-initfini.c: Likewise.
4033 * sysdeps/pthread/bits/libc-lock.h: Likewise.
4034 * sysdeps/pthread/bits/sigthread.h: Likewise.
4035 * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
4036 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
4038 2005-02-16 Roland McGrath <roland@redhat.com>
4040 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
4041 Use unsigned int * for ptr_nthreads.
4043 2005-02-14 Alan Modra <amodra@bigpond.net.au>
4046 * sysdeps/powerpc/tcb-offsets.sym (thread_offsetof): Redefine to suit
4049 2005-02-07 Richard Henderson <rth@redhat.com>
4052 * sysdeps/pthread/pthread.h (__sigsetjmp): Use pointer as first
4055 2004-11-03 Marcus Brinkmann <marcus@gnu.org>
4057 * sysdeps/generic/lowlevellock.h (__generic_mutex_unlock): Fix
4058 order of arguments in invocation of atomic_add_zero.
4060 2005-01-26 Jakub Jelinek <jakub@redhat.com>
4063 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S (__new_sem_trywait):
4064 Use direct %gs segment access or, if NO_TLS_DIRECT_SEG_REFS,
4065 at least gotntpoff relocation and addition.
4066 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
4068 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
4070 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
4073 2005-01-06 Ulrich Drepper <drepper@redhat.com>
4075 * allocatestack.c (init_one_static_tls): Adjust initialization of DTV
4076 entry for static tls deallocation fix.
4077 * sysdeps/alpha/tls.h (dtv_t): Change pointer type to be struct which
4078 also contains information whether the memory pointed to is static
4080 * sysdeps/i386/tls.h: Likewise.
4081 * sysdeps/ia64/tls.h: Likewise.
4082 * sysdeps/powerpc/tls.h: Likewise.
4083 * sysdeps/s390/tls.h: Likewise.
4084 * sysdeps/sh/tls.h: Likewise.
4085 * sysdeps/sparc/tls.h: Likewise.
4086 * sysdeps/x86_64/tls.h: Likewise.
4088 2004-12-27 Ulrich Drepper <drepper@redhat.com>
4090 * init.c (__pthread_initialize_minimal_internal): Use __sigemptyset.
4092 2004-12-21 Jakub Jelinek <jakub@redhat.com>
4094 * sysdeps/i386/tls.h (CALL_THREAD_FCT): Maintain 16 byte alignment of
4096 * Makefile (tests): Add tst-align2.
4097 * tst-align2.c: New test.
4098 * sysdeps/i386/Makefile (CFLAGS-tst-align{,2}.c): Add
4099 -mpreferred-stack-boundary=4.
4101 2004-12-18 Roland McGrath <roland@redhat.com>
4103 * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h:
4104 New file removed withdrawn for the moment.
4106 2004-12-17 Richard Henderson <rth@redhat.com>
4108 * sysdeps/unix/sysv/linux/alpha/clone.S: New file.
4109 * sysdeps/alpha/tcb-offsets.sym (TID_OFFSET): New.
4111 2004-12-16 Ulrich Drepper <drepper@redhat.com>
4113 * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h: New file.
4114 Increased PTHREAD_STACK_MIN.
4116 * tst-context1.c (stacks): Use bigger stack size.
4118 2004-12-16 Jakub Jelinek <jakub@redhat.com>
4120 * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: New file.
4121 * sysdeps/sparc/tcb-offsets.sym: Add TID.
4123 2004-12-15 Jakub Jelinek <jakub@redhat.com>
4125 * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: New file.
4126 * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: New file.
4127 * sysdeps/s390/tcb-offsets.sym (TID): Add.
4129 2004-12-15 Ulrich Drepper <drepper@redhat.com>
4131 * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: New file.
4133 2004-12-14 Ulrich Drepper <drepper@redhat.com>
4135 * sysdeps/powerpc/tcb-offsets.sym: Add TID.
4136 * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: New file.
4138 * tst-getpid1.c: If child crashes, report this first. Print which
4141 2004-12-09 Ulrich Drepper <drepper@redhat.com>
4143 * init.c (__pthread_initialize_minimal_internal): Also unblock
4146 2004-12-01 Jakub Jelinek <jakub@redhat.com>
4148 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_CPUTIME,
4149 _POSIX_THREAD_CPUTIME): Define to 0.
4150 * sysdeps/pthread/timer_create.c (timer_create): Remove unused code
4151 handling CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID.
4152 * sysdeps/pthread/timer_routines.c (__timer_signal_thread_pclk,
4153 __timer_signal_thread_tclk): Remove.
4154 (init_module): Remove their initialization.
4155 (thread_cleanup): Remove their cleanup assertions.
4156 * sysdeps/pthread/posix-timer.h (__timer_signal_thread_pclk,
4157 __timer_signal_thread_tclk): Remove.
4158 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Removed.
4159 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Removed.
4160 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Removed.
4162 2004-12-07 Jakub Jelinek <jakub@redhat.com>
4164 * sysdeps/ia64/tcb-offsets.sym (TID): Add.
4165 * sysdeps/unix/sysv/linux/ia64/clone2.S: New file.
4167 * Makefile (tests): Add tst-getpid2.
4168 * tst-getpid1.c (TEST_CLONE_FLAGS): Define.
4169 (do_test): Use it. Use __clone2 instead of clone on ia64.
4170 * tst-getpid2.c: New test.
4172 2004-12-07 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4174 * sysdeps/unix/sysv/linux/sh/clone.S: New file.
4176 2004-12-04 Ulrich Drepper <drepper@redhat.com>
4178 * Makefile (tests): Add tst-getpid1.
4179 * tst-getpid1.c: New file.
4180 * sysdeps/unix/sysv/linux/i386/clone.S: New file.
4181 * sysdeps/unix/sysv/linux/x86_64/clone.S: New file.
4183 2004-12-02 Roland McGrath <roland@redhat.com>
4185 * Makefile (libpthread-nonshared): Variable removed.
4186 ($(objpfx)libpthread_nonshared.a): Target removed.
4187 ($(inst_libdir)/libpthread_nonshared.a): Likewise.
4188 These are now handled by generic magic from
4189 libpthread-static-only-routines being set.
4191 2004-11-27 Ulrich Drepper <drepper@redhat.com>
4193 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_PRIORITIZED_IO,
4194 _POSIX2_CHAR_TERM, _POSIX_THREAD_PRIO_INHERIT,
4195 _POSIX_THREAD_PRIO_PROTECT): Define.
4196 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
4197 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
4198 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
4200 2004-11-26 Jakub Jelinek <jakub@redhat.com>
4202 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_ADVISORY_INFO,
4203 _POSIX_SPORADIC_SERVER, _POSIX_THREAD_SPORADIC_SERVER, _POSIX_TRACE,
4204 _POSIX_TRACE_EVENT_FILTER, _POSIX_TRACE_INHERIT, _POSIX_TRACE_LOG,
4205 _POSIX_TYPED_MEMORY_OBJECTS, _POSIX_IPV6, _POSIX_RAW_SOCKETS): Define.
4206 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
4207 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
4208 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
4210 2004-11-24 Ulrich Drepper <drepper@redhat.com>
4212 * sysdeps/x86_64/Makefile [nptl]: Define CFLAGS-pthread_create.c.
4214 * Makefile (libpthread-routines): Add pthread_setschedprio.
4215 * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setschedprio.
4216 * sysdeps/pthread/pthread.h: Declare pthread_setschedprio.
4217 * pthread_setschedprio.c: New file.
4219 2004-11-20 Jakub Jelinek <jakub@redhat.com>
4221 * pthread_create.c (pthread_cancel): Add PTHREAD_STATIC_FN_REQUIRE.
4222 * pthread_cancel.c (pthread_create): Likewise.
4224 * Makefile (libpthread-routines): Add vars.
4225 * sysdeps/pthread/createthread.c (__pthread_multiple_threads): Remove.
4226 * init.c (__default_stacksize, __is_smp): Remove.
4228 * pthreadP.h (__find_thread_by_id): If !SHARED, add weak_function
4229 and define a wrapper macro.
4230 (PTHREAD_STATIC_FN_REQUIRE): Define.
4231 * allocatestack.c (__find_thread_by_id): Undefine.
4232 * pthread_create (__pthread_keys): Remove.
4233 (pthread_mutex_lock, pthread_mutex_unlock, pthread_once,
4234 pthread_key_create, pthread_setspecific, pthread_getspecific): Add
4235 PTHREAD_STATIC_FN_REQUIRE.
4237 2004-11-18 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4239 * sysdeps/sh/tls.h (DB_THREAD_SELF): Set the correct bias
4240 parameter to REGISTER macro.
4242 2004-11-17 Roland McGrath <roland@redhat.com>
4244 * sysdeps/unix/sysv/linux/timer_routines.c (__start_helper_thread):
4245 Make sure SIGCANCEL is blocked as well.
4247 2004-11-10 Jakub Jelinek <jakub@redhat.com>
4249 * sysdeps/pthread/setxid.h: New file.
4250 * sysdeps/pthread/pthread-functions.h (HAVE_PTR__NPTL_SETXID): Remove.
4251 (struct xid_command): Add forward decl.
4252 (struct pthread_functions): Change return type of __nptl_setxid hook
4254 * pthreadP.h (__nptl_setxid): Change return type to int.
4255 * allocatestack.c (__nptl_setxid): Call INTERNAL_SYSCALL_NCS in the
4256 calling thread, return its return value and set errno on failure.
4257 * descr.h (struct xid_command): Change id type to long array.
4259 * Makefile: Add rules to build and test tst-setuid1 and
4261 * tst-setuid1.c: New test.
4262 * tst-setuid1-static.c: New test.
4264 2004-11-10 Jakub Jelinek <jakub@redhat.com>
4266 * Makefile (tests): Add tst-exit3.
4267 * tst-exit3.c: New test.
4269 2004-11-09 Ulrich Drepper <drepper@redhat.com>
4271 * Makefile (tests): Add tst-exit2.
4272 * tst-exit2.c: New file.
4274 2004-11-09 Roland McGrath <roland@redhat.com>
4277 * sysdeps/pthread/createthread.c (do_clone): Increment __nptl_nthreads
4278 here, before calling clone.
4279 * pthread_create.c (start_thread): Don't do it here.
4281 2004-11-02 Jakub Jelinek <jakub@redhat.com>
4283 * sysdeps/unix/sysv/linux/smp.h: Include <errno.h>.
4285 2004-10-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4287 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
4288 Set ETIMEDOUT to errno when time is up. Tweak to avoid
4291 2004-10-28 Jakub Jelinek <jakub@redhat.com>
4293 * pthread_create.c (__pthread_create_2_1): Avoid leaking stacks
4294 if sched_priority is not between minprio and maxprio.
4296 2004-10-25 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4298 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
4299 (__pthread_cond_timedwait): Use clock_gettime syscall if exists.
4301 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
4302 (__lll_mutex_timedlock_wait): Fix a bad branch condition.
4304 2004-10-24 Ulrich Drepper <drepper@redhat.com>
4306 * sysdeps/unix/sysv/linux/smp.h (is_smp_system): Use
4307 not-cancelable I/O functions.
4309 2004-10-21 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4311 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
4312 (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
4313 make sure 2 is stored in the futex and we looked at the old value.
4314 Fix a few other problems to return the correct value.
4316 2004-10-14 Richard Henderson <rth@redhat.com>
4318 * sysdeps/alpha/tcb-offsets.sym (thread_offsetof): Redefine to
4321 2004-10-06 Jakub Jelinek <jakub@redhat.com>
4323 * sysdeps/unix/sysv/linux/jmp-unwind.c: Include pthreadP.h instead
4324 of pthread-functions.h and pthreaddef.h.
4325 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Likewise.
4327 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
4328 Change __data.__nwaiters from int to unsigned int.
4330 * tst-clock2.c (do_test): Don't fail if _POSIX_THREAD_CPUTIME == 0 and
4331 sysconf (_SC_THREAD_CPUTIME) returns negative value.
4333 * allocatestack.c (__find_thread_by_id): Move attribute_hidden
4336 * sysdeps/s390/jmpbuf-unwind.h: Include bits/wordsize.h.
4337 (JMPBUF_CFA_UNWINDS_ADJ): Subtract 96 resp. 160 bytes from CFA.
4339 2004-10-06 Ulrich Drepper <drepper@redhat.com>
4341 * tst-cancel4.c (tf_msgrcv): Check for failure in msgget. If the
4342 test fails, remove message queue.
4343 (tf_msgsnd): Likewise.
4345 2004-10-05 Jakub Jelinek <jakub@redhat.com>
4347 * tst-clock1.c: Change #ifdef to #if defined.
4348 * tst-clock2.c: Likewise.
4349 * tst-cond11.c: Likewise.
4351 * sysdeps/pthread/timer_create.c (timer_create): Use
4352 defined _POSIX_CPUTIME && _POSIX_CPUTIME >= 0 instead of
4353 defined CLOCK_PROCESS_CPUTIME_ID #ifs and similarly for
4356 2004-10-05 Jakub Jelinek <jakub@redhat.com>
4358 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h (_POSIX_CPUTIME,
4359 _POSIX_THREAD_CPUTIME): Define to 0.
4361 2004-10-04 Ulrich Drepper <drepper@redhat.com>
4363 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Define _POSIX_CPUTIME
4364 and _POSIX_THREAD_CPUTIME to zero.
4365 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
4366 * tst-barrier2.c: Fix testing for POSIX feature.
4367 * tst-clock1.c: Likewise.
4368 * tst-clock2.c: Likewise.
4369 * tst-cond11.c: Likewise.
4370 * tst-cond4.c: Likewise.
4371 * tst-cond6.c: Likewise.
4372 * tst-flock2.c: Likewise.
4373 * tst-mutex4.c: Likewise.
4374 * tst-mutex9.c: Likewise.
4375 * tst-rwlock12.c: Likewise.
4376 * tst-rwlock4.c: Likewise.
4377 * tst-signal1.c: Likewise.
4378 * tst-spin2.c: Likewise.
4379 * sysdeps/pthread/posix-timer.h: Likewise.
4380 * sysdeps/pthread/timer_create.c: Likewise.
4381 * sysdeps/pthread/timer_routines.c: Likewise.
4383 2004-10-01 Ulrich Drepper <drepper@redhat.com>
4385 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4386 (__lll_mutex_timedlock_wait): Address futex correctly.
4388 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
4389 (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
4390 make sure 2 is stored in the futex and we looked at the old value.
4391 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4392 (__lll_mutex_timedlock_wait): Likewise. Fix a few other problems
4393 which might very well made the code not working at all before.
4396 2004-09-28 Ulrich Drepper <drepper@redhat.com>
4398 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
4399 allow SIGSETXID to be sent.
4400 * sysdeps/pthread/sigaction.c (__sigaction): Don't allow action
4401 for SIGSETXID to be defined.
4402 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
4403 SIGSETXID cannot be blocked.
4405 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4406 Add __extension__ to long long types.
4407 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4408 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4409 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4410 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4411 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
4412 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4413 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4415 2004-09-25 Ulrich Drepper <drepper@redhat.com>
4417 * descr.h (struct pthread): Add stopped_start field.
4418 * sysdeps/pthread/createthread.c (create_thread): Set
4419 start_stopped flag in descriptor for new thread appropriately.
4420 * pthread_create.c (start_thread): Only take lock to be stopped on
4421 startup if stopped_start flag says so.
4423 2004-09-24 Ulrich Drepper <drepper@redhat.com>
4425 * pthread_create.c (__pthread_create_2_1): Remember whether thread
4426 is created detached and if yes, do not try to free the stack in case
4427 the thread creation failed.
4428 * sysdeps/pthread/createthread.c (do_clone): Free stack here if clone
4429 call fails. Don't depend on INTERNAL_SYSCALL_ERRNO return zero in
4430 case there has been no error. [BZ #405]
4432 * pthread_create.c (start_thread): Don't wait for scheduler data
4433 etc to be set at the beginning of the function. The cancellation
4434 infrastructure must have been set up. And enable async
4435 cancellation before potentially going to sleep. [BZ #401]
4437 2004-09-20 Ulrich Drepper <drepper@redhat.com>
4439 * Versions: Remove exports for pthread_set*id_np functions.
4440 * sysdeps/pthread/pthread.h: Remove pthread_set*id_np prototypes
4442 * Makefile: Don't build pthread_set*id code for now.
4444 2004-09-19 Ulrich Drepper <drepper@redhat.com>
4446 * sysdeps/unix/sysv/linux/allocrtsig.c: Allocate second signal for
4448 * allocatestack.c (__nptl_setxid): New function.
4449 * descr.h (struct xid_command): Define type.
4450 * init.c (pthread_functions): Add ptr__nptl_setxid initialization.
4451 (sighandler_setxid): New function.
4452 (__pthread_initialize_minimal): Register sighandler_setxid for
4454 * pt-allocrtsig.c: Update comment.
4455 * pthreadP.h: Define SIGSETXID. Declare __xidcmd variable.
4456 Declare __nptl_setxid.
4457 * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_setxid.
4458 * sysdeps/pthread/pthread.h: Declare pthread_setgid_np,
4459 pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
4460 pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
4461 and pthread_setresuid_np.
4462 * pthread_setgid_np.c: New file.
4463 * pthread_setuid_np.c: New file.
4464 * pthread_setegid_np.c: New file.
4465 * pthread_seteuid_np.c: New file.
4466 * pthread_setregid_np.c: New file.
4467 * pthread_setreuid_np.c: New file.
4468 * pthread_setresgid_np.c: New file.
4469 * pthread_setresuid_np.c: New file.
4470 * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setgid_np,
4471 pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
4472 pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
4473 and pthread_setresuid_np.
4474 * Makefile (libpthread-routines): Add pthread_setuid, pthread_seteuid,
4475 pthread_setreuid, pthread_setresuid, pthread_setgid, pthread_setegid,
4476 pthread_setregid, and pthread_setresgid.
4478 2004-09-18 Ulrich Drepper <drepper@redhat.com>
4480 * allocatestack.c (allocate_stack): Return EAGAIN instead of
4481 ENOMEM when out of memory.
4483 2004-09-10 Roland McGrath <roland@redhat.com>
4486 * allocatestack.c (allocate_stack): Remove [__ASSUME_CLONE_STOPPED]
4487 code, since we don't try to use the broken CLONE_STOPPED any more.
4488 * pthread_create.c (start_thread): Likewise.
4490 2004-09-15 Richard Henderson <rth@redhat.com>
4492 * sysdeps/unix/sysv/linux/alpha/vfork.S: Use libc_hidden_def.
4494 2004-09-01 David Mosberger <davidm@hpl.hp.com>
4496 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h
4497 (__libc_unwind_longjmp): Delete macro and declare as function.
4498 * sysdeps/unix/sysv/linux/ia64/Makefile (sysdep_routines): Mention
4499 __ia64_longjmp, sigstack_longjmp, and __sigstack_longjmp for
4501 * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S: New file.
4502 * sysdeps/unix/sysv/linux/ia64/__sigstack_longjmp.c: New file.
4503 * sysdeps/unix/sysv/linux/ia64/unwind_longjmp.c: New file.
4505 2004-09-12 Ulrich Drepper <drepper@redhat.com>
4507 * sysdeps/pthread/pthread.h: Make rwlock prototypes available also
4509 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define rwlock
4510 types also for __USE_XOPEN2K.
4511 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4512 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4513 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4514 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4515 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4516 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4517 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4520 2004-09-08 Ulrich Drepper <drepper@redhat.com>
4522 * sysdeps/pthread/pthread.h
4523 (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Make safe for C++.
4524 (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
4525 (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
4526 (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Likewise.
4529 2004-09-07 Ulrich Drepper <drepper@redhat.com>
4531 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Allow
4532 PSEUDO to be used with . prefix.
4534 * sysdeps/unix/sysv/linux/alpha/pthread_once.c (__pthread_once):
4535 Use atomic_increment instead of atomic_exchange_and_add.
4536 * sysdeps/unix/sysv/linux/sparc/pthread_once.c (__pthread_once):
4538 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
4540 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
4543 * allocatestack.c (allocate_stack): Use atomic_increment_val
4544 instead of atomic_exchange_and_add.
4545 * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Likewise.
4546 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
4548 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
4551 * sysdeps/pthread/pthread.h (pthread_once): Remove __THROW since
4552 the initialization function might throw.
4554 2005-09-05 Richard Henderson <rth@redhat.com>
4556 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
4557 Move definition inside libpthread, libc, librt check. Provide
4558 definition for rtld.
4560 2004-09-02 Ulrich Drepper <drepper@redhat.com>
4562 * sysdeps/alpha/jmpbuf-unwind.h: Define __libc_unwind_longjmp.
4563 * sysdeps/i386/jmpbuf-unwind.h: Likewise
4564 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
4565 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
4566 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
4567 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
4568 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
4569 * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
4572 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
4573 Rename __data.__clock to __data.__nwaiters, make it unsigned int.
4574 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
4576 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
4577 Decrement __nwaiters. If pthread_cond_destroy has been called and
4578 this is the last waiter, signal pthread_cond_destroy caller and
4579 avoid using the pthread_cond_t structure after unlock.
4580 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4581 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4582 Read clock type from the least significant bits of __nwaiters instead
4584 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4585 * sysdeps/unix/sysv/linux/internaltypes.h: Define COND_CLOCK_BITS.
4587 2004-08-31 Jakub Jelinek <jakub@redhat.com>
4590 * Makefile (tests): Add tst-cond20 and tst-cond21.
4591 * tst-cond20.c: New test.
4592 * tst-cond21.c: New test.
4593 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
4594 (pthread_cond_t): Rename __data.__clock to __data.__nwaiters, make
4596 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
4598 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
4599 (pthread_cond_t): Likewise.
4600 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
4602 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4604 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
4606 * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_clock): Remove.
4607 (cond_nwaiters): New.
4609 * pthread_cond_destroy.c (__pthread_cond_destroy): Return EBUSY
4610 if there are waiters not signalled yet.
4611 Wait until all already signalled waiters wake up.
4612 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Decrement
4613 __nwaiters. If pthread_cond_destroy has been called and this is the
4614 last waiter, signal pthread_cond_destroy caller and avoid using
4615 the pthread_cond_t structure after unlock.
4616 (__pthread_cond_wait): Increment __nwaiters in the beginning,
4617 decrement it when leaving. If pthread_cond_destroy has been called
4618 and this is the last waiter, signal pthread_cond_destroy caller.
4619 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
4620 Likewise. Read clock type from the least significant bits of
4621 __nwaiters instead of __clock.
4622 * pthread_condattr_setclock.c (pthread_condattr_setclock): Check
4623 whether clock ID can be encoded in COND_CLOCK_BITS bits.
4624 * pthread_condattr_getclock.c (pthread_condattr_getclock): Decode
4625 clock type just from the last COND_CLOCK_BITS bits of value.
4626 * pthread_cond_init.c (__pthread_cond_init): Initialize __nwaiters
4627 instead of __clock, just from second bit of condattr's value.
4629 2004-08-30 Jakub Jelinek <jakub@redhat.com>
4631 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Include
4632 bits/wordsize.h. Make the header match i386 header when __WORDSIZE
4634 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
4636 2004-08-15 Roland McGrath <roland@frob.com>
4638 * pthread_atfork.c: Update copyright terms including special exception
4639 for these trivial files, which are statically linked into executables
4640 that use dynamic linking for the significant library code.
4642 2004-08-09 Jakub Jelinek <jakub@redhat.com>
4644 * DESIGN-rwlock.txt: Add decreasing of nr_readers_queued to
4645 pthread_rwlock_rdlock.
4646 * sysdeps/pthread/pthread_rwlock_rdlock (__pthread_rwlock_rdlock):
4647 Decrease __nr_readers_queued after reacquiring lock.
4648 * sysdeps/pthread/pthread_rwlock_timedrdlock
4649 (pthread_rwlock_timedrdlock): Likewise.
4650 Reported by Bob Cook <bobcook47@hotmail.com>.
4652 2004-08-11 Jakub Jelinek <jakub@redhat.com>
4654 * tst-rwlock14.c (tf): Read main thread handle from *ARG
4655 before pthread_barrier_wait.
4657 2004-08-07 Ulrich Drepper <drepper@redhat.com>
4659 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
4660 Remove unnecessary exception handling data.
4662 2004-07-23 Jakub Jelinek <jakub@redhat.com>
4665 * sysdeps/pthread/pthread.h (pthread_getcpuclockid): Use __clockid_t
4666 instead of clockid_t.
4668 2004-07-21 Roland McGrath <roland@redhat.com>
4670 * Makefile ($(objpfx)multidir.mk): Use $(make-target-directory).
4672 2004-07-19 Roland McGrath <roland@redhat.com>
4674 * tst-cancel4.c (tf_waitid): Use WEXITED flag bit if available.
4676 2004-07-02 Roland McGrath <roland@redhat.com>
4678 * configure: Don't exit.
4680 2004-07-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4682 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
4683 (__pthread_cond_timedwait): Check for invalid nanosecond in
4686 2004-07-07 Ulrich Drepper <drepper@redhat.com>
4688 * Makefile: Add rules to build and run tst-fini1.
4689 * tst-fini1.c: New file.
4690 * tst-fini1mod.c: New file.
4692 2004-07-05 Ulrich Drepper <drepper@redhat.com>
4694 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define NO_CANCELLATION
4695 if no cancellation support is needed.
4696 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
4697 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
4698 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
4699 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
4700 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
4701 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
4702 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
4703 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
4704 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
4706 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define __NR_futex
4707 only if not already defined.
4709 2004-07-05 Jakub Jelinek <jakub@redhat.com>
4711 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_unlock): Use
4712 constraint "m" instead of "0" for futex.
4714 * shlib-versions: Add powerpc64-.*-linux.*.
4716 2004-07-04 Jakub Jelinek <jakub@redhat.com>
4718 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
4719 (pthread_rwlock_timedrdlock): Use cmpq instead of cmpl to check
4721 * tst-rwlock14.c (do_test): Test for invalid tv_nsec equal to
4722 1 billion and 64-bit tv_nsec which is valid when truncated to 32
4725 2004-06-29 Roland McGrath <roland@redhat.com>
4727 * Banner: NPTL no longer has its own version number.
4728 * Makefile (nptl-version): Variable removed.
4729 * sysdeps/pthread/Makefile (CFLAGS-confstr.c): Set LIBPTHREAD_VERSION
4730 using $(version), the glibc version number.
4732 2004-06-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4734 * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
4735 Fix branch offset for a PLT entry.
4736 * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
4738 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
4740 * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
4742 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait):
4745 2004-06-28 Jakub Jelinek <jakub@redhat.com>
4747 * sysdeps/alpha/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define
4750 2004-06-28 Jakub Jelinek <jakub@redhat.com>
4752 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
4753 (pthread_rwlock_timedwrlock): Return EINVAL if tv_nsec is negative,
4755 * sysdeps/pthread/pthread_rwlock_timedrdlock.c
4756 (pthread_rwlock_timedrdlock): Likewise.
4758 2004-06-22 Jakub Jelinek <jakub@redhat.com>
4760 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
4761 Set __r7 to val, not mutex.
4763 2004-06-27 Ulrich Drepper <drepper@redhat.com>
4765 * Makefile: Add rules to build tst-rwlock14.
4766 * tst-rwlock14.c: New file.
4768 2004-06-24 Boris Hu <boris.hu@intel.com>
4770 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Add timeout validation
4772 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
4774 2004-06-19 Andreas Jaeger <aj@suse.de>
4776 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix
4777 assembler in last patch.
4779 2004-06-17 Ulrich Drepper <drepper@redhat.com>
4781 * sysdeps/pthread/pthread_cond_timedwait.c
4782 (__pthread_cond_timedwait): Also check for negativ nanoseconds.
4783 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4784 (__pthread_cond_timedwait): Check for invalid nanosecond in
4786 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4787 * tst-cond19.c: New file.
4788 * Makefile: Add rules to build and run tst-cond19.
4790 2004-06-15 Steven Munroe <sjmunroe@us.ibm.com>
4792 * tst-context1.c (GUARD_PATTERN): Defined.
4793 (tst_context_t): Define struct containing ucontext_t & guard words.
4794 (ctx): Declare as an array of tst_context_t.
4795 (fct): Verify uc_link & guard words are still valid.
4796 (tf): Initialize guard words in ctx. Adjust ctx refs for new struct.
4798 2004-06-13 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4800 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4801 Add __data.__futex field, reshuffle __data.__clock.
4802 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
4803 (__pthread_cond_signal): Increment __futex at the same time as
4804 __wakeup_seq or __total_seq. Pass address of __futex instead of
4805 address of low 32-bits of __wakeup_seq to futex syscall.
4806 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
4807 (__pthread_cond_wait): Likewise. Pass __futex value from before
4808 releasing internal lock to FUTEX_WAIT.
4809 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
4810 (__pthread_cond_timedwait): Likewise.
4811 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
4812 (FUTEX_CMP_REQUEUE): Define.
4813 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
4814 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
4815 Pass __futex value from before the unlock and __futex address instead
4816 of address of low 32-bits of __wakeup_seq to futex syscall.
4817 Fallback to FUTEX_WAKE all on any errors.
4819 2004-06-08 Jakub Jelinek <jakub@redhat.com>
4821 * pthread_mutexattr_getpshared.c (pthread_mutex_getpshared): Fix
4823 * pthread_mutexattr_gettype.c (pthread_mutexattr_gettype): Likewise.
4824 * pthread_mutexattr_init.c (__pthread_mutexattr_init): Likewise.
4825 * pthread_mutexattr_settype.c (__pthread_mutexattr_settype): Likewise.
4826 * pthread_mutexattr_setpshared.c (pthread_mutexattr_setpshared):
4827 Likewise. Reported by Bob Cook <bobcook47@hotmail.com>.
4829 2004-06-11 Martin Schwidefsky <schwidefsky@de.ibm.com>
4831 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_compare_and_swap):
4832 Add memory clobber to inline assembly.
4833 (__lll_mutex_trylock): Likewise.
4834 (__lll_mutex_cond_trylock): Likewise.
4836 2004-06-07 Martin Schwidefsky <schwidefsky@de.ibm.com>
4838 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
4839 Pass val argument as 6th system call argument in %r7.
4841 2004-05-21 Jakub Jelinek <jakub@redhat.com>
4843 * Makefile (tests): Add tst-cond16.
4844 * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_futex): Add.
4845 * pthread_cond_init.c (__pthread_cond_init): Clear __data.__futex.
4846 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
4847 Add __data.__futex field, reshuffle __data.__clock.
4848 * sysdeps/unix/sysv/linux/i386/pthread_cond_signal.S
4849 (__pthread_cond_signal): Increment __futex at the same time as
4850 __wakeup_seq or __total_seq. Pass address of __futex instead of
4851 address of low 32-bits of __wakeup_seq to futex syscall.
4852 * sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S
4853 (__pthread_cond_wait): Likewise. Pass __futex value from before
4854 releasing internal lock to FUTEX_WAIT.
4855 * sysdeps/unix/sysv/linux/i386/pthread_cond_timedwait.S
4856 (__pthread_cond_timedwait): Likewise.
4857 * sysdeps/unix/sysv/linux/i386/pthread_cond_broadcast.S
4858 (FUTEX_CMP_REQUEUE): Define.
4859 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
4860 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
4861 Pass __futex value from before the unlock and __futex address instead
4862 of address of low 32-bits of __wakeup_seq to futex syscall.
4863 Fallback to FUTEX_WAKE all on any errors.
4864 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_CMP_REQUEUE):
4866 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4867 internally. Return non-zero if error, zero if success.
4868 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
4869 Add __data.__futex field, reshuffle __data.__clock.
4870 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_CMP_REQUEUE):
4872 (lll_futex_requeue): Add val argument, return 1 unconditionally
4874 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
4875 Add __data.__futex field, reshuffle __data.__clock.
4876 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_CMP_REQUEUE):
4878 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4879 internally. Return non-zero if error, zero if success.
4880 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
4881 (pthread_cond_t): Add __data.__futex field, reshuffle __data.__clock.
4882 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_CMP_REQUEUE):
4884 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4885 internally. Return non-zero if error, zero if success.
4886 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
4887 Add __data.__futex field, reshuffle __data.__clock.
4888 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_CMP_REQUEUE):
4890 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4891 internally. Return non-zero if error, zero if success.
4892 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
4893 Add __data.__futex field, reshuffle __data.__clock.
4894 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
4895 Add __data.__futex field, reshuffle __data.__clock.
4896 * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal):
4897 Increment __futex at the same time as __wakeup_seq or __total_seq.
4898 Pass address of __futex instead of address of low 32-bits of
4899 __wakeup_seq to futex syscall.
4900 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
4901 Pass __futex value from before releasing internal lock
4903 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
4904 Likewise. Avoid unnecessary shadowing of variables.
4905 * sysdeps/pthread/pthread_cond_broadcast.c (__pthread_cond_broadcast):
4906 Set __futex to 2 * __total_seq. Pass __futex value from before the
4907 unlock and __futex address instead of address of low 32-bits of
4908 __wakeup_seq to futex_requeue macro, adjust for new return value
4910 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
4911 (__pthread_cond_signal): Increment __futex at the same time as
4912 __wakeup_seq or __total_seq. Pass address of __futex instead of
4913 address of low 32-bits of __wakeup_seq to futex syscall.
4914 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
4915 (__pthread_cond_wait): Likewise. Pass __futex value from before
4916 releasing internal lock to FUTEX_WAIT.
4917 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
4918 (__pthread_cond_timedwait): Likewise.
4919 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
4920 (FUTEX_CMP_REQUEUE): Define.
4921 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
4922 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
4923 Pass __futex value from before the unlock and __futex address instead
4924 of address of low 32-bits of __wakeup_seq to futex syscall.
4925 Fallback to FUTEX_WAKE all on any errors.
4927 2004-06-03 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4929 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_mutex_lock):
4930 Add nop to align the end of critical section.
4931 (lll_mutex_cond_lock, lll_mutex_timedlock): Likewise.
4933 2004-06-01 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4935 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4936 Add __broadcast_seq field.
4937 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Mark
4938 all waiters as woken with woken_seq and bump broadcast counter.
4939 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use new
4940 __broadcast_seq. Increment __woken_seq correctly when cleanuped.
4941 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4942 Comment typo fixes. Avoid returning -ETIMEDOUT.
4944 2004-06-01 Ulrich Drepper <drepper@redhat.com>
4946 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4947 (__condvar_tw_cleanup): Fix access to saved broadcast_seq value.
4948 Reported by Kaz Kojima.
4950 2004-05-25 Jakub Jelinek <jakub@redhat.com>
4952 * sysdeps/unix/sysv/linux/aio_misc.h: New file.
4954 2004-05-21 Jakub Jelinek <jakub@redhat.com>
4956 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Compare
4957 __broadcast_seq with bc_seq after acquiring internal lock instead of
4960 2004-05-18 Jakub Jelinek <jakub@redhat.com>
4962 * Makefile (.NOTPARALLEL): Only serialize make check/xcheck, not
4964 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4965 (__pthread_cond_timedwait): Avoid returning -ETIMEDOUT.
4966 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
4967 (pthread_cond_t): Add __data.__broadcast_seq field.
4968 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
4969 (FRAME_SIZE): Define.
4970 (__pthread_cond_timedwait): Use it. Store/check broadcast_seq.
4972 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S (FRAME_SIZE):
4974 (__pthread_cond_wait): Use it. Store/check broadcast_seq. Comment
4976 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
4977 (__pthread_cond_broadcast): Increment broadcast_seq. Comment typo
4980 2004-05-18 Ulrich Drepper <drepper@redhat.com>
4982 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add broadcast_seq entry.
4983 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
4984 Add __broadcast_seq field.
4985 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4986 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4987 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4988 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4989 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4990 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Mark
4991 all waiters as woken with woken_seq and bump broadcast counter.
4992 * sysdeps/pthread/pthread_cond_broadcast.c: Likewise.
4993 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use new
4994 __broadcast_seq field.
4995 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4996 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
4997 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
4998 * pthread_cond_init.c: Initialize __broadcast_seq field.
4999 * Makefile (tests): Add tst-cond17 and tst-cond18.
5000 Add .NOTPARALLEL goal.
5001 * tst-cond16.c: New file. From Jakub.
5002 * tst-cond17.c: New file. From Jakub.
5003 * tst-cond18.c: New file. From Jakub.
5005 2004-05-16 Ulrich Drepper <drepper@redhat.com>
5007 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Correct some
5010 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
5011 Parametrize frame size. Correct some unwind info.
5012 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5014 2004-05-04 Jakub Jelinek <jakub@redhat.com>
5016 * tst-stack3.c: Note testing functionality beyond POSIX.
5018 2004-05-04 Jakub Jelinek <jakub@redhat.com>
5020 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (USE___THREAD):
5021 Change conditional from ifdef to if.
5023 2004-04-23 Jakub Jelinek <jakub@redhat.com>
5025 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SYSDEP_CANCEL_ERRNO,
5026 SYSDEP_CANCEL_ERROR): Define.
5029 2004-05-01 Jakub Jelinek <jakub@redhat.com>
5031 * Versions (libpthread): Remove __pthread_cleanup_upto@@GLIBC_PRIVATE.
5033 2004-04-20 Jakub Jelinek <jakub@redhat.com>
5035 * sem_unlink.c (sem_unlink): Change EPERM into EACCES.
5037 2004-04-19 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5039 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Add frame info.
5040 Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
5041 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Remove unneeded frame
5042 info. Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
5044 2004-04-19 Ulrich Drepper <drepper@redhat.com>
5046 * sysdeps/unix/sysv/linux/timer_routines.c: Make sure helper
5047 thread has all signals blocked.
5049 2004-04-18 Andreas Jaeger <aj@suse.de>
5051 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h
5052 (SEM_VALUE_MAX): Add missing brace.
5054 2004-04-17 Jakub Jelinek <jakub@redhat.com>
5056 * sysdeps/pthread/Makefile (tests): Add tst-mqueue8x
5058 (CFLAGS-tst-mqueue8x.c): Add -fexceptions.
5059 * sysdeps/pthread/tst-mqueue8x.c: New test.
5060 * tst-cancel4.c: Update comment about message queues.
5062 * sysdeps/pthread/timer_gettime.c (timer_gettime): For expired timer
5063 return it_value { 0, 0 }.
5064 * sysdeps/pthread/timer_create.c (timer_create): Handle SIGEV_NONE
5066 * sysdeps/pthread/timer_routines.c (thread_expire_timer): Remove
5067 assertion for SIGEV_NONE.
5068 (thread_attr_compare): Compare all attributes, not just a partial
5071 2004-04-17 Jakub Jelinek <jakub@redhat.com>
5073 * sysdeps/unix/sysv/linux/mq_notify.c: Include stdlib.h.
5075 2004-04-17 Ulrich Drepper <drepper@redhat.com>
5077 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h (SEM_VALUE_MAX):
5078 Just use a plain number.
5079 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
5080 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
5081 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
5082 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
5083 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
5084 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
5085 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
5087 2004-04-16 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5089 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Remove unneeded
5091 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
5093 2004-04-15 Jakub Jelinek <jakub@redhat.com>
5095 * sysdeps/unix/sysv/linux/timer_routines.c: Include errno.h.
5096 (timer_helper_thread): Use inline rt_sigtimedwait syscall instead
5097 of calling sigwaitinfo.
5099 2004-04-16 Ulrich Drepper <drepper@redhat.com>
5101 * allocatestack.c (allocate_stack): Set reported_guardsize
5103 * pthread_getattr_np.c (pthread_getattr_np): Use
5104 reported_guardsize instead of guardsize.
5105 * descr.h (struct pthread): Add reported_guardsize field.
5107 2004-04-13 Jakub Jelinek <jakub@redhat.com>
5109 * sysdeps/unix/sysv/linux/mq_notify.c: Shut up GCC warning.
5111 2004-04-12 Ulrich Drepper <drepper@redhat.com>
5113 * sysdeps/unix/sysv/linux/mq-notify.c: New file.
5115 2004-04-08 Jakub Jelinek <jakub@redhat.com>
5117 * sysdeps/unix/sysv/linux/bits/local_lim.h (MQ_PRIO_MAX): Define.
5118 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h (MQ_PRIO_MAX): Define.
5119 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h (MQ_PRIO_MAX): Define.
5120 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h (MQ_PRIO_MAX): Define.
5121 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
5123 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
5124 (_POSIX_MESSAGE_PASSING): Define.
5125 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h
5126 (_POSIX_MESSAGE_PASSING): Define.
5127 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h
5128 (_POSIX_MESSAGE_PASSING): Define.
5130 2004-04-04 Ulrich Drepper <drepper@redhat.com>
5132 * tst-context1.c (fct): Check whether correct stack is used.
5134 2004-04-03 Ulrich Drepper <drepper@redhat.com>
5136 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Never use
5137 matching constraints for asm mem parameters.
5139 * tst-clock2.c (tf): Don't define unless needed.
5141 2004-03-30 H.J. Lu <hongjiu.lu@intel.com>
5143 * Makefile (link-libc-static): Use $(static-gnulib) instead of
5146 2004-03-30 Ulrich Drepper <drepper@redhat.com>
5148 * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_deallocate_tsd.
5149 * init.c (pthread_functions): Add ptr__nptl_deallocate_tsd.
5150 * pthreadP.h: Declare __nptl_deallocate_tsd.
5151 * pthread_create.c (deallocate_tsd): Remove to __nptl_deallocate_tsd.
5154 * Makefile (tests): Add tst-tsd5.
5155 * tst-tsd5.c: New file.
5157 2004-03-29 Ulrich Drepper <drepper@redhat.com>
5159 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
5160 (__pthread_attr_setaffinity_old): Prepend GLIBC_ to version names
5161 is SHLIB_COMPAT check.
5162 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
5163 (__pthread_attr_getaffinity_old): Likewise.
5164 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
5165 (__pthread_getaffinity_old): Likewise.
5166 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
5167 (__pthread_setaffinity_old): Likewise.
5169 2004-03-26 Ulrich Drepper <drepper@redhat.com>
5171 * allocatestack.c (_make_stacks_executable): Call
5172 _dl_make_stack_executable first.
5174 2004-03-24 Roland McGrath <roland@redhat.com>
5176 * sysdeps/i386/pthread_spin_lock.c (pthread_spin_lock): Use "m"
5177 constraint instead of "0".
5179 2004-03-24 Ulrich Drepper <drepper@redhat.com>
5181 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
5182 (lll_mutex_cond_trylock): Define as wrapper around __lll_cond_trylock.
5184 * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Reorganize
5185 code to avoid warning.
5187 2004-03-24 Andreas Jaeger <aj@suse.de>
5189 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
5190 (__pthread_attr_setaffinity_old): Remove const.
5192 2004-03-23 Ulrich Drepper <drepper@redhat.com>
5194 * sysdeps/unix/sysv/linux/smp.h: New file.
5195 * sysdeps/unix/sysv/linux/sh/smp.h: New file.
5196 * init.c: Define __is_smp.
5197 (__pthread_initialize_minimal_internal): Call is_smp_system to
5198 initialize __is_smp.
5199 * pthreadP.h: Declare __is_smp.
5200 Define MAX_ADAPTIVE_COUNT is necessary.
5201 * pthread_mutex_init.c: Add comment regarding __spins field.
5202 * pthread_mutex_lock.c: Implement adaptive mutex type.
5203 * pthread_mutex_timedlock.c: Likewise.
5204 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
5205 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
5207 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
5208 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5209 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5210 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
5211 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5212 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5213 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5214 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define
5215 lll_mutex_cond_trylock.
5216 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5217 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
5218 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5219 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5220 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
5221 Define BUSY_WAIT_NOP.
5222 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5223 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5225 * tst-mutex5.c: Add support for testing adaptive mutexes.
5226 * tst-mutex7.c: Likewise.
5227 * tst-mutex5a.c: New file.
5228 * tst-mutex7a.c: New file.
5229 * Makefile (tests): Add tst-mutex5a and tst-mutex7a.
5231 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
5232 (__lll_mutex_timedlock_wait): Preserve r8 and r9 since the
5233 vgettimeofday call might destroy the content.
5235 * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use hint
5238 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
5239 No need to restrict type of ret. Make it int. Add comment.
5241 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
5242 Remove unnecessary setne instruction.
5244 2004-03-22 Jakub Jelinek <jakub@redhat.com>
5246 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
5247 (__pthread_getaffinity_new): Use INT_MAX instead of UINT_MAX.
5248 * pthread_getattr_np.c (pthread_getattr_np): Double size every cycle.
5249 If realloc fails, break out of the loop.
5251 2004-03-20 Andreas Jaeger <aj@suse.de>
5253 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
5254 (__pthread_setaffinity_old): Fix interface.
5255 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
5256 (__pthread_getaffinity_old): Likewise.
5258 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
5259 (__pthread_setaffinity_new): Remove duplicate declaration.
5261 2004-03-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5263 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Save
5264 the return value to a safe register.
5265 (CDISABLE): Set the function argument correctly.
5267 2004-03-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5269 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XCHG): Define.
5270 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
5271 Rewrite so that only one locked memory operation per round is needed.
5272 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
5273 (pthread_barrier_wait): After wakeup, release lock only when the
5274 last thread stopped using the barrier object.
5275 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
5276 (__pthread_cond_wait): Don't store mutex address if the current
5277 value is ~0l. Add correct cleanup support and unwind info.
5278 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
5279 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
5280 (__pthread_cond_broadcast): Don't use requeue for pshared condvars.
5281 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Update comment.
5282 * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
5283 Add correct cleanup support and unwind info.
5284 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
5285 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Add unwind
5286 information for syscall wrappers.
5288 2004-03-18 Ulrich Drepper <drepper@redhat.com>
5290 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
5291 cpusetsize field, remove next.
5292 * sysdeps/pthread/pthread.h (pthread_getaffinity_np): Add new second
5293 parameter for size of the CPU set.
5294 (pthread_setaffinity_np): Likewise.
5295 (pthread_attr_getaffinity_np): Likewise.
5296 (pthread_attr_setaffinity_np): Likewise.
5297 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: Implement
5298 interface change, keep compatibility code.
5299 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
5300 * sysdeps/unix/sysv/linux/pthread_getaffinity.c: Likewise.
5301 * sysdeps/unix/sysv/linux/pthread_setaffinity.c: Likewise.
5302 * pthreadP.h: Remove hidden_proto for pthread_getaffinity_np. Declare
5303 __pthread_getaffinity_np.
5304 * Versions: Add version for changed interfaces.
5305 * tst-attr3.c: Adjust test for interface change.
5306 * pthread_getattr_np.c: Query the kernel about the affinity mask with
5307 increasing buffer sizes.
5308 * pthread_attr_destroy.c: Remove unused list handling.
5309 * pthread_attr_init.c: Likewise.
5311 2004-03-17 Roland McGrath <roland@redhat.com>
5313 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Pass missing
5314 first argument to clock_getres so we ever enable kernel timers.
5316 2004-03-15 Ulrich Weigand <uweigand@de.ibm.com>
5318 * init.c (nptl_version): Add __attribute_used__ to nptl_version.
5320 2004-03-12 Richard Henderson <rth@redhat.com>
5322 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Propagate
5323 oldvalue from CENABLE to CDISABLE.
5325 2004-03-12 Ulrich Drepper <drepper@redhat.com>
5327 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define HOST_NAME_MAX.
5328 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
5329 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
5330 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
5332 2004-03-11 Richard Henderson <rth@redhat.com>
5334 * sysdeps/alpha/tcb-offsets.sym (PID_OFFSET): New.
5335 * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: Save/restore PID.
5336 * sysdeps/unix/sysv/linux/alpha/vfork.S: New file.
5338 2004-03-11 Jakub Jelinek <jakub@redhat.com>
5340 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Use jgnl
5341 instead of jnl instruction to jump to SYSCALL_ERROR_LABEL.
5342 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S (__vfork): Likewise.
5344 2004-03-11 Jakub Jelinek <jakub@redhat.com>
5346 * forward.c (__pthread_cond_broadcast_2_0,
5347 __pthread_cond_destroy_2_0, __pthread_cond_init_2_0,
5348 __pthread_cond_signal_2_0, __pthread_cond_wait_2_0,
5349 __pthread_cond_timedwait_2_0): Use return 0 as defaction instead of 0.
5351 2004-03-11 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5353 * sysdeps/sh/tcb-offsets.sym: Add PID.
5354 * sysdeps/unix/sysv/linux/sh/pt-vfork.S: Properly handle PID cache.
5355 * sysdeps/unix/sysv/linux/sh/vfork.S: New file.
5357 2004-03-10 Ulrich Drepper <drepper@redhat.com>
5359 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: No need to
5360 include <sysdep-cancel.h>, vfork is no cancellation point.
5361 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: Likewise.
5362 * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: Likewise.
5363 * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: Likewise.
5365 2004-03-10 Jakub Jelinek <jakub@redhat.com>
5367 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Add
5369 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
5370 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
5372 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S (__vfork):
5374 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
5375 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
5376 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Include tcb-offsets.h.
5377 * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Use DO_CALL instead
5378 of DO_CALL_VIA_BREAK. Work around a gas problem.
5380 * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: Remove.
5381 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: New file.
5382 * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: New file.
5383 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: New file.
5384 * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: New file.
5385 * sysdeps/powerpc/tcb-offsets.sym: Add PID.
5387 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S (__vfork): Don't use
5388 a local register for saving old PID. Negate PID in parent upon exit.
5390 * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: Include
5392 (__vfork): Negate PID if non-zero and set to INT_MIN if zero
5393 before syscall, set to the old value in the parent afterwards.
5394 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: New file.
5395 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: Include
5397 (__vfork): Negate PID if non-zero and set to INT_MIN if zero
5398 before syscall, set to the old value in the parent afterwards.
5399 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: New file.
5400 * sysdeps/s390/tcb-offsets.sym: Add PID.
5402 * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: Remove.
5403 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: New file.
5404 * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S: New file.
5405 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: New file.
5406 * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: New file.
5407 * sysdeps/sparc/tcb-offsets.sym: Add PID.
5409 2004-03-10 Andreas Schwab <schwab@suse.de>
5411 * sysdeps/ia64/tcb-offsets.sym: Add PID.
5412 * sysdeps/unix/sysv/linux/ia64/vfork.S: New file.
5413 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Properly handle PID cache.
5415 2004-03-09 Jakub Jelinek <jakub@redhat.com>
5417 * tst-cancel20.c (do_one_test): Clear in_sh_body first.
5418 * tst-cancel21.c (do_one_test): Likewise.
5419 Reported by Gordon Jin <gordon.jin@intel.com>.
5421 2004-02-09 Jakub Jelinek <jakub@redhat.com>
5423 * sysdeps/unix/sysv/linux/i386/vfork.S (SAVE_PID): Negate PID
5424 if non-zero and set to INT_MIN if zero.
5425 * sysdeps/unix/sysv/linux/x86_64/vfork.S (SAVE_PID): Likewise.
5426 * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Include tcb-offsets.h.
5427 (SAVE_PID, RESTORE_PID): Define.
5429 * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: Include tcb-offsets.h.
5430 Use relative path to avoid including NPTL i386/vfork.S.
5431 (SAVE_PID, RESTORE_PID): Define.
5432 * sysdeps/unix/sysv/linux/raise.c: Include limits.h.
5433 (raise): Handle THREAD_SELF->pid INT_MIN the same as 0.
5434 * Makefile (tests): Add tst-vfork1, tst-vfork2, tst-vfork1x and
5436 (tests-reverse): Add tst-vfork1x and tst-vfork2x.
5437 * tst-vfork1.c: New test.
5438 * tst-vfork2.c: New test.
5439 * tst-vfork1x.c: New test.
5440 * tst-vfork2x.c: New test.
5442 2004-03-08 Ulrich Drepper <drepper@redhat.com>
5444 * sysdeps/i386/tcb-offsets.sym: Add PID.
5445 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
5446 * sysdeps/unix/sysv/linux/i386/vfork.S: New file.
5447 * sysdeps/unix/sysv/linux/x86_64/vfork.S: New file.
5449 2004-03-08 Steven Munroe <sjmunroe@us.ibm.com>
5451 * sysdeps/unix/sysv/linux/powerpc/Versions: Remove leading tabs.
5453 2004-03-08 H.J. Lu <hongjiu.lu@intel.com>
5455 * sysdeps/s390/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
5458 2004-03-07 Ulrich Drepper <drepper@redhat.com>
5460 * sysdeps/ia64/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
5463 * tst-once4.c: Remove unnecessary macro definition.
5465 * tst-mutex7.c (do_test): Limit thread stack size.
5466 * tst-once2.c (do_test): Likewise.
5467 * tst-tls3.c (do_test): Likewise.
5468 * tst-tls1.c (do_test): Likewise.
5469 * tst-signal3.c (do_test): Likewise.
5470 * tst-kill6.c (do_test): Likewise.
5471 * tst-key4.c (do_test): Likewise.
5472 * tst-join4.c (do_test): Likewise.
5473 * tst-fork1.c (do_test): Likewise.
5474 * tst-context1.c (do_test): Likewise.
5475 * tst-cond2.c (do_test): Likewise.
5476 * tst-cond10.c (do_test): Likewise.
5477 * tst-clock2.c (do_test): Likewise.
5478 * tst-cancel10.c (do_test): Likewise.
5479 * tst-basic2.c (do_test): Likewise.
5480 * tst-barrier4.c (do_test): Likewise.
5482 2004-03-05 Ulrich Drepper <drepper@redhat.com>
5484 * sysdeps/i386/tls.h: Use GLRO instead of GL where appropriate.
5486 2004-03-01 Ulrich Drepper <drepper@redhat.com>
5488 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5489 (__pthread_cond_timedwait): Optimize wakeup test.
5490 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
5491 (__pthread_cond_wait): Likewise.
5492 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
5493 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
5496 2004-02-29 Ulrich Drepper <drepper@redhat.com>
5498 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
5499 (__lll_mutex_lock_wait): Optimize a bit more. Just one copy of
5500 the atomic instruction needed.
5501 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
5502 (__lll_mutex_lock_wait): Likewise.
5504 2004-02-28 Ulrich Drepper <drepper@redhat.com>
5506 * Makefile (tests): Add tst-cond14 and tst-cond15.
5507 * tst-cond14.c: New file.
5508 * tst-cond15.c: New file.
5510 2004-02-27 Ulrich Drepper <drepper@redhat.com>
5512 * sysdeps/pthread/createthread.c (create_thread): Remove use of
5513 CLONE_STOPPED. We cannot use SIGCONT which means CLONE_STOPPED
5514 needs to be implemented differently to be useful.
5516 2004-02-26 Ulrich Drepper <drepper@redhat.com>
5518 * pthread_attr_setschedparam.c: Don't test priority against limits
5519 here. Set ATTR_FLAG_SCHED_SET flag.
5520 * pthread_attr_setschedpolicy.c: Set ATTR_FLAG_POLICY_SET flag.
5521 * pthread_create.c (__pthread_create_2_1): Copy scheduling attributes
5522 from parent thread to child. If attribute is used and scheduling
5523 parameters are not inherited, copy parameters from attribute or
5524 compute them. Check priority value.
5525 * pthread_getschedparam.c: If the parameters aren't known yet get
5526 them from the kernel.
5527 * pthread_setschedparam.c: Set ATTR_FLAG_SCHED_SET and
5528 ATTR_FLAG_POLICY_SET flag for thread.
5529 * sysdeps/unix/sysv/linux/internaltypes.h: Define ATTR_FLAG_SCHED_SET
5530 and ATTR_FLAG_POLICY_SET.
5532 * sysdeps/pthread/createthread.c: Use tgkill if possible.
5534 * pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr): Don't
5535 fail if stack address hasn't been set. Just return 0.
5537 2004-02-25 Ulrich Drepper <drepper@redhat.com>
5539 * Makefile (tests-nolibpthread): Add tst-unload. Don't link with
5540 libpthread for the files in this list.
5541 (CFLAGS-tst-unload): Removed.
5542 * tst-unload.c (do_test): Don't use complete path for
5545 * Makefile: Define sonames for tst-tls5mod, tst-_res1mod1, and
5548 2004-02-22 Ulrich Drepper <drepper@redhat.com>
5550 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
5551 (__lll_mutex_lock_wait): Rewrite so that only one locked memory
5552 operation per round is needed.
5553 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
5554 (__lll_mutex_lock_wait): Likewise.
5556 2004-02-20 Ulrich Drepper <drepper@redhat.com>
5558 * tst-cancel9.c (cleanup): Don't print to stderr.
5560 2004-02-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5562 * sysdeps/sh/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Fix variable name.
5564 2004-02-20 Jakub Jelinek <jakub@redhat.com>
5566 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
5567 (__syscall_error_handler2): Call CDISABLE.
5568 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
5569 (__syscall_error_handler2): Call CDISABLE.
5571 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
5572 Release lock before the loop, don't reacquire it.
5574 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h (DL_ARGV_NOT_RELRO): Define.
5576 2004-02-19 Andreas Schwab <schwab@suse.de>
5578 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
5581 2004-02-18 Ulrich Drepper <drepper@redhat.com>
5583 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
5584 (pthread_barrier_wait): After wakeup, release lock only when the
5585 last thread stopped using the barrier object.
5586 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S
5587 (pthread_barrier_wait): Likewise.
5588 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
5590 * Makefile (tests): Add tst-barrier4.
5591 * tst-barrier4.c: New file.
5593 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5594 (__pthread_cond_timedwait): Perform timeout test while holding
5595 internal lock to prevent wakeup race.
5596 Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
5597 * sysdeps/pthread/pthread_cond_timedwait.c
5598 (__pthread_cond_timedwait): Likewise.
5599 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
5600 (__pthread_cond_timedwait): Likewise.
5602 2004-02-18 Jakub Jelinek <jakub@redhat.com>
5604 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S
5605 (__pthread_rwlock_unlock): Access WRITER as 32-bit value.
5606 * Makefile (tests): Add tst-rwlock13.
5607 * tst-rwlock13.c: New test.
5609 2004-02-16 Ulrich Drepper <drepper@redhat.com>
5611 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5612 (__condvar_tw_cleanup): Little optimization.
5613 Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
5615 2004-02-16 Steven Munroe <sjmunroe@us.ibm.com>
5617 * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: Replace libc with
5618 libpthread as "lib" parameter to SHLIB_COMPAT.
5619 (__novmx_siglongjmp): Fix typo in function name.
5620 (__novmx_longjmp): Fix typo in function name.
5622 2004-02-13 Ulrich Drepper <drepper@redhat.com>
5624 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Add a
5627 * sysdeps/generic/pt-longjmp.c: Moved to...
5628 * sysdeps/pthread/pt-longjmp.c: ...here. New file.
5630 2004-01-29 Steven Munroe <sjmunroe@us.ibm.com>
5632 * Makefile (libpthread-routines): Add pt-cleanup.
5633 * pt-longjmp.c: Removed.
5634 * pt-cleanup.c: Copied __pthread_cleanup_upto to here. New file.
5635 * sysdeps/generic/pt-longjmp.c: Copied longjmp to here. New file.
5636 * sysdeps/unix/sysv/linux/powerpc/Versions: New file.
5637 Version longjmp, siglongjmp for GLIBC_2.3.4.
5638 * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: New File.
5640 2004-02-13 Ulrich Drepper <drepper@redhat.com>
5642 * sysdeps/pthread/pthread_cond_timedwait.c
5643 (__pthread_cond_timedwait): Optimize. Drop internal lock earlier.
5644 Reuse code. Add __builtin_expects.
5646 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5647 (__pthread_cond_timedwait): Get internal lock in case timeout has
5648 passed before the futex syscall.
5649 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5651 2004-01-20 Ulrich Drepper <drepper@redhat.com>
5653 * allocatestack.c: Pretty printing.
5655 * sysdeps/pthread/createthread.c (create_thread): Don't add
5656 CLONE_DETACHED bit if it is not necessary.
5658 2004-01-16 Ulrich Drepper <drepper@redhat.com>
5660 * pthread_getattr_np.c: Include ldsodefs.h.
5662 2004-01-16 Richard Henderson <rth@redhat.com>
5664 * allocatestack.c: Don't declare __libc_stack_end.
5665 * init.c (__pthread_initialize_minimal_internal): Likewise.
5666 * pthread_getattr_np.c (pthread_getattr_np): Likewise.
5668 2004-01-15 Richard Henderson <rth@redhat.com>
5670 * sysdeps/alpha/tls.h (tcbhead_t): Add private.
5671 (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE,
5672 TLS_PRE_TCB_SIZE, TLS_TCB_ALIGN, INSTALL_DTV, INSTALL_NEW_DTV,
5673 GET_DTV, THREAD_DTV, THREAD_SELF, DB_THREAD_SELF): Match ia64.
5674 (TLS_TCB_OFFSET, THREAD_ID, NO_TLS_OFFSET): Remove.
5675 (THREAD_GETMEM, THREAD_GETMEM_NC): Simplify.
5676 (THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
5677 * sysdeps/unix/sysv/linux/alpha/createthread.c (TLS_VALUE): Match ia64.
5679 2004-01-14 Ulrich Drepper <drepper@redhat.com>
5681 * init.c (pthread_functions): Make array const.
5683 2004-01-13 Ulrich Drepper <drepper@redhat.com>
5685 * allocatestack.c (__make_stacks_executable): Change interface.
5686 Check parameters. Pass parameter on to libc counterpart.
5687 * pthreadP.h: Change declaration.
5689 2004-01-13 Richard Henderson <rth@redhat.com>
5691 * pthread_attr_setstack.c (__old_pthread_attr_setstack): Use
5693 * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize):
5696 * sysdeps/alpha/Makefile: New file.
5697 * sysdeps/alpha/tcb-offsets.sym: New file.
5698 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
5699 Use MULTIPLE_THREADS_OFFSET to implement !libpthread !libc version.
5701 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Rewrite based
5704 2004-01-08 Jakub Jelinek <jakub@redhat.com>
5706 * Makefile (tests): Add tst-backtrace1.
5707 * tst-backtrace1.c: New test.
5709 2003-12-11 Ulrich Weigand <uweigand@de.ibm.com>
5711 * sysdeps/alpha/tls.h (DB_THREAD_SELF): Pass bit size of thread
5712 register as second parameter to the REGISTER macro.
5713 * sysdeps/ia64/tls.h (DB_THREAD_SELF): Likewise.
5714 * sysdeps/powerpc/tls.h (DB_THREAD_SELF): Likewise.
5715 * sysdeps/sh/tls.h (DB_THREAD_SELF): Likewise.
5716 * sysdeps/sparc/tls.h (DB_THREAD_SELF): Likewise.
5717 * sysdeps/s390/tls.h (DB_THREAD_SELF): Pass __WORDSIZE as bit size
5718 of thread register as second parameter to REGISTER macro in 64 case.
5720 2004-01-03 Ulrich Drepper <drepper@redhat.com>
5722 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Removed.
5723 (CFLAGS-getpid.o): Defined.
5724 (CFLAGS-getpid.os): Defined.
5726 2003-12-31 Ulrich Drepper <drepper@redhat.com>
5728 * pthread_getattr_np.c (pthread_getattr_np): Make sure stack info
5729 returned for main thread does not overlap with any other VMA.
5730 Patch by Jakub Jelinek.
5732 2003-12-29 Jakub Jelinek <jakub@redhat.com>
5734 * tst-raise1.c: Include stdio.h.
5736 2003-12-23 Jakub Jelinek <jakub@redhat.com>
5738 * sysdeps/unix/sysv/linux/raise.c (raise): Protect pid = selftid
5739 setting with __ASSUME_TGKILL || defined __NR_tgkill.
5740 If pid is 0, set it to selftid.
5741 * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Make inline.
5742 Don't set self->pid but self->tid. If self->pid == 0 and self->tid
5743 != 0, return self->tid without doing a syscall.
5744 * descr.h (struct pthread): Move pid field after tid.
5746 * Makefile (tests): Add tst-raise1.
5747 * tst-raise1.c: New file.
5749 2003-12-23 Roland McGrath <roland@redhat.com>
5751 * tst-oddstacklimit.c: New file.
5752 * Makefile (tests): Add it.
5753 (tst-oddstacklimit-ENV): New variable.
5755 * init.c (__pthread_initialize_minimal_internal): Round stack rlimit
5756 value up to page size for __default_stacksize.
5758 2003-12-21 Ulrich Drepper <drepper@redhat.com>
5760 * Makefile (tests): Add tst-eintr5.
5761 * tst-eintr5.c: New file.
5763 * eintr.c (eintr_source): Prevent sending signal to self.
5765 * tst-eintr2.c (tf1): Improve error message.
5767 2003-12-20 Ulrich Drepper <drepper@redhat.com>
5769 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Define.
5770 * sysdeps/unix/sysv/linux/getpid.c: New file.
5771 * pthread_cancel.c: Add comment explaining use of PID field.
5772 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
5773 * pthread_getattr_np.c: Use abs() when comparing PID and TID fields.
5774 * sysdeps/unix/sysv/linux/fork.c: Negate PID field of parent
5775 temporarily to signal the field must not be relied on and updated
5777 * sysdeps/unix/sysv/linux/pt-raise.c: Handle case where PID is
5778 temporarily negative.
5779 * sysdeps/unix/sysv/linux/raise.c: Likewise.
5781 2003-12-19 Ulrich Drepper <drepper@redhat.com>
5783 * eintr.c (setup_eintr): Add new parameter. Pass to thread function.
5784 (eintr_source): If ARG != NULL, use pthread_kill.
5785 * tst-eintr1.c: Adjust for this change.
5786 * tst-eintr2.c: Likewise.
5787 * Makefile (tests): Add tst-eintr3 and tst-eintr4.
5788 * tst-eintr3.c: New file.
5789 * tst-eintr4.c: New file.
5791 2003-12-19 Jakub Jelinek <jakub@redhat.com>
5793 * libc-cancellation.c (__libc_enable_asynccancel): Don't cancel
5794 if CANCELSTATE_BITMASK is set.
5795 * sysdeps/pthread/librt-cancellation.c (__librt_enable_asynccancel):
5798 * Makefile (tests): Add tst-cancel22 and tst-cancel23.
5799 (tests-reverse): Add tst-cancel23.
5800 * tst-cancel22.c: New test.
5801 * tst-cancel23.c: New test.
5803 2003-12-18 Ulrich Drepper <drepper@redhat.com>
5805 * tst-eintr1.c: Better error messages.
5807 * Makefile (tests): Add tst-eintr2.
5808 * tst-eintr2.c: New file.
5810 2003-12-18 Jakub Jelinek <jakub@redhat.com>
5812 * Makefile (tests): Add tst-cancel21 and tst-cancelx21.
5813 (CFLAGS-tst-cancelx21.c): Set.
5814 * tst-cancel21.c: New test.
5815 * tst-cancelx21.c: New test.
5817 * unwind.c (FRAME_LEFT): Add adj argument. Subtract it from each
5819 (unwind_stop): Use _JMPBUF_CFA_UNWINDS_ADJ macro instead of
5820 _JMPBUF_CFA_UNWINDS. Adjust FRAME_LEFT invocations.
5821 * pt-longjmp.c: Include jmpbuf-unwind.h.
5822 (__pthread_cleanup_upto): Use _JMPBUF_UNWINDS_ADJ macro instead of
5823 _JMPBUF_UNWINDS. Adjust compared pointers.
5824 * init.c (__pthread_initialize_minimal_internal): Initialize
5825 pd->stackblock_size.
5826 * sysdeps/pthread/jmpbuf-unwind.h: Removed.
5827 * sysdeps/alpha/jmpbuf-unwind.h: New file.
5828 * sysdeps/i386/jmpbuf-unwind.h: New file.
5829 * sysdeps/powerpc/jmpbuf-unwind.h: New file.
5830 * sysdeps/s390/jmpbuf-unwind.h: New file.
5831 * sysdeps/sh/jmpbuf-unwind.h: New file.
5832 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: New file.
5833 * sysdeps/x86_64/jmpbuf-unwind.h: New file.
5834 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Include stdint.h.
5835 (_JMPBUF_CFA_UNWINDS): Remove.
5836 (_JMPBUF_CFA_UNWINDS_ADJ, _JMPBUF_UNWINDS_ADJ): Define.
5838 2003-12-12 Jakub Jelinek <jakub@redhat.com>
5840 * Makefile (tests): Add tst-cancel20 and tst-cancelx20.
5841 (CFLAGS-tst-cancelx20.c): Set.
5842 * tst-cancel20.c: New test.
5843 * tst-cancelx20.c: New test.
5845 2003-12-17 Ulrich Drepper <drepper@redhat.com>
5847 * init.c (__pthread_initialize_minimal_internal): Don't treat
5848 architectures with separate register stack special here when
5849 computing default stack size.
5851 2003-12-17 Roland McGrath <roland@redhat.com>
5853 * Makefile (tst-cancelx7-ARGS): New variable.
5854 Reportd by Greg Schafer <gschafer@zip.com.au>.
5856 2003-12-17 Jakub Jelinek <jakub@redhat.com>
5858 * Makefile (tests): Add tst-stack3. Depend on $(objpfx)tst-stack3-mem.
5859 (generated): Add tst-stack3.mtrace and tst-stack3-mem.
5860 (tst-stack3-ENV): Set.
5861 ($(objpfx)tst-stack3-mem): New.
5862 * tst-stack3.c: New test.
5864 2003-12-10 David Mosberger <davidm@hpl.hp.com>
5866 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init_EPILOG_BEGINS):
5867 Add unwind directives. Drop unused .regstk directive.
5868 (_fini_EPILOG_BEGINS): Add unwind directives.
5870 2003-12-11 Ulrich Drepper <drepper@redhat.com>
5872 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
5873 Assume parameter is a pointer.
5874 (lll_futex_wake): Likewise.
5875 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_wait):
5877 (lll_futex_wake): Likewise.
5878 Reported by Boris Hu.
5879 * sysdeps/unix/sysv/linux/unregister-atfork.c
5880 (__unregister_atfork): Pass pointer to refcntr to lll_futex_wait.
5882 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Simplify a bit.
5884 2003-12-10 Ulrich Drepper <drepper@redhat.com>
5886 * sysdeps/pthread/bits/libc-lock.h (__rtld_lock_initialize): Define.
5887 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Call
5888 __rtld_lock_initialize for ld.so lock.
5889 Patch in part by Adam Li <adam.li@intel.com>.
5891 2003-12-02 David Mosberger <davidm@hpl.hp.com>
5893 * Makefile (link-libc-static): Remove -lgcc_eh---it's already mentioned
5894 in $(gnulib). Also, remove stale comment.
5896 2003-11-12 David Mosberger <davidm@hpl.hp.com>
5898 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Take
5899 advantage of new syscall stub and optimize accordingly.
5901 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__NR_futex): Rename
5902 from SYS_futex, to match expectations of
5903 sysdep.h:DO_INLINE_SYSCALL.
5904 (lll_futex_clobbers): Remove.
5905 (lll_futex_timed_wait): Rewrite in terms of DO_INLINE_SYSCALL.
5906 (lll_futex_wake): Likewise.
5907 (lll_futex_requeue): Likewise.
5908 (__lll_mutex_trylock): Rewrite to a macro, so we can include this
5909 file before DO_INLINE_SYSCALL is defined (proposed by Jakub
5911 (__lll_mutex_lock): Likewise.
5912 (__lll_mutex_cond_lock): Likewise.
5913 (__lll_mutex_timed_lock): Likewise.
5914 (__lll_mutex_unlock): Likewise.
5915 (__lll_mutex_unlock_force): Likewise.
5917 * sysdeps/ia64/tls.h: Move declaration of __thread_self up so it
5918 comes before the include of <sysdep.h>.
5919 (THREAD_SELF_SYSINFO): New macro.
5920 (THREAD_SYSINFO): Likewise.
5921 (INIT_SYSINFO): New macro.
5922 (TLS_INIT_TP): Call INIT_SYSINFO.
5924 * sysdeps/ia64/tcb-offsets.sym: Add SYSINFO_OFFSET.
5926 * sysdeps/pthread/createthread.c (create_thread): Use
5927 THREAD_SELF_SYSINFO and THREAD_SYSINFO instead of open code.
5928 * allocatestack.c (allocate_stack): Use THREAD_SYSINFO and
5929 THREAD_SELF_SYSINFO instead of open code.
5930 * sysdeps/i386/tls.h (THREAD_SELF_SYSINFO): New macro.
5931 (THREAD_SYSINFO): Likewise.
5933 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: New file.
5935 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Work around gas problem.
5937 2003-12-06 Ulrich Drepper <drepper@redhat.com>
5939 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Use .init_array
5940 instead of .init. Patch by David Mosberger.
5942 2003-11-30 Thorsten Kukuk <kukuk@suse.de>
5944 * sysdeps/pthread/configure.in: Remove broken declaration in C
5945 cleanup handling check.
5947 2003-11-30 Andreas Jaeger <aj@suse.de>
5949 * Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time).
5950 * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
5953 2003-11-27 Jakub Jelinek <jakub@redhat.com>
5955 * sysdeps/unix/sysv/linux/internaltypes.h (ATTR_FLAG_OLDATTR): Define.
5956 * pthread_attr_destroy.c: Include shlib-compat.h.
5957 (__pthread_attr_destroy): Return immediately if ATTR_FLAG_OLDATTR
5958 is set in iattr->flags.
5959 * pthread_attr_init.c (__pthread_attr_init_2_0): Set ATTR_FLAG_OLDATTR.
5961 2003-11-21 Jakub Jelinek <jakub@redhat.com>
5963 * Makefile (distribute): Add tst-cleanup4aux.c.
5965 * tst-cond12.c (prepare): Add prototype. Move after test-skeleton.c
5968 2003-11-21 Ulrich Drepper <drepper@redhat.com>
5970 * tst-cond12.c (do_test): If USE_COND_SIGNAL is defined, use
5971 pthread_cond_signal.
5973 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Don't
5974 store mutex address if the current value is ~0l.
5975 * sysdeps/pthread/pthread_cond_timedwait.c
5976 (__pthread_cond_timedwait): Likewise.
5977 * sysdeps/pthread/pthread_cond_broadcast.c
5978 (__pthread_cond_broadcast): Don't use requeue for pshared
5981 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
5982 (__pthread_cond_wait): Don't store mutex address if the current
5984 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
5985 (__pthread_cond_timedwait): Likewise.
5986 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
5987 (__pthread_cond_broadcast): Don't use requeue for pshared
5990 * pthread_cond_init.c (__pthread_cond_init): Initialize __mutex
5991 element with ~0l for pshared condvars, with NULL otherwise.
5993 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
5994 (__pthread_cond_wait): Don't store mutex address if the current
5996 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5997 (__pthread_cond_timedwait): Likewise.
5998 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
5999 (__pthread_cond_broadcast): Don't use requeue for pshared
6002 * Makefile: Add rules to build and run tst-cond12 and tst-cond13.
6003 * tst-cond12.c: New file.
6004 * tst-cond13.c: New file.
6006 2003-11-17 Ulrich Drepper <drepper@redhat.com>
6008 * sysdeps/pthread/configure.in: Make missing forced unwind support
6011 2003-11-11 Ulrich Drepper <drepper@redhat.com>
6013 * pthreadP.h: Don't declare __pthread_unwind as weak inside libpthread.
6015 2003-11-06 Ulrich Drepper <drepper@redhat.com>
6017 * Makefile: Add magic to clean up correctly.
6019 2003-11-05 Jakub Jelinek <jakub@redhat.com>
6021 * unwind.c (FRAME_LEFT): Define.
6022 (unwind_stop): Handle old style cleanups here.
6023 (__pthread_unwind): Handle old style cleanups only if
6024 !HAVE_FORCED_UNWIND.
6025 * Makefile (tests): Add tst-cleanup4 and tst-cleanupx4.
6026 (CFLAGS-tst-cleanupx4.c): Add -fexceptions.
6027 ($(objpfx)tst-cleanup4): Depend on $(objpfx)tst-cleanup4aux.o.
6028 ($(objpfx)tst-cleanupx4): Likewise.
6029 * tst-cleanup4.c: New test.
6030 * tst-cleanup4aux.c: New.
6031 * tst-cleanupx4.c: New test.
6033 2003-11-04 Ulrich Drepper <drepper@redhat.com>
6035 * sysdeps/pthread/bits/stdio-lock.h: Use lll_*lock instead of
6036 lll_mutex_*lock macros to skip atomic operations on some archs.
6038 2003-11-03 Ulrich Drepper <drepper@redhat.com>
6040 * sysdeps/pthread/tst-timer.c (main): Initialize
6041 sigev2.sigev_value as well.
6043 2003-10-15 Roland McGrath <roland@redhat.com>
6045 * sysdeps/pthread/configure.in: Barf if visibility attribute support
6047 * sysdeps/pthread/configure: Regenerated.
6049 2003-10-09 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6051 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Completely revamp the
6052 locking macros. No distinction between normal and mutex locking
6054 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Rewrite mutex locking.
6055 Merge bits from lowlevelmutex.S we still need.
6056 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Remove.
6057 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
6058 * sysdeps/unix/sysv/linux/sh/not-cancel.h: New file.
6059 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Adjust for
6060 new mutex implementation.
6061 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Likewise.
6062 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
6063 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
6064 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
6065 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
6066 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
6067 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
6068 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
6069 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
6070 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO): Also defined
6071 symbol for entry point to avoid cancellation.
6073 2003-10-07 Jakub Jelinek <jakub@redhat.com>
6075 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Backout 2003-10-02
6077 (SAVE_OLDTYPE_0): Fix a typo.
6079 2003-10-03 Ulrich Drepper <drepper@redhat.com>
6081 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
6082 Check __sigsetjmp return value. Reported by Daniel Jacobowitz.
6084 2003-10-02 Ulrich Drepper <drepper@redhat.com>
6086 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (DOCARGS_1): Use
6089 2003-10-02 Jakub Jelinek <jakub@redhat.com>
6091 * Makefile (tests): Add tst-cancel19.
6092 * tst-cancel19.c: New test.
6094 2003-10-02 Ulrich Drepper <drepper@redhat.com>
6096 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix saving and
6097 restoring of the old cancellation type.
6099 2003-09-30 Jakub Jelinek <jakub@redhat.com>
6101 * sysdeps/pthread/malloc-machine.h: Remove misleading comment.
6103 2003-09-27 Wolfram Gloger <wg@malloc.de>
6105 * sysdeps/pthread/malloc-machine.h: New file
6107 2003-09-24 Roland McGrath <roland@redhat.com>
6109 * allocatestack.c (__make_stacks_executable): Don't ignore return
6110 value from _dl_make_stack_executable.
6112 2003-09-24 Ulrich Drepper <drepper@redhat.com>
6114 * allocatestack.c (__make_stacks_executable): Also change
6115 permission of the currently unused stacks.
6117 * allocatestack.c (change_stack_perm): Split out from
6118 __make_stacks_executable.
6119 (allocate_stack): If the required permission changed between the time
6120 we started preparing the stack and queueing it, change the permission.
6121 (__make_stacks_executable): Call change_stack_perm.
6123 * Makefile: Build tst-execstack-mod locally.
6124 * tst-execstack-mod.c: New file.
6126 2003-09-23 Jakub Jelinek <jakub@redhat.com>
6128 * Makefile (tests): Only add tst-execstack if have-z-execstack is yes.
6130 2003-09-23 Roland McGrath <roland@redhat.com>
6132 * tst-execstack.c: New file.
6133 * Makefile (tests): Add it.
6134 ($(objpfx)tst-execstack, $(objpfx)tst-execstack.out): New targets.
6135 (LDFLAGS-tst-execstack): New variable.
6137 * allocatestack.c (allocate_stack): Use GL(dl_stack_flags) to decide
6138 whether to use PROT_EXEC for stack mmap.
6139 (__make_stacks_executable): New function.
6140 * pthreadP.h: Declare it.
6141 * init.c (__pthread_initialize_minimal_internal): Set
6142 GL(dl_make_stack_executable_hook) to that.
6144 2003-09-22 Ulrich Drepper <drepper@redhat.com>
6146 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Adjust for latest
6147 recommendation from AMD re avoidance of lock prefix.
6149 2003-09-22 Jakub Jelinek <jakub@redhat.com>
6151 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait): Use
6152 lll_futex_timed_wait instead of lll_futex_wait.
6153 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Removed.
6154 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Removed.
6155 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: Removed.
6156 * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: Removed.
6157 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Removed.
6158 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Removed.
6159 * sysdeps/unix/sysv/linux/s390/sem_post.c: Removed.
6160 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Removed.
6161 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Include atomic.h.
6162 Completely revamp the locking macros. No distinction between
6163 normal and mutex locking anymore.
6164 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
6165 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock_wait,
6166 __lll_lock_timedwait): Fix prototypes.
6167 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_lock_wait,
6168 __lll_lock_timedwait): Likewise.
6169 (lll_mutex_lock, lll_mutex_cond_lock): Use _val instead of _bool
6170 macros, add __builtin_expect.
6171 (lll_mutex_timedlock): Likewise. Fix return value.
6172 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Removed.
6173 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: Removed.
6174 * sysdeps/unix/sysv/linux/i386/i586/lowlevelmutex.S: Removed.
6175 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: Removed.
6176 * sysdeps/unix/sysv/linux/i386/i686/lowlevelmutex.S: Removed.
6177 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: Removed.
6178 * sysdeps/unix/sysv/linux/lowlevelmutex.c: Removed.
6179 * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: Removed.
6181 2003-09-22 Ulrich Drepper <drepper@redhat.com>
6183 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
6184 (__lll_mutex_lock_wait): Minor optimization to avoid one atomic
6185 operation if possible.
6187 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Don't play tricks
6188 like jumping over the lock prefix.
6190 2003-09-21 Ulrich Drepper <drepper@redhat.com>
6192 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Completely revamp the
6193 locking macros. No distinction between normal and mutex locking
6195 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
6196 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
6197 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
6198 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Rewrite mutex
6199 locking. Merge bits from lowlevelmutex.S we still need.
6200 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
6201 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
6202 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Removed.
6203 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Removed.
6204 * Makefile (routines): Remove libc-lowlevelmutex.
6205 (libpthread-rountines): Remove lowlevelmutex.
6206 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Adjust
6207 for new mutex implementation.
6208 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
6209 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6210 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6211 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
6212 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
6214 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
6216 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
6217 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
6218 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise
6219 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
6220 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6221 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6222 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
6223 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
6225 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
6227 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
6228 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
6229 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
6231 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
6232 * sysdeps/pthread/pthread_cond_signal.c: Don't use requeue.
6234 2003-09-20 Ulrich Drepper <drepper@redhat.com>
6236 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't match memory
6237 in parameters of asm with output parameters.
6239 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Change
6240 type of DECR parameter to int.
6241 * pthreadP.h: Adjust prototype of __pthread_mutex_unlock_usercnt.
6243 2003-09-18 Jakub Jelinek <jakub@redhat.com>
6245 * tst-attr3.c (tf, do_test): Print stack start/end/size and
6246 guardsize for each thread.
6248 2003-09-17 Jakub Jelinek <jakub@redhat.com>
6250 * sysdeps/pthread/pthread.h (pthread_getattr_np): Clarify usage.
6251 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
6252 (pthread_attr_setaffinity_np): Handle cpuset == NULL.
6254 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
6255 (pthread_attr_getaffinity_np): Don't segfault if iattr->cpuset is
6257 * pthread_getattr_np.c: Set cpuset using pthread_getaffinity_np.
6258 * pthreadP.h (pthread_getaffinity_np): Add hidden_proto.
6259 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
6260 (pthread_getaffinity_np): Add hidden_def.
6262 * Makefile (tests): Add tst-attr3.
6263 * tst-attr3.c: New test.
6265 * sysdeps/i386/Makefile (CFLAGS-tst-align.c): Remove.
6267 2003-09-15 Jakub Jelinek <jakub@redhat.com>
6269 * sysdeps/i386/Makefile (CFLAGS-pthread_create.c,
6270 CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
6272 2003-09-17 Jakub Jelinek <jakub@redhat.com>
6274 * Makefile (CFLAGS-tst-align.c): Add $(stack-align-test-flags).
6275 * tst-align.c: Include tst-stack-align.h.
6276 (tf, do_test): Use TEST_STACK_ALIGN macro.
6278 2003-09-17 Ulrich Drepper <drepper@redhat.com>
6280 * pthread_attr_init.c (__pthread_attr_init_2_0): Remove unused
6283 2003-09-16 Ulrich Drepper <drepper@redhat.com>
6285 * pthread_getattr_np.c (pthread_getattr_np): Correctly fill in the
6286 stack-related values for the initial thread.
6288 2003-09-15 Jakub Jelinek <jakub@redhat.com>
6290 * Makefile (CFLAGS-pthread_once.c): Add $(uses-callbacks).
6292 2003-09-11 Ulrich Drepper <drepper@redhat.com>
6294 * pthread_mutex_lock.c: Minor code rearrangements.
6296 2003-09-05 Roland McGrath <roland@redhat.com>
6298 * pthread_create.c (__pthread_pthread_sizeof_descr): Removed.
6299 Instead, include ../nptl_db/db_info.c to do its magic.
6300 * pthread_key_create.c (__pthread_pthread_keys_max): Removed.
6301 (__pthread_pthread_key_2ndlevel_size): Likewise.
6302 * sysdeps/alpha/tls.h (DB_THREAD_SELF): New macro.
6303 * sysdeps/i386/tls.h (DB_THREAD_SELF): New macro.
6304 * sysdeps/ia64/tls.h (DB_THREAD_SELF): New macro.
6305 * sysdeps/powerpc/tls.h (DB_THREAD_SELF): New macro.
6306 * sysdeps/s390/tls.h (DB_THREAD_SELF): New macro.
6307 * sysdeps/sh/tls.h (DB_THREAD_SELF): New macro.
6308 * sysdeps/sparc/tls.h (DB_THREAD_SELF): New macro.
6309 * sysdeps/x86_64/tls.h (DB_THREAD_SELF): New macro.
6310 * sysdeps/alpha/td_ta_map_lwp2thr.c: File removed.
6311 * sysdeps/generic/td_ta_map_lwp2thr.c: File removed.
6312 * sysdeps/i386/td_ta_map_lwp2thr.c: File removed.
6313 * sysdeps/ia64/td_ta_map_lwp2thr.c: File removed.
6314 * sysdeps/powerpc/td_ta_map_lwp2thr.c: File removed.
6315 * sysdeps/s390/td_ta_map_lwp2thr.c: File removed.
6316 * sysdeps/sh/td_ta_map_lwp2thr.c: File removed.
6317 * sysdeps/sparc/td_ta_map_lwp2thr.c: File removed.
6318 * sysdeps/x86_64/td_ta_map_lwp2thr.c: File removed.
6320 2003-09-08 Ulrich Drepper <drepper@redhat.com>
6322 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Change type
6323 of pthread_t to be compatible with LT.
6324 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
6325 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6326 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6327 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6328 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
6329 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6330 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
6332 2003-09-04 Ulrich Drepper <drepper@redhat.com>
6334 * sysdeps/unix/sysv/linux/i386/not-cancel.h (fcntl_not_cancel): Define.
6336 2003-09-04 Jakub Jelinek <jakub@redhat.com>
6338 * unwind-forcedunwind.c: Move to...
6339 * sysdeps/pthread/unwind-forcedunwind.c: ...here.
6340 (pthread_cancel_init): Use ARCH_CANCEL_INIT if defined.
6341 * sysdeps/pthread/jmpbuf-unwind.h: New file.
6342 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: New file.
6343 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: New file.
6344 * unwind.c: Include jmpbuf-unwind.h.
6345 (unwind_stop): Use _JMPBUF_CFA_UNWINDS macro.
6347 2003-09-02 Jakub Jelinek <jakub@redhat.com>
6349 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: New file.
6350 * sysdeps/unix/sysv/linux/ia64/Versions (libpthread): Export
6351 pthread_attr_setstack and pthread_attr_setstacksize @@GLIBC_2.3.3.
6352 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: New file.
6353 * sysdeps/unix/sysv/linux/alpha/Versions: New file.
6354 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: New file.
6355 * sysdeps/unix/sysv/linux/sparc/Versions: New file.
6356 * pthread_attr_setstack.c (__old_pthread_attr_setstack): New function.
6357 (pthread_attr_setstack): If PTHREAD_STACK_MIN != 16384, export
6358 as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.2.
6359 * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize): New
6361 (pthread_attr_setstacksize): If PTHREAD_STACK_MIN != 16384, export
6362 as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.1.
6363 * Makefile (tests): Add tst-stack2.
6364 * tst-stack2.c: New test.
6365 * tst-stack1.c: Include limits.h and sys/param.h.
6366 (do_test): Set size to MAX (4 * getpagesize (), PTHREAD_STACK_MIN).
6368 * pthread_condattr_setpshared.c: Include errno.h.
6369 (pthread_condattr_setpshared): Return EINVAL if pshared
6370 is neither PTHREAD_PROCESS_PRIVATE nor PTHREAD_PROCESS_SHARED.
6372 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Also
6373 defined symbol for entry point to avoid cancellation.
6374 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
6376 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
6378 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
6380 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h (PSEUDO):
6382 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
6384 * sysdeps/unix/sysv/linux/i386/not-cancel.h (__open_nocancel,
6385 __close_nocancel, __read_nocancel, __write_nocancel,
6386 __waitpid_nocancel): Add attribute_hidden. If not in libc.so,
6387 libpthread.so or librt.so, define to corresponding function
6388 without _nocancel suffix.
6389 * sysdeps/unix/sysv/linux/s390/not-cancel.h: New file.
6390 * sysdeps/unix/sysv/linux/powerpc/not-cancel.h: New file.
6391 * sysdeps/unix/sysv/linux/sparc/not-cancel.h: New file.
6393 * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: Fix a typo.
6395 2003-09-02 Ulrich Drepper <drepper@redhat.com>
6397 * sysdeps/unix/sysv/linux/i386/not-cancel.h: New file.
6398 * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: New file.
6400 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Make sure the code
6401 in subsections has a symbol associated with it.
6403 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Also
6404 defined symbol for entry point to avoid cancellation.
6405 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Likewise.
6407 2003-09-01 Jakub Jelinek <jakub@redhat.com>
6409 * Makefile (tests): Add tst-tls5.
6410 (module-names): Add tst-tls5mod{,a,b,c,d,e,f}.
6411 ($(objpfx)tst-tls5mod{,a,b,c,d,e,f}.so-no-z-defs): Set to yes.
6412 ($(objpfx)tst-tls5): New.
6413 ($(objpfx)tst-tls6.out): Likewise.
6414 (tests): Depend on $(objpfx)tst-tls6.out.
6415 * tst-tls3.c: Include stdint.h and pthreaddef.h.
6416 (do_test): Check pthread_self () return value alignment.
6417 * tst-tls3mod.c: Include stdint.h and pthreaddef.h.
6418 (tf): Check pthread_self () return value alignment.
6419 * tst-tls5.c: New test.
6421 * tst-tls5mod.c: New.
6422 * tst-tls5moda.c: New.
6423 * tst-tls5modb.c: New.
6424 * tst-tls5modc.c: New.
6425 * tst-tls5modd.c: New.
6426 * tst-tls5mode.c: New.
6427 * tst-tls5modf.c: New.
6428 * tst-tls6.sh: New test.
6430 * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Add
6431 ptr___pthread_cond_timedwait and ptr___pthread_cond_timedwait_2_0.
6432 * init.c (pthread_functions): Initialize them.
6433 * forward.c (pthread_cond_timedwait@GLIBC_2.0,
6434 pthread_cond_timedwait@@GLIBC_2.3.2): New forwards.
6435 * Versions (libc): Export pthread_cond_timedwait@GLIBC_2.0,
6436 pthread_cond_timedwait@@GLIBC_2.3.2.
6438 2003-09-01 Jakub Jelinek <jakub@redhat.com>
6440 * sysdeps/unix/sysv/linux/alpha/timer_create.c: New file.
6441 * sysdeps/unix/sysv/linux/alpha/timer_delete.c: New file.
6442 * sysdeps/unix/sysv/linux/alpha/timer_getoverr.c: New file.
6443 * sysdeps/unix/sysv/linux/alpha/timer_gettime.c: New file.
6444 * sysdeps/unix/sysv/linux/alpha/timer_settime.c: New file.
6445 * sysdeps/unix/sysv/linux/alpha/Versions: New file.
6447 * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
6449 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Define
6450 _POSIX_THREAD_PRIORITY_SCHEDULING.
6451 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
6453 2003-08-31 Ulrich Drepper <drepper@redhat.com>
6455 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock): Avoid
6456 nested function, use static inline function from libio.h.
6457 Code by Richard Henderson.
6459 * sysdeps/pthread/bits/libc-lock.h: Mark pthread_setcancelstate as
6462 2003-08-30 Jakub Jelinek <jakub@redhat.com>
6464 * sysdeps/unix/sysv/linux/sparc/sparc64/Versions: New file.
6465 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_create.c: New file.
6466 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_delete.c: New file.
6467 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_getoverr.c: New file.
6468 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_gettime.c: New file.
6469 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_settime.c: New file.
6470 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
6471 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
6472 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: New file.
6473 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: New file.
6474 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: New file.
6475 * sysdeps/unix/sysv/linux/sparc/pthread_once.c: New file.
6476 * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: New file.
6477 * sysdeps/unix/sysv/linux/sparc/fork.c: New file.
6478 * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
6479 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: New file.
6480 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: New file.
6481 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: New file.
6482 * sysdeps/sparc/sparc32/pthread_spin_lock.c: New file.
6483 * sysdeps/sparc/sparc32/pthread_spin_trylock.c: New file.
6484 * sysdeps/sparc/sparc32/pthreaddef.h: New file.
6485 * sysdeps/sparc/sparc64/pthread_spin_lock.c: New file.
6486 * sysdeps/sparc/sparc64/pthread_spin_trylock.c: New file.
6487 * sysdeps/sparc/sparc64/pthread_spin_unlock.c: New file.
6488 * sysdeps/sparc/sparc64/pthreaddef.h: New file.
6489 * sysdeps/sparc/tls.h: New file.
6490 * sysdeps/sparc/tcb-offsets.sym: New file.
6491 * sysdeps/sparc/Makefile: New file.
6492 * sysdeps/sparc/td_ta_map_lwp2thr.c: New file.
6493 * init.c [__sparc__] (__NR_set_tid_address): Define.
6495 2003-08-29 Jakub Jelinek <jakub@redhat.com>
6497 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock,
6498 _IO_release_lock): Define.
6500 2003-08-29 Jakub Jelinek <jakuB@redhat.com>
6502 * tst-cancel4.c (tf_sigwait, tf_sigwaitinfo, tf_sigtimedwait): Add
6503 sigemptyset before sigaddset. Reported by jreiser@BitWagon.com.
6505 2003-08-27 Ulrich Drepper <drepper@redhat.com>
6507 * sysdeps/pthread/pthread.h (pthread_exit): Remove __THROW.
6508 (__pthread_cleanup_class): Add missing return types of member
6511 2003-08-26 Steven Munroe <sjmunroe@us.ibm.com>
6513 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
6514 (lll_mutex_unlock_force): Add memory barrier between store and futex
6517 2003-08-25 Ulrich Drepper <drepper@redhat.com>
6519 * tst-cancel4.c (do_test): Also unlink tempfname and remove
6520 tempmsg in first loop.
6522 2003-08-18 Ulrich Drepper <drepper@redhat.com>
6524 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
6525 _POSIX_THREAD_PRIORITY_SCHEDULING.
6526 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
6528 2003-08-07 Jakub Jelinek <jakub@redhat.com>
6530 * sysdeps/pthread/bits/libc-lock.h [_LIBC && SHARED]
6531 (__rtld_lock_default_lock_recursive,
6532 __rtld_lock_default_unlock_recursive): Define.
6533 [_LIBC && SHARED] (__rtld_lock_lock_recursive,
6534 __rtld_lock_unlock_recursive): Define using
6535 GL(_dl_rtld_*lock_recursive).
6536 * init.c (__pthread_initialize_minimal_internal): Initialize
6537 _dl_rtld_lock_recursive and _dl_rtld_unlock_recursive.
6538 Lock GL(_dl_load_lock) the same number of times as
6539 GL(_dl_load_lock) using non-mt implementation was nested.
6541 * pthreadP.h (__pthread_cleanup_upto): Add hidden_proto.
6542 * pt-longjmp.c (__pthread_cleanup_upto): Add hidden_def.
6544 2003-08-06 Jakub Jelinek <jakub@redhat.com>
6546 * tst-cancel17.c (do_test): Make len2 maximum of page size and
6549 2003-08-07 Jakub Jelinek <jakub@redhat.com>
6551 * pthread_create.c (__pthread_create_2_0): Clear new_attr.cpuset.
6553 2003-08-03 Jakub Jelinek <jakub@redhat.com>
6555 * sysdeps/pthread/createthread.c (do_clone): Move error handling
6556 to first syscall error check. Move syscall error check for tkill
6557 into __ASSUME_CLONE_STOPPED #ifdef.
6559 2003-08-02 Ulrich Drepper <drepper@redhat.com>
6561 * sysdeps/pthread/createthread.c (do_clone): If __ASSUME_CLONE_STOPPED
6562 is not defined, do explicit synchronization.
6563 (create_thread): Do not lock pd->lock here. If __ASSUME_CLONE_STOPPED
6564 is not defined also unlock pd->lock for non-debugging case in case
6566 * pthread_create.c (start_thread): Always get and release pd->lock
6567 if __ASSUME_CLONE_STOPPED is not defined.
6568 (start_thread_debug): Removed. Adjust users.
6569 * allocatestack.c (allocate_stack): Always initialize lock if
6570 __ASSUME_CLONE_STOPPED is not defined.
6571 * Makefile (tests): Add tst-sched1.
6572 * tst-sched1.c: New file.
6574 * sysdeps/pthread/createthread.c (do_clone): Only use
6575 sched_setschduler and pass correct parameters.
6577 2003-07-31 Jakub Jelinek <jakub@redhat.com>
6579 * sysdeps/pthread/pthread.h (pthread_attr_setstackaddr,
6580 pthread_attr_setstacksize): Change PTHREAD_STACK_SIZE to
6581 PTHREAD_STACK_MIN in comments.
6583 2003-07-31 Jakub Jelinek <jakub@redhat.com>
6585 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
6586 Shut up warnings if INTERNAL_SYSCALL_ERROR_P does not use its first
6588 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Likewise.
6589 * pthread_condattr_setclock.c (pthread_condattr_setclock): Likewise.
6590 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Include pthreaddef.h.
6591 (__pthread_cleanup_upto): Fix prototype.
6592 (_longjmp_unwind): Adjust caller.
6593 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_timedlock):
6594 Change second argument to const struct pointer.
6595 * tst-sem8.c (main): Remove unused s2 and s3 variables.
6596 * tst-sem9.c (main): Likewise.
6597 * unwind.c: Include string.h for strlen prototype.
6599 2003-07-31 Ulrich Drepper <drepper@redhat.com>
6601 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6602 (__pthread_cond_timedwait): Don't use cmov unless HAVE_CMOV is defined.
6603 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S:
6605 Patch by Nicholas Miell <nmiell@attbi.com>.
6607 2003-07-30 Jakub Jelinek <jakub@redhat.com>
6609 * init.c (__pthread_initialize_minimal_internal): Initialize
6610 GL(dl_init_static_tls).
6611 * pthreadP.h (__pthread_init_static_tls): New prototype.
6612 * allocatestack.c (init_one_static_tls, __pthread_init_static_tls):
6614 * Makefile (tests): Add tst-tls4.
6615 (modules-names): Add tst-tls4moda and tst-tls4modb.
6616 ($(objpfx)tst-tls4): Link against libdl and libpthread.
6617 ($(objpfx)tst-tls4.out): Depend on tst-tls4moda.so and
6619 * tst-tls4.c: New file.
6620 * tst-tls4moda.c: New file.
6621 * tst-tls4modb.c: New file.
6623 2003-06-19 Daniel Jacobowitz <drow@mvista.com>
6625 * sysdeps/pthread/timer_create.c (timer_create): Call timer_delref
6626 before __timer_dealloc.
6627 * sysdeps/pthread/timer_routines.c (__timer_thread_find_matching):
6628 Don't call list_unlink.
6630 2003-07-29 Roland McGrath <roland@redhat.com>
6632 * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
6634 2003-07-25 Jakub Jelinek <jakub@redhat.com>
6636 * tst-cancel17.c (do_test): Check if aio_cancel failed.
6637 Don't reuse struct aiocb A if it failed.
6638 Write fpathconf (fds[1], _PC_PIPE_BUF) + 2 bytes using aio_write,
6639 not just one byte, as that does not block.
6641 2003-07-22 Jakub Jelinek <jakub@redhat.com>
6643 * sysdeps/pthread/unwind-resume.c: New file.
6644 * sysdeps/pthread/Makefile (routines, shared-only-routines): Add
6645 unwind-resume in csu subdir.
6646 (CFLAGS-unwind-resume.c, CFLAGS-rt-unwind-resume.c): Compile with
6648 (librt-sysdep_routines, librt-shared-only-routines): Add
6650 * sysdeps/pthread/rt-unwind-resume.c: New file.
6651 * unwind-forcedunwind.c: New file.
6652 * Makefile (libpthread-routines): Add unwind-forcedunwind.
6653 (libpthread-shared-only-routines): Likewise.
6654 (CFLAGS-unwind-forcedunwind.c): Compile with exceptions.
6655 * pthreadP.h (pthread_cancel_init): New prototype.
6656 * pthread_cancel.c (pthread_cancel): Call pthread_cancel_init.
6658 * sysdeps/pthread/createthread.c (do_thread, create_thread): Make
6659 attr argument const struct pthread_attr *.
6661 * res.c (__res_state): Return __resp.
6662 * descr.h: Include resolv.h.
6663 (struct pthread): Add res field.
6664 * pthread_create.c: Include resolv.h.
6665 (start_thread): Initialize __resp.
6666 * Makefile (tests): Add tst-_res1.
6667 (module-names): Add tst-_res1mod1, tst-_res1mod2.
6668 ($(objpfx)tst-_res1mod2.so): Depend on $(objpfx)tst-_res1mod1.so.
6669 ($(objpfx)tst-_res1): Depend on $(objpfx)tst-_res1mod2.so and
6671 * tst-_res1.c: New file.
6672 * tst-_res1mod1.c: New file.
6673 * tst-_res1mod2.c: New file.
6675 2003-07-21 Ulrich Drepper <drepper@redhat.com>
6677 * sysdeps/pthread/createthread.c: Don't define CLONE_STOPPED.
6679 * Makefile: Define various *-no-z-defs variables for test DSOs
6680 which has undefined symbols.
6682 2003-07-21 Steven Munroe <sjmunroe@us.ibm.com>
6684 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
6685 Retry if the stwcx fails to store once_control.
6687 2003-07-20 Ulrich Drepper <drepper@redhat.com>
6689 * Makefile (libpthread-routines): Add pthread_attr_getaffinity and
6690 pthread_attr_setaffinity.
6691 * Versions [libpthread] (GLIBC_2.3.3): Likewise.
6692 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: New file.
6693 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: New file.
6694 * pthread_attr_destroy.c: Free cpuset element if allocated.
6695 * pthread_create.c: Pass iattr as additional parameter to
6697 * sysdeps/pthread/createthread.c: If attribute is provided and
6698 a new thread is created with affinity set or scheduling parameters,
6699 start thread with CLONE_STOPPED.
6700 * sysdeps/pthread/pthread.h: Declare pthread_attr_getaffinity and
6701 pthread_attr_setaffinity.
6702 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
6705 2003-07-15 Ulrich Drepper <drepper@redhat.com>
6707 * tst-tcancel-wrappers.sh: lseek and llseek are not cancelation points.
6709 2003-07-14 Ulrich Drepper <drepper@redhat.com>
6711 * sysdeps/pthread/configure.in: Require CFI directives also for
6714 2003-07-15 Jakub Jelinek <jakub@redhat.com>
6716 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
6719 2003-07-12 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6721 * sysdeps/sh/tcb-offsets.sym: Add RESULT, TID, CANCELHANDLING and
6723 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use more
6724 registers as variables. Call __pthread_mutex_unlock_usercnt.
6725 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
6726 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Store TID
6727 not self pointer in __writer. Compare with TID to determine
6729 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
6730 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
6732 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
6734 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add cancellation support.
6735 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
6736 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Define all the nice
6737 macros also when compiling librt.
6739 2003-07-11 Jakub Jelinek <jakub@redhat.com>
6741 * Makefile (CFLAGS-pthread_once.c): Add -fexceptions
6742 -fasynchronous-unwind-tables.
6743 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
6744 (PSEUDO): Add cfi directives.
6745 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO):
6747 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
6750 2003-07-08 Jakub Jelinek <jakub@redhat.com>
6752 * pthreadP.h (__pthread_unwind_next, __pthread_register_cancel,
6753 __pthread_unregister_cancel): Add prototypes and hidden_proto.
6754 * unwind.c (__pthread_unwind_next): Add hidden_def.
6755 * cleanup.c (__pthread_register_cancel, __pthread_unregister_cancel):
6757 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
6758 Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
6759 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
6761 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
6762 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
6764 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once): Use
6765 HIDDEN_JUMPTARGET to call __pthread_register_cancel,
6766 __pthread_unregister_cancel and __pthread_unwind_next.
6768 2003-07-04 Jakub Jelinek <jakub@redhat.com>
6770 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Use
6771 different symbol for the cancellation syscall wrapper and
6772 non-cancellation syscall wrapper.
6773 (PSEUDO_END): Define.
6775 2003-07-05 Richard Henderson <rth@redhat.com>
6777 * sysdeps/alpha/elf/pt-initfini.c: Avoid .ent/.end.
6778 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_wait,
6779 lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
6780 return actual return value from the syscall, not 0.
6782 2003-07-07 Ulrich Drepper <drepper@redhat.com>
6784 * descr.h (struct pthread): Add pid field.
6785 * allocatestack.c (allocate_stack): Initialize pid field in descriptor.
6786 (__reclaim_stacks): Likewise.
6787 * init.c (sigcancel_handler): If __ASSUME_CORRECT_SI_PID is defined
6788 also check for PID of the signal source.
6789 (__pthread_initialize_minimal_internal): Also initialize pid field
6790 of initial thread's descriptor.
6791 * pthread_cancel.c: Use tgkill instead of tkill if possible.
6792 * sysdeps/unix/sysv/linux/fork.c: Likewise.
6793 * sysdeps/unix/sysv/linux/pt-raise.c: Likewise.
6794 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
6795 * sysdeps/unix/sysv/linux/raise.c: Likewise.
6797 2003-07-05 Ulrich Drepper <drepper@redhat.com>
6799 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_push): Renamed.
6800 Fix use of parameter.
6801 (__libc_cleanup_pop): Likewise.
6803 2003-07-04 Ulrich Drepper <drepper@redhat.com>
6805 * init.c (sigcancel_handler): Change parameters to match handler
6806 for SA_SIGACTION. Check signal number and code to recognize
6807 invalid invocations.
6809 2003-07-03 Roland McGrath <roland@redhat.com>
6811 * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr):
6812 Apply sizeof (struct pthread) bias to r13 value.
6814 2003-07-03 Ulrich Drepper <drepper@redhat.com>
6816 * sysdeps/pthread/configure.in: Require CFI directives.
6818 * sysdeps/pthread/librt-cancellation.c (__pthread_unwind): Remove
6820 * pthreadP.h (__pthread_unwind): Add hidden_proto if used in
6821 libpthread compilation.
6822 * unwind.c (__pthread_unwind): Add hidden_def.
6823 * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_unwind.
6825 2003-07-01 Ulrich Drepper <drepper@redhat.com>
6827 * libc-cancellation.c (__libc_cleanup_routine): Define.
6828 * sysdeps/pthread/bits/libc-lock.h (__pthread_cleanup_push): Define.
6829 (__pthread_cleanup_pop): Define.
6831 2003-07-01 Richard Henderson <rth@redhat.com>
6833 * sysdeps/alpha/elf/pt-initfini.c: New file.
6834 * sysdeps/alpha/pthread_spin_lock.S: New file.
6835 * sysdeps/alpha/pthread_spin_trylock.S: New file.
6836 * sysdeps/alpha/pthreaddef.h: New file.
6837 * sysdeps/alpha/td_ta_map_lwp2thr.c: New file.
6838 * sysdeps/alpha/tls.h: New file.
6839 * sysdeps/unix/sysv/linux/alpha/Makefile: New file.
6840 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: New file.
6841 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: New file.
6842 * sysdeps/unix/sysv/linux/alpha/createthread.c: New file.
6843 * sysdeps/unix/sysv/linux/alpha/fork.c: New file.
6844 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: New file.
6845 * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: New file.
6846 * sysdeps/unix/sysv/linux/alpha/pthread_once.c: New file.
6847 * sysdeps/unix/sysv/linux/alpha/sem_post.c: New file.
6848 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
6850 2003-07-01 Ulrich Drepper <drepper@redhat.com>
6852 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Add correct
6853 cleanup support and unwind info.
6855 2003-06-30 Ulrich Drepper <drepper@redhat.com>
6857 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
6858 Use correct cleanup handler registration. Add unwind info.
6859 * sysdeps/unix/sysv/linux/unwindbuf.sym: New file.
6860 * sysdeps/unix/sysv/linux/Makefile: Add rule to build unwindbuf.h.
6861 * tst-once3.c: Add cleanup handler and check it is called.
6862 * tst-once4.c: Likewise.
6863 * tst-oncex3.c: New file.
6864 * tst-oncex4.c: New file.
6865 * Makefile: Add rules to build and run tst-oncex3 and tst-oncex4.
6867 2003-06-29 Ulrich Drepper <drepper@redhat.com>
6869 * sysdeps/pthread/configure.in: Check for C cleanup handling in gcc.
6871 2003-06-27 Ulrich Drepper <drepper@redhat.com>
6873 * tst-cancel4.c (tf_msgrcv): Use IPC_PRIVATE in msgget call.
6874 (tf_msgsnd): Likewise.
6876 * tst-cancel4.c (tf_msgrcv): Strengthen test against valid
6877 premature returns a bit more.
6879 2003-06-26 Ulrich Drepper <drepper@redhat.com>
6881 * sysdeps/pthread/librt-cancellation.c: Move __pthread_unwind
6882 definition to the front.
6884 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rename
6885 the cleanup functions to make the names unique. Fix dwarf opcode
6887 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Rename cleanup
6888 functions to make the names unique. Fix CFA offset for two blocks.
6890 2003-06-25 Ulrich Drepper <drepper@redhat.com>
6892 * sysdeps/pthread/pthread.h (class __pthread_cleanup_class): Add
6893 missing closing braces.
6894 Patch by Christophe Saout <christophe@saout.de>.
6896 2003-06-24 Roland McGrath <roland@redhat.com>
6898 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Typo fix.
6900 2003-06-24 Ulrich Drepper <drepper@redhat.com>
6902 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: New file.
6903 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: New file.
6905 * pthreadP.h: Declare __find_thread_by_id.
6906 * allocatestack.c [HP_TIMING_AVAIL]: Define __find_thread_by_id.
6907 * pthread_clock_gettime.c: Allow using other thread's clock.
6908 * pthread_clock_settime.c: Likewise.
6909 * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
6910 * Makefile: Add rules to build and run tst-clock2.
6911 * tst-clock2.c: New file.
6913 2003-06-23 Ulrich Drepper <drepper@redhat.com>
6915 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rewrite
6916 to use exception-based cleanup handler.
6917 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6919 * tst-cond8.c (ch): Announce that we are done.
6921 * pthreadP.h (__pthread_mutex_cond_lock): Mark with internal_function.
6923 * tst-cancel17.c (tf): Retry aio_suspend in case of EINTR.
6924 Also test aio_suspend with timeout value.
6926 2003-06-22 Ulrich Drepper <drepper@redhat.com>
6928 * pthreadP.h: Mark __pthread_mutex_unlock_usercnt also hidden.
6929 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Add
6932 * pthreadP.h (__pthread_mutex_init_internal): Mark hidden.
6933 (__pthread_mutex_lock_internal): Likewise.
6934 (__pthread_mutex_unlock_internal): Likewise.
6935 (__pthread_mutex_unlock_usercnt): Declare.
6936 * pthread_mutex_destroy.c: Always fail if used in any way.
6937 * pthread_mutex_init.c: Update comment.
6938 * pthread_mutex_lock.c: If NO_INCR is not defined adjust __nusers.
6939 * pthread_mutex_timedlock.c: Adjust __nusers.
6940 * pthread_mutex_trylock.c: Adjust __nusers.
6941 * pthread_mutex_unlock.c: Old code is in __pthread_mutex_unlock_usercnt
6942 and public interfaces are wrapper with pass additional parameter.
6943 __pthread_mutex_unlock_usercnt does not adjust __nusers if second
6945 * tst-mutex8.c: New file.
6946 * Makefile (tests): Add tst-mutex8.
6947 * sysdeps/pthread/pthread_cond_timedwait.c: Call
6948 __pthread_mutex_unlock_usercnt.
6949 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
6950 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6951 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6952 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6953 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6954 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Define NO_INCR.
6955 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
6957 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6958 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6959 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6960 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6961 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6963 * pthread_mutex_lock.c: Don't store THREAD_ID in __owner, use TID.
6964 * pthread_mutex_timedlock.c: Likewise.
6965 * pthread_mutex_trylock.c: Adjust __nusers.
6966 * pthread_mutex_unlock.c: Compare with TID not THREAD_ID.
6967 * tst-mutex9.c: New file.
6968 * Makefile (tests): Add tst-mutex9.
6969 * sysdeps/i386/tls.h: Remove THREAD_ID definition.
6970 * sysdeps/ia64/tls.h: Likewise.
6971 * sysdeps/powerpc/tls.h: Likewise.
6972 * sysdeps/s390/tls.h: Likewise.
6973 * sysdeps/sh/tls.h: Likewise.
6974 * sysdeps/x86_64/tls.h: Likewise.
6975 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
6976 Change type of __owner.
6977 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6978 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6979 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6980 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6981 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6983 2003-06-19 Jakub Jelinek <jakub@redhat.com>
6985 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Move to...
6986 * sysdeps/unix/sysv/linux/sem_post.c: ...here.
6988 * sysdeps/unix/sysv/linux/sem_post.c: Move to...
6989 * sysdeps/unix/sysv/linux/powerpc/sem_post.c: ... here. Pass nr + 1
6990 instead of nr to lll_futex_wake. Only set errno and return -1
6993 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_wait,
6994 lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
6995 return actual return value from the syscall, not 0.
6997 2003-06-18 Ulrich Drepper <drepper@redhat.com>
6999 * tst-cancel4.c (tf_msgsnd): Don't always use 100 as the type,
7000 find a random value.
7001 (tf_msgrcv): Likewise. Also don't report msgrcv returns if
7004 * sysdeps/unix/sysv/linux/timer_settime.c: Add prototype for
7005 compat_timer_settime.
7006 * sysdeps/unix/sysv/linux/timer_gettime.c: Add prototype for
7007 compat_timer_gettime.
7008 * sysdeps/unix/sysv/linux/timer_getoverr.c: Add prototype for
7009 compat_timer_getoverrun.
7010 * sysdeps/unix/sysv/linux/timer_delete.c: Add prototype for
7011 compat_timer_delete.
7013 * pthread_mutex_destroy.c (__pthread_mutex_destroy): For
7014 error-checking mutex detect busy mutexes.
7016 2003-06-17 Ulrich Drepper <drepper@redhat.com>
7018 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_mutex_lock):
7019 Add ax to clobber list.
7020 (lll_mutex_cond_lock): Likewise.
7021 (lll_mutex_unlock): Likewise.
7022 (lll_lock): Likewise.
7023 (lll_unlock): Likewise.
7025 * Makefile: Add rules to build and run tst-cancel18 and tst-cancelx18.
7026 * tst-cancel18.c: New file.
7027 * tst-cancelx18.c: New file.
7029 * tst-cancel4.c: Test connect, creat, msgrcv, msgsnd, sendmsg, sendto,
7032 * Makefile: Add rules to build and run tst-cancel17 and tst-cancel17x.
7033 * tst-cancel17.c: New file.
7034 * tst-cancelx17.c: New file.
7036 * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
7037 * sysdeps/unix/sysv/linux/sigwait.c: New file.
7038 * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
7040 * tst-cancel4.c: Test open, close, pread, pwrite, fsync, and msync.
7042 2003-06-16 Jakub Jelinek <jakub@redhat.com>
7044 * sysdeps/pthread/createthread.c (create_thread): Set
7045 header.multiple_threads unconditionally.
7046 * allocatestack.c (allocate_stack): Likewise.
7047 * descr.h (struct pthread): Add header.multiple_threads
7049 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (CENABLE, CDISABLE):
7050 Define for librt. #error if neither libpthread, libc nor librt.
7051 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (CENABLE, CDISABLE):
7053 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (CENABLE,
7054 CDISABLE): Likewise.
7055 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (CENABLE,
7056 CDISABLE): Likewise.
7057 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (CENABLE,
7058 CDISABLE): Likewise.
7059 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (CENABLE,
7060 CDISABLE): Likewise. Access header.multiple_threads outside of
7061 libc and libpthread.
7062 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (CENABLE, CDISABLE):
7064 * sysdeps/x86_64/tls.h (tcbhead_t): Add multiple_threads.
7065 * sysdeps/x86_64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define.
7067 2003-06-17 Ulrich Drepper <drepper@redhat.com>
7069 * tst-cancel4.c: Add tests for the socket and signal functions, pause.
7070 Also test early cancellation before the thread reaches the cancellation
7073 * Makefile: Compile forward.c with exceptions.
7075 * sysdeps/unix/sysv/linux/sleep.c: New file.
7077 2003-06-16 Ulrich Drepper <drepper@redhat.com>
7079 * Makefile: Add CFLAGS definition to compile function wrappers
7080 duplicated from libc with exceptions.
7081 * tst-cancel4.c: Also check cancellation handlers.
7083 * Makefile: Add rules to build and run tst-cancel16 and
7084 tst-cancelx16. Add missing CFLAGS definitions.
7085 * tst-cancel16.c: New file.
7086 * tst-cancelx16.c: New file.
7088 2003-06-15 Ulrich Drepper <drepper@redhat.com>
7090 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
7091 (DL_SYSINFO_IMPLEMENTATION): Use CFI opcodes.
7092 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
7093 (DL_SYSINFO_IMPLEMENTATION): Likewise.
7095 * pthreadP.h (LIBC_CANCEL_ASYNC): Also define for librt.
7096 (LIBC_CANCEL_RESET): Likewise.
7097 Declare __librt_enable_asynccancel and __librt_disable_asynccancel.
7098 * sysdeps/pthread/Makefile (librt-sysdep_routines): Add
7100 (CFLAGS-libcrt-cancellation.c): Define.
7101 * sysdeps/pthread/librt-cancellation.c: New file.
7102 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define all the nice
7103 macros also when compiling librt.
7104 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
7105 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
7106 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
7107 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
7108 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
7109 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
7110 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
7112 * sysdeps/unix/sysv/linux/timer_create.c: Add prototype for
7113 compat_timer_create.
7115 2003-06-14 Ulrich Drepper <drepper@redhat.com>
7117 * sysdeps/pthread/posix-timer.h (timespec_compare): Always inline.
7119 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
7121 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
7122 Add libc_hidden_def.
7124 2003-06-13 Roland McGrath <roland@redhat.com>
7126 * sysdeps/x86_64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Pass FS
7127 constant from <sys/reg.h> to ps_get_thread_area, not register contents.
7129 2003-06-11 Ulrich Drepper <drepper@redhat.com>
7131 * allocatestack.c (queue_stack): Always inline.
7132 * ptreadhP.h (__do_cancel): Likewise.
7134 2003-06-10 Jakub Jelinek <jakub@redhat.com>
7136 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait): Fix
7139 2003-06-10 Ulrich Drepper <drepper@redhat.com>
7141 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
7142 (__pthread_cond_signal): Remove incorrect second addition for
7145 2003-06-09 Ulrich Drepper <drepper@redhat.com>
7147 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
7148 (__pthread_cond_signal): Use correct futex pointer in
7149 __lll_mutex_lock_wait call.
7151 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
7152 (__pthread_cond_signal): Some more tweaks to handle cond_lock!=0.
7154 2003-06-08 Ulrich Drepper <drepper@redhat.com>
7156 * sysdeps/unix/sysv/linux/s390/sem_wait.c (__new_sem_wait): Make
7158 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
7161 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Remove
7162 hand-written CFI generation code. Since ENTRY/END also initiated
7163 CFI frames this caused two CFI sets to be generated.
7165 2003-06-07 Ulrich Drepper <drepper@redhat.com>
7167 * cleanup_routine.c: New file.
7168 * Versions (libpthread) [GLIBC_2.3.3]: Add __pthread_cleanup_routine.
7169 * sysdeps/pthread/pthread.h: Add support for fully exception-based
7171 * Makefile (libpthread-routines): Add cleanup_routine.
7172 Add more CFLAGS variables to compile with exceptions. Add comments
7173 why which file needs unwind tables.
7174 (tests) [have-forced-unwind==yes]: Add tst-cancelx* and tst-cleanupx*
7176 * tst-cancelx1.c: New file.
7177 * tst-cancelx2.c: New file.
7178 * tst-cancelx3.c: New file.
7179 * tst-cancelx4.c: New file.
7180 * tst-cancelx5.c: New file.
7181 * tst-cancelx6.c: New file.
7182 * tst-cancelx7.c: New file.
7183 * tst-cancelx8.c: New file.
7184 * tst-cancelx9.c: New file.
7185 * tst-cancelx10.c: New file.
7186 * tst-cancelx11.c: New file.
7187 * tst-cancelx12.c: New file.
7188 * tst-cancelx13.c: New file.
7189 * tst-cancelx14.c: New file.
7190 * tst-cancelx15.c: New file.
7191 * tst-cleanupx0.c: New file.
7192 * tst-cleanupx0.expect: New file.
7193 * tst-cleanupx1.c: New file.
7194 * tst-cleanupx2.c: New file.
7195 * tst-cleanupx3.c: New file.
7197 * tst-cleanup0.c: Make standard compliant.
7198 * tst-cleanup1.c: Likewise.
7200 * sysdeps/unix/sysv/linux/sem_timedwait.c: Add cancellation support.
7201 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
7202 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
7203 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
7204 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
7205 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
7206 * sysdeps/i386/tcb-offsets.sym: Add RESULT, CANCELHANDLING, and
7208 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
7209 * tst-cancel12.c: New file.
7210 * tst-cancel13.c: New file.
7211 * tst-cancel14.c: New file.
7212 * tst-cancel15.c: New file.
7213 * Makefile (tests): Add tst-cancel12, tst-cancel13, tst-cancel14,
7216 * tst-cancel1.c: Add some comments.
7218 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Compute relative
7221 2003-06-06 Ulrich Drepper <drepper@redhat.com>
7223 * Makefile (CFLAGS-pthread_cancel.c): Define.
7225 2003-06-05 Ulrich Drepper <drepper@redhat.com>
7227 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_rwlock_t):
7228 Change type of __writer element to int.
7229 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7230 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7231 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7232 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7233 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
7234 * sysdeps/i386/tcb-offsets.sym: Replace SELF entry with TID entry.
7235 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
7236 * pthread_rwlock_trywrlock.c: Store TID not self pointer in __writer.
7237 Compare with TID to determine deadlocks.
7238 * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
7239 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
7240 * sysdeps/pthread/pthread_rwlock_timedwrlock.: Likewise.
7241 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
7242 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
7243 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
7245 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
7247 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
7248 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
7249 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
7251 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
7253 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
7254 * Makefile (tests): Add tst-rwlock12.
7255 * tst-rwlock12.c: New file.
7257 2003-06-05 Jakub Jelinek <jakub@redhat.com>
7259 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait,
7260 __lll_timedlock_wait, lll_unlock_wake_cb, __lll_timedwait_tid):
7261 Remove bogus hidden_proto.
7262 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
7264 * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_lock,
7265 lll_unlock_wake_cb, ___lll_timedwait_tid): Likewise.
7266 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (___lll_mutex_lock,
7267 ___lll_mutex_timedlock): Likewise.
7269 2003-06-04 Ulrich Drepper <drepper@redhat.com>
7271 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
7272 (__pthread_cond_signal): Add some code to eventually handle
7275 2003-06-01 Ulrich Drepper <drepper@redhat.com>
7277 * Makefile (tests): Add tst-exec4.
7278 (tst-exec4-ARGS): Define.
7279 * tst-exec4.c: New file.
7281 2003-05-31 Ulrich Drepper <drepper@redhat.com>
7283 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
7284 Also fail if tv_nsec < 0.
7285 (__lll_timedwait_tid): Likewise.
7286 * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
7287 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_timedwait_tid):
7289 * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_timedwait_tid):
7291 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (__lll_mutex_timedlock):
7293 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
7295 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_timedwait_tid):
7297 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_timedwait_tid):
7300 * Makefile (tests): Add tst-sem8 and tst-sem9.
7301 * tst-sem8.c: New file.
7302 * tst-sem9.c: New file.
7303 * sem_open.c: Fix creation of in_use record if the file exists but
7306 * posix-timer.h: Remove old, unused timer_id2ptr and timer_ptr2id
7309 * sysdeps/pthread/timer_create.c (timer_create): In case
7310 evp==NULL, assign timer ID to sival_ptr.
7312 * descr.h (struct pthread_unwind_buf): Change type of prev element to
7313 struct pthread_unwind_buf *.
7314 (struct pthread): Likewise for cleanup_jmp_buf element.
7316 * cleanup.c (__pthread_register_cancel): Add cast to avoid warning.
7317 * cleanup_defer.c (__pthread_register_cancel_defer): Likewise.
7318 * unwind.c (__pthread_unwind_next): Likewise.
7320 2003-05-30 Ulrich Drepper <drepper@redhat.com>
7322 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
7323 (lll_futex_timed_wait): Use int for futex value parameter.
7324 (lll_futex_wake): Likewise.
7325 (lll_futex_requeue): Likewise.
7327 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
7328 Replace one memory operation with one register operation.
7330 * tst-join4.c (do_test): Fix error message.
7332 * tst-rwlock6.c (do_test): Use correct format specifier.
7334 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
7335 (__lll_mutex_lock_wait): Replace one memory operation with one
7337 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S
7338 (__lll_mutex_lock_wait): Likewise.
7340 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
7341 (__lll_mutex_cond_lock): Add one to value parameter of
7342 __lll_lock_wait to reflect reality in the futex syscall.
7343 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
7344 (lll_mutex_cond_lock): Likewise.
7346 2003-05-30 Jakub Jelinek <jakub@redhat.com>
7348 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_cond_lock):
7350 (lll_mutex_cond_lock): Define.
7352 2003-05-29 Ulrich Drepper <drepper@redhat.com>
7354 * Makefile (tests): Add tst-signal6.
7355 * tst-signal6.c: New file.
7357 * sysdeps/unix/sysv/linux/s390/lowlevellock.h
7358 (__lll_mutex_unlock_force): New function
7359 (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
7361 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
7362 (__lll_mutex_unlock_force): New function.
7363 (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
7365 * tst-rwlock7.c (do_test): Use correct format specifier.
7367 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue):
7368 Find break parameter in correct asm argument.
7370 2003-05-27 Jakub Jelinek <jakub@redhat.com>
7372 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_clobbers):
7374 (lll_futex_requeue): Fix __o3 constraint, return negative errno if
7376 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
7378 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_REQUEUE,
7379 lll_futex_requeue, lll_mutex_unlock_force): Define.
7381 2003-05-30 Jakub Jelinek <jakub@redhat.com>
7383 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
7384 (pthread_cond_t): Add __mutex.
7385 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_REQUEUE,
7386 lll_futex_requeue, lll_mutex_unlock_force): Define.
7388 2003-05-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
7390 * sysdeps/sh/tcb-offsets.sym: Define MUTEX_FUTEX.
7391 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
7393 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (SYSCALL_WITH_INST_PAD):
7395 (lll_futex_wait, lll_futex_wake): Define.
7396 * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: New file.
7397 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Try using
7398 FUTEX_REQUEUE instead of FUTEX_WAIT.
7399 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
7400 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Remember
7401 mutex which was used in condvar structure. Call
7402 __pthread_mutex_cond_lock instead of __pthread_mutex_lock_internal.
7403 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
7405 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Don't
7406 include tcb-offsets.h. Read wakeup value in locked region.
7407 Use the value of gbr register as THREAD_ID.
7408 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7409 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
7410 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
7412 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Remove futex related
7415 2003-05-28 Ulrich Drepper <drepper@redhat.com>
7417 * sysdeps/pthread/pthread_cond_broadcast.c
7418 (__pthread_cond_broadcast): Fix typo: MAX_INT -> INT_MAX.
7420 2003-05-26 Ulrich Drepper <drepper@redhat.com>
7422 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Fix
7423 typo in register name.
7424 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use parameters
7425 correctly. Actually use requeue. Little optimization.
7426 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Store
7427 mutex address early. Handle cancellation state as 32-bit value.
7428 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7429 Remove unnecessary label.
7431 2003-05-25 Ulrich Drepper <drepper@redhat.com>
7433 * sysdeps/pthread/pthread_cond_broadcast.c: Try using FUTEX_REQUEUE
7434 instead of FUTEX_WAIT.
7435 * sysdeps/pthread/pthread_cond_signal.c: Likewise.
7436 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
7437 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
7438 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
7439 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
7440 * sysdeps/pthread/pthread_cond_timedwait.c: Remember mutex which was
7441 used in condvar structure. Call __pthread_mutex_cond_lock instead
7442 of __pthread_mutex_lock_internal.
7443 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7444 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7445 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
7446 (__condvar_cleanup): Always call __pthread_mutex_cond_lock.
7447 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7448 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7449 * sysdeps/unix/sysv/linux/Makefile (libpthread-sysdep_routines):
7450 Add pthread_mutex_cond_lock.
7451 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add dep_mutex.
7452 * sysdeps/unix/sysv/linux/pthread_cond_mutex_lock.c: New file.
7453 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define
7454 lll_mutex_cond_lock.
7455 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
7456 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
7457 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
7459 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7460 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
7462 * sysdeps/i386/tcb-offsets.sym: Define MUTEX_FUTEX.
7463 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
7465 * pthreadP.h: Declare __pthread_mutex_cond_lock.
7466 * pthread_mutex_lock.c: Define LLL_MUTEX_LOCK if not already defined.
7467 Use it instead of lll_mutex_lock. If __pthread_mutex_lock is a
7468 macro don't define aliases.
7470 * cancellation.c: Remove __pthread_enable_asynccancel_2.
7471 * pthreadP.h: Remove declaration of __pthread_enable_asynccancel_2.
7472 * sysdeps/pthread/pthread_cond_timedwait.c: Use
7473 __pthread_enable_asynccancel instead of __pthread_enable_asynccancel_2.
7474 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7475 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7476 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
7477 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7478 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7480 2003-05-17 Ulrich Drepper <drepper@redhat.com>
7482 * sem_open.c: Fix one endless loop. Implement correct semantics
7483 wrt opening the same semaphore more then once.
7484 * sem_close.c: Adjust for sem_open change.
7485 * semaphoreP.h: Include <semaphore.h>. Define struct inuse_sem.
7486 Declare __sem_mappings, __sem_mappings_lock, __sem_search.
7487 * Makefile (tests): Add tst-sem7.
7488 * tst-sem7.c: New file.
7490 2003-05-16 Roland McGrath <roland@redhat.com>
7492 * sysdeps/unix/sysv/linux/register-atfork.c (libc_freeres_fn): Fix
7493 uninitialized variable braino.
7495 2003-05-16 Ulrich Drepper <drepper@redhat.com>
7497 * sysdeps/unix/sysv/linux/timer_gettime.c (timer_gettime): Correct
7498 test for syscall availability.
7500 * sysdeps/unix/sysv/linux/timer_settime.c (timer_settime): Set
7501 __no_posix_timers to -1 if the syscalls don't exist.
7503 * pthread_join.c (pthread_join): Set tid field of the joined
7504 thread to -1. This isn't necessary but helps to recognize some
7505 error conditions with almost no cost.
7507 * allocatestack.c (FREE_P): Also negative values indicate an
7510 * unwind.c: Include <unistd.h>.
7512 2003-05-14 Ulrich Drepper <drepper@redhat.com>
7514 * Makefile ($(objpfx)$(multidir)): Add rule to create the directory.
7516 2003-05-14 Jakub Jelinek <jakub@redhat.com>
7518 * Makefile (crti-objs, crtn-objs): New variables.
7519 (omit-deps, extra-objs): Add crtn.
7520 ($(objpfx)libpthread.so): Depend on both crti and crtn
7521 and links to them in multidir.
7522 ($(objpfx)crtn.S, $(objpfx)crtn.o): New rules.
7524 2003-05-12 Steven Munroe <sjmunroe@us.ibm.com>
7526 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
7527 (lll_mutex_unlock): Use atomic_exchange_rel.
7529 2003-05-11 Ulrich Drepper <drepper@redhat.com>
7531 * cond-perf.c (cons): Add missing locking around setting of alldone.
7533 2003-05-10 Ulrich Drepper <drepper@redhat.com>
7535 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Remove futex
7537 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
7539 2003-05-09 Ulrich Drepper <drepper@redhat.com>
7541 * tst-sem6.c: New file.
7542 * Makefile (tests): Add tst-sem6.
7544 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (___lll_mutex_unlock):
7545 Use atomic_exchange_rel instead of atomic_exchange.
7546 * sysdeps/unix/sysv/linux/lowlevellock.c (lll_unlock_wake_cb):
7549 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Improve quality of
7550 code for lll_futex_wait and lll_futex_wake in static apps. Use
7551 vsyscall is possible.
7553 * sysdeps/unix/sysv/linux/pthread_getaffinity.c: New file.
7554 * sysdeps/unix/sysv/linux/pthread_setaffinity.c: New file.
7555 * sysdeps/pthread/pthread.h: Declare pthread_getaffinity_np and
7556 pthread_setaffinity_np.
7557 * Versions [libpthread] (GLIBC_2.3.3): Add pthread_getaffinity_np
7558 and pthread_setaffinity_np.
7559 * Makefile (libpthread-routines): Add pthread_getaffinity and
7560 pthread_setaffinity.
7562 * allocatestack.c (allocate_stack): If ARCH_RETRY_MMAP is defined,
7563 use it in case mmap to allocate the stack fails.
7564 * sysdeps/unix/sysv/linux/x86_64/Makefile: Don't define
7565 ARCH_MAP_FLAGS here.
7566 * sysdeps/x86_64/pthreaddef.h: Define ARCH_MAP_FLAGS and
7569 2003-05-08 Ulrich Drepper <drepper@redhat.com>
7571 * sysdeps/unix/sysv/linux/fork.c: Complete rewrite of the atfork
7572 handler implementation. It is now lockless in fork().
7573 * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
7574 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
7575 * sysdeps/unix/sysv/linux/fork.h: Don't include <link.h>. Don't
7576 declare the __fork_*_lists.
7577 (struct fork_handler): Include pointers to all three functions.
7578 Add next, refcntr and need_signal elements.
7579 (__fork_handlers): New declaration.
7580 (__register_atfork_malloc): Remove declaration.
7581 (HAVE_register_atfork_malloc): Remove definition.
7582 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove
7583 __pthread_child_handler variable.
7584 (__libc_pthread_init): Use __register_atfork instead of explicitly
7586 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define lll_futex_wait
7588 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
7590 * unwind.c (unwind_cleanup): Print error message and then abort. This
7591 function must never be reached.
7593 * cond-perf.c: New file.
7595 2003-05-05 Ulrich Drepper <drepper@redhat.com>
7597 * sysdeps/i386/tls.h (TLS_INIT_TP): Include \n in error message.
7599 2003-05-04 Roland McGrath <roland@redhat.com>
7601 * Makefile ($(objpfx)../libc.so): New target.
7603 2003-05-02 Ulrich Drepper <drepper@redhat.com>
7605 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
7606 (pthread_condattr_t): Size is only an int, don't use long for
7608 (pthread_mutexattr_t): Likewise.
7609 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7610 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
7611 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7613 2003-05-01 Ulrich Drepper <drepper@redhat.com>
7615 * sysdeps/i386/tls.h: Define THREAD_ID.
7616 * sysdeps/ia64/tls.h: Likewise.
7617 * sysdeps/powerpc/tls.h: Likewise.
7618 * sysdeps/s390/tls.h: Likewise.
7619 * sysdeps/sh/tls.h: Likewise.
7620 * sysdeps/x86_64/tls.h: Likewise.
7621 * pthread_mutex_lock.c: Use THREAD_ID instead of THREAD_SELF to
7623 * pthread_mutex_timedlock.c: Likewise.
7624 * pthread_mutex_trylock.c: Likewise.
7625 * pthread_mutex_unlock.c: Likewise.
7626 * pthread_rwlock_trywrlock.c: Likewise.
7627 * sysdeps/pthread/pthread_rwlocklock_rdlock.c: Likewise.
7628 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
7629 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
7630 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
7632 * sysdeps/pthread/createthread.c (create_thread): Use CLONE_SYSVSEM
7635 2003-04-29 Jakub Jelinek <jakub@redhat.com>
7637 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
7638 (__SIZEOF_PTHREAD_COND_T): Define to 48.
7639 (pthread_rwlock_t): Add 16 bytes of pad instead of 8 before __flags.
7640 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
7641 Make __align long long instead of long.
7642 (pthread_rwlock_t): Formatting.
7643 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
7644 (pthread_rwlock_t): Formatting.
7645 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
7646 (pthread_cond_t): Make __align long long instead of long.
7647 (pthread_rwlock_t): Move __flags field to the same position as in
7650 2003-04-30 Ulrich Drepper <drepper@redhat.com>
7652 * tst-rwlock6.c (do_test): Use correct printf format specifiers.
7653 * tst-rwlock7.c (do_test): Likewise.
7655 2003-04-26 Roland McGrath <roland@redhat.com>
7657 * Makefile ($(test-modules)): Depend on $(common-objpfx)shlib.lds.
7659 2003-04-22 Jakub Jelinek <jakub@redhat.com>
7661 * allocatestack.c (TLS_TPADJ): Add TLS_PRE_TCB_SIZE instead of
7662 sizeof (struct pthread).
7663 (allocate_stack): Subtract TLS_PRE_TCB_SIZE bytes instead of
7665 * sysdeps/powerpc/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Define
7667 (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Define to alignment of
7669 (TLS_PRE_TCB_SIZE): Increase to cover tcbhead_t preceeded by pad
7671 (INSTALL_DTV, GET_DTV, THREAD_DTV): tcbhead_t is immediately before
7673 (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Don't add TLS_TCB_SIZE
7675 (NO_TLS_OFFSET): Define.
7676 * sysdeps/unix/sysv/linux/powerpc/createthread.c (TLS_VALUE): Don't
7677 add TLS_TCB_SIZE unnecessarily.
7679 2003-04-22 Roland McGrath <roland@redhat.com>
7681 * Makeconfig (shared-thread-library): Reverse link order to work
7684 2003-04-22 Ulrich Drepper <drepper@redhat.com>
7686 * semaphore.h: Fix typo in comment.
7688 2003-04-21 Ulrich Drepper <drepper@redhat.com>
7690 * sysdeps/pthread/sigfillset.c: New file.
7692 * init.c (__pthread_initialize_minimal): Don't block SIGTIMER.
7693 * pthreadP.h: Make SIGTIMER and SIGCANCEL the same.
7694 * sysdeps/pthread/pthread_sigmask.c: Remove handling of SIGTIMER.
7695 * sysdeps/pthread/sigaction.c: Likewise.
7696 * sysdeps/pthread/sigprocmask.c: New file.
7697 * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): Define as
7699 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
7700 Block SIGTIMER. Also handle SI_TKILL events and terminate thread
7703 2003-04-19 Ulrich Drepper <drepper@redhat.com>
7705 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
7706 (DL_SYSINFO_IMPLEMENTATION): Add .eh_frame information.
7708 * sysdeps/unix/sysv/linux/unregister-atfork.c
7709 (__unregister_atfork): Don't free memory not allocated dynamically.
7711 * semaphore.h: Remove __THROW marker from cancellation points.
7712 * nptl/sysdeps/pthread/pthread.h: Likewise.
7714 2003-04-18 Ulrich Drepper <drepper@redhat.com>
7716 * sysdeps/pthread/pthread.h: Don't mark pthread_testcancel,
7717 pthread_cancel, pthread_setcancelstate, and pthread_setcanceltype with
7720 2003-04-16 Jakub Jelinek <jakub@redhat.com>
7722 * tst-cancel4.c (do_test): Use %zd instead of %d when printing cnt.
7724 2003-04-15 Roland McGrath <roland@redhat.com>
7726 * forward.c (__pthread_unwind): Tweak to avoid warning.
7728 2003-04-15 Ulrich Drepper <drepper@redhat.com>
7730 * pthreadP.h: Move THREAD_ATOMIC_* replacements to the top.
7732 2003-04-14 Ulrich Drepper <drepper@redhat.com>
7734 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Don't
7735 overflow CFA advance instructions.
7736 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7738 2003-04-14 Jakub Jelinek <jakub@redhat.com>
7740 * sysdeps/i386/tls.h: Rename LOCK to LOCK_PREFIX.
7741 * sysdeps/i386/pthread_spin_lock.c: Likewise.
7742 * sysdeps/x86_64/tls.h: Likewise. Define LOCK_PREFIX if not already
7745 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Use
7746 DW_CFA_advance_loc2 for .Laddl-.Lsubl.
7747 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
7748 DW_CFA_advance_loc for .Laddl-.Lsubl.
7750 2003-04-13 Ulrich Drepper <drepper@redhat.com>
7752 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Don't use
7753 position-independent unwind data for static libraries.
7754 Add missing unwind info. Add comments.
7756 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Add unwind info.
7757 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7758 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7759 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7761 2003-04-12 Ulrich Drepper <drepper@redhat.com>
7763 * Makefile: Make sure all cancellation points are compiled with
7764 exception and asynchronous unwind tables.
7766 * sysdeps/x86_64/tls.h (THREAD_SETMEM): Word around compiler bug
7767 which mishandles loading of global object addresses in PIC.
7768 (THREAD_SETMEM_NC): Likewise.
7770 2003-04-11 Ulrich Drepper <drepper@redhat.com>
7772 * pthread.h: Define new data structure for cleanup buffer. Declare
7773 new cleanup handler interfaces.
7774 * descr.h: Include <unwind.h> if necessary. Define pthread_unwind_buf.
7775 (struct pthread): Add cleanup_jmp_buf pointer. Define
7776 HAVE_CLEANUP_JMP_BUF and not HAVE_CANCELBUF.
7777 * pthreadP.h: Declare __pthread_unwind. Define __do_cancel to use
7778 it. Declare old cleanup handler installation functions.
7779 * cleanup.c: Rewrite. Install handler for unwind-based cleanup
7781 * cleanup_defer.c: Likewise.
7782 * cleanup_compat.c: New file. Old cleanup code.
7783 * cleanup_def_compat.c: New file. Old cleanup code.
7784 * pthread_create.c (start_thread): Initialize cleanup_jmp_buf element
7785 if own thread descriptor.
7786 * unwind.c: New file.
7787 * forward.c: Add __pthread_unwind.
7788 * init.c (pthread_functions): Add __pthread_unwind.
7789 * sysdeps/pthread/pthread-functions.s (struct pthread_functions):
7790 Add ptr___pthread_unwind.
7791 * Versions [GLIBC_2.3.3] (libpthread): Export new cleanup handling
7792 and unwind function.
7793 * Makefile (libpthread-routines): Add cleanup_compat,
7794 cleanup_def_compat, and unwind. Define CFLAGS to enable unwind
7795 table generation if necessary.
7796 * version.c: Record whether unwind support is compiled in.
7797 * sysdeps/pthread/configure.in: Add checks for unwind unterfaces.
7798 * sysdeps/pthread/bits/libc-lock.h: Add prototypes of the old cleanup
7800 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add quite a bit of
7801 complication to generate unwind information for syscall wrappers.
7802 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
7803 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
7804 __cleanup_fct_attribute.
7806 * Makefile: Add rules to build and run tst-cleanup0.
7807 * tst-cleanup0.c: New file.
7808 * tst-cleanup0.expect: New file.
7810 * pthread_create.c (deallocate_tsd): Don't take parameter. Adjust
7811 caller. Optimize to avoid often unecessary local variable.
7813 2003-04-11 Roland McGrath <roland@redhat.com>
7815 * Makefile ($(objpfx)multidir.mk): New target, generated makefile that
7816 sets variable `multidir'; include that.
7817 (generated): Add it.
7818 ($(objpfx)$(multidir)/crti.o): New target.
7819 [$(multidir) != .] (generated-dirs, extra-objs, omit-deps): Add it.
7821 2003-04-11 Ulrich Drepper <drepper@redhat.com>
7823 * tst-attr2.c (do_test): Add cast to avoid warning.
7824 * tst-mutex4.c (do_test): Likewise.
7826 2003-04-10 Ulrich Drepper <drepper@redhat.com>
7828 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset CPU clocks
7831 2003-04-09 Ulrich Drepper <drepper@redhat.com>
7833 * Makefile (tests): Add tst-detach1.
7834 * tst-detach1.c: New file.
7836 2003-04-08 Ulrich Drepper <drepper@redhat.com>
7838 * sysdeps/pthread/pthread.h: Remove duplicate
7839 pthread_cleanup_{push,pop} definitions.
7841 * tst-barrier2.c: Eliminate warnings.
7842 * tst-cancel4.c: Likewise.
7843 * tst-cond4.c: Likewise.
7844 * tst-cond6.c: Likewise.
7845 * tst-detach1.c: Likewise.
7846 * tst-rwlock4.c: Likewise.
7847 * tst-rwlock6.c: Likewise.
7848 * tst-rwlock7.c: Likewise.
7849 * tst-sem3.c: Likewise.
7850 * tst-spin2.c: Likewise.
7851 * tst-umask1.c: Likewise.
7853 2003-04-07 Ulrich Drepper <drepper@redhat.com>
7855 * pthread_detach.c (pthread_detach): Fix test for invalid TID.
7857 2003-04-06 Ulrich Drepper <drepper@redhat.com>
7859 * descr.h (struct pthread): Move cancelhandling member to the front.
7861 2003-04-05 Ulrich Drepper <drepper@redhat.com>
7863 * sysdeps/unix/sysv/linux/register-atfork.c: Define malloc_prepare,
7864 malloc_parent, and malloc_child statically.
7865 (__register_atfork_malloc): New function.
7866 (free_mem): Don't free any of the malloc_* variables on the list.
7867 * sysdeps/unix/sysv/linux/fork.h: Declare __register_atfork_malloc.
7868 Define HAVE_register_atfork_malloc.
7870 2003-04-04 Ulrich Drepper <drepper@redhat.com>
7872 * sysdeps/pthread/createthread.c (create_thread): Add some more
7873 comments explaining when to set multiple_threads and when not.
7875 * pthreadP.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
7876 THREAD_ATOMIC_BIT_SET if not already defined.
7877 * sysdeps/i386/tls.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
7878 THREAD_ATOMIC_BIT_SET:
7879 * sysdeps/x86_64/tls.h: Likewise.
7880 * cleanup_defer.c (_pthread_cleanup_push_defer): Rewrite to use
7881 THREAD_ATOMIC_CMPXCHG_VAL.
7882 (_pthread_cleanup_pop_restore): Likewise.
7883 * cancellation.c (__pthread_enable_asynccancel): Likewise.
7884 (__pthread_enable_asynccancel_2): Likewise.
7885 (__pthread_disable_asynccancel): Likewise.
7886 * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
7887 (__libc_disable_asynccancel): Likewise.
7888 * init.c (sigcancel_handler): Likewise.
7889 * pthread_setcancelstate.c (__pthread_setcancelstate): Likewise.
7890 * pthread_setcanceltype.c (__pthread_setcanceltype): Likewise.
7892 2003-04-03 Ulrich Drepper <drepper@redhat.com>
7894 * init.c (sigcancel_handler): Don't set EXITING_BIT here.
7895 * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
7896 * pthreadP.h (__do_cancel): Set EXITING_BIT here.
7897 * Makefile (tests): Add tst-cancel11.
7898 * tst-cancel11.c: New file.
7900 2003-04-01 Ulrich Drepper <drepper@redhat.com>
7902 * pthread_create.c (deallocate_tsd): Clear/free memory after the last
7903 round, not the first. Use specific_used flag instead of local
7904 found_nonzero variable. Use THREAD_[SG]ETMEM where possible.
7905 (__free_tcb): Don't call deallocate_tsd here.
7906 (start_thread): Call deallocate_tsd here.
7907 * pthread_setspecific.c: Set specific_used flag really only when
7909 * Makefile (tests): Add tst-tsd3.c and tst-tsd4.
7910 * tst-tsd3.c: New file.
7911 * tst-tsd4.c: New file.
7913 2003-03-31 Ulrich Drepper <drepper@redhat.com>
7915 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_mutex_lock):
7916 Use atomic_exchange_and_add instead of __lll_add.
7917 (__lll_mutex_timedlock): Likewise.
7918 Patch by Ian Wienand.
7920 2003-03-24 Steven Munroe <sjmunroe@us.ibm.com>
7922 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
7923 (SINGLE_THREAD_P): Fix typo.
7924 * tst-cancel-wrappers.sh: Handle '.'ed symbols.
7926 2003-03-31 Ulrich Drepper <drepper@redhat.com>
7928 * Makefile (tests): Add tst-align.
7929 * tst-align.c: New file.
7930 * sysdeps/i386/Makefile: Define CFLAGS-tst-align.
7932 * sysdeps/i386/tls.h (CALL_THREAD_FCT): Align stack of called
7935 * tst-tsd2.c: Add casts to avoid warnings.
7937 2003-03-30 Ulrich Drepper <drepper@redhat.com>
7939 * descr.h (struct pthread): Move most often used elements to the front.
7941 2003-03-29 Ulrich Drepper <drepper@redhat.com>
7943 * Makefile (libpthread-routines): Add pthread_atfork.
7944 (libpthread-static-only-routines): Add pthread_atfork.
7946 2003-03-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
7948 * sysdeps/sh/tls.h: Include nptl/descr.h after the definition
7950 (INSTALL_DTV): Add parens.
7951 (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
7952 Use passed descr instead of THREAD_SELF.
7953 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S
7954 (__lll_mutex_timedlock_wait): Correct expected value after
7956 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S:
7957 Release lock before waking up the waiters.
7958 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Correct exit
7959 criteria. Reorderstruct passed to cleanup handler. Fix
7960 handling of cancellation and failung pthread_mutex_unlock call.
7961 Use __pthread_enable_asynccancel_2 instead of
7962 __pthread_enable_asynccancel.
7963 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7964 Return result of lock re-get if it fails.
7965 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Fix wrong argument
7966 for __pthread_cleanup_push.
7967 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Fix
7968 completely broken rwlock implementation.
7969 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7970 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
7971 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
7972 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
7973 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7974 * sysdeps/unix/sysv/linux/sh/sem_post.S: Fix error value. Use
7975 versioned_symbol macro.
7976 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Use versioned_symbol macro.
7977 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
7979 2003-03-27 Ulrich Drepper <drepper@redhat.com>
7981 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Don't declare
7982 __timer_helper_thread. Declare __start_helper_thread, __helper_once,
7984 (struct timer): Remove th and bar field.
7985 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Remove
7986 debugging code. Create only one helper thread.
7987 * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Don't kill
7989 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
7990 Renamed. Define statically. Use thread info from siginfo.
7991 (__helper_once): New variable.
7992 (__helper_tid): New variable.
7993 (__reset_helper_control): New function.
7994 (__start_helper_thread): New function.
7996 * pthread_create.c (start_thread): Don't use setjmp inside
7997 __builtin_expect to work around gcc bug.
7999 * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Even if
8000 timer_delete syscall fails, but not with ENOSYS, set
8003 * sysdeps/unix/sysv/linux/timer_settime.c [!__ASSUME_POSIX_TIMERS]
8004 (timer_settime): Fix typo.
8005 * sysdeps/unix/sysv/linux/timer_getoverr.c
8006 [!__ASSUME_POSIX_TIMERS] (timer_getoverrun): Likewise.
8008 2003-03-27 Jakub Jelinek <jakub@redhat.com>
8010 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Fix
8011 offset of cleanupbuf.__prev.
8013 2003-03-26 Jakub Jelinek <jakub@redhat.com>
8015 * sysdeps/unix/sysv/linux/timer_getoverr.c: Fix typo in name
8018 2003-03-26 Ulrich Drepper <drepper@redhat.com>
8020 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): If EVP ==
8021 NULL provide default definition to syscall.
8023 2003-03-25 Roland McGrath <roland@redhat.com>
8025 * sysdeps/pthread/posix-timer.h (TIMER_MAX): Define if not defined.
8026 (timer_id2ptr): Fix typo.
8028 2003-03-25 Ulrich Drepper <drepper@redhat.com>
8030 * pthreadP.h: Define SIGCANCEL and SIGTIMER.
8031 * sysdeps/i386/pthreaddef.h: Remove SIGCANCEL definition.
8032 * sysdeps/ia64/pthreaddef.h: Likewise.
8033 * sysdeps/powerpc/pthreaddef.h: Likewise.
8034 * sysdeps/s390/pthreaddef.h: Likewise.
8035 * sysdeps/sh/pthreaddef.h: Likewise.
8036 * sysdeps/x86_64/pthreaddef.h: Likewise.
8037 * init.c (__pthread_initialize_minimal): Block SIGTIMER.
8038 * sysdeps/pthread/sigaction.c: Also prevent SIGTIMER handler from
8040 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
8041 SIGTIMER is not unblocked.
8042 * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): One more
8044 * sysdeps/unix/sysv/linux/pthread_kill.c: Do not allow SIGTIMER to
8046 * sysdeps/pthread/posix-timer.h (timer_id2ptr, timer_ptr2id): Just
8047 pass pointer through as ID.
8048 * sysdeps/unix/sysv/linux/bits/local_lim.h (TIMER_MAX): Removed.
8049 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: New file.
8050 * sysdeps/unix/sysv/linux/timer_create.c: New file.
8051 * sysdeps/unix/sysv/linux/timer_delete.c: New file.
8052 * sysdeps/unix/sysv/linux/timer_getoverr.c: New file.
8053 * sysdeps/unix/sysv/linux/timer_gettime.c: New file.
8054 * sysdeps/unix/sysv/linux/timer_routines.c: New file.
8055 * sysdeps/unix/sysv/linux/timer_settime.c: New file.
8056 * sysdeps/unix/sysv/linux/ia64/Versions: New file.
8057 * sysdeps/unix/sysv/linux/ia64/timer_create.c: New file.
8058 * sysdeps/unix/sysv/linux/ia64/timer_delete.c: New file.
8059 * sysdeps/unix/sysv/linux/ia64/timer_getoverr.c: New file.
8060 * sysdeps/unix/sysv/linux/ia64/timer_gettime.c: New file.
8061 * sysdeps/unix/sysv/linux/ia64/timer_settime.c: New file.
8062 * sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions: New file.
8063 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_create.c: New file.
8064 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_delete.c: New file.
8065 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_getoverr.c: New file.
8066 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_gettime.c: New file.
8067 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_settime.c: New file.
8068 * sysdeps/unix/sysv/linux/s390/s390-64/Versions: New file.
8069 * sysdeps/unix/sysv/linux/s390/s390-64/timer_create.c: New file.
8070 * sysdeps/unix/sysv/linux/s390/s390-64/timer_delete.c: New file.
8071 * sysdeps/unix/sysv/linux/s390/s390-64/timer_getoverr.c: New file.
8072 * sysdeps/unix/sysv/linux/s390/s390-64/timer_gettime.c: New file.
8073 * sysdeps/unix/sysv/linux/s390/s390-64/timer_settime.c: New file.
8074 * sysdeps/unix/sysv/linux/x86_64/Versions: New file.
8075 * sysdeps/unix/sysv/linux/x86_64/compat-timer.h: New file.
8076 * sysdeps/unix/sysv/linux/x86_64/timer_create.c: New file.
8077 * sysdeps/unix/sysv/linux/x86_64/timer_delete.c: New file.
8078 * sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c: New file.
8079 * sysdeps/unix/sysv/linux/x86_64/timer_gettime.c: New file.
8080 * sysdeps/unix/sysv/linux/x86_64/timer_settime.c: New file.
8082 * pthreadP.h: Remove FRAME_LEFT definition.
8083 * cleanup.c (_pthread_cleanup_push): Don't check for reference to
8084 already left frame. Programs which have this problem are not POSIX
8086 * cleanup_defer.c (_pthread_cleanup_push_defer): Likewise.
8088 2003-03-24 Ulrich Drepper <drepper@redhat.com>
8090 * sysdeps/pthread/tst-timer.c: Check return values of the
8093 2003-03-23 Roland McGrath <roland@redhat.com>
8095 * tst-tls3.c (do_test) [! HAVE___THREAD]: Don't test anything.
8096 * tst-tls3mod.c: Likewise.
8097 * tst-tls1.c: Likewise.
8098 * tst-tls2.c: Likewise.
8100 * tst-mutex5.c (do_test): Unlock before destroy, otherwise we invoke
8103 * tst-join5.c (tf1, tf2): Add a cast.
8105 * Makeconfig (includes): Append -I$(..)nptl to this variable.
8107 * tst-barrier2.c (do_test) [! _POSIX_THREAD_PROCESS_SHARED]:
8108 Don't test anything.
8109 * tst-cond4.c: Likewise.
8110 * tst-cond6.c: Likewise.
8111 * tst-flock2.c: Likewise.
8112 * tst-mutex4.c: Likewise.
8113 * tst-rwlock4.c: Likewise.
8114 * tst-signal1.c: Likewise.
8115 * tst-spin2.c: Likewise.
8116 * tst-cond11.c [! _POSIX_CLOCK_SELECTION]: Likewise.
8118 * tst-mutex4.c: Use test-skeleton.c.
8119 * tst-spin2.c: Likewise.
8120 * tst-sysconf.c: Likewise.
8121 * tst-barrier2.c: Likewise.
8122 * tst-cond4.c: Likewise.
8123 * tst-cond6.c: Likewise.
8124 * tst-rwlock4.c: Likewise.
8125 * tst-unload.c: Likewise.
8126 * tst-flock2.c (do_test): Use return instead of exit.
8128 2003-03-22 Jakub Jelinek <jakub@redhat.com>
8130 * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
8132 2003-03-21 Ulrich Drepper <drepper@redhat.com>
8134 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
8135 (__lll_mutex_trylock): Use atomic_compare_and_exchange_val_acq
8136 instead of __lll_compare_and_swap.
8137 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
8139 Removed definition if __lll_compare_and_swap.
8141 * cancellation.c: Adjust for new form of compare&exchange macros.
8142 * cleanup_defer.c: Likewise.
8144 * libc-cancellation.c: Likewise.
8145 * old_pthread_cond_broadcast.c: Likewise.
8146 * old_pthread_cond_signal.c: Likewise.
8147 * old_pthread_cond_timedwait.c: Likewise.
8148 * old_pthread_cond_wait.c: Likewise.
8149 * pthread_cancel.c: Likewise.
8150 * pthread_create.c: Likewise.
8151 * pthread_detach.c: Likewise.
8152 * pthread_join.c: Likewise.
8153 * pthread_key_delete.c: Likewise.
8154 * pthread_setcancelstate.c: Likewise.
8155 * pthread_setcanceltype.c: Likewise.
8156 * pthread_timedjoin.c: Likewise.
8157 * pthread_tryjoin.c: Likewise.
8158 * sysdeps/pthread/createthread.c: Likewise.
8160 2003-03-20 Ulrich Drepper <drepper@redhat.com>
8162 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Include <atomic.h>.
8163 Remove __lll_add, __lll_dec_if_positive, and __lll_test_and_set
8164 definitions. Replace uses with calls to atomic_* functions.
8165 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
8166 * sysdeps/unix/sysv/linux/lowlevellock.c: Replace __lll_add and
8167 __lll_test_and_set calls with atomic_exchange_and_add and
8168 atomic_exchange calls respectively.
8169 * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
8170 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
8171 * sysdeps/unix/sysv/linux/sem_trywait.c: Likewise.
8172 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
8173 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Likewise.
8174 * sysdeps/unix/sysv/linux/ia64/sem_port.c: Likewise.
8175 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
8177 * allocatestack.c (allocate_stack): Assume atomic_exchange_and_add
8178 returns the old value.
8180 2003-03-20 Martin Schwidefsky <sky@mschwid3.boeblingen.de.ibm.com>
8182 * sysdeps/s390/pthread_spin_lock.c (pthread_spin_lock): Use type
8183 int for variable OLDVAL and correct inline assembler contraint.
8184 * sysdeps/s390/pthread_spin_trylock.c (pthread_spin_trylock): Use
8185 type int for variable OLD.
8187 * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it
8189 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
8190 (SINGLE_THREAD_P): Use global variable __local_multiple_threads
8191 instead of multiple_threads field in the TCB.
8193 2003-03-19 Ulrich Drepper <drepper@redhat.com>
8195 * sysdeps/i386/i686/bits/atomic.h: Removed.
8196 * sysdeps/i386/i586/bits/atomic.h: Removed.
8197 * sysdeps/i386/i486/bits/atomic.h: Removed. Moved to glibc.
8198 * sysdeps/x86_64/bits/atomic.h: Removed. Moved to glibc.
8199 * sysdeps/s390/bits/atomic.h: Removed. Moved to glibc.
8200 * sysdeps/sh/bits/atomic.h: Removed. Moved to glibc.
8201 * sysdeps/ia64/bits/atomic.h: Removed. Moved to glibc.
8202 * sysdeps/powerpc/bits/atomic.h: Removed. Moved to glibc.
8203 * atomic.h: Removed. Moved to glibc.
8205 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Add
8206 support for clock selection.
8208 * sysdeps/pthread/pthread_cond_broadcast.c: Release lock before
8211 2003-03-18 Roland McGrath <roland@redhat.com>
8213 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
8214 Add __lll_rel_instr first. Add memory clobber.
8215 (lll_mutex_unlock): Use __lll_test_and_set.
8216 From Paul Mackerras <paulus@samba.org>.
8218 * sysdeps/powerpc/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define
8220 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
8221 (SINGLE_THREAD_P): Add `header.' prefix.
8222 From Paul Mackerras <paulus@samba.org>.
8224 * Versions (libpthread: GLIBC_2.3.2): Move pthread_tryjoin_np and
8225 pthread_timedjoin_np to ...
8226 (libpthread: GLIBC_2.3.3): ... here.
8227 (libpthread: GLIBC_2.2): Move pthread_barrierattr_getpshared there too.
8229 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
8230 Avoid shadowing VAL variable.
8232 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
8235 2003-03-18 Ulrich Drepper <drepper@redhat.com>
8237 * Makefile (tests): Add tst-cond11.
8238 * tst-cond11.c: New file.
8240 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Reorder
8241 struct passed to cleanup handler to eliminate one more
8243 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8245 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
8246 (pthrad_cond_t): Replace __unused field with __clock.
8248 * sysdeps/pthread/pthread_cond_wait.c: Release condvar lock before
8249 waken all waiters in cleanup handler.
8250 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8251 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8253 * pthread_condattr_getclock.c: New file.
8254 * pthread_condattr_setclock.c: New file.
8255 * sysdeps/pthread/pthread.h: Declare these new functions.
8256 * Versions [GLIBC_2.3.3] (libpthread): Add the new functions.
8257 * Makefile (libpthread-routines): Add the new functions.
8258 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_condattr):
8259 Renamed field to value. Document use of the bits.
8260 * pthread_condattr_getpshared.c: Adjust for struct pthread_condattr
8262 * pthread_condattr_setpshared.c: Likewise.
8263 * pthread_cond_init.c (__pthread_cond_init): Initialized __clock field.
8264 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add cond_clock symbol.
8265 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
8267 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8268 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
8269 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
8270 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
8271 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
8272 Implement clock selection.
8273 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
8274 * pthread-errnos.sym: Add ENOSYS.
8275 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
8276 _POSIX_CLOCK_SELECTION.
8277 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
8279 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Remove
8280 invalid .size directive.
8282 2003-03-17 Roland McGrath <roland@redhat.com>
8284 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
8287 2003-03-17 Ulrich Drepper <drepper@redhat.com>
8289 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Use __builtin_expect.
8290 Use __lll_add instead of spelling it out. Use protected symbol names.
8291 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Use __builtin_expect.
8293 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_compare_and_swap):
8294 Renamed from lll_compare_and_swap. Use new name where necessary.
8295 (__lll_add): Defined.
8296 (__lll_dec_if_positive): Defined.
8297 (__lll_test_and_set): Defined.
8298 * sysdeps/ia64/pthread_spin_init.c: Removed.
8299 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Removed.
8300 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Removed.
8301 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Removed.
8302 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Removed.
8303 * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: Removed.
8304 * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: Removed.
8305 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Removed.
8306 * sysdeps/ia64/bits/atomic.h: Add __builtin_expect where appropriate.
8307 * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
8308 __sync_lock_release_si.
8309 Patch by Jakub Jelinek.
8311 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
8312 Fix timeout handling.
8313 (__lll_timedwait_tid): Likewise.
8314 (lll_unlock_wake_cb): Wake up other waiters if necessary.
8315 Patch by Jakub Jelinek.
8317 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Pretty printing.
8319 2003-03-17 Roland McGrath <roland@redhat.com>
8321 PowerPC port contributed by Paul Mackerras <paulus@samba.org>.
8322 * sysdeps/pthread/pthread_spin_init.c: New file.
8323 * sysdeps/pthread/pthread_spin_unlock.c: New file.
8324 * sysdeps/powerpc/Makefile: New file.
8325 * sysdeps/powerpc/pthread_spin_lock.c: New file.
8326 * sysdeps/powerpc/pthread_spin_trylock.c: New file.
8327 * sysdeps/powerpc/pthreaddef.h: New file.
8328 * sysdeps/powerpc/tcb-offsets.sym: New file.
8329 * sysdeps/powerpc/td_ta_map_lwp2thr.c: New file.
8330 * sysdeps/powerpc/tls.h: New file.
8331 * sysdeps/powerpc/bits/atomic.h: New file.
8332 * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: New file.
8333 * sysdeps/unix/sysv/linux/libc-lowlevellock.c: New file.
8334 * sysdeps/unix/sysv/linux/lowlevellock.c: New file.
8336 * sysdeps/unix/sysv/linux/lowlevelmutex.c: New file.
8337 * sysdeps/unix/sysv/linux/sem_post.c: New file.
8338 * sysdeps/unix/sysv/linux/sem_timedwait.c: New file.
8339 * sysdeps/unix/sysv/linux/sem_trywait.c: New file.
8340 * sysdeps/unix/sysv/linux/sem_wait.c: New file.
8341 * sysdeps/unix/sysv/linux/powerpc/Makefile: New file.
8342 * sysdeps/unix/sysv/linux/powerpc/createthread.c: New file.
8343 * sysdeps/unix/sysv/linux/powerpc/fork.c: New file.
8344 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: New file.
8345 * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: New file.
8346 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: New file.
8347 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: New file.
8348 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: New file.
8349 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
8350 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New file.
8352 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Use __gettimeofday,
8354 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Likewise.
8355 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
8356 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Likewise.
8357 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Likewise.
8358 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
8360 2003-03-17 Ulrich Drepper <drepper@redhat.com>
8362 * sysdeps/pthread/pthread_cond_wait.c: Correct exit criteria.
8363 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
8364 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8365 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8366 Patch by Ewald Snel <ewald@rambo.its.tudelft.nl>.
8368 2003-03-16 Roland McGrath <roland@redhat.com>
8370 * tst-fork4.c: Include <string.h>.
8371 * tst-signal2.c: Likewise.
8372 * tst-mutex5.c (do_test): exit -> return.
8373 * tst-mutex2.c: Include <stdlib.h>.
8375 2003-03-16 Ulrich Drepper <drepper@redhat.com>
8377 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
8378 (__lll_mutex_timedlock_wait): Correct expected value after
8379 spurious wakeup. Otherwise we would never wait again.
8381 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Work around red
8382 zone versus inline asm stupidity. Use correct instructions.
8384 * tst-rwlock6.c: Add some more status output.
8386 2003-03-15 Roland McGrath <roland@redhat.com>
8388 * sysdeps/pthread/configure.in: New file.
8389 * sysdeps/pthread/configure: New file (generated).
8391 2003-03-15 Ulrich Drepper <drepper@redhat.com>
8393 * allocatestack.c (allocate_stack): Store the exact stack size of
8394 user allocated stacks.
8396 2003-03-15 Jakub Jelinek <jakub@redhat.com>
8398 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
8399 (SINGLE_THREAD): Use `header' prefix instead of `header.data'.
8400 * sysdeps/sh/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
8401 * sysdeps/sh/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define.
8402 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
8403 Use `header.' prefix.
8404 * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
8406 2003-03-15 Ulrich Drepper <drepper@redhat.com>
8408 * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Don't use
8409 __builtin_frame_address, use stack pointer.
8411 * sysdeps/unix/sysv/linux/jmp-unwind.c: Use CURRENT_STACK_FRAME
8412 instead of __builtin_frame_pointer.
8414 2003-03-14 Ulrich Drepper <drepper@redhat.com>
8416 * tst-basic1.c (do_test): Add cast to avoid warning.
8417 * tst-basic2.c (do_test): Likewise.
8419 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use correct
8420 amount of stack correction.
8422 * tst-fork4.c: Use test-skeleton.c.
8424 2003-03-14 Roland McGrath <roland@redhat.com>
8426 * init.c: Fix typo "#eli" for "#else".
8428 2003-03-14 Steven Munroe <sjmunroe@us.ibm.com>
8430 * allocatestack.c (__stack_user): Use hidden_data_def.
8431 * pthread_create.c (__pthread_keys): Likewise.
8433 * init.c [__powerpc__] (__NR_set_tid_address): Define it.
8435 2003-03-14 Roland McGrath <roland@redhat.com>
8437 * tst-fork4.c: New file.
8438 * Makefile (tests): Add it.
8440 * descr.h (struct pthread): Move the union out of [!TLS_DTV_AT_TP], so
8441 we always define the padding space.
8442 [!TLS_DTV_AT_TP]: Give tcbhead_t field a name, `header', since GCC
8443 stopped supporting its own extensions fully.
8444 [TLS_MULTIPLE_THREADS_IN_TCB]: Put `multiple_threads' inside a wrapper
8445 struct also called `header', so `header.multiple_threads' is the field
8446 name to use on all machines.
8447 * allocatestack.c (allocate_stack): Use `header.' prefix.
8448 * sysdeps/pthread/createthread.c (create_thread): Likewise.
8449 * pthread_create.c (__pthread_create_2_1): Likewise.
8450 * sysdeps/i386/tls.h (INSTALL_NEW_DTV, THREAD_DTV): Likewise.
8451 (THREAD_SELF): Likewise.
8452 * sysdeps/x86_64/tls.h: Likewise.
8453 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
8454 (SINGLE_THREAD_P): Likewise.
8455 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
8456 (SINGLE_THREAD_P): Likewise.
8457 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
8458 (SINGLE_THREAD_P): Likewise.
8460 * sysdeps/s390/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Use REGS[18]
8463 2003-03-14 Ulrich Drepper <drepper@redhat.com>
8465 * pthread_create.c (start_thread): Use CALL_THREAD_FCT if defined.
8466 * sysdeps/i386/tls.h: Define CALL_THREAD_FCT.
8468 * pthread_create.c (start_thread): setjmp is expected to return 0.
8470 * sysdeps/x86_64/tls.h (THREAD_GETMEM): Mark asms volatile.
8471 (THREAD_GETMEM_NC): Likewise.
8473 2003-03-13 Ulrich Drepper <drepper@redhat.com>
8475 * allocatestack.c (allocate_stack): If MULTI_PAGE_ALIASING is defined
8476 and the size of the stack which must be allocated is a multiple,
8477 allocate one more page.
8478 * sysdeps/i386/i686/Makefile: Don't define COLORING_INCREMENT, but
8479 MULTI_PAGE_ALIASING.
8481 2003-03-13 Roland McGrath <roland@redhat.com>
8483 * pthread_create.c (start_thread): Set EXITING_BIT after the
8484 event-reporting (and destructors), not before.
8486 2003-03-13 Jakub Jelinek <jakub@redhat.com>
8488 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_timed_wait,
8489 lll_futex_wake): Declare register variables as long int instead of
8490 unsigned long int. Patch by Ian Wienand <ianw@gelato.unsw.edu.au>.
8491 Make syscall arguments clobbered by the syscall.
8492 (lll_futex_wait): Define using lll_futex_timed_wait.
8494 * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Cast regs[13]
8497 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Only declare and set
8500 * allocatestack.c (nptl_ncreated): Only declare if
8501 COLORING_INCREMENT != 0.
8503 * pthreadP.h (__pthread_enable_asynccancel_2): New prototype.
8504 (__libc_enable_asynccancel_2): Remove prototype.
8506 * sysdeps/unix/sysv/linux/ia64/fork.c (ARCH_FORK): Swap ptid and
8507 ctid to match kernel.
8509 2003-03-12 Ulrich Drepper <drepper@redhat.com>
8511 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add
8512 libc_multiple_threads.
8513 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Move definition of
8514 __libc_multiple_threads to...
8515 * sysdeps/unix/sysv/linux/libc_multiple_threads.c: ...here. New file.
8517 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Remove unnecessary
8519 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
8520 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
8522 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
8523 (__pthread_once_internal): Define.
8525 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Use shlib-compat.h
8526 macros instead of .symver directly.
8527 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
8528 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
8530 * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Include tcb-offsets.h.
8531 * sysdeps/x86_64/tcb-offsets.sym: New file.
8532 * sysdeps/x86_64/Makefile: New file.
8534 * sysdeps/i386/tcb-offsets.sym: Add SELF.
8535 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use SELF
8536 to access own pthread_t in TCB.
8537 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8539 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8541 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8543 2003-03-12 Roland McGrath <roland@redhat.com>
8545 * pthread-errnos.sym: New file.
8546 * Makefile (gen-as-const-headers): New variable, list that file.
8547 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include generated
8548 header <pthread-errnos.h> instead of defining errno values here.
8549 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
8550 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
8551 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
8552 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8553 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8555 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8557 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
8558 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8559 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
8560 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
8561 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
8562 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
8563 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
8564 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
8565 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8566 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
8567 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
8568 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
8569 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
8570 * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
8571 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
8572 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
8573 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
8574 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
8575 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
8576 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
8577 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
8578 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
8579 * sysdeps/i386/i486/pthread_spin_trylock.S: Likewise.
8580 * sysdeps/x86_64/pthread_spin_trylock.S: Likewise.
8581 * sysdeps/sh/pthread_spin_trylock.S: Likewise.
8582 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
8583 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
8585 * sysdeps/unix/sysv/linux/fork.c: Add an assert to check that
8586 CLONE_CHILD_SETTID worked.
8588 2003-03-12 Ulrich Drepper <drepper@redhat.com>
8590 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: New
8592 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S: New
8595 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
8596 (pthread_cond_t): Add padding.
8598 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: New file.
8599 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: New file.
8600 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: New file.
8602 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
8603 (__pthread_rwlock_timedwrlock): Add missing opcode suffix.
8604 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
8605 (__pthread_rwlock_timedrdlock): Likewise.
8606 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
8607 (__pthread_rwlock_wrlock): Likewise.
8608 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
8609 (__pthread_rwlock_rdlock): Likewise.
8611 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: New file.
8613 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Return
8614 result of lock re-get if it fails.
8616 2003-03-11 Ulrich Drepper <drepper@redhat.com>
8618 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Fix asm syntax.
8619 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
8620 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
8621 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
8622 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8623 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
8624 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
8625 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
8626 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
8627 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
8629 * sysdeps/x86_64/tls.h (THREAD_SELF, THREAD_GETMEM, THREAD_GETMEM_NC,
8630 THREAD_SETMEM, THREAD_SETMEM_NC): Correct asm syntax.
8632 * allocatestack.c [! TLS_MULTIPLE_THREADS_IN_TCB] (allocate_stack):
8633 Initialize *__libc_multiple_threads_ptr not __libc_multiple_threads.
8634 * sysdeps/pthread/createthread.c [! TLS_MULTIPLE_THREADS_IN_TCB]
8635 (create_thread): Likewise.
8636 Define __pthread_multiple_threads and __libc_multiple_threads_ptr.
8637 * init.c (__pthread_initialize_minimal_internal): Initialize
8638 __libc_multiple_threads_ptr if necessary.
8639 * pthreadP.h: Adjust prototype for __libc_pthread_init. Declare
8640 __pthread_multiple_threads and __libc_multiple_threads_ptr.
8641 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Define
8642 __libc_multiple_threads.
8643 (__libc_pthread_init): Return pointer to __libc_pthread_init if
8646 * sysdeps/i386/tls.h (THREAD_SETMEM): Fix one-byte variant.
8647 (THREAD_SETMEM_NC): Likewise.
8649 * sysdeps/x86_64/pthread_spin_trylock.c: Removed.
8650 * sysdeps/x86_64/pthread_spin_trylock.S: New file.
8651 * sysdeps/x86_64/pthread_spin_unlock.c: Removed.
8652 * sysdeps/x86_64/pthread_spin_unlock.S: New file.
8654 * sysdeps/i386/i486/pthread_spin_trylock.S (pthread_spin_trylock):
8655 Eliminate one entire instruction.
8657 * cancellation.c (__pthread_enable_asynccancel_2): New function.
8658 * pthreadP.h: Declare __pthread_enable_asynccancel_2.
8659 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
8660 (__pthread_cond_timedwait): Use __pthread_enable_asynccancel_2
8661 instead of __pthread_enable_asynccancel.
8662 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
8663 (__pthread_cond_wait): Likewise.
8664 * sysdeps/pthread/pthread_cond_timedwait.c
8665 (__pthread_cond_timedwait): Likewise.
8666 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
8668 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
8669 (__condvar_cleanup): Wake up all waiters in case we got signaled
8670 after being woken up but before disabling asynchronous
8672 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
8673 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
8674 (__condvar_cleanup): Likewise.
8676 * init.c (__NR_set_tid_address): If already defined, don't redefine.
8677 Make it an error if architecture has no #if case. Add x86-64.
8679 * sysdeps/unix/sysv/linux/x86_64/Makefile: Add flags for
8680 pt-initfini.s generation.
8682 * sysdeps/x86_64/tls.h: Include <asm/prctl.h>.
8683 (TLS_INIT_TP): Fix typo.
8685 2003-03-11 Jakub Jelinek <jakub@redhat.com>
8687 * sysdeps/ia64/bits/atomic.h (atomic_exchange_and_add): Swap 2nd and
8688 3rd argument of __arch_compare_and_exchange_{32,64}_val_acq.
8690 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Include semaphore.h.
8691 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
8692 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Likewise.
8693 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Likewise.
8694 * sysdeps/unix/sysv/linux/s390/sem_post.c: Likewise.
8695 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
8696 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
8697 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
8699 2003-03-11 Ulrich Drepper <drepper@redhat.com>
8701 * sysdeps/pthread/pthread_cond_timedwait.c
8702 (__pthread_cond_timedwait): Return the result of the final
8703 locking. If it succeeds, the regular function return value.
8705 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait):
8706 Return result of the final locking.
8707 * version.c (__nptl_main): Work around problems with the strange
8708 INTERNAL_SYSCALL macro on ppc32.
8709 * init.c (__pthread_initialize_minimal_internal): Unblock
8710 SIGCANCEL in case the parent blocked it.
8711 Reported by Paul Mackerras <paulus@samba.org>.
8713 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: New file.
8714 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: New file.
8715 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: New file.
8717 2003-03-11 Jakub Jelinek <jakub@redhat.com>
8719 * sysdeps/pthread/pthread_cond_timedwait.c
8720 (__pthread_cond_timedwait): Unlock and fail if
8721 __pthread_mutex_unlock_internal failed.
8723 * sysdeps/pthread/createthread.c (ARCH_CLONE): Define if not defined.
8724 (create_thread): Only assert PD->tcb != NULL under [TLS_TCB_AT_TP].
8726 * allocatestack.c (ALLOCATE_STACK_PARMS): New macro.
8727 [NEED_SEPARATE_REGISTER_STACK] (STACK_VARIABLES,
8728 STACK_VARIABLES_ARGS, STACK_VARIABLES_PARMS, ALLOCATE_STACK_PARMS,
8729 ALLOCATE_STACK): New macros.
8730 (TLS_TPADJ): New macro.
8731 (get_cached_stack, queue_stack, __deallocate_stack): Use TLS_TPADJ.
8732 (allocate_stack): Handle TLS_DTV_AT_TP and
8733 NEED_SEPARATE_REGISTER_STACK. Use TLS_TPADJ.
8734 * pthread_create.c (__pthread_create_2_1) [! TLS_TCB_AT_TP]:
8736 * init.c [__ia64__] (__NR_set_tid_address): Define.
8738 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: New file.
8739 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: New file.
8740 * sysdeps/unix/sysv/linux/ia64/fork.c: New file.
8741 * sysdeps/unix/sysv/linux/ia64/createthread.c: New file.
8742 * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: New file.
8743 * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: New file.
8744 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: New file.
8745 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: New file.
8746 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: New file.
8747 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
8748 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: New file.
8749 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: New file.
8750 * sysdeps/unix/sysv/linux/ia64/sem_post.c: New file.
8751 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: New file.
8752 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: New file.
8753 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: New file.
8754 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
8755 * sysdeps/ia64/bits/atomic.h: New file.
8756 * sysdeps/ia64/Makefile: New file.
8757 * sysdeps/ia64/pthread_spin_init.c: New file.
8758 * sysdeps/ia64/pthread_spin_lock.c: New file.
8759 * sysdeps/ia64/pthread_spin_trylock.c: New file.
8760 * sysdeps/ia64/pthread_spin_unlock.c: New file.
8761 * sysdeps/ia64/pthreaddef.h: New file.
8762 * sysdeps/ia64/tcb-offsets.sym: New file.
8763 * sysdeps/ia64/td_ta_map_lwp2thr.c: New file.
8764 * sysdeps/ia64/tls.h: New file.
8766 * sysdeps/s390/pthreaddef.h (__exit_thread_inline): Pass 1 argument
8767 to syscall instead of no arguments.
8769 2003-03-10 Ulrich Drepper <drepper@redhat.com>
8771 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: New file.
8772 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: New file.
8773 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: New file.
8774 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: New file.
8776 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Fix error value in
8779 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: New file
8781 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
8782 lowlevelbarrier.sym.
8783 * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: New file.
8784 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S:
8785 Include lowlevelbarrier.h and don't define offsets locally.
8786 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Likewise.
8788 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
8789 (__lll_mutex_lock_wait): Reverse order of first two parameters.
8790 (__lll_mutex_timedlock_wait): Likewise.
8791 (lll_mutex_lock): Adjust asm for that.
8792 (lll_mutex_timedlock): Likewise. Mark cx, cc, r10 as clobbered.
8793 (lll_lock): Adjust asm for operand order change.
8794 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: New file.
8795 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: New file.
8797 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_lock_wait):
8798 Reverse order of parameters.
8799 (__lll_timedwait_tid): Remove regparms attribute.
8800 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: New file.
8801 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: New file.
8803 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
8804 (__lll_timedwait_tid): Remove one unnecessary instruction.
8806 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Define
8807 __lll_mutex_timedlock_wait only for NOT_IN_libc.
8808 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Include
8811 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
8812 lll_unlock_wake_cb, __lll_wait_tid, and __lll_timedwait_tid only
8814 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Include
8817 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Don't define
8818 LOCK is already defined. Don't define __lll_mutex_timedlock_wait
8820 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Only
8821 define LOCK here (if UP is not defined). The actual code is in
8824 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Don't define
8825 LOCK is already defined. Don't define lll_unlock_wake_cb and
8826 __lll_timedwait_tid for libc.so.
8827 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Only
8828 define LOCK here (if UP is not defined). The actual code is in
8831 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Not needed anymore.
8832 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: Likewise.
8833 * sysdeps/unix/sysv/linux/s390/sem_post.c: Include lowlevellock.h
8834 instead of lowlevelsem.h.
8835 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
8836 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
8837 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
8839 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
8841 * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: New file.
8842 * sysdeps/unix/sysv/linux/i386/lowlevelrwlock.h: Removed.
8843 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: Removed.
8845 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_trylock): Fix
8847 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_trylock): Undo
8850 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: New file.
8852 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove declaration
8853 of __libc_locking_needed.
8854 (lll_trylock): Initialize %eax to zero.
8856 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Update
8857 pthread_cond_t definition.
8859 2003-03-10 Roland McGrath <roland@redhat.com>
8861 * sysdeps/unix/sysv/linux/lowlevelcond.sym: New file.
8862 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add it.
8863 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: File removed.
8864 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: Likewise.
8865 * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: Likewise.
8867 * allocatestack.c (allocate_stack) [!TLS_MULTIPLE_THREADS_IN_TCB]:
8868 Instead of setting PD->multiple_threads, set globals
8869 __pthread_multiple_threads and __libc_multiple_threads.
8870 * sysdeps/pthread/createthread.c (create_thread): Likewise.
8871 * sysdeps/i386/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it.
8872 * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Likewise.
8874 * descr.h (struct pthread): Conditionalize first member on
8875 [!TLS_DTV_AT_TP]. Replace the `header' member with an anonymous union
8876 containing an anonymous tcbhead_t. Move `list' member out.
8877 [TLS_MULTIPLE_THREADS_IN_TCB]: Define a `multiple_threads' member.
8878 * allocatestack.c: Remove use of `header.data.' prefix.
8879 * pthread_create.c: Likewise.
8880 * init.c (__pthread_initialize_minimal_internal): Likewise.
8881 * sysdeps/pthread/createthread.c (create_thread): Likewise.
8882 * sysdeps/i386/tls.h (INSTALL_DTV): Add parens.
8883 (THREAD_SELF, THREAD_DTV, INSTALL_NEW_DTV): No `header.data.' prefix.
8884 * sysdeps/x86_64/tls.h: Likewise.
8885 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
8886 (SINGLE_THREAD_P): Likewise.
8887 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
8888 (SINGLE_THREAD_P): Likewise.
8889 * sysdeps/i386/tls.h (tcbhead_t): Remove `list' member.
8890 * sysdeps/s390/tls.h (tcbhead_t): Likewise.
8892 2003-03-09 Ulrich Drepper <drepper@redhat.com>
8894 * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: New file.
8896 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
8897 * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
8899 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix many
8900 leftovers from the ia32 code.
8902 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Remove unneccessary
8904 (clear_once_control): Don't load %esi.
8906 * sysdeps/x86_64/tls.h: Remove all traces of segment descriptor
8909 * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
8911 * sysdeps/unix/sysv/linux/s390/createthread.c: Moved to...
8912 * sysdeps/unix/sysv/linux/createthread.c: ...here.
8914 * Makefile (tests): Add tst-cond10.
8915 * tst-cond10.c: New file.
8917 2003-03-08 Ulrich Drepper <drepper@redhat.com>
8919 * tst-tls2.c (do_test): Add TEMP_FAILURE_RETRY around sem_wait call.
8920 * tst-signal3.c (do_test): Likewise.
8921 * tst-sem5.c (do_test): Likewise.
8922 * tst-kill6.c (do_test): Likewise.
8923 * tst-tls3.c (do_test): Likewise. Include <errno.h>.
8925 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use add/sub instead
8927 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
8928 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise
8929 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
8930 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
8931 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8932 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
8933 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8935 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8937 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
8938 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8939 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8940 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
8941 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
8942 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
8943 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
8944 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
8946 * allocatestack.c (allocate_stack): If mprotect() fails free the
8949 2003-03-07 Ulrich Drepper <drepper@redhat.com>
8951 * sysdeps/i386/i486/bits/atomic.h: Fix a few unused definitions.
8953 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove all trace of
8954 lll_wake_tid. This was used only to work around kernel limits in
8956 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
8957 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Likewise.
8958 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
8959 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
8961 * init.c (__static_tls_align_m1): Renamed from __static_tls_align.
8962 (__pthread_initialize_minimal_internal): Change initialization of
8963 __static_tls_align_m1 appropriately.
8964 * pthreadP.h (__static_tls_align_m1): Renamed from
8966 * allocatestack.c (allocate_stack): Use __static_tls_align_m1
8967 instead of __static_tls_align-1.
8969 2003-03-04 Ulrich Drepper <drepper@redhat.com>
8971 * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
8973 * pthread_create.c: Define __pthread_keys using nocommon
8974 attribute, not by placing it explicitly in bss.
8975 Remove DEFINE_DEALLOC definition. Not needed anymore.
8977 * allocatestack.c: Define ARCH_MAP_FLAGS if not already defined.
8978 Use it in mmap call to allocate stacks.
8980 * sysdeps/pthread/createthread.c (create_thread): Fix comment.
8982 * pthread_create.c (start_thread): Use THREAD_SETMEM to store
8983 result of the thread function.
8985 2003-03-03 Ulrich Drepper <drepper@redhat.com>
8987 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: Removed. The generic
8988 version is just fine.
8990 * sysdeps/unix/sysv/linux/libc_pthread_init.c
8991 (__pthread_child_handler): Renamed from pthread_child_handler,
8992 exported, and marked hidden. Change all users.
8993 * sysdeps/unix/sysv/linux/register-atfork.c (free_mem): Do not
8994 free __pthread_child_handler from child list.
8996 2003-03-03 Martin Schwidefsky <schwidefsky@de.ibm.com>
8998 * atomic.h (atomic_exchange_and_add): Return newval, not oldval.
9000 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
9001 Fix handling of cancellation and failing pthread_mutex_unlock call.
9002 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
9003 (__pthread_cond_wait): Likewise.
9005 * sysdeps/pthread/pthread_rwlock_timedrdlock.c
9006 (pthread_rwlock_timedrdlock): Fix clobber of result variable by
9007 lll_futex_timed_wait call.
9008 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
9009 (pthread_rwlock_timedwrlock): Likewise.
9011 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
9012 Don't define lll_unlock_wake_cb and ___lll_timedwait_tid in libc.so.
9013 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Remove XXX comments.
9015 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Fix
9016 check of lll_futex_wake return value.
9018 2003-03-03 Roland McGrath <roland@redhat.com>
9020 * forward.c: Fix typo in __pthread_attr_init_2_0 compat_symbol decl.
9022 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
9023 Argument to ptr___pthread_cleanup_upto is __jmp_buf, not jmp_buf.
9024 * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
9026 2003-03-02 Ulrich Drepper <drepper@redhat.com>
9028 * sysdeps/pthread/timer_create.c (timer_create): Return correct
9029 error for CPU clocks.
9031 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
9032 _POSIX_MONOTONIC_CLOCK.
9033 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
9035 * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
9038 2003-03-01 Ulrich Drepper <drepper@redhat.com>
9040 * descr.h (struct pthread): Move cleanup field to the front.
9042 2003-03-01 Roland McGrath <roland@redhat.com>
9044 * sem_open.c (sem_open): Braino fix.
9046 2003-03-01 Ulrich Drepper <drepper@redhat.com>
9048 * sysdeps/i386/tcb-offsets.sym: Add CLEANUP and CLEANUP_PREV.
9049 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Inline
9050 __pthread_cleanup_pop functionality.
9051 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9053 * descr.h (struct pthread): Move tid field to the front now that
9056 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S
9057 (__lll_mutex_timedlock_wait): Remove.
9058 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
9059 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
9060 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
9061 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
9062 (lll_unlock_wake_cb): Don't save and restore %esi.
9063 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
9065 (__lll_timedwait_tid): Add alignment.
9066 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
9067 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
9069 (__lll_timedwait_tid): Removed.
9070 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
9071 (__pthread_cond_broadcast): Don't save, load, and restore %esi.
9072 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
9073 (pthread_barrier_wait): Don't save, load, and restore %esi for
9075 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
9076 (__pthread_cond_signal): Don't save, load, and restore %esi.
9077 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
9078 (__pthread_rwlock_unlock): Don't save, load, and restore %esi.
9079 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
9080 Don't save, load, and restore %esi.
9082 2003-02-27 Ulrich Drepper <drepper@redhat.com>
9084 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
9085 Release lock before waking up the waiters.
9087 * tst-exit1.c (do_test): Don't start more than one thread in parallel.
9089 * tst-rwlock9.c (writer_thread): Correct adding TIMEOUT.
9090 (reader_thread): Likewise.
9092 * sysdeps/pthread/pthread_rwlock_unlock.c
9093 (__pthread_rwlock_unlock): Release internal lock early. Don't try
9094 to wake up readers if there are none.
9096 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
9097 Release internal lock before wake threads.
9099 2003-02-26 Ulrich Drepper <drepper@redhat.com>
9101 * Makefile (tests): Add tst-rwlock10 and tst-rwlock11.
9102 * tst-rwlock8.c: Initialize lock with INIT. Allow INIT to be
9104 * tst-rwlock9.c: Likewise.
9105 * tst-rwlock10.c: New file.
9106 * tst-rwlock11.c: New file.
9108 * Makefile (tests): Add tst-dlsym1.
9109 * tst-dlsym1.c: New file.
9111 * init.c (__pthread_initialize_minimal_internal): Set
9112 GL(dl_error_catch_tsd) to __libc_dl_error_tsd.
9113 * Versions (libc:GLIBC_PRIVATE): Export __libc_dl_error_tsd.
9115 2003-02-24 Ulrich Drepper <drepper@redhat.com>
9117 * sem_open.c (sem_open): Fix handling of O_CREAT without O_EXCL.
9119 * tst-cond2.c: Fix sychronization with child.
9121 * tst-rwlock8.c (reader_thread): Remove unused variable.
9123 * Makefile: Add rules to build and run tst-tls3.
9124 * tst-tls3.c: New file.
9125 * tst-tls3mod.c: New file.
9127 * Makefile (tests): Add tst-rwlock8 and tst-rwlock9.
9128 * tst-rwlock8.c: New file.
9129 * tst-rwlock9.c: New file.
9130 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Fix
9131 complete broken rwlock implementation.
9132 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
9134 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
9136 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
9137 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
9138 * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
9139 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
9140 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
9141 * sysdeps/pthread/pthread_rwlock_unlock.c: Likewise.
9142 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
9144 2003-02-23 Roland McGrath <roland@redhat.com>
9146 * Makefile (nptl-version): Change regexp so case sensitivity is ok.
9148 2003-02-23 Ulrich Drepper <drepper@redhat.com>
9150 * Makefile (tests): Add tst-context1.
9151 * tst-context1.c: New file.
9153 * Makefile (tests): Add tst-tls1 and tst-tls2.
9154 * tst-tls1.c: New file.
9155 * tst-tls2.c: New file.
9157 * libc-cancellation.c (__libc_enable_asynccancel): Correct test
9160 * pthread_create.c (start_thread): Set EXITING_BIT early.
9162 * sysdeps/i386/tls.h (THREAD_GETMEM): Mark asm as volatile.
9163 (THREAD_GETMEM_NC): Likewise.
9165 2003-02-22 Ulrich Drepper <drepper@redhat.com>
9167 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Shave
9168 off 3 more bytes by using offset-less instructions when possible.
9170 * Makefile: Add dependency for $(objpfx)version.d.
9172 * eintr.c (eintr_source): Add unnecessary return but the compiler
9175 * tst-kill3.c: Include <unistd.h>.
9177 2003-02-21 Roland McGrath <roland@redhat.com>
9179 * pthread_create.c (start_thread): Call __libc_thread_freeres.
9181 2003-02-21 Ulrich Drepper <drepper@redhat.com>
9183 * Makefile (tests): Add tst-eintr1.
9184 (distribute): Add eintr.c.
9185 * tst-eintr1.c: New file.
9186 * eintr.c: New file.
9188 * pthread_cancel.c (pthread_cancel): Use tkill directly.
9190 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill):
9191 Disallow sending SIGCANCEL.
9193 * Makefile (tests): Remove tst-basic7. Add tst-kill1, tst-kill2,
9194 tst-kill3, tst-kill4, tst-kill5, tst-kill6.
9195 * tst-kill1.c: New file.
9196 * tst-kill2.c: New file.
9197 * tst-kill3.c: New file.
9198 * tst-kill5.c: New file.
9199 * tst-kill6.c: New file.
9200 * tst-basic7.c: Renamed to...
9201 * tst-kill4.c: ...this.
9203 2003-02-21 Roland McGrath <roland@redhat.com>
9205 * Makefile (install-lib-ldscripts): New variable.
9207 2003-02-21 Ulrich Drepper <drepper@redhat.com>
9209 * pthreadP.h: Define INVALID_TD_P and INVALID_NOT_TERMINATED_TD_P.
9210 * pthread_cancel.c: Use INVALID_TD_P.
9211 * pthread_detach.c: Likewise.
9212 * pthread_getschedparam.c: Likewise.
9213 * pthread_setschedparam.c: Likewise.
9214 * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
9215 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
9216 * pthread_join.c: Use INVALID_NOT_TERMINATED_TD_P.
9217 * pthread_timedjoin.c: Likewise.
9219 * tst-basic7.c: Include <signal.h>.
9221 * pthread_join.c (pthread_join): Limited checking for invalid
9223 * pthread_timedjoin.c (pthread_timedjoin_np): Likewise.
9225 2003-02-20 Ulrich Drepper <drepper@redhat.com>
9227 * pthread_create.c (deallocate_tsd): Reset found_nonzero at the
9228 beginning of the loop. Clear the entire first block of TSD.
9229 * Makefile (tests): Add tst-key4.
9230 * tst-key4.c: New file.
9232 2003-02-18 Ulrich Drepper <drepper@redhat.com>
9234 * Makefile (tests): Add tst-basic7.
9235 * tst-basic7.c: New file.
9237 * pthread_create.c (deallocate_tsd): Mark as internal_function.
9238 Add some more __builtin_expect.
9240 * pthreadP.h: Define dummy version of DEBUGGING_P.
9242 2003-02-17 Ulrich Drepper <drepper@redhat.com>
9244 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remnove
9245 _POSIX_THREAD_PRIORITY_SCHEDULING.
9246 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
9247 _XOPEN_REALTIME_THREADS.
9248 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
9250 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): The
9251 kernel returns EINVAL for PID <= 0, work around it.
9253 * Makefile (tests): Add tst-signal5.
9254 * tst-signal5.c: New file.
9256 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
9259 * tst-cancel1.c (tf): Block all signals.
9261 * Makefile (tests): Add tst-basic6.
9262 * tst-basic6.c: New file.
9264 * tst-basic1.c: Add test for process ID.
9266 * Makefile (tests): Add tst-cancel10.
9267 * tst-cancel10.c: New file.
9269 * Makefile (tests): Add tst-signal4.
9270 * tst-signal4.c: New file.
9272 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use
9273 __sigismember instead of sigismember. Add __builtin_expect.
9275 2003-02-16 Ulrich Drepper <drepper@redhat.com>
9277 * tst-attr1.c (do_test): Add tests for pthread_setcanceltype,
9278 pthread_setcancelstate, and pthread_rwlock_setpshared.
9280 * tst-cancel7.c (do_test): Make sure the pid file exists before
9281 canceling the thread.
9283 * tst-rwlock6.c: More pthread_rwlock_timedwrlock and
9284 pthread_rwlock_timedrdlock tests.
9285 * tst-rwlock7.c: More pthread_rwlock_timedwrlock tests.
9286 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
9287 Check for invalid tv_nsec field.
9288 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
9291 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Protect
9292 recursive mutex of overflow.
9294 * tst-attr1.c (do_test): Add test for pthread_mutexattr_setpshared.
9296 * libc-cancellation.c (__libc_enable_asynccancel): Rewrite to avoid
9297 going into an endless loop.
9298 * Makefile (tests): Add tst-cancel9.
9299 * tst-cancel9.c: New file.
9301 * pthread_cancel.c (pthread_cancel): Use the result of __pthread_kill.
9303 2003-02-15 Ulrich Drepper <drepper@redhat.com>
9305 * tst-mutex5.c (do_test): Add more timedlock tests.
9307 * tst-mutex2.c: Tests of trylock and unlock with ERROR mutexes.
9308 * tst-mutex3.c (do_test): Add tests for trylock with RECURSIVE mutexes.
9310 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
9311 use INLINE_SYSCALL. Error number is returned, not -1.
9313 * pthreadP.h: Mark declarations of __find_in_stack_list, __free_tcb,
9314 and __deallocate_stack with internal_function.
9315 * pthread_create.c: Adjust definitions appropriately.
9316 * allocatestack.c: Likewise.
9318 * pthread_join.c: Add one more __builtin_expect.
9319 * pthread_timedjoin.c: Likewise.
9321 * pthread_getspecific.c (__pthread_getspecific): Clear data->data
9322 not data of sequence number does not match.
9323 Add one __builtin_expect.
9325 * Makefile (tests): Add tst-clock1.
9326 * tst-clock1.c: New file.
9328 * pthread_setconcurrency.c (pthread_setconcurrency): Fail for
9330 * Makefile (tests): Add tst-basic5.
9331 * tst-basic5.c: New file.
9333 2003-02-14 Ulrich Drepper <drepper@redhat.com>
9335 * Makefile (tests): Add tst-basic4.
9336 * tst-basic4.c: New file.
9338 * pthreadP.h: Add declaraction for __nptl_nthreads.
9339 * pthread_create.c: Define __nptl_nthreads
9340 (start_thread): Increment __nptl_nthreads at beginning. Decrement
9341 after thread is done. If then zero, call exit(0).
9342 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
9343 Add ptr_nthreads. Define HAVE_PTR_NTHREADS.
9344 * init.c (pthread_functions): Initialize ptr_nthreads.
9345 * allocatestack.c (nptl_nthreads): Remove definition and all uses.
9346 (__reclaim_stacks): Decrement __nptl_nthreads.
9347 * sysdeps/pthread/Makefile [$(subdir)==csu] (CFLAGS-libc-start.c):
9349 * Makefile (tests): Add tst-basic3.
9350 * tst-basic3.c: New file.
9352 * descr.h: Define CANCELING_BIT and CANCELING_BITMASK. Introduce
9353 after CANCELTYPE_BIT, move the other bits up. Update CANCEL_RESTMASK.
9354 * init.c (sigcancel_handler): Also set CANCELING_BITMASK bit in newval.
9355 * pthread_cancel.c (pthread_cancel): Likewise. Also set CANCELING_BIT
9356 if asynchronous canceling is enabled.
9357 * pthread_join.c (pthread_join): When recognizing circular joins,
9358 take into account the other thread might be already canceled.
9359 * Makefile (tests): Add tst-join5.
9360 * tst-join5.c: New file.
9362 * Makefile (tests): Add tst-join4.
9363 * tst-join4.c: New file.
9365 2003-02-13 Ulrich Drepper <drepper@redhat.com>
9367 * tst-cond4.c (main): Add test of pthread_attr_getpshared.
9369 2003-02-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
9371 * sysdeps/s390/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM,
9372 THREAD_SETMEM_NC): Use passed descr instead of THREAD_SELF.
9373 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind): Avoid
9375 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Include <sys/time.h>
9377 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Return
9378 error if lll_futex_wake failed.
9380 2003-02-13 Ulrich Drepper <drepper@redhat.com>
9382 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Fix
9383 handling of cancellation and failung pthread_mutex_unlock call.
9384 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9385 * Makefile (tests): Add tst-cond8 and tst-cond9.
9386 * tst-cond8.c: New file.
9387 * tst-cond9.c: New file.
9389 * tst-cond7.c (do_test): Unlock the mutex before canceling the thread.
9391 * sysdeps/pthread/pthread.h: Add missing initializers. Protect
9392 non-standard initializers with __USE_GNU.
9394 * Makefile (tests): Add tst-cleanup3.
9395 * tst-cleanup3.c: New file.
9397 2003-02-12 Ulrich Drepper <drepper@redhat.com>
9399 * Makefile (tests): Add tst-attr1 and tst-attr2.
9400 * tst-attr1.c: New file.
9401 * tst-attr2.c: New file.
9403 * Makefile: Add rules to build and run tst-atfork2 test.
9404 * tst-atfork2.c: New file.
9405 * tst-atfork2mod.c: New file.
9407 * sysdeps/unix/sysv/linux/unregister-atfork.c
9408 (__unregister_atfork): Free the memory allocated for the handlers
9409 after removing them from the lists.
9411 * sysdeps/unix/sysv/linux/register-atfork.c: Define memeory
9414 * tst-atfork1.c (do_test): Wait for the child we forked.
9415 Report error in child.
9417 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Fix comment.
9419 * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
9421 2003-02-10 Ulrich Drepper <drepper@redhat.com>
9423 * Makefile (tests): Add tst-cancel8.
9424 * tst-cancel8.c: New file.
9426 * sysdeps/unix/sysv/linux/i386/pthread_once.S (clear_once_control): Fix
9427 clearing of control variable.
9428 * Makefile (tests): Add tst-once3 and tst-once4.
9429 * tst-once3.c: New file.
9430 * tst-once4.c: New file.
9432 2003-02-08 kaz Kojima <kkojima@rr.iij4u.or.jp>
9434 * sysdeps/sh/Makefile: New file.
9435 * sysdeps/sh/bits/atomic.h: New file.
9436 * sysdeps/sh/pthread_spin_init.c: New file.
9437 * sysdeps/sh/pthread_spin_lock.c: New file.
9438 * sysdeps/sh/pthread_spin_trylock.S: New file.
9439 * sysdeps/sh/pthread_spin_unlock.S: New file.
9440 * sysdeps/sh/pthreaddef.h: New file.
9441 * sysdeps/sh/tcb-offsets.sym: New file.
9442 * sysdeps/sh/td_ta_map_lwp2thr.c: New file.
9443 * sysdeps/sh/tls.h: New file.
9444 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: New file.
9445 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: New file.
9446 * sysdeps/unix/sysv/linux/sh/createthread.c: New file.
9447 * sysdeps/unix/sysv/linux/sh/fork.c: New file.
9448 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: New file.
9449 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: New file.
9450 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h: New file.
9451 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: New file.
9452 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: New file.
9453 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: New file.
9454 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: New file.
9455 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: New file.
9456 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
9457 * sysdeps/unix/sysv/linux/sh/pt-vfork.S: New file.
9458 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: New file.
9459 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: New file.
9460 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: New file.
9461 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: New file.
9462 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: New file.
9463 * sysdeps/unix/sysv/linux/sh/pthread_once.S: New file.
9464 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: New file.
9465 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: New file.
9466 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: New file.
9467 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: New file.
9468 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: New file.
9469 * sysdeps/unix/sysv/linux/sh/sem_post.S: New file.
9470 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: New file.
9471 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: New file.
9472 * sysdeps/unix/sysv/linux/sh/sem_wait.S: New file.
9473 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
9475 2003-02-08 Ulrich Drepper <drepper@redhat.com>
9477 * tst-cond2.c: Rearrange code to not rely on behavior undefined
9480 * tst-basic2.c (do_test): Lock mutex before creating the thread.
9482 2003-02-07 Ulrich Drepper <drepper@redhat.com>
9484 * sysdeps/x86_64/tls.h: Remove unnecessary macros, left over from x86.
9485 (TLS_GET_FS): New #define.
9486 (TLS_SET_FS): New #define.
9487 Correct value of __NR_set_thread_area.
9489 * sysdeps/x86_64/td_ta_map_lwp2thr.c: New file.
9491 2003-02-06 Ulrich Drepper <drepper@redhat.com>
9493 * Makefile (tests): Add tst-popen1.
9494 * tst-popen1.c: New file.
9496 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Remove wrong
9497 but inactive generalization.
9498 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9499 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
9500 Minor optimization, remove one instruction.
9501 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
9503 2003-02-04 Martin Schwidefsky <schwidefsky@de.ibm.com>
9505 * sysdeps/unix/sysv/linux/s390/fork.c: Correct order of parameters.
9507 2003-01-31 Martin Schwidefsky <schwidefsky@de.ibm.com>
9509 * init.c (__NR_set_tid_address): Add #ifdef for s390.
9510 * sysdeps/pthread/pthread_barrier_wait.c: New file.
9511 * sysdeps/pthread/pthread_cond_broadcast.c: New file.
9512 * sysdeps/pthread/pthread_cond_signal.c: New file.
9513 * sysdeps/pthread/pthread_cond_timedwait.c: New file.
9514 * sysdeps/pthread/pthread_cond_wait.c: New file.
9515 * sysdeps/pthread/pthread_rwlock_rdlock.c: New file.
9516 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: New file.
9517 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: New file.
9518 * sysdeps/pthread/pthread_rwlock_unlock.c: New file.
9519 * sysdeps/pthread/pthread_rwlock_wrlock.c: New file.
9520 * sysdeps/s390/Makefile: New file.
9521 * sysdeps/s390/bits/atomic.h: New file.
9522 * sysdeps/s390/pthread_spin_init.c: New file.
9523 * sysdeps/s390/pthread_spin_lock.c: New file.
9524 * sysdeps/s390/pthread_spin_trylock.c: New file.
9525 * sysdeps/s390/pthread_spin_unlock.c: New file.
9526 * sysdeps/s390/pthreaddef.h: New file.
9527 * sysdeps/s390/tcb-offsets.sym: New file.
9528 * sysdeps/s390/td_ta_map_lwp2thr.c: New file.
9529 * sysdeps/s390/tls.h: New file.
9530 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: New file.
9531 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: New file.
9532 * sysdeps/unix/sysv/linux/s390/createthread.c: New file.
9533 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: New file.
9534 * sysdeps/unix/sysv/linux/s390/fork.c: New file.
9535 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: New file.
9536 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
9537 * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: New file.
9538 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: New file.
9539 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: New file.
9540 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: New file.
9541 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: New file.
9542 * sysdeps/unix/sysv/linux/s390/pthread_once.c: New file.
9543 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: New file.
9544 * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: New file.
9545 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
9546 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
9547 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: New file.
9548 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
9549 * sysdeps/unix/sysv/linux/s390/sem_post.c: New file.
9550 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: New file.
9551 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
9552 * sysdeps/unix/sysv/linux/s390/sem_wait.c: New file.
9554 2003-02-04 Ulrich Drepper <drepper@redhat.com>
9556 * atomic.h: Add a couple more default implementations.
9557 (atomic_compare_and_exchange_acq): Use
9558 __arch_compare_and_exchange_32_acq in return value definition. It
9560 (atomic_bit_set): Renamed from atomic_set_bit.
9561 Add missing atomic_ prefixes.
9563 * sysdeps/pthread/bits/libc-lock.h (__libc_once): In case no
9564 thread library is available, use correct value to mark initialized
9567 2003-02-03 Ulrich Drepper <drepper@redhat.com>
9569 * allocatestack.c (allocate_stack): Use __getpagesize instead of
9570 __sysconf to determine pagesize.
9572 * pthread_create.c: Include <atomic.h>.
9573 * allocatestack.c (allocate_stack): Implement coloring of the
9574 allocated stack memory. Rename pagesize to pagesize_m1. It's the
9575 size minus one. Adjust users.
9576 * sysdeps/i386/i686/Makefile: New file.
9578 2003-02-02 Ulrich Drepper <drepper@redhat.com>
9580 * allocatestack.c: Improve comment throughout the file.
9582 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
9583 (__lll_lock_wait): Add branch prediction.
9584 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
9585 (__lll_lock_wait): Likewise.
9586 (lll_unlock_wake_cb): Removed.
9588 2003-01-31 Ulrich Drepper <drepper@redhat.com>
9590 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Remove
9591 _POSIX_THREAD_PRIORITY_SCHEDULING.
9593 2003-01-30 Jakub Jelinek <jakub@redhat.com>
9595 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
9596 Fix return type of ptr___pthread_getspecific.
9598 2003-01-29 Ulrich Drepper <drepper@redhat.com>
9600 * Makefile (tests): Add tst-umask1.
9601 (tst-umask1-ARGS): Define.
9602 * tst-umask1.c: New file.
9604 2003-01-28 Ulrich Drepper <drepper@redhat.com>
9606 * Makefile (libpthread-routines): Remove lowlevelrwlock. Add
9607 pthread_rwlock_rdlock, pthread_rwlock_timedrdlock,
9608 pthread_rwlock_wrlock, pthread_rwlock_timedwrlock, and
9609 pthread_rwlock_unlock.
9610 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Removed
9611 * sysdeps/unix/sysv/linux/i386/i586/lowlevelrwlock.S: Removed
9612 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Removed
9613 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: New file.
9614 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
9616 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: New file.
9617 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
9619 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: New file.
9620 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_rdlock.S: New file.
9621 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedrdlock.S:
9623 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_wrlock.S: New file.
9624 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedwrlock.S:
9626 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_unlock.S: New file.
9627 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_rdlock.S: New file.
9628 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedrdlock.S:
9630 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_wrlock.S: New file.
9631 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedwrlock.S:
9633 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_unlock.S: New file.
9635 * Makefile (libpthread-routines): Remove lowlevelcond and
9636 lowlevelsem. Add sem_wait, sem_trywait, sem_timedwait, sem_post,
9637 pthread_cond_wait, pthread_cond_timedwait, pthread_cond_signal,
9638 and pthread_cond_broadcast.
9639 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Removed
9640 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Removed
9641 * sysdeps/unix/sysv/linux/i386/i586/lowlevelsem.S: Removed
9642 * sysdeps/unix/sysv/linux/i386/i586/lowlevelcond.S: Removed
9643 * sysdeps/unix/sysv/linux/i386/i686/lowlevelsem.S: Removed
9644 * sysdeps/unix/sysv/linux/i386/i686/lowlevelcond.S: Removed
9645 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: New file.
9646 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: New file.
9647 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: New file.
9648 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: New file.
9649 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: New file.
9650 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: New file.
9651 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: New file.
9652 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: New file.
9653 * sysdeps/unix/sysv/linux/i386/i586/sem_wait.S: New file.
9654 * sysdeps/unix/sysv/linux/i386/i586/sem_trywait.S: New file.
9655 * sysdeps/unix/sysv/linux/i386/i586/sem_timedwait.S: New file.
9656 * sysdeps/unix/sysv/linux/i386/i586/sem_post.S: New file.
9657 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_wait.S: New file.
9658 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_timedwait.S: New file.
9659 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_signal.S: New file.
9660 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_broadcast.S: New file.
9661 * sysdeps/unix/sysv/linux/i386/i686/sem_wait.S: New file.
9662 * sysdeps/unix/sysv/linux/i386/i686/sem_trywait.S: New file.
9663 * sysdeps/unix/sysv/linux/i386/i686/sem_timedwait.S: New file.
9664 * sysdeps/unix/sysv/linux/i386/i686/sem_post.S: New file.
9665 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_wait.S: New file.
9666 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S: New file.
9667 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_signal.S: New file.
9668 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_broadcast.S: New file.
9669 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: New file.
9671 * sysdeps/unix/sysv/linux/i386/createthread.c: Define
9672 PREPARE_CREATE and TLS_VALUE with x86-specific bits. All the rest
9673 of the code is moved to ...
9674 * sysdeps/pthread/createthread.c: ...here. New file.
9676 2003-01-27 Ulrich Drepper <drepper@redhat.com>
9678 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S
9679 (__new_sem_post): Clear %eax before returning.
9680 Reported by MAEDA Naoaki <maeda.naoaki@jp.fujitsu.com>.
9682 * Makefile (tests): Add tst-cleanup2.
9683 * tst-cleanup2.c: New file.
9685 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
9686 Interpret first parameter correctly.
9688 2003-01-17 Ulrich Drepper <drepper@redhat.com>
9690 * Makefile (headers): Add bits/semaphore.h.
9692 2003-01-16 Jakub Jelinek <jakub@redhat.com>
9694 * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize _head->sysinfo even
9697 2003-01-14 Ulrich Drepper <drepper@redhat.com>
9699 * sem_open.c (sem_open): Return SEM_FAILED if existing semaphore
9700 must be used and mapping failed.
9701 Reported by Luke Elliott <luke.elliott@activfinancial.com>.
9703 * Makefile (CFLAGS-pthread_self.os): Define this, not
9704 CFLAGS-pthread_self.c.
9706 2003-01-13 Ulrich Drepper <drepper@redhat.com>
9708 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Don't export
9711 * Makefile (libpthread-routines): Add version. Add rules to build
9712 version.os and banner.h.
9713 * version.c: New file.
9715 2003-01-13 Jakub Jelinek <jakub@redhat.com>
9717 * pthread_mutex_lock.c (__pthread_mutex_lock_internal): Make
9718 the alias unconditional.
9719 * pthread_mutex_unlock.c (__pthread_mutex_unlock_internal): Likewise.
9721 2003-01-13 Ulrich Drepper <drepper@redhat.com>
9723 * Makefile (CFLAGS-pthread_self.c): New definition.
9725 2003-01-06 Jakub Jelinek <jakub@redhat.com>
9727 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Add
9728 INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
9729 * sysdeps/unix/sysv/linux/raise.c (raise): Likewise.
9730 * init.c (__pthread_initialize_minimal_internal): Likewise.
9732 2003-01-07 Jakub Jelinek <jakub@redhat.com>
9734 * pthreadP.h (__pthread_cond_timedwait): Add prototype.
9736 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
9737 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
9738 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
9739 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
9740 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
9741 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
9743 2003-01-06 Jakub Jelinek <jakub@redhat.com>
9745 * pthreadP.h (LIBC_CANCEL_HANDLED): Define.
9746 * pt-system.c (LIBC_CANCEL_HANDLED): Add.
9747 * tst-cancel-wrappers.sh: Remove all exceptions.
9749 2003-01-05 Ulrich Drepper <drepper@redhat.com>
9751 * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
9752 features. Reported by Marijn Ros <marijn@mad.scientist.com>.
9754 * sysdeps/unix/sysv/linux/jmp-unwind.c: Include <pthread-functions.h>.
9755 Use __libc_pthread_functions array if SHARED.
9757 * pthreadP.h: Move pthread_cond_2_0_t definition to...
9758 * sysdeps/unix/sysv/linux/internaltypes.h: ...here.
9760 * sysdeps/pthread/bits/libc-lock.h (__libc_ptf_call): New #define.
9761 (__libc_rwlock_rdlock, __libc_rwlock_wrlock, __libc_rwlock_unlock,
9762 __libc_key_create, __libc_getspecific, __libc_setspecific): Use
9763 __libc_ptf_call instead of __libc_maybe_call.
9765 (__libc_cleanup_region_start): Wrap function name with PTF call.
9766 (__libc_cleanup_region_end): Likewise.
9767 (__libc_cleanup_end): Likewise.
9769 * pthread_getspecific.c: Add __pthread_getspecific_internal alias.
9770 * pthread_setspecific.c: Add __pthread_setspecific_internal alias.
9771 * pthread_key_create.c: Add __pthread_key_create_internal alias.
9772 * pthreadP.h: Add prototypes.
9774 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Add
9775 __pthread_rwlock_rdlock, __pthread_rwlock_wrlock, and
9776 __pthread_rwlock_unlock aliases.
9777 * pthreadP.h: Add prototypes for new aliases.
9779 * pthreadP.h (struct pthead_functions): Moved to...
9780 * sysdeps/pthread/pthread-functions.h: ...here. New file.
9781 * init.c (pthread_functions): Add initializers for new elements.
9783 * cleanup_defer.c: Add __pthread_cleanup_push_defer and
9784 __pthread_cleanup_pop_restore aliases.
9785 * pthreadP.h: Add prototypes.
9787 * cleanup.c: Rename _GI_pthread_cleanup_push to __pthread_cleanup_push
9788 and _GI_pthread_cleanup_pop to __pthread_cleanup_pop.
9789 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Adjust caller.
9790 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
9791 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
9792 * pthreadP.h: Adjust prototypes and callers.
9794 2003-01-04 Ulrich Drepper <drepper@redhat.com>
9796 * Makefile (tests): Add tst-cancel7.
9797 (tst-cancel7-ARGS): New variable.
9798 * tst-cancel7.c: New file.
9800 * old_pthread_cond_broadcast.c: Optimize initialization a bit to work
9801 around gcc defficiencies.
9802 * old_pthread_cond_signal.c: Likewise.
9803 * old_pthread_cond_timedwait.c: Likewise.
9804 * old_pthread_cond_wait.c: Likewise.
9806 * pthreadP.h (pthread_cond_2_0_t): Remove unneeded lock element.
9808 2003-01-03 Ulrich Drepper <drepper@redhat.com>
9810 * Makefile (tests): Add tst-cond7.
9811 * tst-cond7.c: New file.
9813 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
9814 (condvar_cleanup): Get condvar address from the right place.
9816 * atomic.h: Correct definitions of atomic_full_barrier,
9817 atomic_read_barrier, atomic_write_barrier.
9819 * old_pthread_cond_broadcast.c: Make memory allocate and initialization
9821 * old_pthread_cond_signal.c: Likewise.
9822 * old_pthread_cond_timedwait.c: Likewise.
9823 * old_pthread_cond_wait.c: Likewise.
9825 2003-01-03 Jakub Jelinek <jakub@redhat.com>
9827 * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
9829 2003-01-03 Ulrich Drepper <drepper@redhat.com>
9831 * pthreadP.h (pthread_cond_2_0_t): New type.
9832 (struct pthread_functions): Use new type for 2.0 condvar callbacks.
9833 Use new type for the 2.0 condvar function prototypes.
9834 * forward.c: Use pthread_cond_2_0_t for 2.0 condvar functions.
9835 * old_pthread_cond_init.c: Use pthread_cond_2_0_t for condvar
9837 * old_pthread_cond_destroy.c: Likewise.
9838 * old_pthread_cond_broadcast.c: Likewise. Lock appropriately.
9839 * old_pthread_cond_signal.c: Likewise.
9840 * old_pthread_cond_timedwait.c: Likewise.
9841 * old_pthread_cond_wait.c: Likewise.
9843 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
9844 (__pthread_cond_wait): Don't save cancellation mode and seq value
9847 * herrno.c (__h_errno_location): Don't define as weak.
9849 2003-01-02 Jakub Jelinek <jakub@redhat.com>
9851 * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
9852 pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
9853 and pthread_cond_wait.
9854 * old_pthread_cond_broadcast.c (__old_pthread_cond_broadcast):
9856 (__pthread_cond_broadcast_2_0): ... this.
9857 * old_pthread_cond_destroy.c (__old_pthread_cond_destroy):
9859 (__pthread_cond_destroy_2_0): ... this.
9860 * old_pthread_cond_init.c (__old_pthread_cond_init):
9862 (__pthread_cond_init_2_0): ... this.
9863 * old_pthread_cond_signal.c (__old_pthread_cond_signal):
9865 (__pthread_cond_signal_2_0): ... this.
9866 * old_pthread_cond_wait.c (__old_pthread_cond_wait):
9868 (__pthread_cond_wait_2_0): ... this.
9869 * pthread_cond_destroy.c: Include shlib-compat.h.
9870 (pthread_cond_destroy): Change strong_alias into versioned_symbol.
9871 * pthread_cond_init.c: Include shlib-compat.h.
9872 (pthread_cond_init): Change strong_alias into versioned_symbol.
9873 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_cond_*
9874 fields to ptr___pthread_cond_* and add ptr___pthread_cond_*_2_0
9876 (__pthread_cond_broadcast_2_0, __pthread_cond_destroy_2_0,
9877 __pthread_cond_init_2_0, __pthread_cond_signal_2_0,
9878 __pthread_cond_wait_2_0): New prototypes.
9879 (__old_pthread_cond_broadcast, __old_pthread_cond_destroy,
9880 __old_pthread_cond_init, __old_pthread_cond_signal,
9881 __old_pthread_cond_wait): Removed.
9882 * init.c: Include shlib-compat.h.
9883 (pthread_functions): Guard ptr___pthread_attr_init_2_0
9884 initialization with SHLIB_COMPAT (GLIBC_2_0, GLIBC_2_1).
9885 Rename ptr_pthread_cond_* to ptr___pthread_cond_*, initialize
9886 ptr___pthread_cond_*_2_0 fields.
9887 * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
9888 pthread_cond_*@GLIBC_2.0 compatibility symbols.
9890 * sysdeps/pthread/sigaction.c (SIGCANCEL): Only define if
9891 LIBC_SIGACTION was not yet defined.
9892 [!defined LIBC_SIGACTION]: Define LIBC_SIGACTION, #include self.
9893 [!defined LIBC_SIGACTION] (__sigaction): New function and
9895 [!defined LIBC_SIGACTION] (sigaction): New weak_alias.
9896 [defined LIBC_SIGACTION]: #include_next <sigaction.c>.
9898 2003-01-02 Jakub Jelinek <jakub@redhat.com>
9900 * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
9902 2003-01-02 Ulrich Drepper <drepper@redhat.com>
9904 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
9905 New, larger type definition.
9906 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: New condvar
9908 * Versions [libpthread]: Add definitions for new pthread_cond_*
9909 interfaces for version GLIBC_2.3.2.
9910 * pthread_cond_init.c: Update initialization for new type definition.
9911 * Makefile (libpthread-routines): Remove pthread_cond_wait,
9912 pthread_cond_timedwait, pthread_cond_signal, and
9913 pthread_cond_broadcast. Add old_pthread_cond_init,
9914 old_pthread_cond_destroy, old_pthread_cond_wait,
9915 old_pthread_cond_timedwait, old_pthread_cond_signal, and
9916 old_pthread_cond_broadcast.
9917 * old_pthread_cond_broadcast.c: New file.
9918 * old_pthread_cond_destroy.c: New file.
9919 * old_pthread_cond_init.c: New file.
9920 * old_pthread_cond_signal.c: New file.
9921 * old_pthread_cond_timedwait.c: New file.
9922 * old_pthread_cond_wait.c: New file.
9923 * pthreadP.h: Add prototypes for the compatibility interfaces.
9925 * pthread_cond_destroy.c: Don't include <errno.h>.
9927 2003-01-01 Ulrich Drepper <drepper@redhat.com>
9929 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Avoid
9930 unnecessary zero offset when addressing MUTEX.
9932 2002-12-31 Ulrich Drepper <drepper@redhat.com>
9934 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
9936 * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
9937 for __register_atfork.
9939 2002-12-31 Jakub Jelinek <jakub@redhat.com>
9941 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use __ASSEMBLER__
9942 instead of ASSEMBLER test macro.
9944 * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
9945 __libc_current_sigrtmax): Add libc_hidden_def.
9947 * sysdeps/pthread/list.h: Remove assert.h include.
9949 2002-12-31 Ulrich Drepper <drepper@redhat.com>
9951 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Use
9952 __pthread_initialize_minimal_internal not
9953 __pthread_initialize_minimal.
9955 2002-12-30 Ulrich Drepper <drepper@redhat.com>
9957 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Mark
9958 __pthread_initialize_minimal as hidden.
9960 * init.c (__pthread_initialize_minimal_internal): Don't mark as
9963 2002-12-31 Jakub Jelinek <jakub@redhat.com>
9965 * Makefile ($(inst_libdir)/libpthread.so): Depend on
9966 $(common-objpfx)format.lds, include that into the output script.
9968 (extra-B-pthread.so): Change linuxthreads/ into nptl/.
9970 2002-12-28 Andreas Jaeger <aj@suse.de>
9972 * sysdeps/unix/sysv/linux/xstatconv.c (xstat_conv): Adjust for
9973 nsec resolution changes.
9974 (xstat64_conv): Likewise.
9975 (xstat32_conv): Likewise.
9976 * sysdeps/unix/sysv/linux/kernel_stat.h: Add nsec resolution for
9978 * sysdeps/unix/sysv/linux/bits/stat.h: Add nsec resolution for
9979 structs stat and stat64.
9980 * time/time.h (__timespec_defined): Define for __USE_MISC.
9981 * io/sys/stat.h [__USE_MISC]: Define __need_timespec for struct stat.
9983 2002-12-30 Jakub Jelinek <jakub@redhat.com>
9985 * forward.c (FORWARD2): Renamed from FORWARD3. Remove unused export
9987 (pthread_attr_init_2_0, pthread_attr_init_2_1): Use FORWARD macro.
9988 (pthread_exit): Use strong_alias to avoid warnings.
9989 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_exit
9990 and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
9991 ptr___pthread_attr_init_2_*.
9992 * init.c (pthread_functions): Adjust.
9994 2002-12-29 Ulrich Drepper <drepper@redhat.com>
9996 * forward.c: Make all functions available by default again. It
9997 caused too much trouble.
9999 * pt-siglongjmp.c: Removed.
10001 2002-12-28 Jakub Jelinek <jakub@redhat.com>
10003 * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
10004 (SYSINFO_OFFSET, MULTIPLE_THREADS_OFFSET): Remove.
10005 * sysdeps/i386/Makefile: New file.
10006 * sysdeps/i386/tcb-offsets.sym: New file.
10007 * sysdeps/pthread/tcb-offsets.h: New file.
10008 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
10009 Remove MULTIPLE_THREADS_OFFSET and SYSINFO_OFFSET checks.
10011 * sysdeps/unix/sysv/linux/Versions [libc] (GLIBC_PRIVATE): Move
10012 __register_atfork...
10013 (GLIBC_2.3.2): ...here.
10015 2002-12-28 Ulrich Drepper <drepper@redhat.com>
10017 * sysdeps/pthread/pthread.h: Mark pthread_attr_getstackaddr and
10018 pthread_attr_setstackaddr with __attribute_deprecated__.
10020 2002-12-27 Jakub Jelinek <jakub@redhat.com>
10022 * pt-system.c (system): Remove cancellation handling.
10023 * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
10024 cancellation routines.
10026 2002-12-28 Ulrich Drepper <drepper@redhat.com>
10028 * descr.h: Include <dl-sysdep.h>.
10029 (struct pthread): Move header.data.list to the back of the struct.
10030 * sysdeps/i386/tls.h (tcbhead_t): Move list to the back of the struct.
10031 (MULTIPLE_THREADS_OFFSET): Adjust offset.
10032 (SYSINFO_OFFSEET): Likewise.
10034 2002-12-27 Jakub Jelinek <jakub@redhat.com>
10036 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h (USE_DL_SYSINFO):
10038 (DL_SYSINFO_DEFAULT): Cast to uintptr_t to avoid warnings.
10039 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h (NEED_DL_SYSINFO,
10040 DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION): Define.
10041 (USE_DL_SYSINFO): Undef.
10043 2002-12-22 Jakub Jelinek <jakub@redhat.com>
10045 * Makefile (tests-reverse): Use $(objpfx)../libc.so instead of
10046 $(common-objpfx)libc.so.
10047 * tst-cancel4.c (tf_write, tf_writev): Increase buf sizes so that
10048 it is bigger than pipe buffer size even on arches with bigger
10050 (tf_usleep): Cast usleep argument to useconds_t to avoid warnings.
10052 2002-12-25 Ulrich Drepper <drepper@redhat.com>
10054 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Implement
10055 correct errno access for case that USE___THREAD is not defined.
10057 2002-12-24 Ulrich Drepper <drepper@redhat.com>
10059 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Add missing #endif.
10060 Patch by Marijn Ros <marijn@mad.scientist.com>.
10062 2002-12-22 Roland McGrath <roland@redhat.com>
10064 * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
10066 2002-12-20 Ulrich Drepper <drepper@redhat.com>
10068 * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_inexpensive): Define.
10070 2002-12-19 Ulrich Drepper <drepper@redhat.com>
10072 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Don't define
10073 NEED_DL_SYSINFO since no processor < i686 had the sysenter opcode.
10074 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: New file.
10076 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Use ENTER_KERNEL instead
10078 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
10079 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Likewise.
10080 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Likewise.
10081 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
10082 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
10083 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Likewise.
10084 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Likewise.
10085 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
10087 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add support for using
10089 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
10091 * sysdeps/i386/tls.h: Unconditionally include <dl-sysdep.h>.
10093 * allocatestack.c (allocate_stack) [NEED_DL_SYSINFO]: Set sysinfo
10095 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Check
10096 that sysinfo is properly initialized.
10097 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define RTLD_PRIVATE_ERRNO
10098 to 1 only for ld.so.
10100 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
10101 RTLD_CORRECT_DYNAMIC_WEAK.
10103 2002-12-19 Jakub Jelinek <jakub@redhat.com>
10105 * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
10106 Use return 0 as 6th argument to FORWARD4.
10107 * pthread_equal.c: Include pthreadP.h instead of pthread.h.
10109 2002-12-18 Ulrich Drepper <drepper@redhat.com>
10111 * descr.h (struct pthread) [NEED_DL_SYSINFO]: Add sysinfo member.
10112 * sysdeps/i386/tls.h (tcbhead_t): Add sysinfo member.
10113 Define SYSINFO_OFFSEET if NEED_DL_SYSINFO is defined.
10114 (INIT_SYSINFO): New #define.
10115 (TLS_TP_INIT): Use INIT_SYSINFO.
10116 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
10117 At test to make sure SYSINFO_OFFSET value is correct.
10118 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
10120 2002-12-18 Jakub Jelinek <jakub@redhat.com>
10122 * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
10123 * sysdeps/unix/sysv/linux/raise.c (gsignal): Add weak alias to raise.
10124 * Versions [libc: GLIBC_2.0]: Add pthread_attr_init.
10125 [libpthread: GLIBC_2.1]: Remove __pthread_rwlock_init,
10126 __pthread_rwlock_destroy, __pthread_rwlock_rdlock,
10127 __pthread_rwlock_wrlock, __pthread_rwlock_unlock,
10128 __pthread_rwlock_tryrdlock and __pthread_rwlock_trywrlock.
10130 2002-12-18 Ulrich Drepper <drepper@redhat.com>
10132 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use ENTER_KERNEL
10133 macro instead of using int $0x80 directly.
10135 * sysdeps/pthread/bits/stdio-lock.h: New file.
10136 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: New file.
10137 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: New file.
10138 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: New file.
10139 * Makefile (routines): Add libc-lowlevelmutex.
10141 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Remove
10142 __i686.get_pc_thunk.dx.
10144 2002-12-17 Jakub Jelinek <jakub@redhat.com>
10146 * Makefile (libpthread-shared-only-routines): Add pt-allocrtsig.
10147 (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
10148 ($(objpfx)tst-cancel-wrappers.out): New rule.
10149 * tst-cancel-wrappers.sh: New test.
10150 * tst-locale1.c: Include signal.h.
10151 (uselocale): Test static linking of __libc_current_sigrt*.
10153 2002-12-17 Ulrich Drepper <drepper@redhat.com>
10155 * Makefile (tests): Add tst-cancel6.
10156 * tst-cancel6.c: New file
10158 2002-12-17 Jakub Jelinek <jakub@redhat.com>
10160 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
10161 Define meaningfully for assembler as well.
10162 * pthreadP.h (struct pthread_functions): Remove
10163 ptr_pthread_attr_init field. Add ptr_pthread_attr_init_2_0
10164 and ptr_pthread_attr_init_2_1 fields.
10165 * init.c (pthread_functions): Initialize ptr_pthread_attr_init_2_0
10166 and ptr_pthread_attr_init_2_1 instead of ptr_pthread_attr_init.
10167 * forward.c (FORWARD4): Renamed from FORWARD3. Add export argument.
10168 (FORWARD3): Define using FORWARD4.
10169 (pthread_attr_init): Provide both @GLIBC_2.0 and @@GLIBC_2.1
10171 * pt-system.c: Remove duplicate stdlib.h include.
10173 2002-12-16 Ulrich Drepper <drepper@redhat.com>
10175 * sem_init.c: Define sem_init@GLIBC_2.0.
10176 * sem_destroy.c: Define sem_destroy@GLIBC_2.0.
10177 * sem_getvalue.c: Define sem_getvalue@GLIBC_2.0.
10179 * flockfile.c: Moved to...
10180 * sysdeps/pthread/flockfile.c: ...here. New file.
10181 * funlockfile.c: Moved to...
10182 * sysdeps/pthread/funlockfile.c: ...here. New file.
10183 * ftrylockfile.c: Moved to...
10184 * sysdeps/pthread/ftrylockfile.c: ...here. New file.
10186 2002-12-16 Jakub Jelinek <jakub@redhat.com>
10188 * libc-cancellation.c: Guard both function with
10189 #if !defined NOT_IN_libc.
10190 * Makefile (libpthread-routines): Use ptw-, not pt- prefix for the
10191 automatically provided pthread wrappers.
10192 * pthreadP.h (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define to
10193 CANCEL_* if IS_IN_libpthread and to dummy versions if not in libc
10195 * pt-open.c: Removed.
10196 * pt-fcntl.c: Removed.
10197 * pt-fsync.c: Removed.
10198 * pt-lseek.c: Removed.
10199 * pt-msgrcv.c: Removed.
10200 * pt-msgsnd.c: Removed.
10201 * pt-msync.c: Removed.
10202 * pt-nanosleep.c: Removed.
10203 * pt-open64.c: Removed.
10204 * pt-pause.c: Removed.
10205 * pt-pread.c: Removed.
10206 * pt-pread64.c: Removed.
10207 * pt-pwrite.c: Removed.
10208 * pt-pwrite64.c: Removed.
10209 * pt-read.c: Removed.
10210 * pt-recv.c: Removed.
10211 * pt-recvfrom.c: Removed.
10212 * pt-recvmsg.c: Removed.
10213 * pt-send.c: Removed.
10214 * pt-sendto.c: Removed.
10215 * pt-sigtimedwait.c: Removed.
10216 * pt-sigwait.c: Removed.
10217 * pt-wait.c: Removed.
10218 * pt-waitpid.c: Removed.
10219 * pt-write.c: Removed.
10220 * pt-accept.c: Removed.
10221 * pt-close.c: Removed.
10222 * pt-connect.c: Removed.
10223 * pt-lseek64.c: Removed.
10224 * pt-sendmsg.c: Removed.
10225 * pt-tcdrain.c: Removed.
10227 2002-12-15 Ulrich Drepper <drepper@redhat.com>
10229 * init.c (__pthread_initialize_minimal_internal): Renamed from
10230 __pthread_initialize_minimal. Make old name an alias. This
10231 converts a normal relocation into a relative relocation.
10233 * pt-fcntl.c (__fcntl): Use fcntl64 syscall, not fcntl.
10235 * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
10236 readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
10237 * Makefile (libpthread-routines): Remove pt-creat, pt-poll,
10238 pt-pselect, pt-readv, pt-select, pt-sigpause, pt-sigsuspend,
10239 pt-sigwaitinfo, pt-waitid, and pt-writev.
10240 * pt-creat.c: Removed.
10241 * pt-poll.c: Removed.
10242 * pt-pselect.c: Removed.
10243 * pt-readv.c: Removed.
10244 * pt-select.c: Removed.
10245 * pt-sigpause.c: Removed.
10246 * pt-sigsuspend.c: Removed.
10247 * pt-sigwaitinfo.c: Removed.
10248 * pt-waitid.c: Removed.
10249 * pt-writev.c: Removed.
10251 * init.c (pthread_functions): New variable.
10252 (__pthread_initialize_minimal): Pass pointer to pthread_functions
10253 (or NULL) to __libc_pthread_init.
10254 * forward.c: Rewrite to use __libc:pthread_functions array to get
10255 function addresses.
10256 * sysdeps/unix/sysv/linux/fork.h: Remove __libc_pthread_init
10258 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
10259 Take new parameter. Copy content of variable pointed to by it
10260 to __libc_pthread_init.
10262 * pthreadP.h (struct pthread_functions): New type.
10263 (__libc_pthread_init): Declare.
10265 * pthread_attr_destroy.c: Add namespace protected alias.
10266 * pthread_attr_getdetachstate.c: Likewise.
10267 * pthread_attr_getinheritsched.c: Likewise.
10268 * pthread_attr_getschedparam.c: Likewise.
10269 * pthread_attr_getschedpolicy.c: Likewise.
10270 * pthread_attr_getscope.c: Likewise.
10271 * pthread_attr_setdetachstate.c: Likewise.
10272 * pthread_attr_setinheritsched.c: Likewise.
10273 * pthread_attr_setschedparam.c: Likewise.
10274 * pthread_attr_setschedpolicy.c: Likewise.
10275 * pthread_attr_setscope.c: Likewise.
10276 * pthread_cond_broadcast.c: Likewise.
10277 * pthread_cond_destroy.c: Likewise.
10278 * pthread_cond_init.c: Likewise.
10279 * pthread_cond_signal.c: Likewise.
10280 * pthread_cond_wait.c: Likewise.
10281 * pthread_condattr_destroy.c: Likewise.
10282 * pthread_condattr_init.c: Likewise.
10283 * pthread_equal.c: Likewise.
10284 * pthread_exit.c: Likewise.
10285 * pthread_getschedparam.c: Likewise.
10286 * pthread_self.c: Likewise.
10287 * pthread_setcancelstate.c: Likewise.
10288 * pthread_setschedparam.c: Likewise.
10289 * pthread_mutex_destroy.c: Likewise.
10290 * pthread_mutex_init.c: Likewise.
10291 * pthreadP.h: Add prototypes for the aliases.
10293 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Set
10294 multiple_threads member in correct TCB to 1.
10296 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define
10297 SINGLE_THREAD_P. If in libc or libpthread examine multiple_thread
10298 member of thread decriptor, otherwise return unconditionally 1.
10300 2002-12-14 Ulrich Drepper <drepper@redhat.com>
10302 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Changes folded into the
10303 regular Linux version. Remove file.
10304 * sysdeps/unix/sysv/linux/connect.S: Likewise. Remove file.
10305 * sysdeps/unix/sysv/linux/llseek.c: Likewise. Remove file.
10306 * sysdeps/unix/sysv/linux/msgrcv.c: Likewise. Remove file.
10307 * sysdeps/unix/sysv/linux/msgsnd.c: Likewise. Remove file.
10308 * sysdeps/unix/sysv/linux/open64.c: Likewise. Remove file.
10309 * sysdeps/unix/sysv/linux/poll.c: Likewise. Remove file.
10310 * sysdeps/unix/sysv/linux/pread.c: Likewise. Remove file.
10311 * sysdeps/unix/sysv/linux/pread64.c: Likewise. Remove file.
10312 * sysdeps/unix/sysv/linux/pselect.c: Likewise. Remove file.
10313 * sysdeps/unix/sysv/linux/pwrite.c: Likewise. Remove file.
10314 * sysdeps/unix/sysv/linux/pwrite64.c: Likewise. Remove file.
10315 * sysdeps/unix/sysv/linux/readv.c: Likewise. Remove file.
10316 * sysdeps/unix/sysv/linux/recv.S: Likewise. Remove file.
10317 * sysdeps/unix/sysv/linux/recvfrom.S: Likewise. Remove file.
10318 * sysdeps/unix/sysv/linux/recvmsg.S: Likewise. Remove file.
10319 * sysdeps/unix/sysv/linux/send.S: Likewise. Remove file.
10320 * sysdeps/unix/sysv/linux/sendmsg.S: Likewise. Remove file.
10321 * sysdeps/unix/sysv/linux/sendto.S: Likewise. Remove file.
10322 * sysdeps/unix/sysv/linux/sigpause.c: Likewise. Remove file.
10323 * sysdeps/unix/sysv/linux/sigsuspend.c: Likewise. Remove file.
10324 * sysdeps/unix/sysv/linux/sigtimedwait.c: Likewise. Remove file.
10325 * sysdeps/unix/sysv/linux/sigwait.c: Likewise. Remove file.
10326 * sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise. Remove file.
10327 * sysdeps/unix/sysv/linux/system.c: Likewise. Remove file.
10328 * sysdeps/unix/sysv/linux/tcdrain.c: Likewise. Remove file.
10329 * sysdeps/unix/sysv/linux/wait.c: Likewise. Remove file.
10330 * sysdeps/unix/sysv/linux/waitid.c: Likewise. Remove file.
10331 * sysdeps/unix/sysv/linux/waitpid.c: Likewise. Remove file.
10332 * sysdeps/unix/sysv/linux/writev.c: Likewise. Remove file.
10333 * sysdeps/unix/sysv/linux/i386/fcntl.c: Likewise. Remove file.
10335 2002-12-14 Jakub Jelinek <jakub@redhat.com>
10337 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
10338 * sysdeps/unix/sysv/linux/open.c: Removed.
10339 * sysdeps/unix/sysv/linux/fsync.c: Removed.
10340 * sysdeps/unix/sysv/linux/lseek.c: Removed.
10341 * sysdeps/unix/sysv/linux/msync.c: Removed.
10342 * sysdeps/unix/sysv/linux/read.c: Removed.
10343 * sysdeps/unix/sysv/linux/close.c: Removed.
10344 * sysdeps/unix/sysv/linux/creat.c: Removed.
10345 * sysdeps/unix/sysv/linux/nanosleep.c: Removed.
10346 * sysdeps/unix/sysv/linux/pause.c: Removed.
10347 * sysdeps/unix/sysv/linux/select.c: Removed.
10348 * sysdeps/unix/sysv/linux/write.c: Removed.
10350 2002-12-14 Ulrich Drepper <drepper@redhat.com>
10352 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Check multiple_threads
10353 element in TCB to see whether locking is needed.
10355 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Check that
10356 MULTIPLE_THREADS_OFFSET value is correct.
10358 * sysdeps/unix/sysv/linux/close.c: New file.
10359 * sysdeps/unix/sysv/linux/connect.S: New file.
10360 * sysdeps/unix/sysv/linux/creat.c: New file.
10361 * sysdeps/unix/sysv/linux/fsync.c: New file.
10362 * sysdeps/unix/sysv/linux/llseek.c: New file.
10363 * sysdeps/unix/sysv/linux/lseek.c: New file.
10364 * sysdeps/unix/sysv/linux/msgrcv.c: New file.
10365 * sysdeps/unix/sysv/linux/msgsnd.c: New file.
10366 * sysdeps/unix/sysv/linux/msync.c: New file.
10367 * sysdeps/unix/sysv/linux/nanosleep.c: New file.
10368 * sysdeps/unix/sysv/linux/open.c: New file.
10369 * sysdeps/unix/sysv/linux/open64.c: New file.
10370 * sysdeps/unix/sysv/linux/pause.c: New file.
10371 * sysdeps/unix/sysv/linux/poll.c: New file.
10372 * sysdeps/unix/sysv/linux/pread.c: New file.
10373 * sysdeps/unix/sysv/linux/pread64.c: New file.
10374 * sysdeps/unix/sysv/linux/pselect.c: New file.
10375 * sysdeps/unix/sysv/linux/pwrite.c: New file.
10376 * sysdeps/unix/sysv/linux/pwrite64.c: New file.
10377 * sysdeps/unix/sysv/linux/readv.c: New file.
10378 * sysdeps/unix/sysv/linux/recv.S: New file.
10379 * sysdeps/unix/sysv/linux/recvfrom.S: New file.
10380 * sysdeps/unix/sysv/linux/recvmsg.S: New file.
10381 * sysdeps/unix/sysv/linux/select.c: New file.
10382 * sysdeps/unix/sysv/linux/send.S: New file.
10383 * sysdeps/unix/sysv/linux/sendmsg.S: New file.
10384 * sysdeps/unix/sysv/linux/sendto.S: New file.
10385 * sysdeps/unix/sysv/linux/sigpause.c: New file.
10386 * sysdeps/unix/sysv/linux/sigsuspend.c: New file.
10387 * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
10388 * sysdeps/unix/sysv/linux/sigwait.c: New file.
10389 * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
10390 * sysdeps/unix/sysv/linux/system.c: New file.
10391 * sysdeps/unix/sysv/linux/tcdrain.c: New file.
10392 * sysdeps/unix/sysv/linux/wait.c: New file.
10393 * sysdeps/unix/sysv/linux/waitid.c: New file.
10394 * sysdeps/unix/sysv/linux/waitpid.c: New file.
10395 * sysdeps/unix/sysv/linux/writev.c: New file.
10396 * sysdeps/unix/sysv/linux/i386/fcntl.c: New file.
10398 * pt-readv.c: Fix comment.
10400 2002-12-14 Jakub Jelinek <jakub@redhat.com>
10402 * tst-cleanup1.c: Include stdlib.h.
10404 * tst-cancel5.c: New test.
10405 * Makefile (tests): Add tst-cancel5.
10406 (tst-cancel5): Link against libc.so libpthread.so in that order.
10408 2002-12-13 Ulrich Drepper <drepper@redhat.com>
10410 * forward.c (test_loaded): Prevent recursive calls.
10412 * Makefile (routines): Add libc-cancellation.
10413 * libc-cancellation.c: New file.
10414 * descr.h (struct pthread): Add multiple_threads field.
10415 * allocatestack.c (allocate_stack): Initialize multiple_header field of
10416 new thread descriptor to 1.
10417 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread):
10418 Initialize multiple_thread field after successful thread creation.
10419 * cancellation.c (__do_cancel): Move to pthreadP.h.
10420 (__pthread_enable_asynccancel): Remove parameter from __do_cancel call.
10421 (__pthread_disable_asynccancel): Add internal_function attribute.
10422 * init.c (sigcancel_handler): Remove parameter from __do_cancel call.
10423 * pthread_setcancelstate.c: Likewise.
10424 * pthread_setcanceltype.c: Likewise.
10425 * pthread_exit.c: Likewise.
10426 * pthreadP.h (CANCELLATION_P): Likewise.
10427 (__do_cancel): Define as static inline.
10428 (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): New #defines.
10429 (__libc_enable_asynccancel, __libc_disable_asynccancel): New
10431 * sysdeps/i386/tls.h (tcbhead_t): Add list and multiple_threads
10432 fields. Define MULTIPLE_THREADS_OFFSET.
10433 * sysdeps/pthread/bits/libc-lock.h: Remove __libc_locking_needed
10435 * sysdeps/unix/sysv/linux/accept.S: New file.
10436 * sysdeps/unix/sysv/linux/read.c: New file.
10437 * sysdeps/unix/sysv/linux/write.c: New file.
10438 * sysdeps/unix/sysv/linux/i386/pt-socket.S: New file.
10439 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove definition and
10440 initialization of __libc_locking_needed.
10441 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't use
10442 __libc_locking_needed, use multiple_threads field in TCB.
10443 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
10445 2002-12-12 Ulrich Drepper <drepper@redhat.com>
10447 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: Use i486
10449 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: Likewise.
10451 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Correct
10452 access to __libc_locking_needed for PIC.
10454 2002-12-12 Jakub Jelinek <jakub@redhat.com>
10456 * sysdeps/pthread/bits/libc-lock.h (__libc_locking_needed): Only
10457 declare for libc.so.
10458 (__libc_lock_init, __libc_lock_init_recursive): Change into comma
10460 (__libc_lock_lock): Put into statement expression.
10461 (__libc_lock_unlock): Remove trailing semicolon.
10462 * sysdeps/unix/sysv/linux/fork.h (__libc_pthread_init): Fix typo.
10464 2002-12-12 Roland McGrath <roland@redhat.com>
10466 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use asm operand with
10467 "m" constraint to refer to __libc_locking_needed. Declare it here.
10469 2002-12-12 Ulrich Drepper <drepper@redhat.com>
10471 * sysdeps/unix/sysv/linux/fork-gen.c: Renamed to...
10472 * sysdeps/unix/sysv/linux/libc_pthread_init.c: ...this.
10473 Initialize __libc_locking_needed.
10474 * init.c (__pthread_initialize_minimal): Call __libc_pthread_init
10475 instead of __register_pthread_fork_handler.
10476 * sysdeps/pthread/bits/libc-lock.h: Declare __libc_locking_needed.
10477 * sysdeps/unix/sysv/linux/Makefile (sysdep_routimes): Replace
10478 fork-gen with libc_pthread_init.
10479 * sysdeps/unix/sysv/linux/Versions: Use __libc_pthread_init instead
10480 of __register_pthread_fork_handler.
10481 * sysdeps/unix/sysv/linux/fork.h: Declare __libc_pthread_init instead
10482 of __register_pthread_fork_handler.
10483 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use
10484 __libc_locking_needed to determine whether lock prefix can be avoided.
10485 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
10487 2002-12-11 Ulrich Drepper <drepper@redhat.com>
10489 * Makefile (tests): Add tst-cleanup1.
10490 * tst-cleanup1.c: New file.
10491 * cancellation.c (__cleanup_thread): Removed.
10492 (__do_cancel): Remove call to __cleanup_thread.
10493 * pthreadP.h: Remove __cleanup_thread prorotype.
10495 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
10496 Remember function and argument even if cancellation handler
10497 function is not available.
10498 (__libc_cleanup_region_end): Execute registered function directly if
10499 pthread functions are not available.
10500 (__libc_cleanup_end): Likewise.
10502 * init.c (__pthread_initialize_minimal): Fix initialization in
10503 static lib by preventing gcc from being too clever.
10505 2002-12-10 Ulrich Drepper <drepper@redhat.com>
10507 * init.c (__pthread_initialize_minimal): Remove unneccesary
10510 * Makefile (tests): We can run tst-locale2 now.
10512 2002-12-09 Ulrich Drepper <drepper@redhat.com>
10514 * Versions: Remove duplicated sigwait entry.
10516 2002-12-08 Ulrich Drepper <drepper@redhat.com>
10518 * pthreadP.h: Enable pthread_cleanup_{push,pop} optimizations only
10521 * pt-fcntl.c (__fcntl): Initialize oldtype to avoid warning.
10523 * pthreadP.h: Declare __pthread_enable_asynccancel and
10524 __pthread_disable_asynccancel.
10525 (CANCEL_ASYNC): Use __pthread_enable_asynccancel.
10526 (CANCEL_RESET): Use __pthread_disable_asynccancel.
10527 * cancellation.c (__pthread_enable_asynccancel): New function.
10528 (__pthread_disable_asynccancel): New function.
10529 * pt-accept.c: Adjust for CANCEL_ASYNC and CANCEL_RESET change.
10530 * pt-close.c: Likewise.
10531 * pt-connect.c: Likewise.
10532 * pt-creat.c: Likewise.
10533 * pt-fcntl.c: Likewise.
10534 * pt-fsync.c: Likewise.
10535 * pt-lseek.c: Likewise.
10536 * pt-lseek64.c: Likewise.
10537 * pt-msgrcv.c: Likewise.
10538 * pt-msgsnd.c: Likewise.
10539 * pt-msync.c: Likewise.
10540 * pt-nanosleep.c: Likewise.
10541 * pt-open.c: Likewise.
10542 * pt-open64.c: Likewise.
10543 * pt-pause.c: Likewise.
10544 * pt-poll.c: Likewise.
10545 * pt-pread.c: Likewise.
10546 * pt-pread64.c: Likewise.
10547 * pt-pselect.c: Likewise.
10548 * pt-pwrite.c: Likewise.
10549 * pt-pwrite64.c: Likewise.
10550 * pt-read.c: Likewise.
10551 * pt-readv.c: Likewise.
10552 * pt-recv.c: Likewise.
10553 * pt-recvfrom.c: Likewise.
10554 * pt-recvmsg.c: Likewise.
10555 * pt-select.c: Likewise.
10556 * pt-send.c: Likewise.
10557 * pt-sendmsg.c: Likewise.
10558 * pt-sendto.c: Likewise.
10559 * pt-sigpause.c: Likewise.
10560 * pt-sigsuspend.c: Likewise.
10561 * pt-sigtimedwait.c: Likewise.
10562 * pt-sigwait.c: Likewise.
10563 * pt-sigwaitinfo.c: Likewise.
10564 * pt-system.c: Likewise.
10565 * pt-tcdrain.c: Likewise.
10566 * pt-wait.c: Likewise.
10567 * pt-waitid.c: Likewise.
10568 * pt-waitpid.c: Likewise.
10569 * pt-write.c: Likewise.
10570 * pt-writev.c: Likewise.
10571 * pthread_join.c: Likewise.
10572 * pthread_timedjoin.c: Likewise.
10574 * pt-sigpause.c (sigsuspend): Call __sigsuspend.
10575 (__xpg_sigpause): New function.
10576 * Versions (libpthread:GLIBC_2.3.2): Add __xpg_sigpause.
10578 2002-12-07 Ulrich Drepper <drepper@redhat.com>
10580 * Makefile (CFLAGS-ftrylockfile.c): Add -D_IO_MTSAFE_IO.
10582 * cleanup.c: Move declarations of _GI_pthread_cleanup_push and
10583 _GI_pthread_cleanup_pop to pthreadP.h.
10585 * ftrylockfile.c: Use _IO_lock_trylock instead of
10586 pthread_mutex_trylock.
10588 * pthreadP.h (CANCEL_ASYNC): Use __pthread_setcanceltype.
10589 (CANCEL_RESET): Likewise.
10590 (__pthread_setcanceltype_): Declare.
10591 (__pthread_mutex_lock_internal): Declare.
10592 (__pthread_mutex_unlock_internal): Declare.
10593 (__pthread_once_internal): Declare.
10594 (pthread_cleanup_push): Redefine using _GI_pthread_cleanup_push.
10595 (pthread_cleanup_pop): Redefine using _GI_pthread_cleanup_pop.
10597 * pthread_cond_timedwait.c: Use INTUSE is calls to pthread_mutex_lock
10598 and pthread_mutex_unlock.
10599 * pthread_cond_wait.c: Likewise.
10600 * pthread_mutex_lock.c: Use INTDEF to define alias if needed.
10601 * pthread_mutex_unlock.c: Likewise.
10603 * pthread_setcanceltype.c: Add additional alias
10604 __pthread_setcanceltype.
10606 * sem_unlink.c (sem_unlink): Use __pthread_once with INTDEF.
10607 * sem_open.c (sem_open): Likewise.
10608 Use __libc_open, __libc_write, and __libc_close instead of
10609 open, write, and close respectively.
10611 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_trylock_internal):
10612 Rewrite as statement expression since it must return a value.
10614 * pthread_cancel.c: Use __pthread_kill instead of pthread_kill.
10615 * sysdeps/unix/sysv/linux/pthread_kill.c: Define additional alias
10618 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Define additional
10619 alias __pthread_once_internal.
10621 * sysdeps/unix/sysv/linux/raise.c: Use libc_hidden_def for raise.
10623 2002-12-06 Ulrich Drepper <drepper@redhat.com>
10625 * Makefile (tests): Add tst-stdio1 and tst-stdio2.
10626 * tst-stdio1.c: New file.
10627 * tst-stdio2.c: New file.
10629 * init.c (__pthread_initialize_minimal): Correct INIT_LIST_HEAD use.
10631 * Makefile (tests): Comment out tst-locale2 for now.
10632 (CFLAGS-flockfile.c, CFLAGS-funlockfile.c): Define to -D_IO_MTSAFE_IO.
10634 * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-fork.c to
10636 * sysdeps/unix/sysv/linux/fork.c: Include <bits/stdio-lock.h>.
10637 Use _IO_lock_init instead of explicit assignment.
10639 * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
10640 Define __libc_lock_* and __libc_lock_recursive macros with
10641 lowlevellock macros, not pthread mutexes.
10643 * flockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_lock instead
10644 of pthread_mutex_lock.
10645 * funlockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_unlock
10646 instead of pthread_mutex_unlock.
10648 2002-12-06 Roland McGrath <roland@redhat.com>
10650 * allocatestack.c (__stack_user): Use uninitialized defn.
10651 * init.c (__pthread_initialize_minimal): Initialize it here.
10653 2002-12-05 Roland McGrath <roland@redhat.com>
10655 * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
10657 * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
10659 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Add
10660 missing & here too.
10662 2002-12-05 Ulrich Drepper <drepper@redhat.com>
10664 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
10666 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: New file.
10667 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: New file.
10668 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: New file.
10669 * sysdeps/pthread/bits/libc-lock.h: Use lowlevellock implementation
10670 for __libc_lock_* macros.
10671 * Makefile (routines): Add libc-lowlevellock.
10673 2002-10-09 Roland McGrath <roland@redhat.com>
10675 * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
10676 Under [__PIC__], call the function via the pointer fetched for
10677 comparison rather than a call by name that uses the PLT.
10678 (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
10679 (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
10680 (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
10681 (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
10682 (__libc_key_create, __libc_getspecific, __libc_setspecific): Use it.
10684 2002-12-04 Roland McGrath <roland@redhat.com>
10686 * forward.c (pthread_self): Use FORWARD3 macro to correct return type.
10688 * sysdeps/i386/td_ta_map_lwp2thr.c: Moved from ../nptl_db.
10689 * sysdeps/generic/td_ta_map_lwp2thr.c: New file.
10691 * pthread_create.c (start_thread): Add missing & on __nptl_last_event.
10693 2002-12-04 Ulrich Drepper <drepper@redhat.com>
10695 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Make pthread_t
10696 a completely opaque, non-integer type.
10697 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
10699 2002-12-05 Jakub Jelinek <jakub@redhat.com>
10701 * sysdeps/i386/tls.h: Include stdlib.h.
10702 * sysdeps/x86_64/tls.h: Likewise.
10704 2002-12-04 Ulrich Drepper <drepper@redhat.com>
10706 * Makefile (tests): Add tst-locale2.
10707 (tests-static): Likewise.
10708 * tst-locale2.c: New file.
10710 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Mark asms as
10711 volatile and add memory clobbers to lock operations.
10713 2002-12-03 Ulrich Drepper <drepper@redhat.com>
10715 * sysdeps/i386/i686/bits/atomic.h: Use i486 version.
10716 * sysdeps/i386/i486/bits/atomic.h: New file.
10717 * sysdeps/i386/i586/bits/atomic.h: New file.
10718 * sysdeps/i386/i686/pthread_spin_trylock.S: Define HAVE_CMOV and
10719 include i486 version.
10720 * sysdeps/i386/i486/pthread_spin_trylock.S: New file.
10721 * sysdeps/i386/i586/pthread_spin_trylock.S: New file.
10722 Patch by Marijn Ros <marijn@mad.scientist.com>.
10724 * allocatestack.c (get_cached_stack): Don't crash if we first
10725 found a stack with a larger size then needed.
10726 Reported by Hui Huang <hui.huang@sun.com>.
10728 * Makefile (tests): Add tst-sysconf.
10729 * tst-sysconf.c: New file.
10731 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine
10732 PTHREAD_THREADS_MAX.
10734 2002-12-02 Roland McGrath <roland@redhat.com>
10736 * pthreadP.h (__stack_user, __nptl_create_event, __nptl_death_event):
10737 Declare using hidden_proto instead of attribute_hidden, so there are
10738 non-.hidden static symbols for gdb to find.
10739 (__pthread_keys): Likewise.
10740 * events.c (__nptl_create_event, __nptl_death_event): Add hidden_def.
10741 * allocatestack.c (__stack_user): Likewise.
10742 * pthread_create.c (__pthread_keys): Likewise.
10743 (__nptl_threads_events, __nptl_last_event): Make these static instead
10745 * pthread_key_create.c (__pthread_pthread_keys_max,
10746 __pthread_pthread_key_2ndlevel_size): Renamed from __linuxthreads_*.
10748 2002-12-02 Ulrich Drepper <drepper@redhat.com>
10750 * Makefile (tests): Add tst-locale1. If buid-static is yes link
10752 * tst-locale1.c: New file.
10754 * pthread_cond_timedwait.c: Include <stdlib.h>.
10756 * Makefile (tests): Add tst-fork2 and tst-fork3.
10757 * tst-fork2.c: New file.
10758 * tst-fork3.c: New file.
10760 2002-11-28 Ulrich Drepper <drepper@redhat.com>
10762 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
10764 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
10765 require it to 200112L.
10767 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Use cmov
10768 instruction only if HAVE_CMOV is defined.
10769 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Define HAVE_CMOV.
10771 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: New file.
10773 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: New file.
10775 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: New file.
10777 * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: New file.
10779 2002-11-27 Ulrich Drepper <drepper@redhat.com>
10781 * sysdeps/x86_64/bits/atomic.h: New file.
10783 * sysdeps/i386/i686/bits/atomic.h: Fix asm syntax for 8- and
10786 * sysdeps/unix/sysv/linux/raise.c (raise): Use INTERNAL_SYSCALL if
10787 possible since gettid cannot fail.
10789 * sysdeps/x86_64/pthreaddef.h: New file.
10791 * sysdeps/i386/pthreaddef.h (gettid): Removed.
10793 * sysdeps/x86_64/pthread_spin_init.c: New file.
10794 * sysdeps/x86_64/pthread_spin_lock.c: New file.
10795 * sysdeps/x86_64/pthread_spin_trylock.c: New file.
10796 * sysdeps/x86_64/pthread_spin_unlock.c: New file.
10798 * sysdeps/i386/i686/pthread_spin_trylock.S (pthread_spin_trylock):
10799 Add missing lock prefix. Minute optimization.
10801 * tst-spin2.c (main): Also check successful trylock call.
10803 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use correct
10804 syscall. Fix typo in case INTERNAL_SYSCALL is not used.
10806 * sysdeps/i386/pthread_spin_destroy.c: Moved to...
10807 * sysdeps/pthread/pthread_spin_destroy.c: ...here. New file.
10809 * sysdeps/i386/pthread_sigmask.c: Removed. Use the generic code.
10810 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Return correct
10811 value in case of an error. Add support for INTERNAL_SYSCALL.
10813 * sysdeps/i386/pthread_sigmask.c (pthread_sigmask): Return correct
10814 value in case of an error.
10816 * sysdeps/x86_64/tls.h: New file.
10818 2002-11-26 Ulrich Drepper <drepper@redhat.com>
10820 * sysdeps/i386/tls.h (THREAD_GETMEM_NC): Change interface. It now
10821 takes the array member name and the index as parameters.
10822 (THREAD_SETMEM_NC): Likewise.
10823 * pthread_getspecific.c: Use new THREAD_GETMEM_NC interface.
10824 * pthread_setspecific.c: Use new THREAD_GETMEM_NC and THREAD_SETMEM_NC
10827 * sysdeps/i386/tls.h (THREAD_SETMEM): Use size of member element
10828 to decide which code to use.
10829 (THREAD_SETMEM_NC): Likewise.
10831 * allocatestack.c (queue_stack): Don't remove stack from list here.
10832 Do it in the caller. Correct condition to prematurely terminate
10833 loop to free stacks.
10834 (__deallocate_stack): Remove stack from list here.
10836 2002-11-26 Ulrich Drepper <drepper@redhat.com>
10838 * Makefile (tests): Add tst-stack1.
10839 * tst-stack1.c: New file.
10841 * allocatestack.c (allocate_stack): Initialize the TCB on a user
10844 * pthread_attr_getstack.c: Return bottom of the thread area.
10846 2002-11-25 Ulrich Drepper <drepper@redhat.com>
10848 * Makefile (libpthread-routines): Add pt-allocrtsig and
10849 pthread_kill_other_threads.
10850 * pt-allocrtsig.c: New file.
10851 * pthread_kill_other_threads.c: New file.
10852 * sysdeps/unix/sysv/linux/allocrtsig.c: Add additional aliases for
10853 all three functions.
10854 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
10856 * sysdeps/unix/sysv/linux/Versions (libc:GLIBC_PRIVATE): Export
10857 __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
10858 and __libc_allocate_rtsig_private.
10859 * Versions (libpthread): Export pthread_kill_other_threads_np,
10860 __libc_current_sigrtmin, and __libc_current_sigrtmax.
10862 2002-11-24 Ulrich Drepper <drepper@redhat.com>
10864 * allocatestack.c (allocate_stack): stackaddr in attribute points to
10865 the end of the stack. Adjust computations.
10866 When mprotect call fails dequeue stack and free it.
10867 * pthread_attr_setstack.c: Store top of the stack in stackaddr
10869 * pthread_getattr_np.c: Likewise.
10871 * descr.h (IS_DETACHED): Add some more parenthesis to prevent
10874 2002-11-23 Ulrich Drepper <drepper@redhat.com>
10876 * sysdeps/pthread/pthread.h (pthread_self): __THROW must come before
10877 attribute definitions. Patch by Luca Barbieri <ldb@ldb.ods.org>.
10879 2002-11-22 Ulrich Drepper <drepper@redhat.com>
10881 * pthread_getspecific.c: Optimize access to first 2nd-level array.
10882 * pthread_setspecific.c: Likewise.
10884 2002-11-21 Ulrich Drepper <drepper@redhat.com>
10886 * sysdeps/unix/sysv/linux/i386/createthread.c: Remove CLONE_ flags
10887 definitions. Get them from the official place.
10888 * sysdeps/unix/sysv/linux/i386/fork.c: Likewise.
10890 * sysdeps/unix/sysv/linux/i386/createthread.c: Update CLONE_* flags.
10891 Use new CLONE_ flags in clone() calls.
10893 * sysdeps/unix/sysv/linux/fork.c: Use ARCH_FORK to actually fork.
10894 * sysdeps/unix/sysv/linux/i386/fork.c: New file.
10896 * Versions: Add pthread_* functions for libc.
10897 * forward.c: New file.
10899 * sysdeps/pthread/Makefile (libpthread-sysdeps_routines): Add
10901 * herrno.c: New file.
10904 * Makefile (libpthread-routines): Remove sem_post, sem_wait,
10905 sem_trywait, and sem_timedwait. Add herrno and res.
10906 * sem_init.c: Don't initialize lock and waiters members.
10907 * sem_open.c: Likewise.
10908 * sem_post.c: Removed.
10909 * sem_wait.c: Removed.
10910 * sem_trywait.c: Removed.
10911 * sem_timedwait.c: Removed.
10912 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Complete rewrite.
10913 Includes full implementations of sem_post, sem_wait, sem_trywait,
10915 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Adjust
10916 for new implementation.
10917 * sysdeps/unix/sysv/linux/internaltypes.h (struct sem): Remove lock
10918 and waiters fields.
10920 * tst-sem3.c: Improve error message.
10921 * tst-signal3.c: Likewise.
10923 * init.c (__pthread_initialize_minimal): Use set_tid_address syscall
10924 to tell the kernel about the termination futex and to initialize tid
10925 member. Don't initialize main_thread.
10926 * descr.h (struct pthread): Remove main_thread member.
10927 * cancelllation.c (__do_cancel): Remove code handling main thread.
10928 The main thread is not special anymore.
10930 * allocatestack.c (__reclaim_stacks): Mark stacks as unused. Add
10931 size of the stacks to stack_cache_actsize.
10933 * pt-readv.c: Add missing "defined".
10934 * pt-sigwait.c: Likewise.
10935 * pt-writev.c: Likewise.
10937 2002-11-09 Ulrich Drepper <drepper@redhat.com>
10939 * Versions: Export __connect from libpthread.
10940 Patch by Luca Barbieri <ldb@ldb.ods.org>.
10942 * Makefile (libpthread-routines): Add pt-raise.
10943 * sysdeps/unix/sysv/linux/raise.c: New file.
10944 * sysdeps/unix/sysv/linux/pt-raise.c: New file.
10945 * sysdeps/generic/pt-raise.c: New file.
10947 * pthread_cond_init.c: Initialize all data elements of the condvar
10948 structure. Patch by Luca Barbieri <ldb@ldb.ods.org>.
10950 * pthread_attr_init.c: Actually implement 2.0 compatibility version.
10951 * pthread_create.c: Likewise.
10953 * Makefile (tests): Add tst-key1, tst-key2, tst-key3.
10954 * tst-key1.c: New file.
10955 * tst-key2.c: New file.
10956 * tst-key3.c: New file.
10958 * Versions: Export pthread_detach for version GLIBC_2.0.
10959 Reported by Saurabh Desai <sdesai@austin.ibm.com>.
10961 2002-11-08 Ulrich Drepper <drepper@redhat.com>
10963 * pthread_key_create.c: Terminate search after an unused key was found.
10964 Patch by Luca Barbieri <ldb@ldb.ods.org>.
10966 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Return zero.
10967 Patch by Luca Barbieri <ldb@ldb.ods.org>.
10969 2002-10-10 Ulrich Drepper <drepper@redhat.com>
10971 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Use slow generic
10972 dynamic lookup for errno in PIC.
10974 * allocatestack.c (get_cached_stack): Rearrange code slightly to
10975 release the stack lock as soon as possible.
10976 Call _dl_allocate_tls_init for TCB from the cache to re-initialize
10977 the static TLS block.
10978 (allocate_stack): Call _dl_allocate_tls_init for user-provided stack.
10980 * cancellation.c: Renamed from cancelation.c.
10981 * Makefile: Adjust accordingly.
10982 * pthreadP.h (CANCELLATION_P): Renamed from CANCELATION_P.
10983 * cleanup_defer.c: Use CANCELLATION_P.
10984 * pthread_testcancel.c: Likewise.
10985 * descr.h: Fix spelling in comments.
10986 * init.c: Likewise.
10987 * pthread_getattr_np.c: Likewise.
10988 * pthread_getschedparam.c: Likewise.
10989 * pthread_setschedparam.c: Likewise.
10990 * Versions: Likewise.
10992 * pt-pselect.c: New file.
10993 * Makefile (libpthread-routines): Add pt-pselect.
10994 * Versions: Add pselect.
10996 * tst-cancel4.c: New file.
10997 * Makefile (tests): Add tst-cancel4.
10999 2002-10-09 Ulrich Drepper <drepper@redhat.com>
11001 * pthread_mutex_lock.c: Always record lock ownership.
11002 * pthread_mutex_timedlock.c: Likewise.
11003 * pthread_mutex_trylock.c: Likewise.
11005 * pt-readv.c: New file.
11006 * pt-writev.c: New file.
11007 * pt-creat.c: New file.
11008 * pt-msgrcv.c: New file.
11009 * pt-msgsnd.c: New file.
11010 * pt-poll.c: New file.
11011 * pt-select.c: New file.
11012 * pt-sigpause.c: New file.
11013 * pt-sigsuspend.c: New file.
11014 * pt-sigwait.c: New file.
11015 * pt-sigwaitinfo.c: New file.
11016 * pt-waitid.c: New file.
11017 * Makefile (libpthread-routines): Add pt-readv, pt-writev, pt-creat,
11018 pt-msgrcv, pt-msgsnd, pt-poll, pt-select, pt-sigpause, pt-sigsuspend,
11019 pt-sigwait, pt-sigwaitinfo, and pt-waitid.
11020 * Versions: Add all the new functions.
11022 * tst-exit1.c: New file.
11023 * Makefile (tests): Add tst-exit1.
11025 * sem_timedwait.c: Minor optimization for more optimal fastpath.
11027 2002-10-08 Ulrich Drepper <drepper@redhat.com>
11029 * pt-fcntl.c: Only enable asynchronous cancellation for F_SETLKW.
11031 * pthread_join.c: Enable asynchronous cancellation around lll_wait_tid
11032 call. pthread_join is an official cancellation point.
11033 * pthread_timedjoin.c: Likewise.
11035 * pthread_cond_wait.c: Revert order in which internal lock are dropped
11036 and the condvar's mutex are retrieved.
11037 * pthread_cond_timedwait.c: Likewise.
11038 Reported by dice@saros.East.Sun.COM.
11040 2002-10-07 Ulrich Drepper <drepper@redhat.com>
11042 * pthreadP.h: Cut out all type definitions and move them...
11043 * sysdeps/unix/sysv/linux/internaltypes.h: ...here. New file.
11044 * pthreadP.h: Include <internaltypes.h>.
11046 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Little
11047 performance tweaks.
11049 * sem_trywait.c: Shuffle #includes around to get right order.
11050 * sem_timedwait.c: Likewise.
11051 * sem_post.c: Likewise.
11052 * sem_wait.c: Likewise.
11054 * nptl 0.3 released.
11056 * Makefile (tests): Add tst-signal3.
11057 * tst-signal3.c: New file.
11059 2002-10-05 Ulrich Drepper <drepper@redhat.com>
11061 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Tell the compiler that
11062 the asms modify the sem object.
11063 (__lll_sem_timedwait): Now takes struct sem* as first parameter.
11065 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h (sem_t): Don't expose
11066 the actual members.
11067 * pthreadP.h (struct sem): New type. Actual semaphore type.
11068 * semaphoreP.h: Include pthreadP.h.
11069 * sem_getvalue.c: Adjust to sem_t change.
11070 * sem_init.c: Likewise.
11071 * sem_open.c: Likewise.
11072 * sem_post.c: Likewise.
11073 * sem_timedwait.c: Likewise.
11074 * sem_trywait.c: Likewise.
11075 * sem_wait.c: Likewise.
11077 2002-10-04 Ulrich Drepper <drepper@redhat.com>
11079 * Makefile (tests): Add tst-basic2, tst-exec1, tst-exec3, tst-exec3.
11080 * tst-basic2.c: New file.
11081 * tst-exec1.c: New file.
11082 * tst-exec2.c: New file.
11083 * tst-exec3.c: New file.
11085 * tst-fork1.c: Remove extra */.
11087 * nptl 0.2 released. The API for IA-32 is complete.