1 2010-07-01 Andreas Schwab <schwab@redhat.com>
2 Ulrich Drepper <drepper@redhat.com>
4 * Makefile (tests): Add tst-abstime.
5 * tst-abstime.c: New file.
6 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
7 (__lll_timedlock_wait): Check for timestamp before the Epoch.
8 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
9 (__lll_timedlock_wait): Likewise.
10 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
11 (__lll_robust_timedlock_wait): Likewise.
12 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
13 (__pthread_cond_timedwait): Likewise.
14 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
15 (pthread_rwlock_timedrdlock): Likewise.
16 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
17 (pthread_rwlock_timedwrlock): Likewise.
18 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
21 2010-07-01 Ulrich Drepper <drepper@redhat.com>
23 * Makefile (tst-_res1): Add tst-_res1mod1 to dependency list.
25 2010-06-01 Takashi Yoshii <takashi.yoshii.zj@renesas.com>
27 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Fix incorrect
28 location of ifndef __ASSUME_FUTEX_CLOCK_REALTIME.
30 2010-04-09 Ulrich Drepper <drepper@redhat.com>
33 * sysdeps/unix/sysv/linux/pthread_getname.c: New file.
34 * sysdeps/unix/sysv/linux/pthread_setname.c: New file.
35 * nptl/sysdeps/pthread/pthread.h: Declare pthread_getname and
37 * Makefile (libpthread-routines): Add pthread_getname and
39 * Versions: Export pthread_getname and pthread_setname for GLIBC_2.12.
41 2010-04-05 Thomas Schwinge <thomas@schwinge.name>
43 * sysdeps/pthread/unwind-resume.c: Moved to main tree sysdeps/gnu/.
44 * sysdeps/pthread/rt-unwind-resume.c: Likewise.
45 * sysdeps/pthread/Makefile: Remove csu section and rt section's
46 unwind-resume bits, now in main tree sysdeps/gnu/Makefile instead.
48 2010-03-23 Luis Machado <luisgpm@br.ibm.com>
50 * pthread_cond_timedwait.c: Add check for
51 HAVE_CLOCK_GETTIME_VSYSCALL to use VDSO whenever possible.
52 (pthread_cond_timedwait): Use INTERNAL_VSYSCALL instead of
55 2010-03-09 Ulrich Drepper <drepper@redhat.com>
57 * pthread_create.c (__pthread_create_2_1): If priorities are incorrect
58 and the call fails wake eventually waiting setxid threads. Don't free
59 stack here if we try starting a thread.
60 * sysdeps/pthread/createthread.c (do_clone): Only wake setxid waiter
61 if the clone call failed.
63 2010-03-08 Andreas Schwab <schwab@redhat.com>
65 * pthread_create.c (__pthread_create_2_1): Don't set setxid_futex.
66 * allocatestack.c (get_cached_stack): Set setxid_futex.
67 (allocate_stack): Likewise.
69 2010-03-05 Andreas Schwab <schwab@redhat.com>
70 Ulrich Drepper <drepper@redhat.com>
72 * allocatestack.c (setxid_mark_thread): Delay handling of thread if
73 it is creating a thread or it is just being created.
74 * pthread_create.c (start_thread): Wake setxid thread if it is
76 (__pthread_create_2_1): Initialize setxid_futex.
77 * sysdeps/pthread/createthread.c (do_clone): Wake setxid thread if it
80 2010-01-15 Ulrich Drepper <drepper@redhat.com>
82 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
84 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
86 2010-01-15 Michal Schmidt <mschmidt@redhat.com>
88 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
89 Fix pthread_cond_timedwait with requeue-PI.
90 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
91 Fix pthread_cond_wait with requeue-PI.
93 2010-01-14 Ulrich Drepper <drepper@redhat.com>
95 * Versions: Add pthread_mutex_consistent, pthread_mutexattr_getrobust,
96 and pthread_mutexattr_setrobust for GLIBC_2.12.
97 * pthread_mutex_consistent.c: Define alias pthread_mutex_consistent.
98 * pthread_mutexattr_getrobust.c: Define alias
99 pthread_mutexattr_getrobust.
100 * pthread_mutexattr_setrobust.c: Define alias
101 pthread_mutexattr_setrobust.
103 2010-01-12 Ulrich Drepper <drepper@redhat.com>
105 * sysdeps/pthread/pthread.h: Cleanup. Fix up for XPG7.
107 2010-01-08 Ulrich Drepper <drepper@redhat.com>
109 * sysdeps/pthread/pthread.h: Fix pthread_mutex_consistent declaration.
111 2009-12-18 Thomas Schwinge <thomas@codesourcery.com>
113 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c (_init): Don't
115 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c (_init): Likewise.
117 2009-12-17 Ulrich Drepper <drepper@redhat.com>
119 * pthread_rwlock_init.c (__pthread_rwlock_init): Simplify code by
122 2009-12-01 Dinakar Guniguntala <dino@in.ibm.com>
124 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.h: Define
125 FUTEX_WAIT_REQUEUE_PI and FUTEX_CMP_REQUEUE_PI.
126 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: If mutex
127 is a non robust PI mutex, then use FUTEX_CMP_REQUEUE_PI.
128 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
129 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: If mutex
130 is a non robust PI mutex, then use FUTEX_WAIT_REQUEUE_PI.
131 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
133 2009-12-12 Ulrich Drepper <drepper@redhat.com>
135 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
136 Don't update nwaiters after invalid timeout is recognized.
138 2009-11-27 Thomas Schwinge <thomas@codesourcery.com>
140 * sysdeps/unix/sysv/linux/sh/pt-initfini.c (_init): Don't call
143 2009-11-27 Andreas Schwab <schwab@redhat.com>
145 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Reload
146 THREAD_SELF->cancelhandling after returning from futex call.
148 2009-11-24 Ulrich Drepper <drepper@redhat.com>
150 * tst-sem13.c: New file.
151 * Makefile (tests): Add tst-sem13.
153 2009-11-22 Roland McGrath <roland@redhat.com>
155 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: # include "i686/dl-sysdep.h"
156 instead of recapitulating its contents.
158 2009-11-18 Ulrich Drepper <drepper@redhat.com>
160 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Minor
161 optimizations and cleanups.
163 2009-11-18 Dinakar Guniguntala <dino@in.ibm.com>
165 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
166 Remove redundant code. Fix cfi offsets.
167 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
170 2009-11-17 Ulrich Drepper <drepper@redhat.com>
172 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Minimally
173 reduce size of unwind info.
175 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Convert to use
177 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
178 Based on a patch by Dinakar Guniguntala <dino@in.ibm.com>.
180 2009-11-03 Andreas Schwab <schwab@linux-m68k.org>
183 * sysdeps/pthread/unwind-resume.c: Include <libgcc_s.h> and use
185 * sysdeps/pthread/unwind-forcedunwind.c: Likewise.
187 2009-10-30 Ulrich Drepper <drepper@redhat.com>
189 * tst-sem11.c (main): Rewrite to avoid aliasing problems.
192 * allocatestack.c (__nptl_setxid): Perform the operation in multiple
193 steps to avoid races with creation and terminations.
194 * nptl-init.c (sighandler_setxid): Adjust.
195 Patch by Daniel Jacobowitz.
197 2009-09-07 Andreas Schwab <schwab@redhat.com>
199 * sysdeps/pthread/bits/libc-lock.h (BP_SYM): Remove space before paren.
201 2009-09-02 Suzuki K P <suzuki@in.ibm.com>
202 Joseph Myers <joseph@codesourcery.com>
205 * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
206 Initialize the sigev_notify field for newly created timer to make sure
207 the timer gets deleted from the active timer's list upon timer_delete.
209 2009-08-27 Andrew Stubbs <ams@codesourcery.com>
211 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
212 Correct a logic error.
214 2009-08-25 Ulrich Drepper <drepper@redhat.com>
216 * sysdeps/x86_64/tls.h (RTLD_ENABLE_FOREIGN_CALL): Store old value
217 of the field in local variables.
218 (RTLD_FINALIZE_FOREIGN_CALL): Restore rtld_must_xmm_save from local
219 variable and don't unconditionally clear it.
221 2009-08-24 Ulrich Drepper <drepper@redhat.com>
223 * pthread_create.c (start_thread): Hint to the kernel that memory for
224 the stack can be reused. We do not mark all the memory. The part
225 still in use and some reserve are kept.
227 2009-08-23 Ulrich Drepper <drepper@redhat.com>
229 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Clean up namespace.
231 2009-08-11 Ulrich Drepper <drepper@redhat.com>
233 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Add CFI
236 2009-08-10 Ulrich Drepper <drepper@redhat.com>
238 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Add CFI
240 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
242 2009-08-10 Andreas Schwab <schwab@redhat.com>
244 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
245 (__pthread_cond_signal): Don't clobber register used for syscall
248 2009-08-08 Ulrich Drepper <drepper@redhat.com>
250 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
251 Optimize code path used when FUTEX_CLOCK_REALTIME is supported.
253 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
254 (__pthread_cond_wait): Optimize by avoiding use of callee-safe
257 2009-08-07 Ulrich Drepper <drepper@redhat.com>
259 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Little optimizations
260 enabled by the special *_asynccancel functions.
261 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
262 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
264 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Include lowlevellock.h.
266 2009-08-04 Ulrich Drepper <drepper@redhat.com>
268 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: New file.
269 * sysdeps/unix/sysv/linux/x86_64/libc-cancellation.S: New file.
270 * sysdeps/unix/sysv/linux/x86_64/librt-cancellation.S: New file.
271 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Optimize
272 since we can assume the special __*_{en,dis}able_asynccancel
274 (PUSHARGS_*, POPARGS_*, SAVESTK_*, RESTSTK_*): Removed.
275 * sysdeps/x86_64/tcb-offsets.sym: Add cancellation-related bits
276 and PTHREAD_CANCELED.
278 2009-07-31 Ulrich Drepper <drepper@redhat.com>
280 * descr.h: Better definition of *_BITMASK macros for cancellation.
282 2009-07-29 Ulrich Drepper <drepper@redhat.com>
284 * sysdeps/x86_64/tls.h (TLS_TCB_ALIGN): Define explicitly to 32.
286 * sysdeps/x86_64/tls.h (tcbhead_t): Add room for SSE registers the
287 dynamic linker might have to save.
288 Define RTLD_CHECK_FOREIGN_CALL, RTLD_ENABLE_FOREIGN_CALL,
289 RTLD_PREPARE_FOREIGN_CALL, and RTLD_FINALIZE_FOREIGN_CALL. Pretty
292 * sysdeps/x86_64/tcb-offsets.sym: Add RTLD_SAVESPACE_SSE.
294 2009-07-28 Ulrich Drepper <drepper@redhat.com>
296 * pthread_mutex_lock.c [NO_INCR] (__pthread_mutex_cond_lock_adjust):
298 * pthreadP.h: Declare __pthread_mutex_cond_lock_adjust.
299 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: Add ROBUST_BIT.
300 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Don't use
301 requeue_pi for robust mutexes.
302 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
303 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
304 Don't only skip __pthread_mutex_cond_lock. Call instead
305 __pthread_mutex_cond_lock_adjust.
306 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
308 * pthread_mutex_unlock.c (__pthread_mutex_unlock_full): Minor
309 optimization of PI mutex handling.
311 2009-07-27 Ulrich Drepper <drepper@redhat.com>
314 * pthread_mutex_unlock.c (__pthread_mutex_unlock_full): Use _rel
315 instead of of _acq variants of cmpxchg.
317 2009-07-23 Ulrich Drepper <drepper@redhat.com>
319 * sysdeps/x86_64/configure.in: New file.
321 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix error
322 path when not using absolute timeout futex.
324 2009-07-20 Ulrich Drepper <drepper@redhat.com>
326 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Minor
327 optimizations of last changes.
328 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
330 2009-07-19 Ulrich Drepper <drepper@redhat.com>
332 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
333 FUTEX_WAIT_REQUEUE_PI and FUTEX_CMP_REQUEUE_PI.
334 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: If mutex
335 is a PI mutex, then use FUTEX_CMP_REQUEUE_PI.
336 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
337 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: If mutex
338 is a PI mutex, then use FUTEX_WAIT_REQUEUE_PI.
339 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
341 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
342 (__pthread_cond_timedwait): Make more robust.
344 2009-07-18 Ulrich Drepper <drepper@redhat.com>
346 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
347 (__lll_robust_timedlock_wait): If possible use FUTEX_WAIT_BITSET to
348 directly use absolute timeout.
350 * tst-sem5.c (do_test): Add test for premature timeout.
351 * Makefile: Linu tst-sem5 with librt.
353 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
354 (pthread_rwlock_timedwrlock): If possible use FUTEX_WAIT_BITSET to
355 directly use absolute timeout.
356 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
357 (pthread_rwlock_timedrdlock): Likewise.
359 * tst-cond11.c (run_test): Add test to check that the timeout is
362 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
363 (__pthread_cond_timedwait): If possible use FUTEX_WAIT_BITSET to
364 directly use absolute timeout.
366 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
367 (__pthread_cond_wait): Convert to using exception handler instead of
368 registered unwind buffer.
369 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
370 (__pthread_cond_timedwait): Likewise.
372 2009-07-17 Ulrich Drepper <drepper@redhat.com>
374 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
375 If possible use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME to directly
376 use absolute timeout.
378 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Optimize
379 handling of uncontested semaphore.
381 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
382 (__condvar_cleanup): Rewrite to use cfi directives instead of
383 hand-coded unwind tables.
384 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S (__pthread_once):
386 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
387 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
390 2009-06-12 Ulrich Drepper <drepper@redhat.com>
392 * Makefile (libpthread-routines): Add pthread_sigqueue.
393 * Versions: Add pthread_sigqueue for GLIBC_2.11.
394 * sysdeps/pthread/bits/sigthread.h: Declare pthread_sigqueue.
395 * sysdeps/unix/sysv/linux/pthread_sigqueue.c: New file.
397 2009-06-11 Ulrich Drepper <drepper@redhat.com>
400 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
401 (LOAD_FUTEX_WAIT_ABS): Fix futex parameter in case private futexes
403 Patch by Bryan Kadzban <bz-glibc@kdzbn.homelinux.net>.
405 2009-05-16 Ulrich Drepper <drepper@redhat.com>
407 * libc-cancellation.c: Move __libc_cleanup_routine to...
408 * libc-cleanup.c: ...here. New file.
409 * Makefile (routines): Add libc-cleanup.
411 * cancellation.c (__pthread_disable_asynccancel): Remove unnecessary
413 * libc-cancellation.c: Use <nptl/cancellation.c: to define the code.
414 * sysdeps/pthread/librt-cancellation.c: Likewise.
417 * nptl-init.c: Renamed from init.c.
418 * Makefile: Change all occurences of init.c to nptl-init.c.
420 2009-05-15 Ulrich Drepper <drepper@redhat.com>
422 * cancellation.c (__pthread_disable_asynccancel): Correct the bits
423 to test when deciding on the delay.
424 * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
425 * pthread_cancel.c: Close race between deciding on sending a signal
426 and setting the CANCELING_BIT bit.
428 * cancellation.c (__pthread_disable_asynccancel): Don't return if
430 * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
432 2009-04-27 Ulrich Drepper <drepper@redhat.com>
434 * cancellation.c (__pthread_disable_asynccancel): Use THREAD_ATOMIC_AND
436 * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
437 * sysdeps/x86_64/tls.h: Define THREAD_ATOMIC_AND.
438 * sysdeps/i386/tls.h: Likewise.
439 (tcbhead_t): Add __private_tm member.
441 2009-04-26 Ulrich Drepper <drepper@redhat.com>
443 * sem_open.c (sem_open): Rewrite initialization of initsem to
446 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
447 Avoid warning by using may_alias attribute on ptrhack.
449 2009-04-22 Ulrich Drepper <drepper@redhat.com>
452 * pthread_attr_setschedparam.c (__pthread_attr_setschedparam):
453 Check policy and priority for validity.
454 Patch mostly by Zhang Xiliang <zhangxiliang@cn.fujitsu.com>.
456 2009-03-15 Ulrich Drepper <drepper@redhat.com>
458 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
459 (__pthread_cond_timedwait): Change to use cfi directives instead of
460 hand-coded unwind sections.
462 2009-03-10 Ulrich Drepper <drepper@redhat.com>
464 * init.c (nptl_freeres): Compile only for SHARED.
466 2009-03-09 Jakub Jelinek <jakub@redhat.com>
468 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Define
469 FUTEX_WAIT_BITSET, FUTEX_WAKE_BITSET, FUTEX_CLOCK_REALTIME and
470 FUTEX_BITSET_MATCH_ANY.
472 2009-02-27 Roland McGrath <roland@redhat.com>
474 * init.c (__nptl_initial_report_events): Mark __attribute_used__.
475 * pthread_create.c (__nptl_threads_events, __nptl_last_event): Likewise.
477 2009-02-26 Ulrich Drepper <drepper@redhat.com>
479 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
480 _POSIX_THREAD_ROBUST_PRIO_INHERIT and
481 _POSIX_THREAD_ROBUST_PRIO_PROTECT. Reset value of macros from
484 2009-02-25 Ulrich Drepper <drepper@redhat.com>
486 * sysdeps/pthread/pthread.h: The robust mutex functions are in
489 2009-02-24 Ulrich Drepper <drepper@redhat.com>
491 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_BITS_POSIX_OPT_H):
492 Unify name of include protector macro.
494 2009-02-14 SUGIOKA Toshinobu <sugioka@itonet.co.jp>
496 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
497 LOAD_FUTEX_WAIT_ABS even if (FUTEX_WAIT == 0).
499 2009-01-29 Ulrich Drepper <drepper@redhat.com>
501 * sysdeps/pthread/unwind-forcedunwind.c: Encrypt all function
504 * allocatestack.c (__free_stacks): Renamed from free_stacks.
505 (__free_stack_cache): Removed. Change callers to call __free_stacks.
506 * init.c (nptl_freeres): New function.
507 (pthread_functions): Initialize ptr_freeres to nptl_freeres.
508 * pthreadP.h: Don't declare __free_stack_cache. Declare __free_stacks.
509 * sysdeps/pthread/unwind-forcedunwind.c (libgcc_s_handle): New
511 (pthread_cancel_init): Depend in libgcc_s_handle for decision to
512 load DSO. Assign last.
513 (__unwind_freeres): New function.
515 * allocatestack.c (__reclaim_stacks): Reset in_flight_stack later
516 for better debugging. No need to use stack_list_add here.
518 2009-01-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
520 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
521 (__lll_timedlock_wait): Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME
522 instead of computing relative timeout.
523 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
524 FUTEX_CLOCK_REALTIME and FUTEX_BITSET_MATCH_ANY.
526 2009-01-25 Ulrich Drepper <drepper@redhat.com>
528 * pthread_mutex_lock.c (__pthread_mutex_lock): Remove unused label out.
530 2009-01-08 Ulrich Drepper <drepper@redhat.com>
532 * sysdeps/pthread/list.h (list_add): Initialize new element first.
533 (list_add_tail): Removed.
535 2009-01-07 Ulrich Drepper <drepper@redhat.com>
537 * (in_flight_stack): New variable.
538 (stack_list_del): New function. Use instead of list_del.
539 (stack_list_add): New function. Use instead of list_add when adding to
540 stack_cache and stack_used lists.
541 (__reclaim_stacks): Complete operations on stack_cache and stack_used lists
542 when the fork call interrupted another thread.
544 2009-01-04 Ulrich Drepper <drepper@redhat.com>
546 * init.c (__pthread_initialize_minimal_internal): Optimize test
547 FUTEX_CLOCK_REALTIME a bit.
549 2009-01-03 Ulrich Drepper <drepper@redhat.com>
551 * init.c (__pthread_initialize_minimal_internal): Cheat a bit by
552 only passing five parameters to FUTEX_WAIT_BITSET call.
554 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
555 (__lll_timedlock_wait): Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME
556 instead of computing relative timeout.
558 2009-01-02 Ulrich Drepper <drepper@redhat.com>
560 * init.c (__pthread_initialize_minimal_internal): Check for
561 FUTEX_CLOCK_REALTIME flag.
562 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
563 Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME instead of computing
566 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
567 FUTEX_CLOCK_REALTIME and FUTEX_BITSET_MATCH_ANY.
568 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
569 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
570 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
571 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
573 2008-12-09 Ulrich Drepper <drepper@redhat.com>
575 * sysdeps/pthread/pthread.h (pthread_cleanup_pop): Use { } as empty
576 loop body instead of ; to avoid gcc warnings.
577 (pthread_cleanup_pop_restore_np): Likewise.
578 Patch by Caolán McNamara <caolanm@redhat.com>.
580 2008-12-09 Jakub Jelinek <jakub@redhat.com>
582 * pthread_mutex_lock.c (__pthread_mutex_lock): Handle only the
583 fast path here, for robust/PI/PP mutexes call
584 __pthread_mutex_lock_full. Don't use switch, instead use a series
585 of ifs according to their probability.
586 (__pthread_mutex_lock_full): New function.
587 * pthread_mutex_unlock.c: Include assert.h.
588 (__pthread_mutex_unlock_usercnt): Handle only the
589 fast path here, for robust/PI/PP mutexes call
590 __pthread_mutex_unlock_full. Don't use switch, instead use a series
591 of ifs according to their probability.
592 (__pthread_mutex_unlock_full): New function.
593 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c
594 (__pthread_mutex_lock_full): Define.
596 2008-12-08 Ulrich Drepper <drepper@redhat.com>
598 * sysdeps/x86_64/tls.h (tcbhead_t): Add fields reserved for TM
599 implementation. Add necessary padding and.
600 * descr.h (struct pthread): Increase padding for tcbhead_t to 24
603 2008-12-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
605 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define FUTEX_WAIT_BITSET
606 and FUTEX_WAKE_BITSET.
608 2008-12-02 Ulrich Drepper <drepper@redhat.com>
610 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_WAIT_BITSET
611 and FUTEX_WAKE_BITSET.
612 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
613 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
614 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
615 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
617 2008-11-25 Roland McGrath <roland@redhat.com>
619 * sysdeps/alpha, sysdeps/unix/sysv/linux/alpha:
620 Subdirectories moved to ports repository as
621 sysdeps/.../nptl subdirectories.
623 2008-11-12 Jakub Jelinek <jakub@redhat.com>
626 * pthread_condattr_setclock.c (pthread_condattr_setclock): Fix masking
628 * pthread_cond_init.c (__pthread_cond_init): Fix
629 cond->__data.__nwaiters initialization.
630 * Makefile (tests): Add tst-cond23.
631 * tst-cond23.c: New test.
633 2008-11-07 Jakub Jelinek <jakub@redhat.com>
635 * sysdeps/pthread/malloc-machine.h (MALLOC): Adjust __libc_tsd_define
637 (tsd_setspecific, tsd_getspecific): Adjust __libc_tsd_{set,get}
640 2008-11-01 Ulrich Drepper <drepper@redhat.com>
643 * pthread_mutex_lock.c: Add support for private PI mutexes.
644 * pthread_mutex_timedlock.c: Likewise.
645 * pthread_mutex_trylock.c: Likewise.
646 * pthread_mutex_unlock.c: Likewise.
647 Patch mostly by Ben Jackson <ben@ben.com>.
649 2008-10-31 Ulrich Drepper <drepper@redhat.com>
652 * sysdeps/pthread/gai_misc.h (__gai_create_helper_thread):
653 Increase stack size for helper thread.
655 2008-10-06 Martin Schwidefsky <schwidefsky@de.ibm.com>
657 * sysdeps/s390/tls.h (THREAD_SET_STACK_GUARD): Add empty inline
658 assembly with a clobber list for access registers a0 and a1.
660 2008-09-11 Martin Schwidefsky <schwidefsky@de.ibm.com>
662 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Add memory barrier
663 to force runp->refcntr to be read from memory.
665 2008-09-08 Richard Guenther <rguenther@suse.de>
667 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_lock,
668 lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
669 lll_timedlock, lll_robust_timedlock, lll_unlock,
670 lll_robust_unlock): Promote private to int.
672 2008-08-15 Ulrich Drepper <drepper@redhat.com>
674 * sysdeps/x86_64/pthreaddef.h: Remove ARCH_MAP_FLAGS and
675 ARCH_RETRY_MMAP definitions.
676 * allocatestack.c: Remove definition of ARCH_MAP_FLAGS.
677 Define MAP_STACK when not defined.
678 (allocate_stack): Use MAP_STACK instead of ARCH_MAP_FLAGS. Remove
679 handling of ARCH_RETRY_MMAP.
681 2008-07-30 Ulrich Drepper <drepper@redhat.com>
683 * tst-align2.c (f): Print message that f is reached.
685 2008-04-28 Hiroki Kaminaga <kaminaga@sm.sony.co.jp>
688 * sysdeps/powerpc/tcb-offsets.sym (PRIVATE_FUTEX_OFFSET): Guard symbol
689 definition with #ifndef __ASSUME_PRIVATE_FUTEX.
691 2008-07-25 Ulrich Drepper <drepper@redhat.com>
693 * sysdeps/unix/sysv/linux/mq_notify.c (init_mq_netlink): Use
694 SOCK_CLOEXEC if possible.
696 2008-05-29 Ulrich Drepper <drepper@redhat.com>
698 * Makefile (tests): Add tst-rwlock2a.
699 * tst-rwlock2.c: Use TYPE macro to decide what rwlock type to use.
700 * tst-rwlock2a.c: New file.
702 2008-06-12 Ulrich Drepper <drepper@redhat.com>
704 * sysdeps/pthread/pthread.h: Remove inadvertant checkin.
706 2008-05-17 Samuel Thibault <samuel.thibault@ens-lyon.org>
708 * sysdeps/pthread/pthread.h: Fix typo in comment.
710 2008-05-28 Ulrich Drepper <drepper@redhat.com>
712 * sysdeps/pthread/createthread.c (do_clone): Pass accurate length
713 of CPU set to the kernel.
715 2008-05-23 Paul Pluzhnikov <ppluzhnikov@google.com>
717 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Add
719 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
720 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
721 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
722 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
723 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
724 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
726 2008-05-22 Paul Pluzhnikov <ppluzhnikov@google.com>
728 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S: Add
730 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
732 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
734 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
737 2008-05-26 Ulrich Drepper <drepper@redhat.com>
739 * tst-typesizes.c: Explicitly check __SIZEOF_PTHREAD_* constants.
741 2008-05-20 Jakub Jelinek <jakub@redhat.com>
743 David S. Miller <davem@davemloft.net>
745 * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: New file.
747 2008-05-10 Ulrich Drepper <drepper@redhat.com>
749 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Access
751 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
753 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
755 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
757 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
759 Reported by Clemens Kolbitsch <clemens.kol@gmx.at>.
761 2008-04-14 David S. Miller <davem@davemloft.net>
763 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
764 (__old_sem_wait): Fix argument to lll_futex_wait().
766 2007-11-26 Daniel Jacobowitz <dan@codesourcery.com>
768 * pthread_create.c: Require pthread_mutex_trylock and
769 pthread_key_delete for libgcc.
771 2008-04-08 Jakub Jelinek <jakub@redhat.com>
774 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h
775 (lll_futex_wake_unlock): Add private argument to the pre-v9 macro.
776 Patch by Sunil Amitkumar Janki <devel.sjanki@gmail.com>.
778 2008-03-27 Ulrich Drepper <drepper@redhat.com>
780 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine ARG_MAX if
781 <linux/limits.h> has defined it.
782 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
783 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
784 * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
785 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
787 2008-03-18 Jakub Jelinek <jakub@redhat.com>
789 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Use __ASSEMBLER__ instead
791 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
792 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Likewise.
794 2008-03-14 Ulrich Drepper <drepper@redhat.com>
796 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
797 HAVE_DL_DISCOVER_OSVERSION.
798 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
799 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Likewise.
801 2008-03-07 Ulrich Drepper <drepper@redhat.com>
804 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Change
805 _POSIX_CHOWN_RESTRICTED value to zero.
807 2008-01-31 Roland McGrath <roland@redhat.com>
809 * Makefile (omit-deps): Variable removed.
811 2008-01-30 Ulrich Drepper <drepper@redhat.com>
813 * sysdeps/unix/sysv/linux/x86_64/sem_post.S (sem_post): Avoid
814 unnecessary addr32 prefix.
816 2008-01-29 Roland McGrath <roland@redhat.com>
818 * Makeconfig (ptw-CPPFLAGS, sysd-rules-patterns): New variables.
820 2008-01-22 Kaz Kojima <kkojima@rr.iij4u.or.jp>
822 * sysdeps/unix/sysv/linux/sh/sem_post.S: Don't overflow value field.
824 2008-01-21 Kaz Kojima <kkojima@rr.iij4u.or.jp>
826 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XADD): Use
828 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
829 (__lll_lock_wait_private): Fix typo.
830 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
831 (pthread_barrier_wait): Likewise. Adjust XADD use.
832 * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
834 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S
835 (pthread_rwlock_timedrdlock): Return correct return value.
836 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S
837 (pthread_rwlock_timedwrlock): Likewise.
839 2008-01-15 Ulrich Drepper <drepper@redhat.com>
841 * tst-eintr2.c (do_test): make sure that if mutex_lock in main
842 thread returns the program exits with an error code.
844 2008-01-10 Ulrich Drepper <drepper@redhat.com>
846 * pthread-errnos.sym: Add EOVERFLOW.
847 * sysdeps/unix/sysv/linux/structsem.sym: Add SEM_VALUE_MAX.
848 * sysdeps/unix/sysv/linux/sem_post.c: Don't overflow value field.
849 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
850 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
852 2007-12-14 Ulrich Drepper <drepper@redhat.com>
854 * sysdeps/x86_64/pthreaddef.h (ARCH_RETRY_MMAP): Take additional
855 parameter. Passed it as permission to mmap.
856 * allocatestack.c (allocate_stack): Pass prot as second parameter
859 2007-12-12 Ulrich Drepper <drepper@redhat.com>
861 * tst-basic7.c: Allocate memory for the stack.
864 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S [!SHARED]
865 (__pthread_cond_timedwait): Don't use VDSO.
866 Patch by Michal Januszewski.
868 2007-12-07 Ulrich Drepper <drepper@redhat.com>
871 * sysdeps/pthread/pthread.h [!__EXCEPTIONS] (pthread_cleanup_pop):
872 Allow label before pthread_cleanup_pop.
873 (pthread_cleanup_pop_restore_np): Likewise.
875 2007-12-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
877 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
878 Store 2 before returning ETIMEDOUT.
880 2007-11-23 Ulrich Drepper <drepper@redhat.com>
882 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
883 Store 2 before returning ETIMEDOUT.
884 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise
885 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
886 (__lll_lock_wait_private): Optimize.
887 (__lll_lock_wait): Likewise.
889 2007-11-20 Jakub Jelinek <jakub@redhat.com>
891 * sysdeps/pthread/pthread.h (pthread_cleanup_push,
892 pthread_cleanup_push_defer_np): Add extra (void *) cast to shut up
893 g++ 4.1 and 4.2 -Wstrict-aliasing warnings.
895 2007-11-08 Ulrich Drepper <drepper@redhat.com>
898 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
899 If we time out, try one last time to lock the futex to avoid
900 losing a wakeup signal.
901 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
902 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
905 * sysdeps/pthread/createthread.c (do_clone): Translate clone error
908 2007-11-07 Ulrich Drepper <drepper@redhat.com>
911 * allocatestack.c (allocate_stack): Change ENOMEM error in case
912 mmap failed to EAGAIN.
913 * Makefile (tests): Add tst-basic7.
914 * tst-basic7.c: New file.
916 2007-11-05 Ulrich Drepper <drepper@redhat.com>
918 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
921 2007-11-03 Mike Frysinger <vapier@gentoo.org>
923 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (LOAD_FUTEX_WAIT): Add
924 missing line continuations.
925 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S (LOAD_FUTEX_WAIT,
926 LOAD_FUTEX_WAKE): Likewise. Also add missing 3rd parameter.
928 2007-10-28 Ulrich Drepper <drepper@redhat.com>
931 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Declare
932 __active_timer_sigev_thread and __active_timer_sigev_thread_lock.
933 (struct timer): Add next element.
934 * sysdeps/unix/sysv/linux/timer_create.c: For SIGEV_THREAD timers,
935 enqueue timer structure into __active_timer_sigev_thread list.
936 * sysdeps/unix/sysv/linux/timer_delete.c: For SIGEV_THREAD timers,
937 remove timer struct from __active_timer_sigev_thread.
938 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
939 Before using timer structure make sure it is still on the
940 __active_timer_sigev_thread list. Keep lock until done.
941 Define __active_timer_sigev_thread and
942 __active_timer_sigev_thread_lock.
944 2007-10-27 Ulrich Drepper <drepper@redhat.com>
946 * sysdeps/pthread/malloc-machine.h: Define ATFORK_MEM.
947 Redefine thread_atfork for use of ATFORK_MEM.
948 * sysdeps/unix/sysv/linux/fork.h: Define __linkin_atfork.
949 * sysdeps/unix/sysv/linux/register-atfork.c (__linkin_atfork): New
951 * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
952 Use atomic operation when removing first element of list.
954 2007-10-17 Jakub Jelinek <jakub@redhat.com>
956 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__old_sem_post): New
957 routine instead of an alias to __new_sem_post.
959 2007-10-15 Jakub Jelinek <jakub@redhat.com>
961 * init.c (__pthread_initialize_minimal): Initialize word to appease
964 2007-10-10 Jakub Jelinek <jakub@redhat.com>
966 * sysdeps/pthread/bits/libc-lock.h (__libc_rwlock_init): Inside of
967 libc.so just clear NAME.
968 (__libc_rwlock_fini): Nop inside of libc.so.
969 * tst-initializers1.c (main): Test if PTHREAD_RWLOCK_INITIALIZER is
972 2007-09-02 Ulrich Drepper <drepper@redhat.com>
974 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
975 (__pthread_cond_wait): Fix unlocking of internal lock after mutex
977 Patch by Luca Barbieri <luca.barbieri@gmail.com>.
979 2007-08-21 Ulrich Drepper <drepper@redhat.com>
982 * allocatestack.c (__reclaim_stacks): Clear the TSD in the
983 reclaimed stack if necessary.
984 * Makefile (tests): Add tst-tsd6.
985 * tst-tsd6.c: New file.
987 2007-08-21 Jakub Jelinek <jakub@redhat.com>
989 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_dead):
990 Add private argument.
992 2007-08-20 Ulrich Drepper <drepper@redhat.com>
994 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
995 (__pthread_cond_timedwait): Use clock_gettime from VDSO if possible.
997 2007-08-16 Jakub Jelinek <jakub@redhat.com>
999 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h
1000 (__lll_robust_timedlock): Pass private as last argument to
1001 __lll_robust_timedlock_wait.
1002 (__lll_unlock): Fix a pasto.
1004 2007-08-15 Jakub Jelinek <jakub@redhat.com>
1006 * sysdeps/unix/sysv/linux/sparc/internaltypes.h (sparc_new_sem,
1007 sparc_old_sem): New structs.
1008 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
1009 (__sem_wait_cleanup): New function.
1010 (__new_sem_wait): Use sparc_new_sem structure. Bump and afterwards
1011 decrease nwaiters. Register __sem_wait_cleanup as cleanup handler.
1012 Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
1014 (__old_sem_wait): New function.
1015 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: Include
1016 nptl/sysdeps/unix/sysv/linux/sparc version.
1017 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c:
1019 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: Likewise.
1020 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c
1021 (__new_sem_trywait): Use sparc_old_sem structure.
1022 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c
1023 (sem_timedwait): Use sparc_new_sem structure. Bump and afterwards
1024 decrease nwaiters. Register __sem_wait_cleanup as cleanup handler.
1025 Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
1026 lll_futex_timed_wait.
1027 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c (__new_sem_post):
1028 Use sparc_new_sem structure. Only wake if nwaiters > 0. Pass
1029 isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
1031 (__old_sem_post): New function.
1032 * sysdeps/unix/sysv/linux/sparc/sem_wait.c: New file.
1033 * sysdeps/unix/sysv/linux/sparc/sem_init.c: New file.
1034 * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c: New file.
1035 * sysdeps/unix/sysv/linux/sparc/sem_post.c: New file.
1036 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: Remove.
1037 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: Remove.
1039 2007-08-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1041 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
1042 (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
1043 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
1044 Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
1045 * sysdeps/unix/sysv/linux/shpthread_cond_signal.S
1046 (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
1047 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
1049 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
1050 kernel-features.h and tcb-offsets.h.
1051 (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
1052 lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
1054 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
1056 (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE
1057 to lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
1059 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use #ifdef
1060 __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
1061 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
1062 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
1063 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
1064 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
1065 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
1067 2007-08-14 Jakub Jelinek <jakub@redhat.com>
1069 * sysdeps/unix/sysv/linux/lowlevellock.c: Comment fix.
1070 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
1071 (__lll_timedwait_tid): Pass LLL_SHARED as 4th argument to
1072 lll_futex_timed_wait.
1074 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (__lll_unlock,
1075 __lll_robust_unlock): Rewrite as macros instead of inline functions.
1076 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_unlock,
1077 __lll_robust_unlock, __lll_wait_tid): Likewise.
1079 2007-08-13 Jakub Jelinek <jakub@redhat.com>
1081 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
1083 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
1084 (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
1085 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
1086 Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
1087 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
1088 (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
1089 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
1090 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Include
1092 (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
1093 lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
1094 process private. Switch DW_CFA_advance_loc1 and some
1095 DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
1096 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
1097 (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE to
1098 lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
1099 process private. Switch DW_CFA_advance_loc{1,2} and some
1100 DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
1101 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use
1102 #ifdef __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
1103 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1105 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
1106 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
1107 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1109 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
1110 (__pthread_cond_broadcast): Compare %r8 instead of
1111 dep_mutex-cond_*(%rdi) with $-1.
1112 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
1113 (__pthread_cond_signal): Xor FUTEX_WAKE_OP with FUTEX_WAKE instead
1116 2007-08-13 Ulrich Drepper <drepper@redhat.com>
1118 * sysdeps/unix/sysv/linux/i386/i786/Implies: New file.
1120 2007-08-13 Jakub Jelinek <jakub@redhat.com>
1122 * allocatestack.c: Include kernel-features.h.
1123 * pthread_create.c: Likewise.
1124 * pthread_mutex_init.c: Likewise.
1126 * pthread_cond_timedwait.c: Likewise.
1127 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
1128 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
1129 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
1130 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
1131 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
1132 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1133 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1135 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1137 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
1138 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
1139 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
1140 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
1142 2007-08-12 Jakub Jelinek <jakub@redhat.com>
1144 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
1145 [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
1146 byte elements. One of them is the new __shared element.
1147 [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
1148 adjust names of other padding elements.
1149 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
1150 [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
1151 byte elements. One of them is the new __shared element.
1152 [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
1153 adjust names of other padding elements.
1154 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_rwlock_t):
1155 Renamed __pad1 element to __shared, adjust names of other padding
1157 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
1158 (pthread_rwlock_t): Likewise.
1159 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock): Fix a
1162 2007-08-09 Anton Blanchard <anton@samba.org>
1164 * sysdeps/unix/sysv/linux/powerpc/pthread_spin_unlock.c: New file.
1166 2007-08-12 Ulrich Drepper <drepper@redhat.com>
1168 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Include
1169 <kernel-features.h>.
1170 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1172 2007-08-11 Ulrich Drepper <drepper@redhat.com>
1174 * pthreadP.h (PTHREAD_ROBUST_MUTEX_PSHARED): Define.
1175 * pthread_mutex_lock.c: Use it instead of PTHREAD_MUTEX_PSHARED when
1176 dealing with robust mutexes.
1177 * pthread_mutex_timedlock.c: Likewise.
1178 * pthread_mutex_trylock.c: Likewise.
1179 * pthread_mutex_unlock.c: Likewise.
1180 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
1182 2007-08-06 Jakub Jelinek <jakub@redhat.com>
1184 * pthreadP.h (PTHREAD_MUTEX_PSHARED_BIT): Define.
1185 (PTHREAD_MUTEX_TYPE): Mask __kind with 127.
1186 (PTHREAD_MUTEX_PSHARED): Define.
1187 * pthread_mutex_init.c (__pthread_mutex_init): Set
1188 PTHREAD_MUTEX_PSHARED_BIT for pshared or robust
1190 * pthread_mutex_lock.c (LLL_MUTEX_LOCK): Take mutex as argument
1191 instead of its __data.__lock field, pass PTHREAD_MUTEX_PSHARED
1192 as second argument to lll_lock.
1193 (LLL_MUTEX_TRYLOCK): Take mutex as argument
1194 instead of its __data.__lock field.
1195 (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
1196 __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
1198 (__pthread_mutex_lock): Update LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
1199 LLL_ROBUST_MUTEX_LOCK users, use PTHREAD_MUTEX_TYPE (mutex)
1200 instead of mutex->__data.__kind directly, pass
1201 PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock and lll_futex_wait.
1202 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Use
1203 PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
1204 directly, pass PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock.
1205 (pthread_mutex_timedlock): Pass PTHREAD_MUTEX_PSHARED (mutex)
1206 to lll_timedlock, lll_robust_timedlock, lll_unlock and
1207 lll_futex_timed_wait. Use PTHREAD_MUTEX_TYPE (mutex) instead
1208 of mutex->__data.__kind directly.
1209 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Pass
1210 PTHREAD_MUTEX_PSHARED (mutex) to lll_timedlock,
1211 lll_robust_timedlock, lll_unlock and lll_futex_timed_wait. Use
1212 PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind directly.
1213 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Pass
1214 PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock, lll_robust_unlock
1216 * pthread_mutex_setprioceiling.c (pthread_mutex_setprioceiling): Pass
1217 PTHREAD_MUTEX_PSHARED (mutex) to lll_futex_wait and lll_futex_wake.
1218 Use PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
1220 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK):
1221 Take mutex as argument instead of its __data.__lock field, pass
1222 PTHREAD_MUTEX_PSHARED as second argument to lll_cond_lock.
1223 (LLL_MUTEX_TRYLOCK): Take mutex as argument instead of its
1224 __data.__lock field.
1225 (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
1226 __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
1227 to lll_robust_cond_lock.
1228 * pthread_cond_broadcast.c (__pthread_cond_broadcast): Add pshared
1229 variable, pass it to lll_lock, lll_unlock, lll_futex_requeue and
1230 lll_futex_wake. Don't use lll_futex_requeue if dependent mutex
1231 has PTHREAD_MUTEX_PSHARED_BIT bit set in its __data.__kind.
1232 * pthread_cond_destroy.c (__pthread_cond_destroy): Add pshared
1233 variable, pass it to lll_lock, lll_unlock, lll_futex_wake and
1235 * pthread_cond_signal.c (__pthread_cond_signal): Add pshared
1236 variable, pass it to lll_lock, lll_unlock, lll_futex_wake_unlock and
1238 * pthread_cond_timedwait.c (__pthread_cond_wait): Add
1239 pshared variable, pass it to lll_lock, lll_unlock,
1240 lll_futex_timedwait and lll_futex_wake.
1241 * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait): Add
1242 pshared variable, pass it to lll_lock, lll_unlock, lll_futex_wait
1244 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_requeue,
1245 lll_futex_wake_unlock): Add private argument, use __lll_private_flag
1247 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue,
1248 lll_futex_wake_unlock): Likewise.
1249 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_requeue):
1251 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_futex_requeue,
1252 lll_futex_wake_unlock): Likewise.
1253 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_requeue):
1255 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue,
1256 lll_futex_wake_unlock): Likewise.
1257 (lll_futex_wake): Fix a typo.
1258 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym (PS_BIT): Add.
1259 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
1260 (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
1261 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
1262 Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
1263 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
1264 (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
1265 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
1266 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1267 (__pthread_cond_timedwait): Likewise.
1268 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
1269 (__condvar_cleanup, __pthread_cond_wait): Likewise.
1271 2007-08-05 Jakub Jelinek <jakub@redhat.com>
1273 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
1274 Don't use CGOTSETUP and CGOTRESTORE macros.
1275 (CGOTSETUP, CGOTRESTORE): Remove.
1276 <IS_IN_rtld> (CENABLE, CDISABLE): Don't use JUMPTARGET, branch to
1279 2007-08-01 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1281 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Remove
1282 definitions for private futexes.
1283 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Include
1284 kernel-features.h and lowlevellock.h. Use private futexes if
1286 (__lll_lock_wait_private, __lll_unlock_wake_private): New.
1287 (__lll_mutex_lock_wait): Rename to
1288 (__lll_lock_wait): ... this. Don't compile in for libc.so.
1289 (__lll_mutex_timedlock_wait): Rename to ...
1290 (__lll_timedlock_wait): ... this. Use __NR_gettimeofday.
1291 Don't compile in for libc.so.
1292 (__lll_mutex_unlock_wake): Rename to ...
1293 (__lll_unlock_wake): ... this. Don't compile in for libc.so.
1294 (__lll_timedwait_tid): Use __NR_gettimeofday.
1295 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Allow including
1296 the header from assembler. Renamed all lll_mutex_* resp.
1297 lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
1298 Renamed all LLL_MUTEX_LOCK_* macros to LLL_LOCK_*.
1299 (FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE):
1301 (__lll_lock_wait_private): Add prototype.
1302 (__lll_lock_wait, __lll_timedlock_wait, __lll_robust_lock_wait,
1303 __lll_robust_timedlock_wait, __lll_unlock_wake_private,
1304 __lll_unlock_wake): Likewise.
1305 (lll_lock): Add private argument. Call __lll_lock_wait_private
1306 if private is constant LLL_PRIVATE.
1307 (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
1308 lll_timedlock, lll_robust_timedlock): Add private argument.
1309 (lll_unlock): Add private argument. Call __lll_unlock_wake_private
1310 if private is constant LLL_PRIVATE.
1311 (lll_robust_unlock, lll_robust_dead): Add private argument.
1312 (lll_lock_t): Remove.
1313 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
1314 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
1315 lll_cond_wake, lll_cond_broadcast): Remove.
1316 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: Include
1317 kernel-features.h and lowlevellock.h.
1318 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
1319 (LOAD_FUTEX_WAIT): Define.
1320 (__lll_robust_mutex_lock_wait): Rename to ...
1321 (__lll_robust_lock_wait): ... this. Add private argument.
1322 Use LOAD_FUTEX_WAIT macro.
1323 (__lll_robust_mutex_timedlock_wait): Rename to ...
1324 (__lll_robust_timedlock_wait): ... this. Add private argument.
1325 Use __NR_gettimeofday. Use LOAD_FUTEX_WAIT macro.
1326 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Include
1328 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
1329 (pthread_barrier_wait): Use __lll_{lock,unlock}_* instead of
1330 __lll_mutex_{lock,unlock}_*.
1331 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Include
1332 lowlevellock.h and pthread-errnos.h.
1333 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
1334 FUTEX_CMP_REQUEUE, EINVAL): Remove.
1335 (__pthread_cond_broadcast): Use __lll_{lock,unlock}_* instead of
1336 __lll_mutex_{lock,unlock}_*.
1337 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Include
1338 lowlevellock.h and pthread-errnos.h.
1339 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE, EINVAL): Remove.
1340 (__pthread_cond_signal): Use __lll_{lock,unlock}_* instead of
1341 __lll_mutex_{lock,unlock}_*.
1342 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
1344 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE): Remove.
1345 (__pthread_cond_timedwait): Use __lll_{lock,unlock}_* instead of
1346 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
1347 (__condvar_tw_cleanup): Likewise.
1348 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
1350 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
1351 (__pthread_cond_wait): Use __lll_{lock,unlock}_* instead of
1352 __lll_mutex_{lock,unlock}_*.
1353 ( __condvar_w_cleanup): Likewise.
1354 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Include lowlevellock.h.
1355 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
1356 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Include
1358 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
1359 (__pthread_rwlock_rdlock): Use __lll_{lock,unlock}_* instead of
1360 __lll_mutex_{lock,unlock}_*.
1361 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Include
1363 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
1364 FUTEX_PRIVATE_FLAG): Remove.
1365 (pthread_rwlock_timedrdlock): Use __lll_{lock,unlock}_* instead of
1366 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
1367 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Include
1369 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
1370 FUTEX_PRIVATE_FLAG): Remove.
1371 (pthread_rwlock_timedwrlock): Use __lll_{lock,unlock}_* instead of
1372 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
1373 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Include
1375 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
1376 (__pthread_rwlock_unlock): Use __lll_{lock,unlock}_* instead of
1377 __lll_mutex_{lock,unlock}_*.
1378 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Include
1380 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
1381 (__pthread_rwlock_wrlock): Use __lll_{lock,unlock}_* instead of
1382 __lll_mutex_{lock,unlock}_*.
1383 * sysdeps/unix/sysv/linux/sh/sem_post.S: Include lowlevellock.h.
1384 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
1385 (__new_sem_post): Use standard initial exec code sequences.
1386 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Include
1388 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
1389 FUTEX_PRIVATE_FLAG): Remove.
1390 (sem_timedwait): Use __NR_gettimeofday. Use standard initial
1391 exec code sequences.
1392 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Include lowlevellock.h.
1393 (__new_sem_trywait): Use standard initial exec code sequences.
1394 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Include lowlevellock.h.
1395 (__new_sem_wait): Use standard initial exec code sequences.
1397 2007-07-31 Anton Blanchard <anton@samba.org>
1399 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
1400 Use __asm __volatile (__lll_acq_instr ::: "memory") instead of
1401 atomic_full_barrier.
1403 2007-07-31 Jakub Jelinek <jakub@redhat.com>
1405 * allocatestack.c (stack_cache_lock): Change type to int.
1406 (get_cached_stack, allocate_stack, __deallocate_stack,
1407 __make_stacks_executable, __find_thread_by_id, __nptl_setxid,
1408 __pthread_init_static_tls, __wait_lookup_done): Add LLL_PRIVATE
1409 as second argument to lll_lock and lll_unlock macros on
1411 * pthread_create.c (__find_in_stack_list): Likewise.
1412 (start_thread): Similarly with pd->lock. Use lll_robust_dead
1413 macro instead of lll_robust_mutex_dead, pass LLL_SHARED to it
1415 * descr.h (struct pthread): Change lock and setxid_futex field
1417 * old_pthread_cond_broadcast.c (__pthread_cond_broadcast_2_0): Use
1418 LLL_LOCK_INITIALIZER instead of LLL_MUTEX_LOCK_INITIALIZER.
1419 * old_pthread_cond_signal.c (__pthread_cond_signal_2_0): Likewise.
1420 * old_pthread_cond_timedwait.c (__pthread_cond_timedwait_2_0):
1422 * old_pthread_cond_wait.c (__pthread_cond_wait_2_0): Likewise.
1423 * pthread_cond_init.c (__pthread_cond_init): Likewise.
1424 * pthreadP.h (__attr_list_lock): Change type to int.
1425 * pthread_attr_init.c (__attr_list_lock): Likewise.
1426 * pthread_barrier_destroy.c (pthread_barrier_destroy): Pass
1427 ibarrier->private ^ FUTEX_PRIVATE_FLAG as second argument to
1429 * pthread_barrier_wait.c (pthread_barrier_wait): Likewise and
1430 also for lll_futex_{wake,wait}.
1431 * pthread_barrier_init.c (pthread_barrier_init): Make iattr
1433 * pthread_cond_broadcast.c (__pthread_cond_broadcast): Pass
1434 LLL_SHARED as second argument to lll_{,un}lock.
1435 * pthread_cond_destroy.c (__pthread_cond_destroy): Likewise.
1436 * pthread_cond_signal.c (__pthread_cond_singal): Likewise.
1437 * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
1438 * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait):
1440 * pthread_getattr_np.c (pthread_getattr_np): Add LLL_PRIVATE
1441 as second argument to lll_{,un}lock macros on pd->lock.
1442 * pthread_getschedparam.c (__pthread_getschedparam): Likewise.
1443 * pthread_setschedparam.c (__pthread_setschedparam): Likewise.
1444 * pthread_setschedprio.c (pthread_setschedprio): Likewise.
1445 * tpp.c (__pthread_tpp_change_priority, __pthread_current_priority):
1447 * sysdeps/pthread/createthread.c (do_clone, create_thread):
1449 * pthread_once.c (once_lock): Change type to int.
1450 (__pthread_once): Pass LLL_PRIVATE as second argument to
1451 lll_{,un}lock macros on once_lock.
1452 * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Use
1453 lll_{,un}lock macros instead of lll_mutex_{,un}lock, pass
1454 rwlock->__data.__shared as second argument to them and similarly
1456 * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock):
1458 * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock):
1460 * pthread_rwlock_tryrdlock.c (__pthread_rwlock_tryrdlock): Likewise.
1461 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Likewise.
1462 * pthread_rwlock_unlock.c (__pthread_rwlock_unlock): Likewise.
1463 * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
1464 * sem_close.c (sem_close): Pass LLL_PRIVATE as second argument
1465 to lll_{,un}lock macros on __sem_mappings_lock.
1466 * sem_open.c (check_add_mapping): Likewise.
1467 (__sem_mappings_lock): Change type to int.
1468 * semaphoreP.h (__sem_mappings_lock): Likewise.
1469 * pthread_mutex_lock.c (LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
1470 LLL_ROBUST_MUTEX_LOCK): Use lll_{,try,robust_}lock macros
1471 instead of lll_*mutex_*, pass LLL_SHARED as last
1473 (__pthread_mutex_lock): Use lll_unlock instead of lll_mutex_unlock,
1474 pass LLL_SHARED as last argument.
1475 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK,
1476 LLL_MUTEX_TRYLOCK, LLL_ROBUST_MUTEX_LOCK): Use
1477 lll_{cond_,cond_try,robust_cond}lock macros instead of lll_*mutex_*,
1478 pass LLL_SHARED as last argument.
1479 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
1480 lll_{timed,try,robust_timed,un}lock instead of lll_*mutex*, pass
1481 LLL_SHARED as last argument.
1482 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Similarly.
1483 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt):
1485 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_lock,
1486 __libc_lock_lock_recursive, __libc_lock_unlock,
1487 __libc_lock_unlock_recursive): Pass LLL_PRIVATE as second
1488 argument to lll_{,un}lock.
1489 * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_lock,
1490 _IO_lock_unlock): Likewise.
1491 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Don't use
1493 * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
1494 Pass LLL_PRIVATE as second argument to lll_{,un}lock macros on
1496 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork,
1497 free_mem): Likewise.
1498 (__fork_lock): Change type to int.
1499 * sysdeps/unix/sysv/linux/fork.h (__fork_lock): Likewise.
1500 * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Pass
1501 isem->private ^ FUTEX_PRIVATE_FLAG as second argument to
1503 * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
1504 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Likewise.
1505 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait_private):
1507 (__lll_lock_wait, __lll_timedlock_wait): Add private argument and
1508 pass it through to lll_futex_*wait, only compile in when
1510 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
1511 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): Add private
1512 argument and pass it through to lll_futex_*wait.
1513 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Renamed all
1514 lll_mutex_* resp. lll_robust_mutex_* macros to lll_* resp.
1515 lll_robust_*. Renamed all __lll_mutex_* resp. __lll_robust_mutex_*
1516 inline functions to __lll_* resp. __lll_robust_*.
1517 (LLL_MUTEX_LOCK_INITIALIZER): Remove.
1518 (lll_mutex_dead): Add private argument.
1519 (__lll_lock_wait_private): New prototype.
1520 (__lll_lock_wait, __lll_robust_lock_wait, __lll_lock_timedwait,
1521 __lll_robust_lock_timedwait): Add private argument to prototypes.
1522 (__lll_lock): Add private argument, if it is constant LLL_PRIVATE,
1523 call __lll_lock_wait_private, otherwise pass private to
1525 (__lll_robust_lock, __lll_cond_lock, __lll_timedlock,
1526 __lll_robust_timedlock): Add private argument, pass it to
1527 __lll_*wait functions.
1528 (__lll_unlock): Add private argument, if it is constant LLL_PRIVATE,
1529 call __lll_unlock_wake_private, otherwise pass private to
1531 (__lll_robust_unlock): Add private argument, pass it to
1532 __lll_robust_unlock_wake.
1533 (lll_lock, lll_robust_lock, lll_cond_lock, lll_timedlock,
1534 lll_robust_timedlock, lll_unlock, lll_robust_unlock): Add private
1535 argument, pass it through to __lll_* inline function.
1536 (__lll_mutex_unlock_force, lll_mutex_unlock_force): Remove.
1537 (lll_lock_t): Remove.
1538 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
1539 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
1540 lll_cond_wake, lll_cond_broadcast): Remove.
1541 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
1542 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
1543 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
1544 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
1545 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Allow including
1546 the header from assembler. Renamed all lll_mutex_* resp.
1547 lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
1548 (LOCK, FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP,
1549 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
1550 (LLL_MUTEX_LOCK_INITIALIZER, LLL_MUTEX_LOCK_INITIALIZER_LOCKED,
1551 LLL_MUTEX_LOCK_INITIALIZER_WAITERS): Remove.
1552 (__lll_mutex_lock_wait, __lll_mutex_timedlock_wait,
1553 __lll_mutex_unlock_wake, __lll_lock_wait, __lll_unlock_wake):
1555 (__lll_trylock_asm, __lll_lock_asm_start, __lll_unlock_asm): Define.
1556 (lll_robust_trylock, lll_cond_trylock): Use LLL_LOCK_INITIALIZER*
1557 rather than LLL_MUTEX_LOCK_INITIALIZER* macros.
1558 (lll_trylock): Likewise, use __lll_trylock_asm, pass
1559 MULTIPLE_THREADS_OFFSET as another asm operand.
1560 (lll_lock): Add private argument, use __lll_lock_asm_start, pass
1561 MULTIPLE_THREADS_OFFSET as last asm operand, call
1562 __lll_lock_wait_private if private is constant LLL_PRIVATE,
1563 otherwise pass private as another argument to __lll_lock_wait.
1564 (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
1565 lll_timedlock, lll_robust_timedlock): Add private argument, pass
1566 private as another argument to __lll_*lock_wait call.
1567 (lll_unlock): Add private argument, use __lll_unlock_asm, pass
1568 MULTIPLE_THREADS_OFFSET as another asm operand, call
1569 __lll_unlock_wake_private if private is constant LLL_PRIVATE,
1570 otherwise pass private as another argument to __lll_unlock_wake.
1571 (lll_robust_unlock): Add private argument, pass private as another
1572 argument to __lll_unlock_wake.
1573 (lll_robust_dead): Add private argument, use __lll_private_flag
1575 (lll_islocked): Use LLL_LOCK_INITIALIZER instead of
1576 LLL_MUTEX_LOCK_INITIALIZER.
1577 (lll_lock_t): Remove.
1578 (LLL_LOCK_INITIALIZER_WAITERS): Define.
1579 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
1580 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
1581 lll_cond_wake, lll_cond_broadcast): Remove.
1582 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
1583 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Revert
1584 2007-05-2{3,9} changes.
1585 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Include
1586 kernel-features.h and lowlevellock.h.
1587 (LOAD_PRIVATE_FUTEX_WAIT): Define.
1588 (LOAD_FUTEX_WAIT): Rewritten.
1589 (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
1591 (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
1592 (__lll_mutex_lock_wait): Rename to ...
1593 (__lll_lock_wait): ... this. Take futex addr from %edx instead of
1594 %ecx, %ecx is now private argument. Don't compile in for libc.so.
1595 (__lll_mutex_timedlock_wait): Rename to ...
1596 (__lll_timedlock_wait): ... this. Use __NR_gettimeofday. %esi
1597 contains private argument. Don't compile in for libc.so.
1598 (__lll_mutex_unlock_wake): Rename to ...
1599 (__lll_unlock_wake): ... this. %ecx contains private argument.
1600 Don't compile in for libc.so.
1601 (__lll_timedwait_tid): Use __NR_gettimeofday.
1602 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Include
1603 kernel-features.h and lowlevellock.h.
1604 (LOAD_FUTEX_WAIT): Define.
1605 (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
1607 (__lll_robust_mutex_lock_wait): Rename to ...
1608 (__lll_robust_lock_wait): ... this. Futex addr is now in %edx
1609 argument, %ecx argument contains private. Use LOAD_FUTEX_WAIT
1611 (__lll_robust_mutex_timedlock_wait): Rename to ...
1612 (__lll_robust_timedlock_wait): ... this. Use __NR_gettimeofday.
1613 %esi argument contains private, use LOAD_FUTEX_WAIT macro.
1614 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Include
1616 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1617 (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
1618 PRIVATE(%ebx) ^ LLL_SHARED as private argument in %ecx to
1619 __lll_lock_wait and __lll_unlock_wake, pass MUTEX(%ebx) address
1620 to __lll_lock_wait in %edx.
1621 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
1622 Include lowlevellock.h and pthread-errnos.h.
1623 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
1624 FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
1625 (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*, pass
1626 cond_lock address in %edx rather than %ecx to __lll_lock_wait,
1627 pass LLL_SHARED in %ecx to both __lll_lock_wait and
1629 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
1630 Include lowlevellock.h and pthread-errnos.h.
1631 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
1632 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
1633 (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*, pass
1634 cond_lock address in %edx rather than %ecx to __lll_lock_wait,
1635 pass LLL_SHARED in %ecx to both __lll_lock_wait and
1637 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
1638 Include lowlevellock.h.
1639 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
1641 (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*, pass
1642 cond_lock address in %edx rather than %ecx to __lll_lock_wait,
1643 pass LLL_SHARED in %ecx to both __lll_lock_wait and
1644 __lll_unlock_wake. Use __NR_gettimeofday.
1645 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
1646 Include lowlevellock.h.
1647 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1648 (__pthread_cond_wait, __condvar_w_cleanup): Rename __lll_mutex_*
1649 to __lll_*, pass cond_lock address in %edx rather than %ecx to
1650 __lll_lock_wait, pass LLL_SHARED in %ecx to both __lll_lock_wait
1651 and __lll_unlock_wake.
1652 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S:
1653 Include lowlevellock.h.
1654 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1655 (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*, pass
1656 MUTEX(%ebx) address in %edx rather than %ecx to
1657 __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
1658 and __lll_unlock_wake. Move return value from %ecx to %edx
1660 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1661 Include lowlevellock.h.
1662 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
1664 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
1665 MUTEX(%ebp) address in %edx rather than %ecx to
1666 __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
1667 and __lll_unlock_wake. Move return value from %ecx to %edx
1668 register. Use __NR_gettimeofday.
1669 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1670 Include lowlevellock.h.
1671 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
1673 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
1674 MUTEX(%ebp) address in %edx rather than %ecx to
1675 __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
1676 and __lll_unlock_wake. Move return value from %ecx to %edx
1677 register. Use __NR_gettimeofday.
1678 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
1679 Include lowlevellock.h.
1680 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1681 (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*, pass
1682 MUTEX(%edi) address in %edx rather than %ecx to
1683 __lll_lock_wait, pass PSHARED(%edi) in %ecx to both __lll_lock_wait
1684 and __lll_unlock_wake.
1685 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
1686 Include lowlevellock.h.
1687 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1688 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
1689 MUTEX(%ebx) address in %edx rather than %ecx to
1690 __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
1691 and __lll_unlock_wake. Move return value from %ecx to %edx
1693 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Include
1695 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
1697 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Include lowlevellock.h.
1698 (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
1699 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Include
1701 (LOCK, SYS_futex, SYS_gettimeofday, FUTEX_WAIT): Don't define.
1702 (sem_timedwait): Use __NR_gettimeofday.
1703 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Include
1705 (LOCK): Don't define.
1706 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include
1708 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
1709 * sysdeps/unix/sysv/linux/powerpc/sem_post.c: Wake only when there
1711 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Revert
1712 2007-05-2{3,9} changes.
1713 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Include
1714 kernel-features.h and lowlevellock.h.
1715 (LOAD_PRIVATE_FUTEX_WAIT): Define.
1716 (LOAD_FUTEX_WAIT): Rewritten.
1717 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
1718 (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
1719 (__lll_mutex_lock_wait): Rename to ...
1720 (__lll_lock_wait): ... this. %esi is now private argument.
1721 Don't compile in for libc.so.
1722 (__lll_mutex_timedlock_wait): Rename to ...
1723 (__lll_timedlock_wait): ... this. %esi contains private argument.
1724 Don't compile in for libc.so.
1725 (__lll_mutex_unlock_wake): Rename to ...
1726 (__lll_unlock_wake): ... this. %esi contains private argument.
1727 Don't compile in for libc.so.
1728 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Include
1729 kernel-features.h and lowlevellock.h.
1730 (LOAD_FUTEX_WAIT): Define.
1731 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
1732 (__lll_robust_mutex_lock_wait): Rename to ...
1733 (__lll_robust_lock_wait): ... this. %esi argument contains private.
1734 Use LOAD_FUTEX_WAIT macro.
1735 (__lll_robust_mutex_timedlock_wait): Rename to ...
1736 (__lll_robust_timedlock_wait): ... this. %esi argument contains
1737 private, use LOAD_FUTEX_WAIT macro.
1738 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Include
1740 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1741 (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
1742 PRIVATE(%rdi) ^ LLL_SHARED as private argument in %esi to
1743 __lll_lock_wait and __lll_unlock_wake.
1744 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S:
1745 Include lowlevellock.h and pthread-errnos.h.
1746 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
1747 FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
1748 (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*,
1749 pass LLL_SHARED in %esi to both __lll_lock_wait and
1751 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S:
1752 Include lowlevellock.h and pthread-errnos.h.
1753 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
1754 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
1755 (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*,
1756 pass LLL_SHARED in %esi to both __lll_lock_wait and
1758 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:
1759 Include lowlevellock.h.
1760 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1761 (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*,
1762 pass LLL_SHARED in %esi to both __lll_lock_wait and
1764 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
1765 Include lowlevellock.h.
1766 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1767 (__pthread_cond_wait, __condvar_cleanup): Rename __lll_mutex_*
1768 to __lll_*, pass LLL_SHARED in %esi to both __lll_lock_wait
1769 and __lll_unlock_wake.
1770 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S:
1771 Include lowlevellock.h.
1772 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1774 (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*,
1775 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
1776 and __lll_unlock_wake.
1777 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
1778 Include lowlevellock.h.
1779 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1781 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
1782 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
1783 and __lll_unlock_wake.
1784 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1785 Include lowlevellock.h.
1786 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1788 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
1789 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
1790 and __lll_unlock_wake.
1791 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S:
1792 Include lowlevellock.h.
1793 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1795 (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*,
1796 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
1797 and __lll_unlock_wake.
1798 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S:
1799 Include lowlevellock.h.
1800 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1802 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
1803 pass PSHARED(%rdi) in %ecx to both __lll_lock_wait
1804 and __lll_unlock_wake.
1805 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Include
1807 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
1809 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Include lowlevellock.h.
1810 (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
1811 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Include
1813 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
1814 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Include
1816 (LOCK): Don't define.
1817 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Include
1819 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
1820 * sysdeps/unix/sysv/linux/sparc/internaltypes.h: New file.
1821 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_destroy.c: New file.
1822 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_init.c: New file.
1823 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_wait.c: New file.
1824 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
1825 (__lll_lock_wait_private): New function.
1826 (__lll_lock_wait, __lll_timedlock_wait): Add private argument, pass
1827 it to lll_futex_*wait. Don't compile in for libc.so.
1828 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c:
1830 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c
1831 (struct sparc_pthread_barrier): Remove.
1832 (pthread_barrier_wait): Use union sparc_pthread_barrier instead of
1833 struct sparc_pthread_barrier. Pass
1834 ibarrier->s.pshared ? LLL_SHARED : LLL_PRIVATE to lll_{,un}lock
1835 and lll_futex_wait macros.
1836 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
1838 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
1839 Include sparc pthread_barrier_wait.c instead of generic one.
1841 2007-07-30 Jakub Jelinek <jakub@redhat.com>
1843 * tst-rwlock14.c (do_test): Avoid warnings on 32-bit arches.
1845 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
1846 (pthread_rwlock_timedrdlock): Copy futex retval to %esi rather than
1848 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
1849 (pthread_rwlock_timedwrlock): Likewise.
1850 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
1851 (__pthread_rwlock_unlock): Fix MUTEX != 0 args to __lll_*.
1853 2007-07-31 Jakub Jelinek <jakub@redhat.com>
1855 * sysdeps/sparc/tls.h (tcbhead_t): Add private_futex field.
1857 2007-07-26 Jakub Jelinek <jakub@redhat.com>
1859 * tst-locale2.c (useless): Add return statement.
1861 2007-07-24 Jakub Jelinek <jakub@redhat.com>
1863 * allocatestack.c (__nptl_setxid, __wait_lookup_done): Replace
1864 lll_private_futex_* (*) with lll_futex_* (*, LLL_PRIVATE).
1865 * pthread_create.c (start_thread): Likewise.
1866 * init.c (sighandler_setxid): Likewise.
1867 * sysdeps/alpha/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1868 * sysdeps/ia64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1869 * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1870 * sysdeps/s390/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1871 * sysdeps/powerpc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1872 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1873 * sysdeps/sparc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1874 * sysdeps/sh/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1875 * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY, AIO_MISC_WAIT):
1877 * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY, GAI_MISC_WAIT):
1879 * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
1881 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_waitzero,
1882 __rtld_notify): Likewise.
1883 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Likewise.
1884 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (clear_once_control,
1885 __pthread_once): Likewise.
1886 * sysdeps/unix/sysv/linux/alpha/pthread_once.c (clear_once_control,
1887 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1888 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1889 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1890 (lll_futex_wait): Add private argument, define as wrapper around
1891 lll_futex_timed_wait.
1892 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1893 use __lll_private_flag macro.
1894 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
1895 __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
1896 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (clear_once_control,
1897 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1898 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1899 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1900 (lll_futex_wait): Add private argument, define as wrapper around
1901 lll_futex_timed_wait.
1902 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1903 use __lll_private_flag macro.
1904 (__lll_mutex_unlock, __lll_robust_mutex_unlock, lll_wait_tid,
1905 __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
1906 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
1908 (lll_futex_timed_wait, lll_futex_wake): Use it.
1909 (lll_private_futex_wait, lll_private_futex_timed_wait,
1910 lll_private_futex_wake): Removed.
1911 * sysdeps/unix/sysv/linux/s390/pthread_once.c (clear_once_control,
1912 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1913 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1914 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1915 (lll_futex_wait): Add private argument, define as wrapper around
1916 lll_futex_timed_wait.
1917 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1918 use __lll_private_flag macro.
1919 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
1920 lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
1922 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
1923 (lll_private_futex_wait, lll_private_futex_timed_wait,
1924 lll_private_futex_wake): Removed.
1925 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_private_flag):
1926 Fix !__ASSUME_PRIVATE_FUTEX non-constant private case.
1927 (lll_private_futex_wait, lll_private_futex_timed_wait,
1928 lll_private_futex_wake): Removed.
1929 * sysdeps/unix/sysv/linux/sparc/pthread_once.c (clear_once_control,
1930 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1931 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1932 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1933 (lll_futex_wait): Add private argument, define as wrapper around
1934 lll_futex_timed_wait.
1935 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1936 use __lll_private_flag macro.
1937 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
1938 lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
1940 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (__lll_private_flag):
1942 (lll_futex_timed_wait, lll_futex_wake): Use it.
1943 (lll_private_futex_wait, lll_private_futex_timed_wait,
1944 lll_private_futex_wake): Removed.
1946 2007-07-27 Jakub Jelinek <jakub@redhat.com>
1948 * sysdeps/sparc/tls.h (tcbhead_t): Move gscope_flag to the end
1949 of the structure for sparc32.
1951 2007-07-26 Aurelien Jarno <aurelien@aurel32.net>
1953 * sysdeps/sparc/tls.h (tcbhead_t): Add gscope_flag.
1955 2007-07-23 Ulrich Drepper <drepper@redhat.com>
1957 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
1958 code used when private futexes are assumed.
1959 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1962 2007-07-23 Jakub Jelinek <jakub@redhat.com>
1964 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
1965 (__lll_private_flag): Define.
1966 (lll_futex_wait): Define as a wrapper around lll_futex_timed_wait.
1967 (lll_futex_timed_wait, lll_futex_wake, lll_futex_wake_unlock): Use
1969 (lll_private_futex_wait, lll_private_futex_timedwait,
1970 lll_private_futex_wake): Define as wrapper around non-_private
1972 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
1973 (__lll_private_flag): Define.
1974 (lll_futex_timed_wait, lll_futex_wake): Use __lll_private_flag.
1975 (lll_private_futex_wait, lll_private_futex_timedwait,
1976 lll_private_futex_wake): Define as wrapper around non-_private
1979 2007-07-10 Steven Munroe <sjmunroe@us.ibm.com>
1981 * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Add LLL_SHARED
1982 parameter to lll_futex_wait call.
1983 * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
1985 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
1986 Replace lll_futex_wait with lll_private_futex_wait.
1987 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
1988 Add LLL_SHARED parameter to lll_futex_wake().
1990 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define LLL_PRIVATE
1991 LLL_SHARED, lll_private_futex_wait, lll_private_futex_timed_wait and
1992 lll_private_futex_wake.
1993 (lll_futex_wait): Add private parameter. Adjust FUTEX_PRIVATE_FLAG
1994 bit from private parm before syscall.
1995 (lll_futex_timed_wait): Likewise.
1996 (lll_futex_wake): Likewise.
1997 (lll_futex_wake_unlock): Likewise.
1998 (lll_mutex_unlock): Add LLL_SHARED parm to lll_futex_wake call.
1999 (lll_robust_mutex_unlock): Likewise.
2000 (lll_mutex_unlock_force): Likewise.
2001 (lll_wait_tid): Add LLL_SHARED parm to lll_futex_wait call.
2003 2007-07-23 Ulrich Drepper <drepper@redhat.com>
2005 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
2006 compilation when unconditionally using private futexes.
2007 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
2008 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
2010 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
2011 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
2013 2007-07-17 Jakub Jelinek <jakub@redhat.com>
2015 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock_clear_flags2):
2018 2007-07-06 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2020 * sysdeps/sh/tls.h: Include stdlib.h, list.h, sysdep.h and
2023 2007-05-16 Roland McGrath <roland@redhat.com>
2025 * init.c (__nptl_initial_report_events): New variable.
2026 (__pthread_initialize_minimal_internal): Initialize pd->report_events
2029 2007-06-22 Jakub Jelinek <jakub@redhat.com>
2031 * pthread_getattr_np.c (pthread_getattr_np): Clear cpuset and
2032 cpusetsize if pthread_getaffinity_np failed with ENOSYS.
2034 2007-06-19 Ulrich Drepper <drepper@redhat.com>
2036 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Remove mrlock
2039 2007-06-18 Ulrich Drepper <drepper@redhat.com>
2041 * pthreadP.h: Define PTHREAD_MUTEX_TYPE.
2042 * phtread_mutex_lock.c: Use PTHREAD_MUTEX_TYPE.
2043 * pthread_mutex_timedlock.c: Likewise.
2044 * pthread_mutex_trylock.c: Likewise.
2045 * pthread_mutex_unlock.c: Likewise.
2047 2007-06-17 Andreas Schwab <schwab@suse.de>
2049 * sysdeps/pthread/pt-initfini.c: Tell gcc about the nonstandard
2052 2007-06-17 Ulrich Drepper <drepper@redhat.com>
2054 * allocatestack.c (allocate_stack): Make code compile if
2055 __ASSUME_PRIVATE_FUTEX is set.
2057 2007-06-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2059 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S:
2060 (__pthread_rwlock_rdlock): Don't use non SH-3/4 instruction.
2061 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S:
2062 (__pthread_rwlock_wrlock): Likewise.
2063 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
2064 (pthread_rwlock_timedrdlock): Likewise.
2065 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
2066 (pthread_rwlock_timedwrlock): Likewise.
2067 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S:
2068 (__pthread_rwlock_unlock): Likewise.
2070 2007-06-10 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2072 * sysdeps/sh/tcb-offsets.sym: Add PRIVATE_FUTEX.
2073 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Include endian.h.
2074 Split __flags into __flags, __shared, __pad1 and __pad2.
2075 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Use private
2076 futexes if they are available.
2077 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Adjust so that change
2078 in libc-lowlevellock.S allow using private futexes.
2079 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
2080 FUTEX_PRIVATE_FLAG. Add additional parameter to lll_futex_wait,
2081 lll_futex_timed_wait and lll_futex_wake. Change lll_futex_wait
2082 to call lll_futex_timed_wait. Add lll_private_futex_wait,
2083 lll_private_futex_timed_wait and lll_private_futex_wake.
2084 (lll_robust_mutex_unlock): Fix typo.
2085 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Use private
2086 field in futex command setup.
2087 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Use
2088 COND_NWAITERS_SHIFT instead of COND_CLOCK_BITS.
2089 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
2090 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use private futexes
2091 if they are available. Remove clear_once_control.
2092 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Use private
2093 futexes if they are available.
2094 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
2095 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
2096 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
2097 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
2098 * sysdeps/unix/sysv/linux/sh/sem_post.S: Add private futex support.
2099 Wake only when there are waiters.
2100 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add private futex
2101 support. Indicate that there are waiters. Remove unnecessary
2102 extra cancellation test.
2103 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise. Removed
2104 left-over duplication of __sem_wait_cleanup.
2106 2007-06-07 Ulrich Drepper <drepper@redhat.com>
2108 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Add additional
2109 parameter to lll_futex_wait, lll_futex_timed_wait, and
2110 lll_futex_wake. Change lll_futex_wait to call lll_futex_timed_wait.
2111 Add lll_private_futex_wait, lll_private_futex_timed_wait, and
2112 lll_private_futex_wake.
2113 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
2114 * allocatestack.c: Adjust use of lll_futex_* macros.
2116 * lowlevellock.h: Likewise.
2117 * pthread_barrier_wait.c: Likewise.
2118 * pthread_cond_broadcast.c: Likewise.
2119 * pthread_cond_destroy.c: Likewise.
2120 * pthread_cond_signal.c: Likewise.
2121 * pthread_cond_timedwait.c: Likewise.
2122 * pthread_cond_wait.c: Likewise.
2123 * pthread_create.c: Likewise.
2124 * pthread_mutex_lock.c: Likewise.
2125 * pthread_mutex_setprioceiling.c: Likewise.
2126 * pthread_mutex_timedlock.c: Likewise.
2127 * pthread_mutex_unlock.c: Likewise.
2128 * pthread_rwlock_timedrdlock.c: Likewise.
2129 * pthread_rwlock_timedwrlock.c: Likewise.
2130 * pthread_rwlock_unlock.c: Likewise.
2131 * sysdeps/alpha/tls.h: Likewise.
2132 * sysdeps/i386/tls.h: Likewise.
2133 * sysdeps/ia64/tls.h: Likewise.
2134 * sysdeps/powerpc/tls.h: Likewise.
2135 * sysdeps/pthread/aio_misc.h: Likewise.
2136 * sysdeps/pthread/gai_misc.h: Likewise.
2137 * sysdeps/s390/tls.h: Likewise.
2138 * sysdeps/sh/tls.h: Likewise.
2139 * sysdeps/sparc/tls.h: Likewise.
2140 * sysdeps/unix/sysv/linux/fork.c: Likewise.
2141 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
2142 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: Likewise.
2143 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Likewise.
2144 * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
2145 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
2146 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
2147 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
2148 * sysdeps/unix/sysv/linux/sparc/pthread_once.c: Likewise.
2149 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c:
2151 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: Likewise.
2152 * sysdeps/x86_64/tls.h: Likewise.
2154 2007-05-29 Ulrich Drepper <drepper@redhat.com>
2156 * pthread_getattr_np.c: No need to install a cancellation handler,
2157 this is no cancellation point.
2158 * pthread_getschedparam.c: Likewise.
2159 * pthread_setschedparam.c: Likewise.
2160 * pthread_setschedprio.c: Likewise.
2161 * sysdeps/unix/sysv/linux/lowlevellock.c: Remove all traces of
2163 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
2164 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
2165 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
2166 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2167 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2168 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2169 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
2170 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
2171 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
2172 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: Likewise.
2173 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
2174 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2176 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Checking
2177 whether there are more than one thread makes no sense here since
2178 we only call the slow path if the locks are taken.
2179 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Likewise.
2181 * sysdeps/unix/sysv/linux/internaltypes.h: Introduce
2182 COND_NWAITERS_SHIFT.
2183 * pthread_cond_destroy.c: Use COND_NWAITERS_SHIFT instead of
2185 * pthread_cond_init.c: Likewise.
2186 * pthread_cond_timedwait.c: Likewise.
2187 * pthread_cond_wait.c: Likewise.
2188 * pthread_condattr_getclock.c: Likewise.
2189 * pthread_condattr_setclock.c: Likewise.
2190 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Likewise.
2191 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2192 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
2193 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
2194 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2196 2007-05-28 Jakub Jelinek <jakub@redhat.com>
2198 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c: Include
2201 * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Use explicit
2203 (THREAD_GSCOPE_GET_FLAG): Remove.
2204 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Remove.
2205 * allocatestack.c (__wait_lookup_done): Revert 2007-05-24
2207 * sysdeps/powerpc/tls.h (tcbhead_t): Remove gscope_flag.
2208 (THREAD_GSCOPE_GET_FLAG): Remove.
2209 (THREAD_GSCOPE_RESET_FLAG): Use THREAD_SELF->header.gscope_flag
2210 instead of THREAD_GSCOPE_GET_FLAG.
2211 (THREAD_GSCOPE_SET_FLAG): Likewise. Add atomic_write_barrier after
2213 * sysdeps/s390/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
2214 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
2215 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
2216 THREAD_GSCOPE_WAIT): Define.
2217 * sysdeps/sparc/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
2218 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
2219 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
2220 THREAD_GSCOPE_WAIT): Define.
2221 * sysdeps/sh/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
2222 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
2223 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
2224 THREAD_GSCOPE_WAIT): Define.
2225 * sysdeps/ia64/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
2226 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
2227 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
2228 THREAD_GSCOPE_WAIT): Define.
2230 2007-05-24 Richard Henderson <rth@redhat.com>
2232 * descr.h (struct pthread): Add header.gscope_flag.
2233 * sysdeps/alpha/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
2234 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
2235 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
2236 THREAD_GSCOPE_WAIT): Define.
2238 2007-05-27 Ulrich Drepper <drepper@redhat.com>
2240 * init.c: Make it compile with older kernel headers.
2242 * tst-initializers1.c: Show through exit code which test failed.
2244 * pthread_rwlock_init.c: Also initialize __shared field.
2245 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Split __flags
2246 element in rwlock structure into four byte elements. One of them is
2247 the new __shared element.
2248 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h [__WORDSIZE=32]:
2250 [__WORDSIZE=64]: Renamed __pad1 element int rwlock structure to
2251 __shared, adjust names of other padding elements.
2252 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2253 * sysdeps/pthread/pthread.h: Adjust rwlock initializers.
2254 * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: Add PSHARED.
2255 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define
2257 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Change main
2258 futex to use private operations if possible.
2259 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
2261 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
2263 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
2264 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
2265 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
2266 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2268 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2270 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
2271 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
2273 2007-05-26 Ulrich Drepper <drepper@redhat.com>
2275 * pthreadP.h (PTHREAD_RWLOCK_PREFER_READER_P): Define.
2276 * pthread_rwlock_rdlock.c: Use PTHREAD_RWLOCK_PREFER_READER_P.
2277 * pthread_rwlock_timedrdlock.c: Likewise.
2278 * pthread_rwlock_tryrdlock.c: Likewise.
2280 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S (sem_trywait): Tiny
2283 * sysdeps/unix/sysv/linux/sem_wait.c: Add missing break.
2284 * sysdeps/unix/sysv/linux/sem_timedwait.c: Removed left-over
2285 duplication of __sem_wait_cleanup.
2287 * allocatestack.c: Revert last change.
2289 * sysdeps/i386/tls.h: Likewise.
2290 * sysdeps/x86_64/tls.h: Likewise.
2291 * descr.h [TLS_DTV_AT_TP] (struct pthread): Add private_futex field to
2293 * sysdeps/powerpc/tcb-offsets.sym: Add PRIVATE_FUTEX_OFFSET.
2295 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_barrier):
2297 * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: Add PRIVATE definition.
2298 * pthread_barrier_init.c: Set private flag if pshared and private
2299 futexes are supported.
2300 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Use
2301 private field in futex command setup.
2302 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
2304 2007-05-25 Ulrich Drepper <drepper@redhat.com>
2306 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Add private futex
2308 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
2309 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
2310 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
2311 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
2312 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
2314 * semaphoreP.h: Declare __old_sem_init and __old_sem_wait.
2315 * sem_init.c (__new_sem_init): Rewrite to initialize all three
2316 fields in the structure.
2317 (__old_sem_init): New function.
2318 * sem_open.c: Initialize all fields of the structure.
2319 * sem_getvalue.c: Adjust for renamed element.
2320 * sysdeps/unix/sysv/linux/Makefile [subdir=nptl]
2321 (gen-as-const-headers): Add structsem.sym.
2322 * sysdeps/unix/sysv/linux/structsem.sym: New file.
2323 * sysdeps/unix/sysv/linux/internaltypes.h: Rename struct sem to
2324 struct new_sem. Add struct old_sem.
2325 * sysdeps/unix/sysv/linux/sem_post.c: Wake only when there are waiters.
2326 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
2327 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
2328 * sysdeps/unix/sysv/linux/sem_wait.c: Indicate that there are waiters.
2329 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
2330 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
2331 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
2332 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
2333 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
2334 * Makefile (tests): Add tst-sem10, tst-sem11, tst-sem12.
2335 * tst-sem10.c: New file.
2336 * tst-sem11.c: New file.
2337 * tst-sem12.c: New file.
2338 * tst-typesizes.c: Test struct new_sem and struct old_sem instead
2341 2007-05-25 Ulrich Drepper <drepper@redhat.com>
2342 Jakub Jelinek <jakub@redhat.com>
2344 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
2345 Move __pthread_enable_asynccancel right before futex syscall.
2346 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
2349 2007-05-24 Jakub Jelinek <jakub@redhat.com>
2351 * sysdeps/i386/tls.h (THREAD_SET_PRIVATE_FUTEX,
2352 THREAD_COPY_PRIVATE_FUTEX): Define.
2353 * sysdeps/x86_64/tls.h (THREAD_SET_PRIVATE_FUTEX,
2354 THREAD_COPY_PRIVATE_FUTEX): Define.
2355 * allocatestack.c (allocate_stack): Use THREAD_COPY_PRIVATE_FUTEX.
2356 * init.c (__pthread_initialize_minimal_internal): Use
2357 THREAD_SET_PRIVATE_FUTEX.
2359 * sysdeps/powerpc/tls.h (tcbhead_t): Add gscope_flag.
2360 (THREAD_GSCOPE_FLAG_UNUSED, THREAD_GSCOPE_FLAG_USED,
2361 THREAD_GSCOPE_FLAG_WAIT): Define.
2362 (THREAD_GSCOPE_GET_FLAG, THREAD_GSCOPE_SET_FLAG,
2363 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_WAIT): Define.
2364 * sysdeps/i386/tls.h (THREAD_GSCOPE_WAIT): Don't use
2366 (THREAD_GSCOPE_GET_FLAG): Define.
2367 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Define.
2368 * allocatestack.c (__wait_lookup_done): Use THREAD_GSCOPE_GET_FLAG
2369 instead of ->header.gscope_flag directly.
2371 2007-05-23 Ulrich Drepper <drepper@redhat.com>
2373 * init.c (__pthread_initialize_minimal_internal): Check whether
2374 private futexes are available.
2375 * allocatestack.c (allocate_stack): Copy private_futex field from
2376 current thread into the new stack.
2377 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Use private
2378 futexes if they are available.
2379 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise
2380 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Adjust so that change
2381 in libc-lowlevellock.S allow using private futexes.
2382 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
2383 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
2385 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
2386 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use private futexes
2387 if they are available.
2388 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
2389 * sysdeps/x86_64/tcb-offsets.sym: Add PRIVATE_FUTEX.
2390 * sysdeps/i386/tcb-offsets.sym: Likewise.
2391 * sysdeps/x86_64/tls.h (tcbhead_t): Add private_futex field.
2392 * sysdeps/i386/tls.h (tcbhead_t): Likewise.
2394 2007-05-21 Ulrich Drepper <drepper@redhat.com>
2396 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
2397 Remove ptr_wait_lookup_done again.
2398 * init.c (pthread_functions): Don't add .ptr_wait_lookup_done here.
2399 (__pthread_initialize_minimal_internal): Initialize
2400 _dl_wait_lookup_done pointer in _rtld_global directly.
2401 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
2402 Remove code to code _dl_wait_lookup_done.
2403 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_WAIT): The pointer is not
2406 2007-05-21 Jakub Jelinek <jakub@redhat.com>
2408 * tst-robust9.c (do_test): Don't fail if ENABLE_PI and
2409 pthread_mutex_init failed with ENOTSUP.
2411 2007-05-19 Ulrich Drepper <drepper@redhat.com>
2413 * allocatestack.c (__wait_lookup_done): New function.
2414 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
2415 Add ptr_wait_lookup_done.
2416 * init.c (pthread_functions): Initialize .ptr_wait_lookup_done.
2417 * pthreadP.h: Declare __wait_lookup_done.
2418 * sysdeps/i386/tls.h (tcbhead_t): Add gscope_flag.
2419 Define macros to implement reference handling of global scope.
2420 * sysdeps/x86_64/tls.h: Likewise.
2421 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
2422 Initialize GL(dl_wait_lookup_done).
2424 2007-05-17 Ulrich Drepper <drepper@redhat.com>
2427 * pthread_mutex_lock.c: Preserve FUTEX_WAITERS bit when dead owner
2429 * pthread_mutex_timedlock.c: Likewise.
2430 * pthread_mutex_trylock.c: Likewise.
2431 Patch in part by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
2433 * Makefile (tests): Add tst-robust9 and tst-robustpi9.
2434 * tst-robust9.c: New file.
2435 * tst-robustpi9.c: New file.
2437 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Remove
2438 unnecessary extra cancellation test.
2440 2007-05-14 Ulrich Drepper <drepper@redhat.com>
2442 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Remove unnecessary
2443 extra cancellation test.
2444 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
2446 2007-05-10 Ulrich Drepper <drepper@redhat.com>
2448 * descr.h (struct pthread): Rearrange members to fill hole in
2451 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
2452 (__pthread_setaffinity_new): If syscall was successful and
2453 RESET_VGETCPU_CACHE is defined, use it before returning.
2454 * sysdeps/unix/sysv/linux/x86_64/pthread_setaffinity.c: New file.
2456 2007-05-10 Jakub Jelinek <jakub@redhat.com>
2459 * tst-align2.c: Include stackinfo.h.
2460 * tst-getpid1.c: Likewise.
2462 2007-05-02 Carlos O'Donell <carlos@systemhalted.org>
2465 * tst-align2.c (do_test): Add _STACK_GROWS_UP case.
2466 * tst-getpid1.c (do_test): Likewise.
2469 * allocatestack.c (change_stack_perm): Add _STACK_GROWS_UP case.
2470 (allocate_stack): Likewise.
2472 2007-05-07 Ulrich Drepper <drepper@redhat.com>
2474 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
2475 (__lll_robust_lock_wait): Fix race caused by reloading of futex value.
2476 (__lll_robust_timedlock_wait): Likewise.
2477 Reported by Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>.
2479 2007-05-06 Mike Frysinger <vapier@gentoo.org>
2482 * tst-cancel-wrappers.sh: Set C["fdatasync"] to 1.
2483 * tst-cancel4.c (tf_fdatasync): New test.
2485 2007-04-27 Ulrich Drepper <drepper@redhat.com>
2488 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Treat error
2489 check mutexes like normal mutexes.
2492 * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
2493 Initialize the whole sigevent structure to appease valgrind.
2495 2007-04-25 Ulrich Drepper <drepper@redhat.com>
2497 * sysdeps/x86_64/tls.h (tcbhead_t): Add vgetcpu_cache.
2498 * sysdeps/x86_64/tcb-offsets.sym: Add VGETCPU_CACHE_OFFSET.
2500 2007-04-06 Ulrich Drepper <drepper@redhat.com>
2502 * tst-locale1.c: Avoid warnings.
2503 * tst-locale2.c: Likewise.
2505 2007-03-19 Steven Munroe <sjmunroe@us.ibm.com>
2507 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
2508 (__lll_robust_trylock): Add MUTEX_HINT_ACQ to lwarx instruction.
2510 2007-03-16 Jakub Jelinek <jakub@redhat.com>
2512 * sysdeps/pthread/bits/libc-lock.h: Use __extern_inline and
2513 __extern_always_inline where appropriate.
2514 * sysdeps/pthread/pthread.h: Likewise.
2516 2007-03-13 Richard Henderson <rth@redhat.com>
2518 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Use two
2519 separate cfi regions for the two subsections.
2521 2007-02-25 Ulrich Drepper <drepper@redhat.com>
2523 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset refcntr in
2524 new thread, don't just decrement it.
2525 Patch by Suzuki K P <suzuki@in.ibm.com>.
2527 2007-02-21 Ulrich Drepper <drepper@redhat.com>
2529 * sysdeps/pthread/pthread-functions.h: Correct last patch, correct
2530 PTHFCT_CALL definition.
2532 2007-02-18 Ulrich Drepper <drepper@redhat.com>
2534 * sysdeps/pthread/pthread-functions.h: If PTR_DEMANGLE is not
2535 available, don't use it.
2537 2007-02-09 Jakub Jelinek <jakub@redhat.com>
2539 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
2540 (__lll_mutex_timedlock_wait): Use correct pointer when we don't
2541 call into the kernel to delay.
2543 2007-01-18 Ulrich Drepper <drepper@redhat.com>
2545 * tst-initializers1.c: We want to test the initializers as seen
2546 outside of libc, so undefined _LIBC.
2548 * pthread_join.c (cleanup): Avoid warning.
2550 2007-01-17 Ulrich Drepper <drepper@redhat.com>
2552 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
2553 (__lll_timedwait_tid): Add unwind info.
2555 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Don't just copy the
2556 function table, mangle the pointers.
2557 * sysdeps/pthread/pthread-functions.h: Define PTHFCT_CALL.
2558 * forward.c: Use PTHFCT_CALL and __libc_pthread_functions_init.
2559 * sysdeps/pthread/bits/libc-lock.h: When using __libc_pthread_functions
2560 demangle pointers before use.
2561 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Use PTHFCT_CALL to
2563 * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
2564 * sysdeps/pthread/setxid.h: Likewise.
2566 2007-01-12 Ulrich Drepper <drepper@redhat.com>
2568 * tst-rwlock7.c: Show some more information in case of correct
2571 2007-01-11 Ulrich Drepper <drepper@redhat.com>
2573 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
2574 (lll_futex_timed_wait): Undo part of last change, don't negate
2577 2007-01-10 Ulrich Drepper <drepper@redhat.com>
2579 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Cleanups. Define
2580 FUTEX_CMP_REQUEUE and lll_futex_requeue.
2582 2006-12-28 David S. Miller <davem@davemloft.net>
2584 * shlib-versions: Fix sparc64 linux target specification.
2586 2007-01-10 Jakub Jelinek <jakub@redhat.com>
2588 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
2589 Adjust include path for pthread_barrier_wait.c move.
2591 2006-12-21 Jakub Jelinek <jakub@redhat.com>
2593 * sysdeps/unix/sysv/linux/pthread_kill.c (pthread_kill): Make sure
2594 tid isn't reread from pd->tid in between ESRCH test and the syscall.
2596 2006-12-06 Jakub Jelinek <jakub@redhat.com>
2598 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Handle
2599 6 argument cancellable syscalls.
2600 (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
2601 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO): Handle
2602 6 argument cancellable syscalls.
2603 (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
2605 2006-12-09 Ulrich Drepper <drepper@redhat.com>
2607 * sysdeps/unix/sysv/linux/rtld-lowlevel.h
2608 (__rtld_mrlock_initialize): Add missing closing parenthesis.
2610 2006-10-30 Jakub Jelinek <jakub@redhat.com>
2612 * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
2613 __sync_lock_release instead of __sync_lock_release_si.
2615 2006-10-29 Jakub Jelinek <jakub@redhat.com>
2617 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (RTLD_SINGLE_THREAD_P):
2619 (SINGLE_THREAD_P): Define to 1 if IS_IN_rtld.
2620 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Likewise.
2621 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
2622 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
2623 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
2624 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
2625 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
2626 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
2627 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
2628 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
2629 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
2631 2006-10-27 Ulrich Drepper <drepper@redhat.com>
2633 * sysdeps/pthread/pthread_barrier_wait.c: Move to...
2634 * pthread_barrier_wait.c: ...here.
2635 * sysdeps/pthread/pthread_cond_broadcast.c: Move to...
2636 * pthread_cond_broadcast.c: ...here.
2637 * sysdeps/pthread/pthread_cond_signal.c: Move to...
2638 * pthread_cond_signal.c: ...here.
2639 * sysdeps/pthread/pthread_cond_timedwait.c: Move to...
2640 * pthread_cond_timedwait.c: ...here.
2641 * sysdeps/pthread/pthread_cond_wait.c: Move to...
2642 * pthread_cond_wait.c: ...here.
2643 * sysdeps/pthread/pthread_once.c: Move to...
2644 * pthread_once.c: ...here.
2645 * sysdeps/pthread/pthread_rwlock_rdlock.c: Move to...
2646 * pthread_rwlock_rdlock.c: ...here.
2647 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Move to...
2648 * pthread_rwlock_timedrdlock.c: ...here.
2649 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Move to...
2650 * pthread_rwlock_timedwrlock.c: ...here.
2651 * sysdeps/pthread/pthread_rwlock_unlock.c: Move to...
2652 * pthread_rwlock_unlock.c: ...here.
2653 * sysdeps/pthread/pthread_rwlock_wrlock.c: Move to...
2654 * pthread_rwlock_wrlock.c: ...here.
2655 * sysdeps/pthread/pthread_spin_destroy.c: Move to...
2656 * pthread_spin_destroy.c: ...here.
2657 * sysdeps/pthread/pthread_spin_init.c: Move to...
2658 * pthread_spin_init.c: ...here.
2659 * sysdeps/pthread/pthread_spin_unlock.c: Move to...
2660 * pthread_spin_unlock.c: ...here.
2661 * sysdeps/pthread/pthread_getcpuclockid.c: Move to...
2662 * pthread_getcpuclockid.c: ...here.
2664 * init.c: USE_TLS support is now always enabled.
2665 * tst-tls5.h: Likewise.
2666 * sysdeps/alpha/tls.h: Likewise.
2667 * sysdeps/i386/tls.h: Likewise.
2668 * sysdeps/ia64/tls.h: Likewise.
2669 * sysdeps/powerpc/tls.h: Likewise.
2670 * sysdeps/s390/tls.h: Likewise.
2671 * sysdeps/sh/tls.h: Likewise.
2672 * sysdeps/sparc/tls.h: Likewise.
2673 * sysdeps/x86_64/tls.h: Likewise.
2675 2006-10-27 Jakub Jelinek <jakub@redhat.com>
2677 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
2678 __rtld_mrlock_change): Update oldval if atomic compare and exchange
2681 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
2682 Define to THREAD_SELF->header.multiple_threads.
2683 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
2685 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
2687 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
2688 (SINGLE_THREAD_P): Likewise.
2689 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
2690 (SINGLE_THREAD_P): Likewise.
2691 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
2692 (SINGLE_THREAD_P): Likewise.
2693 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
2694 (SINGLE_THREAD_P): Likewise.
2695 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (SINGLE_THREAD_P):
2697 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
2698 (SINGLE_THREAD_P): Likewise.
2699 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
2700 (SINGLE_THREAD_P): Likewise.
2701 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (SINGLE_THREAD_P):
2704 2006-10-26 Jakub Jelinek <jakub@redhat.com>
2706 * pthread_attr_setstacksize.c (NEW_VERNUM): Define to GLIBC_2_3_3
2707 by default rather than 2_3_3.
2709 2006-10-17 Jakub Jelinek <jakub@redhat.com>
2711 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
2712 __rtld_mrlock_unlock, __rtld_mrlock_change, __rtld_mrlock_done): Use
2713 atomic_* instead of catomic_* macros.
2715 2006-10-12 Ulrich Drepper <drepper@redhat.com>
2718 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add SEM_VALUE_MAX.
2719 * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
2720 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
2721 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
2722 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
2723 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Remove SEM_VALUE_MAX.
2724 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
2725 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
2726 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
2727 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: Likewise.
2728 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
2729 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
2730 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
2732 2006-10-11 Ulrich Drepper <drepper@redhat.com>
2734 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add support for
2735 cancelable syscalls with six parameters.
2737 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Use catomic_*
2738 operations instead of atomic_*.
2740 2006-10-09 Ulrich Drepper <drepper@redhat.com>
2742 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: New file..
2744 2006-10-07 Ulrich Drepper <drepper@redhat.com>
2746 * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: New file.
2747 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstack.c: New file.
2748 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c:
2750 * pthread_attr_setstack.c: Allow overwriting the version number of the
2752 * pthread_attr_setstacksize.c: Likewise.
2753 (__old_pthread_attr_setstacksize): If STACKSIZE_ADJUST is defined use
2755 * sysdeps/unix/sysv/linux/powerpc/Versions (libpthread): Add
2756 pthread_attr_setstack and pthread_attr_setstacksize to GLIBC_2.6.
2758 2006-09-24 Ulrich Drepper <drepper@redhat.com>
2761 * descr.h (ENQUEUE_MUTEX_BOTH): Add cast to avoid warning.
2762 Patch by Petr Baudis.
2764 2006-09-18 Jakub Jelinek <jakub@redhat.com>
2766 * tst-kill4.c (do_test): Explicitly set tf thread's stack size.
2768 * tst-cancel2.c (tf): Loop as long as something was written.
2770 2006-09-12 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2772 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: For PI
2773 mutexes wake all mutexes.
2774 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Don't increment
2775 WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
2776 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
2778 2006-09-12 Ulrich Drepper <drepper@redhat.com>
2780 * tst-cond22.c (tf): Slight changes to the pthread_cond_wait use
2781 to guarantee the thread is always canceled.
2783 2006-09-08 Jakub Jelinek <jakub@redhat.com>
2785 * tst-cond22.c: Include pthread.h instead of pthreadP.h.
2787 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Only
2788 increase FUTEX if increasing WAKEUP_SEQ. Fix comment typo.
2789 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
2790 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2791 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2793 2006-09-08 Ulrich Drepper <drepper@redhat.com>
2796 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Don't
2797 increment WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
2798 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
2799 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2800 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2801 * Makefile (tests): Add tst-cond22.
2802 * tst-cond22.c: New file.
2804 2006-09-05 Ulrich Drepper <drepper@redhat.com>
2807 * descr.h (struct pthread): Add parent_cancelhandling.
2808 * sysdeps/pthread/createthread.c (create_thread): Pass parent
2809 cancelhandling value to child.
2810 * pthread_create.c (start_thread): If parent thread was canceled
2811 reset the SIGCANCEL mask.
2812 * Makefile (tests): Add tst-cancel25.
2813 * tst-cancel25.c: New file.
2815 2006-09-05 Jakub Jelinek <jakub@redhat.com>
2816 Ulrich Drepper <drepper@redhat.com>
2818 * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY): Don't decrement
2819 counterp if it is already zero.
2820 * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY): Likewise..
2822 2006-03-04 Jakub Jelinek <jakub@redhat.com>
2823 Roland McGrath <roland@redhat.com>
2825 * sysdeps/unix/sysv/linux/i386/lowlevellock.h
2826 (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
2827 LLL_STUB_UNWIND_INFO_3, LLL_STUB_UNWIND_INFO_4): Define.
2828 (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
2829 lll_robust_mutex_cond_lock, lll_mutex_timedlock,
2830 lll_robust_mutex_timedlock, lll_mutex_unlock,
2831 lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
2832 Add _L_*_ symbols around the subsection.
2833 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Add unwind info.
2834 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Likewise.
2836 2006-03-03 Jakub Jelinek <jakub@redhat.com>
2837 Roland McGrath <roland@redhat.com>
2839 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
2840 (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
2841 LLL_STUB_UNWIND_INFO_5, LLL_STUB_UNWIND_INFO_6): Define.
2842 (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
2843 lll_robust_mutex_cond_lock, lll_mutex_timedlock,
2844 lll_robust_mutex_timedlock, lll_mutex_unlock,
2845 lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
2846 Add _L_*_ symbols around the subsection.
2847 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Add unwind info.
2848 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
2850 2006-08-31 Ulrich Drepper <drepper@redhat.com>
2852 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Undo last
2853 change because it can disturb too much existing code. If real hard
2854 reader preference is needed we'll introduce another type.
2855 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
2856 (pthread_rwlock_timedwrlock): Likewise.
2857 * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
2860 2006-08-30 Ulrich Drepper <drepper@redhat.com>
2862 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Respect
2864 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
2865 (pthread_rwlock_timedwrlock): Likewise.
2866 * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
2869 2006-08-25 Jakub Jelinek <jakub@redhat.com>
2871 * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libpthread):
2872 Only define ifdef SHARED.
2874 2006-08-23 Ulrich Drepper <drepper@redhat.com>
2876 * allocatestack.c (queue_stack): Move freeing of surplus stacks to...
2877 (free_stacks): ...here.
2878 (__free_stack_cache): New function.
2879 * pthreadP.h: Declare __free_stack_cache.
2880 * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
2882 * init.c (pthread_functions): Initialize ptr_freeres.
2883 * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libptread):
2884 New freeres function.
2886 2006-07-30 Joseph S. Myers <joseph@codesourcery.com>
2889 * Makefile (extra-objs): Add modules to extra-test-objs instead.
2891 2006-08-20 Ulrich Drepper <drepper@redhat.com>
2893 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
2894 _XOPEN_REALTIME_THREADS.
2896 2006-08-15 Jakub Jelinek <jakub@redhat.com>
2898 * sysdeps/unix/sysv/linux/clock_settime.c (INTERNAL_VSYSCALL): Use
2899 HAVE_CLOCK_GETRES_VSYSCALL as guard macro rather than
2900 HAVE_CLOCK_GETTIME_VSYSCALL.
2901 (maybe_syscall_settime_cpu): Use plain INTERNAL_VSYSCALL here.
2903 2006-08-14 Jakub Jelinek <jakub@redhat.com>
2905 * sysdeps/unix/sysv/linux/bits/posix_opt.h
2906 (_POSIX_THREAD_PRIO_PROTECT): Define to 200112L.
2907 * descr.h (struct priority_protection_data): New type.
2908 (struct pthread): Add tpp field.
2909 * pthreadP.h (PTHREAD_MUTEX_PP_NORMAL_NP,
2910 PTHREAD_MUTEX_PP_RECURSIVE_NP, PTHREAD_MUTEX_PP_ERRORCHECK_NP,
2911 PTHREAD_MUTEX_PP_ADAPTIVE_NP): New enum values.
2912 * pthread_mutex_init.c (__pthread_mutex_init): Handle non-robust
2914 * pthread_mutex_lock.c (__pthread_mutex_lock): Handle TPP mutexes.
2915 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Likewise.
2916 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Likewise.
2917 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Likewise.
2919 * pthread_setschedparam.c (__pthread_setschedparam): Handle priority
2921 * pthread_setschedprio.c (pthread_setschedprio): Likewise.
2922 * pthread_mutexattr_getprioceiling.c
2923 (pthread_mutexattr_getprioceiling): If ceiling is 0, ensure it is
2924 in the SCHED_FIFO priority range.
2925 * pthread_mutexattr_setprioceiling.c
2926 (pthread_mutexattr_setprioceiling): Fix prioceiling validation.
2927 * pthread_mutex_getprioceiling.c (pthread_mutex_getprioceiling): Fail
2928 if mutex is not TPP. Ceiling is now in __data.__lock.
2929 * pthread_mutex_setprioceiling.c: Include stdbool.h.
2930 (pthread_mutex_setprioceiling): Fix prioceiling validation. Ceiling
2931 is now in __data.__lock. Add locking.
2932 * pthread_create.c (__free_tcb): Free pd->tpp structure.
2933 * Makefile (libpthread-routines): Add tpp.
2934 (xtests): Add tst-mutexpp1, tst-mutexpp6 and tst-mutexpp10.
2935 * tst-tpp.h: New file.
2936 * tst-mutexpp1.c: New file.
2937 * tst-mutexpp6.c: New file.
2938 * tst-mutexpp10.c: New file.
2939 * tst-mutex1.c (TEST_FUNCTION): Don't redefine if already defined.
2940 * tst-mutex6.c (TEST_FUNCTION): Likewise.
2942 2006-08-12 Ulrich Drepper <drepper@redhat.com>
2945 * pthread_join.c (pthread_join): Account for self being canceled
2946 when checking for deadlocks.
2947 * tst-join5.c: Cleanups. Allow to be used in tst-join6.
2948 (tf1): Don't print anything after pthread_join returns, this would be
2949 another cancellation point.
2951 * tst-join6.c: New file.
2952 * Makefile (tests): Add tst-join6.
2954 2006-08-03 Ulrich Drepper <drepper@redhat.com>
2957 * pthread_setspecific.c (__pthread_setspecific): Check
2958 out-of-range index before checking for unused key.
2960 * sysdeps/pthread/gai_misc.h: New file.
2962 2006-08-01 Ulrich Drepper <drepper@redhat.com>
2964 * sysdeps/unix/sysv/linux/i386/smp.h: New file. Old Linux-specific
2965 file. Don't use sysctl.
2966 * sysdeps/unix/sysv/linux/smp.h: Always assume SMP. Archs can
2967 overwrite the file if this is likely not true.
2969 2006-07-31 Daniel Jacobowitz <dan@codesourcery.com>
2971 * allocatestack.c (__reclaim_stacks): Reset the PID on cached stacks.
2972 * Makefile (tests): Add tst-getpid3.
2973 * tst-getpid3.c: New file.
2975 2006-07-30 Roland McGrath <roland@redhat.com>
2977 * Makefile (libpthread-routines): Add ptw-sigsuspend.
2979 * sysdeps/unix/sysv/linux/i386/not-cancel.h
2980 (pause_not_cancel): New macro.
2981 (nanosleep_not_cancel): New macro.
2982 (sigsuspend_not_cancel): New macro.
2983 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
2984 nanosleep_not_cancel macro from <not-cancel.h>.
2985 * pthread_mutex_lock.c (__pthread_mutex_lock): Use pause_not_cancel
2986 macro from <not-cancel.h>.
2988 2006-07-28 Ulrich Drepper <drepper@redhat.com>
2989 Jakub Jelinek <jakub@redhat.com>
2991 * descr.h: Change ENQUEUE_MUTEX and DEQUEUE_MUTEX for bit 0
2992 notification of PI mutex. Add ENQUEUE_MUTEX_PI.
2993 * pthreadP.h: Define PTHREAD_MUTEX_PI_* macros for PI mutex types.
2994 * pthread_mutex_setprioceilining.c: Adjust for mutex type name change.
2995 * pthread_mutex_init.c: Add support for priority inheritance mutex.
2996 * pthread_mutex_lock.c: Likewise.
2997 * pthread_mutex_timedlock.c: Likewise.
2998 * pthread_mutex_trylock.c: Likewise.
2999 * pthread_mutex_unlock.c: Likewise.
3000 * sysdeps/pthread/pthread_cond_broadcast.c: For PI mutexes wake
3002 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.c: Likewise.
3003 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.c: Likewise.
3004 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: New file.
3005 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-header): Add
3006 pthread-pi-defines.sym.
3007 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_LOCK_PI,
3008 FUTEX_UNLOCK_PI, and FUTEX_TRYLOCK_PI.
3009 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
3010 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
3011 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
3012 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
3013 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
3014 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
3015 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
3016 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
3017 _POSIX_THREAD_PRIO_INHERIT to 200112L.
3018 * tst-mutex1.c: Adjust to allow use in PI mutex test.
3019 * tst-mutex2.c: Likewise.
3020 * tst-mutex3.c: Likewise.
3021 * tst-mutex4.c: Likewise.
3022 * tst-mutex5.c: Likewise.
3023 * tst-mutex6.c: Likewise.
3024 * tst-mutex7.c: Likewise.
3025 * tst-mutex7a.c: Likewise.
3026 * tst-mutex8.c: Likewise.
3027 * tst-mutex9.c: Likewise.
3028 * tst-robust1.c: Likewise.
3029 * tst-robust7.c: Likewise.
3030 * tst-robust8.c: Likewise.
3031 * tst-mutexpi1.c: New file.
3032 * tst-mutexpi2.c: New file.
3033 * tst-mutexpi3.c: New file.
3034 * tst-mutexpi4.c: New file.
3035 * tst-mutexpi5.c: New file.
3036 * tst-mutexpi6.c: New file.
3037 * tst-mutexpi7.c: New file.
3038 * tst-mutexpi7a.c: New file.
3039 * tst-mutexpi8.c: New file.
3040 * tst-mutexpi9.c: New file.
3041 * tst-robust1.c: New file.
3042 * tst-robust2.c: New file.
3043 * tst-robust3.c: New file.
3044 * tst-robust4.c: New file.
3045 * tst-robust5.c: New file.
3046 * tst-robust6.c: New file.
3047 * tst-robust7.c: New file.
3048 * tst-robust8.c: New file.
3049 * Makefile (tests): Add the new tests.
3051 * pthread_create.c (start_thread): Add some casts to avoid warnings.
3052 * pthread_mutex_destroy.c: Remove unneeded label.
3054 2006-07-01 Ulrich Drepper <drepper@redhat.com>
3056 * pthread_mutex_init.c (__pthread_mutex_init): Move some
3057 computations to compile time.
3059 2006-06-04 Ulrich Drepper <drepper@redhat.com>
3061 * sysdeps/pthread/pthread.h: Add pthread_equal inline version.
3063 2006-05-15 Ulrich Drepper <drepper@redhat.com>
3065 * sysdeps/unix/sysv/linux/fork.h: Mark __fork_handlers as hidden.
3067 2006-05-11 Ulrich Drepper <drepper@redhat.com>
3069 * pthread_key_create.c (__pthread_key_create): Do away with
3070 __pthread_keys_lock.
3072 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
3073 (__kernel_cpumask_size): Mark as hidden.
3074 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
3076 * sem_open.c (__sem_mappings_lock): Mark as hidden.
3077 * semaphoreP.h (__sem_mappings_lock): Likewise.
3079 2006-05-10 Ulrich Drepper <drepper@redhat.com>
3081 * pthread_atfork.c: Mark __dso_handle as hidden.
3083 2006-05-09 Ulrich Drepper <drepper@redhat.com>
3086 * sysdeps/pthread/unwind-forcedunwind.c: Different solution for
3087 the reload problem. Change the one path in pthread_cancel_init
3088 which causes the problem. Force gcc to reload. Simplify callers.
3089 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c
3090 (_Unwind_GetBSP): Undo last patch.
3092 2006-05-07 Ulrich Drepper <drepper@redhat.com>
3094 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: Make sure the
3095 function pointer is reloaded after pthread_cancel_init calls.
3098 * sysdeps/pthread/unwind-forcedunwind.c: Make sure functions
3099 pointers are reloaded after pthread_cancel_init calls.
3101 2006-05-01 Ulrich Drepper <drepper@redhat.com>
3103 * sysdeps/pthread/allocalim.h (__libc_use_alloca): Mark with
3106 2006-04-27 Ulrich Drepper <drepper@redhat.com>
3108 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
3109 Allocate new object which is passed to timer_sigev_thread so that
3110 the timer can be deleted before the new thread is scheduled.
3112 2006-04-26 Roland McGrath <roland@redhat.com>
3114 * sysdeps/x86_64/tls.h: Include <asm/prctl.h> inside [! __ASSEMBLER__].
3116 2006-04-08 Ulrich Drepper <drepper@redhat.com>
3118 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove branch predicion
3119 suffix for conditional jumps.
3120 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
3121 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
3122 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
3123 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
3124 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
3125 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
3127 * init.c (sigcancel_handler): Compare with correct PID even if the
3128 thread is in the middle of a fork call.
3129 (sighandler_setxid): Likewise.
3130 Reported by Suzuki K P <suzuki@in.ibm.com> .
3132 2006-04-07 Jakub Jelinek <jakub@redhat.com>
3134 * pthreadP.h (FUTEX_TID_MASK): Sync with kernel.
3136 2006-04-06 Ulrich Drepper <drepper@redhat.com>
3138 * pthread_getattr_np.c (pthread_getattr_np): Close fp if getrlimit
3139 fails [Coverity CID 105].
3141 2006-04-05 Ulrich Drepper <drepper@redhat.com>
3143 * sysdeps/pthread/pthread.h: Add nonnull attributes.
3145 2006-04-03 Steven Munroe <sjmunroe@us.ibm.com>
3148 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h [_ARCH_PWR4]:
3149 Define __lll_rel_instr using lwsync.
3151 2006-03-27 Ulrich Drepper <drepper@redhat.com>
3153 * allocatestack.c (allocate_stack): Always initialize robust_head.
3154 * descr.h: Define struct robust_list_head.
3155 (struct pthread): Use robust_list_head in robust mutex list definition.
3156 Adjust ENQUEUE_MUTEX and DEQUEUE_MUTEX.
3157 * init.c [!__ASSUME_SET_ROBUST_LIST] (__set_robust_list_avail): Define.
3158 (__pthread_initialize_minimal_internal): Register robust_list with
3160 * pthreadP.h: Remove PRIVATE_ from PTHREAD_MUTEX_ROBUST_* names.
3161 Declare __set_robust_list_avail.
3162 * pthread_create.c (start_thread): Register robust_list of new thread.
3163 [!__ASSUME_SET_ROBUST_LIST]: If robust_list is not empty wake up
3165 * pthread_mutex_destroy.c: For robust mutexes don't look at the
3166 number of users, it's unreliable.
3167 * pthread_mutex_init.c: Allow use of pshared robust mutexes if
3168 set_robust_list syscall is available.
3169 * pthread_mutex_consistent.c: Adjust for PTHREAD_MUTEX_ROBUST_* rename.
3170 * pthread_mutex_lock.c: Simplify robust mutex code a bit.
3171 Set robust_head.list_op_pending before trying to lock a robust mutex.
3172 * pthread_mutex_timedlock.c: Likewise.
3173 * pthread_mutex_trylock.c: Likewise.
3174 * pthread_mutex_unlock.c: Likewise for unlocking.
3175 * Makefile (tests): Add tst-robust8.
3176 * tst-robust8.c: New file.
3178 2006-03-08 Andreas Schwab <schwab@suse.de>
3180 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h
3181 (DL_SYSINFO_IMPLEMENTATION): Add missing newline.
3183 2006-03-05 Roland McGrath <roland@redhat.com>
3185 * configure (libc_add_on): Disable add-on when $add_ons_automatic = yes
3186 and $config_os doesn't match *linux*.
3188 2006-03-05 David S. Miller <davem@sunset.davemloft.net>
3190 * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S:
3191 Use __syscall_error.
3192 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
3193 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: Likewise.
3194 * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: Likewise.
3195 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
3196 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: Likewise.
3197 * sysdeps/unix/sysv/linux/sparc/Makefile: New file.
3199 2006-03-02 Ulrich Drepper <drepper@redhat.com>
3201 * sysdeps/unix/sysv/linux/aio_misc.h: Various cleanups.
3203 2006-03-01 Ulrich Drepper <drepper@redhat.com>
3205 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
3206 (__lll_robust_lock_wait): Also set FUTEX_WAITERS bit if we got the
3208 (__lll_robust_timedlock_wait): Likewise.
3209 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S
3210 (__lll_robust_lock_wait): Likewise.
3211 (__lll_robust_timedlock_wait): Likewise.
3212 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
3213 (__lll_robust_lock_wait): Likewise.
3214 (__lll_robust_timedlock_wait): Likewise.
3216 2006-03-01 Jakub Jelinek <jakub@redhat.com>
3218 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_robust_mutex_dead,
3219 lll_robust_mutex_trylock, lll_robust_mutex_lock,
3220 lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
3221 lll_robust_mutex_unlock): Define.
3222 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
3224 2006-02-28 H.J. Lu <hongjiu.lu@intel.com>
3226 * sysdeps/unix/sysv/linux/ia64/clone2.S: Include <clone2.S>
3227 instead of <clone.S>.
3229 2006-02-27 Jakub Jelinek <jakub@redhat.com>
3231 * Makefile (libpthread-routines): Add
3232 pthread_mutexattr_[sg]etprotocol, pthread_mutexattr_[sg]etprioceiling
3233 and pthread_mutex_[sg]etprioceiling.
3234 * Versions (GLIBC_2.4): Export pthread_mutexattr_getprotocol,
3235 pthread_mutexattr_setprotocol, pthread_mutexattr_getprioceiling,
3236 pthread_mutexattr_setprioceiling, pthread_mutex_getprioceiling and
3237 pthread_mutex_setprioceiling.
3238 * sysdeps/pthread/pthread.h (PTHREAD_PRIO_NONE, PTHREAD_PRIO_INHERIT,
3239 PTHREAD_PRIO_PROTECT): New enum values.
3240 (pthread_mutexattr_getprotocol, pthread_mutexattr_setprotocol,
3241 pthread_mutexattr_getprioceiling, pthread_mutexattr_setprioceiling,
3242 pthread_mutex_getprioceiling, pthread_mutex_setprioceiling): New
3244 * pthreadP.h (PTHREAD_MUTEX_PRIO_INHERIT_PRIVATE_NP,
3245 PTHREAD_MUTEX_PRIO_PROTECT_PRIVATE_NP): New enum values.
3246 (PTHREAD_MUTEX_PRIO_CEILING_SHIFT, PTHREAD_MUTEX_PRIO_CEILING_MASK):
3248 (PTHREAD_MUTEXATTR_PROTOCOL_SHIFT, PTHREAD_MUTEXATTR_PROTOCOL_MASK,
3249 PTHREAD_MUTEXATTR_PRIO_CEILING_SHIFT,
3250 PTHREAD_MUTEXATTR_PRIO_CEILING_MASK): Define.
3251 (PTHREAD_MUTEXATTR_FLAG_BITS): Or in PTHREAD_MUTEXATTR_PROTOCOL_MASK
3252 and PTHREAD_MUTEXATTR_PRIO_CEILING_MASK.
3253 * pthread_mutex_init.c (__pthread_mutex_init): For the time being
3254 return ENOTSUP for PTHREAD_PRIO_INHERIT or PTHREAD_PRIO_PROTECT
3256 * pthread_mutex_getprioceiling.c: New file.
3257 * pthread_mutex_setprioceiling.c: New file.
3258 * pthread_mutexattr_getprioceiling.c: New file.
3259 * pthread_mutexattr_setprioceiling.c: New file.
3260 * pthread_mutexattr_getprotocol.c: New file.
3261 * pthread_mutexattr_setprotocol.c: New file.
3263 2006-02-27 Daniel Jacobowitz <dan@codesourcery.com>
3265 * sysdeps/unix/sysv/linux/aio_misc.h: Include <limits.h>.
3267 2006-02-27 Roland McGrath <roland@redhat.com>
3269 * sysdeps/pthread/Subdirs: List nptl here too.
3270 * configure (libc_add_on_canonical): New variable.
3272 * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: Use #include_next.
3274 * sysdeps/unix/sysv/linux/sleep.c: Use #include_next after #include of
3275 self to get main source tree's file.
3276 * sysdeps/unix/sysv/linux/alpha/clone.S: Likewise.
3277 * sysdeps/unix/sysv/linux/i386/clone.S: Likewise.
3278 * sysdeps/unix/sysv/linux/i386/vfork.S: Likewise.
3279 * sysdeps/unix/sysv/linux/ia64/clone2.S: Likewise.
3280 * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: Likewise.
3281 * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: Likewise.
3282 * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: Likewise.
3283 * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: Likewise.
3284 * sysdeps/unix/sysv/linux/sh/clone.S: Likewise.
3285 * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: Likewise.
3286 * sysdeps/unix/sysv/linux/sparc/sparc64/clone.S: Likewise.
3287 * sysdeps/unix/sysv/linux/x86_64/clone.S: Likewise.
3288 * sysdeps/unix/sysv/linux/x86_64/vfork.S: Likewise.
3290 * Makefile: Use $(sysdirs) in vpath directive.
3292 * sysdeps/pthread/Makefile (CFLAGS-libc-start.c): Variable removed.
3293 (CPPFLAGS-timer_routines.c): Likewise.
3295 * Makeconfig (includes): Variable removed.
3297 2006-02-26 Roland McGrath <roland@redhat.com>
3299 * sysdeps/generic/pt-raise.c: Moved to ...
3300 * pt-raise.c: ... here.
3301 * sysdeps/generic/lowlevellock.h: Moved to ...
3302 * lowlevellock.h: ... here.
3304 2006-02-23 Roland McGrath <roland@redhat.com>
3306 * descr.h (struct pthread): Add final member `end_padding'.
3307 (PTHREAD_STRUCT_END_PADDING): Use it.
3309 2006-02-20 Roland McGrath <roland@redhat.com>
3311 * sysdeps/mips: Directory removed, saved in ports repository.
3312 * sysdeps/unix/sysv/linux/mips: Likewise.
3314 2006-02-18 Ulrich Drepper <drepper@redhat.com>
3316 * tst-robust1.c: Add second mutex to check that the mutex list is
3319 2006-02-17 Jakub Jelinek <jakub@redhat.com>
3321 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_mutex_dead,
3322 lll_robust_mutex_trylock, lll_robust_mutex_lock,
3323 lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
3324 lll_robust_mutex_unlock): New macros.
3325 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
3326 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
3327 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
3328 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
3329 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: New file.
3331 2006-02-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3333 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Add lll_robust_mutex_*
3335 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: New file.
3337 2006-02-17 Ulrich Drepper <drepper@redhat.com>
3339 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
3340 (lll_robust_mutex_unlock): Avoid unnecessary wakeups.
3341 * sysdeps/unix/sysv/linux/i386/lowlevellock.h
3342 (lll_robust_mutex_unlock): Likewise.
3344 2006-02-13 Jakub Jelinek <jakub@redhat.com>
3346 * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX):
3347 Set robust_list.__next rather than robust_list.
3348 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
3349 (__pthread_list_t): New typedef.
3350 (pthread_mutex_t): Replace __next and __prev fields with __list.
3351 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
3352 (__pthread_list_t): New typedef.
3353 (pthread_mutex_t): Replace __next and __prev fields with __list.
3354 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
3355 (__pthread_list_t, __pthread_slist_t): New typedefs.
3356 (pthread_mutex_t): Replace __next and __prev fields with __list.
3357 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
3358 (__pthread_list_t, __pthread_slist_t): New typedefs.
3359 (pthread_mutex_t): Replace __next and __prev fields with __list.
3360 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
3361 (__pthread_list_t, __pthread_slist_t): New typedefs.
3362 (pthread_mutex_t): Replace __next and __prev fields with __list.
3363 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h
3364 (__pthread_slist_t): New typedef.
3365 (pthread_mutex_t): Replace __next field with __list.
3367 2006-02-15 Ulrich Drepper <drepper@redhat.com>
3369 * pthreadP.h: Define PTHREAD_MUTEX_INCONSISTENT instead of
3370 PTHREAD_MUTEX_OWNERDEAD.
3371 (PTHREAD_MUTEX_ROBUST_PRIVATE_NP): Define as 16, not 256.
3372 Define FUTEX_WAITERS, FUTEX_OWNER_DIED, FUTEX_TID_MASK.
3373 * Makefile (libpthread-routines): Add lowlevelrobustlock.
3374 * pthread_create.c (start_thread): Very much simplify robust_list loop.
3375 * pthread_mutex_consistent.c: Inconsistent mutex have __owner now set
3376 to PTHREAD_MUTEX_INCONSISTENT.
3377 * pthread_mutex_destroy.c: Allow destroying of inconsistent mutexes.
3378 * pthread_mutex_lock.c: Reimplement robust mutex handling.
3379 * pthread_mutex_trylock.c: Likewise.
3380 * pthread_mutex_timedlock.c: Likewise.
3381 * pthread_mutex_unlock.c: Likewise.
3382 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
3383 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
3384 lowlevelrobustlock.sym.
3385 * sysdeps/unix/sysv/linux/lowlevelrobustlock.sym: New file.
3386 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add lll_robust_mutex_*
3388 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
3389 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: New file.
3390 * sysdeps/unix/sysv/linux/i386/i586/lowlevelrobustlock.S: New file.
3391 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrobustlock.S: New file.
3392 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: New file.
3394 2006-02-12 Ulrich Drepper <drepper@redhat.com>
3396 * allocatestack.c (allocate_stack): Initialize robust_list.
3397 * init.c (__pthread_initialize_minimal_internal): Likewise.
3398 * descr.h (struct xid_command): Pretty printing.
3399 (struct pthread): Use __pthread_list_t or __pthread_slist_t for
3400 robust_list. Adjust macros.
3401 * pthread_create.c (start_thread): Adjust robust_list handling.
3402 * phtread_mutex_unlock.c: Don't allow unlocking from any thread
3403 but the owner for all robust mutex types.
3404 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
3405 __pthread_list_t and __pthread_slist_t. Use them in pthread_mutex_t.
3406 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3407 * sysdeps/pthread/pthread.h: Adjust mutex initializers.
3409 * sysdeps/unix/sysv/linux/i386/not-cancel.h: Define openat_not_cancel,
3410 openat_not_cancel_3, openat64_not_cancel, and openat64_not_cancel_3.
3412 2006-02-08 Jakub Jelinek <jakub@redhat.com>
3414 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait,
3415 lll_futex_timedwait, lll_wait_tid): Add "memory" clobber.
3417 2006-01-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3419 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_futex_wait):
3421 (lll_futex_timed_wait): Define.
3423 2006-01-19 Ulrich Drepper <drepper@redhat.com>
3425 * tst-cancel4.c: Test ppoll.
3427 2006-01-18 Andreas Jaeger <aj@suse.de>
3430 * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h
3431 (pthread_mutex_t): Follow changes for other archs. Based on patch
3432 by Jim Gifford <patches@jg555.com>.
3434 2006-01-13 Richard Henderson <rth@redhat.com>
3436 * sysdeps/alpha/tls.h (tcbhead_t): Rename member to __private.
3438 2006-01-10 Roland McGrath <roland@redhat.com>
3440 * sysdeps/alpha/jmpbuf-unwind.h: File moved to main source tree.
3441 * sysdeps/i386/jmpbuf-unwind.h: Likewise.
3442 * sysdeps/mips/jmpbuf-unwind.h: Likewise.
3443 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
3444 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
3445 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
3446 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
3447 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
3448 * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
3449 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
3451 2006-01-09 Roland McGrath <roland@redhat.com>
3453 * tst-initializers1-c89.c: New file.
3454 * tst-initializers1-c99.c: New file.
3455 * tst-initializers1-gnu89.c: New file.
3456 * tst-initializers1-gnu99.c: New file.
3457 * Makefile (tests): Add them.
3458 (CFLAGS-tst-initializers1-c89.c): New variable.
3459 (CFLAGS-tst-initializers1-c99.c): New variable.
3460 (CFLAGS-tst-initializers1-gnu89.c): New variable.
3461 (CFLAGS-tst-initializers1-gnu99.c): New variable.
3463 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
3464 Use __extension__ on anonymous union definition.
3465 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3466 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
3467 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3468 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3469 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
3471 2006-01-08 Jakub Jelinek <jakub@redhat.com>
3473 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
3474 Don't give the union a name because it changes the mangled name.
3475 Instead name the struct for __data.
3476 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_mutex_t):
3478 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_mutex_t):
3481 2006-01-09 Jakub Jelinek <jakub@redhat.com>
3483 * sysdeps/sparc/sparc64/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Add
3484 stack bias to mc_ftp field.
3486 2006-01-07 Ulrich Drepper <drepper@redhat.com>
3488 * sysdeps/pthread/aio_misc.h (AIO_MISC_WAIT): Work around gcc
3489 being too clever and reloading the futex value where it shouldn't.
3491 2006-01-06 Ulrich Drepper <drepper@redhat.com>
3493 * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX): Use
3496 2006-01-06 Jakub Jelinek <jakub@redhat.com>
3498 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
3501 2006-01-06 Ulrich Drepper <drepper@redhat.com>
3503 * sysdeps/ia64/tls.h (tcbhead_t): Rename private member to __private.
3504 * sysdeps/ia64/tcb-offsets.sym: Adjust for private->__private
3505 rename in tcbhead_t.
3507 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
3508 Don't give the union a name because it changes the mangled name.
3509 Instead name the struct for __data.
3510 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3511 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3512 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3513 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3514 * pthread_create.c (start_thread): Adjust robust mutex free loop.
3515 * descr.h (ENQUEUE_MUTEX, DEQUEUE_MUTEX): Adjust.
3517 2006-01-05 Ulrich Drepper <drepper@redhat.com>
3519 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
3521 (lll_futex_timed_wait): Define.
3522 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
3523 * sysdeps/pthread/aio_misc.h: New file.
3525 2006-01-03 Joseph S. Myers <joseph@codesourcery.com>
3527 * Makefile ($(objpfx)$(multidir)): Use mkdir -p.
3529 2006-01-03 Steven Munroe <sjmunroe@us.ibm.com>
3531 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
3532 (PSEUDO): Remove redundant cfi_startproc and cfi_endproc directives.
3533 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
3535 2006-01-04 Ulrich Drepper <drepper@redhat.com>
3537 * tst-cancel24.cc: Use C headers instead of C++ headers.
3539 2006-01-03 Jakub Jelinek <jakub@redhat.com>
3541 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Remove #error for
3542 sparc-linux configured glibc.
3543 (lll_futex_wake_unlock): Define to 1 for sparc-linux configured glibc.
3544 (__lll_mutex_trylock, __lll_mutex_cond_trylock, __lll_mutex_lock,
3545 __lll_mutex_cond_lock, __lll_mutex_timedlock): Use
3546 atomic_compare_and_exchange_val_24_acq instead of
3547 atomic_compare_and_exchange_val_acq.
3548 (lll_mutex_unlock, lll_mutex_unlock_force): Use atomic_exchange_24_rel
3549 instead of atomic_exchange_rel.
3550 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: New file.
3551 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c: New
3553 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c: New
3555 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: New file.
3556 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: New file.
3557 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: New file.
3558 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c: New file.
3559 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: New file.
3560 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
3562 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
3564 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: New file.
3565 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: New file.
3566 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c: New
3568 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_trywait.c: New
3570 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: New file.
3572 2006-01-03 Ulrich Drepper <drepper@redhat.com>
3574 * sysdeps/pthread/pthread.h [__WORDSIZE==64]: Don't use cast in
3577 2006-01-02 Jakub Jelinek <jakub@redhat.com>
3579 * sysdeps/sparc/tls.h (tcbhead_t): Add pointer_guard field.
3580 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
3581 THREAD_COPY_POINTER_GUARD): Define.
3582 * sysdeps/sparc/tcb-offsets.sym (POINTER_GUARD): Define.
3583 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Revert 2005-12-27 changes.
3585 2006-01-01 Ulrich Drepper <drepper@redhat.com>
3587 * version.c: Update copyright year.
3589 2005-12-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3591 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Remove explicit
3592 .eh_frame section, use cfi_* directives.
3593 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Add cfi instrumentation.
3595 2005-12-30 Ulrich Drepper <drepper@redhat.com>
3597 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Undo last change for
3600 2005-12-29 Ulrich Drepper <drepper@redhat.com>
3602 * sysdeps/pthread/sigaction.c: Removed.
3603 * sigaction.c: New file.
3604 * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-sigaction.c.
3606 2005-12-28 Ulrich Drepper <drepper@redhat.com>
3608 * Makefile (tests): Add tst-signal7.
3609 * tst-signal7.c: New file.
3611 2005-12-27 Roland McGrath <roland@redhat.com>
3613 * sysdeps/x86_64/jmpbuf-unwind.h (_jmpbuf_sp): New inline function.
3614 (_JMPBUF_UNWINDS_ADJ): Use it, to PTR_DEMANGLE before comparison.
3615 * sysdeps/alpha/jmpbuf-unwind.h: Likewise.
3616 * sysdeps/i386/jmpbuf-unwind.h: Likewise.
3617 * sysdeps/mips/jmpbuf-unwind.h: Likewise.
3618 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
3619 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
3620 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
3621 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
3622 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
3623 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
3625 2005-12-27 Jakub Jelinek <jakub@redhat.com>
3627 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Add __next
3628 and __prev field to pthread_mutex_t.
3629 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3630 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3631 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3632 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
3633 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Add __next field
3636 2005-12-26 Ulrich Drepper <drepper@redhat.com>
3638 * pthreadP.h: Define PTHREAD_MUTEX_ROBUST_PRIVATE_NP,
3639 PTHREAD_MUTEX_ROBUST_PRIVATE_RECURSIVE_NP,
3640 PTHREAD_MUTEX_ROBUST_PRIVATE_ERRORCHECK_NP,
3641 PTHREAD_MUTEX_ROBUST_PRIVATE_ADAPTIVE_NP,
3642 PTHREAD_MUTEXATTR_FLAG_ROBUST, PTHREAD_MUTEXATTR_FLAG_PSHARED,
3643 and PTHREAD_MUTEXATTR_FLAG_BITS.
3644 * descr.h (struct pthread): Add robust_list field and define
3645 ENQUEUE_MUTEX and DEQUEUE_MUTEX macros.
3646 * pthread_mutexattr_getrobust.c: New file.
3647 * pthread_mutexattr_setrobust.c: New file.
3648 * pthread_mutex_consistent.c: New file.
3649 * sysdeps/pthread/pthread.h: Declare pthread_mutexattr_getrobust,
3650 pthread_mutexattr_setrobust, and pthread_mutex_consistent.
3651 Define PTHREAD_MUTEX_STALLED_NP and PTHREAD_MUTEX_ROBUST_NP.
3652 Adjust pthread_mutex_t initializers.
3653 * nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Add __next
3654 field to pthread_mutex_t.
3655 * nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Add __next
3656 and __prev field to pthread_mutex_t.
3657 * Versions [GLIBC_2.4]: Export pthread_mutexattr_getrobust_np,
3658 pthread_mutexattr_setrobust_np, and pthread_mutex_consistent_np.
3659 * pthread_mutexattr_getpshared.c: Use PTHREAD_MUTEXATTR_FLAG_PSHARED
3660 and PTHREAD_MUTEXATTR_FLAG_BITS macros instead of magic numbers.
3661 * pthread_mutexattr_gettype.c: Likewise.
3662 * pthread_mutexattr_setpshared.c: Likewise.
3663 * pthread_mutexattr_settype.c: Likewise.
3664 * pthread_mutex_init.c: Reject robust+pshared attribute for now.
3665 Initialize mutex kind according to robust flag.
3666 * pthread_mutex_lock.c: Implement local robust mutex.
3667 * pthread_mutex_timedlock.c: Likewise.
3668 * pthread_mutex_trylock.c: Likewise.
3669 * pthread_mutex_unlock.c: Likewise.
3670 * pthread_create.c (start_thread): Mark robust mutexes which remained
3672 * tst-robust1.c: New file.
3673 * tst-robust2.c: New file.
3674 * tst-robust3.c: New file.
3675 * tst-robust4.c: New file.
3676 * tst-robust5.c: New file.
3677 * tst-robust6.c: New file.
3678 * tst-robust7.c: New file.
3679 * Makefile (libpthread-routines): Add pthread_mutexattr_getrobust,
3680 pthread_mutexattr_setrobust, and pthread_mutex_consistent.
3681 (tests): Add tst-robust1, tst-robust2, tst-robust3, tst-robust4,
3682 tst-robust5, tst-robust6, and tst-robust7.
3684 * tst-typesizes.c: New file.
3685 * Makefile (tests): Add tst-typesizes.
3687 * tst-once3.c: More debug output.
3689 2005-12-24 Ulrich Drepper <drepper@redhat.com>
3691 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Add break
3692 missing after last change.
3694 * version.c: Update copyright year.
3696 2005-12-23 Ulrich Drepper <drepper@redhat.com>
3698 * pthread_mutex_destroy.c: Set mutex type to an invalid value.
3699 * pthread_mutex_lock.c: Return EINVAL for invalid mutex type.
3700 * pthread_mutex_trylock.c: Likewise.
3701 * pthread_mutex_timedlock.c: Likewise.
3702 * pthread_mutex_unlock.c: Likewise.
3704 2005-12-22 Roland McGrath <roland@redhat.com>
3706 * sysdeps/pthread/sigaction.c: Use "" instead of <> to include self,
3707 so that #include_next's search location is not reset to the -I..
3708 directory where <nptl/...> can be found.
3710 2005-12-22 Ulrich Drepper <drepper@redhat.com>
3713 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
3714 Fix unwind info. Remove useless branch prediction prefix.
3715 * tst-cancel24.cc: New file.
3716 * Makefile: Add rules to build and run tst-cancel24.
3718 2005-12-21 Roland McGrath <roland@redhat.com>
3720 * libc-cancellation.c: Use <> rather than "" #includes.
3721 * pt-cleanup.c: Likewise.
3722 * pthread_create.c: Likewise.
3723 * pthread_join.c: Likewise.
3724 * pthread_timedjoin.c: Likewise.
3725 * pthread_tryjoin.c: Likewise.
3726 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Likewise.
3727 * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
3728 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
3729 * unwind.c: Likewise.
3731 2005-12-19 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3733 * sysdeps/sh/tcb-offsets.sym: Add POINTER_GUARD.
3734 * sysdeps/sh/tls.h (tcbhead_t): Remove private and add pointer_guard.
3735 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
3736 THREAD_COPY_POINTER_GUARD): Define.
3738 2005-12-19 Jakub Jelinek <jakub@redhat.com>
3740 * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): Make room for 2 uintptr_t's
3742 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
3743 THREAD_COPY_POINTER_GUARD): Define.
3744 * sysdeps/powerpc/tcb-offsets.sym (POINTER_GUARD): Add.
3745 * sysdeps/powerpc/tls.h (tcbhead_t): Add pointer_guard field.
3746 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
3747 THREAD_COPY_POINTER_GUARD): Define.
3748 * sysdeps/s390/tcb-offsets.sym (STACK_GUARD): Add.
3749 * sysdeps/s390/tls.h (THREAD_GET_POINTER_GUARD,
3750 THREAD_SET_POINTER_GUARD, THREAD_COPY_POINTER_GUARD): Define.
3751 * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S (__ia64_longjmp):
3752 Use PTR_DEMANGLE for B0 if defined.
3754 2005-12-17 Ulrich Drepper <drepper@redhat.com>
3756 * pthread_create.c (__pthread_create_2_1): Use
3757 THREAD_COPY_POINTER_GUARD if available.
3758 * sysdeps/i386/tcb-offsets.sym: Add POINTER_GUARD.
3759 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
3760 * sysdeps/i386/tls.h (tcbhead_t): Add pointer_guard.
3761 Define THREAD_SET_POINTER_GUARD and THREAD_COPY_POINTER_GUARD.
3762 * sysdeps/x86_64/tls.h: Likewise.
3764 2005-12-15 Roland McGrath <roland@redhat.com>
3766 * sysdeps/unix/sysv/linux/mq_notify.c: Don't use sysdeps/generic.
3768 2005-12-13 Ulrich Drepper <drepper@redhat.com>
3770 * sysdeps/pthread/sigfillset.c: Adjust for files moved out of
3772 * errno-loc.c: New file.
3774 2005-12-12 Roland McGrath <roland@redhat.com>
3776 * init.c (__pthread_initialize_minimal_internal): Do __static_tls_size
3777 adjustments before choosing stack size. Update minimum stack size
3778 calculation to match allocate_stack change.
3780 2005-12-12 Ulrich Drepper <drepper@redhat.com>
3782 * allocatestack.c (allocate_stack): Don't demand that there is an
3783 additional full page available on the stack beside guard, TLS, the
3786 2005-11-24 Ulrich Drepper <drepper@redhat.com>
3788 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
3789 (__cleanup_fct_attribute): Use __regparm__ not regparm.
3791 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: When
3792 compiling 32-bit code we must define __cleanup_fct_attribute.
3794 005-11-24 Jakub Jelinek <jakub@redhat.com>
3797 * sysdeps/pthread/pthread.h (__pthread_unwind_next): Use
3798 __attribute__ instead of __attribute.
3799 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
3800 (__cleanup_fct_attribute): Likewise.
3802 2005-11-17 Jakub Jelinek <jakub@redhat.com>
3804 * sysdeps/pthread/unwind-forcedunwind.c (pthread_cancel_init): Put
3805 a write barrier before writing libgcc_s_getcfa.
3807 2005-11-06 Ulrich Drepper <drepper@redhat.com>
3809 * sysdeps/unix/sysv/linux/configure: Removed.
3811 2005-11-05 Ulrich Drepper <drepper@redhat.com>
3813 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Remove trace of
3814 optional init_array/fini_array support.
3816 2005-10-24 Roland McGrath <roland@redhat.com>
3818 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Remove unnecessary
3819 versioned_symbol use.
3821 2005-10-16 Roland McGrath <roland@redhat.com>
3823 * init.c (__pthread_initialize_minimal_internal): Even when using a
3824 compile-time default stack size, apply the minimum that allocate_stack
3825 will require, and round up to page size.
3827 2005-10-10 Daniel Jacobowitz <dan@codesourcery.com>
3829 * Makefile ($(test-modules)): Remove static pattern rule.
3831 2005-10-14 Jakub Jelinek <jakub@redhat.com>
3832 Ulrich Drepper <drepper@redhat.com>
3834 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix stack
3835 alignment in callback function.
3836 * Makefile: Add rules to build and run tst-align3.
3837 * tst-align3.c: New file.
3839 2005-10-03 Jakub Jelinek <jakub@redhat.com>
3841 * allocatestack.c (setxid_signal_thread): Add
3842 INTERNAL_SYSCALL_DECL (err).
3844 2005-10-02 Jakub Jelinek <jakub@redhat.com>
3846 * allocatestack.c (setxid_signal_thread): Need to use
3847 atomic_compare_and_exchange_bool_acq.
3849 2005-10-01 Ulrich Drepper <drepper@redhat.com>
3850 Jakub Jelinek <jakub@redhat.com>
3852 * descr.h: Define SETXID_BIT and SETXID_BITMASK. Adjust
3854 (struct pthread): Move specific_used field to avoid padding.
3855 Add setxid_futex field.
3856 * init.c (sighandler_setxid): Reset setxid flag and release the
3858 * allocatestack.c (setxid_signal_thread): New function. Broken
3859 out of the bodies of the two loops in __nptl_setxid. For undetached
3860 threads check whether they are exiting and if yes, don't send a signal.
3861 (__nptl_setxid): Simplify loops by using setxid_signal_thread.
3862 * pthread_create.c (start_thread): For undetached threads, check
3863 whether setxid bit is set. If yes, wait until signal has been
3866 * allocatestack.c (STACK_VARIABLES): Initialize them.
3867 * pthread_create.c (__pthread_create_2_1): Initialize pd.
3869 2004-09-02 Jakub Jelinek <jakub@redhat.com>
3871 * pthread_cond_destroy.c (__pthread_cond_destroy): If there are
3872 waiters, awake all waiters on the associated mutex.
3874 2005-09-22 Roland McGrath <roland@redhat.com>
3876 * perf.c [__x86_64__] (HP_TIMING_NOW): New macro (copied from
3877 ../sysdeps/x86_64/hp-timing.h).
3879 2005-08-29 Jakub Jelinek <jakub@redhat.com>
3881 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_WAKE_OP,
3882 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3883 (lll_futex_wake_unlock): Define.
3884 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_WAKE_OP,
3885 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3886 (lll_futex_wake_unlock): Define.
3887 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_WAKE_OP,
3888 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3889 (lll_futex_wake_unlock): Define.
3890 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_WAKE_OP,
3891 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3892 (lll_futex_wake_unlock): Define.
3893 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_WAKE_OP,
3894 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3895 (lll_futex_wake_unlock): Define.
3896 * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal): Use
3897 lll_futex_wake_unlock.
3898 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
3899 (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3900 (__pthread_cond_signal): Use FUTEX_WAKE_OP.
3901 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
3902 (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3903 (__pthread_cond_signal): Use FUTEX_WAKE_OP.
3905 2005-09-05 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3907 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
3908 Fix typo in register name.
3910 2005-08-23 Ulrich Drepper <drepper@redhat.com>
3912 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
3913 Use __sigfillset. Document that sigfillset does the right thing wrt
3916 2005-07-11 Jakub Jelinek <jakub@redhat.com>
3919 * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER,
3920 PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP,
3921 PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP,
3922 PTHREAD_MUTEX_ADAPTIVE_NP, PTHREAD_RWLOCK_INITIALIZER,
3923 PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP,
3924 PTHREAD_COND_INITIALIZER): Supply zeros for all fields
3926 * Makefile (tests): Add tst-initializers1.
3927 (CFLAGS-tst-initializers1.c): Set.
3928 * tst-initializers1.c: New test.
3930 2005-07-11 Jakub Jelinek <jakub@redhat.com>
3932 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_rwlock_t):
3933 Make sure __flags are located at offset 48 from the start of the
3936 2005-07-02 Roland McGrath <roland@redhat.com>
3938 * Makeconfig: Comment fix.
3940 2005-07-05 Jakub Jelinek <jakub@redhat.com>
3942 * descr.h (PTHREAD_STRUCT_END_PADDING): Define.
3943 * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): If PTHREAD_STRUCT_END_PADDING
3944 is smaller than 8 bytes, increase TLS_PRE_TCB_SIZE by 16 bytes.
3945 (THREAD_SYSINFO, THREAD_SELF, DB_THREAD_SELF): Don't assume
3946 TLS_PRE_TCB_SIZE is sizeof (struct pthread).
3947 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3948 * sysdeps/ia64/tcb-offsets.sym (PID, TID, MULTIPLE_THREADS_OFFSET):
3949 Use TLS_PRE_TCB_SIZE instead of sizeof (struct pthread).
3950 * sysdeps/unix/sysv/linux/ia64/createthread.c (TLS_VALUE): Don't
3951 assume TLS_PRE_TCB_SIZE is sizeof (struct pthread).
3953 2005-06-25 Jakub Jelinek <jakub@redhat.com>
3955 * sysdeps/i386/tls.h (tcbhead_t): Add stack_guard field.
3956 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3957 * sysdeps/x86_64/tls.h (tcbhead_t): Add sysinfo and stack_guard
3959 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3960 * sysdeps/s390/tls.h (tcbhead_t): Add stack_guard
3961 field. Put in sysinfo field unconditionally.
3962 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3963 * sysdeps/powerpc/tls.h (tcbhead_t): Add stack_guard field.
3964 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3965 * sysdeps/sparc/tls.h (tcbhead_t): Add sysinfo and stack_guard
3967 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3968 * pthread_create.c (__pthread_create_2_1): Use
3969 THREAD_COPY_STACK_GUARD macro.
3970 * Makefile: Add rules to build and run tst-stackguard1{,-static}
3972 * tst-stackguard1.c: New file.
3973 * tst-stackguard1-static.c: New file.
3975 2005-06-14 Alan Modra <amodra@bigpond.net.au>
3977 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
3978 Invoke CGOTSETUP and CGOTRESTORE.
3979 (CGOTSETUP, CGOTRESTORE): Define.
3981 2005-05-29 Richard Henderson <rth@redhat.com>
3983 * tst-cancel4.c (WRITE_BUFFER_SIZE): New.
3984 (tf_write, tf_writev): Use it.
3985 (do_test): Use socketpair instead of pipe. Set SO_SNDBUF to
3988 2005-05-23 Jakub Jelinek <jakub@redhat.com>
3990 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
3991 [IS_IN_librt] (CENABLE, CDISABLE): Use JUMPTARGET instead of
3992 __librt_*_asynccancel@local.
3994 2005-05-17 Alan Modra <amodra@bigpond.net.au>
3996 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Delete
3997 all occurrences of JUMPTARGET. Instead append @local to labels.
3999 2005-05-20 Jakub Jelinek <jakub@redhat.com>
4001 * sysdeps/i386/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN): Define to
4002 size/alignment of struct pthread rather than tcbhead_t.
4003 * sysdeps/x86_64/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
4005 * sysdeps/s390/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
4007 * sysdeps/sparc/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
4010 2005-05-19 Richard Henderson <rth@redhat.com>
4012 * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use
4013 __sync_val_compare_and_swap, not explicit _si variant.
4014 * sysdeps/ia64/pthread_spin_trylock.c (pthread_spin_trylock): Likewise.
4016 2005-05-03 Ulrich Drepper <drepper@redhat.com>
4019 * sysdeps/pthread/pthread.h: Avoid empty initializers.
4021 2005-05-03 Jakub Jelinek <jakub@redhat.com>
4023 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Remove explicit
4024 .eh_frame section, use cfi_* directives.
4026 2005-04-27 Jakub Jelinek <jakub@redhat.com>
4028 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: Use <> instead
4031 2005-04-27 Ulrich Drepper <drepper@redhat.com>
4034 * tst-cancel17.c (do_test): Add arbitrary factor to make sure
4037 2005-04-27 Roland McGrath <roland@redhat.com>
4039 * Makefile (tests): Remove tst-clock2.
4041 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Handle
4042 CLOCK_PROCESS_CPUTIME_ID and CLOCK_PROCESS_THREAD_ID specially,
4043 translating to the kernel clockid_t for our own process/thread clock.
4045 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: New file.
4047 2005-04-15 Jakub Jelinek <jakub@redhat.com>
4049 * old_pthread_cond_init.c: Include <errno.h>.
4050 (__pthread_cond_init_2_0): Fail with EINVAL if COND_ATTR is
4051 process shared or uses clock other than CLOCK_REALTIME.
4052 * pthread_cond_init.c (__pthread_cond_init): Remove bogus comment.
4054 2005-04-13 David S. Miller <davem@davemloft.net>
4056 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: New file.
4057 * sysdeps/sparc/sparc64/clone.S: New file.
4059 2005-04-05 Jakub Jelinek <jakub@redhat.com>
4062 * sysdeps/pthread/pthread.h (__pthread_cleanup_routine): Use
4063 __inline instead of inline.
4064 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_routine): Likewise.
4066 2005-03-31 Jakub Jelinek <jakub@redhat.com>
4068 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Use
4069 functionally equivalent, but shorter instructions.
4070 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
4071 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
4072 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
4074 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
4075 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
4076 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
4077 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
4078 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4079 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
4080 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
4082 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
4083 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
4084 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4085 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
4086 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
4088 2005-03-28 Daniel Jacobowitz <dan@codesourcery.com>
4090 * sysdeps/mips/Makefile: New file.
4091 * sysdeps/mips/nptl-sysdep.S: New file.
4092 * sysdeps/mips/tcb-offsets.sym: New file.
4093 * sysdeps/mips/pthread_spin_lock.S: New file.
4094 * sysdeps/mips/pthread_spin_trylock.S: New file.
4095 * sysdeps/mips/pthreaddef.h: New file.
4096 * sysdeps/mips/tls.h: New file.
4097 * sysdeps/mips/jmpbuf-unwind.h: New file.
4098 * sysdeps/unix/sysv/linux/mips/lowlevellock.h: New file.
4099 * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h: New file.
4100 * sysdeps/unix/sysv/linux/mips/bits/semaphore.h: New file.
4101 * sysdeps/unix/sysv/linux/mips/pthread_once.c: New file.
4102 * sysdeps/unix/sysv/linux/mips/fork.c: New file.
4103 * sysdeps/unix/sysv/linux/mips/pt-vfork.S: New file.
4104 * sysdeps/unix/sysv/linux/mips/vfork.S: New file.
4105 * sysdeps/unix/sysv/linux/mips/clone.S: New file.
4106 * sysdeps/unix/sysv/linux/mips/createthread.c: New file.
4107 * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: New file.
4109 2005-03-23 Ulrich Drepper <drepper@redhat.com>
4112 * pthread_create.c (__pthread_create_2_1): Rename syscall error
4115 2005-03-10 Jakub Jelinek <jakub@redhat.com>
4117 * tst-getpid1.c (do_test): Align stack passed to clone{2,}.
4119 2005-02-25 Roland McGrath <roland@redhat.com>
4121 * alloca_cutoff.c: Correct license text.
4122 * tst-unload.c: Likewise.
4123 * sysdeps/pthread/allocalim.h: Likewise.
4124 * sysdeps/pthread/pt-initfini.c: Likewise.
4125 * sysdeps/pthread/bits/libc-lock.h: Likewise.
4126 * sysdeps/pthread/bits/sigthread.h: Likewise.
4127 * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
4128 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
4130 2005-02-16 Roland McGrath <roland@redhat.com>
4132 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
4133 Use unsigned int * for ptr_nthreads.
4135 2005-02-14 Alan Modra <amodra@bigpond.net.au>
4138 * sysdeps/powerpc/tcb-offsets.sym (thread_offsetof): Redefine to suit
4141 2005-02-07 Richard Henderson <rth@redhat.com>
4144 * sysdeps/pthread/pthread.h (__sigsetjmp): Use pointer as first
4147 2004-11-03 Marcus Brinkmann <marcus@gnu.org>
4149 * sysdeps/generic/lowlevellock.h (__generic_mutex_unlock): Fix
4150 order of arguments in invocation of atomic_add_zero.
4152 2005-01-26 Jakub Jelinek <jakub@redhat.com>
4155 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S (__new_sem_trywait):
4156 Use direct %gs segment access or, if NO_TLS_DIRECT_SEG_REFS,
4157 at least gotntpoff relocation and addition.
4158 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
4160 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
4162 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
4165 2005-01-06 Ulrich Drepper <drepper@redhat.com>
4167 * allocatestack.c (init_one_static_tls): Adjust initialization of DTV
4168 entry for static tls deallocation fix.
4169 * sysdeps/alpha/tls.h (dtv_t): Change pointer type to be struct which
4170 also contains information whether the memory pointed to is static
4172 * sysdeps/i386/tls.h: Likewise.
4173 * sysdeps/ia64/tls.h: Likewise.
4174 * sysdeps/powerpc/tls.h: Likewise.
4175 * sysdeps/s390/tls.h: Likewise.
4176 * sysdeps/sh/tls.h: Likewise.
4177 * sysdeps/sparc/tls.h: Likewise.
4178 * sysdeps/x86_64/tls.h: Likewise.
4180 2004-12-27 Ulrich Drepper <drepper@redhat.com>
4182 * init.c (__pthread_initialize_minimal_internal): Use __sigemptyset.
4184 2004-12-21 Jakub Jelinek <jakub@redhat.com>
4186 * sysdeps/i386/tls.h (CALL_THREAD_FCT): Maintain 16 byte alignment of
4188 * Makefile (tests): Add tst-align2.
4189 * tst-align2.c: New test.
4190 * sysdeps/i386/Makefile (CFLAGS-tst-align{,2}.c): Add
4191 -mpreferred-stack-boundary=4.
4193 2004-12-18 Roland McGrath <roland@redhat.com>
4195 * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h:
4196 New file removed withdrawn for the moment.
4198 2004-12-17 Richard Henderson <rth@redhat.com>
4200 * sysdeps/unix/sysv/linux/alpha/clone.S: New file.
4201 * sysdeps/alpha/tcb-offsets.sym (TID_OFFSET): New.
4203 2004-12-16 Ulrich Drepper <drepper@redhat.com>
4205 * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h: New file.
4206 Increased PTHREAD_STACK_MIN.
4208 * tst-context1.c (stacks): Use bigger stack size.
4210 2004-12-16 Jakub Jelinek <jakub@redhat.com>
4212 * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: New file.
4213 * sysdeps/sparc/tcb-offsets.sym: Add TID.
4215 2004-12-15 Jakub Jelinek <jakub@redhat.com>
4217 * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: New file.
4218 * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: New file.
4219 * sysdeps/s390/tcb-offsets.sym (TID): Add.
4221 2004-12-15 Ulrich Drepper <drepper@redhat.com>
4223 * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: New file.
4225 2004-12-14 Ulrich Drepper <drepper@redhat.com>
4227 * sysdeps/powerpc/tcb-offsets.sym: Add TID.
4228 * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: New file.
4230 * tst-getpid1.c: If child crashes, report this first. Print which
4233 2004-12-09 Ulrich Drepper <drepper@redhat.com>
4235 * init.c (__pthread_initialize_minimal_internal): Also unblock
4238 2004-12-01 Jakub Jelinek <jakub@redhat.com>
4240 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_CPUTIME,
4241 _POSIX_THREAD_CPUTIME): Define to 0.
4242 * sysdeps/pthread/timer_create.c (timer_create): Remove unused code
4243 handling CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID.
4244 * sysdeps/pthread/timer_routines.c (__timer_signal_thread_pclk,
4245 __timer_signal_thread_tclk): Remove.
4246 (init_module): Remove their initialization.
4247 (thread_cleanup): Remove their cleanup assertions.
4248 * sysdeps/pthread/posix-timer.h (__timer_signal_thread_pclk,
4249 __timer_signal_thread_tclk): Remove.
4250 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Removed.
4251 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Removed.
4252 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Removed.
4254 2004-12-07 Jakub Jelinek <jakub@redhat.com>
4256 * sysdeps/ia64/tcb-offsets.sym (TID): Add.
4257 * sysdeps/unix/sysv/linux/ia64/clone2.S: New file.
4259 * Makefile (tests): Add tst-getpid2.
4260 * tst-getpid1.c (TEST_CLONE_FLAGS): Define.
4261 (do_test): Use it. Use __clone2 instead of clone on ia64.
4262 * tst-getpid2.c: New test.
4264 2004-12-07 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4266 * sysdeps/unix/sysv/linux/sh/clone.S: New file.
4268 2004-12-04 Ulrich Drepper <drepper@redhat.com>
4270 * Makefile (tests): Add tst-getpid1.
4271 * tst-getpid1.c: New file.
4272 * sysdeps/unix/sysv/linux/i386/clone.S: New file.
4273 * sysdeps/unix/sysv/linux/x86_64/clone.S: New file.
4275 2004-12-02 Roland McGrath <roland@redhat.com>
4277 * Makefile (libpthread-nonshared): Variable removed.
4278 ($(objpfx)libpthread_nonshared.a): Target removed.
4279 ($(inst_libdir)/libpthread_nonshared.a): Likewise.
4280 These are now handled by generic magic from
4281 libpthread-static-only-routines being set.
4283 2004-11-27 Ulrich Drepper <drepper@redhat.com>
4285 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_PRIORITIZED_IO,
4286 _POSIX2_CHAR_TERM, _POSIX_THREAD_PRIO_INHERIT,
4287 _POSIX_THREAD_PRIO_PROTECT): Define.
4288 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
4289 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
4290 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
4292 2004-11-26 Jakub Jelinek <jakub@redhat.com>
4294 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_ADVISORY_INFO,
4295 _POSIX_SPORADIC_SERVER, _POSIX_THREAD_SPORADIC_SERVER, _POSIX_TRACE,
4296 _POSIX_TRACE_EVENT_FILTER, _POSIX_TRACE_INHERIT, _POSIX_TRACE_LOG,
4297 _POSIX_TYPED_MEMORY_OBJECTS, _POSIX_IPV6, _POSIX_RAW_SOCKETS): Define.
4298 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
4299 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
4300 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
4302 2004-11-24 Ulrich Drepper <drepper@redhat.com>
4304 * sysdeps/x86_64/Makefile [nptl]: Define CFLAGS-pthread_create.c.
4306 * Makefile (libpthread-routines): Add pthread_setschedprio.
4307 * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setschedprio.
4308 * sysdeps/pthread/pthread.h: Declare pthread_setschedprio.
4309 * pthread_setschedprio.c: New file.
4311 2004-11-20 Jakub Jelinek <jakub@redhat.com>
4313 * pthread_create.c (pthread_cancel): Add PTHREAD_STATIC_FN_REQUIRE.
4314 * pthread_cancel.c (pthread_create): Likewise.
4316 * Makefile (libpthread-routines): Add vars.
4317 * sysdeps/pthread/createthread.c (__pthread_multiple_threads): Remove.
4318 * init.c (__default_stacksize, __is_smp): Remove.
4320 * pthreadP.h (__find_thread_by_id): If !SHARED, add weak_function
4321 and define a wrapper macro.
4322 (PTHREAD_STATIC_FN_REQUIRE): Define.
4323 * allocatestack.c (__find_thread_by_id): Undefine.
4324 * pthread_create (__pthread_keys): Remove.
4325 (pthread_mutex_lock, pthread_mutex_unlock, pthread_once,
4326 pthread_key_create, pthread_setspecific, pthread_getspecific): Add
4327 PTHREAD_STATIC_FN_REQUIRE.
4329 2004-11-18 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4331 * sysdeps/sh/tls.h (DB_THREAD_SELF): Set the correct bias
4332 parameter to REGISTER macro.
4334 2004-11-17 Roland McGrath <roland@redhat.com>
4336 * sysdeps/unix/sysv/linux/timer_routines.c (__start_helper_thread):
4337 Make sure SIGCANCEL is blocked as well.
4339 2004-11-10 Jakub Jelinek <jakub@redhat.com>
4341 * sysdeps/pthread/setxid.h: New file.
4342 * sysdeps/pthread/pthread-functions.h (HAVE_PTR__NPTL_SETXID): Remove.
4343 (struct xid_command): Add forward decl.
4344 (struct pthread_functions): Change return type of __nptl_setxid hook
4346 * pthreadP.h (__nptl_setxid): Change return type to int.
4347 * allocatestack.c (__nptl_setxid): Call INTERNAL_SYSCALL_NCS in the
4348 calling thread, return its return value and set errno on failure.
4349 * descr.h (struct xid_command): Change id type to long array.
4351 * Makefile: Add rules to build and test tst-setuid1 and
4353 * tst-setuid1.c: New test.
4354 * tst-setuid1-static.c: New test.
4356 2004-11-10 Jakub Jelinek <jakub@redhat.com>
4358 * Makefile (tests): Add tst-exit3.
4359 * tst-exit3.c: New test.
4361 2004-11-09 Ulrich Drepper <drepper@redhat.com>
4363 * Makefile (tests): Add tst-exit2.
4364 * tst-exit2.c: New file.
4366 2004-11-09 Roland McGrath <roland@redhat.com>
4369 * sysdeps/pthread/createthread.c (do_clone): Increment __nptl_nthreads
4370 here, before calling clone.
4371 * pthread_create.c (start_thread): Don't do it here.
4373 2004-11-02 Jakub Jelinek <jakub@redhat.com>
4375 * sysdeps/unix/sysv/linux/smp.h: Include <errno.h>.
4377 2004-10-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4379 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
4380 Set ETIMEDOUT to errno when time is up. Tweak to avoid
4383 2004-10-28 Jakub Jelinek <jakub@redhat.com>
4385 * pthread_create.c (__pthread_create_2_1): Avoid leaking stacks
4386 if sched_priority is not between minprio and maxprio.
4388 2004-10-25 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4390 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
4391 (__pthread_cond_timedwait): Use clock_gettime syscall if exists.
4393 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
4394 (__lll_mutex_timedlock_wait): Fix a bad branch condition.
4396 2004-10-24 Ulrich Drepper <drepper@redhat.com>
4398 * sysdeps/unix/sysv/linux/smp.h (is_smp_system): Use
4399 not-cancelable I/O functions.
4401 2004-10-21 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4403 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
4404 (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
4405 make sure 2 is stored in the futex and we looked at the old value.
4406 Fix a few other problems to return the correct value.
4408 2004-10-14 Richard Henderson <rth@redhat.com>
4410 * sysdeps/alpha/tcb-offsets.sym (thread_offsetof): Redefine to
4413 2004-10-06 Jakub Jelinek <jakub@redhat.com>
4415 * sysdeps/unix/sysv/linux/jmp-unwind.c: Include pthreadP.h instead
4416 of pthread-functions.h and pthreaddef.h.
4417 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Likewise.
4419 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
4420 Change __data.__nwaiters from int to unsigned int.
4422 * tst-clock2.c (do_test): Don't fail if _POSIX_THREAD_CPUTIME == 0 and
4423 sysconf (_SC_THREAD_CPUTIME) returns negative value.
4425 * allocatestack.c (__find_thread_by_id): Move attribute_hidden
4428 * sysdeps/s390/jmpbuf-unwind.h: Include bits/wordsize.h.
4429 (JMPBUF_CFA_UNWINDS_ADJ): Subtract 96 resp. 160 bytes from CFA.
4431 2004-10-06 Ulrich Drepper <drepper@redhat.com>
4433 * tst-cancel4.c (tf_msgrcv): Check for failure in msgget. If the
4434 test fails, remove message queue.
4435 (tf_msgsnd): Likewise.
4437 2004-10-05 Jakub Jelinek <jakub@redhat.com>
4439 * tst-clock1.c: Change #ifdef to #if defined.
4440 * tst-clock2.c: Likewise.
4441 * tst-cond11.c: Likewise.
4443 * sysdeps/pthread/timer_create.c (timer_create): Use
4444 defined _POSIX_CPUTIME && _POSIX_CPUTIME >= 0 instead of
4445 defined CLOCK_PROCESS_CPUTIME_ID #ifs and similarly for
4448 2004-10-05 Jakub Jelinek <jakub@redhat.com>
4450 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h (_POSIX_CPUTIME,
4451 _POSIX_THREAD_CPUTIME): Define to 0.
4453 2004-10-04 Ulrich Drepper <drepper@redhat.com>
4455 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Define _POSIX_CPUTIME
4456 and _POSIX_THREAD_CPUTIME to zero.
4457 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
4458 * tst-barrier2.c: Fix testing for POSIX feature.
4459 * tst-clock1.c: Likewise.
4460 * tst-clock2.c: Likewise.
4461 * tst-cond11.c: Likewise.
4462 * tst-cond4.c: Likewise.
4463 * tst-cond6.c: Likewise.
4464 * tst-flock2.c: Likewise.
4465 * tst-mutex4.c: Likewise.
4466 * tst-mutex9.c: Likewise.
4467 * tst-rwlock12.c: Likewise.
4468 * tst-rwlock4.c: Likewise.
4469 * tst-signal1.c: Likewise.
4470 * tst-spin2.c: Likewise.
4471 * sysdeps/pthread/posix-timer.h: Likewise.
4472 * sysdeps/pthread/timer_create.c: Likewise.
4473 * sysdeps/pthread/timer_routines.c: Likewise.
4475 2004-10-01 Ulrich Drepper <drepper@redhat.com>
4477 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4478 (__lll_mutex_timedlock_wait): Address futex correctly.
4480 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
4481 (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
4482 make sure 2 is stored in the futex and we looked at the old value.
4483 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4484 (__lll_mutex_timedlock_wait): Likewise. Fix a few other problems
4485 which might very well made the code not working at all before.
4488 2004-09-28 Ulrich Drepper <drepper@redhat.com>
4490 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
4491 allow SIGSETXID to be sent.
4492 * sysdeps/pthread/sigaction.c (__sigaction): Don't allow action
4493 for SIGSETXID to be defined.
4494 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
4495 SIGSETXID cannot be blocked.
4497 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4498 Add __extension__ to long long types.
4499 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4500 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4501 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4502 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4503 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
4504 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4505 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4507 2004-09-25 Ulrich Drepper <drepper@redhat.com>
4509 * descr.h (struct pthread): Add stopped_start field.
4510 * sysdeps/pthread/createthread.c (create_thread): Set
4511 start_stopped flag in descriptor for new thread appropriately.
4512 * pthread_create.c (start_thread): Only take lock to be stopped on
4513 startup if stopped_start flag says so.
4515 2004-09-24 Ulrich Drepper <drepper@redhat.com>
4517 * pthread_create.c (__pthread_create_2_1): Remember whether thread
4518 is created detached and if yes, do not try to free the stack in case
4519 the thread creation failed.
4520 * sysdeps/pthread/createthread.c (do_clone): Free stack here if clone
4521 call fails. Don't depend on INTERNAL_SYSCALL_ERRNO return zero in
4522 case there has been no error. [BZ #405]
4524 * pthread_create.c (start_thread): Don't wait for scheduler data
4525 etc to be set at the beginning of the function. The cancellation
4526 infrastructure must have been set up. And enable async
4527 cancellation before potentially going to sleep. [BZ #401]
4529 2004-09-20 Ulrich Drepper <drepper@redhat.com>
4531 * Versions: Remove exports for pthread_set*id_np functions.
4532 * sysdeps/pthread/pthread.h: Remove pthread_set*id_np prototypes
4534 * Makefile: Don't build pthread_set*id code for now.
4536 2004-09-19 Ulrich Drepper <drepper@redhat.com>
4538 * sysdeps/unix/sysv/linux/allocrtsig.c: Allocate second signal for
4540 * allocatestack.c (__nptl_setxid): New function.
4541 * descr.h (struct xid_command): Define type.
4542 * init.c (pthread_functions): Add ptr__nptl_setxid initialization.
4543 (sighandler_setxid): New function.
4544 (__pthread_initialize_minimal): Register sighandler_setxid for
4546 * pt-allocrtsig.c: Update comment.
4547 * pthreadP.h: Define SIGSETXID. Declare __xidcmd variable.
4548 Declare __nptl_setxid.
4549 * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_setxid.
4550 * sysdeps/pthread/pthread.h: Declare pthread_setgid_np,
4551 pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
4552 pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
4553 and pthread_setresuid_np.
4554 * pthread_setgid_np.c: New file.
4555 * pthread_setuid_np.c: New file.
4556 * pthread_setegid_np.c: New file.
4557 * pthread_seteuid_np.c: New file.
4558 * pthread_setregid_np.c: New file.
4559 * pthread_setreuid_np.c: New file.
4560 * pthread_setresgid_np.c: New file.
4561 * pthread_setresuid_np.c: New file.
4562 * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setgid_np,
4563 pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
4564 pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
4565 and pthread_setresuid_np.
4566 * Makefile (libpthread-routines): Add pthread_setuid, pthread_seteuid,
4567 pthread_setreuid, pthread_setresuid, pthread_setgid, pthread_setegid,
4568 pthread_setregid, and pthread_setresgid.
4570 2004-09-18 Ulrich Drepper <drepper@redhat.com>
4572 * allocatestack.c (allocate_stack): Return EAGAIN instead of
4573 ENOMEM when out of memory.
4575 2004-09-10 Roland McGrath <roland@redhat.com>
4578 * allocatestack.c (allocate_stack): Remove [__ASSUME_CLONE_STOPPED]
4579 code, since we don't try to use the broken CLONE_STOPPED any more.
4580 * pthread_create.c (start_thread): Likewise.
4582 2004-09-15 Richard Henderson <rth@redhat.com>
4584 * sysdeps/unix/sysv/linux/alpha/vfork.S: Use libc_hidden_def.
4586 2004-09-01 David Mosberger <davidm@hpl.hp.com>
4588 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h
4589 (__libc_unwind_longjmp): Delete macro and declare as function.
4590 * sysdeps/unix/sysv/linux/ia64/Makefile (sysdep_routines): Mention
4591 __ia64_longjmp, sigstack_longjmp, and __sigstack_longjmp for
4593 * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S: New file.
4594 * sysdeps/unix/sysv/linux/ia64/__sigstack_longjmp.c: New file.
4595 * sysdeps/unix/sysv/linux/ia64/unwind_longjmp.c: New file.
4597 2004-09-12 Ulrich Drepper <drepper@redhat.com>
4599 * sysdeps/pthread/pthread.h: Make rwlock prototypes available also
4601 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define rwlock
4602 types also for __USE_XOPEN2K.
4603 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4604 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4605 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4606 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4607 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4608 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4609 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4612 2004-09-08 Ulrich Drepper <drepper@redhat.com>
4614 * sysdeps/pthread/pthread.h
4615 (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Make safe for C++.
4616 (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
4617 (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
4618 (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Likewise.
4621 2004-09-07 Ulrich Drepper <drepper@redhat.com>
4623 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Allow
4624 PSEUDO to be used with . prefix.
4626 * sysdeps/unix/sysv/linux/alpha/pthread_once.c (__pthread_once):
4627 Use atomic_increment instead of atomic_exchange_and_add.
4628 * sysdeps/unix/sysv/linux/sparc/pthread_once.c (__pthread_once):
4630 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
4632 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
4635 * allocatestack.c (allocate_stack): Use atomic_increment_val
4636 instead of atomic_exchange_and_add.
4637 * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Likewise.
4638 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
4640 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
4643 * sysdeps/pthread/pthread.h (pthread_once): Remove __THROW since
4644 the initialization function might throw.
4646 2005-09-05 Richard Henderson <rth@redhat.com>
4648 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
4649 Move definition inside libpthread, libc, librt check. Provide
4650 definition for rtld.
4652 2004-09-02 Ulrich Drepper <drepper@redhat.com>
4654 * sysdeps/alpha/jmpbuf-unwind.h: Define __libc_unwind_longjmp.
4655 * sysdeps/i386/jmpbuf-unwind.h: Likewise
4656 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
4657 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
4658 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
4659 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
4660 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
4661 * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
4664 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
4665 Rename __data.__clock to __data.__nwaiters, make it unsigned int.
4666 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
4668 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
4669 Decrement __nwaiters. If pthread_cond_destroy has been called and
4670 this is the last waiter, signal pthread_cond_destroy caller and
4671 avoid using the pthread_cond_t structure after unlock.
4672 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4673 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4674 Read clock type from the least significant bits of __nwaiters instead
4676 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4677 * sysdeps/unix/sysv/linux/internaltypes.h: Define COND_CLOCK_BITS.
4679 2004-08-31 Jakub Jelinek <jakub@redhat.com>
4682 * Makefile (tests): Add tst-cond20 and tst-cond21.
4683 * tst-cond20.c: New test.
4684 * tst-cond21.c: New test.
4685 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
4686 (pthread_cond_t): Rename __data.__clock to __data.__nwaiters, make
4688 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
4690 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
4691 (pthread_cond_t): Likewise.
4692 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
4694 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4696 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
4698 * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_clock): Remove.
4699 (cond_nwaiters): New.
4701 * pthread_cond_destroy.c (__pthread_cond_destroy): Return EBUSY
4702 if there are waiters not signalled yet.
4703 Wait until all already signalled waiters wake up.
4704 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Decrement
4705 __nwaiters. If pthread_cond_destroy has been called and this is the
4706 last waiter, signal pthread_cond_destroy caller and avoid using
4707 the pthread_cond_t structure after unlock.
4708 (__pthread_cond_wait): Increment __nwaiters in the beginning,
4709 decrement it when leaving. If pthread_cond_destroy has been called
4710 and this is the last waiter, signal pthread_cond_destroy caller.
4711 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
4712 Likewise. Read clock type from the least significant bits of
4713 __nwaiters instead of __clock.
4714 * pthread_condattr_setclock.c (pthread_condattr_setclock): Check
4715 whether clock ID can be encoded in COND_CLOCK_BITS bits.
4716 * pthread_condattr_getclock.c (pthread_condattr_getclock): Decode
4717 clock type just from the last COND_CLOCK_BITS bits of value.
4718 * pthread_cond_init.c (__pthread_cond_init): Initialize __nwaiters
4719 instead of __clock, just from second bit of condattr's value.
4721 2004-08-30 Jakub Jelinek <jakub@redhat.com>
4723 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Include
4724 bits/wordsize.h. Make the header match i386 header when __WORDSIZE
4726 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
4728 2004-08-15 Roland McGrath <roland@frob.com>
4730 * pthread_atfork.c: Update copyright terms including special exception
4731 for these trivial files, which are statically linked into executables
4732 that use dynamic linking for the significant library code.
4734 2004-08-09 Jakub Jelinek <jakub@redhat.com>
4736 * DESIGN-rwlock.txt: Add decreasing of nr_readers_queued to
4737 pthread_rwlock_rdlock.
4738 * sysdeps/pthread/pthread_rwlock_rdlock (__pthread_rwlock_rdlock):
4739 Decrease __nr_readers_queued after reacquiring lock.
4740 * sysdeps/pthread/pthread_rwlock_timedrdlock
4741 (pthread_rwlock_timedrdlock): Likewise.
4742 Reported by Bob Cook <bobcook47@hotmail.com>.
4744 2004-08-11 Jakub Jelinek <jakub@redhat.com>
4746 * tst-rwlock14.c (tf): Read main thread handle from *ARG
4747 before pthread_barrier_wait.
4749 2004-08-07 Ulrich Drepper <drepper@redhat.com>
4751 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
4752 Remove unnecessary exception handling data.
4754 2004-07-23 Jakub Jelinek <jakub@redhat.com>
4757 * sysdeps/pthread/pthread.h (pthread_getcpuclockid): Use __clockid_t
4758 instead of clockid_t.
4760 2004-07-21 Roland McGrath <roland@redhat.com>
4762 * Makefile ($(objpfx)multidir.mk): Use $(make-target-directory).
4764 2004-07-19 Roland McGrath <roland@redhat.com>
4766 * tst-cancel4.c (tf_waitid): Use WEXITED flag bit if available.
4768 2004-07-02 Roland McGrath <roland@redhat.com>
4770 * configure: Don't exit.
4772 2004-07-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4774 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
4775 (__pthread_cond_timedwait): Check for invalid nanosecond in
4778 2004-07-07 Ulrich Drepper <drepper@redhat.com>
4780 * Makefile: Add rules to build and run tst-fini1.
4781 * tst-fini1.c: New file.
4782 * tst-fini1mod.c: New file.
4784 2004-07-05 Ulrich Drepper <drepper@redhat.com>
4786 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define NO_CANCELLATION
4787 if no cancellation support is needed.
4788 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
4789 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
4790 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
4791 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
4792 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
4793 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
4794 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
4795 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
4796 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
4798 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define __NR_futex
4799 only if not already defined.
4801 2004-07-05 Jakub Jelinek <jakub@redhat.com>
4803 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_unlock): Use
4804 constraint "m" instead of "0" for futex.
4806 * shlib-versions: Add powerpc64-.*-linux.*.
4808 2004-07-04 Jakub Jelinek <jakub@redhat.com>
4810 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
4811 (pthread_rwlock_timedrdlock): Use cmpq instead of cmpl to check
4813 * tst-rwlock14.c (do_test): Test for invalid tv_nsec equal to
4814 1 billion and 64-bit tv_nsec which is valid when truncated to 32
4817 2004-06-29 Roland McGrath <roland@redhat.com>
4819 * Banner: NPTL no longer has its own version number.
4820 * Makefile (nptl-version): Variable removed.
4821 * sysdeps/pthread/Makefile (CFLAGS-confstr.c): Set LIBPTHREAD_VERSION
4822 using $(version), the glibc version number.
4824 2004-06-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4826 * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
4827 Fix branch offset for a PLT entry.
4828 * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
4830 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
4832 * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
4834 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait):
4837 2004-06-28 Jakub Jelinek <jakub@redhat.com>
4839 * sysdeps/alpha/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define
4842 2004-06-28 Jakub Jelinek <jakub@redhat.com>
4844 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
4845 (pthread_rwlock_timedwrlock): Return EINVAL if tv_nsec is negative,
4847 * sysdeps/pthread/pthread_rwlock_timedrdlock.c
4848 (pthread_rwlock_timedrdlock): Likewise.
4850 2004-06-22 Jakub Jelinek <jakub@redhat.com>
4852 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
4853 Set __r7 to val, not mutex.
4855 2004-06-27 Ulrich Drepper <drepper@redhat.com>
4857 * Makefile: Add rules to build tst-rwlock14.
4858 * tst-rwlock14.c: New file.
4860 2004-06-24 Boris Hu <boris.hu@intel.com>
4862 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Add timeout validation
4864 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
4866 2004-06-19 Andreas Jaeger <aj@suse.de>
4868 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix
4869 assembler in last patch.
4871 2004-06-17 Ulrich Drepper <drepper@redhat.com>
4873 * sysdeps/pthread/pthread_cond_timedwait.c
4874 (__pthread_cond_timedwait): Also check for negativ nanoseconds.
4875 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4876 (__pthread_cond_timedwait): Check for invalid nanosecond in
4878 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4879 * tst-cond19.c: New file.
4880 * Makefile: Add rules to build and run tst-cond19.
4882 2004-06-15 Steven Munroe <sjmunroe@us.ibm.com>
4884 * tst-context1.c (GUARD_PATTERN): Defined.
4885 (tst_context_t): Define struct containing ucontext_t & guard words.
4886 (ctx): Declare as an array of tst_context_t.
4887 (fct): Verify uc_link & guard words are still valid.
4888 (tf): Initialize guard words in ctx. Adjust ctx refs for new struct.
4890 2004-06-13 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4892 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4893 Add __data.__futex field, reshuffle __data.__clock.
4894 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
4895 (__pthread_cond_signal): Increment __futex at the same time as
4896 __wakeup_seq or __total_seq. Pass address of __futex instead of
4897 address of low 32-bits of __wakeup_seq to futex syscall.
4898 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
4899 (__pthread_cond_wait): Likewise. Pass __futex value from before
4900 releasing internal lock to FUTEX_WAIT.
4901 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
4902 (__pthread_cond_timedwait): Likewise.
4903 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
4904 (FUTEX_CMP_REQUEUE): Define.
4905 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
4906 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
4907 Pass __futex value from before the unlock and __futex address instead
4908 of address of low 32-bits of __wakeup_seq to futex syscall.
4909 Fallback to FUTEX_WAKE all on any errors.
4911 2004-06-08 Jakub Jelinek <jakub@redhat.com>
4913 * pthread_mutexattr_getpshared.c (pthread_mutex_getpshared): Fix
4915 * pthread_mutexattr_gettype.c (pthread_mutexattr_gettype): Likewise.
4916 * pthread_mutexattr_init.c (__pthread_mutexattr_init): Likewise.
4917 * pthread_mutexattr_settype.c (__pthread_mutexattr_settype): Likewise.
4918 * pthread_mutexattr_setpshared.c (pthread_mutexattr_setpshared):
4919 Likewise. Reported by Bob Cook <bobcook47@hotmail.com>.
4921 2004-06-11 Martin Schwidefsky <schwidefsky@de.ibm.com>
4923 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_compare_and_swap):
4924 Add memory clobber to inline assembly.
4925 (__lll_mutex_trylock): Likewise.
4926 (__lll_mutex_cond_trylock): Likewise.
4928 2004-06-07 Martin Schwidefsky <schwidefsky@de.ibm.com>
4930 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
4931 Pass val argument as 6th system call argument in %r7.
4933 2004-05-21 Jakub Jelinek <jakub@redhat.com>
4935 * Makefile (tests): Add tst-cond16.
4936 * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_futex): Add.
4937 * pthread_cond_init.c (__pthread_cond_init): Clear __data.__futex.
4938 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
4939 Add __data.__futex field, reshuffle __data.__clock.
4940 * sysdeps/unix/sysv/linux/i386/pthread_cond_signal.S
4941 (__pthread_cond_signal): Increment __futex at the same time as
4942 __wakeup_seq or __total_seq. Pass address of __futex instead of
4943 address of low 32-bits of __wakeup_seq to futex syscall.
4944 * sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S
4945 (__pthread_cond_wait): Likewise. Pass __futex value from before
4946 releasing internal lock to FUTEX_WAIT.
4947 * sysdeps/unix/sysv/linux/i386/pthread_cond_timedwait.S
4948 (__pthread_cond_timedwait): Likewise.
4949 * sysdeps/unix/sysv/linux/i386/pthread_cond_broadcast.S
4950 (FUTEX_CMP_REQUEUE): Define.
4951 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
4952 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
4953 Pass __futex value from before the unlock and __futex address instead
4954 of address of low 32-bits of __wakeup_seq to futex syscall.
4955 Fallback to FUTEX_WAKE all on any errors.
4956 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_CMP_REQUEUE):
4958 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4959 internally. Return non-zero if error, zero if success.
4960 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
4961 Add __data.__futex field, reshuffle __data.__clock.
4962 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_CMP_REQUEUE):
4964 (lll_futex_requeue): Add val argument, return 1 unconditionally
4966 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
4967 Add __data.__futex field, reshuffle __data.__clock.
4968 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_CMP_REQUEUE):
4970 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4971 internally. Return non-zero if error, zero if success.
4972 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
4973 (pthread_cond_t): Add __data.__futex field, reshuffle __data.__clock.
4974 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_CMP_REQUEUE):
4976 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4977 internally. Return non-zero if error, zero if success.
4978 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
4979 Add __data.__futex field, reshuffle __data.__clock.
4980 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_CMP_REQUEUE):
4982 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4983 internally. Return non-zero if error, zero if success.
4984 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
4985 Add __data.__futex field, reshuffle __data.__clock.
4986 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
4987 Add __data.__futex field, reshuffle __data.__clock.
4988 * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal):
4989 Increment __futex at the same time as __wakeup_seq or __total_seq.
4990 Pass address of __futex instead of address of low 32-bits of
4991 __wakeup_seq to futex syscall.
4992 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
4993 Pass __futex value from before releasing internal lock
4995 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
4996 Likewise. Avoid unnecessary shadowing of variables.
4997 * sysdeps/pthread/pthread_cond_broadcast.c (__pthread_cond_broadcast):
4998 Set __futex to 2 * __total_seq. Pass __futex value from before the
4999 unlock and __futex address instead of address of low 32-bits of
5000 __wakeup_seq to futex_requeue macro, adjust for new return value
5002 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
5003 (__pthread_cond_signal): Increment __futex at the same time as
5004 __wakeup_seq or __total_seq. Pass address of __futex instead of
5005 address of low 32-bits of __wakeup_seq to futex syscall.
5006 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
5007 (__pthread_cond_wait): Likewise. Pass __futex value from before
5008 releasing internal lock to FUTEX_WAIT.
5009 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
5010 (__pthread_cond_timedwait): Likewise.
5011 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
5012 (FUTEX_CMP_REQUEUE): Define.
5013 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
5014 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
5015 Pass __futex value from before the unlock and __futex address instead
5016 of address of low 32-bits of __wakeup_seq to futex syscall.
5017 Fallback to FUTEX_WAKE all on any errors.
5019 2004-06-03 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5021 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_mutex_lock):
5022 Add nop to align the end of critical section.
5023 (lll_mutex_cond_lock, lll_mutex_timedlock): Likewise.
5025 2004-06-01 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5027 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
5028 Add __broadcast_seq field.
5029 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Mark
5030 all waiters as woken with woken_seq and bump broadcast counter.
5031 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use new
5032 __broadcast_seq. Increment __woken_seq correctly when cleanuped.
5033 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
5034 Comment typo fixes. Avoid returning -ETIMEDOUT.
5036 2004-06-01 Ulrich Drepper <drepper@redhat.com>
5038 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5039 (__condvar_tw_cleanup): Fix access to saved broadcast_seq value.
5040 Reported by Kaz Kojima.
5042 2004-05-25 Jakub Jelinek <jakub@redhat.com>
5044 * sysdeps/unix/sysv/linux/aio_misc.h: New file.
5046 2004-05-21 Jakub Jelinek <jakub@redhat.com>
5048 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Compare
5049 __broadcast_seq with bc_seq after acquiring internal lock instead of
5052 2004-05-18 Jakub Jelinek <jakub@redhat.com>
5054 * Makefile (.NOTPARALLEL): Only serialize make check/xcheck, not
5056 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5057 (__pthread_cond_timedwait): Avoid returning -ETIMEDOUT.
5058 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
5059 (pthread_cond_t): Add __data.__broadcast_seq field.
5060 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
5061 (FRAME_SIZE): Define.
5062 (__pthread_cond_timedwait): Use it. Store/check broadcast_seq.
5064 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S (FRAME_SIZE):
5066 (__pthread_cond_wait): Use it. Store/check broadcast_seq. Comment
5068 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
5069 (__pthread_cond_broadcast): Increment broadcast_seq. Comment typo
5072 2004-05-18 Ulrich Drepper <drepper@redhat.com>
5074 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add broadcast_seq entry.
5075 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
5076 Add __broadcast_seq field.
5077 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5078 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5079 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5080 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
5081 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5082 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Mark
5083 all waiters as woken with woken_seq and bump broadcast counter.
5084 * sysdeps/pthread/pthread_cond_broadcast.c: Likewise.
5085 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use new
5086 __broadcast_seq field.
5087 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5088 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
5089 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
5090 * pthread_cond_init.c: Initialize __broadcast_seq field.
5091 * Makefile (tests): Add tst-cond17 and tst-cond18.
5092 Add .NOTPARALLEL goal.
5093 * tst-cond16.c: New file. From Jakub.
5094 * tst-cond17.c: New file. From Jakub.
5095 * tst-cond18.c: New file. From Jakub.
5097 2004-05-16 Ulrich Drepper <drepper@redhat.com>
5099 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Correct some
5102 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
5103 Parametrize frame size. Correct some unwind info.
5104 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5106 2004-05-04 Jakub Jelinek <jakub@redhat.com>
5108 * tst-stack3.c: Note testing functionality beyond POSIX.
5110 2004-05-04 Jakub Jelinek <jakub@redhat.com>
5112 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (USE___THREAD):
5113 Change conditional from ifdef to if.
5115 2004-04-23 Jakub Jelinek <jakub@redhat.com>
5117 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SYSDEP_CANCEL_ERRNO,
5118 SYSDEP_CANCEL_ERROR): Define.
5121 2004-05-01 Jakub Jelinek <jakub@redhat.com>
5123 * Versions (libpthread): Remove __pthread_cleanup_upto@@GLIBC_PRIVATE.
5125 2004-04-20 Jakub Jelinek <jakub@redhat.com>
5127 * sem_unlink.c (sem_unlink): Change EPERM into EACCES.
5129 2004-04-19 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5131 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Add frame info.
5132 Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
5133 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Remove unneeded frame
5134 info. Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
5136 2004-04-19 Ulrich Drepper <drepper@redhat.com>
5138 * sysdeps/unix/sysv/linux/timer_routines.c: Make sure helper
5139 thread has all signals blocked.
5141 2004-04-18 Andreas Jaeger <aj@suse.de>
5143 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h
5144 (SEM_VALUE_MAX): Add missing brace.
5146 2004-04-17 Jakub Jelinek <jakub@redhat.com>
5148 * sysdeps/pthread/Makefile (tests): Add tst-mqueue8x
5150 (CFLAGS-tst-mqueue8x.c): Add -fexceptions.
5151 * sysdeps/pthread/tst-mqueue8x.c: New test.
5152 * tst-cancel4.c: Update comment about message queues.
5154 * sysdeps/pthread/timer_gettime.c (timer_gettime): For expired timer
5155 return it_value { 0, 0 }.
5156 * sysdeps/pthread/timer_create.c (timer_create): Handle SIGEV_NONE
5158 * sysdeps/pthread/timer_routines.c (thread_expire_timer): Remove
5159 assertion for SIGEV_NONE.
5160 (thread_attr_compare): Compare all attributes, not just a partial
5163 2004-04-17 Jakub Jelinek <jakub@redhat.com>
5165 * sysdeps/unix/sysv/linux/mq_notify.c: Include stdlib.h.
5167 2004-04-17 Ulrich Drepper <drepper@redhat.com>
5169 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h (SEM_VALUE_MAX):
5170 Just use a plain number.
5171 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
5172 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
5173 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
5174 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
5175 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
5176 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
5177 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
5179 2004-04-16 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5181 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Remove unneeded
5183 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
5185 2004-04-15 Jakub Jelinek <jakub@redhat.com>
5187 * sysdeps/unix/sysv/linux/timer_routines.c: Include errno.h.
5188 (timer_helper_thread): Use inline rt_sigtimedwait syscall instead
5189 of calling sigwaitinfo.
5191 2004-04-16 Ulrich Drepper <drepper@redhat.com>
5193 * allocatestack.c (allocate_stack): Set reported_guardsize
5195 * pthread_getattr_np.c (pthread_getattr_np): Use
5196 reported_guardsize instead of guardsize.
5197 * descr.h (struct pthread): Add reported_guardsize field.
5199 2004-04-13 Jakub Jelinek <jakub@redhat.com>
5201 * sysdeps/unix/sysv/linux/mq_notify.c: Shut up GCC warning.
5203 2004-04-12 Ulrich Drepper <drepper@redhat.com>
5205 * sysdeps/unix/sysv/linux/mq-notify.c: New file.
5207 2004-04-08 Jakub Jelinek <jakub@redhat.com>
5209 * sysdeps/unix/sysv/linux/bits/local_lim.h (MQ_PRIO_MAX): Define.
5210 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h (MQ_PRIO_MAX): Define.
5211 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h (MQ_PRIO_MAX): Define.
5212 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h (MQ_PRIO_MAX): Define.
5213 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
5215 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
5216 (_POSIX_MESSAGE_PASSING): Define.
5217 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h
5218 (_POSIX_MESSAGE_PASSING): Define.
5219 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h
5220 (_POSIX_MESSAGE_PASSING): Define.
5222 2004-04-04 Ulrich Drepper <drepper@redhat.com>
5224 * tst-context1.c (fct): Check whether correct stack is used.
5226 2004-04-03 Ulrich Drepper <drepper@redhat.com>
5228 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Never use
5229 matching constraints for asm mem parameters.
5231 * tst-clock2.c (tf): Don't define unless needed.
5233 2004-03-30 H.J. Lu <hongjiu.lu@intel.com>
5235 * Makefile (link-libc-static): Use $(static-gnulib) instead of
5238 2004-03-30 Ulrich Drepper <drepper@redhat.com>
5240 * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_deallocate_tsd.
5241 * init.c (pthread_functions): Add ptr__nptl_deallocate_tsd.
5242 * pthreadP.h: Declare __nptl_deallocate_tsd.
5243 * pthread_create.c (deallocate_tsd): Remove to __nptl_deallocate_tsd.
5246 * Makefile (tests): Add tst-tsd5.
5247 * tst-tsd5.c: New file.
5249 2004-03-29 Ulrich Drepper <drepper@redhat.com>
5251 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
5252 (__pthread_attr_setaffinity_old): Prepend GLIBC_ to version names
5253 is SHLIB_COMPAT check.
5254 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
5255 (__pthread_attr_getaffinity_old): Likewise.
5256 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
5257 (__pthread_getaffinity_old): Likewise.
5258 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
5259 (__pthread_setaffinity_old): Likewise.
5261 2004-03-26 Ulrich Drepper <drepper@redhat.com>
5263 * allocatestack.c (_make_stacks_executable): Call
5264 _dl_make_stack_executable first.
5266 2004-03-24 Roland McGrath <roland@redhat.com>
5268 * sysdeps/i386/pthread_spin_lock.c (pthread_spin_lock): Use "m"
5269 constraint instead of "0".
5271 2004-03-24 Ulrich Drepper <drepper@redhat.com>
5273 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
5274 (lll_mutex_cond_trylock): Define as wrapper around __lll_cond_trylock.
5276 * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Reorganize
5277 code to avoid warning.
5279 2004-03-24 Andreas Jaeger <aj@suse.de>
5281 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
5282 (__pthread_attr_setaffinity_old): Remove const.
5284 2004-03-23 Ulrich Drepper <drepper@redhat.com>
5286 * sysdeps/unix/sysv/linux/smp.h: New file.
5287 * sysdeps/unix/sysv/linux/sh/smp.h: New file.
5288 * init.c: Define __is_smp.
5289 (__pthread_initialize_minimal_internal): Call is_smp_system to
5290 initialize __is_smp.
5291 * pthreadP.h: Declare __is_smp.
5292 Define MAX_ADAPTIVE_COUNT is necessary.
5293 * pthread_mutex_init.c: Add comment regarding __spins field.
5294 * pthread_mutex_lock.c: Implement adaptive mutex type.
5295 * pthread_mutex_timedlock.c: Likewise.
5296 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
5297 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
5299 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
5300 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5301 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5302 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
5303 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5304 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5305 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5306 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define
5307 lll_mutex_cond_trylock.
5308 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5309 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
5310 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5311 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5312 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
5313 Define BUSY_WAIT_NOP.
5314 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5315 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5317 * tst-mutex5.c: Add support for testing adaptive mutexes.
5318 * tst-mutex7.c: Likewise.
5319 * tst-mutex5a.c: New file.
5320 * tst-mutex7a.c: New file.
5321 * Makefile (tests): Add tst-mutex5a and tst-mutex7a.
5323 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
5324 (__lll_mutex_timedlock_wait): Preserve r8 and r9 since the
5325 vgettimeofday call might destroy the content.
5327 * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use hint
5330 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
5331 No need to restrict type of ret. Make it int. Add comment.
5333 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
5334 Remove unnecessary setne instruction.
5336 2004-03-22 Jakub Jelinek <jakub@redhat.com>
5338 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
5339 (__pthread_getaffinity_new): Use INT_MAX instead of UINT_MAX.
5340 * pthread_getattr_np.c (pthread_getattr_np): Double size every cycle.
5341 If realloc fails, break out of the loop.
5343 2004-03-20 Andreas Jaeger <aj@suse.de>
5345 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
5346 (__pthread_setaffinity_old): Fix interface.
5347 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
5348 (__pthread_getaffinity_old): Likewise.
5350 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
5351 (__pthread_setaffinity_new): Remove duplicate declaration.
5353 2004-03-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5355 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Save
5356 the return value to a safe register.
5357 (CDISABLE): Set the function argument correctly.
5359 2004-03-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5361 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XCHG): Define.
5362 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
5363 Rewrite so that only one locked memory operation per round is needed.
5364 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
5365 (pthread_barrier_wait): After wakeup, release lock only when the
5366 last thread stopped using the barrier object.
5367 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
5368 (__pthread_cond_wait): Don't store mutex address if the current
5369 value is ~0l. Add correct cleanup support and unwind info.
5370 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
5371 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
5372 (__pthread_cond_broadcast): Don't use requeue for pshared condvars.
5373 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Update comment.
5374 * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
5375 Add correct cleanup support and unwind info.
5376 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
5377 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Add unwind
5378 information for syscall wrappers.
5380 2004-03-18 Ulrich Drepper <drepper@redhat.com>
5382 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
5383 cpusetsize field, remove next.
5384 * sysdeps/pthread/pthread.h (pthread_getaffinity_np): Add new second
5385 parameter for size of the CPU set.
5386 (pthread_setaffinity_np): Likewise.
5387 (pthread_attr_getaffinity_np): Likewise.
5388 (pthread_attr_setaffinity_np): Likewise.
5389 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: Implement
5390 interface change, keep compatibility code.
5391 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
5392 * sysdeps/unix/sysv/linux/pthread_getaffinity.c: Likewise.
5393 * sysdeps/unix/sysv/linux/pthread_setaffinity.c: Likewise.
5394 * pthreadP.h: Remove hidden_proto for pthread_getaffinity_np. Declare
5395 __pthread_getaffinity_np.
5396 * Versions: Add version for changed interfaces.
5397 * tst-attr3.c: Adjust test for interface change.
5398 * pthread_getattr_np.c: Query the kernel about the affinity mask with
5399 increasing buffer sizes.
5400 * pthread_attr_destroy.c: Remove unused list handling.
5401 * pthread_attr_init.c: Likewise.
5403 2004-03-17 Roland McGrath <roland@redhat.com>
5405 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Pass missing
5406 first argument to clock_getres so we ever enable kernel timers.
5408 2004-03-15 Ulrich Weigand <uweigand@de.ibm.com>
5410 * init.c (nptl_version): Add __attribute_used__ to nptl_version.
5412 2004-03-12 Richard Henderson <rth@redhat.com>
5414 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Propagate
5415 oldvalue from CENABLE to CDISABLE.
5417 2004-03-12 Ulrich Drepper <drepper@redhat.com>
5419 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define HOST_NAME_MAX.
5420 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
5421 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
5422 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
5424 2004-03-11 Richard Henderson <rth@redhat.com>
5426 * sysdeps/alpha/tcb-offsets.sym (PID_OFFSET): New.
5427 * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: Save/restore PID.
5428 * sysdeps/unix/sysv/linux/alpha/vfork.S: New file.
5430 2004-03-11 Jakub Jelinek <jakub@redhat.com>
5432 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Use jgnl
5433 instead of jnl instruction to jump to SYSCALL_ERROR_LABEL.
5434 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S (__vfork): Likewise.
5436 2004-03-11 Jakub Jelinek <jakub@redhat.com>
5438 * forward.c (__pthread_cond_broadcast_2_0,
5439 __pthread_cond_destroy_2_0, __pthread_cond_init_2_0,
5440 __pthread_cond_signal_2_0, __pthread_cond_wait_2_0,
5441 __pthread_cond_timedwait_2_0): Use return 0 as defaction instead of 0.
5443 2004-03-11 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5445 * sysdeps/sh/tcb-offsets.sym: Add PID.
5446 * sysdeps/unix/sysv/linux/sh/pt-vfork.S: Properly handle PID cache.
5447 * sysdeps/unix/sysv/linux/sh/vfork.S: New file.
5449 2004-03-10 Ulrich Drepper <drepper@redhat.com>
5451 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: No need to
5452 include <sysdep-cancel.h>, vfork is no cancellation point.
5453 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: Likewise.
5454 * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: Likewise.
5455 * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: Likewise.
5457 2004-03-10 Jakub Jelinek <jakub@redhat.com>
5459 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Add
5461 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
5462 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
5464 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S (__vfork):
5466 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
5467 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
5468 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Include tcb-offsets.h.
5469 * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Use DO_CALL instead
5470 of DO_CALL_VIA_BREAK. Work around a gas problem.
5472 * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: Remove.
5473 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: New file.
5474 * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: New file.
5475 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: New file.
5476 * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: New file.
5477 * sysdeps/powerpc/tcb-offsets.sym: Add PID.
5479 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S (__vfork): Don't use
5480 a local register for saving old PID. Negate PID in parent upon exit.
5482 * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: Include
5484 (__vfork): Negate PID if non-zero and set to INT_MIN if zero
5485 before syscall, set to the old value in the parent afterwards.
5486 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: New file.
5487 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: Include
5489 (__vfork): Negate PID if non-zero and set to INT_MIN if zero
5490 before syscall, set to the old value in the parent afterwards.
5491 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: New file.
5492 * sysdeps/s390/tcb-offsets.sym: Add PID.
5494 * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: Remove.
5495 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: New file.
5496 * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S: New file.
5497 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: New file.
5498 * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: New file.
5499 * sysdeps/sparc/tcb-offsets.sym: Add PID.
5501 2004-03-10 Andreas Schwab <schwab@suse.de>
5503 * sysdeps/ia64/tcb-offsets.sym: Add PID.
5504 * sysdeps/unix/sysv/linux/ia64/vfork.S: New file.
5505 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Properly handle PID cache.
5507 2004-03-09 Jakub Jelinek <jakub@redhat.com>
5509 * tst-cancel20.c (do_one_test): Clear in_sh_body first.
5510 * tst-cancel21.c (do_one_test): Likewise.
5511 Reported by Gordon Jin <gordon.jin@intel.com>.
5513 2004-02-09 Jakub Jelinek <jakub@redhat.com>
5515 * sysdeps/unix/sysv/linux/i386/vfork.S (SAVE_PID): Negate PID
5516 if non-zero and set to INT_MIN if zero.
5517 * sysdeps/unix/sysv/linux/x86_64/vfork.S (SAVE_PID): Likewise.
5518 * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Include tcb-offsets.h.
5519 (SAVE_PID, RESTORE_PID): Define.
5521 * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: Include tcb-offsets.h.
5522 Use relative path to avoid including NPTL i386/vfork.S.
5523 (SAVE_PID, RESTORE_PID): Define.
5524 * sysdeps/unix/sysv/linux/raise.c: Include limits.h.
5525 (raise): Handle THREAD_SELF->pid INT_MIN the same as 0.
5526 * Makefile (tests): Add tst-vfork1, tst-vfork2, tst-vfork1x and
5528 (tests-reverse): Add tst-vfork1x and tst-vfork2x.
5529 * tst-vfork1.c: New test.
5530 * tst-vfork2.c: New test.
5531 * tst-vfork1x.c: New test.
5532 * tst-vfork2x.c: New test.
5534 2004-03-08 Ulrich Drepper <drepper@redhat.com>
5536 * sysdeps/i386/tcb-offsets.sym: Add PID.
5537 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
5538 * sysdeps/unix/sysv/linux/i386/vfork.S: New file.
5539 * sysdeps/unix/sysv/linux/x86_64/vfork.S: New file.
5541 2004-03-08 Steven Munroe <sjmunroe@us.ibm.com>
5543 * sysdeps/unix/sysv/linux/powerpc/Versions: Remove leading tabs.
5545 2004-03-08 H.J. Lu <hongjiu.lu@intel.com>
5547 * sysdeps/s390/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
5550 2004-03-07 Ulrich Drepper <drepper@redhat.com>
5552 * sysdeps/ia64/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
5555 * tst-once4.c: Remove unnecessary macro definition.
5557 * tst-mutex7.c (do_test): Limit thread stack size.
5558 * tst-once2.c (do_test): Likewise.
5559 * tst-tls3.c (do_test): Likewise.
5560 * tst-tls1.c (do_test): Likewise.
5561 * tst-signal3.c (do_test): Likewise.
5562 * tst-kill6.c (do_test): Likewise.
5563 * tst-key4.c (do_test): Likewise.
5564 * tst-join4.c (do_test): Likewise.
5565 * tst-fork1.c (do_test): Likewise.
5566 * tst-context1.c (do_test): Likewise.
5567 * tst-cond2.c (do_test): Likewise.
5568 * tst-cond10.c (do_test): Likewise.
5569 * tst-clock2.c (do_test): Likewise.
5570 * tst-cancel10.c (do_test): Likewise.
5571 * tst-basic2.c (do_test): Likewise.
5572 * tst-barrier4.c (do_test): Likewise.
5574 2004-03-05 Ulrich Drepper <drepper@redhat.com>
5576 * sysdeps/i386/tls.h: Use GLRO instead of GL where appropriate.
5578 2004-03-01 Ulrich Drepper <drepper@redhat.com>
5580 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5581 (__pthread_cond_timedwait): Optimize wakeup test.
5582 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
5583 (__pthread_cond_wait): Likewise.
5584 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
5585 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
5588 2004-02-29 Ulrich Drepper <drepper@redhat.com>
5590 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
5591 (__lll_mutex_lock_wait): Optimize a bit more. Just one copy of
5592 the atomic instruction needed.
5593 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
5594 (__lll_mutex_lock_wait): Likewise.
5596 2004-02-28 Ulrich Drepper <drepper@redhat.com>
5598 * Makefile (tests): Add tst-cond14 and tst-cond15.
5599 * tst-cond14.c: New file.
5600 * tst-cond15.c: New file.
5602 2004-02-27 Ulrich Drepper <drepper@redhat.com>
5604 * sysdeps/pthread/createthread.c (create_thread): Remove use of
5605 CLONE_STOPPED. We cannot use SIGCONT which means CLONE_STOPPED
5606 needs to be implemented differently to be useful.
5608 2004-02-26 Ulrich Drepper <drepper@redhat.com>
5610 * pthread_attr_setschedparam.c: Don't test priority against limits
5611 here. Set ATTR_FLAG_SCHED_SET flag.
5612 * pthread_attr_setschedpolicy.c: Set ATTR_FLAG_POLICY_SET flag.
5613 * pthread_create.c (__pthread_create_2_1): Copy scheduling attributes
5614 from parent thread to child. If attribute is used and scheduling
5615 parameters are not inherited, copy parameters from attribute or
5616 compute them. Check priority value.
5617 * pthread_getschedparam.c: If the parameters aren't known yet get
5618 them from the kernel.
5619 * pthread_setschedparam.c: Set ATTR_FLAG_SCHED_SET and
5620 ATTR_FLAG_POLICY_SET flag for thread.
5621 * sysdeps/unix/sysv/linux/internaltypes.h: Define ATTR_FLAG_SCHED_SET
5622 and ATTR_FLAG_POLICY_SET.
5624 * sysdeps/pthread/createthread.c: Use tgkill if possible.
5626 * pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr): Don't
5627 fail if stack address hasn't been set. Just return 0.
5629 2004-02-25 Ulrich Drepper <drepper@redhat.com>
5631 * Makefile (tests-nolibpthread): Add tst-unload. Don't link with
5632 libpthread for the files in this list.
5633 (CFLAGS-tst-unload): Removed.
5634 * tst-unload.c (do_test): Don't use complete path for
5637 * Makefile: Define sonames for tst-tls5mod, tst-_res1mod1, and
5640 2004-02-22 Ulrich Drepper <drepper@redhat.com>
5642 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
5643 (__lll_mutex_lock_wait): Rewrite so that only one locked memory
5644 operation per round is needed.
5645 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
5646 (__lll_mutex_lock_wait): Likewise.
5648 2004-02-20 Ulrich Drepper <drepper@redhat.com>
5650 * tst-cancel9.c (cleanup): Don't print to stderr.
5652 2004-02-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5654 * sysdeps/sh/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Fix variable name.
5656 2004-02-20 Jakub Jelinek <jakub@redhat.com>
5658 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
5659 (__syscall_error_handler2): Call CDISABLE.
5660 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
5661 (__syscall_error_handler2): Call CDISABLE.
5663 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
5664 Release lock before the loop, don't reacquire it.
5666 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h (DL_ARGV_NOT_RELRO): Define.
5668 2004-02-19 Andreas Schwab <schwab@suse.de>
5670 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
5673 2004-02-18 Ulrich Drepper <drepper@redhat.com>
5675 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
5676 (pthread_barrier_wait): After wakeup, release lock only when the
5677 last thread stopped using the barrier object.
5678 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S
5679 (pthread_barrier_wait): Likewise.
5680 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
5682 * Makefile (tests): Add tst-barrier4.
5683 * tst-barrier4.c: New file.
5685 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5686 (__pthread_cond_timedwait): Perform timeout test while holding
5687 internal lock to prevent wakeup race.
5688 Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
5689 * sysdeps/pthread/pthread_cond_timedwait.c
5690 (__pthread_cond_timedwait): Likewise.
5691 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
5692 (__pthread_cond_timedwait): Likewise.
5694 2004-02-18 Jakub Jelinek <jakub@redhat.com>
5696 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S
5697 (__pthread_rwlock_unlock): Access WRITER as 32-bit value.
5698 * Makefile (tests): Add tst-rwlock13.
5699 * tst-rwlock13.c: New test.
5701 2004-02-16 Ulrich Drepper <drepper@redhat.com>
5703 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5704 (__condvar_tw_cleanup): Little optimization.
5705 Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
5707 2004-02-16 Steven Munroe <sjmunroe@us.ibm.com>
5709 * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: Replace libc with
5710 libpthread as "lib" parameter to SHLIB_COMPAT.
5711 (__novmx_siglongjmp): Fix typo in function name.
5712 (__novmx_longjmp): Fix typo in function name.
5714 2004-02-13 Ulrich Drepper <drepper@redhat.com>
5716 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Add a
5719 * sysdeps/generic/pt-longjmp.c: Moved to...
5720 * sysdeps/pthread/pt-longjmp.c: ...here. New file.
5722 2004-01-29 Steven Munroe <sjmunroe@us.ibm.com>
5724 * Makefile (libpthread-routines): Add pt-cleanup.
5725 * pt-longjmp.c: Removed.
5726 * pt-cleanup.c: Copied __pthread_cleanup_upto to here. New file.
5727 * sysdeps/generic/pt-longjmp.c: Copied longjmp to here. New file.
5728 * sysdeps/unix/sysv/linux/powerpc/Versions: New file.
5729 Version longjmp, siglongjmp for GLIBC_2.3.4.
5730 * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: New File.
5732 2004-02-13 Ulrich Drepper <drepper@redhat.com>
5734 * sysdeps/pthread/pthread_cond_timedwait.c
5735 (__pthread_cond_timedwait): Optimize. Drop internal lock earlier.
5736 Reuse code. Add __builtin_expects.
5738 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5739 (__pthread_cond_timedwait): Get internal lock in case timeout has
5740 passed before the futex syscall.
5741 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5743 2004-01-20 Ulrich Drepper <drepper@redhat.com>
5745 * allocatestack.c: Pretty printing.
5747 * sysdeps/pthread/createthread.c (create_thread): Don't add
5748 CLONE_DETACHED bit if it is not necessary.
5750 2004-01-16 Ulrich Drepper <drepper@redhat.com>
5752 * pthread_getattr_np.c: Include ldsodefs.h.
5754 2004-01-16 Richard Henderson <rth@redhat.com>
5756 * allocatestack.c: Don't declare __libc_stack_end.
5757 * init.c (__pthread_initialize_minimal_internal): Likewise.
5758 * pthread_getattr_np.c (pthread_getattr_np): Likewise.
5760 2004-01-15 Richard Henderson <rth@redhat.com>
5762 * sysdeps/alpha/tls.h (tcbhead_t): Add private.
5763 (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE,
5764 TLS_PRE_TCB_SIZE, TLS_TCB_ALIGN, INSTALL_DTV, INSTALL_NEW_DTV,
5765 GET_DTV, THREAD_DTV, THREAD_SELF, DB_THREAD_SELF): Match ia64.
5766 (TLS_TCB_OFFSET, THREAD_ID, NO_TLS_OFFSET): Remove.
5767 (THREAD_GETMEM, THREAD_GETMEM_NC): Simplify.
5768 (THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
5769 * sysdeps/unix/sysv/linux/alpha/createthread.c (TLS_VALUE): Match ia64.
5771 2004-01-14 Ulrich Drepper <drepper@redhat.com>
5773 * init.c (pthread_functions): Make array const.
5775 2004-01-13 Ulrich Drepper <drepper@redhat.com>
5777 * allocatestack.c (__make_stacks_executable): Change interface.
5778 Check parameters. Pass parameter on to libc counterpart.
5779 * pthreadP.h: Change declaration.
5781 2004-01-13 Richard Henderson <rth@redhat.com>
5783 * pthread_attr_setstack.c (__old_pthread_attr_setstack): Use
5785 * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize):
5788 * sysdeps/alpha/Makefile: New file.
5789 * sysdeps/alpha/tcb-offsets.sym: New file.
5790 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
5791 Use MULTIPLE_THREADS_OFFSET to implement !libpthread !libc version.
5793 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Rewrite based
5796 2004-01-08 Jakub Jelinek <jakub@redhat.com>
5798 * Makefile (tests): Add tst-backtrace1.
5799 * tst-backtrace1.c: New test.
5801 2003-12-11 Ulrich Weigand <uweigand@de.ibm.com>
5803 * sysdeps/alpha/tls.h (DB_THREAD_SELF): Pass bit size of thread
5804 register as second parameter to the REGISTER macro.
5805 * sysdeps/ia64/tls.h (DB_THREAD_SELF): Likewise.
5806 * sysdeps/powerpc/tls.h (DB_THREAD_SELF): Likewise.
5807 * sysdeps/sh/tls.h (DB_THREAD_SELF): Likewise.
5808 * sysdeps/sparc/tls.h (DB_THREAD_SELF): Likewise.
5809 * sysdeps/s390/tls.h (DB_THREAD_SELF): Pass __WORDSIZE as bit size
5810 of thread register as second parameter to REGISTER macro in 64 case.
5812 2004-01-03 Ulrich Drepper <drepper@redhat.com>
5814 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Removed.
5815 (CFLAGS-getpid.o): Defined.
5816 (CFLAGS-getpid.os): Defined.
5818 2003-12-31 Ulrich Drepper <drepper@redhat.com>
5820 * pthread_getattr_np.c (pthread_getattr_np): Make sure stack info
5821 returned for main thread does not overlap with any other VMA.
5822 Patch by Jakub Jelinek.
5824 2003-12-29 Jakub Jelinek <jakub@redhat.com>
5826 * tst-raise1.c: Include stdio.h.
5828 2003-12-23 Jakub Jelinek <jakub@redhat.com>
5830 * sysdeps/unix/sysv/linux/raise.c (raise): Protect pid = selftid
5831 setting with __ASSUME_TGKILL || defined __NR_tgkill.
5832 If pid is 0, set it to selftid.
5833 * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Make inline.
5834 Don't set self->pid but self->tid. If self->pid == 0 and self->tid
5835 != 0, return self->tid without doing a syscall.
5836 * descr.h (struct pthread): Move pid field after tid.
5838 * Makefile (tests): Add tst-raise1.
5839 * tst-raise1.c: New file.
5841 2003-12-23 Roland McGrath <roland@redhat.com>
5843 * tst-oddstacklimit.c: New file.
5844 * Makefile (tests): Add it.
5845 (tst-oddstacklimit-ENV): New variable.
5847 * init.c (__pthread_initialize_minimal_internal): Round stack rlimit
5848 value up to page size for __default_stacksize.
5850 2003-12-21 Ulrich Drepper <drepper@redhat.com>
5852 * Makefile (tests): Add tst-eintr5.
5853 * tst-eintr5.c: New file.
5855 * eintr.c (eintr_source): Prevent sending signal to self.
5857 * tst-eintr2.c (tf1): Improve error message.
5859 2003-12-20 Ulrich Drepper <drepper@redhat.com>
5861 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Define.
5862 * sysdeps/unix/sysv/linux/getpid.c: New file.
5863 * pthread_cancel.c: Add comment explaining use of PID field.
5864 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
5865 * pthread_getattr_np.c: Use abs() when comparing PID and TID fields.
5866 * sysdeps/unix/sysv/linux/fork.c: Negate PID field of parent
5867 temporarily to signal the field must not be relied on and updated
5869 * sysdeps/unix/sysv/linux/pt-raise.c: Handle case where PID is
5870 temporarily negative.
5871 * sysdeps/unix/sysv/linux/raise.c: Likewise.
5873 2003-12-19 Ulrich Drepper <drepper@redhat.com>
5875 * eintr.c (setup_eintr): Add new parameter. Pass to thread function.
5876 (eintr_source): If ARG != NULL, use pthread_kill.
5877 * tst-eintr1.c: Adjust for this change.
5878 * tst-eintr2.c: Likewise.
5879 * Makefile (tests): Add tst-eintr3 and tst-eintr4.
5880 * tst-eintr3.c: New file.
5881 * tst-eintr4.c: New file.
5883 2003-12-19 Jakub Jelinek <jakub@redhat.com>
5885 * libc-cancellation.c (__libc_enable_asynccancel): Don't cancel
5886 if CANCELSTATE_BITMASK is set.
5887 * sysdeps/pthread/librt-cancellation.c (__librt_enable_asynccancel):
5890 * Makefile (tests): Add tst-cancel22 and tst-cancel23.
5891 (tests-reverse): Add tst-cancel23.
5892 * tst-cancel22.c: New test.
5893 * tst-cancel23.c: New test.
5895 2003-12-18 Ulrich Drepper <drepper@redhat.com>
5897 * tst-eintr1.c: Better error messages.
5899 * Makefile (tests): Add tst-eintr2.
5900 * tst-eintr2.c: New file.
5902 2003-12-18 Jakub Jelinek <jakub@redhat.com>
5904 * Makefile (tests): Add tst-cancel21 and tst-cancelx21.
5905 (CFLAGS-tst-cancelx21.c): Set.
5906 * tst-cancel21.c: New test.
5907 * tst-cancelx21.c: New test.
5909 * unwind.c (FRAME_LEFT): Add adj argument. Subtract it from each
5911 (unwind_stop): Use _JMPBUF_CFA_UNWINDS_ADJ macro instead of
5912 _JMPBUF_CFA_UNWINDS. Adjust FRAME_LEFT invocations.
5913 * pt-longjmp.c: Include jmpbuf-unwind.h.
5914 (__pthread_cleanup_upto): Use _JMPBUF_UNWINDS_ADJ macro instead of
5915 _JMPBUF_UNWINDS. Adjust compared pointers.
5916 * init.c (__pthread_initialize_minimal_internal): Initialize
5917 pd->stackblock_size.
5918 * sysdeps/pthread/jmpbuf-unwind.h: Removed.
5919 * sysdeps/alpha/jmpbuf-unwind.h: New file.
5920 * sysdeps/i386/jmpbuf-unwind.h: New file.
5921 * sysdeps/powerpc/jmpbuf-unwind.h: New file.
5922 * sysdeps/s390/jmpbuf-unwind.h: New file.
5923 * sysdeps/sh/jmpbuf-unwind.h: New file.
5924 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: New file.
5925 * sysdeps/x86_64/jmpbuf-unwind.h: New file.
5926 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Include stdint.h.
5927 (_JMPBUF_CFA_UNWINDS): Remove.
5928 (_JMPBUF_CFA_UNWINDS_ADJ, _JMPBUF_UNWINDS_ADJ): Define.
5930 2003-12-12 Jakub Jelinek <jakub@redhat.com>
5932 * Makefile (tests): Add tst-cancel20 and tst-cancelx20.
5933 (CFLAGS-tst-cancelx20.c): Set.
5934 * tst-cancel20.c: New test.
5935 * tst-cancelx20.c: New test.
5937 2003-12-17 Ulrich Drepper <drepper@redhat.com>
5939 * init.c (__pthread_initialize_minimal_internal): Don't treat
5940 architectures with separate register stack special here when
5941 computing default stack size.
5943 2003-12-17 Roland McGrath <roland@redhat.com>
5945 * Makefile (tst-cancelx7-ARGS): New variable.
5946 Reportd by Greg Schafer <gschafer@zip.com.au>.
5948 2003-12-17 Jakub Jelinek <jakub@redhat.com>
5950 * Makefile (tests): Add tst-stack3. Depend on $(objpfx)tst-stack3-mem.
5951 (generated): Add tst-stack3.mtrace and tst-stack3-mem.
5952 (tst-stack3-ENV): Set.
5953 ($(objpfx)tst-stack3-mem): New.
5954 * tst-stack3.c: New test.
5956 2003-12-10 David Mosberger <davidm@hpl.hp.com>
5958 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init_EPILOG_BEGINS):
5959 Add unwind directives. Drop unused .regstk directive.
5960 (_fini_EPILOG_BEGINS): Add unwind directives.
5962 2003-12-11 Ulrich Drepper <drepper@redhat.com>
5964 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
5965 Assume parameter is a pointer.
5966 (lll_futex_wake): Likewise.
5967 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_wait):
5969 (lll_futex_wake): Likewise.
5970 Reported by Boris Hu.
5971 * sysdeps/unix/sysv/linux/unregister-atfork.c
5972 (__unregister_atfork): Pass pointer to refcntr to lll_futex_wait.
5974 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Simplify a bit.
5976 2003-12-10 Ulrich Drepper <drepper@redhat.com>
5978 * sysdeps/pthread/bits/libc-lock.h (__rtld_lock_initialize): Define.
5979 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Call
5980 __rtld_lock_initialize for ld.so lock.
5981 Patch in part by Adam Li <adam.li@intel.com>.
5983 2003-12-02 David Mosberger <davidm@hpl.hp.com>
5985 * Makefile (link-libc-static): Remove -lgcc_eh---it's already mentioned
5986 in $(gnulib). Also, remove stale comment.
5988 2003-11-12 David Mosberger <davidm@hpl.hp.com>
5990 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Take
5991 advantage of new syscall stub and optimize accordingly.
5993 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__NR_futex): Rename
5994 from SYS_futex, to match expectations of
5995 sysdep.h:DO_INLINE_SYSCALL.
5996 (lll_futex_clobbers): Remove.
5997 (lll_futex_timed_wait): Rewrite in terms of DO_INLINE_SYSCALL.
5998 (lll_futex_wake): Likewise.
5999 (lll_futex_requeue): Likewise.
6000 (__lll_mutex_trylock): Rewrite to a macro, so we can include this
6001 file before DO_INLINE_SYSCALL is defined (proposed by Jakub
6003 (__lll_mutex_lock): Likewise.
6004 (__lll_mutex_cond_lock): Likewise.
6005 (__lll_mutex_timed_lock): Likewise.
6006 (__lll_mutex_unlock): Likewise.
6007 (__lll_mutex_unlock_force): Likewise.
6009 * sysdeps/ia64/tls.h: Move declaration of __thread_self up so it
6010 comes before the include of <sysdep.h>.
6011 (THREAD_SELF_SYSINFO): New macro.
6012 (THREAD_SYSINFO): Likewise.
6013 (INIT_SYSINFO): New macro.
6014 (TLS_INIT_TP): Call INIT_SYSINFO.
6016 * sysdeps/ia64/tcb-offsets.sym: Add SYSINFO_OFFSET.
6018 * sysdeps/pthread/createthread.c (create_thread): Use
6019 THREAD_SELF_SYSINFO and THREAD_SYSINFO instead of open code.
6020 * allocatestack.c (allocate_stack): Use THREAD_SYSINFO and
6021 THREAD_SELF_SYSINFO instead of open code.
6022 * sysdeps/i386/tls.h (THREAD_SELF_SYSINFO): New macro.
6023 (THREAD_SYSINFO): Likewise.
6025 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: New file.
6027 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Work around gas problem.
6029 2003-12-06 Ulrich Drepper <drepper@redhat.com>
6031 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Use .init_array
6032 instead of .init. Patch by David Mosberger.
6034 2003-11-30 Thorsten Kukuk <kukuk@suse.de>
6036 * sysdeps/pthread/configure.in: Remove broken declaration in C
6037 cleanup handling check.
6039 2003-11-30 Andreas Jaeger <aj@suse.de>
6041 * Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time).
6042 * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
6045 2003-11-27 Jakub Jelinek <jakub@redhat.com>
6047 * sysdeps/unix/sysv/linux/internaltypes.h (ATTR_FLAG_OLDATTR): Define.
6048 * pthread_attr_destroy.c: Include shlib-compat.h.
6049 (__pthread_attr_destroy): Return immediately if ATTR_FLAG_OLDATTR
6050 is set in iattr->flags.
6051 * pthread_attr_init.c (__pthread_attr_init_2_0): Set ATTR_FLAG_OLDATTR.
6053 2003-11-21 Jakub Jelinek <jakub@redhat.com>
6055 * Makefile (distribute): Add tst-cleanup4aux.c.
6057 * tst-cond12.c (prepare): Add prototype. Move after test-skeleton.c
6060 2003-11-21 Ulrich Drepper <drepper@redhat.com>
6062 * tst-cond12.c (do_test): If USE_COND_SIGNAL is defined, use
6063 pthread_cond_signal.
6065 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Don't
6066 store mutex address if the current value is ~0l.
6067 * sysdeps/pthread/pthread_cond_timedwait.c
6068 (__pthread_cond_timedwait): Likewise.
6069 * sysdeps/pthread/pthread_cond_broadcast.c
6070 (__pthread_cond_broadcast): Don't use requeue for pshared
6073 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
6074 (__pthread_cond_wait): Don't store mutex address if the current
6076 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
6077 (__pthread_cond_timedwait): Likewise.
6078 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
6079 (__pthread_cond_broadcast): Don't use requeue for pshared
6082 * pthread_cond_init.c (__pthread_cond_init): Initialize __mutex
6083 element with ~0l for pshared condvars, with NULL otherwise.
6085 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
6086 (__pthread_cond_wait): Don't store mutex address if the current
6088 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6089 (__pthread_cond_timedwait): Likewise.
6090 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
6091 (__pthread_cond_broadcast): Don't use requeue for pshared
6094 * Makefile: Add rules to build and run tst-cond12 and tst-cond13.
6095 * tst-cond12.c: New file.
6096 * tst-cond13.c: New file.
6098 2003-11-17 Ulrich Drepper <drepper@redhat.com>
6100 * sysdeps/pthread/configure.in: Make missing forced unwind support
6103 2003-11-11 Ulrich Drepper <drepper@redhat.com>
6105 * pthreadP.h: Don't declare __pthread_unwind as weak inside libpthread.
6107 2003-11-06 Ulrich Drepper <drepper@redhat.com>
6109 * Makefile: Add magic to clean up correctly.
6111 2003-11-05 Jakub Jelinek <jakub@redhat.com>
6113 * unwind.c (FRAME_LEFT): Define.
6114 (unwind_stop): Handle old style cleanups here.
6115 (__pthread_unwind): Handle old style cleanups only if
6116 !HAVE_FORCED_UNWIND.
6117 * Makefile (tests): Add tst-cleanup4 and tst-cleanupx4.
6118 (CFLAGS-tst-cleanupx4.c): Add -fexceptions.
6119 ($(objpfx)tst-cleanup4): Depend on $(objpfx)tst-cleanup4aux.o.
6120 ($(objpfx)tst-cleanupx4): Likewise.
6121 * tst-cleanup4.c: New test.
6122 * tst-cleanup4aux.c: New.
6123 * tst-cleanupx4.c: New test.
6125 2003-11-04 Ulrich Drepper <drepper@redhat.com>
6127 * sysdeps/pthread/bits/stdio-lock.h: Use lll_*lock instead of
6128 lll_mutex_*lock macros to skip atomic operations on some archs.
6130 2003-11-03 Ulrich Drepper <drepper@redhat.com>
6132 * sysdeps/pthread/tst-timer.c (main): Initialize
6133 sigev2.sigev_value as well.
6135 2003-10-15 Roland McGrath <roland@redhat.com>
6137 * sysdeps/pthread/configure.in: Barf if visibility attribute support
6139 * sysdeps/pthread/configure: Regenerated.
6141 2003-10-09 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6143 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Completely revamp the
6144 locking macros. No distinction between normal and mutex locking
6146 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Rewrite mutex locking.
6147 Merge bits from lowlevelmutex.S we still need.
6148 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Remove.
6149 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
6150 * sysdeps/unix/sysv/linux/sh/not-cancel.h: New file.
6151 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Adjust for
6152 new mutex implementation.
6153 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Likewise.
6154 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
6155 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
6156 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
6157 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
6158 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
6159 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
6160 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
6161 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
6162 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO): Also defined
6163 symbol for entry point to avoid cancellation.
6165 2003-10-07 Jakub Jelinek <jakub@redhat.com>
6167 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Backout 2003-10-02
6169 (SAVE_OLDTYPE_0): Fix a typo.
6171 2003-10-03 Ulrich Drepper <drepper@redhat.com>
6173 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
6174 Check __sigsetjmp return value. Reported by Daniel Jacobowitz.
6176 2003-10-02 Ulrich Drepper <drepper@redhat.com>
6178 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (DOCARGS_1): Use
6181 2003-10-02 Jakub Jelinek <jakub@redhat.com>
6183 * Makefile (tests): Add tst-cancel19.
6184 * tst-cancel19.c: New test.
6186 2003-10-02 Ulrich Drepper <drepper@redhat.com>
6188 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix saving and
6189 restoring of the old cancellation type.
6191 2003-09-30 Jakub Jelinek <jakub@redhat.com>
6193 * sysdeps/pthread/malloc-machine.h: Remove misleading comment.
6195 2003-09-27 Wolfram Gloger <wg@malloc.de>
6197 * sysdeps/pthread/malloc-machine.h: New file
6199 2003-09-24 Roland McGrath <roland@redhat.com>
6201 * allocatestack.c (__make_stacks_executable): Don't ignore return
6202 value from _dl_make_stack_executable.
6204 2003-09-24 Ulrich Drepper <drepper@redhat.com>
6206 * allocatestack.c (__make_stacks_executable): Also change
6207 permission of the currently unused stacks.
6209 * allocatestack.c (change_stack_perm): Split out from
6210 __make_stacks_executable.
6211 (allocate_stack): If the required permission changed between the time
6212 we started preparing the stack and queueing it, change the permission.
6213 (__make_stacks_executable): Call change_stack_perm.
6215 * Makefile: Build tst-execstack-mod locally.
6216 * tst-execstack-mod.c: New file.
6218 2003-09-23 Jakub Jelinek <jakub@redhat.com>
6220 * Makefile (tests): Only add tst-execstack if have-z-execstack is yes.
6222 2003-09-23 Roland McGrath <roland@redhat.com>
6224 * tst-execstack.c: New file.
6225 * Makefile (tests): Add it.
6226 ($(objpfx)tst-execstack, $(objpfx)tst-execstack.out): New targets.
6227 (LDFLAGS-tst-execstack): New variable.
6229 * allocatestack.c (allocate_stack): Use GL(dl_stack_flags) to decide
6230 whether to use PROT_EXEC for stack mmap.
6231 (__make_stacks_executable): New function.
6232 * pthreadP.h: Declare it.
6233 * init.c (__pthread_initialize_minimal_internal): Set
6234 GL(dl_make_stack_executable_hook) to that.
6236 2003-09-22 Ulrich Drepper <drepper@redhat.com>
6238 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Adjust for latest
6239 recommendation from AMD re avoidance of lock prefix.
6241 2003-09-22 Jakub Jelinek <jakub@redhat.com>
6243 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait): Use
6244 lll_futex_timed_wait instead of lll_futex_wait.
6245 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Removed.
6246 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Removed.
6247 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: Removed.
6248 * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: Removed.
6249 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Removed.
6250 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Removed.
6251 * sysdeps/unix/sysv/linux/s390/sem_post.c: Removed.
6252 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Removed.
6253 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Include atomic.h.
6254 Completely revamp the locking macros. No distinction between
6255 normal and mutex locking anymore.
6256 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
6257 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock_wait,
6258 __lll_lock_timedwait): Fix prototypes.
6259 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_lock_wait,
6260 __lll_lock_timedwait): Likewise.
6261 (lll_mutex_lock, lll_mutex_cond_lock): Use _val instead of _bool
6262 macros, add __builtin_expect.
6263 (lll_mutex_timedlock): Likewise. Fix return value.
6264 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Removed.
6265 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: Removed.
6266 * sysdeps/unix/sysv/linux/i386/i586/lowlevelmutex.S: Removed.
6267 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: Removed.
6268 * sysdeps/unix/sysv/linux/i386/i686/lowlevelmutex.S: Removed.
6269 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: Removed.
6270 * sysdeps/unix/sysv/linux/lowlevelmutex.c: Removed.
6271 * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: Removed.
6273 2003-09-22 Ulrich Drepper <drepper@redhat.com>
6275 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
6276 (__lll_mutex_lock_wait): Minor optimization to avoid one atomic
6277 operation if possible.
6279 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Don't play tricks
6280 like jumping over the lock prefix.
6282 2003-09-21 Ulrich Drepper <drepper@redhat.com>
6284 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Completely revamp the
6285 locking macros. No distinction between normal and mutex locking
6287 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
6288 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
6289 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
6290 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Rewrite mutex
6291 locking. Merge bits from lowlevelmutex.S we still need.
6292 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
6293 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
6294 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Removed.
6295 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Removed.
6296 * Makefile (routines): Remove libc-lowlevelmutex.
6297 (libpthread-rountines): Remove lowlevelmutex.
6298 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Adjust
6299 for new mutex implementation.
6300 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
6301 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6302 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6303 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
6304 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
6306 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
6308 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
6309 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
6310 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise
6311 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
6312 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6313 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6314 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
6315 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
6317 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
6319 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
6320 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
6321 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
6323 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
6324 * sysdeps/pthread/pthread_cond_signal.c: Don't use requeue.
6326 2003-09-20 Ulrich Drepper <drepper@redhat.com>
6328 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't match memory
6329 in parameters of asm with output parameters.
6331 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Change
6332 type of DECR parameter to int.
6333 * pthreadP.h: Adjust prototype of __pthread_mutex_unlock_usercnt.
6335 2003-09-18 Jakub Jelinek <jakub@redhat.com>
6337 * tst-attr3.c (tf, do_test): Print stack start/end/size and
6338 guardsize for each thread.
6340 2003-09-17 Jakub Jelinek <jakub@redhat.com>
6342 * sysdeps/pthread/pthread.h (pthread_getattr_np): Clarify usage.
6343 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
6344 (pthread_attr_setaffinity_np): Handle cpuset == NULL.
6346 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
6347 (pthread_attr_getaffinity_np): Don't segfault if iattr->cpuset is
6349 * pthread_getattr_np.c: Set cpuset using pthread_getaffinity_np.
6350 * pthreadP.h (pthread_getaffinity_np): Add hidden_proto.
6351 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
6352 (pthread_getaffinity_np): Add hidden_def.
6354 * Makefile (tests): Add tst-attr3.
6355 * tst-attr3.c: New test.
6357 * sysdeps/i386/Makefile (CFLAGS-tst-align.c): Remove.
6359 2003-09-15 Jakub Jelinek <jakub@redhat.com>
6361 * sysdeps/i386/Makefile (CFLAGS-pthread_create.c,
6362 CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
6364 2003-09-17 Jakub Jelinek <jakub@redhat.com>
6366 * Makefile (CFLAGS-tst-align.c): Add $(stack-align-test-flags).
6367 * tst-align.c: Include tst-stack-align.h.
6368 (tf, do_test): Use TEST_STACK_ALIGN macro.
6370 2003-09-17 Ulrich Drepper <drepper@redhat.com>
6372 * pthread_attr_init.c (__pthread_attr_init_2_0): Remove unused
6375 2003-09-16 Ulrich Drepper <drepper@redhat.com>
6377 * pthread_getattr_np.c (pthread_getattr_np): Correctly fill in the
6378 stack-related values for the initial thread.
6380 2003-09-15 Jakub Jelinek <jakub@redhat.com>
6382 * Makefile (CFLAGS-pthread_once.c): Add $(uses-callbacks).
6384 2003-09-11 Ulrich Drepper <drepper@redhat.com>
6386 * pthread_mutex_lock.c: Minor code rearrangements.
6388 2003-09-05 Roland McGrath <roland@redhat.com>
6390 * pthread_create.c (__pthread_pthread_sizeof_descr): Removed.
6391 Instead, include ../nptl_db/db_info.c to do its magic.
6392 * pthread_key_create.c (__pthread_pthread_keys_max): Removed.
6393 (__pthread_pthread_key_2ndlevel_size): Likewise.
6394 * sysdeps/alpha/tls.h (DB_THREAD_SELF): New macro.
6395 * sysdeps/i386/tls.h (DB_THREAD_SELF): New macro.
6396 * sysdeps/ia64/tls.h (DB_THREAD_SELF): New macro.
6397 * sysdeps/powerpc/tls.h (DB_THREAD_SELF): New macro.
6398 * sysdeps/s390/tls.h (DB_THREAD_SELF): New macro.
6399 * sysdeps/sh/tls.h (DB_THREAD_SELF): New macro.
6400 * sysdeps/sparc/tls.h (DB_THREAD_SELF): New macro.
6401 * sysdeps/x86_64/tls.h (DB_THREAD_SELF): New macro.
6402 * sysdeps/alpha/td_ta_map_lwp2thr.c: File removed.
6403 * sysdeps/generic/td_ta_map_lwp2thr.c: File removed.
6404 * sysdeps/i386/td_ta_map_lwp2thr.c: File removed.
6405 * sysdeps/ia64/td_ta_map_lwp2thr.c: File removed.
6406 * sysdeps/powerpc/td_ta_map_lwp2thr.c: File removed.
6407 * sysdeps/s390/td_ta_map_lwp2thr.c: File removed.
6408 * sysdeps/sh/td_ta_map_lwp2thr.c: File removed.
6409 * sysdeps/sparc/td_ta_map_lwp2thr.c: File removed.
6410 * sysdeps/x86_64/td_ta_map_lwp2thr.c: File removed.
6412 2003-09-08 Ulrich Drepper <drepper@redhat.com>
6414 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Change type
6415 of pthread_t to be compatible with LT.
6416 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
6417 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6418 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6419 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6420 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
6421 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6422 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
6424 2003-09-04 Ulrich Drepper <drepper@redhat.com>
6426 * sysdeps/unix/sysv/linux/i386/not-cancel.h (fcntl_not_cancel): Define.
6428 2003-09-04 Jakub Jelinek <jakub@redhat.com>
6430 * unwind-forcedunwind.c: Move to...
6431 * sysdeps/pthread/unwind-forcedunwind.c: ...here.
6432 (pthread_cancel_init): Use ARCH_CANCEL_INIT if defined.
6433 * sysdeps/pthread/jmpbuf-unwind.h: New file.
6434 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: New file.
6435 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: New file.
6436 * unwind.c: Include jmpbuf-unwind.h.
6437 (unwind_stop): Use _JMPBUF_CFA_UNWINDS macro.
6439 2003-09-02 Jakub Jelinek <jakub@redhat.com>
6441 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: New file.
6442 * sysdeps/unix/sysv/linux/ia64/Versions (libpthread): Export
6443 pthread_attr_setstack and pthread_attr_setstacksize @@GLIBC_2.3.3.
6444 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: New file.
6445 * sysdeps/unix/sysv/linux/alpha/Versions: New file.
6446 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: New file.
6447 * sysdeps/unix/sysv/linux/sparc/Versions: New file.
6448 * pthread_attr_setstack.c (__old_pthread_attr_setstack): New function.
6449 (pthread_attr_setstack): If PTHREAD_STACK_MIN != 16384, export
6450 as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.2.
6451 * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize): New
6453 (pthread_attr_setstacksize): If PTHREAD_STACK_MIN != 16384, export
6454 as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.1.
6455 * Makefile (tests): Add tst-stack2.
6456 * tst-stack2.c: New test.
6457 * tst-stack1.c: Include limits.h and sys/param.h.
6458 (do_test): Set size to MAX (4 * getpagesize (), PTHREAD_STACK_MIN).
6460 * pthread_condattr_setpshared.c: Include errno.h.
6461 (pthread_condattr_setpshared): Return EINVAL if pshared
6462 is neither PTHREAD_PROCESS_PRIVATE nor PTHREAD_PROCESS_SHARED.
6464 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Also
6465 defined symbol for entry point to avoid cancellation.
6466 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
6468 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
6470 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
6472 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h (PSEUDO):
6474 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
6476 * sysdeps/unix/sysv/linux/i386/not-cancel.h (__open_nocancel,
6477 __close_nocancel, __read_nocancel, __write_nocancel,
6478 __waitpid_nocancel): Add attribute_hidden. If not in libc.so,
6479 libpthread.so or librt.so, define to corresponding function
6480 without _nocancel suffix.
6481 * sysdeps/unix/sysv/linux/s390/not-cancel.h: New file.
6482 * sysdeps/unix/sysv/linux/powerpc/not-cancel.h: New file.
6483 * sysdeps/unix/sysv/linux/sparc/not-cancel.h: New file.
6485 * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: Fix a typo.
6487 2003-09-02 Ulrich Drepper <drepper@redhat.com>
6489 * sysdeps/unix/sysv/linux/i386/not-cancel.h: New file.
6490 * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: New file.
6492 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Make sure the code
6493 in subsections has a symbol associated with it.
6495 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Also
6496 defined symbol for entry point to avoid cancellation.
6497 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Likewise.
6499 2003-09-01 Jakub Jelinek <jakub@redhat.com>
6501 * Makefile (tests): Add tst-tls5.
6502 (module-names): Add tst-tls5mod{,a,b,c,d,e,f}.
6503 ($(objpfx)tst-tls5mod{,a,b,c,d,e,f}.so-no-z-defs): Set to yes.
6504 ($(objpfx)tst-tls5): New.
6505 ($(objpfx)tst-tls6.out): Likewise.
6506 (tests): Depend on $(objpfx)tst-tls6.out.
6507 * tst-tls3.c: Include stdint.h and pthreaddef.h.
6508 (do_test): Check pthread_self () return value alignment.
6509 * tst-tls3mod.c: Include stdint.h and pthreaddef.h.
6510 (tf): Check pthread_self () return value alignment.
6511 * tst-tls5.c: New test.
6513 * tst-tls5mod.c: New.
6514 * tst-tls5moda.c: New.
6515 * tst-tls5modb.c: New.
6516 * tst-tls5modc.c: New.
6517 * tst-tls5modd.c: New.
6518 * tst-tls5mode.c: New.
6519 * tst-tls5modf.c: New.
6520 * tst-tls6.sh: New test.
6522 * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Add
6523 ptr___pthread_cond_timedwait and ptr___pthread_cond_timedwait_2_0.
6524 * init.c (pthread_functions): Initialize them.
6525 * forward.c (pthread_cond_timedwait@GLIBC_2.0,
6526 pthread_cond_timedwait@@GLIBC_2.3.2): New forwards.
6527 * Versions (libc): Export pthread_cond_timedwait@GLIBC_2.0,
6528 pthread_cond_timedwait@@GLIBC_2.3.2.
6530 2003-09-01 Jakub Jelinek <jakub@redhat.com>
6532 * sysdeps/unix/sysv/linux/alpha/timer_create.c: New file.
6533 * sysdeps/unix/sysv/linux/alpha/timer_delete.c: New file.
6534 * sysdeps/unix/sysv/linux/alpha/timer_getoverr.c: New file.
6535 * sysdeps/unix/sysv/linux/alpha/timer_gettime.c: New file.
6536 * sysdeps/unix/sysv/linux/alpha/timer_settime.c: New file.
6537 * sysdeps/unix/sysv/linux/alpha/Versions: New file.
6539 * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
6541 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Define
6542 _POSIX_THREAD_PRIORITY_SCHEDULING.
6543 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
6545 2003-08-31 Ulrich Drepper <drepper@redhat.com>
6547 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock): Avoid
6548 nested function, use static inline function from libio.h.
6549 Code by Richard Henderson.
6551 * sysdeps/pthread/bits/libc-lock.h: Mark pthread_setcancelstate as
6554 2003-08-30 Jakub Jelinek <jakub@redhat.com>
6556 * sysdeps/unix/sysv/linux/sparc/sparc64/Versions: New file.
6557 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_create.c: New file.
6558 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_delete.c: New file.
6559 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_getoverr.c: New file.
6560 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_gettime.c: New file.
6561 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_settime.c: New file.
6562 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
6563 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
6564 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: New file.
6565 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: New file.
6566 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: New file.
6567 * sysdeps/unix/sysv/linux/sparc/pthread_once.c: New file.
6568 * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: New file.
6569 * sysdeps/unix/sysv/linux/sparc/fork.c: New file.
6570 * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
6571 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: New file.
6572 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: New file.
6573 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: New file.
6574 * sysdeps/sparc/sparc32/pthread_spin_lock.c: New file.
6575 * sysdeps/sparc/sparc32/pthread_spin_trylock.c: New file.
6576 * sysdeps/sparc/sparc32/pthreaddef.h: New file.
6577 * sysdeps/sparc/sparc64/pthread_spin_lock.c: New file.
6578 * sysdeps/sparc/sparc64/pthread_spin_trylock.c: New file.
6579 * sysdeps/sparc/sparc64/pthread_spin_unlock.c: New file.
6580 * sysdeps/sparc/sparc64/pthreaddef.h: New file.
6581 * sysdeps/sparc/tls.h: New file.
6582 * sysdeps/sparc/tcb-offsets.sym: New file.
6583 * sysdeps/sparc/Makefile: New file.
6584 * sysdeps/sparc/td_ta_map_lwp2thr.c: New file.
6585 * init.c [__sparc__] (__NR_set_tid_address): Define.
6587 2003-08-29 Jakub Jelinek <jakub@redhat.com>
6589 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock,
6590 _IO_release_lock): Define.
6592 2003-08-29 Jakub Jelinek <jakuB@redhat.com>
6594 * tst-cancel4.c (tf_sigwait, tf_sigwaitinfo, tf_sigtimedwait): Add
6595 sigemptyset before sigaddset. Reported by jreiser@BitWagon.com.
6597 2003-08-27 Ulrich Drepper <drepper@redhat.com>
6599 * sysdeps/pthread/pthread.h (pthread_exit): Remove __THROW.
6600 (__pthread_cleanup_class): Add missing return types of member
6603 2003-08-26 Steven Munroe <sjmunroe@us.ibm.com>
6605 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
6606 (lll_mutex_unlock_force): Add memory barrier between store and futex
6609 2003-08-25 Ulrich Drepper <drepper@redhat.com>
6611 * tst-cancel4.c (do_test): Also unlink tempfname and remove
6612 tempmsg in first loop.
6614 2003-08-18 Ulrich Drepper <drepper@redhat.com>
6616 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
6617 _POSIX_THREAD_PRIORITY_SCHEDULING.
6618 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
6620 2003-08-07 Jakub Jelinek <jakub@redhat.com>
6622 * sysdeps/pthread/bits/libc-lock.h [_LIBC && SHARED]
6623 (__rtld_lock_default_lock_recursive,
6624 __rtld_lock_default_unlock_recursive): Define.
6625 [_LIBC && SHARED] (__rtld_lock_lock_recursive,
6626 __rtld_lock_unlock_recursive): Define using
6627 GL(_dl_rtld_*lock_recursive).
6628 * init.c (__pthread_initialize_minimal_internal): Initialize
6629 _dl_rtld_lock_recursive and _dl_rtld_unlock_recursive.
6630 Lock GL(_dl_load_lock) the same number of times as
6631 GL(_dl_load_lock) using non-mt implementation was nested.
6633 * pthreadP.h (__pthread_cleanup_upto): Add hidden_proto.
6634 * pt-longjmp.c (__pthread_cleanup_upto): Add hidden_def.
6636 2003-08-06 Jakub Jelinek <jakub@redhat.com>
6638 * tst-cancel17.c (do_test): Make len2 maximum of page size and
6641 2003-08-07 Jakub Jelinek <jakub@redhat.com>
6643 * pthread_create.c (__pthread_create_2_0): Clear new_attr.cpuset.
6645 2003-08-03 Jakub Jelinek <jakub@redhat.com>
6647 * sysdeps/pthread/createthread.c (do_clone): Move error handling
6648 to first syscall error check. Move syscall error check for tkill
6649 into __ASSUME_CLONE_STOPPED #ifdef.
6651 2003-08-02 Ulrich Drepper <drepper@redhat.com>
6653 * sysdeps/pthread/createthread.c (do_clone): If __ASSUME_CLONE_STOPPED
6654 is not defined, do explicit synchronization.
6655 (create_thread): Do not lock pd->lock here. If __ASSUME_CLONE_STOPPED
6656 is not defined also unlock pd->lock for non-debugging case in case
6658 * pthread_create.c (start_thread): Always get and release pd->lock
6659 if __ASSUME_CLONE_STOPPED is not defined.
6660 (start_thread_debug): Removed. Adjust users.
6661 * allocatestack.c (allocate_stack): Always initialize lock if
6662 __ASSUME_CLONE_STOPPED is not defined.
6663 * Makefile (tests): Add tst-sched1.
6664 * tst-sched1.c: New file.
6666 * sysdeps/pthread/createthread.c (do_clone): Only use
6667 sched_setschduler and pass correct parameters.
6669 2003-07-31 Jakub Jelinek <jakub@redhat.com>
6671 * sysdeps/pthread/pthread.h (pthread_attr_setstackaddr,
6672 pthread_attr_setstacksize): Change PTHREAD_STACK_SIZE to
6673 PTHREAD_STACK_MIN in comments.
6675 2003-07-31 Jakub Jelinek <jakub@redhat.com>
6677 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
6678 Shut up warnings if INTERNAL_SYSCALL_ERROR_P does not use its first
6680 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Likewise.
6681 * pthread_condattr_setclock.c (pthread_condattr_setclock): Likewise.
6682 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Include pthreaddef.h.
6683 (__pthread_cleanup_upto): Fix prototype.
6684 (_longjmp_unwind): Adjust caller.
6685 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_timedlock):
6686 Change second argument to const struct pointer.
6687 * tst-sem8.c (main): Remove unused s2 and s3 variables.
6688 * tst-sem9.c (main): Likewise.
6689 * unwind.c: Include string.h for strlen prototype.
6691 2003-07-31 Ulrich Drepper <drepper@redhat.com>
6693 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6694 (__pthread_cond_timedwait): Don't use cmov unless HAVE_CMOV is defined.
6695 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S:
6697 Patch by Nicholas Miell <nmiell@attbi.com>.
6699 2003-07-30 Jakub Jelinek <jakub@redhat.com>
6701 * init.c (__pthread_initialize_minimal_internal): Initialize
6702 GL(dl_init_static_tls).
6703 * pthreadP.h (__pthread_init_static_tls): New prototype.
6704 * allocatestack.c (init_one_static_tls, __pthread_init_static_tls):
6706 * Makefile (tests): Add tst-tls4.
6707 (modules-names): Add tst-tls4moda and tst-tls4modb.
6708 ($(objpfx)tst-tls4): Link against libdl and libpthread.
6709 ($(objpfx)tst-tls4.out): Depend on tst-tls4moda.so and
6711 * tst-tls4.c: New file.
6712 * tst-tls4moda.c: New file.
6713 * tst-tls4modb.c: New file.
6715 2003-06-19 Daniel Jacobowitz <drow@mvista.com>
6717 * sysdeps/pthread/timer_create.c (timer_create): Call timer_delref
6718 before __timer_dealloc.
6719 * sysdeps/pthread/timer_routines.c (__timer_thread_find_matching):
6720 Don't call list_unlink.
6722 2003-07-29 Roland McGrath <roland@redhat.com>
6724 * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
6726 2003-07-25 Jakub Jelinek <jakub@redhat.com>
6728 * tst-cancel17.c (do_test): Check if aio_cancel failed.
6729 Don't reuse struct aiocb A if it failed.
6730 Write fpathconf (fds[1], _PC_PIPE_BUF) + 2 bytes using aio_write,
6731 not just one byte, as that does not block.
6733 2003-07-22 Jakub Jelinek <jakub@redhat.com>
6735 * sysdeps/pthread/unwind-resume.c: New file.
6736 * sysdeps/pthread/Makefile (routines, shared-only-routines): Add
6737 unwind-resume in csu subdir.
6738 (CFLAGS-unwind-resume.c, CFLAGS-rt-unwind-resume.c): Compile with
6740 (librt-sysdep_routines, librt-shared-only-routines): Add
6742 * sysdeps/pthread/rt-unwind-resume.c: New file.
6743 * unwind-forcedunwind.c: New file.
6744 * Makefile (libpthread-routines): Add unwind-forcedunwind.
6745 (libpthread-shared-only-routines): Likewise.
6746 (CFLAGS-unwind-forcedunwind.c): Compile with exceptions.
6747 * pthreadP.h (pthread_cancel_init): New prototype.
6748 * pthread_cancel.c (pthread_cancel): Call pthread_cancel_init.
6750 * sysdeps/pthread/createthread.c (do_thread, create_thread): Make
6751 attr argument const struct pthread_attr *.
6753 * res.c (__res_state): Return __resp.
6754 * descr.h: Include resolv.h.
6755 (struct pthread): Add res field.
6756 * pthread_create.c: Include resolv.h.
6757 (start_thread): Initialize __resp.
6758 * Makefile (tests): Add tst-_res1.
6759 (module-names): Add tst-_res1mod1, tst-_res1mod2.
6760 ($(objpfx)tst-_res1mod2.so): Depend on $(objpfx)tst-_res1mod1.so.
6761 ($(objpfx)tst-_res1): Depend on $(objpfx)tst-_res1mod2.so and
6763 * tst-_res1.c: New file.
6764 * tst-_res1mod1.c: New file.
6765 * tst-_res1mod2.c: New file.
6767 2003-07-21 Ulrich Drepper <drepper@redhat.com>
6769 * sysdeps/pthread/createthread.c: Don't define CLONE_STOPPED.
6771 * Makefile: Define various *-no-z-defs variables for test DSOs
6772 which has undefined symbols.
6774 2003-07-21 Steven Munroe <sjmunroe@us.ibm.com>
6776 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
6777 Retry if the stwcx fails to store once_control.
6779 2003-07-20 Ulrich Drepper <drepper@redhat.com>
6781 * Makefile (libpthread-routines): Add pthread_attr_getaffinity and
6782 pthread_attr_setaffinity.
6783 * Versions [libpthread] (GLIBC_2.3.3): Likewise.
6784 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: New file.
6785 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: New file.
6786 * pthread_attr_destroy.c: Free cpuset element if allocated.
6787 * pthread_create.c: Pass iattr as additional parameter to
6789 * sysdeps/pthread/createthread.c: If attribute is provided and
6790 a new thread is created with affinity set or scheduling parameters,
6791 start thread with CLONE_STOPPED.
6792 * sysdeps/pthread/pthread.h: Declare pthread_attr_getaffinity and
6793 pthread_attr_setaffinity.
6794 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
6797 2003-07-15 Ulrich Drepper <drepper@redhat.com>
6799 * tst-tcancel-wrappers.sh: lseek and llseek are not cancelation points.
6801 2003-07-14 Ulrich Drepper <drepper@redhat.com>
6803 * sysdeps/pthread/configure.in: Require CFI directives also for
6806 2003-07-15 Jakub Jelinek <jakub@redhat.com>
6808 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
6811 2003-07-12 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6813 * sysdeps/sh/tcb-offsets.sym: Add RESULT, TID, CANCELHANDLING and
6815 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use more
6816 registers as variables. Call __pthread_mutex_unlock_usercnt.
6817 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
6818 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Store TID
6819 not self pointer in __writer. Compare with TID to determine
6821 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
6822 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
6824 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
6826 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add cancellation support.
6827 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
6828 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Define all the nice
6829 macros also when compiling librt.
6831 2003-07-11 Jakub Jelinek <jakub@redhat.com>
6833 * Makefile (CFLAGS-pthread_once.c): Add -fexceptions
6834 -fasynchronous-unwind-tables.
6835 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
6836 (PSEUDO): Add cfi directives.
6837 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO):
6839 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
6842 2003-07-08 Jakub Jelinek <jakub@redhat.com>
6844 * pthreadP.h (__pthread_unwind_next, __pthread_register_cancel,
6845 __pthread_unregister_cancel): Add prototypes and hidden_proto.
6846 * unwind.c (__pthread_unwind_next): Add hidden_def.
6847 * cleanup.c (__pthread_register_cancel, __pthread_unregister_cancel):
6849 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
6850 Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
6851 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
6853 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
6854 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
6856 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once): Use
6857 HIDDEN_JUMPTARGET to call __pthread_register_cancel,
6858 __pthread_unregister_cancel and __pthread_unwind_next.
6860 2003-07-04 Jakub Jelinek <jakub@redhat.com>
6862 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Use
6863 different symbol for the cancellation syscall wrapper and
6864 non-cancellation syscall wrapper.
6865 (PSEUDO_END): Define.
6867 2003-07-05 Richard Henderson <rth@redhat.com>
6869 * sysdeps/alpha/elf/pt-initfini.c: Avoid .ent/.end.
6870 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_wait,
6871 lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
6872 return actual return value from the syscall, not 0.
6874 2003-07-07 Ulrich Drepper <drepper@redhat.com>
6876 * descr.h (struct pthread): Add pid field.
6877 * allocatestack.c (allocate_stack): Initialize pid field in descriptor.
6878 (__reclaim_stacks): Likewise.
6879 * init.c (sigcancel_handler): If __ASSUME_CORRECT_SI_PID is defined
6880 also check for PID of the signal source.
6881 (__pthread_initialize_minimal_internal): Also initialize pid field
6882 of initial thread's descriptor.
6883 * pthread_cancel.c: Use tgkill instead of tkill if possible.
6884 * sysdeps/unix/sysv/linux/fork.c: Likewise.
6885 * sysdeps/unix/sysv/linux/pt-raise.c: Likewise.
6886 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
6887 * sysdeps/unix/sysv/linux/raise.c: Likewise.
6889 2003-07-05 Ulrich Drepper <drepper@redhat.com>
6891 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_push): Renamed.
6892 Fix use of parameter.
6893 (__libc_cleanup_pop): Likewise.
6895 2003-07-04 Ulrich Drepper <drepper@redhat.com>
6897 * init.c (sigcancel_handler): Change parameters to match handler
6898 for SA_SIGACTION. Check signal number and code to recognize
6899 invalid invocations.
6901 2003-07-03 Roland McGrath <roland@redhat.com>
6903 * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr):
6904 Apply sizeof (struct pthread) bias to r13 value.
6906 2003-07-03 Ulrich Drepper <drepper@redhat.com>
6908 * sysdeps/pthread/configure.in: Require CFI directives.
6910 * sysdeps/pthread/librt-cancellation.c (__pthread_unwind): Remove
6912 * pthreadP.h (__pthread_unwind): Add hidden_proto if used in
6913 libpthread compilation.
6914 * unwind.c (__pthread_unwind): Add hidden_def.
6915 * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_unwind.
6917 2003-07-01 Ulrich Drepper <drepper@redhat.com>
6919 * libc-cancellation.c (__libc_cleanup_routine): Define.
6920 * sysdeps/pthread/bits/libc-lock.h (__pthread_cleanup_push): Define.
6921 (__pthread_cleanup_pop): Define.
6923 2003-07-01 Richard Henderson <rth@redhat.com>
6925 * sysdeps/alpha/elf/pt-initfini.c: New file.
6926 * sysdeps/alpha/pthread_spin_lock.S: New file.
6927 * sysdeps/alpha/pthread_spin_trylock.S: New file.
6928 * sysdeps/alpha/pthreaddef.h: New file.
6929 * sysdeps/alpha/td_ta_map_lwp2thr.c: New file.
6930 * sysdeps/alpha/tls.h: New file.
6931 * sysdeps/unix/sysv/linux/alpha/Makefile: New file.
6932 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: New file.
6933 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: New file.
6934 * sysdeps/unix/sysv/linux/alpha/createthread.c: New file.
6935 * sysdeps/unix/sysv/linux/alpha/fork.c: New file.
6936 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: New file.
6937 * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: New file.
6938 * sysdeps/unix/sysv/linux/alpha/pthread_once.c: New file.
6939 * sysdeps/unix/sysv/linux/alpha/sem_post.c: New file.
6940 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
6942 2003-07-01 Ulrich Drepper <drepper@redhat.com>
6944 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Add correct
6945 cleanup support and unwind info.
6947 2003-06-30 Ulrich Drepper <drepper@redhat.com>
6949 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
6950 Use correct cleanup handler registration. Add unwind info.
6951 * sysdeps/unix/sysv/linux/unwindbuf.sym: New file.
6952 * sysdeps/unix/sysv/linux/Makefile: Add rule to build unwindbuf.h.
6953 * tst-once3.c: Add cleanup handler and check it is called.
6954 * tst-once4.c: Likewise.
6955 * tst-oncex3.c: New file.
6956 * tst-oncex4.c: New file.
6957 * Makefile: Add rules to build and run tst-oncex3 and tst-oncex4.
6959 2003-06-29 Ulrich Drepper <drepper@redhat.com>
6961 * sysdeps/pthread/configure.in: Check for C cleanup handling in gcc.
6963 2003-06-27 Ulrich Drepper <drepper@redhat.com>
6965 * tst-cancel4.c (tf_msgrcv): Use IPC_PRIVATE in msgget call.
6966 (tf_msgsnd): Likewise.
6968 * tst-cancel4.c (tf_msgrcv): Strengthen test against valid
6969 premature returns a bit more.
6971 2003-06-26 Ulrich Drepper <drepper@redhat.com>
6973 * sysdeps/pthread/librt-cancellation.c: Move __pthread_unwind
6974 definition to the front.
6976 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rename
6977 the cleanup functions to make the names unique. Fix dwarf opcode
6979 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Rename cleanup
6980 functions to make the names unique. Fix CFA offset for two blocks.
6982 2003-06-25 Ulrich Drepper <drepper@redhat.com>
6984 * sysdeps/pthread/pthread.h (class __pthread_cleanup_class): Add
6985 missing closing braces.
6986 Patch by Christophe Saout <christophe@saout.de>.
6988 2003-06-24 Roland McGrath <roland@redhat.com>
6990 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Typo fix.
6992 2003-06-24 Ulrich Drepper <drepper@redhat.com>
6994 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: New file.
6995 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: New file.
6997 * pthreadP.h: Declare __find_thread_by_id.
6998 * allocatestack.c [HP_TIMING_AVAIL]: Define __find_thread_by_id.
6999 * pthread_clock_gettime.c: Allow using other thread's clock.
7000 * pthread_clock_settime.c: Likewise.
7001 * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
7002 * Makefile: Add rules to build and run tst-clock2.
7003 * tst-clock2.c: New file.
7005 2003-06-23 Ulrich Drepper <drepper@redhat.com>
7007 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rewrite
7008 to use exception-based cleanup handler.
7009 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7011 * tst-cond8.c (ch): Announce that we are done.
7013 * pthreadP.h (__pthread_mutex_cond_lock): Mark with internal_function.
7015 * tst-cancel17.c (tf): Retry aio_suspend in case of EINTR.
7016 Also test aio_suspend with timeout value.
7018 2003-06-22 Ulrich Drepper <drepper@redhat.com>
7020 * pthreadP.h: Mark __pthread_mutex_unlock_usercnt also hidden.
7021 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Add
7024 * pthreadP.h (__pthread_mutex_init_internal): Mark hidden.
7025 (__pthread_mutex_lock_internal): Likewise.
7026 (__pthread_mutex_unlock_internal): Likewise.
7027 (__pthread_mutex_unlock_usercnt): Declare.
7028 * pthread_mutex_destroy.c: Always fail if used in any way.
7029 * pthread_mutex_init.c: Update comment.
7030 * pthread_mutex_lock.c: If NO_INCR is not defined adjust __nusers.
7031 * pthread_mutex_timedlock.c: Adjust __nusers.
7032 * pthread_mutex_trylock.c: Adjust __nusers.
7033 * pthread_mutex_unlock.c: Old code is in __pthread_mutex_unlock_usercnt
7034 and public interfaces are wrapper with pass additional parameter.
7035 __pthread_mutex_unlock_usercnt does not adjust __nusers if second
7037 * tst-mutex8.c: New file.
7038 * Makefile (tests): Add tst-mutex8.
7039 * sysdeps/pthread/pthread_cond_timedwait.c: Call
7040 __pthread_mutex_unlock_usercnt.
7041 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
7042 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7043 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7044 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7045 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7046 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Define NO_INCR.
7047 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
7049 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7050 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7051 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7052 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
7053 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
7055 * pthread_mutex_lock.c: Don't store THREAD_ID in __owner, use TID.
7056 * pthread_mutex_timedlock.c: Likewise.
7057 * pthread_mutex_trylock.c: Adjust __nusers.
7058 * pthread_mutex_unlock.c: Compare with TID not THREAD_ID.
7059 * tst-mutex9.c: New file.
7060 * Makefile (tests): Add tst-mutex9.
7061 * sysdeps/i386/tls.h: Remove THREAD_ID definition.
7062 * sysdeps/ia64/tls.h: Likewise.
7063 * sysdeps/powerpc/tls.h: Likewise.
7064 * sysdeps/s390/tls.h: Likewise.
7065 * sysdeps/sh/tls.h: Likewise.
7066 * sysdeps/x86_64/tls.h: Likewise.
7067 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
7068 Change type of __owner.
7069 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7070 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7071 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7072 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
7073 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
7075 2003-06-19 Jakub Jelinek <jakub@redhat.com>
7077 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Move to...
7078 * sysdeps/unix/sysv/linux/sem_post.c: ...here.
7080 * sysdeps/unix/sysv/linux/sem_post.c: Move to...
7081 * sysdeps/unix/sysv/linux/powerpc/sem_post.c: ... here. Pass nr + 1
7082 instead of nr to lll_futex_wake. Only set errno and return -1
7085 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_wait,
7086 lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
7087 return actual return value from the syscall, not 0.
7089 2003-06-18 Ulrich Drepper <drepper@redhat.com>
7091 * tst-cancel4.c (tf_msgsnd): Don't always use 100 as the type,
7092 find a random value.
7093 (tf_msgrcv): Likewise. Also don't report msgrcv returns if
7096 * sysdeps/unix/sysv/linux/timer_settime.c: Add prototype for
7097 compat_timer_settime.
7098 * sysdeps/unix/sysv/linux/timer_gettime.c: Add prototype for
7099 compat_timer_gettime.
7100 * sysdeps/unix/sysv/linux/timer_getoverr.c: Add prototype for
7101 compat_timer_getoverrun.
7102 * sysdeps/unix/sysv/linux/timer_delete.c: Add prototype for
7103 compat_timer_delete.
7105 * pthread_mutex_destroy.c (__pthread_mutex_destroy): For
7106 error-checking mutex detect busy mutexes.
7108 2003-06-17 Ulrich Drepper <drepper@redhat.com>
7110 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_mutex_lock):
7111 Add ax to clobber list.
7112 (lll_mutex_cond_lock): Likewise.
7113 (lll_mutex_unlock): Likewise.
7114 (lll_lock): Likewise.
7115 (lll_unlock): Likewise.
7117 * Makefile: Add rules to build and run tst-cancel18 and tst-cancelx18.
7118 * tst-cancel18.c: New file.
7119 * tst-cancelx18.c: New file.
7121 * tst-cancel4.c: Test connect, creat, msgrcv, msgsnd, sendmsg, sendto,
7124 * Makefile: Add rules to build and run tst-cancel17 and tst-cancel17x.
7125 * tst-cancel17.c: New file.
7126 * tst-cancelx17.c: New file.
7128 * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
7129 * sysdeps/unix/sysv/linux/sigwait.c: New file.
7130 * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
7132 * tst-cancel4.c: Test open, close, pread, pwrite, fsync, and msync.
7134 2003-06-16 Jakub Jelinek <jakub@redhat.com>
7136 * sysdeps/pthread/createthread.c (create_thread): Set
7137 header.multiple_threads unconditionally.
7138 * allocatestack.c (allocate_stack): Likewise.
7139 * descr.h (struct pthread): Add header.multiple_threads
7141 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (CENABLE, CDISABLE):
7142 Define for librt. #error if neither libpthread, libc nor librt.
7143 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (CENABLE, CDISABLE):
7145 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (CENABLE,
7146 CDISABLE): Likewise.
7147 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (CENABLE,
7148 CDISABLE): Likewise.
7149 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (CENABLE,
7150 CDISABLE): Likewise.
7151 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (CENABLE,
7152 CDISABLE): Likewise. Access header.multiple_threads outside of
7153 libc and libpthread.
7154 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (CENABLE, CDISABLE):
7156 * sysdeps/x86_64/tls.h (tcbhead_t): Add multiple_threads.
7157 * sysdeps/x86_64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define.
7159 2003-06-17 Ulrich Drepper <drepper@redhat.com>
7161 * tst-cancel4.c: Add tests for the socket and signal functions, pause.
7162 Also test early cancellation before the thread reaches the cancellation
7165 * Makefile: Compile forward.c with exceptions.
7167 * sysdeps/unix/sysv/linux/sleep.c: New file.
7169 2003-06-16 Ulrich Drepper <drepper@redhat.com>
7171 * Makefile: Add CFLAGS definition to compile function wrappers
7172 duplicated from libc with exceptions.
7173 * tst-cancel4.c: Also check cancellation handlers.
7175 * Makefile: Add rules to build and run tst-cancel16 and
7176 tst-cancelx16. Add missing CFLAGS definitions.
7177 * tst-cancel16.c: New file.
7178 * tst-cancelx16.c: New file.
7180 2003-06-15 Ulrich Drepper <drepper@redhat.com>
7182 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
7183 (DL_SYSINFO_IMPLEMENTATION): Use CFI opcodes.
7184 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
7185 (DL_SYSINFO_IMPLEMENTATION): Likewise.
7187 * pthreadP.h (LIBC_CANCEL_ASYNC): Also define for librt.
7188 (LIBC_CANCEL_RESET): Likewise.
7189 Declare __librt_enable_asynccancel and __librt_disable_asynccancel.
7190 * sysdeps/pthread/Makefile (librt-sysdep_routines): Add
7192 (CFLAGS-libcrt-cancellation.c): Define.
7193 * sysdeps/pthread/librt-cancellation.c: New file.
7194 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define all the nice
7195 macros also when compiling librt.
7196 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
7197 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
7198 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
7199 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
7200 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
7201 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
7202 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
7204 * sysdeps/unix/sysv/linux/timer_create.c: Add prototype for
7205 compat_timer_create.
7207 2003-06-14 Ulrich Drepper <drepper@redhat.com>
7209 * sysdeps/pthread/posix-timer.h (timespec_compare): Always inline.
7211 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
7213 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
7214 Add libc_hidden_def.
7216 2003-06-13 Roland McGrath <roland@redhat.com>
7218 * sysdeps/x86_64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Pass FS
7219 constant from <sys/reg.h> to ps_get_thread_area, not register contents.
7221 2003-06-11 Ulrich Drepper <drepper@redhat.com>
7223 * allocatestack.c (queue_stack): Always inline.
7224 * ptreadhP.h (__do_cancel): Likewise.
7226 2003-06-10 Jakub Jelinek <jakub@redhat.com>
7228 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait): Fix
7231 2003-06-10 Ulrich Drepper <drepper@redhat.com>
7233 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
7234 (__pthread_cond_signal): Remove incorrect second addition for
7237 2003-06-09 Ulrich Drepper <drepper@redhat.com>
7239 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
7240 (__pthread_cond_signal): Use correct futex pointer in
7241 __lll_mutex_lock_wait call.
7243 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
7244 (__pthread_cond_signal): Some more tweaks to handle cond_lock!=0.
7246 2003-06-08 Ulrich Drepper <drepper@redhat.com>
7248 * sysdeps/unix/sysv/linux/s390/sem_wait.c (__new_sem_wait): Make
7250 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
7253 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Remove
7254 hand-written CFI generation code. Since ENTRY/END also initiated
7255 CFI frames this caused two CFI sets to be generated.
7257 2003-06-07 Ulrich Drepper <drepper@redhat.com>
7259 * cleanup_routine.c: New file.
7260 * Versions (libpthread) [GLIBC_2.3.3]: Add __pthread_cleanup_routine.
7261 * sysdeps/pthread/pthread.h: Add support for fully exception-based
7263 * Makefile (libpthread-routines): Add cleanup_routine.
7264 Add more CFLAGS variables to compile with exceptions. Add comments
7265 why which file needs unwind tables.
7266 (tests) [have-forced-unwind==yes]: Add tst-cancelx* and tst-cleanupx*
7268 * tst-cancelx1.c: New file.
7269 * tst-cancelx2.c: New file.
7270 * tst-cancelx3.c: New file.
7271 * tst-cancelx4.c: New file.
7272 * tst-cancelx5.c: New file.
7273 * tst-cancelx6.c: New file.
7274 * tst-cancelx7.c: New file.
7275 * tst-cancelx8.c: New file.
7276 * tst-cancelx9.c: New file.
7277 * tst-cancelx10.c: New file.
7278 * tst-cancelx11.c: New file.
7279 * tst-cancelx12.c: New file.
7280 * tst-cancelx13.c: New file.
7281 * tst-cancelx14.c: New file.
7282 * tst-cancelx15.c: New file.
7283 * tst-cleanupx0.c: New file.
7284 * tst-cleanupx0.expect: New file.
7285 * tst-cleanupx1.c: New file.
7286 * tst-cleanupx2.c: New file.
7287 * tst-cleanupx3.c: New file.
7289 * tst-cleanup0.c: Make standard compliant.
7290 * tst-cleanup1.c: Likewise.
7292 * sysdeps/unix/sysv/linux/sem_timedwait.c: Add cancellation support.
7293 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
7294 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
7295 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
7296 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
7297 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
7298 * sysdeps/i386/tcb-offsets.sym: Add RESULT, CANCELHANDLING, and
7300 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
7301 * tst-cancel12.c: New file.
7302 * tst-cancel13.c: New file.
7303 * tst-cancel14.c: New file.
7304 * tst-cancel15.c: New file.
7305 * Makefile (tests): Add tst-cancel12, tst-cancel13, tst-cancel14,
7308 * tst-cancel1.c: Add some comments.
7310 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Compute relative
7313 2003-06-06 Ulrich Drepper <drepper@redhat.com>
7315 * Makefile (CFLAGS-pthread_cancel.c): Define.
7317 2003-06-05 Ulrich Drepper <drepper@redhat.com>
7319 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_rwlock_t):
7320 Change type of __writer element to int.
7321 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7322 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7323 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7324 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7325 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
7326 * sysdeps/i386/tcb-offsets.sym: Replace SELF entry with TID entry.
7327 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
7328 * pthread_rwlock_trywrlock.c: Store TID not self pointer in __writer.
7329 Compare with TID to determine deadlocks.
7330 * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
7331 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
7332 * sysdeps/pthread/pthread_rwlock_timedwrlock.: Likewise.
7333 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
7334 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
7335 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
7337 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
7339 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
7340 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
7341 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
7343 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
7345 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
7346 * Makefile (tests): Add tst-rwlock12.
7347 * tst-rwlock12.c: New file.
7349 2003-06-05 Jakub Jelinek <jakub@redhat.com>
7351 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait,
7352 __lll_timedlock_wait, lll_unlock_wake_cb, __lll_timedwait_tid):
7353 Remove bogus hidden_proto.
7354 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
7356 * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_lock,
7357 lll_unlock_wake_cb, ___lll_timedwait_tid): Likewise.
7358 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (___lll_mutex_lock,
7359 ___lll_mutex_timedlock): Likewise.
7361 2003-06-04 Ulrich Drepper <drepper@redhat.com>
7363 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
7364 (__pthread_cond_signal): Add some code to eventually handle
7367 2003-06-01 Ulrich Drepper <drepper@redhat.com>
7369 * Makefile (tests): Add tst-exec4.
7370 (tst-exec4-ARGS): Define.
7371 * tst-exec4.c: New file.
7373 2003-05-31 Ulrich Drepper <drepper@redhat.com>
7375 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
7376 Also fail if tv_nsec < 0.
7377 (__lll_timedwait_tid): Likewise.
7378 * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
7379 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_timedwait_tid):
7381 * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_timedwait_tid):
7383 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (__lll_mutex_timedlock):
7385 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
7387 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_timedwait_tid):
7389 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_timedwait_tid):
7392 * Makefile (tests): Add tst-sem8 and tst-sem9.
7393 * tst-sem8.c: New file.
7394 * tst-sem9.c: New file.
7395 * sem_open.c: Fix creation of in_use record if the file exists but
7398 * posix-timer.h: Remove old, unused timer_id2ptr and timer_ptr2id
7401 * sysdeps/pthread/timer_create.c (timer_create): In case
7402 evp==NULL, assign timer ID to sival_ptr.
7404 * descr.h (struct pthread_unwind_buf): Change type of prev element to
7405 struct pthread_unwind_buf *.
7406 (struct pthread): Likewise for cleanup_jmp_buf element.
7408 * cleanup.c (__pthread_register_cancel): Add cast to avoid warning.
7409 * cleanup_defer.c (__pthread_register_cancel_defer): Likewise.
7410 * unwind.c (__pthread_unwind_next): Likewise.
7412 2003-05-30 Ulrich Drepper <drepper@redhat.com>
7414 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
7415 (lll_futex_timed_wait): Use int for futex value parameter.
7416 (lll_futex_wake): Likewise.
7417 (lll_futex_requeue): Likewise.
7419 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
7420 Replace one memory operation with one register operation.
7422 * tst-join4.c (do_test): Fix error message.
7424 * tst-rwlock6.c (do_test): Use correct format specifier.
7426 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
7427 (__lll_mutex_lock_wait): Replace one memory operation with one
7429 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S
7430 (__lll_mutex_lock_wait): Likewise.
7432 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
7433 (__lll_mutex_cond_lock): Add one to value parameter of
7434 __lll_lock_wait to reflect reality in the futex syscall.
7435 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
7436 (lll_mutex_cond_lock): Likewise.
7438 2003-05-30 Jakub Jelinek <jakub@redhat.com>
7440 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_cond_lock):
7442 (lll_mutex_cond_lock): Define.
7444 2003-05-29 Ulrich Drepper <drepper@redhat.com>
7446 * Makefile (tests): Add tst-signal6.
7447 * tst-signal6.c: New file.
7449 * sysdeps/unix/sysv/linux/s390/lowlevellock.h
7450 (__lll_mutex_unlock_force): New function
7451 (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
7453 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
7454 (__lll_mutex_unlock_force): New function.
7455 (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
7457 * tst-rwlock7.c (do_test): Use correct format specifier.
7459 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue):
7460 Find break parameter in correct asm argument.
7462 2003-05-27 Jakub Jelinek <jakub@redhat.com>
7464 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_clobbers):
7466 (lll_futex_requeue): Fix __o3 constraint, return negative errno if
7468 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
7470 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_REQUEUE,
7471 lll_futex_requeue, lll_mutex_unlock_force): Define.
7473 2003-05-30 Jakub Jelinek <jakub@redhat.com>
7475 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
7476 (pthread_cond_t): Add __mutex.
7477 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_REQUEUE,
7478 lll_futex_requeue, lll_mutex_unlock_force): Define.
7480 2003-05-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
7482 * sysdeps/sh/tcb-offsets.sym: Define MUTEX_FUTEX.
7483 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
7485 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (SYSCALL_WITH_INST_PAD):
7487 (lll_futex_wait, lll_futex_wake): Define.
7488 * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: New file.
7489 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Try using
7490 FUTEX_REQUEUE instead of FUTEX_WAIT.
7491 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
7492 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Remember
7493 mutex which was used in condvar structure. Call
7494 __pthread_mutex_cond_lock instead of __pthread_mutex_lock_internal.
7495 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
7497 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Don't
7498 include tcb-offsets.h. Read wakeup value in locked region.
7499 Use the value of gbr register as THREAD_ID.
7500 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7501 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
7502 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
7504 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Remove futex related
7507 2003-05-28 Ulrich Drepper <drepper@redhat.com>
7509 * sysdeps/pthread/pthread_cond_broadcast.c
7510 (__pthread_cond_broadcast): Fix typo: MAX_INT -> INT_MAX.
7512 2003-05-26 Ulrich Drepper <drepper@redhat.com>
7514 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Fix
7515 typo in register name.
7516 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use parameters
7517 correctly. Actually use requeue. Little optimization.
7518 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Store
7519 mutex address early. Handle cancellation state as 32-bit value.
7520 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7521 Remove unnecessary label.
7523 2003-05-25 Ulrich Drepper <drepper@redhat.com>
7525 * sysdeps/pthread/pthread_cond_broadcast.c: Try using FUTEX_REQUEUE
7526 instead of FUTEX_WAIT.
7527 * sysdeps/pthread/pthread_cond_signal.c: Likewise.
7528 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
7529 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
7530 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
7531 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
7532 * sysdeps/pthread/pthread_cond_timedwait.c: Remember mutex which was
7533 used in condvar structure. Call __pthread_mutex_cond_lock instead
7534 of __pthread_mutex_lock_internal.
7535 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7536 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7537 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
7538 (__condvar_cleanup): Always call __pthread_mutex_cond_lock.
7539 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7540 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7541 * sysdeps/unix/sysv/linux/Makefile (libpthread-sysdep_routines):
7542 Add pthread_mutex_cond_lock.
7543 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add dep_mutex.
7544 * sysdeps/unix/sysv/linux/pthread_cond_mutex_lock.c: New file.
7545 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define
7546 lll_mutex_cond_lock.
7547 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
7548 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
7549 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
7551 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7552 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
7554 * sysdeps/i386/tcb-offsets.sym: Define MUTEX_FUTEX.
7555 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
7557 * pthreadP.h: Declare __pthread_mutex_cond_lock.
7558 * pthread_mutex_lock.c: Define LLL_MUTEX_LOCK if not already defined.
7559 Use it instead of lll_mutex_lock. If __pthread_mutex_lock is a
7560 macro don't define aliases.
7562 * cancellation.c: Remove __pthread_enable_asynccancel_2.
7563 * pthreadP.h: Remove declaration of __pthread_enable_asynccancel_2.
7564 * sysdeps/pthread/pthread_cond_timedwait.c: Use
7565 __pthread_enable_asynccancel instead of __pthread_enable_asynccancel_2.
7566 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7567 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7568 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
7569 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7570 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7572 2003-05-17 Ulrich Drepper <drepper@redhat.com>
7574 * sem_open.c: Fix one endless loop. Implement correct semantics
7575 wrt opening the same semaphore more then once.
7576 * sem_close.c: Adjust for sem_open change.
7577 * semaphoreP.h: Include <semaphore.h>. Define struct inuse_sem.
7578 Declare __sem_mappings, __sem_mappings_lock, __sem_search.
7579 * Makefile (tests): Add tst-sem7.
7580 * tst-sem7.c: New file.
7582 2003-05-16 Roland McGrath <roland@redhat.com>
7584 * sysdeps/unix/sysv/linux/register-atfork.c (libc_freeres_fn): Fix
7585 uninitialized variable braino.
7587 2003-05-16 Ulrich Drepper <drepper@redhat.com>
7589 * sysdeps/unix/sysv/linux/timer_gettime.c (timer_gettime): Correct
7590 test for syscall availability.
7592 * sysdeps/unix/sysv/linux/timer_settime.c (timer_settime): Set
7593 __no_posix_timers to -1 if the syscalls don't exist.
7595 * pthread_join.c (pthread_join): Set tid field of the joined
7596 thread to -1. This isn't necessary but helps to recognize some
7597 error conditions with almost no cost.
7599 * allocatestack.c (FREE_P): Also negative values indicate an
7602 * unwind.c: Include <unistd.h>.
7604 2003-05-14 Ulrich Drepper <drepper@redhat.com>
7606 * Makefile ($(objpfx)$(multidir)): Add rule to create the directory.
7608 2003-05-14 Jakub Jelinek <jakub@redhat.com>
7610 * Makefile (crti-objs, crtn-objs): New variables.
7611 (omit-deps, extra-objs): Add crtn.
7612 ($(objpfx)libpthread.so): Depend on both crti and crtn
7613 and links to them in multidir.
7614 ($(objpfx)crtn.S, $(objpfx)crtn.o): New rules.
7616 2003-05-12 Steven Munroe <sjmunroe@us.ibm.com>
7618 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
7619 (lll_mutex_unlock): Use atomic_exchange_rel.
7621 2003-05-11 Ulrich Drepper <drepper@redhat.com>
7623 * cond-perf.c (cons): Add missing locking around setting of alldone.
7625 2003-05-10 Ulrich Drepper <drepper@redhat.com>
7627 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Remove futex
7629 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
7631 2003-05-09 Ulrich Drepper <drepper@redhat.com>
7633 * tst-sem6.c: New file.
7634 * Makefile (tests): Add tst-sem6.
7636 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (___lll_mutex_unlock):
7637 Use atomic_exchange_rel instead of atomic_exchange.
7638 * sysdeps/unix/sysv/linux/lowlevellock.c (lll_unlock_wake_cb):
7641 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Improve quality of
7642 code for lll_futex_wait and lll_futex_wake in static apps. Use
7643 vsyscall is possible.
7645 * sysdeps/unix/sysv/linux/pthread_getaffinity.c: New file.
7646 * sysdeps/unix/sysv/linux/pthread_setaffinity.c: New file.
7647 * sysdeps/pthread/pthread.h: Declare pthread_getaffinity_np and
7648 pthread_setaffinity_np.
7649 * Versions [libpthread] (GLIBC_2.3.3): Add pthread_getaffinity_np
7650 and pthread_setaffinity_np.
7651 * Makefile (libpthread-routines): Add pthread_getaffinity and
7652 pthread_setaffinity.
7654 * allocatestack.c (allocate_stack): If ARCH_RETRY_MMAP is defined,
7655 use it in case mmap to allocate the stack fails.
7656 * sysdeps/unix/sysv/linux/x86_64/Makefile: Don't define
7657 ARCH_MAP_FLAGS here.
7658 * sysdeps/x86_64/pthreaddef.h: Define ARCH_MAP_FLAGS and
7661 2003-05-08 Ulrich Drepper <drepper@redhat.com>
7663 * sysdeps/unix/sysv/linux/fork.c: Complete rewrite of the atfork
7664 handler implementation. It is now lockless in fork().
7665 * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
7666 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
7667 * sysdeps/unix/sysv/linux/fork.h: Don't include <link.h>. Don't
7668 declare the __fork_*_lists.
7669 (struct fork_handler): Include pointers to all three functions.
7670 Add next, refcntr and need_signal elements.
7671 (__fork_handlers): New declaration.
7672 (__register_atfork_malloc): Remove declaration.
7673 (HAVE_register_atfork_malloc): Remove definition.
7674 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove
7675 __pthread_child_handler variable.
7676 (__libc_pthread_init): Use __register_atfork instead of explicitly
7678 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define lll_futex_wait
7680 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
7682 * unwind.c (unwind_cleanup): Print error message and then abort. This
7683 function must never be reached.
7685 * cond-perf.c: New file.
7687 2003-05-05 Ulrich Drepper <drepper@redhat.com>
7689 * sysdeps/i386/tls.h (TLS_INIT_TP): Include \n in error message.
7691 2003-05-04 Roland McGrath <roland@redhat.com>
7693 * Makefile ($(objpfx)../libc.so): New target.
7695 2003-05-02 Ulrich Drepper <drepper@redhat.com>
7697 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
7698 (pthread_condattr_t): Size is only an int, don't use long for
7700 (pthread_mutexattr_t): Likewise.
7701 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7702 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
7703 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7705 2003-05-01 Ulrich Drepper <drepper@redhat.com>
7707 * sysdeps/i386/tls.h: Define THREAD_ID.
7708 * sysdeps/ia64/tls.h: Likewise.
7709 * sysdeps/powerpc/tls.h: Likewise.
7710 * sysdeps/s390/tls.h: Likewise.
7711 * sysdeps/sh/tls.h: Likewise.
7712 * sysdeps/x86_64/tls.h: Likewise.
7713 * pthread_mutex_lock.c: Use THREAD_ID instead of THREAD_SELF to
7715 * pthread_mutex_timedlock.c: Likewise.
7716 * pthread_mutex_trylock.c: Likewise.
7717 * pthread_mutex_unlock.c: Likewise.
7718 * pthread_rwlock_trywrlock.c: Likewise.
7719 * sysdeps/pthread/pthread_rwlocklock_rdlock.c: Likewise.
7720 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
7721 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
7722 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
7724 * sysdeps/pthread/createthread.c (create_thread): Use CLONE_SYSVSEM
7727 2003-04-29 Jakub Jelinek <jakub@redhat.com>
7729 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
7730 (__SIZEOF_PTHREAD_COND_T): Define to 48.
7731 (pthread_rwlock_t): Add 16 bytes of pad instead of 8 before __flags.
7732 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
7733 Make __align long long instead of long.
7734 (pthread_rwlock_t): Formatting.
7735 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
7736 (pthread_rwlock_t): Formatting.
7737 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
7738 (pthread_cond_t): Make __align long long instead of long.
7739 (pthread_rwlock_t): Move __flags field to the same position as in
7742 2003-04-30 Ulrich Drepper <drepper@redhat.com>
7744 * tst-rwlock6.c (do_test): Use correct printf format specifiers.
7745 * tst-rwlock7.c (do_test): Likewise.
7747 2003-04-26 Roland McGrath <roland@redhat.com>
7749 * Makefile ($(test-modules)): Depend on $(common-objpfx)shlib.lds.
7751 2003-04-22 Jakub Jelinek <jakub@redhat.com>
7753 * allocatestack.c (TLS_TPADJ): Add TLS_PRE_TCB_SIZE instead of
7754 sizeof (struct pthread).
7755 (allocate_stack): Subtract TLS_PRE_TCB_SIZE bytes instead of
7757 * sysdeps/powerpc/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Define
7759 (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Define to alignment of
7761 (TLS_PRE_TCB_SIZE): Increase to cover tcbhead_t preceeded by pad
7763 (INSTALL_DTV, GET_DTV, THREAD_DTV): tcbhead_t is immediately before
7765 (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Don't add TLS_TCB_SIZE
7767 (NO_TLS_OFFSET): Define.
7768 * sysdeps/unix/sysv/linux/powerpc/createthread.c (TLS_VALUE): Don't
7769 add TLS_TCB_SIZE unnecessarily.
7771 2003-04-22 Roland McGrath <roland@redhat.com>
7773 * Makeconfig (shared-thread-library): Reverse link order to work
7776 2003-04-22 Ulrich Drepper <drepper@redhat.com>
7778 * semaphore.h: Fix typo in comment.
7780 2003-04-21 Ulrich Drepper <drepper@redhat.com>
7782 * sysdeps/pthread/sigfillset.c: New file.
7784 * init.c (__pthread_initialize_minimal): Don't block SIGTIMER.
7785 * pthreadP.h: Make SIGTIMER and SIGCANCEL the same.
7786 * sysdeps/pthread/pthread_sigmask.c: Remove handling of SIGTIMER.
7787 * sysdeps/pthread/sigaction.c: Likewise.
7788 * sysdeps/pthread/sigprocmask.c: New file.
7789 * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): Define as
7791 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
7792 Block SIGTIMER. Also handle SI_TKILL events and terminate thread
7795 2003-04-19 Ulrich Drepper <drepper@redhat.com>
7797 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
7798 (DL_SYSINFO_IMPLEMENTATION): Add .eh_frame information.
7800 * sysdeps/unix/sysv/linux/unregister-atfork.c
7801 (__unregister_atfork): Don't free memory not allocated dynamically.
7803 * semaphore.h: Remove __THROW marker from cancellation points.
7804 * nptl/sysdeps/pthread/pthread.h: Likewise.
7806 2003-04-18 Ulrich Drepper <drepper@redhat.com>
7808 * sysdeps/pthread/pthread.h: Don't mark pthread_testcancel,
7809 pthread_cancel, pthread_setcancelstate, and pthread_setcanceltype with
7812 2003-04-16 Jakub Jelinek <jakub@redhat.com>
7814 * tst-cancel4.c (do_test): Use %zd instead of %d when printing cnt.
7816 2003-04-15 Roland McGrath <roland@redhat.com>
7818 * forward.c (__pthread_unwind): Tweak to avoid warning.
7820 2003-04-15 Ulrich Drepper <drepper@redhat.com>
7822 * pthreadP.h: Move THREAD_ATOMIC_* replacements to the top.
7824 2003-04-14 Ulrich Drepper <drepper@redhat.com>
7826 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Don't
7827 overflow CFA advance instructions.
7828 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7830 2003-04-14 Jakub Jelinek <jakub@redhat.com>
7832 * sysdeps/i386/tls.h: Rename LOCK to LOCK_PREFIX.
7833 * sysdeps/i386/pthread_spin_lock.c: Likewise.
7834 * sysdeps/x86_64/tls.h: Likewise. Define LOCK_PREFIX if not already
7837 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Use
7838 DW_CFA_advance_loc2 for .Laddl-.Lsubl.
7839 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
7840 DW_CFA_advance_loc for .Laddl-.Lsubl.
7842 2003-04-13 Ulrich Drepper <drepper@redhat.com>
7844 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Don't use
7845 position-independent unwind data for static libraries.
7846 Add missing unwind info. Add comments.
7848 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Add unwind info.
7849 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7850 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7851 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7853 2003-04-12 Ulrich Drepper <drepper@redhat.com>
7855 * Makefile: Make sure all cancellation points are compiled with
7856 exception and asynchronous unwind tables.
7858 * sysdeps/x86_64/tls.h (THREAD_SETMEM): Word around compiler bug
7859 which mishandles loading of global object addresses in PIC.
7860 (THREAD_SETMEM_NC): Likewise.
7862 2003-04-11 Ulrich Drepper <drepper@redhat.com>
7864 * pthread.h: Define new data structure for cleanup buffer. Declare
7865 new cleanup handler interfaces.
7866 * descr.h: Include <unwind.h> if necessary. Define pthread_unwind_buf.
7867 (struct pthread): Add cleanup_jmp_buf pointer. Define
7868 HAVE_CLEANUP_JMP_BUF and not HAVE_CANCELBUF.
7869 * pthreadP.h: Declare __pthread_unwind. Define __do_cancel to use
7870 it. Declare old cleanup handler installation functions.
7871 * cleanup.c: Rewrite. Install handler for unwind-based cleanup
7873 * cleanup_defer.c: Likewise.
7874 * cleanup_compat.c: New file. Old cleanup code.
7875 * cleanup_def_compat.c: New file. Old cleanup code.
7876 * pthread_create.c (start_thread): Initialize cleanup_jmp_buf element
7877 if own thread descriptor.
7878 * unwind.c: New file.
7879 * forward.c: Add __pthread_unwind.
7880 * init.c (pthread_functions): Add __pthread_unwind.
7881 * sysdeps/pthread/pthread-functions.s (struct pthread_functions):
7882 Add ptr___pthread_unwind.
7883 * Versions [GLIBC_2.3.3] (libpthread): Export new cleanup handling
7884 and unwind function.
7885 * Makefile (libpthread-routines): Add cleanup_compat,
7886 cleanup_def_compat, and unwind. Define CFLAGS to enable unwind
7887 table generation if necessary.
7888 * version.c: Record whether unwind support is compiled in.
7889 * sysdeps/pthread/configure.in: Add checks for unwind unterfaces.
7890 * sysdeps/pthread/bits/libc-lock.h: Add prototypes of the old cleanup
7892 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add quite a bit of
7893 complication to generate unwind information for syscall wrappers.
7894 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
7895 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
7896 __cleanup_fct_attribute.
7898 * Makefile: Add rules to build and run tst-cleanup0.
7899 * tst-cleanup0.c: New file.
7900 * tst-cleanup0.expect: New file.
7902 * pthread_create.c (deallocate_tsd): Don't take parameter. Adjust
7903 caller. Optimize to avoid often unecessary local variable.
7905 2003-04-11 Roland McGrath <roland@redhat.com>
7907 * Makefile ($(objpfx)multidir.mk): New target, generated makefile that
7908 sets variable `multidir'; include that.
7909 (generated): Add it.
7910 ($(objpfx)$(multidir)/crti.o): New target.
7911 [$(multidir) != .] (generated-dirs, extra-objs, omit-deps): Add it.
7913 2003-04-11 Ulrich Drepper <drepper@redhat.com>
7915 * tst-attr2.c (do_test): Add cast to avoid warning.
7916 * tst-mutex4.c (do_test): Likewise.
7918 2003-04-10 Ulrich Drepper <drepper@redhat.com>
7920 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset CPU clocks
7923 2003-04-09 Ulrich Drepper <drepper@redhat.com>
7925 * Makefile (tests): Add tst-detach1.
7926 * tst-detach1.c: New file.
7928 2003-04-08 Ulrich Drepper <drepper@redhat.com>
7930 * sysdeps/pthread/pthread.h: Remove duplicate
7931 pthread_cleanup_{push,pop} definitions.
7933 * tst-barrier2.c: Eliminate warnings.
7934 * tst-cancel4.c: Likewise.
7935 * tst-cond4.c: Likewise.
7936 * tst-cond6.c: Likewise.
7937 * tst-detach1.c: Likewise.
7938 * tst-rwlock4.c: Likewise.
7939 * tst-rwlock6.c: Likewise.
7940 * tst-rwlock7.c: Likewise.
7941 * tst-sem3.c: Likewise.
7942 * tst-spin2.c: Likewise.
7943 * tst-umask1.c: Likewise.
7945 2003-04-07 Ulrich Drepper <drepper@redhat.com>
7947 * pthread_detach.c (pthread_detach): Fix test for invalid TID.
7949 2003-04-06 Ulrich Drepper <drepper@redhat.com>
7951 * descr.h (struct pthread): Move cancelhandling member to the front.
7953 2003-04-05 Ulrich Drepper <drepper@redhat.com>
7955 * sysdeps/unix/sysv/linux/register-atfork.c: Define malloc_prepare,
7956 malloc_parent, and malloc_child statically.
7957 (__register_atfork_malloc): New function.
7958 (free_mem): Don't free any of the malloc_* variables on the list.
7959 * sysdeps/unix/sysv/linux/fork.h: Declare __register_atfork_malloc.
7960 Define HAVE_register_atfork_malloc.
7962 2003-04-04 Ulrich Drepper <drepper@redhat.com>
7964 * sysdeps/pthread/createthread.c (create_thread): Add some more
7965 comments explaining when to set multiple_threads and when not.
7967 * pthreadP.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
7968 THREAD_ATOMIC_BIT_SET if not already defined.
7969 * sysdeps/i386/tls.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
7970 THREAD_ATOMIC_BIT_SET:
7971 * sysdeps/x86_64/tls.h: Likewise.
7972 * cleanup_defer.c (_pthread_cleanup_push_defer): Rewrite to use
7973 THREAD_ATOMIC_CMPXCHG_VAL.
7974 (_pthread_cleanup_pop_restore): Likewise.
7975 * cancellation.c (__pthread_enable_asynccancel): Likewise.
7976 (__pthread_enable_asynccancel_2): Likewise.
7977 (__pthread_disable_asynccancel): Likewise.
7978 * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
7979 (__libc_disable_asynccancel): Likewise.
7980 * init.c (sigcancel_handler): Likewise.
7981 * pthread_setcancelstate.c (__pthread_setcancelstate): Likewise.
7982 * pthread_setcanceltype.c (__pthread_setcanceltype): Likewise.
7984 2003-04-03 Ulrich Drepper <drepper@redhat.com>
7986 * init.c (sigcancel_handler): Don't set EXITING_BIT here.
7987 * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
7988 * pthreadP.h (__do_cancel): Set EXITING_BIT here.
7989 * Makefile (tests): Add tst-cancel11.
7990 * tst-cancel11.c: New file.
7992 2003-04-01 Ulrich Drepper <drepper@redhat.com>
7994 * pthread_create.c (deallocate_tsd): Clear/free memory after the last
7995 round, not the first. Use specific_used flag instead of local
7996 found_nonzero variable. Use THREAD_[SG]ETMEM where possible.
7997 (__free_tcb): Don't call deallocate_tsd here.
7998 (start_thread): Call deallocate_tsd here.
7999 * pthread_setspecific.c: Set specific_used flag really only when
8001 * Makefile (tests): Add tst-tsd3.c and tst-tsd4.
8002 * tst-tsd3.c: New file.
8003 * tst-tsd4.c: New file.
8005 2003-03-31 Ulrich Drepper <drepper@redhat.com>
8007 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_mutex_lock):
8008 Use atomic_exchange_and_add instead of __lll_add.
8009 (__lll_mutex_timedlock): Likewise.
8010 Patch by Ian Wienand.
8012 2003-03-24 Steven Munroe <sjmunroe@us.ibm.com>
8014 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
8015 (SINGLE_THREAD_P): Fix typo.
8016 * tst-cancel-wrappers.sh: Handle '.'ed symbols.
8018 2003-03-31 Ulrich Drepper <drepper@redhat.com>
8020 * Makefile (tests): Add tst-align.
8021 * tst-align.c: New file.
8022 * sysdeps/i386/Makefile: Define CFLAGS-tst-align.
8024 * sysdeps/i386/tls.h (CALL_THREAD_FCT): Align stack of called
8027 * tst-tsd2.c: Add casts to avoid warnings.
8029 2003-03-30 Ulrich Drepper <drepper@redhat.com>
8031 * descr.h (struct pthread): Move most often used elements to the front.
8033 2003-03-29 Ulrich Drepper <drepper@redhat.com>
8035 * Makefile (libpthread-routines): Add pthread_atfork.
8036 (libpthread-static-only-routines): Add pthread_atfork.
8038 2003-03-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
8040 * sysdeps/sh/tls.h: Include nptl/descr.h after the definition
8042 (INSTALL_DTV): Add parens.
8043 (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
8044 Use passed descr instead of THREAD_SELF.
8045 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S
8046 (__lll_mutex_timedlock_wait): Correct expected value after
8048 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S:
8049 Release lock before waking up the waiters.
8050 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Correct exit
8051 criteria. Reorderstruct passed to cleanup handler. Fix
8052 handling of cancellation and failung pthread_mutex_unlock call.
8053 Use __pthread_enable_asynccancel_2 instead of
8054 __pthread_enable_asynccancel.
8055 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
8056 Return result of lock re-get if it fails.
8057 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Fix wrong argument
8058 for __pthread_cleanup_push.
8059 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Fix
8060 completely broken rwlock implementation.
8061 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
8062 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
8063 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
8064 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
8065 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
8066 * sysdeps/unix/sysv/linux/sh/sem_post.S: Fix error value. Use
8067 versioned_symbol macro.
8068 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Use versioned_symbol macro.
8069 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
8071 2003-03-27 Ulrich Drepper <drepper@redhat.com>
8073 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Don't declare
8074 __timer_helper_thread. Declare __start_helper_thread, __helper_once,
8076 (struct timer): Remove th and bar field.
8077 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Remove
8078 debugging code. Create only one helper thread.
8079 * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Don't kill
8081 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
8082 Renamed. Define statically. Use thread info from siginfo.
8083 (__helper_once): New variable.
8084 (__helper_tid): New variable.
8085 (__reset_helper_control): New function.
8086 (__start_helper_thread): New function.
8088 * pthread_create.c (start_thread): Don't use setjmp inside
8089 __builtin_expect to work around gcc bug.
8091 * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Even if
8092 timer_delete syscall fails, but not with ENOSYS, set
8095 * sysdeps/unix/sysv/linux/timer_settime.c [!__ASSUME_POSIX_TIMERS]
8096 (timer_settime): Fix typo.
8097 * sysdeps/unix/sysv/linux/timer_getoverr.c
8098 [!__ASSUME_POSIX_TIMERS] (timer_getoverrun): Likewise.
8100 2003-03-27 Jakub Jelinek <jakub@redhat.com>
8102 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Fix
8103 offset of cleanupbuf.__prev.
8105 2003-03-26 Jakub Jelinek <jakub@redhat.com>
8107 * sysdeps/unix/sysv/linux/timer_getoverr.c: Fix typo in name
8110 2003-03-26 Ulrich Drepper <drepper@redhat.com>
8112 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): If EVP ==
8113 NULL provide default definition to syscall.
8115 2003-03-25 Roland McGrath <roland@redhat.com>
8117 * sysdeps/pthread/posix-timer.h (TIMER_MAX): Define if not defined.
8118 (timer_id2ptr): Fix typo.
8120 2003-03-25 Ulrich Drepper <drepper@redhat.com>
8122 * pthreadP.h: Define SIGCANCEL and SIGTIMER.
8123 * sysdeps/i386/pthreaddef.h: Remove SIGCANCEL definition.
8124 * sysdeps/ia64/pthreaddef.h: Likewise.
8125 * sysdeps/powerpc/pthreaddef.h: Likewise.
8126 * sysdeps/s390/pthreaddef.h: Likewise.
8127 * sysdeps/sh/pthreaddef.h: Likewise.
8128 * sysdeps/x86_64/pthreaddef.h: Likewise.
8129 * init.c (__pthread_initialize_minimal): Block SIGTIMER.
8130 * sysdeps/pthread/sigaction.c: Also prevent SIGTIMER handler from
8132 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
8133 SIGTIMER is not unblocked.
8134 * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): One more
8136 * sysdeps/unix/sysv/linux/pthread_kill.c: Do not allow SIGTIMER to
8138 * sysdeps/pthread/posix-timer.h (timer_id2ptr, timer_ptr2id): Just
8139 pass pointer through as ID.
8140 * sysdeps/unix/sysv/linux/bits/local_lim.h (TIMER_MAX): Removed.
8141 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: New file.
8142 * sysdeps/unix/sysv/linux/timer_create.c: New file.
8143 * sysdeps/unix/sysv/linux/timer_delete.c: New file.
8144 * sysdeps/unix/sysv/linux/timer_getoverr.c: New file.
8145 * sysdeps/unix/sysv/linux/timer_gettime.c: New file.
8146 * sysdeps/unix/sysv/linux/timer_routines.c: New file.
8147 * sysdeps/unix/sysv/linux/timer_settime.c: New file.
8148 * sysdeps/unix/sysv/linux/ia64/Versions: New file.
8149 * sysdeps/unix/sysv/linux/ia64/timer_create.c: New file.
8150 * sysdeps/unix/sysv/linux/ia64/timer_delete.c: New file.
8151 * sysdeps/unix/sysv/linux/ia64/timer_getoverr.c: New file.
8152 * sysdeps/unix/sysv/linux/ia64/timer_gettime.c: New file.
8153 * sysdeps/unix/sysv/linux/ia64/timer_settime.c: New file.
8154 * sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions: New file.
8155 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_create.c: New file.
8156 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_delete.c: New file.
8157 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_getoverr.c: New file.
8158 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_gettime.c: New file.
8159 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_settime.c: New file.
8160 * sysdeps/unix/sysv/linux/s390/s390-64/Versions: New file.
8161 * sysdeps/unix/sysv/linux/s390/s390-64/timer_create.c: New file.
8162 * sysdeps/unix/sysv/linux/s390/s390-64/timer_delete.c: New file.
8163 * sysdeps/unix/sysv/linux/s390/s390-64/timer_getoverr.c: New file.
8164 * sysdeps/unix/sysv/linux/s390/s390-64/timer_gettime.c: New file.
8165 * sysdeps/unix/sysv/linux/s390/s390-64/timer_settime.c: New file.
8166 * sysdeps/unix/sysv/linux/x86_64/Versions: New file.
8167 * sysdeps/unix/sysv/linux/x86_64/compat-timer.h: New file.
8168 * sysdeps/unix/sysv/linux/x86_64/timer_create.c: New file.
8169 * sysdeps/unix/sysv/linux/x86_64/timer_delete.c: New file.
8170 * sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c: New file.
8171 * sysdeps/unix/sysv/linux/x86_64/timer_gettime.c: New file.
8172 * sysdeps/unix/sysv/linux/x86_64/timer_settime.c: New file.
8174 * pthreadP.h: Remove FRAME_LEFT definition.
8175 * cleanup.c (_pthread_cleanup_push): Don't check for reference to
8176 already left frame. Programs which have this problem are not POSIX
8178 * cleanup_defer.c (_pthread_cleanup_push_defer): Likewise.
8180 2003-03-24 Ulrich Drepper <drepper@redhat.com>
8182 * sysdeps/pthread/tst-timer.c: Check return values of the
8185 2003-03-23 Roland McGrath <roland@redhat.com>
8187 * tst-tls3.c (do_test) [! HAVE___THREAD]: Don't test anything.
8188 * tst-tls3mod.c: Likewise.
8189 * tst-tls1.c: Likewise.
8190 * tst-tls2.c: Likewise.
8192 * tst-mutex5.c (do_test): Unlock before destroy, otherwise we invoke
8195 * tst-join5.c (tf1, tf2): Add a cast.
8197 * Makeconfig (includes): Append -I$(..)nptl to this variable.
8199 * tst-barrier2.c (do_test) [! _POSIX_THREAD_PROCESS_SHARED]:
8200 Don't test anything.
8201 * tst-cond4.c: Likewise.
8202 * tst-cond6.c: Likewise.
8203 * tst-flock2.c: Likewise.
8204 * tst-mutex4.c: Likewise.
8205 * tst-rwlock4.c: Likewise.
8206 * tst-signal1.c: Likewise.
8207 * tst-spin2.c: Likewise.
8208 * tst-cond11.c [! _POSIX_CLOCK_SELECTION]: Likewise.
8210 * tst-mutex4.c: Use test-skeleton.c.
8211 * tst-spin2.c: Likewise.
8212 * tst-sysconf.c: Likewise.
8213 * tst-barrier2.c: Likewise.
8214 * tst-cond4.c: Likewise.
8215 * tst-cond6.c: Likewise.
8216 * tst-rwlock4.c: Likewise.
8217 * tst-unload.c: Likewise.
8218 * tst-flock2.c (do_test): Use return instead of exit.
8220 2003-03-22 Jakub Jelinek <jakub@redhat.com>
8222 * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
8224 2003-03-21 Ulrich Drepper <drepper@redhat.com>
8226 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
8227 (__lll_mutex_trylock): Use atomic_compare_and_exchange_val_acq
8228 instead of __lll_compare_and_swap.
8229 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
8231 Removed definition if __lll_compare_and_swap.
8233 * cancellation.c: Adjust for new form of compare&exchange macros.
8234 * cleanup_defer.c: Likewise.
8236 * libc-cancellation.c: Likewise.
8237 * old_pthread_cond_broadcast.c: Likewise.
8238 * old_pthread_cond_signal.c: Likewise.
8239 * old_pthread_cond_timedwait.c: Likewise.
8240 * old_pthread_cond_wait.c: Likewise.
8241 * pthread_cancel.c: Likewise.
8242 * pthread_create.c: Likewise.
8243 * pthread_detach.c: Likewise.
8244 * pthread_join.c: Likewise.
8245 * pthread_key_delete.c: Likewise.
8246 * pthread_setcancelstate.c: Likewise.
8247 * pthread_setcanceltype.c: Likewise.
8248 * pthread_timedjoin.c: Likewise.
8249 * pthread_tryjoin.c: Likewise.
8250 * sysdeps/pthread/createthread.c: Likewise.
8252 2003-03-20 Ulrich Drepper <drepper@redhat.com>
8254 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Include <atomic.h>.
8255 Remove __lll_add, __lll_dec_if_positive, and __lll_test_and_set
8256 definitions. Replace uses with calls to atomic_* functions.
8257 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
8258 * sysdeps/unix/sysv/linux/lowlevellock.c: Replace __lll_add and
8259 __lll_test_and_set calls with atomic_exchange_and_add and
8260 atomic_exchange calls respectively.
8261 * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
8262 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
8263 * sysdeps/unix/sysv/linux/sem_trywait.c: Likewise.
8264 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
8265 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Likewise.
8266 * sysdeps/unix/sysv/linux/ia64/sem_port.c: Likewise.
8267 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
8269 * allocatestack.c (allocate_stack): Assume atomic_exchange_and_add
8270 returns the old value.
8272 2003-03-20 Martin Schwidefsky <sky@mschwid3.boeblingen.de.ibm.com>
8274 * sysdeps/s390/pthread_spin_lock.c (pthread_spin_lock): Use type
8275 int for variable OLDVAL and correct inline assembler contraint.
8276 * sysdeps/s390/pthread_spin_trylock.c (pthread_spin_trylock): Use
8277 type int for variable OLD.
8279 * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it
8281 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
8282 (SINGLE_THREAD_P): Use global variable __local_multiple_threads
8283 instead of multiple_threads field in the TCB.
8285 2003-03-19 Ulrich Drepper <drepper@redhat.com>
8287 * sysdeps/i386/i686/bits/atomic.h: Removed.
8288 * sysdeps/i386/i586/bits/atomic.h: Removed.
8289 * sysdeps/i386/i486/bits/atomic.h: Removed. Moved to glibc.
8290 * sysdeps/x86_64/bits/atomic.h: Removed. Moved to glibc.
8291 * sysdeps/s390/bits/atomic.h: Removed. Moved to glibc.
8292 * sysdeps/sh/bits/atomic.h: Removed. Moved to glibc.
8293 * sysdeps/ia64/bits/atomic.h: Removed. Moved to glibc.
8294 * sysdeps/powerpc/bits/atomic.h: Removed. Moved to glibc.
8295 * atomic.h: Removed. Moved to glibc.
8297 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Add
8298 support for clock selection.
8300 * sysdeps/pthread/pthread_cond_broadcast.c: Release lock before
8303 2003-03-18 Roland McGrath <roland@redhat.com>
8305 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
8306 Add __lll_rel_instr first. Add memory clobber.
8307 (lll_mutex_unlock): Use __lll_test_and_set.
8308 From Paul Mackerras <paulus@samba.org>.
8310 * sysdeps/powerpc/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define
8312 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
8313 (SINGLE_THREAD_P): Add `header.' prefix.
8314 From Paul Mackerras <paulus@samba.org>.
8316 * Versions (libpthread: GLIBC_2.3.2): Move pthread_tryjoin_np and
8317 pthread_timedjoin_np to ...
8318 (libpthread: GLIBC_2.3.3): ... here.
8319 (libpthread: GLIBC_2.2): Move pthread_barrierattr_getpshared there too.
8321 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
8322 Avoid shadowing VAL variable.
8324 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
8327 2003-03-18 Ulrich Drepper <drepper@redhat.com>
8329 * Makefile (tests): Add tst-cond11.
8330 * tst-cond11.c: New file.
8332 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Reorder
8333 struct passed to cleanup handler to eliminate one more
8335 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8337 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
8338 (pthrad_cond_t): Replace __unused field with __clock.
8340 * sysdeps/pthread/pthread_cond_wait.c: Release condvar lock before
8341 waken all waiters in cleanup handler.
8342 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8343 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8345 * pthread_condattr_getclock.c: New file.
8346 * pthread_condattr_setclock.c: New file.
8347 * sysdeps/pthread/pthread.h: Declare these new functions.
8348 * Versions [GLIBC_2.3.3] (libpthread): Add the new functions.
8349 * Makefile (libpthread-routines): Add the new functions.
8350 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_condattr):
8351 Renamed field to value. Document use of the bits.
8352 * pthread_condattr_getpshared.c: Adjust for struct pthread_condattr
8354 * pthread_condattr_setpshared.c: Likewise.
8355 * pthread_cond_init.c (__pthread_cond_init): Initialized __clock field.
8356 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add cond_clock symbol.
8357 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
8359 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8360 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
8361 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
8362 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
8363 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
8364 Implement clock selection.
8365 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
8366 * pthread-errnos.sym: Add ENOSYS.
8367 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
8368 _POSIX_CLOCK_SELECTION.
8369 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
8371 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Remove
8372 invalid .size directive.
8374 2003-03-17 Roland McGrath <roland@redhat.com>
8376 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
8379 2003-03-17 Ulrich Drepper <drepper@redhat.com>
8381 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Use __builtin_expect.
8382 Use __lll_add instead of spelling it out. Use protected symbol names.
8383 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Use __builtin_expect.
8385 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_compare_and_swap):
8386 Renamed from lll_compare_and_swap. Use new name where necessary.
8387 (__lll_add): Defined.
8388 (__lll_dec_if_positive): Defined.
8389 (__lll_test_and_set): Defined.
8390 * sysdeps/ia64/pthread_spin_init.c: Removed.
8391 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Removed.
8392 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Removed.
8393 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Removed.
8394 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Removed.
8395 * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: Removed.
8396 * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: Removed.
8397 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Removed.
8398 * sysdeps/ia64/bits/atomic.h: Add __builtin_expect where appropriate.
8399 * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
8400 __sync_lock_release_si.
8401 Patch by Jakub Jelinek.
8403 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
8404 Fix timeout handling.
8405 (__lll_timedwait_tid): Likewise.
8406 (lll_unlock_wake_cb): Wake up other waiters if necessary.
8407 Patch by Jakub Jelinek.
8409 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Pretty printing.
8411 2003-03-17 Roland McGrath <roland@redhat.com>
8413 PowerPC port contributed by Paul Mackerras <paulus@samba.org>.
8414 * sysdeps/pthread/pthread_spin_init.c: New file.
8415 * sysdeps/pthread/pthread_spin_unlock.c: New file.
8416 * sysdeps/powerpc/Makefile: New file.
8417 * sysdeps/powerpc/pthread_spin_lock.c: New file.
8418 * sysdeps/powerpc/pthread_spin_trylock.c: New file.
8419 * sysdeps/powerpc/pthreaddef.h: New file.
8420 * sysdeps/powerpc/tcb-offsets.sym: New file.
8421 * sysdeps/powerpc/td_ta_map_lwp2thr.c: New file.
8422 * sysdeps/powerpc/tls.h: New file.
8423 * sysdeps/powerpc/bits/atomic.h: New file.
8424 * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: New file.
8425 * sysdeps/unix/sysv/linux/libc-lowlevellock.c: New file.
8426 * sysdeps/unix/sysv/linux/lowlevellock.c: New file.
8428 * sysdeps/unix/sysv/linux/lowlevelmutex.c: New file.
8429 * sysdeps/unix/sysv/linux/sem_post.c: New file.
8430 * sysdeps/unix/sysv/linux/sem_timedwait.c: New file.
8431 * sysdeps/unix/sysv/linux/sem_trywait.c: New file.
8432 * sysdeps/unix/sysv/linux/sem_wait.c: New file.
8433 * sysdeps/unix/sysv/linux/powerpc/Makefile: New file.
8434 * sysdeps/unix/sysv/linux/powerpc/createthread.c: New file.
8435 * sysdeps/unix/sysv/linux/powerpc/fork.c: New file.
8436 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: New file.
8437 * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: New file.
8438 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: New file.
8439 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: New file.
8440 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: New file.
8441 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
8442 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New file.
8444 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Use __gettimeofday,
8446 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Likewise.
8447 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
8448 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Likewise.
8449 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Likewise.
8450 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
8452 2003-03-17 Ulrich Drepper <drepper@redhat.com>
8454 * sysdeps/pthread/pthread_cond_wait.c: Correct exit criteria.
8455 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
8456 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8457 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8458 Patch by Ewald Snel <ewald@rambo.its.tudelft.nl>.
8460 2003-03-16 Roland McGrath <roland@redhat.com>
8462 * tst-fork4.c: Include <string.h>.
8463 * tst-signal2.c: Likewise.
8464 * tst-mutex5.c (do_test): exit -> return.
8465 * tst-mutex2.c: Include <stdlib.h>.
8467 2003-03-16 Ulrich Drepper <drepper@redhat.com>
8469 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
8470 (__lll_mutex_timedlock_wait): Correct expected value after
8471 spurious wakeup. Otherwise we would never wait again.
8473 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Work around red
8474 zone versus inline asm stupidity. Use correct instructions.
8476 * tst-rwlock6.c: Add some more status output.
8478 2003-03-15 Roland McGrath <roland@redhat.com>
8480 * sysdeps/pthread/configure.in: New file.
8481 * sysdeps/pthread/configure: New file (generated).
8483 2003-03-15 Ulrich Drepper <drepper@redhat.com>
8485 * allocatestack.c (allocate_stack): Store the exact stack size of
8486 user allocated stacks.
8488 2003-03-15 Jakub Jelinek <jakub@redhat.com>
8490 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
8491 (SINGLE_THREAD): Use `header' prefix instead of `header.data'.
8492 * sysdeps/sh/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
8493 * sysdeps/sh/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define.
8494 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
8495 Use `header.' prefix.
8496 * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
8498 2003-03-15 Ulrich Drepper <drepper@redhat.com>
8500 * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Don't use
8501 __builtin_frame_address, use stack pointer.
8503 * sysdeps/unix/sysv/linux/jmp-unwind.c: Use CURRENT_STACK_FRAME
8504 instead of __builtin_frame_pointer.
8506 2003-03-14 Ulrich Drepper <drepper@redhat.com>
8508 * tst-basic1.c (do_test): Add cast to avoid warning.
8509 * tst-basic2.c (do_test): Likewise.
8511 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use correct
8512 amount of stack correction.
8514 * tst-fork4.c: Use test-skeleton.c.
8516 2003-03-14 Roland McGrath <roland@redhat.com>
8518 * init.c: Fix typo "#eli" for "#else".
8520 2003-03-14 Steven Munroe <sjmunroe@us.ibm.com>
8522 * allocatestack.c (__stack_user): Use hidden_data_def.
8523 * pthread_create.c (__pthread_keys): Likewise.
8525 * init.c [__powerpc__] (__NR_set_tid_address): Define it.
8527 2003-03-14 Roland McGrath <roland@redhat.com>
8529 * tst-fork4.c: New file.
8530 * Makefile (tests): Add it.
8532 * descr.h (struct pthread): Move the union out of [!TLS_DTV_AT_TP], so
8533 we always define the padding space.
8534 [!TLS_DTV_AT_TP]: Give tcbhead_t field a name, `header', since GCC
8535 stopped supporting its own extensions fully.
8536 [TLS_MULTIPLE_THREADS_IN_TCB]: Put `multiple_threads' inside a wrapper
8537 struct also called `header', so `header.multiple_threads' is the field
8538 name to use on all machines.
8539 * allocatestack.c (allocate_stack): Use `header.' prefix.
8540 * sysdeps/pthread/createthread.c (create_thread): Likewise.
8541 * pthread_create.c (__pthread_create_2_1): Likewise.
8542 * sysdeps/i386/tls.h (INSTALL_NEW_DTV, THREAD_DTV): Likewise.
8543 (THREAD_SELF): Likewise.
8544 * sysdeps/x86_64/tls.h: Likewise.
8545 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
8546 (SINGLE_THREAD_P): Likewise.
8547 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
8548 (SINGLE_THREAD_P): Likewise.
8549 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
8550 (SINGLE_THREAD_P): Likewise.
8552 * sysdeps/s390/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Use REGS[18]
8555 2003-03-14 Ulrich Drepper <drepper@redhat.com>
8557 * pthread_create.c (start_thread): Use CALL_THREAD_FCT if defined.
8558 * sysdeps/i386/tls.h: Define CALL_THREAD_FCT.
8560 * pthread_create.c (start_thread): setjmp is expected to return 0.
8562 * sysdeps/x86_64/tls.h (THREAD_GETMEM): Mark asms volatile.
8563 (THREAD_GETMEM_NC): Likewise.
8565 2003-03-13 Ulrich Drepper <drepper@redhat.com>
8567 * allocatestack.c (allocate_stack): If MULTI_PAGE_ALIASING is defined
8568 and the size of the stack which must be allocated is a multiple,
8569 allocate one more page.
8570 * sysdeps/i386/i686/Makefile: Don't define COLORING_INCREMENT, but
8571 MULTI_PAGE_ALIASING.
8573 2003-03-13 Roland McGrath <roland@redhat.com>
8575 * pthread_create.c (start_thread): Set EXITING_BIT after the
8576 event-reporting (and destructors), not before.
8578 2003-03-13 Jakub Jelinek <jakub@redhat.com>
8580 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_timed_wait,
8581 lll_futex_wake): Declare register variables as long int instead of
8582 unsigned long int. Patch by Ian Wienand <ianw@gelato.unsw.edu.au>.
8583 Make syscall arguments clobbered by the syscall.
8584 (lll_futex_wait): Define using lll_futex_timed_wait.
8586 * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Cast regs[13]
8589 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Only declare and set
8592 * allocatestack.c (nptl_ncreated): Only declare if
8593 COLORING_INCREMENT != 0.
8595 * pthreadP.h (__pthread_enable_asynccancel_2): New prototype.
8596 (__libc_enable_asynccancel_2): Remove prototype.
8598 * sysdeps/unix/sysv/linux/ia64/fork.c (ARCH_FORK): Swap ptid and
8599 ctid to match kernel.
8601 2003-03-12 Ulrich Drepper <drepper@redhat.com>
8603 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add
8604 libc_multiple_threads.
8605 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Move definition of
8606 __libc_multiple_threads to...
8607 * sysdeps/unix/sysv/linux/libc_multiple_threads.c: ...here. New file.
8609 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Remove unnecessary
8611 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
8612 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
8614 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
8615 (__pthread_once_internal): Define.
8617 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Use shlib-compat.h
8618 macros instead of .symver directly.
8619 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
8620 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
8622 * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Include tcb-offsets.h.
8623 * sysdeps/x86_64/tcb-offsets.sym: New file.
8624 * sysdeps/x86_64/Makefile: New file.
8626 * sysdeps/i386/tcb-offsets.sym: Add SELF.
8627 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use SELF
8628 to access own pthread_t in TCB.
8629 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8631 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8633 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8635 2003-03-12 Roland McGrath <roland@redhat.com>
8637 * pthread-errnos.sym: New file.
8638 * Makefile (gen-as-const-headers): New variable, list that file.
8639 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include generated
8640 header <pthread-errnos.h> instead of defining errno values here.
8641 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
8642 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
8643 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
8644 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8645 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8647 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8649 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
8650 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8651 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
8652 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
8653 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
8654 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
8655 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
8656 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
8657 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8658 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
8659 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
8660 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
8661 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
8662 * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
8663 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
8664 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
8665 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
8666 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
8667 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
8668 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
8669 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
8670 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
8671 * sysdeps/i386/i486/pthread_spin_trylock.S: Likewise.
8672 * sysdeps/x86_64/pthread_spin_trylock.S: Likewise.
8673 * sysdeps/sh/pthread_spin_trylock.S: Likewise.
8674 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
8675 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
8677 * sysdeps/unix/sysv/linux/fork.c: Add an assert to check that
8678 CLONE_CHILD_SETTID worked.
8680 2003-03-12 Ulrich Drepper <drepper@redhat.com>
8682 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: New
8684 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S: New
8687 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
8688 (pthread_cond_t): Add padding.
8690 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: New file.
8691 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: New file.
8692 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: New file.
8694 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
8695 (__pthread_rwlock_timedwrlock): Add missing opcode suffix.
8696 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
8697 (__pthread_rwlock_timedrdlock): Likewise.
8698 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
8699 (__pthread_rwlock_wrlock): Likewise.
8700 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
8701 (__pthread_rwlock_rdlock): Likewise.
8703 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: New file.
8705 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Return
8706 result of lock re-get if it fails.
8708 2003-03-11 Ulrich Drepper <drepper@redhat.com>
8710 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Fix asm syntax.
8711 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
8712 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
8713 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
8714 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8715 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
8716 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
8717 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
8718 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
8719 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
8721 * sysdeps/x86_64/tls.h (THREAD_SELF, THREAD_GETMEM, THREAD_GETMEM_NC,
8722 THREAD_SETMEM, THREAD_SETMEM_NC): Correct asm syntax.
8724 * allocatestack.c [! TLS_MULTIPLE_THREADS_IN_TCB] (allocate_stack):
8725 Initialize *__libc_multiple_threads_ptr not __libc_multiple_threads.
8726 * sysdeps/pthread/createthread.c [! TLS_MULTIPLE_THREADS_IN_TCB]
8727 (create_thread): Likewise.
8728 Define __pthread_multiple_threads and __libc_multiple_threads_ptr.
8729 * init.c (__pthread_initialize_minimal_internal): Initialize
8730 __libc_multiple_threads_ptr if necessary.
8731 * pthreadP.h: Adjust prototype for __libc_pthread_init. Declare
8732 __pthread_multiple_threads and __libc_multiple_threads_ptr.
8733 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Define
8734 __libc_multiple_threads.
8735 (__libc_pthread_init): Return pointer to __libc_pthread_init if
8738 * sysdeps/i386/tls.h (THREAD_SETMEM): Fix one-byte variant.
8739 (THREAD_SETMEM_NC): Likewise.
8741 * sysdeps/x86_64/pthread_spin_trylock.c: Removed.
8742 * sysdeps/x86_64/pthread_spin_trylock.S: New file.
8743 * sysdeps/x86_64/pthread_spin_unlock.c: Removed.
8744 * sysdeps/x86_64/pthread_spin_unlock.S: New file.
8746 * sysdeps/i386/i486/pthread_spin_trylock.S (pthread_spin_trylock):
8747 Eliminate one entire instruction.
8749 * cancellation.c (__pthread_enable_asynccancel_2): New function.
8750 * pthreadP.h: Declare __pthread_enable_asynccancel_2.
8751 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
8752 (__pthread_cond_timedwait): Use __pthread_enable_asynccancel_2
8753 instead of __pthread_enable_asynccancel.
8754 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
8755 (__pthread_cond_wait): Likewise.
8756 * sysdeps/pthread/pthread_cond_timedwait.c
8757 (__pthread_cond_timedwait): Likewise.
8758 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
8760 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
8761 (__condvar_cleanup): Wake up all waiters in case we got signaled
8762 after being woken up but before disabling asynchronous
8764 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
8765 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
8766 (__condvar_cleanup): Likewise.
8768 * init.c (__NR_set_tid_address): If already defined, don't redefine.
8769 Make it an error if architecture has no #if case. Add x86-64.
8771 * sysdeps/unix/sysv/linux/x86_64/Makefile: Add flags for
8772 pt-initfini.s generation.
8774 * sysdeps/x86_64/tls.h: Include <asm/prctl.h>.
8775 (TLS_INIT_TP): Fix typo.
8777 2003-03-11 Jakub Jelinek <jakub@redhat.com>
8779 * sysdeps/ia64/bits/atomic.h (atomic_exchange_and_add): Swap 2nd and
8780 3rd argument of __arch_compare_and_exchange_{32,64}_val_acq.
8782 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Include semaphore.h.
8783 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
8784 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Likewise.
8785 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Likewise.
8786 * sysdeps/unix/sysv/linux/s390/sem_post.c: Likewise.
8787 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
8788 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
8789 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
8791 2003-03-11 Ulrich Drepper <drepper@redhat.com>
8793 * sysdeps/pthread/pthread_cond_timedwait.c
8794 (__pthread_cond_timedwait): Return the result of the final
8795 locking. If it succeeds, the regular function return value.
8797 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait):
8798 Return result of the final locking.
8799 * version.c (__nptl_main): Work around problems with the strange
8800 INTERNAL_SYSCALL macro on ppc32.
8801 * init.c (__pthread_initialize_minimal_internal): Unblock
8802 SIGCANCEL in case the parent blocked it.
8803 Reported by Paul Mackerras <paulus@samba.org>.
8805 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: New file.
8806 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: New file.
8807 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: New file.
8809 2003-03-11 Jakub Jelinek <jakub@redhat.com>
8811 * sysdeps/pthread/pthread_cond_timedwait.c
8812 (__pthread_cond_timedwait): Unlock and fail if
8813 __pthread_mutex_unlock_internal failed.
8815 * sysdeps/pthread/createthread.c (ARCH_CLONE): Define if not defined.
8816 (create_thread): Only assert PD->tcb != NULL under [TLS_TCB_AT_TP].
8818 * allocatestack.c (ALLOCATE_STACK_PARMS): New macro.
8819 [NEED_SEPARATE_REGISTER_STACK] (STACK_VARIABLES,
8820 STACK_VARIABLES_ARGS, STACK_VARIABLES_PARMS, ALLOCATE_STACK_PARMS,
8821 ALLOCATE_STACK): New macros.
8822 (TLS_TPADJ): New macro.
8823 (get_cached_stack, queue_stack, __deallocate_stack): Use TLS_TPADJ.
8824 (allocate_stack): Handle TLS_DTV_AT_TP and
8825 NEED_SEPARATE_REGISTER_STACK. Use TLS_TPADJ.
8826 * pthread_create.c (__pthread_create_2_1) [! TLS_TCB_AT_TP]:
8828 * init.c [__ia64__] (__NR_set_tid_address): Define.
8830 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: New file.
8831 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: New file.
8832 * sysdeps/unix/sysv/linux/ia64/fork.c: New file.
8833 * sysdeps/unix/sysv/linux/ia64/createthread.c: New file.
8834 * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: New file.
8835 * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: New file.
8836 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: New file.
8837 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: New file.
8838 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: New file.
8839 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
8840 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: New file.
8841 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: New file.
8842 * sysdeps/unix/sysv/linux/ia64/sem_post.c: New file.
8843 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: New file.
8844 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: New file.
8845 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: New file.
8846 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
8847 * sysdeps/ia64/bits/atomic.h: New file.
8848 * sysdeps/ia64/Makefile: New file.
8849 * sysdeps/ia64/pthread_spin_init.c: New file.
8850 * sysdeps/ia64/pthread_spin_lock.c: New file.
8851 * sysdeps/ia64/pthread_spin_trylock.c: New file.
8852 * sysdeps/ia64/pthread_spin_unlock.c: New file.
8853 * sysdeps/ia64/pthreaddef.h: New file.
8854 * sysdeps/ia64/tcb-offsets.sym: New file.
8855 * sysdeps/ia64/td_ta_map_lwp2thr.c: New file.
8856 * sysdeps/ia64/tls.h: New file.
8858 * sysdeps/s390/pthreaddef.h (__exit_thread_inline): Pass 1 argument
8859 to syscall instead of no arguments.
8861 2003-03-10 Ulrich Drepper <drepper@redhat.com>
8863 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: New file.
8864 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: New file.
8865 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: New file.
8866 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: New file.
8868 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Fix error value in
8871 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: New file
8873 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
8874 lowlevelbarrier.sym.
8875 * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: New file.
8876 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S:
8877 Include lowlevelbarrier.h and don't define offsets locally.
8878 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Likewise.
8880 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
8881 (__lll_mutex_lock_wait): Reverse order of first two parameters.
8882 (__lll_mutex_timedlock_wait): Likewise.
8883 (lll_mutex_lock): Adjust asm for that.
8884 (lll_mutex_timedlock): Likewise. Mark cx, cc, r10 as clobbered.
8885 (lll_lock): Adjust asm for operand order change.
8886 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: New file.
8887 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: New file.
8889 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_lock_wait):
8890 Reverse order of parameters.
8891 (__lll_timedwait_tid): Remove regparms attribute.
8892 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: New file.
8893 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: New file.
8895 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
8896 (__lll_timedwait_tid): Remove one unnecessary instruction.
8898 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Define
8899 __lll_mutex_timedlock_wait only for NOT_IN_libc.
8900 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Include
8903 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
8904 lll_unlock_wake_cb, __lll_wait_tid, and __lll_timedwait_tid only
8906 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Include
8909 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Don't define
8910 LOCK is already defined. Don't define __lll_mutex_timedlock_wait
8912 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Only
8913 define LOCK here (if UP is not defined). The actual code is in
8916 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Don't define
8917 LOCK is already defined. Don't define lll_unlock_wake_cb and
8918 __lll_timedwait_tid for libc.so.
8919 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Only
8920 define LOCK here (if UP is not defined). The actual code is in
8923 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Not needed anymore.
8924 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: Likewise.
8925 * sysdeps/unix/sysv/linux/s390/sem_post.c: Include lowlevellock.h
8926 instead of lowlevelsem.h.
8927 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
8928 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
8929 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
8931 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
8933 * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: New file.
8934 * sysdeps/unix/sysv/linux/i386/lowlevelrwlock.h: Removed.
8935 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: Removed.
8937 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_trylock): Fix
8939 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_trylock): Undo
8942 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: New file.
8944 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove declaration
8945 of __libc_locking_needed.
8946 (lll_trylock): Initialize %eax to zero.
8948 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Update
8949 pthread_cond_t definition.
8951 2003-03-10 Roland McGrath <roland@redhat.com>
8953 * sysdeps/unix/sysv/linux/lowlevelcond.sym: New file.
8954 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add it.
8955 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: File removed.
8956 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: Likewise.
8957 * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: Likewise.
8959 * allocatestack.c (allocate_stack) [!TLS_MULTIPLE_THREADS_IN_TCB]:
8960 Instead of setting PD->multiple_threads, set globals
8961 __pthread_multiple_threads and __libc_multiple_threads.
8962 * sysdeps/pthread/createthread.c (create_thread): Likewise.
8963 * sysdeps/i386/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it.
8964 * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Likewise.
8966 * descr.h (struct pthread): Conditionalize first member on
8967 [!TLS_DTV_AT_TP]. Replace the `header' member with an anonymous union
8968 containing an anonymous tcbhead_t. Move `list' member out.
8969 [TLS_MULTIPLE_THREADS_IN_TCB]: Define a `multiple_threads' member.
8970 * allocatestack.c: Remove use of `header.data.' prefix.
8971 * pthread_create.c: Likewise.
8972 * init.c (__pthread_initialize_minimal_internal): Likewise.
8973 * sysdeps/pthread/createthread.c (create_thread): Likewise.
8974 * sysdeps/i386/tls.h (INSTALL_DTV): Add parens.
8975 (THREAD_SELF, THREAD_DTV, INSTALL_NEW_DTV): No `header.data.' prefix.
8976 * sysdeps/x86_64/tls.h: Likewise.
8977 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
8978 (SINGLE_THREAD_P): Likewise.
8979 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
8980 (SINGLE_THREAD_P): Likewise.
8981 * sysdeps/i386/tls.h (tcbhead_t): Remove `list' member.
8982 * sysdeps/s390/tls.h (tcbhead_t): Likewise.
8984 2003-03-09 Ulrich Drepper <drepper@redhat.com>
8986 * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: New file.
8988 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
8989 * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
8991 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix many
8992 leftovers from the ia32 code.
8994 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Remove unneccessary
8996 (clear_once_control): Don't load %esi.
8998 * sysdeps/x86_64/tls.h: Remove all traces of segment descriptor
9001 * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
9003 * sysdeps/unix/sysv/linux/s390/createthread.c: Moved to...
9004 * sysdeps/unix/sysv/linux/createthread.c: ...here.
9006 * Makefile (tests): Add tst-cond10.
9007 * tst-cond10.c: New file.
9009 2003-03-08 Ulrich Drepper <drepper@redhat.com>
9011 * tst-tls2.c (do_test): Add TEMP_FAILURE_RETRY around sem_wait call.
9012 * tst-signal3.c (do_test): Likewise.
9013 * tst-sem5.c (do_test): Likewise.
9014 * tst-kill6.c (do_test): Likewise.
9015 * tst-tls3.c (do_test): Likewise. Include <errno.h>.
9017 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use add/sub instead
9019 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
9020 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise
9021 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
9022 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
9023 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
9024 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
9025 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
9027 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
9029 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
9030 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
9031 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9032 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
9033 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
9034 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
9035 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
9036 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
9038 * allocatestack.c (allocate_stack): If mprotect() fails free the
9041 2003-03-07 Ulrich Drepper <drepper@redhat.com>
9043 * sysdeps/i386/i486/bits/atomic.h: Fix a few unused definitions.
9045 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove all trace of
9046 lll_wake_tid. This was used only to work around kernel limits in
9048 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
9049 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Likewise.
9050 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
9051 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
9053 * init.c (__static_tls_align_m1): Renamed from __static_tls_align.
9054 (__pthread_initialize_minimal_internal): Change initialization of
9055 __static_tls_align_m1 appropriately.
9056 * pthreadP.h (__static_tls_align_m1): Renamed from
9058 * allocatestack.c (allocate_stack): Use __static_tls_align_m1
9059 instead of __static_tls_align-1.
9061 2003-03-04 Ulrich Drepper <drepper@redhat.com>
9063 * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
9065 * pthread_create.c: Define __pthread_keys using nocommon
9066 attribute, not by placing it explicitly in bss.
9067 Remove DEFINE_DEALLOC definition. Not needed anymore.
9069 * allocatestack.c: Define ARCH_MAP_FLAGS if not already defined.
9070 Use it in mmap call to allocate stacks.
9072 * sysdeps/pthread/createthread.c (create_thread): Fix comment.
9074 * pthread_create.c (start_thread): Use THREAD_SETMEM to store
9075 result of the thread function.
9077 2003-03-03 Ulrich Drepper <drepper@redhat.com>
9079 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: Removed. The generic
9080 version is just fine.
9082 * sysdeps/unix/sysv/linux/libc_pthread_init.c
9083 (__pthread_child_handler): Renamed from pthread_child_handler,
9084 exported, and marked hidden. Change all users.
9085 * sysdeps/unix/sysv/linux/register-atfork.c (free_mem): Do not
9086 free __pthread_child_handler from child list.
9088 2003-03-03 Martin Schwidefsky <schwidefsky@de.ibm.com>
9090 * atomic.h (atomic_exchange_and_add): Return newval, not oldval.
9092 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
9093 Fix handling of cancellation and failing pthread_mutex_unlock call.
9094 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
9095 (__pthread_cond_wait): Likewise.
9097 * sysdeps/pthread/pthread_rwlock_timedrdlock.c
9098 (pthread_rwlock_timedrdlock): Fix clobber of result variable by
9099 lll_futex_timed_wait call.
9100 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
9101 (pthread_rwlock_timedwrlock): Likewise.
9103 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
9104 Don't define lll_unlock_wake_cb and ___lll_timedwait_tid in libc.so.
9105 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Remove XXX comments.
9107 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Fix
9108 check of lll_futex_wake return value.
9110 2003-03-03 Roland McGrath <roland@redhat.com>
9112 * forward.c: Fix typo in __pthread_attr_init_2_0 compat_symbol decl.
9114 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
9115 Argument to ptr___pthread_cleanup_upto is __jmp_buf, not jmp_buf.
9116 * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
9118 2003-03-02 Ulrich Drepper <drepper@redhat.com>
9120 * sysdeps/pthread/timer_create.c (timer_create): Return correct
9121 error for CPU clocks.
9123 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
9124 _POSIX_MONOTONIC_CLOCK.
9125 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
9127 * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
9130 2003-03-01 Ulrich Drepper <drepper@redhat.com>
9132 * descr.h (struct pthread): Move cleanup field to the front.
9134 2003-03-01 Roland McGrath <roland@redhat.com>
9136 * sem_open.c (sem_open): Braino fix.
9138 2003-03-01 Ulrich Drepper <drepper@redhat.com>
9140 * sysdeps/i386/tcb-offsets.sym: Add CLEANUP and CLEANUP_PREV.
9141 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Inline
9142 __pthread_cleanup_pop functionality.
9143 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9145 * descr.h (struct pthread): Move tid field to the front now that
9148 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S
9149 (__lll_mutex_timedlock_wait): Remove.
9150 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
9151 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
9152 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
9153 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
9154 (lll_unlock_wake_cb): Don't save and restore %esi.
9155 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
9157 (__lll_timedwait_tid): Add alignment.
9158 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
9159 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
9161 (__lll_timedwait_tid): Removed.
9162 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
9163 (__pthread_cond_broadcast): Don't save, load, and restore %esi.
9164 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
9165 (pthread_barrier_wait): Don't save, load, and restore %esi for
9167 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
9168 (__pthread_cond_signal): Don't save, load, and restore %esi.
9169 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
9170 (__pthread_rwlock_unlock): Don't save, load, and restore %esi.
9171 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
9172 Don't save, load, and restore %esi.
9174 2003-02-27 Ulrich Drepper <drepper@redhat.com>
9176 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
9177 Release lock before waking up the waiters.
9179 * tst-exit1.c (do_test): Don't start more than one thread in parallel.
9181 * tst-rwlock9.c (writer_thread): Correct adding TIMEOUT.
9182 (reader_thread): Likewise.
9184 * sysdeps/pthread/pthread_rwlock_unlock.c
9185 (__pthread_rwlock_unlock): Release internal lock early. Don't try
9186 to wake up readers if there are none.
9188 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
9189 Release internal lock before wake threads.
9191 2003-02-26 Ulrich Drepper <drepper@redhat.com>
9193 * Makefile (tests): Add tst-rwlock10 and tst-rwlock11.
9194 * tst-rwlock8.c: Initialize lock with INIT. Allow INIT to be
9196 * tst-rwlock9.c: Likewise.
9197 * tst-rwlock10.c: New file.
9198 * tst-rwlock11.c: New file.
9200 * Makefile (tests): Add tst-dlsym1.
9201 * tst-dlsym1.c: New file.
9203 * init.c (__pthread_initialize_minimal_internal): Set
9204 GL(dl_error_catch_tsd) to __libc_dl_error_tsd.
9205 * Versions (libc:GLIBC_PRIVATE): Export __libc_dl_error_tsd.
9207 2003-02-24 Ulrich Drepper <drepper@redhat.com>
9209 * sem_open.c (sem_open): Fix handling of O_CREAT without O_EXCL.
9211 * tst-cond2.c: Fix sychronization with child.
9213 * tst-rwlock8.c (reader_thread): Remove unused variable.
9215 * Makefile: Add rules to build and run tst-tls3.
9216 * tst-tls3.c: New file.
9217 * tst-tls3mod.c: New file.
9219 * Makefile (tests): Add tst-rwlock8 and tst-rwlock9.
9220 * tst-rwlock8.c: New file.
9221 * tst-rwlock9.c: New file.
9222 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Fix
9223 complete broken rwlock implementation.
9224 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
9226 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
9228 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
9229 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
9230 * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
9231 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
9232 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
9233 * sysdeps/pthread/pthread_rwlock_unlock.c: Likewise.
9234 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
9236 2003-02-23 Roland McGrath <roland@redhat.com>
9238 * Makefile (nptl-version): Change regexp so case sensitivity is ok.
9240 2003-02-23 Ulrich Drepper <drepper@redhat.com>
9242 * Makefile (tests): Add tst-context1.
9243 * tst-context1.c: New file.
9245 * Makefile (tests): Add tst-tls1 and tst-tls2.
9246 * tst-tls1.c: New file.
9247 * tst-tls2.c: New file.
9249 * libc-cancellation.c (__libc_enable_asynccancel): Correct test
9252 * pthread_create.c (start_thread): Set EXITING_BIT early.
9254 * sysdeps/i386/tls.h (THREAD_GETMEM): Mark asm as volatile.
9255 (THREAD_GETMEM_NC): Likewise.
9257 2003-02-22 Ulrich Drepper <drepper@redhat.com>
9259 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Shave
9260 off 3 more bytes by using offset-less instructions when possible.
9262 * Makefile: Add dependency for $(objpfx)version.d.
9264 * eintr.c (eintr_source): Add unnecessary return but the compiler
9267 * tst-kill3.c: Include <unistd.h>.
9269 2003-02-21 Roland McGrath <roland@redhat.com>
9271 * pthread_create.c (start_thread): Call __libc_thread_freeres.
9273 2003-02-21 Ulrich Drepper <drepper@redhat.com>
9275 * Makefile (tests): Add tst-eintr1.
9276 (distribute): Add eintr.c.
9277 * tst-eintr1.c: New file.
9278 * eintr.c: New file.
9280 * pthread_cancel.c (pthread_cancel): Use tkill directly.
9282 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill):
9283 Disallow sending SIGCANCEL.
9285 * Makefile (tests): Remove tst-basic7. Add tst-kill1, tst-kill2,
9286 tst-kill3, tst-kill4, tst-kill5, tst-kill6.
9287 * tst-kill1.c: New file.
9288 * tst-kill2.c: New file.
9289 * tst-kill3.c: New file.
9290 * tst-kill5.c: New file.
9291 * tst-kill6.c: New file.
9292 * tst-basic7.c: Renamed to...
9293 * tst-kill4.c: ...this.
9295 2003-02-21 Roland McGrath <roland@redhat.com>
9297 * Makefile (install-lib-ldscripts): New variable.
9299 2003-02-21 Ulrich Drepper <drepper@redhat.com>
9301 * pthreadP.h: Define INVALID_TD_P and INVALID_NOT_TERMINATED_TD_P.
9302 * pthread_cancel.c: Use INVALID_TD_P.
9303 * pthread_detach.c: Likewise.
9304 * pthread_getschedparam.c: Likewise.
9305 * pthread_setschedparam.c: Likewise.
9306 * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
9307 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
9308 * pthread_join.c: Use INVALID_NOT_TERMINATED_TD_P.
9309 * pthread_timedjoin.c: Likewise.
9311 * tst-basic7.c: Include <signal.h>.
9313 * pthread_join.c (pthread_join): Limited checking for invalid
9315 * pthread_timedjoin.c (pthread_timedjoin_np): Likewise.
9317 2003-02-20 Ulrich Drepper <drepper@redhat.com>
9319 * pthread_create.c (deallocate_tsd): Reset found_nonzero at the
9320 beginning of the loop. Clear the entire first block of TSD.
9321 * Makefile (tests): Add tst-key4.
9322 * tst-key4.c: New file.
9324 2003-02-18 Ulrich Drepper <drepper@redhat.com>
9326 * Makefile (tests): Add tst-basic7.
9327 * tst-basic7.c: New file.
9329 * pthread_create.c (deallocate_tsd): Mark as internal_function.
9330 Add some more __builtin_expect.
9332 * pthreadP.h: Define dummy version of DEBUGGING_P.
9334 2003-02-17 Ulrich Drepper <drepper@redhat.com>
9336 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remnove
9337 _POSIX_THREAD_PRIORITY_SCHEDULING.
9338 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
9339 _XOPEN_REALTIME_THREADS.
9340 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
9342 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): The
9343 kernel returns EINVAL for PID <= 0, work around it.
9345 * Makefile (tests): Add tst-signal5.
9346 * tst-signal5.c: New file.
9348 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
9351 * tst-cancel1.c (tf): Block all signals.
9353 * Makefile (tests): Add tst-basic6.
9354 * tst-basic6.c: New file.
9356 * tst-basic1.c: Add test for process ID.
9358 * Makefile (tests): Add tst-cancel10.
9359 * tst-cancel10.c: New file.
9361 * Makefile (tests): Add tst-signal4.
9362 * tst-signal4.c: New file.
9364 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use
9365 __sigismember instead of sigismember. Add __builtin_expect.
9367 2003-02-16 Ulrich Drepper <drepper@redhat.com>
9369 * tst-attr1.c (do_test): Add tests for pthread_setcanceltype,
9370 pthread_setcancelstate, and pthread_rwlock_setpshared.
9372 * tst-cancel7.c (do_test): Make sure the pid file exists before
9373 canceling the thread.
9375 * tst-rwlock6.c: More pthread_rwlock_timedwrlock and
9376 pthread_rwlock_timedrdlock tests.
9377 * tst-rwlock7.c: More pthread_rwlock_timedwrlock tests.
9378 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
9379 Check for invalid tv_nsec field.
9380 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
9383 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Protect
9384 recursive mutex of overflow.
9386 * tst-attr1.c (do_test): Add test for pthread_mutexattr_setpshared.
9388 * libc-cancellation.c (__libc_enable_asynccancel): Rewrite to avoid
9389 going into an endless loop.
9390 * Makefile (tests): Add tst-cancel9.
9391 * tst-cancel9.c: New file.
9393 * pthread_cancel.c (pthread_cancel): Use the result of __pthread_kill.
9395 2003-02-15 Ulrich Drepper <drepper@redhat.com>
9397 * tst-mutex5.c (do_test): Add more timedlock tests.
9399 * tst-mutex2.c: Tests of trylock and unlock with ERROR mutexes.
9400 * tst-mutex3.c (do_test): Add tests for trylock with RECURSIVE mutexes.
9402 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
9403 use INLINE_SYSCALL. Error number is returned, not -1.
9405 * pthreadP.h: Mark declarations of __find_in_stack_list, __free_tcb,
9406 and __deallocate_stack with internal_function.
9407 * pthread_create.c: Adjust definitions appropriately.
9408 * allocatestack.c: Likewise.
9410 * pthread_join.c: Add one more __builtin_expect.
9411 * pthread_timedjoin.c: Likewise.
9413 * pthread_getspecific.c (__pthread_getspecific): Clear data->data
9414 not data of sequence number does not match.
9415 Add one __builtin_expect.
9417 * Makefile (tests): Add tst-clock1.
9418 * tst-clock1.c: New file.
9420 * pthread_setconcurrency.c (pthread_setconcurrency): Fail for
9422 * Makefile (tests): Add tst-basic5.
9423 * tst-basic5.c: New file.
9425 2003-02-14 Ulrich Drepper <drepper@redhat.com>
9427 * Makefile (tests): Add tst-basic4.
9428 * tst-basic4.c: New file.
9430 * pthreadP.h: Add declaraction for __nptl_nthreads.
9431 * pthread_create.c: Define __nptl_nthreads
9432 (start_thread): Increment __nptl_nthreads at beginning. Decrement
9433 after thread is done. If then zero, call exit(0).
9434 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
9435 Add ptr_nthreads. Define HAVE_PTR_NTHREADS.
9436 * init.c (pthread_functions): Initialize ptr_nthreads.
9437 * allocatestack.c (nptl_nthreads): Remove definition and all uses.
9438 (__reclaim_stacks): Decrement __nptl_nthreads.
9439 * sysdeps/pthread/Makefile [$(subdir)==csu] (CFLAGS-libc-start.c):
9441 * Makefile (tests): Add tst-basic3.
9442 * tst-basic3.c: New file.
9444 * descr.h: Define CANCELING_BIT and CANCELING_BITMASK. Introduce
9445 after CANCELTYPE_BIT, move the other bits up. Update CANCEL_RESTMASK.
9446 * init.c (sigcancel_handler): Also set CANCELING_BITMASK bit in newval.
9447 * pthread_cancel.c (pthread_cancel): Likewise. Also set CANCELING_BIT
9448 if asynchronous canceling is enabled.
9449 * pthread_join.c (pthread_join): When recognizing circular joins,
9450 take into account the other thread might be already canceled.
9451 * Makefile (tests): Add tst-join5.
9452 * tst-join5.c: New file.
9454 * Makefile (tests): Add tst-join4.
9455 * tst-join4.c: New file.
9457 2003-02-13 Ulrich Drepper <drepper@redhat.com>
9459 * tst-cond4.c (main): Add test of pthread_attr_getpshared.
9461 2003-02-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
9463 * sysdeps/s390/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM,
9464 THREAD_SETMEM_NC): Use passed descr instead of THREAD_SELF.
9465 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind): Avoid
9467 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Include <sys/time.h>
9469 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Return
9470 error if lll_futex_wake failed.
9472 2003-02-13 Ulrich Drepper <drepper@redhat.com>
9474 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Fix
9475 handling of cancellation and failung pthread_mutex_unlock call.
9476 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9477 * Makefile (tests): Add tst-cond8 and tst-cond9.
9478 * tst-cond8.c: New file.
9479 * tst-cond9.c: New file.
9481 * tst-cond7.c (do_test): Unlock the mutex before canceling the thread.
9483 * sysdeps/pthread/pthread.h: Add missing initializers. Protect
9484 non-standard initializers with __USE_GNU.
9486 * Makefile (tests): Add tst-cleanup3.
9487 * tst-cleanup3.c: New file.
9489 2003-02-12 Ulrich Drepper <drepper@redhat.com>
9491 * Makefile (tests): Add tst-attr1 and tst-attr2.
9492 * tst-attr1.c: New file.
9493 * tst-attr2.c: New file.
9495 * Makefile: Add rules to build and run tst-atfork2 test.
9496 * tst-atfork2.c: New file.
9497 * tst-atfork2mod.c: New file.
9499 * sysdeps/unix/sysv/linux/unregister-atfork.c
9500 (__unregister_atfork): Free the memory allocated for the handlers
9501 after removing them from the lists.
9503 * sysdeps/unix/sysv/linux/register-atfork.c: Define memeory
9506 * tst-atfork1.c (do_test): Wait for the child we forked.
9507 Report error in child.
9509 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Fix comment.
9511 * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
9513 2003-02-10 Ulrich Drepper <drepper@redhat.com>
9515 * Makefile (tests): Add tst-cancel8.
9516 * tst-cancel8.c: New file.
9518 * sysdeps/unix/sysv/linux/i386/pthread_once.S (clear_once_control): Fix
9519 clearing of control variable.
9520 * Makefile (tests): Add tst-once3 and tst-once4.
9521 * tst-once3.c: New file.
9522 * tst-once4.c: New file.
9524 2003-02-08 kaz Kojima <kkojima@rr.iij4u.or.jp>
9526 * sysdeps/sh/Makefile: New file.
9527 * sysdeps/sh/bits/atomic.h: New file.
9528 * sysdeps/sh/pthread_spin_init.c: New file.
9529 * sysdeps/sh/pthread_spin_lock.c: New file.
9530 * sysdeps/sh/pthread_spin_trylock.S: New file.
9531 * sysdeps/sh/pthread_spin_unlock.S: New file.
9532 * sysdeps/sh/pthreaddef.h: New file.
9533 * sysdeps/sh/tcb-offsets.sym: New file.
9534 * sysdeps/sh/td_ta_map_lwp2thr.c: New file.
9535 * sysdeps/sh/tls.h: New file.
9536 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: New file.
9537 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: New file.
9538 * sysdeps/unix/sysv/linux/sh/createthread.c: New file.
9539 * sysdeps/unix/sysv/linux/sh/fork.c: New file.
9540 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: New file.
9541 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: New file.
9542 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h: New file.
9543 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: New file.
9544 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: New file.
9545 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: New file.
9546 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: New file.
9547 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: New file.
9548 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
9549 * sysdeps/unix/sysv/linux/sh/pt-vfork.S: New file.
9550 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: New file.
9551 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: New file.
9552 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: New file.
9553 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: New file.
9554 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: New file.
9555 * sysdeps/unix/sysv/linux/sh/pthread_once.S: New file.
9556 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: New file.
9557 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: New file.
9558 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: New file.
9559 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: New file.
9560 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: New file.
9561 * sysdeps/unix/sysv/linux/sh/sem_post.S: New file.
9562 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: New file.
9563 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: New file.
9564 * sysdeps/unix/sysv/linux/sh/sem_wait.S: New file.
9565 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
9567 2003-02-08 Ulrich Drepper <drepper@redhat.com>
9569 * tst-cond2.c: Rearrange code to not rely on behavior undefined
9572 * tst-basic2.c (do_test): Lock mutex before creating the thread.
9574 2003-02-07 Ulrich Drepper <drepper@redhat.com>
9576 * sysdeps/x86_64/tls.h: Remove unnecessary macros, left over from x86.
9577 (TLS_GET_FS): New #define.
9578 (TLS_SET_FS): New #define.
9579 Correct value of __NR_set_thread_area.
9581 * sysdeps/x86_64/td_ta_map_lwp2thr.c: New file.
9583 2003-02-06 Ulrich Drepper <drepper@redhat.com>
9585 * Makefile (tests): Add tst-popen1.
9586 * tst-popen1.c: New file.
9588 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Remove wrong
9589 but inactive generalization.
9590 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9591 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
9592 Minor optimization, remove one instruction.
9593 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
9595 2003-02-04 Martin Schwidefsky <schwidefsky@de.ibm.com>
9597 * sysdeps/unix/sysv/linux/s390/fork.c: Correct order of parameters.
9599 2003-01-31 Martin Schwidefsky <schwidefsky@de.ibm.com>
9601 * init.c (__NR_set_tid_address): Add #ifdef for s390.
9602 * sysdeps/pthread/pthread_barrier_wait.c: New file.
9603 * sysdeps/pthread/pthread_cond_broadcast.c: New file.
9604 * sysdeps/pthread/pthread_cond_signal.c: New file.
9605 * sysdeps/pthread/pthread_cond_timedwait.c: New file.
9606 * sysdeps/pthread/pthread_cond_wait.c: New file.
9607 * sysdeps/pthread/pthread_rwlock_rdlock.c: New file.
9608 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: New file.
9609 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: New file.
9610 * sysdeps/pthread/pthread_rwlock_unlock.c: New file.
9611 * sysdeps/pthread/pthread_rwlock_wrlock.c: New file.
9612 * sysdeps/s390/Makefile: New file.
9613 * sysdeps/s390/bits/atomic.h: New file.
9614 * sysdeps/s390/pthread_spin_init.c: New file.
9615 * sysdeps/s390/pthread_spin_lock.c: New file.
9616 * sysdeps/s390/pthread_spin_trylock.c: New file.
9617 * sysdeps/s390/pthread_spin_unlock.c: New file.
9618 * sysdeps/s390/pthreaddef.h: New file.
9619 * sysdeps/s390/tcb-offsets.sym: New file.
9620 * sysdeps/s390/td_ta_map_lwp2thr.c: New file.
9621 * sysdeps/s390/tls.h: New file.
9622 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: New file.
9623 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: New file.
9624 * sysdeps/unix/sysv/linux/s390/createthread.c: New file.
9625 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: New file.
9626 * sysdeps/unix/sysv/linux/s390/fork.c: New file.
9627 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: New file.
9628 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
9629 * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: New file.
9630 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: New file.
9631 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: New file.
9632 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: New file.
9633 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: New file.
9634 * sysdeps/unix/sysv/linux/s390/pthread_once.c: New file.
9635 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: New file.
9636 * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: New file.
9637 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
9638 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
9639 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: New file.
9640 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
9641 * sysdeps/unix/sysv/linux/s390/sem_post.c: New file.
9642 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: New file.
9643 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
9644 * sysdeps/unix/sysv/linux/s390/sem_wait.c: New file.
9646 2003-02-04 Ulrich Drepper <drepper@redhat.com>
9648 * atomic.h: Add a couple more default implementations.
9649 (atomic_compare_and_exchange_acq): Use
9650 __arch_compare_and_exchange_32_acq in return value definition. It
9652 (atomic_bit_set): Renamed from atomic_set_bit.
9653 Add missing atomic_ prefixes.
9655 * sysdeps/pthread/bits/libc-lock.h (__libc_once): In case no
9656 thread library is available, use correct value to mark initialized
9659 2003-02-03 Ulrich Drepper <drepper@redhat.com>
9661 * allocatestack.c (allocate_stack): Use __getpagesize instead of
9662 __sysconf to determine pagesize.
9664 * pthread_create.c: Include <atomic.h>.
9665 * allocatestack.c (allocate_stack): Implement coloring of the
9666 allocated stack memory. Rename pagesize to pagesize_m1. It's the
9667 size minus one. Adjust users.
9668 * sysdeps/i386/i686/Makefile: New file.
9670 2003-02-02 Ulrich Drepper <drepper@redhat.com>
9672 * allocatestack.c: Improve comment throughout the file.
9674 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
9675 (__lll_lock_wait): Add branch prediction.
9676 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
9677 (__lll_lock_wait): Likewise.
9678 (lll_unlock_wake_cb): Removed.
9680 2003-01-31 Ulrich Drepper <drepper@redhat.com>
9682 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Remove
9683 _POSIX_THREAD_PRIORITY_SCHEDULING.
9685 2003-01-30 Jakub Jelinek <jakub@redhat.com>
9687 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
9688 Fix return type of ptr___pthread_getspecific.
9690 2003-01-29 Ulrich Drepper <drepper@redhat.com>
9692 * Makefile (tests): Add tst-umask1.
9693 (tst-umask1-ARGS): Define.
9694 * tst-umask1.c: New file.
9696 2003-01-28 Ulrich Drepper <drepper@redhat.com>
9698 * Makefile (libpthread-routines): Remove lowlevelrwlock. Add
9699 pthread_rwlock_rdlock, pthread_rwlock_timedrdlock,
9700 pthread_rwlock_wrlock, pthread_rwlock_timedwrlock, and
9701 pthread_rwlock_unlock.
9702 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Removed
9703 * sysdeps/unix/sysv/linux/i386/i586/lowlevelrwlock.S: Removed
9704 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Removed
9705 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: New file.
9706 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
9708 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: New file.
9709 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
9711 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: New file.
9712 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_rdlock.S: New file.
9713 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedrdlock.S:
9715 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_wrlock.S: New file.
9716 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedwrlock.S:
9718 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_unlock.S: New file.
9719 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_rdlock.S: New file.
9720 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedrdlock.S:
9722 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_wrlock.S: New file.
9723 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedwrlock.S:
9725 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_unlock.S: New file.
9727 * Makefile (libpthread-routines): Remove lowlevelcond and
9728 lowlevelsem. Add sem_wait, sem_trywait, sem_timedwait, sem_post,
9729 pthread_cond_wait, pthread_cond_timedwait, pthread_cond_signal,
9730 and pthread_cond_broadcast.
9731 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Removed
9732 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Removed
9733 * sysdeps/unix/sysv/linux/i386/i586/lowlevelsem.S: Removed
9734 * sysdeps/unix/sysv/linux/i386/i586/lowlevelcond.S: Removed
9735 * sysdeps/unix/sysv/linux/i386/i686/lowlevelsem.S: Removed
9736 * sysdeps/unix/sysv/linux/i386/i686/lowlevelcond.S: Removed
9737 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: New file.
9738 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: New file.
9739 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: New file.
9740 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: New file.
9741 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: New file.
9742 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: New file.
9743 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: New file.
9744 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: New file.
9745 * sysdeps/unix/sysv/linux/i386/i586/sem_wait.S: New file.
9746 * sysdeps/unix/sysv/linux/i386/i586/sem_trywait.S: New file.
9747 * sysdeps/unix/sysv/linux/i386/i586/sem_timedwait.S: New file.
9748 * sysdeps/unix/sysv/linux/i386/i586/sem_post.S: New file.
9749 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_wait.S: New file.
9750 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_timedwait.S: New file.
9751 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_signal.S: New file.
9752 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_broadcast.S: New file.
9753 * sysdeps/unix/sysv/linux/i386/i686/sem_wait.S: New file.
9754 * sysdeps/unix/sysv/linux/i386/i686/sem_trywait.S: New file.
9755 * sysdeps/unix/sysv/linux/i386/i686/sem_timedwait.S: New file.
9756 * sysdeps/unix/sysv/linux/i386/i686/sem_post.S: New file.
9757 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_wait.S: New file.
9758 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S: New file.
9759 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_signal.S: New file.
9760 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_broadcast.S: New file.
9761 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: New file.
9763 * sysdeps/unix/sysv/linux/i386/createthread.c: Define
9764 PREPARE_CREATE and TLS_VALUE with x86-specific bits. All the rest
9765 of the code is moved to ...
9766 * sysdeps/pthread/createthread.c: ...here. New file.
9768 2003-01-27 Ulrich Drepper <drepper@redhat.com>
9770 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S
9771 (__new_sem_post): Clear %eax before returning.
9772 Reported by MAEDA Naoaki <maeda.naoaki@jp.fujitsu.com>.
9774 * Makefile (tests): Add tst-cleanup2.
9775 * tst-cleanup2.c: New file.
9777 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
9778 Interpret first parameter correctly.
9780 2003-01-17 Ulrich Drepper <drepper@redhat.com>
9782 * Makefile (headers): Add bits/semaphore.h.
9784 2003-01-16 Jakub Jelinek <jakub@redhat.com>
9786 * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize _head->sysinfo even
9789 2003-01-14 Ulrich Drepper <drepper@redhat.com>
9791 * sem_open.c (sem_open): Return SEM_FAILED if existing semaphore
9792 must be used and mapping failed.
9793 Reported by Luke Elliott <luke.elliott@activfinancial.com>.
9795 * Makefile (CFLAGS-pthread_self.os): Define this, not
9796 CFLAGS-pthread_self.c.
9798 2003-01-13 Ulrich Drepper <drepper@redhat.com>
9800 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Don't export
9803 * Makefile (libpthread-routines): Add version. Add rules to build
9804 version.os and banner.h.
9805 * version.c: New file.
9807 2003-01-13 Jakub Jelinek <jakub@redhat.com>
9809 * pthread_mutex_lock.c (__pthread_mutex_lock_internal): Make
9810 the alias unconditional.
9811 * pthread_mutex_unlock.c (__pthread_mutex_unlock_internal): Likewise.
9813 2003-01-13 Ulrich Drepper <drepper@redhat.com>
9815 * Makefile (CFLAGS-pthread_self.c): New definition.
9817 2003-01-06 Jakub Jelinek <jakub@redhat.com>
9819 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Add
9820 INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
9821 * sysdeps/unix/sysv/linux/raise.c (raise): Likewise.
9822 * init.c (__pthread_initialize_minimal_internal): Likewise.
9824 2003-01-07 Jakub Jelinek <jakub@redhat.com>
9826 * pthreadP.h (__pthread_cond_timedwait): Add prototype.
9828 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
9829 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
9830 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
9831 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
9832 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
9833 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
9835 2003-01-06 Jakub Jelinek <jakub@redhat.com>
9837 * pthreadP.h (LIBC_CANCEL_HANDLED): Define.
9838 * pt-system.c (LIBC_CANCEL_HANDLED): Add.
9839 * tst-cancel-wrappers.sh: Remove all exceptions.
9841 2003-01-05 Ulrich Drepper <drepper@redhat.com>
9843 * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
9844 features. Reported by Marijn Ros <marijn@mad.scientist.com>.
9846 * sysdeps/unix/sysv/linux/jmp-unwind.c: Include <pthread-functions.h>.
9847 Use __libc_pthread_functions array if SHARED.
9849 * pthreadP.h: Move pthread_cond_2_0_t definition to...
9850 * sysdeps/unix/sysv/linux/internaltypes.h: ...here.
9852 * sysdeps/pthread/bits/libc-lock.h (__libc_ptf_call): New #define.
9853 (__libc_rwlock_rdlock, __libc_rwlock_wrlock, __libc_rwlock_unlock,
9854 __libc_key_create, __libc_getspecific, __libc_setspecific): Use
9855 __libc_ptf_call instead of __libc_maybe_call.
9857 (__libc_cleanup_region_start): Wrap function name with PTF call.
9858 (__libc_cleanup_region_end): Likewise.
9859 (__libc_cleanup_end): Likewise.
9861 * pthread_getspecific.c: Add __pthread_getspecific_internal alias.
9862 * pthread_setspecific.c: Add __pthread_setspecific_internal alias.
9863 * pthread_key_create.c: Add __pthread_key_create_internal alias.
9864 * pthreadP.h: Add prototypes.
9866 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Add
9867 __pthread_rwlock_rdlock, __pthread_rwlock_wrlock, and
9868 __pthread_rwlock_unlock aliases.
9869 * pthreadP.h: Add prototypes for new aliases.
9871 * pthreadP.h (struct pthead_functions): Moved to...
9872 * sysdeps/pthread/pthread-functions.h: ...here. New file.
9873 * init.c (pthread_functions): Add initializers for new elements.
9875 * cleanup_defer.c: Add __pthread_cleanup_push_defer and
9876 __pthread_cleanup_pop_restore aliases.
9877 * pthreadP.h: Add prototypes.
9879 * cleanup.c: Rename _GI_pthread_cleanup_push to __pthread_cleanup_push
9880 and _GI_pthread_cleanup_pop to __pthread_cleanup_pop.
9881 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Adjust caller.
9882 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
9883 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
9884 * pthreadP.h: Adjust prototypes and callers.
9886 2003-01-04 Ulrich Drepper <drepper@redhat.com>
9888 * Makefile (tests): Add tst-cancel7.
9889 (tst-cancel7-ARGS): New variable.
9890 * tst-cancel7.c: New file.
9892 * old_pthread_cond_broadcast.c: Optimize initialization a bit to work
9893 around gcc defficiencies.
9894 * old_pthread_cond_signal.c: Likewise.
9895 * old_pthread_cond_timedwait.c: Likewise.
9896 * old_pthread_cond_wait.c: Likewise.
9898 * pthreadP.h (pthread_cond_2_0_t): Remove unneeded lock element.
9900 2003-01-03 Ulrich Drepper <drepper@redhat.com>
9902 * Makefile (tests): Add tst-cond7.
9903 * tst-cond7.c: New file.
9905 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
9906 (condvar_cleanup): Get condvar address from the right place.
9908 * atomic.h: Correct definitions of atomic_full_barrier,
9909 atomic_read_barrier, atomic_write_barrier.
9911 * old_pthread_cond_broadcast.c: Make memory allocate and initialization
9913 * old_pthread_cond_signal.c: Likewise.
9914 * old_pthread_cond_timedwait.c: Likewise.
9915 * old_pthread_cond_wait.c: Likewise.
9917 2003-01-03 Jakub Jelinek <jakub@redhat.com>
9919 * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
9921 2003-01-03 Ulrich Drepper <drepper@redhat.com>
9923 * pthreadP.h (pthread_cond_2_0_t): New type.
9924 (struct pthread_functions): Use new type for 2.0 condvar callbacks.
9925 Use new type for the 2.0 condvar function prototypes.
9926 * forward.c: Use pthread_cond_2_0_t for 2.0 condvar functions.
9927 * old_pthread_cond_init.c: Use pthread_cond_2_0_t for condvar
9929 * old_pthread_cond_destroy.c: Likewise.
9930 * old_pthread_cond_broadcast.c: Likewise. Lock appropriately.
9931 * old_pthread_cond_signal.c: Likewise.
9932 * old_pthread_cond_timedwait.c: Likewise.
9933 * old_pthread_cond_wait.c: Likewise.
9935 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
9936 (__pthread_cond_wait): Don't save cancellation mode and seq value
9939 * herrno.c (__h_errno_location): Don't define as weak.
9941 2003-01-02 Jakub Jelinek <jakub@redhat.com>
9943 * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
9944 pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
9945 and pthread_cond_wait.
9946 * old_pthread_cond_broadcast.c (__old_pthread_cond_broadcast):
9948 (__pthread_cond_broadcast_2_0): ... this.
9949 * old_pthread_cond_destroy.c (__old_pthread_cond_destroy):
9951 (__pthread_cond_destroy_2_0): ... this.
9952 * old_pthread_cond_init.c (__old_pthread_cond_init):
9954 (__pthread_cond_init_2_0): ... this.
9955 * old_pthread_cond_signal.c (__old_pthread_cond_signal):
9957 (__pthread_cond_signal_2_0): ... this.
9958 * old_pthread_cond_wait.c (__old_pthread_cond_wait):
9960 (__pthread_cond_wait_2_0): ... this.
9961 * pthread_cond_destroy.c: Include shlib-compat.h.
9962 (pthread_cond_destroy): Change strong_alias into versioned_symbol.
9963 * pthread_cond_init.c: Include shlib-compat.h.
9964 (pthread_cond_init): Change strong_alias into versioned_symbol.
9965 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_cond_*
9966 fields to ptr___pthread_cond_* and add ptr___pthread_cond_*_2_0
9968 (__pthread_cond_broadcast_2_0, __pthread_cond_destroy_2_0,
9969 __pthread_cond_init_2_0, __pthread_cond_signal_2_0,
9970 __pthread_cond_wait_2_0): New prototypes.
9971 (__old_pthread_cond_broadcast, __old_pthread_cond_destroy,
9972 __old_pthread_cond_init, __old_pthread_cond_signal,
9973 __old_pthread_cond_wait): Removed.
9974 * init.c: Include shlib-compat.h.
9975 (pthread_functions): Guard ptr___pthread_attr_init_2_0
9976 initialization with SHLIB_COMPAT (GLIBC_2_0, GLIBC_2_1).
9977 Rename ptr_pthread_cond_* to ptr___pthread_cond_*, initialize
9978 ptr___pthread_cond_*_2_0 fields.
9979 * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
9980 pthread_cond_*@GLIBC_2.0 compatibility symbols.
9982 * sysdeps/pthread/sigaction.c (SIGCANCEL): Only define if
9983 LIBC_SIGACTION was not yet defined.
9984 [!defined LIBC_SIGACTION]: Define LIBC_SIGACTION, #include self.
9985 [!defined LIBC_SIGACTION] (__sigaction): New function and
9987 [!defined LIBC_SIGACTION] (sigaction): New weak_alias.
9988 [defined LIBC_SIGACTION]: #include_next <sigaction.c>.
9990 2003-01-02 Jakub Jelinek <jakub@redhat.com>
9992 * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
9994 2003-01-02 Ulrich Drepper <drepper@redhat.com>
9996 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
9997 New, larger type definition.
9998 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: New condvar
10000 * Versions [libpthread]: Add definitions for new pthread_cond_*
10001 interfaces for version GLIBC_2.3.2.
10002 * pthread_cond_init.c: Update initialization for new type definition.
10003 * Makefile (libpthread-routines): Remove pthread_cond_wait,
10004 pthread_cond_timedwait, pthread_cond_signal, and
10005 pthread_cond_broadcast. Add old_pthread_cond_init,
10006 old_pthread_cond_destroy, old_pthread_cond_wait,
10007 old_pthread_cond_timedwait, old_pthread_cond_signal, and
10008 old_pthread_cond_broadcast.
10009 * old_pthread_cond_broadcast.c: New file.
10010 * old_pthread_cond_destroy.c: New file.
10011 * old_pthread_cond_init.c: New file.
10012 * old_pthread_cond_signal.c: New file.
10013 * old_pthread_cond_timedwait.c: New file.
10014 * old_pthread_cond_wait.c: New file.
10015 * pthreadP.h: Add prototypes for the compatibility interfaces.
10017 * pthread_cond_destroy.c: Don't include <errno.h>.
10019 2003-01-01 Ulrich Drepper <drepper@redhat.com>
10021 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Avoid
10022 unnecessary zero offset when addressing MUTEX.
10024 2002-12-31 Ulrich Drepper <drepper@redhat.com>
10026 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
10028 * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
10029 for __register_atfork.
10031 2002-12-31 Jakub Jelinek <jakub@redhat.com>
10033 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use __ASSEMBLER__
10034 instead of ASSEMBLER test macro.
10036 * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
10037 __libc_current_sigrtmax): Add libc_hidden_def.
10039 * sysdeps/pthread/list.h: Remove assert.h include.
10041 2002-12-31 Ulrich Drepper <drepper@redhat.com>
10043 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Use
10044 __pthread_initialize_minimal_internal not
10045 __pthread_initialize_minimal.
10047 2002-12-30 Ulrich Drepper <drepper@redhat.com>
10049 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Mark
10050 __pthread_initialize_minimal as hidden.
10052 * init.c (__pthread_initialize_minimal_internal): Don't mark as
10055 2002-12-31 Jakub Jelinek <jakub@redhat.com>
10057 * Makefile ($(inst_libdir)/libpthread.so): Depend on
10058 $(common-objpfx)format.lds, include that into the output script.
10060 (extra-B-pthread.so): Change linuxthreads/ into nptl/.
10062 2002-12-28 Andreas Jaeger <aj@suse.de>
10064 * sysdeps/unix/sysv/linux/xstatconv.c (xstat_conv): Adjust for
10065 nsec resolution changes.
10066 (xstat64_conv): Likewise.
10067 (xstat32_conv): Likewise.
10068 * sysdeps/unix/sysv/linux/kernel_stat.h: Add nsec resolution for
10069 struct kernel_stat.
10070 * sysdeps/unix/sysv/linux/bits/stat.h: Add nsec resolution for
10071 structs stat and stat64.
10072 * time/time.h (__timespec_defined): Define for __USE_MISC.
10073 * io/sys/stat.h [__USE_MISC]: Define __need_timespec for struct stat.
10075 2002-12-30 Jakub Jelinek <jakub@redhat.com>
10077 * forward.c (FORWARD2): Renamed from FORWARD3. Remove unused export
10079 (pthread_attr_init_2_0, pthread_attr_init_2_1): Use FORWARD macro.
10080 (pthread_exit): Use strong_alias to avoid warnings.
10081 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_exit
10082 and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
10083 ptr___pthread_attr_init_2_*.
10084 * init.c (pthread_functions): Adjust.
10086 2002-12-29 Ulrich Drepper <drepper@redhat.com>
10088 * forward.c: Make all functions available by default again. It
10089 caused too much trouble.
10091 * pt-siglongjmp.c: Removed.
10093 2002-12-28 Jakub Jelinek <jakub@redhat.com>
10095 * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
10096 (SYSINFO_OFFSET, MULTIPLE_THREADS_OFFSET): Remove.
10097 * sysdeps/i386/Makefile: New file.
10098 * sysdeps/i386/tcb-offsets.sym: New file.
10099 * sysdeps/pthread/tcb-offsets.h: New file.
10100 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
10101 Remove MULTIPLE_THREADS_OFFSET and SYSINFO_OFFSET checks.
10103 * sysdeps/unix/sysv/linux/Versions [libc] (GLIBC_PRIVATE): Move
10104 __register_atfork...
10105 (GLIBC_2.3.2): ...here.
10107 2002-12-28 Ulrich Drepper <drepper@redhat.com>
10109 * sysdeps/pthread/pthread.h: Mark pthread_attr_getstackaddr and
10110 pthread_attr_setstackaddr with __attribute_deprecated__.
10112 2002-12-27 Jakub Jelinek <jakub@redhat.com>
10114 * pt-system.c (system): Remove cancellation handling.
10115 * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
10116 cancellation routines.
10118 2002-12-28 Ulrich Drepper <drepper@redhat.com>
10120 * descr.h: Include <dl-sysdep.h>.
10121 (struct pthread): Move header.data.list to the back of the struct.
10122 * sysdeps/i386/tls.h (tcbhead_t): Move list to the back of the struct.
10123 (MULTIPLE_THREADS_OFFSET): Adjust offset.
10124 (SYSINFO_OFFSEET): Likewise.
10126 2002-12-27 Jakub Jelinek <jakub@redhat.com>
10128 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h (USE_DL_SYSINFO):
10130 (DL_SYSINFO_DEFAULT): Cast to uintptr_t to avoid warnings.
10131 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h (NEED_DL_SYSINFO,
10132 DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION): Define.
10133 (USE_DL_SYSINFO): Undef.
10135 2002-12-22 Jakub Jelinek <jakub@redhat.com>
10137 * Makefile (tests-reverse): Use $(objpfx)../libc.so instead of
10138 $(common-objpfx)libc.so.
10139 * tst-cancel4.c (tf_write, tf_writev): Increase buf sizes so that
10140 it is bigger than pipe buffer size even on arches with bigger
10142 (tf_usleep): Cast usleep argument to useconds_t to avoid warnings.
10144 2002-12-25 Ulrich Drepper <drepper@redhat.com>
10146 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Implement
10147 correct errno access for case that USE___THREAD is not defined.
10149 2002-12-24 Ulrich Drepper <drepper@redhat.com>
10151 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Add missing #endif.
10152 Patch by Marijn Ros <marijn@mad.scientist.com>.
10154 2002-12-22 Roland McGrath <roland@redhat.com>
10156 * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
10158 2002-12-20 Ulrich Drepper <drepper@redhat.com>
10160 * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_inexpensive): Define.
10162 2002-12-19 Ulrich Drepper <drepper@redhat.com>
10164 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Don't define
10165 NEED_DL_SYSINFO since no processor < i686 had the sysenter opcode.
10166 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: New file.
10168 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Use ENTER_KERNEL instead
10170 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
10171 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Likewise.
10172 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Likewise.
10173 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
10174 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
10175 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Likewise.
10176 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Likewise.
10177 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
10179 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add support for using
10181 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
10183 * sysdeps/i386/tls.h: Unconditionally include <dl-sysdep.h>.
10185 * allocatestack.c (allocate_stack) [NEED_DL_SYSINFO]: Set sysinfo
10187 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Check
10188 that sysinfo is properly initialized.
10189 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define RTLD_PRIVATE_ERRNO
10190 to 1 only for ld.so.
10192 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
10193 RTLD_CORRECT_DYNAMIC_WEAK.
10195 2002-12-19 Jakub Jelinek <jakub@redhat.com>
10197 * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
10198 Use return 0 as 6th argument to FORWARD4.
10199 * pthread_equal.c: Include pthreadP.h instead of pthread.h.
10201 2002-12-18 Ulrich Drepper <drepper@redhat.com>
10203 * descr.h (struct pthread) [NEED_DL_SYSINFO]: Add sysinfo member.
10204 * sysdeps/i386/tls.h (tcbhead_t): Add sysinfo member.
10205 Define SYSINFO_OFFSEET if NEED_DL_SYSINFO is defined.
10206 (INIT_SYSINFO): New #define.
10207 (TLS_TP_INIT): Use INIT_SYSINFO.
10208 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
10209 At test to make sure SYSINFO_OFFSET value is correct.
10210 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
10212 2002-12-18 Jakub Jelinek <jakub@redhat.com>
10214 * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
10215 * sysdeps/unix/sysv/linux/raise.c (gsignal): Add weak alias to raise.
10216 * Versions [libc: GLIBC_2.0]: Add pthread_attr_init.
10217 [libpthread: GLIBC_2.1]: Remove __pthread_rwlock_init,
10218 __pthread_rwlock_destroy, __pthread_rwlock_rdlock,
10219 __pthread_rwlock_wrlock, __pthread_rwlock_unlock,
10220 __pthread_rwlock_tryrdlock and __pthread_rwlock_trywrlock.
10222 2002-12-18 Ulrich Drepper <drepper@redhat.com>
10224 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use ENTER_KERNEL
10225 macro instead of using int $0x80 directly.
10227 * sysdeps/pthread/bits/stdio-lock.h: New file.
10228 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: New file.
10229 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: New file.
10230 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: New file.
10231 * Makefile (routines): Add libc-lowlevelmutex.
10233 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Remove
10234 __i686.get_pc_thunk.dx.
10236 2002-12-17 Jakub Jelinek <jakub@redhat.com>
10238 * Makefile (libpthread-shared-only-routines): Add pt-allocrtsig.
10239 (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
10240 ($(objpfx)tst-cancel-wrappers.out): New rule.
10241 * tst-cancel-wrappers.sh: New test.
10242 * tst-locale1.c: Include signal.h.
10243 (uselocale): Test static linking of __libc_current_sigrt*.
10245 2002-12-17 Ulrich Drepper <drepper@redhat.com>
10247 * Makefile (tests): Add tst-cancel6.
10248 * tst-cancel6.c: New file
10250 2002-12-17 Jakub Jelinek <jakub@redhat.com>
10252 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
10253 Define meaningfully for assembler as well.
10254 * pthreadP.h (struct pthread_functions): Remove
10255 ptr_pthread_attr_init field. Add ptr_pthread_attr_init_2_0
10256 and ptr_pthread_attr_init_2_1 fields.
10257 * init.c (pthread_functions): Initialize ptr_pthread_attr_init_2_0
10258 and ptr_pthread_attr_init_2_1 instead of ptr_pthread_attr_init.
10259 * forward.c (FORWARD4): Renamed from FORWARD3. Add export argument.
10260 (FORWARD3): Define using FORWARD4.
10261 (pthread_attr_init): Provide both @GLIBC_2.0 and @@GLIBC_2.1
10263 * pt-system.c: Remove duplicate stdlib.h include.
10265 2002-12-16 Ulrich Drepper <drepper@redhat.com>
10267 * sem_init.c: Define sem_init@GLIBC_2.0.
10268 * sem_destroy.c: Define sem_destroy@GLIBC_2.0.
10269 * sem_getvalue.c: Define sem_getvalue@GLIBC_2.0.
10271 * flockfile.c: Moved to...
10272 * sysdeps/pthread/flockfile.c: ...here. New file.
10273 * funlockfile.c: Moved to...
10274 * sysdeps/pthread/funlockfile.c: ...here. New file.
10275 * ftrylockfile.c: Moved to...
10276 * sysdeps/pthread/ftrylockfile.c: ...here. New file.
10278 2002-12-16 Jakub Jelinek <jakub@redhat.com>
10280 * libc-cancellation.c: Guard both function with
10281 #if !defined NOT_IN_libc.
10282 * Makefile (libpthread-routines): Use ptw-, not pt- prefix for the
10283 automatically provided pthread wrappers.
10284 * pthreadP.h (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define to
10285 CANCEL_* if IS_IN_libpthread and to dummy versions if not in libc
10287 * pt-open.c: Removed.
10288 * pt-fcntl.c: Removed.
10289 * pt-fsync.c: Removed.
10290 * pt-lseek.c: Removed.
10291 * pt-msgrcv.c: Removed.
10292 * pt-msgsnd.c: Removed.
10293 * pt-msync.c: Removed.
10294 * pt-nanosleep.c: Removed.
10295 * pt-open64.c: Removed.
10296 * pt-pause.c: Removed.
10297 * pt-pread.c: Removed.
10298 * pt-pread64.c: Removed.
10299 * pt-pwrite.c: Removed.
10300 * pt-pwrite64.c: Removed.
10301 * pt-read.c: Removed.
10302 * pt-recv.c: Removed.
10303 * pt-recvfrom.c: Removed.
10304 * pt-recvmsg.c: Removed.
10305 * pt-send.c: Removed.
10306 * pt-sendto.c: Removed.
10307 * pt-sigtimedwait.c: Removed.
10308 * pt-sigwait.c: Removed.
10309 * pt-wait.c: Removed.
10310 * pt-waitpid.c: Removed.
10311 * pt-write.c: Removed.
10312 * pt-accept.c: Removed.
10313 * pt-close.c: Removed.
10314 * pt-connect.c: Removed.
10315 * pt-lseek64.c: Removed.
10316 * pt-sendmsg.c: Removed.
10317 * pt-tcdrain.c: Removed.
10319 2002-12-15 Ulrich Drepper <drepper@redhat.com>
10321 * init.c (__pthread_initialize_minimal_internal): Renamed from
10322 __pthread_initialize_minimal. Make old name an alias. This
10323 converts a normal relocation into a relative relocation.
10325 * pt-fcntl.c (__fcntl): Use fcntl64 syscall, not fcntl.
10327 * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
10328 readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
10329 * Makefile (libpthread-routines): Remove pt-creat, pt-poll,
10330 pt-pselect, pt-readv, pt-select, pt-sigpause, pt-sigsuspend,
10331 pt-sigwaitinfo, pt-waitid, and pt-writev.
10332 * pt-creat.c: Removed.
10333 * pt-poll.c: Removed.
10334 * pt-pselect.c: Removed.
10335 * pt-readv.c: Removed.
10336 * pt-select.c: Removed.
10337 * pt-sigpause.c: Removed.
10338 * pt-sigsuspend.c: Removed.
10339 * pt-sigwaitinfo.c: Removed.
10340 * pt-waitid.c: Removed.
10341 * pt-writev.c: Removed.
10343 * init.c (pthread_functions): New variable.
10344 (__pthread_initialize_minimal): Pass pointer to pthread_functions
10345 (or NULL) to __libc_pthread_init.
10346 * forward.c: Rewrite to use __libc:pthread_functions array to get
10347 function addresses.
10348 * sysdeps/unix/sysv/linux/fork.h: Remove __libc_pthread_init
10350 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
10351 Take new parameter. Copy content of variable pointed to by it
10352 to __libc_pthread_init.
10354 * pthreadP.h (struct pthread_functions): New type.
10355 (__libc_pthread_init): Declare.
10357 * pthread_attr_destroy.c: Add namespace protected alias.
10358 * pthread_attr_getdetachstate.c: Likewise.
10359 * pthread_attr_getinheritsched.c: Likewise.
10360 * pthread_attr_getschedparam.c: Likewise.
10361 * pthread_attr_getschedpolicy.c: Likewise.
10362 * pthread_attr_getscope.c: Likewise.
10363 * pthread_attr_setdetachstate.c: Likewise.
10364 * pthread_attr_setinheritsched.c: Likewise.
10365 * pthread_attr_setschedparam.c: Likewise.
10366 * pthread_attr_setschedpolicy.c: Likewise.
10367 * pthread_attr_setscope.c: Likewise.
10368 * pthread_cond_broadcast.c: Likewise.
10369 * pthread_cond_destroy.c: Likewise.
10370 * pthread_cond_init.c: Likewise.
10371 * pthread_cond_signal.c: Likewise.
10372 * pthread_cond_wait.c: Likewise.
10373 * pthread_condattr_destroy.c: Likewise.
10374 * pthread_condattr_init.c: Likewise.
10375 * pthread_equal.c: Likewise.
10376 * pthread_exit.c: Likewise.
10377 * pthread_getschedparam.c: Likewise.
10378 * pthread_self.c: Likewise.
10379 * pthread_setcancelstate.c: Likewise.
10380 * pthread_setschedparam.c: Likewise.
10381 * pthread_mutex_destroy.c: Likewise.
10382 * pthread_mutex_init.c: Likewise.
10383 * pthreadP.h: Add prototypes for the aliases.
10385 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Set
10386 multiple_threads member in correct TCB to 1.
10388 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define
10389 SINGLE_THREAD_P. If in libc or libpthread examine multiple_thread
10390 member of thread decriptor, otherwise return unconditionally 1.
10392 2002-12-14 Ulrich Drepper <drepper@redhat.com>
10394 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Changes folded into the
10395 regular Linux version. Remove file.
10396 * sysdeps/unix/sysv/linux/connect.S: Likewise. Remove file.
10397 * sysdeps/unix/sysv/linux/llseek.c: Likewise. Remove file.
10398 * sysdeps/unix/sysv/linux/msgrcv.c: Likewise. Remove file.
10399 * sysdeps/unix/sysv/linux/msgsnd.c: Likewise. Remove file.
10400 * sysdeps/unix/sysv/linux/open64.c: Likewise. Remove file.
10401 * sysdeps/unix/sysv/linux/poll.c: Likewise. Remove file.
10402 * sysdeps/unix/sysv/linux/pread.c: Likewise. Remove file.
10403 * sysdeps/unix/sysv/linux/pread64.c: Likewise. Remove file.
10404 * sysdeps/unix/sysv/linux/pselect.c: Likewise. Remove file.
10405 * sysdeps/unix/sysv/linux/pwrite.c: Likewise. Remove file.
10406 * sysdeps/unix/sysv/linux/pwrite64.c: Likewise. Remove file.
10407 * sysdeps/unix/sysv/linux/readv.c: Likewise. Remove file.
10408 * sysdeps/unix/sysv/linux/recv.S: Likewise. Remove file.
10409 * sysdeps/unix/sysv/linux/recvfrom.S: Likewise. Remove file.
10410 * sysdeps/unix/sysv/linux/recvmsg.S: Likewise. Remove file.
10411 * sysdeps/unix/sysv/linux/send.S: Likewise. Remove file.
10412 * sysdeps/unix/sysv/linux/sendmsg.S: Likewise. Remove file.
10413 * sysdeps/unix/sysv/linux/sendto.S: Likewise. Remove file.
10414 * sysdeps/unix/sysv/linux/sigpause.c: Likewise. Remove file.
10415 * sysdeps/unix/sysv/linux/sigsuspend.c: Likewise. Remove file.
10416 * sysdeps/unix/sysv/linux/sigtimedwait.c: Likewise. Remove file.
10417 * sysdeps/unix/sysv/linux/sigwait.c: Likewise. Remove file.
10418 * sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise. Remove file.
10419 * sysdeps/unix/sysv/linux/system.c: Likewise. Remove file.
10420 * sysdeps/unix/sysv/linux/tcdrain.c: Likewise. Remove file.
10421 * sysdeps/unix/sysv/linux/wait.c: Likewise. Remove file.
10422 * sysdeps/unix/sysv/linux/waitid.c: Likewise. Remove file.
10423 * sysdeps/unix/sysv/linux/waitpid.c: Likewise. Remove file.
10424 * sysdeps/unix/sysv/linux/writev.c: Likewise. Remove file.
10425 * sysdeps/unix/sysv/linux/i386/fcntl.c: Likewise. Remove file.
10427 2002-12-14 Jakub Jelinek <jakub@redhat.com>
10429 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
10430 * sysdeps/unix/sysv/linux/open.c: Removed.
10431 * sysdeps/unix/sysv/linux/fsync.c: Removed.
10432 * sysdeps/unix/sysv/linux/lseek.c: Removed.
10433 * sysdeps/unix/sysv/linux/msync.c: Removed.
10434 * sysdeps/unix/sysv/linux/read.c: Removed.
10435 * sysdeps/unix/sysv/linux/close.c: Removed.
10436 * sysdeps/unix/sysv/linux/creat.c: Removed.
10437 * sysdeps/unix/sysv/linux/nanosleep.c: Removed.
10438 * sysdeps/unix/sysv/linux/pause.c: Removed.
10439 * sysdeps/unix/sysv/linux/select.c: Removed.
10440 * sysdeps/unix/sysv/linux/write.c: Removed.
10442 2002-12-14 Ulrich Drepper <drepper@redhat.com>
10444 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Check multiple_threads
10445 element in TCB to see whether locking is needed.
10447 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Check that
10448 MULTIPLE_THREADS_OFFSET value is correct.
10450 * sysdeps/unix/sysv/linux/close.c: New file.
10451 * sysdeps/unix/sysv/linux/connect.S: New file.
10452 * sysdeps/unix/sysv/linux/creat.c: New file.
10453 * sysdeps/unix/sysv/linux/fsync.c: New file.
10454 * sysdeps/unix/sysv/linux/llseek.c: New file.
10455 * sysdeps/unix/sysv/linux/lseek.c: New file.
10456 * sysdeps/unix/sysv/linux/msgrcv.c: New file.
10457 * sysdeps/unix/sysv/linux/msgsnd.c: New file.
10458 * sysdeps/unix/sysv/linux/msync.c: New file.
10459 * sysdeps/unix/sysv/linux/nanosleep.c: New file.
10460 * sysdeps/unix/sysv/linux/open.c: New file.
10461 * sysdeps/unix/sysv/linux/open64.c: New file.
10462 * sysdeps/unix/sysv/linux/pause.c: New file.
10463 * sysdeps/unix/sysv/linux/poll.c: New file.
10464 * sysdeps/unix/sysv/linux/pread.c: New file.
10465 * sysdeps/unix/sysv/linux/pread64.c: New file.
10466 * sysdeps/unix/sysv/linux/pselect.c: New file.
10467 * sysdeps/unix/sysv/linux/pwrite.c: New file.
10468 * sysdeps/unix/sysv/linux/pwrite64.c: New file.
10469 * sysdeps/unix/sysv/linux/readv.c: New file.
10470 * sysdeps/unix/sysv/linux/recv.S: New file.
10471 * sysdeps/unix/sysv/linux/recvfrom.S: New file.
10472 * sysdeps/unix/sysv/linux/recvmsg.S: New file.
10473 * sysdeps/unix/sysv/linux/select.c: New file.
10474 * sysdeps/unix/sysv/linux/send.S: New file.
10475 * sysdeps/unix/sysv/linux/sendmsg.S: New file.
10476 * sysdeps/unix/sysv/linux/sendto.S: New file.
10477 * sysdeps/unix/sysv/linux/sigpause.c: New file.
10478 * sysdeps/unix/sysv/linux/sigsuspend.c: New file.
10479 * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
10480 * sysdeps/unix/sysv/linux/sigwait.c: New file.
10481 * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
10482 * sysdeps/unix/sysv/linux/system.c: New file.
10483 * sysdeps/unix/sysv/linux/tcdrain.c: New file.
10484 * sysdeps/unix/sysv/linux/wait.c: New file.
10485 * sysdeps/unix/sysv/linux/waitid.c: New file.
10486 * sysdeps/unix/sysv/linux/waitpid.c: New file.
10487 * sysdeps/unix/sysv/linux/writev.c: New file.
10488 * sysdeps/unix/sysv/linux/i386/fcntl.c: New file.
10490 * pt-readv.c: Fix comment.
10492 2002-12-14 Jakub Jelinek <jakub@redhat.com>
10494 * tst-cleanup1.c: Include stdlib.h.
10496 * tst-cancel5.c: New test.
10497 * Makefile (tests): Add tst-cancel5.
10498 (tst-cancel5): Link against libc.so libpthread.so in that order.
10500 2002-12-13 Ulrich Drepper <drepper@redhat.com>
10502 * forward.c (test_loaded): Prevent recursive calls.
10504 * Makefile (routines): Add libc-cancellation.
10505 * libc-cancellation.c: New file.
10506 * descr.h (struct pthread): Add multiple_threads field.
10507 * allocatestack.c (allocate_stack): Initialize multiple_header field of
10508 new thread descriptor to 1.
10509 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread):
10510 Initialize multiple_thread field after successful thread creation.
10511 * cancellation.c (__do_cancel): Move to pthreadP.h.
10512 (__pthread_enable_asynccancel): Remove parameter from __do_cancel call.
10513 (__pthread_disable_asynccancel): Add internal_function attribute.
10514 * init.c (sigcancel_handler): Remove parameter from __do_cancel call.
10515 * pthread_setcancelstate.c: Likewise.
10516 * pthread_setcanceltype.c: Likewise.
10517 * pthread_exit.c: Likewise.
10518 * pthreadP.h (CANCELLATION_P): Likewise.
10519 (__do_cancel): Define as static inline.
10520 (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): New #defines.
10521 (__libc_enable_asynccancel, __libc_disable_asynccancel): New
10523 * sysdeps/i386/tls.h (tcbhead_t): Add list and multiple_threads
10524 fields. Define MULTIPLE_THREADS_OFFSET.
10525 * sysdeps/pthread/bits/libc-lock.h: Remove __libc_locking_needed
10527 * sysdeps/unix/sysv/linux/accept.S: New file.
10528 * sysdeps/unix/sysv/linux/read.c: New file.
10529 * sysdeps/unix/sysv/linux/write.c: New file.
10530 * sysdeps/unix/sysv/linux/i386/pt-socket.S: New file.
10531 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove definition and
10532 initialization of __libc_locking_needed.
10533 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't use
10534 __libc_locking_needed, use multiple_threads field in TCB.
10535 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
10537 2002-12-12 Ulrich Drepper <drepper@redhat.com>
10539 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: Use i486
10541 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: Likewise.
10543 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Correct
10544 access to __libc_locking_needed for PIC.
10546 2002-12-12 Jakub Jelinek <jakub@redhat.com>
10548 * sysdeps/pthread/bits/libc-lock.h (__libc_locking_needed): Only
10549 declare for libc.so.
10550 (__libc_lock_init, __libc_lock_init_recursive): Change into comma
10552 (__libc_lock_lock): Put into statement expression.
10553 (__libc_lock_unlock): Remove trailing semicolon.
10554 * sysdeps/unix/sysv/linux/fork.h (__libc_pthread_init): Fix typo.
10556 2002-12-12 Roland McGrath <roland@redhat.com>
10558 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use asm operand with
10559 "m" constraint to refer to __libc_locking_needed. Declare it here.
10561 2002-12-12 Ulrich Drepper <drepper@redhat.com>
10563 * sysdeps/unix/sysv/linux/fork-gen.c: Renamed to...
10564 * sysdeps/unix/sysv/linux/libc_pthread_init.c: ...this.
10565 Initialize __libc_locking_needed.
10566 * init.c (__pthread_initialize_minimal): Call __libc_pthread_init
10567 instead of __register_pthread_fork_handler.
10568 * sysdeps/pthread/bits/libc-lock.h: Declare __libc_locking_needed.
10569 * sysdeps/unix/sysv/linux/Makefile (sysdep_routimes): Replace
10570 fork-gen with libc_pthread_init.
10571 * sysdeps/unix/sysv/linux/Versions: Use __libc_pthread_init instead
10572 of __register_pthread_fork_handler.
10573 * sysdeps/unix/sysv/linux/fork.h: Declare __libc_pthread_init instead
10574 of __register_pthread_fork_handler.
10575 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use
10576 __libc_locking_needed to determine whether lock prefix can be avoided.
10577 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
10579 2002-12-11 Ulrich Drepper <drepper@redhat.com>
10581 * Makefile (tests): Add tst-cleanup1.
10582 * tst-cleanup1.c: New file.
10583 * cancellation.c (__cleanup_thread): Removed.
10584 (__do_cancel): Remove call to __cleanup_thread.
10585 * pthreadP.h: Remove __cleanup_thread prorotype.
10587 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
10588 Remember function and argument even if cancellation handler
10589 function is not available.
10590 (__libc_cleanup_region_end): Execute registered function directly if
10591 pthread functions are not available.
10592 (__libc_cleanup_end): Likewise.
10594 * init.c (__pthread_initialize_minimal): Fix initialization in
10595 static lib by preventing gcc from being too clever.
10597 2002-12-10 Ulrich Drepper <drepper@redhat.com>
10599 * init.c (__pthread_initialize_minimal): Remove unneccesary
10602 * Makefile (tests): We can run tst-locale2 now.
10604 2002-12-09 Ulrich Drepper <drepper@redhat.com>
10606 * Versions: Remove duplicated sigwait entry.
10608 2002-12-08 Ulrich Drepper <drepper@redhat.com>
10610 * pthreadP.h: Enable pthread_cleanup_{push,pop} optimizations only
10613 * pt-fcntl.c (__fcntl): Initialize oldtype to avoid warning.
10615 * pthreadP.h: Declare __pthread_enable_asynccancel and
10616 __pthread_disable_asynccancel.
10617 (CANCEL_ASYNC): Use __pthread_enable_asynccancel.
10618 (CANCEL_RESET): Use __pthread_disable_asynccancel.
10619 * cancellation.c (__pthread_enable_asynccancel): New function.
10620 (__pthread_disable_asynccancel): New function.
10621 * pt-accept.c: Adjust for CANCEL_ASYNC and CANCEL_RESET change.
10622 * pt-close.c: Likewise.
10623 * pt-connect.c: Likewise.
10624 * pt-creat.c: Likewise.
10625 * pt-fcntl.c: Likewise.
10626 * pt-fsync.c: Likewise.
10627 * pt-lseek.c: Likewise.
10628 * pt-lseek64.c: Likewise.
10629 * pt-msgrcv.c: Likewise.
10630 * pt-msgsnd.c: Likewise.
10631 * pt-msync.c: Likewise.
10632 * pt-nanosleep.c: Likewise.
10633 * pt-open.c: Likewise.
10634 * pt-open64.c: Likewise.
10635 * pt-pause.c: Likewise.
10636 * pt-poll.c: Likewise.
10637 * pt-pread.c: Likewise.
10638 * pt-pread64.c: Likewise.
10639 * pt-pselect.c: Likewise.
10640 * pt-pwrite.c: Likewise.
10641 * pt-pwrite64.c: Likewise.
10642 * pt-read.c: Likewise.
10643 * pt-readv.c: Likewise.
10644 * pt-recv.c: Likewise.
10645 * pt-recvfrom.c: Likewise.
10646 * pt-recvmsg.c: Likewise.
10647 * pt-select.c: Likewise.
10648 * pt-send.c: Likewise.
10649 * pt-sendmsg.c: Likewise.
10650 * pt-sendto.c: Likewise.
10651 * pt-sigpause.c: Likewise.
10652 * pt-sigsuspend.c: Likewise.
10653 * pt-sigtimedwait.c: Likewise.
10654 * pt-sigwait.c: Likewise.
10655 * pt-sigwaitinfo.c: Likewise.
10656 * pt-system.c: Likewise.
10657 * pt-tcdrain.c: Likewise.
10658 * pt-wait.c: Likewise.
10659 * pt-waitid.c: Likewise.
10660 * pt-waitpid.c: Likewise.
10661 * pt-write.c: Likewise.
10662 * pt-writev.c: Likewise.
10663 * pthread_join.c: Likewise.
10664 * pthread_timedjoin.c: Likewise.
10666 * pt-sigpause.c (sigsuspend): Call __sigsuspend.
10667 (__xpg_sigpause): New function.
10668 * Versions (libpthread:GLIBC_2.3.2): Add __xpg_sigpause.
10670 2002-12-07 Ulrich Drepper <drepper@redhat.com>
10672 * Makefile (CFLAGS-ftrylockfile.c): Add -D_IO_MTSAFE_IO.
10674 * cleanup.c: Move declarations of _GI_pthread_cleanup_push and
10675 _GI_pthread_cleanup_pop to pthreadP.h.
10677 * ftrylockfile.c: Use _IO_lock_trylock instead of
10678 pthread_mutex_trylock.
10680 * pthreadP.h (CANCEL_ASYNC): Use __pthread_setcanceltype.
10681 (CANCEL_RESET): Likewise.
10682 (__pthread_setcanceltype_): Declare.
10683 (__pthread_mutex_lock_internal): Declare.
10684 (__pthread_mutex_unlock_internal): Declare.
10685 (__pthread_once_internal): Declare.
10686 (pthread_cleanup_push): Redefine using _GI_pthread_cleanup_push.
10687 (pthread_cleanup_pop): Redefine using _GI_pthread_cleanup_pop.
10689 * pthread_cond_timedwait.c: Use INTUSE is calls to pthread_mutex_lock
10690 and pthread_mutex_unlock.
10691 * pthread_cond_wait.c: Likewise.
10692 * pthread_mutex_lock.c: Use INTDEF to define alias if needed.
10693 * pthread_mutex_unlock.c: Likewise.
10695 * pthread_setcanceltype.c: Add additional alias
10696 __pthread_setcanceltype.
10698 * sem_unlink.c (sem_unlink): Use __pthread_once with INTDEF.
10699 * sem_open.c (sem_open): Likewise.
10700 Use __libc_open, __libc_write, and __libc_close instead of
10701 open, write, and close respectively.
10703 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_trylock_internal):
10704 Rewrite as statement expression since it must return a value.
10706 * pthread_cancel.c: Use __pthread_kill instead of pthread_kill.
10707 * sysdeps/unix/sysv/linux/pthread_kill.c: Define additional alias
10710 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Define additional
10711 alias __pthread_once_internal.
10713 * sysdeps/unix/sysv/linux/raise.c: Use libc_hidden_def for raise.
10715 2002-12-06 Ulrich Drepper <drepper@redhat.com>
10717 * Makefile (tests): Add tst-stdio1 and tst-stdio2.
10718 * tst-stdio1.c: New file.
10719 * tst-stdio2.c: New file.
10721 * init.c (__pthread_initialize_minimal): Correct INIT_LIST_HEAD use.
10723 * Makefile (tests): Comment out tst-locale2 for now.
10724 (CFLAGS-flockfile.c, CFLAGS-funlockfile.c): Define to -D_IO_MTSAFE_IO.
10726 * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-fork.c to
10728 * sysdeps/unix/sysv/linux/fork.c: Include <bits/stdio-lock.h>.
10729 Use _IO_lock_init instead of explicit assignment.
10731 * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
10732 Define __libc_lock_* and __libc_lock_recursive macros with
10733 lowlevellock macros, not pthread mutexes.
10735 * flockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_lock instead
10736 of pthread_mutex_lock.
10737 * funlockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_unlock
10738 instead of pthread_mutex_unlock.
10740 2002-12-06 Roland McGrath <roland@redhat.com>
10742 * allocatestack.c (__stack_user): Use uninitialized defn.
10743 * init.c (__pthread_initialize_minimal): Initialize it here.
10745 2002-12-05 Roland McGrath <roland@redhat.com>
10747 * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
10749 * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
10751 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Add
10752 missing & here too.
10754 2002-12-05 Ulrich Drepper <drepper@redhat.com>
10756 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
10758 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: New file.
10759 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: New file.
10760 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: New file.
10761 * sysdeps/pthread/bits/libc-lock.h: Use lowlevellock implementation
10762 for __libc_lock_* macros.
10763 * Makefile (routines): Add libc-lowlevellock.
10765 2002-10-09 Roland McGrath <roland@redhat.com>
10767 * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
10768 Under [__PIC__], call the function via the pointer fetched for
10769 comparison rather than a call by name that uses the PLT.
10770 (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
10771 (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
10772 (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
10773 (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
10774 (__libc_key_create, __libc_getspecific, __libc_setspecific): Use it.
10776 2002-12-04 Roland McGrath <roland@redhat.com>
10778 * forward.c (pthread_self): Use FORWARD3 macro to correct return type.
10780 * sysdeps/i386/td_ta_map_lwp2thr.c: Moved from ../nptl_db.
10781 * sysdeps/generic/td_ta_map_lwp2thr.c: New file.
10783 * pthread_create.c (start_thread): Add missing & on __nptl_last_event.
10785 2002-12-04 Ulrich Drepper <drepper@redhat.com>
10787 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Make pthread_t
10788 a completely opaque, non-integer type.
10789 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
10791 2002-12-05 Jakub Jelinek <jakub@redhat.com>
10793 * sysdeps/i386/tls.h: Include stdlib.h.
10794 * sysdeps/x86_64/tls.h: Likewise.
10796 2002-12-04 Ulrich Drepper <drepper@redhat.com>
10798 * Makefile (tests): Add tst-locale2.
10799 (tests-static): Likewise.
10800 * tst-locale2.c: New file.
10802 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Mark asms as
10803 volatile and add memory clobbers to lock operations.
10805 2002-12-03 Ulrich Drepper <drepper@redhat.com>
10807 * sysdeps/i386/i686/bits/atomic.h: Use i486 version.
10808 * sysdeps/i386/i486/bits/atomic.h: New file.
10809 * sysdeps/i386/i586/bits/atomic.h: New file.
10810 * sysdeps/i386/i686/pthread_spin_trylock.S: Define HAVE_CMOV and
10811 include i486 version.
10812 * sysdeps/i386/i486/pthread_spin_trylock.S: New file.
10813 * sysdeps/i386/i586/pthread_spin_trylock.S: New file.
10814 Patch by Marijn Ros <marijn@mad.scientist.com>.
10816 * allocatestack.c (get_cached_stack): Don't crash if we first
10817 found a stack with a larger size then needed.
10818 Reported by Hui Huang <hui.huang@sun.com>.
10820 * Makefile (tests): Add tst-sysconf.
10821 * tst-sysconf.c: New file.
10823 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine
10824 PTHREAD_THREADS_MAX.
10826 2002-12-02 Roland McGrath <roland@redhat.com>
10828 * pthreadP.h (__stack_user, __nptl_create_event, __nptl_death_event):
10829 Declare using hidden_proto instead of attribute_hidden, so there are
10830 non-.hidden static symbols for gdb to find.
10831 (__pthread_keys): Likewise.
10832 * events.c (__nptl_create_event, __nptl_death_event): Add hidden_def.
10833 * allocatestack.c (__stack_user): Likewise.
10834 * pthread_create.c (__pthread_keys): Likewise.
10835 (__nptl_threads_events, __nptl_last_event): Make these static instead
10837 * pthread_key_create.c (__pthread_pthread_keys_max,
10838 __pthread_pthread_key_2ndlevel_size): Renamed from __linuxthreads_*.
10840 2002-12-02 Ulrich Drepper <drepper@redhat.com>
10842 * Makefile (tests): Add tst-locale1. If buid-static is yes link
10844 * tst-locale1.c: New file.
10846 * pthread_cond_timedwait.c: Include <stdlib.h>.
10848 * Makefile (tests): Add tst-fork2 and tst-fork3.
10849 * tst-fork2.c: New file.
10850 * tst-fork3.c: New file.
10852 2002-11-28 Ulrich Drepper <drepper@redhat.com>
10854 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
10856 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
10857 require it to 200112L.
10859 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Use cmov
10860 instruction only if HAVE_CMOV is defined.
10861 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Define HAVE_CMOV.
10863 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: New file.
10865 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: New file.
10867 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: New file.
10869 * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: New file.
10871 2002-11-27 Ulrich Drepper <drepper@redhat.com>
10873 * sysdeps/x86_64/bits/atomic.h: New file.
10875 * sysdeps/i386/i686/bits/atomic.h: Fix asm syntax for 8- and
10878 * sysdeps/unix/sysv/linux/raise.c (raise): Use INTERNAL_SYSCALL if
10879 possible since gettid cannot fail.
10881 * sysdeps/x86_64/pthreaddef.h: New file.
10883 * sysdeps/i386/pthreaddef.h (gettid): Removed.
10885 * sysdeps/x86_64/pthread_spin_init.c: New file.
10886 * sysdeps/x86_64/pthread_spin_lock.c: New file.
10887 * sysdeps/x86_64/pthread_spin_trylock.c: New file.
10888 * sysdeps/x86_64/pthread_spin_unlock.c: New file.
10890 * sysdeps/i386/i686/pthread_spin_trylock.S (pthread_spin_trylock):
10891 Add missing lock prefix. Minute optimization.
10893 * tst-spin2.c (main): Also check successful trylock call.
10895 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use correct
10896 syscall. Fix typo in case INTERNAL_SYSCALL is not used.
10898 * sysdeps/i386/pthread_spin_destroy.c: Moved to...
10899 * sysdeps/pthread/pthread_spin_destroy.c: ...here. New file.
10901 * sysdeps/i386/pthread_sigmask.c: Removed. Use the generic code.
10902 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Return correct
10903 value in case of an error. Add support for INTERNAL_SYSCALL.
10905 * sysdeps/i386/pthread_sigmask.c (pthread_sigmask): Return correct
10906 value in case of an error.
10908 * sysdeps/x86_64/tls.h: New file.
10910 2002-11-26 Ulrich Drepper <drepper@redhat.com>
10912 * sysdeps/i386/tls.h (THREAD_GETMEM_NC): Change interface. It now
10913 takes the array member name and the index as parameters.
10914 (THREAD_SETMEM_NC): Likewise.
10915 * pthread_getspecific.c: Use new THREAD_GETMEM_NC interface.
10916 * pthread_setspecific.c: Use new THREAD_GETMEM_NC and THREAD_SETMEM_NC
10919 * sysdeps/i386/tls.h (THREAD_SETMEM): Use size of member element
10920 to decide which code to use.
10921 (THREAD_SETMEM_NC): Likewise.
10923 * allocatestack.c (queue_stack): Don't remove stack from list here.
10924 Do it in the caller. Correct condition to prematurely terminate
10925 loop to free stacks.
10926 (__deallocate_stack): Remove stack from list here.
10928 2002-11-26 Ulrich Drepper <drepper@redhat.com>
10930 * Makefile (tests): Add tst-stack1.
10931 * tst-stack1.c: New file.
10933 * allocatestack.c (allocate_stack): Initialize the TCB on a user
10936 * pthread_attr_getstack.c: Return bottom of the thread area.
10938 2002-11-25 Ulrich Drepper <drepper@redhat.com>
10940 * Makefile (libpthread-routines): Add pt-allocrtsig and
10941 pthread_kill_other_threads.
10942 * pt-allocrtsig.c: New file.
10943 * pthread_kill_other_threads.c: New file.
10944 * sysdeps/unix/sysv/linux/allocrtsig.c: Add additional aliases for
10945 all three functions.
10946 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
10948 * sysdeps/unix/sysv/linux/Versions (libc:GLIBC_PRIVATE): Export
10949 __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
10950 and __libc_allocate_rtsig_private.
10951 * Versions (libpthread): Export pthread_kill_other_threads_np,
10952 __libc_current_sigrtmin, and __libc_current_sigrtmax.
10954 2002-11-24 Ulrich Drepper <drepper@redhat.com>
10956 * allocatestack.c (allocate_stack): stackaddr in attribute points to
10957 the end of the stack. Adjust computations.
10958 When mprotect call fails dequeue stack and free it.
10959 * pthread_attr_setstack.c: Store top of the stack in stackaddr
10961 * pthread_getattr_np.c: Likewise.
10963 * descr.h (IS_DETACHED): Add some more parenthesis to prevent
10966 2002-11-23 Ulrich Drepper <drepper@redhat.com>
10968 * sysdeps/pthread/pthread.h (pthread_self): __THROW must come before
10969 attribute definitions. Patch by Luca Barbieri <ldb@ldb.ods.org>.
10971 2002-11-22 Ulrich Drepper <drepper@redhat.com>
10973 * pthread_getspecific.c: Optimize access to first 2nd-level array.
10974 * pthread_setspecific.c: Likewise.
10976 2002-11-21 Ulrich Drepper <drepper@redhat.com>
10978 * sysdeps/unix/sysv/linux/i386/createthread.c: Remove CLONE_ flags
10979 definitions. Get them from the official place.
10980 * sysdeps/unix/sysv/linux/i386/fork.c: Likewise.
10982 * sysdeps/unix/sysv/linux/i386/createthread.c: Update CLONE_* flags.
10983 Use new CLONE_ flags in clone() calls.
10985 * sysdeps/unix/sysv/linux/fork.c: Use ARCH_FORK to actually fork.
10986 * sysdeps/unix/sysv/linux/i386/fork.c: New file.
10988 * Versions: Add pthread_* functions for libc.
10989 * forward.c: New file.
10991 * sysdeps/pthread/Makefile (libpthread-sysdeps_routines): Add
10993 * herrno.c: New file.
10996 * Makefile (libpthread-routines): Remove sem_post, sem_wait,
10997 sem_trywait, and sem_timedwait. Add herrno and res.
10998 * sem_init.c: Don't initialize lock and waiters members.
10999 * sem_open.c: Likewise.
11000 * sem_post.c: Removed.
11001 * sem_wait.c: Removed.
11002 * sem_trywait.c: Removed.
11003 * sem_timedwait.c: Removed.
11004 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Complete rewrite.
11005 Includes full implementations of sem_post, sem_wait, sem_trywait,
11007 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Adjust
11008 for new implementation.
11009 * sysdeps/unix/sysv/linux/internaltypes.h (struct sem): Remove lock
11010 and waiters fields.
11012 * tst-sem3.c: Improve error message.
11013 * tst-signal3.c: Likewise.
11015 * init.c (__pthread_initialize_minimal): Use set_tid_address syscall
11016 to tell the kernel about the termination futex and to initialize tid
11017 member. Don't initialize main_thread.
11018 * descr.h (struct pthread): Remove main_thread member.
11019 * cancelllation.c (__do_cancel): Remove code handling main thread.
11020 The main thread is not special anymore.
11022 * allocatestack.c (__reclaim_stacks): Mark stacks as unused. Add
11023 size of the stacks to stack_cache_actsize.
11025 * pt-readv.c: Add missing "defined".
11026 * pt-sigwait.c: Likewise.
11027 * pt-writev.c: Likewise.
11029 2002-11-09 Ulrich Drepper <drepper@redhat.com>
11031 * Versions: Export __connect from libpthread.
11032 Patch by Luca Barbieri <ldb@ldb.ods.org>.
11034 * Makefile (libpthread-routines): Add pt-raise.
11035 * sysdeps/unix/sysv/linux/raise.c: New file.
11036 * sysdeps/unix/sysv/linux/pt-raise.c: New file.
11037 * sysdeps/generic/pt-raise.c: New file.
11039 * pthread_cond_init.c: Initialize all data elements of the condvar
11040 structure. Patch by Luca Barbieri <ldb@ldb.ods.org>.
11042 * pthread_attr_init.c: Actually implement 2.0 compatibility version.
11043 * pthread_create.c: Likewise.
11045 * Makefile (tests): Add tst-key1, tst-key2, tst-key3.
11046 * tst-key1.c: New file.
11047 * tst-key2.c: New file.
11048 * tst-key3.c: New file.
11050 * Versions: Export pthread_detach for version GLIBC_2.0.
11051 Reported by Saurabh Desai <sdesai@austin.ibm.com>.
11053 2002-11-08 Ulrich Drepper <drepper@redhat.com>
11055 * pthread_key_create.c: Terminate search after an unused key was found.
11056 Patch by Luca Barbieri <ldb@ldb.ods.org>.
11058 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Return zero.
11059 Patch by Luca Barbieri <ldb@ldb.ods.org>.
11061 2002-10-10 Ulrich Drepper <drepper@redhat.com>
11063 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Use slow generic
11064 dynamic lookup for errno in PIC.
11066 * allocatestack.c (get_cached_stack): Rearrange code slightly to
11067 release the stack lock as soon as possible.
11068 Call _dl_allocate_tls_init for TCB from the cache to re-initialize
11069 the static TLS block.
11070 (allocate_stack): Call _dl_allocate_tls_init for user-provided stack.
11072 * cancellation.c: Renamed from cancelation.c.
11073 * Makefile: Adjust accordingly.
11074 * pthreadP.h (CANCELLATION_P): Renamed from CANCELATION_P.
11075 * cleanup_defer.c: Use CANCELLATION_P.
11076 * pthread_testcancel.c: Likewise.
11077 * descr.h: Fix spelling in comments.
11078 * init.c: Likewise.
11079 * pthread_getattr_np.c: Likewise.
11080 * pthread_getschedparam.c: Likewise.
11081 * pthread_setschedparam.c: Likewise.
11082 * Versions: Likewise.
11084 * pt-pselect.c: New file.
11085 * Makefile (libpthread-routines): Add pt-pselect.
11086 * Versions: Add pselect.
11088 * tst-cancel4.c: New file.
11089 * Makefile (tests): Add tst-cancel4.
11091 2002-10-09 Ulrich Drepper <drepper@redhat.com>
11093 * pthread_mutex_lock.c: Always record lock ownership.
11094 * pthread_mutex_timedlock.c: Likewise.
11095 * pthread_mutex_trylock.c: Likewise.
11097 * pt-readv.c: New file.
11098 * pt-writev.c: New file.
11099 * pt-creat.c: New file.
11100 * pt-msgrcv.c: New file.
11101 * pt-msgsnd.c: New file.
11102 * pt-poll.c: New file.
11103 * pt-select.c: New file.
11104 * pt-sigpause.c: New file.
11105 * pt-sigsuspend.c: New file.
11106 * pt-sigwait.c: New file.
11107 * pt-sigwaitinfo.c: New file.
11108 * pt-waitid.c: New file.
11109 * Makefile (libpthread-routines): Add pt-readv, pt-writev, pt-creat,
11110 pt-msgrcv, pt-msgsnd, pt-poll, pt-select, pt-sigpause, pt-sigsuspend,
11111 pt-sigwait, pt-sigwaitinfo, and pt-waitid.
11112 * Versions: Add all the new functions.
11114 * tst-exit1.c: New file.
11115 * Makefile (tests): Add tst-exit1.
11117 * sem_timedwait.c: Minor optimization for more optimal fastpath.
11119 2002-10-08 Ulrich Drepper <drepper@redhat.com>
11121 * pt-fcntl.c: Only enable asynchronous cancellation for F_SETLKW.
11123 * pthread_join.c: Enable asynchronous cancellation around lll_wait_tid
11124 call. pthread_join is an official cancellation point.
11125 * pthread_timedjoin.c: Likewise.
11127 * pthread_cond_wait.c: Revert order in which internal lock are dropped
11128 and the condvar's mutex are retrieved.
11129 * pthread_cond_timedwait.c: Likewise.
11130 Reported by dice@saros.East.Sun.COM.
11132 2002-10-07 Ulrich Drepper <drepper@redhat.com>
11134 * pthreadP.h: Cut out all type definitions and move them...
11135 * sysdeps/unix/sysv/linux/internaltypes.h: ...here. New file.
11136 * pthreadP.h: Include <internaltypes.h>.
11138 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Little
11139 performance tweaks.
11141 * sem_trywait.c: Shuffle #includes around to get right order.
11142 * sem_timedwait.c: Likewise.
11143 * sem_post.c: Likewise.
11144 * sem_wait.c: Likewise.
11146 * nptl 0.3 released.
11148 * Makefile (tests): Add tst-signal3.
11149 * tst-signal3.c: New file.
11151 2002-10-05 Ulrich Drepper <drepper@redhat.com>
11153 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Tell the compiler that
11154 the asms modify the sem object.
11155 (__lll_sem_timedwait): Now takes struct sem* as first parameter.
11157 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h (sem_t): Don't expose
11158 the actual members.
11159 * pthreadP.h (struct sem): New type. Actual semaphore type.
11160 * semaphoreP.h: Include pthreadP.h.
11161 * sem_getvalue.c: Adjust to sem_t change.
11162 * sem_init.c: Likewise.
11163 * sem_open.c: Likewise.
11164 * sem_post.c: Likewise.
11165 * sem_timedwait.c: Likewise.
11166 * sem_trywait.c: Likewise.
11167 * sem_wait.c: Likewise.
11169 2002-10-04 Ulrich Drepper <drepper@redhat.com>
11171 * Makefile (tests): Add tst-basic2, tst-exec1, tst-exec3, tst-exec3.
11172 * tst-basic2.c: New file.
11173 * tst-exec1.c: New file.
11174 * tst-exec2.c: New file.
11175 * tst-exec3.c: New file.
11177 * tst-fork1.c: Remove extra */.
11179 * nptl 0.2 released. The API for IA-32 is complete.