1 2011-01-14 Ulrich Drepper <drepper@gmail.com>
4 * sysdeps/pthread/setxid.h (__SETXID_1): Add cast to assignment.
5 (__SETXID_2): Likewise.
6 (__SETXID_3): Likewise.
8 2011-01-13 Ulrich Drepper <drepper@gmail.com>
11 * Versions [libc] (GLIBC_PRIVATE): Export __libc_alloca_cutoff.
12 * alloca_cutoff.c: Add libc_hidden_def.
14 2010-10-13 H.J. Lu <hongjiu.lu@intel.com>
17 * sysdeps/x86_64/pthreaddef.h (TCB_ALIGNMENT): Changed to 32.
18 * sysdeps/x86_64/tls.h (TLS_TCB_ALIGN): Defined with alignment
21 2010-09-21 Andreas Schwab <schwab@redhat.com>
23 * sysdeps/pthread/pthread.h (pthread_cleanup_push)
24 [!__EXCEPTIONS]: Mangle local variable not_first_call.
25 (pthread_cleanup_push_defer_np): Likewise.
27 2010-09-03 Ulrich Drepper <drepper@redhat.com>
29 * sysdeps/pthread/allocalim.h (__libc_use_alloca): Expect blocks are
32 2010-08-10 Dinakar Guniguntala <dino@in.ibm.com>
33 Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
35 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: If
36 FUTEX_WAKE_OP fails make sure to call FUTEX_WAKE instead.
38 2010-08-12 H.J. Lu <hongjiu.lu@intel.com>
40 * sysdeps/unix/sysv/linux/i386/Makefile: New file.
42 2010-05-01 Alan Modra <amodra@gmail.com>
44 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
45 (PSEUDO): Use correct cr save. Don't use wrong parm save area
46 to save temps. Correct cfi for possible later frame manipulation.
47 (DOCARGS_1, UNDOCARGS_1): Use the correct parm save area.
48 (DOCARGS_2, UNDOCARGS_2, DOCARGS_3, UNDOCARGS_3): Likewise.
49 (DOCARGS_4, UNDOCARGS_4, DOCARGS_5, UNDOCARGS_5): Likewise.
50 (DOCARGS_6, UNDOCARGS_6): Likewise.
51 (CENABLE, CDISABLE): Add nops for non-shared calls.
53 2010-07-06 Andreas Schwab <schwab@redhat.com>
55 * sysdeps/unix/sysv/linux/pthread_getname.c (pthread_getname_np):
58 2010-07-03 Ulrich Drepper <drepper@redhat.com>
60 * tst-abstime.c (do_test): Some more cleanups
62 2010-07-02 Ulrich Drepper <drepper@redhat.com>
64 * tst-abstime.c: Correct testing and add test for sem_timedwait.
66 2010-07-01 Andreas Schwab <schwab@redhat.com>
67 Ulrich Drepper <drepper@redhat.com>
69 * Makefile (tests): Add tst-abstime.
70 * tst-abstime.c: New file.
71 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
72 (__lll_timedlock_wait): Check for timestamp before the Epoch.
73 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
74 (__lll_timedlock_wait): Likewise.
75 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
76 (__lll_robust_timedlock_wait): Likewise.
77 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
78 (__pthread_cond_timedwait): Likewise.
79 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
80 (pthread_rwlock_timedrdlock): Likewise.
81 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
82 (pthread_rwlock_timedwrlock): Likewise.
83 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
86 2010-07-01 Ulrich Drepper <drepper@redhat.com>
88 * Makefile (tst-_res1): Add tst-_res1mod1 to dependency list.
90 2010-06-01 Takashi Yoshii <takashi.yoshii.zj@renesas.com>
92 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Fix incorrect
93 location of ifndef __ASSUME_FUTEX_CLOCK_REALTIME.
95 2010-04-09 Ulrich Drepper <drepper@redhat.com>
98 * sysdeps/unix/sysv/linux/pthread_getname.c: New file.
99 * sysdeps/unix/sysv/linux/pthread_setname.c: New file.
100 * nptl/sysdeps/pthread/pthread.h: Declare pthread_getname and
102 * Makefile (libpthread-routines): Add pthread_getname and
104 * Versions: Export pthread_getname and pthread_setname for GLIBC_2.12.
106 2010-04-05 Thomas Schwinge <thomas@schwinge.name>
108 * sysdeps/pthread/unwind-resume.c: Moved to main tree sysdeps/gnu/.
109 * sysdeps/pthread/rt-unwind-resume.c: Likewise.
110 * sysdeps/pthread/Makefile: Remove csu section and rt section's
111 unwind-resume bits, now in main tree sysdeps/gnu/Makefile instead.
113 2010-03-23 Luis Machado <luisgpm@br.ibm.com>
115 * pthread_cond_timedwait.c: Add check for
116 HAVE_CLOCK_GETTIME_VSYSCALL to use VDSO whenever possible.
117 (pthread_cond_timedwait): Use INTERNAL_VSYSCALL instead of
120 2010-03-09 Ulrich Drepper <drepper@redhat.com>
122 * pthread_create.c (__pthread_create_2_1): If priorities are incorrect
123 and the call fails wake eventually waiting setxid threads. Don't free
124 stack here if we try starting a thread.
125 * sysdeps/pthread/createthread.c (do_clone): Only wake setxid waiter
126 if the clone call failed.
128 2010-03-08 Andreas Schwab <schwab@redhat.com>
130 * pthread_create.c (__pthread_create_2_1): Don't set setxid_futex.
131 * allocatestack.c (get_cached_stack): Set setxid_futex.
132 (allocate_stack): Likewise.
134 2010-03-05 Andreas Schwab <schwab@redhat.com>
135 Ulrich Drepper <drepper@redhat.com>
137 * allocatestack.c (setxid_mark_thread): Delay handling of thread if
138 it is creating a thread or it is just being created.
139 * pthread_create.c (start_thread): Wake setxid thread if it is
141 (__pthread_create_2_1): Initialize setxid_futex.
142 * sysdeps/pthread/createthread.c (do_clone): Wake setxid thread if it
145 2010-01-15 Ulrich Drepper <drepper@redhat.com>
147 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
149 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
151 2010-01-15 Michal Schmidt <mschmidt@redhat.com>
153 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
154 Fix pthread_cond_timedwait with requeue-PI.
155 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
156 Fix pthread_cond_wait with requeue-PI.
158 2010-01-14 Ulrich Drepper <drepper@redhat.com>
160 * Versions: Add pthread_mutex_consistent, pthread_mutexattr_getrobust,
161 and pthread_mutexattr_setrobust for GLIBC_2.12.
162 * pthread_mutex_consistent.c: Define alias pthread_mutex_consistent.
163 * pthread_mutexattr_getrobust.c: Define alias
164 pthread_mutexattr_getrobust.
165 * pthread_mutexattr_setrobust.c: Define alias
166 pthread_mutexattr_setrobust.
168 2010-01-12 Ulrich Drepper <drepper@redhat.com>
170 * sysdeps/pthread/pthread.h: Cleanup. Fix up for XPG7.
172 2010-01-08 Ulrich Drepper <drepper@redhat.com>
174 * sysdeps/pthread/pthread.h: Fix pthread_mutex_consistent declaration.
176 2009-12-18 Thomas Schwinge <thomas@codesourcery.com>
178 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c (_init): Don't
180 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c (_init): Likewise.
182 2009-12-17 Ulrich Drepper <drepper@redhat.com>
184 * pthread_rwlock_init.c (__pthread_rwlock_init): Simplify code by
187 2009-12-01 Dinakar Guniguntala <dino@in.ibm.com>
189 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.h: Define
190 FUTEX_WAIT_REQUEUE_PI and FUTEX_CMP_REQUEUE_PI.
191 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: If mutex
192 is a non robust PI mutex, then use FUTEX_CMP_REQUEUE_PI.
193 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
194 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: If mutex
195 is a non robust PI mutex, then use FUTEX_WAIT_REQUEUE_PI.
196 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
198 2009-12-12 Ulrich Drepper <drepper@redhat.com>
200 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
201 Don't update nwaiters after invalid timeout is recognized.
203 2009-11-27 Thomas Schwinge <thomas@codesourcery.com>
205 * sysdeps/unix/sysv/linux/sh/pt-initfini.c (_init): Don't call
208 2009-11-27 Andreas Schwab <schwab@redhat.com>
210 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Reload
211 THREAD_SELF->cancelhandling after returning from futex call.
213 2009-11-24 Ulrich Drepper <drepper@redhat.com>
215 * tst-sem13.c: New file.
216 * Makefile (tests): Add tst-sem13.
218 2009-11-22 Roland McGrath <roland@redhat.com>
220 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: # include "i686/dl-sysdep.h"
221 instead of recapitulating its contents.
223 2009-11-18 Ulrich Drepper <drepper@redhat.com>
225 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Minor
226 optimizations and cleanups.
228 2009-11-18 Dinakar Guniguntala <dino@in.ibm.com>
230 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
231 Remove redundant code. Fix cfi offsets.
232 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
235 2009-11-17 Ulrich Drepper <drepper@redhat.com>
237 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Minimally
238 reduce size of unwind info.
240 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Convert to use
242 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
243 Based on a patch by Dinakar Guniguntala <dino@in.ibm.com>.
245 2009-11-03 Andreas Schwab <schwab@linux-m68k.org>
248 * sysdeps/pthread/unwind-resume.c: Include <libgcc_s.h> and use
250 * sysdeps/pthread/unwind-forcedunwind.c: Likewise.
252 2009-10-30 Ulrich Drepper <drepper@redhat.com>
254 * tst-sem11.c (main): Rewrite to avoid aliasing problems.
257 * allocatestack.c (__nptl_setxid): Perform the operation in multiple
258 steps to avoid races with creation and terminations.
259 * nptl-init.c (sighandler_setxid): Adjust.
260 Patch by Daniel Jacobowitz.
262 2009-09-07 Andreas Schwab <schwab@redhat.com>
264 * sysdeps/pthread/bits/libc-lock.h (BP_SYM): Remove space before paren.
266 2009-09-02 Suzuki K P <suzuki@in.ibm.com>
267 Joseph Myers <joseph@codesourcery.com>
270 * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
271 Initialize the sigev_notify field for newly created timer to make sure
272 the timer gets deleted from the active timer's list upon timer_delete.
274 2009-08-27 Andrew Stubbs <ams@codesourcery.com>
276 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
277 Correct a logic error.
279 2009-08-25 Ulrich Drepper <drepper@redhat.com>
281 * sysdeps/x86_64/tls.h (RTLD_ENABLE_FOREIGN_CALL): Store old value
282 of the field in local variables.
283 (RTLD_FINALIZE_FOREIGN_CALL): Restore rtld_must_xmm_save from local
284 variable and don't unconditionally clear it.
286 2009-08-24 Ulrich Drepper <drepper@redhat.com>
288 * pthread_create.c (start_thread): Hint to the kernel that memory for
289 the stack can be reused. We do not mark all the memory. The part
290 still in use and some reserve are kept.
292 2009-08-23 Ulrich Drepper <drepper@redhat.com>
294 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Clean up namespace.
296 2009-08-11 Ulrich Drepper <drepper@redhat.com>
298 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Add CFI
301 2009-08-10 Ulrich Drepper <drepper@redhat.com>
303 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Add CFI
305 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
307 2009-08-10 Andreas Schwab <schwab@redhat.com>
309 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
310 (__pthread_cond_signal): Don't clobber register used for syscall
313 2009-08-08 Ulrich Drepper <drepper@redhat.com>
315 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
316 Optimize code path used when FUTEX_CLOCK_REALTIME is supported.
318 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
319 (__pthread_cond_wait): Optimize by avoiding use of callee-safe
322 2009-08-07 Ulrich Drepper <drepper@redhat.com>
324 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Little optimizations
325 enabled by the special *_asynccancel functions.
326 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
327 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
329 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Include lowlevellock.h.
331 2009-08-04 Ulrich Drepper <drepper@redhat.com>
333 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: New file.
334 * sysdeps/unix/sysv/linux/x86_64/libc-cancellation.S: New file.
335 * sysdeps/unix/sysv/linux/x86_64/librt-cancellation.S: New file.
336 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Optimize
337 since we can assume the special __*_{en,dis}able_asynccancel
339 (PUSHARGS_*, POPARGS_*, SAVESTK_*, RESTSTK_*): Removed.
340 * sysdeps/x86_64/tcb-offsets.sym: Add cancellation-related bits
341 and PTHREAD_CANCELED.
343 2009-07-31 Ulrich Drepper <drepper@redhat.com>
345 * descr.h: Better definition of *_BITMASK macros for cancellation.
347 2009-07-29 Ulrich Drepper <drepper@redhat.com>
349 * sysdeps/x86_64/tls.h (TLS_TCB_ALIGN): Define explicitly to 32.
351 * sysdeps/x86_64/tls.h (tcbhead_t): Add room for SSE registers the
352 dynamic linker might have to save.
353 Define RTLD_CHECK_FOREIGN_CALL, RTLD_ENABLE_FOREIGN_CALL,
354 RTLD_PREPARE_FOREIGN_CALL, and RTLD_FINALIZE_FOREIGN_CALL. Pretty
357 * sysdeps/x86_64/tcb-offsets.sym: Add RTLD_SAVESPACE_SSE.
359 2009-07-28 Ulrich Drepper <drepper@redhat.com>
361 * pthread_mutex_lock.c [NO_INCR] (__pthread_mutex_cond_lock_adjust):
363 * pthreadP.h: Declare __pthread_mutex_cond_lock_adjust.
364 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: Add ROBUST_BIT.
365 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Don't use
366 requeue_pi for robust mutexes.
367 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
368 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
369 Don't only skip __pthread_mutex_cond_lock. Call instead
370 __pthread_mutex_cond_lock_adjust.
371 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
373 * pthread_mutex_unlock.c (__pthread_mutex_unlock_full): Minor
374 optimization of PI mutex handling.
376 2009-07-27 Ulrich Drepper <drepper@redhat.com>
379 * pthread_mutex_unlock.c (__pthread_mutex_unlock_full): Use _rel
380 instead of of _acq variants of cmpxchg.
382 2009-07-23 Ulrich Drepper <drepper@redhat.com>
384 * sysdeps/x86_64/configure.in: New file.
386 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix error
387 path when not using absolute timeout futex.
389 2009-07-20 Ulrich Drepper <drepper@redhat.com>
391 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Minor
392 optimizations of last changes.
393 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
395 2009-07-19 Ulrich Drepper <drepper@redhat.com>
397 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
398 FUTEX_WAIT_REQUEUE_PI and FUTEX_CMP_REQUEUE_PI.
399 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: If mutex
400 is a PI mutex, then use FUTEX_CMP_REQUEUE_PI.
401 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
402 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: If mutex
403 is a PI mutex, then use FUTEX_WAIT_REQUEUE_PI.
404 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
406 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
407 (__pthread_cond_timedwait): Make more robust.
409 2009-07-18 Ulrich Drepper <drepper@redhat.com>
411 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
412 (__lll_robust_timedlock_wait): If possible use FUTEX_WAIT_BITSET to
413 directly use absolute timeout.
415 * tst-sem5.c (do_test): Add test for premature timeout.
416 * Makefile: Linu tst-sem5 with librt.
418 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
419 (pthread_rwlock_timedwrlock): If possible use FUTEX_WAIT_BITSET to
420 directly use absolute timeout.
421 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
422 (pthread_rwlock_timedrdlock): Likewise.
424 * tst-cond11.c (run_test): Add test to check that the timeout is
427 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
428 (__pthread_cond_timedwait): If possible use FUTEX_WAIT_BITSET to
429 directly use absolute timeout.
431 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
432 (__pthread_cond_wait): Convert to using exception handler instead of
433 registered unwind buffer.
434 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
435 (__pthread_cond_timedwait): Likewise.
437 2009-07-17 Ulrich Drepper <drepper@redhat.com>
439 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
440 If possible use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME to directly
441 use absolute timeout.
443 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Optimize
444 handling of uncontested semaphore.
446 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
447 (__condvar_cleanup): Rewrite to use cfi directives instead of
448 hand-coded unwind tables.
449 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S (__pthread_once):
451 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
452 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
455 2009-06-12 Ulrich Drepper <drepper@redhat.com>
457 * Makefile (libpthread-routines): Add pthread_sigqueue.
458 * Versions: Add pthread_sigqueue for GLIBC_2.11.
459 * sysdeps/pthread/bits/sigthread.h: Declare pthread_sigqueue.
460 * sysdeps/unix/sysv/linux/pthread_sigqueue.c: New file.
462 2009-06-11 Ulrich Drepper <drepper@redhat.com>
465 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
466 (LOAD_FUTEX_WAIT_ABS): Fix futex parameter in case private futexes
468 Patch by Bryan Kadzban <bz-glibc@kdzbn.homelinux.net>.
470 2009-05-16 Ulrich Drepper <drepper@redhat.com>
472 * libc-cancellation.c: Move __libc_cleanup_routine to...
473 * libc-cleanup.c: ...here. New file.
474 * Makefile (routines): Add libc-cleanup.
476 * cancellation.c (__pthread_disable_asynccancel): Remove unnecessary
478 * libc-cancellation.c: Use <nptl/cancellation.c: to define the code.
479 * sysdeps/pthread/librt-cancellation.c: Likewise.
482 * nptl-init.c: Renamed from init.c.
483 * Makefile: Change all occurences of init.c to nptl-init.c.
485 2009-05-15 Ulrich Drepper <drepper@redhat.com>
487 * cancellation.c (__pthread_disable_asynccancel): Correct the bits
488 to test when deciding on the delay.
489 * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
490 * pthread_cancel.c: Close race between deciding on sending a signal
491 and setting the CANCELING_BIT bit.
493 * cancellation.c (__pthread_disable_asynccancel): Don't return if
495 * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
497 2009-04-27 Ulrich Drepper <drepper@redhat.com>
499 * cancellation.c (__pthread_disable_asynccancel): Use THREAD_ATOMIC_AND
501 * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
502 * sysdeps/x86_64/tls.h: Define THREAD_ATOMIC_AND.
503 * sysdeps/i386/tls.h: Likewise.
504 (tcbhead_t): Add __private_tm member.
506 2009-04-26 Ulrich Drepper <drepper@redhat.com>
508 * sem_open.c (sem_open): Rewrite initialization of initsem to
511 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
512 Avoid warning by using may_alias attribute on ptrhack.
514 2009-04-22 Ulrich Drepper <drepper@redhat.com>
517 * pthread_attr_setschedparam.c (__pthread_attr_setschedparam):
518 Check policy and priority for validity.
519 Patch mostly by Zhang Xiliang <zhangxiliang@cn.fujitsu.com>.
521 2009-03-15 Ulrich Drepper <drepper@redhat.com>
523 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
524 (__pthread_cond_timedwait): Change to use cfi directives instead of
525 hand-coded unwind sections.
527 2009-03-10 Ulrich Drepper <drepper@redhat.com>
529 * init.c (nptl_freeres): Compile only for SHARED.
531 2009-03-09 Jakub Jelinek <jakub@redhat.com>
533 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Define
534 FUTEX_WAIT_BITSET, FUTEX_WAKE_BITSET, FUTEX_CLOCK_REALTIME and
535 FUTEX_BITSET_MATCH_ANY.
537 2009-02-27 Roland McGrath <roland@redhat.com>
539 * init.c (__nptl_initial_report_events): Mark __attribute_used__.
540 * pthread_create.c (__nptl_threads_events, __nptl_last_event): Likewise.
542 2009-02-26 Ulrich Drepper <drepper@redhat.com>
544 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
545 _POSIX_THREAD_ROBUST_PRIO_INHERIT and
546 _POSIX_THREAD_ROBUST_PRIO_PROTECT. Reset value of macros from
549 2009-02-25 Ulrich Drepper <drepper@redhat.com>
551 * sysdeps/pthread/pthread.h: The robust mutex functions are in
554 2009-02-24 Ulrich Drepper <drepper@redhat.com>
556 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_BITS_POSIX_OPT_H):
557 Unify name of include protector macro.
559 2009-02-14 SUGIOKA Toshinobu <sugioka@itonet.co.jp>
561 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
562 LOAD_FUTEX_WAIT_ABS even if (FUTEX_WAIT == 0).
564 2009-01-29 Ulrich Drepper <drepper@redhat.com>
566 * sysdeps/pthread/unwind-forcedunwind.c: Encrypt all function
569 * allocatestack.c (__free_stacks): Renamed from free_stacks.
570 (__free_stack_cache): Removed. Change callers to call __free_stacks.
571 * init.c (nptl_freeres): New function.
572 (pthread_functions): Initialize ptr_freeres to nptl_freeres.
573 * pthreadP.h: Don't declare __free_stack_cache. Declare __free_stacks.
574 * sysdeps/pthread/unwind-forcedunwind.c (libgcc_s_handle): New
576 (pthread_cancel_init): Depend in libgcc_s_handle for decision to
577 load DSO. Assign last.
578 (__unwind_freeres): New function.
580 * allocatestack.c (__reclaim_stacks): Reset in_flight_stack later
581 for better debugging. No need to use stack_list_add here.
583 2009-01-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
585 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
586 (__lll_timedlock_wait): Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME
587 instead of computing relative timeout.
588 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
589 FUTEX_CLOCK_REALTIME and FUTEX_BITSET_MATCH_ANY.
591 2009-01-25 Ulrich Drepper <drepper@redhat.com>
593 * pthread_mutex_lock.c (__pthread_mutex_lock): Remove unused label out.
595 2009-01-08 Ulrich Drepper <drepper@redhat.com>
597 * sysdeps/pthread/list.h (list_add): Initialize new element first.
598 (list_add_tail): Removed.
600 2009-01-07 Ulrich Drepper <drepper@redhat.com>
602 * (in_flight_stack): New variable.
603 (stack_list_del): New function. Use instead of list_del.
604 (stack_list_add): New function. Use instead of list_add when adding to
605 stack_cache and stack_used lists.
606 (__reclaim_stacks): Complete operations on stack_cache and stack_used lists
607 when the fork call interrupted another thread.
609 2009-01-04 Ulrich Drepper <drepper@redhat.com>
611 * init.c (__pthread_initialize_minimal_internal): Optimize test
612 FUTEX_CLOCK_REALTIME a bit.
614 2009-01-03 Ulrich Drepper <drepper@redhat.com>
616 * init.c (__pthread_initialize_minimal_internal): Cheat a bit by
617 only passing five parameters to FUTEX_WAIT_BITSET call.
619 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
620 (__lll_timedlock_wait): Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME
621 instead of computing relative timeout.
623 2009-01-02 Ulrich Drepper <drepper@redhat.com>
625 * init.c (__pthread_initialize_minimal_internal): Check for
626 FUTEX_CLOCK_REALTIME flag.
627 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
628 Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME instead of computing
631 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
632 FUTEX_CLOCK_REALTIME and FUTEX_BITSET_MATCH_ANY.
633 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
634 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
635 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
636 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
638 2008-12-09 Ulrich Drepper <drepper@redhat.com>
640 * sysdeps/pthread/pthread.h (pthread_cleanup_pop): Use { } as empty
641 loop body instead of ; to avoid gcc warnings.
642 (pthread_cleanup_pop_restore_np): Likewise.
643 Patch by Caolán McNamara <caolanm@redhat.com>.
645 2008-12-09 Jakub Jelinek <jakub@redhat.com>
647 * pthread_mutex_lock.c (__pthread_mutex_lock): Handle only the
648 fast path here, for robust/PI/PP mutexes call
649 __pthread_mutex_lock_full. Don't use switch, instead use a series
650 of ifs according to their probability.
651 (__pthread_mutex_lock_full): New function.
652 * pthread_mutex_unlock.c: Include assert.h.
653 (__pthread_mutex_unlock_usercnt): Handle only the
654 fast path here, for robust/PI/PP mutexes call
655 __pthread_mutex_unlock_full. Don't use switch, instead use a series
656 of ifs according to their probability.
657 (__pthread_mutex_unlock_full): New function.
658 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c
659 (__pthread_mutex_lock_full): Define.
661 2008-12-08 Ulrich Drepper <drepper@redhat.com>
663 * sysdeps/x86_64/tls.h (tcbhead_t): Add fields reserved for TM
664 implementation. Add necessary padding and.
665 * descr.h (struct pthread): Increase padding for tcbhead_t to 24
668 2008-12-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
670 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define FUTEX_WAIT_BITSET
671 and FUTEX_WAKE_BITSET.
673 2008-12-02 Ulrich Drepper <drepper@redhat.com>
675 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_WAIT_BITSET
676 and FUTEX_WAKE_BITSET.
677 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
678 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
679 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
680 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
682 2008-11-25 Roland McGrath <roland@redhat.com>
684 * sysdeps/alpha, sysdeps/unix/sysv/linux/alpha:
685 Subdirectories moved to ports repository as
686 sysdeps/.../nptl subdirectories.
688 2008-11-12 Jakub Jelinek <jakub@redhat.com>
691 * pthread_condattr_setclock.c (pthread_condattr_setclock): Fix masking
693 * pthread_cond_init.c (__pthread_cond_init): Fix
694 cond->__data.__nwaiters initialization.
695 * Makefile (tests): Add tst-cond23.
696 * tst-cond23.c: New test.
698 2008-11-07 Jakub Jelinek <jakub@redhat.com>
700 * sysdeps/pthread/malloc-machine.h (MALLOC): Adjust __libc_tsd_define
702 (tsd_setspecific, tsd_getspecific): Adjust __libc_tsd_{set,get}
705 2008-11-01 Ulrich Drepper <drepper@redhat.com>
708 * pthread_mutex_lock.c: Add support for private PI mutexes.
709 * pthread_mutex_timedlock.c: Likewise.
710 * pthread_mutex_trylock.c: Likewise.
711 * pthread_mutex_unlock.c: Likewise.
712 Patch mostly by Ben Jackson <ben@ben.com>.
714 2008-10-31 Ulrich Drepper <drepper@redhat.com>
717 * sysdeps/pthread/gai_misc.h (__gai_create_helper_thread):
718 Increase stack size for helper thread.
720 2008-10-06 Martin Schwidefsky <schwidefsky@de.ibm.com>
722 * sysdeps/s390/tls.h (THREAD_SET_STACK_GUARD): Add empty inline
723 assembly with a clobber list for access registers a0 and a1.
725 2008-09-11 Martin Schwidefsky <schwidefsky@de.ibm.com>
727 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Add memory barrier
728 to force runp->refcntr to be read from memory.
730 2008-09-08 Richard Guenther <rguenther@suse.de>
732 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_lock,
733 lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
734 lll_timedlock, lll_robust_timedlock, lll_unlock,
735 lll_robust_unlock): Promote private to int.
737 2008-08-15 Ulrich Drepper <drepper@redhat.com>
739 * sysdeps/x86_64/pthreaddef.h: Remove ARCH_MAP_FLAGS and
740 ARCH_RETRY_MMAP definitions.
741 * allocatestack.c: Remove definition of ARCH_MAP_FLAGS.
742 Define MAP_STACK when not defined.
743 (allocate_stack): Use MAP_STACK instead of ARCH_MAP_FLAGS. Remove
744 handling of ARCH_RETRY_MMAP.
746 2008-07-30 Ulrich Drepper <drepper@redhat.com>
748 * tst-align2.c (f): Print message that f is reached.
750 2008-04-28 Hiroki Kaminaga <kaminaga@sm.sony.co.jp>
753 * sysdeps/powerpc/tcb-offsets.sym (PRIVATE_FUTEX_OFFSET): Guard symbol
754 definition with #ifndef __ASSUME_PRIVATE_FUTEX.
756 2008-07-25 Ulrich Drepper <drepper@redhat.com>
758 * sysdeps/unix/sysv/linux/mq_notify.c (init_mq_netlink): Use
759 SOCK_CLOEXEC if possible.
761 2008-05-29 Ulrich Drepper <drepper@redhat.com>
763 * Makefile (tests): Add tst-rwlock2a.
764 * tst-rwlock2.c: Use TYPE macro to decide what rwlock type to use.
765 * tst-rwlock2a.c: New file.
767 2008-06-12 Ulrich Drepper <drepper@redhat.com>
769 * sysdeps/pthread/pthread.h: Remove inadvertant checkin.
771 2008-05-17 Samuel Thibault <samuel.thibault@ens-lyon.org>
773 * sysdeps/pthread/pthread.h: Fix typo in comment.
775 2008-05-28 Ulrich Drepper <drepper@redhat.com>
777 * sysdeps/pthread/createthread.c (do_clone): Pass accurate length
778 of CPU set to the kernel.
780 2008-05-23 Paul Pluzhnikov <ppluzhnikov@google.com>
782 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Add
784 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
785 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
786 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
787 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
788 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
789 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
791 2008-05-22 Paul Pluzhnikov <ppluzhnikov@google.com>
793 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S: Add
795 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
797 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
799 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
802 2008-05-26 Ulrich Drepper <drepper@redhat.com>
804 * tst-typesizes.c: Explicitly check __SIZEOF_PTHREAD_* constants.
806 2008-05-20 Jakub Jelinek <jakub@redhat.com>
808 David S. Miller <davem@davemloft.net>
810 * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: New file.
812 2008-05-10 Ulrich Drepper <drepper@redhat.com>
814 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Access
816 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
818 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
820 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
822 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
824 Reported by Clemens Kolbitsch <clemens.kol@gmx.at>.
826 2008-04-14 David S. Miller <davem@davemloft.net>
828 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
829 (__old_sem_wait): Fix argument to lll_futex_wait().
831 2007-11-26 Daniel Jacobowitz <dan@codesourcery.com>
833 * pthread_create.c: Require pthread_mutex_trylock and
834 pthread_key_delete for libgcc.
836 2008-04-08 Jakub Jelinek <jakub@redhat.com>
839 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h
840 (lll_futex_wake_unlock): Add private argument to the pre-v9 macro.
841 Patch by Sunil Amitkumar Janki <devel.sjanki@gmail.com>.
843 2008-03-27 Ulrich Drepper <drepper@redhat.com>
845 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine ARG_MAX if
846 <linux/limits.h> has defined it.
847 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
848 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
849 * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
850 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
852 2008-03-18 Jakub Jelinek <jakub@redhat.com>
854 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Use __ASSEMBLER__ instead
856 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
857 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Likewise.
859 2008-03-14 Ulrich Drepper <drepper@redhat.com>
861 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
862 HAVE_DL_DISCOVER_OSVERSION.
863 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
864 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Likewise.
866 2008-03-07 Ulrich Drepper <drepper@redhat.com>
869 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Change
870 _POSIX_CHOWN_RESTRICTED value to zero.
872 2008-01-31 Roland McGrath <roland@redhat.com>
874 * Makefile (omit-deps): Variable removed.
876 2008-01-30 Ulrich Drepper <drepper@redhat.com>
878 * sysdeps/unix/sysv/linux/x86_64/sem_post.S (sem_post): Avoid
879 unnecessary addr32 prefix.
881 2008-01-29 Roland McGrath <roland@redhat.com>
883 * Makeconfig (ptw-CPPFLAGS, sysd-rules-patterns): New variables.
885 2008-01-22 Kaz Kojima <kkojima@rr.iij4u.or.jp>
887 * sysdeps/unix/sysv/linux/sh/sem_post.S: Don't overflow value field.
889 2008-01-21 Kaz Kojima <kkojima@rr.iij4u.or.jp>
891 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XADD): Use
893 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
894 (__lll_lock_wait_private): Fix typo.
895 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
896 (pthread_barrier_wait): Likewise. Adjust XADD use.
897 * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
899 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S
900 (pthread_rwlock_timedrdlock): Return correct return value.
901 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S
902 (pthread_rwlock_timedwrlock): Likewise.
904 2008-01-15 Ulrich Drepper <drepper@redhat.com>
906 * tst-eintr2.c (do_test): make sure that if mutex_lock in main
907 thread returns the program exits with an error code.
909 2008-01-10 Ulrich Drepper <drepper@redhat.com>
911 * pthread-errnos.sym: Add EOVERFLOW.
912 * sysdeps/unix/sysv/linux/structsem.sym: Add SEM_VALUE_MAX.
913 * sysdeps/unix/sysv/linux/sem_post.c: Don't overflow value field.
914 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
915 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
917 2007-12-14 Ulrich Drepper <drepper@redhat.com>
919 * sysdeps/x86_64/pthreaddef.h (ARCH_RETRY_MMAP): Take additional
920 parameter. Passed it as permission to mmap.
921 * allocatestack.c (allocate_stack): Pass prot as second parameter
924 2007-12-12 Ulrich Drepper <drepper@redhat.com>
926 * tst-basic7.c: Allocate memory for the stack.
929 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S [!SHARED]
930 (__pthread_cond_timedwait): Don't use VDSO.
931 Patch by Michal Januszewski.
933 2007-12-07 Ulrich Drepper <drepper@redhat.com>
936 * sysdeps/pthread/pthread.h [!__EXCEPTIONS] (pthread_cleanup_pop):
937 Allow label before pthread_cleanup_pop.
938 (pthread_cleanup_pop_restore_np): Likewise.
940 2007-12-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
942 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
943 Store 2 before returning ETIMEDOUT.
945 2007-11-23 Ulrich Drepper <drepper@redhat.com>
947 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
948 Store 2 before returning ETIMEDOUT.
949 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise
950 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
951 (__lll_lock_wait_private): Optimize.
952 (__lll_lock_wait): Likewise.
954 2007-11-20 Jakub Jelinek <jakub@redhat.com>
956 * sysdeps/pthread/pthread.h (pthread_cleanup_push,
957 pthread_cleanup_push_defer_np): Add extra (void *) cast to shut up
958 g++ 4.1 and 4.2 -Wstrict-aliasing warnings.
960 2007-11-08 Ulrich Drepper <drepper@redhat.com>
963 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
964 If we time out, try one last time to lock the futex to avoid
965 losing a wakeup signal.
966 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
967 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
970 * sysdeps/pthread/createthread.c (do_clone): Translate clone error
973 2007-11-07 Ulrich Drepper <drepper@redhat.com>
976 * allocatestack.c (allocate_stack): Change ENOMEM error in case
977 mmap failed to EAGAIN.
978 * Makefile (tests): Add tst-basic7.
979 * tst-basic7.c: New file.
981 2007-11-05 Ulrich Drepper <drepper@redhat.com>
983 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
986 2007-11-03 Mike Frysinger <vapier@gentoo.org>
988 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (LOAD_FUTEX_WAIT): Add
989 missing line continuations.
990 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S (LOAD_FUTEX_WAIT,
991 LOAD_FUTEX_WAKE): Likewise. Also add missing 3rd parameter.
993 2007-10-28 Ulrich Drepper <drepper@redhat.com>
996 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Declare
997 __active_timer_sigev_thread and __active_timer_sigev_thread_lock.
998 (struct timer): Add next element.
999 * sysdeps/unix/sysv/linux/timer_create.c: For SIGEV_THREAD timers,
1000 enqueue timer structure into __active_timer_sigev_thread list.
1001 * sysdeps/unix/sysv/linux/timer_delete.c: For SIGEV_THREAD timers,
1002 remove timer struct from __active_timer_sigev_thread.
1003 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
1004 Before using timer structure make sure it is still on the
1005 __active_timer_sigev_thread list. Keep lock until done.
1006 Define __active_timer_sigev_thread and
1007 __active_timer_sigev_thread_lock.
1009 2007-10-27 Ulrich Drepper <drepper@redhat.com>
1011 * sysdeps/pthread/malloc-machine.h: Define ATFORK_MEM.
1012 Redefine thread_atfork for use of ATFORK_MEM.
1013 * sysdeps/unix/sysv/linux/fork.h: Define __linkin_atfork.
1014 * sysdeps/unix/sysv/linux/register-atfork.c (__linkin_atfork): New
1016 * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
1017 Use atomic operation when removing first element of list.
1019 2007-10-17 Jakub Jelinek <jakub@redhat.com>
1021 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__old_sem_post): New
1022 routine instead of an alias to __new_sem_post.
1024 2007-10-15 Jakub Jelinek <jakub@redhat.com>
1026 * init.c (__pthread_initialize_minimal): Initialize word to appease
1029 2007-10-10 Jakub Jelinek <jakub@redhat.com>
1031 * sysdeps/pthread/bits/libc-lock.h (__libc_rwlock_init): Inside of
1032 libc.so just clear NAME.
1033 (__libc_rwlock_fini): Nop inside of libc.so.
1034 * tst-initializers1.c (main): Test if PTHREAD_RWLOCK_INITIALIZER is
1037 2007-09-02 Ulrich Drepper <drepper@redhat.com>
1039 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
1040 (__pthread_cond_wait): Fix unlocking of internal lock after mutex
1042 Patch by Luca Barbieri <luca.barbieri@gmail.com>.
1044 2007-08-21 Ulrich Drepper <drepper@redhat.com>
1047 * allocatestack.c (__reclaim_stacks): Clear the TSD in the
1048 reclaimed stack if necessary.
1049 * Makefile (tests): Add tst-tsd6.
1050 * tst-tsd6.c: New file.
1052 2007-08-21 Jakub Jelinek <jakub@redhat.com>
1054 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_dead):
1055 Add private argument.
1057 2007-08-20 Ulrich Drepper <drepper@redhat.com>
1059 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1060 (__pthread_cond_timedwait): Use clock_gettime from VDSO if possible.
1062 2007-08-16 Jakub Jelinek <jakub@redhat.com>
1064 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h
1065 (__lll_robust_timedlock): Pass private as last argument to
1066 __lll_robust_timedlock_wait.
1067 (__lll_unlock): Fix a pasto.
1069 2007-08-15 Jakub Jelinek <jakub@redhat.com>
1071 * sysdeps/unix/sysv/linux/sparc/internaltypes.h (sparc_new_sem,
1072 sparc_old_sem): New structs.
1073 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
1074 (__sem_wait_cleanup): New function.
1075 (__new_sem_wait): Use sparc_new_sem structure. Bump and afterwards
1076 decrease nwaiters. Register __sem_wait_cleanup as cleanup handler.
1077 Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
1079 (__old_sem_wait): New function.
1080 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: Include
1081 nptl/sysdeps/unix/sysv/linux/sparc version.
1082 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c:
1084 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: Likewise.
1085 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c
1086 (__new_sem_trywait): Use sparc_old_sem structure.
1087 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c
1088 (sem_timedwait): 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
1091 lll_futex_timed_wait.
1092 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c (__new_sem_post):
1093 Use sparc_new_sem structure. Only wake if nwaiters > 0. Pass
1094 isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
1096 (__old_sem_post): New function.
1097 * sysdeps/unix/sysv/linux/sparc/sem_wait.c: New file.
1098 * sysdeps/unix/sysv/linux/sparc/sem_init.c: New file.
1099 * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c: New file.
1100 * sysdeps/unix/sysv/linux/sparc/sem_post.c: New file.
1101 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: Remove.
1102 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: Remove.
1104 2007-08-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1106 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
1107 (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
1108 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
1109 Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
1110 * sysdeps/unix/sysv/linux/shpthread_cond_signal.S
1111 (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
1112 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
1114 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
1115 kernel-features.h and tcb-offsets.h.
1116 (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
1117 lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
1119 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
1121 (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE
1122 to lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
1124 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use #ifdef
1125 __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
1126 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
1127 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
1128 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
1129 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
1130 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
1132 2007-08-14 Jakub Jelinek <jakub@redhat.com>
1134 * sysdeps/unix/sysv/linux/lowlevellock.c: Comment fix.
1135 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
1136 (__lll_timedwait_tid): Pass LLL_SHARED as 4th argument to
1137 lll_futex_timed_wait.
1139 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (__lll_unlock,
1140 __lll_robust_unlock): Rewrite as macros instead of inline functions.
1141 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_unlock,
1142 __lll_robust_unlock, __lll_wait_tid): Likewise.
1144 2007-08-13 Jakub Jelinek <jakub@redhat.com>
1146 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
1148 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
1149 (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
1150 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
1151 Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
1152 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
1153 (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
1154 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
1155 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Include
1157 (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
1158 lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
1159 process private. Switch DW_CFA_advance_loc1 and some
1160 DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
1161 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
1162 (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE to
1163 lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
1164 process private. Switch DW_CFA_advance_loc{1,2} and some
1165 DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
1166 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use
1167 #ifdef __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
1168 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1170 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
1171 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
1172 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1174 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
1175 (__pthread_cond_broadcast): Compare %r8 instead of
1176 dep_mutex-cond_*(%rdi) with $-1.
1177 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
1178 (__pthread_cond_signal): Xor FUTEX_WAKE_OP with FUTEX_WAKE instead
1181 2007-08-13 Ulrich Drepper <drepper@redhat.com>
1183 * sysdeps/unix/sysv/linux/i386/i786/Implies: New file.
1185 2007-08-13 Jakub Jelinek <jakub@redhat.com>
1187 * allocatestack.c: Include kernel-features.h.
1188 * pthread_create.c: Likewise.
1189 * pthread_mutex_init.c: Likewise.
1191 * pthread_cond_timedwait.c: Likewise.
1192 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
1193 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
1194 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
1195 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
1196 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
1197 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1198 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1200 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1202 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
1203 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
1204 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
1205 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
1207 2007-08-12 Jakub Jelinek <jakub@redhat.com>
1209 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
1210 [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
1211 byte elements. One of them is the new __shared element.
1212 [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
1213 adjust names of other padding elements.
1214 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
1215 [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
1216 byte elements. One of them is the new __shared element.
1217 [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
1218 adjust names of other padding elements.
1219 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_rwlock_t):
1220 Renamed __pad1 element to __shared, adjust names of other padding
1222 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
1223 (pthread_rwlock_t): Likewise.
1224 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock): Fix a
1227 2007-08-09 Anton Blanchard <anton@samba.org>
1229 * sysdeps/unix/sysv/linux/powerpc/pthread_spin_unlock.c: New file.
1231 2007-08-12 Ulrich Drepper <drepper@redhat.com>
1233 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Include
1234 <kernel-features.h>.
1235 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1237 2007-08-11 Ulrich Drepper <drepper@redhat.com>
1239 * pthreadP.h (PTHREAD_ROBUST_MUTEX_PSHARED): Define.
1240 * pthread_mutex_lock.c: Use it instead of PTHREAD_MUTEX_PSHARED when
1241 dealing with robust mutexes.
1242 * pthread_mutex_timedlock.c: Likewise.
1243 * pthread_mutex_trylock.c: Likewise.
1244 * pthread_mutex_unlock.c: Likewise.
1245 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
1247 2007-08-06 Jakub Jelinek <jakub@redhat.com>
1249 * pthreadP.h (PTHREAD_MUTEX_PSHARED_BIT): Define.
1250 (PTHREAD_MUTEX_TYPE): Mask __kind with 127.
1251 (PTHREAD_MUTEX_PSHARED): Define.
1252 * pthread_mutex_init.c (__pthread_mutex_init): Set
1253 PTHREAD_MUTEX_PSHARED_BIT for pshared or robust
1255 * pthread_mutex_lock.c (LLL_MUTEX_LOCK): Take mutex as argument
1256 instead of its __data.__lock field, pass PTHREAD_MUTEX_PSHARED
1257 as second argument to lll_lock.
1258 (LLL_MUTEX_TRYLOCK): Take mutex as argument
1259 instead of its __data.__lock field.
1260 (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
1261 __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
1263 (__pthread_mutex_lock): Update LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
1264 LLL_ROBUST_MUTEX_LOCK users, use PTHREAD_MUTEX_TYPE (mutex)
1265 instead of mutex->__data.__kind directly, pass
1266 PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock and lll_futex_wait.
1267 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Use
1268 PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
1269 directly, pass PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock.
1270 (pthread_mutex_timedlock): Pass PTHREAD_MUTEX_PSHARED (mutex)
1271 to lll_timedlock, lll_robust_timedlock, lll_unlock and
1272 lll_futex_timed_wait. Use PTHREAD_MUTEX_TYPE (mutex) instead
1273 of mutex->__data.__kind directly.
1274 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Pass
1275 PTHREAD_MUTEX_PSHARED (mutex) to lll_timedlock,
1276 lll_robust_timedlock, lll_unlock and lll_futex_timed_wait. Use
1277 PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind directly.
1278 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Pass
1279 PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock, lll_robust_unlock
1281 * pthread_mutex_setprioceiling.c (pthread_mutex_setprioceiling): Pass
1282 PTHREAD_MUTEX_PSHARED (mutex) to lll_futex_wait and lll_futex_wake.
1283 Use PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
1285 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK):
1286 Take mutex as argument instead of its __data.__lock field, pass
1287 PTHREAD_MUTEX_PSHARED as second argument to lll_cond_lock.
1288 (LLL_MUTEX_TRYLOCK): Take mutex as argument instead of its
1289 __data.__lock field.
1290 (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
1291 __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
1292 to lll_robust_cond_lock.
1293 * pthread_cond_broadcast.c (__pthread_cond_broadcast): Add pshared
1294 variable, pass it to lll_lock, lll_unlock, lll_futex_requeue and
1295 lll_futex_wake. Don't use lll_futex_requeue if dependent mutex
1296 has PTHREAD_MUTEX_PSHARED_BIT bit set in its __data.__kind.
1297 * pthread_cond_destroy.c (__pthread_cond_destroy): Add pshared
1298 variable, pass it to lll_lock, lll_unlock, lll_futex_wake and
1300 * pthread_cond_signal.c (__pthread_cond_signal): Add pshared
1301 variable, pass it to lll_lock, lll_unlock, lll_futex_wake_unlock and
1303 * pthread_cond_timedwait.c (__pthread_cond_wait): Add
1304 pshared variable, pass it to lll_lock, lll_unlock,
1305 lll_futex_timedwait and lll_futex_wake.
1306 * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait): Add
1307 pshared variable, pass it to lll_lock, lll_unlock, lll_futex_wait
1309 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_requeue,
1310 lll_futex_wake_unlock): Add private argument, use __lll_private_flag
1312 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue,
1313 lll_futex_wake_unlock): Likewise.
1314 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_requeue):
1316 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_futex_requeue,
1317 lll_futex_wake_unlock): Likewise.
1318 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_requeue):
1320 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue,
1321 lll_futex_wake_unlock): Likewise.
1322 (lll_futex_wake): Fix a typo.
1323 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym (PS_BIT): Add.
1324 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
1325 (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
1326 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
1327 Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
1328 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
1329 (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
1330 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
1331 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1332 (__pthread_cond_timedwait): Likewise.
1333 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
1334 (__condvar_cleanup, __pthread_cond_wait): Likewise.
1336 2007-08-05 Jakub Jelinek <jakub@redhat.com>
1338 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
1339 Don't use CGOTSETUP and CGOTRESTORE macros.
1340 (CGOTSETUP, CGOTRESTORE): Remove.
1341 <IS_IN_rtld> (CENABLE, CDISABLE): Don't use JUMPTARGET, branch to
1344 2007-08-01 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1346 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Remove
1347 definitions for private futexes.
1348 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Include
1349 kernel-features.h and lowlevellock.h. Use private futexes if
1351 (__lll_lock_wait_private, __lll_unlock_wake_private): New.
1352 (__lll_mutex_lock_wait): Rename to
1353 (__lll_lock_wait): ... this. Don't compile in for libc.so.
1354 (__lll_mutex_timedlock_wait): Rename to ...
1355 (__lll_timedlock_wait): ... this. Use __NR_gettimeofday.
1356 Don't compile in for libc.so.
1357 (__lll_mutex_unlock_wake): Rename to ...
1358 (__lll_unlock_wake): ... this. Don't compile in for libc.so.
1359 (__lll_timedwait_tid): Use __NR_gettimeofday.
1360 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Allow including
1361 the header from assembler. Renamed all lll_mutex_* resp.
1362 lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
1363 Renamed all LLL_MUTEX_LOCK_* macros to LLL_LOCK_*.
1364 (FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE):
1366 (__lll_lock_wait_private): Add prototype.
1367 (__lll_lock_wait, __lll_timedlock_wait, __lll_robust_lock_wait,
1368 __lll_robust_timedlock_wait, __lll_unlock_wake_private,
1369 __lll_unlock_wake): Likewise.
1370 (lll_lock): Add private argument. Call __lll_lock_wait_private
1371 if private is constant LLL_PRIVATE.
1372 (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
1373 lll_timedlock, lll_robust_timedlock): Add private argument.
1374 (lll_unlock): Add private argument. Call __lll_unlock_wake_private
1375 if private is constant LLL_PRIVATE.
1376 (lll_robust_unlock, lll_robust_dead): Add private argument.
1377 (lll_lock_t): Remove.
1378 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
1379 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
1380 lll_cond_wake, lll_cond_broadcast): Remove.
1381 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: Include
1382 kernel-features.h and lowlevellock.h.
1383 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
1384 (LOAD_FUTEX_WAIT): Define.
1385 (__lll_robust_mutex_lock_wait): Rename to ...
1386 (__lll_robust_lock_wait): ... this. Add private argument.
1387 Use LOAD_FUTEX_WAIT macro.
1388 (__lll_robust_mutex_timedlock_wait): Rename to ...
1389 (__lll_robust_timedlock_wait): ... this. Add private argument.
1390 Use __NR_gettimeofday. Use LOAD_FUTEX_WAIT macro.
1391 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Include
1393 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
1394 (pthread_barrier_wait): Use __lll_{lock,unlock}_* instead of
1395 __lll_mutex_{lock,unlock}_*.
1396 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Include
1397 lowlevellock.h and pthread-errnos.h.
1398 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
1399 FUTEX_CMP_REQUEUE, EINVAL): Remove.
1400 (__pthread_cond_broadcast): Use __lll_{lock,unlock}_* instead of
1401 __lll_mutex_{lock,unlock}_*.
1402 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Include
1403 lowlevellock.h and pthread-errnos.h.
1404 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE, EINVAL): Remove.
1405 (__pthread_cond_signal): Use __lll_{lock,unlock}_* instead of
1406 __lll_mutex_{lock,unlock}_*.
1407 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
1409 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE): Remove.
1410 (__pthread_cond_timedwait): Use __lll_{lock,unlock}_* instead of
1411 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
1412 (__condvar_tw_cleanup): Likewise.
1413 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
1415 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
1416 (__pthread_cond_wait): Use __lll_{lock,unlock}_* instead of
1417 __lll_mutex_{lock,unlock}_*.
1418 ( __condvar_w_cleanup): Likewise.
1419 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Include lowlevellock.h.
1420 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
1421 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Include
1423 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
1424 (__pthread_rwlock_rdlock): Use __lll_{lock,unlock}_* instead of
1425 __lll_mutex_{lock,unlock}_*.
1426 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Include
1428 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
1429 FUTEX_PRIVATE_FLAG): Remove.
1430 (pthread_rwlock_timedrdlock): Use __lll_{lock,unlock}_* instead of
1431 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
1432 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Include
1434 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
1435 FUTEX_PRIVATE_FLAG): Remove.
1436 (pthread_rwlock_timedwrlock): Use __lll_{lock,unlock}_* instead of
1437 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
1438 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Include
1440 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
1441 (__pthread_rwlock_unlock): Use __lll_{lock,unlock}_* instead of
1442 __lll_mutex_{lock,unlock}_*.
1443 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Include
1445 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
1446 (__pthread_rwlock_wrlock): Use __lll_{lock,unlock}_* instead of
1447 __lll_mutex_{lock,unlock}_*.
1448 * sysdeps/unix/sysv/linux/sh/sem_post.S: Include lowlevellock.h.
1449 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
1450 (__new_sem_post): Use standard initial exec code sequences.
1451 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Include
1453 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
1454 FUTEX_PRIVATE_FLAG): Remove.
1455 (sem_timedwait): Use __NR_gettimeofday. Use standard initial
1456 exec code sequences.
1457 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Include lowlevellock.h.
1458 (__new_sem_trywait): Use standard initial exec code sequences.
1459 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Include lowlevellock.h.
1460 (__new_sem_wait): Use standard initial exec code sequences.
1462 2007-07-31 Anton Blanchard <anton@samba.org>
1464 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
1465 Use __asm __volatile (__lll_acq_instr ::: "memory") instead of
1466 atomic_full_barrier.
1468 2007-07-31 Jakub Jelinek <jakub@redhat.com>
1470 * allocatestack.c (stack_cache_lock): Change type to int.
1471 (get_cached_stack, allocate_stack, __deallocate_stack,
1472 __make_stacks_executable, __find_thread_by_id, __nptl_setxid,
1473 __pthread_init_static_tls, __wait_lookup_done): Add LLL_PRIVATE
1474 as second argument to lll_lock and lll_unlock macros on
1476 * pthread_create.c (__find_in_stack_list): Likewise.
1477 (start_thread): Similarly with pd->lock. Use lll_robust_dead
1478 macro instead of lll_robust_mutex_dead, pass LLL_SHARED to it
1480 * descr.h (struct pthread): Change lock and setxid_futex field
1482 * old_pthread_cond_broadcast.c (__pthread_cond_broadcast_2_0): Use
1483 LLL_LOCK_INITIALIZER instead of LLL_MUTEX_LOCK_INITIALIZER.
1484 * old_pthread_cond_signal.c (__pthread_cond_signal_2_0): Likewise.
1485 * old_pthread_cond_timedwait.c (__pthread_cond_timedwait_2_0):
1487 * old_pthread_cond_wait.c (__pthread_cond_wait_2_0): Likewise.
1488 * pthread_cond_init.c (__pthread_cond_init): Likewise.
1489 * pthreadP.h (__attr_list_lock): Change type to int.
1490 * pthread_attr_init.c (__attr_list_lock): Likewise.
1491 * pthread_barrier_destroy.c (pthread_barrier_destroy): Pass
1492 ibarrier->private ^ FUTEX_PRIVATE_FLAG as second argument to
1494 * pthread_barrier_wait.c (pthread_barrier_wait): Likewise and
1495 also for lll_futex_{wake,wait}.
1496 * pthread_barrier_init.c (pthread_barrier_init): Make iattr
1498 * pthread_cond_broadcast.c (__pthread_cond_broadcast): Pass
1499 LLL_SHARED as second argument to lll_{,un}lock.
1500 * pthread_cond_destroy.c (__pthread_cond_destroy): Likewise.
1501 * pthread_cond_signal.c (__pthread_cond_singal): Likewise.
1502 * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
1503 * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait):
1505 * pthread_getattr_np.c (pthread_getattr_np): Add LLL_PRIVATE
1506 as second argument to lll_{,un}lock macros on pd->lock.
1507 * pthread_getschedparam.c (__pthread_getschedparam): Likewise.
1508 * pthread_setschedparam.c (__pthread_setschedparam): Likewise.
1509 * pthread_setschedprio.c (pthread_setschedprio): Likewise.
1510 * tpp.c (__pthread_tpp_change_priority, __pthread_current_priority):
1512 * sysdeps/pthread/createthread.c (do_clone, create_thread):
1514 * pthread_once.c (once_lock): Change type to int.
1515 (__pthread_once): Pass LLL_PRIVATE as second argument to
1516 lll_{,un}lock macros on once_lock.
1517 * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Use
1518 lll_{,un}lock macros instead of lll_mutex_{,un}lock, pass
1519 rwlock->__data.__shared as second argument to them and similarly
1521 * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock):
1523 * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock):
1525 * pthread_rwlock_tryrdlock.c (__pthread_rwlock_tryrdlock): Likewise.
1526 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Likewise.
1527 * pthread_rwlock_unlock.c (__pthread_rwlock_unlock): Likewise.
1528 * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
1529 * sem_close.c (sem_close): Pass LLL_PRIVATE as second argument
1530 to lll_{,un}lock macros on __sem_mappings_lock.
1531 * sem_open.c (check_add_mapping): Likewise.
1532 (__sem_mappings_lock): Change type to int.
1533 * semaphoreP.h (__sem_mappings_lock): Likewise.
1534 * pthread_mutex_lock.c (LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
1535 LLL_ROBUST_MUTEX_LOCK): Use lll_{,try,robust_}lock macros
1536 instead of lll_*mutex_*, pass LLL_SHARED as last
1538 (__pthread_mutex_lock): Use lll_unlock instead of lll_mutex_unlock,
1539 pass LLL_SHARED as last argument.
1540 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK,
1541 LLL_MUTEX_TRYLOCK, LLL_ROBUST_MUTEX_LOCK): Use
1542 lll_{cond_,cond_try,robust_cond}lock macros instead of lll_*mutex_*,
1543 pass LLL_SHARED as last argument.
1544 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
1545 lll_{timed,try,robust_timed,un}lock instead of lll_*mutex*, pass
1546 LLL_SHARED as last argument.
1547 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Similarly.
1548 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt):
1550 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_lock,
1551 __libc_lock_lock_recursive, __libc_lock_unlock,
1552 __libc_lock_unlock_recursive): Pass LLL_PRIVATE as second
1553 argument to lll_{,un}lock.
1554 * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_lock,
1555 _IO_lock_unlock): Likewise.
1556 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Don't use
1558 * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
1559 Pass LLL_PRIVATE as second argument to lll_{,un}lock macros on
1561 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork,
1562 free_mem): Likewise.
1563 (__fork_lock): Change type to int.
1564 * sysdeps/unix/sysv/linux/fork.h (__fork_lock): Likewise.
1565 * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Pass
1566 isem->private ^ FUTEX_PRIVATE_FLAG as second argument to
1568 * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
1569 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Likewise.
1570 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait_private):
1572 (__lll_lock_wait, __lll_timedlock_wait): Add private argument and
1573 pass it through to lll_futex_*wait, only compile in when
1575 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
1576 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): Add private
1577 argument and pass it through to lll_futex_*wait.
1578 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Renamed all
1579 lll_mutex_* resp. lll_robust_mutex_* macros to lll_* resp.
1580 lll_robust_*. Renamed all __lll_mutex_* resp. __lll_robust_mutex_*
1581 inline functions to __lll_* resp. __lll_robust_*.
1582 (LLL_MUTEX_LOCK_INITIALIZER): Remove.
1583 (lll_mutex_dead): Add private argument.
1584 (__lll_lock_wait_private): New prototype.
1585 (__lll_lock_wait, __lll_robust_lock_wait, __lll_lock_timedwait,
1586 __lll_robust_lock_timedwait): Add private argument to prototypes.
1587 (__lll_lock): Add private argument, if it is constant LLL_PRIVATE,
1588 call __lll_lock_wait_private, otherwise pass private to
1590 (__lll_robust_lock, __lll_cond_lock, __lll_timedlock,
1591 __lll_robust_timedlock): Add private argument, pass it to
1592 __lll_*wait functions.
1593 (__lll_unlock): Add private argument, if it is constant LLL_PRIVATE,
1594 call __lll_unlock_wake_private, otherwise pass private to
1596 (__lll_robust_unlock): Add private argument, pass it to
1597 __lll_robust_unlock_wake.
1598 (lll_lock, lll_robust_lock, lll_cond_lock, lll_timedlock,
1599 lll_robust_timedlock, lll_unlock, lll_robust_unlock): Add private
1600 argument, pass it through to __lll_* inline function.
1601 (__lll_mutex_unlock_force, lll_mutex_unlock_force): Remove.
1602 (lll_lock_t): Remove.
1603 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
1604 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
1605 lll_cond_wake, lll_cond_broadcast): Remove.
1606 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
1607 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
1608 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
1609 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
1610 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Allow including
1611 the header from assembler. Renamed all lll_mutex_* resp.
1612 lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
1613 (LOCK, FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP,
1614 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
1615 (LLL_MUTEX_LOCK_INITIALIZER, LLL_MUTEX_LOCK_INITIALIZER_LOCKED,
1616 LLL_MUTEX_LOCK_INITIALIZER_WAITERS): Remove.
1617 (__lll_mutex_lock_wait, __lll_mutex_timedlock_wait,
1618 __lll_mutex_unlock_wake, __lll_lock_wait, __lll_unlock_wake):
1620 (__lll_trylock_asm, __lll_lock_asm_start, __lll_unlock_asm): Define.
1621 (lll_robust_trylock, lll_cond_trylock): Use LLL_LOCK_INITIALIZER*
1622 rather than LLL_MUTEX_LOCK_INITIALIZER* macros.
1623 (lll_trylock): Likewise, use __lll_trylock_asm, pass
1624 MULTIPLE_THREADS_OFFSET as another asm operand.
1625 (lll_lock): Add private argument, use __lll_lock_asm_start, pass
1626 MULTIPLE_THREADS_OFFSET as last asm operand, call
1627 __lll_lock_wait_private if private is constant LLL_PRIVATE,
1628 otherwise pass private as another argument to __lll_lock_wait.
1629 (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
1630 lll_timedlock, lll_robust_timedlock): Add private argument, pass
1631 private as another argument to __lll_*lock_wait call.
1632 (lll_unlock): Add private argument, use __lll_unlock_asm, pass
1633 MULTIPLE_THREADS_OFFSET as another asm operand, call
1634 __lll_unlock_wake_private if private is constant LLL_PRIVATE,
1635 otherwise pass private as another argument to __lll_unlock_wake.
1636 (lll_robust_unlock): Add private argument, pass private as another
1637 argument to __lll_unlock_wake.
1638 (lll_robust_dead): Add private argument, use __lll_private_flag
1640 (lll_islocked): Use LLL_LOCK_INITIALIZER instead of
1641 LLL_MUTEX_LOCK_INITIALIZER.
1642 (lll_lock_t): Remove.
1643 (LLL_LOCK_INITIALIZER_WAITERS): Define.
1644 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
1645 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
1646 lll_cond_wake, lll_cond_broadcast): Remove.
1647 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
1648 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Revert
1649 2007-05-2{3,9} changes.
1650 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Include
1651 kernel-features.h and lowlevellock.h.
1652 (LOAD_PRIVATE_FUTEX_WAIT): Define.
1653 (LOAD_FUTEX_WAIT): Rewritten.
1654 (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
1656 (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
1657 (__lll_mutex_lock_wait): Rename to ...
1658 (__lll_lock_wait): ... this. Take futex addr from %edx instead of
1659 %ecx, %ecx is now private argument. Don't compile in for libc.so.
1660 (__lll_mutex_timedlock_wait): Rename to ...
1661 (__lll_timedlock_wait): ... this. Use __NR_gettimeofday. %esi
1662 contains private argument. Don't compile in for libc.so.
1663 (__lll_mutex_unlock_wake): Rename to ...
1664 (__lll_unlock_wake): ... this. %ecx contains private argument.
1665 Don't compile in for libc.so.
1666 (__lll_timedwait_tid): Use __NR_gettimeofday.
1667 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Include
1668 kernel-features.h and lowlevellock.h.
1669 (LOAD_FUTEX_WAIT): Define.
1670 (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
1672 (__lll_robust_mutex_lock_wait): Rename to ...
1673 (__lll_robust_lock_wait): ... this. Futex addr is now in %edx
1674 argument, %ecx argument contains private. Use LOAD_FUTEX_WAIT
1676 (__lll_robust_mutex_timedlock_wait): Rename to ...
1677 (__lll_robust_timedlock_wait): ... this. Use __NR_gettimeofday.
1678 %esi argument contains private, use LOAD_FUTEX_WAIT macro.
1679 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Include
1681 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1682 (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
1683 PRIVATE(%ebx) ^ LLL_SHARED as private argument in %ecx to
1684 __lll_lock_wait and __lll_unlock_wake, pass MUTEX(%ebx) address
1685 to __lll_lock_wait in %edx.
1686 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
1687 Include lowlevellock.h and pthread-errnos.h.
1688 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
1689 FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
1690 (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*, pass
1691 cond_lock address in %edx rather than %ecx to __lll_lock_wait,
1692 pass LLL_SHARED in %ecx to both __lll_lock_wait and
1694 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
1695 Include lowlevellock.h and pthread-errnos.h.
1696 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
1697 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
1698 (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*, pass
1699 cond_lock address in %edx rather than %ecx to __lll_lock_wait,
1700 pass LLL_SHARED in %ecx to both __lll_lock_wait and
1702 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
1703 Include lowlevellock.h.
1704 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
1706 (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*, pass
1707 cond_lock address in %edx rather than %ecx to __lll_lock_wait,
1708 pass LLL_SHARED in %ecx to both __lll_lock_wait and
1709 __lll_unlock_wake. Use __NR_gettimeofday.
1710 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
1711 Include lowlevellock.h.
1712 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1713 (__pthread_cond_wait, __condvar_w_cleanup): Rename __lll_mutex_*
1714 to __lll_*, pass cond_lock address in %edx rather than %ecx to
1715 __lll_lock_wait, pass LLL_SHARED in %ecx to both __lll_lock_wait
1716 and __lll_unlock_wake.
1717 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S:
1718 Include lowlevellock.h.
1719 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1720 (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*, pass
1721 MUTEX(%ebx) address in %edx rather than %ecx to
1722 __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
1723 and __lll_unlock_wake. Move return value from %ecx to %edx
1725 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1726 Include lowlevellock.h.
1727 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
1729 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
1730 MUTEX(%ebp) address in %edx rather than %ecx to
1731 __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
1732 and __lll_unlock_wake. Move return value from %ecx to %edx
1733 register. Use __NR_gettimeofday.
1734 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1735 Include lowlevellock.h.
1736 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
1738 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
1739 MUTEX(%ebp) address in %edx rather than %ecx to
1740 __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
1741 and __lll_unlock_wake. Move return value from %ecx to %edx
1742 register. Use __NR_gettimeofday.
1743 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
1744 Include lowlevellock.h.
1745 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1746 (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*, pass
1747 MUTEX(%edi) address in %edx rather than %ecx to
1748 __lll_lock_wait, pass PSHARED(%edi) in %ecx to both __lll_lock_wait
1749 and __lll_unlock_wake.
1750 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
1751 Include lowlevellock.h.
1752 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1753 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
1754 MUTEX(%ebx) address in %edx rather than %ecx to
1755 __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
1756 and __lll_unlock_wake. Move return value from %ecx to %edx
1758 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Include
1760 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
1762 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Include lowlevellock.h.
1763 (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
1764 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Include
1766 (LOCK, SYS_futex, SYS_gettimeofday, FUTEX_WAIT): Don't define.
1767 (sem_timedwait): Use __NR_gettimeofday.
1768 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Include
1770 (LOCK): Don't define.
1771 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include
1773 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
1774 * sysdeps/unix/sysv/linux/powerpc/sem_post.c: Wake only when there
1776 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Revert
1777 2007-05-2{3,9} changes.
1778 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Include
1779 kernel-features.h and lowlevellock.h.
1780 (LOAD_PRIVATE_FUTEX_WAIT): Define.
1781 (LOAD_FUTEX_WAIT): Rewritten.
1782 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
1783 (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
1784 (__lll_mutex_lock_wait): Rename to ...
1785 (__lll_lock_wait): ... this. %esi is now private argument.
1786 Don't compile in for libc.so.
1787 (__lll_mutex_timedlock_wait): Rename to ...
1788 (__lll_timedlock_wait): ... this. %esi contains private argument.
1789 Don't compile in for libc.so.
1790 (__lll_mutex_unlock_wake): Rename to ...
1791 (__lll_unlock_wake): ... this. %esi contains private argument.
1792 Don't compile in for libc.so.
1793 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Include
1794 kernel-features.h and lowlevellock.h.
1795 (LOAD_FUTEX_WAIT): Define.
1796 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
1797 (__lll_robust_mutex_lock_wait): Rename to ...
1798 (__lll_robust_lock_wait): ... this. %esi argument contains private.
1799 Use LOAD_FUTEX_WAIT macro.
1800 (__lll_robust_mutex_timedlock_wait): Rename to ...
1801 (__lll_robust_timedlock_wait): ... this. %esi argument contains
1802 private, use LOAD_FUTEX_WAIT macro.
1803 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Include
1805 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1806 (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
1807 PRIVATE(%rdi) ^ LLL_SHARED as private argument in %esi to
1808 __lll_lock_wait and __lll_unlock_wake.
1809 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S:
1810 Include lowlevellock.h and pthread-errnos.h.
1811 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
1812 FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
1813 (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*,
1814 pass LLL_SHARED in %esi to both __lll_lock_wait and
1816 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S:
1817 Include lowlevellock.h and pthread-errnos.h.
1818 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
1819 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
1820 (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*,
1821 pass LLL_SHARED in %esi to both __lll_lock_wait and
1823 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:
1824 Include lowlevellock.h.
1825 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1826 (__pthread_cond_timedwait): 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_wait.S:
1830 Include lowlevellock.h.
1831 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1832 (__pthread_cond_wait, __condvar_cleanup): Rename __lll_mutex_*
1833 to __lll_*, pass LLL_SHARED in %esi to both __lll_lock_wait
1834 and __lll_unlock_wake.
1835 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S:
1836 Include lowlevellock.h.
1837 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1839 (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*,
1840 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
1841 and __lll_unlock_wake.
1842 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
1843 Include lowlevellock.h.
1844 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1846 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
1847 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
1848 and __lll_unlock_wake.
1849 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1850 Include lowlevellock.h.
1851 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1853 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
1854 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
1855 and __lll_unlock_wake.
1856 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S:
1857 Include lowlevellock.h.
1858 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1860 (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*,
1861 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
1862 and __lll_unlock_wake.
1863 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S:
1864 Include lowlevellock.h.
1865 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1867 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
1868 pass PSHARED(%rdi) in %ecx to both __lll_lock_wait
1869 and __lll_unlock_wake.
1870 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Include
1872 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
1874 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Include lowlevellock.h.
1875 (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
1876 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Include
1878 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
1879 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Include
1881 (LOCK): Don't define.
1882 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Include
1884 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
1885 * sysdeps/unix/sysv/linux/sparc/internaltypes.h: New file.
1886 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_destroy.c: New file.
1887 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_init.c: New file.
1888 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_wait.c: New file.
1889 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
1890 (__lll_lock_wait_private): New function.
1891 (__lll_lock_wait, __lll_timedlock_wait): Add private argument, pass
1892 it to lll_futex_*wait. Don't compile in for libc.so.
1893 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c:
1895 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c
1896 (struct sparc_pthread_barrier): Remove.
1897 (pthread_barrier_wait): Use union sparc_pthread_barrier instead of
1898 struct sparc_pthread_barrier. Pass
1899 ibarrier->s.pshared ? LLL_SHARED : LLL_PRIVATE to lll_{,un}lock
1900 and lll_futex_wait macros.
1901 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
1903 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
1904 Include sparc pthread_barrier_wait.c instead of generic one.
1906 2007-07-30 Jakub Jelinek <jakub@redhat.com>
1908 * tst-rwlock14.c (do_test): Avoid warnings on 32-bit arches.
1910 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
1911 (pthread_rwlock_timedrdlock): Copy futex retval to %esi rather than
1913 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
1914 (pthread_rwlock_timedwrlock): Likewise.
1915 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
1916 (__pthread_rwlock_unlock): Fix MUTEX != 0 args to __lll_*.
1918 2007-07-31 Jakub Jelinek <jakub@redhat.com>
1920 * sysdeps/sparc/tls.h (tcbhead_t): Add private_futex field.
1922 2007-07-26 Jakub Jelinek <jakub@redhat.com>
1924 * tst-locale2.c (useless): Add return statement.
1926 2007-07-24 Jakub Jelinek <jakub@redhat.com>
1928 * allocatestack.c (__nptl_setxid, __wait_lookup_done): Replace
1929 lll_private_futex_* (*) with lll_futex_* (*, LLL_PRIVATE).
1930 * pthread_create.c (start_thread): Likewise.
1931 * init.c (sighandler_setxid): Likewise.
1932 * sysdeps/alpha/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1933 * sysdeps/ia64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1934 * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1935 * sysdeps/s390/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1936 * sysdeps/powerpc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1937 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1938 * sysdeps/sparc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1939 * sysdeps/sh/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1940 * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY, AIO_MISC_WAIT):
1942 * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY, GAI_MISC_WAIT):
1944 * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
1946 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_waitzero,
1947 __rtld_notify): Likewise.
1948 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Likewise.
1949 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (clear_once_control,
1950 __pthread_once): Likewise.
1951 * sysdeps/unix/sysv/linux/alpha/pthread_once.c (clear_once_control,
1952 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1953 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1954 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1955 (lll_futex_wait): Add private argument, define as wrapper around
1956 lll_futex_timed_wait.
1957 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1958 use __lll_private_flag macro.
1959 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
1960 __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
1961 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (clear_once_control,
1962 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1963 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1964 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1965 (lll_futex_wait): Add private argument, define as wrapper around
1966 lll_futex_timed_wait.
1967 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1968 use __lll_private_flag macro.
1969 (__lll_mutex_unlock, __lll_robust_mutex_unlock, lll_wait_tid,
1970 __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
1971 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
1973 (lll_futex_timed_wait, lll_futex_wake): Use it.
1974 (lll_private_futex_wait, lll_private_futex_timed_wait,
1975 lll_private_futex_wake): Removed.
1976 * sysdeps/unix/sysv/linux/s390/pthread_once.c (clear_once_control,
1977 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1978 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1979 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1980 (lll_futex_wait): Add private argument, define as wrapper around
1981 lll_futex_timed_wait.
1982 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1983 use __lll_private_flag macro.
1984 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
1985 lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
1987 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
1988 (lll_private_futex_wait, lll_private_futex_timed_wait,
1989 lll_private_futex_wake): Removed.
1990 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_private_flag):
1991 Fix !__ASSUME_PRIVATE_FUTEX non-constant private case.
1992 (lll_private_futex_wait, lll_private_futex_timed_wait,
1993 lll_private_futex_wake): Removed.
1994 * sysdeps/unix/sysv/linux/sparc/pthread_once.c (clear_once_control,
1995 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1996 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1997 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1998 (lll_futex_wait): Add private argument, define as wrapper around
1999 lll_futex_timed_wait.
2000 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
2001 use __lll_private_flag macro.
2002 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
2003 lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
2005 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (__lll_private_flag):
2007 (lll_futex_timed_wait, lll_futex_wake): Use it.
2008 (lll_private_futex_wait, lll_private_futex_timed_wait,
2009 lll_private_futex_wake): Removed.
2011 2007-07-27 Jakub Jelinek <jakub@redhat.com>
2013 * sysdeps/sparc/tls.h (tcbhead_t): Move gscope_flag to the end
2014 of the structure for sparc32.
2016 2007-07-26 Aurelien Jarno <aurelien@aurel32.net>
2018 * sysdeps/sparc/tls.h (tcbhead_t): Add gscope_flag.
2020 2007-07-23 Ulrich Drepper <drepper@redhat.com>
2022 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
2023 code used when private futexes are assumed.
2024 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
2027 2007-07-23 Jakub Jelinek <jakub@redhat.com>
2029 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
2030 (__lll_private_flag): Define.
2031 (lll_futex_wait): Define as a wrapper around lll_futex_timed_wait.
2032 (lll_futex_timed_wait, lll_futex_wake, lll_futex_wake_unlock): Use
2034 (lll_private_futex_wait, lll_private_futex_timedwait,
2035 lll_private_futex_wake): Define as wrapper around non-_private
2037 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
2038 (__lll_private_flag): Define.
2039 (lll_futex_timed_wait, lll_futex_wake): Use __lll_private_flag.
2040 (lll_private_futex_wait, lll_private_futex_timedwait,
2041 lll_private_futex_wake): Define as wrapper around non-_private
2044 2007-07-10 Steven Munroe <sjmunroe@us.ibm.com>
2046 * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Add LLL_SHARED
2047 parameter to lll_futex_wait call.
2048 * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
2050 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
2051 Replace lll_futex_wait with lll_private_futex_wait.
2052 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
2053 Add LLL_SHARED parameter to lll_futex_wake().
2055 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define LLL_PRIVATE
2056 LLL_SHARED, lll_private_futex_wait, lll_private_futex_timed_wait and
2057 lll_private_futex_wake.
2058 (lll_futex_wait): Add private parameter. Adjust FUTEX_PRIVATE_FLAG
2059 bit from private parm before syscall.
2060 (lll_futex_timed_wait): Likewise.
2061 (lll_futex_wake): Likewise.
2062 (lll_futex_wake_unlock): Likewise.
2063 (lll_mutex_unlock): Add LLL_SHARED parm to lll_futex_wake call.
2064 (lll_robust_mutex_unlock): Likewise.
2065 (lll_mutex_unlock_force): Likewise.
2066 (lll_wait_tid): Add LLL_SHARED parm to lll_futex_wait call.
2068 2007-07-23 Ulrich Drepper <drepper@redhat.com>
2070 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
2071 compilation when unconditionally using private futexes.
2072 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
2073 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
2075 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
2076 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
2078 2007-07-17 Jakub Jelinek <jakub@redhat.com>
2080 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock_clear_flags2):
2083 2007-07-06 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2085 * sysdeps/sh/tls.h: Include stdlib.h, list.h, sysdep.h and
2088 2007-05-16 Roland McGrath <roland@redhat.com>
2090 * init.c (__nptl_initial_report_events): New variable.
2091 (__pthread_initialize_minimal_internal): Initialize pd->report_events
2094 2007-06-22 Jakub Jelinek <jakub@redhat.com>
2096 * pthread_getattr_np.c (pthread_getattr_np): Clear cpuset and
2097 cpusetsize if pthread_getaffinity_np failed with ENOSYS.
2099 2007-06-19 Ulrich Drepper <drepper@redhat.com>
2101 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Remove mrlock
2104 2007-06-18 Ulrich Drepper <drepper@redhat.com>
2106 * pthreadP.h: Define PTHREAD_MUTEX_TYPE.
2107 * phtread_mutex_lock.c: Use PTHREAD_MUTEX_TYPE.
2108 * pthread_mutex_timedlock.c: Likewise.
2109 * pthread_mutex_trylock.c: Likewise.
2110 * pthread_mutex_unlock.c: Likewise.
2112 2007-06-17 Andreas Schwab <schwab@suse.de>
2114 * sysdeps/pthread/pt-initfini.c: Tell gcc about the nonstandard
2117 2007-06-17 Ulrich Drepper <drepper@redhat.com>
2119 * allocatestack.c (allocate_stack): Make code compile if
2120 __ASSUME_PRIVATE_FUTEX is set.
2122 2007-06-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2124 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S:
2125 (__pthread_rwlock_rdlock): Don't use non SH-3/4 instruction.
2126 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S:
2127 (__pthread_rwlock_wrlock): Likewise.
2128 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
2129 (pthread_rwlock_timedrdlock): Likewise.
2130 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
2131 (pthread_rwlock_timedwrlock): Likewise.
2132 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S:
2133 (__pthread_rwlock_unlock): Likewise.
2135 2007-06-10 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2137 * sysdeps/sh/tcb-offsets.sym: Add PRIVATE_FUTEX.
2138 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Include endian.h.
2139 Split __flags into __flags, __shared, __pad1 and __pad2.
2140 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Use private
2141 futexes if they are available.
2142 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Adjust so that change
2143 in libc-lowlevellock.S allow using private futexes.
2144 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
2145 FUTEX_PRIVATE_FLAG. Add additional parameter to lll_futex_wait,
2146 lll_futex_timed_wait and lll_futex_wake. Change lll_futex_wait
2147 to call lll_futex_timed_wait. Add lll_private_futex_wait,
2148 lll_private_futex_timed_wait and lll_private_futex_wake.
2149 (lll_robust_mutex_unlock): Fix typo.
2150 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Use private
2151 field in futex command setup.
2152 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Use
2153 COND_NWAITERS_SHIFT instead of COND_CLOCK_BITS.
2154 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
2155 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use private futexes
2156 if they are available. Remove clear_once_control.
2157 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Use private
2158 futexes if they are available.
2159 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
2160 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
2161 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
2162 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
2163 * sysdeps/unix/sysv/linux/sh/sem_post.S: Add private futex support.
2164 Wake only when there are waiters.
2165 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add private futex
2166 support. Indicate that there are waiters. Remove unnecessary
2167 extra cancellation test.
2168 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise. Removed
2169 left-over duplication of __sem_wait_cleanup.
2171 2007-06-07 Ulrich Drepper <drepper@redhat.com>
2173 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Add additional
2174 parameter to lll_futex_wait, lll_futex_timed_wait, and
2175 lll_futex_wake. Change lll_futex_wait to call lll_futex_timed_wait.
2176 Add lll_private_futex_wait, lll_private_futex_timed_wait, and
2177 lll_private_futex_wake.
2178 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
2179 * allocatestack.c: Adjust use of lll_futex_* macros.
2181 * lowlevellock.h: Likewise.
2182 * pthread_barrier_wait.c: Likewise.
2183 * pthread_cond_broadcast.c: Likewise.
2184 * pthread_cond_destroy.c: Likewise.
2185 * pthread_cond_signal.c: Likewise.
2186 * pthread_cond_timedwait.c: Likewise.
2187 * pthread_cond_wait.c: Likewise.
2188 * pthread_create.c: Likewise.
2189 * pthread_mutex_lock.c: Likewise.
2190 * pthread_mutex_setprioceiling.c: Likewise.
2191 * pthread_mutex_timedlock.c: Likewise.
2192 * pthread_mutex_unlock.c: Likewise.
2193 * pthread_rwlock_timedrdlock.c: Likewise.
2194 * pthread_rwlock_timedwrlock.c: Likewise.
2195 * pthread_rwlock_unlock.c: Likewise.
2196 * sysdeps/alpha/tls.h: Likewise.
2197 * sysdeps/i386/tls.h: Likewise.
2198 * sysdeps/ia64/tls.h: Likewise.
2199 * sysdeps/powerpc/tls.h: Likewise.
2200 * sysdeps/pthread/aio_misc.h: Likewise.
2201 * sysdeps/pthread/gai_misc.h: Likewise.
2202 * sysdeps/s390/tls.h: Likewise.
2203 * sysdeps/sh/tls.h: Likewise.
2204 * sysdeps/sparc/tls.h: Likewise.
2205 * sysdeps/unix/sysv/linux/fork.c: Likewise.
2206 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
2207 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: Likewise.
2208 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Likewise.
2209 * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
2210 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
2211 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
2212 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
2213 * sysdeps/unix/sysv/linux/sparc/pthread_once.c: Likewise.
2214 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c:
2216 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: Likewise.
2217 * sysdeps/x86_64/tls.h: Likewise.
2219 2007-05-29 Ulrich Drepper <drepper@redhat.com>
2221 * pthread_getattr_np.c: No need to install a cancellation handler,
2222 this is no cancellation point.
2223 * pthread_getschedparam.c: Likewise.
2224 * pthread_setschedparam.c: Likewise.
2225 * pthread_setschedprio.c: Likewise.
2226 * sysdeps/unix/sysv/linux/lowlevellock.c: Remove all traces of
2228 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
2229 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
2230 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
2231 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2232 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2233 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2234 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
2235 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
2236 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
2237 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: Likewise.
2238 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
2239 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2241 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Checking
2242 whether there are more than one thread makes no sense here since
2243 we only call the slow path if the locks are taken.
2244 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Likewise.
2246 * sysdeps/unix/sysv/linux/internaltypes.h: Introduce
2247 COND_NWAITERS_SHIFT.
2248 * pthread_cond_destroy.c: Use COND_NWAITERS_SHIFT instead of
2250 * pthread_cond_init.c: Likewise.
2251 * pthread_cond_timedwait.c: Likewise.
2252 * pthread_cond_wait.c: Likewise.
2253 * pthread_condattr_getclock.c: Likewise.
2254 * pthread_condattr_setclock.c: Likewise.
2255 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Likewise.
2256 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2257 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
2258 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
2259 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2261 2007-05-28 Jakub Jelinek <jakub@redhat.com>
2263 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c: Include
2266 * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Use explicit
2268 (THREAD_GSCOPE_GET_FLAG): Remove.
2269 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Remove.
2270 * allocatestack.c (__wait_lookup_done): Revert 2007-05-24
2272 * sysdeps/powerpc/tls.h (tcbhead_t): Remove gscope_flag.
2273 (THREAD_GSCOPE_GET_FLAG): Remove.
2274 (THREAD_GSCOPE_RESET_FLAG): Use THREAD_SELF->header.gscope_flag
2275 instead of THREAD_GSCOPE_GET_FLAG.
2276 (THREAD_GSCOPE_SET_FLAG): Likewise. Add atomic_write_barrier after
2278 * sysdeps/s390/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
2279 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
2280 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
2281 THREAD_GSCOPE_WAIT): Define.
2282 * sysdeps/sparc/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
2283 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
2284 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
2285 THREAD_GSCOPE_WAIT): Define.
2286 * sysdeps/sh/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
2287 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
2288 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
2289 THREAD_GSCOPE_WAIT): Define.
2290 * sysdeps/ia64/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
2291 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
2292 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
2293 THREAD_GSCOPE_WAIT): Define.
2295 2007-05-24 Richard Henderson <rth@redhat.com>
2297 * descr.h (struct pthread): Add header.gscope_flag.
2298 * sysdeps/alpha/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
2299 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
2300 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
2301 THREAD_GSCOPE_WAIT): Define.
2303 2007-05-27 Ulrich Drepper <drepper@redhat.com>
2305 * init.c: Make it compile with older kernel headers.
2307 * tst-initializers1.c: Show through exit code which test failed.
2309 * pthread_rwlock_init.c: Also initialize __shared field.
2310 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Split __flags
2311 element in rwlock structure into four byte elements. One of them is
2312 the new __shared element.
2313 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h [__WORDSIZE=32]:
2315 [__WORDSIZE=64]: Renamed __pad1 element int rwlock structure to
2316 __shared, adjust names of other padding elements.
2317 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2318 * sysdeps/pthread/pthread.h: Adjust rwlock initializers.
2319 * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: Add PSHARED.
2320 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define
2322 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Change main
2323 futex to use private operations if possible.
2324 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
2326 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
2328 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
2329 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
2330 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
2331 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2333 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2335 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
2336 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
2338 2007-05-26 Ulrich Drepper <drepper@redhat.com>
2340 * pthreadP.h (PTHREAD_RWLOCK_PREFER_READER_P): Define.
2341 * pthread_rwlock_rdlock.c: Use PTHREAD_RWLOCK_PREFER_READER_P.
2342 * pthread_rwlock_timedrdlock.c: Likewise.
2343 * pthread_rwlock_tryrdlock.c: Likewise.
2345 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S (sem_trywait): Tiny
2348 * sysdeps/unix/sysv/linux/sem_wait.c: Add missing break.
2349 * sysdeps/unix/sysv/linux/sem_timedwait.c: Removed left-over
2350 duplication of __sem_wait_cleanup.
2352 * allocatestack.c: Revert last change.
2354 * sysdeps/i386/tls.h: Likewise.
2355 * sysdeps/x86_64/tls.h: Likewise.
2356 * descr.h [TLS_DTV_AT_TP] (struct pthread): Add private_futex field to
2358 * sysdeps/powerpc/tcb-offsets.sym: Add PRIVATE_FUTEX_OFFSET.
2360 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_barrier):
2362 * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: Add PRIVATE definition.
2363 * pthread_barrier_init.c: Set private flag if pshared and private
2364 futexes are supported.
2365 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Use
2366 private field in futex command setup.
2367 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
2369 2007-05-25 Ulrich Drepper <drepper@redhat.com>
2371 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Add private futex
2373 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
2374 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
2375 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
2376 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
2377 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
2379 * semaphoreP.h: Declare __old_sem_init and __old_sem_wait.
2380 * sem_init.c (__new_sem_init): Rewrite to initialize all three
2381 fields in the structure.
2382 (__old_sem_init): New function.
2383 * sem_open.c: Initialize all fields of the structure.
2384 * sem_getvalue.c: Adjust for renamed element.
2385 * sysdeps/unix/sysv/linux/Makefile [subdir=nptl]
2386 (gen-as-const-headers): Add structsem.sym.
2387 * sysdeps/unix/sysv/linux/structsem.sym: New file.
2388 * sysdeps/unix/sysv/linux/internaltypes.h: Rename struct sem to
2389 struct new_sem. Add struct old_sem.
2390 * sysdeps/unix/sysv/linux/sem_post.c: Wake only when there are waiters.
2391 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
2392 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
2393 * sysdeps/unix/sysv/linux/sem_wait.c: Indicate that there are waiters.
2394 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
2395 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
2396 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
2397 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
2398 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
2399 * Makefile (tests): Add tst-sem10, tst-sem11, tst-sem12.
2400 * tst-sem10.c: New file.
2401 * tst-sem11.c: New file.
2402 * tst-sem12.c: New file.
2403 * tst-typesizes.c: Test struct new_sem and struct old_sem instead
2406 2007-05-25 Ulrich Drepper <drepper@redhat.com>
2407 Jakub Jelinek <jakub@redhat.com>
2409 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
2410 Move __pthread_enable_asynccancel right before futex syscall.
2411 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
2414 2007-05-24 Jakub Jelinek <jakub@redhat.com>
2416 * sysdeps/i386/tls.h (THREAD_SET_PRIVATE_FUTEX,
2417 THREAD_COPY_PRIVATE_FUTEX): Define.
2418 * sysdeps/x86_64/tls.h (THREAD_SET_PRIVATE_FUTEX,
2419 THREAD_COPY_PRIVATE_FUTEX): Define.
2420 * allocatestack.c (allocate_stack): Use THREAD_COPY_PRIVATE_FUTEX.
2421 * init.c (__pthread_initialize_minimal_internal): Use
2422 THREAD_SET_PRIVATE_FUTEX.
2424 * sysdeps/powerpc/tls.h (tcbhead_t): Add gscope_flag.
2425 (THREAD_GSCOPE_FLAG_UNUSED, THREAD_GSCOPE_FLAG_USED,
2426 THREAD_GSCOPE_FLAG_WAIT): Define.
2427 (THREAD_GSCOPE_GET_FLAG, THREAD_GSCOPE_SET_FLAG,
2428 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_WAIT): Define.
2429 * sysdeps/i386/tls.h (THREAD_GSCOPE_WAIT): Don't use
2431 (THREAD_GSCOPE_GET_FLAG): Define.
2432 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Define.
2433 * allocatestack.c (__wait_lookup_done): Use THREAD_GSCOPE_GET_FLAG
2434 instead of ->header.gscope_flag directly.
2436 2007-05-23 Ulrich Drepper <drepper@redhat.com>
2438 * init.c (__pthread_initialize_minimal_internal): Check whether
2439 private futexes are available.
2440 * allocatestack.c (allocate_stack): Copy private_futex field from
2441 current thread into the new stack.
2442 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Use private
2443 futexes if they are available.
2444 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise
2445 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Adjust so that change
2446 in libc-lowlevellock.S allow using private futexes.
2447 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
2448 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
2450 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
2451 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use private futexes
2452 if they are available.
2453 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
2454 * sysdeps/x86_64/tcb-offsets.sym: Add PRIVATE_FUTEX.
2455 * sysdeps/i386/tcb-offsets.sym: Likewise.
2456 * sysdeps/x86_64/tls.h (tcbhead_t): Add private_futex field.
2457 * sysdeps/i386/tls.h (tcbhead_t): Likewise.
2459 2007-05-21 Ulrich Drepper <drepper@redhat.com>
2461 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
2462 Remove ptr_wait_lookup_done again.
2463 * init.c (pthread_functions): Don't add .ptr_wait_lookup_done here.
2464 (__pthread_initialize_minimal_internal): Initialize
2465 _dl_wait_lookup_done pointer in _rtld_global directly.
2466 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
2467 Remove code to code _dl_wait_lookup_done.
2468 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_WAIT): The pointer is not
2471 2007-05-21 Jakub Jelinek <jakub@redhat.com>
2473 * tst-robust9.c (do_test): Don't fail if ENABLE_PI and
2474 pthread_mutex_init failed with ENOTSUP.
2476 2007-05-19 Ulrich Drepper <drepper@redhat.com>
2478 * allocatestack.c (__wait_lookup_done): New function.
2479 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
2480 Add ptr_wait_lookup_done.
2481 * init.c (pthread_functions): Initialize .ptr_wait_lookup_done.
2482 * pthreadP.h: Declare __wait_lookup_done.
2483 * sysdeps/i386/tls.h (tcbhead_t): Add gscope_flag.
2484 Define macros to implement reference handling of global scope.
2485 * sysdeps/x86_64/tls.h: Likewise.
2486 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
2487 Initialize GL(dl_wait_lookup_done).
2489 2007-05-17 Ulrich Drepper <drepper@redhat.com>
2492 * pthread_mutex_lock.c: Preserve FUTEX_WAITERS bit when dead owner
2494 * pthread_mutex_timedlock.c: Likewise.
2495 * pthread_mutex_trylock.c: Likewise.
2496 Patch in part by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
2498 * Makefile (tests): Add tst-robust9 and tst-robustpi9.
2499 * tst-robust9.c: New file.
2500 * tst-robustpi9.c: New file.
2502 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Remove
2503 unnecessary extra cancellation test.
2505 2007-05-14 Ulrich Drepper <drepper@redhat.com>
2507 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Remove unnecessary
2508 extra cancellation test.
2509 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
2511 2007-05-10 Ulrich Drepper <drepper@redhat.com>
2513 * descr.h (struct pthread): Rearrange members to fill hole in
2516 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
2517 (__pthread_setaffinity_new): If syscall was successful and
2518 RESET_VGETCPU_CACHE is defined, use it before returning.
2519 * sysdeps/unix/sysv/linux/x86_64/pthread_setaffinity.c: New file.
2521 2007-05-10 Jakub Jelinek <jakub@redhat.com>
2524 * tst-align2.c: Include stackinfo.h.
2525 * tst-getpid1.c: Likewise.
2527 2007-05-02 Carlos O'Donell <carlos@systemhalted.org>
2530 * tst-align2.c (do_test): Add _STACK_GROWS_UP case.
2531 * tst-getpid1.c (do_test): Likewise.
2534 * allocatestack.c (change_stack_perm): Add _STACK_GROWS_UP case.
2535 (allocate_stack): Likewise.
2537 2007-05-07 Ulrich Drepper <drepper@redhat.com>
2539 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
2540 (__lll_robust_lock_wait): Fix race caused by reloading of futex value.
2541 (__lll_robust_timedlock_wait): Likewise.
2542 Reported by Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>.
2544 2007-05-06 Mike Frysinger <vapier@gentoo.org>
2547 * tst-cancel-wrappers.sh: Set C["fdatasync"] to 1.
2548 * tst-cancel4.c (tf_fdatasync): New test.
2550 2007-04-27 Ulrich Drepper <drepper@redhat.com>
2553 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Treat error
2554 check mutexes like normal mutexes.
2557 * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
2558 Initialize the whole sigevent structure to appease valgrind.
2560 2007-04-25 Ulrich Drepper <drepper@redhat.com>
2562 * sysdeps/x86_64/tls.h (tcbhead_t): Add vgetcpu_cache.
2563 * sysdeps/x86_64/tcb-offsets.sym: Add VGETCPU_CACHE_OFFSET.
2565 2007-04-06 Ulrich Drepper <drepper@redhat.com>
2567 * tst-locale1.c: Avoid warnings.
2568 * tst-locale2.c: Likewise.
2570 2007-03-19 Steven Munroe <sjmunroe@us.ibm.com>
2572 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
2573 (__lll_robust_trylock): Add MUTEX_HINT_ACQ to lwarx instruction.
2575 2007-03-16 Jakub Jelinek <jakub@redhat.com>
2577 * sysdeps/pthread/bits/libc-lock.h: Use __extern_inline and
2578 __extern_always_inline where appropriate.
2579 * sysdeps/pthread/pthread.h: Likewise.
2581 2007-03-13 Richard Henderson <rth@redhat.com>
2583 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Use two
2584 separate cfi regions for the two subsections.
2586 2007-02-25 Ulrich Drepper <drepper@redhat.com>
2588 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset refcntr in
2589 new thread, don't just decrement it.
2590 Patch by Suzuki K P <suzuki@in.ibm.com>.
2592 2007-02-21 Ulrich Drepper <drepper@redhat.com>
2594 * sysdeps/pthread/pthread-functions.h: Correct last patch, correct
2595 PTHFCT_CALL definition.
2597 2007-02-18 Ulrich Drepper <drepper@redhat.com>
2599 * sysdeps/pthread/pthread-functions.h: If PTR_DEMANGLE is not
2600 available, don't use it.
2602 2007-02-09 Jakub Jelinek <jakub@redhat.com>
2604 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
2605 (__lll_mutex_timedlock_wait): Use correct pointer when we don't
2606 call into the kernel to delay.
2608 2007-01-18 Ulrich Drepper <drepper@redhat.com>
2610 * tst-initializers1.c: We want to test the initializers as seen
2611 outside of libc, so undefined _LIBC.
2613 * pthread_join.c (cleanup): Avoid warning.
2615 2007-01-17 Ulrich Drepper <drepper@redhat.com>
2617 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
2618 (__lll_timedwait_tid): Add unwind info.
2620 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Don't just copy the
2621 function table, mangle the pointers.
2622 * sysdeps/pthread/pthread-functions.h: Define PTHFCT_CALL.
2623 * forward.c: Use PTHFCT_CALL and __libc_pthread_functions_init.
2624 * sysdeps/pthread/bits/libc-lock.h: When using __libc_pthread_functions
2625 demangle pointers before use.
2626 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Use PTHFCT_CALL to
2628 * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
2629 * sysdeps/pthread/setxid.h: Likewise.
2631 2007-01-12 Ulrich Drepper <drepper@redhat.com>
2633 * tst-rwlock7.c: Show some more information in case of correct
2636 2007-01-11 Ulrich Drepper <drepper@redhat.com>
2638 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
2639 (lll_futex_timed_wait): Undo part of last change, don't negate
2642 2007-01-10 Ulrich Drepper <drepper@redhat.com>
2644 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Cleanups. Define
2645 FUTEX_CMP_REQUEUE and lll_futex_requeue.
2647 2006-12-28 David S. Miller <davem@davemloft.net>
2649 * shlib-versions: Fix sparc64 linux target specification.
2651 2007-01-10 Jakub Jelinek <jakub@redhat.com>
2653 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
2654 Adjust include path for pthread_barrier_wait.c move.
2656 2006-12-21 Jakub Jelinek <jakub@redhat.com>
2658 * sysdeps/unix/sysv/linux/pthread_kill.c (pthread_kill): Make sure
2659 tid isn't reread from pd->tid in between ESRCH test and the syscall.
2661 2006-12-06 Jakub Jelinek <jakub@redhat.com>
2663 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Handle
2664 6 argument cancellable syscalls.
2665 (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
2666 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO): Handle
2667 6 argument cancellable syscalls.
2668 (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
2670 2006-12-09 Ulrich Drepper <drepper@redhat.com>
2672 * sysdeps/unix/sysv/linux/rtld-lowlevel.h
2673 (__rtld_mrlock_initialize): Add missing closing parenthesis.
2675 2006-10-30 Jakub Jelinek <jakub@redhat.com>
2677 * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
2678 __sync_lock_release instead of __sync_lock_release_si.
2680 2006-10-29 Jakub Jelinek <jakub@redhat.com>
2682 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (RTLD_SINGLE_THREAD_P):
2684 (SINGLE_THREAD_P): Define to 1 if IS_IN_rtld.
2685 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Likewise.
2686 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
2687 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
2688 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
2689 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
2690 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
2691 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
2692 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
2693 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
2694 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
2696 2006-10-27 Ulrich Drepper <drepper@redhat.com>
2698 * sysdeps/pthread/pthread_barrier_wait.c: Move to...
2699 * pthread_barrier_wait.c: ...here.
2700 * sysdeps/pthread/pthread_cond_broadcast.c: Move to...
2701 * pthread_cond_broadcast.c: ...here.
2702 * sysdeps/pthread/pthread_cond_signal.c: Move to...
2703 * pthread_cond_signal.c: ...here.
2704 * sysdeps/pthread/pthread_cond_timedwait.c: Move to...
2705 * pthread_cond_timedwait.c: ...here.
2706 * sysdeps/pthread/pthread_cond_wait.c: Move to...
2707 * pthread_cond_wait.c: ...here.
2708 * sysdeps/pthread/pthread_once.c: Move to...
2709 * pthread_once.c: ...here.
2710 * sysdeps/pthread/pthread_rwlock_rdlock.c: Move to...
2711 * pthread_rwlock_rdlock.c: ...here.
2712 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Move to...
2713 * pthread_rwlock_timedrdlock.c: ...here.
2714 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Move to...
2715 * pthread_rwlock_timedwrlock.c: ...here.
2716 * sysdeps/pthread/pthread_rwlock_unlock.c: Move to...
2717 * pthread_rwlock_unlock.c: ...here.
2718 * sysdeps/pthread/pthread_rwlock_wrlock.c: Move to...
2719 * pthread_rwlock_wrlock.c: ...here.
2720 * sysdeps/pthread/pthread_spin_destroy.c: Move to...
2721 * pthread_spin_destroy.c: ...here.
2722 * sysdeps/pthread/pthread_spin_init.c: Move to...
2723 * pthread_spin_init.c: ...here.
2724 * sysdeps/pthread/pthread_spin_unlock.c: Move to...
2725 * pthread_spin_unlock.c: ...here.
2726 * sysdeps/pthread/pthread_getcpuclockid.c: Move to...
2727 * pthread_getcpuclockid.c: ...here.
2729 * init.c: USE_TLS support is now always enabled.
2730 * tst-tls5.h: Likewise.
2731 * sysdeps/alpha/tls.h: Likewise.
2732 * sysdeps/i386/tls.h: Likewise.
2733 * sysdeps/ia64/tls.h: Likewise.
2734 * sysdeps/powerpc/tls.h: Likewise.
2735 * sysdeps/s390/tls.h: Likewise.
2736 * sysdeps/sh/tls.h: Likewise.
2737 * sysdeps/sparc/tls.h: Likewise.
2738 * sysdeps/x86_64/tls.h: Likewise.
2740 2006-10-27 Jakub Jelinek <jakub@redhat.com>
2742 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
2743 __rtld_mrlock_change): Update oldval if atomic compare and exchange
2746 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
2747 Define to THREAD_SELF->header.multiple_threads.
2748 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
2750 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
2752 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
2753 (SINGLE_THREAD_P): Likewise.
2754 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
2755 (SINGLE_THREAD_P): Likewise.
2756 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
2757 (SINGLE_THREAD_P): Likewise.
2758 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
2759 (SINGLE_THREAD_P): Likewise.
2760 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (SINGLE_THREAD_P):
2762 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
2763 (SINGLE_THREAD_P): Likewise.
2764 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
2765 (SINGLE_THREAD_P): Likewise.
2766 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (SINGLE_THREAD_P):
2769 2006-10-26 Jakub Jelinek <jakub@redhat.com>
2771 * pthread_attr_setstacksize.c (NEW_VERNUM): Define to GLIBC_2_3_3
2772 by default rather than 2_3_3.
2774 2006-10-17 Jakub Jelinek <jakub@redhat.com>
2776 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
2777 __rtld_mrlock_unlock, __rtld_mrlock_change, __rtld_mrlock_done): Use
2778 atomic_* instead of catomic_* macros.
2780 2006-10-12 Ulrich Drepper <drepper@redhat.com>
2783 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add SEM_VALUE_MAX.
2784 * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
2785 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
2786 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
2787 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
2788 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Remove SEM_VALUE_MAX.
2789 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
2790 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
2791 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
2792 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: Likewise.
2793 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
2794 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
2795 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
2797 2006-10-11 Ulrich Drepper <drepper@redhat.com>
2799 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add support for
2800 cancelable syscalls with six parameters.
2802 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Use catomic_*
2803 operations instead of atomic_*.
2805 2006-10-09 Ulrich Drepper <drepper@redhat.com>
2807 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: New file..
2809 2006-10-07 Ulrich Drepper <drepper@redhat.com>
2811 * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: New file.
2812 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstack.c: New file.
2813 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c:
2815 * pthread_attr_setstack.c: Allow overwriting the version number of the
2817 * pthread_attr_setstacksize.c: Likewise.
2818 (__old_pthread_attr_setstacksize): If STACKSIZE_ADJUST is defined use
2820 * sysdeps/unix/sysv/linux/powerpc/Versions (libpthread): Add
2821 pthread_attr_setstack and pthread_attr_setstacksize to GLIBC_2.6.
2823 2006-09-24 Ulrich Drepper <drepper@redhat.com>
2826 * descr.h (ENQUEUE_MUTEX_BOTH): Add cast to avoid warning.
2827 Patch by Petr Baudis.
2829 2006-09-18 Jakub Jelinek <jakub@redhat.com>
2831 * tst-kill4.c (do_test): Explicitly set tf thread's stack size.
2833 * tst-cancel2.c (tf): Loop as long as something was written.
2835 2006-09-12 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2837 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: For PI
2838 mutexes wake all mutexes.
2839 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Don't increment
2840 WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
2841 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
2843 2006-09-12 Ulrich Drepper <drepper@redhat.com>
2845 * tst-cond22.c (tf): Slight changes to the pthread_cond_wait use
2846 to guarantee the thread is always canceled.
2848 2006-09-08 Jakub Jelinek <jakub@redhat.com>
2850 * tst-cond22.c: Include pthread.h instead of pthreadP.h.
2852 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Only
2853 increase FUTEX if increasing WAKEUP_SEQ. Fix comment typo.
2854 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
2855 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2856 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2858 2006-09-08 Ulrich Drepper <drepper@redhat.com>
2861 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Don't
2862 increment WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
2863 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
2864 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2865 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2866 * Makefile (tests): Add tst-cond22.
2867 * tst-cond22.c: New file.
2869 2006-09-05 Ulrich Drepper <drepper@redhat.com>
2872 * descr.h (struct pthread): Add parent_cancelhandling.
2873 * sysdeps/pthread/createthread.c (create_thread): Pass parent
2874 cancelhandling value to child.
2875 * pthread_create.c (start_thread): If parent thread was canceled
2876 reset the SIGCANCEL mask.
2877 * Makefile (tests): Add tst-cancel25.
2878 * tst-cancel25.c: New file.
2880 2006-09-05 Jakub Jelinek <jakub@redhat.com>
2881 Ulrich Drepper <drepper@redhat.com>
2883 * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY): Don't decrement
2884 counterp if it is already zero.
2885 * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY): Likewise..
2887 2006-03-04 Jakub Jelinek <jakub@redhat.com>
2888 Roland McGrath <roland@redhat.com>
2890 * sysdeps/unix/sysv/linux/i386/lowlevellock.h
2891 (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
2892 LLL_STUB_UNWIND_INFO_3, LLL_STUB_UNWIND_INFO_4): Define.
2893 (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
2894 lll_robust_mutex_cond_lock, lll_mutex_timedlock,
2895 lll_robust_mutex_timedlock, lll_mutex_unlock,
2896 lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
2897 Add _L_*_ symbols around the subsection.
2898 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Add unwind info.
2899 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Likewise.
2901 2006-03-03 Jakub Jelinek <jakub@redhat.com>
2902 Roland McGrath <roland@redhat.com>
2904 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
2905 (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
2906 LLL_STUB_UNWIND_INFO_5, LLL_STUB_UNWIND_INFO_6): Define.
2907 (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
2908 lll_robust_mutex_cond_lock, lll_mutex_timedlock,
2909 lll_robust_mutex_timedlock, lll_mutex_unlock,
2910 lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
2911 Add _L_*_ symbols around the subsection.
2912 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Add unwind info.
2913 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
2915 2006-08-31 Ulrich Drepper <drepper@redhat.com>
2917 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Undo last
2918 change because it can disturb too much existing code. If real hard
2919 reader preference is needed we'll introduce another type.
2920 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
2921 (pthread_rwlock_timedwrlock): Likewise.
2922 * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
2925 2006-08-30 Ulrich Drepper <drepper@redhat.com>
2927 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Respect
2929 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
2930 (pthread_rwlock_timedwrlock): Likewise.
2931 * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
2934 2006-08-25 Jakub Jelinek <jakub@redhat.com>
2936 * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libpthread):
2937 Only define ifdef SHARED.
2939 2006-08-23 Ulrich Drepper <drepper@redhat.com>
2941 * allocatestack.c (queue_stack): Move freeing of surplus stacks to...
2942 (free_stacks): ...here.
2943 (__free_stack_cache): New function.
2944 * pthreadP.h: Declare __free_stack_cache.
2945 * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
2947 * init.c (pthread_functions): Initialize ptr_freeres.
2948 * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libptread):
2949 New freeres function.
2951 2006-07-30 Joseph S. Myers <joseph@codesourcery.com>
2954 * Makefile (extra-objs): Add modules to extra-test-objs instead.
2956 2006-08-20 Ulrich Drepper <drepper@redhat.com>
2958 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
2959 _XOPEN_REALTIME_THREADS.
2961 2006-08-15 Jakub Jelinek <jakub@redhat.com>
2963 * sysdeps/unix/sysv/linux/clock_settime.c (INTERNAL_VSYSCALL): Use
2964 HAVE_CLOCK_GETRES_VSYSCALL as guard macro rather than
2965 HAVE_CLOCK_GETTIME_VSYSCALL.
2966 (maybe_syscall_settime_cpu): Use plain INTERNAL_VSYSCALL here.
2968 2006-08-14 Jakub Jelinek <jakub@redhat.com>
2970 * sysdeps/unix/sysv/linux/bits/posix_opt.h
2971 (_POSIX_THREAD_PRIO_PROTECT): Define to 200112L.
2972 * descr.h (struct priority_protection_data): New type.
2973 (struct pthread): Add tpp field.
2974 * pthreadP.h (PTHREAD_MUTEX_PP_NORMAL_NP,
2975 PTHREAD_MUTEX_PP_RECURSIVE_NP, PTHREAD_MUTEX_PP_ERRORCHECK_NP,
2976 PTHREAD_MUTEX_PP_ADAPTIVE_NP): New enum values.
2977 * pthread_mutex_init.c (__pthread_mutex_init): Handle non-robust
2979 * pthread_mutex_lock.c (__pthread_mutex_lock): Handle TPP mutexes.
2980 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Likewise.
2981 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Likewise.
2982 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Likewise.
2984 * pthread_setschedparam.c (__pthread_setschedparam): Handle priority
2986 * pthread_setschedprio.c (pthread_setschedprio): Likewise.
2987 * pthread_mutexattr_getprioceiling.c
2988 (pthread_mutexattr_getprioceiling): If ceiling is 0, ensure it is
2989 in the SCHED_FIFO priority range.
2990 * pthread_mutexattr_setprioceiling.c
2991 (pthread_mutexattr_setprioceiling): Fix prioceiling validation.
2992 * pthread_mutex_getprioceiling.c (pthread_mutex_getprioceiling): Fail
2993 if mutex is not TPP. Ceiling is now in __data.__lock.
2994 * pthread_mutex_setprioceiling.c: Include stdbool.h.
2995 (pthread_mutex_setprioceiling): Fix prioceiling validation. Ceiling
2996 is now in __data.__lock. Add locking.
2997 * pthread_create.c (__free_tcb): Free pd->tpp structure.
2998 * Makefile (libpthread-routines): Add tpp.
2999 (xtests): Add tst-mutexpp1, tst-mutexpp6 and tst-mutexpp10.
3000 * tst-tpp.h: New file.
3001 * tst-mutexpp1.c: New file.
3002 * tst-mutexpp6.c: New file.
3003 * tst-mutexpp10.c: New file.
3004 * tst-mutex1.c (TEST_FUNCTION): Don't redefine if already defined.
3005 * tst-mutex6.c (TEST_FUNCTION): Likewise.
3007 2006-08-12 Ulrich Drepper <drepper@redhat.com>
3010 * pthread_join.c (pthread_join): Account for self being canceled
3011 when checking for deadlocks.
3012 * tst-join5.c: Cleanups. Allow to be used in tst-join6.
3013 (tf1): Don't print anything after pthread_join returns, this would be
3014 another cancellation point.
3016 * tst-join6.c: New file.
3017 * Makefile (tests): Add tst-join6.
3019 2006-08-03 Ulrich Drepper <drepper@redhat.com>
3022 * pthread_setspecific.c (__pthread_setspecific): Check
3023 out-of-range index before checking for unused key.
3025 * sysdeps/pthread/gai_misc.h: New file.
3027 2006-08-01 Ulrich Drepper <drepper@redhat.com>
3029 * sysdeps/unix/sysv/linux/i386/smp.h: New file. Old Linux-specific
3030 file. Don't use sysctl.
3031 * sysdeps/unix/sysv/linux/smp.h: Always assume SMP. Archs can
3032 overwrite the file if this is likely not true.
3034 2006-07-31 Daniel Jacobowitz <dan@codesourcery.com>
3036 * allocatestack.c (__reclaim_stacks): Reset the PID on cached stacks.
3037 * Makefile (tests): Add tst-getpid3.
3038 * tst-getpid3.c: New file.
3040 2006-07-30 Roland McGrath <roland@redhat.com>
3042 * Makefile (libpthread-routines): Add ptw-sigsuspend.
3044 * sysdeps/unix/sysv/linux/i386/not-cancel.h
3045 (pause_not_cancel): New macro.
3046 (nanosleep_not_cancel): New macro.
3047 (sigsuspend_not_cancel): New macro.
3048 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
3049 nanosleep_not_cancel macro from <not-cancel.h>.
3050 * pthread_mutex_lock.c (__pthread_mutex_lock): Use pause_not_cancel
3051 macro from <not-cancel.h>.
3053 2006-07-28 Ulrich Drepper <drepper@redhat.com>
3054 Jakub Jelinek <jakub@redhat.com>
3056 * descr.h: Change ENQUEUE_MUTEX and DEQUEUE_MUTEX for bit 0
3057 notification of PI mutex. Add ENQUEUE_MUTEX_PI.
3058 * pthreadP.h: Define PTHREAD_MUTEX_PI_* macros for PI mutex types.
3059 * pthread_mutex_setprioceilining.c: Adjust for mutex type name change.
3060 * pthread_mutex_init.c: Add support for priority inheritance mutex.
3061 * pthread_mutex_lock.c: Likewise.
3062 * pthread_mutex_timedlock.c: Likewise.
3063 * pthread_mutex_trylock.c: Likewise.
3064 * pthread_mutex_unlock.c: Likewise.
3065 * sysdeps/pthread/pthread_cond_broadcast.c: For PI mutexes wake
3067 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.c: Likewise.
3068 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.c: Likewise.
3069 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: New file.
3070 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-header): Add
3071 pthread-pi-defines.sym.
3072 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_LOCK_PI,
3073 FUTEX_UNLOCK_PI, and FUTEX_TRYLOCK_PI.
3074 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
3075 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
3076 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
3077 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
3078 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
3079 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
3080 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
3081 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
3082 _POSIX_THREAD_PRIO_INHERIT to 200112L.
3083 * tst-mutex1.c: Adjust to allow use in PI mutex test.
3084 * tst-mutex2.c: Likewise.
3085 * tst-mutex3.c: Likewise.
3086 * tst-mutex4.c: Likewise.
3087 * tst-mutex5.c: Likewise.
3088 * tst-mutex6.c: Likewise.
3089 * tst-mutex7.c: Likewise.
3090 * tst-mutex7a.c: Likewise.
3091 * tst-mutex8.c: Likewise.
3092 * tst-mutex9.c: Likewise.
3093 * tst-robust1.c: Likewise.
3094 * tst-robust7.c: Likewise.
3095 * tst-robust8.c: Likewise.
3096 * tst-mutexpi1.c: New file.
3097 * tst-mutexpi2.c: New file.
3098 * tst-mutexpi3.c: New file.
3099 * tst-mutexpi4.c: New file.
3100 * tst-mutexpi5.c: New file.
3101 * tst-mutexpi6.c: New file.
3102 * tst-mutexpi7.c: New file.
3103 * tst-mutexpi7a.c: New file.
3104 * tst-mutexpi8.c: New file.
3105 * tst-mutexpi9.c: New file.
3106 * tst-robust1.c: New file.
3107 * tst-robust2.c: New file.
3108 * tst-robust3.c: New file.
3109 * tst-robust4.c: New file.
3110 * tst-robust5.c: New file.
3111 * tst-robust6.c: New file.
3112 * tst-robust7.c: New file.
3113 * tst-robust8.c: New file.
3114 * Makefile (tests): Add the new tests.
3116 * pthread_create.c (start_thread): Add some casts to avoid warnings.
3117 * pthread_mutex_destroy.c: Remove unneeded label.
3119 2006-07-01 Ulrich Drepper <drepper@redhat.com>
3121 * pthread_mutex_init.c (__pthread_mutex_init): Move some
3122 computations to compile time.
3124 2006-06-04 Ulrich Drepper <drepper@redhat.com>
3126 * sysdeps/pthread/pthread.h: Add pthread_equal inline version.
3128 2006-05-15 Ulrich Drepper <drepper@redhat.com>
3130 * sysdeps/unix/sysv/linux/fork.h: Mark __fork_handlers as hidden.
3132 2006-05-11 Ulrich Drepper <drepper@redhat.com>
3134 * pthread_key_create.c (__pthread_key_create): Do away with
3135 __pthread_keys_lock.
3137 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
3138 (__kernel_cpumask_size): Mark as hidden.
3139 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
3141 * sem_open.c (__sem_mappings_lock): Mark as hidden.
3142 * semaphoreP.h (__sem_mappings_lock): Likewise.
3144 2006-05-10 Ulrich Drepper <drepper@redhat.com>
3146 * pthread_atfork.c: Mark __dso_handle as hidden.
3148 2006-05-09 Ulrich Drepper <drepper@redhat.com>
3151 * sysdeps/pthread/unwind-forcedunwind.c: Different solution for
3152 the reload problem. Change the one path in pthread_cancel_init
3153 which causes the problem. Force gcc to reload. Simplify callers.
3154 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c
3155 (_Unwind_GetBSP): Undo last patch.
3157 2006-05-07 Ulrich Drepper <drepper@redhat.com>
3159 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: Make sure the
3160 function pointer is reloaded after pthread_cancel_init calls.
3163 * sysdeps/pthread/unwind-forcedunwind.c: Make sure functions
3164 pointers are reloaded after pthread_cancel_init calls.
3166 2006-05-01 Ulrich Drepper <drepper@redhat.com>
3168 * sysdeps/pthread/allocalim.h (__libc_use_alloca): Mark with
3171 2006-04-27 Ulrich Drepper <drepper@redhat.com>
3173 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
3174 Allocate new object which is passed to timer_sigev_thread so that
3175 the timer can be deleted before the new thread is scheduled.
3177 2006-04-26 Roland McGrath <roland@redhat.com>
3179 * sysdeps/x86_64/tls.h: Include <asm/prctl.h> inside [! __ASSEMBLER__].
3181 2006-04-08 Ulrich Drepper <drepper@redhat.com>
3183 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove branch predicion
3184 suffix for conditional jumps.
3185 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
3186 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
3187 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
3188 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
3189 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
3190 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
3192 * init.c (sigcancel_handler): Compare with correct PID even if the
3193 thread is in the middle of a fork call.
3194 (sighandler_setxid): Likewise.
3195 Reported by Suzuki K P <suzuki@in.ibm.com> .
3197 2006-04-07 Jakub Jelinek <jakub@redhat.com>
3199 * pthreadP.h (FUTEX_TID_MASK): Sync with kernel.
3201 2006-04-06 Ulrich Drepper <drepper@redhat.com>
3203 * pthread_getattr_np.c (pthread_getattr_np): Close fp if getrlimit
3204 fails [Coverity CID 105].
3206 2006-04-05 Ulrich Drepper <drepper@redhat.com>
3208 * sysdeps/pthread/pthread.h: Add nonnull attributes.
3210 2006-04-03 Steven Munroe <sjmunroe@us.ibm.com>
3213 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h [_ARCH_PWR4]:
3214 Define __lll_rel_instr using lwsync.
3216 2006-03-27 Ulrich Drepper <drepper@redhat.com>
3218 * allocatestack.c (allocate_stack): Always initialize robust_head.
3219 * descr.h: Define struct robust_list_head.
3220 (struct pthread): Use robust_list_head in robust mutex list definition.
3221 Adjust ENQUEUE_MUTEX and DEQUEUE_MUTEX.
3222 * init.c [!__ASSUME_SET_ROBUST_LIST] (__set_robust_list_avail): Define.
3223 (__pthread_initialize_minimal_internal): Register robust_list with
3225 * pthreadP.h: Remove PRIVATE_ from PTHREAD_MUTEX_ROBUST_* names.
3226 Declare __set_robust_list_avail.
3227 * pthread_create.c (start_thread): Register robust_list of new thread.
3228 [!__ASSUME_SET_ROBUST_LIST]: If robust_list is not empty wake up
3230 * pthread_mutex_destroy.c: For robust mutexes don't look at the
3231 number of users, it's unreliable.
3232 * pthread_mutex_init.c: Allow use of pshared robust mutexes if
3233 set_robust_list syscall is available.
3234 * pthread_mutex_consistent.c: Adjust for PTHREAD_MUTEX_ROBUST_* rename.
3235 * pthread_mutex_lock.c: Simplify robust mutex code a bit.
3236 Set robust_head.list_op_pending before trying to lock a robust mutex.
3237 * pthread_mutex_timedlock.c: Likewise.
3238 * pthread_mutex_trylock.c: Likewise.
3239 * pthread_mutex_unlock.c: Likewise for unlocking.
3240 * Makefile (tests): Add tst-robust8.
3241 * tst-robust8.c: New file.
3243 2006-03-08 Andreas Schwab <schwab@suse.de>
3245 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h
3246 (DL_SYSINFO_IMPLEMENTATION): Add missing newline.
3248 2006-03-05 Roland McGrath <roland@redhat.com>
3250 * configure (libc_add_on): Disable add-on when $add_ons_automatic = yes
3251 and $config_os doesn't match *linux*.
3253 2006-03-05 David S. Miller <davem@sunset.davemloft.net>
3255 * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S:
3256 Use __syscall_error.
3257 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
3258 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: Likewise.
3259 * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: Likewise.
3260 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
3261 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: Likewise.
3262 * sysdeps/unix/sysv/linux/sparc/Makefile: New file.
3264 2006-03-02 Ulrich Drepper <drepper@redhat.com>
3266 * sysdeps/unix/sysv/linux/aio_misc.h: Various cleanups.
3268 2006-03-01 Ulrich Drepper <drepper@redhat.com>
3270 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
3271 (__lll_robust_lock_wait): Also set FUTEX_WAITERS bit if we got the
3273 (__lll_robust_timedlock_wait): Likewise.
3274 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S
3275 (__lll_robust_lock_wait): Likewise.
3276 (__lll_robust_timedlock_wait): Likewise.
3277 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
3278 (__lll_robust_lock_wait): Likewise.
3279 (__lll_robust_timedlock_wait): Likewise.
3281 2006-03-01 Jakub Jelinek <jakub@redhat.com>
3283 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_robust_mutex_dead,
3284 lll_robust_mutex_trylock, lll_robust_mutex_lock,
3285 lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
3286 lll_robust_mutex_unlock): Define.
3287 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
3289 2006-02-28 H.J. Lu <hongjiu.lu@intel.com>
3291 * sysdeps/unix/sysv/linux/ia64/clone2.S: Include <clone2.S>
3292 instead of <clone.S>.
3294 2006-02-27 Jakub Jelinek <jakub@redhat.com>
3296 * Makefile (libpthread-routines): Add
3297 pthread_mutexattr_[sg]etprotocol, pthread_mutexattr_[sg]etprioceiling
3298 and pthread_mutex_[sg]etprioceiling.
3299 * Versions (GLIBC_2.4): Export pthread_mutexattr_getprotocol,
3300 pthread_mutexattr_setprotocol, pthread_mutexattr_getprioceiling,
3301 pthread_mutexattr_setprioceiling, pthread_mutex_getprioceiling and
3302 pthread_mutex_setprioceiling.
3303 * sysdeps/pthread/pthread.h (PTHREAD_PRIO_NONE, PTHREAD_PRIO_INHERIT,
3304 PTHREAD_PRIO_PROTECT): New enum values.
3305 (pthread_mutexattr_getprotocol, pthread_mutexattr_setprotocol,
3306 pthread_mutexattr_getprioceiling, pthread_mutexattr_setprioceiling,
3307 pthread_mutex_getprioceiling, pthread_mutex_setprioceiling): New
3309 * pthreadP.h (PTHREAD_MUTEX_PRIO_INHERIT_PRIVATE_NP,
3310 PTHREAD_MUTEX_PRIO_PROTECT_PRIVATE_NP): New enum values.
3311 (PTHREAD_MUTEX_PRIO_CEILING_SHIFT, PTHREAD_MUTEX_PRIO_CEILING_MASK):
3313 (PTHREAD_MUTEXATTR_PROTOCOL_SHIFT, PTHREAD_MUTEXATTR_PROTOCOL_MASK,
3314 PTHREAD_MUTEXATTR_PRIO_CEILING_SHIFT,
3315 PTHREAD_MUTEXATTR_PRIO_CEILING_MASK): Define.
3316 (PTHREAD_MUTEXATTR_FLAG_BITS): Or in PTHREAD_MUTEXATTR_PROTOCOL_MASK
3317 and PTHREAD_MUTEXATTR_PRIO_CEILING_MASK.
3318 * pthread_mutex_init.c (__pthread_mutex_init): For the time being
3319 return ENOTSUP for PTHREAD_PRIO_INHERIT or PTHREAD_PRIO_PROTECT
3321 * pthread_mutex_getprioceiling.c: New file.
3322 * pthread_mutex_setprioceiling.c: New file.
3323 * pthread_mutexattr_getprioceiling.c: New file.
3324 * pthread_mutexattr_setprioceiling.c: New file.
3325 * pthread_mutexattr_getprotocol.c: New file.
3326 * pthread_mutexattr_setprotocol.c: New file.
3328 2006-02-27 Daniel Jacobowitz <dan@codesourcery.com>
3330 * sysdeps/unix/sysv/linux/aio_misc.h: Include <limits.h>.
3332 2006-02-27 Roland McGrath <roland@redhat.com>
3334 * sysdeps/pthread/Subdirs: List nptl here too.
3335 * configure (libc_add_on_canonical): New variable.
3337 * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: Use #include_next.
3339 * sysdeps/unix/sysv/linux/sleep.c: Use #include_next after #include of
3340 self to get main source tree's file.
3341 * sysdeps/unix/sysv/linux/alpha/clone.S: Likewise.
3342 * sysdeps/unix/sysv/linux/i386/clone.S: Likewise.
3343 * sysdeps/unix/sysv/linux/i386/vfork.S: Likewise.
3344 * sysdeps/unix/sysv/linux/ia64/clone2.S: Likewise.
3345 * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: Likewise.
3346 * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: Likewise.
3347 * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: Likewise.
3348 * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: Likewise.
3349 * sysdeps/unix/sysv/linux/sh/clone.S: Likewise.
3350 * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: Likewise.
3351 * sysdeps/unix/sysv/linux/sparc/sparc64/clone.S: Likewise.
3352 * sysdeps/unix/sysv/linux/x86_64/clone.S: Likewise.
3353 * sysdeps/unix/sysv/linux/x86_64/vfork.S: Likewise.
3355 * Makefile: Use $(sysdirs) in vpath directive.
3357 * sysdeps/pthread/Makefile (CFLAGS-libc-start.c): Variable removed.
3358 (CPPFLAGS-timer_routines.c): Likewise.
3360 * Makeconfig (includes): Variable removed.
3362 2006-02-26 Roland McGrath <roland@redhat.com>
3364 * sysdeps/generic/pt-raise.c: Moved to ...
3365 * pt-raise.c: ... here.
3366 * sysdeps/generic/lowlevellock.h: Moved to ...
3367 * lowlevellock.h: ... here.
3369 2006-02-23 Roland McGrath <roland@redhat.com>
3371 * descr.h (struct pthread): Add final member `end_padding'.
3372 (PTHREAD_STRUCT_END_PADDING): Use it.
3374 2006-02-20 Roland McGrath <roland@redhat.com>
3376 * sysdeps/mips: Directory removed, saved in ports repository.
3377 * sysdeps/unix/sysv/linux/mips: Likewise.
3379 2006-02-18 Ulrich Drepper <drepper@redhat.com>
3381 * tst-robust1.c: Add second mutex to check that the mutex list is
3384 2006-02-17 Jakub Jelinek <jakub@redhat.com>
3386 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_mutex_dead,
3387 lll_robust_mutex_trylock, lll_robust_mutex_lock,
3388 lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
3389 lll_robust_mutex_unlock): New macros.
3390 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
3391 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
3392 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
3393 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
3394 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: New file.
3396 2006-02-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3398 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Add lll_robust_mutex_*
3400 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: New file.
3402 2006-02-17 Ulrich Drepper <drepper@redhat.com>
3404 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
3405 (lll_robust_mutex_unlock): Avoid unnecessary wakeups.
3406 * sysdeps/unix/sysv/linux/i386/lowlevellock.h
3407 (lll_robust_mutex_unlock): Likewise.
3409 2006-02-13 Jakub Jelinek <jakub@redhat.com>
3411 * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX):
3412 Set robust_list.__next rather than robust_list.
3413 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
3414 (__pthread_list_t): New typedef.
3415 (pthread_mutex_t): Replace __next and __prev fields with __list.
3416 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
3417 (__pthread_list_t): New typedef.
3418 (pthread_mutex_t): Replace __next and __prev fields with __list.
3419 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
3420 (__pthread_list_t, __pthread_slist_t): New typedefs.
3421 (pthread_mutex_t): Replace __next and __prev fields with __list.
3422 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
3423 (__pthread_list_t, __pthread_slist_t): New typedefs.
3424 (pthread_mutex_t): Replace __next and __prev fields with __list.
3425 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
3426 (__pthread_list_t, __pthread_slist_t): New typedefs.
3427 (pthread_mutex_t): Replace __next and __prev fields with __list.
3428 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h
3429 (__pthread_slist_t): New typedef.
3430 (pthread_mutex_t): Replace __next field with __list.
3432 2006-02-15 Ulrich Drepper <drepper@redhat.com>
3434 * pthreadP.h: Define PTHREAD_MUTEX_INCONSISTENT instead of
3435 PTHREAD_MUTEX_OWNERDEAD.
3436 (PTHREAD_MUTEX_ROBUST_PRIVATE_NP): Define as 16, not 256.
3437 Define FUTEX_WAITERS, FUTEX_OWNER_DIED, FUTEX_TID_MASK.
3438 * Makefile (libpthread-routines): Add lowlevelrobustlock.
3439 * pthread_create.c (start_thread): Very much simplify robust_list loop.
3440 * pthread_mutex_consistent.c: Inconsistent mutex have __owner now set
3441 to PTHREAD_MUTEX_INCONSISTENT.
3442 * pthread_mutex_destroy.c: Allow destroying of inconsistent mutexes.
3443 * pthread_mutex_lock.c: Reimplement robust mutex handling.
3444 * pthread_mutex_trylock.c: Likewise.
3445 * pthread_mutex_timedlock.c: Likewise.
3446 * pthread_mutex_unlock.c: Likewise.
3447 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
3448 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
3449 lowlevelrobustlock.sym.
3450 * sysdeps/unix/sysv/linux/lowlevelrobustlock.sym: New file.
3451 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add lll_robust_mutex_*
3453 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
3454 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: New file.
3455 * sysdeps/unix/sysv/linux/i386/i586/lowlevelrobustlock.S: New file.
3456 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrobustlock.S: New file.
3457 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: New file.
3459 2006-02-12 Ulrich Drepper <drepper@redhat.com>
3461 * allocatestack.c (allocate_stack): Initialize robust_list.
3462 * init.c (__pthread_initialize_minimal_internal): Likewise.
3463 * descr.h (struct xid_command): Pretty printing.
3464 (struct pthread): Use __pthread_list_t or __pthread_slist_t for
3465 robust_list. Adjust macros.
3466 * pthread_create.c (start_thread): Adjust robust_list handling.
3467 * phtread_mutex_unlock.c: Don't allow unlocking from any thread
3468 but the owner for all robust mutex types.
3469 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
3470 __pthread_list_t and __pthread_slist_t. Use them in pthread_mutex_t.
3471 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3472 * sysdeps/pthread/pthread.h: Adjust mutex initializers.
3474 * sysdeps/unix/sysv/linux/i386/not-cancel.h: Define openat_not_cancel,
3475 openat_not_cancel_3, openat64_not_cancel, and openat64_not_cancel_3.
3477 2006-02-08 Jakub Jelinek <jakub@redhat.com>
3479 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait,
3480 lll_futex_timedwait, lll_wait_tid): Add "memory" clobber.
3482 2006-01-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3484 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_futex_wait):
3486 (lll_futex_timed_wait): Define.
3488 2006-01-19 Ulrich Drepper <drepper@redhat.com>
3490 * tst-cancel4.c: Test ppoll.
3492 2006-01-18 Andreas Jaeger <aj@suse.de>
3495 * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h
3496 (pthread_mutex_t): Follow changes for other archs. Based on patch
3497 by Jim Gifford <patches@jg555.com>.
3499 2006-01-13 Richard Henderson <rth@redhat.com>
3501 * sysdeps/alpha/tls.h (tcbhead_t): Rename member to __private.
3503 2006-01-10 Roland McGrath <roland@redhat.com>
3505 * sysdeps/alpha/jmpbuf-unwind.h: File moved to main source tree.
3506 * sysdeps/i386/jmpbuf-unwind.h: Likewise.
3507 * sysdeps/mips/jmpbuf-unwind.h: Likewise.
3508 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
3509 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
3510 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
3511 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
3512 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
3513 * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
3514 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
3516 2006-01-09 Roland McGrath <roland@redhat.com>
3518 * tst-initializers1-c89.c: New file.
3519 * tst-initializers1-c99.c: New file.
3520 * tst-initializers1-gnu89.c: New file.
3521 * tst-initializers1-gnu99.c: New file.
3522 * Makefile (tests): Add them.
3523 (CFLAGS-tst-initializers1-c89.c): New variable.
3524 (CFLAGS-tst-initializers1-c99.c): New variable.
3525 (CFLAGS-tst-initializers1-gnu89.c): New variable.
3526 (CFLAGS-tst-initializers1-gnu99.c): New variable.
3528 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
3529 Use __extension__ on anonymous union definition.
3530 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3531 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
3532 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3533 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3534 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
3536 2006-01-08 Jakub Jelinek <jakub@redhat.com>
3538 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
3539 Don't give the union a name because it changes the mangled name.
3540 Instead name the struct for __data.
3541 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_mutex_t):
3543 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_mutex_t):
3546 2006-01-09 Jakub Jelinek <jakub@redhat.com>
3548 * sysdeps/sparc/sparc64/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Add
3549 stack bias to mc_ftp field.
3551 2006-01-07 Ulrich Drepper <drepper@redhat.com>
3553 * sysdeps/pthread/aio_misc.h (AIO_MISC_WAIT): Work around gcc
3554 being too clever and reloading the futex value where it shouldn't.
3556 2006-01-06 Ulrich Drepper <drepper@redhat.com>
3558 * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX): Use
3561 2006-01-06 Jakub Jelinek <jakub@redhat.com>
3563 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
3566 2006-01-06 Ulrich Drepper <drepper@redhat.com>
3568 * sysdeps/ia64/tls.h (tcbhead_t): Rename private member to __private.
3569 * sysdeps/ia64/tcb-offsets.sym: Adjust for private->__private
3570 rename in tcbhead_t.
3572 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
3573 Don't give the union a name because it changes the mangled name.
3574 Instead name the struct for __data.
3575 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3576 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3577 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3578 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3579 * pthread_create.c (start_thread): Adjust robust mutex free loop.
3580 * descr.h (ENQUEUE_MUTEX, DEQUEUE_MUTEX): Adjust.
3582 2006-01-05 Ulrich Drepper <drepper@redhat.com>
3584 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
3586 (lll_futex_timed_wait): Define.
3587 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
3588 * sysdeps/pthread/aio_misc.h: New file.
3590 2006-01-03 Joseph S. Myers <joseph@codesourcery.com>
3592 * Makefile ($(objpfx)$(multidir)): Use mkdir -p.
3594 2006-01-03 Steven Munroe <sjmunroe@us.ibm.com>
3596 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
3597 (PSEUDO): Remove redundant cfi_startproc and cfi_endproc directives.
3598 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
3600 2006-01-04 Ulrich Drepper <drepper@redhat.com>
3602 * tst-cancel24.cc: Use C headers instead of C++ headers.
3604 2006-01-03 Jakub Jelinek <jakub@redhat.com>
3606 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Remove #error for
3607 sparc-linux configured glibc.
3608 (lll_futex_wake_unlock): Define to 1 for sparc-linux configured glibc.
3609 (__lll_mutex_trylock, __lll_mutex_cond_trylock, __lll_mutex_lock,
3610 __lll_mutex_cond_lock, __lll_mutex_timedlock): Use
3611 atomic_compare_and_exchange_val_24_acq instead of
3612 atomic_compare_and_exchange_val_acq.
3613 (lll_mutex_unlock, lll_mutex_unlock_force): Use atomic_exchange_24_rel
3614 instead of atomic_exchange_rel.
3615 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: New file.
3616 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c: New
3618 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c: New
3620 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: New file.
3621 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: New file.
3622 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: New file.
3623 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c: New file.
3624 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: New file.
3625 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
3627 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
3629 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: New file.
3630 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: New file.
3631 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c: New
3633 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_trywait.c: New
3635 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: New file.
3637 2006-01-03 Ulrich Drepper <drepper@redhat.com>
3639 * sysdeps/pthread/pthread.h [__WORDSIZE==64]: Don't use cast in
3642 2006-01-02 Jakub Jelinek <jakub@redhat.com>
3644 * sysdeps/sparc/tls.h (tcbhead_t): Add pointer_guard field.
3645 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
3646 THREAD_COPY_POINTER_GUARD): Define.
3647 * sysdeps/sparc/tcb-offsets.sym (POINTER_GUARD): Define.
3648 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Revert 2005-12-27 changes.
3650 2006-01-01 Ulrich Drepper <drepper@redhat.com>
3652 * version.c: Update copyright year.
3654 2005-12-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3656 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Remove explicit
3657 .eh_frame section, use cfi_* directives.
3658 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Add cfi instrumentation.
3660 2005-12-30 Ulrich Drepper <drepper@redhat.com>
3662 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Undo last change for
3665 2005-12-29 Ulrich Drepper <drepper@redhat.com>
3667 * sysdeps/pthread/sigaction.c: Removed.
3668 * sigaction.c: New file.
3669 * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-sigaction.c.
3671 2005-12-28 Ulrich Drepper <drepper@redhat.com>
3673 * Makefile (tests): Add tst-signal7.
3674 * tst-signal7.c: New file.
3676 2005-12-27 Roland McGrath <roland@redhat.com>
3678 * sysdeps/x86_64/jmpbuf-unwind.h (_jmpbuf_sp): New inline function.
3679 (_JMPBUF_UNWINDS_ADJ): Use it, to PTR_DEMANGLE before comparison.
3680 * sysdeps/alpha/jmpbuf-unwind.h: Likewise.
3681 * sysdeps/i386/jmpbuf-unwind.h: Likewise.
3682 * sysdeps/mips/jmpbuf-unwind.h: Likewise.
3683 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
3684 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
3685 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
3686 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
3687 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
3688 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
3690 2005-12-27 Jakub Jelinek <jakub@redhat.com>
3692 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Add __next
3693 and __prev field to pthread_mutex_t.
3694 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3695 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3696 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3697 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
3698 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Add __next field
3701 2005-12-26 Ulrich Drepper <drepper@redhat.com>
3703 * pthreadP.h: Define PTHREAD_MUTEX_ROBUST_PRIVATE_NP,
3704 PTHREAD_MUTEX_ROBUST_PRIVATE_RECURSIVE_NP,
3705 PTHREAD_MUTEX_ROBUST_PRIVATE_ERRORCHECK_NP,
3706 PTHREAD_MUTEX_ROBUST_PRIVATE_ADAPTIVE_NP,
3707 PTHREAD_MUTEXATTR_FLAG_ROBUST, PTHREAD_MUTEXATTR_FLAG_PSHARED,
3708 and PTHREAD_MUTEXATTR_FLAG_BITS.
3709 * descr.h (struct pthread): Add robust_list field and define
3710 ENQUEUE_MUTEX and DEQUEUE_MUTEX macros.
3711 * pthread_mutexattr_getrobust.c: New file.
3712 * pthread_mutexattr_setrobust.c: New file.
3713 * pthread_mutex_consistent.c: New file.
3714 * sysdeps/pthread/pthread.h: Declare pthread_mutexattr_getrobust,
3715 pthread_mutexattr_setrobust, and pthread_mutex_consistent.
3716 Define PTHREAD_MUTEX_STALLED_NP and PTHREAD_MUTEX_ROBUST_NP.
3717 Adjust pthread_mutex_t initializers.
3718 * nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Add __next
3719 field to pthread_mutex_t.
3720 * nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Add __next
3721 and __prev field to pthread_mutex_t.
3722 * Versions [GLIBC_2.4]: Export pthread_mutexattr_getrobust_np,
3723 pthread_mutexattr_setrobust_np, and pthread_mutex_consistent_np.
3724 * pthread_mutexattr_getpshared.c: Use PTHREAD_MUTEXATTR_FLAG_PSHARED
3725 and PTHREAD_MUTEXATTR_FLAG_BITS macros instead of magic numbers.
3726 * pthread_mutexattr_gettype.c: Likewise.
3727 * pthread_mutexattr_setpshared.c: Likewise.
3728 * pthread_mutexattr_settype.c: Likewise.
3729 * pthread_mutex_init.c: Reject robust+pshared attribute for now.
3730 Initialize mutex kind according to robust flag.
3731 * pthread_mutex_lock.c: Implement local robust mutex.
3732 * pthread_mutex_timedlock.c: Likewise.
3733 * pthread_mutex_trylock.c: Likewise.
3734 * pthread_mutex_unlock.c: Likewise.
3735 * pthread_create.c (start_thread): Mark robust mutexes which remained
3737 * tst-robust1.c: New file.
3738 * tst-robust2.c: New file.
3739 * tst-robust3.c: New file.
3740 * tst-robust4.c: New file.
3741 * tst-robust5.c: New file.
3742 * tst-robust6.c: New file.
3743 * tst-robust7.c: New file.
3744 * Makefile (libpthread-routines): Add pthread_mutexattr_getrobust,
3745 pthread_mutexattr_setrobust, and pthread_mutex_consistent.
3746 (tests): Add tst-robust1, tst-robust2, tst-robust3, tst-robust4,
3747 tst-robust5, tst-robust6, and tst-robust7.
3749 * tst-typesizes.c: New file.
3750 * Makefile (tests): Add tst-typesizes.
3752 * tst-once3.c: More debug output.
3754 2005-12-24 Ulrich Drepper <drepper@redhat.com>
3756 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Add break
3757 missing after last change.
3759 * version.c: Update copyright year.
3761 2005-12-23 Ulrich Drepper <drepper@redhat.com>
3763 * pthread_mutex_destroy.c: Set mutex type to an invalid value.
3764 * pthread_mutex_lock.c: Return EINVAL for invalid mutex type.
3765 * pthread_mutex_trylock.c: Likewise.
3766 * pthread_mutex_timedlock.c: Likewise.
3767 * pthread_mutex_unlock.c: Likewise.
3769 2005-12-22 Roland McGrath <roland@redhat.com>
3771 * sysdeps/pthread/sigaction.c: Use "" instead of <> to include self,
3772 so that #include_next's search location is not reset to the -I..
3773 directory where <nptl/...> can be found.
3775 2005-12-22 Ulrich Drepper <drepper@redhat.com>
3778 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
3779 Fix unwind info. Remove useless branch prediction prefix.
3780 * tst-cancel24.cc: New file.
3781 * Makefile: Add rules to build and run tst-cancel24.
3783 2005-12-21 Roland McGrath <roland@redhat.com>
3785 * libc-cancellation.c: Use <> rather than "" #includes.
3786 * pt-cleanup.c: Likewise.
3787 * pthread_create.c: Likewise.
3788 * pthread_join.c: Likewise.
3789 * pthread_timedjoin.c: Likewise.
3790 * pthread_tryjoin.c: Likewise.
3791 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Likewise.
3792 * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
3793 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
3794 * unwind.c: Likewise.
3796 2005-12-19 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3798 * sysdeps/sh/tcb-offsets.sym: Add POINTER_GUARD.
3799 * sysdeps/sh/tls.h (tcbhead_t): Remove private and add pointer_guard.
3800 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
3801 THREAD_COPY_POINTER_GUARD): Define.
3803 2005-12-19 Jakub Jelinek <jakub@redhat.com>
3805 * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): Make room for 2 uintptr_t's
3807 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
3808 THREAD_COPY_POINTER_GUARD): Define.
3809 * sysdeps/powerpc/tcb-offsets.sym (POINTER_GUARD): Add.
3810 * sysdeps/powerpc/tls.h (tcbhead_t): Add pointer_guard field.
3811 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
3812 THREAD_COPY_POINTER_GUARD): Define.
3813 * sysdeps/s390/tcb-offsets.sym (STACK_GUARD): Add.
3814 * sysdeps/s390/tls.h (THREAD_GET_POINTER_GUARD,
3815 THREAD_SET_POINTER_GUARD, THREAD_COPY_POINTER_GUARD): Define.
3816 * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S (__ia64_longjmp):
3817 Use PTR_DEMANGLE for B0 if defined.
3819 2005-12-17 Ulrich Drepper <drepper@redhat.com>
3821 * pthread_create.c (__pthread_create_2_1): Use
3822 THREAD_COPY_POINTER_GUARD if available.
3823 * sysdeps/i386/tcb-offsets.sym: Add POINTER_GUARD.
3824 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
3825 * sysdeps/i386/tls.h (tcbhead_t): Add pointer_guard.
3826 Define THREAD_SET_POINTER_GUARD and THREAD_COPY_POINTER_GUARD.
3827 * sysdeps/x86_64/tls.h: Likewise.
3829 2005-12-15 Roland McGrath <roland@redhat.com>
3831 * sysdeps/unix/sysv/linux/mq_notify.c: Don't use sysdeps/generic.
3833 2005-12-13 Ulrich Drepper <drepper@redhat.com>
3835 * sysdeps/pthread/sigfillset.c: Adjust for files moved out of
3837 * errno-loc.c: New file.
3839 2005-12-12 Roland McGrath <roland@redhat.com>
3841 * init.c (__pthread_initialize_minimal_internal): Do __static_tls_size
3842 adjustments before choosing stack size. Update minimum stack size
3843 calculation to match allocate_stack change.
3845 2005-12-12 Ulrich Drepper <drepper@redhat.com>
3847 * allocatestack.c (allocate_stack): Don't demand that there is an
3848 additional full page available on the stack beside guard, TLS, the
3851 2005-11-24 Ulrich Drepper <drepper@redhat.com>
3853 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
3854 (__cleanup_fct_attribute): Use __regparm__ not regparm.
3856 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: When
3857 compiling 32-bit code we must define __cleanup_fct_attribute.
3859 005-11-24 Jakub Jelinek <jakub@redhat.com>
3862 * sysdeps/pthread/pthread.h (__pthread_unwind_next): Use
3863 __attribute__ instead of __attribute.
3864 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
3865 (__cleanup_fct_attribute): Likewise.
3867 2005-11-17 Jakub Jelinek <jakub@redhat.com>
3869 * sysdeps/pthread/unwind-forcedunwind.c (pthread_cancel_init): Put
3870 a write barrier before writing libgcc_s_getcfa.
3872 2005-11-06 Ulrich Drepper <drepper@redhat.com>
3874 * sysdeps/unix/sysv/linux/configure: Removed.
3876 2005-11-05 Ulrich Drepper <drepper@redhat.com>
3878 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Remove trace of
3879 optional init_array/fini_array support.
3881 2005-10-24 Roland McGrath <roland@redhat.com>
3883 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Remove unnecessary
3884 versioned_symbol use.
3886 2005-10-16 Roland McGrath <roland@redhat.com>
3888 * init.c (__pthread_initialize_minimal_internal): Even when using a
3889 compile-time default stack size, apply the minimum that allocate_stack
3890 will require, and round up to page size.
3892 2005-10-10 Daniel Jacobowitz <dan@codesourcery.com>
3894 * Makefile ($(test-modules)): Remove static pattern rule.
3896 2005-10-14 Jakub Jelinek <jakub@redhat.com>
3897 Ulrich Drepper <drepper@redhat.com>
3899 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix stack
3900 alignment in callback function.
3901 * Makefile: Add rules to build and run tst-align3.
3902 * tst-align3.c: New file.
3904 2005-10-03 Jakub Jelinek <jakub@redhat.com>
3906 * allocatestack.c (setxid_signal_thread): Add
3907 INTERNAL_SYSCALL_DECL (err).
3909 2005-10-02 Jakub Jelinek <jakub@redhat.com>
3911 * allocatestack.c (setxid_signal_thread): Need to use
3912 atomic_compare_and_exchange_bool_acq.
3914 2005-10-01 Ulrich Drepper <drepper@redhat.com>
3915 Jakub Jelinek <jakub@redhat.com>
3917 * descr.h: Define SETXID_BIT and SETXID_BITMASK. Adjust
3919 (struct pthread): Move specific_used field to avoid padding.
3920 Add setxid_futex field.
3921 * init.c (sighandler_setxid): Reset setxid flag and release the
3923 * allocatestack.c (setxid_signal_thread): New function. Broken
3924 out of the bodies of the two loops in __nptl_setxid. For undetached
3925 threads check whether they are exiting and if yes, don't send a signal.
3926 (__nptl_setxid): Simplify loops by using setxid_signal_thread.
3927 * pthread_create.c (start_thread): For undetached threads, check
3928 whether setxid bit is set. If yes, wait until signal has been
3931 * allocatestack.c (STACK_VARIABLES): Initialize them.
3932 * pthread_create.c (__pthread_create_2_1): Initialize pd.
3934 2004-09-02 Jakub Jelinek <jakub@redhat.com>
3936 * pthread_cond_destroy.c (__pthread_cond_destroy): If there are
3937 waiters, awake all waiters on the associated mutex.
3939 2005-09-22 Roland McGrath <roland@redhat.com>
3941 * perf.c [__x86_64__] (HP_TIMING_NOW): New macro (copied from
3942 ../sysdeps/x86_64/hp-timing.h).
3944 2005-08-29 Jakub Jelinek <jakub@redhat.com>
3946 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_WAKE_OP,
3947 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3948 (lll_futex_wake_unlock): Define.
3949 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_WAKE_OP,
3950 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3951 (lll_futex_wake_unlock): Define.
3952 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_WAKE_OP,
3953 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3954 (lll_futex_wake_unlock): Define.
3955 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_WAKE_OP,
3956 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3957 (lll_futex_wake_unlock): Define.
3958 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_WAKE_OP,
3959 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3960 (lll_futex_wake_unlock): Define.
3961 * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal): Use
3962 lll_futex_wake_unlock.
3963 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
3964 (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3965 (__pthread_cond_signal): Use FUTEX_WAKE_OP.
3966 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
3967 (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3968 (__pthread_cond_signal): Use FUTEX_WAKE_OP.
3970 2005-09-05 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3972 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
3973 Fix typo in register name.
3975 2005-08-23 Ulrich Drepper <drepper@redhat.com>
3977 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
3978 Use __sigfillset. Document that sigfillset does the right thing wrt
3981 2005-07-11 Jakub Jelinek <jakub@redhat.com>
3984 * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER,
3985 PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP,
3986 PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP,
3987 PTHREAD_MUTEX_ADAPTIVE_NP, PTHREAD_RWLOCK_INITIALIZER,
3988 PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP,
3989 PTHREAD_COND_INITIALIZER): Supply zeros for all fields
3991 * Makefile (tests): Add tst-initializers1.
3992 (CFLAGS-tst-initializers1.c): Set.
3993 * tst-initializers1.c: New test.
3995 2005-07-11 Jakub Jelinek <jakub@redhat.com>
3997 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_rwlock_t):
3998 Make sure __flags are located at offset 48 from the start of the
4001 2005-07-02 Roland McGrath <roland@redhat.com>
4003 * Makeconfig: Comment fix.
4005 2005-07-05 Jakub Jelinek <jakub@redhat.com>
4007 * descr.h (PTHREAD_STRUCT_END_PADDING): Define.
4008 * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): If PTHREAD_STRUCT_END_PADDING
4009 is smaller than 8 bytes, increase TLS_PRE_TCB_SIZE by 16 bytes.
4010 (THREAD_SYSINFO, THREAD_SELF, DB_THREAD_SELF): Don't assume
4011 TLS_PRE_TCB_SIZE is sizeof (struct pthread).
4012 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
4013 * sysdeps/ia64/tcb-offsets.sym (PID, TID, MULTIPLE_THREADS_OFFSET):
4014 Use TLS_PRE_TCB_SIZE instead of sizeof (struct pthread).
4015 * sysdeps/unix/sysv/linux/ia64/createthread.c (TLS_VALUE): Don't
4016 assume TLS_PRE_TCB_SIZE is sizeof (struct pthread).
4018 2005-06-25 Jakub Jelinek <jakub@redhat.com>
4020 * sysdeps/i386/tls.h (tcbhead_t): Add stack_guard field.
4021 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
4022 * sysdeps/x86_64/tls.h (tcbhead_t): Add sysinfo and stack_guard
4024 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
4025 * sysdeps/s390/tls.h (tcbhead_t): Add stack_guard
4026 field. Put in sysinfo field unconditionally.
4027 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
4028 * sysdeps/powerpc/tls.h (tcbhead_t): Add stack_guard field.
4029 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
4030 * sysdeps/sparc/tls.h (tcbhead_t): Add sysinfo and stack_guard
4032 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
4033 * pthread_create.c (__pthread_create_2_1): Use
4034 THREAD_COPY_STACK_GUARD macro.
4035 * Makefile: Add rules to build and run tst-stackguard1{,-static}
4037 * tst-stackguard1.c: New file.
4038 * tst-stackguard1-static.c: New file.
4040 2005-06-14 Alan Modra <amodra@bigpond.net.au>
4042 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
4043 Invoke CGOTSETUP and CGOTRESTORE.
4044 (CGOTSETUP, CGOTRESTORE): Define.
4046 2005-05-29 Richard Henderson <rth@redhat.com>
4048 * tst-cancel4.c (WRITE_BUFFER_SIZE): New.
4049 (tf_write, tf_writev): Use it.
4050 (do_test): Use socketpair instead of pipe. Set SO_SNDBUF to
4053 2005-05-23 Jakub Jelinek <jakub@redhat.com>
4055 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
4056 [IS_IN_librt] (CENABLE, CDISABLE): Use JUMPTARGET instead of
4057 __librt_*_asynccancel@local.
4059 2005-05-17 Alan Modra <amodra@bigpond.net.au>
4061 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Delete
4062 all occurrences of JUMPTARGET. Instead append @local to labels.
4064 2005-05-20 Jakub Jelinek <jakub@redhat.com>
4066 * sysdeps/i386/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN): Define to
4067 size/alignment of struct pthread rather than tcbhead_t.
4068 * sysdeps/x86_64/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
4070 * sysdeps/s390/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
4072 * sysdeps/sparc/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
4075 2005-05-19 Richard Henderson <rth@redhat.com>
4077 * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use
4078 __sync_val_compare_and_swap, not explicit _si variant.
4079 * sysdeps/ia64/pthread_spin_trylock.c (pthread_spin_trylock): Likewise.
4081 2005-05-03 Ulrich Drepper <drepper@redhat.com>
4084 * sysdeps/pthread/pthread.h: Avoid empty initializers.
4086 2005-05-03 Jakub Jelinek <jakub@redhat.com>
4088 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Remove explicit
4089 .eh_frame section, use cfi_* directives.
4091 2005-04-27 Jakub Jelinek <jakub@redhat.com>
4093 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: Use <> instead
4096 2005-04-27 Ulrich Drepper <drepper@redhat.com>
4099 * tst-cancel17.c (do_test): Add arbitrary factor to make sure
4102 2005-04-27 Roland McGrath <roland@redhat.com>
4104 * Makefile (tests): Remove tst-clock2.
4106 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Handle
4107 CLOCK_PROCESS_CPUTIME_ID and CLOCK_PROCESS_THREAD_ID specially,
4108 translating to the kernel clockid_t for our own process/thread clock.
4110 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: New file.
4112 2005-04-15 Jakub Jelinek <jakub@redhat.com>
4114 * old_pthread_cond_init.c: Include <errno.h>.
4115 (__pthread_cond_init_2_0): Fail with EINVAL if COND_ATTR is
4116 process shared or uses clock other than CLOCK_REALTIME.
4117 * pthread_cond_init.c (__pthread_cond_init): Remove bogus comment.
4119 2005-04-13 David S. Miller <davem@davemloft.net>
4121 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: New file.
4122 * sysdeps/sparc/sparc64/clone.S: New file.
4124 2005-04-05 Jakub Jelinek <jakub@redhat.com>
4127 * sysdeps/pthread/pthread.h (__pthread_cleanup_routine): Use
4128 __inline instead of inline.
4129 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_routine): Likewise.
4131 2005-03-31 Jakub Jelinek <jakub@redhat.com>
4133 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Use
4134 functionally equivalent, but shorter instructions.
4135 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
4136 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
4137 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
4139 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
4140 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
4141 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
4142 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
4143 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4144 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
4145 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
4147 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
4148 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
4149 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4150 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
4151 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
4153 2005-03-28 Daniel Jacobowitz <dan@codesourcery.com>
4155 * sysdeps/mips/Makefile: New file.
4156 * sysdeps/mips/nptl-sysdep.S: New file.
4157 * sysdeps/mips/tcb-offsets.sym: New file.
4158 * sysdeps/mips/pthread_spin_lock.S: New file.
4159 * sysdeps/mips/pthread_spin_trylock.S: New file.
4160 * sysdeps/mips/pthreaddef.h: New file.
4161 * sysdeps/mips/tls.h: New file.
4162 * sysdeps/mips/jmpbuf-unwind.h: New file.
4163 * sysdeps/unix/sysv/linux/mips/lowlevellock.h: New file.
4164 * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h: New file.
4165 * sysdeps/unix/sysv/linux/mips/bits/semaphore.h: New file.
4166 * sysdeps/unix/sysv/linux/mips/pthread_once.c: New file.
4167 * sysdeps/unix/sysv/linux/mips/fork.c: New file.
4168 * sysdeps/unix/sysv/linux/mips/pt-vfork.S: New file.
4169 * sysdeps/unix/sysv/linux/mips/vfork.S: New file.
4170 * sysdeps/unix/sysv/linux/mips/clone.S: New file.
4171 * sysdeps/unix/sysv/linux/mips/createthread.c: New file.
4172 * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: New file.
4174 2005-03-23 Ulrich Drepper <drepper@redhat.com>
4177 * pthread_create.c (__pthread_create_2_1): Rename syscall error
4180 2005-03-10 Jakub Jelinek <jakub@redhat.com>
4182 * tst-getpid1.c (do_test): Align stack passed to clone{2,}.
4184 2005-02-25 Roland McGrath <roland@redhat.com>
4186 * alloca_cutoff.c: Correct license text.
4187 * tst-unload.c: Likewise.
4188 * sysdeps/pthread/allocalim.h: Likewise.
4189 * sysdeps/pthread/pt-initfini.c: Likewise.
4190 * sysdeps/pthread/bits/libc-lock.h: Likewise.
4191 * sysdeps/pthread/bits/sigthread.h: Likewise.
4192 * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
4193 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
4195 2005-02-16 Roland McGrath <roland@redhat.com>
4197 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
4198 Use unsigned int * for ptr_nthreads.
4200 2005-02-14 Alan Modra <amodra@bigpond.net.au>
4203 * sysdeps/powerpc/tcb-offsets.sym (thread_offsetof): Redefine to suit
4206 2005-02-07 Richard Henderson <rth@redhat.com>
4209 * sysdeps/pthread/pthread.h (__sigsetjmp): Use pointer as first
4212 2004-11-03 Marcus Brinkmann <marcus@gnu.org>
4214 * sysdeps/generic/lowlevellock.h (__generic_mutex_unlock): Fix
4215 order of arguments in invocation of atomic_add_zero.
4217 2005-01-26 Jakub Jelinek <jakub@redhat.com>
4220 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S (__new_sem_trywait):
4221 Use direct %gs segment access or, if NO_TLS_DIRECT_SEG_REFS,
4222 at least gotntpoff relocation and addition.
4223 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
4225 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
4227 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
4230 2005-01-06 Ulrich Drepper <drepper@redhat.com>
4232 * allocatestack.c (init_one_static_tls): Adjust initialization of DTV
4233 entry for static tls deallocation fix.
4234 * sysdeps/alpha/tls.h (dtv_t): Change pointer type to be struct which
4235 also contains information whether the memory pointed to is static
4237 * sysdeps/i386/tls.h: Likewise.
4238 * sysdeps/ia64/tls.h: Likewise.
4239 * sysdeps/powerpc/tls.h: Likewise.
4240 * sysdeps/s390/tls.h: Likewise.
4241 * sysdeps/sh/tls.h: Likewise.
4242 * sysdeps/sparc/tls.h: Likewise.
4243 * sysdeps/x86_64/tls.h: Likewise.
4245 2004-12-27 Ulrich Drepper <drepper@redhat.com>
4247 * init.c (__pthread_initialize_minimal_internal): Use __sigemptyset.
4249 2004-12-21 Jakub Jelinek <jakub@redhat.com>
4251 * sysdeps/i386/tls.h (CALL_THREAD_FCT): Maintain 16 byte alignment of
4253 * Makefile (tests): Add tst-align2.
4254 * tst-align2.c: New test.
4255 * sysdeps/i386/Makefile (CFLAGS-tst-align{,2}.c): Add
4256 -mpreferred-stack-boundary=4.
4258 2004-12-18 Roland McGrath <roland@redhat.com>
4260 * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h:
4261 New file removed withdrawn for the moment.
4263 2004-12-17 Richard Henderson <rth@redhat.com>
4265 * sysdeps/unix/sysv/linux/alpha/clone.S: New file.
4266 * sysdeps/alpha/tcb-offsets.sym (TID_OFFSET): New.
4268 2004-12-16 Ulrich Drepper <drepper@redhat.com>
4270 * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h: New file.
4271 Increased PTHREAD_STACK_MIN.
4273 * tst-context1.c (stacks): Use bigger stack size.
4275 2004-12-16 Jakub Jelinek <jakub@redhat.com>
4277 * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: New file.
4278 * sysdeps/sparc/tcb-offsets.sym: Add TID.
4280 2004-12-15 Jakub Jelinek <jakub@redhat.com>
4282 * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: New file.
4283 * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: New file.
4284 * sysdeps/s390/tcb-offsets.sym (TID): Add.
4286 2004-12-15 Ulrich Drepper <drepper@redhat.com>
4288 * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: New file.
4290 2004-12-14 Ulrich Drepper <drepper@redhat.com>
4292 * sysdeps/powerpc/tcb-offsets.sym: Add TID.
4293 * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: New file.
4295 * tst-getpid1.c: If child crashes, report this first. Print which
4298 2004-12-09 Ulrich Drepper <drepper@redhat.com>
4300 * init.c (__pthread_initialize_minimal_internal): Also unblock
4303 2004-12-01 Jakub Jelinek <jakub@redhat.com>
4305 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_CPUTIME,
4306 _POSIX_THREAD_CPUTIME): Define to 0.
4307 * sysdeps/pthread/timer_create.c (timer_create): Remove unused code
4308 handling CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID.
4309 * sysdeps/pthread/timer_routines.c (__timer_signal_thread_pclk,
4310 __timer_signal_thread_tclk): Remove.
4311 (init_module): Remove their initialization.
4312 (thread_cleanup): Remove their cleanup assertions.
4313 * sysdeps/pthread/posix-timer.h (__timer_signal_thread_pclk,
4314 __timer_signal_thread_tclk): Remove.
4315 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Removed.
4316 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Removed.
4317 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Removed.
4319 2004-12-07 Jakub Jelinek <jakub@redhat.com>
4321 * sysdeps/ia64/tcb-offsets.sym (TID): Add.
4322 * sysdeps/unix/sysv/linux/ia64/clone2.S: New file.
4324 * Makefile (tests): Add tst-getpid2.
4325 * tst-getpid1.c (TEST_CLONE_FLAGS): Define.
4326 (do_test): Use it. Use __clone2 instead of clone on ia64.
4327 * tst-getpid2.c: New test.
4329 2004-12-07 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4331 * sysdeps/unix/sysv/linux/sh/clone.S: New file.
4333 2004-12-04 Ulrich Drepper <drepper@redhat.com>
4335 * Makefile (tests): Add tst-getpid1.
4336 * tst-getpid1.c: New file.
4337 * sysdeps/unix/sysv/linux/i386/clone.S: New file.
4338 * sysdeps/unix/sysv/linux/x86_64/clone.S: New file.
4340 2004-12-02 Roland McGrath <roland@redhat.com>
4342 * Makefile (libpthread-nonshared): Variable removed.
4343 ($(objpfx)libpthread_nonshared.a): Target removed.
4344 ($(inst_libdir)/libpthread_nonshared.a): Likewise.
4345 These are now handled by generic magic from
4346 libpthread-static-only-routines being set.
4348 2004-11-27 Ulrich Drepper <drepper@redhat.com>
4350 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_PRIORITIZED_IO,
4351 _POSIX2_CHAR_TERM, _POSIX_THREAD_PRIO_INHERIT,
4352 _POSIX_THREAD_PRIO_PROTECT): Define.
4353 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
4354 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
4355 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
4357 2004-11-26 Jakub Jelinek <jakub@redhat.com>
4359 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_ADVISORY_INFO,
4360 _POSIX_SPORADIC_SERVER, _POSIX_THREAD_SPORADIC_SERVER, _POSIX_TRACE,
4361 _POSIX_TRACE_EVENT_FILTER, _POSIX_TRACE_INHERIT, _POSIX_TRACE_LOG,
4362 _POSIX_TYPED_MEMORY_OBJECTS, _POSIX_IPV6, _POSIX_RAW_SOCKETS): Define.
4363 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
4364 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
4365 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
4367 2004-11-24 Ulrich Drepper <drepper@redhat.com>
4369 * sysdeps/x86_64/Makefile [nptl]: Define CFLAGS-pthread_create.c.
4371 * Makefile (libpthread-routines): Add pthread_setschedprio.
4372 * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setschedprio.
4373 * sysdeps/pthread/pthread.h: Declare pthread_setschedprio.
4374 * pthread_setschedprio.c: New file.
4376 2004-11-20 Jakub Jelinek <jakub@redhat.com>
4378 * pthread_create.c (pthread_cancel): Add PTHREAD_STATIC_FN_REQUIRE.
4379 * pthread_cancel.c (pthread_create): Likewise.
4381 * Makefile (libpthread-routines): Add vars.
4382 * sysdeps/pthread/createthread.c (__pthread_multiple_threads): Remove.
4383 * init.c (__default_stacksize, __is_smp): Remove.
4385 * pthreadP.h (__find_thread_by_id): If !SHARED, add weak_function
4386 and define a wrapper macro.
4387 (PTHREAD_STATIC_FN_REQUIRE): Define.
4388 * allocatestack.c (__find_thread_by_id): Undefine.
4389 * pthread_create (__pthread_keys): Remove.
4390 (pthread_mutex_lock, pthread_mutex_unlock, pthread_once,
4391 pthread_key_create, pthread_setspecific, pthread_getspecific): Add
4392 PTHREAD_STATIC_FN_REQUIRE.
4394 2004-11-18 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4396 * sysdeps/sh/tls.h (DB_THREAD_SELF): Set the correct bias
4397 parameter to REGISTER macro.
4399 2004-11-17 Roland McGrath <roland@redhat.com>
4401 * sysdeps/unix/sysv/linux/timer_routines.c (__start_helper_thread):
4402 Make sure SIGCANCEL is blocked as well.
4404 2004-11-10 Jakub Jelinek <jakub@redhat.com>
4406 * sysdeps/pthread/setxid.h: New file.
4407 * sysdeps/pthread/pthread-functions.h (HAVE_PTR__NPTL_SETXID): Remove.
4408 (struct xid_command): Add forward decl.
4409 (struct pthread_functions): Change return type of __nptl_setxid hook
4411 * pthreadP.h (__nptl_setxid): Change return type to int.
4412 * allocatestack.c (__nptl_setxid): Call INTERNAL_SYSCALL_NCS in the
4413 calling thread, return its return value and set errno on failure.
4414 * descr.h (struct xid_command): Change id type to long array.
4416 * Makefile: Add rules to build and test tst-setuid1 and
4418 * tst-setuid1.c: New test.
4419 * tst-setuid1-static.c: New test.
4421 2004-11-10 Jakub Jelinek <jakub@redhat.com>
4423 * Makefile (tests): Add tst-exit3.
4424 * tst-exit3.c: New test.
4426 2004-11-09 Ulrich Drepper <drepper@redhat.com>
4428 * Makefile (tests): Add tst-exit2.
4429 * tst-exit2.c: New file.
4431 2004-11-09 Roland McGrath <roland@redhat.com>
4434 * sysdeps/pthread/createthread.c (do_clone): Increment __nptl_nthreads
4435 here, before calling clone.
4436 * pthread_create.c (start_thread): Don't do it here.
4438 2004-11-02 Jakub Jelinek <jakub@redhat.com>
4440 * sysdeps/unix/sysv/linux/smp.h: Include <errno.h>.
4442 2004-10-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4444 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
4445 Set ETIMEDOUT to errno when time is up. Tweak to avoid
4448 2004-10-28 Jakub Jelinek <jakub@redhat.com>
4450 * pthread_create.c (__pthread_create_2_1): Avoid leaking stacks
4451 if sched_priority is not between minprio and maxprio.
4453 2004-10-25 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4455 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
4456 (__pthread_cond_timedwait): Use clock_gettime syscall if exists.
4458 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
4459 (__lll_mutex_timedlock_wait): Fix a bad branch condition.
4461 2004-10-24 Ulrich Drepper <drepper@redhat.com>
4463 * sysdeps/unix/sysv/linux/smp.h (is_smp_system): Use
4464 not-cancelable I/O functions.
4466 2004-10-21 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4468 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
4469 (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
4470 make sure 2 is stored in the futex and we looked at the old value.
4471 Fix a few other problems to return the correct value.
4473 2004-10-14 Richard Henderson <rth@redhat.com>
4475 * sysdeps/alpha/tcb-offsets.sym (thread_offsetof): Redefine to
4478 2004-10-06 Jakub Jelinek <jakub@redhat.com>
4480 * sysdeps/unix/sysv/linux/jmp-unwind.c: Include pthreadP.h instead
4481 of pthread-functions.h and pthreaddef.h.
4482 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Likewise.
4484 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
4485 Change __data.__nwaiters from int to unsigned int.
4487 * tst-clock2.c (do_test): Don't fail if _POSIX_THREAD_CPUTIME == 0 and
4488 sysconf (_SC_THREAD_CPUTIME) returns negative value.
4490 * allocatestack.c (__find_thread_by_id): Move attribute_hidden
4493 * sysdeps/s390/jmpbuf-unwind.h: Include bits/wordsize.h.
4494 (JMPBUF_CFA_UNWINDS_ADJ): Subtract 96 resp. 160 bytes from CFA.
4496 2004-10-06 Ulrich Drepper <drepper@redhat.com>
4498 * tst-cancel4.c (tf_msgrcv): Check for failure in msgget. If the
4499 test fails, remove message queue.
4500 (tf_msgsnd): Likewise.
4502 2004-10-05 Jakub Jelinek <jakub@redhat.com>
4504 * tst-clock1.c: Change #ifdef to #if defined.
4505 * tst-clock2.c: Likewise.
4506 * tst-cond11.c: Likewise.
4508 * sysdeps/pthread/timer_create.c (timer_create): Use
4509 defined _POSIX_CPUTIME && _POSIX_CPUTIME >= 0 instead of
4510 defined CLOCK_PROCESS_CPUTIME_ID #ifs and similarly for
4513 2004-10-05 Jakub Jelinek <jakub@redhat.com>
4515 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h (_POSIX_CPUTIME,
4516 _POSIX_THREAD_CPUTIME): Define to 0.
4518 2004-10-04 Ulrich Drepper <drepper@redhat.com>
4520 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Define _POSIX_CPUTIME
4521 and _POSIX_THREAD_CPUTIME to zero.
4522 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
4523 * tst-barrier2.c: Fix testing for POSIX feature.
4524 * tst-clock1.c: Likewise.
4525 * tst-clock2.c: Likewise.
4526 * tst-cond11.c: Likewise.
4527 * tst-cond4.c: Likewise.
4528 * tst-cond6.c: Likewise.
4529 * tst-flock2.c: Likewise.
4530 * tst-mutex4.c: Likewise.
4531 * tst-mutex9.c: Likewise.
4532 * tst-rwlock12.c: Likewise.
4533 * tst-rwlock4.c: Likewise.
4534 * tst-signal1.c: Likewise.
4535 * tst-spin2.c: Likewise.
4536 * sysdeps/pthread/posix-timer.h: Likewise.
4537 * sysdeps/pthread/timer_create.c: Likewise.
4538 * sysdeps/pthread/timer_routines.c: Likewise.
4540 2004-10-01 Ulrich Drepper <drepper@redhat.com>
4542 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4543 (__lll_mutex_timedlock_wait): Address futex correctly.
4545 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
4546 (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
4547 make sure 2 is stored in the futex and we looked at the old value.
4548 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4549 (__lll_mutex_timedlock_wait): Likewise. Fix a few other problems
4550 which might very well made the code not working at all before.
4553 2004-09-28 Ulrich Drepper <drepper@redhat.com>
4555 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
4556 allow SIGSETXID to be sent.
4557 * sysdeps/pthread/sigaction.c (__sigaction): Don't allow action
4558 for SIGSETXID to be defined.
4559 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
4560 SIGSETXID cannot be blocked.
4562 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4563 Add __extension__ to long long types.
4564 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4565 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4566 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4567 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4568 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
4569 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4570 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4572 2004-09-25 Ulrich Drepper <drepper@redhat.com>
4574 * descr.h (struct pthread): Add stopped_start field.
4575 * sysdeps/pthread/createthread.c (create_thread): Set
4576 start_stopped flag in descriptor for new thread appropriately.
4577 * pthread_create.c (start_thread): Only take lock to be stopped on
4578 startup if stopped_start flag says so.
4580 2004-09-24 Ulrich Drepper <drepper@redhat.com>
4582 * pthread_create.c (__pthread_create_2_1): Remember whether thread
4583 is created detached and if yes, do not try to free the stack in case
4584 the thread creation failed.
4585 * sysdeps/pthread/createthread.c (do_clone): Free stack here if clone
4586 call fails. Don't depend on INTERNAL_SYSCALL_ERRNO return zero in
4587 case there has been no error. [BZ #405]
4589 * pthread_create.c (start_thread): Don't wait for scheduler data
4590 etc to be set at the beginning of the function. The cancellation
4591 infrastructure must have been set up. And enable async
4592 cancellation before potentially going to sleep. [BZ #401]
4594 2004-09-20 Ulrich Drepper <drepper@redhat.com>
4596 * Versions: Remove exports for pthread_set*id_np functions.
4597 * sysdeps/pthread/pthread.h: Remove pthread_set*id_np prototypes
4599 * Makefile: Don't build pthread_set*id code for now.
4601 2004-09-19 Ulrich Drepper <drepper@redhat.com>
4603 * sysdeps/unix/sysv/linux/allocrtsig.c: Allocate second signal for
4605 * allocatestack.c (__nptl_setxid): New function.
4606 * descr.h (struct xid_command): Define type.
4607 * init.c (pthread_functions): Add ptr__nptl_setxid initialization.
4608 (sighandler_setxid): New function.
4609 (__pthread_initialize_minimal): Register sighandler_setxid for
4611 * pt-allocrtsig.c: Update comment.
4612 * pthreadP.h: Define SIGSETXID. Declare __xidcmd variable.
4613 Declare __nptl_setxid.
4614 * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_setxid.
4615 * sysdeps/pthread/pthread.h: Declare pthread_setgid_np,
4616 pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
4617 pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
4618 and pthread_setresuid_np.
4619 * pthread_setgid_np.c: New file.
4620 * pthread_setuid_np.c: New file.
4621 * pthread_setegid_np.c: New file.
4622 * pthread_seteuid_np.c: New file.
4623 * pthread_setregid_np.c: New file.
4624 * pthread_setreuid_np.c: New file.
4625 * pthread_setresgid_np.c: New file.
4626 * pthread_setresuid_np.c: New file.
4627 * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setgid_np,
4628 pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
4629 pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
4630 and pthread_setresuid_np.
4631 * Makefile (libpthread-routines): Add pthread_setuid, pthread_seteuid,
4632 pthread_setreuid, pthread_setresuid, pthread_setgid, pthread_setegid,
4633 pthread_setregid, and pthread_setresgid.
4635 2004-09-18 Ulrich Drepper <drepper@redhat.com>
4637 * allocatestack.c (allocate_stack): Return EAGAIN instead of
4638 ENOMEM when out of memory.
4640 2004-09-10 Roland McGrath <roland@redhat.com>
4643 * allocatestack.c (allocate_stack): Remove [__ASSUME_CLONE_STOPPED]
4644 code, since we don't try to use the broken CLONE_STOPPED any more.
4645 * pthread_create.c (start_thread): Likewise.
4647 2004-09-15 Richard Henderson <rth@redhat.com>
4649 * sysdeps/unix/sysv/linux/alpha/vfork.S: Use libc_hidden_def.
4651 2004-09-01 David Mosberger <davidm@hpl.hp.com>
4653 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h
4654 (__libc_unwind_longjmp): Delete macro and declare as function.
4655 * sysdeps/unix/sysv/linux/ia64/Makefile (sysdep_routines): Mention
4656 __ia64_longjmp, sigstack_longjmp, and __sigstack_longjmp for
4658 * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S: New file.
4659 * sysdeps/unix/sysv/linux/ia64/__sigstack_longjmp.c: New file.
4660 * sysdeps/unix/sysv/linux/ia64/unwind_longjmp.c: New file.
4662 2004-09-12 Ulrich Drepper <drepper@redhat.com>
4664 * sysdeps/pthread/pthread.h: Make rwlock prototypes available also
4666 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define rwlock
4667 types also for __USE_XOPEN2K.
4668 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4669 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4670 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4671 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4672 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4673 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4674 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4677 2004-09-08 Ulrich Drepper <drepper@redhat.com>
4679 * sysdeps/pthread/pthread.h
4680 (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Make safe for C++.
4681 (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
4682 (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
4683 (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Likewise.
4686 2004-09-07 Ulrich Drepper <drepper@redhat.com>
4688 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Allow
4689 PSEUDO to be used with . prefix.
4691 * sysdeps/unix/sysv/linux/alpha/pthread_once.c (__pthread_once):
4692 Use atomic_increment instead of atomic_exchange_and_add.
4693 * sysdeps/unix/sysv/linux/sparc/pthread_once.c (__pthread_once):
4695 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
4697 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
4700 * allocatestack.c (allocate_stack): Use atomic_increment_val
4701 instead of atomic_exchange_and_add.
4702 * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Likewise.
4703 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
4705 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
4708 * sysdeps/pthread/pthread.h (pthread_once): Remove __THROW since
4709 the initialization function might throw.
4711 2005-09-05 Richard Henderson <rth@redhat.com>
4713 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
4714 Move definition inside libpthread, libc, librt check. Provide
4715 definition for rtld.
4717 2004-09-02 Ulrich Drepper <drepper@redhat.com>
4719 * sysdeps/alpha/jmpbuf-unwind.h: Define __libc_unwind_longjmp.
4720 * sysdeps/i386/jmpbuf-unwind.h: Likewise
4721 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
4722 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
4723 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
4724 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
4725 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
4726 * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
4729 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
4730 Rename __data.__clock to __data.__nwaiters, make it unsigned int.
4731 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
4733 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
4734 Decrement __nwaiters. If pthread_cond_destroy has been called and
4735 this is the last waiter, signal pthread_cond_destroy caller and
4736 avoid using the pthread_cond_t structure after unlock.
4737 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4738 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4739 Read clock type from the least significant bits of __nwaiters instead
4741 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4742 * sysdeps/unix/sysv/linux/internaltypes.h: Define COND_CLOCK_BITS.
4744 2004-08-31 Jakub Jelinek <jakub@redhat.com>
4747 * Makefile (tests): Add tst-cond20 and tst-cond21.
4748 * tst-cond20.c: New test.
4749 * tst-cond21.c: New test.
4750 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
4751 (pthread_cond_t): Rename __data.__clock to __data.__nwaiters, make
4753 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
4755 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
4756 (pthread_cond_t): Likewise.
4757 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
4759 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4761 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
4763 * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_clock): Remove.
4764 (cond_nwaiters): New.
4766 * pthread_cond_destroy.c (__pthread_cond_destroy): Return EBUSY
4767 if there are waiters not signalled yet.
4768 Wait until all already signalled waiters wake up.
4769 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Decrement
4770 __nwaiters. If pthread_cond_destroy has been called and this is the
4771 last waiter, signal pthread_cond_destroy caller and avoid using
4772 the pthread_cond_t structure after unlock.
4773 (__pthread_cond_wait): Increment __nwaiters in the beginning,
4774 decrement it when leaving. If pthread_cond_destroy has been called
4775 and this is the last waiter, signal pthread_cond_destroy caller.
4776 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
4777 Likewise. Read clock type from the least significant bits of
4778 __nwaiters instead of __clock.
4779 * pthread_condattr_setclock.c (pthread_condattr_setclock): Check
4780 whether clock ID can be encoded in COND_CLOCK_BITS bits.
4781 * pthread_condattr_getclock.c (pthread_condattr_getclock): Decode
4782 clock type just from the last COND_CLOCK_BITS bits of value.
4783 * pthread_cond_init.c (__pthread_cond_init): Initialize __nwaiters
4784 instead of __clock, just from second bit of condattr's value.
4786 2004-08-30 Jakub Jelinek <jakub@redhat.com>
4788 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Include
4789 bits/wordsize.h. Make the header match i386 header when __WORDSIZE
4791 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
4793 2004-08-15 Roland McGrath <roland@frob.com>
4795 * pthread_atfork.c: Update copyright terms including special exception
4796 for these trivial files, which are statically linked into executables
4797 that use dynamic linking for the significant library code.
4799 2004-08-09 Jakub Jelinek <jakub@redhat.com>
4801 * DESIGN-rwlock.txt: Add decreasing of nr_readers_queued to
4802 pthread_rwlock_rdlock.
4803 * sysdeps/pthread/pthread_rwlock_rdlock (__pthread_rwlock_rdlock):
4804 Decrease __nr_readers_queued after reacquiring lock.
4805 * sysdeps/pthread/pthread_rwlock_timedrdlock
4806 (pthread_rwlock_timedrdlock): Likewise.
4807 Reported by Bob Cook <bobcook47@hotmail.com>.
4809 2004-08-11 Jakub Jelinek <jakub@redhat.com>
4811 * tst-rwlock14.c (tf): Read main thread handle from *ARG
4812 before pthread_barrier_wait.
4814 2004-08-07 Ulrich Drepper <drepper@redhat.com>
4816 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
4817 Remove unnecessary exception handling data.
4819 2004-07-23 Jakub Jelinek <jakub@redhat.com>
4822 * sysdeps/pthread/pthread.h (pthread_getcpuclockid): Use __clockid_t
4823 instead of clockid_t.
4825 2004-07-21 Roland McGrath <roland@redhat.com>
4827 * Makefile ($(objpfx)multidir.mk): Use $(make-target-directory).
4829 2004-07-19 Roland McGrath <roland@redhat.com>
4831 * tst-cancel4.c (tf_waitid): Use WEXITED flag bit if available.
4833 2004-07-02 Roland McGrath <roland@redhat.com>
4835 * configure: Don't exit.
4837 2004-07-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4839 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
4840 (__pthread_cond_timedwait): Check for invalid nanosecond in
4843 2004-07-07 Ulrich Drepper <drepper@redhat.com>
4845 * Makefile: Add rules to build and run tst-fini1.
4846 * tst-fini1.c: New file.
4847 * tst-fini1mod.c: New file.
4849 2004-07-05 Ulrich Drepper <drepper@redhat.com>
4851 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define NO_CANCELLATION
4852 if no cancellation support is needed.
4853 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
4854 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
4855 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
4856 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
4857 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
4858 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
4859 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
4860 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
4861 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
4863 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define __NR_futex
4864 only if not already defined.
4866 2004-07-05 Jakub Jelinek <jakub@redhat.com>
4868 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_unlock): Use
4869 constraint "m" instead of "0" for futex.
4871 * shlib-versions: Add powerpc64-.*-linux.*.
4873 2004-07-04 Jakub Jelinek <jakub@redhat.com>
4875 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
4876 (pthread_rwlock_timedrdlock): Use cmpq instead of cmpl to check
4878 * tst-rwlock14.c (do_test): Test for invalid tv_nsec equal to
4879 1 billion and 64-bit tv_nsec which is valid when truncated to 32
4882 2004-06-29 Roland McGrath <roland@redhat.com>
4884 * Banner: NPTL no longer has its own version number.
4885 * Makefile (nptl-version): Variable removed.
4886 * sysdeps/pthread/Makefile (CFLAGS-confstr.c): Set LIBPTHREAD_VERSION
4887 using $(version), the glibc version number.
4889 2004-06-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4891 * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
4892 Fix branch offset for a PLT entry.
4893 * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
4895 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
4897 * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
4899 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait):
4902 2004-06-28 Jakub Jelinek <jakub@redhat.com>
4904 * sysdeps/alpha/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define
4907 2004-06-28 Jakub Jelinek <jakub@redhat.com>
4909 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
4910 (pthread_rwlock_timedwrlock): Return EINVAL if tv_nsec is negative,
4912 * sysdeps/pthread/pthread_rwlock_timedrdlock.c
4913 (pthread_rwlock_timedrdlock): Likewise.
4915 2004-06-22 Jakub Jelinek <jakub@redhat.com>
4917 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
4918 Set __r7 to val, not mutex.
4920 2004-06-27 Ulrich Drepper <drepper@redhat.com>
4922 * Makefile: Add rules to build tst-rwlock14.
4923 * tst-rwlock14.c: New file.
4925 2004-06-24 Boris Hu <boris.hu@intel.com>
4927 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Add timeout validation
4929 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
4931 2004-06-19 Andreas Jaeger <aj@suse.de>
4933 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix
4934 assembler in last patch.
4936 2004-06-17 Ulrich Drepper <drepper@redhat.com>
4938 * sysdeps/pthread/pthread_cond_timedwait.c
4939 (__pthread_cond_timedwait): Also check for negativ nanoseconds.
4940 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4941 (__pthread_cond_timedwait): Check for invalid nanosecond in
4943 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4944 * tst-cond19.c: New file.
4945 * Makefile: Add rules to build and run tst-cond19.
4947 2004-06-15 Steven Munroe <sjmunroe@us.ibm.com>
4949 * tst-context1.c (GUARD_PATTERN): Defined.
4950 (tst_context_t): Define struct containing ucontext_t & guard words.
4951 (ctx): Declare as an array of tst_context_t.
4952 (fct): Verify uc_link & guard words are still valid.
4953 (tf): Initialize guard words in ctx. Adjust ctx refs for new struct.
4955 2004-06-13 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4957 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4958 Add __data.__futex field, reshuffle __data.__clock.
4959 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
4960 (__pthread_cond_signal): Increment __futex at the same time as
4961 __wakeup_seq or __total_seq. Pass address of __futex instead of
4962 address of low 32-bits of __wakeup_seq to futex syscall.
4963 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
4964 (__pthread_cond_wait): Likewise. Pass __futex value from before
4965 releasing internal lock to FUTEX_WAIT.
4966 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
4967 (__pthread_cond_timedwait): Likewise.
4968 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
4969 (FUTEX_CMP_REQUEUE): Define.
4970 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
4971 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
4972 Pass __futex value from before the unlock and __futex address instead
4973 of address of low 32-bits of __wakeup_seq to futex syscall.
4974 Fallback to FUTEX_WAKE all on any errors.
4976 2004-06-08 Jakub Jelinek <jakub@redhat.com>
4978 * pthread_mutexattr_getpshared.c (pthread_mutex_getpshared): Fix
4980 * pthread_mutexattr_gettype.c (pthread_mutexattr_gettype): Likewise.
4981 * pthread_mutexattr_init.c (__pthread_mutexattr_init): Likewise.
4982 * pthread_mutexattr_settype.c (__pthread_mutexattr_settype): Likewise.
4983 * pthread_mutexattr_setpshared.c (pthread_mutexattr_setpshared):
4984 Likewise. Reported by Bob Cook <bobcook47@hotmail.com>.
4986 2004-06-11 Martin Schwidefsky <schwidefsky@de.ibm.com>
4988 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_compare_and_swap):
4989 Add memory clobber to inline assembly.
4990 (__lll_mutex_trylock): Likewise.
4991 (__lll_mutex_cond_trylock): Likewise.
4993 2004-06-07 Martin Schwidefsky <schwidefsky@de.ibm.com>
4995 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
4996 Pass val argument as 6th system call argument in %r7.
4998 2004-05-21 Jakub Jelinek <jakub@redhat.com>
5000 * Makefile (tests): Add tst-cond16.
5001 * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_futex): Add.
5002 * pthread_cond_init.c (__pthread_cond_init): Clear __data.__futex.
5003 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
5004 Add __data.__futex field, reshuffle __data.__clock.
5005 * sysdeps/unix/sysv/linux/i386/pthread_cond_signal.S
5006 (__pthread_cond_signal): Increment __futex at the same time as
5007 __wakeup_seq or __total_seq. Pass address of __futex instead of
5008 address of low 32-bits of __wakeup_seq to futex syscall.
5009 * sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S
5010 (__pthread_cond_wait): Likewise. Pass __futex value from before
5011 releasing internal lock to FUTEX_WAIT.
5012 * sysdeps/unix/sysv/linux/i386/pthread_cond_timedwait.S
5013 (__pthread_cond_timedwait): Likewise.
5014 * sysdeps/unix/sysv/linux/i386/pthread_cond_broadcast.S
5015 (FUTEX_CMP_REQUEUE): Define.
5016 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
5017 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
5018 Pass __futex value from before the unlock and __futex address instead
5019 of address of low 32-bits of __wakeup_seq to futex syscall.
5020 Fallback to FUTEX_WAKE all on any errors.
5021 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_CMP_REQUEUE):
5023 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
5024 internally. Return non-zero if error, zero if success.
5025 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
5026 Add __data.__futex field, reshuffle __data.__clock.
5027 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_CMP_REQUEUE):
5029 (lll_futex_requeue): Add val argument, return 1 unconditionally
5031 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
5032 Add __data.__futex field, reshuffle __data.__clock.
5033 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_CMP_REQUEUE):
5035 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
5036 internally. Return non-zero if error, zero if success.
5037 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
5038 (pthread_cond_t): Add __data.__futex field, reshuffle __data.__clock.
5039 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_CMP_REQUEUE):
5041 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
5042 internally. Return non-zero if error, zero if success.
5043 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
5044 Add __data.__futex field, reshuffle __data.__clock.
5045 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_CMP_REQUEUE):
5047 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
5048 internally. Return non-zero if error, zero if success.
5049 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
5050 Add __data.__futex field, reshuffle __data.__clock.
5051 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
5052 Add __data.__futex field, reshuffle __data.__clock.
5053 * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal):
5054 Increment __futex at the same time as __wakeup_seq or __total_seq.
5055 Pass address of __futex instead of address of low 32-bits of
5056 __wakeup_seq to futex syscall.
5057 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
5058 Pass __futex value from before releasing internal lock
5060 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
5061 Likewise. Avoid unnecessary shadowing of variables.
5062 * sysdeps/pthread/pthread_cond_broadcast.c (__pthread_cond_broadcast):
5063 Set __futex to 2 * __total_seq. Pass __futex value from before the
5064 unlock and __futex address instead of address of low 32-bits of
5065 __wakeup_seq to futex_requeue macro, adjust for new return value
5067 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
5068 (__pthread_cond_signal): Increment __futex at the same time as
5069 __wakeup_seq or __total_seq. Pass address of __futex instead of
5070 address of low 32-bits of __wakeup_seq to futex syscall.
5071 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
5072 (__pthread_cond_wait): Likewise. Pass __futex value from before
5073 releasing internal lock to FUTEX_WAIT.
5074 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
5075 (__pthread_cond_timedwait): Likewise.
5076 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
5077 (FUTEX_CMP_REQUEUE): Define.
5078 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
5079 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
5080 Pass __futex value from before the unlock and __futex address instead
5081 of address of low 32-bits of __wakeup_seq to futex syscall.
5082 Fallback to FUTEX_WAKE all on any errors.
5084 2004-06-03 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5086 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_mutex_lock):
5087 Add nop to align the end of critical section.
5088 (lll_mutex_cond_lock, lll_mutex_timedlock): Likewise.
5090 2004-06-01 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5092 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
5093 Add __broadcast_seq field.
5094 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Mark
5095 all waiters as woken with woken_seq and bump broadcast counter.
5096 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use new
5097 __broadcast_seq. Increment __woken_seq correctly when cleanuped.
5098 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
5099 Comment typo fixes. Avoid returning -ETIMEDOUT.
5101 2004-06-01 Ulrich Drepper <drepper@redhat.com>
5103 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5104 (__condvar_tw_cleanup): Fix access to saved broadcast_seq value.
5105 Reported by Kaz Kojima.
5107 2004-05-25 Jakub Jelinek <jakub@redhat.com>
5109 * sysdeps/unix/sysv/linux/aio_misc.h: New file.
5111 2004-05-21 Jakub Jelinek <jakub@redhat.com>
5113 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Compare
5114 __broadcast_seq with bc_seq after acquiring internal lock instead of
5117 2004-05-18 Jakub Jelinek <jakub@redhat.com>
5119 * Makefile (.NOTPARALLEL): Only serialize make check/xcheck, not
5121 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5122 (__pthread_cond_timedwait): Avoid returning -ETIMEDOUT.
5123 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
5124 (pthread_cond_t): Add __data.__broadcast_seq field.
5125 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
5126 (FRAME_SIZE): Define.
5127 (__pthread_cond_timedwait): Use it. Store/check broadcast_seq.
5129 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S (FRAME_SIZE):
5131 (__pthread_cond_wait): Use it. Store/check broadcast_seq. Comment
5133 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
5134 (__pthread_cond_broadcast): Increment broadcast_seq. Comment typo
5137 2004-05-18 Ulrich Drepper <drepper@redhat.com>
5139 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add broadcast_seq entry.
5140 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
5141 Add __broadcast_seq field.
5142 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5143 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5144 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5145 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
5146 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5147 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Mark
5148 all waiters as woken with woken_seq and bump broadcast counter.
5149 * sysdeps/pthread/pthread_cond_broadcast.c: Likewise.
5150 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use new
5151 __broadcast_seq field.
5152 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5153 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
5154 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
5155 * pthread_cond_init.c: Initialize __broadcast_seq field.
5156 * Makefile (tests): Add tst-cond17 and tst-cond18.
5157 Add .NOTPARALLEL goal.
5158 * tst-cond16.c: New file. From Jakub.
5159 * tst-cond17.c: New file. From Jakub.
5160 * tst-cond18.c: New file. From Jakub.
5162 2004-05-16 Ulrich Drepper <drepper@redhat.com>
5164 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Correct some
5167 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
5168 Parametrize frame size. Correct some unwind info.
5169 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5171 2004-05-04 Jakub Jelinek <jakub@redhat.com>
5173 * tst-stack3.c: Note testing functionality beyond POSIX.
5175 2004-05-04 Jakub Jelinek <jakub@redhat.com>
5177 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (USE___THREAD):
5178 Change conditional from ifdef to if.
5180 2004-04-23 Jakub Jelinek <jakub@redhat.com>
5182 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SYSDEP_CANCEL_ERRNO,
5183 SYSDEP_CANCEL_ERROR): Define.
5186 2004-05-01 Jakub Jelinek <jakub@redhat.com>
5188 * Versions (libpthread): Remove __pthread_cleanup_upto@@GLIBC_PRIVATE.
5190 2004-04-20 Jakub Jelinek <jakub@redhat.com>
5192 * sem_unlink.c (sem_unlink): Change EPERM into EACCES.
5194 2004-04-19 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5196 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Add frame info.
5197 Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
5198 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Remove unneeded frame
5199 info. Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
5201 2004-04-19 Ulrich Drepper <drepper@redhat.com>
5203 * sysdeps/unix/sysv/linux/timer_routines.c: Make sure helper
5204 thread has all signals blocked.
5206 2004-04-18 Andreas Jaeger <aj@suse.de>
5208 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h
5209 (SEM_VALUE_MAX): Add missing brace.
5211 2004-04-17 Jakub Jelinek <jakub@redhat.com>
5213 * sysdeps/pthread/Makefile (tests): Add tst-mqueue8x
5215 (CFLAGS-tst-mqueue8x.c): Add -fexceptions.
5216 * sysdeps/pthread/tst-mqueue8x.c: New test.
5217 * tst-cancel4.c: Update comment about message queues.
5219 * sysdeps/pthread/timer_gettime.c (timer_gettime): For expired timer
5220 return it_value { 0, 0 }.
5221 * sysdeps/pthread/timer_create.c (timer_create): Handle SIGEV_NONE
5223 * sysdeps/pthread/timer_routines.c (thread_expire_timer): Remove
5224 assertion for SIGEV_NONE.
5225 (thread_attr_compare): Compare all attributes, not just a partial
5228 2004-04-17 Jakub Jelinek <jakub@redhat.com>
5230 * sysdeps/unix/sysv/linux/mq_notify.c: Include stdlib.h.
5232 2004-04-17 Ulrich Drepper <drepper@redhat.com>
5234 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h (SEM_VALUE_MAX):
5235 Just use a plain number.
5236 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
5237 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
5238 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
5239 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
5240 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
5241 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
5242 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
5244 2004-04-16 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5246 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Remove unneeded
5248 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
5250 2004-04-15 Jakub Jelinek <jakub@redhat.com>
5252 * sysdeps/unix/sysv/linux/timer_routines.c: Include errno.h.
5253 (timer_helper_thread): Use inline rt_sigtimedwait syscall instead
5254 of calling sigwaitinfo.
5256 2004-04-16 Ulrich Drepper <drepper@redhat.com>
5258 * allocatestack.c (allocate_stack): Set reported_guardsize
5260 * pthread_getattr_np.c (pthread_getattr_np): Use
5261 reported_guardsize instead of guardsize.
5262 * descr.h (struct pthread): Add reported_guardsize field.
5264 2004-04-13 Jakub Jelinek <jakub@redhat.com>
5266 * sysdeps/unix/sysv/linux/mq_notify.c: Shut up GCC warning.
5268 2004-04-12 Ulrich Drepper <drepper@redhat.com>
5270 * sysdeps/unix/sysv/linux/mq-notify.c: New file.
5272 2004-04-08 Jakub Jelinek <jakub@redhat.com>
5274 * sysdeps/unix/sysv/linux/bits/local_lim.h (MQ_PRIO_MAX): Define.
5275 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h (MQ_PRIO_MAX): Define.
5276 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h (MQ_PRIO_MAX): Define.
5277 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h (MQ_PRIO_MAX): Define.
5278 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
5280 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
5281 (_POSIX_MESSAGE_PASSING): Define.
5282 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h
5283 (_POSIX_MESSAGE_PASSING): Define.
5284 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h
5285 (_POSIX_MESSAGE_PASSING): Define.
5287 2004-04-04 Ulrich Drepper <drepper@redhat.com>
5289 * tst-context1.c (fct): Check whether correct stack is used.
5291 2004-04-03 Ulrich Drepper <drepper@redhat.com>
5293 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Never use
5294 matching constraints for asm mem parameters.
5296 * tst-clock2.c (tf): Don't define unless needed.
5298 2004-03-30 H.J. Lu <hongjiu.lu@intel.com>
5300 * Makefile (link-libc-static): Use $(static-gnulib) instead of
5303 2004-03-30 Ulrich Drepper <drepper@redhat.com>
5305 * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_deallocate_tsd.
5306 * init.c (pthread_functions): Add ptr__nptl_deallocate_tsd.
5307 * pthreadP.h: Declare __nptl_deallocate_tsd.
5308 * pthread_create.c (deallocate_tsd): Remove to __nptl_deallocate_tsd.
5311 * Makefile (tests): Add tst-tsd5.
5312 * tst-tsd5.c: New file.
5314 2004-03-29 Ulrich Drepper <drepper@redhat.com>
5316 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
5317 (__pthread_attr_setaffinity_old): Prepend GLIBC_ to version names
5318 is SHLIB_COMPAT check.
5319 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
5320 (__pthread_attr_getaffinity_old): Likewise.
5321 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
5322 (__pthread_getaffinity_old): Likewise.
5323 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
5324 (__pthread_setaffinity_old): Likewise.
5326 2004-03-26 Ulrich Drepper <drepper@redhat.com>
5328 * allocatestack.c (_make_stacks_executable): Call
5329 _dl_make_stack_executable first.
5331 2004-03-24 Roland McGrath <roland@redhat.com>
5333 * sysdeps/i386/pthread_spin_lock.c (pthread_spin_lock): Use "m"
5334 constraint instead of "0".
5336 2004-03-24 Ulrich Drepper <drepper@redhat.com>
5338 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
5339 (lll_mutex_cond_trylock): Define as wrapper around __lll_cond_trylock.
5341 * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Reorganize
5342 code to avoid warning.
5344 2004-03-24 Andreas Jaeger <aj@suse.de>
5346 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
5347 (__pthread_attr_setaffinity_old): Remove const.
5349 2004-03-23 Ulrich Drepper <drepper@redhat.com>
5351 * sysdeps/unix/sysv/linux/smp.h: New file.
5352 * sysdeps/unix/sysv/linux/sh/smp.h: New file.
5353 * init.c: Define __is_smp.
5354 (__pthread_initialize_minimal_internal): Call is_smp_system to
5355 initialize __is_smp.
5356 * pthreadP.h: Declare __is_smp.
5357 Define MAX_ADAPTIVE_COUNT is necessary.
5358 * pthread_mutex_init.c: Add comment regarding __spins field.
5359 * pthread_mutex_lock.c: Implement adaptive mutex type.
5360 * pthread_mutex_timedlock.c: Likewise.
5361 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
5362 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
5364 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
5365 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5366 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5367 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
5368 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5369 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5370 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5371 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define
5372 lll_mutex_cond_trylock.
5373 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5374 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
5375 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5376 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5377 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
5378 Define BUSY_WAIT_NOP.
5379 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5380 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5382 * tst-mutex5.c: Add support for testing adaptive mutexes.
5383 * tst-mutex7.c: Likewise.
5384 * tst-mutex5a.c: New file.
5385 * tst-mutex7a.c: New file.
5386 * Makefile (tests): Add tst-mutex5a and tst-mutex7a.
5388 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
5389 (__lll_mutex_timedlock_wait): Preserve r8 and r9 since the
5390 vgettimeofday call might destroy the content.
5392 * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use hint
5395 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
5396 No need to restrict type of ret. Make it int. Add comment.
5398 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
5399 Remove unnecessary setne instruction.
5401 2004-03-22 Jakub Jelinek <jakub@redhat.com>
5403 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
5404 (__pthread_getaffinity_new): Use INT_MAX instead of UINT_MAX.
5405 * pthread_getattr_np.c (pthread_getattr_np): Double size every cycle.
5406 If realloc fails, break out of the loop.
5408 2004-03-20 Andreas Jaeger <aj@suse.de>
5410 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
5411 (__pthread_setaffinity_old): Fix interface.
5412 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
5413 (__pthread_getaffinity_old): Likewise.
5415 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
5416 (__pthread_setaffinity_new): Remove duplicate declaration.
5418 2004-03-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5420 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Save
5421 the return value to a safe register.
5422 (CDISABLE): Set the function argument correctly.
5424 2004-03-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5426 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XCHG): Define.
5427 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
5428 Rewrite so that only one locked memory operation per round is needed.
5429 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
5430 (pthread_barrier_wait): After wakeup, release lock only when the
5431 last thread stopped using the barrier object.
5432 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
5433 (__pthread_cond_wait): Don't store mutex address if the current
5434 value is ~0l. Add correct cleanup support and unwind info.
5435 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
5436 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
5437 (__pthread_cond_broadcast): Don't use requeue for pshared condvars.
5438 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Update comment.
5439 * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
5440 Add correct cleanup support and unwind info.
5441 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
5442 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Add unwind
5443 information for syscall wrappers.
5445 2004-03-18 Ulrich Drepper <drepper@redhat.com>
5447 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
5448 cpusetsize field, remove next.
5449 * sysdeps/pthread/pthread.h (pthread_getaffinity_np): Add new second
5450 parameter for size of the CPU set.
5451 (pthread_setaffinity_np): Likewise.
5452 (pthread_attr_getaffinity_np): Likewise.
5453 (pthread_attr_setaffinity_np): Likewise.
5454 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: Implement
5455 interface change, keep compatibility code.
5456 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
5457 * sysdeps/unix/sysv/linux/pthread_getaffinity.c: Likewise.
5458 * sysdeps/unix/sysv/linux/pthread_setaffinity.c: Likewise.
5459 * pthreadP.h: Remove hidden_proto for pthread_getaffinity_np. Declare
5460 __pthread_getaffinity_np.
5461 * Versions: Add version for changed interfaces.
5462 * tst-attr3.c: Adjust test for interface change.
5463 * pthread_getattr_np.c: Query the kernel about the affinity mask with
5464 increasing buffer sizes.
5465 * pthread_attr_destroy.c: Remove unused list handling.
5466 * pthread_attr_init.c: Likewise.
5468 2004-03-17 Roland McGrath <roland@redhat.com>
5470 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Pass missing
5471 first argument to clock_getres so we ever enable kernel timers.
5473 2004-03-15 Ulrich Weigand <uweigand@de.ibm.com>
5475 * init.c (nptl_version): Add __attribute_used__ to nptl_version.
5477 2004-03-12 Richard Henderson <rth@redhat.com>
5479 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Propagate
5480 oldvalue from CENABLE to CDISABLE.
5482 2004-03-12 Ulrich Drepper <drepper@redhat.com>
5484 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define HOST_NAME_MAX.
5485 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
5486 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
5487 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
5489 2004-03-11 Richard Henderson <rth@redhat.com>
5491 * sysdeps/alpha/tcb-offsets.sym (PID_OFFSET): New.
5492 * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: Save/restore PID.
5493 * sysdeps/unix/sysv/linux/alpha/vfork.S: New file.
5495 2004-03-11 Jakub Jelinek <jakub@redhat.com>
5497 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Use jgnl
5498 instead of jnl instruction to jump to SYSCALL_ERROR_LABEL.
5499 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S (__vfork): Likewise.
5501 2004-03-11 Jakub Jelinek <jakub@redhat.com>
5503 * forward.c (__pthread_cond_broadcast_2_0,
5504 __pthread_cond_destroy_2_0, __pthread_cond_init_2_0,
5505 __pthread_cond_signal_2_0, __pthread_cond_wait_2_0,
5506 __pthread_cond_timedwait_2_0): Use return 0 as defaction instead of 0.
5508 2004-03-11 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5510 * sysdeps/sh/tcb-offsets.sym: Add PID.
5511 * sysdeps/unix/sysv/linux/sh/pt-vfork.S: Properly handle PID cache.
5512 * sysdeps/unix/sysv/linux/sh/vfork.S: New file.
5514 2004-03-10 Ulrich Drepper <drepper@redhat.com>
5516 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: No need to
5517 include <sysdep-cancel.h>, vfork is no cancellation point.
5518 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: Likewise.
5519 * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: Likewise.
5520 * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: Likewise.
5522 2004-03-10 Jakub Jelinek <jakub@redhat.com>
5524 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Add
5526 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
5527 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
5529 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S (__vfork):
5531 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
5532 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
5533 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Include tcb-offsets.h.
5534 * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Use DO_CALL instead
5535 of DO_CALL_VIA_BREAK. Work around a gas problem.
5537 * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: Remove.
5538 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: New file.
5539 * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: New file.
5540 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: New file.
5541 * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: New file.
5542 * sysdeps/powerpc/tcb-offsets.sym: Add PID.
5544 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S (__vfork): Don't use
5545 a local register for saving old PID. Negate PID in parent upon exit.
5547 * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: Include
5549 (__vfork): Negate PID if non-zero and set to INT_MIN if zero
5550 before syscall, set to the old value in the parent afterwards.
5551 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: New file.
5552 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: Include
5554 (__vfork): Negate PID if non-zero and set to INT_MIN if zero
5555 before syscall, set to the old value in the parent afterwards.
5556 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: New file.
5557 * sysdeps/s390/tcb-offsets.sym: Add PID.
5559 * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: Remove.
5560 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: New file.
5561 * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S: New file.
5562 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: New file.
5563 * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: New file.
5564 * sysdeps/sparc/tcb-offsets.sym: Add PID.
5566 2004-03-10 Andreas Schwab <schwab@suse.de>
5568 * sysdeps/ia64/tcb-offsets.sym: Add PID.
5569 * sysdeps/unix/sysv/linux/ia64/vfork.S: New file.
5570 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Properly handle PID cache.
5572 2004-03-09 Jakub Jelinek <jakub@redhat.com>
5574 * tst-cancel20.c (do_one_test): Clear in_sh_body first.
5575 * tst-cancel21.c (do_one_test): Likewise.
5576 Reported by Gordon Jin <gordon.jin@intel.com>.
5578 2004-02-09 Jakub Jelinek <jakub@redhat.com>
5580 * sysdeps/unix/sysv/linux/i386/vfork.S (SAVE_PID): Negate PID
5581 if non-zero and set to INT_MIN if zero.
5582 * sysdeps/unix/sysv/linux/x86_64/vfork.S (SAVE_PID): Likewise.
5583 * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Include tcb-offsets.h.
5584 (SAVE_PID, RESTORE_PID): Define.
5586 * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: Include tcb-offsets.h.
5587 Use relative path to avoid including NPTL i386/vfork.S.
5588 (SAVE_PID, RESTORE_PID): Define.
5589 * sysdeps/unix/sysv/linux/raise.c: Include limits.h.
5590 (raise): Handle THREAD_SELF->pid INT_MIN the same as 0.
5591 * Makefile (tests): Add tst-vfork1, tst-vfork2, tst-vfork1x and
5593 (tests-reverse): Add tst-vfork1x and tst-vfork2x.
5594 * tst-vfork1.c: New test.
5595 * tst-vfork2.c: New test.
5596 * tst-vfork1x.c: New test.
5597 * tst-vfork2x.c: New test.
5599 2004-03-08 Ulrich Drepper <drepper@redhat.com>
5601 * sysdeps/i386/tcb-offsets.sym: Add PID.
5602 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
5603 * sysdeps/unix/sysv/linux/i386/vfork.S: New file.
5604 * sysdeps/unix/sysv/linux/x86_64/vfork.S: New file.
5606 2004-03-08 Steven Munroe <sjmunroe@us.ibm.com>
5608 * sysdeps/unix/sysv/linux/powerpc/Versions: Remove leading tabs.
5610 2004-03-08 H.J. Lu <hongjiu.lu@intel.com>
5612 * sysdeps/s390/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
5615 2004-03-07 Ulrich Drepper <drepper@redhat.com>
5617 * sysdeps/ia64/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
5620 * tst-once4.c: Remove unnecessary macro definition.
5622 * tst-mutex7.c (do_test): Limit thread stack size.
5623 * tst-once2.c (do_test): Likewise.
5624 * tst-tls3.c (do_test): Likewise.
5625 * tst-tls1.c (do_test): Likewise.
5626 * tst-signal3.c (do_test): Likewise.
5627 * tst-kill6.c (do_test): Likewise.
5628 * tst-key4.c (do_test): Likewise.
5629 * tst-join4.c (do_test): Likewise.
5630 * tst-fork1.c (do_test): Likewise.
5631 * tst-context1.c (do_test): Likewise.
5632 * tst-cond2.c (do_test): Likewise.
5633 * tst-cond10.c (do_test): Likewise.
5634 * tst-clock2.c (do_test): Likewise.
5635 * tst-cancel10.c (do_test): Likewise.
5636 * tst-basic2.c (do_test): Likewise.
5637 * tst-barrier4.c (do_test): Likewise.
5639 2004-03-05 Ulrich Drepper <drepper@redhat.com>
5641 * sysdeps/i386/tls.h: Use GLRO instead of GL where appropriate.
5643 2004-03-01 Ulrich Drepper <drepper@redhat.com>
5645 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5646 (__pthread_cond_timedwait): Optimize wakeup test.
5647 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
5648 (__pthread_cond_wait): Likewise.
5649 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
5650 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
5653 2004-02-29 Ulrich Drepper <drepper@redhat.com>
5655 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
5656 (__lll_mutex_lock_wait): Optimize a bit more. Just one copy of
5657 the atomic instruction needed.
5658 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
5659 (__lll_mutex_lock_wait): Likewise.
5661 2004-02-28 Ulrich Drepper <drepper@redhat.com>
5663 * Makefile (tests): Add tst-cond14 and tst-cond15.
5664 * tst-cond14.c: New file.
5665 * tst-cond15.c: New file.
5667 2004-02-27 Ulrich Drepper <drepper@redhat.com>
5669 * sysdeps/pthread/createthread.c (create_thread): Remove use of
5670 CLONE_STOPPED. We cannot use SIGCONT which means CLONE_STOPPED
5671 needs to be implemented differently to be useful.
5673 2004-02-26 Ulrich Drepper <drepper@redhat.com>
5675 * pthread_attr_setschedparam.c: Don't test priority against limits
5676 here. Set ATTR_FLAG_SCHED_SET flag.
5677 * pthread_attr_setschedpolicy.c: Set ATTR_FLAG_POLICY_SET flag.
5678 * pthread_create.c (__pthread_create_2_1): Copy scheduling attributes
5679 from parent thread to child. If attribute is used and scheduling
5680 parameters are not inherited, copy parameters from attribute or
5681 compute them. Check priority value.
5682 * pthread_getschedparam.c: If the parameters aren't known yet get
5683 them from the kernel.
5684 * pthread_setschedparam.c: Set ATTR_FLAG_SCHED_SET and
5685 ATTR_FLAG_POLICY_SET flag for thread.
5686 * sysdeps/unix/sysv/linux/internaltypes.h: Define ATTR_FLAG_SCHED_SET
5687 and ATTR_FLAG_POLICY_SET.
5689 * sysdeps/pthread/createthread.c: Use tgkill if possible.
5691 * pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr): Don't
5692 fail if stack address hasn't been set. Just return 0.
5694 2004-02-25 Ulrich Drepper <drepper@redhat.com>
5696 * Makefile (tests-nolibpthread): Add tst-unload. Don't link with
5697 libpthread for the files in this list.
5698 (CFLAGS-tst-unload): Removed.
5699 * tst-unload.c (do_test): Don't use complete path for
5702 * Makefile: Define sonames for tst-tls5mod, tst-_res1mod1, and
5705 2004-02-22 Ulrich Drepper <drepper@redhat.com>
5707 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
5708 (__lll_mutex_lock_wait): Rewrite so that only one locked memory
5709 operation per round is needed.
5710 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
5711 (__lll_mutex_lock_wait): Likewise.
5713 2004-02-20 Ulrich Drepper <drepper@redhat.com>
5715 * tst-cancel9.c (cleanup): Don't print to stderr.
5717 2004-02-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5719 * sysdeps/sh/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Fix variable name.
5721 2004-02-20 Jakub Jelinek <jakub@redhat.com>
5723 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
5724 (__syscall_error_handler2): Call CDISABLE.
5725 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
5726 (__syscall_error_handler2): Call CDISABLE.
5728 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
5729 Release lock before the loop, don't reacquire it.
5731 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h (DL_ARGV_NOT_RELRO): Define.
5733 2004-02-19 Andreas Schwab <schwab@suse.de>
5735 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
5738 2004-02-18 Ulrich Drepper <drepper@redhat.com>
5740 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
5741 (pthread_barrier_wait): After wakeup, release lock only when the
5742 last thread stopped using the barrier object.
5743 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S
5744 (pthread_barrier_wait): Likewise.
5745 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
5747 * Makefile (tests): Add tst-barrier4.
5748 * tst-barrier4.c: New file.
5750 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5751 (__pthread_cond_timedwait): Perform timeout test while holding
5752 internal lock to prevent wakeup race.
5753 Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
5754 * sysdeps/pthread/pthread_cond_timedwait.c
5755 (__pthread_cond_timedwait): Likewise.
5756 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
5757 (__pthread_cond_timedwait): Likewise.
5759 2004-02-18 Jakub Jelinek <jakub@redhat.com>
5761 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S
5762 (__pthread_rwlock_unlock): Access WRITER as 32-bit value.
5763 * Makefile (tests): Add tst-rwlock13.
5764 * tst-rwlock13.c: New test.
5766 2004-02-16 Ulrich Drepper <drepper@redhat.com>
5768 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5769 (__condvar_tw_cleanup): Little optimization.
5770 Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
5772 2004-02-16 Steven Munroe <sjmunroe@us.ibm.com>
5774 * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: Replace libc with
5775 libpthread as "lib" parameter to SHLIB_COMPAT.
5776 (__novmx_siglongjmp): Fix typo in function name.
5777 (__novmx_longjmp): Fix typo in function name.
5779 2004-02-13 Ulrich Drepper <drepper@redhat.com>
5781 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Add a
5784 * sysdeps/generic/pt-longjmp.c: Moved to...
5785 * sysdeps/pthread/pt-longjmp.c: ...here. New file.
5787 2004-01-29 Steven Munroe <sjmunroe@us.ibm.com>
5789 * Makefile (libpthread-routines): Add pt-cleanup.
5790 * pt-longjmp.c: Removed.
5791 * pt-cleanup.c: Copied __pthread_cleanup_upto to here. New file.
5792 * sysdeps/generic/pt-longjmp.c: Copied longjmp to here. New file.
5793 * sysdeps/unix/sysv/linux/powerpc/Versions: New file.
5794 Version longjmp, siglongjmp for GLIBC_2.3.4.
5795 * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: New File.
5797 2004-02-13 Ulrich Drepper <drepper@redhat.com>
5799 * sysdeps/pthread/pthread_cond_timedwait.c
5800 (__pthread_cond_timedwait): Optimize. Drop internal lock earlier.
5801 Reuse code. Add __builtin_expects.
5803 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5804 (__pthread_cond_timedwait): Get internal lock in case timeout has
5805 passed before the futex syscall.
5806 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5808 2004-01-20 Ulrich Drepper <drepper@redhat.com>
5810 * allocatestack.c: Pretty printing.
5812 * sysdeps/pthread/createthread.c (create_thread): Don't add
5813 CLONE_DETACHED bit if it is not necessary.
5815 2004-01-16 Ulrich Drepper <drepper@redhat.com>
5817 * pthread_getattr_np.c: Include ldsodefs.h.
5819 2004-01-16 Richard Henderson <rth@redhat.com>
5821 * allocatestack.c: Don't declare __libc_stack_end.
5822 * init.c (__pthread_initialize_minimal_internal): Likewise.
5823 * pthread_getattr_np.c (pthread_getattr_np): Likewise.
5825 2004-01-15 Richard Henderson <rth@redhat.com>
5827 * sysdeps/alpha/tls.h (tcbhead_t): Add private.
5828 (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE,
5829 TLS_PRE_TCB_SIZE, TLS_TCB_ALIGN, INSTALL_DTV, INSTALL_NEW_DTV,
5830 GET_DTV, THREAD_DTV, THREAD_SELF, DB_THREAD_SELF): Match ia64.
5831 (TLS_TCB_OFFSET, THREAD_ID, NO_TLS_OFFSET): Remove.
5832 (THREAD_GETMEM, THREAD_GETMEM_NC): Simplify.
5833 (THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
5834 * sysdeps/unix/sysv/linux/alpha/createthread.c (TLS_VALUE): Match ia64.
5836 2004-01-14 Ulrich Drepper <drepper@redhat.com>
5838 * init.c (pthread_functions): Make array const.
5840 2004-01-13 Ulrich Drepper <drepper@redhat.com>
5842 * allocatestack.c (__make_stacks_executable): Change interface.
5843 Check parameters. Pass parameter on to libc counterpart.
5844 * pthreadP.h: Change declaration.
5846 2004-01-13 Richard Henderson <rth@redhat.com>
5848 * pthread_attr_setstack.c (__old_pthread_attr_setstack): Use
5850 * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize):
5853 * sysdeps/alpha/Makefile: New file.
5854 * sysdeps/alpha/tcb-offsets.sym: New file.
5855 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
5856 Use MULTIPLE_THREADS_OFFSET to implement !libpthread !libc version.
5858 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Rewrite based
5861 2004-01-08 Jakub Jelinek <jakub@redhat.com>
5863 * Makefile (tests): Add tst-backtrace1.
5864 * tst-backtrace1.c: New test.
5866 2003-12-11 Ulrich Weigand <uweigand@de.ibm.com>
5868 * sysdeps/alpha/tls.h (DB_THREAD_SELF): Pass bit size of thread
5869 register as second parameter to the REGISTER macro.
5870 * sysdeps/ia64/tls.h (DB_THREAD_SELF): Likewise.
5871 * sysdeps/powerpc/tls.h (DB_THREAD_SELF): Likewise.
5872 * sysdeps/sh/tls.h (DB_THREAD_SELF): Likewise.
5873 * sysdeps/sparc/tls.h (DB_THREAD_SELF): Likewise.
5874 * sysdeps/s390/tls.h (DB_THREAD_SELF): Pass __WORDSIZE as bit size
5875 of thread register as second parameter to REGISTER macro in 64 case.
5877 2004-01-03 Ulrich Drepper <drepper@redhat.com>
5879 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Removed.
5880 (CFLAGS-getpid.o): Defined.
5881 (CFLAGS-getpid.os): Defined.
5883 2003-12-31 Ulrich Drepper <drepper@redhat.com>
5885 * pthread_getattr_np.c (pthread_getattr_np): Make sure stack info
5886 returned for main thread does not overlap with any other VMA.
5887 Patch by Jakub Jelinek.
5889 2003-12-29 Jakub Jelinek <jakub@redhat.com>
5891 * tst-raise1.c: Include stdio.h.
5893 2003-12-23 Jakub Jelinek <jakub@redhat.com>
5895 * sysdeps/unix/sysv/linux/raise.c (raise): Protect pid = selftid
5896 setting with __ASSUME_TGKILL || defined __NR_tgkill.
5897 If pid is 0, set it to selftid.
5898 * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Make inline.
5899 Don't set self->pid but self->tid. If self->pid == 0 and self->tid
5900 != 0, return self->tid without doing a syscall.
5901 * descr.h (struct pthread): Move pid field after tid.
5903 * Makefile (tests): Add tst-raise1.
5904 * tst-raise1.c: New file.
5906 2003-12-23 Roland McGrath <roland@redhat.com>
5908 * tst-oddstacklimit.c: New file.
5909 * Makefile (tests): Add it.
5910 (tst-oddstacklimit-ENV): New variable.
5912 * init.c (__pthread_initialize_minimal_internal): Round stack rlimit
5913 value up to page size for __default_stacksize.
5915 2003-12-21 Ulrich Drepper <drepper@redhat.com>
5917 * Makefile (tests): Add tst-eintr5.
5918 * tst-eintr5.c: New file.
5920 * eintr.c (eintr_source): Prevent sending signal to self.
5922 * tst-eintr2.c (tf1): Improve error message.
5924 2003-12-20 Ulrich Drepper <drepper@redhat.com>
5926 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Define.
5927 * sysdeps/unix/sysv/linux/getpid.c: New file.
5928 * pthread_cancel.c: Add comment explaining use of PID field.
5929 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
5930 * pthread_getattr_np.c: Use abs() when comparing PID and TID fields.
5931 * sysdeps/unix/sysv/linux/fork.c: Negate PID field of parent
5932 temporarily to signal the field must not be relied on and updated
5934 * sysdeps/unix/sysv/linux/pt-raise.c: Handle case where PID is
5935 temporarily negative.
5936 * sysdeps/unix/sysv/linux/raise.c: Likewise.
5938 2003-12-19 Ulrich Drepper <drepper@redhat.com>
5940 * eintr.c (setup_eintr): Add new parameter. Pass to thread function.
5941 (eintr_source): If ARG != NULL, use pthread_kill.
5942 * tst-eintr1.c: Adjust for this change.
5943 * tst-eintr2.c: Likewise.
5944 * Makefile (tests): Add tst-eintr3 and tst-eintr4.
5945 * tst-eintr3.c: New file.
5946 * tst-eintr4.c: New file.
5948 2003-12-19 Jakub Jelinek <jakub@redhat.com>
5950 * libc-cancellation.c (__libc_enable_asynccancel): Don't cancel
5951 if CANCELSTATE_BITMASK is set.
5952 * sysdeps/pthread/librt-cancellation.c (__librt_enable_asynccancel):
5955 * Makefile (tests): Add tst-cancel22 and tst-cancel23.
5956 (tests-reverse): Add tst-cancel23.
5957 * tst-cancel22.c: New test.
5958 * tst-cancel23.c: New test.
5960 2003-12-18 Ulrich Drepper <drepper@redhat.com>
5962 * tst-eintr1.c: Better error messages.
5964 * Makefile (tests): Add tst-eintr2.
5965 * tst-eintr2.c: New file.
5967 2003-12-18 Jakub Jelinek <jakub@redhat.com>
5969 * Makefile (tests): Add tst-cancel21 and tst-cancelx21.
5970 (CFLAGS-tst-cancelx21.c): Set.
5971 * tst-cancel21.c: New test.
5972 * tst-cancelx21.c: New test.
5974 * unwind.c (FRAME_LEFT): Add adj argument. Subtract it from each
5976 (unwind_stop): Use _JMPBUF_CFA_UNWINDS_ADJ macro instead of
5977 _JMPBUF_CFA_UNWINDS. Adjust FRAME_LEFT invocations.
5978 * pt-longjmp.c: Include jmpbuf-unwind.h.
5979 (__pthread_cleanup_upto): Use _JMPBUF_UNWINDS_ADJ macro instead of
5980 _JMPBUF_UNWINDS. Adjust compared pointers.
5981 * init.c (__pthread_initialize_minimal_internal): Initialize
5982 pd->stackblock_size.
5983 * sysdeps/pthread/jmpbuf-unwind.h: Removed.
5984 * sysdeps/alpha/jmpbuf-unwind.h: New file.
5985 * sysdeps/i386/jmpbuf-unwind.h: New file.
5986 * sysdeps/powerpc/jmpbuf-unwind.h: New file.
5987 * sysdeps/s390/jmpbuf-unwind.h: New file.
5988 * sysdeps/sh/jmpbuf-unwind.h: New file.
5989 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: New file.
5990 * sysdeps/x86_64/jmpbuf-unwind.h: New file.
5991 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Include stdint.h.
5992 (_JMPBUF_CFA_UNWINDS): Remove.
5993 (_JMPBUF_CFA_UNWINDS_ADJ, _JMPBUF_UNWINDS_ADJ): Define.
5995 2003-12-12 Jakub Jelinek <jakub@redhat.com>
5997 * Makefile (tests): Add tst-cancel20 and tst-cancelx20.
5998 (CFLAGS-tst-cancelx20.c): Set.
5999 * tst-cancel20.c: New test.
6000 * tst-cancelx20.c: New test.
6002 2003-12-17 Ulrich Drepper <drepper@redhat.com>
6004 * init.c (__pthread_initialize_minimal_internal): Don't treat
6005 architectures with separate register stack special here when
6006 computing default stack size.
6008 2003-12-17 Roland McGrath <roland@redhat.com>
6010 * Makefile (tst-cancelx7-ARGS): New variable.
6011 Reportd by Greg Schafer <gschafer@zip.com.au>.
6013 2003-12-17 Jakub Jelinek <jakub@redhat.com>
6015 * Makefile (tests): Add tst-stack3. Depend on $(objpfx)tst-stack3-mem.
6016 (generated): Add tst-stack3.mtrace and tst-stack3-mem.
6017 (tst-stack3-ENV): Set.
6018 ($(objpfx)tst-stack3-mem): New.
6019 * tst-stack3.c: New test.
6021 2003-12-10 David Mosberger <davidm@hpl.hp.com>
6023 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init_EPILOG_BEGINS):
6024 Add unwind directives. Drop unused .regstk directive.
6025 (_fini_EPILOG_BEGINS): Add unwind directives.
6027 2003-12-11 Ulrich Drepper <drepper@redhat.com>
6029 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
6030 Assume parameter is a pointer.
6031 (lll_futex_wake): Likewise.
6032 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_wait):
6034 (lll_futex_wake): Likewise.
6035 Reported by Boris Hu.
6036 * sysdeps/unix/sysv/linux/unregister-atfork.c
6037 (__unregister_atfork): Pass pointer to refcntr to lll_futex_wait.
6039 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Simplify a bit.
6041 2003-12-10 Ulrich Drepper <drepper@redhat.com>
6043 * sysdeps/pthread/bits/libc-lock.h (__rtld_lock_initialize): Define.
6044 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Call
6045 __rtld_lock_initialize for ld.so lock.
6046 Patch in part by Adam Li <adam.li@intel.com>.
6048 2003-12-02 David Mosberger <davidm@hpl.hp.com>
6050 * Makefile (link-libc-static): Remove -lgcc_eh---it's already mentioned
6051 in $(gnulib). Also, remove stale comment.
6053 2003-11-12 David Mosberger <davidm@hpl.hp.com>
6055 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Take
6056 advantage of new syscall stub and optimize accordingly.
6058 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__NR_futex): Rename
6059 from SYS_futex, to match expectations of
6060 sysdep.h:DO_INLINE_SYSCALL.
6061 (lll_futex_clobbers): Remove.
6062 (lll_futex_timed_wait): Rewrite in terms of DO_INLINE_SYSCALL.
6063 (lll_futex_wake): Likewise.
6064 (lll_futex_requeue): Likewise.
6065 (__lll_mutex_trylock): Rewrite to a macro, so we can include this
6066 file before DO_INLINE_SYSCALL is defined (proposed by Jakub
6068 (__lll_mutex_lock): Likewise.
6069 (__lll_mutex_cond_lock): Likewise.
6070 (__lll_mutex_timed_lock): Likewise.
6071 (__lll_mutex_unlock): Likewise.
6072 (__lll_mutex_unlock_force): Likewise.
6074 * sysdeps/ia64/tls.h: Move declaration of __thread_self up so it
6075 comes before the include of <sysdep.h>.
6076 (THREAD_SELF_SYSINFO): New macro.
6077 (THREAD_SYSINFO): Likewise.
6078 (INIT_SYSINFO): New macro.
6079 (TLS_INIT_TP): Call INIT_SYSINFO.
6081 * sysdeps/ia64/tcb-offsets.sym: Add SYSINFO_OFFSET.
6083 * sysdeps/pthread/createthread.c (create_thread): Use
6084 THREAD_SELF_SYSINFO and THREAD_SYSINFO instead of open code.
6085 * allocatestack.c (allocate_stack): Use THREAD_SYSINFO and
6086 THREAD_SELF_SYSINFO instead of open code.
6087 * sysdeps/i386/tls.h (THREAD_SELF_SYSINFO): New macro.
6088 (THREAD_SYSINFO): Likewise.
6090 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: New file.
6092 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Work around gas problem.
6094 2003-12-06 Ulrich Drepper <drepper@redhat.com>
6096 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Use .init_array
6097 instead of .init. Patch by David Mosberger.
6099 2003-11-30 Thorsten Kukuk <kukuk@suse.de>
6101 * sysdeps/pthread/configure.in: Remove broken declaration in C
6102 cleanup handling check.
6104 2003-11-30 Andreas Jaeger <aj@suse.de>
6106 * Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time).
6107 * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
6110 2003-11-27 Jakub Jelinek <jakub@redhat.com>
6112 * sysdeps/unix/sysv/linux/internaltypes.h (ATTR_FLAG_OLDATTR): Define.
6113 * pthread_attr_destroy.c: Include shlib-compat.h.
6114 (__pthread_attr_destroy): Return immediately if ATTR_FLAG_OLDATTR
6115 is set in iattr->flags.
6116 * pthread_attr_init.c (__pthread_attr_init_2_0): Set ATTR_FLAG_OLDATTR.
6118 2003-11-21 Jakub Jelinek <jakub@redhat.com>
6120 * Makefile (distribute): Add tst-cleanup4aux.c.
6122 * tst-cond12.c (prepare): Add prototype. Move after test-skeleton.c
6125 2003-11-21 Ulrich Drepper <drepper@redhat.com>
6127 * tst-cond12.c (do_test): If USE_COND_SIGNAL is defined, use
6128 pthread_cond_signal.
6130 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Don't
6131 store mutex address if the current value is ~0l.
6132 * sysdeps/pthread/pthread_cond_timedwait.c
6133 (__pthread_cond_timedwait): Likewise.
6134 * sysdeps/pthread/pthread_cond_broadcast.c
6135 (__pthread_cond_broadcast): Don't use requeue for pshared
6138 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
6139 (__pthread_cond_wait): Don't store mutex address if the current
6141 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
6142 (__pthread_cond_timedwait): Likewise.
6143 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
6144 (__pthread_cond_broadcast): Don't use requeue for pshared
6147 * pthread_cond_init.c (__pthread_cond_init): Initialize __mutex
6148 element with ~0l for pshared condvars, with NULL otherwise.
6150 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
6151 (__pthread_cond_wait): Don't store mutex address if the current
6153 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6154 (__pthread_cond_timedwait): Likewise.
6155 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
6156 (__pthread_cond_broadcast): Don't use requeue for pshared
6159 * Makefile: Add rules to build and run tst-cond12 and tst-cond13.
6160 * tst-cond12.c: New file.
6161 * tst-cond13.c: New file.
6163 2003-11-17 Ulrich Drepper <drepper@redhat.com>
6165 * sysdeps/pthread/configure.in: Make missing forced unwind support
6168 2003-11-11 Ulrich Drepper <drepper@redhat.com>
6170 * pthreadP.h: Don't declare __pthread_unwind as weak inside libpthread.
6172 2003-11-06 Ulrich Drepper <drepper@redhat.com>
6174 * Makefile: Add magic to clean up correctly.
6176 2003-11-05 Jakub Jelinek <jakub@redhat.com>
6178 * unwind.c (FRAME_LEFT): Define.
6179 (unwind_stop): Handle old style cleanups here.
6180 (__pthread_unwind): Handle old style cleanups only if
6181 !HAVE_FORCED_UNWIND.
6182 * Makefile (tests): Add tst-cleanup4 and tst-cleanupx4.
6183 (CFLAGS-tst-cleanupx4.c): Add -fexceptions.
6184 ($(objpfx)tst-cleanup4): Depend on $(objpfx)tst-cleanup4aux.o.
6185 ($(objpfx)tst-cleanupx4): Likewise.
6186 * tst-cleanup4.c: New test.
6187 * tst-cleanup4aux.c: New.
6188 * tst-cleanupx4.c: New test.
6190 2003-11-04 Ulrich Drepper <drepper@redhat.com>
6192 * sysdeps/pthread/bits/stdio-lock.h: Use lll_*lock instead of
6193 lll_mutex_*lock macros to skip atomic operations on some archs.
6195 2003-11-03 Ulrich Drepper <drepper@redhat.com>
6197 * sysdeps/pthread/tst-timer.c (main): Initialize
6198 sigev2.sigev_value as well.
6200 2003-10-15 Roland McGrath <roland@redhat.com>
6202 * sysdeps/pthread/configure.in: Barf if visibility attribute support
6204 * sysdeps/pthread/configure: Regenerated.
6206 2003-10-09 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6208 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Completely revamp the
6209 locking macros. No distinction between normal and mutex locking
6211 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Rewrite mutex locking.
6212 Merge bits from lowlevelmutex.S we still need.
6213 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Remove.
6214 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
6215 * sysdeps/unix/sysv/linux/sh/not-cancel.h: New file.
6216 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Adjust for
6217 new mutex implementation.
6218 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Likewise.
6219 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
6220 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
6221 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
6222 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
6223 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
6224 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
6225 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
6226 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
6227 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO): Also defined
6228 symbol for entry point to avoid cancellation.
6230 2003-10-07 Jakub Jelinek <jakub@redhat.com>
6232 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Backout 2003-10-02
6234 (SAVE_OLDTYPE_0): Fix a typo.
6236 2003-10-03 Ulrich Drepper <drepper@redhat.com>
6238 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
6239 Check __sigsetjmp return value. Reported by Daniel Jacobowitz.
6241 2003-10-02 Ulrich Drepper <drepper@redhat.com>
6243 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (DOCARGS_1): Use
6246 2003-10-02 Jakub Jelinek <jakub@redhat.com>
6248 * Makefile (tests): Add tst-cancel19.
6249 * tst-cancel19.c: New test.
6251 2003-10-02 Ulrich Drepper <drepper@redhat.com>
6253 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix saving and
6254 restoring of the old cancellation type.
6256 2003-09-30 Jakub Jelinek <jakub@redhat.com>
6258 * sysdeps/pthread/malloc-machine.h: Remove misleading comment.
6260 2003-09-27 Wolfram Gloger <wg@malloc.de>
6262 * sysdeps/pthread/malloc-machine.h: New file
6264 2003-09-24 Roland McGrath <roland@redhat.com>
6266 * allocatestack.c (__make_stacks_executable): Don't ignore return
6267 value from _dl_make_stack_executable.
6269 2003-09-24 Ulrich Drepper <drepper@redhat.com>
6271 * allocatestack.c (__make_stacks_executable): Also change
6272 permission of the currently unused stacks.
6274 * allocatestack.c (change_stack_perm): Split out from
6275 __make_stacks_executable.
6276 (allocate_stack): If the required permission changed between the time
6277 we started preparing the stack and queueing it, change the permission.
6278 (__make_stacks_executable): Call change_stack_perm.
6280 * Makefile: Build tst-execstack-mod locally.
6281 * tst-execstack-mod.c: New file.
6283 2003-09-23 Jakub Jelinek <jakub@redhat.com>
6285 * Makefile (tests): Only add tst-execstack if have-z-execstack is yes.
6287 2003-09-23 Roland McGrath <roland@redhat.com>
6289 * tst-execstack.c: New file.
6290 * Makefile (tests): Add it.
6291 ($(objpfx)tst-execstack, $(objpfx)tst-execstack.out): New targets.
6292 (LDFLAGS-tst-execstack): New variable.
6294 * allocatestack.c (allocate_stack): Use GL(dl_stack_flags) to decide
6295 whether to use PROT_EXEC for stack mmap.
6296 (__make_stacks_executable): New function.
6297 * pthreadP.h: Declare it.
6298 * init.c (__pthread_initialize_minimal_internal): Set
6299 GL(dl_make_stack_executable_hook) to that.
6301 2003-09-22 Ulrich Drepper <drepper@redhat.com>
6303 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Adjust for latest
6304 recommendation from AMD re avoidance of lock prefix.
6306 2003-09-22 Jakub Jelinek <jakub@redhat.com>
6308 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait): Use
6309 lll_futex_timed_wait instead of lll_futex_wait.
6310 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Removed.
6311 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Removed.
6312 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: Removed.
6313 * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: Removed.
6314 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Removed.
6315 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Removed.
6316 * sysdeps/unix/sysv/linux/s390/sem_post.c: Removed.
6317 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Removed.
6318 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Include atomic.h.
6319 Completely revamp the locking macros. No distinction between
6320 normal and mutex locking anymore.
6321 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
6322 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock_wait,
6323 __lll_lock_timedwait): Fix prototypes.
6324 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_lock_wait,
6325 __lll_lock_timedwait): Likewise.
6326 (lll_mutex_lock, lll_mutex_cond_lock): Use _val instead of _bool
6327 macros, add __builtin_expect.
6328 (lll_mutex_timedlock): Likewise. Fix return value.
6329 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Removed.
6330 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: Removed.
6331 * sysdeps/unix/sysv/linux/i386/i586/lowlevelmutex.S: Removed.
6332 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: Removed.
6333 * sysdeps/unix/sysv/linux/i386/i686/lowlevelmutex.S: Removed.
6334 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: Removed.
6335 * sysdeps/unix/sysv/linux/lowlevelmutex.c: Removed.
6336 * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: Removed.
6338 2003-09-22 Ulrich Drepper <drepper@redhat.com>
6340 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
6341 (__lll_mutex_lock_wait): Minor optimization to avoid one atomic
6342 operation if possible.
6344 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Don't play tricks
6345 like jumping over the lock prefix.
6347 2003-09-21 Ulrich Drepper <drepper@redhat.com>
6349 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Completely revamp the
6350 locking macros. No distinction between normal and mutex locking
6352 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
6353 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
6354 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
6355 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Rewrite mutex
6356 locking. Merge bits from lowlevelmutex.S we still need.
6357 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
6358 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
6359 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Removed.
6360 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Removed.
6361 * Makefile (routines): Remove libc-lowlevelmutex.
6362 (libpthread-rountines): Remove lowlevelmutex.
6363 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Adjust
6364 for new mutex implementation.
6365 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
6366 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6367 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6368 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
6369 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
6371 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
6373 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
6374 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
6375 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise
6376 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
6377 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6378 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6379 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
6380 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
6382 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
6384 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
6385 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
6386 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
6388 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
6389 * sysdeps/pthread/pthread_cond_signal.c: Don't use requeue.
6391 2003-09-20 Ulrich Drepper <drepper@redhat.com>
6393 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't match memory
6394 in parameters of asm with output parameters.
6396 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Change
6397 type of DECR parameter to int.
6398 * pthreadP.h: Adjust prototype of __pthread_mutex_unlock_usercnt.
6400 2003-09-18 Jakub Jelinek <jakub@redhat.com>
6402 * tst-attr3.c (tf, do_test): Print stack start/end/size and
6403 guardsize for each thread.
6405 2003-09-17 Jakub Jelinek <jakub@redhat.com>
6407 * sysdeps/pthread/pthread.h (pthread_getattr_np): Clarify usage.
6408 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
6409 (pthread_attr_setaffinity_np): Handle cpuset == NULL.
6411 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
6412 (pthread_attr_getaffinity_np): Don't segfault if iattr->cpuset is
6414 * pthread_getattr_np.c: Set cpuset using pthread_getaffinity_np.
6415 * pthreadP.h (pthread_getaffinity_np): Add hidden_proto.
6416 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
6417 (pthread_getaffinity_np): Add hidden_def.
6419 * Makefile (tests): Add tst-attr3.
6420 * tst-attr3.c: New test.
6422 * sysdeps/i386/Makefile (CFLAGS-tst-align.c): Remove.
6424 2003-09-15 Jakub Jelinek <jakub@redhat.com>
6426 * sysdeps/i386/Makefile (CFLAGS-pthread_create.c,
6427 CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
6429 2003-09-17 Jakub Jelinek <jakub@redhat.com>
6431 * Makefile (CFLAGS-tst-align.c): Add $(stack-align-test-flags).
6432 * tst-align.c: Include tst-stack-align.h.
6433 (tf, do_test): Use TEST_STACK_ALIGN macro.
6435 2003-09-17 Ulrich Drepper <drepper@redhat.com>
6437 * pthread_attr_init.c (__pthread_attr_init_2_0): Remove unused
6440 2003-09-16 Ulrich Drepper <drepper@redhat.com>
6442 * pthread_getattr_np.c (pthread_getattr_np): Correctly fill in the
6443 stack-related values for the initial thread.
6445 2003-09-15 Jakub Jelinek <jakub@redhat.com>
6447 * Makefile (CFLAGS-pthread_once.c): Add $(uses-callbacks).
6449 2003-09-11 Ulrich Drepper <drepper@redhat.com>
6451 * pthread_mutex_lock.c: Minor code rearrangements.
6453 2003-09-05 Roland McGrath <roland@redhat.com>
6455 * pthread_create.c (__pthread_pthread_sizeof_descr): Removed.
6456 Instead, include ../nptl_db/db_info.c to do its magic.
6457 * pthread_key_create.c (__pthread_pthread_keys_max): Removed.
6458 (__pthread_pthread_key_2ndlevel_size): Likewise.
6459 * sysdeps/alpha/tls.h (DB_THREAD_SELF): New macro.
6460 * sysdeps/i386/tls.h (DB_THREAD_SELF): New macro.
6461 * sysdeps/ia64/tls.h (DB_THREAD_SELF): New macro.
6462 * sysdeps/powerpc/tls.h (DB_THREAD_SELF): New macro.
6463 * sysdeps/s390/tls.h (DB_THREAD_SELF): New macro.
6464 * sysdeps/sh/tls.h (DB_THREAD_SELF): New macro.
6465 * sysdeps/sparc/tls.h (DB_THREAD_SELF): New macro.
6466 * sysdeps/x86_64/tls.h (DB_THREAD_SELF): New macro.
6467 * sysdeps/alpha/td_ta_map_lwp2thr.c: File removed.
6468 * sysdeps/generic/td_ta_map_lwp2thr.c: File removed.
6469 * sysdeps/i386/td_ta_map_lwp2thr.c: File removed.
6470 * sysdeps/ia64/td_ta_map_lwp2thr.c: File removed.
6471 * sysdeps/powerpc/td_ta_map_lwp2thr.c: File removed.
6472 * sysdeps/s390/td_ta_map_lwp2thr.c: File removed.
6473 * sysdeps/sh/td_ta_map_lwp2thr.c: File removed.
6474 * sysdeps/sparc/td_ta_map_lwp2thr.c: File removed.
6475 * sysdeps/x86_64/td_ta_map_lwp2thr.c: File removed.
6477 2003-09-08 Ulrich Drepper <drepper@redhat.com>
6479 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Change type
6480 of pthread_t to be compatible with LT.
6481 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
6482 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6483 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6484 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6485 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
6486 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6487 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
6489 2003-09-04 Ulrich Drepper <drepper@redhat.com>
6491 * sysdeps/unix/sysv/linux/i386/not-cancel.h (fcntl_not_cancel): Define.
6493 2003-09-04 Jakub Jelinek <jakub@redhat.com>
6495 * unwind-forcedunwind.c: Move to...
6496 * sysdeps/pthread/unwind-forcedunwind.c: ...here.
6497 (pthread_cancel_init): Use ARCH_CANCEL_INIT if defined.
6498 * sysdeps/pthread/jmpbuf-unwind.h: New file.
6499 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: New file.
6500 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: New file.
6501 * unwind.c: Include jmpbuf-unwind.h.
6502 (unwind_stop): Use _JMPBUF_CFA_UNWINDS macro.
6504 2003-09-02 Jakub Jelinek <jakub@redhat.com>
6506 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: New file.
6507 * sysdeps/unix/sysv/linux/ia64/Versions (libpthread): Export
6508 pthread_attr_setstack and pthread_attr_setstacksize @@GLIBC_2.3.3.
6509 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: New file.
6510 * sysdeps/unix/sysv/linux/alpha/Versions: New file.
6511 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: New file.
6512 * sysdeps/unix/sysv/linux/sparc/Versions: New file.
6513 * pthread_attr_setstack.c (__old_pthread_attr_setstack): New function.
6514 (pthread_attr_setstack): If PTHREAD_STACK_MIN != 16384, export
6515 as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.2.
6516 * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize): New
6518 (pthread_attr_setstacksize): If PTHREAD_STACK_MIN != 16384, export
6519 as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.1.
6520 * Makefile (tests): Add tst-stack2.
6521 * tst-stack2.c: New test.
6522 * tst-stack1.c: Include limits.h and sys/param.h.
6523 (do_test): Set size to MAX (4 * getpagesize (), PTHREAD_STACK_MIN).
6525 * pthread_condattr_setpshared.c: Include errno.h.
6526 (pthread_condattr_setpshared): Return EINVAL if pshared
6527 is neither PTHREAD_PROCESS_PRIVATE nor PTHREAD_PROCESS_SHARED.
6529 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Also
6530 defined symbol for entry point to avoid cancellation.
6531 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
6533 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
6535 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
6537 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h (PSEUDO):
6539 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
6541 * sysdeps/unix/sysv/linux/i386/not-cancel.h (__open_nocancel,
6542 __close_nocancel, __read_nocancel, __write_nocancel,
6543 __waitpid_nocancel): Add attribute_hidden. If not in libc.so,
6544 libpthread.so or librt.so, define to corresponding function
6545 without _nocancel suffix.
6546 * sysdeps/unix/sysv/linux/s390/not-cancel.h: New file.
6547 * sysdeps/unix/sysv/linux/powerpc/not-cancel.h: New file.
6548 * sysdeps/unix/sysv/linux/sparc/not-cancel.h: New file.
6550 * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: Fix a typo.
6552 2003-09-02 Ulrich Drepper <drepper@redhat.com>
6554 * sysdeps/unix/sysv/linux/i386/not-cancel.h: New file.
6555 * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: New file.
6557 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Make sure the code
6558 in subsections has a symbol associated with it.
6560 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Also
6561 defined symbol for entry point to avoid cancellation.
6562 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Likewise.
6564 2003-09-01 Jakub Jelinek <jakub@redhat.com>
6566 * Makefile (tests): Add tst-tls5.
6567 (module-names): Add tst-tls5mod{,a,b,c,d,e,f}.
6568 ($(objpfx)tst-tls5mod{,a,b,c,d,e,f}.so-no-z-defs): Set to yes.
6569 ($(objpfx)tst-tls5): New.
6570 ($(objpfx)tst-tls6.out): Likewise.
6571 (tests): Depend on $(objpfx)tst-tls6.out.
6572 * tst-tls3.c: Include stdint.h and pthreaddef.h.
6573 (do_test): Check pthread_self () return value alignment.
6574 * tst-tls3mod.c: Include stdint.h and pthreaddef.h.
6575 (tf): Check pthread_self () return value alignment.
6576 * tst-tls5.c: New test.
6578 * tst-tls5mod.c: New.
6579 * tst-tls5moda.c: New.
6580 * tst-tls5modb.c: New.
6581 * tst-tls5modc.c: New.
6582 * tst-tls5modd.c: New.
6583 * tst-tls5mode.c: New.
6584 * tst-tls5modf.c: New.
6585 * tst-tls6.sh: New test.
6587 * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Add
6588 ptr___pthread_cond_timedwait and ptr___pthread_cond_timedwait_2_0.
6589 * init.c (pthread_functions): Initialize them.
6590 * forward.c (pthread_cond_timedwait@GLIBC_2.0,
6591 pthread_cond_timedwait@@GLIBC_2.3.2): New forwards.
6592 * Versions (libc): Export pthread_cond_timedwait@GLIBC_2.0,
6593 pthread_cond_timedwait@@GLIBC_2.3.2.
6595 2003-09-01 Jakub Jelinek <jakub@redhat.com>
6597 * sysdeps/unix/sysv/linux/alpha/timer_create.c: New file.
6598 * sysdeps/unix/sysv/linux/alpha/timer_delete.c: New file.
6599 * sysdeps/unix/sysv/linux/alpha/timer_getoverr.c: New file.
6600 * sysdeps/unix/sysv/linux/alpha/timer_gettime.c: New file.
6601 * sysdeps/unix/sysv/linux/alpha/timer_settime.c: New file.
6602 * sysdeps/unix/sysv/linux/alpha/Versions: New file.
6604 * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
6606 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Define
6607 _POSIX_THREAD_PRIORITY_SCHEDULING.
6608 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
6610 2003-08-31 Ulrich Drepper <drepper@redhat.com>
6612 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock): Avoid
6613 nested function, use static inline function from libio.h.
6614 Code by Richard Henderson.
6616 * sysdeps/pthread/bits/libc-lock.h: Mark pthread_setcancelstate as
6619 2003-08-30 Jakub Jelinek <jakub@redhat.com>
6621 * sysdeps/unix/sysv/linux/sparc/sparc64/Versions: New file.
6622 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_create.c: New file.
6623 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_delete.c: New file.
6624 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_getoverr.c: New file.
6625 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_gettime.c: New file.
6626 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_settime.c: New file.
6627 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
6628 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
6629 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: New file.
6630 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: New file.
6631 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: New file.
6632 * sysdeps/unix/sysv/linux/sparc/pthread_once.c: New file.
6633 * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: New file.
6634 * sysdeps/unix/sysv/linux/sparc/fork.c: New file.
6635 * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
6636 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: New file.
6637 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: New file.
6638 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: New file.
6639 * sysdeps/sparc/sparc32/pthread_spin_lock.c: New file.
6640 * sysdeps/sparc/sparc32/pthread_spin_trylock.c: New file.
6641 * sysdeps/sparc/sparc32/pthreaddef.h: New file.
6642 * sysdeps/sparc/sparc64/pthread_spin_lock.c: New file.
6643 * sysdeps/sparc/sparc64/pthread_spin_trylock.c: New file.
6644 * sysdeps/sparc/sparc64/pthread_spin_unlock.c: New file.
6645 * sysdeps/sparc/sparc64/pthreaddef.h: New file.
6646 * sysdeps/sparc/tls.h: New file.
6647 * sysdeps/sparc/tcb-offsets.sym: New file.
6648 * sysdeps/sparc/Makefile: New file.
6649 * sysdeps/sparc/td_ta_map_lwp2thr.c: New file.
6650 * init.c [__sparc__] (__NR_set_tid_address): Define.
6652 2003-08-29 Jakub Jelinek <jakub@redhat.com>
6654 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock,
6655 _IO_release_lock): Define.
6657 2003-08-29 Jakub Jelinek <jakuB@redhat.com>
6659 * tst-cancel4.c (tf_sigwait, tf_sigwaitinfo, tf_sigtimedwait): Add
6660 sigemptyset before sigaddset. Reported by jreiser@BitWagon.com.
6662 2003-08-27 Ulrich Drepper <drepper@redhat.com>
6664 * sysdeps/pthread/pthread.h (pthread_exit): Remove __THROW.
6665 (__pthread_cleanup_class): Add missing return types of member
6668 2003-08-26 Steven Munroe <sjmunroe@us.ibm.com>
6670 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
6671 (lll_mutex_unlock_force): Add memory barrier between store and futex
6674 2003-08-25 Ulrich Drepper <drepper@redhat.com>
6676 * tst-cancel4.c (do_test): Also unlink tempfname and remove
6677 tempmsg in first loop.
6679 2003-08-18 Ulrich Drepper <drepper@redhat.com>
6681 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
6682 _POSIX_THREAD_PRIORITY_SCHEDULING.
6683 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
6685 2003-08-07 Jakub Jelinek <jakub@redhat.com>
6687 * sysdeps/pthread/bits/libc-lock.h [_LIBC && SHARED]
6688 (__rtld_lock_default_lock_recursive,
6689 __rtld_lock_default_unlock_recursive): Define.
6690 [_LIBC && SHARED] (__rtld_lock_lock_recursive,
6691 __rtld_lock_unlock_recursive): Define using
6692 GL(_dl_rtld_*lock_recursive).
6693 * init.c (__pthread_initialize_minimal_internal): Initialize
6694 _dl_rtld_lock_recursive and _dl_rtld_unlock_recursive.
6695 Lock GL(_dl_load_lock) the same number of times as
6696 GL(_dl_load_lock) using non-mt implementation was nested.
6698 * pthreadP.h (__pthread_cleanup_upto): Add hidden_proto.
6699 * pt-longjmp.c (__pthread_cleanup_upto): Add hidden_def.
6701 2003-08-06 Jakub Jelinek <jakub@redhat.com>
6703 * tst-cancel17.c (do_test): Make len2 maximum of page size and
6706 2003-08-07 Jakub Jelinek <jakub@redhat.com>
6708 * pthread_create.c (__pthread_create_2_0): Clear new_attr.cpuset.
6710 2003-08-03 Jakub Jelinek <jakub@redhat.com>
6712 * sysdeps/pthread/createthread.c (do_clone): Move error handling
6713 to first syscall error check. Move syscall error check for tkill
6714 into __ASSUME_CLONE_STOPPED #ifdef.
6716 2003-08-02 Ulrich Drepper <drepper@redhat.com>
6718 * sysdeps/pthread/createthread.c (do_clone): If __ASSUME_CLONE_STOPPED
6719 is not defined, do explicit synchronization.
6720 (create_thread): Do not lock pd->lock here. If __ASSUME_CLONE_STOPPED
6721 is not defined also unlock pd->lock for non-debugging case in case
6723 * pthread_create.c (start_thread): Always get and release pd->lock
6724 if __ASSUME_CLONE_STOPPED is not defined.
6725 (start_thread_debug): Removed. Adjust users.
6726 * allocatestack.c (allocate_stack): Always initialize lock if
6727 __ASSUME_CLONE_STOPPED is not defined.
6728 * Makefile (tests): Add tst-sched1.
6729 * tst-sched1.c: New file.
6731 * sysdeps/pthread/createthread.c (do_clone): Only use
6732 sched_setschduler and pass correct parameters.
6734 2003-07-31 Jakub Jelinek <jakub@redhat.com>
6736 * sysdeps/pthread/pthread.h (pthread_attr_setstackaddr,
6737 pthread_attr_setstacksize): Change PTHREAD_STACK_SIZE to
6738 PTHREAD_STACK_MIN in comments.
6740 2003-07-31 Jakub Jelinek <jakub@redhat.com>
6742 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
6743 Shut up warnings if INTERNAL_SYSCALL_ERROR_P does not use its first
6745 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Likewise.
6746 * pthread_condattr_setclock.c (pthread_condattr_setclock): Likewise.
6747 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Include pthreaddef.h.
6748 (__pthread_cleanup_upto): Fix prototype.
6749 (_longjmp_unwind): Adjust caller.
6750 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_timedlock):
6751 Change second argument to const struct pointer.
6752 * tst-sem8.c (main): Remove unused s2 and s3 variables.
6753 * tst-sem9.c (main): Likewise.
6754 * unwind.c: Include string.h for strlen prototype.
6756 2003-07-31 Ulrich Drepper <drepper@redhat.com>
6758 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6759 (__pthread_cond_timedwait): Don't use cmov unless HAVE_CMOV is defined.
6760 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S:
6762 Patch by Nicholas Miell <nmiell@attbi.com>.
6764 2003-07-30 Jakub Jelinek <jakub@redhat.com>
6766 * init.c (__pthread_initialize_minimal_internal): Initialize
6767 GL(dl_init_static_tls).
6768 * pthreadP.h (__pthread_init_static_tls): New prototype.
6769 * allocatestack.c (init_one_static_tls, __pthread_init_static_tls):
6771 * Makefile (tests): Add tst-tls4.
6772 (modules-names): Add tst-tls4moda and tst-tls4modb.
6773 ($(objpfx)tst-tls4): Link against libdl and libpthread.
6774 ($(objpfx)tst-tls4.out): Depend on tst-tls4moda.so and
6776 * tst-tls4.c: New file.
6777 * tst-tls4moda.c: New file.
6778 * tst-tls4modb.c: New file.
6780 2003-06-19 Daniel Jacobowitz <drow@mvista.com>
6782 * sysdeps/pthread/timer_create.c (timer_create): Call timer_delref
6783 before __timer_dealloc.
6784 * sysdeps/pthread/timer_routines.c (__timer_thread_find_matching):
6785 Don't call list_unlink.
6787 2003-07-29 Roland McGrath <roland@redhat.com>
6789 * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
6791 2003-07-25 Jakub Jelinek <jakub@redhat.com>
6793 * tst-cancel17.c (do_test): Check if aio_cancel failed.
6794 Don't reuse struct aiocb A if it failed.
6795 Write fpathconf (fds[1], _PC_PIPE_BUF) + 2 bytes using aio_write,
6796 not just one byte, as that does not block.
6798 2003-07-22 Jakub Jelinek <jakub@redhat.com>
6800 * sysdeps/pthread/unwind-resume.c: New file.
6801 * sysdeps/pthread/Makefile (routines, shared-only-routines): Add
6802 unwind-resume in csu subdir.
6803 (CFLAGS-unwind-resume.c, CFLAGS-rt-unwind-resume.c): Compile with
6805 (librt-sysdep_routines, librt-shared-only-routines): Add
6807 * sysdeps/pthread/rt-unwind-resume.c: New file.
6808 * unwind-forcedunwind.c: New file.
6809 * Makefile (libpthread-routines): Add unwind-forcedunwind.
6810 (libpthread-shared-only-routines): Likewise.
6811 (CFLAGS-unwind-forcedunwind.c): Compile with exceptions.
6812 * pthreadP.h (pthread_cancel_init): New prototype.
6813 * pthread_cancel.c (pthread_cancel): Call pthread_cancel_init.
6815 * sysdeps/pthread/createthread.c (do_thread, create_thread): Make
6816 attr argument const struct pthread_attr *.
6818 * res.c (__res_state): Return __resp.
6819 * descr.h: Include resolv.h.
6820 (struct pthread): Add res field.
6821 * pthread_create.c: Include resolv.h.
6822 (start_thread): Initialize __resp.
6823 * Makefile (tests): Add tst-_res1.
6824 (module-names): Add tst-_res1mod1, tst-_res1mod2.
6825 ($(objpfx)tst-_res1mod2.so): Depend on $(objpfx)tst-_res1mod1.so.
6826 ($(objpfx)tst-_res1): Depend on $(objpfx)tst-_res1mod2.so and
6828 * tst-_res1.c: New file.
6829 * tst-_res1mod1.c: New file.
6830 * tst-_res1mod2.c: New file.
6832 2003-07-21 Ulrich Drepper <drepper@redhat.com>
6834 * sysdeps/pthread/createthread.c: Don't define CLONE_STOPPED.
6836 * Makefile: Define various *-no-z-defs variables for test DSOs
6837 which has undefined symbols.
6839 2003-07-21 Steven Munroe <sjmunroe@us.ibm.com>
6841 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
6842 Retry if the stwcx fails to store once_control.
6844 2003-07-20 Ulrich Drepper <drepper@redhat.com>
6846 * Makefile (libpthread-routines): Add pthread_attr_getaffinity and
6847 pthread_attr_setaffinity.
6848 * Versions [libpthread] (GLIBC_2.3.3): Likewise.
6849 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: New file.
6850 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: New file.
6851 * pthread_attr_destroy.c: Free cpuset element if allocated.
6852 * pthread_create.c: Pass iattr as additional parameter to
6854 * sysdeps/pthread/createthread.c: If attribute is provided and
6855 a new thread is created with affinity set or scheduling parameters,
6856 start thread with CLONE_STOPPED.
6857 * sysdeps/pthread/pthread.h: Declare pthread_attr_getaffinity and
6858 pthread_attr_setaffinity.
6859 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
6862 2003-07-15 Ulrich Drepper <drepper@redhat.com>
6864 * tst-tcancel-wrappers.sh: lseek and llseek are not cancelation points.
6866 2003-07-14 Ulrich Drepper <drepper@redhat.com>
6868 * sysdeps/pthread/configure.in: Require CFI directives also for
6871 2003-07-15 Jakub Jelinek <jakub@redhat.com>
6873 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
6876 2003-07-12 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6878 * sysdeps/sh/tcb-offsets.sym: Add RESULT, TID, CANCELHANDLING and
6880 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use more
6881 registers as variables. Call __pthread_mutex_unlock_usercnt.
6882 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
6883 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Store TID
6884 not self pointer in __writer. Compare with TID to determine
6886 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
6887 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
6889 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
6891 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add cancellation support.
6892 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
6893 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Define all the nice
6894 macros also when compiling librt.
6896 2003-07-11 Jakub Jelinek <jakub@redhat.com>
6898 * Makefile (CFLAGS-pthread_once.c): Add -fexceptions
6899 -fasynchronous-unwind-tables.
6900 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
6901 (PSEUDO): Add cfi directives.
6902 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO):
6904 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
6907 2003-07-08 Jakub Jelinek <jakub@redhat.com>
6909 * pthreadP.h (__pthread_unwind_next, __pthread_register_cancel,
6910 __pthread_unregister_cancel): Add prototypes and hidden_proto.
6911 * unwind.c (__pthread_unwind_next): Add hidden_def.
6912 * cleanup.c (__pthread_register_cancel, __pthread_unregister_cancel):
6914 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
6915 Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
6916 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
6918 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
6919 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
6921 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once): Use
6922 HIDDEN_JUMPTARGET to call __pthread_register_cancel,
6923 __pthread_unregister_cancel and __pthread_unwind_next.
6925 2003-07-04 Jakub Jelinek <jakub@redhat.com>
6927 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Use
6928 different symbol for the cancellation syscall wrapper and
6929 non-cancellation syscall wrapper.
6930 (PSEUDO_END): Define.
6932 2003-07-05 Richard Henderson <rth@redhat.com>
6934 * sysdeps/alpha/elf/pt-initfini.c: Avoid .ent/.end.
6935 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_wait,
6936 lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
6937 return actual return value from the syscall, not 0.
6939 2003-07-07 Ulrich Drepper <drepper@redhat.com>
6941 * descr.h (struct pthread): Add pid field.
6942 * allocatestack.c (allocate_stack): Initialize pid field in descriptor.
6943 (__reclaim_stacks): Likewise.
6944 * init.c (sigcancel_handler): If __ASSUME_CORRECT_SI_PID is defined
6945 also check for PID of the signal source.
6946 (__pthread_initialize_minimal_internal): Also initialize pid field
6947 of initial thread's descriptor.
6948 * pthread_cancel.c: Use tgkill instead of tkill if possible.
6949 * sysdeps/unix/sysv/linux/fork.c: Likewise.
6950 * sysdeps/unix/sysv/linux/pt-raise.c: Likewise.
6951 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
6952 * sysdeps/unix/sysv/linux/raise.c: Likewise.
6954 2003-07-05 Ulrich Drepper <drepper@redhat.com>
6956 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_push): Renamed.
6957 Fix use of parameter.
6958 (__libc_cleanup_pop): Likewise.
6960 2003-07-04 Ulrich Drepper <drepper@redhat.com>
6962 * init.c (sigcancel_handler): Change parameters to match handler
6963 for SA_SIGACTION. Check signal number and code to recognize
6964 invalid invocations.
6966 2003-07-03 Roland McGrath <roland@redhat.com>
6968 * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr):
6969 Apply sizeof (struct pthread) bias to r13 value.
6971 2003-07-03 Ulrich Drepper <drepper@redhat.com>
6973 * sysdeps/pthread/configure.in: Require CFI directives.
6975 * sysdeps/pthread/librt-cancellation.c (__pthread_unwind): Remove
6977 * pthreadP.h (__pthread_unwind): Add hidden_proto if used in
6978 libpthread compilation.
6979 * unwind.c (__pthread_unwind): Add hidden_def.
6980 * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_unwind.
6982 2003-07-01 Ulrich Drepper <drepper@redhat.com>
6984 * libc-cancellation.c (__libc_cleanup_routine): Define.
6985 * sysdeps/pthread/bits/libc-lock.h (__pthread_cleanup_push): Define.
6986 (__pthread_cleanup_pop): Define.
6988 2003-07-01 Richard Henderson <rth@redhat.com>
6990 * sysdeps/alpha/elf/pt-initfini.c: New file.
6991 * sysdeps/alpha/pthread_spin_lock.S: New file.
6992 * sysdeps/alpha/pthread_spin_trylock.S: New file.
6993 * sysdeps/alpha/pthreaddef.h: New file.
6994 * sysdeps/alpha/td_ta_map_lwp2thr.c: New file.
6995 * sysdeps/alpha/tls.h: New file.
6996 * sysdeps/unix/sysv/linux/alpha/Makefile: New file.
6997 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: New file.
6998 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: New file.
6999 * sysdeps/unix/sysv/linux/alpha/createthread.c: New file.
7000 * sysdeps/unix/sysv/linux/alpha/fork.c: New file.
7001 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: New file.
7002 * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: New file.
7003 * sysdeps/unix/sysv/linux/alpha/pthread_once.c: New file.
7004 * sysdeps/unix/sysv/linux/alpha/sem_post.c: New file.
7005 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
7007 2003-07-01 Ulrich Drepper <drepper@redhat.com>
7009 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Add correct
7010 cleanup support and unwind info.
7012 2003-06-30 Ulrich Drepper <drepper@redhat.com>
7014 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
7015 Use correct cleanup handler registration. Add unwind info.
7016 * sysdeps/unix/sysv/linux/unwindbuf.sym: New file.
7017 * sysdeps/unix/sysv/linux/Makefile: Add rule to build unwindbuf.h.
7018 * tst-once3.c: Add cleanup handler and check it is called.
7019 * tst-once4.c: Likewise.
7020 * tst-oncex3.c: New file.
7021 * tst-oncex4.c: New file.
7022 * Makefile: Add rules to build and run tst-oncex3 and tst-oncex4.
7024 2003-06-29 Ulrich Drepper <drepper@redhat.com>
7026 * sysdeps/pthread/configure.in: Check for C cleanup handling in gcc.
7028 2003-06-27 Ulrich Drepper <drepper@redhat.com>
7030 * tst-cancel4.c (tf_msgrcv): Use IPC_PRIVATE in msgget call.
7031 (tf_msgsnd): Likewise.
7033 * tst-cancel4.c (tf_msgrcv): Strengthen test against valid
7034 premature returns a bit more.
7036 2003-06-26 Ulrich Drepper <drepper@redhat.com>
7038 * sysdeps/pthread/librt-cancellation.c: Move __pthread_unwind
7039 definition to the front.
7041 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rename
7042 the cleanup functions to make the names unique. Fix dwarf opcode
7044 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Rename cleanup
7045 functions to make the names unique. Fix CFA offset for two blocks.
7047 2003-06-25 Ulrich Drepper <drepper@redhat.com>
7049 * sysdeps/pthread/pthread.h (class __pthread_cleanup_class): Add
7050 missing closing braces.
7051 Patch by Christophe Saout <christophe@saout.de>.
7053 2003-06-24 Roland McGrath <roland@redhat.com>
7055 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Typo fix.
7057 2003-06-24 Ulrich Drepper <drepper@redhat.com>
7059 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: New file.
7060 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: New file.
7062 * pthreadP.h: Declare __find_thread_by_id.
7063 * allocatestack.c [HP_TIMING_AVAIL]: Define __find_thread_by_id.
7064 * pthread_clock_gettime.c: Allow using other thread's clock.
7065 * pthread_clock_settime.c: Likewise.
7066 * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
7067 * Makefile: Add rules to build and run tst-clock2.
7068 * tst-clock2.c: New file.
7070 2003-06-23 Ulrich Drepper <drepper@redhat.com>
7072 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rewrite
7073 to use exception-based cleanup handler.
7074 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7076 * tst-cond8.c (ch): Announce that we are done.
7078 * pthreadP.h (__pthread_mutex_cond_lock): Mark with internal_function.
7080 * tst-cancel17.c (tf): Retry aio_suspend in case of EINTR.
7081 Also test aio_suspend with timeout value.
7083 2003-06-22 Ulrich Drepper <drepper@redhat.com>
7085 * pthreadP.h: Mark __pthread_mutex_unlock_usercnt also hidden.
7086 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Add
7089 * pthreadP.h (__pthread_mutex_init_internal): Mark hidden.
7090 (__pthread_mutex_lock_internal): Likewise.
7091 (__pthread_mutex_unlock_internal): Likewise.
7092 (__pthread_mutex_unlock_usercnt): Declare.
7093 * pthread_mutex_destroy.c: Always fail if used in any way.
7094 * pthread_mutex_init.c: Update comment.
7095 * pthread_mutex_lock.c: If NO_INCR is not defined adjust __nusers.
7096 * pthread_mutex_timedlock.c: Adjust __nusers.
7097 * pthread_mutex_trylock.c: Adjust __nusers.
7098 * pthread_mutex_unlock.c: Old code is in __pthread_mutex_unlock_usercnt
7099 and public interfaces are wrapper with pass additional parameter.
7100 __pthread_mutex_unlock_usercnt does not adjust __nusers if second
7102 * tst-mutex8.c: New file.
7103 * Makefile (tests): Add tst-mutex8.
7104 * sysdeps/pthread/pthread_cond_timedwait.c: Call
7105 __pthread_mutex_unlock_usercnt.
7106 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
7107 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7108 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7109 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7110 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7111 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Define NO_INCR.
7112 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
7114 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7115 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7116 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7117 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
7118 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
7120 * pthread_mutex_lock.c: Don't store THREAD_ID in __owner, use TID.
7121 * pthread_mutex_timedlock.c: Likewise.
7122 * pthread_mutex_trylock.c: Adjust __nusers.
7123 * pthread_mutex_unlock.c: Compare with TID not THREAD_ID.
7124 * tst-mutex9.c: New file.
7125 * Makefile (tests): Add tst-mutex9.
7126 * sysdeps/i386/tls.h: Remove THREAD_ID definition.
7127 * sysdeps/ia64/tls.h: Likewise.
7128 * sysdeps/powerpc/tls.h: Likewise.
7129 * sysdeps/s390/tls.h: Likewise.
7130 * sysdeps/sh/tls.h: Likewise.
7131 * sysdeps/x86_64/tls.h: Likewise.
7132 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
7133 Change type of __owner.
7134 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7135 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7136 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7137 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
7138 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
7140 2003-06-19 Jakub Jelinek <jakub@redhat.com>
7142 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Move to...
7143 * sysdeps/unix/sysv/linux/sem_post.c: ...here.
7145 * sysdeps/unix/sysv/linux/sem_post.c: Move to...
7146 * sysdeps/unix/sysv/linux/powerpc/sem_post.c: ... here. Pass nr + 1
7147 instead of nr to lll_futex_wake. Only set errno and return -1
7150 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_wait,
7151 lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
7152 return actual return value from the syscall, not 0.
7154 2003-06-18 Ulrich Drepper <drepper@redhat.com>
7156 * tst-cancel4.c (tf_msgsnd): Don't always use 100 as the type,
7157 find a random value.
7158 (tf_msgrcv): Likewise. Also don't report msgrcv returns if
7161 * sysdeps/unix/sysv/linux/timer_settime.c: Add prototype for
7162 compat_timer_settime.
7163 * sysdeps/unix/sysv/linux/timer_gettime.c: Add prototype for
7164 compat_timer_gettime.
7165 * sysdeps/unix/sysv/linux/timer_getoverr.c: Add prototype for
7166 compat_timer_getoverrun.
7167 * sysdeps/unix/sysv/linux/timer_delete.c: Add prototype for
7168 compat_timer_delete.
7170 * pthread_mutex_destroy.c (__pthread_mutex_destroy): For
7171 error-checking mutex detect busy mutexes.
7173 2003-06-17 Ulrich Drepper <drepper@redhat.com>
7175 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_mutex_lock):
7176 Add ax to clobber list.
7177 (lll_mutex_cond_lock): Likewise.
7178 (lll_mutex_unlock): Likewise.
7179 (lll_lock): Likewise.
7180 (lll_unlock): Likewise.
7182 * Makefile: Add rules to build and run tst-cancel18 and tst-cancelx18.
7183 * tst-cancel18.c: New file.
7184 * tst-cancelx18.c: New file.
7186 * tst-cancel4.c: Test connect, creat, msgrcv, msgsnd, sendmsg, sendto,
7189 * Makefile: Add rules to build and run tst-cancel17 and tst-cancel17x.
7190 * tst-cancel17.c: New file.
7191 * tst-cancelx17.c: New file.
7193 * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
7194 * sysdeps/unix/sysv/linux/sigwait.c: New file.
7195 * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
7197 * tst-cancel4.c: Test open, close, pread, pwrite, fsync, and msync.
7199 2003-06-16 Jakub Jelinek <jakub@redhat.com>
7201 * sysdeps/pthread/createthread.c (create_thread): Set
7202 header.multiple_threads unconditionally.
7203 * allocatestack.c (allocate_stack): Likewise.
7204 * descr.h (struct pthread): Add header.multiple_threads
7206 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (CENABLE, CDISABLE):
7207 Define for librt. #error if neither libpthread, libc nor librt.
7208 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (CENABLE, CDISABLE):
7210 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (CENABLE,
7211 CDISABLE): Likewise.
7212 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (CENABLE,
7213 CDISABLE): Likewise.
7214 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (CENABLE,
7215 CDISABLE): Likewise.
7216 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (CENABLE,
7217 CDISABLE): Likewise. Access header.multiple_threads outside of
7218 libc and libpthread.
7219 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (CENABLE, CDISABLE):
7221 * sysdeps/x86_64/tls.h (tcbhead_t): Add multiple_threads.
7222 * sysdeps/x86_64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define.
7224 2003-06-17 Ulrich Drepper <drepper@redhat.com>
7226 * tst-cancel4.c: Add tests for the socket and signal functions, pause.
7227 Also test early cancellation before the thread reaches the cancellation
7230 * Makefile: Compile forward.c with exceptions.
7232 * sysdeps/unix/sysv/linux/sleep.c: New file.
7234 2003-06-16 Ulrich Drepper <drepper@redhat.com>
7236 * Makefile: Add CFLAGS definition to compile function wrappers
7237 duplicated from libc with exceptions.
7238 * tst-cancel4.c: Also check cancellation handlers.
7240 * Makefile: Add rules to build and run tst-cancel16 and
7241 tst-cancelx16. Add missing CFLAGS definitions.
7242 * tst-cancel16.c: New file.
7243 * tst-cancelx16.c: New file.
7245 2003-06-15 Ulrich Drepper <drepper@redhat.com>
7247 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
7248 (DL_SYSINFO_IMPLEMENTATION): Use CFI opcodes.
7249 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
7250 (DL_SYSINFO_IMPLEMENTATION): Likewise.
7252 * pthreadP.h (LIBC_CANCEL_ASYNC): Also define for librt.
7253 (LIBC_CANCEL_RESET): Likewise.
7254 Declare __librt_enable_asynccancel and __librt_disable_asynccancel.
7255 * sysdeps/pthread/Makefile (librt-sysdep_routines): Add
7257 (CFLAGS-libcrt-cancellation.c): Define.
7258 * sysdeps/pthread/librt-cancellation.c: New file.
7259 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define all the nice
7260 macros also when compiling librt.
7261 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
7262 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
7263 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
7264 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
7265 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
7266 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
7267 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
7269 * sysdeps/unix/sysv/linux/timer_create.c: Add prototype for
7270 compat_timer_create.
7272 2003-06-14 Ulrich Drepper <drepper@redhat.com>
7274 * sysdeps/pthread/posix-timer.h (timespec_compare): Always inline.
7276 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
7278 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
7279 Add libc_hidden_def.
7281 2003-06-13 Roland McGrath <roland@redhat.com>
7283 * sysdeps/x86_64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Pass FS
7284 constant from <sys/reg.h> to ps_get_thread_area, not register contents.
7286 2003-06-11 Ulrich Drepper <drepper@redhat.com>
7288 * allocatestack.c (queue_stack): Always inline.
7289 * ptreadhP.h (__do_cancel): Likewise.
7291 2003-06-10 Jakub Jelinek <jakub@redhat.com>
7293 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait): Fix
7296 2003-06-10 Ulrich Drepper <drepper@redhat.com>
7298 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
7299 (__pthread_cond_signal): Remove incorrect second addition for
7302 2003-06-09 Ulrich Drepper <drepper@redhat.com>
7304 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
7305 (__pthread_cond_signal): Use correct futex pointer in
7306 __lll_mutex_lock_wait call.
7308 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
7309 (__pthread_cond_signal): Some more tweaks to handle cond_lock!=0.
7311 2003-06-08 Ulrich Drepper <drepper@redhat.com>
7313 * sysdeps/unix/sysv/linux/s390/sem_wait.c (__new_sem_wait): Make
7315 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
7318 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Remove
7319 hand-written CFI generation code. Since ENTRY/END also initiated
7320 CFI frames this caused two CFI sets to be generated.
7322 2003-06-07 Ulrich Drepper <drepper@redhat.com>
7324 * cleanup_routine.c: New file.
7325 * Versions (libpthread) [GLIBC_2.3.3]: Add __pthread_cleanup_routine.
7326 * sysdeps/pthread/pthread.h: Add support for fully exception-based
7328 * Makefile (libpthread-routines): Add cleanup_routine.
7329 Add more CFLAGS variables to compile with exceptions. Add comments
7330 why which file needs unwind tables.
7331 (tests) [have-forced-unwind==yes]: Add tst-cancelx* and tst-cleanupx*
7333 * tst-cancelx1.c: New file.
7334 * tst-cancelx2.c: New file.
7335 * tst-cancelx3.c: New file.
7336 * tst-cancelx4.c: New file.
7337 * tst-cancelx5.c: New file.
7338 * tst-cancelx6.c: New file.
7339 * tst-cancelx7.c: New file.
7340 * tst-cancelx8.c: New file.
7341 * tst-cancelx9.c: New file.
7342 * tst-cancelx10.c: New file.
7343 * tst-cancelx11.c: New file.
7344 * tst-cancelx12.c: New file.
7345 * tst-cancelx13.c: New file.
7346 * tst-cancelx14.c: New file.
7347 * tst-cancelx15.c: New file.
7348 * tst-cleanupx0.c: New file.
7349 * tst-cleanupx0.expect: New file.
7350 * tst-cleanupx1.c: New file.
7351 * tst-cleanupx2.c: New file.
7352 * tst-cleanupx3.c: New file.
7354 * tst-cleanup0.c: Make standard compliant.
7355 * tst-cleanup1.c: Likewise.
7357 * sysdeps/unix/sysv/linux/sem_timedwait.c: Add cancellation support.
7358 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
7359 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
7360 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
7361 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
7362 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
7363 * sysdeps/i386/tcb-offsets.sym: Add RESULT, CANCELHANDLING, and
7365 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
7366 * tst-cancel12.c: New file.
7367 * tst-cancel13.c: New file.
7368 * tst-cancel14.c: New file.
7369 * tst-cancel15.c: New file.
7370 * Makefile (tests): Add tst-cancel12, tst-cancel13, tst-cancel14,
7373 * tst-cancel1.c: Add some comments.
7375 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Compute relative
7378 2003-06-06 Ulrich Drepper <drepper@redhat.com>
7380 * Makefile (CFLAGS-pthread_cancel.c): Define.
7382 2003-06-05 Ulrich Drepper <drepper@redhat.com>
7384 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_rwlock_t):
7385 Change type of __writer element to int.
7386 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7387 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7388 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7389 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7390 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
7391 * sysdeps/i386/tcb-offsets.sym: Replace SELF entry with TID entry.
7392 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
7393 * pthread_rwlock_trywrlock.c: Store TID not self pointer in __writer.
7394 Compare with TID to determine deadlocks.
7395 * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
7396 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
7397 * sysdeps/pthread/pthread_rwlock_timedwrlock.: Likewise.
7398 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
7399 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
7400 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
7402 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
7404 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
7405 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
7406 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
7408 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
7410 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
7411 * Makefile (tests): Add tst-rwlock12.
7412 * tst-rwlock12.c: New file.
7414 2003-06-05 Jakub Jelinek <jakub@redhat.com>
7416 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait,
7417 __lll_timedlock_wait, lll_unlock_wake_cb, __lll_timedwait_tid):
7418 Remove bogus hidden_proto.
7419 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
7421 * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_lock,
7422 lll_unlock_wake_cb, ___lll_timedwait_tid): Likewise.
7423 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (___lll_mutex_lock,
7424 ___lll_mutex_timedlock): Likewise.
7426 2003-06-04 Ulrich Drepper <drepper@redhat.com>
7428 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
7429 (__pthread_cond_signal): Add some code to eventually handle
7432 2003-06-01 Ulrich Drepper <drepper@redhat.com>
7434 * Makefile (tests): Add tst-exec4.
7435 (tst-exec4-ARGS): Define.
7436 * tst-exec4.c: New file.
7438 2003-05-31 Ulrich Drepper <drepper@redhat.com>
7440 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
7441 Also fail if tv_nsec < 0.
7442 (__lll_timedwait_tid): Likewise.
7443 * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
7444 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_timedwait_tid):
7446 * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_timedwait_tid):
7448 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (__lll_mutex_timedlock):
7450 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
7452 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_timedwait_tid):
7454 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_timedwait_tid):
7457 * Makefile (tests): Add tst-sem8 and tst-sem9.
7458 * tst-sem8.c: New file.
7459 * tst-sem9.c: New file.
7460 * sem_open.c: Fix creation of in_use record if the file exists but
7463 * posix-timer.h: Remove old, unused timer_id2ptr and timer_ptr2id
7466 * sysdeps/pthread/timer_create.c (timer_create): In case
7467 evp==NULL, assign timer ID to sival_ptr.
7469 * descr.h (struct pthread_unwind_buf): Change type of prev element to
7470 struct pthread_unwind_buf *.
7471 (struct pthread): Likewise for cleanup_jmp_buf element.
7473 * cleanup.c (__pthread_register_cancel): Add cast to avoid warning.
7474 * cleanup_defer.c (__pthread_register_cancel_defer): Likewise.
7475 * unwind.c (__pthread_unwind_next): Likewise.
7477 2003-05-30 Ulrich Drepper <drepper@redhat.com>
7479 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
7480 (lll_futex_timed_wait): Use int for futex value parameter.
7481 (lll_futex_wake): Likewise.
7482 (lll_futex_requeue): Likewise.
7484 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
7485 Replace one memory operation with one register operation.
7487 * tst-join4.c (do_test): Fix error message.
7489 * tst-rwlock6.c (do_test): Use correct format specifier.
7491 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
7492 (__lll_mutex_lock_wait): Replace one memory operation with one
7494 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S
7495 (__lll_mutex_lock_wait): Likewise.
7497 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
7498 (__lll_mutex_cond_lock): Add one to value parameter of
7499 __lll_lock_wait to reflect reality in the futex syscall.
7500 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
7501 (lll_mutex_cond_lock): Likewise.
7503 2003-05-30 Jakub Jelinek <jakub@redhat.com>
7505 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_cond_lock):
7507 (lll_mutex_cond_lock): Define.
7509 2003-05-29 Ulrich Drepper <drepper@redhat.com>
7511 * Makefile (tests): Add tst-signal6.
7512 * tst-signal6.c: New file.
7514 * sysdeps/unix/sysv/linux/s390/lowlevellock.h
7515 (__lll_mutex_unlock_force): New function
7516 (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
7518 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
7519 (__lll_mutex_unlock_force): New function.
7520 (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
7522 * tst-rwlock7.c (do_test): Use correct format specifier.
7524 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue):
7525 Find break parameter in correct asm argument.
7527 2003-05-27 Jakub Jelinek <jakub@redhat.com>
7529 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_clobbers):
7531 (lll_futex_requeue): Fix __o3 constraint, return negative errno if
7533 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
7535 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_REQUEUE,
7536 lll_futex_requeue, lll_mutex_unlock_force): Define.
7538 2003-05-30 Jakub Jelinek <jakub@redhat.com>
7540 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
7541 (pthread_cond_t): Add __mutex.
7542 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_REQUEUE,
7543 lll_futex_requeue, lll_mutex_unlock_force): Define.
7545 2003-05-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
7547 * sysdeps/sh/tcb-offsets.sym: Define MUTEX_FUTEX.
7548 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
7550 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (SYSCALL_WITH_INST_PAD):
7552 (lll_futex_wait, lll_futex_wake): Define.
7553 * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: New file.
7554 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Try using
7555 FUTEX_REQUEUE instead of FUTEX_WAIT.
7556 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
7557 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Remember
7558 mutex which was used in condvar structure. Call
7559 __pthread_mutex_cond_lock instead of __pthread_mutex_lock_internal.
7560 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
7562 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Don't
7563 include tcb-offsets.h. Read wakeup value in locked region.
7564 Use the value of gbr register as THREAD_ID.
7565 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7566 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
7567 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
7569 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Remove futex related
7572 2003-05-28 Ulrich Drepper <drepper@redhat.com>
7574 * sysdeps/pthread/pthread_cond_broadcast.c
7575 (__pthread_cond_broadcast): Fix typo: MAX_INT -> INT_MAX.
7577 2003-05-26 Ulrich Drepper <drepper@redhat.com>
7579 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Fix
7580 typo in register name.
7581 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use parameters
7582 correctly. Actually use requeue. Little optimization.
7583 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Store
7584 mutex address early. Handle cancellation state as 32-bit value.
7585 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7586 Remove unnecessary label.
7588 2003-05-25 Ulrich Drepper <drepper@redhat.com>
7590 * sysdeps/pthread/pthread_cond_broadcast.c: Try using FUTEX_REQUEUE
7591 instead of FUTEX_WAIT.
7592 * sysdeps/pthread/pthread_cond_signal.c: Likewise.
7593 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
7594 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
7595 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
7596 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
7597 * sysdeps/pthread/pthread_cond_timedwait.c: Remember mutex which was
7598 used in condvar structure. Call __pthread_mutex_cond_lock instead
7599 of __pthread_mutex_lock_internal.
7600 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7601 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7602 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
7603 (__condvar_cleanup): Always call __pthread_mutex_cond_lock.
7604 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7605 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7606 * sysdeps/unix/sysv/linux/Makefile (libpthread-sysdep_routines):
7607 Add pthread_mutex_cond_lock.
7608 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add dep_mutex.
7609 * sysdeps/unix/sysv/linux/pthread_cond_mutex_lock.c: New file.
7610 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define
7611 lll_mutex_cond_lock.
7612 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
7613 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
7614 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
7616 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7617 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
7619 * sysdeps/i386/tcb-offsets.sym: Define MUTEX_FUTEX.
7620 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
7622 * pthreadP.h: Declare __pthread_mutex_cond_lock.
7623 * pthread_mutex_lock.c: Define LLL_MUTEX_LOCK if not already defined.
7624 Use it instead of lll_mutex_lock. If __pthread_mutex_lock is a
7625 macro don't define aliases.
7627 * cancellation.c: Remove __pthread_enable_asynccancel_2.
7628 * pthreadP.h: Remove declaration of __pthread_enable_asynccancel_2.
7629 * sysdeps/pthread/pthread_cond_timedwait.c: Use
7630 __pthread_enable_asynccancel instead of __pthread_enable_asynccancel_2.
7631 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7632 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7633 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
7634 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7635 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7637 2003-05-17 Ulrich Drepper <drepper@redhat.com>
7639 * sem_open.c: Fix one endless loop. Implement correct semantics
7640 wrt opening the same semaphore more then once.
7641 * sem_close.c: Adjust for sem_open change.
7642 * semaphoreP.h: Include <semaphore.h>. Define struct inuse_sem.
7643 Declare __sem_mappings, __sem_mappings_lock, __sem_search.
7644 * Makefile (tests): Add tst-sem7.
7645 * tst-sem7.c: New file.
7647 2003-05-16 Roland McGrath <roland@redhat.com>
7649 * sysdeps/unix/sysv/linux/register-atfork.c (libc_freeres_fn): Fix
7650 uninitialized variable braino.
7652 2003-05-16 Ulrich Drepper <drepper@redhat.com>
7654 * sysdeps/unix/sysv/linux/timer_gettime.c (timer_gettime): Correct
7655 test for syscall availability.
7657 * sysdeps/unix/sysv/linux/timer_settime.c (timer_settime): Set
7658 __no_posix_timers to -1 if the syscalls don't exist.
7660 * pthread_join.c (pthread_join): Set tid field of the joined
7661 thread to -1. This isn't necessary but helps to recognize some
7662 error conditions with almost no cost.
7664 * allocatestack.c (FREE_P): Also negative values indicate an
7667 * unwind.c: Include <unistd.h>.
7669 2003-05-14 Ulrich Drepper <drepper@redhat.com>
7671 * Makefile ($(objpfx)$(multidir)): Add rule to create the directory.
7673 2003-05-14 Jakub Jelinek <jakub@redhat.com>
7675 * Makefile (crti-objs, crtn-objs): New variables.
7676 (omit-deps, extra-objs): Add crtn.
7677 ($(objpfx)libpthread.so): Depend on both crti and crtn
7678 and links to them in multidir.
7679 ($(objpfx)crtn.S, $(objpfx)crtn.o): New rules.
7681 2003-05-12 Steven Munroe <sjmunroe@us.ibm.com>
7683 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
7684 (lll_mutex_unlock): Use atomic_exchange_rel.
7686 2003-05-11 Ulrich Drepper <drepper@redhat.com>
7688 * cond-perf.c (cons): Add missing locking around setting of alldone.
7690 2003-05-10 Ulrich Drepper <drepper@redhat.com>
7692 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Remove futex
7694 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
7696 2003-05-09 Ulrich Drepper <drepper@redhat.com>
7698 * tst-sem6.c: New file.
7699 * Makefile (tests): Add tst-sem6.
7701 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (___lll_mutex_unlock):
7702 Use atomic_exchange_rel instead of atomic_exchange.
7703 * sysdeps/unix/sysv/linux/lowlevellock.c (lll_unlock_wake_cb):
7706 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Improve quality of
7707 code for lll_futex_wait and lll_futex_wake in static apps. Use
7708 vsyscall is possible.
7710 * sysdeps/unix/sysv/linux/pthread_getaffinity.c: New file.
7711 * sysdeps/unix/sysv/linux/pthread_setaffinity.c: New file.
7712 * sysdeps/pthread/pthread.h: Declare pthread_getaffinity_np and
7713 pthread_setaffinity_np.
7714 * Versions [libpthread] (GLIBC_2.3.3): Add pthread_getaffinity_np
7715 and pthread_setaffinity_np.
7716 * Makefile (libpthread-routines): Add pthread_getaffinity and
7717 pthread_setaffinity.
7719 * allocatestack.c (allocate_stack): If ARCH_RETRY_MMAP is defined,
7720 use it in case mmap to allocate the stack fails.
7721 * sysdeps/unix/sysv/linux/x86_64/Makefile: Don't define
7722 ARCH_MAP_FLAGS here.
7723 * sysdeps/x86_64/pthreaddef.h: Define ARCH_MAP_FLAGS and
7726 2003-05-08 Ulrich Drepper <drepper@redhat.com>
7728 * sysdeps/unix/sysv/linux/fork.c: Complete rewrite of the atfork
7729 handler implementation. It is now lockless in fork().
7730 * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
7731 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
7732 * sysdeps/unix/sysv/linux/fork.h: Don't include <link.h>. Don't
7733 declare the __fork_*_lists.
7734 (struct fork_handler): Include pointers to all three functions.
7735 Add next, refcntr and need_signal elements.
7736 (__fork_handlers): New declaration.
7737 (__register_atfork_malloc): Remove declaration.
7738 (HAVE_register_atfork_malloc): Remove definition.
7739 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove
7740 __pthread_child_handler variable.
7741 (__libc_pthread_init): Use __register_atfork instead of explicitly
7743 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define lll_futex_wait
7745 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
7747 * unwind.c (unwind_cleanup): Print error message and then abort. This
7748 function must never be reached.
7750 * cond-perf.c: New file.
7752 2003-05-05 Ulrich Drepper <drepper@redhat.com>
7754 * sysdeps/i386/tls.h (TLS_INIT_TP): Include \n in error message.
7756 2003-05-04 Roland McGrath <roland@redhat.com>
7758 * Makefile ($(objpfx)../libc.so): New target.
7760 2003-05-02 Ulrich Drepper <drepper@redhat.com>
7762 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
7763 (pthread_condattr_t): Size is only an int, don't use long for
7765 (pthread_mutexattr_t): Likewise.
7766 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7767 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
7768 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7770 2003-05-01 Ulrich Drepper <drepper@redhat.com>
7772 * sysdeps/i386/tls.h: Define THREAD_ID.
7773 * sysdeps/ia64/tls.h: Likewise.
7774 * sysdeps/powerpc/tls.h: Likewise.
7775 * sysdeps/s390/tls.h: Likewise.
7776 * sysdeps/sh/tls.h: Likewise.
7777 * sysdeps/x86_64/tls.h: Likewise.
7778 * pthread_mutex_lock.c: Use THREAD_ID instead of THREAD_SELF to
7780 * pthread_mutex_timedlock.c: Likewise.
7781 * pthread_mutex_trylock.c: Likewise.
7782 * pthread_mutex_unlock.c: Likewise.
7783 * pthread_rwlock_trywrlock.c: Likewise.
7784 * sysdeps/pthread/pthread_rwlocklock_rdlock.c: Likewise.
7785 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
7786 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
7787 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
7789 * sysdeps/pthread/createthread.c (create_thread): Use CLONE_SYSVSEM
7792 2003-04-29 Jakub Jelinek <jakub@redhat.com>
7794 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
7795 (__SIZEOF_PTHREAD_COND_T): Define to 48.
7796 (pthread_rwlock_t): Add 16 bytes of pad instead of 8 before __flags.
7797 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
7798 Make __align long long instead of long.
7799 (pthread_rwlock_t): Formatting.
7800 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
7801 (pthread_rwlock_t): Formatting.
7802 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
7803 (pthread_cond_t): Make __align long long instead of long.
7804 (pthread_rwlock_t): Move __flags field to the same position as in
7807 2003-04-30 Ulrich Drepper <drepper@redhat.com>
7809 * tst-rwlock6.c (do_test): Use correct printf format specifiers.
7810 * tst-rwlock7.c (do_test): Likewise.
7812 2003-04-26 Roland McGrath <roland@redhat.com>
7814 * Makefile ($(test-modules)): Depend on $(common-objpfx)shlib.lds.
7816 2003-04-22 Jakub Jelinek <jakub@redhat.com>
7818 * allocatestack.c (TLS_TPADJ): Add TLS_PRE_TCB_SIZE instead of
7819 sizeof (struct pthread).
7820 (allocate_stack): Subtract TLS_PRE_TCB_SIZE bytes instead of
7822 * sysdeps/powerpc/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Define
7824 (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Define to alignment of
7826 (TLS_PRE_TCB_SIZE): Increase to cover tcbhead_t preceeded by pad
7828 (INSTALL_DTV, GET_DTV, THREAD_DTV): tcbhead_t is immediately before
7830 (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Don't add TLS_TCB_SIZE
7832 (NO_TLS_OFFSET): Define.
7833 * sysdeps/unix/sysv/linux/powerpc/createthread.c (TLS_VALUE): Don't
7834 add TLS_TCB_SIZE unnecessarily.
7836 2003-04-22 Roland McGrath <roland@redhat.com>
7838 * Makeconfig (shared-thread-library): Reverse link order to work
7841 2003-04-22 Ulrich Drepper <drepper@redhat.com>
7843 * semaphore.h: Fix typo in comment.
7845 2003-04-21 Ulrich Drepper <drepper@redhat.com>
7847 * sysdeps/pthread/sigfillset.c: New file.
7849 * init.c (__pthread_initialize_minimal): Don't block SIGTIMER.
7850 * pthreadP.h: Make SIGTIMER and SIGCANCEL the same.
7851 * sysdeps/pthread/pthread_sigmask.c: Remove handling of SIGTIMER.
7852 * sysdeps/pthread/sigaction.c: Likewise.
7853 * sysdeps/pthread/sigprocmask.c: New file.
7854 * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): Define as
7856 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
7857 Block SIGTIMER. Also handle SI_TKILL events and terminate thread
7860 2003-04-19 Ulrich Drepper <drepper@redhat.com>
7862 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
7863 (DL_SYSINFO_IMPLEMENTATION): Add .eh_frame information.
7865 * sysdeps/unix/sysv/linux/unregister-atfork.c
7866 (__unregister_atfork): Don't free memory not allocated dynamically.
7868 * semaphore.h: Remove __THROW marker from cancellation points.
7869 * nptl/sysdeps/pthread/pthread.h: Likewise.
7871 2003-04-18 Ulrich Drepper <drepper@redhat.com>
7873 * sysdeps/pthread/pthread.h: Don't mark pthread_testcancel,
7874 pthread_cancel, pthread_setcancelstate, and pthread_setcanceltype with
7877 2003-04-16 Jakub Jelinek <jakub@redhat.com>
7879 * tst-cancel4.c (do_test): Use %zd instead of %d when printing cnt.
7881 2003-04-15 Roland McGrath <roland@redhat.com>
7883 * forward.c (__pthread_unwind): Tweak to avoid warning.
7885 2003-04-15 Ulrich Drepper <drepper@redhat.com>
7887 * pthreadP.h: Move THREAD_ATOMIC_* replacements to the top.
7889 2003-04-14 Ulrich Drepper <drepper@redhat.com>
7891 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Don't
7892 overflow CFA advance instructions.
7893 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7895 2003-04-14 Jakub Jelinek <jakub@redhat.com>
7897 * sysdeps/i386/tls.h: Rename LOCK to LOCK_PREFIX.
7898 * sysdeps/i386/pthread_spin_lock.c: Likewise.
7899 * sysdeps/x86_64/tls.h: Likewise. Define LOCK_PREFIX if not already
7902 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Use
7903 DW_CFA_advance_loc2 for .Laddl-.Lsubl.
7904 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
7905 DW_CFA_advance_loc for .Laddl-.Lsubl.
7907 2003-04-13 Ulrich Drepper <drepper@redhat.com>
7909 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Don't use
7910 position-independent unwind data for static libraries.
7911 Add missing unwind info. Add comments.
7913 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Add unwind info.
7914 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7915 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7916 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7918 2003-04-12 Ulrich Drepper <drepper@redhat.com>
7920 * Makefile: Make sure all cancellation points are compiled with
7921 exception and asynchronous unwind tables.
7923 * sysdeps/x86_64/tls.h (THREAD_SETMEM): Word around compiler bug
7924 which mishandles loading of global object addresses in PIC.
7925 (THREAD_SETMEM_NC): Likewise.
7927 2003-04-11 Ulrich Drepper <drepper@redhat.com>
7929 * pthread.h: Define new data structure for cleanup buffer. Declare
7930 new cleanup handler interfaces.
7931 * descr.h: Include <unwind.h> if necessary. Define pthread_unwind_buf.
7932 (struct pthread): Add cleanup_jmp_buf pointer. Define
7933 HAVE_CLEANUP_JMP_BUF and not HAVE_CANCELBUF.
7934 * pthreadP.h: Declare __pthread_unwind. Define __do_cancel to use
7935 it. Declare old cleanup handler installation functions.
7936 * cleanup.c: Rewrite. Install handler for unwind-based cleanup
7938 * cleanup_defer.c: Likewise.
7939 * cleanup_compat.c: New file. Old cleanup code.
7940 * cleanup_def_compat.c: New file. Old cleanup code.
7941 * pthread_create.c (start_thread): Initialize cleanup_jmp_buf element
7942 if own thread descriptor.
7943 * unwind.c: New file.
7944 * forward.c: Add __pthread_unwind.
7945 * init.c (pthread_functions): Add __pthread_unwind.
7946 * sysdeps/pthread/pthread-functions.s (struct pthread_functions):
7947 Add ptr___pthread_unwind.
7948 * Versions [GLIBC_2.3.3] (libpthread): Export new cleanup handling
7949 and unwind function.
7950 * Makefile (libpthread-routines): Add cleanup_compat,
7951 cleanup_def_compat, and unwind. Define CFLAGS to enable unwind
7952 table generation if necessary.
7953 * version.c: Record whether unwind support is compiled in.
7954 * sysdeps/pthread/configure.in: Add checks for unwind unterfaces.
7955 * sysdeps/pthread/bits/libc-lock.h: Add prototypes of the old cleanup
7957 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add quite a bit of
7958 complication to generate unwind information for syscall wrappers.
7959 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
7960 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
7961 __cleanup_fct_attribute.
7963 * Makefile: Add rules to build and run tst-cleanup0.
7964 * tst-cleanup0.c: New file.
7965 * tst-cleanup0.expect: New file.
7967 * pthread_create.c (deallocate_tsd): Don't take parameter. Adjust
7968 caller. Optimize to avoid often unecessary local variable.
7970 2003-04-11 Roland McGrath <roland@redhat.com>
7972 * Makefile ($(objpfx)multidir.mk): New target, generated makefile that
7973 sets variable `multidir'; include that.
7974 (generated): Add it.
7975 ($(objpfx)$(multidir)/crti.o): New target.
7976 [$(multidir) != .] (generated-dirs, extra-objs, omit-deps): Add it.
7978 2003-04-11 Ulrich Drepper <drepper@redhat.com>
7980 * tst-attr2.c (do_test): Add cast to avoid warning.
7981 * tst-mutex4.c (do_test): Likewise.
7983 2003-04-10 Ulrich Drepper <drepper@redhat.com>
7985 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset CPU clocks
7988 2003-04-09 Ulrich Drepper <drepper@redhat.com>
7990 * Makefile (tests): Add tst-detach1.
7991 * tst-detach1.c: New file.
7993 2003-04-08 Ulrich Drepper <drepper@redhat.com>
7995 * sysdeps/pthread/pthread.h: Remove duplicate
7996 pthread_cleanup_{push,pop} definitions.
7998 * tst-barrier2.c: Eliminate warnings.
7999 * tst-cancel4.c: Likewise.
8000 * tst-cond4.c: Likewise.
8001 * tst-cond6.c: Likewise.
8002 * tst-detach1.c: Likewise.
8003 * tst-rwlock4.c: Likewise.
8004 * tst-rwlock6.c: Likewise.
8005 * tst-rwlock7.c: Likewise.
8006 * tst-sem3.c: Likewise.
8007 * tst-spin2.c: Likewise.
8008 * tst-umask1.c: Likewise.
8010 2003-04-07 Ulrich Drepper <drepper@redhat.com>
8012 * pthread_detach.c (pthread_detach): Fix test for invalid TID.
8014 2003-04-06 Ulrich Drepper <drepper@redhat.com>
8016 * descr.h (struct pthread): Move cancelhandling member to the front.
8018 2003-04-05 Ulrich Drepper <drepper@redhat.com>
8020 * sysdeps/unix/sysv/linux/register-atfork.c: Define malloc_prepare,
8021 malloc_parent, and malloc_child statically.
8022 (__register_atfork_malloc): New function.
8023 (free_mem): Don't free any of the malloc_* variables on the list.
8024 * sysdeps/unix/sysv/linux/fork.h: Declare __register_atfork_malloc.
8025 Define HAVE_register_atfork_malloc.
8027 2003-04-04 Ulrich Drepper <drepper@redhat.com>
8029 * sysdeps/pthread/createthread.c (create_thread): Add some more
8030 comments explaining when to set multiple_threads and when not.
8032 * pthreadP.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
8033 THREAD_ATOMIC_BIT_SET if not already defined.
8034 * sysdeps/i386/tls.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
8035 THREAD_ATOMIC_BIT_SET:
8036 * sysdeps/x86_64/tls.h: Likewise.
8037 * cleanup_defer.c (_pthread_cleanup_push_defer): Rewrite to use
8038 THREAD_ATOMIC_CMPXCHG_VAL.
8039 (_pthread_cleanup_pop_restore): Likewise.
8040 * cancellation.c (__pthread_enable_asynccancel): Likewise.
8041 (__pthread_enable_asynccancel_2): Likewise.
8042 (__pthread_disable_asynccancel): Likewise.
8043 * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
8044 (__libc_disable_asynccancel): Likewise.
8045 * init.c (sigcancel_handler): Likewise.
8046 * pthread_setcancelstate.c (__pthread_setcancelstate): Likewise.
8047 * pthread_setcanceltype.c (__pthread_setcanceltype): Likewise.
8049 2003-04-03 Ulrich Drepper <drepper@redhat.com>
8051 * init.c (sigcancel_handler): Don't set EXITING_BIT here.
8052 * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
8053 * pthreadP.h (__do_cancel): Set EXITING_BIT here.
8054 * Makefile (tests): Add tst-cancel11.
8055 * tst-cancel11.c: New file.
8057 2003-04-01 Ulrich Drepper <drepper@redhat.com>
8059 * pthread_create.c (deallocate_tsd): Clear/free memory after the last
8060 round, not the first. Use specific_used flag instead of local
8061 found_nonzero variable. Use THREAD_[SG]ETMEM where possible.
8062 (__free_tcb): Don't call deallocate_tsd here.
8063 (start_thread): Call deallocate_tsd here.
8064 * pthread_setspecific.c: Set specific_used flag really only when
8066 * Makefile (tests): Add tst-tsd3.c and tst-tsd4.
8067 * tst-tsd3.c: New file.
8068 * tst-tsd4.c: New file.
8070 2003-03-31 Ulrich Drepper <drepper@redhat.com>
8072 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_mutex_lock):
8073 Use atomic_exchange_and_add instead of __lll_add.
8074 (__lll_mutex_timedlock): Likewise.
8075 Patch by Ian Wienand.
8077 2003-03-24 Steven Munroe <sjmunroe@us.ibm.com>
8079 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
8080 (SINGLE_THREAD_P): Fix typo.
8081 * tst-cancel-wrappers.sh: Handle '.'ed symbols.
8083 2003-03-31 Ulrich Drepper <drepper@redhat.com>
8085 * Makefile (tests): Add tst-align.
8086 * tst-align.c: New file.
8087 * sysdeps/i386/Makefile: Define CFLAGS-tst-align.
8089 * sysdeps/i386/tls.h (CALL_THREAD_FCT): Align stack of called
8092 * tst-tsd2.c: Add casts to avoid warnings.
8094 2003-03-30 Ulrich Drepper <drepper@redhat.com>
8096 * descr.h (struct pthread): Move most often used elements to the front.
8098 2003-03-29 Ulrich Drepper <drepper@redhat.com>
8100 * Makefile (libpthread-routines): Add pthread_atfork.
8101 (libpthread-static-only-routines): Add pthread_atfork.
8103 2003-03-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
8105 * sysdeps/sh/tls.h: Include nptl/descr.h after the definition
8107 (INSTALL_DTV): Add parens.
8108 (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
8109 Use passed descr instead of THREAD_SELF.
8110 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S
8111 (__lll_mutex_timedlock_wait): Correct expected value after
8113 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S:
8114 Release lock before waking up the waiters.
8115 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Correct exit
8116 criteria. Reorderstruct passed to cleanup handler. Fix
8117 handling of cancellation and failung pthread_mutex_unlock call.
8118 Use __pthread_enable_asynccancel_2 instead of
8119 __pthread_enable_asynccancel.
8120 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
8121 Return result of lock re-get if it fails.
8122 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Fix wrong argument
8123 for __pthread_cleanup_push.
8124 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Fix
8125 completely broken rwlock implementation.
8126 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
8127 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
8128 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
8129 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
8130 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
8131 * sysdeps/unix/sysv/linux/sh/sem_post.S: Fix error value. Use
8132 versioned_symbol macro.
8133 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Use versioned_symbol macro.
8134 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
8136 2003-03-27 Ulrich Drepper <drepper@redhat.com>
8138 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Don't declare
8139 __timer_helper_thread. Declare __start_helper_thread, __helper_once,
8141 (struct timer): Remove th and bar field.
8142 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Remove
8143 debugging code. Create only one helper thread.
8144 * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Don't kill
8146 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
8147 Renamed. Define statically. Use thread info from siginfo.
8148 (__helper_once): New variable.
8149 (__helper_tid): New variable.
8150 (__reset_helper_control): New function.
8151 (__start_helper_thread): New function.
8153 * pthread_create.c (start_thread): Don't use setjmp inside
8154 __builtin_expect to work around gcc bug.
8156 * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Even if
8157 timer_delete syscall fails, but not with ENOSYS, set
8160 * sysdeps/unix/sysv/linux/timer_settime.c [!__ASSUME_POSIX_TIMERS]
8161 (timer_settime): Fix typo.
8162 * sysdeps/unix/sysv/linux/timer_getoverr.c
8163 [!__ASSUME_POSIX_TIMERS] (timer_getoverrun): Likewise.
8165 2003-03-27 Jakub Jelinek <jakub@redhat.com>
8167 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Fix
8168 offset of cleanupbuf.__prev.
8170 2003-03-26 Jakub Jelinek <jakub@redhat.com>
8172 * sysdeps/unix/sysv/linux/timer_getoverr.c: Fix typo in name
8175 2003-03-26 Ulrich Drepper <drepper@redhat.com>
8177 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): If EVP ==
8178 NULL provide default definition to syscall.
8180 2003-03-25 Roland McGrath <roland@redhat.com>
8182 * sysdeps/pthread/posix-timer.h (TIMER_MAX): Define if not defined.
8183 (timer_id2ptr): Fix typo.
8185 2003-03-25 Ulrich Drepper <drepper@redhat.com>
8187 * pthreadP.h: Define SIGCANCEL and SIGTIMER.
8188 * sysdeps/i386/pthreaddef.h: Remove SIGCANCEL definition.
8189 * sysdeps/ia64/pthreaddef.h: Likewise.
8190 * sysdeps/powerpc/pthreaddef.h: Likewise.
8191 * sysdeps/s390/pthreaddef.h: Likewise.
8192 * sysdeps/sh/pthreaddef.h: Likewise.
8193 * sysdeps/x86_64/pthreaddef.h: Likewise.
8194 * init.c (__pthread_initialize_minimal): Block SIGTIMER.
8195 * sysdeps/pthread/sigaction.c: Also prevent SIGTIMER handler from
8197 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
8198 SIGTIMER is not unblocked.
8199 * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): One more
8201 * sysdeps/unix/sysv/linux/pthread_kill.c: Do not allow SIGTIMER to
8203 * sysdeps/pthread/posix-timer.h (timer_id2ptr, timer_ptr2id): Just
8204 pass pointer through as ID.
8205 * sysdeps/unix/sysv/linux/bits/local_lim.h (TIMER_MAX): Removed.
8206 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: New file.
8207 * sysdeps/unix/sysv/linux/timer_create.c: New file.
8208 * sysdeps/unix/sysv/linux/timer_delete.c: New file.
8209 * sysdeps/unix/sysv/linux/timer_getoverr.c: New file.
8210 * sysdeps/unix/sysv/linux/timer_gettime.c: New file.
8211 * sysdeps/unix/sysv/linux/timer_routines.c: New file.
8212 * sysdeps/unix/sysv/linux/timer_settime.c: New file.
8213 * sysdeps/unix/sysv/linux/ia64/Versions: New file.
8214 * sysdeps/unix/sysv/linux/ia64/timer_create.c: New file.
8215 * sysdeps/unix/sysv/linux/ia64/timer_delete.c: New file.
8216 * sysdeps/unix/sysv/linux/ia64/timer_getoverr.c: New file.
8217 * sysdeps/unix/sysv/linux/ia64/timer_gettime.c: New file.
8218 * sysdeps/unix/sysv/linux/ia64/timer_settime.c: New file.
8219 * sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions: New file.
8220 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_create.c: New file.
8221 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_delete.c: New file.
8222 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_getoverr.c: New file.
8223 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_gettime.c: New file.
8224 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_settime.c: New file.
8225 * sysdeps/unix/sysv/linux/s390/s390-64/Versions: New file.
8226 * sysdeps/unix/sysv/linux/s390/s390-64/timer_create.c: New file.
8227 * sysdeps/unix/sysv/linux/s390/s390-64/timer_delete.c: New file.
8228 * sysdeps/unix/sysv/linux/s390/s390-64/timer_getoverr.c: New file.
8229 * sysdeps/unix/sysv/linux/s390/s390-64/timer_gettime.c: New file.
8230 * sysdeps/unix/sysv/linux/s390/s390-64/timer_settime.c: New file.
8231 * sysdeps/unix/sysv/linux/x86_64/Versions: New file.
8232 * sysdeps/unix/sysv/linux/x86_64/compat-timer.h: New file.
8233 * sysdeps/unix/sysv/linux/x86_64/timer_create.c: New file.
8234 * sysdeps/unix/sysv/linux/x86_64/timer_delete.c: New file.
8235 * sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c: New file.
8236 * sysdeps/unix/sysv/linux/x86_64/timer_gettime.c: New file.
8237 * sysdeps/unix/sysv/linux/x86_64/timer_settime.c: New file.
8239 * pthreadP.h: Remove FRAME_LEFT definition.
8240 * cleanup.c (_pthread_cleanup_push): Don't check for reference to
8241 already left frame. Programs which have this problem are not POSIX
8243 * cleanup_defer.c (_pthread_cleanup_push_defer): Likewise.
8245 2003-03-24 Ulrich Drepper <drepper@redhat.com>
8247 * sysdeps/pthread/tst-timer.c: Check return values of the
8250 2003-03-23 Roland McGrath <roland@redhat.com>
8252 * tst-tls3.c (do_test) [! HAVE___THREAD]: Don't test anything.
8253 * tst-tls3mod.c: Likewise.
8254 * tst-tls1.c: Likewise.
8255 * tst-tls2.c: Likewise.
8257 * tst-mutex5.c (do_test): Unlock before destroy, otherwise we invoke
8260 * tst-join5.c (tf1, tf2): Add a cast.
8262 * Makeconfig (includes): Append -I$(..)nptl to this variable.
8264 * tst-barrier2.c (do_test) [! _POSIX_THREAD_PROCESS_SHARED]:
8265 Don't test anything.
8266 * tst-cond4.c: Likewise.
8267 * tst-cond6.c: Likewise.
8268 * tst-flock2.c: Likewise.
8269 * tst-mutex4.c: Likewise.
8270 * tst-rwlock4.c: Likewise.
8271 * tst-signal1.c: Likewise.
8272 * tst-spin2.c: Likewise.
8273 * tst-cond11.c [! _POSIX_CLOCK_SELECTION]: Likewise.
8275 * tst-mutex4.c: Use test-skeleton.c.
8276 * tst-spin2.c: Likewise.
8277 * tst-sysconf.c: Likewise.
8278 * tst-barrier2.c: Likewise.
8279 * tst-cond4.c: Likewise.
8280 * tst-cond6.c: Likewise.
8281 * tst-rwlock4.c: Likewise.
8282 * tst-unload.c: Likewise.
8283 * tst-flock2.c (do_test): Use return instead of exit.
8285 2003-03-22 Jakub Jelinek <jakub@redhat.com>
8287 * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
8289 2003-03-21 Ulrich Drepper <drepper@redhat.com>
8291 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
8292 (__lll_mutex_trylock): Use atomic_compare_and_exchange_val_acq
8293 instead of __lll_compare_and_swap.
8294 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
8296 Removed definition if __lll_compare_and_swap.
8298 * cancellation.c: Adjust for new form of compare&exchange macros.
8299 * cleanup_defer.c: Likewise.
8301 * libc-cancellation.c: Likewise.
8302 * old_pthread_cond_broadcast.c: Likewise.
8303 * old_pthread_cond_signal.c: Likewise.
8304 * old_pthread_cond_timedwait.c: Likewise.
8305 * old_pthread_cond_wait.c: Likewise.
8306 * pthread_cancel.c: Likewise.
8307 * pthread_create.c: Likewise.
8308 * pthread_detach.c: Likewise.
8309 * pthread_join.c: Likewise.
8310 * pthread_key_delete.c: Likewise.
8311 * pthread_setcancelstate.c: Likewise.
8312 * pthread_setcanceltype.c: Likewise.
8313 * pthread_timedjoin.c: Likewise.
8314 * pthread_tryjoin.c: Likewise.
8315 * sysdeps/pthread/createthread.c: Likewise.
8317 2003-03-20 Ulrich Drepper <drepper@redhat.com>
8319 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Include <atomic.h>.
8320 Remove __lll_add, __lll_dec_if_positive, and __lll_test_and_set
8321 definitions. Replace uses with calls to atomic_* functions.
8322 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
8323 * sysdeps/unix/sysv/linux/lowlevellock.c: Replace __lll_add and
8324 __lll_test_and_set calls with atomic_exchange_and_add and
8325 atomic_exchange calls respectively.
8326 * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
8327 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
8328 * sysdeps/unix/sysv/linux/sem_trywait.c: Likewise.
8329 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
8330 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Likewise.
8331 * sysdeps/unix/sysv/linux/ia64/sem_port.c: Likewise.
8332 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
8334 * allocatestack.c (allocate_stack): Assume atomic_exchange_and_add
8335 returns the old value.
8337 2003-03-20 Martin Schwidefsky <sky@mschwid3.boeblingen.de.ibm.com>
8339 * sysdeps/s390/pthread_spin_lock.c (pthread_spin_lock): Use type
8340 int for variable OLDVAL and correct inline assembler contraint.
8341 * sysdeps/s390/pthread_spin_trylock.c (pthread_spin_trylock): Use
8342 type int for variable OLD.
8344 * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it
8346 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
8347 (SINGLE_THREAD_P): Use global variable __local_multiple_threads
8348 instead of multiple_threads field in the TCB.
8350 2003-03-19 Ulrich Drepper <drepper@redhat.com>
8352 * sysdeps/i386/i686/bits/atomic.h: Removed.
8353 * sysdeps/i386/i586/bits/atomic.h: Removed.
8354 * sysdeps/i386/i486/bits/atomic.h: Removed. Moved to glibc.
8355 * sysdeps/x86_64/bits/atomic.h: Removed. Moved to glibc.
8356 * sysdeps/s390/bits/atomic.h: Removed. Moved to glibc.
8357 * sysdeps/sh/bits/atomic.h: Removed. Moved to glibc.
8358 * sysdeps/ia64/bits/atomic.h: Removed. Moved to glibc.
8359 * sysdeps/powerpc/bits/atomic.h: Removed. Moved to glibc.
8360 * atomic.h: Removed. Moved to glibc.
8362 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Add
8363 support for clock selection.
8365 * sysdeps/pthread/pthread_cond_broadcast.c: Release lock before
8368 2003-03-18 Roland McGrath <roland@redhat.com>
8370 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
8371 Add __lll_rel_instr first. Add memory clobber.
8372 (lll_mutex_unlock): Use __lll_test_and_set.
8373 From Paul Mackerras <paulus@samba.org>.
8375 * sysdeps/powerpc/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define
8377 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
8378 (SINGLE_THREAD_P): Add `header.' prefix.
8379 From Paul Mackerras <paulus@samba.org>.
8381 * Versions (libpthread: GLIBC_2.3.2): Move pthread_tryjoin_np and
8382 pthread_timedjoin_np to ...
8383 (libpthread: GLIBC_2.3.3): ... here.
8384 (libpthread: GLIBC_2.2): Move pthread_barrierattr_getpshared there too.
8386 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
8387 Avoid shadowing VAL variable.
8389 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
8392 2003-03-18 Ulrich Drepper <drepper@redhat.com>
8394 * Makefile (tests): Add tst-cond11.
8395 * tst-cond11.c: New file.
8397 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Reorder
8398 struct passed to cleanup handler to eliminate one more
8400 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8402 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
8403 (pthrad_cond_t): Replace __unused field with __clock.
8405 * sysdeps/pthread/pthread_cond_wait.c: Release condvar lock before
8406 waken all waiters in cleanup handler.
8407 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8408 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8410 * pthread_condattr_getclock.c: New file.
8411 * pthread_condattr_setclock.c: New file.
8412 * sysdeps/pthread/pthread.h: Declare these new functions.
8413 * Versions [GLIBC_2.3.3] (libpthread): Add the new functions.
8414 * Makefile (libpthread-routines): Add the new functions.
8415 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_condattr):
8416 Renamed field to value. Document use of the bits.
8417 * pthread_condattr_getpshared.c: Adjust for struct pthread_condattr
8419 * pthread_condattr_setpshared.c: Likewise.
8420 * pthread_cond_init.c (__pthread_cond_init): Initialized __clock field.
8421 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add cond_clock symbol.
8422 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
8424 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8425 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
8426 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
8427 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
8428 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
8429 Implement clock selection.
8430 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
8431 * pthread-errnos.sym: Add ENOSYS.
8432 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
8433 _POSIX_CLOCK_SELECTION.
8434 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
8436 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Remove
8437 invalid .size directive.
8439 2003-03-17 Roland McGrath <roland@redhat.com>
8441 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
8444 2003-03-17 Ulrich Drepper <drepper@redhat.com>
8446 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Use __builtin_expect.
8447 Use __lll_add instead of spelling it out. Use protected symbol names.
8448 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Use __builtin_expect.
8450 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_compare_and_swap):
8451 Renamed from lll_compare_and_swap. Use new name where necessary.
8452 (__lll_add): Defined.
8453 (__lll_dec_if_positive): Defined.
8454 (__lll_test_and_set): Defined.
8455 * sysdeps/ia64/pthread_spin_init.c: Removed.
8456 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Removed.
8457 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Removed.
8458 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Removed.
8459 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Removed.
8460 * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: Removed.
8461 * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: Removed.
8462 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Removed.
8463 * sysdeps/ia64/bits/atomic.h: Add __builtin_expect where appropriate.
8464 * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
8465 __sync_lock_release_si.
8466 Patch by Jakub Jelinek.
8468 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
8469 Fix timeout handling.
8470 (__lll_timedwait_tid): Likewise.
8471 (lll_unlock_wake_cb): Wake up other waiters if necessary.
8472 Patch by Jakub Jelinek.
8474 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Pretty printing.
8476 2003-03-17 Roland McGrath <roland@redhat.com>
8478 PowerPC port contributed by Paul Mackerras <paulus@samba.org>.
8479 * sysdeps/pthread/pthread_spin_init.c: New file.
8480 * sysdeps/pthread/pthread_spin_unlock.c: New file.
8481 * sysdeps/powerpc/Makefile: New file.
8482 * sysdeps/powerpc/pthread_spin_lock.c: New file.
8483 * sysdeps/powerpc/pthread_spin_trylock.c: New file.
8484 * sysdeps/powerpc/pthreaddef.h: New file.
8485 * sysdeps/powerpc/tcb-offsets.sym: New file.
8486 * sysdeps/powerpc/td_ta_map_lwp2thr.c: New file.
8487 * sysdeps/powerpc/tls.h: New file.
8488 * sysdeps/powerpc/bits/atomic.h: New file.
8489 * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: New file.
8490 * sysdeps/unix/sysv/linux/libc-lowlevellock.c: New file.
8491 * sysdeps/unix/sysv/linux/lowlevellock.c: New file.
8493 * sysdeps/unix/sysv/linux/lowlevelmutex.c: New file.
8494 * sysdeps/unix/sysv/linux/sem_post.c: New file.
8495 * sysdeps/unix/sysv/linux/sem_timedwait.c: New file.
8496 * sysdeps/unix/sysv/linux/sem_trywait.c: New file.
8497 * sysdeps/unix/sysv/linux/sem_wait.c: New file.
8498 * sysdeps/unix/sysv/linux/powerpc/Makefile: New file.
8499 * sysdeps/unix/sysv/linux/powerpc/createthread.c: New file.
8500 * sysdeps/unix/sysv/linux/powerpc/fork.c: New file.
8501 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: New file.
8502 * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: New file.
8503 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: New file.
8504 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: New file.
8505 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: New file.
8506 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
8507 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New file.
8509 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Use __gettimeofday,
8511 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Likewise.
8512 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
8513 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Likewise.
8514 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Likewise.
8515 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
8517 2003-03-17 Ulrich Drepper <drepper@redhat.com>
8519 * sysdeps/pthread/pthread_cond_wait.c: Correct exit criteria.
8520 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
8521 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8522 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8523 Patch by Ewald Snel <ewald@rambo.its.tudelft.nl>.
8525 2003-03-16 Roland McGrath <roland@redhat.com>
8527 * tst-fork4.c: Include <string.h>.
8528 * tst-signal2.c: Likewise.
8529 * tst-mutex5.c (do_test): exit -> return.
8530 * tst-mutex2.c: Include <stdlib.h>.
8532 2003-03-16 Ulrich Drepper <drepper@redhat.com>
8534 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
8535 (__lll_mutex_timedlock_wait): Correct expected value after
8536 spurious wakeup. Otherwise we would never wait again.
8538 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Work around red
8539 zone versus inline asm stupidity. Use correct instructions.
8541 * tst-rwlock6.c: Add some more status output.
8543 2003-03-15 Roland McGrath <roland@redhat.com>
8545 * sysdeps/pthread/configure.in: New file.
8546 * sysdeps/pthread/configure: New file (generated).
8548 2003-03-15 Ulrich Drepper <drepper@redhat.com>
8550 * allocatestack.c (allocate_stack): Store the exact stack size of
8551 user allocated stacks.
8553 2003-03-15 Jakub Jelinek <jakub@redhat.com>
8555 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
8556 (SINGLE_THREAD): Use `header' prefix instead of `header.data'.
8557 * sysdeps/sh/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
8558 * sysdeps/sh/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define.
8559 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
8560 Use `header.' prefix.
8561 * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
8563 2003-03-15 Ulrich Drepper <drepper@redhat.com>
8565 * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Don't use
8566 __builtin_frame_address, use stack pointer.
8568 * sysdeps/unix/sysv/linux/jmp-unwind.c: Use CURRENT_STACK_FRAME
8569 instead of __builtin_frame_pointer.
8571 2003-03-14 Ulrich Drepper <drepper@redhat.com>
8573 * tst-basic1.c (do_test): Add cast to avoid warning.
8574 * tst-basic2.c (do_test): Likewise.
8576 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use correct
8577 amount of stack correction.
8579 * tst-fork4.c: Use test-skeleton.c.
8581 2003-03-14 Roland McGrath <roland@redhat.com>
8583 * init.c: Fix typo "#eli" for "#else".
8585 2003-03-14 Steven Munroe <sjmunroe@us.ibm.com>
8587 * allocatestack.c (__stack_user): Use hidden_data_def.
8588 * pthread_create.c (__pthread_keys): Likewise.
8590 * init.c [__powerpc__] (__NR_set_tid_address): Define it.
8592 2003-03-14 Roland McGrath <roland@redhat.com>
8594 * tst-fork4.c: New file.
8595 * Makefile (tests): Add it.
8597 * descr.h (struct pthread): Move the union out of [!TLS_DTV_AT_TP], so
8598 we always define the padding space.
8599 [!TLS_DTV_AT_TP]: Give tcbhead_t field a name, `header', since GCC
8600 stopped supporting its own extensions fully.
8601 [TLS_MULTIPLE_THREADS_IN_TCB]: Put `multiple_threads' inside a wrapper
8602 struct also called `header', so `header.multiple_threads' is the field
8603 name to use on all machines.
8604 * allocatestack.c (allocate_stack): Use `header.' prefix.
8605 * sysdeps/pthread/createthread.c (create_thread): Likewise.
8606 * pthread_create.c (__pthread_create_2_1): Likewise.
8607 * sysdeps/i386/tls.h (INSTALL_NEW_DTV, THREAD_DTV): Likewise.
8608 (THREAD_SELF): Likewise.
8609 * sysdeps/x86_64/tls.h: Likewise.
8610 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
8611 (SINGLE_THREAD_P): Likewise.
8612 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
8613 (SINGLE_THREAD_P): Likewise.
8614 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
8615 (SINGLE_THREAD_P): Likewise.
8617 * sysdeps/s390/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Use REGS[18]
8620 2003-03-14 Ulrich Drepper <drepper@redhat.com>
8622 * pthread_create.c (start_thread): Use CALL_THREAD_FCT if defined.
8623 * sysdeps/i386/tls.h: Define CALL_THREAD_FCT.
8625 * pthread_create.c (start_thread): setjmp is expected to return 0.
8627 * sysdeps/x86_64/tls.h (THREAD_GETMEM): Mark asms volatile.
8628 (THREAD_GETMEM_NC): Likewise.
8630 2003-03-13 Ulrich Drepper <drepper@redhat.com>
8632 * allocatestack.c (allocate_stack): If MULTI_PAGE_ALIASING is defined
8633 and the size of the stack which must be allocated is a multiple,
8634 allocate one more page.
8635 * sysdeps/i386/i686/Makefile: Don't define COLORING_INCREMENT, but
8636 MULTI_PAGE_ALIASING.
8638 2003-03-13 Roland McGrath <roland@redhat.com>
8640 * pthread_create.c (start_thread): Set EXITING_BIT after the
8641 event-reporting (and destructors), not before.
8643 2003-03-13 Jakub Jelinek <jakub@redhat.com>
8645 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_timed_wait,
8646 lll_futex_wake): Declare register variables as long int instead of
8647 unsigned long int. Patch by Ian Wienand <ianw@gelato.unsw.edu.au>.
8648 Make syscall arguments clobbered by the syscall.
8649 (lll_futex_wait): Define using lll_futex_timed_wait.
8651 * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Cast regs[13]
8654 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Only declare and set
8657 * allocatestack.c (nptl_ncreated): Only declare if
8658 COLORING_INCREMENT != 0.
8660 * pthreadP.h (__pthread_enable_asynccancel_2): New prototype.
8661 (__libc_enable_asynccancel_2): Remove prototype.
8663 * sysdeps/unix/sysv/linux/ia64/fork.c (ARCH_FORK): Swap ptid and
8664 ctid to match kernel.
8666 2003-03-12 Ulrich Drepper <drepper@redhat.com>
8668 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add
8669 libc_multiple_threads.
8670 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Move definition of
8671 __libc_multiple_threads to...
8672 * sysdeps/unix/sysv/linux/libc_multiple_threads.c: ...here. New file.
8674 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Remove unnecessary
8676 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
8677 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
8679 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
8680 (__pthread_once_internal): Define.
8682 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Use shlib-compat.h
8683 macros instead of .symver directly.
8684 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
8685 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
8687 * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Include tcb-offsets.h.
8688 * sysdeps/x86_64/tcb-offsets.sym: New file.
8689 * sysdeps/x86_64/Makefile: New file.
8691 * sysdeps/i386/tcb-offsets.sym: Add SELF.
8692 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use SELF
8693 to access own pthread_t in TCB.
8694 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8696 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8698 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8700 2003-03-12 Roland McGrath <roland@redhat.com>
8702 * pthread-errnos.sym: New file.
8703 * Makefile (gen-as-const-headers): New variable, list that file.
8704 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include generated
8705 header <pthread-errnos.h> instead of defining errno values here.
8706 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
8707 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
8708 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
8709 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8710 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8712 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8714 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
8715 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8716 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
8717 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
8718 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
8719 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
8720 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
8721 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
8722 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8723 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
8724 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
8725 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
8726 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
8727 * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
8728 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
8729 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
8730 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
8731 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
8732 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
8733 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
8734 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
8735 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
8736 * sysdeps/i386/i486/pthread_spin_trylock.S: Likewise.
8737 * sysdeps/x86_64/pthread_spin_trylock.S: Likewise.
8738 * sysdeps/sh/pthread_spin_trylock.S: Likewise.
8739 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
8740 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
8742 * sysdeps/unix/sysv/linux/fork.c: Add an assert to check that
8743 CLONE_CHILD_SETTID worked.
8745 2003-03-12 Ulrich Drepper <drepper@redhat.com>
8747 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: New
8749 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S: New
8752 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
8753 (pthread_cond_t): Add padding.
8755 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: New file.
8756 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: New file.
8757 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: New file.
8759 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
8760 (__pthread_rwlock_timedwrlock): Add missing opcode suffix.
8761 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
8762 (__pthread_rwlock_timedrdlock): Likewise.
8763 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
8764 (__pthread_rwlock_wrlock): Likewise.
8765 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
8766 (__pthread_rwlock_rdlock): Likewise.
8768 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: New file.
8770 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Return
8771 result of lock re-get if it fails.
8773 2003-03-11 Ulrich Drepper <drepper@redhat.com>
8775 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Fix asm syntax.
8776 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
8777 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
8778 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
8779 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8780 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
8781 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
8782 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
8783 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
8784 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
8786 * sysdeps/x86_64/tls.h (THREAD_SELF, THREAD_GETMEM, THREAD_GETMEM_NC,
8787 THREAD_SETMEM, THREAD_SETMEM_NC): Correct asm syntax.
8789 * allocatestack.c [! TLS_MULTIPLE_THREADS_IN_TCB] (allocate_stack):
8790 Initialize *__libc_multiple_threads_ptr not __libc_multiple_threads.
8791 * sysdeps/pthread/createthread.c [! TLS_MULTIPLE_THREADS_IN_TCB]
8792 (create_thread): Likewise.
8793 Define __pthread_multiple_threads and __libc_multiple_threads_ptr.
8794 * init.c (__pthread_initialize_minimal_internal): Initialize
8795 __libc_multiple_threads_ptr if necessary.
8796 * pthreadP.h: Adjust prototype for __libc_pthread_init. Declare
8797 __pthread_multiple_threads and __libc_multiple_threads_ptr.
8798 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Define
8799 __libc_multiple_threads.
8800 (__libc_pthread_init): Return pointer to __libc_pthread_init if
8803 * sysdeps/i386/tls.h (THREAD_SETMEM): Fix one-byte variant.
8804 (THREAD_SETMEM_NC): Likewise.
8806 * sysdeps/x86_64/pthread_spin_trylock.c: Removed.
8807 * sysdeps/x86_64/pthread_spin_trylock.S: New file.
8808 * sysdeps/x86_64/pthread_spin_unlock.c: Removed.
8809 * sysdeps/x86_64/pthread_spin_unlock.S: New file.
8811 * sysdeps/i386/i486/pthread_spin_trylock.S (pthread_spin_trylock):
8812 Eliminate one entire instruction.
8814 * cancellation.c (__pthread_enable_asynccancel_2): New function.
8815 * pthreadP.h: Declare __pthread_enable_asynccancel_2.
8816 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
8817 (__pthread_cond_timedwait): Use __pthread_enable_asynccancel_2
8818 instead of __pthread_enable_asynccancel.
8819 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
8820 (__pthread_cond_wait): Likewise.
8821 * sysdeps/pthread/pthread_cond_timedwait.c
8822 (__pthread_cond_timedwait): Likewise.
8823 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
8825 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
8826 (__condvar_cleanup): Wake up all waiters in case we got signaled
8827 after being woken up but before disabling asynchronous
8829 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
8830 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
8831 (__condvar_cleanup): Likewise.
8833 * init.c (__NR_set_tid_address): If already defined, don't redefine.
8834 Make it an error if architecture has no #if case. Add x86-64.
8836 * sysdeps/unix/sysv/linux/x86_64/Makefile: Add flags for
8837 pt-initfini.s generation.
8839 * sysdeps/x86_64/tls.h: Include <asm/prctl.h>.
8840 (TLS_INIT_TP): Fix typo.
8842 2003-03-11 Jakub Jelinek <jakub@redhat.com>
8844 * sysdeps/ia64/bits/atomic.h (atomic_exchange_and_add): Swap 2nd and
8845 3rd argument of __arch_compare_and_exchange_{32,64}_val_acq.
8847 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Include semaphore.h.
8848 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
8849 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Likewise.
8850 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Likewise.
8851 * sysdeps/unix/sysv/linux/s390/sem_post.c: Likewise.
8852 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
8853 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
8854 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
8856 2003-03-11 Ulrich Drepper <drepper@redhat.com>
8858 * sysdeps/pthread/pthread_cond_timedwait.c
8859 (__pthread_cond_timedwait): Return the result of the final
8860 locking. If it succeeds, the regular function return value.
8862 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait):
8863 Return result of the final locking.
8864 * version.c (__nptl_main): Work around problems with the strange
8865 INTERNAL_SYSCALL macro on ppc32.
8866 * init.c (__pthread_initialize_minimal_internal): Unblock
8867 SIGCANCEL in case the parent blocked it.
8868 Reported by Paul Mackerras <paulus@samba.org>.
8870 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: New file.
8871 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: New file.
8872 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: New file.
8874 2003-03-11 Jakub Jelinek <jakub@redhat.com>
8876 * sysdeps/pthread/pthread_cond_timedwait.c
8877 (__pthread_cond_timedwait): Unlock and fail if
8878 __pthread_mutex_unlock_internal failed.
8880 * sysdeps/pthread/createthread.c (ARCH_CLONE): Define if not defined.
8881 (create_thread): Only assert PD->tcb != NULL under [TLS_TCB_AT_TP].
8883 * allocatestack.c (ALLOCATE_STACK_PARMS): New macro.
8884 [NEED_SEPARATE_REGISTER_STACK] (STACK_VARIABLES,
8885 STACK_VARIABLES_ARGS, STACK_VARIABLES_PARMS, ALLOCATE_STACK_PARMS,
8886 ALLOCATE_STACK): New macros.
8887 (TLS_TPADJ): New macro.
8888 (get_cached_stack, queue_stack, __deallocate_stack): Use TLS_TPADJ.
8889 (allocate_stack): Handle TLS_DTV_AT_TP and
8890 NEED_SEPARATE_REGISTER_STACK. Use TLS_TPADJ.
8891 * pthread_create.c (__pthread_create_2_1) [! TLS_TCB_AT_TP]:
8893 * init.c [__ia64__] (__NR_set_tid_address): Define.
8895 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: New file.
8896 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: New file.
8897 * sysdeps/unix/sysv/linux/ia64/fork.c: New file.
8898 * sysdeps/unix/sysv/linux/ia64/createthread.c: New file.
8899 * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: New file.
8900 * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: New file.
8901 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: New file.
8902 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: New file.
8903 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: New file.
8904 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
8905 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: New file.
8906 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: New file.
8907 * sysdeps/unix/sysv/linux/ia64/sem_post.c: New file.
8908 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: New file.
8909 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: New file.
8910 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: New file.
8911 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
8912 * sysdeps/ia64/bits/atomic.h: New file.
8913 * sysdeps/ia64/Makefile: New file.
8914 * sysdeps/ia64/pthread_spin_init.c: New file.
8915 * sysdeps/ia64/pthread_spin_lock.c: New file.
8916 * sysdeps/ia64/pthread_spin_trylock.c: New file.
8917 * sysdeps/ia64/pthread_spin_unlock.c: New file.
8918 * sysdeps/ia64/pthreaddef.h: New file.
8919 * sysdeps/ia64/tcb-offsets.sym: New file.
8920 * sysdeps/ia64/td_ta_map_lwp2thr.c: New file.
8921 * sysdeps/ia64/tls.h: New file.
8923 * sysdeps/s390/pthreaddef.h (__exit_thread_inline): Pass 1 argument
8924 to syscall instead of no arguments.
8926 2003-03-10 Ulrich Drepper <drepper@redhat.com>
8928 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: New file.
8929 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: New file.
8930 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: New file.
8931 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: New file.
8933 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Fix error value in
8936 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: New file
8938 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
8939 lowlevelbarrier.sym.
8940 * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: New file.
8941 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S:
8942 Include lowlevelbarrier.h and don't define offsets locally.
8943 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Likewise.
8945 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
8946 (__lll_mutex_lock_wait): Reverse order of first two parameters.
8947 (__lll_mutex_timedlock_wait): Likewise.
8948 (lll_mutex_lock): Adjust asm for that.
8949 (lll_mutex_timedlock): Likewise. Mark cx, cc, r10 as clobbered.
8950 (lll_lock): Adjust asm for operand order change.
8951 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: New file.
8952 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: New file.
8954 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_lock_wait):
8955 Reverse order of parameters.
8956 (__lll_timedwait_tid): Remove regparms attribute.
8957 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: New file.
8958 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: New file.
8960 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
8961 (__lll_timedwait_tid): Remove one unnecessary instruction.
8963 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Define
8964 __lll_mutex_timedlock_wait only for NOT_IN_libc.
8965 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Include
8968 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
8969 lll_unlock_wake_cb, __lll_wait_tid, and __lll_timedwait_tid only
8971 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Include
8974 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Don't define
8975 LOCK is already defined. Don't define __lll_mutex_timedlock_wait
8977 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Only
8978 define LOCK here (if UP is not defined). The actual code is in
8981 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Don't define
8982 LOCK is already defined. Don't define lll_unlock_wake_cb and
8983 __lll_timedwait_tid for libc.so.
8984 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Only
8985 define LOCK here (if UP is not defined). The actual code is in
8988 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Not needed anymore.
8989 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: Likewise.
8990 * sysdeps/unix/sysv/linux/s390/sem_post.c: Include lowlevellock.h
8991 instead of lowlevelsem.h.
8992 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
8993 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
8994 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
8996 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
8998 * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: New file.
8999 * sysdeps/unix/sysv/linux/i386/lowlevelrwlock.h: Removed.
9000 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: Removed.
9002 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_trylock): Fix
9004 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_trylock): Undo
9007 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: New file.
9009 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove declaration
9010 of __libc_locking_needed.
9011 (lll_trylock): Initialize %eax to zero.
9013 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Update
9014 pthread_cond_t definition.
9016 2003-03-10 Roland McGrath <roland@redhat.com>
9018 * sysdeps/unix/sysv/linux/lowlevelcond.sym: New file.
9019 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add it.
9020 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: File removed.
9021 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: Likewise.
9022 * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: Likewise.
9024 * allocatestack.c (allocate_stack) [!TLS_MULTIPLE_THREADS_IN_TCB]:
9025 Instead of setting PD->multiple_threads, set globals
9026 __pthread_multiple_threads and __libc_multiple_threads.
9027 * sysdeps/pthread/createthread.c (create_thread): Likewise.
9028 * sysdeps/i386/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it.
9029 * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Likewise.
9031 * descr.h (struct pthread): Conditionalize first member on
9032 [!TLS_DTV_AT_TP]. Replace the `header' member with an anonymous union
9033 containing an anonymous tcbhead_t. Move `list' member out.
9034 [TLS_MULTIPLE_THREADS_IN_TCB]: Define a `multiple_threads' member.
9035 * allocatestack.c: Remove use of `header.data.' prefix.
9036 * pthread_create.c: Likewise.
9037 * init.c (__pthread_initialize_minimal_internal): Likewise.
9038 * sysdeps/pthread/createthread.c (create_thread): Likewise.
9039 * sysdeps/i386/tls.h (INSTALL_DTV): Add parens.
9040 (THREAD_SELF, THREAD_DTV, INSTALL_NEW_DTV): No `header.data.' prefix.
9041 * sysdeps/x86_64/tls.h: Likewise.
9042 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
9043 (SINGLE_THREAD_P): Likewise.
9044 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
9045 (SINGLE_THREAD_P): Likewise.
9046 * sysdeps/i386/tls.h (tcbhead_t): Remove `list' member.
9047 * sysdeps/s390/tls.h (tcbhead_t): Likewise.
9049 2003-03-09 Ulrich Drepper <drepper@redhat.com>
9051 * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: New file.
9053 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
9054 * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
9056 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix many
9057 leftovers from the ia32 code.
9059 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Remove unneccessary
9061 (clear_once_control): Don't load %esi.
9063 * sysdeps/x86_64/tls.h: Remove all traces of segment descriptor
9066 * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
9068 * sysdeps/unix/sysv/linux/s390/createthread.c: Moved to...
9069 * sysdeps/unix/sysv/linux/createthread.c: ...here.
9071 * Makefile (tests): Add tst-cond10.
9072 * tst-cond10.c: New file.
9074 2003-03-08 Ulrich Drepper <drepper@redhat.com>
9076 * tst-tls2.c (do_test): Add TEMP_FAILURE_RETRY around sem_wait call.
9077 * tst-signal3.c (do_test): Likewise.
9078 * tst-sem5.c (do_test): Likewise.
9079 * tst-kill6.c (do_test): Likewise.
9080 * tst-tls3.c (do_test): Likewise. Include <errno.h>.
9082 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use add/sub instead
9084 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
9085 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise
9086 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
9087 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
9088 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
9089 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
9090 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
9092 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
9094 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
9095 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
9096 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9097 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
9098 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
9099 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
9100 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
9101 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
9103 * allocatestack.c (allocate_stack): If mprotect() fails free the
9106 2003-03-07 Ulrich Drepper <drepper@redhat.com>
9108 * sysdeps/i386/i486/bits/atomic.h: Fix a few unused definitions.
9110 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove all trace of
9111 lll_wake_tid. This was used only to work around kernel limits in
9113 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
9114 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Likewise.
9115 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
9116 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
9118 * init.c (__static_tls_align_m1): Renamed from __static_tls_align.
9119 (__pthread_initialize_minimal_internal): Change initialization of
9120 __static_tls_align_m1 appropriately.
9121 * pthreadP.h (__static_tls_align_m1): Renamed from
9123 * allocatestack.c (allocate_stack): Use __static_tls_align_m1
9124 instead of __static_tls_align-1.
9126 2003-03-04 Ulrich Drepper <drepper@redhat.com>
9128 * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
9130 * pthread_create.c: Define __pthread_keys using nocommon
9131 attribute, not by placing it explicitly in bss.
9132 Remove DEFINE_DEALLOC definition. Not needed anymore.
9134 * allocatestack.c: Define ARCH_MAP_FLAGS if not already defined.
9135 Use it in mmap call to allocate stacks.
9137 * sysdeps/pthread/createthread.c (create_thread): Fix comment.
9139 * pthread_create.c (start_thread): Use THREAD_SETMEM to store
9140 result of the thread function.
9142 2003-03-03 Ulrich Drepper <drepper@redhat.com>
9144 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: Removed. The generic
9145 version is just fine.
9147 * sysdeps/unix/sysv/linux/libc_pthread_init.c
9148 (__pthread_child_handler): Renamed from pthread_child_handler,
9149 exported, and marked hidden. Change all users.
9150 * sysdeps/unix/sysv/linux/register-atfork.c (free_mem): Do not
9151 free __pthread_child_handler from child list.
9153 2003-03-03 Martin Schwidefsky <schwidefsky@de.ibm.com>
9155 * atomic.h (atomic_exchange_and_add): Return newval, not oldval.
9157 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
9158 Fix handling of cancellation and failing pthread_mutex_unlock call.
9159 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
9160 (__pthread_cond_wait): Likewise.
9162 * sysdeps/pthread/pthread_rwlock_timedrdlock.c
9163 (pthread_rwlock_timedrdlock): Fix clobber of result variable by
9164 lll_futex_timed_wait call.
9165 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
9166 (pthread_rwlock_timedwrlock): Likewise.
9168 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
9169 Don't define lll_unlock_wake_cb and ___lll_timedwait_tid in libc.so.
9170 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Remove XXX comments.
9172 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Fix
9173 check of lll_futex_wake return value.
9175 2003-03-03 Roland McGrath <roland@redhat.com>
9177 * forward.c: Fix typo in __pthread_attr_init_2_0 compat_symbol decl.
9179 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
9180 Argument to ptr___pthread_cleanup_upto is __jmp_buf, not jmp_buf.
9181 * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
9183 2003-03-02 Ulrich Drepper <drepper@redhat.com>
9185 * sysdeps/pthread/timer_create.c (timer_create): Return correct
9186 error for CPU clocks.
9188 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
9189 _POSIX_MONOTONIC_CLOCK.
9190 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
9192 * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
9195 2003-03-01 Ulrich Drepper <drepper@redhat.com>
9197 * descr.h (struct pthread): Move cleanup field to the front.
9199 2003-03-01 Roland McGrath <roland@redhat.com>
9201 * sem_open.c (sem_open): Braino fix.
9203 2003-03-01 Ulrich Drepper <drepper@redhat.com>
9205 * sysdeps/i386/tcb-offsets.sym: Add CLEANUP and CLEANUP_PREV.
9206 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Inline
9207 __pthread_cleanup_pop functionality.
9208 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9210 * descr.h (struct pthread): Move tid field to the front now that
9213 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S
9214 (__lll_mutex_timedlock_wait): Remove.
9215 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
9216 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
9217 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
9218 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
9219 (lll_unlock_wake_cb): Don't save and restore %esi.
9220 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
9222 (__lll_timedwait_tid): Add alignment.
9223 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
9224 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
9226 (__lll_timedwait_tid): Removed.
9227 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
9228 (__pthread_cond_broadcast): Don't save, load, and restore %esi.
9229 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
9230 (pthread_barrier_wait): Don't save, load, and restore %esi for
9232 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
9233 (__pthread_cond_signal): Don't save, load, and restore %esi.
9234 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
9235 (__pthread_rwlock_unlock): Don't save, load, and restore %esi.
9236 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
9237 Don't save, load, and restore %esi.
9239 2003-02-27 Ulrich Drepper <drepper@redhat.com>
9241 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
9242 Release lock before waking up the waiters.
9244 * tst-exit1.c (do_test): Don't start more than one thread in parallel.
9246 * tst-rwlock9.c (writer_thread): Correct adding TIMEOUT.
9247 (reader_thread): Likewise.
9249 * sysdeps/pthread/pthread_rwlock_unlock.c
9250 (__pthread_rwlock_unlock): Release internal lock early. Don't try
9251 to wake up readers if there are none.
9253 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
9254 Release internal lock before wake threads.
9256 2003-02-26 Ulrich Drepper <drepper@redhat.com>
9258 * Makefile (tests): Add tst-rwlock10 and tst-rwlock11.
9259 * tst-rwlock8.c: Initialize lock with INIT. Allow INIT to be
9261 * tst-rwlock9.c: Likewise.
9262 * tst-rwlock10.c: New file.
9263 * tst-rwlock11.c: New file.
9265 * Makefile (tests): Add tst-dlsym1.
9266 * tst-dlsym1.c: New file.
9268 * init.c (__pthread_initialize_minimal_internal): Set
9269 GL(dl_error_catch_tsd) to __libc_dl_error_tsd.
9270 * Versions (libc:GLIBC_PRIVATE): Export __libc_dl_error_tsd.
9272 2003-02-24 Ulrich Drepper <drepper@redhat.com>
9274 * sem_open.c (sem_open): Fix handling of O_CREAT without O_EXCL.
9276 * tst-cond2.c: Fix sychronization with child.
9278 * tst-rwlock8.c (reader_thread): Remove unused variable.
9280 * Makefile: Add rules to build and run tst-tls3.
9281 * tst-tls3.c: New file.
9282 * tst-tls3mod.c: New file.
9284 * Makefile (tests): Add tst-rwlock8 and tst-rwlock9.
9285 * tst-rwlock8.c: New file.
9286 * tst-rwlock9.c: New file.
9287 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Fix
9288 complete broken rwlock implementation.
9289 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
9291 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
9293 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
9294 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
9295 * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
9296 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
9297 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
9298 * sysdeps/pthread/pthread_rwlock_unlock.c: Likewise.
9299 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
9301 2003-02-23 Roland McGrath <roland@redhat.com>
9303 * Makefile (nptl-version): Change regexp so case sensitivity is ok.
9305 2003-02-23 Ulrich Drepper <drepper@redhat.com>
9307 * Makefile (tests): Add tst-context1.
9308 * tst-context1.c: New file.
9310 * Makefile (tests): Add tst-tls1 and tst-tls2.
9311 * tst-tls1.c: New file.
9312 * tst-tls2.c: New file.
9314 * libc-cancellation.c (__libc_enable_asynccancel): Correct test
9317 * pthread_create.c (start_thread): Set EXITING_BIT early.
9319 * sysdeps/i386/tls.h (THREAD_GETMEM): Mark asm as volatile.
9320 (THREAD_GETMEM_NC): Likewise.
9322 2003-02-22 Ulrich Drepper <drepper@redhat.com>
9324 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Shave
9325 off 3 more bytes by using offset-less instructions when possible.
9327 * Makefile: Add dependency for $(objpfx)version.d.
9329 * eintr.c (eintr_source): Add unnecessary return but the compiler
9332 * tst-kill3.c: Include <unistd.h>.
9334 2003-02-21 Roland McGrath <roland@redhat.com>
9336 * pthread_create.c (start_thread): Call __libc_thread_freeres.
9338 2003-02-21 Ulrich Drepper <drepper@redhat.com>
9340 * Makefile (tests): Add tst-eintr1.
9341 (distribute): Add eintr.c.
9342 * tst-eintr1.c: New file.
9343 * eintr.c: New file.
9345 * pthread_cancel.c (pthread_cancel): Use tkill directly.
9347 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill):
9348 Disallow sending SIGCANCEL.
9350 * Makefile (tests): Remove tst-basic7. Add tst-kill1, tst-kill2,
9351 tst-kill3, tst-kill4, tst-kill5, tst-kill6.
9352 * tst-kill1.c: New file.
9353 * tst-kill2.c: New file.
9354 * tst-kill3.c: New file.
9355 * tst-kill5.c: New file.
9356 * tst-kill6.c: New file.
9357 * tst-basic7.c: Renamed to...
9358 * tst-kill4.c: ...this.
9360 2003-02-21 Roland McGrath <roland@redhat.com>
9362 * Makefile (install-lib-ldscripts): New variable.
9364 2003-02-21 Ulrich Drepper <drepper@redhat.com>
9366 * pthreadP.h: Define INVALID_TD_P and INVALID_NOT_TERMINATED_TD_P.
9367 * pthread_cancel.c: Use INVALID_TD_P.
9368 * pthread_detach.c: Likewise.
9369 * pthread_getschedparam.c: Likewise.
9370 * pthread_setschedparam.c: Likewise.
9371 * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
9372 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
9373 * pthread_join.c: Use INVALID_NOT_TERMINATED_TD_P.
9374 * pthread_timedjoin.c: Likewise.
9376 * tst-basic7.c: Include <signal.h>.
9378 * pthread_join.c (pthread_join): Limited checking for invalid
9380 * pthread_timedjoin.c (pthread_timedjoin_np): Likewise.
9382 2003-02-20 Ulrich Drepper <drepper@redhat.com>
9384 * pthread_create.c (deallocate_tsd): Reset found_nonzero at the
9385 beginning of the loop. Clear the entire first block of TSD.
9386 * Makefile (tests): Add tst-key4.
9387 * tst-key4.c: New file.
9389 2003-02-18 Ulrich Drepper <drepper@redhat.com>
9391 * Makefile (tests): Add tst-basic7.
9392 * tst-basic7.c: New file.
9394 * pthread_create.c (deallocate_tsd): Mark as internal_function.
9395 Add some more __builtin_expect.
9397 * pthreadP.h: Define dummy version of DEBUGGING_P.
9399 2003-02-17 Ulrich Drepper <drepper@redhat.com>
9401 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remnove
9402 _POSIX_THREAD_PRIORITY_SCHEDULING.
9403 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
9404 _XOPEN_REALTIME_THREADS.
9405 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
9407 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): The
9408 kernel returns EINVAL for PID <= 0, work around it.
9410 * Makefile (tests): Add tst-signal5.
9411 * tst-signal5.c: New file.
9413 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
9416 * tst-cancel1.c (tf): Block all signals.
9418 * Makefile (tests): Add tst-basic6.
9419 * tst-basic6.c: New file.
9421 * tst-basic1.c: Add test for process ID.
9423 * Makefile (tests): Add tst-cancel10.
9424 * tst-cancel10.c: New file.
9426 * Makefile (tests): Add tst-signal4.
9427 * tst-signal4.c: New file.
9429 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use
9430 __sigismember instead of sigismember. Add __builtin_expect.
9432 2003-02-16 Ulrich Drepper <drepper@redhat.com>
9434 * tst-attr1.c (do_test): Add tests for pthread_setcanceltype,
9435 pthread_setcancelstate, and pthread_rwlock_setpshared.
9437 * tst-cancel7.c (do_test): Make sure the pid file exists before
9438 canceling the thread.
9440 * tst-rwlock6.c: More pthread_rwlock_timedwrlock and
9441 pthread_rwlock_timedrdlock tests.
9442 * tst-rwlock7.c: More pthread_rwlock_timedwrlock tests.
9443 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
9444 Check for invalid tv_nsec field.
9445 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
9448 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Protect
9449 recursive mutex of overflow.
9451 * tst-attr1.c (do_test): Add test for pthread_mutexattr_setpshared.
9453 * libc-cancellation.c (__libc_enable_asynccancel): Rewrite to avoid
9454 going into an endless loop.
9455 * Makefile (tests): Add tst-cancel9.
9456 * tst-cancel9.c: New file.
9458 * pthread_cancel.c (pthread_cancel): Use the result of __pthread_kill.
9460 2003-02-15 Ulrich Drepper <drepper@redhat.com>
9462 * tst-mutex5.c (do_test): Add more timedlock tests.
9464 * tst-mutex2.c: Tests of trylock and unlock with ERROR mutexes.
9465 * tst-mutex3.c (do_test): Add tests for trylock with RECURSIVE mutexes.
9467 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
9468 use INLINE_SYSCALL. Error number is returned, not -1.
9470 * pthreadP.h: Mark declarations of __find_in_stack_list, __free_tcb,
9471 and __deallocate_stack with internal_function.
9472 * pthread_create.c: Adjust definitions appropriately.
9473 * allocatestack.c: Likewise.
9475 * pthread_join.c: Add one more __builtin_expect.
9476 * pthread_timedjoin.c: Likewise.
9478 * pthread_getspecific.c (__pthread_getspecific): Clear data->data
9479 not data of sequence number does not match.
9480 Add one __builtin_expect.
9482 * Makefile (tests): Add tst-clock1.
9483 * tst-clock1.c: New file.
9485 * pthread_setconcurrency.c (pthread_setconcurrency): Fail for
9487 * Makefile (tests): Add tst-basic5.
9488 * tst-basic5.c: New file.
9490 2003-02-14 Ulrich Drepper <drepper@redhat.com>
9492 * Makefile (tests): Add tst-basic4.
9493 * tst-basic4.c: New file.
9495 * pthreadP.h: Add declaraction for __nptl_nthreads.
9496 * pthread_create.c: Define __nptl_nthreads
9497 (start_thread): Increment __nptl_nthreads at beginning. Decrement
9498 after thread is done. If then zero, call exit(0).
9499 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
9500 Add ptr_nthreads. Define HAVE_PTR_NTHREADS.
9501 * init.c (pthread_functions): Initialize ptr_nthreads.
9502 * allocatestack.c (nptl_nthreads): Remove definition and all uses.
9503 (__reclaim_stacks): Decrement __nptl_nthreads.
9504 * sysdeps/pthread/Makefile [$(subdir)==csu] (CFLAGS-libc-start.c):
9506 * Makefile (tests): Add tst-basic3.
9507 * tst-basic3.c: New file.
9509 * descr.h: Define CANCELING_BIT and CANCELING_BITMASK. Introduce
9510 after CANCELTYPE_BIT, move the other bits up. Update CANCEL_RESTMASK.
9511 * init.c (sigcancel_handler): Also set CANCELING_BITMASK bit in newval.
9512 * pthread_cancel.c (pthread_cancel): Likewise. Also set CANCELING_BIT
9513 if asynchronous canceling is enabled.
9514 * pthread_join.c (pthread_join): When recognizing circular joins,
9515 take into account the other thread might be already canceled.
9516 * Makefile (tests): Add tst-join5.
9517 * tst-join5.c: New file.
9519 * Makefile (tests): Add tst-join4.
9520 * tst-join4.c: New file.
9522 2003-02-13 Ulrich Drepper <drepper@redhat.com>
9524 * tst-cond4.c (main): Add test of pthread_attr_getpshared.
9526 2003-02-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
9528 * sysdeps/s390/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM,
9529 THREAD_SETMEM_NC): Use passed descr instead of THREAD_SELF.
9530 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind): Avoid
9532 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Include <sys/time.h>
9534 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Return
9535 error if lll_futex_wake failed.
9537 2003-02-13 Ulrich Drepper <drepper@redhat.com>
9539 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Fix
9540 handling of cancellation and failung pthread_mutex_unlock call.
9541 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9542 * Makefile (tests): Add tst-cond8 and tst-cond9.
9543 * tst-cond8.c: New file.
9544 * tst-cond9.c: New file.
9546 * tst-cond7.c (do_test): Unlock the mutex before canceling the thread.
9548 * sysdeps/pthread/pthread.h: Add missing initializers. Protect
9549 non-standard initializers with __USE_GNU.
9551 * Makefile (tests): Add tst-cleanup3.
9552 * tst-cleanup3.c: New file.
9554 2003-02-12 Ulrich Drepper <drepper@redhat.com>
9556 * Makefile (tests): Add tst-attr1 and tst-attr2.
9557 * tst-attr1.c: New file.
9558 * tst-attr2.c: New file.
9560 * Makefile: Add rules to build and run tst-atfork2 test.
9561 * tst-atfork2.c: New file.
9562 * tst-atfork2mod.c: New file.
9564 * sysdeps/unix/sysv/linux/unregister-atfork.c
9565 (__unregister_atfork): Free the memory allocated for the handlers
9566 after removing them from the lists.
9568 * sysdeps/unix/sysv/linux/register-atfork.c: Define memeory
9571 * tst-atfork1.c (do_test): Wait for the child we forked.
9572 Report error in child.
9574 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Fix comment.
9576 * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
9578 2003-02-10 Ulrich Drepper <drepper@redhat.com>
9580 * Makefile (tests): Add tst-cancel8.
9581 * tst-cancel8.c: New file.
9583 * sysdeps/unix/sysv/linux/i386/pthread_once.S (clear_once_control): Fix
9584 clearing of control variable.
9585 * Makefile (tests): Add tst-once3 and tst-once4.
9586 * tst-once3.c: New file.
9587 * tst-once4.c: New file.
9589 2003-02-08 kaz Kojima <kkojima@rr.iij4u.or.jp>
9591 * sysdeps/sh/Makefile: New file.
9592 * sysdeps/sh/bits/atomic.h: New file.
9593 * sysdeps/sh/pthread_spin_init.c: New file.
9594 * sysdeps/sh/pthread_spin_lock.c: New file.
9595 * sysdeps/sh/pthread_spin_trylock.S: New file.
9596 * sysdeps/sh/pthread_spin_unlock.S: New file.
9597 * sysdeps/sh/pthreaddef.h: New file.
9598 * sysdeps/sh/tcb-offsets.sym: New file.
9599 * sysdeps/sh/td_ta_map_lwp2thr.c: New file.
9600 * sysdeps/sh/tls.h: New file.
9601 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: New file.
9602 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: New file.
9603 * sysdeps/unix/sysv/linux/sh/createthread.c: New file.
9604 * sysdeps/unix/sysv/linux/sh/fork.c: New file.
9605 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: New file.
9606 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: New file.
9607 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h: New file.
9608 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: New file.
9609 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: New file.
9610 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: New file.
9611 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: New file.
9612 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: New file.
9613 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
9614 * sysdeps/unix/sysv/linux/sh/pt-vfork.S: New file.
9615 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: New file.
9616 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: New file.
9617 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: New file.
9618 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: New file.
9619 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: New file.
9620 * sysdeps/unix/sysv/linux/sh/pthread_once.S: New file.
9621 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: New file.
9622 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: New file.
9623 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: New file.
9624 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: New file.
9625 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: New file.
9626 * sysdeps/unix/sysv/linux/sh/sem_post.S: New file.
9627 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: New file.
9628 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: New file.
9629 * sysdeps/unix/sysv/linux/sh/sem_wait.S: New file.
9630 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
9632 2003-02-08 Ulrich Drepper <drepper@redhat.com>
9634 * tst-cond2.c: Rearrange code to not rely on behavior undefined
9637 * tst-basic2.c (do_test): Lock mutex before creating the thread.
9639 2003-02-07 Ulrich Drepper <drepper@redhat.com>
9641 * sysdeps/x86_64/tls.h: Remove unnecessary macros, left over from x86.
9642 (TLS_GET_FS): New #define.
9643 (TLS_SET_FS): New #define.
9644 Correct value of __NR_set_thread_area.
9646 * sysdeps/x86_64/td_ta_map_lwp2thr.c: New file.
9648 2003-02-06 Ulrich Drepper <drepper@redhat.com>
9650 * Makefile (tests): Add tst-popen1.
9651 * tst-popen1.c: New file.
9653 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Remove wrong
9654 but inactive generalization.
9655 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9656 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
9657 Minor optimization, remove one instruction.
9658 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
9660 2003-02-04 Martin Schwidefsky <schwidefsky@de.ibm.com>
9662 * sysdeps/unix/sysv/linux/s390/fork.c: Correct order of parameters.
9664 2003-01-31 Martin Schwidefsky <schwidefsky@de.ibm.com>
9666 * init.c (__NR_set_tid_address): Add #ifdef for s390.
9667 * sysdeps/pthread/pthread_barrier_wait.c: New file.
9668 * sysdeps/pthread/pthread_cond_broadcast.c: New file.
9669 * sysdeps/pthread/pthread_cond_signal.c: New file.
9670 * sysdeps/pthread/pthread_cond_timedwait.c: New file.
9671 * sysdeps/pthread/pthread_cond_wait.c: New file.
9672 * sysdeps/pthread/pthread_rwlock_rdlock.c: New file.
9673 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: New file.
9674 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: New file.
9675 * sysdeps/pthread/pthread_rwlock_unlock.c: New file.
9676 * sysdeps/pthread/pthread_rwlock_wrlock.c: New file.
9677 * sysdeps/s390/Makefile: New file.
9678 * sysdeps/s390/bits/atomic.h: New file.
9679 * sysdeps/s390/pthread_spin_init.c: New file.
9680 * sysdeps/s390/pthread_spin_lock.c: New file.
9681 * sysdeps/s390/pthread_spin_trylock.c: New file.
9682 * sysdeps/s390/pthread_spin_unlock.c: New file.
9683 * sysdeps/s390/pthreaddef.h: New file.
9684 * sysdeps/s390/tcb-offsets.sym: New file.
9685 * sysdeps/s390/td_ta_map_lwp2thr.c: New file.
9686 * sysdeps/s390/tls.h: New file.
9687 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: New file.
9688 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: New file.
9689 * sysdeps/unix/sysv/linux/s390/createthread.c: New file.
9690 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: New file.
9691 * sysdeps/unix/sysv/linux/s390/fork.c: New file.
9692 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: New file.
9693 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
9694 * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: New file.
9695 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: New file.
9696 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: New file.
9697 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: New file.
9698 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: New file.
9699 * sysdeps/unix/sysv/linux/s390/pthread_once.c: New file.
9700 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: New file.
9701 * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: New file.
9702 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
9703 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
9704 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: New file.
9705 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
9706 * sysdeps/unix/sysv/linux/s390/sem_post.c: New file.
9707 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: New file.
9708 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
9709 * sysdeps/unix/sysv/linux/s390/sem_wait.c: New file.
9711 2003-02-04 Ulrich Drepper <drepper@redhat.com>
9713 * atomic.h: Add a couple more default implementations.
9714 (atomic_compare_and_exchange_acq): Use
9715 __arch_compare_and_exchange_32_acq in return value definition. It
9717 (atomic_bit_set): Renamed from atomic_set_bit.
9718 Add missing atomic_ prefixes.
9720 * sysdeps/pthread/bits/libc-lock.h (__libc_once): In case no
9721 thread library is available, use correct value to mark initialized
9724 2003-02-03 Ulrich Drepper <drepper@redhat.com>
9726 * allocatestack.c (allocate_stack): Use __getpagesize instead of
9727 __sysconf to determine pagesize.
9729 * pthread_create.c: Include <atomic.h>.
9730 * allocatestack.c (allocate_stack): Implement coloring of the
9731 allocated stack memory. Rename pagesize to pagesize_m1. It's the
9732 size minus one. Adjust users.
9733 * sysdeps/i386/i686/Makefile: New file.
9735 2003-02-02 Ulrich Drepper <drepper@redhat.com>
9737 * allocatestack.c: Improve comment throughout the file.
9739 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
9740 (__lll_lock_wait): Add branch prediction.
9741 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
9742 (__lll_lock_wait): Likewise.
9743 (lll_unlock_wake_cb): Removed.
9745 2003-01-31 Ulrich Drepper <drepper@redhat.com>
9747 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Remove
9748 _POSIX_THREAD_PRIORITY_SCHEDULING.
9750 2003-01-30 Jakub Jelinek <jakub@redhat.com>
9752 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
9753 Fix return type of ptr___pthread_getspecific.
9755 2003-01-29 Ulrich Drepper <drepper@redhat.com>
9757 * Makefile (tests): Add tst-umask1.
9758 (tst-umask1-ARGS): Define.
9759 * tst-umask1.c: New file.
9761 2003-01-28 Ulrich Drepper <drepper@redhat.com>
9763 * Makefile (libpthread-routines): Remove lowlevelrwlock. Add
9764 pthread_rwlock_rdlock, pthread_rwlock_timedrdlock,
9765 pthread_rwlock_wrlock, pthread_rwlock_timedwrlock, and
9766 pthread_rwlock_unlock.
9767 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Removed
9768 * sysdeps/unix/sysv/linux/i386/i586/lowlevelrwlock.S: Removed
9769 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Removed
9770 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: New file.
9771 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
9773 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: New file.
9774 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
9776 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: New file.
9777 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_rdlock.S: New file.
9778 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedrdlock.S:
9780 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_wrlock.S: New file.
9781 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedwrlock.S:
9783 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_unlock.S: New file.
9784 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_rdlock.S: New file.
9785 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedrdlock.S:
9787 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_wrlock.S: New file.
9788 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedwrlock.S:
9790 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_unlock.S: New file.
9792 * Makefile (libpthread-routines): Remove lowlevelcond and
9793 lowlevelsem. Add sem_wait, sem_trywait, sem_timedwait, sem_post,
9794 pthread_cond_wait, pthread_cond_timedwait, pthread_cond_signal,
9795 and pthread_cond_broadcast.
9796 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Removed
9797 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Removed
9798 * sysdeps/unix/sysv/linux/i386/i586/lowlevelsem.S: Removed
9799 * sysdeps/unix/sysv/linux/i386/i586/lowlevelcond.S: Removed
9800 * sysdeps/unix/sysv/linux/i386/i686/lowlevelsem.S: Removed
9801 * sysdeps/unix/sysv/linux/i386/i686/lowlevelcond.S: Removed
9802 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: New file.
9803 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: New file.
9804 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: New file.
9805 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: New file.
9806 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: New file.
9807 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: New file.
9808 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: New file.
9809 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: New file.
9810 * sysdeps/unix/sysv/linux/i386/i586/sem_wait.S: New file.
9811 * sysdeps/unix/sysv/linux/i386/i586/sem_trywait.S: New file.
9812 * sysdeps/unix/sysv/linux/i386/i586/sem_timedwait.S: New file.
9813 * sysdeps/unix/sysv/linux/i386/i586/sem_post.S: New file.
9814 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_wait.S: New file.
9815 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_timedwait.S: New file.
9816 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_signal.S: New file.
9817 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_broadcast.S: New file.
9818 * sysdeps/unix/sysv/linux/i386/i686/sem_wait.S: New file.
9819 * sysdeps/unix/sysv/linux/i386/i686/sem_trywait.S: New file.
9820 * sysdeps/unix/sysv/linux/i386/i686/sem_timedwait.S: New file.
9821 * sysdeps/unix/sysv/linux/i386/i686/sem_post.S: New file.
9822 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_wait.S: New file.
9823 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S: New file.
9824 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_signal.S: New file.
9825 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_broadcast.S: New file.
9826 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: New file.
9828 * sysdeps/unix/sysv/linux/i386/createthread.c: Define
9829 PREPARE_CREATE and TLS_VALUE with x86-specific bits. All the rest
9830 of the code is moved to ...
9831 * sysdeps/pthread/createthread.c: ...here. New file.
9833 2003-01-27 Ulrich Drepper <drepper@redhat.com>
9835 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S
9836 (__new_sem_post): Clear %eax before returning.
9837 Reported by MAEDA Naoaki <maeda.naoaki@jp.fujitsu.com>.
9839 * Makefile (tests): Add tst-cleanup2.
9840 * tst-cleanup2.c: New file.
9842 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
9843 Interpret first parameter correctly.
9845 2003-01-17 Ulrich Drepper <drepper@redhat.com>
9847 * Makefile (headers): Add bits/semaphore.h.
9849 2003-01-16 Jakub Jelinek <jakub@redhat.com>
9851 * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize _head->sysinfo even
9854 2003-01-14 Ulrich Drepper <drepper@redhat.com>
9856 * sem_open.c (sem_open): Return SEM_FAILED if existing semaphore
9857 must be used and mapping failed.
9858 Reported by Luke Elliott <luke.elliott@activfinancial.com>.
9860 * Makefile (CFLAGS-pthread_self.os): Define this, not
9861 CFLAGS-pthread_self.c.
9863 2003-01-13 Ulrich Drepper <drepper@redhat.com>
9865 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Don't export
9868 * Makefile (libpthread-routines): Add version. Add rules to build
9869 version.os and banner.h.
9870 * version.c: New file.
9872 2003-01-13 Jakub Jelinek <jakub@redhat.com>
9874 * pthread_mutex_lock.c (__pthread_mutex_lock_internal): Make
9875 the alias unconditional.
9876 * pthread_mutex_unlock.c (__pthread_mutex_unlock_internal): Likewise.
9878 2003-01-13 Ulrich Drepper <drepper@redhat.com>
9880 * Makefile (CFLAGS-pthread_self.c): New definition.
9882 2003-01-06 Jakub Jelinek <jakub@redhat.com>
9884 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Add
9885 INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
9886 * sysdeps/unix/sysv/linux/raise.c (raise): Likewise.
9887 * init.c (__pthread_initialize_minimal_internal): Likewise.
9889 2003-01-07 Jakub Jelinek <jakub@redhat.com>
9891 * pthreadP.h (__pthread_cond_timedwait): Add prototype.
9893 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
9894 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
9895 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
9896 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
9897 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
9898 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
9900 2003-01-06 Jakub Jelinek <jakub@redhat.com>
9902 * pthreadP.h (LIBC_CANCEL_HANDLED): Define.
9903 * pt-system.c (LIBC_CANCEL_HANDLED): Add.
9904 * tst-cancel-wrappers.sh: Remove all exceptions.
9906 2003-01-05 Ulrich Drepper <drepper@redhat.com>
9908 * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
9909 features. Reported by Marijn Ros <marijn@mad.scientist.com>.
9911 * sysdeps/unix/sysv/linux/jmp-unwind.c: Include <pthread-functions.h>.
9912 Use __libc_pthread_functions array if SHARED.
9914 * pthreadP.h: Move pthread_cond_2_0_t definition to...
9915 * sysdeps/unix/sysv/linux/internaltypes.h: ...here.
9917 * sysdeps/pthread/bits/libc-lock.h (__libc_ptf_call): New #define.
9918 (__libc_rwlock_rdlock, __libc_rwlock_wrlock, __libc_rwlock_unlock,
9919 __libc_key_create, __libc_getspecific, __libc_setspecific): Use
9920 __libc_ptf_call instead of __libc_maybe_call.
9922 (__libc_cleanup_region_start): Wrap function name with PTF call.
9923 (__libc_cleanup_region_end): Likewise.
9924 (__libc_cleanup_end): Likewise.
9926 * pthread_getspecific.c: Add __pthread_getspecific_internal alias.
9927 * pthread_setspecific.c: Add __pthread_setspecific_internal alias.
9928 * pthread_key_create.c: Add __pthread_key_create_internal alias.
9929 * pthreadP.h: Add prototypes.
9931 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Add
9932 __pthread_rwlock_rdlock, __pthread_rwlock_wrlock, and
9933 __pthread_rwlock_unlock aliases.
9934 * pthreadP.h: Add prototypes for new aliases.
9936 * pthreadP.h (struct pthead_functions): Moved to...
9937 * sysdeps/pthread/pthread-functions.h: ...here. New file.
9938 * init.c (pthread_functions): Add initializers for new elements.
9940 * cleanup_defer.c: Add __pthread_cleanup_push_defer and
9941 __pthread_cleanup_pop_restore aliases.
9942 * pthreadP.h: Add prototypes.
9944 * cleanup.c: Rename _GI_pthread_cleanup_push to __pthread_cleanup_push
9945 and _GI_pthread_cleanup_pop to __pthread_cleanup_pop.
9946 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Adjust caller.
9947 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
9948 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
9949 * pthreadP.h: Adjust prototypes and callers.
9951 2003-01-04 Ulrich Drepper <drepper@redhat.com>
9953 * Makefile (tests): Add tst-cancel7.
9954 (tst-cancel7-ARGS): New variable.
9955 * tst-cancel7.c: New file.
9957 * old_pthread_cond_broadcast.c: Optimize initialization a bit to work
9958 around gcc defficiencies.
9959 * old_pthread_cond_signal.c: Likewise.
9960 * old_pthread_cond_timedwait.c: Likewise.
9961 * old_pthread_cond_wait.c: Likewise.
9963 * pthreadP.h (pthread_cond_2_0_t): Remove unneeded lock element.
9965 2003-01-03 Ulrich Drepper <drepper@redhat.com>
9967 * Makefile (tests): Add tst-cond7.
9968 * tst-cond7.c: New file.
9970 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
9971 (condvar_cleanup): Get condvar address from the right place.
9973 * atomic.h: Correct definitions of atomic_full_barrier,
9974 atomic_read_barrier, atomic_write_barrier.
9976 * old_pthread_cond_broadcast.c: Make memory allocate and initialization
9978 * old_pthread_cond_signal.c: Likewise.
9979 * old_pthread_cond_timedwait.c: Likewise.
9980 * old_pthread_cond_wait.c: Likewise.
9982 2003-01-03 Jakub Jelinek <jakub@redhat.com>
9984 * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
9986 2003-01-03 Ulrich Drepper <drepper@redhat.com>
9988 * pthreadP.h (pthread_cond_2_0_t): New type.
9989 (struct pthread_functions): Use new type for 2.0 condvar callbacks.
9990 Use new type for the 2.0 condvar function prototypes.
9991 * forward.c: Use pthread_cond_2_0_t for 2.0 condvar functions.
9992 * old_pthread_cond_init.c: Use pthread_cond_2_0_t for condvar
9994 * old_pthread_cond_destroy.c: Likewise.
9995 * old_pthread_cond_broadcast.c: Likewise. Lock appropriately.
9996 * old_pthread_cond_signal.c: Likewise.
9997 * old_pthread_cond_timedwait.c: Likewise.
9998 * old_pthread_cond_wait.c: Likewise.
10000 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
10001 (__pthread_cond_wait): Don't save cancellation mode and seq value
10004 * herrno.c (__h_errno_location): Don't define as weak.
10006 2003-01-02 Jakub Jelinek <jakub@redhat.com>
10008 * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
10009 pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
10010 and pthread_cond_wait.
10011 * old_pthread_cond_broadcast.c (__old_pthread_cond_broadcast):
10013 (__pthread_cond_broadcast_2_0): ... this.
10014 * old_pthread_cond_destroy.c (__old_pthread_cond_destroy):
10016 (__pthread_cond_destroy_2_0): ... this.
10017 * old_pthread_cond_init.c (__old_pthread_cond_init):
10019 (__pthread_cond_init_2_0): ... this.
10020 * old_pthread_cond_signal.c (__old_pthread_cond_signal):
10022 (__pthread_cond_signal_2_0): ... this.
10023 * old_pthread_cond_wait.c (__old_pthread_cond_wait):
10025 (__pthread_cond_wait_2_0): ... this.
10026 * pthread_cond_destroy.c: Include shlib-compat.h.
10027 (pthread_cond_destroy): Change strong_alias into versioned_symbol.
10028 * pthread_cond_init.c: Include shlib-compat.h.
10029 (pthread_cond_init): Change strong_alias into versioned_symbol.
10030 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_cond_*
10031 fields to ptr___pthread_cond_* and add ptr___pthread_cond_*_2_0
10033 (__pthread_cond_broadcast_2_0, __pthread_cond_destroy_2_0,
10034 __pthread_cond_init_2_0, __pthread_cond_signal_2_0,
10035 __pthread_cond_wait_2_0): New prototypes.
10036 (__old_pthread_cond_broadcast, __old_pthread_cond_destroy,
10037 __old_pthread_cond_init, __old_pthread_cond_signal,
10038 __old_pthread_cond_wait): Removed.
10039 * init.c: Include shlib-compat.h.
10040 (pthread_functions): Guard ptr___pthread_attr_init_2_0
10041 initialization with SHLIB_COMPAT (GLIBC_2_0, GLIBC_2_1).
10042 Rename ptr_pthread_cond_* to ptr___pthread_cond_*, initialize
10043 ptr___pthread_cond_*_2_0 fields.
10044 * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
10045 pthread_cond_*@GLIBC_2.0 compatibility symbols.
10047 * sysdeps/pthread/sigaction.c (SIGCANCEL): Only define if
10048 LIBC_SIGACTION was not yet defined.
10049 [!defined LIBC_SIGACTION]: Define LIBC_SIGACTION, #include self.
10050 [!defined LIBC_SIGACTION] (__sigaction): New function and
10052 [!defined LIBC_SIGACTION] (sigaction): New weak_alias.
10053 [defined LIBC_SIGACTION]: #include_next <sigaction.c>.
10055 2003-01-02 Jakub Jelinek <jakub@redhat.com>
10057 * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
10059 2003-01-02 Ulrich Drepper <drepper@redhat.com>
10061 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
10062 New, larger type definition.
10063 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: New condvar
10065 * Versions [libpthread]: Add definitions for new pthread_cond_*
10066 interfaces for version GLIBC_2.3.2.
10067 * pthread_cond_init.c: Update initialization for new type definition.
10068 * Makefile (libpthread-routines): Remove pthread_cond_wait,
10069 pthread_cond_timedwait, pthread_cond_signal, and
10070 pthread_cond_broadcast. Add old_pthread_cond_init,
10071 old_pthread_cond_destroy, old_pthread_cond_wait,
10072 old_pthread_cond_timedwait, old_pthread_cond_signal, and
10073 old_pthread_cond_broadcast.
10074 * old_pthread_cond_broadcast.c: New file.
10075 * old_pthread_cond_destroy.c: New file.
10076 * old_pthread_cond_init.c: New file.
10077 * old_pthread_cond_signal.c: New file.
10078 * old_pthread_cond_timedwait.c: New file.
10079 * old_pthread_cond_wait.c: New file.
10080 * pthreadP.h: Add prototypes for the compatibility interfaces.
10082 * pthread_cond_destroy.c: Don't include <errno.h>.
10084 2003-01-01 Ulrich Drepper <drepper@redhat.com>
10086 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Avoid
10087 unnecessary zero offset when addressing MUTEX.
10089 2002-12-31 Ulrich Drepper <drepper@redhat.com>
10091 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
10093 * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
10094 for __register_atfork.
10096 2002-12-31 Jakub Jelinek <jakub@redhat.com>
10098 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use __ASSEMBLER__
10099 instead of ASSEMBLER test macro.
10101 * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
10102 __libc_current_sigrtmax): Add libc_hidden_def.
10104 * sysdeps/pthread/list.h: Remove assert.h include.
10106 2002-12-31 Ulrich Drepper <drepper@redhat.com>
10108 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Use
10109 __pthread_initialize_minimal_internal not
10110 __pthread_initialize_minimal.
10112 2002-12-30 Ulrich Drepper <drepper@redhat.com>
10114 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Mark
10115 __pthread_initialize_minimal as hidden.
10117 * init.c (__pthread_initialize_minimal_internal): Don't mark as
10120 2002-12-31 Jakub Jelinek <jakub@redhat.com>
10122 * Makefile ($(inst_libdir)/libpthread.so): Depend on
10123 $(common-objpfx)format.lds, include that into the output script.
10125 (extra-B-pthread.so): Change linuxthreads/ into nptl/.
10127 2002-12-28 Andreas Jaeger <aj@suse.de>
10129 * sysdeps/unix/sysv/linux/xstatconv.c (xstat_conv): Adjust for
10130 nsec resolution changes.
10131 (xstat64_conv): Likewise.
10132 (xstat32_conv): Likewise.
10133 * sysdeps/unix/sysv/linux/kernel_stat.h: Add nsec resolution for
10134 struct kernel_stat.
10135 * sysdeps/unix/sysv/linux/bits/stat.h: Add nsec resolution for
10136 structs stat and stat64.
10137 * time/time.h (__timespec_defined): Define for __USE_MISC.
10138 * io/sys/stat.h [__USE_MISC]: Define __need_timespec for struct stat.
10140 2002-12-30 Jakub Jelinek <jakub@redhat.com>
10142 * forward.c (FORWARD2): Renamed from FORWARD3. Remove unused export
10144 (pthread_attr_init_2_0, pthread_attr_init_2_1): Use FORWARD macro.
10145 (pthread_exit): Use strong_alias to avoid warnings.
10146 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_exit
10147 and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
10148 ptr___pthread_attr_init_2_*.
10149 * init.c (pthread_functions): Adjust.
10151 2002-12-29 Ulrich Drepper <drepper@redhat.com>
10153 * forward.c: Make all functions available by default again. It
10154 caused too much trouble.
10156 * pt-siglongjmp.c: Removed.
10158 2002-12-28 Jakub Jelinek <jakub@redhat.com>
10160 * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
10161 (SYSINFO_OFFSET, MULTIPLE_THREADS_OFFSET): Remove.
10162 * sysdeps/i386/Makefile: New file.
10163 * sysdeps/i386/tcb-offsets.sym: New file.
10164 * sysdeps/pthread/tcb-offsets.h: New file.
10165 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
10166 Remove MULTIPLE_THREADS_OFFSET and SYSINFO_OFFSET checks.
10168 * sysdeps/unix/sysv/linux/Versions [libc] (GLIBC_PRIVATE): Move
10169 __register_atfork...
10170 (GLIBC_2.3.2): ...here.
10172 2002-12-28 Ulrich Drepper <drepper@redhat.com>
10174 * sysdeps/pthread/pthread.h: Mark pthread_attr_getstackaddr and
10175 pthread_attr_setstackaddr with __attribute_deprecated__.
10177 2002-12-27 Jakub Jelinek <jakub@redhat.com>
10179 * pt-system.c (system): Remove cancellation handling.
10180 * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
10181 cancellation routines.
10183 2002-12-28 Ulrich Drepper <drepper@redhat.com>
10185 * descr.h: Include <dl-sysdep.h>.
10186 (struct pthread): Move header.data.list to the back of the struct.
10187 * sysdeps/i386/tls.h (tcbhead_t): Move list to the back of the struct.
10188 (MULTIPLE_THREADS_OFFSET): Adjust offset.
10189 (SYSINFO_OFFSEET): Likewise.
10191 2002-12-27 Jakub Jelinek <jakub@redhat.com>
10193 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h (USE_DL_SYSINFO):
10195 (DL_SYSINFO_DEFAULT): Cast to uintptr_t to avoid warnings.
10196 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h (NEED_DL_SYSINFO,
10197 DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION): Define.
10198 (USE_DL_SYSINFO): Undef.
10200 2002-12-22 Jakub Jelinek <jakub@redhat.com>
10202 * Makefile (tests-reverse): Use $(objpfx)../libc.so instead of
10203 $(common-objpfx)libc.so.
10204 * tst-cancel4.c (tf_write, tf_writev): Increase buf sizes so that
10205 it is bigger than pipe buffer size even on arches with bigger
10207 (tf_usleep): Cast usleep argument to useconds_t to avoid warnings.
10209 2002-12-25 Ulrich Drepper <drepper@redhat.com>
10211 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Implement
10212 correct errno access for case that USE___THREAD is not defined.
10214 2002-12-24 Ulrich Drepper <drepper@redhat.com>
10216 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Add missing #endif.
10217 Patch by Marijn Ros <marijn@mad.scientist.com>.
10219 2002-12-22 Roland McGrath <roland@redhat.com>
10221 * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
10223 2002-12-20 Ulrich Drepper <drepper@redhat.com>
10225 * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_inexpensive): Define.
10227 2002-12-19 Ulrich Drepper <drepper@redhat.com>
10229 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Don't define
10230 NEED_DL_SYSINFO since no processor < i686 had the sysenter opcode.
10231 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: New file.
10233 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Use ENTER_KERNEL instead
10235 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
10236 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Likewise.
10237 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Likewise.
10238 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
10239 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
10240 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Likewise.
10241 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Likewise.
10242 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
10244 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add support for using
10246 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
10248 * sysdeps/i386/tls.h: Unconditionally include <dl-sysdep.h>.
10250 * allocatestack.c (allocate_stack) [NEED_DL_SYSINFO]: Set sysinfo
10252 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Check
10253 that sysinfo is properly initialized.
10254 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define RTLD_PRIVATE_ERRNO
10255 to 1 only for ld.so.
10257 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
10258 RTLD_CORRECT_DYNAMIC_WEAK.
10260 2002-12-19 Jakub Jelinek <jakub@redhat.com>
10262 * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
10263 Use return 0 as 6th argument to FORWARD4.
10264 * pthread_equal.c: Include pthreadP.h instead of pthread.h.
10266 2002-12-18 Ulrich Drepper <drepper@redhat.com>
10268 * descr.h (struct pthread) [NEED_DL_SYSINFO]: Add sysinfo member.
10269 * sysdeps/i386/tls.h (tcbhead_t): Add sysinfo member.
10270 Define SYSINFO_OFFSEET if NEED_DL_SYSINFO is defined.
10271 (INIT_SYSINFO): New #define.
10272 (TLS_TP_INIT): Use INIT_SYSINFO.
10273 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
10274 At test to make sure SYSINFO_OFFSET value is correct.
10275 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
10277 2002-12-18 Jakub Jelinek <jakub@redhat.com>
10279 * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
10280 * sysdeps/unix/sysv/linux/raise.c (gsignal): Add weak alias to raise.
10281 * Versions [libc: GLIBC_2.0]: Add pthread_attr_init.
10282 [libpthread: GLIBC_2.1]: Remove __pthread_rwlock_init,
10283 __pthread_rwlock_destroy, __pthread_rwlock_rdlock,
10284 __pthread_rwlock_wrlock, __pthread_rwlock_unlock,
10285 __pthread_rwlock_tryrdlock and __pthread_rwlock_trywrlock.
10287 2002-12-18 Ulrich Drepper <drepper@redhat.com>
10289 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use ENTER_KERNEL
10290 macro instead of using int $0x80 directly.
10292 * sysdeps/pthread/bits/stdio-lock.h: New file.
10293 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: New file.
10294 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: New file.
10295 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: New file.
10296 * Makefile (routines): Add libc-lowlevelmutex.
10298 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Remove
10299 __i686.get_pc_thunk.dx.
10301 2002-12-17 Jakub Jelinek <jakub@redhat.com>
10303 * Makefile (libpthread-shared-only-routines): Add pt-allocrtsig.
10304 (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
10305 ($(objpfx)tst-cancel-wrappers.out): New rule.
10306 * tst-cancel-wrappers.sh: New test.
10307 * tst-locale1.c: Include signal.h.
10308 (uselocale): Test static linking of __libc_current_sigrt*.
10310 2002-12-17 Ulrich Drepper <drepper@redhat.com>
10312 * Makefile (tests): Add tst-cancel6.
10313 * tst-cancel6.c: New file
10315 2002-12-17 Jakub Jelinek <jakub@redhat.com>
10317 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
10318 Define meaningfully for assembler as well.
10319 * pthreadP.h (struct pthread_functions): Remove
10320 ptr_pthread_attr_init field. Add ptr_pthread_attr_init_2_0
10321 and ptr_pthread_attr_init_2_1 fields.
10322 * init.c (pthread_functions): Initialize ptr_pthread_attr_init_2_0
10323 and ptr_pthread_attr_init_2_1 instead of ptr_pthread_attr_init.
10324 * forward.c (FORWARD4): Renamed from FORWARD3. Add export argument.
10325 (FORWARD3): Define using FORWARD4.
10326 (pthread_attr_init): Provide both @GLIBC_2.0 and @@GLIBC_2.1
10328 * pt-system.c: Remove duplicate stdlib.h include.
10330 2002-12-16 Ulrich Drepper <drepper@redhat.com>
10332 * sem_init.c: Define sem_init@GLIBC_2.0.
10333 * sem_destroy.c: Define sem_destroy@GLIBC_2.0.
10334 * sem_getvalue.c: Define sem_getvalue@GLIBC_2.0.
10336 * flockfile.c: Moved to...
10337 * sysdeps/pthread/flockfile.c: ...here. New file.
10338 * funlockfile.c: Moved to...
10339 * sysdeps/pthread/funlockfile.c: ...here. New file.
10340 * ftrylockfile.c: Moved to...
10341 * sysdeps/pthread/ftrylockfile.c: ...here. New file.
10343 2002-12-16 Jakub Jelinek <jakub@redhat.com>
10345 * libc-cancellation.c: Guard both function with
10346 #if !defined NOT_IN_libc.
10347 * Makefile (libpthread-routines): Use ptw-, not pt- prefix for the
10348 automatically provided pthread wrappers.
10349 * pthreadP.h (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define to
10350 CANCEL_* if IS_IN_libpthread and to dummy versions if not in libc
10352 * pt-open.c: Removed.
10353 * pt-fcntl.c: Removed.
10354 * pt-fsync.c: Removed.
10355 * pt-lseek.c: Removed.
10356 * pt-msgrcv.c: Removed.
10357 * pt-msgsnd.c: Removed.
10358 * pt-msync.c: Removed.
10359 * pt-nanosleep.c: Removed.
10360 * pt-open64.c: Removed.
10361 * pt-pause.c: Removed.
10362 * pt-pread.c: Removed.
10363 * pt-pread64.c: Removed.
10364 * pt-pwrite.c: Removed.
10365 * pt-pwrite64.c: Removed.
10366 * pt-read.c: Removed.
10367 * pt-recv.c: Removed.
10368 * pt-recvfrom.c: Removed.
10369 * pt-recvmsg.c: Removed.
10370 * pt-send.c: Removed.
10371 * pt-sendto.c: Removed.
10372 * pt-sigtimedwait.c: Removed.
10373 * pt-sigwait.c: Removed.
10374 * pt-wait.c: Removed.
10375 * pt-waitpid.c: Removed.
10376 * pt-write.c: Removed.
10377 * pt-accept.c: Removed.
10378 * pt-close.c: Removed.
10379 * pt-connect.c: Removed.
10380 * pt-lseek64.c: Removed.
10381 * pt-sendmsg.c: Removed.
10382 * pt-tcdrain.c: Removed.
10384 2002-12-15 Ulrich Drepper <drepper@redhat.com>
10386 * init.c (__pthread_initialize_minimal_internal): Renamed from
10387 __pthread_initialize_minimal. Make old name an alias. This
10388 converts a normal relocation into a relative relocation.
10390 * pt-fcntl.c (__fcntl): Use fcntl64 syscall, not fcntl.
10392 * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
10393 readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
10394 * Makefile (libpthread-routines): Remove pt-creat, pt-poll,
10395 pt-pselect, pt-readv, pt-select, pt-sigpause, pt-sigsuspend,
10396 pt-sigwaitinfo, pt-waitid, and pt-writev.
10397 * pt-creat.c: Removed.
10398 * pt-poll.c: Removed.
10399 * pt-pselect.c: Removed.
10400 * pt-readv.c: Removed.
10401 * pt-select.c: Removed.
10402 * pt-sigpause.c: Removed.
10403 * pt-sigsuspend.c: Removed.
10404 * pt-sigwaitinfo.c: Removed.
10405 * pt-waitid.c: Removed.
10406 * pt-writev.c: Removed.
10408 * init.c (pthread_functions): New variable.
10409 (__pthread_initialize_minimal): Pass pointer to pthread_functions
10410 (or NULL) to __libc_pthread_init.
10411 * forward.c: Rewrite to use __libc:pthread_functions array to get
10412 function addresses.
10413 * sysdeps/unix/sysv/linux/fork.h: Remove __libc_pthread_init
10415 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
10416 Take new parameter. Copy content of variable pointed to by it
10417 to __libc_pthread_init.
10419 * pthreadP.h (struct pthread_functions): New type.
10420 (__libc_pthread_init): Declare.
10422 * pthread_attr_destroy.c: Add namespace protected alias.
10423 * pthread_attr_getdetachstate.c: Likewise.
10424 * pthread_attr_getinheritsched.c: Likewise.
10425 * pthread_attr_getschedparam.c: Likewise.
10426 * pthread_attr_getschedpolicy.c: Likewise.
10427 * pthread_attr_getscope.c: Likewise.
10428 * pthread_attr_setdetachstate.c: Likewise.
10429 * pthread_attr_setinheritsched.c: Likewise.
10430 * pthread_attr_setschedparam.c: Likewise.
10431 * pthread_attr_setschedpolicy.c: Likewise.
10432 * pthread_attr_setscope.c: Likewise.
10433 * pthread_cond_broadcast.c: Likewise.
10434 * pthread_cond_destroy.c: Likewise.
10435 * pthread_cond_init.c: Likewise.
10436 * pthread_cond_signal.c: Likewise.
10437 * pthread_cond_wait.c: Likewise.
10438 * pthread_condattr_destroy.c: Likewise.
10439 * pthread_condattr_init.c: Likewise.
10440 * pthread_equal.c: Likewise.
10441 * pthread_exit.c: Likewise.
10442 * pthread_getschedparam.c: Likewise.
10443 * pthread_self.c: Likewise.
10444 * pthread_setcancelstate.c: Likewise.
10445 * pthread_setschedparam.c: Likewise.
10446 * pthread_mutex_destroy.c: Likewise.
10447 * pthread_mutex_init.c: Likewise.
10448 * pthreadP.h: Add prototypes for the aliases.
10450 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Set
10451 multiple_threads member in correct TCB to 1.
10453 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define
10454 SINGLE_THREAD_P. If in libc or libpthread examine multiple_thread
10455 member of thread decriptor, otherwise return unconditionally 1.
10457 2002-12-14 Ulrich Drepper <drepper@redhat.com>
10459 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Changes folded into the
10460 regular Linux version. Remove file.
10461 * sysdeps/unix/sysv/linux/connect.S: Likewise. Remove file.
10462 * sysdeps/unix/sysv/linux/llseek.c: Likewise. Remove file.
10463 * sysdeps/unix/sysv/linux/msgrcv.c: Likewise. Remove file.
10464 * sysdeps/unix/sysv/linux/msgsnd.c: Likewise. Remove file.
10465 * sysdeps/unix/sysv/linux/open64.c: Likewise. Remove file.
10466 * sysdeps/unix/sysv/linux/poll.c: Likewise. Remove file.
10467 * sysdeps/unix/sysv/linux/pread.c: Likewise. Remove file.
10468 * sysdeps/unix/sysv/linux/pread64.c: Likewise. Remove file.
10469 * sysdeps/unix/sysv/linux/pselect.c: Likewise. Remove file.
10470 * sysdeps/unix/sysv/linux/pwrite.c: Likewise. Remove file.
10471 * sysdeps/unix/sysv/linux/pwrite64.c: Likewise. Remove file.
10472 * sysdeps/unix/sysv/linux/readv.c: Likewise. Remove file.
10473 * sysdeps/unix/sysv/linux/recv.S: Likewise. Remove file.
10474 * sysdeps/unix/sysv/linux/recvfrom.S: Likewise. Remove file.
10475 * sysdeps/unix/sysv/linux/recvmsg.S: Likewise. Remove file.
10476 * sysdeps/unix/sysv/linux/send.S: Likewise. Remove file.
10477 * sysdeps/unix/sysv/linux/sendmsg.S: Likewise. Remove file.
10478 * sysdeps/unix/sysv/linux/sendto.S: Likewise. Remove file.
10479 * sysdeps/unix/sysv/linux/sigpause.c: Likewise. Remove file.
10480 * sysdeps/unix/sysv/linux/sigsuspend.c: Likewise. Remove file.
10481 * sysdeps/unix/sysv/linux/sigtimedwait.c: Likewise. Remove file.
10482 * sysdeps/unix/sysv/linux/sigwait.c: Likewise. Remove file.
10483 * sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise. Remove file.
10484 * sysdeps/unix/sysv/linux/system.c: Likewise. Remove file.
10485 * sysdeps/unix/sysv/linux/tcdrain.c: Likewise. Remove file.
10486 * sysdeps/unix/sysv/linux/wait.c: Likewise. Remove file.
10487 * sysdeps/unix/sysv/linux/waitid.c: Likewise. Remove file.
10488 * sysdeps/unix/sysv/linux/waitpid.c: Likewise. Remove file.
10489 * sysdeps/unix/sysv/linux/writev.c: Likewise. Remove file.
10490 * sysdeps/unix/sysv/linux/i386/fcntl.c: Likewise. Remove file.
10492 2002-12-14 Jakub Jelinek <jakub@redhat.com>
10494 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
10495 * sysdeps/unix/sysv/linux/open.c: Removed.
10496 * sysdeps/unix/sysv/linux/fsync.c: Removed.
10497 * sysdeps/unix/sysv/linux/lseek.c: Removed.
10498 * sysdeps/unix/sysv/linux/msync.c: Removed.
10499 * sysdeps/unix/sysv/linux/read.c: Removed.
10500 * sysdeps/unix/sysv/linux/close.c: Removed.
10501 * sysdeps/unix/sysv/linux/creat.c: Removed.
10502 * sysdeps/unix/sysv/linux/nanosleep.c: Removed.
10503 * sysdeps/unix/sysv/linux/pause.c: Removed.
10504 * sysdeps/unix/sysv/linux/select.c: Removed.
10505 * sysdeps/unix/sysv/linux/write.c: Removed.
10507 2002-12-14 Ulrich Drepper <drepper@redhat.com>
10509 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Check multiple_threads
10510 element in TCB to see whether locking is needed.
10512 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Check that
10513 MULTIPLE_THREADS_OFFSET value is correct.
10515 * sysdeps/unix/sysv/linux/close.c: New file.
10516 * sysdeps/unix/sysv/linux/connect.S: New file.
10517 * sysdeps/unix/sysv/linux/creat.c: New file.
10518 * sysdeps/unix/sysv/linux/fsync.c: New file.
10519 * sysdeps/unix/sysv/linux/llseek.c: New file.
10520 * sysdeps/unix/sysv/linux/lseek.c: New file.
10521 * sysdeps/unix/sysv/linux/msgrcv.c: New file.
10522 * sysdeps/unix/sysv/linux/msgsnd.c: New file.
10523 * sysdeps/unix/sysv/linux/msync.c: New file.
10524 * sysdeps/unix/sysv/linux/nanosleep.c: New file.
10525 * sysdeps/unix/sysv/linux/open.c: New file.
10526 * sysdeps/unix/sysv/linux/open64.c: New file.
10527 * sysdeps/unix/sysv/linux/pause.c: New file.
10528 * sysdeps/unix/sysv/linux/poll.c: New file.
10529 * sysdeps/unix/sysv/linux/pread.c: New file.
10530 * sysdeps/unix/sysv/linux/pread64.c: New file.
10531 * sysdeps/unix/sysv/linux/pselect.c: New file.
10532 * sysdeps/unix/sysv/linux/pwrite.c: New file.
10533 * sysdeps/unix/sysv/linux/pwrite64.c: New file.
10534 * sysdeps/unix/sysv/linux/readv.c: New file.
10535 * sysdeps/unix/sysv/linux/recv.S: New file.
10536 * sysdeps/unix/sysv/linux/recvfrom.S: New file.
10537 * sysdeps/unix/sysv/linux/recvmsg.S: New file.
10538 * sysdeps/unix/sysv/linux/select.c: New file.
10539 * sysdeps/unix/sysv/linux/send.S: New file.
10540 * sysdeps/unix/sysv/linux/sendmsg.S: New file.
10541 * sysdeps/unix/sysv/linux/sendto.S: New file.
10542 * sysdeps/unix/sysv/linux/sigpause.c: New file.
10543 * sysdeps/unix/sysv/linux/sigsuspend.c: New file.
10544 * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
10545 * sysdeps/unix/sysv/linux/sigwait.c: New file.
10546 * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
10547 * sysdeps/unix/sysv/linux/system.c: New file.
10548 * sysdeps/unix/sysv/linux/tcdrain.c: New file.
10549 * sysdeps/unix/sysv/linux/wait.c: New file.
10550 * sysdeps/unix/sysv/linux/waitid.c: New file.
10551 * sysdeps/unix/sysv/linux/waitpid.c: New file.
10552 * sysdeps/unix/sysv/linux/writev.c: New file.
10553 * sysdeps/unix/sysv/linux/i386/fcntl.c: New file.
10555 * pt-readv.c: Fix comment.
10557 2002-12-14 Jakub Jelinek <jakub@redhat.com>
10559 * tst-cleanup1.c: Include stdlib.h.
10561 * tst-cancel5.c: New test.
10562 * Makefile (tests): Add tst-cancel5.
10563 (tst-cancel5): Link against libc.so libpthread.so in that order.
10565 2002-12-13 Ulrich Drepper <drepper@redhat.com>
10567 * forward.c (test_loaded): Prevent recursive calls.
10569 * Makefile (routines): Add libc-cancellation.
10570 * libc-cancellation.c: New file.
10571 * descr.h (struct pthread): Add multiple_threads field.
10572 * allocatestack.c (allocate_stack): Initialize multiple_header field of
10573 new thread descriptor to 1.
10574 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread):
10575 Initialize multiple_thread field after successful thread creation.
10576 * cancellation.c (__do_cancel): Move to pthreadP.h.
10577 (__pthread_enable_asynccancel): Remove parameter from __do_cancel call.
10578 (__pthread_disable_asynccancel): Add internal_function attribute.
10579 * init.c (sigcancel_handler): Remove parameter from __do_cancel call.
10580 * pthread_setcancelstate.c: Likewise.
10581 * pthread_setcanceltype.c: Likewise.
10582 * pthread_exit.c: Likewise.
10583 * pthreadP.h (CANCELLATION_P): Likewise.
10584 (__do_cancel): Define as static inline.
10585 (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): New #defines.
10586 (__libc_enable_asynccancel, __libc_disable_asynccancel): New
10588 * sysdeps/i386/tls.h (tcbhead_t): Add list and multiple_threads
10589 fields. Define MULTIPLE_THREADS_OFFSET.
10590 * sysdeps/pthread/bits/libc-lock.h: Remove __libc_locking_needed
10592 * sysdeps/unix/sysv/linux/accept.S: New file.
10593 * sysdeps/unix/sysv/linux/read.c: New file.
10594 * sysdeps/unix/sysv/linux/write.c: New file.
10595 * sysdeps/unix/sysv/linux/i386/pt-socket.S: New file.
10596 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove definition and
10597 initialization of __libc_locking_needed.
10598 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't use
10599 __libc_locking_needed, use multiple_threads field in TCB.
10600 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
10602 2002-12-12 Ulrich Drepper <drepper@redhat.com>
10604 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: Use i486
10606 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: Likewise.
10608 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Correct
10609 access to __libc_locking_needed for PIC.
10611 2002-12-12 Jakub Jelinek <jakub@redhat.com>
10613 * sysdeps/pthread/bits/libc-lock.h (__libc_locking_needed): Only
10614 declare for libc.so.
10615 (__libc_lock_init, __libc_lock_init_recursive): Change into comma
10617 (__libc_lock_lock): Put into statement expression.
10618 (__libc_lock_unlock): Remove trailing semicolon.
10619 * sysdeps/unix/sysv/linux/fork.h (__libc_pthread_init): Fix typo.
10621 2002-12-12 Roland McGrath <roland@redhat.com>
10623 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use asm operand with
10624 "m" constraint to refer to __libc_locking_needed. Declare it here.
10626 2002-12-12 Ulrich Drepper <drepper@redhat.com>
10628 * sysdeps/unix/sysv/linux/fork-gen.c: Renamed to...
10629 * sysdeps/unix/sysv/linux/libc_pthread_init.c: ...this.
10630 Initialize __libc_locking_needed.
10631 * init.c (__pthread_initialize_minimal): Call __libc_pthread_init
10632 instead of __register_pthread_fork_handler.
10633 * sysdeps/pthread/bits/libc-lock.h: Declare __libc_locking_needed.
10634 * sysdeps/unix/sysv/linux/Makefile (sysdep_routimes): Replace
10635 fork-gen with libc_pthread_init.
10636 * sysdeps/unix/sysv/linux/Versions: Use __libc_pthread_init instead
10637 of __register_pthread_fork_handler.
10638 * sysdeps/unix/sysv/linux/fork.h: Declare __libc_pthread_init instead
10639 of __register_pthread_fork_handler.
10640 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use
10641 __libc_locking_needed to determine whether lock prefix can be avoided.
10642 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
10644 2002-12-11 Ulrich Drepper <drepper@redhat.com>
10646 * Makefile (tests): Add tst-cleanup1.
10647 * tst-cleanup1.c: New file.
10648 * cancellation.c (__cleanup_thread): Removed.
10649 (__do_cancel): Remove call to __cleanup_thread.
10650 * pthreadP.h: Remove __cleanup_thread prorotype.
10652 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
10653 Remember function and argument even if cancellation handler
10654 function is not available.
10655 (__libc_cleanup_region_end): Execute registered function directly if
10656 pthread functions are not available.
10657 (__libc_cleanup_end): Likewise.
10659 * init.c (__pthread_initialize_minimal): Fix initialization in
10660 static lib by preventing gcc from being too clever.
10662 2002-12-10 Ulrich Drepper <drepper@redhat.com>
10664 * init.c (__pthread_initialize_minimal): Remove unneccesary
10667 * Makefile (tests): We can run tst-locale2 now.
10669 2002-12-09 Ulrich Drepper <drepper@redhat.com>
10671 * Versions: Remove duplicated sigwait entry.
10673 2002-12-08 Ulrich Drepper <drepper@redhat.com>
10675 * pthreadP.h: Enable pthread_cleanup_{push,pop} optimizations only
10678 * pt-fcntl.c (__fcntl): Initialize oldtype to avoid warning.
10680 * pthreadP.h: Declare __pthread_enable_asynccancel and
10681 __pthread_disable_asynccancel.
10682 (CANCEL_ASYNC): Use __pthread_enable_asynccancel.
10683 (CANCEL_RESET): Use __pthread_disable_asynccancel.
10684 * cancellation.c (__pthread_enable_asynccancel): New function.
10685 (__pthread_disable_asynccancel): New function.
10686 * pt-accept.c: Adjust for CANCEL_ASYNC and CANCEL_RESET change.
10687 * pt-close.c: Likewise.
10688 * pt-connect.c: Likewise.
10689 * pt-creat.c: Likewise.
10690 * pt-fcntl.c: Likewise.
10691 * pt-fsync.c: Likewise.
10692 * pt-lseek.c: Likewise.
10693 * pt-lseek64.c: Likewise.
10694 * pt-msgrcv.c: Likewise.
10695 * pt-msgsnd.c: Likewise.
10696 * pt-msync.c: Likewise.
10697 * pt-nanosleep.c: Likewise.
10698 * pt-open.c: Likewise.
10699 * pt-open64.c: Likewise.
10700 * pt-pause.c: Likewise.
10701 * pt-poll.c: Likewise.
10702 * pt-pread.c: Likewise.
10703 * pt-pread64.c: Likewise.
10704 * pt-pselect.c: Likewise.
10705 * pt-pwrite.c: Likewise.
10706 * pt-pwrite64.c: Likewise.
10707 * pt-read.c: Likewise.
10708 * pt-readv.c: Likewise.
10709 * pt-recv.c: Likewise.
10710 * pt-recvfrom.c: Likewise.
10711 * pt-recvmsg.c: Likewise.
10712 * pt-select.c: Likewise.
10713 * pt-send.c: Likewise.
10714 * pt-sendmsg.c: Likewise.
10715 * pt-sendto.c: Likewise.
10716 * pt-sigpause.c: Likewise.
10717 * pt-sigsuspend.c: Likewise.
10718 * pt-sigtimedwait.c: Likewise.
10719 * pt-sigwait.c: Likewise.
10720 * pt-sigwaitinfo.c: Likewise.
10721 * pt-system.c: Likewise.
10722 * pt-tcdrain.c: Likewise.
10723 * pt-wait.c: Likewise.
10724 * pt-waitid.c: Likewise.
10725 * pt-waitpid.c: Likewise.
10726 * pt-write.c: Likewise.
10727 * pt-writev.c: Likewise.
10728 * pthread_join.c: Likewise.
10729 * pthread_timedjoin.c: Likewise.
10731 * pt-sigpause.c (sigsuspend): Call __sigsuspend.
10732 (__xpg_sigpause): New function.
10733 * Versions (libpthread:GLIBC_2.3.2): Add __xpg_sigpause.
10735 2002-12-07 Ulrich Drepper <drepper@redhat.com>
10737 * Makefile (CFLAGS-ftrylockfile.c): Add -D_IO_MTSAFE_IO.
10739 * cleanup.c: Move declarations of _GI_pthread_cleanup_push and
10740 _GI_pthread_cleanup_pop to pthreadP.h.
10742 * ftrylockfile.c: Use _IO_lock_trylock instead of
10743 pthread_mutex_trylock.
10745 * pthreadP.h (CANCEL_ASYNC): Use __pthread_setcanceltype.
10746 (CANCEL_RESET): Likewise.
10747 (__pthread_setcanceltype_): Declare.
10748 (__pthread_mutex_lock_internal): Declare.
10749 (__pthread_mutex_unlock_internal): Declare.
10750 (__pthread_once_internal): Declare.
10751 (pthread_cleanup_push): Redefine using _GI_pthread_cleanup_push.
10752 (pthread_cleanup_pop): Redefine using _GI_pthread_cleanup_pop.
10754 * pthread_cond_timedwait.c: Use INTUSE is calls to pthread_mutex_lock
10755 and pthread_mutex_unlock.
10756 * pthread_cond_wait.c: Likewise.
10757 * pthread_mutex_lock.c: Use INTDEF to define alias if needed.
10758 * pthread_mutex_unlock.c: Likewise.
10760 * pthread_setcanceltype.c: Add additional alias
10761 __pthread_setcanceltype.
10763 * sem_unlink.c (sem_unlink): Use __pthread_once with INTDEF.
10764 * sem_open.c (sem_open): Likewise.
10765 Use __libc_open, __libc_write, and __libc_close instead of
10766 open, write, and close respectively.
10768 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_trylock_internal):
10769 Rewrite as statement expression since it must return a value.
10771 * pthread_cancel.c: Use __pthread_kill instead of pthread_kill.
10772 * sysdeps/unix/sysv/linux/pthread_kill.c: Define additional alias
10775 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Define additional
10776 alias __pthread_once_internal.
10778 * sysdeps/unix/sysv/linux/raise.c: Use libc_hidden_def for raise.
10780 2002-12-06 Ulrich Drepper <drepper@redhat.com>
10782 * Makefile (tests): Add tst-stdio1 and tst-stdio2.
10783 * tst-stdio1.c: New file.
10784 * tst-stdio2.c: New file.
10786 * init.c (__pthread_initialize_minimal): Correct INIT_LIST_HEAD use.
10788 * Makefile (tests): Comment out tst-locale2 for now.
10789 (CFLAGS-flockfile.c, CFLAGS-funlockfile.c): Define to -D_IO_MTSAFE_IO.
10791 * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-fork.c to
10793 * sysdeps/unix/sysv/linux/fork.c: Include <bits/stdio-lock.h>.
10794 Use _IO_lock_init instead of explicit assignment.
10796 * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
10797 Define __libc_lock_* and __libc_lock_recursive macros with
10798 lowlevellock macros, not pthread mutexes.
10800 * flockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_lock instead
10801 of pthread_mutex_lock.
10802 * funlockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_unlock
10803 instead of pthread_mutex_unlock.
10805 2002-12-06 Roland McGrath <roland@redhat.com>
10807 * allocatestack.c (__stack_user): Use uninitialized defn.
10808 * init.c (__pthread_initialize_minimal): Initialize it here.
10810 2002-12-05 Roland McGrath <roland@redhat.com>
10812 * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
10814 * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
10816 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Add
10817 missing & here too.
10819 2002-12-05 Ulrich Drepper <drepper@redhat.com>
10821 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
10823 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: New file.
10824 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: New file.
10825 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: New file.
10826 * sysdeps/pthread/bits/libc-lock.h: Use lowlevellock implementation
10827 for __libc_lock_* macros.
10828 * Makefile (routines): Add libc-lowlevellock.
10830 2002-10-09 Roland McGrath <roland@redhat.com>
10832 * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
10833 Under [__PIC__], call the function via the pointer fetched for
10834 comparison rather than a call by name that uses the PLT.
10835 (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
10836 (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
10837 (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
10838 (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
10839 (__libc_key_create, __libc_getspecific, __libc_setspecific): Use it.
10841 2002-12-04 Roland McGrath <roland@redhat.com>
10843 * forward.c (pthread_self): Use FORWARD3 macro to correct return type.
10845 * sysdeps/i386/td_ta_map_lwp2thr.c: Moved from ../nptl_db.
10846 * sysdeps/generic/td_ta_map_lwp2thr.c: New file.
10848 * pthread_create.c (start_thread): Add missing & on __nptl_last_event.
10850 2002-12-04 Ulrich Drepper <drepper@redhat.com>
10852 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Make pthread_t
10853 a completely opaque, non-integer type.
10854 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
10856 2002-12-05 Jakub Jelinek <jakub@redhat.com>
10858 * sysdeps/i386/tls.h: Include stdlib.h.
10859 * sysdeps/x86_64/tls.h: Likewise.
10861 2002-12-04 Ulrich Drepper <drepper@redhat.com>
10863 * Makefile (tests): Add tst-locale2.
10864 (tests-static): Likewise.
10865 * tst-locale2.c: New file.
10867 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Mark asms as
10868 volatile and add memory clobbers to lock operations.
10870 2002-12-03 Ulrich Drepper <drepper@redhat.com>
10872 * sysdeps/i386/i686/bits/atomic.h: Use i486 version.
10873 * sysdeps/i386/i486/bits/atomic.h: New file.
10874 * sysdeps/i386/i586/bits/atomic.h: New file.
10875 * sysdeps/i386/i686/pthread_spin_trylock.S: Define HAVE_CMOV and
10876 include i486 version.
10877 * sysdeps/i386/i486/pthread_spin_trylock.S: New file.
10878 * sysdeps/i386/i586/pthread_spin_trylock.S: New file.
10879 Patch by Marijn Ros <marijn@mad.scientist.com>.
10881 * allocatestack.c (get_cached_stack): Don't crash if we first
10882 found a stack with a larger size then needed.
10883 Reported by Hui Huang <hui.huang@sun.com>.
10885 * Makefile (tests): Add tst-sysconf.
10886 * tst-sysconf.c: New file.
10888 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine
10889 PTHREAD_THREADS_MAX.
10891 2002-12-02 Roland McGrath <roland@redhat.com>
10893 * pthreadP.h (__stack_user, __nptl_create_event, __nptl_death_event):
10894 Declare using hidden_proto instead of attribute_hidden, so there are
10895 non-.hidden static symbols for gdb to find.
10896 (__pthread_keys): Likewise.
10897 * events.c (__nptl_create_event, __nptl_death_event): Add hidden_def.
10898 * allocatestack.c (__stack_user): Likewise.
10899 * pthread_create.c (__pthread_keys): Likewise.
10900 (__nptl_threads_events, __nptl_last_event): Make these static instead
10902 * pthread_key_create.c (__pthread_pthread_keys_max,
10903 __pthread_pthread_key_2ndlevel_size): Renamed from __linuxthreads_*.
10905 2002-12-02 Ulrich Drepper <drepper@redhat.com>
10907 * Makefile (tests): Add tst-locale1. If buid-static is yes link
10909 * tst-locale1.c: New file.
10911 * pthread_cond_timedwait.c: Include <stdlib.h>.
10913 * Makefile (tests): Add tst-fork2 and tst-fork3.
10914 * tst-fork2.c: New file.
10915 * tst-fork3.c: New file.
10917 2002-11-28 Ulrich Drepper <drepper@redhat.com>
10919 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
10921 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
10922 require it to 200112L.
10924 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Use cmov
10925 instruction only if HAVE_CMOV is defined.
10926 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Define HAVE_CMOV.
10928 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: New file.
10930 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: New file.
10932 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: New file.
10934 * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: New file.
10936 2002-11-27 Ulrich Drepper <drepper@redhat.com>
10938 * sysdeps/x86_64/bits/atomic.h: New file.
10940 * sysdeps/i386/i686/bits/atomic.h: Fix asm syntax for 8- and
10943 * sysdeps/unix/sysv/linux/raise.c (raise): Use INTERNAL_SYSCALL if
10944 possible since gettid cannot fail.
10946 * sysdeps/x86_64/pthreaddef.h: New file.
10948 * sysdeps/i386/pthreaddef.h (gettid): Removed.
10950 * sysdeps/x86_64/pthread_spin_init.c: New file.
10951 * sysdeps/x86_64/pthread_spin_lock.c: New file.
10952 * sysdeps/x86_64/pthread_spin_trylock.c: New file.
10953 * sysdeps/x86_64/pthread_spin_unlock.c: New file.
10955 * sysdeps/i386/i686/pthread_spin_trylock.S (pthread_spin_trylock):
10956 Add missing lock prefix. Minute optimization.
10958 * tst-spin2.c (main): Also check successful trylock call.
10960 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use correct
10961 syscall. Fix typo in case INTERNAL_SYSCALL is not used.
10963 * sysdeps/i386/pthread_spin_destroy.c: Moved to...
10964 * sysdeps/pthread/pthread_spin_destroy.c: ...here. New file.
10966 * sysdeps/i386/pthread_sigmask.c: Removed. Use the generic code.
10967 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Return correct
10968 value in case of an error. Add support for INTERNAL_SYSCALL.
10970 * sysdeps/i386/pthread_sigmask.c (pthread_sigmask): Return correct
10971 value in case of an error.
10973 * sysdeps/x86_64/tls.h: New file.
10975 2002-11-26 Ulrich Drepper <drepper@redhat.com>
10977 * sysdeps/i386/tls.h (THREAD_GETMEM_NC): Change interface. It now
10978 takes the array member name and the index as parameters.
10979 (THREAD_SETMEM_NC): Likewise.
10980 * pthread_getspecific.c: Use new THREAD_GETMEM_NC interface.
10981 * pthread_setspecific.c: Use new THREAD_GETMEM_NC and THREAD_SETMEM_NC
10984 * sysdeps/i386/tls.h (THREAD_SETMEM): Use size of member element
10985 to decide which code to use.
10986 (THREAD_SETMEM_NC): Likewise.
10988 * allocatestack.c (queue_stack): Don't remove stack from list here.
10989 Do it in the caller. Correct condition to prematurely terminate
10990 loop to free stacks.
10991 (__deallocate_stack): Remove stack from list here.
10993 2002-11-26 Ulrich Drepper <drepper@redhat.com>
10995 * Makefile (tests): Add tst-stack1.
10996 * tst-stack1.c: New file.
10998 * allocatestack.c (allocate_stack): Initialize the TCB on a user
11001 * pthread_attr_getstack.c: Return bottom of the thread area.
11003 2002-11-25 Ulrich Drepper <drepper@redhat.com>
11005 * Makefile (libpthread-routines): Add pt-allocrtsig and
11006 pthread_kill_other_threads.
11007 * pt-allocrtsig.c: New file.
11008 * pthread_kill_other_threads.c: New file.
11009 * sysdeps/unix/sysv/linux/allocrtsig.c: Add additional aliases for
11010 all three functions.
11011 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
11013 * sysdeps/unix/sysv/linux/Versions (libc:GLIBC_PRIVATE): Export
11014 __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
11015 and __libc_allocate_rtsig_private.
11016 * Versions (libpthread): Export pthread_kill_other_threads_np,
11017 __libc_current_sigrtmin, and __libc_current_sigrtmax.
11019 2002-11-24 Ulrich Drepper <drepper@redhat.com>
11021 * allocatestack.c (allocate_stack): stackaddr in attribute points to
11022 the end of the stack. Adjust computations.
11023 When mprotect call fails dequeue stack and free it.
11024 * pthread_attr_setstack.c: Store top of the stack in stackaddr
11026 * pthread_getattr_np.c: Likewise.
11028 * descr.h (IS_DETACHED): Add some more parenthesis to prevent
11031 2002-11-23 Ulrich Drepper <drepper@redhat.com>
11033 * sysdeps/pthread/pthread.h (pthread_self): __THROW must come before
11034 attribute definitions. Patch by Luca Barbieri <ldb@ldb.ods.org>.
11036 2002-11-22 Ulrich Drepper <drepper@redhat.com>
11038 * pthread_getspecific.c: Optimize access to first 2nd-level array.
11039 * pthread_setspecific.c: Likewise.
11041 2002-11-21 Ulrich Drepper <drepper@redhat.com>
11043 * sysdeps/unix/sysv/linux/i386/createthread.c: Remove CLONE_ flags
11044 definitions. Get them from the official place.
11045 * sysdeps/unix/sysv/linux/i386/fork.c: Likewise.
11047 * sysdeps/unix/sysv/linux/i386/createthread.c: Update CLONE_* flags.
11048 Use new CLONE_ flags in clone() calls.
11050 * sysdeps/unix/sysv/linux/fork.c: Use ARCH_FORK to actually fork.
11051 * sysdeps/unix/sysv/linux/i386/fork.c: New file.
11053 * Versions: Add pthread_* functions for libc.
11054 * forward.c: New file.
11056 * sysdeps/pthread/Makefile (libpthread-sysdeps_routines): Add
11058 * herrno.c: New file.
11061 * Makefile (libpthread-routines): Remove sem_post, sem_wait,
11062 sem_trywait, and sem_timedwait. Add herrno and res.
11063 * sem_init.c: Don't initialize lock and waiters members.
11064 * sem_open.c: Likewise.
11065 * sem_post.c: Removed.
11066 * sem_wait.c: Removed.
11067 * sem_trywait.c: Removed.
11068 * sem_timedwait.c: Removed.
11069 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Complete rewrite.
11070 Includes full implementations of sem_post, sem_wait, sem_trywait,
11072 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Adjust
11073 for new implementation.
11074 * sysdeps/unix/sysv/linux/internaltypes.h (struct sem): Remove lock
11075 and waiters fields.
11077 * tst-sem3.c: Improve error message.
11078 * tst-signal3.c: Likewise.
11080 * init.c (__pthread_initialize_minimal): Use set_tid_address syscall
11081 to tell the kernel about the termination futex and to initialize tid
11082 member. Don't initialize main_thread.
11083 * descr.h (struct pthread): Remove main_thread member.
11084 * cancelllation.c (__do_cancel): Remove code handling main thread.
11085 The main thread is not special anymore.
11087 * allocatestack.c (__reclaim_stacks): Mark stacks as unused. Add
11088 size of the stacks to stack_cache_actsize.
11090 * pt-readv.c: Add missing "defined".
11091 * pt-sigwait.c: Likewise.
11092 * pt-writev.c: Likewise.
11094 2002-11-09 Ulrich Drepper <drepper@redhat.com>
11096 * Versions: Export __connect from libpthread.
11097 Patch by Luca Barbieri <ldb@ldb.ods.org>.
11099 * Makefile (libpthread-routines): Add pt-raise.
11100 * sysdeps/unix/sysv/linux/raise.c: New file.
11101 * sysdeps/unix/sysv/linux/pt-raise.c: New file.
11102 * sysdeps/generic/pt-raise.c: New file.
11104 * pthread_cond_init.c: Initialize all data elements of the condvar
11105 structure. Patch by Luca Barbieri <ldb@ldb.ods.org>.
11107 * pthread_attr_init.c: Actually implement 2.0 compatibility version.
11108 * pthread_create.c: Likewise.
11110 * Makefile (tests): Add tst-key1, tst-key2, tst-key3.
11111 * tst-key1.c: New file.
11112 * tst-key2.c: New file.
11113 * tst-key3.c: New file.
11115 * Versions: Export pthread_detach for version GLIBC_2.0.
11116 Reported by Saurabh Desai <sdesai@austin.ibm.com>.
11118 2002-11-08 Ulrich Drepper <drepper@redhat.com>
11120 * pthread_key_create.c: Terminate search after an unused key was found.
11121 Patch by Luca Barbieri <ldb@ldb.ods.org>.
11123 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Return zero.
11124 Patch by Luca Barbieri <ldb@ldb.ods.org>.
11126 2002-10-10 Ulrich Drepper <drepper@redhat.com>
11128 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Use slow generic
11129 dynamic lookup for errno in PIC.
11131 * allocatestack.c (get_cached_stack): Rearrange code slightly to
11132 release the stack lock as soon as possible.
11133 Call _dl_allocate_tls_init for TCB from the cache to re-initialize
11134 the static TLS block.
11135 (allocate_stack): Call _dl_allocate_tls_init for user-provided stack.
11137 * cancellation.c: Renamed from cancelation.c.
11138 * Makefile: Adjust accordingly.
11139 * pthreadP.h (CANCELLATION_P): Renamed from CANCELATION_P.
11140 * cleanup_defer.c: Use CANCELLATION_P.
11141 * pthread_testcancel.c: Likewise.
11142 * descr.h: Fix spelling in comments.
11143 * init.c: Likewise.
11144 * pthread_getattr_np.c: Likewise.
11145 * pthread_getschedparam.c: Likewise.
11146 * pthread_setschedparam.c: Likewise.
11147 * Versions: Likewise.
11149 * pt-pselect.c: New file.
11150 * Makefile (libpthread-routines): Add pt-pselect.
11151 * Versions: Add pselect.
11153 * tst-cancel4.c: New file.
11154 * Makefile (tests): Add tst-cancel4.
11156 2002-10-09 Ulrich Drepper <drepper@redhat.com>
11158 * pthread_mutex_lock.c: Always record lock ownership.
11159 * pthread_mutex_timedlock.c: Likewise.
11160 * pthread_mutex_trylock.c: Likewise.
11162 * pt-readv.c: New file.
11163 * pt-writev.c: New file.
11164 * pt-creat.c: New file.
11165 * pt-msgrcv.c: New file.
11166 * pt-msgsnd.c: New file.
11167 * pt-poll.c: New file.
11168 * pt-select.c: New file.
11169 * pt-sigpause.c: New file.
11170 * pt-sigsuspend.c: New file.
11171 * pt-sigwait.c: New file.
11172 * pt-sigwaitinfo.c: New file.
11173 * pt-waitid.c: New file.
11174 * Makefile (libpthread-routines): Add pt-readv, pt-writev, pt-creat,
11175 pt-msgrcv, pt-msgsnd, pt-poll, pt-select, pt-sigpause, pt-sigsuspend,
11176 pt-sigwait, pt-sigwaitinfo, and pt-waitid.
11177 * Versions: Add all the new functions.
11179 * tst-exit1.c: New file.
11180 * Makefile (tests): Add tst-exit1.
11182 * sem_timedwait.c: Minor optimization for more optimal fastpath.
11184 2002-10-08 Ulrich Drepper <drepper@redhat.com>
11186 * pt-fcntl.c: Only enable asynchronous cancellation for F_SETLKW.
11188 * pthread_join.c: Enable asynchronous cancellation around lll_wait_tid
11189 call. pthread_join is an official cancellation point.
11190 * pthread_timedjoin.c: Likewise.
11192 * pthread_cond_wait.c: Revert order in which internal lock are dropped
11193 and the condvar's mutex are retrieved.
11194 * pthread_cond_timedwait.c: Likewise.
11195 Reported by dice@saros.East.Sun.COM.
11197 2002-10-07 Ulrich Drepper <drepper@redhat.com>
11199 * pthreadP.h: Cut out all type definitions and move them...
11200 * sysdeps/unix/sysv/linux/internaltypes.h: ...here. New file.
11201 * pthreadP.h: Include <internaltypes.h>.
11203 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Little
11204 performance tweaks.
11206 * sem_trywait.c: Shuffle #includes around to get right order.
11207 * sem_timedwait.c: Likewise.
11208 * sem_post.c: Likewise.
11209 * sem_wait.c: Likewise.
11211 * nptl 0.3 released.
11213 * Makefile (tests): Add tst-signal3.
11214 * tst-signal3.c: New file.
11216 2002-10-05 Ulrich Drepper <drepper@redhat.com>
11218 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Tell the compiler that
11219 the asms modify the sem object.
11220 (__lll_sem_timedwait): Now takes struct sem* as first parameter.
11222 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h (sem_t): Don't expose
11223 the actual members.
11224 * pthreadP.h (struct sem): New type. Actual semaphore type.
11225 * semaphoreP.h: Include pthreadP.h.
11226 * sem_getvalue.c: Adjust to sem_t change.
11227 * sem_init.c: Likewise.
11228 * sem_open.c: Likewise.
11229 * sem_post.c: Likewise.
11230 * sem_timedwait.c: Likewise.
11231 * sem_trywait.c: Likewise.
11232 * sem_wait.c: Likewise.
11234 2002-10-04 Ulrich Drepper <drepper@redhat.com>
11236 * Makefile (tests): Add tst-basic2, tst-exec1, tst-exec3, tst-exec3.
11237 * tst-basic2.c: New file.
11238 * tst-exec1.c: New file.
11239 * tst-exec2.c: New file.
11240 * tst-exec3.c: New file.
11242 * tst-fork1.c: Remove extra */.
11244 * nptl 0.2 released. The API for IA-32 is complete.