1 2011-01-19 Roland McGrath <roland@redhat.com>
3 * pthread_cond_wait.c (__pthread_cond_wait): Fix comment typo.
4 * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
5 * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Likewise.
6 * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
7 * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock): Likewise.
8 * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock): Likewise.
10 2011-01-16 Andreas Schwab <schwab@linux-m68k.org>
12 * Makefile (test-extras): Add tst-cleanup4aux.
14 2011-01-14 Ulrich Drepper <drepper@gmail.com>
17 * sysdeps/pthread/setxid.h (__SETXID_1): Add cast to assignment.
18 (__SETXID_2): Likewise.
19 (__SETXID_3): Likewise.
21 2011-01-13 Ulrich Drepper <drepper@gmail.com>
24 * Versions [libc] (GLIBC_PRIVATE): Export __libc_alloca_cutoff.
25 * alloca_cutoff.c: Add libc_hidden_def.
27 2010-10-13 H.J. Lu <hongjiu.lu@intel.com>
30 * sysdeps/x86_64/pthreaddef.h (TCB_ALIGNMENT): Changed to 32.
31 * sysdeps/x86_64/tls.h (TLS_TCB_ALIGN): Defined with alignment
34 2010-09-21 Andreas Schwab <schwab@redhat.com>
36 * sysdeps/pthread/pthread.h (pthread_cleanup_push)
37 [!__EXCEPTIONS]: Mangle local variable not_first_call.
38 (pthread_cleanup_push_defer_np): Likewise.
40 2010-09-03 Ulrich Drepper <drepper@redhat.com>
42 * sysdeps/pthread/allocalim.h (__libc_use_alloca): Expect blocks are
45 2010-08-10 Dinakar Guniguntala <dino@in.ibm.com>
46 Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
48 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: If
49 FUTEX_WAKE_OP fails make sure to call FUTEX_WAKE instead.
51 2010-08-12 H.J. Lu <hongjiu.lu@intel.com>
53 * sysdeps/unix/sysv/linux/i386/Makefile: New file.
55 2010-05-01 Alan Modra <amodra@gmail.com>
57 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
58 (PSEUDO): Use correct cr save. Don't use wrong parm save area
59 to save temps. Correct cfi for possible later frame manipulation.
60 (DOCARGS_1, UNDOCARGS_1): Use the correct parm save area.
61 (DOCARGS_2, UNDOCARGS_2, DOCARGS_3, UNDOCARGS_3): Likewise.
62 (DOCARGS_4, UNDOCARGS_4, DOCARGS_5, UNDOCARGS_5): Likewise.
63 (DOCARGS_6, UNDOCARGS_6): Likewise.
64 (CENABLE, CDISABLE): Add nops for non-shared calls.
66 2010-07-06 Andreas Schwab <schwab@redhat.com>
68 * sysdeps/unix/sysv/linux/pthread_getname.c (pthread_getname_np):
71 2010-07-03 Ulrich Drepper <drepper@redhat.com>
73 * tst-abstime.c (do_test): Some more cleanups
75 2010-07-02 Ulrich Drepper <drepper@redhat.com>
77 * tst-abstime.c: Correct testing and add test for sem_timedwait.
79 2010-07-01 Andreas Schwab <schwab@redhat.com>
80 Ulrich Drepper <drepper@redhat.com>
82 * Makefile (tests): Add tst-abstime.
83 * tst-abstime.c: New file.
84 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
85 (__lll_timedlock_wait): Check for timestamp before the Epoch.
86 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
87 (__lll_timedlock_wait): Likewise.
88 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
89 (__lll_robust_timedlock_wait): Likewise.
90 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
91 (__pthread_cond_timedwait): Likewise.
92 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
93 (pthread_rwlock_timedrdlock): Likewise.
94 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
95 (pthread_rwlock_timedwrlock): Likewise.
96 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
99 2010-07-01 Ulrich Drepper <drepper@redhat.com>
101 * Makefile (tst-_res1): Add tst-_res1mod1 to dependency list.
103 2010-06-01 Takashi Yoshii <takashi.yoshii.zj@renesas.com>
105 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Fix incorrect
106 location of ifndef __ASSUME_FUTEX_CLOCK_REALTIME.
108 2010-04-09 Ulrich Drepper <drepper@redhat.com>
111 * sysdeps/unix/sysv/linux/pthread_getname.c: New file.
112 * sysdeps/unix/sysv/linux/pthread_setname.c: New file.
113 * nptl/sysdeps/pthread/pthread.h: Declare pthread_getname and
115 * Makefile (libpthread-routines): Add pthread_getname and
117 * Versions: Export pthread_getname and pthread_setname for GLIBC_2.12.
119 2010-04-05 Thomas Schwinge <thomas@schwinge.name>
121 * sysdeps/pthread/unwind-resume.c: Moved to main tree sysdeps/gnu/.
122 * sysdeps/pthread/rt-unwind-resume.c: Likewise.
123 * sysdeps/pthread/Makefile: Remove csu section and rt section's
124 unwind-resume bits, now in main tree sysdeps/gnu/Makefile instead.
126 2010-03-23 Luis Machado <luisgpm@br.ibm.com>
128 * pthread_cond_timedwait.c: Add check for
129 HAVE_CLOCK_GETTIME_VSYSCALL to use VDSO whenever possible.
130 (pthread_cond_timedwait): Use INTERNAL_VSYSCALL instead of
133 2010-03-09 Ulrich Drepper <drepper@redhat.com>
135 * pthread_create.c (__pthread_create_2_1): If priorities are incorrect
136 and the call fails wake eventually waiting setxid threads. Don't free
137 stack here if we try starting a thread.
138 * sysdeps/pthread/createthread.c (do_clone): Only wake setxid waiter
139 if the clone call failed.
141 2010-03-08 Andreas Schwab <schwab@redhat.com>
143 * pthread_create.c (__pthread_create_2_1): Don't set setxid_futex.
144 * allocatestack.c (get_cached_stack): Set setxid_futex.
145 (allocate_stack): Likewise.
147 2010-03-05 Andreas Schwab <schwab@redhat.com>
148 Ulrich Drepper <drepper@redhat.com>
150 * allocatestack.c (setxid_mark_thread): Delay handling of thread if
151 it is creating a thread or it is just being created.
152 * pthread_create.c (start_thread): Wake setxid thread if it is
154 (__pthread_create_2_1): Initialize setxid_futex.
155 * sysdeps/pthread/createthread.c (do_clone): Wake setxid thread if it
158 2010-01-15 Ulrich Drepper <drepper@redhat.com>
160 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
162 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
164 2010-01-15 Michal Schmidt <mschmidt@redhat.com>
166 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
167 Fix pthread_cond_timedwait with requeue-PI.
168 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
169 Fix pthread_cond_wait with requeue-PI.
171 2010-01-14 Ulrich Drepper <drepper@redhat.com>
173 * Versions: Add pthread_mutex_consistent, pthread_mutexattr_getrobust,
174 and pthread_mutexattr_setrobust for GLIBC_2.12.
175 * pthread_mutex_consistent.c: Define alias pthread_mutex_consistent.
176 * pthread_mutexattr_getrobust.c: Define alias
177 pthread_mutexattr_getrobust.
178 * pthread_mutexattr_setrobust.c: Define alias
179 pthread_mutexattr_setrobust.
181 2010-01-12 Ulrich Drepper <drepper@redhat.com>
183 * sysdeps/pthread/pthread.h: Cleanup. Fix up for XPG7.
185 2010-01-08 Ulrich Drepper <drepper@redhat.com>
187 * sysdeps/pthread/pthread.h: Fix pthread_mutex_consistent declaration.
189 2009-12-18 Thomas Schwinge <thomas@codesourcery.com>
191 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c (_init): Don't
193 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c (_init): Likewise.
195 2009-12-17 Ulrich Drepper <drepper@redhat.com>
197 * pthread_rwlock_init.c (__pthread_rwlock_init): Simplify code by
200 2009-12-01 Dinakar Guniguntala <dino@in.ibm.com>
202 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.h: Define
203 FUTEX_WAIT_REQUEUE_PI and FUTEX_CMP_REQUEUE_PI.
204 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: If mutex
205 is a non robust PI mutex, then use FUTEX_CMP_REQUEUE_PI.
206 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
207 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: If mutex
208 is a non robust PI mutex, then use FUTEX_WAIT_REQUEUE_PI.
209 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
211 2009-12-12 Ulrich Drepper <drepper@redhat.com>
213 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
214 Don't update nwaiters after invalid timeout is recognized.
216 2009-11-27 Thomas Schwinge <thomas@codesourcery.com>
218 * sysdeps/unix/sysv/linux/sh/pt-initfini.c (_init): Don't call
221 2009-11-27 Andreas Schwab <schwab@redhat.com>
223 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Reload
224 THREAD_SELF->cancelhandling after returning from futex call.
226 2009-11-24 Ulrich Drepper <drepper@redhat.com>
228 * tst-sem13.c: New file.
229 * Makefile (tests): Add tst-sem13.
231 2009-11-22 Roland McGrath <roland@redhat.com>
233 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: # include "i686/dl-sysdep.h"
234 instead of recapitulating its contents.
236 2009-11-18 Ulrich Drepper <drepper@redhat.com>
238 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Minor
239 optimizations and cleanups.
241 2009-11-18 Dinakar Guniguntala <dino@in.ibm.com>
243 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
244 Remove redundant code. Fix cfi offsets.
245 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
248 2009-11-17 Ulrich Drepper <drepper@redhat.com>
250 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Minimally
251 reduce size of unwind info.
253 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Convert to use
255 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
256 Based on a patch by Dinakar Guniguntala <dino@in.ibm.com>.
258 2009-11-03 Andreas Schwab <schwab@linux-m68k.org>
261 * sysdeps/pthread/unwind-resume.c: Include <libgcc_s.h> and use
263 * sysdeps/pthread/unwind-forcedunwind.c: Likewise.
265 2009-10-30 Ulrich Drepper <drepper@redhat.com>
267 * tst-sem11.c (main): Rewrite to avoid aliasing problems.
270 * allocatestack.c (__nptl_setxid): Perform the operation in multiple
271 steps to avoid races with creation and terminations.
272 * nptl-init.c (sighandler_setxid): Adjust.
273 Patch by Daniel Jacobowitz.
275 2009-09-07 Andreas Schwab <schwab@redhat.com>
277 * sysdeps/pthread/bits/libc-lock.h (BP_SYM): Remove space before paren.
279 2009-09-02 Suzuki K P <suzuki@in.ibm.com>
280 Joseph Myers <joseph@codesourcery.com>
283 * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
284 Initialize the sigev_notify field for newly created timer to make sure
285 the timer gets deleted from the active timer's list upon timer_delete.
287 2009-08-27 Andrew Stubbs <ams@codesourcery.com>
289 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
290 Correct a logic error.
292 2009-08-25 Ulrich Drepper <drepper@redhat.com>
294 * sysdeps/x86_64/tls.h (RTLD_ENABLE_FOREIGN_CALL): Store old value
295 of the field in local variables.
296 (RTLD_FINALIZE_FOREIGN_CALL): Restore rtld_must_xmm_save from local
297 variable and don't unconditionally clear it.
299 2009-08-24 Ulrich Drepper <drepper@redhat.com>
301 * pthread_create.c (start_thread): Hint to the kernel that memory for
302 the stack can be reused. We do not mark all the memory. The part
303 still in use and some reserve are kept.
305 2009-08-23 Ulrich Drepper <drepper@redhat.com>
307 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Clean up namespace.
309 2009-08-11 Ulrich Drepper <drepper@redhat.com>
311 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Add CFI
314 2009-08-10 Ulrich Drepper <drepper@redhat.com>
316 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Add CFI
318 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
320 2009-08-10 Andreas Schwab <schwab@redhat.com>
322 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
323 (__pthread_cond_signal): Don't clobber register used for syscall
326 2009-08-08 Ulrich Drepper <drepper@redhat.com>
328 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
329 Optimize code path used when FUTEX_CLOCK_REALTIME is supported.
331 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
332 (__pthread_cond_wait): Optimize by avoiding use of callee-safe
335 2009-08-07 Ulrich Drepper <drepper@redhat.com>
337 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Little optimizations
338 enabled by the special *_asynccancel functions.
339 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
340 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
342 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Include lowlevellock.h.
344 2009-08-04 Ulrich Drepper <drepper@redhat.com>
346 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: New file.
347 * sysdeps/unix/sysv/linux/x86_64/libc-cancellation.S: New file.
348 * sysdeps/unix/sysv/linux/x86_64/librt-cancellation.S: New file.
349 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Optimize
350 since we can assume the special __*_{en,dis}able_asynccancel
352 (PUSHARGS_*, POPARGS_*, SAVESTK_*, RESTSTK_*): Removed.
353 * sysdeps/x86_64/tcb-offsets.sym: Add cancellation-related bits
354 and PTHREAD_CANCELED.
356 2009-07-31 Ulrich Drepper <drepper@redhat.com>
358 * descr.h: Better definition of *_BITMASK macros for cancellation.
360 2009-07-29 Ulrich Drepper <drepper@redhat.com>
362 * sysdeps/x86_64/tls.h (TLS_TCB_ALIGN): Define explicitly to 32.
364 * sysdeps/x86_64/tls.h (tcbhead_t): Add room for SSE registers the
365 dynamic linker might have to save.
366 Define RTLD_CHECK_FOREIGN_CALL, RTLD_ENABLE_FOREIGN_CALL,
367 RTLD_PREPARE_FOREIGN_CALL, and RTLD_FINALIZE_FOREIGN_CALL. Pretty
370 * sysdeps/x86_64/tcb-offsets.sym: Add RTLD_SAVESPACE_SSE.
372 2009-07-28 Ulrich Drepper <drepper@redhat.com>
374 * pthread_mutex_lock.c [NO_INCR] (__pthread_mutex_cond_lock_adjust):
376 * pthreadP.h: Declare __pthread_mutex_cond_lock_adjust.
377 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: Add ROBUST_BIT.
378 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Don't use
379 requeue_pi for robust mutexes.
380 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
381 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
382 Don't only skip __pthread_mutex_cond_lock. Call instead
383 __pthread_mutex_cond_lock_adjust.
384 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
386 * pthread_mutex_unlock.c (__pthread_mutex_unlock_full): Minor
387 optimization of PI mutex handling.
389 2009-07-27 Ulrich Drepper <drepper@redhat.com>
392 * pthread_mutex_unlock.c (__pthread_mutex_unlock_full): Use _rel
393 instead of of _acq variants of cmpxchg.
395 2009-07-23 Ulrich Drepper <drepper@redhat.com>
397 * sysdeps/x86_64/configure.in: New file.
399 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix error
400 path when not using absolute timeout futex.
402 2009-07-20 Ulrich Drepper <drepper@redhat.com>
404 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Minor
405 optimizations of last changes.
406 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
408 2009-07-19 Ulrich Drepper <drepper@redhat.com>
410 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
411 FUTEX_WAIT_REQUEUE_PI and FUTEX_CMP_REQUEUE_PI.
412 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: If mutex
413 is a PI mutex, then use FUTEX_CMP_REQUEUE_PI.
414 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
415 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: If mutex
416 is a PI mutex, then use FUTEX_WAIT_REQUEUE_PI.
417 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
419 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
420 (__pthread_cond_timedwait): Make more robust.
422 2009-07-18 Ulrich Drepper <drepper@redhat.com>
424 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
425 (__lll_robust_timedlock_wait): If possible use FUTEX_WAIT_BITSET to
426 directly use absolute timeout.
428 * tst-sem5.c (do_test): Add test for premature timeout.
429 * Makefile: Linu tst-sem5 with librt.
431 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
432 (pthread_rwlock_timedwrlock): If possible use FUTEX_WAIT_BITSET to
433 directly use absolute timeout.
434 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
435 (pthread_rwlock_timedrdlock): Likewise.
437 * tst-cond11.c (run_test): Add test to check that the timeout is
440 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
441 (__pthread_cond_timedwait): If possible use FUTEX_WAIT_BITSET to
442 directly use absolute timeout.
444 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
445 (__pthread_cond_wait): Convert to using exception handler instead of
446 registered unwind buffer.
447 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
448 (__pthread_cond_timedwait): Likewise.
450 2009-07-17 Ulrich Drepper <drepper@redhat.com>
452 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
453 If possible use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME to directly
454 use absolute timeout.
456 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Optimize
457 handling of uncontested semaphore.
459 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
460 (__condvar_cleanup): Rewrite to use cfi directives instead of
461 hand-coded unwind tables.
462 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S (__pthread_once):
464 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
465 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
468 2009-06-12 Ulrich Drepper <drepper@redhat.com>
470 * Makefile (libpthread-routines): Add pthread_sigqueue.
471 * Versions: Add pthread_sigqueue for GLIBC_2.11.
472 * sysdeps/pthread/bits/sigthread.h: Declare pthread_sigqueue.
473 * sysdeps/unix/sysv/linux/pthread_sigqueue.c: New file.
475 2009-06-11 Ulrich Drepper <drepper@redhat.com>
478 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
479 (LOAD_FUTEX_WAIT_ABS): Fix futex parameter in case private futexes
481 Patch by Bryan Kadzban <bz-glibc@kdzbn.homelinux.net>.
483 2009-05-16 Ulrich Drepper <drepper@redhat.com>
485 * libc-cancellation.c: Move __libc_cleanup_routine to...
486 * libc-cleanup.c: ...here. New file.
487 * Makefile (routines): Add libc-cleanup.
489 * cancellation.c (__pthread_disable_asynccancel): Remove unnecessary
491 * libc-cancellation.c: Use <nptl/cancellation.c: to define the code.
492 * sysdeps/pthread/librt-cancellation.c: Likewise.
495 * nptl-init.c: Renamed from init.c.
496 * Makefile: Change all occurences of init.c to nptl-init.c.
498 2009-05-15 Ulrich Drepper <drepper@redhat.com>
500 * cancellation.c (__pthread_disable_asynccancel): Correct the bits
501 to test when deciding on the delay.
502 * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
503 * pthread_cancel.c: Close race between deciding on sending a signal
504 and setting the CANCELING_BIT bit.
506 * cancellation.c (__pthread_disable_asynccancel): Don't return if
508 * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
510 2009-04-27 Ulrich Drepper <drepper@redhat.com>
512 * cancellation.c (__pthread_disable_asynccancel): Use THREAD_ATOMIC_AND
514 * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
515 * sysdeps/x86_64/tls.h: Define THREAD_ATOMIC_AND.
516 * sysdeps/i386/tls.h: Likewise.
517 (tcbhead_t): Add __private_tm member.
519 2009-04-26 Ulrich Drepper <drepper@redhat.com>
521 * sem_open.c (sem_open): Rewrite initialization of initsem to
524 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
525 Avoid warning by using may_alias attribute on ptrhack.
527 2009-04-22 Ulrich Drepper <drepper@redhat.com>
530 * pthread_attr_setschedparam.c (__pthread_attr_setschedparam):
531 Check policy and priority for validity.
532 Patch mostly by Zhang Xiliang <zhangxiliang@cn.fujitsu.com>.
534 2009-03-15 Ulrich Drepper <drepper@redhat.com>
536 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
537 (__pthread_cond_timedwait): Change to use cfi directives instead of
538 hand-coded unwind sections.
540 2009-03-10 Ulrich Drepper <drepper@redhat.com>
542 * init.c (nptl_freeres): Compile only for SHARED.
544 2009-03-09 Jakub Jelinek <jakub@redhat.com>
546 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Define
547 FUTEX_WAIT_BITSET, FUTEX_WAKE_BITSET, FUTEX_CLOCK_REALTIME and
548 FUTEX_BITSET_MATCH_ANY.
550 2009-02-27 Roland McGrath <roland@redhat.com>
552 * init.c (__nptl_initial_report_events): Mark __attribute_used__.
553 * pthread_create.c (__nptl_threads_events, __nptl_last_event): Likewise.
555 2009-02-26 Ulrich Drepper <drepper@redhat.com>
557 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
558 _POSIX_THREAD_ROBUST_PRIO_INHERIT and
559 _POSIX_THREAD_ROBUST_PRIO_PROTECT. Reset value of macros from
562 2009-02-25 Ulrich Drepper <drepper@redhat.com>
564 * sysdeps/pthread/pthread.h: The robust mutex functions are in
567 2009-02-24 Ulrich Drepper <drepper@redhat.com>
569 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_BITS_POSIX_OPT_H):
570 Unify name of include protector macro.
572 2009-02-14 SUGIOKA Toshinobu <sugioka@itonet.co.jp>
574 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
575 LOAD_FUTEX_WAIT_ABS even if (FUTEX_WAIT == 0).
577 2009-01-29 Ulrich Drepper <drepper@redhat.com>
579 * sysdeps/pthread/unwind-forcedunwind.c: Encrypt all function
582 * allocatestack.c (__free_stacks): Renamed from free_stacks.
583 (__free_stack_cache): Removed. Change callers to call __free_stacks.
584 * init.c (nptl_freeres): New function.
585 (pthread_functions): Initialize ptr_freeres to nptl_freeres.
586 * pthreadP.h: Don't declare __free_stack_cache. Declare __free_stacks.
587 * sysdeps/pthread/unwind-forcedunwind.c (libgcc_s_handle): New
589 (pthread_cancel_init): Depend in libgcc_s_handle for decision to
590 load DSO. Assign last.
591 (__unwind_freeres): New function.
593 * allocatestack.c (__reclaim_stacks): Reset in_flight_stack later
594 for better debugging. No need to use stack_list_add here.
596 2009-01-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
598 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
599 (__lll_timedlock_wait): Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME
600 instead of computing relative timeout.
601 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
602 FUTEX_CLOCK_REALTIME and FUTEX_BITSET_MATCH_ANY.
604 2009-01-25 Ulrich Drepper <drepper@redhat.com>
606 * pthread_mutex_lock.c (__pthread_mutex_lock): Remove unused label out.
608 2009-01-08 Ulrich Drepper <drepper@redhat.com>
610 * sysdeps/pthread/list.h (list_add): Initialize new element first.
611 (list_add_tail): Removed.
613 2009-01-07 Ulrich Drepper <drepper@redhat.com>
615 * (in_flight_stack): New variable.
616 (stack_list_del): New function. Use instead of list_del.
617 (stack_list_add): New function. Use instead of list_add when adding to
618 stack_cache and stack_used lists.
619 (__reclaim_stacks): Complete operations on stack_cache and stack_used lists
620 when the fork call interrupted another thread.
622 2009-01-04 Ulrich Drepper <drepper@redhat.com>
624 * init.c (__pthread_initialize_minimal_internal): Optimize test
625 FUTEX_CLOCK_REALTIME a bit.
627 2009-01-03 Ulrich Drepper <drepper@redhat.com>
629 * init.c (__pthread_initialize_minimal_internal): Cheat a bit by
630 only passing five parameters to FUTEX_WAIT_BITSET call.
632 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
633 (__lll_timedlock_wait): Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME
634 instead of computing relative timeout.
636 2009-01-02 Ulrich Drepper <drepper@redhat.com>
638 * init.c (__pthread_initialize_minimal_internal): Check for
639 FUTEX_CLOCK_REALTIME flag.
640 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
641 Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME instead of computing
644 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
645 FUTEX_CLOCK_REALTIME and FUTEX_BITSET_MATCH_ANY.
646 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
647 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
648 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
649 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
651 2008-12-09 Ulrich Drepper <drepper@redhat.com>
653 * sysdeps/pthread/pthread.h (pthread_cleanup_pop): Use { } as empty
654 loop body instead of ; to avoid gcc warnings.
655 (pthread_cleanup_pop_restore_np): Likewise.
656 Patch by Caolán McNamara <caolanm@redhat.com>.
658 2008-12-09 Jakub Jelinek <jakub@redhat.com>
660 * pthread_mutex_lock.c (__pthread_mutex_lock): Handle only the
661 fast path here, for robust/PI/PP mutexes call
662 __pthread_mutex_lock_full. Don't use switch, instead use a series
663 of ifs according to their probability.
664 (__pthread_mutex_lock_full): New function.
665 * pthread_mutex_unlock.c: Include assert.h.
666 (__pthread_mutex_unlock_usercnt): Handle only the
667 fast path here, for robust/PI/PP mutexes call
668 __pthread_mutex_unlock_full. Don't use switch, instead use a series
669 of ifs according to their probability.
670 (__pthread_mutex_unlock_full): New function.
671 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c
672 (__pthread_mutex_lock_full): Define.
674 2008-12-08 Ulrich Drepper <drepper@redhat.com>
676 * sysdeps/x86_64/tls.h (tcbhead_t): Add fields reserved for TM
677 implementation. Add necessary padding and.
678 * descr.h (struct pthread): Increase padding for tcbhead_t to 24
681 2008-12-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
683 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define FUTEX_WAIT_BITSET
684 and FUTEX_WAKE_BITSET.
686 2008-12-02 Ulrich Drepper <drepper@redhat.com>
688 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_WAIT_BITSET
689 and FUTEX_WAKE_BITSET.
690 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
691 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
692 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
693 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
695 2008-11-25 Roland McGrath <roland@redhat.com>
697 * sysdeps/alpha, sysdeps/unix/sysv/linux/alpha:
698 Subdirectories moved to ports repository as
699 sysdeps/.../nptl subdirectories.
701 2008-11-12 Jakub Jelinek <jakub@redhat.com>
704 * pthread_condattr_setclock.c (pthread_condattr_setclock): Fix masking
706 * pthread_cond_init.c (__pthread_cond_init): Fix
707 cond->__data.__nwaiters initialization.
708 * Makefile (tests): Add tst-cond23.
709 * tst-cond23.c: New test.
711 2008-11-07 Jakub Jelinek <jakub@redhat.com>
713 * sysdeps/pthread/malloc-machine.h (MALLOC): Adjust __libc_tsd_define
715 (tsd_setspecific, tsd_getspecific): Adjust __libc_tsd_{set,get}
718 2008-11-01 Ulrich Drepper <drepper@redhat.com>
721 * pthread_mutex_lock.c: Add support for private PI mutexes.
722 * pthread_mutex_timedlock.c: Likewise.
723 * pthread_mutex_trylock.c: Likewise.
724 * pthread_mutex_unlock.c: Likewise.
725 Patch mostly by Ben Jackson <ben@ben.com>.
727 2008-10-31 Ulrich Drepper <drepper@redhat.com>
730 * sysdeps/pthread/gai_misc.h (__gai_create_helper_thread):
731 Increase stack size for helper thread.
733 2008-10-06 Martin Schwidefsky <schwidefsky@de.ibm.com>
735 * sysdeps/s390/tls.h (THREAD_SET_STACK_GUARD): Add empty inline
736 assembly with a clobber list for access registers a0 and a1.
738 2008-09-11 Martin Schwidefsky <schwidefsky@de.ibm.com>
740 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Add memory barrier
741 to force runp->refcntr to be read from memory.
743 2008-09-08 Richard Guenther <rguenther@suse.de>
745 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_lock,
746 lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
747 lll_timedlock, lll_robust_timedlock, lll_unlock,
748 lll_robust_unlock): Promote private to int.
750 2008-08-15 Ulrich Drepper <drepper@redhat.com>
752 * sysdeps/x86_64/pthreaddef.h: Remove ARCH_MAP_FLAGS and
753 ARCH_RETRY_MMAP definitions.
754 * allocatestack.c: Remove definition of ARCH_MAP_FLAGS.
755 Define MAP_STACK when not defined.
756 (allocate_stack): Use MAP_STACK instead of ARCH_MAP_FLAGS. Remove
757 handling of ARCH_RETRY_MMAP.
759 2008-07-30 Ulrich Drepper <drepper@redhat.com>
761 * tst-align2.c (f): Print message that f is reached.
763 2008-04-28 Hiroki Kaminaga <kaminaga@sm.sony.co.jp>
766 * sysdeps/powerpc/tcb-offsets.sym (PRIVATE_FUTEX_OFFSET): Guard symbol
767 definition with #ifndef __ASSUME_PRIVATE_FUTEX.
769 2008-07-25 Ulrich Drepper <drepper@redhat.com>
771 * sysdeps/unix/sysv/linux/mq_notify.c (init_mq_netlink): Use
772 SOCK_CLOEXEC if possible.
774 2008-05-29 Ulrich Drepper <drepper@redhat.com>
776 * Makefile (tests): Add tst-rwlock2a.
777 * tst-rwlock2.c: Use TYPE macro to decide what rwlock type to use.
778 * tst-rwlock2a.c: New file.
780 2008-06-12 Ulrich Drepper <drepper@redhat.com>
782 * sysdeps/pthread/pthread.h: Remove inadvertant checkin.
784 2008-05-17 Samuel Thibault <samuel.thibault@ens-lyon.org>
786 * sysdeps/pthread/pthread.h: Fix typo in comment.
788 2008-05-28 Ulrich Drepper <drepper@redhat.com>
790 * sysdeps/pthread/createthread.c (do_clone): Pass accurate length
791 of CPU set to the kernel.
793 2008-05-23 Paul Pluzhnikov <ppluzhnikov@google.com>
795 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Add
797 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
798 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
799 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
800 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
801 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
802 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
804 2008-05-22 Paul Pluzhnikov <ppluzhnikov@google.com>
806 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S: Add
808 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
810 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
812 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
815 2008-05-26 Ulrich Drepper <drepper@redhat.com>
817 * tst-typesizes.c: Explicitly check __SIZEOF_PTHREAD_* constants.
819 2008-05-20 Jakub Jelinek <jakub@redhat.com>
821 David S. Miller <davem@davemloft.net>
823 * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: New file.
825 2008-05-10 Ulrich Drepper <drepper@redhat.com>
827 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Access
829 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
831 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
833 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
835 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
837 Reported by Clemens Kolbitsch <clemens.kol@gmx.at>.
839 2008-04-14 David S. Miller <davem@davemloft.net>
841 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
842 (__old_sem_wait): Fix argument to lll_futex_wait().
844 2007-11-26 Daniel Jacobowitz <dan@codesourcery.com>
846 * pthread_create.c: Require pthread_mutex_trylock and
847 pthread_key_delete for libgcc.
849 2008-04-08 Jakub Jelinek <jakub@redhat.com>
852 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h
853 (lll_futex_wake_unlock): Add private argument to the pre-v9 macro.
854 Patch by Sunil Amitkumar Janki <devel.sjanki@gmail.com>.
856 2008-03-27 Ulrich Drepper <drepper@redhat.com>
858 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine ARG_MAX if
859 <linux/limits.h> has defined it.
860 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
861 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
862 * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
863 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
865 2008-03-18 Jakub Jelinek <jakub@redhat.com>
867 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Use __ASSEMBLER__ instead
869 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
870 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Likewise.
872 2008-03-14 Ulrich Drepper <drepper@redhat.com>
874 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
875 HAVE_DL_DISCOVER_OSVERSION.
876 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
877 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Likewise.
879 2008-03-07 Ulrich Drepper <drepper@redhat.com>
882 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Change
883 _POSIX_CHOWN_RESTRICTED value to zero.
885 2008-01-31 Roland McGrath <roland@redhat.com>
887 * Makefile (omit-deps): Variable removed.
889 2008-01-30 Ulrich Drepper <drepper@redhat.com>
891 * sysdeps/unix/sysv/linux/x86_64/sem_post.S (sem_post): Avoid
892 unnecessary addr32 prefix.
894 2008-01-29 Roland McGrath <roland@redhat.com>
896 * Makeconfig (ptw-CPPFLAGS, sysd-rules-patterns): New variables.
898 2008-01-22 Kaz Kojima <kkojima@rr.iij4u.or.jp>
900 * sysdeps/unix/sysv/linux/sh/sem_post.S: Don't overflow value field.
902 2008-01-21 Kaz Kojima <kkojima@rr.iij4u.or.jp>
904 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XADD): Use
906 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
907 (__lll_lock_wait_private): Fix typo.
908 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
909 (pthread_barrier_wait): Likewise. Adjust XADD use.
910 * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
912 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S
913 (pthread_rwlock_timedrdlock): Return correct return value.
914 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S
915 (pthread_rwlock_timedwrlock): Likewise.
917 2008-01-15 Ulrich Drepper <drepper@redhat.com>
919 * tst-eintr2.c (do_test): make sure that if mutex_lock in main
920 thread returns the program exits with an error code.
922 2008-01-10 Ulrich Drepper <drepper@redhat.com>
924 * pthread-errnos.sym: Add EOVERFLOW.
925 * sysdeps/unix/sysv/linux/structsem.sym: Add SEM_VALUE_MAX.
926 * sysdeps/unix/sysv/linux/sem_post.c: Don't overflow value field.
927 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
928 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
930 2007-12-14 Ulrich Drepper <drepper@redhat.com>
932 * sysdeps/x86_64/pthreaddef.h (ARCH_RETRY_MMAP): Take additional
933 parameter. Passed it as permission to mmap.
934 * allocatestack.c (allocate_stack): Pass prot as second parameter
937 2007-12-12 Ulrich Drepper <drepper@redhat.com>
939 * tst-basic7.c: Allocate memory for the stack.
942 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S [!SHARED]
943 (__pthread_cond_timedwait): Don't use VDSO.
944 Patch by Michal Januszewski.
946 2007-12-07 Ulrich Drepper <drepper@redhat.com>
949 * sysdeps/pthread/pthread.h [!__EXCEPTIONS] (pthread_cleanup_pop):
950 Allow label before pthread_cleanup_pop.
951 (pthread_cleanup_pop_restore_np): Likewise.
953 2007-12-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
955 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
956 Store 2 before returning ETIMEDOUT.
958 2007-11-23 Ulrich Drepper <drepper@redhat.com>
960 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
961 Store 2 before returning ETIMEDOUT.
962 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise
963 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
964 (__lll_lock_wait_private): Optimize.
965 (__lll_lock_wait): Likewise.
967 2007-11-20 Jakub Jelinek <jakub@redhat.com>
969 * sysdeps/pthread/pthread.h (pthread_cleanup_push,
970 pthread_cleanup_push_defer_np): Add extra (void *) cast to shut up
971 g++ 4.1 and 4.2 -Wstrict-aliasing warnings.
973 2007-11-08 Ulrich Drepper <drepper@redhat.com>
976 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
977 If we time out, try one last time to lock the futex to avoid
978 losing a wakeup signal.
979 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
980 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
983 * sysdeps/pthread/createthread.c (do_clone): Translate clone error
986 2007-11-07 Ulrich Drepper <drepper@redhat.com>
989 * allocatestack.c (allocate_stack): Change ENOMEM error in case
990 mmap failed to EAGAIN.
991 * Makefile (tests): Add tst-basic7.
992 * tst-basic7.c: New file.
994 2007-11-05 Ulrich Drepper <drepper@redhat.com>
996 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
999 2007-11-03 Mike Frysinger <vapier@gentoo.org>
1001 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (LOAD_FUTEX_WAIT): Add
1002 missing line continuations.
1003 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S (LOAD_FUTEX_WAIT,
1004 LOAD_FUTEX_WAKE): Likewise. Also add missing 3rd parameter.
1006 2007-10-28 Ulrich Drepper <drepper@redhat.com>
1009 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Declare
1010 __active_timer_sigev_thread and __active_timer_sigev_thread_lock.
1011 (struct timer): Add next element.
1012 * sysdeps/unix/sysv/linux/timer_create.c: For SIGEV_THREAD timers,
1013 enqueue timer structure into __active_timer_sigev_thread list.
1014 * sysdeps/unix/sysv/linux/timer_delete.c: For SIGEV_THREAD timers,
1015 remove timer struct from __active_timer_sigev_thread.
1016 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
1017 Before using timer structure make sure it is still on the
1018 __active_timer_sigev_thread list. Keep lock until done.
1019 Define __active_timer_sigev_thread and
1020 __active_timer_sigev_thread_lock.
1022 2007-10-27 Ulrich Drepper <drepper@redhat.com>
1024 * sysdeps/pthread/malloc-machine.h: Define ATFORK_MEM.
1025 Redefine thread_atfork for use of ATFORK_MEM.
1026 * sysdeps/unix/sysv/linux/fork.h: Define __linkin_atfork.
1027 * sysdeps/unix/sysv/linux/register-atfork.c (__linkin_atfork): New
1029 * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
1030 Use atomic operation when removing first element of list.
1032 2007-10-17 Jakub Jelinek <jakub@redhat.com>
1034 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__old_sem_post): New
1035 routine instead of an alias to __new_sem_post.
1037 2007-10-15 Jakub Jelinek <jakub@redhat.com>
1039 * init.c (__pthread_initialize_minimal): Initialize word to appease
1042 2007-10-10 Jakub Jelinek <jakub@redhat.com>
1044 * sysdeps/pthread/bits/libc-lock.h (__libc_rwlock_init): Inside of
1045 libc.so just clear NAME.
1046 (__libc_rwlock_fini): Nop inside of libc.so.
1047 * tst-initializers1.c (main): Test if PTHREAD_RWLOCK_INITIALIZER is
1050 2007-09-02 Ulrich Drepper <drepper@redhat.com>
1052 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
1053 (__pthread_cond_wait): Fix unlocking of internal lock after mutex
1055 Patch by Luca Barbieri <luca.barbieri@gmail.com>.
1057 2007-08-21 Ulrich Drepper <drepper@redhat.com>
1060 * allocatestack.c (__reclaim_stacks): Clear the TSD in the
1061 reclaimed stack if necessary.
1062 * Makefile (tests): Add tst-tsd6.
1063 * tst-tsd6.c: New file.
1065 2007-08-21 Jakub Jelinek <jakub@redhat.com>
1067 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_dead):
1068 Add private argument.
1070 2007-08-20 Ulrich Drepper <drepper@redhat.com>
1072 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1073 (__pthread_cond_timedwait): Use clock_gettime from VDSO if possible.
1075 2007-08-16 Jakub Jelinek <jakub@redhat.com>
1077 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h
1078 (__lll_robust_timedlock): Pass private as last argument to
1079 __lll_robust_timedlock_wait.
1080 (__lll_unlock): Fix a pasto.
1082 2007-08-15 Jakub Jelinek <jakub@redhat.com>
1084 * sysdeps/unix/sysv/linux/sparc/internaltypes.h (sparc_new_sem,
1085 sparc_old_sem): New structs.
1086 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
1087 (__sem_wait_cleanup): New function.
1088 (__new_sem_wait): Use sparc_new_sem structure. Bump and afterwards
1089 decrease nwaiters. Register __sem_wait_cleanup as cleanup handler.
1090 Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
1092 (__old_sem_wait): New function.
1093 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: Include
1094 nptl/sysdeps/unix/sysv/linux/sparc version.
1095 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c:
1097 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: Likewise.
1098 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c
1099 (__new_sem_trywait): Use sparc_old_sem structure.
1100 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c
1101 (sem_timedwait): Use sparc_new_sem structure. Bump and afterwards
1102 decrease nwaiters. Register __sem_wait_cleanup as cleanup handler.
1103 Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
1104 lll_futex_timed_wait.
1105 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c (__new_sem_post):
1106 Use sparc_new_sem structure. Only wake if nwaiters > 0. Pass
1107 isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
1109 (__old_sem_post): New function.
1110 * sysdeps/unix/sysv/linux/sparc/sem_wait.c: New file.
1111 * sysdeps/unix/sysv/linux/sparc/sem_init.c: New file.
1112 * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c: New file.
1113 * sysdeps/unix/sysv/linux/sparc/sem_post.c: New file.
1114 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: Remove.
1115 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: Remove.
1117 2007-08-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1119 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
1120 (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
1121 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
1122 Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
1123 * sysdeps/unix/sysv/linux/shpthread_cond_signal.S
1124 (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
1125 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
1127 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
1128 kernel-features.h and tcb-offsets.h.
1129 (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
1130 lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
1132 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
1134 (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE
1135 to lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
1137 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use #ifdef
1138 __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
1139 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
1140 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
1141 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
1142 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
1143 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
1145 2007-08-14 Jakub Jelinek <jakub@redhat.com>
1147 * sysdeps/unix/sysv/linux/lowlevellock.c: Comment fix.
1148 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
1149 (__lll_timedwait_tid): Pass LLL_SHARED as 4th argument to
1150 lll_futex_timed_wait.
1152 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (__lll_unlock,
1153 __lll_robust_unlock): Rewrite as macros instead of inline functions.
1154 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_unlock,
1155 __lll_robust_unlock, __lll_wait_tid): Likewise.
1157 2007-08-13 Jakub Jelinek <jakub@redhat.com>
1159 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
1161 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
1162 (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
1163 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
1164 Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
1165 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
1166 (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
1167 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
1168 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Include
1170 (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
1171 lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
1172 process private. Switch DW_CFA_advance_loc1 and some
1173 DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
1174 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
1175 (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE to
1176 lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
1177 process private. Switch DW_CFA_advance_loc{1,2} and some
1178 DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
1179 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use
1180 #ifdef __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
1181 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1183 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
1184 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
1185 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1187 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
1188 (__pthread_cond_broadcast): Compare %r8 instead of
1189 dep_mutex-cond_*(%rdi) with $-1.
1190 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
1191 (__pthread_cond_signal): Xor FUTEX_WAKE_OP with FUTEX_WAKE instead
1194 2007-08-13 Ulrich Drepper <drepper@redhat.com>
1196 * sysdeps/unix/sysv/linux/i386/i786/Implies: New file.
1198 2007-08-13 Jakub Jelinek <jakub@redhat.com>
1200 * allocatestack.c: Include kernel-features.h.
1201 * pthread_create.c: Likewise.
1202 * pthread_mutex_init.c: Likewise.
1204 * pthread_cond_timedwait.c: Likewise.
1205 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
1206 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
1207 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
1208 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
1209 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
1210 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1211 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1213 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1215 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
1216 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
1217 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
1218 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
1220 2007-08-12 Jakub Jelinek <jakub@redhat.com>
1222 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
1223 [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
1224 byte elements. One of them is the new __shared element.
1225 [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
1226 adjust names of other padding elements.
1227 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
1228 [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
1229 byte elements. One of them is the new __shared element.
1230 [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
1231 adjust names of other padding elements.
1232 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_rwlock_t):
1233 Renamed __pad1 element to __shared, adjust names of other padding
1235 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
1236 (pthread_rwlock_t): Likewise.
1237 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock): Fix a
1240 2007-08-09 Anton Blanchard <anton@samba.org>
1242 * sysdeps/unix/sysv/linux/powerpc/pthread_spin_unlock.c: New file.
1244 2007-08-12 Ulrich Drepper <drepper@redhat.com>
1246 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Include
1247 <kernel-features.h>.
1248 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1250 2007-08-11 Ulrich Drepper <drepper@redhat.com>
1252 * pthreadP.h (PTHREAD_ROBUST_MUTEX_PSHARED): Define.
1253 * pthread_mutex_lock.c: Use it instead of PTHREAD_MUTEX_PSHARED when
1254 dealing with robust mutexes.
1255 * pthread_mutex_timedlock.c: Likewise.
1256 * pthread_mutex_trylock.c: Likewise.
1257 * pthread_mutex_unlock.c: Likewise.
1258 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
1260 2007-08-06 Jakub Jelinek <jakub@redhat.com>
1262 * pthreadP.h (PTHREAD_MUTEX_PSHARED_BIT): Define.
1263 (PTHREAD_MUTEX_TYPE): Mask __kind with 127.
1264 (PTHREAD_MUTEX_PSHARED): Define.
1265 * pthread_mutex_init.c (__pthread_mutex_init): Set
1266 PTHREAD_MUTEX_PSHARED_BIT for pshared or robust
1268 * pthread_mutex_lock.c (LLL_MUTEX_LOCK): Take mutex as argument
1269 instead of its __data.__lock field, pass PTHREAD_MUTEX_PSHARED
1270 as second argument to lll_lock.
1271 (LLL_MUTEX_TRYLOCK): Take mutex as argument
1272 instead of its __data.__lock field.
1273 (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
1274 __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
1276 (__pthread_mutex_lock): Update LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
1277 LLL_ROBUST_MUTEX_LOCK users, use PTHREAD_MUTEX_TYPE (mutex)
1278 instead of mutex->__data.__kind directly, pass
1279 PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock and lll_futex_wait.
1280 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Use
1281 PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
1282 directly, pass PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock.
1283 (pthread_mutex_timedlock): Pass PTHREAD_MUTEX_PSHARED (mutex)
1284 to lll_timedlock, lll_robust_timedlock, lll_unlock and
1285 lll_futex_timed_wait. Use PTHREAD_MUTEX_TYPE (mutex) instead
1286 of mutex->__data.__kind directly.
1287 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Pass
1288 PTHREAD_MUTEX_PSHARED (mutex) to lll_timedlock,
1289 lll_robust_timedlock, lll_unlock and lll_futex_timed_wait. Use
1290 PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind directly.
1291 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Pass
1292 PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock, lll_robust_unlock
1294 * pthread_mutex_setprioceiling.c (pthread_mutex_setprioceiling): Pass
1295 PTHREAD_MUTEX_PSHARED (mutex) to lll_futex_wait and lll_futex_wake.
1296 Use PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
1298 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK):
1299 Take mutex as argument instead of its __data.__lock field, pass
1300 PTHREAD_MUTEX_PSHARED as second argument to lll_cond_lock.
1301 (LLL_MUTEX_TRYLOCK): Take mutex as argument instead of its
1302 __data.__lock field.
1303 (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
1304 __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
1305 to lll_robust_cond_lock.
1306 * pthread_cond_broadcast.c (__pthread_cond_broadcast): Add pshared
1307 variable, pass it to lll_lock, lll_unlock, lll_futex_requeue and
1308 lll_futex_wake. Don't use lll_futex_requeue if dependent mutex
1309 has PTHREAD_MUTEX_PSHARED_BIT bit set in its __data.__kind.
1310 * pthread_cond_destroy.c (__pthread_cond_destroy): Add pshared
1311 variable, pass it to lll_lock, lll_unlock, lll_futex_wake and
1313 * pthread_cond_signal.c (__pthread_cond_signal): Add pshared
1314 variable, pass it to lll_lock, lll_unlock, lll_futex_wake_unlock and
1316 * pthread_cond_timedwait.c (__pthread_cond_wait): Add
1317 pshared variable, pass it to lll_lock, lll_unlock,
1318 lll_futex_timedwait and lll_futex_wake.
1319 * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait): Add
1320 pshared variable, pass it to lll_lock, lll_unlock, lll_futex_wait
1322 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_requeue,
1323 lll_futex_wake_unlock): Add private argument, use __lll_private_flag
1325 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue,
1326 lll_futex_wake_unlock): Likewise.
1327 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_requeue):
1329 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_futex_requeue,
1330 lll_futex_wake_unlock): Likewise.
1331 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_requeue):
1333 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue,
1334 lll_futex_wake_unlock): Likewise.
1335 (lll_futex_wake): Fix a typo.
1336 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym (PS_BIT): Add.
1337 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
1338 (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
1339 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
1340 Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
1341 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
1342 (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
1343 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
1344 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1345 (__pthread_cond_timedwait): Likewise.
1346 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
1347 (__condvar_cleanup, __pthread_cond_wait): Likewise.
1349 2007-08-05 Jakub Jelinek <jakub@redhat.com>
1351 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
1352 Don't use CGOTSETUP and CGOTRESTORE macros.
1353 (CGOTSETUP, CGOTRESTORE): Remove.
1354 <IS_IN_rtld> (CENABLE, CDISABLE): Don't use JUMPTARGET, branch to
1357 2007-08-01 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1359 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Remove
1360 definitions for private futexes.
1361 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Include
1362 kernel-features.h and lowlevellock.h. Use private futexes if
1364 (__lll_lock_wait_private, __lll_unlock_wake_private): New.
1365 (__lll_mutex_lock_wait): Rename to
1366 (__lll_lock_wait): ... this. Don't compile in for libc.so.
1367 (__lll_mutex_timedlock_wait): Rename to ...
1368 (__lll_timedlock_wait): ... this. Use __NR_gettimeofday.
1369 Don't compile in for libc.so.
1370 (__lll_mutex_unlock_wake): Rename to ...
1371 (__lll_unlock_wake): ... this. Don't compile in for libc.so.
1372 (__lll_timedwait_tid): Use __NR_gettimeofday.
1373 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Allow including
1374 the header from assembler. Renamed all lll_mutex_* resp.
1375 lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
1376 Renamed all LLL_MUTEX_LOCK_* macros to LLL_LOCK_*.
1377 (FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE):
1379 (__lll_lock_wait_private): Add prototype.
1380 (__lll_lock_wait, __lll_timedlock_wait, __lll_robust_lock_wait,
1381 __lll_robust_timedlock_wait, __lll_unlock_wake_private,
1382 __lll_unlock_wake): Likewise.
1383 (lll_lock): Add private argument. Call __lll_lock_wait_private
1384 if private is constant LLL_PRIVATE.
1385 (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
1386 lll_timedlock, lll_robust_timedlock): Add private argument.
1387 (lll_unlock): Add private argument. Call __lll_unlock_wake_private
1388 if private is constant LLL_PRIVATE.
1389 (lll_robust_unlock, lll_robust_dead): Add private argument.
1390 (lll_lock_t): Remove.
1391 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
1392 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
1393 lll_cond_wake, lll_cond_broadcast): Remove.
1394 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: Include
1395 kernel-features.h and lowlevellock.h.
1396 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
1397 (LOAD_FUTEX_WAIT): Define.
1398 (__lll_robust_mutex_lock_wait): Rename to ...
1399 (__lll_robust_lock_wait): ... this. Add private argument.
1400 Use LOAD_FUTEX_WAIT macro.
1401 (__lll_robust_mutex_timedlock_wait): Rename to ...
1402 (__lll_robust_timedlock_wait): ... this. Add private argument.
1403 Use __NR_gettimeofday. Use LOAD_FUTEX_WAIT macro.
1404 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Include
1406 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
1407 (pthread_barrier_wait): Use __lll_{lock,unlock}_* instead of
1408 __lll_mutex_{lock,unlock}_*.
1409 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Include
1410 lowlevellock.h and pthread-errnos.h.
1411 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
1412 FUTEX_CMP_REQUEUE, EINVAL): Remove.
1413 (__pthread_cond_broadcast): Use __lll_{lock,unlock}_* instead of
1414 __lll_mutex_{lock,unlock}_*.
1415 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Include
1416 lowlevellock.h and pthread-errnos.h.
1417 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE, EINVAL): Remove.
1418 (__pthread_cond_signal): Use __lll_{lock,unlock}_* instead of
1419 __lll_mutex_{lock,unlock}_*.
1420 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
1422 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE): Remove.
1423 (__pthread_cond_timedwait): Use __lll_{lock,unlock}_* instead of
1424 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
1425 (__condvar_tw_cleanup): Likewise.
1426 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
1428 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
1429 (__pthread_cond_wait): Use __lll_{lock,unlock}_* instead of
1430 __lll_mutex_{lock,unlock}_*.
1431 ( __condvar_w_cleanup): Likewise.
1432 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Include lowlevellock.h.
1433 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
1434 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Include
1436 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
1437 (__pthread_rwlock_rdlock): Use __lll_{lock,unlock}_* instead of
1438 __lll_mutex_{lock,unlock}_*.
1439 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Include
1441 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
1442 FUTEX_PRIVATE_FLAG): Remove.
1443 (pthread_rwlock_timedrdlock): Use __lll_{lock,unlock}_* instead of
1444 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
1445 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Include
1447 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
1448 FUTEX_PRIVATE_FLAG): Remove.
1449 (pthread_rwlock_timedwrlock): Use __lll_{lock,unlock}_* instead of
1450 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
1451 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Include
1453 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
1454 (__pthread_rwlock_unlock): Use __lll_{lock,unlock}_* instead of
1455 __lll_mutex_{lock,unlock}_*.
1456 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Include
1458 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
1459 (__pthread_rwlock_wrlock): Use __lll_{lock,unlock}_* instead of
1460 __lll_mutex_{lock,unlock}_*.
1461 * sysdeps/unix/sysv/linux/sh/sem_post.S: Include lowlevellock.h.
1462 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
1463 (__new_sem_post): Use standard initial exec code sequences.
1464 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Include
1466 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
1467 FUTEX_PRIVATE_FLAG): Remove.
1468 (sem_timedwait): Use __NR_gettimeofday. Use standard initial
1469 exec code sequences.
1470 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Include lowlevellock.h.
1471 (__new_sem_trywait): Use standard initial exec code sequences.
1472 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Include lowlevellock.h.
1473 (__new_sem_wait): Use standard initial exec code sequences.
1475 2007-07-31 Anton Blanchard <anton@samba.org>
1477 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
1478 Use __asm __volatile (__lll_acq_instr ::: "memory") instead of
1479 atomic_full_barrier.
1481 2007-07-31 Jakub Jelinek <jakub@redhat.com>
1483 * allocatestack.c (stack_cache_lock): Change type to int.
1484 (get_cached_stack, allocate_stack, __deallocate_stack,
1485 __make_stacks_executable, __find_thread_by_id, __nptl_setxid,
1486 __pthread_init_static_tls, __wait_lookup_done): Add LLL_PRIVATE
1487 as second argument to lll_lock and lll_unlock macros on
1489 * pthread_create.c (__find_in_stack_list): Likewise.
1490 (start_thread): Similarly with pd->lock. Use lll_robust_dead
1491 macro instead of lll_robust_mutex_dead, pass LLL_SHARED to it
1493 * descr.h (struct pthread): Change lock and setxid_futex field
1495 * old_pthread_cond_broadcast.c (__pthread_cond_broadcast_2_0): Use
1496 LLL_LOCK_INITIALIZER instead of LLL_MUTEX_LOCK_INITIALIZER.
1497 * old_pthread_cond_signal.c (__pthread_cond_signal_2_0): Likewise.
1498 * old_pthread_cond_timedwait.c (__pthread_cond_timedwait_2_0):
1500 * old_pthread_cond_wait.c (__pthread_cond_wait_2_0): Likewise.
1501 * pthread_cond_init.c (__pthread_cond_init): Likewise.
1502 * pthreadP.h (__attr_list_lock): Change type to int.
1503 * pthread_attr_init.c (__attr_list_lock): Likewise.
1504 * pthread_barrier_destroy.c (pthread_barrier_destroy): Pass
1505 ibarrier->private ^ FUTEX_PRIVATE_FLAG as second argument to
1507 * pthread_barrier_wait.c (pthread_barrier_wait): Likewise and
1508 also for lll_futex_{wake,wait}.
1509 * pthread_barrier_init.c (pthread_barrier_init): Make iattr
1511 * pthread_cond_broadcast.c (__pthread_cond_broadcast): Pass
1512 LLL_SHARED as second argument to lll_{,un}lock.
1513 * pthread_cond_destroy.c (__pthread_cond_destroy): Likewise.
1514 * pthread_cond_signal.c (__pthread_cond_singal): Likewise.
1515 * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
1516 * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait):
1518 * pthread_getattr_np.c (pthread_getattr_np): Add LLL_PRIVATE
1519 as second argument to lll_{,un}lock macros on pd->lock.
1520 * pthread_getschedparam.c (__pthread_getschedparam): Likewise.
1521 * pthread_setschedparam.c (__pthread_setschedparam): Likewise.
1522 * pthread_setschedprio.c (pthread_setschedprio): Likewise.
1523 * tpp.c (__pthread_tpp_change_priority, __pthread_current_priority):
1525 * sysdeps/pthread/createthread.c (do_clone, create_thread):
1527 * pthread_once.c (once_lock): Change type to int.
1528 (__pthread_once): Pass LLL_PRIVATE as second argument to
1529 lll_{,un}lock macros on once_lock.
1530 * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Use
1531 lll_{,un}lock macros instead of lll_mutex_{,un}lock, pass
1532 rwlock->__data.__shared as second argument to them and similarly
1534 * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock):
1536 * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock):
1538 * pthread_rwlock_tryrdlock.c (__pthread_rwlock_tryrdlock): Likewise.
1539 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Likewise.
1540 * pthread_rwlock_unlock.c (__pthread_rwlock_unlock): Likewise.
1541 * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
1542 * sem_close.c (sem_close): Pass LLL_PRIVATE as second argument
1543 to lll_{,un}lock macros on __sem_mappings_lock.
1544 * sem_open.c (check_add_mapping): Likewise.
1545 (__sem_mappings_lock): Change type to int.
1546 * semaphoreP.h (__sem_mappings_lock): Likewise.
1547 * pthread_mutex_lock.c (LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
1548 LLL_ROBUST_MUTEX_LOCK): Use lll_{,try,robust_}lock macros
1549 instead of lll_*mutex_*, pass LLL_SHARED as last
1551 (__pthread_mutex_lock): Use lll_unlock instead of lll_mutex_unlock,
1552 pass LLL_SHARED as last argument.
1553 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK,
1554 LLL_MUTEX_TRYLOCK, LLL_ROBUST_MUTEX_LOCK): Use
1555 lll_{cond_,cond_try,robust_cond}lock macros instead of lll_*mutex_*,
1556 pass LLL_SHARED as last argument.
1557 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
1558 lll_{timed,try,robust_timed,un}lock instead of lll_*mutex*, pass
1559 LLL_SHARED as last argument.
1560 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Similarly.
1561 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt):
1563 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_lock,
1564 __libc_lock_lock_recursive, __libc_lock_unlock,
1565 __libc_lock_unlock_recursive): Pass LLL_PRIVATE as second
1566 argument to lll_{,un}lock.
1567 * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_lock,
1568 _IO_lock_unlock): Likewise.
1569 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Don't use
1571 * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
1572 Pass LLL_PRIVATE as second argument to lll_{,un}lock macros on
1574 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork,
1575 free_mem): Likewise.
1576 (__fork_lock): Change type to int.
1577 * sysdeps/unix/sysv/linux/fork.h (__fork_lock): Likewise.
1578 * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Pass
1579 isem->private ^ FUTEX_PRIVATE_FLAG as second argument to
1581 * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
1582 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Likewise.
1583 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait_private):
1585 (__lll_lock_wait, __lll_timedlock_wait): Add private argument and
1586 pass it through to lll_futex_*wait, only compile in when
1588 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
1589 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): Add private
1590 argument and pass it through to lll_futex_*wait.
1591 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Renamed all
1592 lll_mutex_* resp. lll_robust_mutex_* macros to lll_* resp.
1593 lll_robust_*. Renamed all __lll_mutex_* resp. __lll_robust_mutex_*
1594 inline functions to __lll_* resp. __lll_robust_*.
1595 (LLL_MUTEX_LOCK_INITIALIZER): Remove.
1596 (lll_mutex_dead): Add private argument.
1597 (__lll_lock_wait_private): New prototype.
1598 (__lll_lock_wait, __lll_robust_lock_wait, __lll_lock_timedwait,
1599 __lll_robust_lock_timedwait): Add private argument to prototypes.
1600 (__lll_lock): Add private argument, if it is constant LLL_PRIVATE,
1601 call __lll_lock_wait_private, otherwise pass private to
1603 (__lll_robust_lock, __lll_cond_lock, __lll_timedlock,
1604 __lll_robust_timedlock): Add private argument, pass it to
1605 __lll_*wait functions.
1606 (__lll_unlock): Add private argument, if it is constant LLL_PRIVATE,
1607 call __lll_unlock_wake_private, otherwise pass private to
1609 (__lll_robust_unlock): Add private argument, pass it to
1610 __lll_robust_unlock_wake.
1611 (lll_lock, lll_robust_lock, lll_cond_lock, lll_timedlock,
1612 lll_robust_timedlock, lll_unlock, lll_robust_unlock): Add private
1613 argument, pass it through to __lll_* inline function.
1614 (__lll_mutex_unlock_force, lll_mutex_unlock_force): Remove.
1615 (lll_lock_t): Remove.
1616 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
1617 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
1618 lll_cond_wake, lll_cond_broadcast): Remove.
1619 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
1620 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
1621 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
1622 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
1623 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Allow including
1624 the header from assembler. Renamed all lll_mutex_* resp.
1625 lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
1626 (LOCK, FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP,
1627 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
1628 (LLL_MUTEX_LOCK_INITIALIZER, LLL_MUTEX_LOCK_INITIALIZER_LOCKED,
1629 LLL_MUTEX_LOCK_INITIALIZER_WAITERS): Remove.
1630 (__lll_mutex_lock_wait, __lll_mutex_timedlock_wait,
1631 __lll_mutex_unlock_wake, __lll_lock_wait, __lll_unlock_wake):
1633 (__lll_trylock_asm, __lll_lock_asm_start, __lll_unlock_asm): Define.
1634 (lll_robust_trylock, lll_cond_trylock): Use LLL_LOCK_INITIALIZER*
1635 rather than LLL_MUTEX_LOCK_INITIALIZER* macros.
1636 (lll_trylock): Likewise, use __lll_trylock_asm, pass
1637 MULTIPLE_THREADS_OFFSET as another asm operand.
1638 (lll_lock): Add private argument, use __lll_lock_asm_start, pass
1639 MULTIPLE_THREADS_OFFSET as last asm operand, call
1640 __lll_lock_wait_private if private is constant LLL_PRIVATE,
1641 otherwise pass private as another argument to __lll_lock_wait.
1642 (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
1643 lll_timedlock, lll_robust_timedlock): Add private argument, pass
1644 private as another argument to __lll_*lock_wait call.
1645 (lll_unlock): Add private argument, use __lll_unlock_asm, pass
1646 MULTIPLE_THREADS_OFFSET as another asm operand, call
1647 __lll_unlock_wake_private if private is constant LLL_PRIVATE,
1648 otherwise pass private as another argument to __lll_unlock_wake.
1649 (lll_robust_unlock): Add private argument, pass private as another
1650 argument to __lll_unlock_wake.
1651 (lll_robust_dead): Add private argument, use __lll_private_flag
1653 (lll_islocked): Use LLL_LOCK_INITIALIZER instead of
1654 LLL_MUTEX_LOCK_INITIALIZER.
1655 (lll_lock_t): Remove.
1656 (LLL_LOCK_INITIALIZER_WAITERS): Define.
1657 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
1658 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
1659 lll_cond_wake, lll_cond_broadcast): Remove.
1660 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
1661 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Revert
1662 2007-05-2{3,9} changes.
1663 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Include
1664 kernel-features.h and lowlevellock.h.
1665 (LOAD_PRIVATE_FUTEX_WAIT): Define.
1666 (LOAD_FUTEX_WAIT): Rewritten.
1667 (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
1669 (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
1670 (__lll_mutex_lock_wait): Rename to ...
1671 (__lll_lock_wait): ... this. Take futex addr from %edx instead of
1672 %ecx, %ecx is now private argument. Don't compile in for libc.so.
1673 (__lll_mutex_timedlock_wait): Rename to ...
1674 (__lll_timedlock_wait): ... this. Use __NR_gettimeofday. %esi
1675 contains private argument. Don't compile in for libc.so.
1676 (__lll_mutex_unlock_wake): Rename to ...
1677 (__lll_unlock_wake): ... this. %ecx contains private argument.
1678 Don't compile in for libc.so.
1679 (__lll_timedwait_tid): Use __NR_gettimeofday.
1680 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Include
1681 kernel-features.h and lowlevellock.h.
1682 (LOAD_FUTEX_WAIT): Define.
1683 (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
1685 (__lll_robust_mutex_lock_wait): Rename to ...
1686 (__lll_robust_lock_wait): ... this. Futex addr is now in %edx
1687 argument, %ecx argument contains private. Use LOAD_FUTEX_WAIT
1689 (__lll_robust_mutex_timedlock_wait): Rename to ...
1690 (__lll_robust_timedlock_wait): ... this. Use __NR_gettimeofday.
1691 %esi argument contains private, use LOAD_FUTEX_WAIT macro.
1692 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Include
1694 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1695 (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
1696 PRIVATE(%ebx) ^ LLL_SHARED as private argument in %ecx to
1697 __lll_lock_wait and __lll_unlock_wake, pass MUTEX(%ebx) address
1698 to __lll_lock_wait in %edx.
1699 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
1700 Include lowlevellock.h and pthread-errnos.h.
1701 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
1702 FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
1703 (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*, pass
1704 cond_lock address in %edx rather than %ecx to __lll_lock_wait,
1705 pass LLL_SHARED in %ecx to both __lll_lock_wait and
1707 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
1708 Include lowlevellock.h and pthread-errnos.h.
1709 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
1710 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
1711 (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*, pass
1712 cond_lock address in %edx rather than %ecx to __lll_lock_wait,
1713 pass LLL_SHARED in %ecx to both __lll_lock_wait and
1715 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
1716 Include lowlevellock.h.
1717 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
1719 (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*, pass
1720 cond_lock address in %edx rather than %ecx to __lll_lock_wait,
1721 pass LLL_SHARED in %ecx to both __lll_lock_wait and
1722 __lll_unlock_wake. Use __NR_gettimeofday.
1723 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
1724 Include lowlevellock.h.
1725 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1726 (__pthread_cond_wait, __condvar_w_cleanup): Rename __lll_mutex_*
1727 to __lll_*, pass cond_lock address in %edx rather than %ecx to
1728 __lll_lock_wait, pass LLL_SHARED in %ecx to both __lll_lock_wait
1729 and __lll_unlock_wake.
1730 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S:
1731 Include lowlevellock.h.
1732 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1733 (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*, pass
1734 MUTEX(%ebx) address in %edx rather than %ecx to
1735 __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
1736 and __lll_unlock_wake. Move return value from %ecx to %edx
1738 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1739 Include lowlevellock.h.
1740 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
1742 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
1743 MUTEX(%ebp) address in %edx rather than %ecx to
1744 __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
1745 and __lll_unlock_wake. Move return value from %ecx to %edx
1746 register. Use __NR_gettimeofday.
1747 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1748 Include lowlevellock.h.
1749 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
1751 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
1752 MUTEX(%ebp) address in %edx rather than %ecx to
1753 __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
1754 and __lll_unlock_wake. Move return value from %ecx to %edx
1755 register. Use __NR_gettimeofday.
1756 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
1757 Include lowlevellock.h.
1758 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1759 (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*, pass
1760 MUTEX(%edi) address in %edx rather than %ecx to
1761 __lll_lock_wait, pass PSHARED(%edi) in %ecx to both __lll_lock_wait
1762 and __lll_unlock_wake.
1763 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
1764 Include lowlevellock.h.
1765 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1766 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
1767 MUTEX(%ebx) address in %edx rather than %ecx to
1768 __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
1769 and __lll_unlock_wake. Move return value from %ecx to %edx
1771 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Include
1773 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
1775 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Include lowlevellock.h.
1776 (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
1777 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Include
1779 (LOCK, SYS_futex, SYS_gettimeofday, FUTEX_WAIT): Don't define.
1780 (sem_timedwait): Use __NR_gettimeofday.
1781 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Include
1783 (LOCK): Don't define.
1784 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include
1786 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
1787 * sysdeps/unix/sysv/linux/powerpc/sem_post.c: Wake only when there
1789 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Revert
1790 2007-05-2{3,9} changes.
1791 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Include
1792 kernel-features.h and lowlevellock.h.
1793 (LOAD_PRIVATE_FUTEX_WAIT): Define.
1794 (LOAD_FUTEX_WAIT): Rewritten.
1795 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
1796 (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
1797 (__lll_mutex_lock_wait): Rename to ...
1798 (__lll_lock_wait): ... this. %esi is now private argument.
1799 Don't compile in for libc.so.
1800 (__lll_mutex_timedlock_wait): Rename to ...
1801 (__lll_timedlock_wait): ... this. %esi contains private argument.
1802 Don't compile in for libc.so.
1803 (__lll_mutex_unlock_wake): Rename to ...
1804 (__lll_unlock_wake): ... this. %esi contains private argument.
1805 Don't compile in for libc.so.
1806 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Include
1807 kernel-features.h and lowlevellock.h.
1808 (LOAD_FUTEX_WAIT): Define.
1809 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
1810 (__lll_robust_mutex_lock_wait): Rename to ...
1811 (__lll_robust_lock_wait): ... this. %esi argument contains private.
1812 Use LOAD_FUTEX_WAIT macro.
1813 (__lll_robust_mutex_timedlock_wait): Rename to ...
1814 (__lll_robust_timedlock_wait): ... this. %esi argument contains
1815 private, use LOAD_FUTEX_WAIT macro.
1816 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Include
1818 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1819 (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
1820 PRIVATE(%rdi) ^ LLL_SHARED as private argument in %esi to
1821 __lll_lock_wait and __lll_unlock_wake.
1822 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S:
1823 Include lowlevellock.h and pthread-errnos.h.
1824 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
1825 FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
1826 (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*,
1827 pass LLL_SHARED in %esi to both __lll_lock_wait and
1829 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S:
1830 Include lowlevellock.h and pthread-errnos.h.
1831 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
1832 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
1833 (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*,
1834 pass LLL_SHARED in %esi to both __lll_lock_wait and
1836 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:
1837 Include lowlevellock.h.
1838 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1839 (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*,
1840 pass LLL_SHARED in %esi to both __lll_lock_wait and
1842 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
1843 Include lowlevellock.h.
1844 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1845 (__pthread_cond_wait, __condvar_cleanup): Rename __lll_mutex_*
1846 to __lll_*, pass LLL_SHARED in %esi to both __lll_lock_wait
1847 and __lll_unlock_wake.
1848 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S:
1849 Include lowlevellock.h.
1850 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1852 (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*,
1853 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
1854 and __lll_unlock_wake.
1855 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
1856 Include lowlevellock.h.
1857 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1859 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
1860 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
1861 and __lll_unlock_wake.
1862 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1863 Include lowlevellock.h.
1864 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1866 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
1867 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
1868 and __lll_unlock_wake.
1869 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S:
1870 Include lowlevellock.h.
1871 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1873 (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*,
1874 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
1875 and __lll_unlock_wake.
1876 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S:
1877 Include lowlevellock.h.
1878 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1880 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
1881 pass PSHARED(%rdi) in %ecx to both __lll_lock_wait
1882 and __lll_unlock_wake.
1883 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Include
1885 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
1887 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Include lowlevellock.h.
1888 (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
1889 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Include
1891 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
1892 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Include
1894 (LOCK): Don't define.
1895 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Include
1897 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
1898 * sysdeps/unix/sysv/linux/sparc/internaltypes.h: New file.
1899 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_destroy.c: New file.
1900 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_init.c: New file.
1901 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_wait.c: New file.
1902 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
1903 (__lll_lock_wait_private): New function.
1904 (__lll_lock_wait, __lll_timedlock_wait): Add private argument, pass
1905 it to lll_futex_*wait. Don't compile in for libc.so.
1906 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c:
1908 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c
1909 (struct sparc_pthread_barrier): Remove.
1910 (pthread_barrier_wait): Use union sparc_pthread_barrier instead of
1911 struct sparc_pthread_barrier. Pass
1912 ibarrier->s.pshared ? LLL_SHARED : LLL_PRIVATE to lll_{,un}lock
1913 and lll_futex_wait macros.
1914 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
1916 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
1917 Include sparc pthread_barrier_wait.c instead of generic one.
1919 2007-07-30 Jakub Jelinek <jakub@redhat.com>
1921 * tst-rwlock14.c (do_test): Avoid warnings on 32-bit arches.
1923 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
1924 (pthread_rwlock_timedrdlock): Copy futex retval to %esi rather than
1926 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
1927 (pthread_rwlock_timedwrlock): Likewise.
1928 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
1929 (__pthread_rwlock_unlock): Fix MUTEX != 0 args to __lll_*.
1931 2007-07-31 Jakub Jelinek <jakub@redhat.com>
1933 * sysdeps/sparc/tls.h (tcbhead_t): Add private_futex field.
1935 2007-07-26 Jakub Jelinek <jakub@redhat.com>
1937 * tst-locale2.c (useless): Add return statement.
1939 2007-07-24 Jakub Jelinek <jakub@redhat.com>
1941 * allocatestack.c (__nptl_setxid, __wait_lookup_done): Replace
1942 lll_private_futex_* (*) with lll_futex_* (*, LLL_PRIVATE).
1943 * pthread_create.c (start_thread): Likewise.
1944 * init.c (sighandler_setxid): Likewise.
1945 * sysdeps/alpha/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1946 * sysdeps/ia64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1947 * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1948 * sysdeps/s390/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1949 * sysdeps/powerpc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1950 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1951 * sysdeps/sparc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1952 * sysdeps/sh/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1953 * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY, AIO_MISC_WAIT):
1955 * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY, GAI_MISC_WAIT):
1957 * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
1959 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_waitzero,
1960 __rtld_notify): Likewise.
1961 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Likewise.
1962 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (clear_once_control,
1963 __pthread_once): Likewise.
1964 * sysdeps/unix/sysv/linux/alpha/pthread_once.c (clear_once_control,
1965 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1966 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1967 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1968 (lll_futex_wait): Add private argument, define as wrapper around
1969 lll_futex_timed_wait.
1970 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1971 use __lll_private_flag macro.
1972 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
1973 __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
1974 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (clear_once_control,
1975 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1976 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1977 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1978 (lll_futex_wait): Add private argument, define as wrapper around
1979 lll_futex_timed_wait.
1980 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1981 use __lll_private_flag macro.
1982 (__lll_mutex_unlock, __lll_robust_mutex_unlock, lll_wait_tid,
1983 __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
1984 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
1986 (lll_futex_timed_wait, lll_futex_wake): Use it.
1987 (lll_private_futex_wait, lll_private_futex_timed_wait,
1988 lll_private_futex_wake): Removed.
1989 * sysdeps/unix/sysv/linux/s390/pthread_once.c (clear_once_control,
1990 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1991 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1992 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1993 (lll_futex_wait): Add private argument, define as wrapper around
1994 lll_futex_timed_wait.
1995 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1996 use __lll_private_flag macro.
1997 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
1998 lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
2000 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
2001 (lll_private_futex_wait, lll_private_futex_timed_wait,
2002 lll_private_futex_wake): Removed.
2003 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_private_flag):
2004 Fix !__ASSUME_PRIVATE_FUTEX non-constant private case.
2005 (lll_private_futex_wait, lll_private_futex_timed_wait,
2006 lll_private_futex_wake): Removed.
2007 * sysdeps/unix/sysv/linux/sparc/pthread_once.c (clear_once_control,
2008 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
2009 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_PRIVATE_FLAG,
2010 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
2011 (lll_futex_wait): Add private argument, define as wrapper around
2012 lll_futex_timed_wait.
2013 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
2014 use __lll_private_flag macro.
2015 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
2016 lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
2018 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (__lll_private_flag):
2020 (lll_futex_timed_wait, lll_futex_wake): Use it.
2021 (lll_private_futex_wait, lll_private_futex_timed_wait,
2022 lll_private_futex_wake): Removed.
2024 2007-07-27 Jakub Jelinek <jakub@redhat.com>
2026 * sysdeps/sparc/tls.h (tcbhead_t): Move gscope_flag to the end
2027 of the structure for sparc32.
2029 2007-07-26 Aurelien Jarno <aurelien@aurel32.net>
2031 * sysdeps/sparc/tls.h (tcbhead_t): Add gscope_flag.
2033 2007-07-23 Ulrich Drepper <drepper@redhat.com>
2035 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
2036 code used when private futexes are assumed.
2037 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
2040 2007-07-23 Jakub Jelinek <jakub@redhat.com>
2042 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
2043 (__lll_private_flag): Define.
2044 (lll_futex_wait): Define as a wrapper around lll_futex_timed_wait.
2045 (lll_futex_timed_wait, lll_futex_wake, lll_futex_wake_unlock): Use
2047 (lll_private_futex_wait, lll_private_futex_timedwait,
2048 lll_private_futex_wake): Define as wrapper around non-_private
2050 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
2051 (__lll_private_flag): Define.
2052 (lll_futex_timed_wait, lll_futex_wake): Use __lll_private_flag.
2053 (lll_private_futex_wait, lll_private_futex_timedwait,
2054 lll_private_futex_wake): Define as wrapper around non-_private
2057 2007-07-10 Steven Munroe <sjmunroe@us.ibm.com>
2059 * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Add LLL_SHARED
2060 parameter to lll_futex_wait call.
2061 * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
2063 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
2064 Replace lll_futex_wait with lll_private_futex_wait.
2065 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
2066 Add LLL_SHARED parameter to lll_futex_wake().
2068 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define LLL_PRIVATE
2069 LLL_SHARED, lll_private_futex_wait, lll_private_futex_timed_wait and
2070 lll_private_futex_wake.
2071 (lll_futex_wait): Add private parameter. Adjust FUTEX_PRIVATE_FLAG
2072 bit from private parm before syscall.
2073 (lll_futex_timed_wait): Likewise.
2074 (lll_futex_wake): Likewise.
2075 (lll_futex_wake_unlock): Likewise.
2076 (lll_mutex_unlock): Add LLL_SHARED parm to lll_futex_wake call.
2077 (lll_robust_mutex_unlock): Likewise.
2078 (lll_mutex_unlock_force): Likewise.
2079 (lll_wait_tid): Add LLL_SHARED parm to lll_futex_wait call.
2081 2007-07-23 Ulrich Drepper <drepper@redhat.com>
2083 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
2084 compilation when unconditionally using private futexes.
2085 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
2086 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
2088 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
2089 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
2091 2007-07-17 Jakub Jelinek <jakub@redhat.com>
2093 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock_clear_flags2):
2096 2007-07-06 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2098 * sysdeps/sh/tls.h: Include stdlib.h, list.h, sysdep.h and
2101 2007-05-16 Roland McGrath <roland@redhat.com>
2103 * init.c (__nptl_initial_report_events): New variable.
2104 (__pthread_initialize_minimal_internal): Initialize pd->report_events
2107 2007-06-22 Jakub Jelinek <jakub@redhat.com>
2109 * pthread_getattr_np.c (pthread_getattr_np): Clear cpuset and
2110 cpusetsize if pthread_getaffinity_np failed with ENOSYS.
2112 2007-06-19 Ulrich Drepper <drepper@redhat.com>
2114 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Remove mrlock
2117 2007-06-18 Ulrich Drepper <drepper@redhat.com>
2119 * pthreadP.h: Define PTHREAD_MUTEX_TYPE.
2120 * phtread_mutex_lock.c: Use PTHREAD_MUTEX_TYPE.
2121 * pthread_mutex_timedlock.c: Likewise.
2122 * pthread_mutex_trylock.c: Likewise.
2123 * pthread_mutex_unlock.c: Likewise.
2125 2007-06-17 Andreas Schwab <schwab@suse.de>
2127 * sysdeps/pthread/pt-initfini.c: Tell gcc about the nonstandard
2130 2007-06-17 Ulrich Drepper <drepper@redhat.com>
2132 * allocatestack.c (allocate_stack): Make code compile if
2133 __ASSUME_PRIVATE_FUTEX is set.
2135 2007-06-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2137 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S:
2138 (__pthread_rwlock_rdlock): Don't use non SH-3/4 instruction.
2139 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S:
2140 (__pthread_rwlock_wrlock): Likewise.
2141 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
2142 (pthread_rwlock_timedrdlock): Likewise.
2143 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
2144 (pthread_rwlock_timedwrlock): Likewise.
2145 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S:
2146 (__pthread_rwlock_unlock): Likewise.
2148 2007-06-10 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2150 * sysdeps/sh/tcb-offsets.sym: Add PRIVATE_FUTEX.
2151 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Include endian.h.
2152 Split __flags into __flags, __shared, __pad1 and __pad2.
2153 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Use private
2154 futexes if they are available.
2155 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Adjust so that change
2156 in libc-lowlevellock.S allow using private futexes.
2157 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
2158 FUTEX_PRIVATE_FLAG. Add additional parameter to lll_futex_wait,
2159 lll_futex_timed_wait and lll_futex_wake. Change lll_futex_wait
2160 to call lll_futex_timed_wait. Add lll_private_futex_wait,
2161 lll_private_futex_timed_wait and lll_private_futex_wake.
2162 (lll_robust_mutex_unlock): Fix typo.
2163 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Use private
2164 field in futex command setup.
2165 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Use
2166 COND_NWAITERS_SHIFT instead of COND_CLOCK_BITS.
2167 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
2168 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use private futexes
2169 if they are available. Remove clear_once_control.
2170 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Use private
2171 futexes if they are available.
2172 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
2173 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
2174 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
2175 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
2176 * sysdeps/unix/sysv/linux/sh/sem_post.S: Add private futex support.
2177 Wake only when there are waiters.
2178 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add private futex
2179 support. Indicate that there are waiters. Remove unnecessary
2180 extra cancellation test.
2181 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise. Removed
2182 left-over duplication of __sem_wait_cleanup.
2184 2007-06-07 Ulrich Drepper <drepper@redhat.com>
2186 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Add additional
2187 parameter to lll_futex_wait, lll_futex_timed_wait, and
2188 lll_futex_wake. Change lll_futex_wait to call lll_futex_timed_wait.
2189 Add lll_private_futex_wait, lll_private_futex_timed_wait, and
2190 lll_private_futex_wake.
2191 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
2192 * allocatestack.c: Adjust use of lll_futex_* macros.
2194 * lowlevellock.h: Likewise.
2195 * pthread_barrier_wait.c: Likewise.
2196 * pthread_cond_broadcast.c: Likewise.
2197 * pthread_cond_destroy.c: Likewise.
2198 * pthread_cond_signal.c: Likewise.
2199 * pthread_cond_timedwait.c: Likewise.
2200 * pthread_cond_wait.c: Likewise.
2201 * pthread_create.c: Likewise.
2202 * pthread_mutex_lock.c: Likewise.
2203 * pthread_mutex_setprioceiling.c: Likewise.
2204 * pthread_mutex_timedlock.c: Likewise.
2205 * pthread_mutex_unlock.c: Likewise.
2206 * pthread_rwlock_timedrdlock.c: Likewise.
2207 * pthread_rwlock_timedwrlock.c: Likewise.
2208 * pthread_rwlock_unlock.c: Likewise.
2209 * sysdeps/alpha/tls.h: Likewise.
2210 * sysdeps/i386/tls.h: Likewise.
2211 * sysdeps/ia64/tls.h: Likewise.
2212 * sysdeps/powerpc/tls.h: Likewise.
2213 * sysdeps/pthread/aio_misc.h: Likewise.
2214 * sysdeps/pthread/gai_misc.h: Likewise.
2215 * sysdeps/s390/tls.h: Likewise.
2216 * sysdeps/sh/tls.h: Likewise.
2217 * sysdeps/sparc/tls.h: Likewise.
2218 * sysdeps/unix/sysv/linux/fork.c: Likewise.
2219 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
2220 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: Likewise.
2221 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Likewise.
2222 * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
2223 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
2224 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
2225 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
2226 * sysdeps/unix/sysv/linux/sparc/pthread_once.c: Likewise.
2227 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c:
2229 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: Likewise.
2230 * sysdeps/x86_64/tls.h: Likewise.
2232 2007-05-29 Ulrich Drepper <drepper@redhat.com>
2234 * pthread_getattr_np.c: No need to install a cancellation handler,
2235 this is no cancellation point.
2236 * pthread_getschedparam.c: Likewise.
2237 * pthread_setschedparam.c: Likewise.
2238 * pthread_setschedprio.c: Likewise.
2239 * sysdeps/unix/sysv/linux/lowlevellock.c: Remove all traces of
2241 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
2242 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
2243 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
2244 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2245 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2246 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2247 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
2248 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
2249 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
2250 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: Likewise.
2251 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
2252 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2254 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Checking
2255 whether there are more than one thread makes no sense here since
2256 we only call the slow path if the locks are taken.
2257 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Likewise.
2259 * sysdeps/unix/sysv/linux/internaltypes.h: Introduce
2260 COND_NWAITERS_SHIFT.
2261 * pthread_cond_destroy.c: Use COND_NWAITERS_SHIFT instead of
2263 * pthread_cond_init.c: Likewise.
2264 * pthread_cond_timedwait.c: Likewise.
2265 * pthread_cond_wait.c: Likewise.
2266 * pthread_condattr_getclock.c: Likewise.
2267 * pthread_condattr_setclock.c: Likewise.
2268 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Likewise.
2269 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2270 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
2271 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
2272 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2274 2007-05-28 Jakub Jelinek <jakub@redhat.com>
2276 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c: Include
2279 * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Use explicit
2281 (THREAD_GSCOPE_GET_FLAG): Remove.
2282 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Remove.
2283 * allocatestack.c (__wait_lookup_done): Revert 2007-05-24
2285 * sysdeps/powerpc/tls.h (tcbhead_t): Remove gscope_flag.
2286 (THREAD_GSCOPE_GET_FLAG): Remove.
2287 (THREAD_GSCOPE_RESET_FLAG): Use THREAD_SELF->header.gscope_flag
2288 instead of THREAD_GSCOPE_GET_FLAG.
2289 (THREAD_GSCOPE_SET_FLAG): Likewise. Add atomic_write_barrier after
2291 * sysdeps/s390/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
2292 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
2293 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
2294 THREAD_GSCOPE_WAIT): Define.
2295 * sysdeps/sparc/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
2296 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
2297 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
2298 THREAD_GSCOPE_WAIT): Define.
2299 * sysdeps/sh/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
2300 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
2301 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
2302 THREAD_GSCOPE_WAIT): Define.
2303 * sysdeps/ia64/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
2304 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
2305 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
2306 THREAD_GSCOPE_WAIT): Define.
2308 2007-05-24 Richard Henderson <rth@redhat.com>
2310 * descr.h (struct pthread): Add header.gscope_flag.
2311 * sysdeps/alpha/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
2312 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
2313 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
2314 THREAD_GSCOPE_WAIT): Define.
2316 2007-05-27 Ulrich Drepper <drepper@redhat.com>
2318 * init.c: Make it compile with older kernel headers.
2320 * tst-initializers1.c: Show through exit code which test failed.
2322 * pthread_rwlock_init.c: Also initialize __shared field.
2323 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Split __flags
2324 element in rwlock structure into four byte elements. One of them is
2325 the new __shared element.
2326 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h [__WORDSIZE=32]:
2328 [__WORDSIZE=64]: Renamed __pad1 element int rwlock structure to
2329 __shared, adjust names of other padding elements.
2330 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2331 * sysdeps/pthread/pthread.h: Adjust rwlock initializers.
2332 * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: Add PSHARED.
2333 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define
2335 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Change main
2336 futex to use private operations if possible.
2337 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
2339 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
2341 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
2342 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
2343 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
2344 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2346 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2348 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
2349 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
2351 2007-05-26 Ulrich Drepper <drepper@redhat.com>
2353 * pthreadP.h (PTHREAD_RWLOCK_PREFER_READER_P): Define.
2354 * pthread_rwlock_rdlock.c: Use PTHREAD_RWLOCK_PREFER_READER_P.
2355 * pthread_rwlock_timedrdlock.c: Likewise.
2356 * pthread_rwlock_tryrdlock.c: Likewise.
2358 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S (sem_trywait): Tiny
2361 * sysdeps/unix/sysv/linux/sem_wait.c: Add missing break.
2362 * sysdeps/unix/sysv/linux/sem_timedwait.c: Removed left-over
2363 duplication of __sem_wait_cleanup.
2365 * allocatestack.c: Revert last change.
2367 * sysdeps/i386/tls.h: Likewise.
2368 * sysdeps/x86_64/tls.h: Likewise.
2369 * descr.h [TLS_DTV_AT_TP] (struct pthread): Add private_futex field to
2371 * sysdeps/powerpc/tcb-offsets.sym: Add PRIVATE_FUTEX_OFFSET.
2373 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_barrier):
2375 * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: Add PRIVATE definition.
2376 * pthread_barrier_init.c: Set private flag if pshared and private
2377 futexes are supported.
2378 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Use
2379 private field in futex command setup.
2380 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
2382 2007-05-25 Ulrich Drepper <drepper@redhat.com>
2384 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Add private futex
2386 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
2387 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
2388 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
2389 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
2390 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
2392 * semaphoreP.h: Declare __old_sem_init and __old_sem_wait.
2393 * sem_init.c (__new_sem_init): Rewrite to initialize all three
2394 fields in the structure.
2395 (__old_sem_init): New function.
2396 * sem_open.c: Initialize all fields of the structure.
2397 * sem_getvalue.c: Adjust for renamed element.
2398 * sysdeps/unix/sysv/linux/Makefile [subdir=nptl]
2399 (gen-as-const-headers): Add structsem.sym.
2400 * sysdeps/unix/sysv/linux/structsem.sym: New file.
2401 * sysdeps/unix/sysv/linux/internaltypes.h: Rename struct sem to
2402 struct new_sem. Add struct old_sem.
2403 * sysdeps/unix/sysv/linux/sem_post.c: Wake only when there are waiters.
2404 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
2405 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
2406 * sysdeps/unix/sysv/linux/sem_wait.c: Indicate that there are waiters.
2407 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
2408 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
2409 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
2410 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
2411 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
2412 * Makefile (tests): Add tst-sem10, tst-sem11, tst-sem12.
2413 * tst-sem10.c: New file.
2414 * tst-sem11.c: New file.
2415 * tst-sem12.c: New file.
2416 * tst-typesizes.c: Test struct new_sem and struct old_sem instead
2419 2007-05-25 Ulrich Drepper <drepper@redhat.com>
2420 Jakub Jelinek <jakub@redhat.com>
2422 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
2423 Move __pthread_enable_asynccancel right before futex syscall.
2424 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
2427 2007-05-24 Jakub Jelinek <jakub@redhat.com>
2429 * sysdeps/i386/tls.h (THREAD_SET_PRIVATE_FUTEX,
2430 THREAD_COPY_PRIVATE_FUTEX): Define.
2431 * sysdeps/x86_64/tls.h (THREAD_SET_PRIVATE_FUTEX,
2432 THREAD_COPY_PRIVATE_FUTEX): Define.
2433 * allocatestack.c (allocate_stack): Use THREAD_COPY_PRIVATE_FUTEX.
2434 * init.c (__pthread_initialize_minimal_internal): Use
2435 THREAD_SET_PRIVATE_FUTEX.
2437 * sysdeps/powerpc/tls.h (tcbhead_t): Add gscope_flag.
2438 (THREAD_GSCOPE_FLAG_UNUSED, THREAD_GSCOPE_FLAG_USED,
2439 THREAD_GSCOPE_FLAG_WAIT): Define.
2440 (THREAD_GSCOPE_GET_FLAG, THREAD_GSCOPE_SET_FLAG,
2441 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_WAIT): Define.
2442 * sysdeps/i386/tls.h (THREAD_GSCOPE_WAIT): Don't use
2444 (THREAD_GSCOPE_GET_FLAG): Define.
2445 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Define.
2446 * allocatestack.c (__wait_lookup_done): Use THREAD_GSCOPE_GET_FLAG
2447 instead of ->header.gscope_flag directly.
2449 2007-05-23 Ulrich Drepper <drepper@redhat.com>
2451 * init.c (__pthread_initialize_minimal_internal): Check whether
2452 private futexes are available.
2453 * allocatestack.c (allocate_stack): Copy private_futex field from
2454 current thread into the new stack.
2455 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Use private
2456 futexes if they are available.
2457 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise
2458 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Adjust so that change
2459 in libc-lowlevellock.S allow using private futexes.
2460 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
2461 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
2463 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
2464 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use private futexes
2465 if they are available.
2466 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
2467 * sysdeps/x86_64/tcb-offsets.sym: Add PRIVATE_FUTEX.
2468 * sysdeps/i386/tcb-offsets.sym: Likewise.
2469 * sysdeps/x86_64/tls.h (tcbhead_t): Add private_futex field.
2470 * sysdeps/i386/tls.h (tcbhead_t): Likewise.
2472 2007-05-21 Ulrich Drepper <drepper@redhat.com>
2474 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
2475 Remove ptr_wait_lookup_done again.
2476 * init.c (pthread_functions): Don't add .ptr_wait_lookup_done here.
2477 (__pthread_initialize_minimal_internal): Initialize
2478 _dl_wait_lookup_done pointer in _rtld_global directly.
2479 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
2480 Remove code to code _dl_wait_lookup_done.
2481 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_WAIT): The pointer is not
2484 2007-05-21 Jakub Jelinek <jakub@redhat.com>
2486 * tst-robust9.c (do_test): Don't fail if ENABLE_PI and
2487 pthread_mutex_init failed with ENOTSUP.
2489 2007-05-19 Ulrich Drepper <drepper@redhat.com>
2491 * allocatestack.c (__wait_lookup_done): New function.
2492 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
2493 Add ptr_wait_lookup_done.
2494 * init.c (pthread_functions): Initialize .ptr_wait_lookup_done.
2495 * pthreadP.h: Declare __wait_lookup_done.
2496 * sysdeps/i386/tls.h (tcbhead_t): Add gscope_flag.
2497 Define macros to implement reference handling of global scope.
2498 * sysdeps/x86_64/tls.h: Likewise.
2499 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
2500 Initialize GL(dl_wait_lookup_done).
2502 2007-05-17 Ulrich Drepper <drepper@redhat.com>
2505 * pthread_mutex_lock.c: Preserve FUTEX_WAITERS bit when dead owner
2507 * pthread_mutex_timedlock.c: Likewise.
2508 * pthread_mutex_trylock.c: Likewise.
2509 Patch in part by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
2511 * Makefile (tests): Add tst-robust9 and tst-robustpi9.
2512 * tst-robust9.c: New file.
2513 * tst-robustpi9.c: New file.
2515 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Remove
2516 unnecessary extra cancellation test.
2518 2007-05-14 Ulrich Drepper <drepper@redhat.com>
2520 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Remove unnecessary
2521 extra cancellation test.
2522 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
2524 2007-05-10 Ulrich Drepper <drepper@redhat.com>
2526 * descr.h (struct pthread): Rearrange members to fill hole in
2529 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
2530 (__pthread_setaffinity_new): If syscall was successful and
2531 RESET_VGETCPU_CACHE is defined, use it before returning.
2532 * sysdeps/unix/sysv/linux/x86_64/pthread_setaffinity.c: New file.
2534 2007-05-10 Jakub Jelinek <jakub@redhat.com>
2537 * tst-align2.c: Include stackinfo.h.
2538 * tst-getpid1.c: Likewise.
2540 2007-05-02 Carlos O'Donell <carlos@systemhalted.org>
2543 * tst-align2.c (do_test): Add _STACK_GROWS_UP case.
2544 * tst-getpid1.c (do_test): Likewise.
2547 * allocatestack.c (change_stack_perm): Add _STACK_GROWS_UP case.
2548 (allocate_stack): Likewise.
2550 2007-05-07 Ulrich Drepper <drepper@redhat.com>
2552 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
2553 (__lll_robust_lock_wait): Fix race caused by reloading of futex value.
2554 (__lll_robust_timedlock_wait): Likewise.
2555 Reported by Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>.
2557 2007-05-06 Mike Frysinger <vapier@gentoo.org>
2560 * tst-cancel-wrappers.sh: Set C["fdatasync"] to 1.
2561 * tst-cancel4.c (tf_fdatasync): New test.
2563 2007-04-27 Ulrich Drepper <drepper@redhat.com>
2566 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Treat error
2567 check mutexes like normal mutexes.
2570 * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
2571 Initialize the whole sigevent structure to appease valgrind.
2573 2007-04-25 Ulrich Drepper <drepper@redhat.com>
2575 * sysdeps/x86_64/tls.h (tcbhead_t): Add vgetcpu_cache.
2576 * sysdeps/x86_64/tcb-offsets.sym: Add VGETCPU_CACHE_OFFSET.
2578 2007-04-06 Ulrich Drepper <drepper@redhat.com>
2580 * tst-locale1.c: Avoid warnings.
2581 * tst-locale2.c: Likewise.
2583 2007-03-19 Steven Munroe <sjmunroe@us.ibm.com>
2585 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
2586 (__lll_robust_trylock): Add MUTEX_HINT_ACQ to lwarx instruction.
2588 2007-03-16 Jakub Jelinek <jakub@redhat.com>
2590 * sysdeps/pthread/bits/libc-lock.h: Use __extern_inline and
2591 __extern_always_inline where appropriate.
2592 * sysdeps/pthread/pthread.h: Likewise.
2594 2007-03-13 Richard Henderson <rth@redhat.com>
2596 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Use two
2597 separate cfi regions for the two subsections.
2599 2007-02-25 Ulrich Drepper <drepper@redhat.com>
2601 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset refcntr in
2602 new thread, don't just decrement it.
2603 Patch by Suzuki K P <suzuki@in.ibm.com>.
2605 2007-02-21 Ulrich Drepper <drepper@redhat.com>
2607 * sysdeps/pthread/pthread-functions.h: Correct last patch, correct
2608 PTHFCT_CALL definition.
2610 2007-02-18 Ulrich Drepper <drepper@redhat.com>
2612 * sysdeps/pthread/pthread-functions.h: If PTR_DEMANGLE is not
2613 available, don't use it.
2615 2007-02-09 Jakub Jelinek <jakub@redhat.com>
2617 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
2618 (__lll_mutex_timedlock_wait): Use correct pointer when we don't
2619 call into the kernel to delay.
2621 2007-01-18 Ulrich Drepper <drepper@redhat.com>
2623 * tst-initializers1.c: We want to test the initializers as seen
2624 outside of libc, so undefined _LIBC.
2626 * pthread_join.c (cleanup): Avoid warning.
2628 2007-01-17 Ulrich Drepper <drepper@redhat.com>
2630 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
2631 (__lll_timedwait_tid): Add unwind info.
2633 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Don't just copy the
2634 function table, mangle the pointers.
2635 * sysdeps/pthread/pthread-functions.h: Define PTHFCT_CALL.
2636 * forward.c: Use PTHFCT_CALL and __libc_pthread_functions_init.
2637 * sysdeps/pthread/bits/libc-lock.h: When using __libc_pthread_functions
2638 demangle pointers before use.
2639 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Use PTHFCT_CALL to
2641 * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
2642 * sysdeps/pthread/setxid.h: Likewise.
2644 2007-01-12 Ulrich Drepper <drepper@redhat.com>
2646 * tst-rwlock7.c: Show some more information in case of correct
2649 2007-01-11 Ulrich Drepper <drepper@redhat.com>
2651 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
2652 (lll_futex_timed_wait): Undo part of last change, don't negate
2655 2007-01-10 Ulrich Drepper <drepper@redhat.com>
2657 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Cleanups. Define
2658 FUTEX_CMP_REQUEUE and lll_futex_requeue.
2660 2006-12-28 David S. Miller <davem@davemloft.net>
2662 * shlib-versions: Fix sparc64 linux target specification.
2664 2007-01-10 Jakub Jelinek <jakub@redhat.com>
2666 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
2667 Adjust include path for pthread_barrier_wait.c move.
2669 2006-12-21 Jakub Jelinek <jakub@redhat.com>
2671 * sysdeps/unix/sysv/linux/pthread_kill.c (pthread_kill): Make sure
2672 tid isn't reread from pd->tid in between ESRCH test and the syscall.
2674 2006-12-06 Jakub Jelinek <jakub@redhat.com>
2676 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Handle
2677 6 argument cancellable syscalls.
2678 (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
2679 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO): Handle
2680 6 argument cancellable syscalls.
2681 (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
2683 2006-12-09 Ulrich Drepper <drepper@redhat.com>
2685 * sysdeps/unix/sysv/linux/rtld-lowlevel.h
2686 (__rtld_mrlock_initialize): Add missing closing parenthesis.
2688 2006-10-30 Jakub Jelinek <jakub@redhat.com>
2690 * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
2691 __sync_lock_release instead of __sync_lock_release_si.
2693 2006-10-29 Jakub Jelinek <jakub@redhat.com>
2695 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (RTLD_SINGLE_THREAD_P):
2697 (SINGLE_THREAD_P): Define to 1 if IS_IN_rtld.
2698 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Likewise.
2699 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
2700 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
2701 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
2702 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
2703 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
2704 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
2705 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
2706 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
2707 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
2709 2006-10-27 Ulrich Drepper <drepper@redhat.com>
2711 * sysdeps/pthread/pthread_barrier_wait.c: Move to...
2712 * pthread_barrier_wait.c: ...here.
2713 * sysdeps/pthread/pthread_cond_broadcast.c: Move to...
2714 * pthread_cond_broadcast.c: ...here.
2715 * sysdeps/pthread/pthread_cond_signal.c: Move to...
2716 * pthread_cond_signal.c: ...here.
2717 * sysdeps/pthread/pthread_cond_timedwait.c: Move to...
2718 * pthread_cond_timedwait.c: ...here.
2719 * sysdeps/pthread/pthread_cond_wait.c: Move to...
2720 * pthread_cond_wait.c: ...here.
2721 * sysdeps/pthread/pthread_once.c: Move to...
2722 * pthread_once.c: ...here.
2723 * sysdeps/pthread/pthread_rwlock_rdlock.c: Move to...
2724 * pthread_rwlock_rdlock.c: ...here.
2725 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Move to...
2726 * pthread_rwlock_timedrdlock.c: ...here.
2727 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Move to...
2728 * pthread_rwlock_timedwrlock.c: ...here.
2729 * sysdeps/pthread/pthread_rwlock_unlock.c: Move to...
2730 * pthread_rwlock_unlock.c: ...here.
2731 * sysdeps/pthread/pthread_rwlock_wrlock.c: Move to...
2732 * pthread_rwlock_wrlock.c: ...here.
2733 * sysdeps/pthread/pthread_spin_destroy.c: Move to...
2734 * pthread_spin_destroy.c: ...here.
2735 * sysdeps/pthread/pthread_spin_init.c: Move to...
2736 * pthread_spin_init.c: ...here.
2737 * sysdeps/pthread/pthread_spin_unlock.c: Move to...
2738 * pthread_spin_unlock.c: ...here.
2739 * sysdeps/pthread/pthread_getcpuclockid.c: Move to...
2740 * pthread_getcpuclockid.c: ...here.
2742 * init.c: USE_TLS support is now always enabled.
2743 * tst-tls5.h: Likewise.
2744 * sysdeps/alpha/tls.h: Likewise.
2745 * sysdeps/i386/tls.h: Likewise.
2746 * sysdeps/ia64/tls.h: Likewise.
2747 * sysdeps/powerpc/tls.h: Likewise.
2748 * sysdeps/s390/tls.h: Likewise.
2749 * sysdeps/sh/tls.h: Likewise.
2750 * sysdeps/sparc/tls.h: Likewise.
2751 * sysdeps/x86_64/tls.h: Likewise.
2753 2006-10-27 Jakub Jelinek <jakub@redhat.com>
2755 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
2756 __rtld_mrlock_change): Update oldval if atomic compare and exchange
2759 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
2760 Define to THREAD_SELF->header.multiple_threads.
2761 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
2763 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
2765 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
2766 (SINGLE_THREAD_P): Likewise.
2767 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
2768 (SINGLE_THREAD_P): Likewise.
2769 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
2770 (SINGLE_THREAD_P): Likewise.
2771 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
2772 (SINGLE_THREAD_P): Likewise.
2773 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (SINGLE_THREAD_P):
2775 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
2776 (SINGLE_THREAD_P): Likewise.
2777 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
2778 (SINGLE_THREAD_P): Likewise.
2779 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (SINGLE_THREAD_P):
2782 2006-10-26 Jakub Jelinek <jakub@redhat.com>
2784 * pthread_attr_setstacksize.c (NEW_VERNUM): Define to GLIBC_2_3_3
2785 by default rather than 2_3_3.
2787 2006-10-17 Jakub Jelinek <jakub@redhat.com>
2789 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
2790 __rtld_mrlock_unlock, __rtld_mrlock_change, __rtld_mrlock_done): Use
2791 atomic_* instead of catomic_* macros.
2793 2006-10-12 Ulrich Drepper <drepper@redhat.com>
2796 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add SEM_VALUE_MAX.
2797 * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
2798 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
2799 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
2800 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
2801 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Remove SEM_VALUE_MAX.
2802 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
2803 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
2804 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
2805 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: Likewise.
2806 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
2807 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
2808 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
2810 2006-10-11 Ulrich Drepper <drepper@redhat.com>
2812 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add support for
2813 cancelable syscalls with six parameters.
2815 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Use catomic_*
2816 operations instead of atomic_*.
2818 2006-10-09 Ulrich Drepper <drepper@redhat.com>
2820 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: New file..
2822 2006-10-07 Ulrich Drepper <drepper@redhat.com>
2824 * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: New file.
2825 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstack.c: New file.
2826 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c:
2828 * pthread_attr_setstack.c: Allow overwriting the version number of the
2830 * pthread_attr_setstacksize.c: Likewise.
2831 (__old_pthread_attr_setstacksize): If STACKSIZE_ADJUST is defined use
2833 * sysdeps/unix/sysv/linux/powerpc/Versions (libpthread): Add
2834 pthread_attr_setstack and pthread_attr_setstacksize to GLIBC_2.6.
2836 2006-09-24 Ulrich Drepper <drepper@redhat.com>
2839 * descr.h (ENQUEUE_MUTEX_BOTH): Add cast to avoid warning.
2840 Patch by Petr Baudis.
2842 2006-09-18 Jakub Jelinek <jakub@redhat.com>
2844 * tst-kill4.c (do_test): Explicitly set tf thread's stack size.
2846 * tst-cancel2.c (tf): Loop as long as something was written.
2848 2006-09-12 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2850 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: For PI
2851 mutexes wake all mutexes.
2852 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Don't increment
2853 WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
2854 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
2856 2006-09-12 Ulrich Drepper <drepper@redhat.com>
2858 * tst-cond22.c (tf): Slight changes to the pthread_cond_wait use
2859 to guarantee the thread is always canceled.
2861 2006-09-08 Jakub Jelinek <jakub@redhat.com>
2863 * tst-cond22.c: Include pthread.h instead of pthreadP.h.
2865 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Only
2866 increase FUTEX if increasing WAKEUP_SEQ. Fix comment typo.
2867 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
2868 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2869 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2871 2006-09-08 Ulrich Drepper <drepper@redhat.com>
2874 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Don't
2875 increment WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
2876 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
2877 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2878 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2879 * Makefile (tests): Add tst-cond22.
2880 * tst-cond22.c: New file.
2882 2006-09-05 Ulrich Drepper <drepper@redhat.com>
2885 * descr.h (struct pthread): Add parent_cancelhandling.
2886 * sysdeps/pthread/createthread.c (create_thread): Pass parent
2887 cancelhandling value to child.
2888 * pthread_create.c (start_thread): If parent thread was canceled
2889 reset the SIGCANCEL mask.
2890 * Makefile (tests): Add tst-cancel25.
2891 * tst-cancel25.c: New file.
2893 2006-09-05 Jakub Jelinek <jakub@redhat.com>
2894 Ulrich Drepper <drepper@redhat.com>
2896 * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY): Don't decrement
2897 counterp if it is already zero.
2898 * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY): Likewise..
2900 2006-03-04 Jakub Jelinek <jakub@redhat.com>
2901 Roland McGrath <roland@redhat.com>
2903 * sysdeps/unix/sysv/linux/i386/lowlevellock.h
2904 (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
2905 LLL_STUB_UNWIND_INFO_3, LLL_STUB_UNWIND_INFO_4): Define.
2906 (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
2907 lll_robust_mutex_cond_lock, lll_mutex_timedlock,
2908 lll_robust_mutex_timedlock, lll_mutex_unlock,
2909 lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
2910 Add _L_*_ symbols around the subsection.
2911 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Add unwind info.
2912 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Likewise.
2914 2006-03-03 Jakub Jelinek <jakub@redhat.com>
2915 Roland McGrath <roland@redhat.com>
2917 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
2918 (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
2919 LLL_STUB_UNWIND_INFO_5, LLL_STUB_UNWIND_INFO_6): Define.
2920 (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
2921 lll_robust_mutex_cond_lock, lll_mutex_timedlock,
2922 lll_robust_mutex_timedlock, lll_mutex_unlock,
2923 lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
2924 Add _L_*_ symbols around the subsection.
2925 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Add unwind info.
2926 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
2928 2006-08-31 Ulrich Drepper <drepper@redhat.com>
2930 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Undo last
2931 change because it can disturb too much existing code. If real hard
2932 reader preference is needed we'll introduce another type.
2933 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
2934 (pthread_rwlock_timedwrlock): Likewise.
2935 * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
2938 2006-08-30 Ulrich Drepper <drepper@redhat.com>
2940 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Respect
2942 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
2943 (pthread_rwlock_timedwrlock): Likewise.
2944 * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
2947 2006-08-25 Jakub Jelinek <jakub@redhat.com>
2949 * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libpthread):
2950 Only define ifdef SHARED.
2952 2006-08-23 Ulrich Drepper <drepper@redhat.com>
2954 * allocatestack.c (queue_stack): Move freeing of surplus stacks to...
2955 (free_stacks): ...here.
2956 (__free_stack_cache): New function.
2957 * pthreadP.h: Declare __free_stack_cache.
2958 * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
2960 * init.c (pthread_functions): Initialize ptr_freeres.
2961 * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libptread):
2962 New freeres function.
2964 2006-07-30 Joseph S. Myers <joseph@codesourcery.com>
2967 * Makefile (extra-objs): Add modules to extra-test-objs instead.
2969 2006-08-20 Ulrich Drepper <drepper@redhat.com>
2971 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
2972 _XOPEN_REALTIME_THREADS.
2974 2006-08-15 Jakub Jelinek <jakub@redhat.com>
2976 * sysdeps/unix/sysv/linux/clock_settime.c (INTERNAL_VSYSCALL): Use
2977 HAVE_CLOCK_GETRES_VSYSCALL as guard macro rather than
2978 HAVE_CLOCK_GETTIME_VSYSCALL.
2979 (maybe_syscall_settime_cpu): Use plain INTERNAL_VSYSCALL here.
2981 2006-08-14 Jakub Jelinek <jakub@redhat.com>
2983 * sysdeps/unix/sysv/linux/bits/posix_opt.h
2984 (_POSIX_THREAD_PRIO_PROTECT): Define to 200112L.
2985 * descr.h (struct priority_protection_data): New type.
2986 (struct pthread): Add tpp field.
2987 * pthreadP.h (PTHREAD_MUTEX_PP_NORMAL_NP,
2988 PTHREAD_MUTEX_PP_RECURSIVE_NP, PTHREAD_MUTEX_PP_ERRORCHECK_NP,
2989 PTHREAD_MUTEX_PP_ADAPTIVE_NP): New enum values.
2990 * pthread_mutex_init.c (__pthread_mutex_init): Handle non-robust
2992 * pthread_mutex_lock.c (__pthread_mutex_lock): Handle TPP mutexes.
2993 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Likewise.
2994 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Likewise.
2995 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Likewise.
2997 * pthread_setschedparam.c (__pthread_setschedparam): Handle priority
2999 * pthread_setschedprio.c (pthread_setschedprio): Likewise.
3000 * pthread_mutexattr_getprioceiling.c
3001 (pthread_mutexattr_getprioceiling): If ceiling is 0, ensure it is
3002 in the SCHED_FIFO priority range.
3003 * pthread_mutexattr_setprioceiling.c
3004 (pthread_mutexattr_setprioceiling): Fix prioceiling validation.
3005 * pthread_mutex_getprioceiling.c (pthread_mutex_getprioceiling): Fail
3006 if mutex is not TPP. Ceiling is now in __data.__lock.
3007 * pthread_mutex_setprioceiling.c: Include stdbool.h.
3008 (pthread_mutex_setprioceiling): Fix prioceiling validation. Ceiling
3009 is now in __data.__lock. Add locking.
3010 * pthread_create.c (__free_tcb): Free pd->tpp structure.
3011 * Makefile (libpthread-routines): Add tpp.
3012 (xtests): Add tst-mutexpp1, tst-mutexpp6 and tst-mutexpp10.
3013 * tst-tpp.h: New file.
3014 * tst-mutexpp1.c: New file.
3015 * tst-mutexpp6.c: New file.
3016 * tst-mutexpp10.c: New file.
3017 * tst-mutex1.c (TEST_FUNCTION): Don't redefine if already defined.
3018 * tst-mutex6.c (TEST_FUNCTION): Likewise.
3020 2006-08-12 Ulrich Drepper <drepper@redhat.com>
3023 * pthread_join.c (pthread_join): Account for self being canceled
3024 when checking for deadlocks.
3025 * tst-join5.c: Cleanups. Allow to be used in tst-join6.
3026 (tf1): Don't print anything after pthread_join returns, this would be
3027 another cancellation point.
3029 * tst-join6.c: New file.
3030 * Makefile (tests): Add tst-join6.
3032 2006-08-03 Ulrich Drepper <drepper@redhat.com>
3035 * pthread_setspecific.c (__pthread_setspecific): Check
3036 out-of-range index before checking for unused key.
3038 * sysdeps/pthread/gai_misc.h: New file.
3040 2006-08-01 Ulrich Drepper <drepper@redhat.com>
3042 * sysdeps/unix/sysv/linux/i386/smp.h: New file. Old Linux-specific
3043 file. Don't use sysctl.
3044 * sysdeps/unix/sysv/linux/smp.h: Always assume SMP. Archs can
3045 overwrite the file if this is likely not true.
3047 2006-07-31 Daniel Jacobowitz <dan@codesourcery.com>
3049 * allocatestack.c (__reclaim_stacks): Reset the PID on cached stacks.
3050 * Makefile (tests): Add tst-getpid3.
3051 * tst-getpid3.c: New file.
3053 2006-07-30 Roland McGrath <roland@redhat.com>
3055 * Makefile (libpthread-routines): Add ptw-sigsuspend.
3057 * sysdeps/unix/sysv/linux/i386/not-cancel.h
3058 (pause_not_cancel): New macro.
3059 (nanosleep_not_cancel): New macro.
3060 (sigsuspend_not_cancel): New macro.
3061 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
3062 nanosleep_not_cancel macro from <not-cancel.h>.
3063 * pthread_mutex_lock.c (__pthread_mutex_lock): Use pause_not_cancel
3064 macro from <not-cancel.h>.
3066 2006-07-28 Ulrich Drepper <drepper@redhat.com>
3067 Jakub Jelinek <jakub@redhat.com>
3069 * descr.h: Change ENQUEUE_MUTEX and DEQUEUE_MUTEX for bit 0
3070 notification of PI mutex. Add ENQUEUE_MUTEX_PI.
3071 * pthreadP.h: Define PTHREAD_MUTEX_PI_* macros for PI mutex types.
3072 * pthread_mutex_setprioceilining.c: Adjust for mutex type name change.
3073 * pthread_mutex_init.c: Add support for priority inheritance mutex.
3074 * pthread_mutex_lock.c: Likewise.
3075 * pthread_mutex_timedlock.c: Likewise.
3076 * pthread_mutex_trylock.c: Likewise.
3077 * pthread_mutex_unlock.c: Likewise.
3078 * sysdeps/pthread/pthread_cond_broadcast.c: For PI mutexes wake
3080 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.c: Likewise.
3081 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.c: Likewise.
3082 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: New file.
3083 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-header): Add
3084 pthread-pi-defines.sym.
3085 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_LOCK_PI,
3086 FUTEX_UNLOCK_PI, and FUTEX_TRYLOCK_PI.
3087 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
3088 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
3089 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
3090 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
3091 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
3092 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
3093 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
3094 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
3095 _POSIX_THREAD_PRIO_INHERIT to 200112L.
3096 * tst-mutex1.c: Adjust to allow use in PI mutex test.
3097 * tst-mutex2.c: Likewise.
3098 * tst-mutex3.c: Likewise.
3099 * tst-mutex4.c: Likewise.
3100 * tst-mutex5.c: Likewise.
3101 * tst-mutex6.c: Likewise.
3102 * tst-mutex7.c: Likewise.
3103 * tst-mutex7a.c: Likewise.
3104 * tst-mutex8.c: Likewise.
3105 * tst-mutex9.c: Likewise.
3106 * tst-robust1.c: Likewise.
3107 * tst-robust7.c: Likewise.
3108 * tst-robust8.c: Likewise.
3109 * tst-mutexpi1.c: New file.
3110 * tst-mutexpi2.c: New file.
3111 * tst-mutexpi3.c: New file.
3112 * tst-mutexpi4.c: New file.
3113 * tst-mutexpi5.c: New file.
3114 * tst-mutexpi6.c: New file.
3115 * tst-mutexpi7.c: New file.
3116 * tst-mutexpi7a.c: New file.
3117 * tst-mutexpi8.c: New file.
3118 * tst-mutexpi9.c: New file.
3119 * tst-robust1.c: New file.
3120 * tst-robust2.c: New file.
3121 * tst-robust3.c: New file.
3122 * tst-robust4.c: New file.
3123 * tst-robust5.c: New file.
3124 * tst-robust6.c: New file.
3125 * tst-robust7.c: New file.
3126 * tst-robust8.c: New file.
3127 * Makefile (tests): Add the new tests.
3129 * pthread_create.c (start_thread): Add some casts to avoid warnings.
3130 * pthread_mutex_destroy.c: Remove unneeded label.
3132 2006-07-01 Ulrich Drepper <drepper@redhat.com>
3134 * pthread_mutex_init.c (__pthread_mutex_init): Move some
3135 computations to compile time.
3137 2006-06-04 Ulrich Drepper <drepper@redhat.com>
3139 * sysdeps/pthread/pthread.h: Add pthread_equal inline version.
3141 2006-05-15 Ulrich Drepper <drepper@redhat.com>
3143 * sysdeps/unix/sysv/linux/fork.h: Mark __fork_handlers as hidden.
3145 2006-05-11 Ulrich Drepper <drepper@redhat.com>
3147 * pthread_key_create.c (__pthread_key_create): Do away with
3148 __pthread_keys_lock.
3150 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
3151 (__kernel_cpumask_size): Mark as hidden.
3152 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
3154 * sem_open.c (__sem_mappings_lock): Mark as hidden.
3155 * semaphoreP.h (__sem_mappings_lock): Likewise.
3157 2006-05-10 Ulrich Drepper <drepper@redhat.com>
3159 * pthread_atfork.c: Mark __dso_handle as hidden.
3161 2006-05-09 Ulrich Drepper <drepper@redhat.com>
3164 * sysdeps/pthread/unwind-forcedunwind.c: Different solution for
3165 the reload problem. Change the one path in pthread_cancel_init
3166 which causes the problem. Force gcc to reload. Simplify callers.
3167 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c
3168 (_Unwind_GetBSP): Undo last patch.
3170 2006-05-07 Ulrich Drepper <drepper@redhat.com>
3172 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: Make sure the
3173 function pointer is reloaded after pthread_cancel_init calls.
3176 * sysdeps/pthread/unwind-forcedunwind.c: Make sure functions
3177 pointers are reloaded after pthread_cancel_init calls.
3179 2006-05-01 Ulrich Drepper <drepper@redhat.com>
3181 * sysdeps/pthread/allocalim.h (__libc_use_alloca): Mark with
3184 2006-04-27 Ulrich Drepper <drepper@redhat.com>
3186 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
3187 Allocate new object which is passed to timer_sigev_thread so that
3188 the timer can be deleted before the new thread is scheduled.
3190 2006-04-26 Roland McGrath <roland@redhat.com>
3192 * sysdeps/x86_64/tls.h: Include <asm/prctl.h> inside [! __ASSEMBLER__].
3194 2006-04-08 Ulrich Drepper <drepper@redhat.com>
3196 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove branch predicion
3197 suffix for conditional jumps.
3198 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
3199 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
3200 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
3201 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
3202 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
3203 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
3205 * init.c (sigcancel_handler): Compare with correct PID even if the
3206 thread is in the middle of a fork call.
3207 (sighandler_setxid): Likewise.
3208 Reported by Suzuki K P <suzuki@in.ibm.com> .
3210 2006-04-07 Jakub Jelinek <jakub@redhat.com>
3212 * pthreadP.h (FUTEX_TID_MASK): Sync with kernel.
3214 2006-04-06 Ulrich Drepper <drepper@redhat.com>
3216 * pthread_getattr_np.c (pthread_getattr_np): Close fp if getrlimit
3217 fails [Coverity CID 105].
3219 2006-04-05 Ulrich Drepper <drepper@redhat.com>
3221 * sysdeps/pthread/pthread.h: Add nonnull attributes.
3223 2006-04-03 Steven Munroe <sjmunroe@us.ibm.com>
3226 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h [_ARCH_PWR4]:
3227 Define __lll_rel_instr using lwsync.
3229 2006-03-27 Ulrich Drepper <drepper@redhat.com>
3231 * allocatestack.c (allocate_stack): Always initialize robust_head.
3232 * descr.h: Define struct robust_list_head.
3233 (struct pthread): Use robust_list_head in robust mutex list definition.
3234 Adjust ENQUEUE_MUTEX and DEQUEUE_MUTEX.
3235 * init.c [!__ASSUME_SET_ROBUST_LIST] (__set_robust_list_avail): Define.
3236 (__pthread_initialize_minimal_internal): Register robust_list with
3238 * pthreadP.h: Remove PRIVATE_ from PTHREAD_MUTEX_ROBUST_* names.
3239 Declare __set_robust_list_avail.
3240 * pthread_create.c (start_thread): Register robust_list of new thread.
3241 [!__ASSUME_SET_ROBUST_LIST]: If robust_list is not empty wake up
3243 * pthread_mutex_destroy.c: For robust mutexes don't look at the
3244 number of users, it's unreliable.
3245 * pthread_mutex_init.c: Allow use of pshared robust mutexes if
3246 set_robust_list syscall is available.
3247 * pthread_mutex_consistent.c: Adjust for PTHREAD_MUTEX_ROBUST_* rename.
3248 * pthread_mutex_lock.c: Simplify robust mutex code a bit.
3249 Set robust_head.list_op_pending before trying to lock a robust mutex.
3250 * pthread_mutex_timedlock.c: Likewise.
3251 * pthread_mutex_trylock.c: Likewise.
3252 * pthread_mutex_unlock.c: Likewise for unlocking.
3253 * Makefile (tests): Add tst-robust8.
3254 * tst-robust8.c: New file.
3256 2006-03-08 Andreas Schwab <schwab@suse.de>
3258 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h
3259 (DL_SYSINFO_IMPLEMENTATION): Add missing newline.
3261 2006-03-05 Roland McGrath <roland@redhat.com>
3263 * configure (libc_add_on): Disable add-on when $add_ons_automatic = yes
3264 and $config_os doesn't match *linux*.
3266 2006-03-05 David S. Miller <davem@sunset.davemloft.net>
3268 * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S:
3269 Use __syscall_error.
3270 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
3271 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: Likewise.
3272 * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: Likewise.
3273 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
3274 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: Likewise.
3275 * sysdeps/unix/sysv/linux/sparc/Makefile: New file.
3277 2006-03-02 Ulrich Drepper <drepper@redhat.com>
3279 * sysdeps/unix/sysv/linux/aio_misc.h: Various cleanups.
3281 2006-03-01 Ulrich Drepper <drepper@redhat.com>
3283 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
3284 (__lll_robust_lock_wait): Also set FUTEX_WAITERS bit if we got the
3286 (__lll_robust_timedlock_wait): Likewise.
3287 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S
3288 (__lll_robust_lock_wait): Likewise.
3289 (__lll_robust_timedlock_wait): Likewise.
3290 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
3291 (__lll_robust_lock_wait): Likewise.
3292 (__lll_robust_timedlock_wait): Likewise.
3294 2006-03-01 Jakub Jelinek <jakub@redhat.com>
3296 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_robust_mutex_dead,
3297 lll_robust_mutex_trylock, lll_robust_mutex_lock,
3298 lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
3299 lll_robust_mutex_unlock): Define.
3300 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
3302 2006-02-28 H.J. Lu <hongjiu.lu@intel.com>
3304 * sysdeps/unix/sysv/linux/ia64/clone2.S: Include <clone2.S>
3305 instead of <clone.S>.
3307 2006-02-27 Jakub Jelinek <jakub@redhat.com>
3309 * Makefile (libpthread-routines): Add
3310 pthread_mutexattr_[sg]etprotocol, pthread_mutexattr_[sg]etprioceiling
3311 and pthread_mutex_[sg]etprioceiling.
3312 * Versions (GLIBC_2.4): Export pthread_mutexattr_getprotocol,
3313 pthread_mutexattr_setprotocol, pthread_mutexattr_getprioceiling,
3314 pthread_mutexattr_setprioceiling, pthread_mutex_getprioceiling and
3315 pthread_mutex_setprioceiling.
3316 * sysdeps/pthread/pthread.h (PTHREAD_PRIO_NONE, PTHREAD_PRIO_INHERIT,
3317 PTHREAD_PRIO_PROTECT): New enum values.
3318 (pthread_mutexattr_getprotocol, pthread_mutexattr_setprotocol,
3319 pthread_mutexattr_getprioceiling, pthread_mutexattr_setprioceiling,
3320 pthread_mutex_getprioceiling, pthread_mutex_setprioceiling): New
3322 * pthreadP.h (PTHREAD_MUTEX_PRIO_INHERIT_PRIVATE_NP,
3323 PTHREAD_MUTEX_PRIO_PROTECT_PRIVATE_NP): New enum values.
3324 (PTHREAD_MUTEX_PRIO_CEILING_SHIFT, PTHREAD_MUTEX_PRIO_CEILING_MASK):
3326 (PTHREAD_MUTEXATTR_PROTOCOL_SHIFT, PTHREAD_MUTEXATTR_PROTOCOL_MASK,
3327 PTHREAD_MUTEXATTR_PRIO_CEILING_SHIFT,
3328 PTHREAD_MUTEXATTR_PRIO_CEILING_MASK): Define.
3329 (PTHREAD_MUTEXATTR_FLAG_BITS): Or in PTHREAD_MUTEXATTR_PROTOCOL_MASK
3330 and PTHREAD_MUTEXATTR_PRIO_CEILING_MASK.
3331 * pthread_mutex_init.c (__pthread_mutex_init): For the time being
3332 return ENOTSUP for PTHREAD_PRIO_INHERIT or PTHREAD_PRIO_PROTECT
3334 * pthread_mutex_getprioceiling.c: New file.
3335 * pthread_mutex_setprioceiling.c: New file.
3336 * pthread_mutexattr_getprioceiling.c: New file.
3337 * pthread_mutexattr_setprioceiling.c: New file.
3338 * pthread_mutexattr_getprotocol.c: New file.
3339 * pthread_mutexattr_setprotocol.c: New file.
3341 2006-02-27 Daniel Jacobowitz <dan@codesourcery.com>
3343 * sysdeps/unix/sysv/linux/aio_misc.h: Include <limits.h>.
3345 2006-02-27 Roland McGrath <roland@redhat.com>
3347 * sysdeps/pthread/Subdirs: List nptl here too.
3348 * configure (libc_add_on_canonical): New variable.
3350 * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: Use #include_next.
3352 * sysdeps/unix/sysv/linux/sleep.c: Use #include_next after #include of
3353 self to get main source tree's file.
3354 * sysdeps/unix/sysv/linux/alpha/clone.S: Likewise.
3355 * sysdeps/unix/sysv/linux/i386/clone.S: Likewise.
3356 * sysdeps/unix/sysv/linux/i386/vfork.S: Likewise.
3357 * sysdeps/unix/sysv/linux/ia64/clone2.S: Likewise.
3358 * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: Likewise.
3359 * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: Likewise.
3360 * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: Likewise.
3361 * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: Likewise.
3362 * sysdeps/unix/sysv/linux/sh/clone.S: Likewise.
3363 * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: Likewise.
3364 * sysdeps/unix/sysv/linux/sparc/sparc64/clone.S: Likewise.
3365 * sysdeps/unix/sysv/linux/x86_64/clone.S: Likewise.
3366 * sysdeps/unix/sysv/linux/x86_64/vfork.S: Likewise.
3368 * Makefile: Use $(sysdirs) in vpath directive.
3370 * sysdeps/pthread/Makefile (CFLAGS-libc-start.c): Variable removed.
3371 (CPPFLAGS-timer_routines.c): Likewise.
3373 * Makeconfig (includes): Variable removed.
3375 2006-02-26 Roland McGrath <roland@redhat.com>
3377 * sysdeps/generic/pt-raise.c: Moved to ...
3378 * pt-raise.c: ... here.
3379 * sysdeps/generic/lowlevellock.h: Moved to ...
3380 * lowlevellock.h: ... here.
3382 2006-02-23 Roland McGrath <roland@redhat.com>
3384 * descr.h (struct pthread): Add final member `end_padding'.
3385 (PTHREAD_STRUCT_END_PADDING): Use it.
3387 2006-02-20 Roland McGrath <roland@redhat.com>
3389 * sysdeps/mips: Directory removed, saved in ports repository.
3390 * sysdeps/unix/sysv/linux/mips: Likewise.
3392 2006-02-18 Ulrich Drepper <drepper@redhat.com>
3394 * tst-robust1.c: Add second mutex to check that the mutex list is
3397 2006-02-17 Jakub Jelinek <jakub@redhat.com>
3399 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_mutex_dead,
3400 lll_robust_mutex_trylock, lll_robust_mutex_lock,
3401 lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
3402 lll_robust_mutex_unlock): New macros.
3403 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
3404 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
3405 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
3406 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
3407 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: New file.
3409 2006-02-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3411 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Add lll_robust_mutex_*
3413 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: New file.
3415 2006-02-17 Ulrich Drepper <drepper@redhat.com>
3417 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
3418 (lll_robust_mutex_unlock): Avoid unnecessary wakeups.
3419 * sysdeps/unix/sysv/linux/i386/lowlevellock.h
3420 (lll_robust_mutex_unlock): Likewise.
3422 2006-02-13 Jakub Jelinek <jakub@redhat.com>
3424 * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX):
3425 Set robust_list.__next rather than robust_list.
3426 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
3427 (__pthread_list_t): New typedef.
3428 (pthread_mutex_t): Replace __next and __prev fields with __list.
3429 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
3430 (__pthread_list_t): New typedef.
3431 (pthread_mutex_t): Replace __next and __prev fields with __list.
3432 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
3433 (__pthread_list_t, __pthread_slist_t): New typedefs.
3434 (pthread_mutex_t): Replace __next and __prev fields with __list.
3435 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
3436 (__pthread_list_t, __pthread_slist_t): New typedefs.
3437 (pthread_mutex_t): Replace __next and __prev fields with __list.
3438 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
3439 (__pthread_list_t, __pthread_slist_t): New typedefs.
3440 (pthread_mutex_t): Replace __next and __prev fields with __list.
3441 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h
3442 (__pthread_slist_t): New typedef.
3443 (pthread_mutex_t): Replace __next field with __list.
3445 2006-02-15 Ulrich Drepper <drepper@redhat.com>
3447 * pthreadP.h: Define PTHREAD_MUTEX_INCONSISTENT instead of
3448 PTHREAD_MUTEX_OWNERDEAD.
3449 (PTHREAD_MUTEX_ROBUST_PRIVATE_NP): Define as 16, not 256.
3450 Define FUTEX_WAITERS, FUTEX_OWNER_DIED, FUTEX_TID_MASK.
3451 * Makefile (libpthread-routines): Add lowlevelrobustlock.
3452 * pthread_create.c (start_thread): Very much simplify robust_list loop.
3453 * pthread_mutex_consistent.c: Inconsistent mutex have __owner now set
3454 to PTHREAD_MUTEX_INCONSISTENT.
3455 * pthread_mutex_destroy.c: Allow destroying of inconsistent mutexes.
3456 * pthread_mutex_lock.c: Reimplement robust mutex handling.
3457 * pthread_mutex_trylock.c: Likewise.
3458 * pthread_mutex_timedlock.c: Likewise.
3459 * pthread_mutex_unlock.c: Likewise.
3460 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
3461 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
3462 lowlevelrobustlock.sym.
3463 * sysdeps/unix/sysv/linux/lowlevelrobustlock.sym: New file.
3464 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add lll_robust_mutex_*
3466 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
3467 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: New file.
3468 * sysdeps/unix/sysv/linux/i386/i586/lowlevelrobustlock.S: New file.
3469 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrobustlock.S: New file.
3470 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: New file.
3472 2006-02-12 Ulrich Drepper <drepper@redhat.com>
3474 * allocatestack.c (allocate_stack): Initialize robust_list.
3475 * init.c (__pthread_initialize_minimal_internal): Likewise.
3476 * descr.h (struct xid_command): Pretty printing.
3477 (struct pthread): Use __pthread_list_t or __pthread_slist_t for
3478 robust_list. Adjust macros.
3479 * pthread_create.c (start_thread): Adjust robust_list handling.
3480 * phtread_mutex_unlock.c: Don't allow unlocking from any thread
3481 but the owner for all robust mutex types.
3482 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
3483 __pthread_list_t and __pthread_slist_t. Use them in pthread_mutex_t.
3484 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3485 * sysdeps/pthread/pthread.h: Adjust mutex initializers.
3487 * sysdeps/unix/sysv/linux/i386/not-cancel.h: Define openat_not_cancel,
3488 openat_not_cancel_3, openat64_not_cancel, and openat64_not_cancel_3.
3490 2006-02-08 Jakub Jelinek <jakub@redhat.com>
3492 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait,
3493 lll_futex_timedwait, lll_wait_tid): Add "memory" clobber.
3495 2006-01-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3497 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_futex_wait):
3499 (lll_futex_timed_wait): Define.
3501 2006-01-19 Ulrich Drepper <drepper@redhat.com>
3503 * tst-cancel4.c: Test ppoll.
3505 2006-01-18 Andreas Jaeger <aj@suse.de>
3508 * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h
3509 (pthread_mutex_t): Follow changes for other archs. Based on patch
3510 by Jim Gifford <patches@jg555.com>.
3512 2006-01-13 Richard Henderson <rth@redhat.com>
3514 * sysdeps/alpha/tls.h (tcbhead_t): Rename member to __private.
3516 2006-01-10 Roland McGrath <roland@redhat.com>
3518 * sysdeps/alpha/jmpbuf-unwind.h: File moved to main source tree.
3519 * sysdeps/i386/jmpbuf-unwind.h: Likewise.
3520 * sysdeps/mips/jmpbuf-unwind.h: Likewise.
3521 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
3522 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
3523 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
3524 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
3525 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
3526 * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
3527 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
3529 2006-01-09 Roland McGrath <roland@redhat.com>
3531 * tst-initializers1-c89.c: New file.
3532 * tst-initializers1-c99.c: New file.
3533 * tst-initializers1-gnu89.c: New file.
3534 * tst-initializers1-gnu99.c: New file.
3535 * Makefile (tests): Add them.
3536 (CFLAGS-tst-initializers1-c89.c): New variable.
3537 (CFLAGS-tst-initializers1-c99.c): New variable.
3538 (CFLAGS-tst-initializers1-gnu89.c): New variable.
3539 (CFLAGS-tst-initializers1-gnu99.c): New variable.
3541 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
3542 Use __extension__ on anonymous union definition.
3543 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3544 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
3545 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3546 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3547 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
3549 2006-01-08 Jakub Jelinek <jakub@redhat.com>
3551 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
3552 Don't give the union a name because it changes the mangled name.
3553 Instead name the struct for __data.
3554 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_mutex_t):
3556 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_mutex_t):
3559 2006-01-09 Jakub Jelinek <jakub@redhat.com>
3561 * sysdeps/sparc/sparc64/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Add
3562 stack bias to mc_ftp field.
3564 2006-01-07 Ulrich Drepper <drepper@redhat.com>
3566 * sysdeps/pthread/aio_misc.h (AIO_MISC_WAIT): Work around gcc
3567 being too clever and reloading the futex value where it shouldn't.
3569 2006-01-06 Ulrich Drepper <drepper@redhat.com>
3571 * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX): Use
3574 2006-01-06 Jakub Jelinek <jakub@redhat.com>
3576 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
3579 2006-01-06 Ulrich Drepper <drepper@redhat.com>
3581 * sysdeps/ia64/tls.h (tcbhead_t): Rename private member to __private.
3582 * sysdeps/ia64/tcb-offsets.sym: Adjust for private->__private
3583 rename in tcbhead_t.
3585 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
3586 Don't give the union a name because it changes the mangled name.
3587 Instead name the struct for __data.
3588 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3589 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3590 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3591 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3592 * pthread_create.c (start_thread): Adjust robust mutex free loop.
3593 * descr.h (ENQUEUE_MUTEX, DEQUEUE_MUTEX): Adjust.
3595 2006-01-05 Ulrich Drepper <drepper@redhat.com>
3597 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
3599 (lll_futex_timed_wait): Define.
3600 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
3601 * sysdeps/pthread/aio_misc.h: New file.
3603 2006-01-03 Joseph S. Myers <joseph@codesourcery.com>
3605 * Makefile ($(objpfx)$(multidir)): Use mkdir -p.
3607 2006-01-03 Steven Munroe <sjmunroe@us.ibm.com>
3609 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
3610 (PSEUDO): Remove redundant cfi_startproc and cfi_endproc directives.
3611 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
3613 2006-01-04 Ulrich Drepper <drepper@redhat.com>
3615 * tst-cancel24.cc: Use C headers instead of C++ headers.
3617 2006-01-03 Jakub Jelinek <jakub@redhat.com>
3619 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Remove #error for
3620 sparc-linux configured glibc.
3621 (lll_futex_wake_unlock): Define to 1 for sparc-linux configured glibc.
3622 (__lll_mutex_trylock, __lll_mutex_cond_trylock, __lll_mutex_lock,
3623 __lll_mutex_cond_lock, __lll_mutex_timedlock): Use
3624 atomic_compare_and_exchange_val_24_acq instead of
3625 atomic_compare_and_exchange_val_acq.
3626 (lll_mutex_unlock, lll_mutex_unlock_force): Use atomic_exchange_24_rel
3627 instead of atomic_exchange_rel.
3628 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: New file.
3629 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c: New
3631 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c: New
3633 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: New file.
3634 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: New file.
3635 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: New file.
3636 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c: New file.
3637 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: New file.
3638 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
3640 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
3642 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: New file.
3643 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: New file.
3644 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c: New
3646 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_trywait.c: New
3648 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: New file.
3650 2006-01-03 Ulrich Drepper <drepper@redhat.com>
3652 * sysdeps/pthread/pthread.h [__WORDSIZE==64]: Don't use cast in
3655 2006-01-02 Jakub Jelinek <jakub@redhat.com>
3657 * sysdeps/sparc/tls.h (tcbhead_t): Add pointer_guard field.
3658 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
3659 THREAD_COPY_POINTER_GUARD): Define.
3660 * sysdeps/sparc/tcb-offsets.sym (POINTER_GUARD): Define.
3661 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Revert 2005-12-27 changes.
3663 2006-01-01 Ulrich Drepper <drepper@redhat.com>
3665 * version.c: Update copyright year.
3667 2005-12-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3669 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Remove explicit
3670 .eh_frame section, use cfi_* directives.
3671 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Add cfi instrumentation.
3673 2005-12-30 Ulrich Drepper <drepper@redhat.com>
3675 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Undo last change for
3678 2005-12-29 Ulrich Drepper <drepper@redhat.com>
3680 * sysdeps/pthread/sigaction.c: Removed.
3681 * sigaction.c: New file.
3682 * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-sigaction.c.
3684 2005-12-28 Ulrich Drepper <drepper@redhat.com>
3686 * Makefile (tests): Add tst-signal7.
3687 * tst-signal7.c: New file.
3689 2005-12-27 Roland McGrath <roland@redhat.com>
3691 * sysdeps/x86_64/jmpbuf-unwind.h (_jmpbuf_sp): New inline function.
3692 (_JMPBUF_UNWINDS_ADJ): Use it, to PTR_DEMANGLE before comparison.
3693 * sysdeps/alpha/jmpbuf-unwind.h: Likewise.
3694 * sysdeps/i386/jmpbuf-unwind.h: Likewise.
3695 * sysdeps/mips/jmpbuf-unwind.h: Likewise.
3696 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
3697 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
3698 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
3699 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
3700 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
3701 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
3703 2005-12-27 Jakub Jelinek <jakub@redhat.com>
3705 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Add __next
3706 and __prev field to pthread_mutex_t.
3707 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3708 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3709 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3710 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
3711 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Add __next field
3714 2005-12-26 Ulrich Drepper <drepper@redhat.com>
3716 * pthreadP.h: Define PTHREAD_MUTEX_ROBUST_PRIVATE_NP,
3717 PTHREAD_MUTEX_ROBUST_PRIVATE_RECURSIVE_NP,
3718 PTHREAD_MUTEX_ROBUST_PRIVATE_ERRORCHECK_NP,
3719 PTHREAD_MUTEX_ROBUST_PRIVATE_ADAPTIVE_NP,
3720 PTHREAD_MUTEXATTR_FLAG_ROBUST, PTHREAD_MUTEXATTR_FLAG_PSHARED,
3721 and PTHREAD_MUTEXATTR_FLAG_BITS.
3722 * descr.h (struct pthread): Add robust_list field and define
3723 ENQUEUE_MUTEX and DEQUEUE_MUTEX macros.
3724 * pthread_mutexattr_getrobust.c: New file.
3725 * pthread_mutexattr_setrobust.c: New file.
3726 * pthread_mutex_consistent.c: New file.
3727 * sysdeps/pthread/pthread.h: Declare pthread_mutexattr_getrobust,
3728 pthread_mutexattr_setrobust, and pthread_mutex_consistent.
3729 Define PTHREAD_MUTEX_STALLED_NP and PTHREAD_MUTEX_ROBUST_NP.
3730 Adjust pthread_mutex_t initializers.
3731 * nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Add __next
3732 field to pthread_mutex_t.
3733 * nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Add __next
3734 and __prev field to pthread_mutex_t.
3735 * Versions [GLIBC_2.4]: Export pthread_mutexattr_getrobust_np,
3736 pthread_mutexattr_setrobust_np, and pthread_mutex_consistent_np.
3737 * pthread_mutexattr_getpshared.c: Use PTHREAD_MUTEXATTR_FLAG_PSHARED
3738 and PTHREAD_MUTEXATTR_FLAG_BITS macros instead of magic numbers.
3739 * pthread_mutexattr_gettype.c: Likewise.
3740 * pthread_mutexattr_setpshared.c: Likewise.
3741 * pthread_mutexattr_settype.c: Likewise.
3742 * pthread_mutex_init.c: Reject robust+pshared attribute for now.
3743 Initialize mutex kind according to robust flag.
3744 * pthread_mutex_lock.c: Implement local robust mutex.
3745 * pthread_mutex_timedlock.c: Likewise.
3746 * pthread_mutex_trylock.c: Likewise.
3747 * pthread_mutex_unlock.c: Likewise.
3748 * pthread_create.c (start_thread): Mark robust mutexes which remained
3750 * tst-robust1.c: New file.
3751 * tst-robust2.c: New file.
3752 * tst-robust3.c: New file.
3753 * tst-robust4.c: New file.
3754 * tst-robust5.c: New file.
3755 * tst-robust6.c: New file.
3756 * tst-robust7.c: New file.
3757 * Makefile (libpthread-routines): Add pthread_mutexattr_getrobust,
3758 pthread_mutexattr_setrobust, and pthread_mutex_consistent.
3759 (tests): Add tst-robust1, tst-robust2, tst-robust3, tst-robust4,
3760 tst-robust5, tst-robust6, and tst-robust7.
3762 * tst-typesizes.c: New file.
3763 * Makefile (tests): Add tst-typesizes.
3765 * tst-once3.c: More debug output.
3767 2005-12-24 Ulrich Drepper <drepper@redhat.com>
3769 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Add break
3770 missing after last change.
3772 * version.c: Update copyright year.
3774 2005-12-23 Ulrich Drepper <drepper@redhat.com>
3776 * pthread_mutex_destroy.c: Set mutex type to an invalid value.
3777 * pthread_mutex_lock.c: Return EINVAL for invalid mutex type.
3778 * pthread_mutex_trylock.c: Likewise.
3779 * pthread_mutex_timedlock.c: Likewise.
3780 * pthread_mutex_unlock.c: Likewise.
3782 2005-12-22 Roland McGrath <roland@redhat.com>
3784 * sysdeps/pthread/sigaction.c: Use "" instead of <> to include self,
3785 so that #include_next's search location is not reset to the -I..
3786 directory where <nptl/...> can be found.
3788 2005-12-22 Ulrich Drepper <drepper@redhat.com>
3791 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
3792 Fix unwind info. Remove useless branch prediction prefix.
3793 * tst-cancel24.cc: New file.
3794 * Makefile: Add rules to build and run tst-cancel24.
3796 2005-12-21 Roland McGrath <roland@redhat.com>
3798 * libc-cancellation.c: Use <> rather than "" #includes.
3799 * pt-cleanup.c: Likewise.
3800 * pthread_create.c: Likewise.
3801 * pthread_join.c: Likewise.
3802 * pthread_timedjoin.c: Likewise.
3803 * pthread_tryjoin.c: Likewise.
3804 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Likewise.
3805 * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
3806 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
3807 * unwind.c: Likewise.
3809 2005-12-19 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3811 * sysdeps/sh/tcb-offsets.sym: Add POINTER_GUARD.
3812 * sysdeps/sh/tls.h (tcbhead_t): Remove private and add pointer_guard.
3813 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
3814 THREAD_COPY_POINTER_GUARD): Define.
3816 2005-12-19 Jakub Jelinek <jakub@redhat.com>
3818 * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): Make room for 2 uintptr_t's
3820 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
3821 THREAD_COPY_POINTER_GUARD): Define.
3822 * sysdeps/powerpc/tcb-offsets.sym (POINTER_GUARD): Add.
3823 * sysdeps/powerpc/tls.h (tcbhead_t): Add pointer_guard field.
3824 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
3825 THREAD_COPY_POINTER_GUARD): Define.
3826 * sysdeps/s390/tcb-offsets.sym (STACK_GUARD): Add.
3827 * sysdeps/s390/tls.h (THREAD_GET_POINTER_GUARD,
3828 THREAD_SET_POINTER_GUARD, THREAD_COPY_POINTER_GUARD): Define.
3829 * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S (__ia64_longjmp):
3830 Use PTR_DEMANGLE for B0 if defined.
3832 2005-12-17 Ulrich Drepper <drepper@redhat.com>
3834 * pthread_create.c (__pthread_create_2_1): Use
3835 THREAD_COPY_POINTER_GUARD if available.
3836 * sysdeps/i386/tcb-offsets.sym: Add POINTER_GUARD.
3837 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
3838 * sysdeps/i386/tls.h (tcbhead_t): Add pointer_guard.
3839 Define THREAD_SET_POINTER_GUARD and THREAD_COPY_POINTER_GUARD.
3840 * sysdeps/x86_64/tls.h: Likewise.
3842 2005-12-15 Roland McGrath <roland@redhat.com>
3844 * sysdeps/unix/sysv/linux/mq_notify.c: Don't use sysdeps/generic.
3846 2005-12-13 Ulrich Drepper <drepper@redhat.com>
3848 * sysdeps/pthread/sigfillset.c: Adjust for files moved out of
3850 * errno-loc.c: New file.
3852 2005-12-12 Roland McGrath <roland@redhat.com>
3854 * init.c (__pthread_initialize_minimal_internal): Do __static_tls_size
3855 adjustments before choosing stack size. Update minimum stack size
3856 calculation to match allocate_stack change.
3858 2005-12-12 Ulrich Drepper <drepper@redhat.com>
3860 * allocatestack.c (allocate_stack): Don't demand that there is an
3861 additional full page available on the stack beside guard, TLS, the
3864 2005-11-24 Ulrich Drepper <drepper@redhat.com>
3866 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
3867 (__cleanup_fct_attribute): Use __regparm__ not regparm.
3869 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: When
3870 compiling 32-bit code we must define __cleanup_fct_attribute.
3872 005-11-24 Jakub Jelinek <jakub@redhat.com>
3875 * sysdeps/pthread/pthread.h (__pthread_unwind_next): Use
3876 __attribute__ instead of __attribute.
3877 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
3878 (__cleanup_fct_attribute): Likewise.
3880 2005-11-17 Jakub Jelinek <jakub@redhat.com>
3882 * sysdeps/pthread/unwind-forcedunwind.c (pthread_cancel_init): Put
3883 a write barrier before writing libgcc_s_getcfa.
3885 2005-11-06 Ulrich Drepper <drepper@redhat.com>
3887 * sysdeps/unix/sysv/linux/configure: Removed.
3889 2005-11-05 Ulrich Drepper <drepper@redhat.com>
3891 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Remove trace of
3892 optional init_array/fini_array support.
3894 2005-10-24 Roland McGrath <roland@redhat.com>
3896 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Remove unnecessary
3897 versioned_symbol use.
3899 2005-10-16 Roland McGrath <roland@redhat.com>
3901 * init.c (__pthread_initialize_minimal_internal): Even when using a
3902 compile-time default stack size, apply the minimum that allocate_stack
3903 will require, and round up to page size.
3905 2005-10-10 Daniel Jacobowitz <dan@codesourcery.com>
3907 * Makefile ($(test-modules)): Remove static pattern rule.
3909 2005-10-14 Jakub Jelinek <jakub@redhat.com>
3910 Ulrich Drepper <drepper@redhat.com>
3912 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix stack
3913 alignment in callback function.
3914 * Makefile: Add rules to build and run tst-align3.
3915 * tst-align3.c: New file.
3917 2005-10-03 Jakub Jelinek <jakub@redhat.com>
3919 * allocatestack.c (setxid_signal_thread): Add
3920 INTERNAL_SYSCALL_DECL (err).
3922 2005-10-02 Jakub Jelinek <jakub@redhat.com>
3924 * allocatestack.c (setxid_signal_thread): Need to use
3925 atomic_compare_and_exchange_bool_acq.
3927 2005-10-01 Ulrich Drepper <drepper@redhat.com>
3928 Jakub Jelinek <jakub@redhat.com>
3930 * descr.h: Define SETXID_BIT and SETXID_BITMASK. Adjust
3932 (struct pthread): Move specific_used field to avoid padding.
3933 Add setxid_futex field.
3934 * init.c (sighandler_setxid): Reset setxid flag and release the
3936 * allocatestack.c (setxid_signal_thread): New function. Broken
3937 out of the bodies of the two loops in __nptl_setxid. For undetached
3938 threads check whether they are exiting and if yes, don't send a signal.
3939 (__nptl_setxid): Simplify loops by using setxid_signal_thread.
3940 * pthread_create.c (start_thread): For undetached threads, check
3941 whether setxid bit is set. If yes, wait until signal has been
3944 * allocatestack.c (STACK_VARIABLES): Initialize them.
3945 * pthread_create.c (__pthread_create_2_1): Initialize pd.
3947 2004-09-02 Jakub Jelinek <jakub@redhat.com>
3949 * pthread_cond_destroy.c (__pthread_cond_destroy): If there are
3950 waiters, awake all waiters on the associated mutex.
3952 2005-09-22 Roland McGrath <roland@redhat.com>
3954 * perf.c [__x86_64__] (HP_TIMING_NOW): New macro (copied from
3955 ../sysdeps/x86_64/hp-timing.h).
3957 2005-08-29 Jakub Jelinek <jakub@redhat.com>
3959 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_WAKE_OP,
3960 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3961 (lll_futex_wake_unlock): Define.
3962 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_WAKE_OP,
3963 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3964 (lll_futex_wake_unlock): Define.
3965 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_WAKE_OP,
3966 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3967 (lll_futex_wake_unlock): Define.
3968 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_WAKE_OP,
3969 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3970 (lll_futex_wake_unlock): Define.
3971 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_WAKE_OP,
3972 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3973 (lll_futex_wake_unlock): Define.
3974 * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal): Use
3975 lll_futex_wake_unlock.
3976 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
3977 (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3978 (__pthread_cond_signal): Use FUTEX_WAKE_OP.
3979 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
3980 (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3981 (__pthread_cond_signal): Use FUTEX_WAKE_OP.
3983 2005-09-05 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3985 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
3986 Fix typo in register name.
3988 2005-08-23 Ulrich Drepper <drepper@redhat.com>
3990 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
3991 Use __sigfillset. Document that sigfillset does the right thing wrt
3994 2005-08-08 Jakub Jelinek <jakub@redhat.com>
3996 * tst-stackguard1.c (do_test): Likewise.
3998 2005-07-29 Jakub Jelinek <jakub@redhat.com>
4000 * tst-stackguard1.c (do_test): Don't fail if the poor man's
4001 randomization doesn't work well enough.
4003 2005-07-11 Jakub Jelinek <jakub@redhat.com>
4006 * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER,
4007 PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP,
4008 PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP,
4009 PTHREAD_MUTEX_ADAPTIVE_NP, PTHREAD_RWLOCK_INITIALIZER,
4010 PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP,
4011 PTHREAD_COND_INITIALIZER): Supply zeros for all fields
4013 * Makefile (tests): Add tst-initializers1.
4014 (CFLAGS-tst-initializers1.c): Set.
4015 * tst-initializers1.c: New test.
4017 2005-07-11 Jakub Jelinek <jakub@redhat.com>
4019 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_rwlock_t):
4020 Make sure __flags are located at offset 48 from the start of the
4023 2005-07-02 Roland McGrath <roland@redhat.com>
4025 * Makeconfig: Comment fix.
4027 2005-07-05 Jakub Jelinek <jakub@redhat.com>
4029 * descr.h (PTHREAD_STRUCT_END_PADDING): Define.
4030 * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): If PTHREAD_STRUCT_END_PADDING
4031 is smaller than 8 bytes, increase TLS_PRE_TCB_SIZE by 16 bytes.
4032 (THREAD_SYSINFO, THREAD_SELF, DB_THREAD_SELF): Don't assume
4033 TLS_PRE_TCB_SIZE is sizeof (struct pthread).
4034 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
4035 * sysdeps/ia64/tcb-offsets.sym (PID, TID, MULTIPLE_THREADS_OFFSET):
4036 Use TLS_PRE_TCB_SIZE instead of sizeof (struct pthread).
4037 * sysdeps/unix/sysv/linux/ia64/createthread.c (TLS_VALUE): Don't
4038 assume TLS_PRE_TCB_SIZE is sizeof (struct pthread).
4040 2005-06-25 Jakub Jelinek <jakub@redhat.com>
4042 * sysdeps/i386/tls.h (tcbhead_t): Add stack_guard field.
4043 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
4044 * sysdeps/x86_64/tls.h (tcbhead_t): Add sysinfo and stack_guard
4046 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
4047 * sysdeps/s390/tls.h (tcbhead_t): Add stack_guard
4048 field. Put in sysinfo field unconditionally.
4049 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
4050 * sysdeps/powerpc/tls.h (tcbhead_t): Add stack_guard field.
4051 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
4052 * sysdeps/sparc/tls.h (tcbhead_t): Add sysinfo and stack_guard
4054 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
4055 * pthread_create.c (__pthread_create_2_1): Use
4056 THREAD_COPY_STACK_GUARD macro.
4057 * Makefile: Add rules to build and run tst-stackguard1{,-static}
4059 * tst-stackguard1.c: New file.
4060 * tst-stackguard1-static.c: New file.
4062 2005-06-14 Alan Modra <amodra@bigpond.net.au>
4064 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
4065 Invoke CGOTSETUP and CGOTRESTORE.
4066 (CGOTSETUP, CGOTRESTORE): Define.
4068 2005-05-29 Richard Henderson <rth@redhat.com>
4070 * tst-cancel4.c (WRITE_BUFFER_SIZE): New.
4071 (tf_write, tf_writev): Use it.
4072 (do_test): Use socketpair instead of pipe. Set SO_SNDBUF to
4075 2005-05-23 Jakub Jelinek <jakub@redhat.com>
4077 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
4078 [IS_IN_librt] (CENABLE, CDISABLE): Use JUMPTARGET instead of
4079 __librt_*_asynccancel@local.
4081 2005-05-17 Alan Modra <amodra@bigpond.net.au>
4083 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Delete
4084 all occurrences of JUMPTARGET. Instead append @local to labels.
4086 2005-05-20 Jakub Jelinek <jakub@redhat.com>
4088 * sysdeps/i386/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN): Define to
4089 size/alignment of struct pthread rather than tcbhead_t.
4090 * sysdeps/x86_64/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
4092 * sysdeps/s390/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
4094 * sysdeps/sparc/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
4097 2005-05-19 Richard Henderson <rth@redhat.com>
4099 * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use
4100 __sync_val_compare_and_swap, not explicit _si variant.
4101 * sysdeps/ia64/pthread_spin_trylock.c (pthread_spin_trylock): Likewise.
4103 2005-05-03 Ulrich Drepper <drepper@redhat.com>
4106 * sysdeps/pthread/pthread.h: Avoid empty initializers.
4108 2005-05-03 Jakub Jelinek <jakub@redhat.com>
4110 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Remove explicit
4111 .eh_frame section, use cfi_* directives.
4113 2005-04-27 Jakub Jelinek <jakub@redhat.com>
4115 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: Use <> instead
4118 2005-04-27 Ulrich Drepper <drepper@redhat.com>
4121 * tst-cancel17.c (do_test): Add arbitrary factor to make sure
4124 2005-04-27 Roland McGrath <roland@redhat.com>
4126 * Makefile (tests): Remove tst-clock2.
4128 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Handle
4129 CLOCK_PROCESS_CPUTIME_ID and CLOCK_PROCESS_THREAD_ID specially,
4130 translating to the kernel clockid_t for our own process/thread clock.
4132 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: New file.
4134 2005-04-15 Jakub Jelinek <jakub@redhat.com>
4136 * old_pthread_cond_init.c: Include <errno.h>.
4137 (__pthread_cond_init_2_0): Fail with EINVAL if COND_ATTR is
4138 process shared or uses clock other than CLOCK_REALTIME.
4139 * pthread_cond_init.c (__pthread_cond_init): Remove bogus comment.
4141 2005-04-13 David S. Miller <davem@davemloft.net>
4143 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: New file.
4144 * sysdeps/sparc/sparc64/clone.S: New file.
4146 2005-04-05 Jakub Jelinek <jakub@redhat.com>
4149 * sysdeps/pthread/pthread.h (__pthread_cleanup_routine): Use
4150 __inline instead of inline.
4151 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_routine): Likewise.
4153 2005-03-31 Jakub Jelinek <jakub@redhat.com>
4155 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Use
4156 functionally equivalent, but shorter instructions.
4157 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
4158 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
4159 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
4161 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
4162 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
4163 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
4164 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
4165 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4166 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
4167 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
4169 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
4170 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
4171 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4172 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
4173 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
4175 2005-03-28 Daniel Jacobowitz <dan@codesourcery.com>
4177 * sysdeps/mips/Makefile: New file.
4178 * sysdeps/mips/nptl-sysdep.S: New file.
4179 * sysdeps/mips/tcb-offsets.sym: New file.
4180 * sysdeps/mips/pthread_spin_lock.S: New file.
4181 * sysdeps/mips/pthread_spin_trylock.S: New file.
4182 * sysdeps/mips/pthreaddef.h: New file.
4183 * sysdeps/mips/tls.h: New file.
4184 * sysdeps/mips/jmpbuf-unwind.h: New file.
4185 * sysdeps/unix/sysv/linux/mips/lowlevellock.h: New file.
4186 * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h: New file.
4187 * sysdeps/unix/sysv/linux/mips/bits/semaphore.h: New file.
4188 * sysdeps/unix/sysv/linux/mips/pthread_once.c: New file.
4189 * sysdeps/unix/sysv/linux/mips/fork.c: New file.
4190 * sysdeps/unix/sysv/linux/mips/pt-vfork.S: New file.
4191 * sysdeps/unix/sysv/linux/mips/vfork.S: New file.
4192 * sysdeps/unix/sysv/linux/mips/clone.S: New file.
4193 * sysdeps/unix/sysv/linux/mips/createthread.c: New file.
4194 * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: New file.
4196 2005-03-23 Ulrich Drepper <drepper@redhat.com>
4199 * pthread_create.c (__pthread_create_2_1): Rename syscall error
4202 2005-03-10 Jakub Jelinek <jakub@redhat.com>
4204 * tst-getpid1.c (do_test): Align stack passed to clone{2,}.
4206 2005-02-25 Roland McGrath <roland@redhat.com>
4208 * alloca_cutoff.c: Correct license text.
4209 * tst-unload.c: Likewise.
4210 * sysdeps/pthread/allocalim.h: Likewise.
4211 * sysdeps/pthread/pt-initfini.c: Likewise.
4212 * sysdeps/pthread/bits/libc-lock.h: Likewise.
4213 * sysdeps/pthread/bits/sigthread.h: Likewise.
4214 * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
4215 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
4217 2005-02-16 Roland McGrath <roland@redhat.com>
4219 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
4220 Use unsigned int * for ptr_nthreads.
4222 2005-02-14 Alan Modra <amodra@bigpond.net.au>
4225 * sysdeps/powerpc/tcb-offsets.sym (thread_offsetof): Redefine to suit
4228 2005-02-07 Richard Henderson <rth@redhat.com>
4231 * sysdeps/pthread/pthread.h (__sigsetjmp): Use pointer as first
4234 2004-11-03 Marcus Brinkmann <marcus@gnu.org>
4236 * sysdeps/generic/lowlevellock.h (__generic_mutex_unlock): Fix
4237 order of arguments in invocation of atomic_add_zero.
4239 2005-01-26 Jakub Jelinek <jakub@redhat.com>
4242 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S (__new_sem_trywait):
4243 Use direct %gs segment access or, if NO_TLS_DIRECT_SEG_REFS,
4244 at least gotntpoff relocation and addition.
4245 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
4247 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
4249 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
4252 2005-01-06 Ulrich Drepper <drepper@redhat.com>
4254 * allocatestack.c (init_one_static_tls): Adjust initialization of DTV
4255 entry for static tls deallocation fix.
4256 * sysdeps/alpha/tls.h (dtv_t): Change pointer type to be struct which
4257 also contains information whether the memory pointed to is static
4259 * sysdeps/i386/tls.h: Likewise.
4260 * sysdeps/ia64/tls.h: Likewise.
4261 * sysdeps/powerpc/tls.h: Likewise.
4262 * sysdeps/s390/tls.h: Likewise.
4263 * sysdeps/sh/tls.h: Likewise.
4264 * sysdeps/sparc/tls.h: Likewise.
4265 * sysdeps/x86_64/tls.h: Likewise.
4267 2004-12-27 Ulrich Drepper <drepper@redhat.com>
4269 * init.c (__pthread_initialize_minimal_internal): Use __sigemptyset.
4271 2004-12-21 Jakub Jelinek <jakub@redhat.com>
4273 * sysdeps/i386/tls.h (CALL_THREAD_FCT): Maintain 16 byte alignment of
4275 * Makefile (tests): Add tst-align2.
4276 * tst-align2.c: New test.
4277 * sysdeps/i386/Makefile (CFLAGS-tst-align{,2}.c): Add
4278 -mpreferred-stack-boundary=4.
4280 2004-12-18 Roland McGrath <roland@redhat.com>
4282 * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h:
4283 New file removed withdrawn for the moment.
4285 2004-12-17 Richard Henderson <rth@redhat.com>
4287 * sysdeps/unix/sysv/linux/alpha/clone.S: New file.
4288 * sysdeps/alpha/tcb-offsets.sym (TID_OFFSET): New.
4290 2004-12-16 Ulrich Drepper <drepper@redhat.com>
4292 * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h: New file.
4293 Increased PTHREAD_STACK_MIN.
4295 * tst-context1.c (stacks): Use bigger stack size.
4297 2004-12-16 Jakub Jelinek <jakub@redhat.com>
4299 * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: New file.
4300 * sysdeps/sparc/tcb-offsets.sym: Add TID.
4302 2004-12-15 Jakub Jelinek <jakub@redhat.com>
4304 * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: New file.
4305 * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: New file.
4306 * sysdeps/s390/tcb-offsets.sym (TID): Add.
4308 2004-12-15 Ulrich Drepper <drepper@redhat.com>
4310 * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: New file.
4312 2004-12-14 Ulrich Drepper <drepper@redhat.com>
4314 * sysdeps/powerpc/tcb-offsets.sym: Add TID.
4315 * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: New file.
4317 * tst-getpid1.c: If child crashes, report this first. Print which
4320 2004-12-09 Ulrich Drepper <drepper@redhat.com>
4322 * init.c (__pthread_initialize_minimal_internal): Also unblock
4325 2004-12-01 Jakub Jelinek <jakub@redhat.com>
4327 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_CPUTIME,
4328 _POSIX_THREAD_CPUTIME): Define to 0.
4329 * sysdeps/pthread/timer_create.c (timer_create): Remove unused code
4330 handling CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID.
4331 * sysdeps/pthread/timer_routines.c (__timer_signal_thread_pclk,
4332 __timer_signal_thread_tclk): Remove.
4333 (init_module): Remove their initialization.
4334 (thread_cleanup): Remove their cleanup assertions.
4335 * sysdeps/pthread/posix-timer.h (__timer_signal_thread_pclk,
4336 __timer_signal_thread_tclk): Remove.
4337 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Removed.
4338 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Removed.
4339 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Removed.
4341 2004-12-07 Jakub Jelinek <jakub@redhat.com>
4343 * sysdeps/ia64/tcb-offsets.sym (TID): Add.
4344 * sysdeps/unix/sysv/linux/ia64/clone2.S: New file.
4346 * Makefile (tests): Add tst-getpid2.
4347 * tst-getpid1.c (TEST_CLONE_FLAGS): Define.
4348 (do_test): Use it. Use __clone2 instead of clone on ia64.
4349 * tst-getpid2.c: New test.
4351 2004-12-07 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4353 * sysdeps/unix/sysv/linux/sh/clone.S: New file.
4355 2004-12-04 Ulrich Drepper <drepper@redhat.com>
4357 * Makefile (tests): Add tst-getpid1.
4358 * tst-getpid1.c: New file.
4359 * sysdeps/unix/sysv/linux/i386/clone.S: New file.
4360 * sysdeps/unix/sysv/linux/x86_64/clone.S: New file.
4362 2004-12-02 Roland McGrath <roland@redhat.com>
4364 * Makefile (libpthread-nonshared): Variable removed.
4365 ($(objpfx)libpthread_nonshared.a): Target removed.
4366 ($(inst_libdir)/libpthread_nonshared.a): Likewise.
4367 These are now handled by generic magic from
4368 libpthread-static-only-routines being set.
4370 2004-11-27 Ulrich Drepper <drepper@redhat.com>
4372 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_PRIORITIZED_IO,
4373 _POSIX2_CHAR_TERM, _POSIX_THREAD_PRIO_INHERIT,
4374 _POSIX_THREAD_PRIO_PROTECT): Define.
4375 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
4376 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
4377 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
4379 2004-11-26 Jakub Jelinek <jakub@redhat.com>
4381 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_ADVISORY_INFO,
4382 _POSIX_SPORADIC_SERVER, _POSIX_THREAD_SPORADIC_SERVER, _POSIX_TRACE,
4383 _POSIX_TRACE_EVENT_FILTER, _POSIX_TRACE_INHERIT, _POSIX_TRACE_LOG,
4384 _POSIX_TYPED_MEMORY_OBJECTS, _POSIX_IPV6, _POSIX_RAW_SOCKETS): Define.
4385 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
4386 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
4387 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
4389 2004-11-24 Ulrich Drepper <drepper@redhat.com>
4391 * sysdeps/x86_64/Makefile [nptl]: Define CFLAGS-pthread_create.c.
4393 * Makefile (libpthread-routines): Add pthread_setschedprio.
4394 * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setschedprio.
4395 * sysdeps/pthread/pthread.h: Declare pthread_setschedprio.
4396 * pthread_setschedprio.c: New file.
4398 2004-11-20 Jakub Jelinek <jakub@redhat.com>
4400 * pthread_create.c (pthread_cancel): Add PTHREAD_STATIC_FN_REQUIRE.
4401 * pthread_cancel.c (pthread_create): Likewise.
4403 * Makefile (libpthread-routines): Add vars.
4404 * sysdeps/pthread/createthread.c (__pthread_multiple_threads): Remove.
4405 * init.c (__default_stacksize, __is_smp): Remove.
4407 * pthreadP.h (__find_thread_by_id): If !SHARED, add weak_function
4408 and define a wrapper macro.
4409 (PTHREAD_STATIC_FN_REQUIRE): Define.
4410 * allocatestack.c (__find_thread_by_id): Undefine.
4411 * pthread_create (__pthread_keys): Remove.
4412 (pthread_mutex_lock, pthread_mutex_unlock, pthread_once,
4413 pthread_key_create, pthread_setspecific, pthread_getspecific): Add
4414 PTHREAD_STATIC_FN_REQUIRE.
4416 2004-11-18 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4418 * sysdeps/sh/tls.h (DB_THREAD_SELF): Set the correct bias
4419 parameter to REGISTER macro.
4421 2004-11-17 Roland McGrath <roland@redhat.com>
4423 * sysdeps/unix/sysv/linux/timer_routines.c (__start_helper_thread):
4424 Make sure SIGCANCEL is blocked as well.
4426 2004-11-10 Jakub Jelinek <jakub@redhat.com>
4428 * sysdeps/pthread/setxid.h: New file.
4429 * sysdeps/pthread/pthread-functions.h (HAVE_PTR__NPTL_SETXID): Remove.
4430 (struct xid_command): Add forward decl.
4431 (struct pthread_functions): Change return type of __nptl_setxid hook
4433 * pthreadP.h (__nptl_setxid): Change return type to int.
4434 * allocatestack.c (__nptl_setxid): Call INTERNAL_SYSCALL_NCS in the
4435 calling thread, return its return value and set errno on failure.
4436 * descr.h (struct xid_command): Change id type to long array.
4438 * Makefile: Add rules to build and test tst-setuid1 and
4440 * tst-setuid1.c: New test.
4441 * tst-setuid1-static.c: New test.
4443 2004-11-10 Jakub Jelinek <jakub@redhat.com>
4445 * Makefile (tests): Add tst-exit3.
4446 * tst-exit3.c: New test.
4448 2004-11-09 Ulrich Drepper <drepper@redhat.com>
4450 * Makefile (tests): Add tst-exit2.
4451 * tst-exit2.c: New file.
4453 2004-11-09 Roland McGrath <roland@redhat.com>
4456 * sysdeps/pthread/createthread.c (do_clone): Increment __nptl_nthreads
4457 here, before calling clone.
4458 * pthread_create.c (start_thread): Don't do it here.
4460 2004-11-02 Jakub Jelinek <jakub@redhat.com>
4462 * sysdeps/unix/sysv/linux/smp.h: Include <errno.h>.
4464 2004-10-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4466 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
4467 Set ETIMEDOUT to errno when time is up. Tweak to avoid
4470 2004-10-28 Jakub Jelinek <jakub@redhat.com>
4472 * pthread_create.c (__pthread_create_2_1): Avoid leaking stacks
4473 if sched_priority is not between minprio and maxprio.
4475 2004-10-25 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4477 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
4478 (__pthread_cond_timedwait): Use clock_gettime syscall if exists.
4480 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
4481 (__lll_mutex_timedlock_wait): Fix a bad branch condition.
4483 2004-10-24 Ulrich Drepper <drepper@redhat.com>
4485 * sysdeps/unix/sysv/linux/smp.h (is_smp_system): Use
4486 not-cancelable I/O functions.
4488 2004-10-21 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4490 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
4491 (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
4492 make sure 2 is stored in the futex and we looked at the old value.
4493 Fix a few other problems to return the correct value.
4495 2004-10-14 Richard Henderson <rth@redhat.com>
4497 * sysdeps/alpha/tcb-offsets.sym (thread_offsetof): Redefine to
4500 2004-10-06 Jakub Jelinek <jakub@redhat.com>
4502 * sysdeps/unix/sysv/linux/jmp-unwind.c: Include pthreadP.h instead
4503 of pthread-functions.h and pthreaddef.h.
4504 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Likewise.
4506 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
4507 Change __data.__nwaiters from int to unsigned int.
4509 * tst-clock2.c (do_test): Don't fail if _POSIX_THREAD_CPUTIME == 0 and
4510 sysconf (_SC_THREAD_CPUTIME) returns negative value.
4512 * allocatestack.c (__find_thread_by_id): Move attribute_hidden
4515 * sysdeps/s390/jmpbuf-unwind.h: Include bits/wordsize.h.
4516 (JMPBUF_CFA_UNWINDS_ADJ): Subtract 96 resp. 160 bytes from CFA.
4518 2004-10-06 Ulrich Drepper <drepper@redhat.com>
4520 * tst-cancel4.c (tf_msgrcv): Check for failure in msgget. If the
4521 test fails, remove message queue.
4522 (tf_msgsnd): Likewise.
4524 2004-10-05 Jakub Jelinek <jakub@redhat.com>
4526 * tst-clock1.c: Change #ifdef to #if defined.
4527 * tst-clock2.c: Likewise.
4528 * tst-cond11.c: Likewise.
4530 * sysdeps/pthread/timer_create.c (timer_create): Use
4531 defined _POSIX_CPUTIME && _POSIX_CPUTIME >= 0 instead of
4532 defined CLOCK_PROCESS_CPUTIME_ID #ifs and similarly for
4535 2004-10-05 Jakub Jelinek <jakub@redhat.com>
4537 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h (_POSIX_CPUTIME,
4538 _POSIX_THREAD_CPUTIME): Define to 0.
4540 2004-10-04 Ulrich Drepper <drepper@redhat.com>
4542 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Define _POSIX_CPUTIME
4543 and _POSIX_THREAD_CPUTIME to zero.
4544 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
4545 * tst-barrier2.c: Fix testing for POSIX feature.
4546 * tst-clock1.c: Likewise.
4547 * tst-clock2.c: Likewise.
4548 * tst-cond11.c: Likewise.
4549 * tst-cond4.c: Likewise.
4550 * tst-cond6.c: Likewise.
4551 * tst-flock2.c: Likewise.
4552 * tst-mutex4.c: Likewise.
4553 * tst-mutex9.c: Likewise.
4554 * tst-rwlock12.c: Likewise.
4555 * tst-rwlock4.c: Likewise.
4556 * tst-signal1.c: Likewise.
4557 * tst-spin2.c: Likewise.
4558 * sysdeps/pthread/posix-timer.h: Likewise.
4559 * sysdeps/pthread/timer_create.c: Likewise.
4560 * sysdeps/pthread/timer_routines.c: Likewise.
4562 2004-10-01 Ulrich Drepper <drepper@redhat.com>
4564 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4565 (__lll_mutex_timedlock_wait): Address futex correctly.
4567 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
4568 (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
4569 make sure 2 is stored in the futex and we looked at the old value.
4570 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4571 (__lll_mutex_timedlock_wait): Likewise. Fix a few other problems
4572 which might very well made the code not working at all before.
4575 2004-09-28 Ulrich Drepper <drepper@redhat.com>
4577 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
4578 allow SIGSETXID to be sent.
4579 * sysdeps/pthread/sigaction.c (__sigaction): Don't allow action
4580 for SIGSETXID to be defined.
4581 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
4582 SIGSETXID cannot be blocked.
4584 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4585 Add __extension__ to long long types.
4586 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4587 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4588 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4589 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4590 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
4591 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4592 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4594 2004-09-25 Ulrich Drepper <drepper@redhat.com>
4596 * descr.h (struct pthread): Add stopped_start field.
4597 * sysdeps/pthread/createthread.c (create_thread): Set
4598 start_stopped flag in descriptor for new thread appropriately.
4599 * pthread_create.c (start_thread): Only take lock to be stopped on
4600 startup if stopped_start flag says so.
4602 2004-09-24 Ulrich Drepper <drepper@redhat.com>
4604 * pthread_create.c (__pthread_create_2_1): Remember whether thread
4605 is created detached and if yes, do not try to free the stack in case
4606 the thread creation failed.
4607 * sysdeps/pthread/createthread.c (do_clone): Free stack here if clone
4608 call fails. Don't depend on INTERNAL_SYSCALL_ERRNO return zero in
4609 case there has been no error. [BZ #405]
4611 * pthread_create.c (start_thread): Don't wait for scheduler data
4612 etc to be set at the beginning of the function. The cancellation
4613 infrastructure must have been set up. And enable async
4614 cancellation before potentially going to sleep. [BZ #401]
4616 2004-09-20 Ulrich Drepper <drepper@redhat.com>
4618 * Versions: Remove exports for pthread_set*id_np functions.
4619 * sysdeps/pthread/pthread.h: Remove pthread_set*id_np prototypes
4621 * Makefile: Don't build pthread_set*id code for now.
4623 2004-09-19 Ulrich Drepper <drepper@redhat.com>
4625 * sysdeps/unix/sysv/linux/allocrtsig.c: Allocate second signal for
4627 * allocatestack.c (__nptl_setxid): New function.
4628 * descr.h (struct xid_command): Define type.
4629 * init.c (pthread_functions): Add ptr__nptl_setxid initialization.
4630 (sighandler_setxid): New function.
4631 (__pthread_initialize_minimal): Register sighandler_setxid for
4633 * pt-allocrtsig.c: Update comment.
4634 * pthreadP.h: Define SIGSETXID. Declare __xidcmd variable.
4635 Declare __nptl_setxid.
4636 * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_setxid.
4637 * sysdeps/pthread/pthread.h: Declare pthread_setgid_np,
4638 pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
4639 pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
4640 and pthread_setresuid_np.
4641 * pthread_setgid_np.c: New file.
4642 * pthread_setuid_np.c: New file.
4643 * pthread_setegid_np.c: New file.
4644 * pthread_seteuid_np.c: New file.
4645 * pthread_setregid_np.c: New file.
4646 * pthread_setreuid_np.c: New file.
4647 * pthread_setresgid_np.c: New file.
4648 * pthread_setresuid_np.c: New file.
4649 * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setgid_np,
4650 pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
4651 pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
4652 and pthread_setresuid_np.
4653 * Makefile (libpthread-routines): Add pthread_setuid, pthread_seteuid,
4654 pthread_setreuid, pthread_setresuid, pthread_setgid, pthread_setegid,
4655 pthread_setregid, and pthread_setresgid.
4657 2004-09-18 Ulrich Drepper <drepper@redhat.com>
4659 * allocatestack.c (allocate_stack): Return EAGAIN instead of
4660 ENOMEM when out of memory.
4662 2004-09-10 Roland McGrath <roland@redhat.com>
4665 * allocatestack.c (allocate_stack): Remove [__ASSUME_CLONE_STOPPED]
4666 code, since we don't try to use the broken CLONE_STOPPED any more.
4667 * pthread_create.c (start_thread): Likewise.
4669 2004-09-15 Richard Henderson <rth@redhat.com>
4671 * sysdeps/unix/sysv/linux/alpha/vfork.S: Use libc_hidden_def.
4673 2004-09-01 David Mosberger <davidm@hpl.hp.com>
4675 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h
4676 (__libc_unwind_longjmp): Delete macro and declare as function.
4677 * sysdeps/unix/sysv/linux/ia64/Makefile (sysdep_routines): Mention
4678 __ia64_longjmp, sigstack_longjmp, and __sigstack_longjmp for
4680 * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S: New file.
4681 * sysdeps/unix/sysv/linux/ia64/__sigstack_longjmp.c: New file.
4682 * sysdeps/unix/sysv/linux/ia64/unwind_longjmp.c: New file.
4684 2004-09-12 Ulrich Drepper <drepper@redhat.com>
4686 * sysdeps/pthread/pthread.h: Make rwlock prototypes available also
4688 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define rwlock
4689 types also for __USE_XOPEN2K.
4690 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4691 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4692 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4693 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4694 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4695 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4696 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4699 2004-09-08 Ulrich Drepper <drepper@redhat.com>
4701 * sysdeps/pthread/pthread.h
4702 (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Make safe for C++.
4703 (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
4704 (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
4705 (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Likewise.
4708 2004-09-07 Ulrich Drepper <drepper@redhat.com>
4710 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Allow
4711 PSEUDO to be used with . prefix.
4713 * sysdeps/unix/sysv/linux/alpha/pthread_once.c (__pthread_once):
4714 Use atomic_increment instead of atomic_exchange_and_add.
4715 * sysdeps/unix/sysv/linux/sparc/pthread_once.c (__pthread_once):
4717 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
4719 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
4722 * allocatestack.c (allocate_stack): Use atomic_increment_val
4723 instead of atomic_exchange_and_add.
4724 * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Likewise.
4725 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
4727 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
4730 * sysdeps/pthread/pthread.h (pthread_once): Remove __THROW since
4731 the initialization function might throw.
4733 2005-09-05 Richard Henderson <rth@redhat.com>
4735 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
4736 Move definition inside libpthread, libc, librt check. Provide
4737 definition for rtld.
4739 2004-09-02 Jakub Jelinek <jakub@redhat.com>
4741 * pthread_cond_destroy.c (__pthread_cond_destroy): If there are
4742 waiters, awake all waiters on the associated mutex.
4744 2004-09-02 Ulrich Drepper <drepper@redhat.com>
4746 * sysdeps/alpha/jmpbuf-unwind.h: Define __libc_unwind_longjmp.
4747 * sysdeps/i386/jmpbuf-unwind.h: Likewise
4748 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
4749 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
4750 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
4751 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
4752 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
4753 * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
4756 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
4757 Rename __data.__clock to __data.__nwaiters, make it unsigned int.
4758 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
4760 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
4761 Decrement __nwaiters. If pthread_cond_destroy has been called and
4762 this is the last waiter, signal pthread_cond_destroy caller and
4763 avoid using the pthread_cond_t structure after unlock.
4764 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4765 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4766 Read clock type from the least significant bits of __nwaiters instead
4768 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4769 * sysdeps/unix/sysv/linux/internaltypes.h: Define COND_CLOCK_BITS.
4771 2004-08-31 Jakub Jelinek <jakub@redhat.com>
4774 * Makefile (tests): Add tst-cond20 and tst-cond21.
4775 * tst-cond20.c: New test.
4776 * tst-cond21.c: New test.
4777 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
4778 (pthread_cond_t): Rename __data.__clock to __data.__nwaiters, make
4780 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
4782 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
4783 (pthread_cond_t): Likewise.
4784 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
4786 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4788 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
4790 * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_clock): Remove.
4791 (cond_nwaiters): New.
4793 * pthread_cond_destroy.c (__pthread_cond_destroy): Return EBUSY
4794 if there are waiters not signalled yet.
4795 Wait until all already signalled waiters wake up.
4796 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Decrement
4797 __nwaiters. If pthread_cond_destroy has been called and this is the
4798 last waiter, signal pthread_cond_destroy caller and avoid using
4799 the pthread_cond_t structure after unlock.
4800 (__pthread_cond_wait): Increment __nwaiters in the beginning,
4801 decrement it when leaving. If pthread_cond_destroy has been called
4802 and this is the last waiter, signal pthread_cond_destroy caller.
4803 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
4804 Likewise. Read clock type from the least significant bits of
4805 __nwaiters instead of __clock.
4806 * pthread_condattr_setclock.c (pthread_condattr_setclock): Check
4807 whether clock ID can be encoded in COND_CLOCK_BITS bits.
4808 * pthread_condattr_getclock.c (pthread_condattr_getclock): Decode
4809 clock type just from the last COND_CLOCK_BITS bits of value.
4810 * pthread_cond_init.c (__pthread_cond_init): Initialize __nwaiters
4811 instead of __clock, just from second bit of condattr's value.
4813 2004-08-30 Jakub Jelinek <jakub@redhat.com>
4815 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Include
4816 bits/wordsize.h. Make the header match i386 header when __WORDSIZE
4818 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
4820 2004-08-15 Roland McGrath <roland@frob.com>
4822 * pthread_atfork.c: Update copyright terms including special exception
4823 for these trivial files, which are statically linked into executables
4824 that use dynamic linking for the significant library code.
4826 2004-08-09 Jakub Jelinek <jakub@redhat.com>
4828 * DESIGN-rwlock.txt: Add decreasing of nr_readers_queued to
4829 pthread_rwlock_rdlock.
4830 * sysdeps/pthread/pthread_rwlock_rdlock (__pthread_rwlock_rdlock):
4831 Decrease __nr_readers_queued after reacquiring lock.
4832 * sysdeps/pthread/pthread_rwlock_timedrdlock
4833 (pthread_rwlock_timedrdlock): Likewise.
4834 Reported by Bob Cook <bobcook47@hotmail.com>.
4836 2004-08-11 Jakub Jelinek <jakub@redhat.com>
4838 * tst-rwlock14.c (tf): Read main thread handle from *ARG
4839 before pthread_barrier_wait.
4841 2004-08-07 Ulrich Drepper <drepper@redhat.com>
4843 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
4844 Remove unnecessary exception handling data.
4846 2004-07-23 Jakub Jelinek <jakub@redhat.com>
4849 * sysdeps/pthread/pthread.h (pthread_getcpuclockid): Use __clockid_t
4850 instead of clockid_t.
4852 2004-07-21 Roland McGrath <roland@redhat.com>
4854 * Makefile ($(objpfx)multidir.mk): Use $(make-target-directory).
4856 2004-07-19 Roland McGrath <roland@redhat.com>
4858 * tst-cancel4.c (tf_waitid): Use WEXITED flag bit if available.
4860 2004-07-02 Roland McGrath <roland@redhat.com>
4862 * configure: Don't exit.
4864 2004-07-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4866 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
4867 (__pthread_cond_timedwait): Check for invalid nanosecond in
4870 2004-07-07 Ulrich Drepper <drepper@redhat.com>
4872 * Makefile: Add rules to build and run tst-fini1.
4873 * tst-fini1.c: New file.
4874 * tst-fini1mod.c: New file.
4876 2004-07-05 Ulrich Drepper <drepper@redhat.com>
4878 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define NO_CANCELLATION
4879 if no cancellation support is needed.
4880 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
4881 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
4882 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
4883 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
4884 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
4885 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
4886 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
4887 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
4888 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
4890 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define __NR_futex
4891 only if not already defined.
4893 2004-07-05 Jakub Jelinek <jakub@redhat.com>
4895 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_unlock): Use
4896 constraint "m" instead of "0" for futex.
4898 * shlib-versions: Add powerpc64-.*-linux.*.
4900 2004-07-04 Jakub Jelinek <jakub@redhat.com>
4902 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
4903 (pthread_rwlock_timedrdlock): Use cmpq instead of cmpl to check
4905 * tst-rwlock14.c (do_test): Test for invalid tv_nsec equal to
4906 1 billion and 64-bit tv_nsec which is valid when truncated to 32
4909 2004-06-29 Roland McGrath <roland@redhat.com>
4911 * Banner: NPTL no longer has its own version number.
4912 * Makefile (nptl-version): Variable removed.
4913 * sysdeps/pthread/Makefile (CFLAGS-confstr.c): Set LIBPTHREAD_VERSION
4914 using $(version), the glibc version number.
4916 2004-06-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4918 * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
4919 Fix branch offset for a PLT entry.
4920 * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
4922 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
4924 * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
4926 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait):
4929 2004-06-28 Jakub Jelinek <jakub@redhat.com>
4931 * sysdeps/alpha/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define
4934 2004-06-28 Jakub Jelinek <jakub@redhat.com>
4936 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
4937 (pthread_rwlock_timedwrlock): Return EINVAL if tv_nsec is negative,
4939 * sysdeps/pthread/pthread_rwlock_timedrdlock.c
4940 (pthread_rwlock_timedrdlock): Likewise.
4942 2004-06-22 Jakub Jelinek <jakub@redhat.com>
4944 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
4945 Set __r7 to val, not mutex.
4947 2004-06-27 Ulrich Drepper <drepper@redhat.com>
4949 * Makefile: Add rules to build tst-rwlock14.
4950 * tst-rwlock14.c: New file.
4952 2004-06-24 Boris Hu <boris.hu@intel.com>
4954 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Add timeout validation
4956 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
4958 2004-06-19 Andreas Jaeger <aj@suse.de>
4960 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix
4961 assembler in last patch.
4963 2004-06-17 Ulrich Drepper <drepper@redhat.com>
4965 * sysdeps/pthread/pthread_cond_timedwait.c
4966 (__pthread_cond_timedwait): Also check for negativ nanoseconds.
4967 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4968 (__pthread_cond_timedwait): Check for invalid nanosecond in
4970 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4971 * tst-cond19.c: New file.
4972 * Makefile: Add rules to build and run tst-cond19.
4974 2004-06-15 Steven Munroe <sjmunroe@us.ibm.com>
4976 * tst-context1.c (GUARD_PATTERN): Defined.
4977 (tst_context_t): Define struct containing ucontext_t & guard words.
4978 (ctx): Declare as an array of tst_context_t.
4979 (fct): Verify uc_link & guard words are still valid.
4980 (tf): Initialize guard words in ctx. Adjust ctx refs for new struct.
4982 2004-06-13 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4984 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4985 Add __data.__futex field, reshuffle __data.__clock.
4986 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
4987 (__pthread_cond_signal): Increment __futex at the same time as
4988 __wakeup_seq or __total_seq. Pass address of __futex instead of
4989 address of low 32-bits of __wakeup_seq to futex syscall.
4990 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
4991 (__pthread_cond_wait): Likewise. Pass __futex value from before
4992 releasing internal lock to FUTEX_WAIT.
4993 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
4994 (__pthread_cond_timedwait): Likewise.
4995 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
4996 (FUTEX_CMP_REQUEUE): Define.
4997 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
4998 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
4999 Pass __futex value from before the unlock and __futex address instead
5000 of address of low 32-bits of __wakeup_seq to futex syscall.
5001 Fallback to FUTEX_WAKE all on any errors.
5003 2004-06-08 Jakub Jelinek <jakub@redhat.com>
5005 * pthread_mutexattr_getpshared.c (pthread_mutex_getpshared): Fix
5007 * pthread_mutexattr_gettype.c (pthread_mutexattr_gettype): Likewise.
5008 * pthread_mutexattr_init.c (__pthread_mutexattr_init): Likewise.
5009 * pthread_mutexattr_settype.c (__pthread_mutexattr_settype): Likewise.
5010 * pthread_mutexattr_setpshared.c (pthread_mutexattr_setpshared):
5011 Likewise. Reported by Bob Cook <bobcook47@hotmail.com>.
5013 2004-06-11 Martin Schwidefsky <schwidefsky@de.ibm.com>
5015 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_compare_and_swap):
5016 Add memory clobber to inline assembly.
5017 (__lll_mutex_trylock): Likewise.
5018 (__lll_mutex_cond_trylock): Likewise.
5020 2004-06-07 Martin Schwidefsky <schwidefsky@de.ibm.com>
5022 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
5023 Pass val argument as 6th system call argument in %r7.
5025 2004-05-21 Jakub Jelinek <jakub@redhat.com>
5027 * Makefile (tests): Add tst-cond16.
5028 * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_futex): Add.
5029 * pthread_cond_init.c (__pthread_cond_init): Clear __data.__futex.
5030 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
5031 Add __data.__futex field, reshuffle __data.__clock.
5032 * sysdeps/unix/sysv/linux/i386/pthread_cond_signal.S
5033 (__pthread_cond_signal): Increment __futex at the same time as
5034 __wakeup_seq or __total_seq. Pass address of __futex instead of
5035 address of low 32-bits of __wakeup_seq to futex syscall.
5036 * sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S
5037 (__pthread_cond_wait): Likewise. Pass __futex value from before
5038 releasing internal lock to FUTEX_WAIT.
5039 * sysdeps/unix/sysv/linux/i386/pthread_cond_timedwait.S
5040 (__pthread_cond_timedwait): Likewise.
5041 * sysdeps/unix/sysv/linux/i386/pthread_cond_broadcast.S
5042 (FUTEX_CMP_REQUEUE): Define.
5043 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
5044 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
5045 Pass __futex value from before the unlock and __futex address instead
5046 of address of low 32-bits of __wakeup_seq to futex syscall.
5047 Fallback to FUTEX_WAKE all on any errors.
5048 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_CMP_REQUEUE):
5050 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
5051 internally. Return non-zero if error, zero if success.
5052 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
5053 Add __data.__futex field, reshuffle __data.__clock.
5054 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_CMP_REQUEUE):
5056 (lll_futex_requeue): Add val argument, return 1 unconditionally
5058 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
5059 Add __data.__futex field, reshuffle __data.__clock.
5060 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_CMP_REQUEUE):
5062 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
5063 internally. Return non-zero if error, zero if success.
5064 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
5065 (pthread_cond_t): Add __data.__futex field, reshuffle __data.__clock.
5066 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_CMP_REQUEUE):
5068 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
5069 internally. Return non-zero if error, zero if success.
5070 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
5071 Add __data.__futex field, reshuffle __data.__clock.
5072 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_CMP_REQUEUE):
5074 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
5075 internally. Return non-zero if error, zero if success.
5076 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
5077 Add __data.__futex field, reshuffle __data.__clock.
5078 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
5079 Add __data.__futex field, reshuffle __data.__clock.
5080 * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal):
5081 Increment __futex at the same time as __wakeup_seq or __total_seq.
5082 Pass address of __futex instead of address of low 32-bits of
5083 __wakeup_seq to futex syscall.
5084 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
5085 Pass __futex value from before releasing internal lock
5087 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
5088 Likewise. Avoid unnecessary shadowing of variables.
5089 * sysdeps/pthread/pthread_cond_broadcast.c (__pthread_cond_broadcast):
5090 Set __futex to 2 * __total_seq. Pass __futex value from before the
5091 unlock and __futex address instead of address of low 32-bits of
5092 __wakeup_seq to futex_requeue macro, adjust for new return value
5094 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
5095 (__pthread_cond_signal): Increment __futex at the same time as
5096 __wakeup_seq or __total_seq. Pass address of __futex instead of
5097 address of low 32-bits of __wakeup_seq to futex syscall.
5098 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
5099 (__pthread_cond_wait): Likewise. Pass __futex value from before
5100 releasing internal lock to FUTEX_WAIT.
5101 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
5102 (__pthread_cond_timedwait): Likewise.
5103 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
5104 (FUTEX_CMP_REQUEUE): Define.
5105 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
5106 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
5107 Pass __futex value from before the unlock and __futex address instead
5108 of address of low 32-bits of __wakeup_seq to futex syscall.
5109 Fallback to FUTEX_WAKE all on any errors.
5111 2004-06-03 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5113 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_mutex_lock):
5114 Add nop to align the end of critical section.
5115 (lll_mutex_cond_lock, lll_mutex_timedlock): Likewise.
5117 2004-06-01 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5119 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
5120 Add __broadcast_seq field.
5121 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Mark
5122 all waiters as woken with woken_seq and bump broadcast counter.
5123 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use new
5124 __broadcast_seq. Increment __woken_seq correctly when cleanuped.
5125 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
5126 Comment typo fixes. Avoid returning -ETIMEDOUT.
5128 2004-06-01 Ulrich Drepper <drepper@redhat.com>
5130 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5131 (__condvar_tw_cleanup): Fix access to saved broadcast_seq value.
5132 Reported by Kaz Kojima.
5134 2004-05-25 Jakub Jelinek <jakub@redhat.com>
5136 * sysdeps/unix/sysv/linux/aio_misc.h: New file.
5138 2004-05-21 Jakub Jelinek <jakub@redhat.com>
5140 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Compare
5141 __broadcast_seq with bc_seq after acquiring internal lock instead of
5144 2004-05-18 Jakub Jelinek <jakub@redhat.com>
5146 * Makefile (.NOTPARALLEL): Only serialize make check/xcheck, not
5148 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5149 (__pthread_cond_timedwait): Avoid returning -ETIMEDOUT.
5150 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
5151 (pthread_cond_t): Add __data.__broadcast_seq field.
5152 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
5153 (FRAME_SIZE): Define.
5154 (__pthread_cond_timedwait): Use it. Store/check broadcast_seq.
5156 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S (FRAME_SIZE):
5158 (__pthread_cond_wait): Use it. Store/check broadcast_seq. Comment
5160 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
5161 (__pthread_cond_broadcast): Increment broadcast_seq. Comment typo
5164 2004-05-18 Ulrich Drepper <drepper@redhat.com>
5166 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add broadcast_seq entry.
5167 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
5168 Add __broadcast_seq field.
5169 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5170 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5171 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5172 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
5173 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5174 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Mark
5175 all waiters as woken with woken_seq and bump broadcast counter.
5176 * sysdeps/pthread/pthread_cond_broadcast.c: Likewise.
5177 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use new
5178 __broadcast_seq field.
5179 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5180 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
5181 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
5182 * pthread_cond_init.c: Initialize __broadcast_seq field.
5183 * Makefile (tests): Add tst-cond17 and tst-cond18.
5184 Add .NOTPARALLEL goal.
5185 * tst-cond16.c: New file. From Jakub.
5186 * tst-cond17.c: New file. From Jakub.
5187 * tst-cond18.c: New file. From Jakub.
5189 2004-05-16 Ulrich Drepper <drepper@redhat.com>
5191 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Correct some
5194 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
5195 Parametrize frame size. Correct some unwind info.
5196 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5198 2004-05-04 Jakub Jelinek <jakub@redhat.com>
5200 * tst-stack3.c: Note testing functionality beyond POSIX.
5202 2004-05-04 Jakub Jelinek <jakub@redhat.com>
5204 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (USE___THREAD):
5205 Change conditional from ifdef to if.
5207 2004-04-23 Jakub Jelinek <jakub@redhat.com>
5209 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SYSDEP_CANCEL_ERRNO,
5210 SYSDEP_CANCEL_ERROR): Define.
5213 2004-05-01 Jakub Jelinek <jakub@redhat.com>
5215 * Versions (libpthread): Remove __pthread_cleanup_upto@@GLIBC_PRIVATE.
5217 2004-04-20 Jakub Jelinek <jakub@redhat.com>
5219 * sem_unlink.c (sem_unlink): Change EPERM into EACCES.
5221 2004-04-19 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5223 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Add frame info.
5224 Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
5225 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Remove unneeded frame
5226 info. Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
5228 2004-04-19 Ulrich Drepper <drepper@redhat.com>
5230 * sysdeps/unix/sysv/linux/timer_routines.c: Make sure helper
5231 thread has all signals blocked.
5233 2004-04-18 Andreas Jaeger <aj@suse.de>
5235 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h
5236 (SEM_VALUE_MAX): Add missing brace.
5238 2004-04-17 Jakub Jelinek <jakub@redhat.com>
5240 * sysdeps/pthread/Makefile (tests): Add tst-mqueue8x
5242 (CFLAGS-tst-mqueue8x.c): Add -fexceptions.
5243 * sysdeps/pthread/tst-mqueue8x.c: New test.
5244 * tst-cancel4.c: Update comment about message queues.
5246 * sysdeps/pthread/timer_gettime.c (timer_gettime): For expired timer
5247 return it_value { 0, 0 }.
5248 * sysdeps/pthread/timer_create.c (timer_create): Handle SIGEV_NONE
5250 * sysdeps/pthread/timer_routines.c (thread_expire_timer): Remove
5251 assertion for SIGEV_NONE.
5252 (thread_attr_compare): Compare all attributes, not just a partial
5255 2004-04-17 Jakub Jelinek <jakub@redhat.com>
5257 * sysdeps/unix/sysv/linux/mq_notify.c: Include stdlib.h.
5259 2004-04-17 Ulrich Drepper <drepper@redhat.com>
5261 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h (SEM_VALUE_MAX):
5262 Just use a plain number.
5263 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
5264 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
5265 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
5266 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
5267 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
5268 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
5269 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
5271 2004-04-16 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5273 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Remove unneeded
5275 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
5277 2004-04-15 Jakub Jelinek <jakub@redhat.com>
5279 * sysdeps/unix/sysv/linux/timer_routines.c: Include errno.h.
5280 (timer_helper_thread): Use inline rt_sigtimedwait syscall instead
5281 of calling sigwaitinfo.
5283 2004-04-16 Ulrich Drepper <drepper@redhat.com>
5285 * allocatestack.c (allocate_stack): Set reported_guardsize
5287 * pthread_getattr_np.c (pthread_getattr_np): Use
5288 reported_guardsize instead of guardsize.
5289 * descr.h (struct pthread): Add reported_guardsize field.
5291 2004-04-13 Jakub Jelinek <jakub@redhat.com>
5293 * sysdeps/unix/sysv/linux/mq_notify.c: Shut up GCC warning.
5295 2004-04-12 Ulrich Drepper <drepper@redhat.com>
5297 * sysdeps/unix/sysv/linux/mq-notify.c: New file.
5299 2004-04-08 Jakub Jelinek <jakub@redhat.com>
5301 * sysdeps/unix/sysv/linux/bits/local_lim.h (MQ_PRIO_MAX): Define.
5302 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h (MQ_PRIO_MAX): Define.
5303 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h (MQ_PRIO_MAX): Define.
5304 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h (MQ_PRIO_MAX): Define.
5305 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
5307 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
5308 (_POSIX_MESSAGE_PASSING): Define.
5309 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h
5310 (_POSIX_MESSAGE_PASSING): Define.
5311 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h
5312 (_POSIX_MESSAGE_PASSING): Define.
5314 2004-04-04 Ulrich Drepper <drepper@redhat.com>
5316 * tst-context1.c (fct): Check whether correct stack is used.
5318 2004-04-03 Ulrich Drepper <drepper@redhat.com>
5320 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Never use
5321 matching constraints for asm mem parameters.
5323 * tst-clock2.c (tf): Don't define unless needed.
5325 2004-03-30 H.J. Lu <hongjiu.lu@intel.com>
5327 * Makefile (link-libc-static): Use $(static-gnulib) instead of
5330 2004-03-30 Ulrich Drepper <drepper@redhat.com>
5332 * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_deallocate_tsd.
5333 * init.c (pthread_functions): Add ptr__nptl_deallocate_tsd.
5334 * pthreadP.h: Declare __nptl_deallocate_tsd.
5335 * pthread_create.c (deallocate_tsd): Remove to __nptl_deallocate_tsd.
5338 * Makefile (tests): Add tst-tsd5.
5339 * tst-tsd5.c: New file.
5341 2004-03-29 Ulrich Drepper <drepper@redhat.com>
5343 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
5344 (__pthread_attr_setaffinity_old): Prepend GLIBC_ to version names
5345 is SHLIB_COMPAT check.
5346 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
5347 (__pthread_attr_getaffinity_old): Likewise.
5348 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
5349 (__pthread_getaffinity_old): Likewise.
5350 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
5351 (__pthread_setaffinity_old): Likewise.
5353 2004-03-26 Ulrich Drepper <drepper@redhat.com>
5355 * allocatestack.c (_make_stacks_executable): Call
5356 _dl_make_stack_executable first.
5358 2004-03-24 Roland McGrath <roland@redhat.com>
5360 * sysdeps/i386/pthread_spin_lock.c (pthread_spin_lock): Use "m"
5361 constraint instead of "0".
5363 2004-03-24 Ulrich Drepper <drepper@redhat.com>
5365 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
5366 (lll_mutex_cond_trylock): Define as wrapper around __lll_cond_trylock.
5368 * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Reorganize
5369 code to avoid warning.
5371 2004-03-24 Andreas Jaeger <aj@suse.de>
5373 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
5374 (__pthread_attr_setaffinity_old): Remove const.
5376 2004-03-23 Ulrich Drepper <drepper@redhat.com>
5378 * sysdeps/unix/sysv/linux/smp.h: New file.
5379 * sysdeps/unix/sysv/linux/sh/smp.h: New file.
5380 * init.c: Define __is_smp.
5381 (__pthread_initialize_minimal_internal): Call is_smp_system to
5382 initialize __is_smp.
5383 * pthreadP.h: Declare __is_smp.
5384 Define MAX_ADAPTIVE_COUNT is necessary.
5385 * pthread_mutex_init.c: Add comment regarding __spins field.
5386 * pthread_mutex_lock.c: Implement adaptive mutex type.
5387 * pthread_mutex_timedlock.c: Likewise.
5388 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
5389 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
5391 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
5392 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5393 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5394 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
5395 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5396 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5397 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5398 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define
5399 lll_mutex_cond_trylock.
5400 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5401 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
5402 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5403 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5404 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
5405 Define BUSY_WAIT_NOP.
5406 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5407 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5409 * tst-mutex5.c: Add support for testing adaptive mutexes.
5410 * tst-mutex7.c: Likewise.
5411 * tst-mutex5a.c: New file.
5412 * tst-mutex7a.c: New file.
5413 * Makefile (tests): Add tst-mutex5a and tst-mutex7a.
5415 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
5416 (__lll_mutex_timedlock_wait): Preserve r8 and r9 since the
5417 vgettimeofday call might destroy the content.
5419 * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use hint
5422 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
5423 No need to restrict type of ret. Make it int. Add comment.
5425 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
5426 Remove unnecessary setne instruction.
5428 2004-03-22 Jakub Jelinek <jakub@redhat.com>
5430 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
5431 (__pthread_getaffinity_new): Use INT_MAX instead of UINT_MAX.
5432 * pthread_getattr_np.c (pthread_getattr_np): Double size every cycle.
5433 If realloc fails, break out of the loop.
5435 2004-03-20 Andreas Jaeger <aj@suse.de>
5437 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
5438 (__pthread_setaffinity_old): Fix interface.
5439 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
5440 (__pthread_getaffinity_old): Likewise.
5442 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
5443 (__pthread_setaffinity_new): Remove duplicate declaration.
5445 2004-03-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5447 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Save
5448 the return value to a safe register.
5449 (CDISABLE): Set the function argument correctly.
5451 2004-03-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5453 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XCHG): Define.
5454 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
5455 Rewrite so that only one locked memory operation per round is needed.
5456 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
5457 (pthread_barrier_wait): After wakeup, release lock only when the
5458 last thread stopped using the barrier object.
5459 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
5460 (__pthread_cond_wait): Don't store mutex address if the current
5461 value is ~0l. Add correct cleanup support and unwind info.
5462 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
5463 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
5464 (__pthread_cond_broadcast): Don't use requeue for pshared condvars.
5465 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Update comment.
5466 * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
5467 Add correct cleanup support and unwind info.
5468 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
5469 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Add unwind
5470 information for syscall wrappers.
5472 2004-03-18 Ulrich Drepper <drepper@redhat.com>
5474 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
5475 cpusetsize field, remove next.
5476 * sysdeps/pthread/pthread.h (pthread_getaffinity_np): Add new second
5477 parameter for size of the CPU set.
5478 (pthread_setaffinity_np): Likewise.
5479 (pthread_attr_getaffinity_np): Likewise.
5480 (pthread_attr_setaffinity_np): Likewise.
5481 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: Implement
5482 interface change, keep compatibility code.
5483 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
5484 * sysdeps/unix/sysv/linux/pthread_getaffinity.c: Likewise.
5485 * sysdeps/unix/sysv/linux/pthread_setaffinity.c: Likewise.
5486 * pthreadP.h: Remove hidden_proto for pthread_getaffinity_np. Declare
5487 __pthread_getaffinity_np.
5488 * Versions: Add version for changed interfaces.
5489 * tst-attr3.c: Adjust test for interface change.
5490 * pthread_getattr_np.c: Query the kernel about the affinity mask with
5491 increasing buffer sizes.
5492 * pthread_attr_destroy.c: Remove unused list handling.
5493 * pthread_attr_init.c: Likewise.
5495 2004-03-17 Roland McGrath <roland@redhat.com>
5497 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Pass missing
5498 first argument to clock_getres so we ever enable kernel timers.
5500 2004-03-15 Ulrich Weigand <uweigand@de.ibm.com>
5502 * init.c (nptl_version): Add __attribute_used__ to nptl_version.
5504 2004-03-12 Richard Henderson <rth@redhat.com>
5506 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Propagate
5507 oldvalue from CENABLE to CDISABLE.
5509 2004-03-12 Ulrich Drepper <drepper@redhat.com>
5511 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define HOST_NAME_MAX.
5512 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
5513 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
5514 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
5516 2004-03-11 Richard Henderson <rth@redhat.com>
5518 * sysdeps/alpha/tcb-offsets.sym (PID_OFFSET): New.
5519 * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: Save/restore PID.
5520 * sysdeps/unix/sysv/linux/alpha/vfork.S: New file.
5522 2004-03-11 Jakub Jelinek <jakub@redhat.com>
5524 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Use jgnl
5525 instead of jnl instruction to jump to SYSCALL_ERROR_LABEL.
5526 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S (__vfork): Likewise.
5528 2004-03-11 Jakub Jelinek <jakub@redhat.com>
5530 * forward.c (__pthread_cond_broadcast_2_0,
5531 __pthread_cond_destroy_2_0, __pthread_cond_init_2_0,
5532 __pthread_cond_signal_2_0, __pthread_cond_wait_2_0,
5533 __pthread_cond_timedwait_2_0): Use return 0 as defaction instead of 0.
5535 2004-03-11 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5537 * sysdeps/sh/tcb-offsets.sym: Add PID.
5538 * sysdeps/unix/sysv/linux/sh/pt-vfork.S: Properly handle PID cache.
5539 * sysdeps/unix/sysv/linux/sh/vfork.S: New file.
5541 2004-03-10 Ulrich Drepper <drepper@redhat.com>
5543 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: No need to
5544 include <sysdep-cancel.h>, vfork is no cancellation point.
5545 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: Likewise.
5546 * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: Likewise.
5547 * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: Likewise.
5549 2004-03-10 Jakub Jelinek <jakub@redhat.com>
5551 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Add
5553 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
5554 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
5556 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S (__vfork):
5558 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
5559 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
5560 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Include tcb-offsets.h.
5561 * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Use DO_CALL instead
5562 of DO_CALL_VIA_BREAK. Work around a gas problem.
5564 * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: Remove.
5565 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: New file.
5566 * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: New file.
5567 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: New file.
5568 * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: New file.
5569 * sysdeps/powerpc/tcb-offsets.sym: Add PID.
5571 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S (__vfork): Don't use
5572 a local register for saving old PID. Negate PID in parent upon exit.
5574 * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: Include
5576 (__vfork): Negate PID if non-zero and set to INT_MIN if zero
5577 before syscall, set to the old value in the parent afterwards.
5578 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: New file.
5579 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: Include
5581 (__vfork): Negate PID if non-zero and set to INT_MIN if zero
5582 before syscall, set to the old value in the parent afterwards.
5583 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: New file.
5584 * sysdeps/s390/tcb-offsets.sym: Add PID.
5586 * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: Remove.
5587 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: New file.
5588 * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S: New file.
5589 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: New file.
5590 * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: New file.
5591 * sysdeps/sparc/tcb-offsets.sym: Add PID.
5593 2004-03-10 Andreas Schwab <schwab@suse.de>
5595 * sysdeps/ia64/tcb-offsets.sym: Add PID.
5596 * sysdeps/unix/sysv/linux/ia64/vfork.S: New file.
5597 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Properly handle PID cache.
5599 2004-03-09 Jakub Jelinek <jakub@redhat.com>
5601 * tst-cancel20.c (do_one_test): Clear in_sh_body first.
5602 * tst-cancel21.c (do_one_test): Likewise.
5603 Reported by Gordon Jin <gordon.jin@intel.com>.
5605 2004-02-09 Jakub Jelinek <jakub@redhat.com>
5607 * sysdeps/unix/sysv/linux/i386/vfork.S (SAVE_PID): Negate PID
5608 if non-zero and set to INT_MIN if zero.
5609 * sysdeps/unix/sysv/linux/x86_64/vfork.S (SAVE_PID): Likewise.
5610 * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Include tcb-offsets.h.
5611 (SAVE_PID, RESTORE_PID): Define.
5613 * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: Include tcb-offsets.h.
5614 Use relative path to avoid including NPTL i386/vfork.S.
5615 (SAVE_PID, RESTORE_PID): Define.
5616 * sysdeps/unix/sysv/linux/raise.c: Include limits.h.
5617 (raise): Handle THREAD_SELF->pid INT_MIN the same as 0.
5618 * Makefile (tests): Add tst-vfork1, tst-vfork2, tst-vfork1x and
5620 (tests-reverse): Add tst-vfork1x and tst-vfork2x.
5621 * tst-vfork1.c: New test.
5622 * tst-vfork2.c: New test.
5623 * tst-vfork1x.c: New test.
5624 * tst-vfork2x.c: New test.
5626 2004-03-08 Ulrich Drepper <drepper@redhat.com>
5628 * sysdeps/i386/tcb-offsets.sym: Add PID.
5629 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
5630 * sysdeps/unix/sysv/linux/i386/vfork.S: New file.
5631 * sysdeps/unix/sysv/linux/x86_64/vfork.S: New file.
5633 2004-03-08 Steven Munroe <sjmunroe@us.ibm.com>
5635 * sysdeps/unix/sysv/linux/powerpc/Versions: Remove leading tabs.
5637 2004-03-08 H.J. Lu <hongjiu.lu@intel.com>
5639 * sysdeps/s390/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
5642 2004-03-07 Ulrich Drepper <drepper@redhat.com>
5644 * sysdeps/ia64/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
5647 * tst-once4.c: Remove unnecessary macro definition.
5649 * tst-mutex7.c (do_test): Limit thread stack size.
5650 * tst-once2.c (do_test): Likewise.
5651 * tst-tls3.c (do_test): Likewise.
5652 * tst-tls1.c (do_test): Likewise.
5653 * tst-signal3.c (do_test): Likewise.
5654 * tst-kill6.c (do_test): Likewise.
5655 * tst-key4.c (do_test): Likewise.
5656 * tst-join4.c (do_test): Likewise.
5657 * tst-fork1.c (do_test): Likewise.
5658 * tst-context1.c (do_test): Likewise.
5659 * tst-cond2.c (do_test): Likewise.
5660 * tst-cond10.c (do_test): Likewise.
5661 * tst-clock2.c (do_test): Likewise.
5662 * tst-cancel10.c (do_test): Likewise.
5663 * tst-basic2.c (do_test): Likewise.
5664 * tst-barrier4.c (do_test): Likewise.
5666 2004-03-05 Ulrich Drepper <drepper@redhat.com>
5668 * sysdeps/i386/tls.h: Use GLRO instead of GL where appropriate.
5670 2004-03-01 Ulrich Drepper <drepper@redhat.com>
5672 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5673 (__pthread_cond_timedwait): Optimize wakeup test.
5674 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
5675 (__pthread_cond_wait): Likewise.
5676 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
5677 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
5680 2004-02-29 Ulrich Drepper <drepper@redhat.com>
5682 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
5683 (__lll_mutex_lock_wait): Optimize a bit more. Just one copy of
5684 the atomic instruction needed.
5685 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
5686 (__lll_mutex_lock_wait): Likewise.
5688 2004-02-28 Ulrich Drepper <drepper@redhat.com>
5690 * Makefile (tests): Add tst-cond14 and tst-cond15.
5691 * tst-cond14.c: New file.
5692 * tst-cond15.c: New file.
5694 2004-02-27 Ulrich Drepper <drepper@redhat.com>
5696 * sysdeps/pthread/createthread.c (create_thread): Remove use of
5697 CLONE_STOPPED. We cannot use SIGCONT which means CLONE_STOPPED
5698 needs to be implemented differently to be useful.
5700 2004-02-26 Ulrich Drepper <drepper@redhat.com>
5702 * pthread_attr_setschedparam.c: Don't test priority against limits
5703 here. Set ATTR_FLAG_SCHED_SET flag.
5704 * pthread_attr_setschedpolicy.c: Set ATTR_FLAG_POLICY_SET flag.
5705 * pthread_create.c (__pthread_create_2_1): Copy scheduling attributes
5706 from parent thread to child. If attribute is used and scheduling
5707 parameters are not inherited, copy parameters from attribute or
5708 compute them. Check priority value.
5709 * pthread_getschedparam.c: If the parameters aren't known yet get
5710 them from the kernel.
5711 * pthread_setschedparam.c: Set ATTR_FLAG_SCHED_SET and
5712 ATTR_FLAG_POLICY_SET flag for thread.
5713 * sysdeps/unix/sysv/linux/internaltypes.h: Define ATTR_FLAG_SCHED_SET
5714 and ATTR_FLAG_POLICY_SET.
5716 * sysdeps/pthread/createthread.c: Use tgkill if possible.
5718 * pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr): Don't
5719 fail if stack address hasn't been set. Just return 0.
5721 2004-02-25 Ulrich Drepper <drepper@redhat.com>
5723 * Makefile (tests-nolibpthread): Add tst-unload. Don't link with
5724 libpthread for the files in this list.
5725 (CFLAGS-tst-unload): Removed.
5726 * tst-unload.c (do_test): Don't use complete path for
5729 * Makefile: Define sonames for tst-tls5mod, tst-_res1mod1, and
5732 2004-02-22 Ulrich Drepper <drepper@redhat.com>
5734 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
5735 (__lll_mutex_lock_wait): Rewrite so that only one locked memory
5736 operation per round is needed.
5737 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
5738 (__lll_mutex_lock_wait): Likewise.
5740 2004-02-20 Ulrich Drepper <drepper@redhat.com>
5742 * tst-cancel9.c (cleanup): Don't print to stderr.
5744 2004-02-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5746 * sysdeps/sh/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Fix variable name.
5748 2004-02-20 Jakub Jelinek <jakub@redhat.com>
5750 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
5751 (__syscall_error_handler2): Call CDISABLE.
5752 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
5753 (__syscall_error_handler2): Call CDISABLE.
5755 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
5756 Release lock before the loop, don't reacquire it.
5758 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h (DL_ARGV_NOT_RELRO): Define.
5760 2004-02-19 Andreas Schwab <schwab@suse.de>
5762 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
5765 2004-02-18 Ulrich Drepper <drepper@redhat.com>
5767 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
5768 (pthread_barrier_wait): After wakeup, release lock only when the
5769 last thread stopped using the barrier object.
5770 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S
5771 (pthread_barrier_wait): Likewise.
5772 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
5774 * Makefile (tests): Add tst-barrier4.
5775 * tst-barrier4.c: New file.
5777 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5778 (__pthread_cond_timedwait): Perform timeout test while holding
5779 internal lock to prevent wakeup race.
5780 Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
5781 * sysdeps/pthread/pthread_cond_timedwait.c
5782 (__pthread_cond_timedwait): Likewise.
5783 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
5784 (__pthread_cond_timedwait): Likewise.
5786 2004-02-18 Jakub Jelinek <jakub@redhat.com>
5788 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S
5789 (__pthread_rwlock_unlock): Access WRITER as 32-bit value.
5790 * Makefile (tests): Add tst-rwlock13.
5791 * tst-rwlock13.c: New test.
5793 2004-02-16 Ulrich Drepper <drepper@redhat.com>
5795 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5796 (__condvar_tw_cleanup): Little optimization.
5797 Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
5799 2004-02-16 Steven Munroe <sjmunroe@us.ibm.com>
5801 * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: Replace libc with
5802 libpthread as "lib" parameter to SHLIB_COMPAT.
5803 (__novmx_siglongjmp): Fix typo in function name.
5804 (__novmx_longjmp): Fix typo in function name.
5806 2004-02-13 Ulrich Drepper <drepper@redhat.com>
5808 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Add a
5811 * sysdeps/generic/pt-longjmp.c: Moved to...
5812 * sysdeps/pthread/pt-longjmp.c: ...here. New file.
5814 2004-01-29 Steven Munroe <sjmunroe@us.ibm.com>
5816 * Makefile (libpthread-routines): Add pt-cleanup.
5817 * pt-longjmp.c: Removed.
5818 * pt-cleanup.c: Copied __pthread_cleanup_upto to here. New file.
5819 * sysdeps/generic/pt-longjmp.c: Copied longjmp to here. New file.
5820 * sysdeps/unix/sysv/linux/powerpc/Versions: New file.
5821 Version longjmp, siglongjmp for GLIBC_2.3.4.
5822 * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: New File.
5824 2004-02-13 Ulrich Drepper <drepper@redhat.com>
5826 * sysdeps/pthread/pthread_cond_timedwait.c
5827 (__pthread_cond_timedwait): Optimize. Drop internal lock earlier.
5828 Reuse code. Add __builtin_expects.
5830 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5831 (__pthread_cond_timedwait): Get internal lock in case timeout has
5832 passed before the futex syscall.
5833 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5835 2004-01-20 Ulrich Drepper <drepper@redhat.com>
5837 * allocatestack.c: Pretty printing.
5839 * sysdeps/pthread/createthread.c (create_thread): Don't add
5840 CLONE_DETACHED bit if it is not necessary.
5842 2004-01-16 Ulrich Drepper <drepper@redhat.com>
5844 * pthread_getattr_np.c: Include ldsodefs.h.
5846 2004-01-16 Richard Henderson <rth@redhat.com>
5848 * allocatestack.c: Don't declare __libc_stack_end.
5849 * init.c (__pthread_initialize_minimal_internal): Likewise.
5850 * pthread_getattr_np.c (pthread_getattr_np): Likewise.
5852 2004-01-15 Richard Henderson <rth@redhat.com>
5854 * sysdeps/alpha/tls.h (tcbhead_t): Add private.
5855 (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE,
5856 TLS_PRE_TCB_SIZE, TLS_TCB_ALIGN, INSTALL_DTV, INSTALL_NEW_DTV,
5857 GET_DTV, THREAD_DTV, THREAD_SELF, DB_THREAD_SELF): Match ia64.
5858 (TLS_TCB_OFFSET, THREAD_ID, NO_TLS_OFFSET): Remove.
5859 (THREAD_GETMEM, THREAD_GETMEM_NC): Simplify.
5860 (THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
5861 * sysdeps/unix/sysv/linux/alpha/createthread.c (TLS_VALUE): Match ia64.
5863 2004-01-14 Ulrich Drepper <drepper@redhat.com>
5865 * init.c (pthread_functions): Make array const.
5867 2004-01-13 Ulrich Drepper <drepper@redhat.com>
5869 * allocatestack.c (__make_stacks_executable): Change interface.
5870 Check parameters. Pass parameter on to libc counterpart.
5871 * pthreadP.h: Change declaration.
5873 2004-01-13 Richard Henderson <rth@redhat.com>
5875 * pthread_attr_setstack.c (__old_pthread_attr_setstack): Use
5877 * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize):
5880 * sysdeps/alpha/Makefile: New file.
5881 * sysdeps/alpha/tcb-offsets.sym: New file.
5882 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
5883 Use MULTIPLE_THREADS_OFFSET to implement !libpthread !libc version.
5885 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Rewrite based
5888 2004-01-08 Jakub Jelinek <jakub@redhat.com>
5890 * Makefile (tests): Add tst-backtrace1.
5891 * tst-backtrace1.c: New test.
5893 2003-12-11 Ulrich Weigand <uweigand@de.ibm.com>
5895 * sysdeps/alpha/tls.h (DB_THREAD_SELF): Pass bit size of thread
5896 register as second parameter to the REGISTER macro.
5897 * sysdeps/ia64/tls.h (DB_THREAD_SELF): Likewise.
5898 * sysdeps/powerpc/tls.h (DB_THREAD_SELF): Likewise.
5899 * sysdeps/sh/tls.h (DB_THREAD_SELF): Likewise.
5900 * sysdeps/sparc/tls.h (DB_THREAD_SELF): Likewise.
5901 * sysdeps/s390/tls.h (DB_THREAD_SELF): Pass __WORDSIZE as bit size
5902 of thread register as second parameter to REGISTER macro in 64 case.
5904 2004-01-03 Ulrich Drepper <drepper@redhat.com>
5906 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Removed.
5907 (CFLAGS-getpid.o): Defined.
5908 (CFLAGS-getpid.os): Defined.
5910 2003-12-31 Ulrich Drepper <drepper@redhat.com>
5912 * pthread_getattr_np.c (pthread_getattr_np): Make sure stack info
5913 returned for main thread does not overlap with any other VMA.
5914 Patch by Jakub Jelinek.
5916 2003-12-29 Jakub Jelinek <jakub@redhat.com>
5918 * tst-raise1.c: Include stdio.h.
5920 2003-12-23 Jakub Jelinek <jakub@redhat.com>
5922 * sysdeps/unix/sysv/linux/raise.c (raise): Protect pid = selftid
5923 setting with __ASSUME_TGKILL || defined __NR_tgkill.
5924 If pid is 0, set it to selftid.
5925 * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Make inline.
5926 Don't set self->pid but self->tid. If self->pid == 0 and self->tid
5927 != 0, return self->tid without doing a syscall.
5928 * descr.h (struct pthread): Move pid field after tid.
5930 * Makefile (tests): Add tst-raise1.
5931 * tst-raise1.c: New file.
5933 2003-12-23 Roland McGrath <roland@redhat.com>
5935 * tst-oddstacklimit.c: New file.
5936 * Makefile (tests): Add it.
5937 (tst-oddstacklimit-ENV): New variable.
5939 * init.c (__pthread_initialize_minimal_internal): Round stack rlimit
5940 value up to page size for __default_stacksize.
5942 2003-12-21 Ulrich Drepper <drepper@redhat.com>
5944 * Makefile (tests): Add tst-eintr5.
5945 * tst-eintr5.c: New file.
5947 * eintr.c (eintr_source): Prevent sending signal to self.
5949 * tst-eintr2.c (tf1): Improve error message.
5951 2003-12-20 Ulrich Drepper <drepper@redhat.com>
5953 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Define.
5954 * sysdeps/unix/sysv/linux/getpid.c: New file.
5955 * pthread_cancel.c: Add comment explaining use of PID field.
5956 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
5957 * pthread_getattr_np.c: Use abs() when comparing PID and TID fields.
5958 * sysdeps/unix/sysv/linux/fork.c: Negate PID field of parent
5959 temporarily to signal the field must not be relied on and updated
5961 * sysdeps/unix/sysv/linux/pt-raise.c: Handle case where PID is
5962 temporarily negative.
5963 * sysdeps/unix/sysv/linux/raise.c: Likewise.
5965 2003-12-19 Ulrich Drepper <drepper@redhat.com>
5967 * eintr.c (setup_eintr): Add new parameter. Pass to thread function.
5968 (eintr_source): If ARG != NULL, use pthread_kill.
5969 * tst-eintr1.c: Adjust for this change.
5970 * tst-eintr2.c: Likewise.
5971 * Makefile (tests): Add tst-eintr3 and tst-eintr4.
5972 * tst-eintr3.c: New file.
5973 * tst-eintr4.c: New file.
5975 2003-12-19 Jakub Jelinek <jakub@redhat.com>
5977 * libc-cancellation.c (__libc_enable_asynccancel): Don't cancel
5978 if CANCELSTATE_BITMASK is set.
5979 * sysdeps/pthread/librt-cancellation.c (__librt_enable_asynccancel):
5982 * Makefile (tests): Add tst-cancel22 and tst-cancel23.
5983 (tests-reverse): Add tst-cancel23.
5984 * tst-cancel22.c: New test.
5985 * tst-cancel23.c: New test.
5987 2003-12-18 Ulrich Drepper <drepper@redhat.com>
5989 * tst-eintr1.c: Better error messages.
5991 * Makefile (tests): Add tst-eintr2.
5992 * tst-eintr2.c: New file.
5994 2003-12-18 Jakub Jelinek <jakub@redhat.com>
5996 * Makefile (tests): Add tst-cancel21 and tst-cancelx21.
5997 (CFLAGS-tst-cancelx21.c): Set.
5998 * tst-cancel21.c: New test.
5999 * tst-cancelx21.c: New test.
6001 * unwind.c (FRAME_LEFT): Add adj argument. Subtract it from each
6003 (unwind_stop): Use _JMPBUF_CFA_UNWINDS_ADJ macro instead of
6004 _JMPBUF_CFA_UNWINDS. Adjust FRAME_LEFT invocations.
6005 * pt-longjmp.c: Include jmpbuf-unwind.h.
6006 (__pthread_cleanup_upto): Use _JMPBUF_UNWINDS_ADJ macro instead of
6007 _JMPBUF_UNWINDS. Adjust compared pointers.
6008 * init.c (__pthread_initialize_minimal_internal): Initialize
6009 pd->stackblock_size.
6010 * sysdeps/pthread/jmpbuf-unwind.h: Removed.
6011 * sysdeps/alpha/jmpbuf-unwind.h: New file.
6012 * sysdeps/i386/jmpbuf-unwind.h: New file.
6013 * sysdeps/powerpc/jmpbuf-unwind.h: New file.
6014 * sysdeps/s390/jmpbuf-unwind.h: New file.
6015 * sysdeps/sh/jmpbuf-unwind.h: New file.
6016 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: New file.
6017 * sysdeps/x86_64/jmpbuf-unwind.h: New file.
6018 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Include stdint.h.
6019 (_JMPBUF_CFA_UNWINDS): Remove.
6020 (_JMPBUF_CFA_UNWINDS_ADJ, _JMPBUF_UNWINDS_ADJ): Define.
6022 2003-12-12 Jakub Jelinek <jakub@redhat.com>
6024 * Makefile (tests): Add tst-cancel20 and tst-cancelx20.
6025 (CFLAGS-tst-cancelx20.c): Set.
6026 * tst-cancel20.c: New test.
6027 * tst-cancelx20.c: New test.
6029 2003-12-17 Ulrich Drepper <drepper@redhat.com>
6031 * init.c (__pthread_initialize_minimal_internal): Don't treat
6032 architectures with separate register stack special here when
6033 computing default stack size.
6035 2003-12-17 Roland McGrath <roland@redhat.com>
6037 * Makefile (tst-cancelx7-ARGS): New variable.
6038 Reportd by Greg Schafer <gschafer@zip.com.au>.
6040 2003-12-17 Jakub Jelinek <jakub@redhat.com>
6042 * Makefile (tests): Add tst-stack3. Depend on $(objpfx)tst-stack3-mem.
6043 (generated): Add tst-stack3.mtrace and tst-stack3-mem.
6044 (tst-stack3-ENV): Set.
6045 ($(objpfx)tst-stack3-mem): New.
6046 * tst-stack3.c: New test.
6048 2003-12-10 David Mosberger <davidm@hpl.hp.com>
6050 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init_EPILOG_BEGINS):
6051 Add unwind directives. Drop unused .regstk directive.
6052 (_fini_EPILOG_BEGINS): Add unwind directives.
6054 2003-12-11 Ulrich Drepper <drepper@redhat.com>
6056 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
6057 Assume parameter is a pointer.
6058 (lll_futex_wake): Likewise.
6059 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_wait):
6061 (lll_futex_wake): Likewise.
6062 Reported by Boris Hu.
6063 * sysdeps/unix/sysv/linux/unregister-atfork.c
6064 (__unregister_atfork): Pass pointer to refcntr to lll_futex_wait.
6066 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Simplify a bit.
6068 2003-12-10 Ulrich Drepper <drepper@redhat.com>
6070 * sysdeps/pthread/bits/libc-lock.h (__rtld_lock_initialize): Define.
6071 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Call
6072 __rtld_lock_initialize for ld.so lock.
6073 Patch in part by Adam Li <adam.li@intel.com>.
6075 2003-12-02 David Mosberger <davidm@hpl.hp.com>
6077 * Makefile (link-libc-static): Remove -lgcc_eh---it's already mentioned
6078 in $(gnulib). Also, remove stale comment.
6080 2003-11-12 David Mosberger <davidm@hpl.hp.com>
6082 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Take
6083 advantage of new syscall stub and optimize accordingly.
6085 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__NR_futex): Rename
6086 from SYS_futex, to match expectations of
6087 sysdep.h:DO_INLINE_SYSCALL.
6088 (lll_futex_clobbers): Remove.
6089 (lll_futex_timed_wait): Rewrite in terms of DO_INLINE_SYSCALL.
6090 (lll_futex_wake): Likewise.
6091 (lll_futex_requeue): Likewise.
6092 (__lll_mutex_trylock): Rewrite to a macro, so we can include this
6093 file before DO_INLINE_SYSCALL is defined (proposed by Jakub
6095 (__lll_mutex_lock): Likewise.
6096 (__lll_mutex_cond_lock): Likewise.
6097 (__lll_mutex_timed_lock): Likewise.
6098 (__lll_mutex_unlock): Likewise.
6099 (__lll_mutex_unlock_force): Likewise.
6101 * sysdeps/ia64/tls.h: Move declaration of __thread_self up so it
6102 comes before the include of <sysdep.h>.
6103 (THREAD_SELF_SYSINFO): New macro.
6104 (THREAD_SYSINFO): Likewise.
6105 (INIT_SYSINFO): New macro.
6106 (TLS_INIT_TP): Call INIT_SYSINFO.
6108 * sysdeps/ia64/tcb-offsets.sym: Add SYSINFO_OFFSET.
6110 * sysdeps/pthread/createthread.c (create_thread): Use
6111 THREAD_SELF_SYSINFO and THREAD_SYSINFO instead of open code.
6112 * allocatestack.c (allocate_stack): Use THREAD_SYSINFO and
6113 THREAD_SELF_SYSINFO instead of open code.
6114 * sysdeps/i386/tls.h (THREAD_SELF_SYSINFO): New macro.
6115 (THREAD_SYSINFO): Likewise.
6117 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: New file.
6119 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Work around gas problem.
6121 2003-12-06 Ulrich Drepper <drepper@redhat.com>
6123 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Use .init_array
6124 instead of .init. Patch by David Mosberger.
6126 2003-11-30 Thorsten Kukuk <kukuk@suse.de>
6128 * sysdeps/pthread/configure.in: Remove broken declaration in C
6129 cleanup handling check.
6131 2003-11-30 Andreas Jaeger <aj@suse.de>
6133 * Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time).
6134 * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
6137 2003-11-27 Jakub Jelinek <jakub@redhat.com>
6139 * sysdeps/unix/sysv/linux/internaltypes.h (ATTR_FLAG_OLDATTR): Define.
6140 * pthread_attr_destroy.c: Include shlib-compat.h.
6141 (__pthread_attr_destroy): Return immediately if ATTR_FLAG_OLDATTR
6142 is set in iattr->flags.
6143 * pthread_attr_init.c (__pthread_attr_init_2_0): Set ATTR_FLAG_OLDATTR.
6145 2003-11-21 Jakub Jelinek <jakub@redhat.com>
6147 * Makefile (distribute): Add tst-cleanup4aux.c.
6149 * tst-cond12.c (prepare): Add prototype. Move after test-skeleton.c
6152 2003-11-21 Ulrich Drepper <drepper@redhat.com>
6154 * tst-cond12.c (do_test): If USE_COND_SIGNAL is defined, use
6155 pthread_cond_signal.
6157 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Don't
6158 store mutex address if the current value is ~0l.
6159 * sysdeps/pthread/pthread_cond_timedwait.c
6160 (__pthread_cond_timedwait): Likewise.
6161 * sysdeps/pthread/pthread_cond_broadcast.c
6162 (__pthread_cond_broadcast): Don't use requeue for pshared
6165 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
6166 (__pthread_cond_wait): Don't store mutex address if the current
6168 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
6169 (__pthread_cond_timedwait): Likewise.
6170 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
6171 (__pthread_cond_broadcast): Don't use requeue for pshared
6174 * pthread_cond_init.c (__pthread_cond_init): Initialize __mutex
6175 element with ~0l for pshared condvars, with NULL otherwise.
6177 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
6178 (__pthread_cond_wait): Don't store mutex address if the current
6180 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6181 (__pthread_cond_timedwait): Likewise.
6182 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
6183 (__pthread_cond_broadcast): Don't use requeue for pshared
6186 * Makefile: Add rules to build and run tst-cond12 and tst-cond13.
6187 * tst-cond12.c: New file.
6188 * tst-cond13.c: New file.
6190 2003-11-17 Ulrich Drepper <drepper@redhat.com>
6192 * sysdeps/pthread/configure.in: Make missing forced unwind support
6195 2003-11-11 Ulrich Drepper <drepper@redhat.com>
6197 * pthreadP.h: Don't declare __pthread_unwind as weak inside libpthread.
6199 2003-11-06 Ulrich Drepper <drepper@redhat.com>
6201 * Makefile: Add magic to clean up correctly.
6203 2003-11-05 Jakub Jelinek <jakub@redhat.com>
6205 * unwind.c (FRAME_LEFT): Define.
6206 (unwind_stop): Handle old style cleanups here.
6207 (__pthread_unwind): Handle old style cleanups only if
6208 !HAVE_FORCED_UNWIND.
6209 * Makefile (tests): Add tst-cleanup4 and tst-cleanupx4.
6210 (CFLAGS-tst-cleanupx4.c): Add -fexceptions.
6211 ($(objpfx)tst-cleanup4): Depend on $(objpfx)tst-cleanup4aux.o.
6212 ($(objpfx)tst-cleanupx4): Likewise.
6213 * tst-cleanup4.c: New test.
6214 * tst-cleanup4aux.c: New.
6215 * tst-cleanupx4.c: New test.
6217 2003-11-04 Ulrich Drepper <drepper@redhat.com>
6219 * sysdeps/pthread/bits/stdio-lock.h: Use lll_*lock instead of
6220 lll_mutex_*lock macros to skip atomic operations on some archs.
6222 2003-11-03 Ulrich Drepper <drepper@redhat.com>
6224 * sysdeps/pthread/tst-timer.c (main): Initialize
6225 sigev2.sigev_value as well.
6227 2003-10-15 Roland McGrath <roland@redhat.com>
6229 * sysdeps/pthread/configure.in: Barf if visibility attribute support
6231 * sysdeps/pthread/configure: Regenerated.
6233 2003-10-09 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6235 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Completely revamp the
6236 locking macros. No distinction between normal and mutex locking
6238 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Rewrite mutex locking.
6239 Merge bits from lowlevelmutex.S we still need.
6240 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Remove.
6241 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
6242 * sysdeps/unix/sysv/linux/sh/not-cancel.h: New file.
6243 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Adjust for
6244 new mutex implementation.
6245 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Likewise.
6246 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
6247 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
6248 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
6249 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
6250 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
6251 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
6252 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
6253 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
6254 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO): Also defined
6255 symbol for entry point to avoid cancellation.
6257 2003-10-07 Jakub Jelinek <jakub@redhat.com>
6259 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Backout 2003-10-02
6261 (SAVE_OLDTYPE_0): Fix a typo.
6263 2003-10-03 Ulrich Drepper <drepper@redhat.com>
6265 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
6266 Check __sigsetjmp return value. Reported by Daniel Jacobowitz.
6268 2003-10-02 Ulrich Drepper <drepper@redhat.com>
6270 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (DOCARGS_1): Use
6273 2003-10-02 Jakub Jelinek <jakub@redhat.com>
6275 * Makefile (tests): Add tst-cancel19.
6276 * tst-cancel19.c: New test.
6278 2003-10-02 Ulrich Drepper <drepper@redhat.com>
6280 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix saving and
6281 restoring of the old cancellation type.
6283 2003-09-30 Jakub Jelinek <jakub@redhat.com>
6285 * sysdeps/pthread/malloc-machine.h: Remove misleading comment.
6287 2003-09-27 Wolfram Gloger <wg@malloc.de>
6289 * sysdeps/pthread/malloc-machine.h: New file
6291 2003-09-24 Roland McGrath <roland@redhat.com>
6293 * allocatestack.c (__make_stacks_executable): Don't ignore return
6294 value from _dl_make_stack_executable.
6296 2003-09-24 Ulrich Drepper <drepper@redhat.com>
6298 * allocatestack.c (__make_stacks_executable): Also change
6299 permission of the currently unused stacks.
6301 * allocatestack.c (change_stack_perm): Split out from
6302 __make_stacks_executable.
6303 (allocate_stack): If the required permission changed between the time
6304 we started preparing the stack and queueing it, change the permission.
6305 (__make_stacks_executable): Call change_stack_perm.
6307 * Makefile: Build tst-execstack-mod locally.
6308 * tst-execstack-mod.c: New file.
6310 2003-09-23 Jakub Jelinek <jakub@redhat.com>
6312 * Makefile (tests): Only add tst-execstack if have-z-execstack is yes.
6314 2003-09-23 Roland McGrath <roland@redhat.com>
6316 * tst-execstack.c: New file.
6317 * Makefile (tests): Add it.
6318 ($(objpfx)tst-execstack, $(objpfx)tst-execstack.out): New targets.
6319 (LDFLAGS-tst-execstack): New variable.
6321 * allocatestack.c (allocate_stack): Use GL(dl_stack_flags) to decide
6322 whether to use PROT_EXEC for stack mmap.
6323 (__make_stacks_executable): New function.
6324 * pthreadP.h: Declare it.
6325 * init.c (__pthread_initialize_minimal_internal): Set
6326 GL(dl_make_stack_executable_hook) to that.
6328 2003-09-22 Ulrich Drepper <drepper@redhat.com>
6330 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Adjust for latest
6331 recommendation from AMD re avoidance of lock prefix.
6333 2003-09-22 Jakub Jelinek <jakub@redhat.com>
6335 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait): Use
6336 lll_futex_timed_wait instead of lll_futex_wait.
6337 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Removed.
6338 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Removed.
6339 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: Removed.
6340 * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: Removed.
6341 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Removed.
6342 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Removed.
6343 * sysdeps/unix/sysv/linux/s390/sem_post.c: Removed.
6344 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Removed.
6345 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Include atomic.h.
6346 Completely revamp the locking macros. No distinction between
6347 normal and mutex locking anymore.
6348 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
6349 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock_wait,
6350 __lll_lock_timedwait): Fix prototypes.
6351 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_lock_wait,
6352 __lll_lock_timedwait): Likewise.
6353 (lll_mutex_lock, lll_mutex_cond_lock): Use _val instead of _bool
6354 macros, add __builtin_expect.
6355 (lll_mutex_timedlock): Likewise. Fix return value.
6356 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Removed.
6357 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: Removed.
6358 * sysdeps/unix/sysv/linux/i386/i586/lowlevelmutex.S: Removed.
6359 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: Removed.
6360 * sysdeps/unix/sysv/linux/i386/i686/lowlevelmutex.S: Removed.
6361 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: Removed.
6362 * sysdeps/unix/sysv/linux/lowlevelmutex.c: Removed.
6363 * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: Removed.
6365 2003-09-22 Ulrich Drepper <drepper@redhat.com>
6367 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
6368 (__lll_mutex_lock_wait): Minor optimization to avoid one atomic
6369 operation if possible.
6371 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Don't play tricks
6372 like jumping over the lock prefix.
6374 2003-09-21 Ulrich Drepper <drepper@redhat.com>
6376 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Completely revamp the
6377 locking macros. No distinction between normal and mutex locking
6379 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
6380 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
6381 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
6382 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Rewrite mutex
6383 locking. Merge bits from lowlevelmutex.S we still need.
6384 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
6385 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
6386 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Removed.
6387 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Removed.
6388 * Makefile (routines): Remove libc-lowlevelmutex.
6389 (libpthread-rountines): Remove lowlevelmutex.
6390 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Adjust
6391 for new mutex implementation.
6392 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
6393 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6394 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6395 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
6396 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
6398 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
6400 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
6401 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
6402 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise
6403 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
6404 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6405 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6406 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
6407 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
6409 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
6411 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
6412 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
6413 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
6415 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
6416 * sysdeps/pthread/pthread_cond_signal.c: Don't use requeue.
6418 2003-09-20 Ulrich Drepper <drepper@redhat.com>
6420 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't match memory
6421 in parameters of asm with output parameters.
6423 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Change
6424 type of DECR parameter to int.
6425 * pthreadP.h: Adjust prototype of __pthread_mutex_unlock_usercnt.
6427 2003-09-18 Jakub Jelinek <jakub@redhat.com>
6429 * tst-attr3.c (tf, do_test): Print stack start/end/size and
6430 guardsize for each thread.
6432 2003-09-17 Jakub Jelinek <jakub@redhat.com>
6434 * sysdeps/pthread/pthread.h (pthread_getattr_np): Clarify usage.
6435 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
6436 (pthread_attr_setaffinity_np): Handle cpuset == NULL.
6438 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
6439 (pthread_attr_getaffinity_np): Don't segfault if iattr->cpuset is
6441 * pthread_getattr_np.c: Set cpuset using pthread_getaffinity_np.
6442 * pthreadP.h (pthread_getaffinity_np): Add hidden_proto.
6443 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
6444 (pthread_getaffinity_np): Add hidden_def.
6446 * Makefile (tests): Add tst-attr3.
6447 * tst-attr3.c: New test.
6449 * sysdeps/i386/Makefile (CFLAGS-tst-align.c): Remove.
6451 2003-09-15 Jakub Jelinek <jakub@redhat.com>
6453 * sysdeps/i386/Makefile (CFLAGS-pthread_create.c,
6454 CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
6456 2003-09-17 Jakub Jelinek <jakub@redhat.com>
6458 * Makefile (CFLAGS-tst-align.c): Add $(stack-align-test-flags).
6459 * tst-align.c: Include tst-stack-align.h.
6460 (tf, do_test): Use TEST_STACK_ALIGN macro.
6462 2003-09-17 Ulrich Drepper <drepper@redhat.com>
6464 * pthread_attr_init.c (__pthread_attr_init_2_0): Remove unused
6467 2003-09-16 Ulrich Drepper <drepper@redhat.com>
6469 * pthread_getattr_np.c (pthread_getattr_np): Correctly fill in the
6470 stack-related values for the initial thread.
6472 2003-09-15 Jakub Jelinek <jakub@redhat.com>
6474 * Makefile (CFLAGS-pthread_once.c): Add $(uses-callbacks).
6476 2003-09-11 Ulrich Drepper <drepper@redhat.com>
6478 * pthread_mutex_lock.c: Minor code rearrangements.
6480 2003-09-05 Roland McGrath <roland@redhat.com>
6482 * pthread_create.c (__pthread_pthread_sizeof_descr): Removed.
6483 Instead, include ../nptl_db/db_info.c to do its magic.
6484 * pthread_key_create.c (__pthread_pthread_keys_max): Removed.
6485 (__pthread_pthread_key_2ndlevel_size): Likewise.
6486 * sysdeps/alpha/tls.h (DB_THREAD_SELF): New macro.
6487 * sysdeps/i386/tls.h (DB_THREAD_SELF): New macro.
6488 * sysdeps/ia64/tls.h (DB_THREAD_SELF): New macro.
6489 * sysdeps/powerpc/tls.h (DB_THREAD_SELF): New macro.
6490 * sysdeps/s390/tls.h (DB_THREAD_SELF): New macro.
6491 * sysdeps/sh/tls.h (DB_THREAD_SELF): New macro.
6492 * sysdeps/sparc/tls.h (DB_THREAD_SELF): New macro.
6493 * sysdeps/x86_64/tls.h (DB_THREAD_SELF): New macro.
6494 * sysdeps/alpha/td_ta_map_lwp2thr.c: File removed.
6495 * sysdeps/generic/td_ta_map_lwp2thr.c: File removed.
6496 * sysdeps/i386/td_ta_map_lwp2thr.c: File removed.
6497 * sysdeps/ia64/td_ta_map_lwp2thr.c: File removed.
6498 * sysdeps/powerpc/td_ta_map_lwp2thr.c: File removed.
6499 * sysdeps/s390/td_ta_map_lwp2thr.c: File removed.
6500 * sysdeps/sh/td_ta_map_lwp2thr.c: File removed.
6501 * sysdeps/sparc/td_ta_map_lwp2thr.c: File removed.
6502 * sysdeps/x86_64/td_ta_map_lwp2thr.c: File removed.
6504 2003-09-08 Ulrich Drepper <drepper@redhat.com>
6506 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Change type
6507 of pthread_t to be compatible with LT.
6508 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
6509 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6510 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6511 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6512 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
6513 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6514 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
6516 2003-09-04 Ulrich Drepper <drepper@redhat.com>
6518 * sysdeps/unix/sysv/linux/i386/not-cancel.h (fcntl_not_cancel): Define.
6520 2003-09-04 Jakub Jelinek <jakub@redhat.com>
6522 * unwind-forcedunwind.c: Move to...
6523 * sysdeps/pthread/unwind-forcedunwind.c: ...here.
6524 (pthread_cancel_init): Use ARCH_CANCEL_INIT if defined.
6525 * sysdeps/pthread/jmpbuf-unwind.h: New file.
6526 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: New file.
6527 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: New file.
6528 * unwind.c: Include jmpbuf-unwind.h.
6529 (unwind_stop): Use _JMPBUF_CFA_UNWINDS macro.
6531 2003-09-02 Jakub Jelinek <jakub@redhat.com>
6533 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: New file.
6534 * sysdeps/unix/sysv/linux/ia64/Versions (libpthread): Export
6535 pthread_attr_setstack and pthread_attr_setstacksize @@GLIBC_2.3.3.
6536 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: New file.
6537 * sysdeps/unix/sysv/linux/alpha/Versions: New file.
6538 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: New file.
6539 * sysdeps/unix/sysv/linux/sparc/Versions: New file.
6540 * pthread_attr_setstack.c (__old_pthread_attr_setstack): New function.
6541 (pthread_attr_setstack): If PTHREAD_STACK_MIN != 16384, export
6542 as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.2.
6543 * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize): New
6545 (pthread_attr_setstacksize): If PTHREAD_STACK_MIN != 16384, export
6546 as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.1.
6547 * Makefile (tests): Add tst-stack2.
6548 * tst-stack2.c: New test.
6549 * tst-stack1.c: Include limits.h and sys/param.h.
6550 (do_test): Set size to MAX (4 * getpagesize (), PTHREAD_STACK_MIN).
6552 * pthread_condattr_setpshared.c: Include errno.h.
6553 (pthread_condattr_setpshared): Return EINVAL if pshared
6554 is neither PTHREAD_PROCESS_PRIVATE nor PTHREAD_PROCESS_SHARED.
6556 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Also
6557 defined symbol for entry point to avoid cancellation.
6558 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
6560 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
6562 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
6564 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h (PSEUDO):
6566 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
6568 * sysdeps/unix/sysv/linux/i386/not-cancel.h (__open_nocancel,
6569 __close_nocancel, __read_nocancel, __write_nocancel,
6570 __waitpid_nocancel): Add attribute_hidden. If not in libc.so,
6571 libpthread.so or librt.so, define to corresponding function
6572 without _nocancel suffix.
6573 * sysdeps/unix/sysv/linux/s390/not-cancel.h: New file.
6574 * sysdeps/unix/sysv/linux/powerpc/not-cancel.h: New file.
6575 * sysdeps/unix/sysv/linux/sparc/not-cancel.h: New file.
6577 * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: Fix a typo.
6579 2003-09-02 Ulrich Drepper <drepper@redhat.com>
6581 * sysdeps/unix/sysv/linux/i386/not-cancel.h: New file.
6582 * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: New file.
6584 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Make sure the code
6585 in subsections has a symbol associated with it.
6587 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Also
6588 defined symbol for entry point to avoid cancellation.
6589 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Likewise.
6591 2003-09-01 Jakub Jelinek <jakub@redhat.com>
6593 * Makefile (tests): Add tst-tls5.
6594 (module-names): Add tst-tls5mod{,a,b,c,d,e,f}.
6595 ($(objpfx)tst-tls5mod{,a,b,c,d,e,f}.so-no-z-defs): Set to yes.
6596 ($(objpfx)tst-tls5): New.
6597 ($(objpfx)tst-tls6.out): Likewise.
6598 (tests): Depend on $(objpfx)tst-tls6.out.
6599 * tst-tls3.c: Include stdint.h and pthreaddef.h.
6600 (do_test): Check pthread_self () return value alignment.
6601 * tst-tls3mod.c: Include stdint.h and pthreaddef.h.
6602 (tf): Check pthread_self () return value alignment.
6603 * tst-tls5.c: New test.
6605 * tst-tls5mod.c: New.
6606 * tst-tls5moda.c: New.
6607 * tst-tls5modb.c: New.
6608 * tst-tls5modc.c: New.
6609 * tst-tls5modd.c: New.
6610 * tst-tls5mode.c: New.
6611 * tst-tls5modf.c: New.
6612 * tst-tls6.sh: New test.
6614 * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Add
6615 ptr___pthread_cond_timedwait and ptr___pthread_cond_timedwait_2_0.
6616 * init.c (pthread_functions): Initialize them.
6617 * forward.c (pthread_cond_timedwait@GLIBC_2.0,
6618 pthread_cond_timedwait@@GLIBC_2.3.2): New forwards.
6619 * Versions (libc): Export pthread_cond_timedwait@GLIBC_2.0,
6620 pthread_cond_timedwait@@GLIBC_2.3.2.
6622 2003-09-01 Jakub Jelinek <jakub@redhat.com>
6624 * sysdeps/unix/sysv/linux/alpha/timer_create.c: New file.
6625 * sysdeps/unix/sysv/linux/alpha/timer_delete.c: New file.
6626 * sysdeps/unix/sysv/linux/alpha/timer_getoverr.c: New file.
6627 * sysdeps/unix/sysv/linux/alpha/timer_gettime.c: New file.
6628 * sysdeps/unix/sysv/linux/alpha/timer_settime.c: New file.
6629 * sysdeps/unix/sysv/linux/alpha/Versions: New file.
6631 * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
6633 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Define
6634 _POSIX_THREAD_PRIORITY_SCHEDULING.
6635 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
6637 2003-08-31 Ulrich Drepper <drepper@redhat.com>
6639 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock): Avoid
6640 nested function, use static inline function from libio.h.
6641 Code by Richard Henderson.
6643 * sysdeps/pthread/bits/libc-lock.h: Mark pthread_setcancelstate as
6646 2003-08-30 Jakub Jelinek <jakub@redhat.com>
6648 * sysdeps/unix/sysv/linux/sparc/sparc64/Versions: New file.
6649 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_create.c: New file.
6650 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_delete.c: New file.
6651 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_getoverr.c: New file.
6652 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_gettime.c: New file.
6653 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_settime.c: New file.
6654 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
6655 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
6656 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: New file.
6657 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: New file.
6658 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: New file.
6659 * sysdeps/unix/sysv/linux/sparc/pthread_once.c: New file.
6660 * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: New file.
6661 * sysdeps/unix/sysv/linux/sparc/fork.c: New file.
6662 * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
6663 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: New file.
6664 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: New file.
6665 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: New file.
6666 * sysdeps/sparc/sparc32/pthread_spin_lock.c: New file.
6667 * sysdeps/sparc/sparc32/pthread_spin_trylock.c: New file.
6668 * sysdeps/sparc/sparc32/pthreaddef.h: New file.
6669 * sysdeps/sparc/sparc64/pthread_spin_lock.c: New file.
6670 * sysdeps/sparc/sparc64/pthread_spin_trylock.c: New file.
6671 * sysdeps/sparc/sparc64/pthread_spin_unlock.c: New file.
6672 * sysdeps/sparc/sparc64/pthreaddef.h: New file.
6673 * sysdeps/sparc/tls.h: New file.
6674 * sysdeps/sparc/tcb-offsets.sym: New file.
6675 * sysdeps/sparc/Makefile: New file.
6676 * sysdeps/sparc/td_ta_map_lwp2thr.c: New file.
6677 * init.c [__sparc__] (__NR_set_tid_address): Define.
6679 2003-08-29 Jakub Jelinek <jakub@redhat.com>
6681 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock,
6682 _IO_release_lock): Define.
6684 2003-08-29 Jakub Jelinek <jakuB@redhat.com>
6686 * tst-cancel4.c (tf_sigwait, tf_sigwaitinfo, tf_sigtimedwait): Add
6687 sigemptyset before sigaddset. Reported by jreiser@BitWagon.com.
6689 2003-08-27 Ulrich Drepper <drepper@redhat.com>
6691 * sysdeps/pthread/pthread.h (pthread_exit): Remove __THROW.
6692 (__pthread_cleanup_class): Add missing return types of member
6695 2003-08-26 Steven Munroe <sjmunroe@us.ibm.com>
6697 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
6698 (lll_mutex_unlock_force): Add memory barrier between store and futex
6701 2003-08-25 Ulrich Drepper <drepper@redhat.com>
6703 * tst-cancel4.c (do_test): Also unlink tempfname and remove
6704 tempmsg in first loop.
6706 2003-08-18 Ulrich Drepper <drepper@redhat.com>
6708 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
6709 _POSIX_THREAD_PRIORITY_SCHEDULING.
6710 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
6712 2003-08-07 Jakub Jelinek <jakub@redhat.com>
6714 * sysdeps/pthread/bits/libc-lock.h [_LIBC && SHARED]
6715 (__rtld_lock_default_lock_recursive,
6716 __rtld_lock_default_unlock_recursive): Define.
6717 [_LIBC && SHARED] (__rtld_lock_lock_recursive,
6718 __rtld_lock_unlock_recursive): Define using
6719 GL(_dl_rtld_*lock_recursive).
6720 * init.c (__pthread_initialize_minimal_internal): Initialize
6721 _dl_rtld_lock_recursive and _dl_rtld_unlock_recursive.
6722 Lock GL(_dl_load_lock) the same number of times as
6723 GL(_dl_load_lock) using non-mt implementation was nested.
6725 * pthreadP.h (__pthread_cleanup_upto): Add hidden_proto.
6726 * pt-longjmp.c (__pthread_cleanup_upto): Add hidden_def.
6728 2003-08-06 Jakub Jelinek <jakub@redhat.com>
6730 * tst-cancel17.c (do_test): Make len2 maximum of page size and
6733 2003-08-07 Jakub Jelinek <jakub@redhat.com>
6735 * pthread_create.c (__pthread_create_2_0): Clear new_attr.cpuset.
6737 2003-08-03 Jakub Jelinek <jakub@redhat.com>
6739 * sysdeps/pthread/createthread.c (do_clone): Move error handling
6740 to first syscall error check. Move syscall error check for tkill
6741 into __ASSUME_CLONE_STOPPED #ifdef.
6743 2003-08-02 Ulrich Drepper <drepper@redhat.com>
6745 * sysdeps/pthread/createthread.c (do_clone): If __ASSUME_CLONE_STOPPED
6746 is not defined, do explicit synchronization.
6747 (create_thread): Do not lock pd->lock here. If __ASSUME_CLONE_STOPPED
6748 is not defined also unlock pd->lock for non-debugging case in case
6750 * pthread_create.c (start_thread): Always get and release pd->lock
6751 if __ASSUME_CLONE_STOPPED is not defined.
6752 (start_thread_debug): Removed. Adjust users.
6753 * allocatestack.c (allocate_stack): Always initialize lock if
6754 __ASSUME_CLONE_STOPPED is not defined.
6755 * Makefile (tests): Add tst-sched1.
6756 * tst-sched1.c: New file.
6758 * sysdeps/pthread/createthread.c (do_clone): Only use
6759 sched_setschduler and pass correct parameters.
6761 2003-07-31 Jakub Jelinek <jakub@redhat.com>
6763 * sysdeps/pthread/pthread.h (pthread_attr_setstackaddr,
6764 pthread_attr_setstacksize): Change PTHREAD_STACK_SIZE to
6765 PTHREAD_STACK_MIN in comments.
6767 2003-07-31 Jakub Jelinek <jakub@redhat.com>
6769 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
6770 Shut up warnings if INTERNAL_SYSCALL_ERROR_P does not use its first
6772 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Likewise.
6773 * pthread_condattr_setclock.c (pthread_condattr_setclock): Likewise.
6774 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Include pthreaddef.h.
6775 (__pthread_cleanup_upto): Fix prototype.
6776 (_longjmp_unwind): Adjust caller.
6777 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_timedlock):
6778 Change second argument to const struct pointer.
6779 * tst-sem8.c (main): Remove unused s2 and s3 variables.
6780 * tst-sem9.c (main): Likewise.
6781 * unwind.c: Include string.h for strlen prototype.
6783 2003-07-31 Ulrich Drepper <drepper@redhat.com>
6785 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6786 (__pthread_cond_timedwait): Don't use cmov unless HAVE_CMOV is defined.
6787 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S:
6789 Patch by Nicholas Miell <nmiell@attbi.com>.
6791 2003-07-30 Jakub Jelinek <jakub@redhat.com>
6793 * init.c (__pthread_initialize_minimal_internal): Initialize
6794 GL(dl_init_static_tls).
6795 * pthreadP.h (__pthread_init_static_tls): New prototype.
6796 * allocatestack.c (init_one_static_tls, __pthread_init_static_tls):
6798 * Makefile (tests): Add tst-tls4.
6799 (modules-names): Add tst-tls4moda and tst-tls4modb.
6800 ($(objpfx)tst-tls4): Link against libdl and libpthread.
6801 ($(objpfx)tst-tls4.out): Depend on tst-tls4moda.so and
6803 * tst-tls4.c: New file.
6804 * tst-tls4moda.c: New file.
6805 * tst-tls4modb.c: New file.
6807 2003-06-19 Daniel Jacobowitz <drow@mvista.com>
6809 * sysdeps/pthread/timer_create.c (timer_create): Call timer_delref
6810 before __timer_dealloc.
6811 * sysdeps/pthread/timer_routines.c (__timer_thread_find_matching):
6812 Don't call list_unlink.
6814 2003-07-29 Roland McGrath <roland@redhat.com>
6816 * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
6818 2003-07-22 Jakub Jelinek <jakub@redhat.com>
6820 * descr.h: Don't include lowlevellock.h, pthreaddef.h and dl-sysdep.h
6821 if __need_struct_pthread_size, instead define lll_lock_t.
6823 2003-07-25 Jakub Jelinek <jakub@redhat.com>
6825 * tst-cancel17.c (do_test): Check if aio_cancel failed.
6826 Don't reuse struct aiocb A if it failed.
6827 Write fpathconf (fds[1], _PC_PIPE_BUF) + 2 bytes using aio_write,
6828 not just one byte, as that does not block.
6830 2003-07-22 Jakub Jelinek <jakub@redhat.com>
6832 * sysdeps/pthread/unwind-resume.c: New file.
6833 * sysdeps/pthread/Makefile (routines, shared-only-routines): Add
6834 unwind-resume in csu subdir.
6835 (CFLAGS-unwind-resume.c, CFLAGS-rt-unwind-resume.c): Compile with
6837 (librt-sysdep_routines, librt-shared-only-routines): Add
6839 * sysdeps/pthread/rt-unwind-resume.c: New file.
6840 * unwind-forcedunwind.c: New file.
6841 * Makefile (libpthread-routines): Add unwind-forcedunwind.
6842 (libpthread-shared-only-routines): Likewise.
6843 (CFLAGS-unwind-forcedunwind.c): Compile with exceptions.
6844 * pthreadP.h (pthread_cancel_init): New prototype.
6845 * pthread_cancel.c (pthread_cancel): Call pthread_cancel_init.
6847 * sysdeps/pthread/createthread.c (do_thread, create_thread): Make
6848 attr argument const struct pthread_attr *.
6850 * res.c (__res_state): Return __resp.
6851 * descr.h: Include resolv.h.
6852 (struct pthread): Add res field.
6853 * pthread_create.c: Include resolv.h.
6854 (start_thread): Initialize __resp.
6855 * Makefile (tests): Add tst-_res1.
6856 (module-names): Add tst-_res1mod1, tst-_res1mod2.
6857 ($(objpfx)tst-_res1mod2.so): Depend on $(objpfx)tst-_res1mod1.so.
6858 ($(objpfx)tst-_res1): Depend on $(objpfx)tst-_res1mod2.so and
6860 * tst-_res1.c: New file.
6861 * tst-_res1mod1.c: New file.
6862 * tst-_res1mod2.c: New file.
6864 2003-07-21 Ulrich Drepper <drepper@redhat.com>
6866 * sysdeps/pthread/createthread.c: Don't define CLONE_STOPPED.
6868 * Makefile: Define various *-no-z-defs variables for test DSOs
6869 which has undefined symbols.
6871 2003-07-21 Steven Munroe <sjmunroe@us.ibm.com>
6873 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
6874 Retry if the stwcx fails to store once_control.
6876 2003-07-20 Ulrich Drepper <drepper@redhat.com>
6878 * Makefile (libpthread-routines): Add pthread_attr_getaffinity and
6879 pthread_attr_setaffinity.
6880 * Versions [libpthread] (GLIBC_2.3.3): Likewise.
6881 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: New file.
6882 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: New file.
6883 * pthread_attr_destroy.c: Free cpuset element if allocated.
6884 * pthread_create.c: Pass iattr as additional parameter to
6886 * sysdeps/pthread/createthread.c: If attribute is provided and
6887 a new thread is created with affinity set or scheduling parameters,
6888 start thread with CLONE_STOPPED.
6889 * sysdeps/pthread/pthread.h: Declare pthread_attr_getaffinity and
6890 pthread_attr_setaffinity.
6891 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
6894 2003-07-15 Ulrich Drepper <drepper@redhat.com>
6896 * tst-tcancel-wrappers.sh: lseek and llseek are not cancelation points.
6898 2003-07-14 Ulrich Drepper <drepper@redhat.com>
6900 * sysdeps/pthread/configure.in: Require CFI directives also for
6903 2003-07-15 Jakub Jelinek <jakub@redhat.com>
6905 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
6908 2003-07-12 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6910 * sysdeps/sh/tcb-offsets.sym: Add RESULT, TID, CANCELHANDLING and
6912 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use more
6913 registers as variables. Call __pthread_mutex_unlock_usercnt.
6914 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
6915 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Store TID
6916 not self pointer in __writer. Compare with TID to determine
6918 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
6919 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
6921 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
6923 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add cancellation support.
6924 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
6925 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Define all the nice
6926 macros also when compiling librt.
6928 2003-07-11 Jakub Jelinek <jakub@redhat.com>
6930 * Makefile (CFLAGS-pthread_once.c): Add -fexceptions
6931 -fasynchronous-unwind-tables.
6932 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
6933 (PSEUDO): Add cfi directives.
6934 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO):
6936 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
6939 2003-07-08 Jakub Jelinek <jakub@redhat.com>
6941 * pthreadP.h (__pthread_unwind_next, __pthread_register_cancel,
6942 __pthread_unregister_cancel): Add prototypes and hidden_proto.
6943 * unwind.c (__pthread_unwind_next): Add hidden_def.
6944 * cleanup.c (__pthread_register_cancel, __pthread_unregister_cancel):
6946 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
6947 Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
6948 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
6950 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
6951 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
6953 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once): Use
6954 HIDDEN_JUMPTARGET to call __pthread_register_cancel,
6955 __pthread_unregister_cancel and __pthread_unwind_next.
6957 2003-07-04 Jakub Jelinek <jakub@redhat.com>
6959 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Use
6960 different symbol for the cancellation syscall wrapper and
6961 non-cancellation syscall wrapper.
6962 (PSEUDO_END): Define.
6964 2003-07-05 Richard Henderson <rth@redhat.com>
6966 * sysdeps/alpha/elf/pt-initfini.c: Avoid .ent/.end.
6967 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_wait,
6968 lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
6969 return actual return value from the syscall, not 0.
6971 2003-07-07 Ulrich Drepper <drepper@redhat.com>
6973 * descr.h (struct pthread): Add pid field.
6974 * allocatestack.c (allocate_stack): Initialize pid field in descriptor.
6975 (__reclaim_stacks): Likewise.
6976 * init.c (sigcancel_handler): If __ASSUME_CORRECT_SI_PID is defined
6977 also check for PID of the signal source.
6978 (__pthread_initialize_minimal_internal): Also initialize pid field
6979 of initial thread's descriptor.
6980 * pthread_cancel.c: Use tgkill instead of tkill if possible.
6981 * sysdeps/unix/sysv/linux/fork.c: Likewise.
6982 * sysdeps/unix/sysv/linux/pt-raise.c: Likewise.
6983 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
6984 * sysdeps/unix/sysv/linux/raise.c: Likewise.
6986 2003-07-05 Ulrich Drepper <drepper@redhat.com>
6988 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_push): Renamed.
6989 Fix use of parameter.
6990 (__libc_cleanup_pop): Likewise.
6992 2003-07-04 Ulrich Drepper <drepper@redhat.com>
6994 * init.c (sigcancel_handler): Change parameters to match handler
6995 for SA_SIGACTION. Check signal number and code to recognize
6996 invalid invocations.
6998 2003-07-03 Roland McGrath <roland@redhat.com>
7000 * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr):
7001 Apply sizeof (struct pthread) bias to r13 value.
7003 2003-07-03 Ulrich Drepper <drepper@redhat.com>
7005 * sysdeps/pthread/configure.in: Require CFI directives.
7007 * sysdeps/pthread/librt-cancellation.c (__pthread_unwind): Remove
7009 * pthreadP.h (__pthread_unwind): Add hidden_proto if used in
7010 libpthread compilation.
7011 * unwind.c (__pthread_unwind): Add hidden_def.
7012 * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_unwind.
7014 2003-07-01 Ulrich Drepper <drepper@redhat.com>
7016 * libc-cancellation.c (__libc_cleanup_routine): Define.
7017 * sysdeps/pthread/bits/libc-lock.h (__pthread_cleanup_push): Define.
7018 (__pthread_cleanup_pop): Define.
7020 2003-07-01 Richard Henderson <rth@redhat.com>
7022 * sysdeps/alpha/elf/pt-initfini.c: New file.
7023 * sysdeps/alpha/pthread_spin_lock.S: New file.
7024 * sysdeps/alpha/pthread_spin_trylock.S: New file.
7025 * sysdeps/alpha/pthreaddef.h: New file.
7026 * sysdeps/alpha/td_ta_map_lwp2thr.c: New file.
7027 * sysdeps/alpha/tls.h: New file.
7028 * sysdeps/unix/sysv/linux/alpha/Makefile: New file.
7029 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: New file.
7030 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: New file.
7031 * sysdeps/unix/sysv/linux/alpha/createthread.c: New file.
7032 * sysdeps/unix/sysv/linux/alpha/fork.c: New file.
7033 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: New file.
7034 * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: New file.
7035 * sysdeps/unix/sysv/linux/alpha/pthread_once.c: New file.
7036 * sysdeps/unix/sysv/linux/alpha/sem_post.c: New file.
7037 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
7039 2003-07-01 Ulrich Drepper <drepper@redhat.com>
7041 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Add correct
7042 cleanup support and unwind info.
7044 2003-06-30 Ulrich Drepper <drepper@redhat.com>
7046 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
7047 Use correct cleanup handler registration. Add unwind info.
7048 * sysdeps/unix/sysv/linux/unwindbuf.sym: New file.
7049 * sysdeps/unix/sysv/linux/Makefile: Add rule to build unwindbuf.h.
7050 * tst-once3.c: Add cleanup handler and check it is called.
7051 * tst-once4.c: Likewise.
7052 * tst-oncex3.c: New file.
7053 * tst-oncex4.c: New file.
7054 * Makefile: Add rules to build and run tst-oncex3 and tst-oncex4.
7056 2003-06-29 Ulrich Drepper <drepper@redhat.com>
7058 * sysdeps/pthread/configure.in: Check for C cleanup handling in gcc.
7060 2003-06-27 Ulrich Drepper <drepper@redhat.com>
7062 * tst-cancel4.c (tf_msgrcv): Use IPC_PRIVATE in msgget call.
7063 (tf_msgsnd): Likewise.
7065 * tst-cancel4.c (tf_msgrcv): Strengthen test against valid
7066 premature returns a bit more.
7068 2003-06-26 Ulrich Drepper <drepper@redhat.com>
7070 * sysdeps/pthread/librt-cancellation.c: Move __pthread_unwind
7071 definition to the front.
7073 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rename
7074 the cleanup functions to make the names unique. Fix dwarf opcode
7076 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Rename cleanup
7077 functions to make the names unique. Fix CFA offset for two blocks.
7079 2003-06-25 Ulrich Drepper <drepper@redhat.com>
7081 * sysdeps/pthread/pthread.h (class __pthread_cleanup_class): Add
7082 missing closing braces.
7083 Patch by Christophe Saout <christophe@saout.de>.
7085 2003-06-24 Roland McGrath <roland@redhat.com>
7087 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Typo fix.
7089 2003-06-24 Ulrich Drepper <drepper@redhat.com>
7091 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: New file.
7092 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: New file.
7094 * pthreadP.h: Declare __find_thread_by_id.
7095 * allocatestack.c [HP_TIMING_AVAIL]: Define __find_thread_by_id.
7096 * pthread_clock_gettime.c: Allow using other thread's clock.
7097 * pthread_clock_settime.c: Likewise.
7098 * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
7099 * Makefile: Add rules to build and run tst-clock2.
7100 * tst-clock2.c: New file.
7102 2003-06-23 Ulrich Drepper <drepper@redhat.com>
7104 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rewrite
7105 to use exception-based cleanup handler.
7106 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7108 * tst-cond8.c (ch): Announce that we are done.
7110 * pthreadP.h (__pthread_mutex_cond_lock): Mark with internal_function.
7112 * tst-cancel17.c (tf): Retry aio_suspend in case of EINTR.
7113 Also test aio_suspend with timeout value.
7115 2003-06-22 Ulrich Drepper <drepper@redhat.com>
7117 * pthreadP.h: Mark __pthread_mutex_unlock_usercnt also hidden.
7118 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Add
7121 * pthreadP.h (__pthread_mutex_init_internal): Mark hidden.
7122 (__pthread_mutex_lock_internal): Likewise.
7123 (__pthread_mutex_unlock_internal): Likewise.
7124 (__pthread_mutex_unlock_usercnt): Declare.
7125 * pthread_mutex_destroy.c: Always fail if used in any way.
7126 * pthread_mutex_init.c: Update comment.
7127 * pthread_mutex_lock.c: If NO_INCR is not defined adjust __nusers.
7128 * pthread_mutex_timedlock.c: Adjust __nusers.
7129 * pthread_mutex_trylock.c: Adjust __nusers.
7130 * pthread_mutex_unlock.c: Old code is in __pthread_mutex_unlock_usercnt
7131 and public interfaces are wrapper with pass additional parameter.
7132 __pthread_mutex_unlock_usercnt does not adjust __nusers if second
7134 * tst-mutex8.c: New file.
7135 * Makefile (tests): Add tst-mutex8.
7136 * sysdeps/pthread/pthread_cond_timedwait.c: Call
7137 __pthread_mutex_unlock_usercnt.
7138 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
7139 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7140 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7141 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7142 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7143 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Define NO_INCR.
7144 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
7146 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7147 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7148 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7149 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
7150 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
7152 * pthread_mutex_lock.c: Don't store THREAD_ID in __owner, use TID.
7153 * pthread_mutex_timedlock.c: Likewise.
7154 * pthread_mutex_trylock.c: Adjust __nusers.
7155 * pthread_mutex_unlock.c: Compare with TID not THREAD_ID.
7156 * tst-mutex9.c: New file.
7157 * Makefile (tests): Add tst-mutex9.
7158 * sysdeps/i386/tls.h: Remove THREAD_ID definition.
7159 * sysdeps/ia64/tls.h: Likewise.
7160 * sysdeps/powerpc/tls.h: Likewise.
7161 * sysdeps/s390/tls.h: Likewise.
7162 * sysdeps/sh/tls.h: Likewise.
7163 * sysdeps/x86_64/tls.h: Likewise.
7164 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
7165 Change type of __owner.
7166 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7167 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7168 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7169 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
7170 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
7172 2003-06-19 Jakub Jelinek <jakub@redhat.com>
7174 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Move to...
7175 * sysdeps/unix/sysv/linux/sem_post.c: ...here.
7177 * sysdeps/unix/sysv/linux/sem_post.c: Move to...
7178 * sysdeps/unix/sysv/linux/powerpc/sem_post.c: ... here. Pass nr + 1
7179 instead of nr to lll_futex_wake. Only set errno and return -1
7182 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_wait,
7183 lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
7184 return actual return value from the syscall, not 0.
7186 2003-06-18 Ulrich Drepper <drepper@redhat.com>
7188 * tst-cancel4.c (tf_msgsnd): Don't always use 100 as the type,
7189 find a random value.
7190 (tf_msgrcv): Likewise. Also don't report msgrcv returns if
7193 * sysdeps/unix/sysv/linux/timer_settime.c: Add prototype for
7194 compat_timer_settime.
7195 * sysdeps/unix/sysv/linux/timer_gettime.c: Add prototype for
7196 compat_timer_gettime.
7197 * sysdeps/unix/sysv/linux/timer_getoverr.c: Add prototype for
7198 compat_timer_getoverrun.
7199 * sysdeps/unix/sysv/linux/timer_delete.c: Add prototype for
7200 compat_timer_delete.
7202 * pthread_mutex_destroy.c (__pthread_mutex_destroy): For
7203 error-checking mutex detect busy mutexes.
7205 2003-06-17 Ulrich Drepper <drepper@redhat.com>
7207 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_mutex_lock):
7208 Add ax to clobber list.
7209 (lll_mutex_cond_lock): Likewise.
7210 (lll_mutex_unlock): Likewise.
7211 (lll_lock): Likewise.
7212 (lll_unlock): Likewise.
7214 * Makefile: Add rules to build and run tst-cancel18 and tst-cancelx18.
7215 * tst-cancel18.c: New file.
7216 * tst-cancelx18.c: New file.
7218 * tst-cancel4.c: Test connect, creat, msgrcv, msgsnd, sendmsg, sendto,
7221 * Makefile: Add rules to build and run tst-cancel17 and tst-cancel17x.
7222 * tst-cancel17.c: New file.
7223 * tst-cancelx17.c: New file.
7225 * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
7226 * sysdeps/unix/sysv/linux/sigwait.c: New file.
7227 * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
7229 * tst-cancel4.c: Test open, close, pread, pwrite, fsync, and msync.
7231 2003-06-16 Jakub Jelinek <jakub@redhat.com>
7233 * sysdeps/pthread/createthread.c (create_thread): Set
7234 header.multiple_threads unconditionally.
7235 * allocatestack.c (allocate_stack): Likewise.
7236 * descr.h (struct pthread): Add header.multiple_threads
7238 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (CENABLE, CDISABLE):
7239 Define for librt. #error if neither libpthread, libc nor librt.
7240 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (CENABLE, CDISABLE):
7242 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (CENABLE,
7243 CDISABLE): Likewise.
7244 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (CENABLE,
7245 CDISABLE): Likewise.
7246 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (CENABLE,
7247 CDISABLE): Likewise.
7248 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (CENABLE,
7249 CDISABLE): Likewise. Access header.multiple_threads outside of
7250 libc and libpthread.
7251 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (CENABLE, CDISABLE):
7253 * sysdeps/x86_64/tls.h (tcbhead_t): Add multiple_threads.
7254 * sysdeps/x86_64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define.
7256 2003-06-17 Ulrich Drepper <drepper@redhat.com>
7258 * tst-cancel4.c: Add tests for the socket and signal functions, pause.
7259 Also test early cancellation before the thread reaches the cancellation
7262 * Makefile: Compile forward.c with exceptions.
7264 * sysdeps/unix/sysv/linux/sleep.c: New file.
7266 2003-06-16 Ulrich Drepper <drepper@redhat.com>
7268 * Makefile: Add CFLAGS definition to compile function wrappers
7269 duplicated from libc with exceptions.
7270 * tst-cancel4.c: Also check cancellation handlers.
7272 * Makefile: Add rules to build and run tst-cancel16 and
7273 tst-cancelx16. Add missing CFLAGS definitions.
7274 * tst-cancel16.c: New file.
7275 * tst-cancelx16.c: New file.
7277 2003-06-15 Ulrich Drepper <drepper@redhat.com>
7279 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
7280 (DL_SYSINFO_IMPLEMENTATION): Use CFI opcodes.
7281 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
7282 (DL_SYSINFO_IMPLEMENTATION): Likewise.
7284 * pthreadP.h (LIBC_CANCEL_ASYNC): Also define for librt.
7285 (LIBC_CANCEL_RESET): Likewise.
7286 Declare __librt_enable_asynccancel and __librt_disable_asynccancel.
7287 * sysdeps/pthread/Makefile (librt-sysdep_routines): Add
7289 (CFLAGS-libcrt-cancellation.c): Define.
7290 * sysdeps/pthread/librt-cancellation.c: New file.
7291 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define all the nice
7292 macros also when compiling librt.
7293 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
7294 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
7295 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
7296 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
7297 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
7298 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
7299 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
7301 * sysdeps/unix/sysv/linux/timer_create.c: Add prototype for
7302 compat_timer_create.
7304 2003-06-14 Ulrich Drepper <drepper@redhat.com>
7306 * sysdeps/pthread/posix-timer.h (timespec_compare): Always inline.
7308 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
7310 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
7311 Add libc_hidden_def.
7313 2003-06-13 Roland McGrath <roland@redhat.com>
7315 * sysdeps/x86_64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Pass FS
7316 constant from <sys/reg.h> to ps_get_thread_area, not register contents.
7318 2003-06-11 Ulrich Drepper <drepper@redhat.com>
7320 * allocatestack.c (queue_stack): Always inline.
7321 * ptreadhP.h (__do_cancel): Likewise.
7323 2003-06-10 Jakub Jelinek <jakub@redhat.com>
7325 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait): Fix
7328 2003-06-10 Ulrich Drepper <drepper@redhat.com>
7330 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
7331 (__pthread_cond_signal): Remove incorrect second addition for
7334 2003-06-09 Ulrich Drepper <drepper@redhat.com>
7336 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
7337 (__pthread_cond_signal): Use correct futex pointer in
7338 __lll_mutex_lock_wait call.
7340 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
7341 (__pthread_cond_signal): Some more tweaks to handle cond_lock!=0.
7343 2003-06-08 Ulrich Drepper <drepper@redhat.com>
7345 * sysdeps/unix/sysv/linux/s390/sem_wait.c (__new_sem_wait): Make
7347 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
7350 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Remove
7351 hand-written CFI generation code. Since ENTRY/END also initiated
7352 CFI frames this caused two CFI sets to be generated.
7354 2003-06-07 Ulrich Drepper <drepper@redhat.com>
7356 * cleanup_routine.c: New file.
7357 * Versions (libpthread) [GLIBC_2.3.3]: Add __pthread_cleanup_routine.
7358 * sysdeps/pthread/pthread.h: Add support for fully exception-based
7360 * Makefile (libpthread-routines): Add cleanup_routine.
7361 Add more CFLAGS variables to compile with exceptions. Add comments
7362 why which file needs unwind tables.
7363 (tests) [have-forced-unwind==yes]: Add tst-cancelx* and tst-cleanupx*
7365 * tst-cancelx1.c: New file.
7366 * tst-cancelx2.c: New file.
7367 * tst-cancelx3.c: New file.
7368 * tst-cancelx4.c: New file.
7369 * tst-cancelx5.c: New file.
7370 * tst-cancelx6.c: New file.
7371 * tst-cancelx7.c: New file.
7372 * tst-cancelx8.c: New file.
7373 * tst-cancelx9.c: New file.
7374 * tst-cancelx10.c: New file.
7375 * tst-cancelx11.c: New file.
7376 * tst-cancelx12.c: New file.
7377 * tst-cancelx13.c: New file.
7378 * tst-cancelx14.c: New file.
7379 * tst-cancelx15.c: New file.
7380 * tst-cleanupx0.c: New file.
7381 * tst-cleanupx0.expect: New file.
7382 * tst-cleanupx1.c: New file.
7383 * tst-cleanupx2.c: New file.
7384 * tst-cleanupx3.c: New file.
7386 * tst-cleanup0.c: Make standard compliant.
7387 * tst-cleanup1.c: Likewise.
7389 * sysdeps/unix/sysv/linux/sem_timedwait.c: Add cancellation support.
7390 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
7391 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
7392 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
7393 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
7394 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
7395 * sysdeps/i386/tcb-offsets.sym: Add RESULT, CANCELHANDLING, and
7397 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
7398 * tst-cancel12.c: New file.
7399 * tst-cancel13.c: New file.
7400 * tst-cancel14.c: New file.
7401 * tst-cancel15.c: New file.
7402 * Makefile (tests): Add tst-cancel12, tst-cancel13, tst-cancel14,
7405 * tst-cancel1.c: Add some comments.
7407 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Compute relative
7410 2003-06-06 Ulrich Drepper <drepper@redhat.com>
7412 * Makefile (CFLAGS-pthread_cancel.c): Define.
7414 2003-06-05 Ulrich Drepper <drepper@redhat.com>
7416 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_rwlock_t):
7417 Change type of __writer element to int.
7418 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7419 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7420 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7421 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7422 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
7423 * sysdeps/i386/tcb-offsets.sym: Replace SELF entry with TID entry.
7424 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
7425 * pthread_rwlock_trywrlock.c: Store TID not self pointer in __writer.
7426 Compare with TID to determine deadlocks.
7427 * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
7428 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
7429 * sysdeps/pthread/pthread_rwlock_timedwrlock.: Likewise.
7430 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
7431 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
7432 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
7434 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
7436 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
7437 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
7438 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
7440 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
7442 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
7443 * Makefile (tests): Add tst-rwlock12.
7444 * tst-rwlock12.c: New file.
7446 2003-06-05 Jakub Jelinek <jakub@redhat.com>
7448 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait,
7449 __lll_timedlock_wait, lll_unlock_wake_cb, __lll_timedwait_tid):
7450 Remove bogus hidden_proto.
7451 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
7453 * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_lock,
7454 lll_unlock_wake_cb, ___lll_timedwait_tid): Likewise.
7455 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (___lll_mutex_lock,
7456 ___lll_mutex_timedlock): Likewise.
7458 2003-06-04 Ulrich Drepper <drepper@redhat.com>
7460 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
7461 (__pthread_cond_signal): Add some code to eventually handle
7464 2003-06-01 Ulrich Drepper <drepper@redhat.com>
7466 * Makefile (tests): Add tst-exec4.
7467 (tst-exec4-ARGS): Define.
7468 * tst-exec4.c: New file.
7470 2003-05-31 Ulrich Drepper <drepper@redhat.com>
7472 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
7473 Also fail if tv_nsec < 0.
7474 (__lll_timedwait_tid): Likewise.
7475 * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
7476 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_timedwait_tid):
7478 * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_timedwait_tid):
7480 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (__lll_mutex_timedlock):
7482 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
7484 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_timedwait_tid):
7486 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_timedwait_tid):
7489 * Makefile (tests): Add tst-sem8 and tst-sem9.
7490 * tst-sem8.c: New file.
7491 * tst-sem9.c: New file.
7492 * sem_open.c: Fix creation of in_use record if the file exists but
7495 * posix-timer.h: Remove old, unused timer_id2ptr and timer_ptr2id
7498 * sysdeps/pthread/timer_create.c (timer_create): In case
7499 evp==NULL, assign timer ID to sival_ptr.
7501 * descr.h (struct pthread_unwind_buf): Change type of prev element to
7502 struct pthread_unwind_buf *.
7503 (struct pthread): Likewise for cleanup_jmp_buf element.
7505 * cleanup.c (__pthread_register_cancel): Add cast to avoid warning.
7506 * cleanup_defer.c (__pthread_register_cancel_defer): Likewise.
7507 * unwind.c (__pthread_unwind_next): Likewise.
7509 2003-05-30 Ulrich Drepper <drepper@redhat.com>
7511 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
7512 (lll_futex_timed_wait): Use int for futex value parameter.
7513 (lll_futex_wake): Likewise.
7514 (lll_futex_requeue): Likewise.
7516 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
7517 Replace one memory operation with one register operation.
7519 * tst-join4.c (do_test): Fix error message.
7521 * tst-rwlock6.c (do_test): Use correct format specifier.
7523 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
7524 (__lll_mutex_lock_wait): Replace one memory operation with one
7526 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S
7527 (__lll_mutex_lock_wait): Likewise.
7529 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
7530 (__lll_mutex_cond_lock): Add one to value parameter of
7531 __lll_lock_wait to reflect reality in the futex syscall.
7532 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
7533 (lll_mutex_cond_lock): Likewise.
7535 2003-05-30 Jakub Jelinek <jakub@redhat.com>
7537 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_cond_lock):
7539 (lll_mutex_cond_lock): Define.
7541 2003-05-29 Ulrich Drepper <drepper@redhat.com>
7543 * Makefile (tests): Add tst-signal6.
7544 * tst-signal6.c: New file.
7546 * sysdeps/unix/sysv/linux/s390/lowlevellock.h
7547 (__lll_mutex_unlock_force): New function
7548 (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
7550 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
7551 (__lll_mutex_unlock_force): New function.
7552 (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
7554 * tst-rwlock7.c (do_test): Use correct format specifier.
7556 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue):
7557 Find break parameter in correct asm argument.
7559 2003-05-27 Jakub Jelinek <jakub@redhat.com>
7561 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_clobbers):
7563 (lll_futex_requeue): Fix __o3 constraint, return negative errno if
7565 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
7567 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_REQUEUE,
7568 lll_futex_requeue, lll_mutex_unlock_force): Define.
7570 2003-05-30 Jakub Jelinek <jakub@redhat.com>
7572 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
7573 (pthread_cond_t): Add __mutex.
7574 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_REQUEUE,
7575 lll_futex_requeue, lll_mutex_unlock_force): Define.
7577 2003-05-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
7579 * sysdeps/sh/tcb-offsets.sym: Define MUTEX_FUTEX.
7580 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
7582 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (SYSCALL_WITH_INST_PAD):
7584 (lll_futex_wait, lll_futex_wake): Define.
7585 * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: New file.
7586 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Try using
7587 FUTEX_REQUEUE instead of FUTEX_WAIT.
7588 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
7589 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Remember
7590 mutex which was used in condvar structure. Call
7591 __pthread_mutex_cond_lock instead of __pthread_mutex_lock_internal.
7592 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
7594 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Don't
7595 include tcb-offsets.h. Read wakeup value in locked region.
7596 Use the value of gbr register as THREAD_ID.
7597 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7598 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
7599 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
7601 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Remove futex related
7604 2003-05-28 Ulrich Drepper <drepper@redhat.com>
7606 * sysdeps/pthread/pthread_cond_broadcast.c
7607 (__pthread_cond_broadcast): Fix typo: MAX_INT -> INT_MAX.
7609 2003-05-26 Ulrich Drepper <drepper@redhat.com>
7611 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Fix
7612 typo in register name.
7613 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use parameters
7614 correctly. Actually use requeue. Little optimization.
7615 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Store
7616 mutex address early. Handle cancellation state as 32-bit value.
7617 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7618 Remove unnecessary label.
7620 2003-05-25 Ulrich Drepper <drepper@redhat.com>
7622 * sysdeps/pthread/pthread_cond_broadcast.c: Try using FUTEX_REQUEUE
7623 instead of FUTEX_WAIT.
7624 * sysdeps/pthread/pthread_cond_signal.c: Likewise.
7625 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
7626 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
7627 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
7628 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
7629 * sysdeps/pthread/pthread_cond_timedwait.c: Remember mutex which was
7630 used in condvar structure. Call __pthread_mutex_cond_lock instead
7631 of __pthread_mutex_lock_internal.
7632 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7633 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7634 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
7635 (__condvar_cleanup): Always call __pthread_mutex_cond_lock.
7636 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7637 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7638 * sysdeps/unix/sysv/linux/Makefile (libpthread-sysdep_routines):
7639 Add pthread_mutex_cond_lock.
7640 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add dep_mutex.
7641 * sysdeps/unix/sysv/linux/pthread_cond_mutex_lock.c: New file.
7642 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define
7643 lll_mutex_cond_lock.
7644 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
7645 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
7646 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
7648 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7649 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
7651 * sysdeps/i386/tcb-offsets.sym: Define MUTEX_FUTEX.
7652 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
7654 * pthreadP.h: Declare __pthread_mutex_cond_lock.
7655 * pthread_mutex_lock.c: Define LLL_MUTEX_LOCK if not already defined.
7656 Use it instead of lll_mutex_lock. If __pthread_mutex_lock is a
7657 macro don't define aliases.
7659 * cancellation.c: Remove __pthread_enable_asynccancel_2.
7660 * pthreadP.h: Remove declaration of __pthread_enable_asynccancel_2.
7661 * sysdeps/pthread/pthread_cond_timedwait.c: Use
7662 __pthread_enable_asynccancel instead of __pthread_enable_asynccancel_2.
7663 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7664 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7665 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
7666 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7667 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7669 2003-05-17 Ulrich Drepper <drepper@redhat.com>
7671 * sem_open.c: Fix one endless loop. Implement correct semantics
7672 wrt opening the same semaphore more then once.
7673 * sem_close.c: Adjust for sem_open change.
7674 * semaphoreP.h: Include <semaphore.h>. Define struct inuse_sem.
7675 Declare __sem_mappings, __sem_mappings_lock, __sem_search.
7676 * Makefile (tests): Add tst-sem7.
7677 * tst-sem7.c: New file.
7679 2003-05-16 Roland McGrath <roland@redhat.com>
7681 * sysdeps/unix/sysv/linux/register-atfork.c (libc_freeres_fn): Fix
7682 uninitialized variable braino.
7684 2003-05-16 Ulrich Drepper <drepper@redhat.com>
7686 * sysdeps/unix/sysv/linux/timer_gettime.c (timer_gettime): Correct
7687 test for syscall availability.
7689 * sysdeps/unix/sysv/linux/timer_settime.c (timer_settime): Set
7690 __no_posix_timers to -1 if the syscalls don't exist.
7692 * pthread_join.c (pthread_join): Set tid field of the joined
7693 thread to -1. This isn't necessary but helps to recognize some
7694 error conditions with almost no cost.
7696 * allocatestack.c (FREE_P): Also negative values indicate an
7699 * unwind.c: Include <unistd.h>.
7701 2003-05-14 Ulrich Drepper <drepper@redhat.com>
7703 * Makefile ($(objpfx)$(multidir)): Add rule to create the directory.
7705 2003-05-14 Jakub Jelinek <jakub@redhat.com>
7707 * Makefile (crti-objs, crtn-objs): New variables.
7708 (omit-deps, extra-objs): Add crtn.
7709 ($(objpfx)libpthread.so): Depend on both crti and crtn
7710 and links to them in multidir.
7711 ($(objpfx)crtn.S, $(objpfx)crtn.o): New rules.
7713 2003-05-12 Steven Munroe <sjmunroe@us.ibm.com>
7715 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
7716 (lll_mutex_unlock): Use atomic_exchange_rel.
7718 2003-05-11 Ulrich Drepper <drepper@redhat.com>
7720 * cond-perf.c (cons): Add missing locking around setting of alldone.
7722 2003-05-10 Ulrich Drepper <drepper@redhat.com>
7724 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Remove futex
7726 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
7728 2003-05-09 Ulrich Drepper <drepper@redhat.com>
7730 * tst-sem6.c: New file.
7731 * Makefile (tests): Add tst-sem6.
7733 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (___lll_mutex_unlock):
7734 Use atomic_exchange_rel instead of atomic_exchange.
7735 * sysdeps/unix/sysv/linux/lowlevellock.c (lll_unlock_wake_cb):
7738 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Improve quality of
7739 code for lll_futex_wait and lll_futex_wake in static apps. Use
7740 vsyscall is possible.
7742 * sysdeps/unix/sysv/linux/pthread_getaffinity.c: New file.
7743 * sysdeps/unix/sysv/linux/pthread_setaffinity.c: New file.
7744 * sysdeps/pthread/pthread.h: Declare pthread_getaffinity_np and
7745 pthread_setaffinity_np.
7746 * Versions [libpthread] (GLIBC_2.3.3): Add pthread_getaffinity_np
7747 and pthread_setaffinity_np.
7748 * Makefile (libpthread-routines): Add pthread_getaffinity and
7749 pthread_setaffinity.
7751 * allocatestack.c (allocate_stack): If ARCH_RETRY_MMAP is defined,
7752 use it in case mmap to allocate the stack fails.
7753 * sysdeps/unix/sysv/linux/x86_64/Makefile: Don't define
7754 ARCH_MAP_FLAGS here.
7755 * sysdeps/x86_64/pthreaddef.h: Define ARCH_MAP_FLAGS and
7758 2003-05-08 Ulrich Drepper <drepper@redhat.com>
7760 * sysdeps/unix/sysv/linux/fork.c: Complete rewrite of the atfork
7761 handler implementation. It is now lockless in fork().
7762 * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
7763 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
7764 * sysdeps/unix/sysv/linux/fork.h: Don't include <link.h>. Don't
7765 declare the __fork_*_lists.
7766 (struct fork_handler): Include pointers to all three functions.
7767 Add next, refcntr and need_signal elements.
7768 (__fork_handlers): New declaration.
7769 (__register_atfork_malloc): Remove declaration.
7770 (HAVE_register_atfork_malloc): Remove definition.
7771 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove
7772 __pthread_child_handler variable.
7773 (__libc_pthread_init): Use __register_atfork instead of explicitly
7775 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define lll_futex_wait
7777 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
7779 * unwind.c (unwind_cleanup): Print error message and then abort. This
7780 function must never be reached.
7782 * cond-perf.c: New file.
7784 2003-05-05 Ulrich Drepper <drepper@redhat.com>
7786 * sysdeps/i386/tls.h (TLS_INIT_TP): Include \n in error message.
7788 2003-05-04 Roland McGrath <roland@redhat.com>
7790 * Makefile ($(objpfx)../libc.so): New target.
7792 2003-05-02 Ulrich Drepper <drepper@redhat.com>
7794 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
7795 (pthread_condattr_t): Size is only an int, don't use long for
7797 (pthread_mutexattr_t): Likewise.
7798 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7799 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
7800 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7802 2003-05-01 Ulrich Drepper <drepper@redhat.com>
7804 * sysdeps/i386/tls.h: Define THREAD_ID.
7805 * sysdeps/ia64/tls.h: Likewise.
7806 * sysdeps/powerpc/tls.h: Likewise.
7807 * sysdeps/s390/tls.h: Likewise.
7808 * sysdeps/sh/tls.h: Likewise.
7809 * sysdeps/x86_64/tls.h: Likewise.
7810 * pthread_mutex_lock.c: Use THREAD_ID instead of THREAD_SELF to
7812 * pthread_mutex_timedlock.c: Likewise.
7813 * pthread_mutex_trylock.c: Likewise.
7814 * pthread_mutex_unlock.c: Likewise.
7815 * pthread_rwlock_trywrlock.c: Likewise.
7816 * sysdeps/pthread/pthread_rwlocklock_rdlock.c: Likewise.
7817 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
7818 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
7819 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
7821 * sysdeps/pthread/createthread.c (create_thread): Use CLONE_SYSVSEM
7824 2003-04-29 Jakub Jelinek <jakub@redhat.com>
7826 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
7827 (__SIZEOF_PTHREAD_COND_T): Define to 48.
7828 (pthread_rwlock_t): Add 16 bytes of pad instead of 8 before __flags.
7829 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
7830 Make __align long long instead of long.
7831 (pthread_rwlock_t): Formatting.
7832 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
7833 (pthread_rwlock_t): Formatting.
7834 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
7835 (pthread_cond_t): Make __align long long instead of long.
7836 (pthread_rwlock_t): Move __flags field to the same position as in
7839 2003-04-30 Ulrich Drepper <drepper@redhat.com>
7841 * tst-rwlock6.c (do_test): Use correct printf format specifiers.
7842 * tst-rwlock7.c (do_test): Likewise.
7844 2003-04-26 Roland McGrath <roland@redhat.com>
7846 * Makefile ($(test-modules)): Depend on $(common-objpfx)shlib.lds.
7848 2003-04-22 Jakub Jelinek <jakub@redhat.com>
7850 * allocatestack.c (TLS_TPADJ): Add TLS_PRE_TCB_SIZE instead of
7851 sizeof (struct pthread).
7852 (allocate_stack): Subtract TLS_PRE_TCB_SIZE bytes instead of
7854 * sysdeps/powerpc/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Define
7856 (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Define to alignment of
7858 (TLS_PRE_TCB_SIZE): Increase to cover tcbhead_t preceeded by pad
7860 (INSTALL_DTV, GET_DTV, THREAD_DTV): tcbhead_t is immediately before
7862 (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Don't add TLS_TCB_SIZE
7864 (NO_TLS_OFFSET): Define.
7865 * sysdeps/unix/sysv/linux/powerpc/createthread.c (TLS_VALUE): Don't
7866 add TLS_TCB_SIZE unnecessarily.
7868 2003-04-22 Roland McGrath <roland@redhat.com>
7870 * Makeconfig (shared-thread-library): Reverse link order to work
7873 2003-04-22 Ulrich Drepper <drepper@redhat.com>
7875 * semaphore.h: Fix typo in comment.
7877 2003-04-21 Ulrich Drepper <drepper@redhat.com>
7879 * sysdeps/pthread/sigfillset.c: New file.
7881 * init.c (__pthread_initialize_minimal): Don't block SIGTIMER.
7882 * pthreadP.h: Make SIGTIMER and SIGCANCEL the same.
7883 * sysdeps/pthread/pthread_sigmask.c: Remove handling of SIGTIMER.
7884 * sysdeps/pthread/sigaction.c: Likewise.
7885 * sysdeps/pthread/sigprocmask.c: New file.
7886 * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): Define as
7888 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
7889 Block SIGTIMER. Also handle SI_TKILL events and terminate thread
7892 2003-04-19 Ulrich Drepper <drepper@redhat.com>
7894 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
7895 (DL_SYSINFO_IMPLEMENTATION): Add .eh_frame information.
7897 * sysdeps/unix/sysv/linux/unregister-atfork.c
7898 (__unregister_atfork): Don't free memory not allocated dynamically.
7900 * semaphore.h: Remove __THROW marker from cancellation points.
7901 * nptl/sysdeps/pthread/pthread.h: Likewise.
7903 2003-04-18 Ulrich Drepper <drepper@redhat.com>
7905 * sysdeps/pthread/pthread.h: Don't mark pthread_testcancel,
7906 pthread_cancel, pthread_setcancelstate, and pthread_setcanceltype with
7909 2003-04-16 Jakub Jelinek <jakub@redhat.com>
7911 * tst-cancel4.c (do_test): Use %zd instead of %d when printing cnt.
7913 2003-04-15 Roland McGrath <roland@redhat.com>
7915 * forward.c (__pthread_unwind): Tweak to avoid warning.
7917 2003-04-15 Ulrich Drepper <drepper@redhat.com>
7919 * pthreadP.h: Move THREAD_ATOMIC_* replacements to the top.
7921 2003-04-14 Ulrich Drepper <drepper@redhat.com>
7923 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Don't
7924 overflow CFA advance instructions.
7925 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7927 2003-04-14 Jakub Jelinek <jakub@redhat.com>
7929 * sysdeps/i386/tls.h: Rename LOCK to LOCK_PREFIX.
7930 * sysdeps/i386/pthread_spin_lock.c: Likewise.
7931 * sysdeps/x86_64/tls.h: Likewise. Define LOCK_PREFIX if not already
7934 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Use
7935 DW_CFA_advance_loc2 for .Laddl-.Lsubl.
7936 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
7937 DW_CFA_advance_loc for .Laddl-.Lsubl.
7939 2003-04-13 Ulrich Drepper <drepper@redhat.com>
7941 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Don't use
7942 position-independent unwind data for static libraries.
7943 Add missing unwind info. Add comments.
7945 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Add unwind info.
7946 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7947 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7948 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7950 2003-04-12 Ulrich Drepper <drepper@redhat.com>
7952 * Makefile: Make sure all cancellation points are compiled with
7953 exception and asynchronous unwind tables.
7955 * sysdeps/x86_64/tls.h (THREAD_SETMEM): Word around compiler bug
7956 which mishandles loading of global object addresses in PIC.
7957 (THREAD_SETMEM_NC): Likewise.
7959 2003-04-11 Ulrich Drepper <drepper@redhat.com>
7961 * pthread.h: Define new data structure for cleanup buffer. Declare
7962 new cleanup handler interfaces.
7963 * descr.h: Include <unwind.h> if necessary. Define pthread_unwind_buf.
7964 (struct pthread): Add cleanup_jmp_buf pointer. Define
7965 HAVE_CLEANUP_JMP_BUF and not HAVE_CANCELBUF.
7966 * pthreadP.h: Declare __pthread_unwind. Define __do_cancel to use
7967 it. Declare old cleanup handler installation functions.
7968 * cleanup.c: Rewrite. Install handler for unwind-based cleanup
7970 * cleanup_defer.c: Likewise.
7971 * cleanup_compat.c: New file. Old cleanup code.
7972 * cleanup_def_compat.c: New file. Old cleanup code.
7973 * pthread_create.c (start_thread): Initialize cleanup_jmp_buf element
7974 if own thread descriptor.
7975 * unwind.c: New file.
7976 * forward.c: Add __pthread_unwind.
7977 * init.c (pthread_functions): Add __pthread_unwind.
7978 * sysdeps/pthread/pthread-functions.s (struct pthread_functions):
7979 Add ptr___pthread_unwind.
7980 * Versions [GLIBC_2.3.3] (libpthread): Export new cleanup handling
7981 and unwind function.
7982 * Makefile (libpthread-routines): Add cleanup_compat,
7983 cleanup_def_compat, and unwind. Define CFLAGS to enable unwind
7984 table generation if necessary.
7985 * version.c: Record whether unwind support is compiled in.
7986 * sysdeps/pthread/configure.in: Add checks for unwind unterfaces.
7987 * sysdeps/pthread/bits/libc-lock.h: Add prototypes of the old cleanup
7989 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add quite a bit of
7990 complication to generate unwind information for syscall wrappers.
7991 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
7992 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
7993 __cleanup_fct_attribute.
7995 * Makefile: Add rules to build and run tst-cleanup0.
7996 * tst-cleanup0.c: New file.
7997 * tst-cleanup0.expect: New file.
7999 * pthread_create.c (deallocate_tsd): Don't take parameter. Adjust
8000 caller. Optimize to avoid often unecessary local variable.
8002 2003-04-11 Roland McGrath <roland@redhat.com>
8004 * Makefile ($(objpfx)multidir.mk): New target, generated makefile that
8005 sets variable `multidir'; include that.
8006 (generated): Add it.
8007 ($(objpfx)$(multidir)/crti.o): New target.
8008 [$(multidir) != .] (generated-dirs, extra-objs, omit-deps): Add it.
8010 2003-04-11 Ulrich Drepper <drepper@redhat.com>
8012 * tst-attr2.c (do_test): Add cast to avoid warning.
8013 * tst-mutex4.c (do_test): Likewise.
8015 2003-04-10 Ulrich Drepper <drepper@redhat.com>
8017 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset CPU clocks
8020 2003-04-09 Ulrich Drepper <drepper@redhat.com>
8022 * Makefile (tests): Add tst-detach1.
8023 * tst-detach1.c: New file.
8025 2003-04-08 Ulrich Drepper <drepper@redhat.com>
8027 * sysdeps/pthread/pthread.h: Remove duplicate
8028 pthread_cleanup_{push,pop} definitions.
8030 * tst-barrier2.c: Eliminate warnings.
8031 * tst-cancel4.c: Likewise.
8032 * tst-cond4.c: Likewise.
8033 * tst-cond6.c: Likewise.
8034 * tst-detach1.c: Likewise.
8035 * tst-rwlock4.c: Likewise.
8036 * tst-rwlock6.c: Likewise.
8037 * tst-rwlock7.c: Likewise.
8038 * tst-sem3.c: Likewise.
8039 * tst-spin2.c: Likewise.
8040 * tst-umask1.c: Likewise.
8042 2003-04-07 Ulrich Drepper <drepper@redhat.com>
8044 * pthread_detach.c (pthread_detach): Fix test for invalid TID.
8046 2003-04-06 Ulrich Drepper <drepper@redhat.com>
8048 * descr.h (struct pthread): Move cancelhandling member to the front.
8050 2003-04-05 Ulrich Drepper <drepper@redhat.com>
8052 * sysdeps/unix/sysv/linux/register-atfork.c: Define malloc_prepare,
8053 malloc_parent, and malloc_child statically.
8054 (__register_atfork_malloc): New function.
8055 (free_mem): Don't free any of the malloc_* variables on the list.
8056 * sysdeps/unix/sysv/linux/fork.h: Declare __register_atfork_malloc.
8057 Define HAVE_register_atfork_malloc.
8059 2003-04-04 Ulrich Drepper <drepper@redhat.com>
8061 * sysdeps/pthread/createthread.c (create_thread): Add some more
8062 comments explaining when to set multiple_threads and when not.
8064 * pthreadP.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
8065 THREAD_ATOMIC_BIT_SET if not already defined.
8066 * sysdeps/i386/tls.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
8067 THREAD_ATOMIC_BIT_SET:
8068 * sysdeps/x86_64/tls.h: Likewise.
8069 * cleanup_defer.c (_pthread_cleanup_push_defer): Rewrite to use
8070 THREAD_ATOMIC_CMPXCHG_VAL.
8071 (_pthread_cleanup_pop_restore): Likewise.
8072 * cancellation.c (__pthread_enable_asynccancel): Likewise.
8073 (__pthread_enable_asynccancel_2): Likewise.
8074 (__pthread_disable_asynccancel): Likewise.
8075 * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
8076 (__libc_disable_asynccancel): Likewise.
8077 * init.c (sigcancel_handler): Likewise.
8078 * pthread_setcancelstate.c (__pthread_setcancelstate): Likewise.
8079 * pthread_setcanceltype.c (__pthread_setcanceltype): Likewise.
8081 2003-04-03 Ulrich Drepper <drepper@redhat.com>
8083 * init.c (sigcancel_handler): Don't set EXITING_BIT here.
8084 * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
8085 * pthreadP.h (__do_cancel): Set EXITING_BIT here.
8086 * Makefile (tests): Add tst-cancel11.
8087 * tst-cancel11.c: New file.
8089 2003-04-01 Ulrich Drepper <drepper@redhat.com>
8091 * pthread_create.c (deallocate_tsd): Clear/free memory after the last
8092 round, not the first. Use specific_used flag instead of local
8093 found_nonzero variable. Use THREAD_[SG]ETMEM where possible.
8094 (__free_tcb): Don't call deallocate_tsd here.
8095 (start_thread): Call deallocate_tsd here.
8096 * pthread_setspecific.c: Set specific_used flag really only when
8098 * Makefile (tests): Add tst-tsd3.c and tst-tsd4.
8099 * tst-tsd3.c: New file.
8100 * tst-tsd4.c: New file.
8102 2003-03-31 Ulrich Drepper <drepper@redhat.com>
8104 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_mutex_lock):
8105 Use atomic_exchange_and_add instead of __lll_add.
8106 (__lll_mutex_timedlock): Likewise.
8107 Patch by Ian Wienand.
8109 2003-03-24 Steven Munroe <sjmunroe@us.ibm.com>
8111 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
8112 (SINGLE_THREAD_P): Fix typo.
8113 * tst-cancel-wrappers.sh: Handle '.'ed symbols.
8115 2003-03-31 Ulrich Drepper <drepper@redhat.com>
8117 * Makefile (tests): Add tst-align.
8118 * tst-align.c: New file.
8119 * sysdeps/i386/Makefile: Define CFLAGS-tst-align.
8121 * sysdeps/i386/tls.h (CALL_THREAD_FCT): Align stack of called
8124 * tst-tsd2.c: Add casts to avoid warnings.
8126 2003-03-30 Ulrich Drepper <drepper@redhat.com>
8128 * descr.h (struct pthread): Move most often used elements to the front.
8130 2003-03-29 Ulrich Drepper <drepper@redhat.com>
8132 * Makefile (libpthread-routines): Add pthread_atfork.
8133 (libpthread-static-only-routines): Add pthread_atfork.
8135 2003-03-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
8137 * sysdeps/sh/tls.h: Include nptl/descr.h after the definition
8139 (INSTALL_DTV): Add parens.
8140 (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
8141 Use passed descr instead of THREAD_SELF.
8142 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S
8143 (__lll_mutex_timedlock_wait): Correct expected value after
8145 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S:
8146 Release lock before waking up the waiters.
8147 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Correct exit
8148 criteria. Reorderstruct passed to cleanup handler. Fix
8149 handling of cancellation and failung pthread_mutex_unlock call.
8150 Use __pthread_enable_asynccancel_2 instead of
8151 __pthread_enable_asynccancel.
8152 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
8153 Return result of lock re-get if it fails.
8154 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Fix wrong argument
8155 for __pthread_cleanup_push.
8156 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Fix
8157 completely broken rwlock implementation.
8158 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
8159 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
8160 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
8161 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
8162 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
8163 * sysdeps/unix/sysv/linux/sh/sem_post.S: Fix error value. Use
8164 versioned_symbol macro.
8165 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Use versioned_symbol macro.
8166 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
8168 2003-03-27 Ulrich Drepper <drepper@redhat.com>
8170 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Don't declare
8171 __timer_helper_thread. Declare __start_helper_thread, __helper_once,
8173 (struct timer): Remove th and bar field.
8174 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Remove
8175 debugging code. Create only one helper thread.
8176 * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Don't kill
8178 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
8179 Renamed. Define statically. Use thread info from siginfo.
8180 (__helper_once): New variable.
8181 (__helper_tid): New variable.
8182 (__reset_helper_control): New function.
8183 (__start_helper_thread): New function.
8185 * pthread_create.c (start_thread): Don't use setjmp inside
8186 __builtin_expect to work around gcc bug.
8188 * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Even if
8189 timer_delete syscall fails, but not with ENOSYS, set
8192 * sysdeps/unix/sysv/linux/timer_settime.c [!__ASSUME_POSIX_TIMERS]
8193 (timer_settime): Fix typo.
8194 * sysdeps/unix/sysv/linux/timer_getoverr.c
8195 [!__ASSUME_POSIX_TIMERS] (timer_getoverrun): Likewise.
8197 2003-03-27 Jakub Jelinek <jakub@redhat.com>
8199 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Fix
8200 offset of cleanupbuf.__prev.
8202 2003-03-26 Jakub Jelinek <jakub@redhat.com>
8204 * sysdeps/unix/sysv/linux/timer_getoverr.c: Fix typo in name
8207 2003-03-26 Ulrich Drepper <drepper@redhat.com>
8209 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): If EVP ==
8210 NULL provide default definition to syscall.
8212 2003-03-25 Roland McGrath <roland@redhat.com>
8214 * sysdeps/pthread/posix-timer.h (TIMER_MAX): Define if not defined.
8215 (timer_id2ptr): Fix typo.
8217 2003-03-25 Ulrich Drepper <drepper@redhat.com>
8219 * pthreadP.h: Define SIGCANCEL and SIGTIMER.
8220 * sysdeps/i386/pthreaddef.h: Remove SIGCANCEL definition.
8221 * sysdeps/ia64/pthreaddef.h: Likewise.
8222 * sysdeps/powerpc/pthreaddef.h: Likewise.
8223 * sysdeps/s390/pthreaddef.h: Likewise.
8224 * sysdeps/sh/pthreaddef.h: Likewise.
8225 * sysdeps/x86_64/pthreaddef.h: Likewise.
8226 * init.c (__pthread_initialize_minimal): Block SIGTIMER.
8227 * sysdeps/pthread/sigaction.c: Also prevent SIGTIMER handler from
8229 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
8230 SIGTIMER is not unblocked.
8231 * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): One more
8233 * sysdeps/unix/sysv/linux/pthread_kill.c: Do not allow SIGTIMER to
8235 * sysdeps/pthread/posix-timer.h (timer_id2ptr, timer_ptr2id): Just
8236 pass pointer through as ID.
8237 * sysdeps/unix/sysv/linux/bits/local_lim.h (TIMER_MAX): Removed.
8238 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: New file.
8239 * sysdeps/unix/sysv/linux/timer_create.c: New file.
8240 * sysdeps/unix/sysv/linux/timer_delete.c: New file.
8241 * sysdeps/unix/sysv/linux/timer_getoverr.c: New file.
8242 * sysdeps/unix/sysv/linux/timer_gettime.c: New file.
8243 * sysdeps/unix/sysv/linux/timer_routines.c: New file.
8244 * sysdeps/unix/sysv/linux/timer_settime.c: New file.
8245 * sysdeps/unix/sysv/linux/ia64/Versions: New file.
8246 * sysdeps/unix/sysv/linux/ia64/timer_create.c: New file.
8247 * sysdeps/unix/sysv/linux/ia64/timer_delete.c: New file.
8248 * sysdeps/unix/sysv/linux/ia64/timer_getoverr.c: New file.
8249 * sysdeps/unix/sysv/linux/ia64/timer_gettime.c: New file.
8250 * sysdeps/unix/sysv/linux/ia64/timer_settime.c: New file.
8251 * sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions: New file.
8252 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_create.c: New file.
8253 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_delete.c: New file.
8254 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_getoverr.c: New file.
8255 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_gettime.c: New file.
8256 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_settime.c: New file.
8257 * sysdeps/unix/sysv/linux/s390/s390-64/Versions: New file.
8258 * sysdeps/unix/sysv/linux/s390/s390-64/timer_create.c: New file.
8259 * sysdeps/unix/sysv/linux/s390/s390-64/timer_delete.c: New file.
8260 * sysdeps/unix/sysv/linux/s390/s390-64/timer_getoverr.c: New file.
8261 * sysdeps/unix/sysv/linux/s390/s390-64/timer_gettime.c: New file.
8262 * sysdeps/unix/sysv/linux/s390/s390-64/timer_settime.c: New file.
8263 * sysdeps/unix/sysv/linux/x86_64/Versions: New file.
8264 * sysdeps/unix/sysv/linux/x86_64/compat-timer.h: New file.
8265 * sysdeps/unix/sysv/linux/x86_64/timer_create.c: New file.
8266 * sysdeps/unix/sysv/linux/x86_64/timer_delete.c: New file.
8267 * sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c: New file.
8268 * sysdeps/unix/sysv/linux/x86_64/timer_gettime.c: New file.
8269 * sysdeps/unix/sysv/linux/x86_64/timer_settime.c: New file.
8271 * pthreadP.h: Remove FRAME_LEFT definition.
8272 * cleanup.c (_pthread_cleanup_push): Don't check for reference to
8273 already left frame. Programs which have this problem are not POSIX
8275 * cleanup_defer.c (_pthread_cleanup_push_defer): Likewise.
8277 2003-03-24 Ulrich Drepper <drepper@redhat.com>
8279 * sysdeps/pthread/tst-timer.c: Check return values of the
8282 2003-03-23 Roland McGrath <roland@redhat.com>
8284 * tst-tls3.c (do_test) [! HAVE___THREAD]: Don't test anything.
8285 * tst-tls3mod.c: Likewise.
8286 * tst-tls1.c: Likewise.
8287 * tst-tls2.c: Likewise.
8289 * tst-mutex5.c (do_test): Unlock before destroy, otherwise we invoke
8292 * tst-join5.c (tf1, tf2): Add a cast.
8294 * Makeconfig (includes): Append -I$(..)nptl to this variable.
8296 * tst-barrier2.c (do_test) [! _POSIX_THREAD_PROCESS_SHARED]:
8297 Don't test anything.
8298 * tst-cond4.c: Likewise.
8299 * tst-cond6.c: Likewise.
8300 * tst-flock2.c: Likewise.
8301 * tst-mutex4.c: Likewise.
8302 * tst-rwlock4.c: Likewise.
8303 * tst-signal1.c: Likewise.
8304 * tst-spin2.c: Likewise.
8305 * tst-cond11.c [! _POSIX_CLOCK_SELECTION]: Likewise.
8307 * tst-mutex4.c: Use test-skeleton.c.
8308 * tst-spin2.c: Likewise.
8309 * tst-sysconf.c: Likewise.
8310 * tst-barrier2.c: Likewise.
8311 * tst-cond4.c: Likewise.
8312 * tst-cond6.c: Likewise.
8313 * tst-rwlock4.c: Likewise.
8314 * tst-unload.c: Likewise.
8315 * tst-flock2.c (do_test): Use return instead of exit.
8317 2003-03-22 Jakub Jelinek <jakub@redhat.com>
8319 * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
8321 2003-03-21 Ulrich Drepper <drepper@redhat.com>
8323 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
8324 (__lll_mutex_trylock): Use atomic_compare_and_exchange_val_acq
8325 instead of __lll_compare_and_swap.
8326 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
8328 Removed definition if __lll_compare_and_swap.
8330 * cancellation.c: Adjust for new form of compare&exchange macros.
8331 * cleanup_defer.c: Likewise.
8333 * libc-cancellation.c: Likewise.
8334 * old_pthread_cond_broadcast.c: Likewise.
8335 * old_pthread_cond_signal.c: Likewise.
8336 * old_pthread_cond_timedwait.c: Likewise.
8337 * old_pthread_cond_wait.c: Likewise.
8338 * pthread_cancel.c: Likewise.
8339 * pthread_create.c: Likewise.
8340 * pthread_detach.c: Likewise.
8341 * pthread_join.c: Likewise.
8342 * pthread_key_delete.c: Likewise.
8343 * pthread_setcancelstate.c: Likewise.
8344 * pthread_setcanceltype.c: Likewise.
8345 * pthread_timedjoin.c: Likewise.
8346 * pthread_tryjoin.c: Likewise.
8347 * sysdeps/pthread/createthread.c: Likewise.
8349 2003-03-20 Ulrich Drepper <drepper@redhat.com>
8351 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Include <atomic.h>.
8352 Remove __lll_add, __lll_dec_if_positive, and __lll_test_and_set
8353 definitions. Replace uses with calls to atomic_* functions.
8354 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
8355 * sysdeps/unix/sysv/linux/lowlevellock.c: Replace __lll_add and
8356 __lll_test_and_set calls with atomic_exchange_and_add and
8357 atomic_exchange calls respectively.
8358 * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
8359 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
8360 * sysdeps/unix/sysv/linux/sem_trywait.c: Likewise.
8361 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
8362 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Likewise.
8363 * sysdeps/unix/sysv/linux/ia64/sem_port.c: Likewise.
8364 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
8366 * allocatestack.c (allocate_stack): Assume atomic_exchange_and_add
8367 returns the old value.
8369 2003-03-20 Martin Schwidefsky <sky@mschwid3.boeblingen.de.ibm.com>
8371 * sysdeps/s390/pthread_spin_lock.c (pthread_spin_lock): Use type
8372 int for variable OLDVAL and correct inline assembler contraint.
8373 * sysdeps/s390/pthread_spin_trylock.c (pthread_spin_trylock): Use
8374 type int for variable OLD.
8376 * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it
8378 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
8379 (SINGLE_THREAD_P): Use global variable __local_multiple_threads
8380 instead of multiple_threads field in the TCB.
8382 2003-03-19 Ulrich Drepper <drepper@redhat.com>
8384 * sysdeps/i386/i686/bits/atomic.h: Removed.
8385 * sysdeps/i386/i586/bits/atomic.h: Removed.
8386 * sysdeps/i386/i486/bits/atomic.h: Removed. Moved to glibc.
8387 * sysdeps/x86_64/bits/atomic.h: Removed. Moved to glibc.
8388 * sysdeps/s390/bits/atomic.h: Removed. Moved to glibc.
8389 * sysdeps/sh/bits/atomic.h: Removed. Moved to glibc.
8390 * sysdeps/ia64/bits/atomic.h: Removed. Moved to glibc.
8391 * sysdeps/powerpc/bits/atomic.h: Removed. Moved to glibc.
8392 * atomic.h: Removed. Moved to glibc.
8394 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Add
8395 support for clock selection.
8397 * sysdeps/pthread/pthread_cond_broadcast.c: Release lock before
8400 2003-03-18 Roland McGrath <roland@redhat.com>
8402 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
8403 Add __lll_rel_instr first. Add memory clobber.
8404 (lll_mutex_unlock): Use __lll_test_and_set.
8405 From Paul Mackerras <paulus@samba.org>.
8407 * sysdeps/powerpc/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define
8409 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
8410 (SINGLE_THREAD_P): Add `header.' prefix.
8411 From Paul Mackerras <paulus@samba.org>.
8413 * Versions (libpthread: GLIBC_2.3.2): Move pthread_tryjoin_np and
8414 pthread_timedjoin_np to ...
8415 (libpthread: GLIBC_2.3.3): ... here.
8416 (libpthread: GLIBC_2.2): Move pthread_barrierattr_getpshared there too.
8418 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
8419 Avoid shadowing VAL variable.
8421 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
8424 2003-03-18 Ulrich Drepper <drepper@redhat.com>
8426 * Makefile (tests): Add tst-cond11.
8427 * tst-cond11.c: New file.
8429 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Reorder
8430 struct passed to cleanup handler to eliminate one more
8432 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8434 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
8435 (pthrad_cond_t): Replace __unused field with __clock.
8437 * sysdeps/pthread/pthread_cond_wait.c: Release condvar lock before
8438 waken all waiters in cleanup handler.
8439 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8440 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8442 * pthread_condattr_getclock.c: New file.
8443 * pthread_condattr_setclock.c: New file.
8444 * sysdeps/pthread/pthread.h: Declare these new functions.
8445 * Versions [GLIBC_2.3.3] (libpthread): Add the new functions.
8446 * Makefile (libpthread-routines): Add the new functions.
8447 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_condattr):
8448 Renamed field to value. Document use of the bits.
8449 * pthread_condattr_getpshared.c: Adjust for struct pthread_condattr
8451 * pthread_condattr_setpshared.c: Likewise.
8452 * pthread_cond_init.c (__pthread_cond_init): Initialized __clock field.
8453 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add cond_clock symbol.
8454 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
8456 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8457 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
8458 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
8459 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
8460 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
8461 Implement clock selection.
8462 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
8463 * pthread-errnos.sym: Add ENOSYS.
8464 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
8465 _POSIX_CLOCK_SELECTION.
8466 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
8468 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Remove
8469 invalid .size directive.
8471 2003-03-17 Roland McGrath <roland@redhat.com>
8473 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
8476 2003-03-17 Ulrich Drepper <drepper@redhat.com>
8478 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Use __builtin_expect.
8479 Use __lll_add instead of spelling it out. Use protected symbol names.
8480 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Use __builtin_expect.
8482 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_compare_and_swap):
8483 Renamed from lll_compare_and_swap. Use new name where necessary.
8484 (__lll_add): Defined.
8485 (__lll_dec_if_positive): Defined.
8486 (__lll_test_and_set): Defined.
8487 * sysdeps/ia64/pthread_spin_init.c: Removed.
8488 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Removed.
8489 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Removed.
8490 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Removed.
8491 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Removed.
8492 * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: Removed.
8493 * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: Removed.
8494 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Removed.
8495 * sysdeps/ia64/bits/atomic.h: Add __builtin_expect where appropriate.
8496 * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
8497 __sync_lock_release_si.
8498 Patch by Jakub Jelinek.
8500 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
8501 Fix timeout handling.
8502 (__lll_timedwait_tid): Likewise.
8503 (lll_unlock_wake_cb): Wake up other waiters if necessary.
8504 Patch by Jakub Jelinek.
8506 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Pretty printing.
8508 2003-03-17 Roland McGrath <roland@redhat.com>
8510 PowerPC port contributed by Paul Mackerras <paulus@samba.org>.
8511 * sysdeps/pthread/pthread_spin_init.c: New file.
8512 * sysdeps/pthread/pthread_spin_unlock.c: New file.
8513 * sysdeps/powerpc/Makefile: New file.
8514 * sysdeps/powerpc/pthread_spin_lock.c: New file.
8515 * sysdeps/powerpc/pthread_spin_trylock.c: New file.
8516 * sysdeps/powerpc/pthreaddef.h: New file.
8517 * sysdeps/powerpc/tcb-offsets.sym: New file.
8518 * sysdeps/powerpc/td_ta_map_lwp2thr.c: New file.
8519 * sysdeps/powerpc/tls.h: New file.
8520 * sysdeps/powerpc/bits/atomic.h: New file.
8521 * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: New file.
8522 * sysdeps/unix/sysv/linux/libc-lowlevellock.c: New file.
8523 * sysdeps/unix/sysv/linux/lowlevellock.c: New file.
8525 * sysdeps/unix/sysv/linux/lowlevelmutex.c: New file.
8526 * sysdeps/unix/sysv/linux/sem_post.c: New file.
8527 * sysdeps/unix/sysv/linux/sem_timedwait.c: New file.
8528 * sysdeps/unix/sysv/linux/sem_trywait.c: New file.
8529 * sysdeps/unix/sysv/linux/sem_wait.c: New file.
8530 * sysdeps/unix/sysv/linux/powerpc/Makefile: New file.
8531 * sysdeps/unix/sysv/linux/powerpc/createthread.c: New file.
8532 * sysdeps/unix/sysv/linux/powerpc/fork.c: New file.
8533 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: New file.
8534 * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: New file.
8535 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: New file.
8536 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: New file.
8537 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: New file.
8538 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
8539 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New file.
8541 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Use __gettimeofday,
8543 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Likewise.
8544 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
8545 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Likewise.
8546 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Likewise.
8547 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
8549 2003-03-17 Ulrich Drepper <drepper@redhat.com>
8551 * sysdeps/pthread/pthread_cond_wait.c: Correct exit criteria.
8552 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
8553 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8554 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8555 Patch by Ewald Snel <ewald@rambo.its.tudelft.nl>.
8557 2003-03-16 Roland McGrath <roland@redhat.com>
8559 * tst-fork4.c: Include <string.h>.
8560 * tst-signal2.c: Likewise.
8561 * tst-mutex5.c (do_test): exit -> return.
8562 * tst-mutex2.c: Include <stdlib.h>.
8564 2003-03-16 Ulrich Drepper <drepper@redhat.com>
8566 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
8567 (__lll_mutex_timedlock_wait): Correct expected value after
8568 spurious wakeup. Otherwise we would never wait again.
8570 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Work around red
8571 zone versus inline asm stupidity. Use correct instructions.
8573 * tst-rwlock6.c: Add some more status output.
8575 2003-03-15 Roland McGrath <roland@redhat.com>
8577 * sysdeps/pthread/configure.in: New file.
8578 * sysdeps/pthread/configure: New file (generated).
8580 2003-03-15 Ulrich Drepper <drepper@redhat.com>
8582 * allocatestack.c (allocate_stack): Store the exact stack size of
8583 user allocated stacks.
8585 2003-03-15 Jakub Jelinek <jakub@redhat.com>
8587 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
8588 (SINGLE_THREAD): Use `header' prefix instead of `header.data'.
8589 * sysdeps/sh/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
8590 * sysdeps/sh/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define.
8591 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
8592 Use `header.' prefix.
8593 * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
8595 2003-03-15 Ulrich Drepper <drepper@redhat.com>
8597 * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Don't use
8598 __builtin_frame_address, use stack pointer.
8600 * sysdeps/unix/sysv/linux/jmp-unwind.c: Use CURRENT_STACK_FRAME
8601 instead of __builtin_frame_pointer.
8603 2003-03-14 Ulrich Drepper <drepper@redhat.com>
8605 * tst-basic1.c (do_test): Add cast to avoid warning.
8606 * tst-basic2.c (do_test): Likewise.
8608 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use correct
8609 amount of stack correction.
8611 * tst-fork4.c: Use test-skeleton.c.
8613 2003-03-14 Roland McGrath <roland@redhat.com>
8615 * init.c: Fix typo "#eli" for "#else".
8617 2003-03-14 Steven Munroe <sjmunroe@us.ibm.com>
8619 * allocatestack.c (__stack_user): Use hidden_data_def.
8620 * pthread_create.c (__pthread_keys): Likewise.
8622 * init.c [__powerpc__] (__NR_set_tid_address): Define it.
8624 2003-03-14 Roland McGrath <roland@redhat.com>
8626 * tst-fork4.c: New file.
8627 * Makefile (tests): Add it.
8629 * descr.h (struct pthread): Move the union out of [!TLS_DTV_AT_TP], so
8630 we always define the padding space.
8631 [!TLS_DTV_AT_TP]: Give tcbhead_t field a name, `header', since GCC
8632 stopped supporting its own extensions fully.
8633 [TLS_MULTIPLE_THREADS_IN_TCB]: Put `multiple_threads' inside a wrapper
8634 struct also called `header', so `header.multiple_threads' is the field
8635 name to use on all machines.
8636 * allocatestack.c (allocate_stack): Use `header.' prefix.
8637 * sysdeps/pthread/createthread.c (create_thread): Likewise.
8638 * pthread_create.c (__pthread_create_2_1): Likewise.
8639 * sysdeps/i386/tls.h (INSTALL_NEW_DTV, THREAD_DTV): Likewise.
8640 (THREAD_SELF): Likewise.
8641 * sysdeps/x86_64/tls.h: Likewise.
8642 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
8643 (SINGLE_THREAD_P): Likewise.
8644 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
8645 (SINGLE_THREAD_P): Likewise.
8646 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
8647 (SINGLE_THREAD_P): Likewise.
8649 * sysdeps/s390/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Use REGS[18]
8652 2003-03-14 Ulrich Drepper <drepper@redhat.com>
8654 * pthread_create.c (start_thread): Use CALL_THREAD_FCT if defined.
8655 * sysdeps/i386/tls.h: Define CALL_THREAD_FCT.
8657 * pthread_create.c (start_thread): setjmp is expected to return 0.
8659 * sysdeps/x86_64/tls.h (THREAD_GETMEM): Mark asms volatile.
8660 (THREAD_GETMEM_NC): Likewise.
8662 2003-03-13 Ulrich Drepper <drepper@redhat.com>
8664 * allocatestack.c (allocate_stack): If MULTI_PAGE_ALIASING is defined
8665 and the size of the stack which must be allocated is a multiple,
8666 allocate one more page.
8667 * sysdeps/i386/i686/Makefile: Don't define COLORING_INCREMENT, but
8668 MULTI_PAGE_ALIASING.
8670 2003-03-13 Roland McGrath <roland@redhat.com>
8672 * pthread_create.c (start_thread): Set EXITING_BIT after the
8673 event-reporting (and destructors), not before.
8675 2003-03-13 Jakub Jelinek <jakub@redhat.com>
8677 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_timed_wait,
8678 lll_futex_wake): Declare register variables as long int instead of
8679 unsigned long int. Patch by Ian Wienand <ianw@gelato.unsw.edu.au>.
8680 Make syscall arguments clobbered by the syscall.
8681 (lll_futex_wait): Define using lll_futex_timed_wait.
8683 * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Cast regs[13]
8686 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Only declare and set
8689 * allocatestack.c (nptl_ncreated): Only declare if
8690 COLORING_INCREMENT != 0.
8692 * pthreadP.h (__pthread_enable_asynccancel_2): New prototype.
8693 (__libc_enable_asynccancel_2): Remove prototype.
8695 * sysdeps/unix/sysv/linux/ia64/fork.c (ARCH_FORK): Swap ptid and
8696 ctid to match kernel.
8698 2003-03-12 Ulrich Drepper <drepper@redhat.com>
8700 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add
8701 libc_multiple_threads.
8702 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Move definition of
8703 __libc_multiple_threads to...
8704 * sysdeps/unix/sysv/linux/libc_multiple_threads.c: ...here. New file.
8706 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Remove unnecessary
8708 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
8709 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
8711 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
8712 (__pthread_once_internal): Define.
8714 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Use shlib-compat.h
8715 macros instead of .symver directly.
8716 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
8717 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
8719 * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Include tcb-offsets.h.
8720 * sysdeps/x86_64/tcb-offsets.sym: New file.
8721 * sysdeps/x86_64/Makefile: New file.
8723 * sysdeps/i386/tcb-offsets.sym: Add SELF.
8724 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use SELF
8725 to access own pthread_t in TCB.
8726 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8728 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8730 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8732 2003-03-12 Roland McGrath <roland@redhat.com>
8734 * pthread-errnos.sym: New file.
8735 * Makefile (gen-as-const-headers): New variable, list that file.
8736 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include generated
8737 header <pthread-errnos.h> instead of defining errno values here.
8738 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
8739 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
8740 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
8741 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8742 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8744 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8746 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
8747 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8748 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
8749 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
8750 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
8751 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
8752 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
8753 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
8754 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8755 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
8756 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
8757 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
8758 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
8759 * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
8760 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
8761 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
8762 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
8763 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
8764 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
8765 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
8766 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
8767 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
8768 * sysdeps/i386/i486/pthread_spin_trylock.S: Likewise.
8769 * sysdeps/x86_64/pthread_spin_trylock.S: Likewise.
8770 * sysdeps/sh/pthread_spin_trylock.S: Likewise.
8771 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
8772 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
8774 * sysdeps/unix/sysv/linux/fork.c: Add an assert to check that
8775 CLONE_CHILD_SETTID worked.
8777 2003-03-12 Ulrich Drepper <drepper@redhat.com>
8779 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: New
8781 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S: New
8784 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
8785 (pthread_cond_t): Add padding.
8787 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: New file.
8788 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: New file.
8789 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: New file.
8791 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
8792 (__pthread_rwlock_timedwrlock): Add missing opcode suffix.
8793 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
8794 (__pthread_rwlock_timedrdlock): Likewise.
8795 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
8796 (__pthread_rwlock_wrlock): Likewise.
8797 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
8798 (__pthread_rwlock_rdlock): Likewise.
8800 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: New file.
8802 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Return
8803 result of lock re-get if it fails.
8805 2003-03-11 Ulrich Drepper <drepper@redhat.com>
8807 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Fix asm syntax.
8808 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
8809 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
8810 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
8811 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8812 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
8813 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
8814 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
8815 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
8816 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
8818 * sysdeps/x86_64/tls.h (THREAD_SELF, THREAD_GETMEM, THREAD_GETMEM_NC,
8819 THREAD_SETMEM, THREAD_SETMEM_NC): Correct asm syntax.
8821 * allocatestack.c [! TLS_MULTIPLE_THREADS_IN_TCB] (allocate_stack):
8822 Initialize *__libc_multiple_threads_ptr not __libc_multiple_threads.
8823 * sysdeps/pthread/createthread.c [! TLS_MULTIPLE_THREADS_IN_TCB]
8824 (create_thread): Likewise.
8825 Define __pthread_multiple_threads and __libc_multiple_threads_ptr.
8826 * init.c (__pthread_initialize_minimal_internal): Initialize
8827 __libc_multiple_threads_ptr if necessary.
8828 * pthreadP.h: Adjust prototype for __libc_pthread_init. Declare
8829 __pthread_multiple_threads and __libc_multiple_threads_ptr.
8830 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Define
8831 __libc_multiple_threads.
8832 (__libc_pthread_init): Return pointer to __libc_pthread_init if
8835 * sysdeps/i386/tls.h (THREAD_SETMEM): Fix one-byte variant.
8836 (THREAD_SETMEM_NC): Likewise.
8838 * sysdeps/x86_64/pthread_spin_trylock.c: Removed.
8839 * sysdeps/x86_64/pthread_spin_trylock.S: New file.
8840 * sysdeps/x86_64/pthread_spin_unlock.c: Removed.
8841 * sysdeps/x86_64/pthread_spin_unlock.S: New file.
8843 * sysdeps/i386/i486/pthread_spin_trylock.S (pthread_spin_trylock):
8844 Eliminate one entire instruction.
8846 * cancellation.c (__pthread_enable_asynccancel_2): New function.
8847 * pthreadP.h: Declare __pthread_enable_asynccancel_2.
8848 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
8849 (__pthread_cond_timedwait): Use __pthread_enable_asynccancel_2
8850 instead of __pthread_enable_asynccancel.
8851 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
8852 (__pthread_cond_wait): Likewise.
8853 * sysdeps/pthread/pthread_cond_timedwait.c
8854 (__pthread_cond_timedwait): Likewise.
8855 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
8857 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
8858 (__condvar_cleanup): Wake up all waiters in case we got signaled
8859 after being woken up but before disabling asynchronous
8861 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
8862 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
8863 (__condvar_cleanup): Likewise.
8865 * init.c (__NR_set_tid_address): If already defined, don't redefine.
8866 Make it an error if architecture has no #if case. Add x86-64.
8868 * sysdeps/unix/sysv/linux/x86_64/Makefile: Add flags for
8869 pt-initfini.s generation.
8871 * sysdeps/x86_64/tls.h: Include <asm/prctl.h>.
8872 (TLS_INIT_TP): Fix typo.
8874 2003-03-11 Jakub Jelinek <jakub@redhat.com>
8876 * sysdeps/ia64/bits/atomic.h (atomic_exchange_and_add): Swap 2nd and
8877 3rd argument of __arch_compare_and_exchange_{32,64}_val_acq.
8879 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Include semaphore.h.
8880 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
8881 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Likewise.
8882 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Likewise.
8883 * sysdeps/unix/sysv/linux/s390/sem_post.c: Likewise.
8884 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
8885 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
8886 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
8888 2003-03-11 Ulrich Drepper <drepper@redhat.com>
8890 * sysdeps/pthread/pthread_cond_timedwait.c
8891 (__pthread_cond_timedwait): Return the result of the final
8892 locking. If it succeeds, the regular function return value.
8894 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait):
8895 Return result of the final locking.
8896 * version.c (__nptl_main): Work around problems with the strange
8897 INTERNAL_SYSCALL macro on ppc32.
8898 * init.c (__pthread_initialize_minimal_internal): Unblock
8899 SIGCANCEL in case the parent blocked it.
8900 Reported by Paul Mackerras <paulus@samba.org>.
8902 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: New file.
8903 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: New file.
8904 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: New file.
8906 2003-03-11 Jakub Jelinek <jakub@redhat.com>
8908 * sysdeps/pthread/pthread_cond_timedwait.c
8909 (__pthread_cond_timedwait): Unlock and fail if
8910 __pthread_mutex_unlock_internal failed.
8912 * sysdeps/pthread/createthread.c (ARCH_CLONE): Define if not defined.
8913 (create_thread): Only assert PD->tcb != NULL under [TLS_TCB_AT_TP].
8915 * allocatestack.c (ALLOCATE_STACK_PARMS): New macro.
8916 [NEED_SEPARATE_REGISTER_STACK] (STACK_VARIABLES,
8917 STACK_VARIABLES_ARGS, STACK_VARIABLES_PARMS, ALLOCATE_STACK_PARMS,
8918 ALLOCATE_STACK): New macros.
8919 (TLS_TPADJ): New macro.
8920 (get_cached_stack, queue_stack, __deallocate_stack): Use TLS_TPADJ.
8921 (allocate_stack): Handle TLS_DTV_AT_TP and
8922 NEED_SEPARATE_REGISTER_STACK. Use TLS_TPADJ.
8923 * pthread_create.c (__pthread_create_2_1) [! TLS_TCB_AT_TP]:
8925 * init.c [__ia64__] (__NR_set_tid_address): Define.
8927 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: New file.
8928 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: New file.
8929 * sysdeps/unix/sysv/linux/ia64/fork.c: New file.
8930 * sysdeps/unix/sysv/linux/ia64/createthread.c: New file.
8931 * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: New file.
8932 * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: New file.
8933 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: New file.
8934 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: New file.
8935 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: New file.
8936 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
8937 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: New file.
8938 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: New file.
8939 * sysdeps/unix/sysv/linux/ia64/sem_post.c: New file.
8940 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: New file.
8941 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: New file.
8942 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: New file.
8943 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
8944 * sysdeps/ia64/bits/atomic.h: New file.
8945 * sysdeps/ia64/Makefile: New file.
8946 * sysdeps/ia64/pthread_spin_init.c: New file.
8947 * sysdeps/ia64/pthread_spin_lock.c: New file.
8948 * sysdeps/ia64/pthread_spin_trylock.c: New file.
8949 * sysdeps/ia64/pthread_spin_unlock.c: New file.
8950 * sysdeps/ia64/pthreaddef.h: New file.
8951 * sysdeps/ia64/tcb-offsets.sym: New file.
8952 * sysdeps/ia64/td_ta_map_lwp2thr.c: New file.
8953 * sysdeps/ia64/tls.h: New file.
8955 * sysdeps/s390/pthreaddef.h (__exit_thread_inline): Pass 1 argument
8956 to syscall instead of no arguments.
8958 2003-03-10 Ulrich Drepper <drepper@redhat.com>
8960 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: New file.
8961 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: New file.
8962 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: New file.
8963 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: New file.
8965 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Fix error value in
8968 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: New file
8970 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
8971 lowlevelbarrier.sym.
8972 * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: New file.
8973 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S:
8974 Include lowlevelbarrier.h and don't define offsets locally.
8975 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Likewise.
8977 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
8978 (__lll_mutex_lock_wait): Reverse order of first two parameters.
8979 (__lll_mutex_timedlock_wait): Likewise.
8980 (lll_mutex_lock): Adjust asm for that.
8981 (lll_mutex_timedlock): Likewise. Mark cx, cc, r10 as clobbered.
8982 (lll_lock): Adjust asm for operand order change.
8983 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: New file.
8984 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: New file.
8986 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_lock_wait):
8987 Reverse order of parameters.
8988 (__lll_timedwait_tid): Remove regparms attribute.
8989 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: New file.
8990 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: New file.
8992 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
8993 (__lll_timedwait_tid): Remove one unnecessary instruction.
8995 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Define
8996 __lll_mutex_timedlock_wait only for NOT_IN_libc.
8997 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Include
9000 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
9001 lll_unlock_wake_cb, __lll_wait_tid, and __lll_timedwait_tid only
9003 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Include
9006 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Don't define
9007 LOCK is already defined. Don't define __lll_mutex_timedlock_wait
9009 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Only
9010 define LOCK here (if UP is not defined). The actual code is in
9013 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Don't define
9014 LOCK is already defined. Don't define lll_unlock_wake_cb and
9015 __lll_timedwait_tid for libc.so.
9016 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Only
9017 define LOCK here (if UP is not defined). The actual code is in
9020 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Not needed anymore.
9021 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: Likewise.
9022 * sysdeps/unix/sysv/linux/s390/sem_post.c: Include lowlevellock.h
9023 instead of lowlevelsem.h.
9024 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
9025 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
9026 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
9028 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
9030 * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: New file.
9031 * sysdeps/unix/sysv/linux/i386/lowlevelrwlock.h: Removed.
9032 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: Removed.
9034 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_trylock): Fix
9036 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_trylock): Undo
9039 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: New file.
9041 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove declaration
9042 of __libc_locking_needed.
9043 (lll_trylock): Initialize %eax to zero.
9045 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Update
9046 pthread_cond_t definition.
9048 2003-03-10 Roland McGrath <roland@redhat.com>
9050 * sysdeps/unix/sysv/linux/lowlevelcond.sym: New file.
9051 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add it.
9052 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: File removed.
9053 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: Likewise.
9054 * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: Likewise.
9056 * allocatestack.c (allocate_stack) [!TLS_MULTIPLE_THREADS_IN_TCB]:
9057 Instead of setting PD->multiple_threads, set globals
9058 __pthread_multiple_threads and __libc_multiple_threads.
9059 * sysdeps/pthread/createthread.c (create_thread): Likewise.
9060 * sysdeps/i386/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it.
9061 * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Likewise.
9063 * descr.h (struct pthread): Conditionalize first member on
9064 [!TLS_DTV_AT_TP]. Replace the `header' member with an anonymous union
9065 containing an anonymous tcbhead_t. Move `list' member out.
9066 [TLS_MULTIPLE_THREADS_IN_TCB]: Define a `multiple_threads' member.
9067 * allocatestack.c: Remove use of `header.data.' prefix.
9068 * pthread_create.c: Likewise.
9069 * init.c (__pthread_initialize_minimal_internal): Likewise.
9070 * sysdeps/pthread/createthread.c (create_thread): Likewise.
9071 * sysdeps/i386/tls.h (INSTALL_DTV): Add parens.
9072 (THREAD_SELF, THREAD_DTV, INSTALL_NEW_DTV): No `header.data.' prefix.
9073 * sysdeps/x86_64/tls.h: Likewise.
9074 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
9075 (SINGLE_THREAD_P): Likewise.
9076 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
9077 (SINGLE_THREAD_P): Likewise.
9078 * sysdeps/i386/tls.h (tcbhead_t): Remove `list' member.
9079 * sysdeps/s390/tls.h (tcbhead_t): Likewise.
9081 2003-03-09 Ulrich Drepper <drepper@redhat.com>
9083 * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: New file.
9085 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
9086 * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
9088 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix many
9089 leftovers from the ia32 code.
9091 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Remove unneccessary
9093 (clear_once_control): Don't load %esi.
9095 * sysdeps/x86_64/tls.h: Remove all traces of segment descriptor
9098 * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
9100 * sysdeps/unix/sysv/linux/s390/createthread.c: Moved to...
9101 * sysdeps/unix/sysv/linux/createthread.c: ...here.
9103 * Makefile (tests): Add tst-cond10.
9104 * tst-cond10.c: New file.
9106 2003-03-08 Ulrich Drepper <drepper@redhat.com>
9108 * tst-tls2.c (do_test): Add TEMP_FAILURE_RETRY around sem_wait call.
9109 * tst-signal3.c (do_test): Likewise.
9110 * tst-sem5.c (do_test): Likewise.
9111 * tst-kill6.c (do_test): Likewise.
9112 * tst-tls3.c (do_test): Likewise. Include <errno.h>.
9114 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use add/sub instead
9116 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
9117 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise
9118 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
9119 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
9120 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
9121 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
9122 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
9124 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
9126 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
9127 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
9128 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9129 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
9130 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
9131 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
9132 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
9133 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
9135 * allocatestack.c (allocate_stack): If mprotect() fails free the
9138 2003-03-07 Ulrich Drepper <drepper@redhat.com>
9140 * sysdeps/i386/i486/bits/atomic.h: Fix a few unused definitions.
9142 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove all trace of
9143 lll_wake_tid. This was used only to work around kernel limits in
9145 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
9146 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Likewise.
9147 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
9148 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
9150 * init.c (__static_tls_align_m1): Renamed from __static_tls_align.
9151 (__pthread_initialize_minimal_internal): Change initialization of
9152 __static_tls_align_m1 appropriately.
9153 * pthreadP.h (__static_tls_align_m1): Renamed from
9155 * allocatestack.c (allocate_stack): Use __static_tls_align_m1
9156 instead of __static_tls_align-1.
9158 2003-03-04 Ulrich Drepper <drepper@redhat.com>
9160 * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
9162 * pthread_create.c: Define __pthread_keys using nocommon
9163 attribute, not by placing it explicitly in bss.
9164 Remove DEFINE_DEALLOC definition. Not needed anymore.
9166 * allocatestack.c: Define ARCH_MAP_FLAGS if not already defined.
9167 Use it in mmap call to allocate stacks.
9169 * sysdeps/pthread/createthread.c (create_thread): Fix comment.
9171 * pthread_create.c (start_thread): Use THREAD_SETMEM to store
9172 result of the thread function.
9174 2003-03-03 Ulrich Drepper <drepper@redhat.com>
9176 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: Removed. The generic
9177 version is just fine.
9179 * sysdeps/unix/sysv/linux/libc_pthread_init.c
9180 (__pthread_child_handler): Renamed from pthread_child_handler,
9181 exported, and marked hidden. Change all users.
9182 * sysdeps/unix/sysv/linux/register-atfork.c (free_mem): Do not
9183 free __pthread_child_handler from child list.
9185 2003-03-03 Martin Schwidefsky <schwidefsky@de.ibm.com>
9187 * atomic.h (atomic_exchange_and_add): Return newval, not oldval.
9189 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
9190 Fix handling of cancellation and failing pthread_mutex_unlock call.
9191 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
9192 (__pthread_cond_wait): Likewise.
9194 * sysdeps/pthread/pthread_rwlock_timedrdlock.c
9195 (pthread_rwlock_timedrdlock): Fix clobber of result variable by
9196 lll_futex_timed_wait call.
9197 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
9198 (pthread_rwlock_timedwrlock): Likewise.
9200 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
9201 Don't define lll_unlock_wake_cb and ___lll_timedwait_tid in libc.so.
9202 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Remove XXX comments.
9204 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Fix
9205 check of lll_futex_wake return value.
9207 2003-03-03 Roland McGrath <roland@redhat.com>
9209 * forward.c: Fix typo in __pthread_attr_init_2_0 compat_symbol decl.
9211 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
9212 Argument to ptr___pthread_cleanup_upto is __jmp_buf, not jmp_buf.
9213 * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
9215 2003-03-02 Ulrich Drepper <drepper@redhat.com>
9217 * sysdeps/pthread/timer_create.c (timer_create): Return correct
9218 error for CPU clocks.
9220 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
9221 _POSIX_MONOTONIC_CLOCK.
9222 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
9224 * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
9227 2003-03-01 Ulrich Drepper <drepper@redhat.com>
9229 * descr.h (struct pthread): Move cleanup field to the front.
9231 2003-03-01 Roland McGrath <roland@redhat.com>
9233 * sem_open.c (sem_open): Braino fix.
9235 2003-03-01 Ulrich Drepper <drepper@redhat.com>
9237 * sysdeps/i386/tcb-offsets.sym: Add CLEANUP and CLEANUP_PREV.
9238 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Inline
9239 __pthread_cleanup_pop functionality.
9240 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9242 * descr.h (struct pthread): Move tid field to the front now that
9245 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S
9246 (__lll_mutex_timedlock_wait): Remove.
9247 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
9248 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
9249 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
9250 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
9251 (lll_unlock_wake_cb): Don't save and restore %esi.
9252 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
9254 (__lll_timedwait_tid): Add alignment.
9255 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
9256 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
9258 (__lll_timedwait_tid): Removed.
9259 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
9260 (__pthread_cond_broadcast): Don't save, load, and restore %esi.
9261 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
9262 (pthread_barrier_wait): Don't save, load, and restore %esi for
9264 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
9265 (__pthread_cond_signal): Don't save, load, and restore %esi.
9266 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
9267 (__pthread_rwlock_unlock): Don't save, load, and restore %esi.
9268 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
9269 Don't save, load, and restore %esi.
9271 2003-02-27 Ulrich Drepper <drepper@redhat.com>
9273 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
9274 Release lock before waking up the waiters.
9276 * tst-exit1.c (do_test): Don't start more than one thread in parallel.
9278 * tst-rwlock9.c (writer_thread): Correct adding TIMEOUT.
9279 (reader_thread): Likewise.
9281 * sysdeps/pthread/pthread_rwlock_unlock.c
9282 (__pthread_rwlock_unlock): Release internal lock early. Don't try
9283 to wake up readers if there are none.
9285 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
9286 Release internal lock before wake threads.
9288 2003-02-26 Ulrich Drepper <drepper@redhat.com>
9290 * Makefile (tests): Add tst-rwlock10 and tst-rwlock11.
9291 * tst-rwlock8.c: Initialize lock with INIT. Allow INIT to be
9293 * tst-rwlock9.c: Likewise.
9294 * tst-rwlock10.c: New file.
9295 * tst-rwlock11.c: New file.
9297 * Makefile (tests): Add tst-dlsym1.
9298 * tst-dlsym1.c: New file.
9300 * init.c (__pthread_initialize_minimal_internal): Set
9301 GL(dl_error_catch_tsd) to __libc_dl_error_tsd.
9302 * Versions (libc:GLIBC_PRIVATE): Export __libc_dl_error_tsd.
9304 2003-02-24 Ulrich Drepper <drepper@redhat.com>
9306 * sem_open.c (sem_open): Fix handling of O_CREAT without O_EXCL.
9308 * tst-cond2.c: Fix sychronization with child.
9310 * tst-rwlock8.c (reader_thread): Remove unused variable.
9312 * Makefile: Add rules to build and run tst-tls3.
9313 * tst-tls3.c: New file.
9314 * tst-tls3mod.c: New file.
9316 * Makefile (tests): Add tst-rwlock8 and tst-rwlock9.
9317 * tst-rwlock8.c: New file.
9318 * tst-rwlock9.c: New file.
9319 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Fix
9320 complete broken rwlock implementation.
9321 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
9323 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
9325 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
9326 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
9327 * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
9328 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
9329 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
9330 * sysdeps/pthread/pthread_rwlock_unlock.c: Likewise.
9331 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
9333 2003-02-23 Roland McGrath <roland@redhat.com>
9335 * Makefile (nptl-version): Change regexp so case sensitivity is ok.
9337 2003-02-23 Ulrich Drepper <drepper@redhat.com>
9339 * Makefile (tests): Add tst-context1.
9340 * tst-context1.c: New file.
9342 * Makefile (tests): Add tst-tls1 and tst-tls2.
9343 * tst-tls1.c: New file.
9344 * tst-tls2.c: New file.
9346 * libc-cancellation.c (__libc_enable_asynccancel): Correct test
9349 * pthread_create.c (start_thread): Set EXITING_BIT early.
9351 * sysdeps/i386/tls.h (THREAD_GETMEM): Mark asm as volatile.
9352 (THREAD_GETMEM_NC): Likewise.
9354 2003-02-22 Ulrich Drepper <drepper@redhat.com>
9356 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Shave
9357 off 3 more bytes by using offset-less instructions when possible.
9359 * Makefile: Add dependency for $(objpfx)version.d.
9361 * eintr.c (eintr_source): Add unnecessary return but the compiler
9364 * tst-kill3.c: Include <unistd.h>.
9366 2003-02-21 Roland McGrath <roland@redhat.com>
9368 * pthread_create.c (start_thread): Call __libc_thread_freeres.
9370 2003-02-21 Ulrich Drepper <drepper@redhat.com>
9372 * Makefile (tests): Add tst-eintr1.
9373 (distribute): Add eintr.c.
9374 * tst-eintr1.c: New file.
9375 * eintr.c: New file.
9377 * pthread_cancel.c (pthread_cancel): Use tkill directly.
9379 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill):
9380 Disallow sending SIGCANCEL.
9382 * Makefile (tests): Remove tst-basic7. Add tst-kill1, tst-kill2,
9383 tst-kill3, tst-kill4, tst-kill5, tst-kill6.
9384 * tst-kill1.c: New file.
9385 * tst-kill2.c: New file.
9386 * tst-kill3.c: New file.
9387 * tst-kill5.c: New file.
9388 * tst-kill6.c: New file.
9389 * tst-basic7.c: Renamed to...
9390 * tst-kill4.c: ...this.
9392 2003-02-21 Roland McGrath <roland@redhat.com>
9394 * Makefile (install-lib-ldscripts): New variable.
9396 2003-02-21 Ulrich Drepper <drepper@redhat.com>
9398 * pthreadP.h: Define INVALID_TD_P and INVALID_NOT_TERMINATED_TD_P.
9399 * pthread_cancel.c: Use INVALID_TD_P.
9400 * pthread_detach.c: Likewise.
9401 * pthread_getschedparam.c: Likewise.
9402 * pthread_setschedparam.c: Likewise.
9403 * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
9404 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
9405 * pthread_join.c: Use INVALID_NOT_TERMINATED_TD_P.
9406 * pthread_timedjoin.c: Likewise.
9408 * tst-basic7.c: Include <signal.h>.
9410 * pthread_join.c (pthread_join): Limited checking for invalid
9412 * pthread_timedjoin.c (pthread_timedjoin_np): Likewise.
9414 2003-02-20 Ulrich Drepper <drepper@redhat.com>
9416 * pthread_create.c (deallocate_tsd): Reset found_nonzero at the
9417 beginning of the loop. Clear the entire first block of TSD.
9418 * Makefile (tests): Add tst-key4.
9419 * tst-key4.c: New file.
9421 2003-02-18 Ulrich Drepper <drepper@redhat.com>
9423 * Makefile (tests): Add tst-basic7.
9424 * tst-basic7.c: New file.
9426 * pthread_create.c (deallocate_tsd): Mark as internal_function.
9427 Add some more __builtin_expect.
9429 * pthreadP.h: Define dummy version of DEBUGGING_P.
9431 2003-02-17 Ulrich Drepper <drepper@redhat.com>
9433 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remnove
9434 _POSIX_THREAD_PRIORITY_SCHEDULING.
9435 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
9436 _XOPEN_REALTIME_THREADS.
9437 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
9439 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): The
9440 kernel returns EINVAL for PID <= 0, work around it.
9442 * Makefile (tests): Add tst-signal5.
9443 * tst-signal5.c: New file.
9445 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
9448 * tst-cancel1.c (tf): Block all signals.
9450 * Makefile (tests): Add tst-basic6.
9451 * tst-basic6.c: New file.
9453 * tst-basic1.c: Add test for process ID.
9455 * Makefile (tests): Add tst-cancel10.
9456 * tst-cancel10.c: New file.
9458 * Makefile (tests): Add tst-signal4.
9459 * tst-signal4.c: New file.
9461 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use
9462 __sigismember instead of sigismember. Add __builtin_expect.
9464 2003-02-16 Ulrich Drepper <drepper@redhat.com>
9466 * tst-attr1.c (do_test): Add tests for pthread_setcanceltype,
9467 pthread_setcancelstate, and pthread_rwlock_setpshared.
9469 * tst-cancel7.c (do_test): Make sure the pid file exists before
9470 canceling the thread.
9472 * tst-rwlock6.c: More pthread_rwlock_timedwrlock and
9473 pthread_rwlock_timedrdlock tests.
9474 * tst-rwlock7.c: More pthread_rwlock_timedwrlock tests.
9475 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
9476 Check for invalid tv_nsec field.
9477 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
9480 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Protect
9481 recursive mutex of overflow.
9483 * tst-attr1.c (do_test): Add test for pthread_mutexattr_setpshared.
9485 * libc-cancellation.c (__libc_enable_asynccancel): Rewrite to avoid
9486 going into an endless loop.
9487 * Makefile (tests): Add tst-cancel9.
9488 * tst-cancel9.c: New file.
9490 * pthread_cancel.c (pthread_cancel): Use the result of __pthread_kill.
9492 2003-02-15 Ulrich Drepper <drepper@redhat.com>
9494 * tst-mutex5.c (do_test): Add more timedlock tests.
9496 * tst-mutex2.c: Tests of trylock and unlock with ERROR mutexes.
9497 * tst-mutex3.c (do_test): Add tests for trylock with RECURSIVE mutexes.
9499 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
9500 use INLINE_SYSCALL. Error number is returned, not -1.
9502 * pthreadP.h: Mark declarations of __find_in_stack_list, __free_tcb,
9503 and __deallocate_stack with internal_function.
9504 * pthread_create.c: Adjust definitions appropriately.
9505 * allocatestack.c: Likewise.
9507 * pthread_join.c: Add one more __builtin_expect.
9508 * pthread_timedjoin.c: Likewise.
9510 * pthread_getspecific.c (__pthread_getspecific): Clear data->data
9511 not data of sequence number does not match.
9512 Add one __builtin_expect.
9514 * Makefile (tests): Add tst-clock1.
9515 * tst-clock1.c: New file.
9517 * pthread_setconcurrency.c (pthread_setconcurrency): Fail for
9519 * Makefile (tests): Add tst-basic5.
9520 * tst-basic5.c: New file.
9522 2003-02-14 Ulrich Drepper <drepper@redhat.com>
9524 * Makefile (tests): Add tst-basic4.
9525 * tst-basic4.c: New file.
9527 * pthreadP.h: Add declaraction for __nptl_nthreads.
9528 * pthread_create.c: Define __nptl_nthreads
9529 (start_thread): Increment __nptl_nthreads at beginning. Decrement
9530 after thread is done. If then zero, call exit(0).
9531 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
9532 Add ptr_nthreads. Define HAVE_PTR_NTHREADS.
9533 * init.c (pthread_functions): Initialize ptr_nthreads.
9534 * allocatestack.c (nptl_nthreads): Remove definition and all uses.
9535 (__reclaim_stacks): Decrement __nptl_nthreads.
9536 * sysdeps/pthread/Makefile [$(subdir)==csu] (CFLAGS-libc-start.c):
9538 * Makefile (tests): Add tst-basic3.
9539 * tst-basic3.c: New file.
9541 * descr.h: Define CANCELING_BIT and CANCELING_BITMASK. Introduce
9542 after CANCELTYPE_BIT, move the other bits up. Update CANCEL_RESTMASK.
9543 * init.c (sigcancel_handler): Also set CANCELING_BITMASK bit in newval.
9544 * pthread_cancel.c (pthread_cancel): Likewise. Also set CANCELING_BIT
9545 if asynchronous canceling is enabled.
9546 * pthread_join.c (pthread_join): When recognizing circular joins,
9547 take into account the other thread might be already canceled.
9548 * Makefile (tests): Add tst-join5.
9549 * tst-join5.c: New file.
9551 * Makefile (tests): Add tst-join4.
9552 * tst-join4.c: New file.
9554 2003-02-13 Ulrich Drepper <drepper@redhat.com>
9556 * tst-cond4.c (main): Add test of pthread_attr_getpshared.
9558 2003-02-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
9560 * sysdeps/s390/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM,
9561 THREAD_SETMEM_NC): Use passed descr instead of THREAD_SELF.
9562 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind): Avoid
9564 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Include <sys/time.h>
9566 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Return
9567 error if lll_futex_wake failed.
9569 2003-02-13 Ulrich Drepper <drepper@redhat.com>
9571 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Fix
9572 handling of cancellation and failung pthread_mutex_unlock call.
9573 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9574 * Makefile (tests): Add tst-cond8 and tst-cond9.
9575 * tst-cond8.c: New file.
9576 * tst-cond9.c: New file.
9578 * tst-cond7.c (do_test): Unlock the mutex before canceling the thread.
9580 * sysdeps/pthread/pthread.h: Add missing initializers. Protect
9581 non-standard initializers with __USE_GNU.
9583 * Makefile (tests): Add tst-cleanup3.
9584 * tst-cleanup3.c: New file.
9586 2003-02-12 Ulrich Drepper <drepper@redhat.com>
9588 * Makefile (tests): Add tst-attr1 and tst-attr2.
9589 * tst-attr1.c: New file.
9590 * tst-attr2.c: New file.
9592 * Makefile: Add rules to build and run tst-atfork2 test.
9593 * tst-atfork2.c: New file.
9594 * tst-atfork2mod.c: New file.
9596 * sysdeps/unix/sysv/linux/unregister-atfork.c
9597 (__unregister_atfork): Free the memory allocated for the handlers
9598 after removing them from the lists.
9600 * sysdeps/unix/sysv/linux/register-atfork.c: Define memeory
9603 * tst-atfork1.c (do_test): Wait for the child we forked.
9604 Report error in child.
9606 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Fix comment.
9608 * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
9610 2003-02-10 Ulrich Drepper <drepper@redhat.com>
9612 * Makefile (tests): Add tst-cancel8.
9613 * tst-cancel8.c: New file.
9615 * sysdeps/unix/sysv/linux/i386/pthread_once.S (clear_once_control): Fix
9616 clearing of control variable.
9617 * Makefile (tests): Add tst-once3 and tst-once4.
9618 * tst-once3.c: New file.
9619 * tst-once4.c: New file.
9621 2003-02-08 kaz Kojima <kkojima@rr.iij4u.or.jp>
9623 * sysdeps/sh/Makefile: New file.
9624 * sysdeps/sh/bits/atomic.h: New file.
9625 * sysdeps/sh/pthread_spin_init.c: New file.
9626 * sysdeps/sh/pthread_spin_lock.c: New file.
9627 * sysdeps/sh/pthread_spin_trylock.S: New file.
9628 * sysdeps/sh/pthread_spin_unlock.S: New file.
9629 * sysdeps/sh/pthreaddef.h: New file.
9630 * sysdeps/sh/tcb-offsets.sym: New file.
9631 * sysdeps/sh/td_ta_map_lwp2thr.c: New file.
9632 * sysdeps/sh/tls.h: New file.
9633 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: New file.
9634 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: New file.
9635 * sysdeps/unix/sysv/linux/sh/createthread.c: New file.
9636 * sysdeps/unix/sysv/linux/sh/fork.c: New file.
9637 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: New file.
9638 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: New file.
9639 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h: New file.
9640 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: New file.
9641 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: New file.
9642 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: New file.
9643 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: New file.
9644 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: New file.
9645 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
9646 * sysdeps/unix/sysv/linux/sh/pt-vfork.S: New file.
9647 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: New file.
9648 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: New file.
9649 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: New file.
9650 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: New file.
9651 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: New file.
9652 * sysdeps/unix/sysv/linux/sh/pthread_once.S: New file.
9653 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: New file.
9654 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: New file.
9655 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: New file.
9656 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: New file.
9657 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: New file.
9658 * sysdeps/unix/sysv/linux/sh/sem_post.S: New file.
9659 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: New file.
9660 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: New file.
9661 * sysdeps/unix/sysv/linux/sh/sem_wait.S: New file.
9662 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
9664 2003-02-08 Ulrich Drepper <drepper@redhat.com>
9666 * tst-cond2.c: Rearrange code to not rely on behavior undefined
9669 * tst-basic2.c (do_test): Lock mutex before creating the thread.
9671 2003-02-07 Ulrich Drepper <drepper@redhat.com>
9673 * sysdeps/x86_64/tls.h: Remove unnecessary macros, left over from x86.
9674 (TLS_GET_FS): New #define.
9675 (TLS_SET_FS): New #define.
9676 Correct value of __NR_set_thread_area.
9678 * sysdeps/x86_64/td_ta_map_lwp2thr.c: New file.
9680 2003-02-06 Ulrich Drepper <drepper@redhat.com>
9682 * Makefile (tests): Add tst-popen1.
9683 * tst-popen1.c: New file.
9685 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Remove wrong
9686 but inactive generalization.
9687 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9688 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
9689 Minor optimization, remove one instruction.
9690 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
9692 2003-02-04 Martin Schwidefsky <schwidefsky@de.ibm.com>
9694 * sysdeps/unix/sysv/linux/s390/fork.c: Correct order of parameters.
9696 2003-01-31 Martin Schwidefsky <schwidefsky@de.ibm.com>
9698 * init.c (__NR_set_tid_address): Add #ifdef for s390.
9699 * sysdeps/pthread/pthread_barrier_wait.c: New file.
9700 * sysdeps/pthread/pthread_cond_broadcast.c: New file.
9701 * sysdeps/pthread/pthread_cond_signal.c: New file.
9702 * sysdeps/pthread/pthread_cond_timedwait.c: New file.
9703 * sysdeps/pthread/pthread_cond_wait.c: New file.
9704 * sysdeps/pthread/pthread_rwlock_rdlock.c: New file.
9705 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: New file.
9706 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: New file.
9707 * sysdeps/pthread/pthread_rwlock_unlock.c: New file.
9708 * sysdeps/pthread/pthread_rwlock_wrlock.c: New file.
9709 * sysdeps/s390/Makefile: New file.
9710 * sysdeps/s390/bits/atomic.h: New file.
9711 * sysdeps/s390/pthread_spin_init.c: New file.
9712 * sysdeps/s390/pthread_spin_lock.c: New file.
9713 * sysdeps/s390/pthread_spin_trylock.c: New file.
9714 * sysdeps/s390/pthread_spin_unlock.c: New file.
9715 * sysdeps/s390/pthreaddef.h: New file.
9716 * sysdeps/s390/tcb-offsets.sym: New file.
9717 * sysdeps/s390/td_ta_map_lwp2thr.c: New file.
9718 * sysdeps/s390/tls.h: New file.
9719 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: New file.
9720 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: New file.
9721 * sysdeps/unix/sysv/linux/s390/createthread.c: New file.
9722 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: New file.
9723 * sysdeps/unix/sysv/linux/s390/fork.c: New file.
9724 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: New file.
9725 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
9726 * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: New file.
9727 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: New file.
9728 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: New file.
9729 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: New file.
9730 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: New file.
9731 * sysdeps/unix/sysv/linux/s390/pthread_once.c: New file.
9732 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: New file.
9733 * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: New file.
9734 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
9735 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
9736 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: New file.
9737 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
9738 * sysdeps/unix/sysv/linux/s390/sem_post.c: New file.
9739 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: New file.
9740 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
9741 * sysdeps/unix/sysv/linux/s390/sem_wait.c: New file.
9743 2003-02-04 Ulrich Drepper <drepper@redhat.com>
9745 * atomic.h: Add a couple more default implementations.
9746 (atomic_compare_and_exchange_acq): Use
9747 __arch_compare_and_exchange_32_acq in return value definition. It
9749 (atomic_bit_set): Renamed from atomic_set_bit.
9750 Add missing atomic_ prefixes.
9752 * sysdeps/pthread/bits/libc-lock.h (__libc_once): In case no
9753 thread library is available, use correct value to mark initialized
9756 2003-02-03 Ulrich Drepper <drepper@redhat.com>
9758 * allocatestack.c (allocate_stack): Use __getpagesize instead of
9759 __sysconf to determine pagesize.
9761 * pthread_create.c: Include <atomic.h>.
9762 * allocatestack.c (allocate_stack): Implement coloring of the
9763 allocated stack memory. Rename pagesize to pagesize_m1. It's the
9764 size minus one. Adjust users.
9765 * sysdeps/i386/i686/Makefile: New file.
9767 2003-02-02 Ulrich Drepper <drepper@redhat.com>
9769 * allocatestack.c: Improve comment throughout the file.
9771 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
9772 (__lll_lock_wait): Add branch prediction.
9773 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
9774 (__lll_lock_wait): Likewise.
9775 (lll_unlock_wake_cb): Removed.
9777 2003-01-31 Ulrich Drepper <drepper@redhat.com>
9779 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Remove
9780 _POSIX_THREAD_PRIORITY_SCHEDULING.
9782 2003-01-30 Jakub Jelinek <jakub@redhat.com>
9784 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
9785 Fix return type of ptr___pthread_getspecific.
9787 2003-01-29 Ulrich Drepper <drepper@redhat.com>
9789 * Makefile (tests): Add tst-umask1.
9790 (tst-umask1-ARGS): Define.
9791 * tst-umask1.c: New file.
9793 2003-01-28 Ulrich Drepper <drepper@redhat.com>
9795 * Makefile (libpthread-routines): Remove lowlevelrwlock. Add
9796 pthread_rwlock_rdlock, pthread_rwlock_timedrdlock,
9797 pthread_rwlock_wrlock, pthread_rwlock_timedwrlock, and
9798 pthread_rwlock_unlock.
9799 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Removed
9800 * sysdeps/unix/sysv/linux/i386/i586/lowlevelrwlock.S: Removed
9801 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Removed
9802 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: New file.
9803 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
9805 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: New file.
9806 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
9808 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: New file.
9809 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_rdlock.S: New file.
9810 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedrdlock.S:
9812 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_wrlock.S: New file.
9813 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedwrlock.S:
9815 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_unlock.S: New file.
9816 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_rdlock.S: New file.
9817 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedrdlock.S:
9819 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_wrlock.S: New file.
9820 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedwrlock.S:
9822 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_unlock.S: New file.
9824 * Makefile (libpthread-routines): Remove lowlevelcond and
9825 lowlevelsem. Add sem_wait, sem_trywait, sem_timedwait, sem_post,
9826 pthread_cond_wait, pthread_cond_timedwait, pthread_cond_signal,
9827 and pthread_cond_broadcast.
9828 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Removed
9829 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Removed
9830 * sysdeps/unix/sysv/linux/i386/i586/lowlevelsem.S: Removed
9831 * sysdeps/unix/sysv/linux/i386/i586/lowlevelcond.S: Removed
9832 * sysdeps/unix/sysv/linux/i386/i686/lowlevelsem.S: Removed
9833 * sysdeps/unix/sysv/linux/i386/i686/lowlevelcond.S: Removed
9834 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: New file.
9835 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: New file.
9836 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: New file.
9837 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: New file.
9838 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: New file.
9839 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: New file.
9840 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: New file.
9841 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: New file.
9842 * sysdeps/unix/sysv/linux/i386/i586/sem_wait.S: New file.
9843 * sysdeps/unix/sysv/linux/i386/i586/sem_trywait.S: New file.
9844 * sysdeps/unix/sysv/linux/i386/i586/sem_timedwait.S: New file.
9845 * sysdeps/unix/sysv/linux/i386/i586/sem_post.S: New file.
9846 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_wait.S: New file.
9847 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_timedwait.S: New file.
9848 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_signal.S: New file.
9849 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_broadcast.S: New file.
9850 * sysdeps/unix/sysv/linux/i386/i686/sem_wait.S: New file.
9851 * sysdeps/unix/sysv/linux/i386/i686/sem_trywait.S: New file.
9852 * sysdeps/unix/sysv/linux/i386/i686/sem_timedwait.S: New file.
9853 * sysdeps/unix/sysv/linux/i386/i686/sem_post.S: New file.
9854 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_wait.S: New file.
9855 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S: New file.
9856 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_signal.S: New file.
9857 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_broadcast.S: New file.
9858 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: New file.
9860 * sysdeps/unix/sysv/linux/i386/createthread.c: Define
9861 PREPARE_CREATE and TLS_VALUE with x86-specific bits. All the rest
9862 of the code is moved to ...
9863 * sysdeps/pthread/createthread.c: ...here. New file.
9865 2003-01-27 Ulrich Drepper <drepper@redhat.com>
9867 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S
9868 (__new_sem_post): Clear %eax before returning.
9869 Reported by MAEDA Naoaki <maeda.naoaki@jp.fujitsu.com>.
9871 * Makefile (tests): Add tst-cleanup2.
9872 * tst-cleanup2.c: New file.
9874 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
9875 Interpret first parameter correctly.
9877 2003-01-17 Ulrich Drepper <drepper@redhat.com>
9879 * Makefile (headers): Add bits/semaphore.h.
9881 2003-01-16 Jakub Jelinek <jakub@redhat.com>
9883 * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize _head->sysinfo even
9886 2003-01-14 Ulrich Drepper <drepper@redhat.com>
9888 * sem_open.c (sem_open): Return SEM_FAILED if existing semaphore
9889 must be used and mapping failed.
9890 Reported by Luke Elliott <luke.elliott@activfinancial.com>.
9892 * Makefile (CFLAGS-pthread_self.os): Define this, not
9893 CFLAGS-pthread_self.c.
9895 2003-01-13 Ulrich Drepper <drepper@redhat.com>
9897 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Don't export
9900 * Makefile (libpthread-routines): Add version. Add rules to build
9901 version.os and banner.h.
9902 * version.c: New file.
9904 2003-01-13 Jakub Jelinek <jakub@redhat.com>
9906 * pthread_mutex_lock.c (__pthread_mutex_lock_internal): Make
9907 the alias unconditional.
9908 * pthread_mutex_unlock.c (__pthread_mutex_unlock_internal): Likewise.
9910 2003-01-13 Ulrich Drepper <drepper@redhat.com>
9912 * Makefile (CFLAGS-pthread_self.c): New definition.
9914 2003-01-06 Jakub Jelinek <jakub@redhat.com>
9916 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Add
9917 INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
9918 * sysdeps/unix/sysv/linux/raise.c (raise): Likewise.
9919 * init.c (__pthread_initialize_minimal_internal): Likewise.
9921 2003-01-07 Jakub Jelinek <jakub@redhat.com>
9923 * pthreadP.h (__pthread_cond_timedwait): Add prototype.
9925 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
9926 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
9927 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
9928 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
9929 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
9930 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
9932 2003-01-06 Jakub Jelinek <jakub@redhat.com>
9934 * pthreadP.h (LIBC_CANCEL_HANDLED): Define.
9935 * pt-system.c (LIBC_CANCEL_HANDLED): Add.
9936 * tst-cancel-wrappers.sh: Remove all exceptions.
9938 2003-01-05 Ulrich Drepper <drepper@redhat.com>
9940 * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
9941 features. Reported by Marijn Ros <marijn@mad.scientist.com>.
9943 * sysdeps/unix/sysv/linux/jmp-unwind.c: Include <pthread-functions.h>.
9944 Use __libc_pthread_functions array if SHARED.
9946 * pthreadP.h: Move pthread_cond_2_0_t definition to...
9947 * sysdeps/unix/sysv/linux/internaltypes.h: ...here.
9949 * sysdeps/pthread/bits/libc-lock.h (__libc_ptf_call): New #define.
9950 (__libc_rwlock_rdlock, __libc_rwlock_wrlock, __libc_rwlock_unlock,
9951 __libc_key_create, __libc_getspecific, __libc_setspecific): Use
9952 __libc_ptf_call instead of __libc_maybe_call.
9954 (__libc_cleanup_region_start): Wrap function name with PTF call.
9955 (__libc_cleanup_region_end): Likewise.
9956 (__libc_cleanup_end): Likewise.
9958 * pthread_getspecific.c: Add __pthread_getspecific_internal alias.
9959 * pthread_setspecific.c: Add __pthread_setspecific_internal alias.
9960 * pthread_key_create.c: Add __pthread_key_create_internal alias.
9961 * pthreadP.h: Add prototypes.
9963 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Add
9964 __pthread_rwlock_rdlock, __pthread_rwlock_wrlock, and
9965 __pthread_rwlock_unlock aliases.
9966 * pthreadP.h: Add prototypes for new aliases.
9968 * pthreadP.h (struct pthead_functions): Moved to...
9969 * sysdeps/pthread/pthread-functions.h: ...here. New file.
9970 * init.c (pthread_functions): Add initializers for new elements.
9972 * cleanup_defer.c: Add __pthread_cleanup_push_defer and
9973 __pthread_cleanup_pop_restore aliases.
9974 * pthreadP.h: Add prototypes.
9976 * cleanup.c: Rename _GI_pthread_cleanup_push to __pthread_cleanup_push
9977 and _GI_pthread_cleanup_pop to __pthread_cleanup_pop.
9978 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Adjust caller.
9979 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
9980 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
9981 * pthreadP.h: Adjust prototypes and callers.
9983 2003-01-04 Ulrich Drepper <drepper@redhat.com>
9985 * Makefile (tests): Add tst-cancel7.
9986 (tst-cancel7-ARGS): New variable.
9987 * tst-cancel7.c: New file.
9989 * old_pthread_cond_broadcast.c: Optimize initialization a bit to work
9990 around gcc defficiencies.
9991 * old_pthread_cond_signal.c: Likewise.
9992 * old_pthread_cond_timedwait.c: Likewise.
9993 * old_pthread_cond_wait.c: Likewise.
9995 * pthreadP.h (pthread_cond_2_0_t): Remove unneeded lock element.
9997 2003-01-03 Ulrich Drepper <drepper@redhat.com>
9999 * Makefile (tests): Add tst-cond7.
10000 * tst-cond7.c: New file.
10002 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
10003 (condvar_cleanup): Get condvar address from the right place.
10005 * atomic.h: Correct definitions of atomic_full_barrier,
10006 atomic_read_barrier, atomic_write_barrier.
10008 * old_pthread_cond_broadcast.c: Make memory allocate and initialization
10010 * old_pthread_cond_signal.c: Likewise.
10011 * old_pthread_cond_timedwait.c: Likewise.
10012 * old_pthread_cond_wait.c: Likewise.
10014 2003-01-03 Jakub Jelinek <jakub@redhat.com>
10016 * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
10018 2003-01-03 Ulrich Drepper <drepper@redhat.com>
10020 * pthreadP.h (pthread_cond_2_0_t): New type.
10021 (struct pthread_functions): Use new type for 2.0 condvar callbacks.
10022 Use new type for the 2.0 condvar function prototypes.
10023 * forward.c: Use pthread_cond_2_0_t for 2.0 condvar functions.
10024 * old_pthread_cond_init.c: Use pthread_cond_2_0_t for condvar
10026 * old_pthread_cond_destroy.c: Likewise.
10027 * old_pthread_cond_broadcast.c: Likewise. Lock appropriately.
10028 * old_pthread_cond_signal.c: Likewise.
10029 * old_pthread_cond_timedwait.c: Likewise.
10030 * old_pthread_cond_wait.c: Likewise.
10032 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
10033 (__pthread_cond_wait): Don't save cancellation mode and seq value
10036 * herrno.c (__h_errno_location): Don't define as weak.
10038 2003-01-02 Jakub Jelinek <jakub@redhat.com>
10040 * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
10041 pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
10042 and pthread_cond_wait.
10043 * old_pthread_cond_broadcast.c (__old_pthread_cond_broadcast):
10045 (__pthread_cond_broadcast_2_0): ... this.
10046 * old_pthread_cond_destroy.c (__old_pthread_cond_destroy):
10048 (__pthread_cond_destroy_2_0): ... this.
10049 * old_pthread_cond_init.c (__old_pthread_cond_init):
10051 (__pthread_cond_init_2_0): ... this.
10052 * old_pthread_cond_signal.c (__old_pthread_cond_signal):
10054 (__pthread_cond_signal_2_0): ... this.
10055 * old_pthread_cond_wait.c (__old_pthread_cond_wait):
10057 (__pthread_cond_wait_2_0): ... this.
10058 * pthread_cond_destroy.c: Include shlib-compat.h.
10059 (pthread_cond_destroy): Change strong_alias into versioned_symbol.
10060 * pthread_cond_init.c: Include shlib-compat.h.
10061 (pthread_cond_init): Change strong_alias into versioned_symbol.
10062 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_cond_*
10063 fields to ptr___pthread_cond_* and add ptr___pthread_cond_*_2_0
10065 (__pthread_cond_broadcast_2_0, __pthread_cond_destroy_2_0,
10066 __pthread_cond_init_2_0, __pthread_cond_signal_2_0,
10067 __pthread_cond_wait_2_0): New prototypes.
10068 (__old_pthread_cond_broadcast, __old_pthread_cond_destroy,
10069 __old_pthread_cond_init, __old_pthread_cond_signal,
10070 __old_pthread_cond_wait): Removed.
10071 * init.c: Include shlib-compat.h.
10072 (pthread_functions): Guard ptr___pthread_attr_init_2_0
10073 initialization with SHLIB_COMPAT (GLIBC_2_0, GLIBC_2_1).
10074 Rename ptr_pthread_cond_* to ptr___pthread_cond_*, initialize
10075 ptr___pthread_cond_*_2_0 fields.
10076 * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
10077 pthread_cond_*@GLIBC_2.0 compatibility symbols.
10079 * sysdeps/pthread/sigaction.c (SIGCANCEL): Only define if
10080 LIBC_SIGACTION was not yet defined.
10081 [!defined LIBC_SIGACTION]: Define LIBC_SIGACTION, #include self.
10082 [!defined LIBC_SIGACTION] (__sigaction): New function and
10084 [!defined LIBC_SIGACTION] (sigaction): New weak_alias.
10085 [defined LIBC_SIGACTION]: #include_next <sigaction.c>.
10087 2003-01-02 Jakub Jelinek <jakub@redhat.com>
10089 * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
10091 2003-01-02 Ulrich Drepper <drepper@redhat.com>
10093 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
10094 New, larger type definition.
10095 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: New condvar
10097 * Versions [libpthread]: Add definitions for new pthread_cond_*
10098 interfaces for version GLIBC_2.3.2.
10099 * pthread_cond_init.c: Update initialization for new type definition.
10100 * Makefile (libpthread-routines): Remove pthread_cond_wait,
10101 pthread_cond_timedwait, pthread_cond_signal, and
10102 pthread_cond_broadcast. Add old_pthread_cond_init,
10103 old_pthread_cond_destroy, old_pthread_cond_wait,
10104 old_pthread_cond_timedwait, old_pthread_cond_signal, and
10105 old_pthread_cond_broadcast.
10106 * old_pthread_cond_broadcast.c: New file.
10107 * old_pthread_cond_destroy.c: New file.
10108 * old_pthread_cond_init.c: New file.
10109 * old_pthread_cond_signal.c: New file.
10110 * old_pthread_cond_timedwait.c: New file.
10111 * old_pthread_cond_wait.c: New file.
10112 * pthreadP.h: Add prototypes for the compatibility interfaces.
10114 * pthread_cond_destroy.c: Don't include <errno.h>.
10116 2003-01-01 Ulrich Drepper <drepper@redhat.com>
10118 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Avoid
10119 unnecessary zero offset when addressing MUTEX.
10121 2002-12-31 Ulrich Drepper <drepper@redhat.com>
10123 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
10125 * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
10126 for __register_atfork.
10128 2002-12-31 Jakub Jelinek <jakub@redhat.com>
10130 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use __ASSEMBLER__
10131 instead of ASSEMBLER test macro.
10133 * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
10134 __libc_current_sigrtmax): Add libc_hidden_def.
10136 * sysdeps/pthread/list.h: Remove assert.h include.
10138 2002-12-31 Ulrich Drepper <drepper@redhat.com>
10140 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Use
10141 __pthread_initialize_minimal_internal not
10142 __pthread_initialize_minimal.
10144 2002-12-30 Ulrich Drepper <drepper@redhat.com>
10146 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Mark
10147 __pthread_initialize_minimal as hidden.
10149 * init.c (__pthread_initialize_minimal_internal): Don't mark as
10152 2002-12-31 Jakub Jelinek <jakub@redhat.com>
10154 * Makefile ($(inst_libdir)/libpthread.so): Depend on
10155 $(common-objpfx)format.lds, include that into the output script.
10157 (extra-B-pthread.so): Change linuxthreads/ into nptl/.
10159 2002-12-28 Andreas Jaeger <aj@suse.de>
10161 * sysdeps/unix/sysv/linux/xstatconv.c (xstat_conv): Adjust for
10162 nsec resolution changes.
10163 (xstat64_conv): Likewise.
10164 (xstat32_conv): Likewise.
10165 * sysdeps/unix/sysv/linux/kernel_stat.h: Add nsec resolution for
10166 struct kernel_stat.
10167 * sysdeps/unix/sysv/linux/bits/stat.h: Add nsec resolution for
10168 structs stat and stat64.
10169 * time/time.h (__timespec_defined): Define for __USE_MISC.
10170 * io/sys/stat.h [__USE_MISC]: Define __need_timespec for struct stat.
10172 2002-12-30 Jakub Jelinek <jakub@redhat.com>
10174 * forward.c (FORWARD2): Renamed from FORWARD3. Remove unused export
10176 (pthread_attr_init_2_0, pthread_attr_init_2_1): Use FORWARD macro.
10177 (pthread_exit): Use strong_alias to avoid warnings.
10178 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_exit
10179 and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
10180 ptr___pthread_attr_init_2_*.
10181 * init.c (pthread_functions): Adjust.
10183 2002-12-29 Ulrich Drepper <drepper@redhat.com>
10185 * forward.c: Make all functions available by default again. It
10186 caused too much trouble.
10188 * pt-siglongjmp.c: Removed.
10190 2002-12-28 Jakub Jelinek <jakub@redhat.com>
10192 * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
10193 (SYSINFO_OFFSET, MULTIPLE_THREADS_OFFSET): Remove.
10194 * sysdeps/i386/Makefile: New file.
10195 * sysdeps/i386/tcb-offsets.sym: New file.
10196 * sysdeps/pthread/tcb-offsets.h: New file.
10197 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
10198 Remove MULTIPLE_THREADS_OFFSET and SYSINFO_OFFSET checks.
10200 * sysdeps/unix/sysv/linux/Versions [libc] (GLIBC_PRIVATE): Move
10201 __register_atfork...
10202 (GLIBC_2.3.2): ...here.
10204 2002-12-28 Ulrich Drepper <drepper@redhat.com>
10206 * sysdeps/pthread/pthread.h: Mark pthread_attr_getstackaddr and
10207 pthread_attr_setstackaddr with __attribute_deprecated__.
10209 2002-12-27 Jakub Jelinek <jakub@redhat.com>
10211 * pt-system.c (system): Remove cancellation handling.
10212 * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
10213 cancellation routines.
10215 2002-12-28 Ulrich Drepper <drepper@redhat.com>
10217 * descr.h: Include <dl-sysdep.h>.
10218 (struct pthread): Move header.data.list to the back of the struct.
10219 * sysdeps/i386/tls.h (tcbhead_t): Move list to the back of the struct.
10220 (MULTIPLE_THREADS_OFFSET): Adjust offset.
10221 (SYSINFO_OFFSEET): Likewise.
10223 2002-12-27 Jakub Jelinek <jakub@redhat.com>
10225 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h (USE_DL_SYSINFO):
10227 (DL_SYSINFO_DEFAULT): Cast to uintptr_t to avoid warnings.
10228 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h (NEED_DL_SYSINFO,
10229 DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION): Define.
10230 (USE_DL_SYSINFO): Undef.
10232 2002-12-22 Jakub Jelinek <jakub@redhat.com>
10234 * Makefile (tests-reverse): Use $(objpfx)../libc.so instead of
10235 $(common-objpfx)libc.so.
10236 * tst-cancel4.c (tf_write, tf_writev): Increase buf sizes so that
10237 it is bigger than pipe buffer size even on arches with bigger
10239 (tf_usleep): Cast usleep argument to useconds_t to avoid warnings.
10241 2002-12-25 Ulrich Drepper <drepper@redhat.com>
10243 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Implement
10244 correct errno access for case that USE___THREAD is not defined.
10246 2002-12-24 Ulrich Drepper <drepper@redhat.com>
10248 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Add missing #endif.
10249 Patch by Marijn Ros <marijn@mad.scientist.com>.
10251 2002-12-22 Roland McGrath <roland@redhat.com>
10253 * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
10255 2002-12-20 Ulrich Drepper <drepper@redhat.com>
10257 * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_inexpensive): Define.
10259 2002-12-19 Ulrich Drepper <drepper@redhat.com>
10261 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Don't define
10262 NEED_DL_SYSINFO since no processor < i686 had the sysenter opcode.
10263 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: New file.
10265 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Use ENTER_KERNEL instead
10267 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
10268 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Likewise.
10269 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Likewise.
10270 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
10271 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
10272 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Likewise.
10273 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Likewise.
10274 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
10276 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add support for using
10278 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
10280 * sysdeps/i386/tls.h: Unconditionally include <dl-sysdep.h>.
10282 * allocatestack.c (allocate_stack) [NEED_DL_SYSINFO]: Set sysinfo
10284 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Check
10285 that sysinfo is properly initialized.
10286 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define RTLD_PRIVATE_ERRNO
10287 to 1 only for ld.so.
10289 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
10290 RTLD_CORRECT_DYNAMIC_WEAK.
10292 2002-12-19 Jakub Jelinek <jakub@redhat.com>
10294 * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
10295 Use return 0 as 6th argument to FORWARD4.
10296 * pthread_equal.c: Include pthreadP.h instead of pthread.h.
10298 2002-12-18 Ulrich Drepper <drepper@redhat.com>
10300 * descr.h (struct pthread) [NEED_DL_SYSINFO]: Add sysinfo member.
10301 * sysdeps/i386/tls.h (tcbhead_t): Add sysinfo member.
10302 Define SYSINFO_OFFSEET if NEED_DL_SYSINFO is defined.
10303 (INIT_SYSINFO): New #define.
10304 (TLS_TP_INIT): Use INIT_SYSINFO.
10305 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
10306 At test to make sure SYSINFO_OFFSET value is correct.
10307 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
10309 2002-12-18 Jakub Jelinek <jakub@redhat.com>
10311 * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
10312 * sysdeps/unix/sysv/linux/raise.c (gsignal): Add weak alias to raise.
10313 * Versions [libc: GLIBC_2.0]: Add pthread_attr_init.
10314 [libpthread: GLIBC_2.1]: Remove __pthread_rwlock_init,
10315 __pthread_rwlock_destroy, __pthread_rwlock_rdlock,
10316 __pthread_rwlock_wrlock, __pthread_rwlock_unlock,
10317 __pthread_rwlock_tryrdlock and __pthread_rwlock_trywrlock.
10319 2002-12-18 Ulrich Drepper <drepper@redhat.com>
10321 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use ENTER_KERNEL
10322 macro instead of using int $0x80 directly.
10324 * sysdeps/pthread/bits/stdio-lock.h: New file.
10325 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: New file.
10326 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: New file.
10327 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: New file.
10328 * Makefile (routines): Add libc-lowlevelmutex.
10330 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Remove
10331 __i686.get_pc_thunk.dx.
10333 2002-12-17 Jakub Jelinek <jakub@redhat.com>
10335 * Makefile (libpthread-shared-only-routines): Add pt-allocrtsig.
10336 (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
10337 ($(objpfx)tst-cancel-wrappers.out): New rule.
10338 * tst-cancel-wrappers.sh: New test.
10339 * tst-locale1.c: Include signal.h.
10340 (uselocale): Test static linking of __libc_current_sigrt*.
10342 2002-12-17 Ulrich Drepper <drepper@redhat.com>
10344 * Makefile (tests): Add tst-cancel6.
10345 * tst-cancel6.c: New file
10347 2002-12-17 Jakub Jelinek <jakub@redhat.com>
10349 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
10350 Define meaningfully for assembler as well.
10351 * pthreadP.h (struct pthread_functions): Remove
10352 ptr_pthread_attr_init field. Add ptr_pthread_attr_init_2_0
10353 and ptr_pthread_attr_init_2_1 fields.
10354 * init.c (pthread_functions): Initialize ptr_pthread_attr_init_2_0
10355 and ptr_pthread_attr_init_2_1 instead of ptr_pthread_attr_init.
10356 * forward.c (FORWARD4): Renamed from FORWARD3. Add export argument.
10357 (FORWARD3): Define using FORWARD4.
10358 (pthread_attr_init): Provide both @GLIBC_2.0 and @@GLIBC_2.1
10360 * pt-system.c: Remove duplicate stdlib.h include.
10362 2002-12-16 Ulrich Drepper <drepper@redhat.com>
10364 * sem_init.c: Define sem_init@GLIBC_2.0.
10365 * sem_destroy.c: Define sem_destroy@GLIBC_2.0.
10366 * sem_getvalue.c: Define sem_getvalue@GLIBC_2.0.
10368 * flockfile.c: Moved to...
10369 * sysdeps/pthread/flockfile.c: ...here. New file.
10370 * funlockfile.c: Moved to...
10371 * sysdeps/pthread/funlockfile.c: ...here. New file.
10372 * ftrylockfile.c: Moved to...
10373 * sysdeps/pthread/ftrylockfile.c: ...here. New file.
10375 2002-12-16 Jakub Jelinek <jakub@redhat.com>
10377 * libc-cancellation.c: Guard both function with
10378 #if !defined NOT_IN_libc.
10379 * Makefile (libpthread-routines): Use ptw-, not pt- prefix for the
10380 automatically provided pthread wrappers.
10381 * pthreadP.h (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define to
10382 CANCEL_* if IS_IN_libpthread and to dummy versions if not in libc
10384 * pt-open.c: Removed.
10385 * pt-fcntl.c: Removed.
10386 * pt-fsync.c: Removed.
10387 * pt-lseek.c: Removed.
10388 * pt-msgrcv.c: Removed.
10389 * pt-msgsnd.c: Removed.
10390 * pt-msync.c: Removed.
10391 * pt-nanosleep.c: Removed.
10392 * pt-open64.c: Removed.
10393 * pt-pause.c: Removed.
10394 * pt-pread.c: Removed.
10395 * pt-pread64.c: Removed.
10396 * pt-pwrite.c: Removed.
10397 * pt-pwrite64.c: Removed.
10398 * pt-read.c: Removed.
10399 * pt-recv.c: Removed.
10400 * pt-recvfrom.c: Removed.
10401 * pt-recvmsg.c: Removed.
10402 * pt-send.c: Removed.
10403 * pt-sendto.c: Removed.
10404 * pt-sigtimedwait.c: Removed.
10405 * pt-sigwait.c: Removed.
10406 * pt-wait.c: Removed.
10407 * pt-waitpid.c: Removed.
10408 * pt-write.c: Removed.
10409 * pt-accept.c: Removed.
10410 * pt-close.c: Removed.
10411 * pt-connect.c: Removed.
10412 * pt-lseek64.c: Removed.
10413 * pt-sendmsg.c: Removed.
10414 * pt-tcdrain.c: Removed.
10416 2002-12-15 Ulrich Drepper <drepper@redhat.com>
10418 * init.c (__pthread_initialize_minimal_internal): Renamed from
10419 __pthread_initialize_minimal. Make old name an alias. This
10420 converts a normal relocation into a relative relocation.
10422 * pt-fcntl.c (__fcntl): Use fcntl64 syscall, not fcntl.
10424 * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
10425 readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
10426 * Makefile (libpthread-routines): Remove pt-creat, pt-poll,
10427 pt-pselect, pt-readv, pt-select, pt-sigpause, pt-sigsuspend,
10428 pt-sigwaitinfo, pt-waitid, and pt-writev.
10429 * pt-creat.c: Removed.
10430 * pt-poll.c: Removed.
10431 * pt-pselect.c: Removed.
10432 * pt-readv.c: Removed.
10433 * pt-select.c: Removed.
10434 * pt-sigpause.c: Removed.
10435 * pt-sigsuspend.c: Removed.
10436 * pt-sigwaitinfo.c: Removed.
10437 * pt-waitid.c: Removed.
10438 * pt-writev.c: Removed.
10440 * init.c (pthread_functions): New variable.
10441 (__pthread_initialize_minimal): Pass pointer to pthread_functions
10442 (or NULL) to __libc_pthread_init.
10443 * forward.c: Rewrite to use __libc:pthread_functions array to get
10444 function addresses.
10445 * sysdeps/unix/sysv/linux/fork.h: Remove __libc_pthread_init
10447 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
10448 Take new parameter. Copy content of variable pointed to by it
10449 to __libc_pthread_init.
10451 * pthreadP.h (struct pthread_functions): New type.
10452 (__libc_pthread_init): Declare.
10454 * pthread_attr_destroy.c: Add namespace protected alias.
10455 * pthread_attr_getdetachstate.c: Likewise.
10456 * pthread_attr_getinheritsched.c: Likewise.
10457 * pthread_attr_getschedparam.c: Likewise.
10458 * pthread_attr_getschedpolicy.c: Likewise.
10459 * pthread_attr_getscope.c: Likewise.
10460 * pthread_attr_setdetachstate.c: Likewise.
10461 * pthread_attr_setinheritsched.c: Likewise.
10462 * pthread_attr_setschedparam.c: Likewise.
10463 * pthread_attr_setschedpolicy.c: Likewise.
10464 * pthread_attr_setscope.c: Likewise.
10465 * pthread_cond_broadcast.c: Likewise.
10466 * pthread_cond_destroy.c: Likewise.
10467 * pthread_cond_init.c: Likewise.
10468 * pthread_cond_signal.c: Likewise.
10469 * pthread_cond_wait.c: Likewise.
10470 * pthread_condattr_destroy.c: Likewise.
10471 * pthread_condattr_init.c: Likewise.
10472 * pthread_equal.c: Likewise.
10473 * pthread_exit.c: Likewise.
10474 * pthread_getschedparam.c: Likewise.
10475 * pthread_self.c: Likewise.
10476 * pthread_setcancelstate.c: Likewise.
10477 * pthread_setschedparam.c: Likewise.
10478 * pthread_mutex_destroy.c: Likewise.
10479 * pthread_mutex_init.c: Likewise.
10480 * pthreadP.h: Add prototypes for the aliases.
10482 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Set
10483 multiple_threads member in correct TCB to 1.
10485 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define
10486 SINGLE_THREAD_P. If in libc or libpthread examine multiple_thread
10487 member of thread decriptor, otherwise return unconditionally 1.
10489 2002-12-14 Ulrich Drepper <drepper@redhat.com>
10491 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Changes folded into the
10492 regular Linux version. Remove file.
10493 * sysdeps/unix/sysv/linux/connect.S: Likewise. Remove file.
10494 * sysdeps/unix/sysv/linux/llseek.c: Likewise. Remove file.
10495 * sysdeps/unix/sysv/linux/msgrcv.c: Likewise. Remove file.
10496 * sysdeps/unix/sysv/linux/msgsnd.c: Likewise. Remove file.
10497 * sysdeps/unix/sysv/linux/open64.c: Likewise. Remove file.
10498 * sysdeps/unix/sysv/linux/poll.c: Likewise. Remove file.
10499 * sysdeps/unix/sysv/linux/pread.c: Likewise. Remove file.
10500 * sysdeps/unix/sysv/linux/pread64.c: Likewise. Remove file.
10501 * sysdeps/unix/sysv/linux/pselect.c: Likewise. Remove file.
10502 * sysdeps/unix/sysv/linux/pwrite.c: Likewise. Remove file.
10503 * sysdeps/unix/sysv/linux/pwrite64.c: Likewise. Remove file.
10504 * sysdeps/unix/sysv/linux/readv.c: Likewise. Remove file.
10505 * sysdeps/unix/sysv/linux/recv.S: Likewise. Remove file.
10506 * sysdeps/unix/sysv/linux/recvfrom.S: Likewise. Remove file.
10507 * sysdeps/unix/sysv/linux/recvmsg.S: Likewise. Remove file.
10508 * sysdeps/unix/sysv/linux/send.S: Likewise. Remove file.
10509 * sysdeps/unix/sysv/linux/sendmsg.S: Likewise. Remove file.
10510 * sysdeps/unix/sysv/linux/sendto.S: Likewise. Remove file.
10511 * sysdeps/unix/sysv/linux/sigpause.c: Likewise. Remove file.
10512 * sysdeps/unix/sysv/linux/sigsuspend.c: Likewise. Remove file.
10513 * sysdeps/unix/sysv/linux/sigtimedwait.c: Likewise. Remove file.
10514 * sysdeps/unix/sysv/linux/sigwait.c: Likewise. Remove file.
10515 * sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise. Remove file.
10516 * sysdeps/unix/sysv/linux/system.c: Likewise. Remove file.
10517 * sysdeps/unix/sysv/linux/tcdrain.c: Likewise. Remove file.
10518 * sysdeps/unix/sysv/linux/wait.c: Likewise. Remove file.
10519 * sysdeps/unix/sysv/linux/waitid.c: Likewise. Remove file.
10520 * sysdeps/unix/sysv/linux/waitpid.c: Likewise. Remove file.
10521 * sysdeps/unix/sysv/linux/writev.c: Likewise. Remove file.
10522 * sysdeps/unix/sysv/linux/i386/fcntl.c: Likewise. Remove file.
10524 2002-12-14 Jakub Jelinek <jakub@redhat.com>
10526 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
10527 * sysdeps/unix/sysv/linux/open.c: Removed.
10528 * sysdeps/unix/sysv/linux/fsync.c: Removed.
10529 * sysdeps/unix/sysv/linux/lseek.c: Removed.
10530 * sysdeps/unix/sysv/linux/msync.c: Removed.
10531 * sysdeps/unix/sysv/linux/read.c: Removed.
10532 * sysdeps/unix/sysv/linux/close.c: Removed.
10533 * sysdeps/unix/sysv/linux/creat.c: Removed.
10534 * sysdeps/unix/sysv/linux/nanosleep.c: Removed.
10535 * sysdeps/unix/sysv/linux/pause.c: Removed.
10536 * sysdeps/unix/sysv/linux/select.c: Removed.
10537 * sysdeps/unix/sysv/linux/write.c: Removed.
10539 2002-12-14 Ulrich Drepper <drepper@redhat.com>
10541 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Check multiple_threads
10542 element in TCB to see whether locking is needed.
10544 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Check that
10545 MULTIPLE_THREADS_OFFSET value is correct.
10547 * sysdeps/unix/sysv/linux/close.c: New file.
10548 * sysdeps/unix/sysv/linux/connect.S: New file.
10549 * sysdeps/unix/sysv/linux/creat.c: New file.
10550 * sysdeps/unix/sysv/linux/fsync.c: New file.
10551 * sysdeps/unix/sysv/linux/llseek.c: New file.
10552 * sysdeps/unix/sysv/linux/lseek.c: New file.
10553 * sysdeps/unix/sysv/linux/msgrcv.c: New file.
10554 * sysdeps/unix/sysv/linux/msgsnd.c: New file.
10555 * sysdeps/unix/sysv/linux/msync.c: New file.
10556 * sysdeps/unix/sysv/linux/nanosleep.c: New file.
10557 * sysdeps/unix/sysv/linux/open.c: New file.
10558 * sysdeps/unix/sysv/linux/open64.c: New file.
10559 * sysdeps/unix/sysv/linux/pause.c: New file.
10560 * sysdeps/unix/sysv/linux/poll.c: New file.
10561 * sysdeps/unix/sysv/linux/pread.c: New file.
10562 * sysdeps/unix/sysv/linux/pread64.c: New file.
10563 * sysdeps/unix/sysv/linux/pselect.c: New file.
10564 * sysdeps/unix/sysv/linux/pwrite.c: New file.
10565 * sysdeps/unix/sysv/linux/pwrite64.c: New file.
10566 * sysdeps/unix/sysv/linux/readv.c: New file.
10567 * sysdeps/unix/sysv/linux/recv.S: New file.
10568 * sysdeps/unix/sysv/linux/recvfrom.S: New file.
10569 * sysdeps/unix/sysv/linux/recvmsg.S: New file.
10570 * sysdeps/unix/sysv/linux/select.c: New file.
10571 * sysdeps/unix/sysv/linux/send.S: New file.
10572 * sysdeps/unix/sysv/linux/sendmsg.S: New file.
10573 * sysdeps/unix/sysv/linux/sendto.S: New file.
10574 * sysdeps/unix/sysv/linux/sigpause.c: New file.
10575 * sysdeps/unix/sysv/linux/sigsuspend.c: New file.
10576 * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
10577 * sysdeps/unix/sysv/linux/sigwait.c: New file.
10578 * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
10579 * sysdeps/unix/sysv/linux/system.c: New file.
10580 * sysdeps/unix/sysv/linux/tcdrain.c: New file.
10581 * sysdeps/unix/sysv/linux/wait.c: New file.
10582 * sysdeps/unix/sysv/linux/waitid.c: New file.
10583 * sysdeps/unix/sysv/linux/waitpid.c: New file.
10584 * sysdeps/unix/sysv/linux/writev.c: New file.
10585 * sysdeps/unix/sysv/linux/i386/fcntl.c: New file.
10587 * pt-readv.c: Fix comment.
10589 2002-12-14 Jakub Jelinek <jakub@redhat.com>
10591 * tst-cleanup1.c: Include stdlib.h.
10593 * tst-cancel5.c: New test.
10594 * Makefile (tests): Add tst-cancel5.
10595 (tst-cancel5): Link against libc.so libpthread.so in that order.
10597 2002-12-13 Ulrich Drepper <drepper@redhat.com>
10599 * forward.c (test_loaded): Prevent recursive calls.
10601 * Makefile (routines): Add libc-cancellation.
10602 * libc-cancellation.c: New file.
10603 * descr.h (struct pthread): Add multiple_threads field.
10604 * allocatestack.c (allocate_stack): Initialize multiple_header field of
10605 new thread descriptor to 1.
10606 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread):
10607 Initialize multiple_thread field after successful thread creation.
10608 * cancellation.c (__do_cancel): Move to pthreadP.h.
10609 (__pthread_enable_asynccancel): Remove parameter from __do_cancel call.
10610 (__pthread_disable_asynccancel): Add internal_function attribute.
10611 * init.c (sigcancel_handler): Remove parameter from __do_cancel call.
10612 * pthread_setcancelstate.c: Likewise.
10613 * pthread_setcanceltype.c: Likewise.
10614 * pthread_exit.c: Likewise.
10615 * pthreadP.h (CANCELLATION_P): Likewise.
10616 (__do_cancel): Define as static inline.
10617 (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): New #defines.
10618 (__libc_enable_asynccancel, __libc_disable_asynccancel): New
10620 * sysdeps/i386/tls.h (tcbhead_t): Add list and multiple_threads
10621 fields. Define MULTIPLE_THREADS_OFFSET.
10622 * sysdeps/pthread/bits/libc-lock.h: Remove __libc_locking_needed
10624 * sysdeps/unix/sysv/linux/accept.S: New file.
10625 * sysdeps/unix/sysv/linux/read.c: New file.
10626 * sysdeps/unix/sysv/linux/write.c: New file.
10627 * sysdeps/unix/sysv/linux/i386/pt-socket.S: New file.
10628 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove definition and
10629 initialization of __libc_locking_needed.
10630 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't use
10631 __libc_locking_needed, use multiple_threads field in TCB.
10632 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
10634 2002-12-12 Ulrich Drepper <drepper@redhat.com>
10636 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: Use i486
10638 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: Likewise.
10640 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Correct
10641 access to __libc_locking_needed for PIC.
10643 2002-12-12 Jakub Jelinek <jakub@redhat.com>
10645 * sysdeps/pthread/bits/libc-lock.h (__libc_locking_needed): Only
10646 declare for libc.so.
10647 (__libc_lock_init, __libc_lock_init_recursive): Change into comma
10649 (__libc_lock_lock): Put into statement expression.
10650 (__libc_lock_unlock): Remove trailing semicolon.
10651 * sysdeps/unix/sysv/linux/fork.h (__libc_pthread_init): Fix typo.
10653 2002-12-12 Roland McGrath <roland@redhat.com>
10655 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use asm operand with
10656 "m" constraint to refer to __libc_locking_needed. Declare it here.
10658 2002-12-12 Ulrich Drepper <drepper@redhat.com>
10660 * sysdeps/unix/sysv/linux/fork-gen.c: Renamed to...
10661 * sysdeps/unix/sysv/linux/libc_pthread_init.c: ...this.
10662 Initialize __libc_locking_needed.
10663 * init.c (__pthread_initialize_minimal): Call __libc_pthread_init
10664 instead of __register_pthread_fork_handler.
10665 * sysdeps/pthread/bits/libc-lock.h: Declare __libc_locking_needed.
10666 * sysdeps/unix/sysv/linux/Makefile (sysdep_routimes): Replace
10667 fork-gen with libc_pthread_init.
10668 * sysdeps/unix/sysv/linux/Versions: Use __libc_pthread_init instead
10669 of __register_pthread_fork_handler.
10670 * sysdeps/unix/sysv/linux/fork.h: Declare __libc_pthread_init instead
10671 of __register_pthread_fork_handler.
10672 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use
10673 __libc_locking_needed to determine whether lock prefix can be avoided.
10674 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
10676 2002-12-11 Ulrich Drepper <drepper@redhat.com>
10678 * Makefile (tests): Add tst-cleanup1.
10679 * tst-cleanup1.c: New file.
10680 * cancellation.c (__cleanup_thread): Removed.
10681 (__do_cancel): Remove call to __cleanup_thread.
10682 * pthreadP.h: Remove __cleanup_thread prorotype.
10684 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
10685 Remember function and argument even if cancellation handler
10686 function is not available.
10687 (__libc_cleanup_region_end): Execute registered function directly if
10688 pthread functions are not available.
10689 (__libc_cleanup_end): Likewise.
10691 * init.c (__pthread_initialize_minimal): Fix initialization in
10692 static lib by preventing gcc from being too clever.
10694 2002-12-10 Ulrich Drepper <drepper@redhat.com>
10696 * init.c (__pthread_initialize_minimal): Remove unneccesary
10699 * Makefile (tests): We can run tst-locale2 now.
10701 2002-12-09 Ulrich Drepper <drepper@redhat.com>
10703 * Versions: Remove duplicated sigwait entry.
10705 2002-12-08 Ulrich Drepper <drepper@redhat.com>
10707 * pthreadP.h: Enable pthread_cleanup_{push,pop} optimizations only
10710 * pt-fcntl.c (__fcntl): Initialize oldtype to avoid warning.
10712 * pthreadP.h: Declare __pthread_enable_asynccancel and
10713 __pthread_disable_asynccancel.
10714 (CANCEL_ASYNC): Use __pthread_enable_asynccancel.
10715 (CANCEL_RESET): Use __pthread_disable_asynccancel.
10716 * cancellation.c (__pthread_enable_asynccancel): New function.
10717 (__pthread_disable_asynccancel): New function.
10718 * pt-accept.c: Adjust for CANCEL_ASYNC and CANCEL_RESET change.
10719 * pt-close.c: Likewise.
10720 * pt-connect.c: Likewise.
10721 * pt-creat.c: Likewise.
10722 * pt-fcntl.c: Likewise.
10723 * pt-fsync.c: Likewise.
10724 * pt-lseek.c: Likewise.
10725 * pt-lseek64.c: Likewise.
10726 * pt-msgrcv.c: Likewise.
10727 * pt-msgsnd.c: Likewise.
10728 * pt-msync.c: Likewise.
10729 * pt-nanosleep.c: Likewise.
10730 * pt-open.c: Likewise.
10731 * pt-open64.c: Likewise.
10732 * pt-pause.c: Likewise.
10733 * pt-poll.c: Likewise.
10734 * pt-pread.c: Likewise.
10735 * pt-pread64.c: Likewise.
10736 * pt-pselect.c: Likewise.
10737 * pt-pwrite.c: Likewise.
10738 * pt-pwrite64.c: Likewise.
10739 * pt-read.c: Likewise.
10740 * pt-readv.c: Likewise.
10741 * pt-recv.c: Likewise.
10742 * pt-recvfrom.c: Likewise.
10743 * pt-recvmsg.c: Likewise.
10744 * pt-select.c: Likewise.
10745 * pt-send.c: Likewise.
10746 * pt-sendmsg.c: Likewise.
10747 * pt-sendto.c: Likewise.
10748 * pt-sigpause.c: Likewise.
10749 * pt-sigsuspend.c: Likewise.
10750 * pt-sigtimedwait.c: Likewise.
10751 * pt-sigwait.c: Likewise.
10752 * pt-sigwaitinfo.c: Likewise.
10753 * pt-system.c: Likewise.
10754 * pt-tcdrain.c: Likewise.
10755 * pt-wait.c: Likewise.
10756 * pt-waitid.c: Likewise.
10757 * pt-waitpid.c: Likewise.
10758 * pt-write.c: Likewise.
10759 * pt-writev.c: Likewise.
10760 * pthread_join.c: Likewise.
10761 * pthread_timedjoin.c: Likewise.
10763 * pt-sigpause.c (sigsuspend): Call __sigsuspend.
10764 (__xpg_sigpause): New function.
10765 * Versions (libpthread:GLIBC_2.3.2): Add __xpg_sigpause.
10767 2002-12-07 Ulrich Drepper <drepper@redhat.com>
10769 * Makefile (CFLAGS-ftrylockfile.c): Add -D_IO_MTSAFE_IO.
10771 * cleanup.c: Move declarations of _GI_pthread_cleanup_push and
10772 _GI_pthread_cleanup_pop to pthreadP.h.
10774 * ftrylockfile.c: Use _IO_lock_trylock instead of
10775 pthread_mutex_trylock.
10777 * pthreadP.h (CANCEL_ASYNC): Use __pthread_setcanceltype.
10778 (CANCEL_RESET): Likewise.
10779 (__pthread_setcanceltype_): Declare.
10780 (__pthread_mutex_lock_internal): Declare.
10781 (__pthread_mutex_unlock_internal): Declare.
10782 (__pthread_once_internal): Declare.
10783 (pthread_cleanup_push): Redefine using _GI_pthread_cleanup_push.
10784 (pthread_cleanup_pop): Redefine using _GI_pthread_cleanup_pop.
10786 * pthread_cond_timedwait.c: Use INTUSE is calls to pthread_mutex_lock
10787 and pthread_mutex_unlock.
10788 * pthread_cond_wait.c: Likewise.
10789 * pthread_mutex_lock.c: Use INTDEF to define alias if needed.
10790 * pthread_mutex_unlock.c: Likewise.
10792 * pthread_setcanceltype.c: Add additional alias
10793 __pthread_setcanceltype.
10795 * sem_unlink.c (sem_unlink): Use __pthread_once with INTDEF.
10796 * sem_open.c (sem_open): Likewise.
10797 Use __libc_open, __libc_write, and __libc_close instead of
10798 open, write, and close respectively.
10800 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_trylock_internal):
10801 Rewrite as statement expression since it must return a value.
10803 * pthread_cancel.c: Use __pthread_kill instead of pthread_kill.
10804 * sysdeps/unix/sysv/linux/pthread_kill.c: Define additional alias
10807 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Define additional
10808 alias __pthread_once_internal.
10810 * sysdeps/unix/sysv/linux/raise.c: Use libc_hidden_def for raise.
10812 2002-12-06 Ulrich Drepper <drepper@redhat.com>
10814 * Makefile (tests): Add tst-stdio1 and tst-stdio2.
10815 * tst-stdio1.c: New file.
10816 * tst-stdio2.c: New file.
10818 * init.c (__pthread_initialize_minimal): Correct INIT_LIST_HEAD use.
10820 * Makefile (tests): Comment out tst-locale2 for now.
10821 (CFLAGS-flockfile.c, CFLAGS-funlockfile.c): Define to -D_IO_MTSAFE_IO.
10823 * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-fork.c to
10825 * sysdeps/unix/sysv/linux/fork.c: Include <bits/stdio-lock.h>.
10826 Use _IO_lock_init instead of explicit assignment.
10828 * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
10829 Define __libc_lock_* and __libc_lock_recursive macros with
10830 lowlevellock macros, not pthread mutexes.
10832 * flockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_lock instead
10833 of pthread_mutex_lock.
10834 * funlockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_unlock
10835 instead of pthread_mutex_unlock.
10837 2002-12-06 Roland McGrath <roland@redhat.com>
10839 * allocatestack.c (__stack_user): Use uninitialized defn.
10840 * init.c (__pthread_initialize_minimal): Initialize it here.
10842 2002-12-05 Roland McGrath <roland@redhat.com>
10844 * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
10846 * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
10848 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Add
10849 missing & here too.
10851 2002-12-05 Ulrich Drepper <drepper@redhat.com>
10853 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
10855 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: New file.
10856 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: New file.
10857 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: New file.
10858 * sysdeps/pthread/bits/libc-lock.h: Use lowlevellock implementation
10859 for __libc_lock_* macros.
10860 * Makefile (routines): Add libc-lowlevellock.
10862 2002-10-09 Roland McGrath <roland@redhat.com>
10864 * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
10865 Under [__PIC__], call the function via the pointer fetched for
10866 comparison rather than a call by name that uses the PLT.
10867 (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
10868 (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
10869 (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
10870 (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
10871 (__libc_key_create, __libc_getspecific, __libc_setspecific): Use it.
10873 2002-12-04 Roland McGrath <roland@redhat.com>
10875 * forward.c (pthread_self): Use FORWARD3 macro to correct return type.
10877 * sysdeps/i386/td_ta_map_lwp2thr.c: Moved from ../nptl_db.
10878 * sysdeps/generic/td_ta_map_lwp2thr.c: New file.
10880 * pthread_create.c (start_thread): Add missing & on __nptl_last_event.
10882 2002-12-04 Ulrich Drepper <drepper@redhat.com>
10884 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Make pthread_t
10885 a completely opaque, non-integer type.
10886 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
10888 2002-12-05 Jakub Jelinek <jakub@redhat.com>
10890 * sysdeps/i386/tls.h: Include stdlib.h.
10891 * sysdeps/x86_64/tls.h: Likewise.
10893 2002-12-04 Ulrich Drepper <drepper@redhat.com>
10895 * Makefile (tests): Add tst-locale2.
10896 (tests-static): Likewise.
10897 * tst-locale2.c: New file.
10899 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Mark asms as
10900 volatile and add memory clobbers to lock operations.
10902 2002-12-03 Ulrich Drepper <drepper@redhat.com>
10904 * sysdeps/i386/i686/bits/atomic.h: Use i486 version.
10905 * sysdeps/i386/i486/bits/atomic.h: New file.
10906 * sysdeps/i386/i586/bits/atomic.h: New file.
10907 * sysdeps/i386/i686/pthread_spin_trylock.S: Define HAVE_CMOV and
10908 include i486 version.
10909 * sysdeps/i386/i486/pthread_spin_trylock.S: New file.
10910 * sysdeps/i386/i586/pthread_spin_trylock.S: New file.
10911 Patch by Marijn Ros <marijn@mad.scientist.com>.
10913 * allocatestack.c (get_cached_stack): Don't crash if we first
10914 found a stack with a larger size then needed.
10915 Reported by Hui Huang <hui.huang@sun.com>.
10917 * Makefile (tests): Add tst-sysconf.
10918 * tst-sysconf.c: New file.
10920 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine
10921 PTHREAD_THREADS_MAX.
10923 2002-12-02 Roland McGrath <roland@redhat.com>
10925 * pthreadP.h (__stack_user, __nptl_create_event, __nptl_death_event):
10926 Declare using hidden_proto instead of attribute_hidden, so there are
10927 non-.hidden static symbols for gdb to find.
10928 (__pthread_keys): Likewise.
10929 * events.c (__nptl_create_event, __nptl_death_event): Add hidden_def.
10930 * allocatestack.c (__stack_user): Likewise.
10931 * pthread_create.c (__pthread_keys): Likewise.
10932 (__nptl_threads_events, __nptl_last_event): Make these static instead
10934 * pthread_key_create.c (__pthread_pthread_keys_max,
10935 __pthread_pthread_key_2ndlevel_size): Renamed from __linuxthreads_*.
10937 2002-12-02 Ulrich Drepper <drepper@redhat.com>
10939 * Makefile (tests): Add tst-locale1. If buid-static is yes link
10941 * tst-locale1.c: New file.
10943 * pthread_cond_timedwait.c: Include <stdlib.h>.
10945 * Makefile (tests): Add tst-fork2 and tst-fork3.
10946 * tst-fork2.c: New file.
10947 * tst-fork3.c: New file.
10949 2002-11-28 Ulrich Drepper <drepper@redhat.com>
10951 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
10953 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
10954 require it to 200112L.
10956 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Use cmov
10957 instruction only if HAVE_CMOV is defined.
10958 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Define HAVE_CMOV.
10960 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: New file.
10962 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: New file.
10964 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: New file.
10966 * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: New file.
10968 2002-11-27 Ulrich Drepper <drepper@redhat.com>
10970 * sysdeps/x86_64/bits/atomic.h: New file.
10972 * sysdeps/i386/i686/bits/atomic.h: Fix asm syntax for 8- and
10975 * sysdeps/unix/sysv/linux/raise.c (raise): Use INTERNAL_SYSCALL if
10976 possible since gettid cannot fail.
10978 * sysdeps/x86_64/pthreaddef.h: New file.
10980 * sysdeps/i386/pthreaddef.h (gettid): Removed.
10982 * sysdeps/x86_64/pthread_spin_init.c: New file.
10983 * sysdeps/x86_64/pthread_spin_lock.c: New file.
10984 * sysdeps/x86_64/pthread_spin_trylock.c: New file.
10985 * sysdeps/x86_64/pthread_spin_unlock.c: New file.
10987 * sysdeps/i386/i686/pthread_spin_trylock.S (pthread_spin_trylock):
10988 Add missing lock prefix. Minute optimization.
10990 * tst-spin2.c (main): Also check successful trylock call.
10992 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use correct
10993 syscall. Fix typo in case INTERNAL_SYSCALL is not used.
10995 * sysdeps/i386/pthread_spin_destroy.c: Moved to...
10996 * sysdeps/pthread/pthread_spin_destroy.c: ...here. New file.
10998 * sysdeps/i386/pthread_sigmask.c: Removed. Use the generic code.
10999 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Return correct
11000 value in case of an error. Add support for INTERNAL_SYSCALL.
11002 * sysdeps/i386/pthread_sigmask.c (pthread_sigmask): Return correct
11003 value in case of an error.
11005 * sysdeps/x86_64/tls.h: New file.
11007 2002-11-26 Ulrich Drepper <drepper@redhat.com>
11009 * sysdeps/i386/tls.h (THREAD_GETMEM_NC): Change interface. It now
11010 takes the array member name and the index as parameters.
11011 (THREAD_SETMEM_NC): Likewise.
11012 * pthread_getspecific.c: Use new THREAD_GETMEM_NC interface.
11013 * pthread_setspecific.c: Use new THREAD_GETMEM_NC and THREAD_SETMEM_NC
11016 * sysdeps/i386/tls.h (THREAD_SETMEM): Use size of member element
11017 to decide which code to use.
11018 (THREAD_SETMEM_NC): Likewise.
11020 * allocatestack.c (queue_stack): Don't remove stack from list here.
11021 Do it in the caller. Correct condition to prematurely terminate
11022 loop to free stacks.
11023 (__deallocate_stack): Remove stack from list here.
11025 2002-11-26 Ulrich Drepper <drepper@redhat.com>
11027 * Makefile (tests): Add tst-stack1.
11028 * tst-stack1.c: New file.
11030 * allocatestack.c (allocate_stack): Initialize the TCB on a user
11033 * pthread_attr_getstack.c: Return bottom of the thread area.
11035 2002-11-25 Ulrich Drepper <drepper@redhat.com>
11037 * Makefile (libpthread-routines): Add pt-allocrtsig and
11038 pthread_kill_other_threads.
11039 * pt-allocrtsig.c: New file.
11040 * pthread_kill_other_threads.c: New file.
11041 * sysdeps/unix/sysv/linux/allocrtsig.c: Add additional aliases for
11042 all three functions.
11043 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
11045 * sysdeps/unix/sysv/linux/Versions (libc:GLIBC_PRIVATE): Export
11046 __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
11047 and __libc_allocate_rtsig_private.
11048 * Versions (libpthread): Export pthread_kill_other_threads_np,
11049 __libc_current_sigrtmin, and __libc_current_sigrtmax.
11051 2002-11-24 Ulrich Drepper <drepper@redhat.com>
11053 * allocatestack.c (allocate_stack): stackaddr in attribute points to
11054 the end of the stack. Adjust computations.
11055 When mprotect call fails dequeue stack and free it.
11056 * pthread_attr_setstack.c: Store top of the stack in stackaddr
11058 * pthread_getattr_np.c: Likewise.
11060 * descr.h (IS_DETACHED): Add some more parenthesis to prevent
11063 2002-11-23 Ulrich Drepper <drepper@redhat.com>
11065 * sysdeps/pthread/pthread.h (pthread_self): __THROW must come before
11066 attribute definitions. Patch by Luca Barbieri <ldb@ldb.ods.org>.
11068 2002-11-22 Ulrich Drepper <drepper@redhat.com>
11070 * pthread_getspecific.c: Optimize access to first 2nd-level array.
11071 * pthread_setspecific.c: Likewise.
11073 2002-11-21 Ulrich Drepper <drepper@redhat.com>
11075 * sysdeps/unix/sysv/linux/i386/createthread.c: Remove CLONE_ flags
11076 definitions. Get them from the official place.
11077 * sysdeps/unix/sysv/linux/i386/fork.c: Likewise.
11079 * sysdeps/unix/sysv/linux/i386/createthread.c: Update CLONE_* flags.
11080 Use new CLONE_ flags in clone() calls.
11082 * sysdeps/unix/sysv/linux/fork.c: Use ARCH_FORK to actually fork.
11083 * sysdeps/unix/sysv/linux/i386/fork.c: New file.
11085 * Versions: Add pthread_* functions for libc.
11086 * forward.c: New file.
11088 * sysdeps/pthread/Makefile (libpthread-sysdeps_routines): Add
11090 * herrno.c: New file.
11093 * Makefile (libpthread-routines): Remove sem_post, sem_wait,
11094 sem_trywait, and sem_timedwait. Add herrno and res.
11095 * sem_init.c: Don't initialize lock and waiters members.
11096 * sem_open.c: Likewise.
11097 * sem_post.c: Removed.
11098 * sem_wait.c: Removed.
11099 * sem_trywait.c: Removed.
11100 * sem_timedwait.c: Removed.
11101 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Complete rewrite.
11102 Includes full implementations of sem_post, sem_wait, sem_trywait,
11104 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Adjust
11105 for new implementation.
11106 * sysdeps/unix/sysv/linux/internaltypes.h (struct sem): Remove lock
11107 and waiters fields.
11109 * tst-sem3.c: Improve error message.
11110 * tst-signal3.c: Likewise.
11112 * init.c (__pthread_initialize_minimal): Use set_tid_address syscall
11113 to tell the kernel about the termination futex and to initialize tid
11114 member. Don't initialize main_thread.
11115 * descr.h (struct pthread): Remove main_thread member.
11116 * cancelllation.c (__do_cancel): Remove code handling main thread.
11117 The main thread is not special anymore.
11119 * allocatestack.c (__reclaim_stacks): Mark stacks as unused. Add
11120 size of the stacks to stack_cache_actsize.
11122 * pt-readv.c: Add missing "defined".
11123 * pt-sigwait.c: Likewise.
11124 * pt-writev.c: Likewise.
11126 2002-11-09 Ulrich Drepper <drepper@redhat.com>
11128 * Versions: Export __connect from libpthread.
11129 Patch by Luca Barbieri <ldb@ldb.ods.org>.
11131 * Makefile (libpthread-routines): Add pt-raise.
11132 * sysdeps/unix/sysv/linux/raise.c: New file.
11133 * sysdeps/unix/sysv/linux/pt-raise.c: New file.
11134 * sysdeps/generic/pt-raise.c: New file.
11136 * pthread_cond_init.c: Initialize all data elements of the condvar
11137 structure. Patch by Luca Barbieri <ldb@ldb.ods.org>.
11139 * pthread_attr_init.c: Actually implement 2.0 compatibility version.
11140 * pthread_create.c: Likewise.
11142 * Makefile (tests): Add tst-key1, tst-key2, tst-key3.
11143 * tst-key1.c: New file.
11144 * tst-key2.c: New file.
11145 * tst-key3.c: New file.
11147 * Versions: Export pthread_detach for version GLIBC_2.0.
11148 Reported by Saurabh Desai <sdesai@austin.ibm.com>.
11150 2002-11-08 Ulrich Drepper <drepper@redhat.com>
11152 * pthread_key_create.c: Terminate search after an unused key was found.
11153 Patch by Luca Barbieri <ldb@ldb.ods.org>.
11155 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Return zero.
11156 Patch by Luca Barbieri <ldb@ldb.ods.org>.
11158 2002-10-10 Ulrich Drepper <drepper@redhat.com>
11160 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Use slow generic
11161 dynamic lookup for errno in PIC.
11163 * allocatestack.c (get_cached_stack): Rearrange code slightly to
11164 release the stack lock as soon as possible.
11165 Call _dl_allocate_tls_init for TCB from the cache to re-initialize
11166 the static TLS block.
11167 (allocate_stack): Call _dl_allocate_tls_init for user-provided stack.
11169 * cancellation.c: Renamed from cancelation.c.
11170 * Makefile: Adjust accordingly.
11171 * pthreadP.h (CANCELLATION_P): Renamed from CANCELATION_P.
11172 * cleanup_defer.c: Use CANCELLATION_P.
11173 * pthread_testcancel.c: Likewise.
11174 * descr.h: Fix spelling in comments.
11175 * init.c: Likewise.
11176 * pthread_getattr_np.c: Likewise.
11177 * pthread_getschedparam.c: Likewise.
11178 * pthread_setschedparam.c: Likewise.
11179 * Versions: Likewise.
11181 * pt-pselect.c: New file.
11182 * Makefile (libpthread-routines): Add pt-pselect.
11183 * Versions: Add pselect.
11185 * tst-cancel4.c: New file.
11186 * Makefile (tests): Add tst-cancel4.
11188 2002-10-09 Ulrich Drepper <drepper@redhat.com>
11190 * pthread_mutex_lock.c: Always record lock ownership.
11191 * pthread_mutex_timedlock.c: Likewise.
11192 * pthread_mutex_trylock.c: Likewise.
11194 * pt-readv.c: New file.
11195 * pt-writev.c: New file.
11196 * pt-creat.c: New file.
11197 * pt-msgrcv.c: New file.
11198 * pt-msgsnd.c: New file.
11199 * pt-poll.c: New file.
11200 * pt-select.c: New file.
11201 * pt-sigpause.c: New file.
11202 * pt-sigsuspend.c: New file.
11203 * pt-sigwait.c: New file.
11204 * pt-sigwaitinfo.c: New file.
11205 * pt-waitid.c: New file.
11206 * Makefile (libpthread-routines): Add pt-readv, pt-writev, pt-creat,
11207 pt-msgrcv, pt-msgsnd, pt-poll, pt-select, pt-sigpause, pt-sigsuspend,
11208 pt-sigwait, pt-sigwaitinfo, and pt-waitid.
11209 * Versions: Add all the new functions.
11211 * tst-exit1.c: New file.
11212 * Makefile (tests): Add tst-exit1.
11214 * sem_timedwait.c: Minor optimization for more optimal fastpath.
11216 2002-10-08 Ulrich Drepper <drepper@redhat.com>
11218 * pt-fcntl.c: Only enable asynchronous cancellation for F_SETLKW.
11220 * pthread_join.c: Enable asynchronous cancellation around lll_wait_tid
11221 call. pthread_join is an official cancellation point.
11222 * pthread_timedjoin.c: Likewise.
11224 * pthread_cond_wait.c: Revert order in which internal lock are dropped
11225 and the condvar's mutex are retrieved.
11226 * pthread_cond_timedwait.c: Likewise.
11227 Reported by dice@saros.East.Sun.COM.
11229 2002-10-07 Ulrich Drepper <drepper@redhat.com>
11231 * pthreadP.h: Cut out all type definitions and move them...
11232 * sysdeps/unix/sysv/linux/internaltypes.h: ...here. New file.
11233 * pthreadP.h: Include <internaltypes.h>.
11235 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Little
11236 performance tweaks.
11238 * sem_trywait.c: Shuffle #includes around to get right order.
11239 * sem_timedwait.c: Likewise.
11240 * sem_post.c: Likewise.
11241 * sem_wait.c: Likewise.
11243 * nptl 0.3 released.
11245 * Makefile (tests): Add tst-signal3.
11246 * tst-signal3.c: New file.
11248 2002-10-05 Ulrich Drepper <drepper@redhat.com>
11250 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Tell the compiler that
11251 the asms modify the sem object.
11252 (__lll_sem_timedwait): Now takes struct sem* as first parameter.
11254 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h (sem_t): Don't expose
11255 the actual members.
11256 * pthreadP.h (struct sem): New type. Actual semaphore type.
11257 * semaphoreP.h: Include pthreadP.h.
11258 * sem_getvalue.c: Adjust to sem_t change.
11259 * sem_init.c: Likewise.
11260 * sem_open.c: Likewise.
11261 * sem_post.c: Likewise.
11262 * sem_timedwait.c: Likewise.
11263 * sem_trywait.c: Likewise.
11264 * sem_wait.c: Likewise.
11266 2002-10-04 Ulrich Drepper <drepper@redhat.com>
11268 * Makefile (tests): Add tst-basic2, tst-exec1, tst-exec3, tst-exec3.
11269 * tst-basic2.c: New file.
11270 * tst-exec1.c: New file.
11271 * tst-exec2.c: New file.
11272 * tst-exec3.c: New file.
11274 * tst-fork1.c: Remove extra */.
11276 * nptl 0.2 released. The API for IA-32 is complete.