1 2011-12-14 Carlos O'Donell <carlos@systemhalted.org>
3 * allocatestack.c (allocate_stack): Return errno on failure.
5 2011-12-14 Jeff Law <law@redhat.com>
8 * pthread_create.c (__pthread_create_2_1): Translate ENOMEM to EAGAIN.
10 2011-11-28 Andreas Schwab <schwab@redhat.com>
12 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Handle
13 EAGAIN from FUTEX_WAIT_REQUEUE_PI.
14 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
16 2011-11-15 Ulrich Drepper <drepper@gmail.com>
18 * pthread_getattr_np.c (pthread_getattr_np): Set FD_CLOEXEC for
21 2011-10-29 Ulrich Drepper <drepper@gmail.com>
24 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
25 (__pthread_cond_timedwait): Initialize %r15 correctly also for code
26 path for kernels with FUTEX_CLOCK_REALTIME.
27 Debugged by H.J. Lu <hjl.tools@gmail.com>.
29 2011-10-27 Andreas Schwab <schwab@redhat.com>
32 * sysdeps/pthread/pthread.h: Use __THREADNL instead of __THREAD
33 for memory synchronization functions.
34 * semaphore.h: Likewise.
36 2011-10-24 Ulrich Drepper <drepper@gmail.com>
38 * tst-cancel7.c: Avoid warning.
39 * tst-mutex6.c: Likewise.
40 * tst-mutex9.c: Likewise.
41 * tst-mutexpi6.c: Likewise.
43 2011-10-23 Ulrich Drepper <drepper@gmail.com>
45 * sysdeps/i386/tls.h: Remove #include <list.h>.
47 2011-10-15 Ulrich Drepper <drepper@gmail.com>
49 * pthread_create.c (start_thread): Call __ctype_init.
51 2011-09-15 Andreas Schwab <schwab@redhat.com>
53 * sysdeps/pthread/list.h: Define only list_t if __need_list_t is
55 (list_add): Add atomic_write_barrier.
56 * descr.h: Define __need_list_t before including <list.h>.
57 * nptl-init.c: Include <list.h>
58 * allocatestack.c: Likewise.
60 2011-09-11 Ulrich Drepper <drepper@gmail.com>
62 * sysdeps/i386/tls.h: Remove HAVE_TLS_SUPPORT test.
63 * sysdeps/ia64/tls.h: Likewise.
64 * sysdeps/powerpc/tls.h: Likewise.
65 * sysdeps/s390/tls.h: Likewise.
66 * sysdeps/sh/tls.h: Likewise.
67 * sysdeps/sparc/tls.h: Likewise.
68 * sysdeps/x86_64/tls.h: Likewise.
70 2011-09-10 Ulrich Drepper <drepper@gmail.com>
72 * sysdeps/pthread/malloc-machine.h: Define MUTEX_INITIALIZER.
74 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Don't handle
76 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
77 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
78 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
79 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
80 * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
81 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
82 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
83 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
84 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
85 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
86 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
87 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
89 * tst-tls1.c: Support for __thread is now mandatory.
90 * tst-tls2.c: Likewise.
91 * tst-tls3.c: Likewise.
92 * tst-tls3mod.c: Likewise.
93 * tst-tls4.c: Likewise.
94 * tst-tls4moda.c: Likewise.
95 * tst-tls4modb.c: Likewise.
96 * tst-tls5.h: Likewise.
98 2011-09-08 Ulrich Drepper <drepper@gmail.com>
101 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
102 (pthread_rwlock_timedwrlock): Use correct macro in test.
103 Patch by H.J. Lu <hongjiu.lu@intel.com>.
105 2011-09-06 Ulrich Drepper <drepper@gmail.com>
107 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait): Don't
108 use gettimeofday vsyscall, just call gettimeofday.
109 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
110 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
111 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
113 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
115 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
116 Simplify __vdso_clock_gettime use.
118 2011-09-05 David S. Miller <davem@davemloft.net>
120 * sysdeps/unix/sysv/linux/sem_timedwait.c (do_futex_timed_wait):
122 (sem_timedwait): Call it to force an exception region around
123 the async cancel enable and the futex operation.
124 * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c: Likewise.
125 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: Likewise.
126 * sysdeps/unix/sysv/linux/sem_wait.c (do_futex_wait): New function.
127 (__new_sem_wait): Call it to force an exception region around
128 the async cancel enable and the futex operation.
129 * sysdeps/unix/sysv/linux/sparc/sem_wait.c: Likewise.
130 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: Likewise.
132 2011-08-31 Andreas Schwab <schwab@redhat.com>
134 * allocatestack.c (setxid_mark_thread): Ensure that the exiting
137 2011-08-20 David S. Miller <davem@davemloft.net>
139 * Makefile (tst-cleanup0.out): Fix typo in output redirection.
141 2011-08-14 Roland McGrath <roland@hack.frob.com>
143 * sysdeps/i386/pthreaddef.h (TCB_ALIGNMENT): Set to 64, optimal on Atom.
144 * sysdeps/x86_64/pthreaddef.h (TCB_ALIGNMENT): Likewise.
146 2011-08-08 Andreas Schwab <schwab@redhat.com>
148 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Maintain aligned
150 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
151 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
153 2011-07-22 Ulrich Drepper <drepper@gmail.com>
155 * sysdeps/pthread/unwind-forcedunwind.c (_Unwind_Resume): Add read
157 (__gcc_personality_v0): Likewise.
158 (_Unwind_ForcedUnwind): Likewise.
159 (_Unwind_GetCFA): Likewise.
161 2011-07-14 Roland McGrath <roland@hack.frob.com>
163 * allocatestack.c (__reclaim_stacks): Use uintptr_t cast rather than
166 2011-06-30 Ulrich Drepper <drepper@gmail.com>
168 * nptl-init.c (__nptl_set_robust): New function.
169 (pthread_functions): Add reference.
170 * npthreadP.h: Declare __nptl_set_robust.
171 * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
172 ptr_set_robust member.
173 * sysdeps/unix/sysv/linux/fork.c: Call set_robust_list syscall in
174 child if threads are used.
176 2011-06-14 Andreas Jaeger <aj@suse.de>
178 * pthread_rwlock_init.c: Include <string.h> for memset declaration.
180 2011-05-11 Ulrich Drepper <drepper@gmail.com>
183 * allocatestack.c (allocate_stack): Convert ENOMEM error to EAGAIN.
185 2011-04-10 Ulrich Drepper <drepper@gmail.com>
188 * allocatestack.c (get_cached_stack): Deallocate DTV entries before
190 Patch partly by Robert Rex <robert.rex@exasol.com>.
192 2011-01-19 Roland McGrath <roland@redhat.com>
194 * pthread_cond_wait.c (__pthread_cond_wait): Fix comment typo.
195 * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
196 * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Likewise.
197 * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
198 * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock): Likewise.
199 * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock): Likewise.
201 2011-01-16 Andreas Schwab <schwab@linux-m68k.org>
203 * Makefile (test-extras): Add tst-cleanup4aux.
205 2011-01-14 Ulrich Drepper <drepper@gmail.com>
208 * sysdeps/pthread/setxid.h (__SETXID_1): Add cast to assignment.
209 (__SETXID_2): Likewise.
210 (__SETXID_3): Likewise.
212 2011-01-13 Ulrich Drepper <drepper@gmail.com>
215 * Versions [libc] (GLIBC_PRIVATE): Export __libc_alloca_cutoff.
216 * alloca_cutoff.c: Add libc_hidden_def.
218 2010-10-13 H.J. Lu <hongjiu.lu@intel.com>
221 * sysdeps/x86_64/pthreaddef.h (TCB_ALIGNMENT): Changed to 32.
222 * sysdeps/x86_64/tls.h (TLS_TCB_ALIGN): Defined with alignment
225 2010-09-21 Andreas Schwab <schwab@redhat.com>
227 * sysdeps/pthread/pthread.h (pthread_cleanup_push)
228 [!__EXCEPTIONS]: Mangle local variable not_first_call.
229 (pthread_cleanup_push_defer_np): Likewise.
231 2010-09-03 Ulrich Drepper <drepper@redhat.com>
233 * sysdeps/pthread/allocalim.h (__libc_use_alloca): Expect blocks are
236 2010-08-10 Dinakar Guniguntala <dino@in.ibm.com>
237 Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
239 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: If
240 FUTEX_WAKE_OP fails make sure to call FUTEX_WAKE instead.
242 2010-08-12 H.J. Lu <hongjiu.lu@intel.com>
244 * sysdeps/unix/sysv/linux/i386/Makefile: New file.
246 2010-05-01 Alan Modra <amodra@gmail.com>
248 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
249 (PSEUDO): Use correct cr save. Don't use wrong parm save area
250 to save temps. Correct cfi for possible later frame manipulation.
251 (DOCARGS_1, UNDOCARGS_1): Use the correct parm save area.
252 (DOCARGS_2, UNDOCARGS_2, DOCARGS_3, UNDOCARGS_3): Likewise.
253 (DOCARGS_4, UNDOCARGS_4, DOCARGS_5, UNDOCARGS_5): Likewise.
254 (DOCARGS_6, UNDOCARGS_6): Likewise.
255 (CENABLE, CDISABLE): Add nops for non-shared calls.
257 2010-07-06 Andreas Schwab <schwab@redhat.com>
259 * sysdeps/unix/sysv/linux/pthread_getname.c (pthread_getname_np):
262 2010-07-03 Ulrich Drepper <drepper@redhat.com>
264 * tst-abstime.c (do_test): Some more cleanups
266 2010-07-02 Ulrich Drepper <drepper@redhat.com>
268 * tst-abstime.c: Correct testing and add test for sem_timedwait.
270 2010-07-01 Andreas Schwab <schwab@redhat.com>
271 Ulrich Drepper <drepper@redhat.com>
273 * Makefile (tests): Add tst-abstime.
274 * tst-abstime.c: New file.
275 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
276 (__lll_timedlock_wait): Check for timestamp before the Epoch.
277 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
278 (__lll_timedlock_wait): Likewise.
279 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
280 (__lll_robust_timedlock_wait): Likewise.
281 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
282 (__pthread_cond_timedwait): Likewise.
283 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
284 (pthread_rwlock_timedrdlock): Likewise.
285 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
286 (pthread_rwlock_timedwrlock): Likewise.
287 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
290 2010-07-01 Ulrich Drepper <drepper@redhat.com>
292 * Makefile (tst-_res1): Add tst-_res1mod1 to dependency list.
294 2010-06-01 Takashi Yoshii <takashi.yoshii.zj@renesas.com>
296 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Fix incorrect
297 location of ifndef __ASSUME_FUTEX_CLOCK_REALTIME.
299 2010-04-09 Ulrich Drepper <drepper@redhat.com>
302 * sysdeps/unix/sysv/linux/pthread_getname.c: New file.
303 * sysdeps/unix/sysv/linux/pthread_setname.c: New file.
304 * nptl/sysdeps/pthread/pthread.h: Declare pthread_getname and
306 * Makefile (libpthread-routines): Add pthread_getname and
308 * Versions: Export pthread_getname and pthread_setname for GLIBC_2.12.
310 2010-04-05 Thomas Schwinge <thomas@schwinge.name>
312 * sysdeps/pthread/unwind-resume.c: Moved to main tree sysdeps/gnu/.
313 * sysdeps/pthread/rt-unwind-resume.c: Likewise.
314 * sysdeps/pthread/Makefile: Remove csu section and rt section's
315 unwind-resume bits, now in main tree sysdeps/gnu/Makefile instead.
317 2010-03-23 Luis Machado <luisgpm@br.ibm.com>
319 * pthread_cond_timedwait.c: Add check for
320 HAVE_CLOCK_GETTIME_VSYSCALL to use VDSO whenever possible.
321 (pthread_cond_timedwait): Use INTERNAL_VSYSCALL instead of
324 2010-03-09 Ulrich Drepper <drepper@redhat.com>
326 * pthread_create.c (__pthread_create_2_1): If priorities are incorrect
327 and the call fails wake eventually waiting setxid threads. Don't free
328 stack here if we try starting a thread.
329 * sysdeps/pthread/createthread.c (do_clone): Only wake setxid waiter
330 if the clone call failed.
332 2010-03-08 Andreas Schwab <schwab@redhat.com>
334 * pthread_create.c (__pthread_create_2_1): Don't set setxid_futex.
335 * allocatestack.c (get_cached_stack): Set setxid_futex.
336 (allocate_stack): Likewise.
338 2010-03-05 Andreas Schwab <schwab@redhat.com>
339 Ulrich Drepper <drepper@redhat.com>
341 * allocatestack.c (setxid_mark_thread): Delay handling of thread if
342 it is creating a thread or it is just being created.
343 * pthread_create.c (start_thread): Wake setxid thread if it is
345 (__pthread_create_2_1): Initialize setxid_futex.
346 * sysdeps/pthread/createthread.c (do_clone): Wake setxid thread if it
349 2010-01-15 Ulrich Drepper <drepper@redhat.com>
351 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
353 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
355 2010-01-15 Michal Schmidt <mschmidt@redhat.com>
357 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
358 Fix pthread_cond_timedwait with requeue-PI.
359 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
360 Fix pthread_cond_wait with requeue-PI.
362 2010-01-14 Ulrich Drepper <drepper@redhat.com>
364 * Versions: Add pthread_mutex_consistent, pthread_mutexattr_getrobust,
365 and pthread_mutexattr_setrobust for GLIBC_2.12.
366 * pthread_mutex_consistent.c: Define alias pthread_mutex_consistent.
367 * pthread_mutexattr_getrobust.c: Define alias
368 pthread_mutexattr_getrobust.
369 * pthread_mutexattr_setrobust.c: Define alias
370 pthread_mutexattr_setrobust.
372 2010-01-12 Ulrich Drepper <drepper@redhat.com>
374 * sysdeps/pthread/pthread.h: Cleanup. Fix up for XPG7.
376 2010-01-08 Ulrich Drepper <drepper@redhat.com>
378 * sysdeps/pthread/pthread.h: Fix pthread_mutex_consistent declaration.
380 2009-12-18 Thomas Schwinge <thomas@codesourcery.com>
382 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c (_init): Don't
384 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c (_init): Likewise.
386 2009-12-17 Ulrich Drepper <drepper@redhat.com>
388 * pthread_rwlock_init.c (__pthread_rwlock_init): Simplify code by
391 2009-12-01 Dinakar Guniguntala <dino@in.ibm.com>
393 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.h: Define
394 FUTEX_WAIT_REQUEUE_PI and FUTEX_CMP_REQUEUE_PI.
395 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: If mutex
396 is a non robust PI mutex, then use FUTEX_CMP_REQUEUE_PI.
397 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
398 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: If mutex
399 is a non robust PI mutex, then use FUTEX_WAIT_REQUEUE_PI.
400 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
402 2009-12-12 Ulrich Drepper <drepper@redhat.com>
404 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
405 Don't update nwaiters after invalid timeout is recognized.
407 2009-11-27 Thomas Schwinge <thomas@codesourcery.com>
409 * sysdeps/unix/sysv/linux/sh/pt-initfini.c (_init): Don't call
412 2009-11-27 Andreas Schwab <schwab@redhat.com>
414 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Reload
415 THREAD_SELF->cancelhandling after returning from futex call.
417 2009-11-24 Ulrich Drepper <drepper@redhat.com>
419 * tst-sem13.c: New file.
420 * Makefile (tests): Add tst-sem13.
422 2009-11-22 Roland McGrath <roland@redhat.com>
424 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: # include "i686/dl-sysdep.h"
425 instead of recapitulating its contents.
427 2009-11-18 Ulrich Drepper <drepper@redhat.com>
429 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Minor
430 optimizations and cleanups.
432 2009-11-18 Dinakar Guniguntala <dino@in.ibm.com>
434 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
435 Remove redundant code. Fix cfi offsets.
436 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
439 2009-11-17 Ulrich Drepper <drepper@redhat.com>
441 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Minimally
442 reduce size of unwind info.
444 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Convert to use
446 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
447 Based on a patch by Dinakar Guniguntala <dino@in.ibm.com>.
449 2009-11-03 Andreas Schwab <schwab@linux-m68k.org>
452 * sysdeps/pthread/unwind-resume.c: Include <libgcc_s.h> and use
454 * sysdeps/pthread/unwind-forcedunwind.c: Likewise.
456 2009-10-30 Ulrich Drepper <drepper@redhat.com>
458 * tst-sem11.c (main): Rewrite to avoid aliasing problems.
461 * allocatestack.c (__nptl_setxid): Perform the operation in multiple
462 steps to avoid races with creation and terminations.
463 * nptl-init.c (sighandler_setxid): Adjust.
464 Patch by Daniel Jacobowitz.
466 2009-09-07 Andreas Schwab <schwab@redhat.com>
468 * sysdeps/pthread/bits/libc-lock.h (BP_SYM): Remove space before paren.
470 2009-09-02 Suzuki K P <suzuki@in.ibm.com>
471 Joseph Myers <joseph@codesourcery.com>
474 * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
475 Initialize the sigev_notify field for newly created timer to make sure
476 the timer gets deleted from the active timer's list upon timer_delete.
478 2009-08-27 Andrew Stubbs <ams@codesourcery.com>
480 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
481 Correct a logic error.
483 2009-08-25 Ulrich Drepper <drepper@redhat.com>
485 * sysdeps/x86_64/tls.h (RTLD_ENABLE_FOREIGN_CALL): Store old value
486 of the field in local variables.
487 (RTLD_FINALIZE_FOREIGN_CALL): Restore rtld_must_xmm_save from local
488 variable and don't unconditionally clear it.
490 2009-08-24 Ulrich Drepper <drepper@redhat.com>
492 * pthread_create.c (start_thread): Hint to the kernel that memory for
493 the stack can be reused. We do not mark all the memory. The part
494 still in use and some reserve are kept.
496 2009-08-23 Ulrich Drepper <drepper@redhat.com>
498 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Clean up namespace.
500 2009-08-11 Ulrich Drepper <drepper@redhat.com>
502 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Add CFI
505 2009-08-10 Ulrich Drepper <drepper@redhat.com>
507 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Add CFI
509 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
511 2009-08-10 Andreas Schwab <schwab@redhat.com>
513 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
514 (__pthread_cond_signal): Don't clobber register used for syscall
517 2009-08-08 Ulrich Drepper <drepper@redhat.com>
519 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
520 Optimize code path used when FUTEX_CLOCK_REALTIME is supported.
522 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
523 (__pthread_cond_wait): Optimize by avoiding use of callee-safe
526 2009-08-07 Ulrich Drepper <drepper@redhat.com>
528 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Little optimizations
529 enabled by the special *_asynccancel functions.
530 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
531 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
533 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Include lowlevellock.h.
535 2009-08-04 Ulrich Drepper <drepper@redhat.com>
537 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: New file.
538 * sysdeps/unix/sysv/linux/x86_64/libc-cancellation.S: New file.
539 * sysdeps/unix/sysv/linux/x86_64/librt-cancellation.S: New file.
540 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Optimize
541 since we can assume the special __*_{en,dis}able_asynccancel
543 (PUSHARGS_*, POPARGS_*, SAVESTK_*, RESTSTK_*): Removed.
544 * sysdeps/x86_64/tcb-offsets.sym: Add cancellation-related bits
545 and PTHREAD_CANCELED.
547 2009-07-31 Ulrich Drepper <drepper@redhat.com>
549 * descr.h: Better definition of *_BITMASK macros for cancellation.
551 2009-07-29 Ulrich Drepper <drepper@redhat.com>
553 * sysdeps/x86_64/tls.h (TLS_TCB_ALIGN): Define explicitly to 32.
555 * sysdeps/x86_64/tls.h (tcbhead_t): Add room for SSE registers the
556 dynamic linker might have to save.
557 Define RTLD_CHECK_FOREIGN_CALL, RTLD_ENABLE_FOREIGN_CALL,
558 RTLD_PREPARE_FOREIGN_CALL, and RTLD_FINALIZE_FOREIGN_CALL. Pretty
561 * sysdeps/x86_64/tcb-offsets.sym: Add RTLD_SAVESPACE_SSE.
563 2009-07-28 Ulrich Drepper <drepper@redhat.com>
565 * pthread_mutex_lock.c [NO_INCR] (__pthread_mutex_cond_lock_adjust):
567 * pthreadP.h: Declare __pthread_mutex_cond_lock_adjust.
568 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: Add ROBUST_BIT.
569 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Don't use
570 requeue_pi for robust mutexes.
571 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
572 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
573 Don't only skip __pthread_mutex_cond_lock. Call instead
574 __pthread_mutex_cond_lock_adjust.
575 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
577 * pthread_mutex_unlock.c (__pthread_mutex_unlock_full): Minor
578 optimization of PI mutex handling.
580 2009-07-27 Ulrich Drepper <drepper@redhat.com>
583 * pthread_mutex_unlock.c (__pthread_mutex_unlock_full): Use _rel
584 instead of of _acq variants of cmpxchg.
586 2009-07-23 Ulrich Drepper <drepper@redhat.com>
588 * sysdeps/x86_64/configure.in: New file.
590 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix error
591 path when not using absolute timeout futex.
593 2009-07-20 Ulrich Drepper <drepper@redhat.com>
595 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Minor
596 optimizations of last changes.
597 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
599 2009-07-19 Ulrich Drepper <drepper@redhat.com>
601 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
602 FUTEX_WAIT_REQUEUE_PI and FUTEX_CMP_REQUEUE_PI.
603 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: If mutex
604 is a PI mutex, then use FUTEX_CMP_REQUEUE_PI.
605 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
606 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: If mutex
607 is a PI mutex, then use FUTEX_WAIT_REQUEUE_PI.
608 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
610 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
611 (__pthread_cond_timedwait): Make more robust.
613 2009-07-18 Ulrich Drepper <drepper@redhat.com>
615 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
616 (__lll_robust_timedlock_wait): If possible use FUTEX_WAIT_BITSET to
617 directly use absolute timeout.
619 * tst-sem5.c (do_test): Add test for premature timeout.
620 * Makefile: Linu tst-sem5 with librt.
622 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
623 (pthread_rwlock_timedwrlock): If possible use FUTEX_WAIT_BITSET to
624 directly use absolute timeout.
625 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
626 (pthread_rwlock_timedrdlock): Likewise.
628 * tst-cond11.c (run_test): Add test to check that the timeout is
631 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
632 (__pthread_cond_timedwait): If possible use FUTEX_WAIT_BITSET to
633 directly use absolute timeout.
635 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
636 (__pthread_cond_wait): Convert to using exception handler instead of
637 registered unwind buffer.
638 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
639 (__pthread_cond_timedwait): Likewise.
641 2009-07-17 Ulrich Drepper <drepper@redhat.com>
643 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
644 If possible use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME to directly
645 use absolute timeout.
647 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Optimize
648 handling of uncontested semaphore.
650 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
651 (__condvar_cleanup): Rewrite to use cfi directives instead of
652 hand-coded unwind tables.
653 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S (__pthread_once):
655 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
656 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
659 2009-06-12 Ulrich Drepper <drepper@redhat.com>
661 * Makefile (libpthread-routines): Add pthread_sigqueue.
662 * Versions: Add pthread_sigqueue for GLIBC_2.11.
663 * sysdeps/pthread/bits/sigthread.h: Declare pthread_sigqueue.
664 * sysdeps/unix/sysv/linux/pthread_sigqueue.c: New file.
666 2009-06-11 Ulrich Drepper <drepper@redhat.com>
669 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
670 (LOAD_FUTEX_WAIT_ABS): Fix futex parameter in case private futexes
672 Patch by Bryan Kadzban <bz-glibc@kdzbn.homelinux.net>.
674 2009-05-16 Ulrich Drepper <drepper@redhat.com>
676 * libc-cancellation.c: Move __libc_cleanup_routine to...
677 * libc-cleanup.c: ...here. New file.
678 * Makefile (routines): Add libc-cleanup.
680 * cancellation.c (__pthread_disable_asynccancel): Remove unnecessary
682 * libc-cancellation.c: Use <nptl/cancellation.c: to define the code.
683 * sysdeps/pthread/librt-cancellation.c: Likewise.
686 * nptl-init.c: Renamed from init.c.
687 * Makefile: Change all occurences of init.c to nptl-init.c.
689 2009-05-15 Ulrich Drepper <drepper@redhat.com>
691 * cancellation.c (__pthread_disable_asynccancel): Correct the bits
692 to test when deciding on the delay.
693 * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
694 * pthread_cancel.c: Close race between deciding on sending a signal
695 and setting the CANCELING_BIT bit.
697 * cancellation.c (__pthread_disable_asynccancel): Don't return if
699 * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
701 2009-04-27 Ulrich Drepper <drepper@redhat.com>
703 * cancellation.c (__pthread_disable_asynccancel): Use THREAD_ATOMIC_AND
705 * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
706 * sysdeps/x86_64/tls.h: Define THREAD_ATOMIC_AND.
707 * sysdeps/i386/tls.h: Likewise.
708 (tcbhead_t): Add __private_tm member.
710 2009-04-26 Ulrich Drepper <drepper@redhat.com>
712 * sem_open.c (sem_open): Rewrite initialization of initsem to
715 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
716 Avoid warning by using may_alias attribute on ptrhack.
718 2009-04-22 Ulrich Drepper <drepper@redhat.com>
721 * pthread_attr_setschedparam.c (__pthread_attr_setschedparam):
722 Check policy and priority for validity.
723 Patch mostly by Zhang Xiliang <zhangxiliang@cn.fujitsu.com>.
725 2009-03-15 Ulrich Drepper <drepper@redhat.com>
727 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
728 (__pthread_cond_timedwait): Change to use cfi directives instead of
729 hand-coded unwind sections.
731 2009-03-10 Ulrich Drepper <drepper@redhat.com>
733 * init.c (nptl_freeres): Compile only for SHARED.
735 2009-03-09 Jakub Jelinek <jakub@redhat.com>
737 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Define
738 FUTEX_WAIT_BITSET, FUTEX_WAKE_BITSET, FUTEX_CLOCK_REALTIME and
739 FUTEX_BITSET_MATCH_ANY.
741 2009-02-27 Roland McGrath <roland@redhat.com>
743 * init.c (__nptl_initial_report_events): Mark __attribute_used__.
744 * pthread_create.c (__nptl_threads_events, __nptl_last_event): Likewise.
746 2009-02-26 Ulrich Drepper <drepper@redhat.com>
748 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
749 _POSIX_THREAD_ROBUST_PRIO_INHERIT and
750 _POSIX_THREAD_ROBUST_PRIO_PROTECT. Reset value of macros from
753 2009-02-25 Ulrich Drepper <drepper@redhat.com>
755 * sysdeps/pthread/pthread.h: The robust mutex functions are in
758 2009-02-24 Ulrich Drepper <drepper@redhat.com>
760 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_BITS_POSIX_OPT_H):
761 Unify name of include protector macro.
763 2009-02-14 SUGIOKA Toshinobu <sugioka@itonet.co.jp>
765 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
766 LOAD_FUTEX_WAIT_ABS even if (FUTEX_WAIT == 0).
768 2009-01-29 Ulrich Drepper <drepper@redhat.com>
770 * sysdeps/pthread/unwind-forcedunwind.c: Encrypt all function
773 * allocatestack.c (__free_stacks): Renamed from free_stacks.
774 (__free_stack_cache): Removed. Change callers to call __free_stacks.
775 * init.c (nptl_freeres): New function.
776 (pthread_functions): Initialize ptr_freeres to nptl_freeres.
777 * pthreadP.h: Don't declare __free_stack_cache. Declare __free_stacks.
778 * sysdeps/pthread/unwind-forcedunwind.c (libgcc_s_handle): New
780 (pthread_cancel_init): Depend in libgcc_s_handle for decision to
781 load DSO. Assign last.
782 (__unwind_freeres): New function.
784 * allocatestack.c (__reclaim_stacks): Reset in_flight_stack later
785 for better debugging. No need to use stack_list_add here.
787 2009-01-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
789 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
790 (__lll_timedlock_wait): Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME
791 instead of computing relative timeout.
792 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
793 FUTEX_CLOCK_REALTIME and FUTEX_BITSET_MATCH_ANY.
795 2009-01-25 Ulrich Drepper <drepper@redhat.com>
797 * pthread_mutex_lock.c (__pthread_mutex_lock): Remove unused label out.
799 2009-01-08 Ulrich Drepper <drepper@redhat.com>
801 * sysdeps/pthread/list.h (list_add): Initialize new element first.
802 (list_add_tail): Removed.
804 2009-01-07 Ulrich Drepper <drepper@redhat.com>
806 * (in_flight_stack): New variable.
807 (stack_list_del): New function. Use instead of list_del.
808 (stack_list_add): New function. Use instead of list_add when adding to
809 stack_cache and stack_used lists.
810 (__reclaim_stacks): Complete operations on stack_cache and stack_used lists
811 when the fork call interrupted another thread.
813 2009-01-04 Ulrich Drepper <drepper@redhat.com>
815 * init.c (__pthread_initialize_minimal_internal): Optimize test
816 FUTEX_CLOCK_REALTIME a bit.
818 2009-01-03 Ulrich Drepper <drepper@redhat.com>
820 * init.c (__pthread_initialize_minimal_internal): Cheat a bit by
821 only passing five parameters to FUTEX_WAIT_BITSET call.
823 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
824 (__lll_timedlock_wait): Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME
825 instead of computing relative timeout.
827 2009-01-02 Ulrich Drepper <drepper@redhat.com>
829 * init.c (__pthread_initialize_minimal_internal): Check for
830 FUTEX_CLOCK_REALTIME flag.
831 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
832 Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME instead of computing
835 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
836 FUTEX_CLOCK_REALTIME and FUTEX_BITSET_MATCH_ANY.
837 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
838 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
839 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
840 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
842 2008-12-09 Ulrich Drepper <drepper@redhat.com>
844 * sysdeps/pthread/pthread.h (pthread_cleanup_pop): Use { } as empty
845 loop body instead of ; to avoid gcc warnings.
846 (pthread_cleanup_pop_restore_np): Likewise.
847 Patch by Caolán McNamara <caolanm@redhat.com>.
849 2008-12-09 Jakub Jelinek <jakub@redhat.com>
851 * pthread_mutex_lock.c (__pthread_mutex_lock): Handle only the
852 fast path here, for robust/PI/PP mutexes call
853 __pthread_mutex_lock_full. Don't use switch, instead use a series
854 of ifs according to their probability.
855 (__pthread_mutex_lock_full): New function.
856 * pthread_mutex_unlock.c: Include assert.h.
857 (__pthread_mutex_unlock_usercnt): Handle only the
858 fast path here, for robust/PI/PP mutexes call
859 __pthread_mutex_unlock_full. Don't use switch, instead use a series
860 of ifs according to their probability.
861 (__pthread_mutex_unlock_full): New function.
862 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c
863 (__pthread_mutex_lock_full): Define.
865 2008-12-08 Ulrich Drepper <drepper@redhat.com>
867 * sysdeps/x86_64/tls.h (tcbhead_t): Add fields reserved for TM
868 implementation. Add necessary padding and.
869 * descr.h (struct pthread): Increase padding for tcbhead_t to 24
872 2008-12-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
874 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define FUTEX_WAIT_BITSET
875 and FUTEX_WAKE_BITSET.
877 2008-12-02 Ulrich Drepper <drepper@redhat.com>
879 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_WAIT_BITSET
880 and FUTEX_WAKE_BITSET.
881 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
882 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
883 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
884 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
886 2008-11-25 Roland McGrath <roland@redhat.com>
888 * sysdeps/alpha, sysdeps/unix/sysv/linux/alpha:
889 Subdirectories moved to ports repository as
890 sysdeps/.../nptl subdirectories.
892 2008-11-12 Jakub Jelinek <jakub@redhat.com>
895 * pthread_condattr_setclock.c (pthread_condattr_setclock): Fix masking
897 * pthread_cond_init.c (__pthread_cond_init): Fix
898 cond->__data.__nwaiters initialization.
899 * Makefile (tests): Add tst-cond23.
900 * tst-cond23.c: New test.
902 2008-11-07 Jakub Jelinek <jakub@redhat.com>
904 * sysdeps/pthread/malloc-machine.h (MALLOC): Adjust __libc_tsd_define
906 (tsd_setspecific, tsd_getspecific): Adjust __libc_tsd_{set,get}
909 2008-11-01 Ulrich Drepper <drepper@redhat.com>
912 * pthread_mutex_lock.c: Add support for private PI mutexes.
913 * pthread_mutex_timedlock.c: Likewise.
914 * pthread_mutex_trylock.c: Likewise.
915 * pthread_mutex_unlock.c: Likewise.
916 Patch mostly by Ben Jackson <ben@ben.com>.
918 2008-10-31 Ulrich Drepper <drepper@redhat.com>
921 * sysdeps/pthread/gai_misc.h (__gai_create_helper_thread):
922 Increase stack size for helper thread.
924 2008-10-06 Martin Schwidefsky <schwidefsky@de.ibm.com>
926 * sysdeps/s390/tls.h (THREAD_SET_STACK_GUARD): Add empty inline
927 assembly with a clobber list for access registers a0 and a1.
929 2008-09-11 Martin Schwidefsky <schwidefsky@de.ibm.com>
931 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Add memory barrier
932 to force runp->refcntr to be read from memory.
934 2008-09-08 Richard Guenther <rguenther@suse.de>
936 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_lock,
937 lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
938 lll_timedlock, lll_robust_timedlock, lll_unlock,
939 lll_robust_unlock): Promote private to int.
941 2008-08-15 Ulrich Drepper <drepper@redhat.com>
943 * sysdeps/x86_64/pthreaddef.h: Remove ARCH_MAP_FLAGS and
944 ARCH_RETRY_MMAP definitions.
945 * allocatestack.c: Remove definition of ARCH_MAP_FLAGS.
946 Define MAP_STACK when not defined.
947 (allocate_stack): Use MAP_STACK instead of ARCH_MAP_FLAGS. Remove
948 handling of ARCH_RETRY_MMAP.
950 2008-07-30 Ulrich Drepper <drepper@redhat.com>
952 * tst-align2.c (f): Print message that f is reached.
954 2008-04-28 Hiroki Kaminaga <kaminaga@sm.sony.co.jp>
957 * sysdeps/powerpc/tcb-offsets.sym (PRIVATE_FUTEX_OFFSET): Guard symbol
958 definition with #ifndef __ASSUME_PRIVATE_FUTEX.
960 2008-07-25 Ulrich Drepper <drepper@redhat.com>
962 * sysdeps/unix/sysv/linux/mq_notify.c (init_mq_netlink): Use
963 SOCK_CLOEXEC if possible.
965 2008-05-29 Ulrich Drepper <drepper@redhat.com>
967 * Makefile (tests): Add tst-rwlock2a.
968 * tst-rwlock2.c: Use TYPE macro to decide what rwlock type to use.
969 * tst-rwlock2a.c: New file.
971 2008-06-12 Ulrich Drepper <drepper@redhat.com>
973 * sysdeps/pthread/pthread.h: Remove inadvertant checkin.
975 2008-05-17 Samuel Thibault <samuel.thibault@ens-lyon.org>
977 * sysdeps/pthread/pthread.h: Fix typo in comment.
979 2008-05-28 Ulrich Drepper <drepper@redhat.com>
981 * sysdeps/pthread/createthread.c (do_clone): Pass accurate length
982 of CPU set to the kernel.
984 2008-05-23 Paul Pluzhnikov <ppluzhnikov@google.com>
986 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Add
988 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
989 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
990 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
991 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
992 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
993 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
995 2008-05-22 Paul Pluzhnikov <ppluzhnikov@google.com>
997 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S: Add
999 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1001 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
1003 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1006 2008-05-26 Ulrich Drepper <drepper@redhat.com>
1008 * tst-typesizes.c: Explicitly check __SIZEOF_PTHREAD_* constants.
1010 2008-05-20 Jakub Jelinek <jakub@redhat.com>
1012 David S. Miller <davem@davemloft.net>
1014 * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: New file.
1016 2008-05-10 Ulrich Drepper <drepper@redhat.com>
1018 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Access
1019 __pshared correctly.
1020 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1022 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1024 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
1026 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
1028 Reported by Clemens Kolbitsch <clemens.kol@gmx.at>.
1030 2008-04-14 David S. Miller <davem@davemloft.net>
1032 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
1033 (__old_sem_wait): Fix argument to lll_futex_wait().
1035 2007-11-26 Daniel Jacobowitz <dan@codesourcery.com>
1037 * pthread_create.c: Require pthread_mutex_trylock and
1038 pthread_key_delete for libgcc.
1040 2008-04-08 Jakub Jelinek <jakub@redhat.com>
1043 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h
1044 (lll_futex_wake_unlock): Add private argument to the pre-v9 macro.
1045 Patch by Sunil Amitkumar Janki <devel.sjanki@gmail.com>.
1047 2008-03-27 Ulrich Drepper <drepper@redhat.com>
1049 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine ARG_MAX if
1050 <linux/limits.h> has defined it.
1051 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
1052 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
1053 * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
1054 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
1056 2008-03-18 Jakub Jelinek <jakub@redhat.com>
1058 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Use __ASSEMBLER__ instead
1060 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
1061 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Likewise.
1063 2008-03-14 Ulrich Drepper <drepper@redhat.com>
1065 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
1066 HAVE_DL_DISCOVER_OSVERSION.
1067 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
1068 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Likewise.
1070 2008-03-07 Ulrich Drepper <drepper@redhat.com>
1073 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Change
1074 _POSIX_CHOWN_RESTRICTED value to zero.
1076 2008-01-31 Roland McGrath <roland@redhat.com>
1078 * Makefile (omit-deps): Variable removed.
1080 2008-01-30 Ulrich Drepper <drepper@redhat.com>
1082 * sysdeps/unix/sysv/linux/x86_64/sem_post.S (sem_post): Avoid
1083 unnecessary addr32 prefix.
1085 2008-01-29 Roland McGrath <roland@redhat.com>
1087 * Makeconfig (ptw-CPPFLAGS, sysd-rules-patterns): New variables.
1089 2008-01-22 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1091 * sysdeps/unix/sysv/linux/sh/sem_post.S: Don't overflow value field.
1093 2008-01-21 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1095 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XADD): Use
1097 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
1098 (__lll_lock_wait_private): Fix typo.
1099 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
1100 (pthread_barrier_wait): Likewise. Adjust XADD use.
1101 * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
1103 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S
1104 (pthread_rwlock_timedrdlock): Return correct return value.
1105 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S
1106 (pthread_rwlock_timedwrlock): Likewise.
1108 2008-01-15 Ulrich Drepper <drepper@redhat.com>
1110 * tst-eintr2.c (do_test): make sure that if mutex_lock in main
1111 thread returns the program exits with an error code.
1113 2008-01-10 Ulrich Drepper <drepper@redhat.com>
1115 * pthread-errnos.sym: Add EOVERFLOW.
1116 * sysdeps/unix/sysv/linux/structsem.sym: Add SEM_VALUE_MAX.
1117 * sysdeps/unix/sysv/linux/sem_post.c: Don't overflow value field.
1118 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
1119 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
1121 2007-12-14 Ulrich Drepper <drepper@redhat.com>
1123 * sysdeps/x86_64/pthreaddef.h (ARCH_RETRY_MMAP): Take additional
1124 parameter. Passed it as permission to mmap.
1125 * allocatestack.c (allocate_stack): Pass prot as second parameter
1128 2007-12-12 Ulrich Drepper <drepper@redhat.com>
1130 * tst-basic7.c: Allocate memory for the stack.
1133 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S [!SHARED]
1134 (__pthread_cond_timedwait): Don't use VDSO.
1135 Patch by Michal Januszewski.
1137 2007-12-07 Ulrich Drepper <drepper@redhat.com>
1140 * sysdeps/pthread/pthread.h [!__EXCEPTIONS] (pthread_cleanup_pop):
1141 Allow label before pthread_cleanup_pop.
1142 (pthread_cleanup_pop_restore_np): Likewise.
1144 2007-12-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1146 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
1147 Store 2 before returning ETIMEDOUT.
1149 2007-11-23 Ulrich Drepper <drepper@redhat.com>
1151 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
1152 Store 2 before returning ETIMEDOUT.
1153 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise
1154 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
1155 (__lll_lock_wait_private): Optimize.
1156 (__lll_lock_wait): Likewise.
1158 2007-11-20 Jakub Jelinek <jakub@redhat.com>
1160 * sysdeps/pthread/pthread.h (pthread_cleanup_push,
1161 pthread_cleanup_push_defer_np): Add extra (void *) cast to shut up
1162 g++ 4.1 and 4.2 -Wstrict-aliasing warnings.
1164 2007-11-08 Ulrich Drepper <drepper@redhat.com>
1167 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
1168 If we time out, try one last time to lock the futex to avoid
1169 losing a wakeup signal.
1170 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
1171 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
1174 * sysdeps/pthread/createthread.c (do_clone): Translate clone error
1177 2007-11-07 Ulrich Drepper <drepper@redhat.com>
1180 * allocatestack.c (allocate_stack): Change ENOMEM error in case
1181 mmap failed to EAGAIN.
1182 * Makefile (tests): Add tst-basic7.
1183 * tst-basic7.c: New file.
1185 2007-11-05 Ulrich Drepper <drepper@redhat.com>
1187 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
1188 Use __linkin_atfork.
1190 2007-11-03 Mike Frysinger <vapier@gentoo.org>
1192 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (LOAD_FUTEX_WAIT): Add
1193 missing line continuations.
1194 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S (LOAD_FUTEX_WAIT,
1195 LOAD_FUTEX_WAKE): Likewise. Also add missing 3rd parameter.
1197 2007-10-28 Ulrich Drepper <drepper@redhat.com>
1200 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Declare
1201 __active_timer_sigev_thread and __active_timer_sigev_thread_lock.
1202 (struct timer): Add next element.
1203 * sysdeps/unix/sysv/linux/timer_create.c: For SIGEV_THREAD timers,
1204 enqueue timer structure into __active_timer_sigev_thread list.
1205 * sysdeps/unix/sysv/linux/timer_delete.c: For SIGEV_THREAD timers,
1206 remove timer struct from __active_timer_sigev_thread.
1207 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
1208 Before using timer structure make sure it is still on the
1209 __active_timer_sigev_thread list. Keep lock until done.
1210 Define __active_timer_sigev_thread and
1211 __active_timer_sigev_thread_lock.
1213 2007-10-27 Ulrich Drepper <drepper@redhat.com>
1215 * sysdeps/pthread/malloc-machine.h: Define ATFORK_MEM.
1216 Redefine thread_atfork for use of ATFORK_MEM.
1217 * sysdeps/unix/sysv/linux/fork.h: Define __linkin_atfork.
1218 * sysdeps/unix/sysv/linux/register-atfork.c (__linkin_atfork): New
1220 * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
1221 Use atomic operation when removing first element of list.
1223 2007-10-17 Jakub Jelinek <jakub@redhat.com>
1225 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__old_sem_post): New
1226 routine instead of an alias to __new_sem_post.
1228 2007-10-15 Jakub Jelinek <jakub@redhat.com>
1230 * init.c (__pthread_initialize_minimal): Initialize word to appease
1233 2007-10-10 Jakub Jelinek <jakub@redhat.com>
1235 * sysdeps/pthread/bits/libc-lock.h (__libc_rwlock_init): Inside of
1236 libc.so just clear NAME.
1237 (__libc_rwlock_fini): Nop inside of libc.so.
1238 * tst-initializers1.c (main): Test if PTHREAD_RWLOCK_INITIALIZER is
1241 2007-09-02 Ulrich Drepper <drepper@redhat.com>
1243 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
1244 (__pthread_cond_wait): Fix unlocking of internal lock after mutex
1246 Patch by Luca Barbieri <luca.barbieri@gmail.com>.
1248 2007-08-21 Ulrich Drepper <drepper@redhat.com>
1251 * allocatestack.c (__reclaim_stacks): Clear the TSD in the
1252 reclaimed stack if necessary.
1253 * Makefile (tests): Add tst-tsd6.
1254 * tst-tsd6.c: New file.
1256 2007-08-21 Jakub Jelinek <jakub@redhat.com>
1258 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_dead):
1259 Add private argument.
1261 2007-08-20 Ulrich Drepper <drepper@redhat.com>
1263 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1264 (__pthread_cond_timedwait): Use clock_gettime from VDSO if possible.
1266 2007-08-16 Jakub Jelinek <jakub@redhat.com>
1268 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h
1269 (__lll_robust_timedlock): Pass private as last argument to
1270 __lll_robust_timedlock_wait.
1271 (__lll_unlock): Fix a pasto.
1273 2007-08-15 Jakub Jelinek <jakub@redhat.com>
1275 * sysdeps/unix/sysv/linux/sparc/internaltypes.h (sparc_new_sem,
1276 sparc_old_sem): New structs.
1277 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
1278 (__sem_wait_cleanup): New function.
1279 (__new_sem_wait): Use sparc_new_sem structure. Bump and afterwards
1280 decrease nwaiters. Register __sem_wait_cleanup as cleanup handler.
1281 Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
1283 (__old_sem_wait): New function.
1284 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: Include
1285 nptl/sysdeps/unix/sysv/linux/sparc version.
1286 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c:
1288 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: Likewise.
1289 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c
1290 (__new_sem_trywait): Use sparc_old_sem structure.
1291 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c
1292 (sem_timedwait): Use sparc_new_sem structure. Bump and afterwards
1293 decrease nwaiters. Register __sem_wait_cleanup as cleanup handler.
1294 Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
1295 lll_futex_timed_wait.
1296 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c (__new_sem_post):
1297 Use sparc_new_sem structure. Only wake if nwaiters > 0. Pass
1298 isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
1300 (__old_sem_post): New function.
1301 * sysdeps/unix/sysv/linux/sparc/sem_wait.c: New file.
1302 * sysdeps/unix/sysv/linux/sparc/sem_init.c: New file.
1303 * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c: New file.
1304 * sysdeps/unix/sysv/linux/sparc/sem_post.c: New file.
1305 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: Remove.
1306 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: Remove.
1308 2007-08-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1310 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
1311 (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
1312 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
1313 Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
1314 * sysdeps/unix/sysv/linux/shpthread_cond_signal.S
1315 (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
1316 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
1318 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
1319 kernel-features.h and tcb-offsets.h.
1320 (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
1321 lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
1323 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
1325 (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE
1326 to lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
1328 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use #ifdef
1329 __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
1330 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
1331 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
1332 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
1333 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
1334 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
1336 2007-08-14 Jakub Jelinek <jakub@redhat.com>
1338 * sysdeps/unix/sysv/linux/lowlevellock.c: Comment fix.
1339 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
1340 (__lll_timedwait_tid): Pass LLL_SHARED as 4th argument to
1341 lll_futex_timed_wait.
1343 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (__lll_unlock,
1344 __lll_robust_unlock): Rewrite as macros instead of inline functions.
1345 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_unlock,
1346 __lll_robust_unlock, __lll_wait_tid): Likewise.
1348 2007-08-13 Jakub Jelinek <jakub@redhat.com>
1350 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
1352 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
1353 (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
1354 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
1355 Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
1356 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
1357 (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
1358 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
1359 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Include
1361 (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
1362 lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
1363 process private. Switch DW_CFA_advance_loc1 and some
1364 DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
1365 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
1366 (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE to
1367 lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
1368 process private. Switch DW_CFA_advance_loc{1,2} and some
1369 DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
1370 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use
1371 #ifdef __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
1372 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1374 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
1375 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
1376 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1378 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
1379 (__pthread_cond_broadcast): Compare %r8 instead of
1380 dep_mutex-cond_*(%rdi) with $-1.
1381 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
1382 (__pthread_cond_signal): Xor FUTEX_WAKE_OP with FUTEX_WAKE instead
1385 2007-08-13 Ulrich Drepper <drepper@redhat.com>
1387 * sysdeps/unix/sysv/linux/i386/i786/Implies: New file.
1389 2007-08-13 Jakub Jelinek <jakub@redhat.com>
1391 * allocatestack.c: Include kernel-features.h.
1392 * pthread_create.c: Likewise.
1393 * pthread_mutex_init.c: Likewise.
1395 * pthread_cond_timedwait.c: Likewise.
1396 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
1397 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
1398 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
1399 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
1400 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
1401 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1402 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1404 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1406 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
1407 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
1408 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
1409 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
1411 2007-08-12 Jakub Jelinek <jakub@redhat.com>
1413 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
1414 [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
1415 byte elements. One of them is the new __shared element.
1416 [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
1417 adjust names of other padding elements.
1418 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
1419 [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
1420 byte elements. One of them is the new __shared element.
1421 [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
1422 adjust names of other padding elements.
1423 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_rwlock_t):
1424 Renamed __pad1 element to __shared, adjust names of other padding
1426 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
1427 (pthread_rwlock_t): Likewise.
1428 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock): Fix a
1431 2007-08-09 Anton Blanchard <anton@samba.org>
1433 * sysdeps/unix/sysv/linux/powerpc/pthread_spin_unlock.c: New file.
1435 2007-08-12 Ulrich Drepper <drepper@redhat.com>
1437 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Include
1438 <kernel-features.h>.
1439 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1441 2007-08-11 Ulrich Drepper <drepper@redhat.com>
1443 * pthreadP.h (PTHREAD_ROBUST_MUTEX_PSHARED): Define.
1444 * pthread_mutex_lock.c: Use it instead of PTHREAD_MUTEX_PSHARED when
1445 dealing with robust mutexes.
1446 * pthread_mutex_timedlock.c: Likewise.
1447 * pthread_mutex_trylock.c: Likewise.
1448 * pthread_mutex_unlock.c: Likewise.
1449 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
1451 2007-08-06 Jakub Jelinek <jakub@redhat.com>
1453 * pthreadP.h (PTHREAD_MUTEX_PSHARED_BIT): Define.
1454 (PTHREAD_MUTEX_TYPE): Mask __kind with 127.
1455 (PTHREAD_MUTEX_PSHARED): Define.
1456 * pthread_mutex_init.c (__pthread_mutex_init): Set
1457 PTHREAD_MUTEX_PSHARED_BIT for pshared or robust
1459 * pthread_mutex_lock.c (LLL_MUTEX_LOCK): Take mutex as argument
1460 instead of its __data.__lock field, pass PTHREAD_MUTEX_PSHARED
1461 as second argument to lll_lock.
1462 (LLL_MUTEX_TRYLOCK): Take mutex as argument
1463 instead of its __data.__lock field.
1464 (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
1465 __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
1467 (__pthread_mutex_lock): Update LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
1468 LLL_ROBUST_MUTEX_LOCK users, use PTHREAD_MUTEX_TYPE (mutex)
1469 instead of mutex->__data.__kind directly, pass
1470 PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock and lll_futex_wait.
1471 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Use
1472 PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
1473 directly, pass PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock.
1474 (pthread_mutex_timedlock): Pass PTHREAD_MUTEX_PSHARED (mutex)
1475 to lll_timedlock, lll_robust_timedlock, lll_unlock and
1476 lll_futex_timed_wait. Use PTHREAD_MUTEX_TYPE (mutex) instead
1477 of mutex->__data.__kind directly.
1478 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Pass
1479 PTHREAD_MUTEX_PSHARED (mutex) to lll_timedlock,
1480 lll_robust_timedlock, lll_unlock and lll_futex_timed_wait. Use
1481 PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind directly.
1482 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Pass
1483 PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock, lll_robust_unlock
1485 * pthread_mutex_setprioceiling.c (pthread_mutex_setprioceiling): Pass
1486 PTHREAD_MUTEX_PSHARED (mutex) to lll_futex_wait and lll_futex_wake.
1487 Use PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
1489 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK):
1490 Take mutex as argument instead of its __data.__lock field, pass
1491 PTHREAD_MUTEX_PSHARED as second argument to lll_cond_lock.
1492 (LLL_MUTEX_TRYLOCK): Take mutex as argument instead of its
1493 __data.__lock field.
1494 (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
1495 __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
1496 to lll_robust_cond_lock.
1497 * pthread_cond_broadcast.c (__pthread_cond_broadcast): Add pshared
1498 variable, pass it to lll_lock, lll_unlock, lll_futex_requeue and
1499 lll_futex_wake. Don't use lll_futex_requeue if dependent mutex
1500 has PTHREAD_MUTEX_PSHARED_BIT bit set in its __data.__kind.
1501 * pthread_cond_destroy.c (__pthread_cond_destroy): Add pshared
1502 variable, pass it to lll_lock, lll_unlock, lll_futex_wake and
1504 * pthread_cond_signal.c (__pthread_cond_signal): Add pshared
1505 variable, pass it to lll_lock, lll_unlock, lll_futex_wake_unlock and
1507 * pthread_cond_timedwait.c (__pthread_cond_wait): Add
1508 pshared variable, pass it to lll_lock, lll_unlock,
1509 lll_futex_timedwait and lll_futex_wake.
1510 * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait): Add
1511 pshared variable, pass it to lll_lock, lll_unlock, lll_futex_wait
1513 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_requeue,
1514 lll_futex_wake_unlock): Add private argument, use __lll_private_flag
1516 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue,
1517 lll_futex_wake_unlock): Likewise.
1518 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_requeue):
1520 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_futex_requeue,
1521 lll_futex_wake_unlock): Likewise.
1522 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_requeue):
1524 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue,
1525 lll_futex_wake_unlock): Likewise.
1526 (lll_futex_wake): Fix a typo.
1527 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym (PS_BIT): Add.
1528 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
1529 (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
1530 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
1531 Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
1532 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
1533 (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
1534 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
1535 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1536 (__pthread_cond_timedwait): Likewise.
1537 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
1538 (__condvar_cleanup, __pthread_cond_wait): Likewise.
1540 2007-08-05 Jakub Jelinek <jakub@redhat.com>
1542 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
1543 Don't use CGOTSETUP and CGOTRESTORE macros.
1544 (CGOTSETUP, CGOTRESTORE): Remove.
1545 <IS_IN_rtld> (CENABLE, CDISABLE): Don't use JUMPTARGET, branch to
1548 2007-08-01 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1550 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Remove
1551 definitions for private futexes.
1552 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Include
1553 kernel-features.h and lowlevellock.h. Use private futexes if
1555 (__lll_lock_wait_private, __lll_unlock_wake_private): New.
1556 (__lll_mutex_lock_wait): Rename to
1557 (__lll_lock_wait): ... this. Don't compile in for libc.so.
1558 (__lll_mutex_timedlock_wait): Rename to ...
1559 (__lll_timedlock_wait): ... this. Use __NR_gettimeofday.
1560 Don't compile in for libc.so.
1561 (__lll_mutex_unlock_wake): Rename to ...
1562 (__lll_unlock_wake): ... this. Don't compile in for libc.so.
1563 (__lll_timedwait_tid): Use __NR_gettimeofday.
1564 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Allow including
1565 the header from assembler. Renamed all lll_mutex_* resp.
1566 lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
1567 Renamed all LLL_MUTEX_LOCK_* macros to LLL_LOCK_*.
1568 (FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE):
1570 (__lll_lock_wait_private): Add prototype.
1571 (__lll_lock_wait, __lll_timedlock_wait, __lll_robust_lock_wait,
1572 __lll_robust_timedlock_wait, __lll_unlock_wake_private,
1573 __lll_unlock_wake): Likewise.
1574 (lll_lock): Add private argument. Call __lll_lock_wait_private
1575 if private is constant LLL_PRIVATE.
1576 (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
1577 lll_timedlock, lll_robust_timedlock): Add private argument.
1578 (lll_unlock): Add private argument. Call __lll_unlock_wake_private
1579 if private is constant LLL_PRIVATE.
1580 (lll_robust_unlock, lll_robust_dead): Add private argument.
1581 (lll_lock_t): Remove.
1582 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
1583 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
1584 lll_cond_wake, lll_cond_broadcast): Remove.
1585 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: Include
1586 kernel-features.h and lowlevellock.h.
1587 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
1588 (LOAD_FUTEX_WAIT): Define.
1589 (__lll_robust_mutex_lock_wait): Rename to ...
1590 (__lll_robust_lock_wait): ... this. Add private argument.
1591 Use LOAD_FUTEX_WAIT macro.
1592 (__lll_robust_mutex_timedlock_wait): Rename to ...
1593 (__lll_robust_timedlock_wait): ... this. Add private argument.
1594 Use __NR_gettimeofday. Use LOAD_FUTEX_WAIT macro.
1595 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Include
1597 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
1598 (pthread_barrier_wait): Use __lll_{lock,unlock}_* instead of
1599 __lll_mutex_{lock,unlock}_*.
1600 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Include
1601 lowlevellock.h and pthread-errnos.h.
1602 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
1603 FUTEX_CMP_REQUEUE, EINVAL): Remove.
1604 (__pthread_cond_broadcast): Use __lll_{lock,unlock}_* instead of
1605 __lll_mutex_{lock,unlock}_*.
1606 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Include
1607 lowlevellock.h and pthread-errnos.h.
1608 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE, EINVAL): Remove.
1609 (__pthread_cond_signal): Use __lll_{lock,unlock}_* instead of
1610 __lll_mutex_{lock,unlock}_*.
1611 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
1613 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE): Remove.
1614 (__pthread_cond_timedwait): Use __lll_{lock,unlock}_* instead of
1615 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
1616 (__condvar_tw_cleanup): Likewise.
1617 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
1619 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
1620 (__pthread_cond_wait): Use __lll_{lock,unlock}_* instead of
1621 __lll_mutex_{lock,unlock}_*.
1622 ( __condvar_w_cleanup): Likewise.
1623 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Include lowlevellock.h.
1624 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
1625 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Include
1627 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
1628 (__pthread_rwlock_rdlock): Use __lll_{lock,unlock}_* instead of
1629 __lll_mutex_{lock,unlock}_*.
1630 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Include
1632 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
1633 FUTEX_PRIVATE_FLAG): Remove.
1634 (pthread_rwlock_timedrdlock): Use __lll_{lock,unlock}_* instead of
1635 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
1636 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Include
1638 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
1639 FUTEX_PRIVATE_FLAG): Remove.
1640 (pthread_rwlock_timedwrlock): Use __lll_{lock,unlock}_* instead of
1641 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
1642 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Include
1644 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
1645 (__pthread_rwlock_unlock): Use __lll_{lock,unlock}_* instead of
1646 __lll_mutex_{lock,unlock}_*.
1647 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Include
1649 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
1650 (__pthread_rwlock_wrlock): Use __lll_{lock,unlock}_* instead of
1651 __lll_mutex_{lock,unlock}_*.
1652 * sysdeps/unix/sysv/linux/sh/sem_post.S: Include lowlevellock.h.
1653 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
1654 (__new_sem_post): Use standard initial exec code sequences.
1655 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Include
1657 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
1658 FUTEX_PRIVATE_FLAG): Remove.
1659 (sem_timedwait): Use __NR_gettimeofday. Use standard initial
1660 exec code sequences.
1661 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Include lowlevellock.h.
1662 (__new_sem_trywait): Use standard initial exec code sequences.
1663 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Include lowlevellock.h.
1664 (__new_sem_wait): Use standard initial exec code sequences.
1666 2007-07-31 Anton Blanchard <anton@samba.org>
1668 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
1669 Use __asm __volatile (__lll_acq_instr ::: "memory") instead of
1670 atomic_full_barrier.
1672 2007-07-31 Jakub Jelinek <jakub@redhat.com>
1674 * allocatestack.c (stack_cache_lock): Change type to int.
1675 (get_cached_stack, allocate_stack, __deallocate_stack,
1676 __make_stacks_executable, __find_thread_by_id, __nptl_setxid,
1677 __pthread_init_static_tls, __wait_lookup_done): Add LLL_PRIVATE
1678 as second argument to lll_lock and lll_unlock macros on
1680 * pthread_create.c (__find_in_stack_list): Likewise.
1681 (start_thread): Similarly with pd->lock. Use lll_robust_dead
1682 macro instead of lll_robust_mutex_dead, pass LLL_SHARED to it
1684 * descr.h (struct pthread): Change lock and setxid_futex field
1686 * old_pthread_cond_broadcast.c (__pthread_cond_broadcast_2_0): Use
1687 LLL_LOCK_INITIALIZER instead of LLL_MUTEX_LOCK_INITIALIZER.
1688 * old_pthread_cond_signal.c (__pthread_cond_signal_2_0): Likewise.
1689 * old_pthread_cond_timedwait.c (__pthread_cond_timedwait_2_0):
1691 * old_pthread_cond_wait.c (__pthread_cond_wait_2_0): Likewise.
1692 * pthread_cond_init.c (__pthread_cond_init): Likewise.
1693 * pthreadP.h (__attr_list_lock): Change type to int.
1694 * pthread_attr_init.c (__attr_list_lock): Likewise.
1695 * pthread_barrier_destroy.c (pthread_barrier_destroy): Pass
1696 ibarrier->private ^ FUTEX_PRIVATE_FLAG as second argument to
1698 * pthread_barrier_wait.c (pthread_barrier_wait): Likewise and
1699 also for lll_futex_{wake,wait}.
1700 * pthread_barrier_init.c (pthread_barrier_init): Make iattr
1702 * pthread_cond_broadcast.c (__pthread_cond_broadcast): Pass
1703 LLL_SHARED as second argument to lll_{,un}lock.
1704 * pthread_cond_destroy.c (__pthread_cond_destroy): Likewise.
1705 * pthread_cond_signal.c (__pthread_cond_singal): Likewise.
1706 * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
1707 * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait):
1709 * pthread_getattr_np.c (pthread_getattr_np): Add LLL_PRIVATE
1710 as second argument to lll_{,un}lock macros on pd->lock.
1711 * pthread_getschedparam.c (__pthread_getschedparam): Likewise.
1712 * pthread_setschedparam.c (__pthread_setschedparam): Likewise.
1713 * pthread_setschedprio.c (pthread_setschedprio): Likewise.
1714 * tpp.c (__pthread_tpp_change_priority, __pthread_current_priority):
1716 * sysdeps/pthread/createthread.c (do_clone, create_thread):
1718 * pthread_once.c (once_lock): Change type to int.
1719 (__pthread_once): Pass LLL_PRIVATE as second argument to
1720 lll_{,un}lock macros on once_lock.
1721 * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Use
1722 lll_{,un}lock macros instead of lll_mutex_{,un}lock, pass
1723 rwlock->__data.__shared as second argument to them and similarly
1725 * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock):
1727 * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock):
1729 * pthread_rwlock_tryrdlock.c (__pthread_rwlock_tryrdlock): Likewise.
1730 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Likewise.
1731 * pthread_rwlock_unlock.c (__pthread_rwlock_unlock): Likewise.
1732 * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
1733 * sem_close.c (sem_close): Pass LLL_PRIVATE as second argument
1734 to lll_{,un}lock macros on __sem_mappings_lock.
1735 * sem_open.c (check_add_mapping): Likewise.
1736 (__sem_mappings_lock): Change type to int.
1737 * semaphoreP.h (__sem_mappings_lock): Likewise.
1738 * pthread_mutex_lock.c (LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
1739 LLL_ROBUST_MUTEX_LOCK): Use lll_{,try,robust_}lock macros
1740 instead of lll_*mutex_*, pass LLL_SHARED as last
1742 (__pthread_mutex_lock): Use lll_unlock instead of lll_mutex_unlock,
1743 pass LLL_SHARED as last argument.
1744 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK,
1745 LLL_MUTEX_TRYLOCK, LLL_ROBUST_MUTEX_LOCK): Use
1746 lll_{cond_,cond_try,robust_cond}lock macros instead of lll_*mutex_*,
1747 pass LLL_SHARED as last argument.
1748 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
1749 lll_{timed,try,robust_timed,un}lock instead of lll_*mutex*, pass
1750 LLL_SHARED as last argument.
1751 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Similarly.
1752 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt):
1754 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_lock,
1755 __libc_lock_lock_recursive, __libc_lock_unlock,
1756 __libc_lock_unlock_recursive): Pass LLL_PRIVATE as second
1757 argument to lll_{,un}lock.
1758 * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_lock,
1759 _IO_lock_unlock): Likewise.
1760 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Don't use
1762 * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
1763 Pass LLL_PRIVATE as second argument to lll_{,un}lock macros on
1765 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork,
1766 free_mem): Likewise.
1767 (__fork_lock): Change type to int.
1768 * sysdeps/unix/sysv/linux/fork.h (__fork_lock): Likewise.
1769 * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Pass
1770 isem->private ^ FUTEX_PRIVATE_FLAG as second argument to
1772 * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
1773 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Likewise.
1774 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait_private):
1776 (__lll_lock_wait, __lll_timedlock_wait): Add private argument and
1777 pass it through to lll_futex_*wait, only compile in when
1779 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
1780 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): Add private
1781 argument and pass it through to lll_futex_*wait.
1782 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Renamed all
1783 lll_mutex_* resp. lll_robust_mutex_* macros to lll_* resp.
1784 lll_robust_*. Renamed all __lll_mutex_* resp. __lll_robust_mutex_*
1785 inline functions to __lll_* resp. __lll_robust_*.
1786 (LLL_MUTEX_LOCK_INITIALIZER): Remove.
1787 (lll_mutex_dead): Add private argument.
1788 (__lll_lock_wait_private): New prototype.
1789 (__lll_lock_wait, __lll_robust_lock_wait, __lll_lock_timedwait,
1790 __lll_robust_lock_timedwait): Add private argument to prototypes.
1791 (__lll_lock): Add private argument, if it is constant LLL_PRIVATE,
1792 call __lll_lock_wait_private, otherwise pass private to
1794 (__lll_robust_lock, __lll_cond_lock, __lll_timedlock,
1795 __lll_robust_timedlock): Add private argument, pass it to
1796 __lll_*wait functions.
1797 (__lll_unlock): Add private argument, if it is constant LLL_PRIVATE,
1798 call __lll_unlock_wake_private, otherwise pass private to
1800 (__lll_robust_unlock): Add private argument, pass it to
1801 __lll_robust_unlock_wake.
1802 (lll_lock, lll_robust_lock, lll_cond_lock, lll_timedlock,
1803 lll_robust_timedlock, lll_unlock, lll_robust_unlock): Add private
1804 argument, pass it through to __lll_* inline function.
1805 (__lll_mutex_unlock_force, lll_mutex_unlock_force): Remove.
1806 (lll_lock_t): Remove.
1807 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
1808 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
1809 lll_cond_wake, lll_cond_broadcast): Remove.
1810 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
1811 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
1812 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
1813 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
1814 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Allow including
1815 the header from assembler. Renamed all lll_mutex_* resp.
1816 lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
1817 (LOCK, FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP,
1818 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
1819 (LLL_MUTEX_LOCK_INITIALIZER, LLL_MUTEX_LOCK_INITIALIZER_LOCKED,
1820 LLL_MUTEX_LOCK_INITIALIZER_WAITERS): Remove.
1821 (__lll_mutex_lock_wait, __lll_mutex_timedlock_wait,
1822 __lll_mutex_unlock_wake, __lll_lock_wait, __lll_unlock_wake):
1824 (__lll_trylock_asm, __lll_lock_asm_start, __lll_unlock_asm): Define.
1825 (lll_robust_trylock, lll_cond_trylock): Use LLL_LOCK_INITIALIZER*
1826 rather than LLL_MUTEX_LOCK_INITIALIZER* macros.
1827 (lll_trylock): Likewise, use __lll_trylock_asm, pass
1828 MULTIPLE_THREADS_OFFSET as another asm operand.
1829 (lll_lock): Add private argument, use __lll_lock_asm_start, pass
1830 MULTIPLE_THREADS_OFFSET as last asm operand, call
1831 __lll_lock_wait_private if private is constant LLL_PRIVATE,
1832 otherwise pass private as another argument to __lll_lock_wait.
1833 (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
1834 lll_timedlock, lll_robust_timedlock): Add private argument, pass
1835 private as another argument to __lll_*lock_wait call.
1836 (lll_unlock): Add private argument, use __lll_unlock_asm, pass
1837 MULTIPLE_THREADS_OFFSET as another asm operand, call
1838 __lll_unlock_wake_private if private is constant LLL_PRIVATE,
1839 otherwise pass private as another argument to __lll_unlock_wake.
1840 (lll_robust_unlock): Add private argument, pass private as another
1841 argument to __lll_unlock_wake.
1842 (lll_robust_dead): Add private argument, use __lll_private_flag
1844 (lll_islocked): Use LLL_LOCK_INITIALIZER instead of
1845 LLL_MUTEX_LOCK_INITIALIZER.
1846 (lll_lock_t): Remove.
1847 (LLL_LOCK_INITIALIZER_WAITERS): Define.
1848 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
1849 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
1850 lll_cond_wake, lll_cond_broadcast): Remove.
1851 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
1852 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Revert
1853 2007-05-2{3,9} changes.
1854 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Include
1855 kernel-features.h and lowlevellock.h.
1856 (LOAD_PRIVATE_FUTEX_WAIT): Define.
1857 (LOAD_FUTEX_WAIT): Rewritten.
1858 (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
1860 (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
1861 (__lll_mutex_lock_wait): Rename to ...
1862 (__lll_lock_wait): ... this. Take futex addr from %edx instead of
1863 %ecx, %ecx is now private argument. Don't compile in for libc.so.
1864 (__lll_mutex_timedlock_wait): Rename to ...
1865 (__lll_timedlock_wait): ... this. Use __NR_gettimeofday. %esi
1866 contains private argument. Don't compile in for libc.so.
1867 (__lll_mutex_unlock_wake): Rename to ...
1868 (__lll_unlock_wake): ... this. %ecx contains private argument.
1869 Don't compile in for libc.so.
1870 (__lll_timedwait_tid): Use __NR_gettimeofday.
1871 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Include
1872 kernel-features.h and lowlevellock.h.
1873 (LOAD_FUTEX_WAIT): Define.
1874 (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
1876 (__lll_robust_mutex_lock_wait): Rename to ...
1877 (__lll_robust_lock_wait): ... this. Futex addr is now in %edx
1878 argument, %ecx argument contains private. Use LOAD_FUTEX_WAIT
1880 (__lll_robust_mutex_timedlock_wait): Rename to ...
1881 (__lll_robust_timedlock_wait): ... this. Use __NR_gettimeofday.
1882 %esi argument contains private, use LOAD_FUTEX_WAIT macro.
1883 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Include
1885 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1886 (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
1887 PRIVATE(%ebx) ^ LLL_SHARED as private argument in %ecx to
1888 __lll_lock_wait and __lll_unlock_wake, pass MUTEX(%ebx) address
1889 to __lll_lock_wait in %edx.
1890 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
1891 Include lowlevellock.h and pthread-errnos.h.
1892 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
1893 FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
1894 (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*, pass
1895 cond_lock address in %edx rather than %ecx to __lll_lock_wait,
1896 pass LLL_SHARED in %ecx to both __lll_lock_wait and
1898 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
1899 Include lowlevellock.h and pthread-errnos.h.
1900 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
1901 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
1902 (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*, pass
1903 cond_lock address in %edx rather than %ecx to __lll_lock_wait,
1904 pass LLL_SHARED in %ecx to both __lll_lock_wait and
1906 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
1907 Include lowlevellock.h.
1908 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
1910 (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*, pass
1911 cond_lock address in %edx rather than %ecx to __lll_lock_wait,
1912 pass LLL_SHARED in %ecx to both __lll_lock_wait and
1913 __lll_unlock_wake. Use __NR_gettimeofday.
1914 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
1915 Include lowlevellock.h.
1916 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1917 (__pthread_cond_wait, __condvar_w_cleanup): Rename __lll_mutex_*
1918 to __lll_*, pass cond_lock address in %edx rather than %ecx to
1919 __lll_lock_wait, pass LLL_SHARED in %ecx to both __lll_lock_wait
1920 and __lll_unlock_wake.
1921 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S:
1922 Include lowlevellock.h.
1923 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1924 (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*, pass
1925 MUTEX(%ebx) address in %edx rather than %ecx to
1926 __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
1927 and __lll_unlock_wake. Move return value from %ecx to %edx
1929 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1930 Include lowlevellock.h.
1931 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
1933 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
1934 MUTEX(%ebp) address in %edx rather than %ecx to
1935 __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
1936 and __lll_unlock_wake. Move return value from %ecx to %edx
1937 register. Use __NR_gettimeofday.
1938 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1939 Include lowlevellock.h.
1940 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
1942 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
1943 MUTEX(%ebp) address in %edx rather than %ecx to
1944 __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
1945 and __lll_unlock_wake. Move return value from %ecx to %edx
1946 register. Use __NR_gettimeofday.
1947 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
1948 Include lowlevellock.h.
1949 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1950 (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*, pass
1951 MUTEX(%edi) address in %edx rather than %ecx to
1952 __lll_lock_wait, pass PSHARED(%edi) in %ecx to both __lll_lock_wait
1953 and __lll_unlock_wake.
1954 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
1955 Include lowlevellock.h.
1956 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1957 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
1958 MUTEX(%ebx) address in %edx rather than %ecx to
1959 __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
1960 and __lll_unlock_wake. Move return value from %ecx to %edx
1962 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Include
1964 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
1966 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Include lowlevellock.h.
1967 (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
1968 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Include
1970 (LOCK, SYS_futex, SYS_gettimeofday, FUTEX_WAIT): Don't define.
1971 (sem_timedwait): Use __NR_gettimeofday.
1972 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Include
1974 (LOCK): Don't define.
1975 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include
1977 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
1978 * sysdeps/unix/sysv/linux/powerpc/sem_post.c: Wake only when there
1980 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Revert
1981 2007-05-2{3,9} changes.
1982 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Include
1983 kernel-features.h and lowlevellock.h.
1984 (LOAD_PRIVATE_FUTEX_WAIT): Define.
1985 (LOAD_FUTEX_WAIT): Rewritten.
1986 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
1987 (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
1988 (__lll_mutex_lock_wait): Rename to ...
1989 (__lll_lock_wait): ... this. %esi is now private argument.
1990 Don't compile in for libc.so.
1991 (__lll_mutex_timedlock_wait): Rename to ...
1992 (__lll_timedlock_wait): ... this. %esi contains private argument.
1993 Don't compile in for libc.so.
1994 (__lll_mutex_unlock_wake): Rename to ...
1995 (__lll_unlock_wake): ... this. %esi contains private argument.
1996 Don't compile in for libc.so.
1997 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Include
1998 kernel-features.h and lowlevellock.h.
1999 (LOAD_FUTEX_WAIT): Define.
2000 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
2001 (__lll_robust_mutex_lock_wait): Rename to ...
2002 (__lll_robust_lock_wait): ... this. %esi argument contains private.
2003 Use LOAD_FUTEX_WAIT macro.
2004 (__lll_robust_mutex_timedlock_wait): Rename to ...
2005 (__lll_robust_timedlock_wait): ... this. %esi argument contains
2006 private, use LOAD_FUTEX_WAIT macro.
2007 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Include
2009 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2010 (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
2011 PRIVATE(%rdi) ^ LLL_SHARED as private argument in %esi to
2012 __lll_lock_wait and __lll_unlock_wake.
2013 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S:
2014 Include lowlevellock.h and pthread-errnos.h.
2015 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
2016 FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
2017 (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*,
2018 pass LLL_SHARED in %esi to both __lll_lock_wait and
2020 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S:
2021 Include lowlevellock.h and pthread-errnos.h.
2022 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
2023 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
2024 (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*,
2025 pass LLL_SHARED in %esi to both __lll_lock_wait and
2027 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:
2028 Include lowlevellock.h.
2029 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2030 (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*,
2031 pass LLL_SHARED in %esi to both __lll_lock_wait and
2033 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
2034 Include lowlevellock.h.
2035 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2036 (__pthread_cond_wait, __condvar_cleanup): Rename __lll_mutex_*
2037 to __lll_*, pass LLL_SHARED in %esi to both __lll_lock_wait
2038 and __lll_unlock_wake.
2039 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S:
2040 Include lowlevellock.h.
2041 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
2043 (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*,
2044 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
2045 and __lll_unlock_wake.
2046 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
2047 Include lowlevellock.h.
2048 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
2050 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
2051 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
2052 and __lll_unlock_wake.
2053 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
2054 Include lowlevellock.h.
2055 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
2057 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
2058 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
2059 and __lll_unlock_wake.
2060 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S:
2061 Include lowlevellock.h.
2062 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
2064 (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*,
2065 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
2066 and __lll_unlock_wake.
2067 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S:
2068 Include lowlevellock.h.
2069 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
2071 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
2072 pass PSHARED(%rdi) in %ecx to both __lll_lock_wait
2073 and __lll_unlock_wake.
2074 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Include
2076 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
2078 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Include lowlevellock.h.
2079 (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
2080 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Include
2082 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
2083 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Include
2085 (LOCK): Don't define.
2086 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Include
2088 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
2089 * sysdeps/unix/sysv/linux/sparc/internaltypes.h: New file.
2090 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_destroy.c: New file.
2091 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_init.c: New file.
2092 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_wait.c: New file.
2093 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
2094 (__lll_lock_wait_private): New function.
2095 (__lll_lock_wait, __lll_timedlock_wait): Add private argument, pass
2096 it to lll_futex_*wait. Don't compile in for libc.so.
2097 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c:
2099 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c
2100 (struct sparc_pthread_barrier): Remove.
2101 (pthread_barrier_wait): Use union sparc_pthread_barrier instead of
2102 struct sparc_pthread_barrier. Pass
2103 ibarrier->s.pshared ? LLL_SHARED : LLL_PRIVATE to lll_{,un}lock
2104 and lll_futex_wait macros.
2105 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
2107 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
2108 Include sparc pthread_barrier_wait.c instead of generic one.
2110 2007-07-30 Jakub Jelinek <jakub@redhat.com>
2112 * tst-rwlock14.c (do_test): Avoid warnings on 32-bit arches.
2114 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
2115 (pthread_rwlock_timedrdlock): Copy futex retval to %esi rather than
2117 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
2118 (pthread_rwlock_timedwrlock): Likewise.
2119 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
2120 (__pthread_rwlock_unlock): Fix MUTEX != 0 args to __lll_*.
2122 2007-07-31 Jakub Jelinek <jakub@redhat.com>
2124 * sysdeps/sparc/tls.h (tcbhead_t): Add private_futex field.
2126 2007-07-26 Jakub Jelinek <jakub@redhat.com>
2128 * tst-locale2.c (useless): Add return statement.
2130 2007-07-24 Jakub Jelinek <jakub@redhat.com>
2132 * allocatestack.c (__nptl_setxid, __wait_lookup_done): Replace
2133 lll_private_futex_* (*) with lll_futex_* (*, LLL_PRIVATE).
2134 * pthread_create.c (start_thread): Likewise.
2135 * init.c (sighandler_setxid): Likewise.
2136 * sysdeps/alpha/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
2137 * sysdeps/ia64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
2138 * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
2139 * sysdeps/s390/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
2140 * sysdeps/powerpc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
2141 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
2142 * sysdeps/sparc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
2143 * sysdeps/sh/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
2144 * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY, AIO_MISC_WAIT):
2146 * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY, GAI_MISC_WAIT):
2148 * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
2150 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_waitzero,
2151 __rtld_notify): Likewise.
2152 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Likewise.
2153 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (clear_once_control,
2154 __pthread_once): Likewise.
2155 * sysdeps/unix/sysv/linux/alpha/pthread_once.c (clear_once_control,
2156 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
2157 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_PRIVATE_FLAG,
2158 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
2159 (lll_futex_wait): Add private argument, define as wrapper around
2160 lll_futex_timed_wait.
2161 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
2162 use __lll_private_flag macro.
2163 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
2164 __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
2165 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (clear_once_control,
2166 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
2167 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_PRIVATE_FLAG,
2168 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
2169 (lll_futex_wait): Add private argument, define as wrapper around
2170 lll_futex_timed_wait.
2171 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
2172 use __lll_private_flag macro.
2173 (__lll_mutex_unlock, __lll_robust_mutex_unlock, lll_wait_tid,
2174 __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
2175 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
2177 (lll_futex_timed_wait, lll_futex_wake): Use it.
2178 (lll_private_futex_wait, lll_private_futex_timed_wait,
2179 lll_private_futex_wake): Removed.
2180 * sysdeps/unix/sysv/linux/s390/pthread_once.c (clear_once_control,
2181 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
2182 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_PRIVATE_FLAG,
2183 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
2184 (lll_futex_wait): Add private argument, define as wrapper around
2185 lll_futex_timed_wait.
2186 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
2187 use __lll_private_flag macro.
2188 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
2189 lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
2191 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
2192 (lll_private_futex_wait, lll_private_futex_timed_wait,
2193 lll_private_futex_wake): Removed.
2194 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_private_flag):
2195 Fix !__ASSUME_PRIVATE_FUTEX non-constant private case.
2196 (lll_private_futex_wait, lll_private_futex_timed_wait,
2197 lll_private_futex_wake): Removed.
2198 * sysdeps/unix/sysv/linux/sparc/pthread_once.c (clear_once_control,
2199 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
2200 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_PRIVATE_FLAG,
2201 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
2202 (lll_futex_wait): Add private argument, define as wrapper around
2203 lll_futex_timed_wait.
2204 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
2205 use __lll_private_flag macro.
2206 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
2207 lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
2209 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (__lll_private_flag):
2211 (lll_futex_timed_wait, lll_futex_wake): Use it.
2212 (lll_private_futex_wait, lll_private_futex_timed_wait,
2213 lll_private_futex_wake): Removed.
2215 2007-07-27 Jakub Jelinek <jakub@redhat.com>
2217 * sysdeps/sparc/tls.h (tcbhead_t): Move gscope_flag to the end
2218 of the structure for sparc32.
2220 2007-07-26 Aurelien Jarno <aurelien@aurel32.net>
2222 * sysdeps/sparc/tls.h (tcbhead_t): Add gscope_flag.
2224 2007-07-23 Ulrich Drepper <drepper@redhat.com>
2226 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
2227 code used when private futexes are assumed.
2228 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
2231 2007-07-23 Jakub Jelinek <jakub@redhat.com>
2233 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
2234 (__lll_private_flag): Define.
2235 (lll_futex_wait): Define as a wrapper around lll_futex_timed_wait.
2236 (lll_futex_timed_wait, lll_futex_wake, lll_futex_wake_unlock): Use
2238 (lll_private_futex_wait, lll_private_futex_timedwait,
2239 lll_private_futex_wake): Define as wrapper around non-_private
2241 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
2242 (__lll_private_flag): Define.
2243 (lll_futex_timed_wait, lll_futex_wake): Use __lll_private_flag.
2244 (lll_private_futex_wait, lll_private_futex_timedwait,
2245 lll_private_futex_wake): Define as wrapper around non-_private
2248 2007-07-10 Steven Munroe <sjmunroe@us.ibm.com>
2250 * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Add LLL_SHARED
2251 parameter to lll_futex_wait call.
2252 * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
2254 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
2255 Replace lll_futex_wait with lll_private_futex_wait.
2256 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
2257 Add LLL_SHARED parameter to lll_futex_wake().
2259 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define LLL_PRIVATE
2260 LLL_SHARED, lll_private_futex_wait, lll_private_futex_timed_wait and
2261 lll_private_futex_wake.
2262 (lll_futex_wait): Add private parameter. Adjust FUTEX_PRIVATE_FLAG
2263 bit from private parm before syscall.
2264 (lll_futex_timed_wait): Likewise.
2265 (lll_futex_wake): Likewise.
2266 (lll_futex_wake_unlock): Likewise.
2267 (lll_mutex_unlock): Add LLL_SHARED parm to lll_futex_wake call.
2268 (lll_robust_mutex_unlock): Likewise.
2269 (lll_mutex_unlock_force): Likewise.
2270 (lll_wait_tid): Add LLL_SHARED parm to lll_futex_wait call.
2272 2007-07-23 Ulrich Drepper <drepper@redhat.com>
2274 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
2275 compilation when unconditionally using private futexes.
2276 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
2277 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
2279 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
2280 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
2282 2007-07-17 Jakub Jelinek <jakub@redhat.com>
2284 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock_clear_flags2):
2287 2007-07-06 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2289 * sysdeps/sh/tls.h: Include stdlib.h, list.h, sysdep.h and
2292 2007-05-16 Roland McGrath <roland@redhat.com>
2294 * init.c (__nptl_initial_report_events): New variable.
2295 (__pthread_initialize_minimal_internal): Initialize pd->report_events
2298 2007-06-22 Jakub Jelinek <jakub@redhat.com>
2300 * pthread_getattr_np.c (pthread_getattr_np): Clear cpuset and
2301 cpusetsize if pthread_getaffinity_np failed with ENOSYS.
2303 2007-06-19 Ulrich Drepper <drepper@redhat.com>
2305 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Remove mrlock
2308 2007-06-18 Ulrich Drepper <drepper@redhat.com>
2310 * pthreadP.h: Define PTHREAD_MUTEX_TYPE.
2311 * phtread_mutex_lock.c: Use PTHREAD_MUTEX_TYPE.
2312 * pthread_mutex_timedlock.c: Likewise.
2313 * pthread_mutex_trylock.c: Likewise.
2314 * pthread_mutex_unlock.c: Likewise.
2316 2007-06-17 Andreas Schwab <schwab@suse.de>
2318 * sysdeps/pthread/pt-initfini.c: Tell gcc about the nonstandard
2321 2007-06-17 Ulrich Drepper <drepper@redhat.com>
2323 * allocatestack.c (allocate_stack): Make code compile if
2324 __ASSUME_PRIVATE_FUTEX is set.
2326 2007-06-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2328 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S:
2329 (__pthread_rwlock_rdlock): Don't use non SH-3/4 instruction.
2330 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S:
2331 (__pthread_rwlock_wrlock): Likewise.
2332 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
2333 (pthread_rwlock_timedrdlock): Likewise.
2334 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
2335 (pthread_rwlock_timedwrlock): Likewise.
2336 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S:
2337 (__pthread_rwlock_unlock): Likewise.
2339 2007-06-10 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2341 * sysdeps/sh/tcb-offsets.sym: Add PRIVATE_FUTEX.
2342 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Include endian.h.
2343 Split __flags into __flags, __shared, __pad1 and __pad2.
2344 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Use private
2345 futexes if they are available.
2346 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Adjust so that change
2347 in libc-lowlevellock.S allow using private futexes.
2348 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
2349 FUTEX_PRIVATE_FLAG. Add additional parameter to lll_futex_wait,
2350 lll_futex_timed_wait and lll_futex_wake. Change lll_futex_wait
2351 to call lll_futex_timed_wait. Add lll_private_futex_wait,
2352 lll_private_futex_timed_wait and lll_private_futex_wake.
2353 (lll_robust_mutex_unlock): Fix typo.
2354 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Use private
2355 field in futex command setup.
2356 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Use
2357 COND_NWAITERS_SHIFT instead of COND_CLOCK_BITS.
2358 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
2359 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use private futexes
2360 if they are available. Remove clear_once_control.
2361 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Use private
2362 futexes if they are available.
2363 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
2364 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
2365 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
2366 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
2367 * sysdeps/unix/sysv/linux/sh/sem_post.S: Add private futex support.
2368 Wake only when there are waiters.
2369 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add private futex
2370 support. Indicate that there are waiters. Remove unnecessary
2371 extra cancellation test.
2372 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise. Removed
2373 left-over duplication of __sem_wait_cleanup.
2375 2007-06-07 Ulrich Drepper <drepper@redhat.com>
2377 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Add additional
2378 parameter to lll_futex_wait, lll_futex_timed_wait, and
2379 lll_futex_wake. Change lll_futex_wait to call lll_futex_timed_wait.
2380 Add lll_private_futex_wait, lll_private_futex_timed_wait, and
2381 lll_private_futex_wake.
2382 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
2383 * allocatestack.c: Adjust use of lll_futex_* macros.
2385 * lowlevellock.h: Likewise.
2386 * pthread_barrier_wait.c: Likewise.
2387 * pthread_cond_broadcast.c: Likewise.
2388 * pthread_cond_destroy.c: Likewise.
2389 * pthread_cond_signal.c: Likewise.
2390 * pthread_cond_timedwait.c: Likewise.
2391 * pthread_cond_wait.c: Likewise.
2392 * pthread_create.c: Likewise.
2393 * pthread_mutex_lock.c: Likewise.
2394 * pthread_mutex_setprioceiling.c: Likewise.
2395 * pthread_mutex_timedlock.c: Likewise.
2396 * pthread_mutex_unlock.c: Likewise.
2397 * pthread_rwlock_timedrdlock.c: Likewise.
2398 * pthread_rwlock_timedwrlock.c: Likewise.
2399 * pthread_rwlock_unlock.c: Likewise.
2400 * sysdeps/alpha/tls.h: Likewise.
2401 * sysdeps/i386/tls.h: Likewise.
2402 * sysdeps/ia64/tls.h: Likewise.
2403 * sysdeps/powerpc/tls.h: Likewise.
2404 * sysdeps/pthread/aio_misc.h: Likewise.
2405 * sysdeps/pthread/gai_misc.h: Likewise.
2406 * sysdeps/s390/tls.h: Likewise.
2407 * sysdeps/sh/tls.h: Likewise.
2408 * sysdeps/sparc/tls.h: Likewise.
2409 * sysdeps/unix/sysv/linux/fork.c: Likewise.
2410 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
2411 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: Likewise.
2412 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Likewise.
2413 * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
2414 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
2415 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
2416 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
2417 * sysdeps/unix/sysv/linux/sparc/pthread_once.c: Likewise.
2418 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c:
2420 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: Likewise.
2421 * sysdeps/x86_64/tls.h: Likewise.
2423 2007-05-29 Ulrich Drepper <drepper@redhat.com>
2425 * pthread_getattr_np.c: No need to install a cancellation handler,
2426 this is no cancellation point.
2427 * pthread_getschedparam.c: Likewise.
2428 * pthread_setschedparam.c: Likewise.
2429 * pthread_setschedprio.c: Likewise.
2430 * sysdeps/unix/sysv/linux/lowlevellock.c: Remove all traces of
2432 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
2433 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
2434 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
2435 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2436 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2437 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2438 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
2439 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
2440 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
2441 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: Likewise.
2442 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
2443 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2445 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Checking
2446 whether there are more than one thread makes no sense here since
2447 we only call the slow path if the locks are taken.
2448 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Likewise.
2450 * sysdeps/unix/sysv/linux/internaltypes.h: Introduce
2451 COND_NWAITERS_SHIFT.
2452 * pthread_cond_destroy.c: Use COND_NWAITERS_SHIFT instead of
2454 * pthread_cond_init.c: Likewise.
2455 * pthread_cond_timedwait.c: Likewise.
2456 * pthread_cond_wait.c: Likewise.
2457 * pthread_condattr_getclock.c: Likewise.
2458 * pthread_condattr_setclock.c: Likewise.
2459 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Likewise.
2460 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2461 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
2462 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
2463 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2465 2007-05-28 Jakub Jelinek <jakub@redhat.com>
2467 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c: Include
2470 * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Use explicit
2472 (THREAD_GSCOPE_GET_FLAG): Remove.
2473 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Remove.
2474 * allocatestack.c (__wait_lookup_done): Revert 2007-05-24
2476 * sysdeps/powerpc/tls.h (tcbhead_t): Remove gscope_flag.
2477 (THREAD_GSCOPE_GET_FLAG): Remove.
2478 (THREAD_GSCOPE_RESET_FLAG): Use THREAD_SELF->header.gscope_flag
2479 instead of THREAD_GSCOPE_GET_FLAG.
2480 (THREAD_GSCOPE_SET_FLAG): Likewise. Add atomic_write_barrier after
2482 * sysdeps/s390/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
2483 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
2484 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
2485 THREAD_GSCOPE_WAIT): Define.
2486 * sysdeps/sparc/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
2487 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
2488 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
2489 THREAD_GSCOPE_WAIT): Define.
2490 * sysdeps/sh/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
2491 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
2492 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
2493 THREAD_GSCOPE_WAIT): Define.
2494 * sysdeps/ia64/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
2495 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
2496 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
2497 THREAD_GSCOPE_WAIT): Define.
2499 2007-05-24 Richard Henderson <rth@redhat.com>
2501 * descr.h (struct pthread): Add header.gscope_flag.
2502 * sysdeps/alpha/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
2503 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
2504 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
2505 THREAD_GSCOPE_WAIT): Define.
2507 2007-05-27 Ulrich Drepper <drepper@redhat.com>
2509 * init.c: Make it compile with older kernel headers.
2511 * tst-initializers1.c: Show through exit code which test failed.
2513 * pthread_rwlock_init.c: Also initialize __shared field.
2514 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Split __flags
2515 element in rwlock structure into four byte elements. One of them is
2516 the new __shared element.
2517 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h [__WORDSIZE=32]:
2519 [__WORDSIZE=64]: Renamed __pad1 element int rwlock structure to
2520 __shared, adjust names of other padding elements.
2521 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2522 * sysdeps/pthread/pthread.h: Adjust rwlock initializers.
2523 * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: Add PSHARED.
2524 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define
2526 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Change main
2527 futex to use private operations if possible.
2528 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
2530 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
2532 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
2533 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
2534 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
2535 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2537 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2539 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
2540 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
2542 2007-05-26 Ulrich Drepper <drepper@redhat.com>
2544 * pthreadP.h (PTHREAD_RWLOCK_PREFER_READER_P): Define.
2545 * pthread_rwlock_rdlock.c: Use PTHREAD_RWLOCK_PREFER_READER_P.
2546 * pthread_rwlock_timedrdlock.c: Likewise.
2547 * pthread_rwlock_tryrdlock.c: Likewise.
2549 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S (sem_trywait): Tiny
2552 * sysdeps/unix/sysv/linux/sem_wait.c: Add missing break.
2553 * sysdeps/unix/sysv/linux/sem_timedwait.c: Removed left-over
2554 duplication of __sem_wait_cleanup.
2556 * allocatestack.c: Revert last change.
2558 * sysdeps/i386/tls.h: Likewise.
2559 * sysdeps/x86_64/tls.h: Likewise.
2560 * descr.h [TLS_DTV_AT_TP] (struct pthread): Add private_futex field to
2562 * sysdeps/powerpc/tcb-offsets.sym: Add PRIVATE_FUTEX_OFFSET.
2564 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_barrier):
2566 * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: Add PRIVATE definition.
2567 * pthread_barrier_init.c: Set private flag if pshared and private
2568 futexes are supported.
2569 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Use
2570 private field in futex command setup.
2571 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
2573 2007-05-25 Ulrich Drepper <drepper@redhat.com>
2575 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Add private futex
2577 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
2578 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
2579 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
2580 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
2581 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
2583 * semaphoreP.h: Declare __old_sem_init and __old_sem_wait.
2584 * sem_init.c (__new_sem_init): Rewrite to initialize all three
2585 fields in the structure.
2586 (__old_sem_init): New function.
2587 * sem_open.c: Initialize all fields of the structure.
2588 * sem_getvalue.c: Adjust for renamed element.
2589 * sysdeps/unix/sysv/linux/Makefile [subdir=nptl]
2590 (gen-as-const-headers): Add structsem.sym.
2591 * sysdeps/unix/sysv/linux/structsem.sym: New file.
2592 * sysdeps/unix/sysv/linux/internaltypes.h: Rename struct sem to
2593 struct new_sem. Add struct old_sem.
2594 * sysdeps/unix/sysv/linux/sem_post.c: Wake only when there are waiters.
2595 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
2596 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
2597 * sysdeps/unix/sysv/linux/sem_wait.c: Indicate that there are waiters.
2598 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
2599 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
2600 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
2601 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
2602 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
2603 * Makefile (tests): Add tst-sem10, tst-sem11, tst-sem12.
2604 * tst-sem10.c: New file.
2605 * tst-sem11.c: New file.
2606 * tst-sem12.c: New file.
2607 * tst-typesizes.c: Test struct new_sem and struct old_sem instead
2610 2007-05-25 Ulrich Drepper <drepper@redhat.com>
2611 Jakub Jelinek <jakub@redhat.com>
2613 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
2614 Move __pthread_enable_asynccancel right before futex syscall.
2615 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
2618 2007-05-24 Jakub Jelinek <jakub@redhat.com>
2620 * sysdeps/i386/tls.h (THREAD_SET_PRIVATE_FUTEX,
2621 THREAD_COPY_PRIVATE_FUTEX): Define.
2622 * sysdeps/x86_64/tls.h (THREAD_SET_PRIVATE_FUTEX,
2623 THREAD_COPY_PRIVATE_FUTEX): Define.
2624 * allocatestack.c (allocate_stack): Use THREAD_COPY_PRIVATE_FUTEX.
2625 * init.c (__pthread_initialize_minimal_internal): Use
2626 THREAD_SET_PRIVATE_FUTEX.
2628 * sysdeps/powerpc/tls.h (tcbhead_t): Add gscope_flag.
2629 (THREAD_GSCOPE_FLAG_UNUSED, THREAD_GSCOPE_FLAG_USED,
2630 THREAD_GSCOPE_FLAG_WAIT): Define.
2631 (THREAD_GSCOPE_GET_FLAG, THREAD_GSCOPE_SET_FLAG,
2632 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_WAIT): Define.
2633 * sysdeps/i386/tls.h (THREAD_GSCOPE_WAIT): Don't use
2635 (THREAD_GSCOPE_GET_FLAG): Define.
2636 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Define.
2637 * allocatestack.c (__wait_lookup_done): Use THREAD_GSCOPE_GET_FLAG
2638 instead of ->header.gscope_flag directly.
2640 2007-05-23 Ulrich Drepper <drepper@redhat.com>
2642 * init.c (__pthread_initialize_minimal_internal): Check whether
2643 private futexes are available.
2644 * allocatestack.c (allocate_stack): Copy private_futex field from
2645 current thread into the new stack.
2646 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Use private
2647 futexes if they are available.
2648 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise
2649 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Adjust so that change
2650 in libc-lowlevellock.S allow using private futexes.
2651 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
2652 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
2654 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
2655 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use private futexes
2656 if they are available.
2657 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
2658 * sysdeps/x86_64/tcb-offsets.sym: Add PRIVATE_FUTEX.
2659 * sysdeps/i386/tcb-offsets.sym: Likewise.
2660 * sysdeps/x86_64/tls.h (tcbhead_t): Add private_futex field.
2661 * sysdeps/i386/tls.h (tcbhead_t): Likewise.
2663 2007-05-21 Ulrich Drepper <drepper@redhat.com>
2665 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
2666 Remove ptr_wait_lookup_done again.
2667 * init.c (pthread_functions): Don't add .ptr_wait_lookup_done here.
2668 (__pthread_initialize_minimal_internal): Initialize
2669 _dl_wait_lookup_done pointer in _rtld_global directly.
2670 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
2671 Remove code to code _dl_wait_lookup_done.
2672 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_WAIT): The pointer is not
2675 2007-05-21 Jakub Jelinek <jakub@redhat.com>
2677 * tst-robust9.c (do_test): Don't fail if ENABLE_PI and
2678 pthread_mutex_init failed with ENOTSUP.
2680 2007-05-19 Ulrich Drepper <drepper@redhat.com>
2682 * allocatestack.c (__wait_lookup_done): New function.
2683 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
2684 Add ptr_wait_lookup_done.
2685 * init.c (pthread_functions): Initialize .ptr_wait_lookup_done.
2686 * pthreadP.h: Declare __wait_lookup_done.
2687 * sysdeps/i386/tls.h (tcbhead_t): Add gscope_flag.
2688 Define macros to implement reference handling of global scope.
2689 * sysdeps/x86_64/tls.h: Likewise.
2690 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
2691 Initialize GL(dl_wait_lookup_done).
2693 2007-05-17 Ulrich Drepper <drepper@redhat.com>
2696 * pthread_mutex_lock.c: Preserve FUTEX_WAITERS bit when dead owner
2698 * pthread_mutex_timedlock.c: Likewise.
2699 * pthread_mutex_trylock.c: Likewise.
2700 Patch in part by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
2702 * Makefile (tests): Add tst-robust9 and tst-robustpi9.
2703 * tst-robust9.c: New file.
2704 * tst-robustpi9.c: New file.
2706 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Remove
2707 unnecessary extra cancellation test.
2709 2007-05-14 Ulrich Drepper <drepper@redhat.com>
2711 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Remove unnecessary
2712 extra cancellation test.
2713 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
2715 2007-05-10 Ulrich Drepper <drepper@redhat.com>
2717 * descr.h (struct pthread): Rearrange members to fill hole in
2720 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
2721 (__pthread_setaffinity_new): If syscall was successful and
2722 RESET_VGETCPU_CACHE is defined, use it before returning.
2723 * sysdeps/unix/sysv/linux/x86_64/pthread_setaffinity.c: New file.
2725 2007-05-10 Jakub Jelinek <jakub@redhat.com>
2728 * tst-align2.c: Include stackinfo.h.
2729 * tst-getpid1.c: Likewise.
2731 2007-05-02 Carlos O'Donell <carlos@systemhalted.org>
2734 * tst-align2.c (do_test): Add _STACK_GROWS_UP case.
2735 * tst-getpid1.c (do_test): Likewise.
2738 * allocatestack.c (change_stack_perm): Add _STACK_GROWS_UP case.
2739 (allocate_stack): Likewise.
2741 2007-05-07 Ulrich Drepper <drepper@redhat.com>
2743 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
2744 (__lll_robust_lock_wait): Fix race caused by reloading of futex value.
2745 (__lll_robust_timedlock_wait): Likewise.
2746 Reported by Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>.
2748 2007-05-06 Mike Frysinger <vapier@gentoo.org>
2751 * tst-cancel-wrappers.sh: Set C["fdatasync"] to 1.
2752 * tst-cancel4.c (tf_fdatasync): New test.
2754 2007-04-27 Ulrich Drepper <drepper@redhat.com>
2757 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Treat error
2758 check mutexes like normal mutexes.
2761 * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
2762 Initialize the whole sigevent structure to appease valgrind.
2764 2007-04-25 Ulrich Drepper <drepper@redhat.com>
2766 * sysdeps/x86_64/tls.h (tcbhead_t): Add vgetcpu_cache.
2767 * sysdeps/x86_64/tcb-offsets.sym: Add VGETCPU_CACHE_OFFSET.
2769 2007-04-06 Ulrich Drepper <drepper@redhat.com>
2771 * tst-locale1.c: Avoid warnings.
2772 * tst-locale2.c: Likewise.
2774 2007-03-19 Steven Munroe <sjmunroe@us.ibm.com>
2776 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
2777 (__lll_robust_trylock): Add MUTEX_HINT_ACQ to lwarx instruction.
2779 2007-03-16 Jakub Jelinek <jakub@redhat.com>
2781 * sysdeps/pthread/bits/libc-lock.h: Use __extern_inline and
2782 __extern_always_inline where appropriate.
2783 * sysdeps/pthread/pthread.h: Likewise.
2785 2007-03-13 Richard Henderson <rth@redhat.com>
2787 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Use two
2788 separate cfi regions for the two subsections.
2790 2007-02-25 Ulrich Drepper <drepper@redhat.com>
2792 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset refcntr in
2793 new thread, don't just decrement it.
2794 Patch by Suzuki K P <suzuki@in.ibm.com>.
2796 2007-02-21 Ulrich Drepper <drepper@redhat.com>
2798 * sysdeps/pthread/pthread-functions.h: Correct last patch, correct
2799 PTHFCT_CALL definition.
2801 2007-02-18 Ulrich Drepper <drepper@redhat.com>
2803 * sysdeps/pthread/pthread-functions.h: If PTR_DEMANGLE is not
2804 available, don't use it.
2806 2007-02-09 Jakub Jelinek <jakub@redhat.com>
2808 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
2809 (__lll_mutex_timedlock_wait): Use correct pointer when we don't
2810 call into the kernel to delay.
2812 2007-01-18 Ulrich Drepper <drepper@redhat.com>
2814 * tst-initializers1.c: We want to test the initializers as seen
2815 outside of libc, so undefined _LIBC.
2817 * pthread_join.c (cleanup): Avoid warning.
2819 2007-01-17 Ulrich Drepper <drepper@redhat.com>
2821 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
2822 (__lll_timedwait_tid): Add unwind info.
2824 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Don't just copy the
2825 function table, mangle the pointers.
2826 * sysdeps/pthread/pthread-functions.h: Define PTHFCT_CALL.
2827 * forward.c: Use PTHFCT_CALL and __libc_pthread_functions_init.
2828 * sysdeps/pthread/bits/libc-lock.h: When using __libc_pthread_functions
2829 demangle pointers before use.
2830 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Use PTHFCT_CALL to
2832 * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
2833 * sysdeps/pthread/setxid.h: Likewise.
2835 2007-01-12 Ulrich Drepper <drepper@redhat.com>
2837 * tst-rwlock7.c: Show some more information in case of correct
2840 2007-01-11 Ulrich Drepper <drepper@redhat.com>
2842 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
2843 (lll_futex_timed_wait): Undo part of last change, don't negate
2846 2007-01-10 Ulrich Drepper <drepper@redhat.com>
2848 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Cleanups. Define
2849 FUTEX_CMP_REQUEUE and lll_futex_requeue.
2851 2006-12-28 David S. Miller <davem@davemloft.net>
2853 * shlib-versions: Fix sparc64 linux target specification.
2855 2007-01-10 Jakub Jelinek <jakub@redhat.com>
2857 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
2858 Adjust include path for pthread_barrier_wait.c move.
2860 2006-12-21 Jakub Jelinek <jakub@redhat.com>
2862 * sysdeps/unix/sysv/linux/pthread_kill.c (pthread_kill): Make sure
2863 tid isn't reread from pd->tid in between ESRCH test and the syscall.
2865 2006-12-06 Jakub Jelinek <jakub@redhat.com>
2867 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Handle
2868 6 argument cancellable syscalls.
2869 (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
2870 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO): Handle
2871 6 argument cancellable syscalls.
2872 (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
2874 2006-12-09 Ulrich Drepper <drepper@redhat.com>
2876 * sysdeps/unix/sysv/linux/rtld-lowlevel.h
2877 (__rtld_mrlock_initialize): Add missing closing parenthesis.
2879 2006-10-30 Jakub Jelinek <jakub@redhat.com>
2881 * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
2882 __sync_lock_release instead of __sync_lock_release_si.
2884 2006-10-29 Jakub Jelinek <jakub@redhat.com>
2886 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (RTLD_SINGLE_THREAD_P):
2888 (SINGLE_THREAD_P): Define to 1 if IS_IN_rtld.
2889 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Likewise.
2890 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
2891 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
2892 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
2893 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
2894 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
2895 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
2896 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
2897 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
2898 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
2900 2006-10-27 Ulrich Drepper <drepper@redhat.com>
2902 * sysdeps/pthread/pthread_barrier_wait.c: Move to...
2903 * pthread_barrier_wait.c: ...here.
2904 * sysdeps/pthread/pthread_cond_broadcast.c: Move to...
2905 * pthread_cond_broadcast.c: ...here.
2906 * sysdeps/pthread/pthread_cond_signal.c: Move to...
2907 * pthread_cond_signal.c: ...here.
2908 * sysdeps/pthread/pthread_cond_timedwait.c: Move to...
2909 * pthread_cond_timedwait.c: ...here.
2910 * sysdeps/pthread/pthread_cond_wait.c: Move to...
2911 * pthread_cond_wait.c: ...here.
2912 * sysdeps/pthread/pthread_once.c: Move to...
2913 * pthread_once.c: ...here.
2914 * sysdeps/pthread/pthread_rwlock_rdlock.c: Move to...
2915 * pthread_rwlock_rdlock.c: ...here.
2916 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Move to...
2917 * pthread_rwlock_timedrdlock.c: ...here.
2918 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Move to...
2919 * pthread_rwlock_timedwrlock.c: ...here.
2920 * sysdeps/pthread/pthread_rwlock_unlock.c: Move to...
2921 * pthread_rwlock_unlock.c: ...here.
2922 * sysdeps/pthread/pthread_rwlock_wrlock.c: Move to...
2923 * pthread_rwlock_wrlock.c: ...here.
2924 * sysdeps/pthread/pthread_spin_destroy.c: Move to...
2925 * pthread_spin_destroy.c: ...here.
2926 * sysdeps/pthread/pthread_spin_init.c: Move to...
2927 * pthread_spin_init.c: ...here.
2928 * sysdeps/pthread/pthread_spin_unlock.c: Move to...
2929 * pthread_spin_unlock.c: ...here.
2930 * sysdeps/pthread/pthread_getcpuclockid.c: Move to...
2931 * pthread_getcpuclockid.c: ...here.
2933 * init.c: USE_TLS support is now always enabled.
2934 * tst-tls5.h: Likewise.
2935 * sysdeps/alpha/tls.h: Likewise.
2936 * sysdeps/i386/tls.h: Likewise.
2937 * sysdeps/ia64/tls.h: Likewise.
2938 * sysdeps/powerpc/tls.h: Likewise.
2939 * sysdeps/s390/tls.h: Likewise.
2940 * sysdeps/sh/tls.h: Likewise.
2941 * sysdeps/sparc/tls.h: Likewise.
2942 * sysdeps/x86_64/tls.h: Likewise.
2944 2006-10-27 Jakub Jelinek <jakub@redhat.com>
2946 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
2947 __rtld_mrlock_change): Update oldval if atomic compare and exchange
2950 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
2951 Define to THREAD_SELF->header.multiple_threads.
2952 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
2954 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
2956 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
2957 (SINGLE_THREAD_P): Likewise.
2958 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
2959 (SINGLE_THREAD_P): Likewise.
2960 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
2961 (SINGLE_THREAD_P): Likewise.
2962 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
2963 (SINGLE_THREAD_P): Likewise.
2964 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (SINGLE_THREAD_P):
2966 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
2967 (SINGLE_THREAD_P): Likewise.
2968 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
2969 (SINGLE_THREAD_P): Likewise.
2970 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (SINGLE_THREAD_P):
2973 2006-10-26 Jakub Jelinek <jakub@redhat.com>
2975 * pthread_attr_setstacksize.c (NEW_VERNUM): Define to GLIBC_2_3_3
2976 by default rather than 2_3_3.
2978 2006-10-17 Jakub Jelinek <jakub@redhat.com>
2980 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
2981 __rtld_mrlock_unlock, __rtld_mrlock_change, __rtld_mrlock_done): Use
2982 atomic_* instead of catomic_* macros.
2984 2006-10-12 Ulrich Drepper <drepper@redhat.com>
2987 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add SEM_VALUE_MAX.
2988 * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
2989 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
2990 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
2991 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
2992 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Remove SEM_VALUE_MAX.
2993 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
2994 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
2995 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
2996 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: Likewise.
2997 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
2998 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
2999 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
3001 2006-10-11 Ulrich Drepper <drepper@redhat.com>
3003 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add support for
3004 cancelable syscalls with six parameters.
3006 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Use catomic_*
3007 operations instead of atomic_*.
3009 2006-10-09 Ulrich Drepper <drepper@redhat.com>
3011 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: New file..
3013 2006-10-07 Ulrich Drepper <drepper@redhat.com>
3015 * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: New file.
3016 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstack.c: New file.
3017 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c:
3019 * pthread_attr_setstack.c: Allow overwriting the version number of the
3021 * pthread_attr_setstacksize.c: Likewise.
3022 (__old_pthread_attr_setstacksize): If STACKSIZE_ADJUST is defined use
3024 * sysdeps/unix/sysv/linux/powerpc/Versions (libpthread): Add
3025 pthread_attr_setstack and pthread_attr_setstacksize to GLIBC_2.6.
3027 2006-09-24 Ulrich Drepper <drepper@redhat.com>
3030 * descr.h (ENQUEUE_MUTEX_BOTH): Add cast to avoid warning.
3031 Patch by Petr Baudis.
3033 2006-09-18 Jakub Jelinek <jakub@redhat.com>
3035 * tst-kill4.c (do_test): Explicitly set tf thread's stack size.
3037 * tst-cancel2.c (tf): Loop as long as something was written.
3039 2006-09-12 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3041 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: For PI
3042 mutexes wake all mutexes.
3043 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Don't increment
3044 WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
3045 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
3047 2006-09-12 Ulrich Drepper <drepper@redhat.com>
3049 * tst-cond22.c (tf): Slight changes to the pthread_cond_wait use
3050 to guarantee the thread is always canceled.
3052 2006-09-08 Jakub Jelinek <jakub@redhat.com>
3054 * tst-cond22.c: Include pthread.h instead of pthreadP.h.
3056 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Only
3057 increase FUTEX if increasing WAKEUP_SEQ. Fix comment typo.
3058 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
3059 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3060 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3062 2006-09-08 Ulrich Drepper <drepper@redhat.com>
3065 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Don't
3066 increment WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
3067 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
3068 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3069 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3070 * Makefile (tests): Add tst-cond22.
3071 * tst-cond22.c: New file.
3073 2006-09-05 Ulrich Drepper <drepper@redhat.com>
3076 * descr.h (struct pthread): Add parent_cancelhandling.
3077 * sysdeps/pthread/createthread.c (create_thread): Pass parent
3078 cancelhandling value to child.
3079 * pthread_create.c (start_thread): If parent thread was canceled
3080 reset the SIGCANCEL mask.
3081 * Makefile (tests): Add tst-cancel25.
3082 * tst-cancel25.c: New file.
3084 2006-09-05 Jakub Jelinek <jakub@redhat.com>
3085 Ulrich Drepper <drepper@redhat.com>
3087 * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY): Don't decrement
3088 counterp if it is already zero.
3089 * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY): Likewise..
3091 2006-03-04 Jakub Jelinek <jakub@redhat.com>
3092 Roland McGrath <roland@redhat.com>
3094 * sysdeps/unix/sysv/linux/i386/lowlevellock.h
3095 (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
3096 LLL_STUB_UNWIND_INFO_3, LLL_STUB_UNWIND_INFO_4): Define.
3097 (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
3098 lll_robust_mutex_cond_lock, lll_mutex_timedlock,
3099 lll_robust_mutex_timedlock, lll_mutex_unlock,
3100 lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
3101 Add _L_*_ symbols around the subsection.
3102 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Add unwind info.
3103 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Likewise.
3105 2006-03-03 Jakub Jelinek <jakub@redhat.com>
3106 Roland McGrath <roland@redhat.com>
3108 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
3109 (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
3110 LLL_STUB_UNWIND_INFO_5, LLL_STUB_UNWIND_INFO_6): Define.
3111 (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
3112 lll_robust_mutex_cond_lock, lll_mutex_timedlock,
3113 lll_robust_mutex_timedlock, lll_mutex_unlock,
3114 lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
3115 Add _L_*_ symbols around the subsection.
3116 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Add unwind info.
3117 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
3119 2006-08-31 Ulrich Drepper <drepper@redhat.com>
3121 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Undo last
3122 change because it can disturb too much existing code. If real hard
3123 reader preference is needed we'll introduce another type.
3124 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
3125 (pthread_rwlock_timedwrlock): Likewise.
3126 * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
3129 2006-08-30 Ulrich Drepper <drepper@redhat.com>
3131 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Respect
3133 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
3134 (pthread_rwlock_timedwrlock): Likewise.
3135 * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
3138 2006-08-25 Jakub Jelinek <jakub@redhat.com>
3140 * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libpthread):
3141 Only define ifdef SHARED.
3143 2006-08-23 Ulrich Drepper <drepper@redhat.com>
3145 * allocatestack.c (queue_stack): Move freeing of surplus stacks to...
3146 (free_stacks): ...here.
3147 (__free_stack_cache): New function.
3148 * pthreadP.h: Declare __free_stack_cache.
3149 * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
3151 * init.c (pthread_functions): Initialize ptr_freeres.
3152 * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libptread):
3153 New freeres function.
3155 2006-07-30 Joseph S. Myers <joseph@codesourcery.com>
3158 * Makefile (extra-objs): Add modules to extra-test-objs instead.
3160 2006-08-20 Ulrich Drepper <drepper@redhat.com>
3162 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
3163 _XOPEN_REALTIME_THREADS.
3165 2006-08-15 Jakub Jelinek <jakub@redhat.com>
3167 * sysdeps/unix/sysv/linux/clock_settime.c (INTERNAL_VSYSCALL): Use
3168 HAVE_CLOCK_GETRES_VSYSCALL as guard macro rather than
3169 HAVE_CLOCK_GETTIME_VSYSCALL.
3170 (maybe_syscall_settime_cpu): Use plain INTERNAL_VSYSCALL here.
3172 2006-08-14 Jakub Jelinek <jakub@redhat.com>
3174 * sysdeps/unix/sysv/linux/bits/posix_opt.h
3175 (_POSIX_THREAD_PRIO_PROTECT): Define to 200112L.
3176 * descr.h (struct priority_protection_data): New type.
3177 (struct pthread): Add tpp field.
3178 * pthreadP.h (PTHREAD_MUTEX_PP_NORMAL_NP,
3179 PTHREAD_MUTEX_PP_RECURSIVE_NP, PTHREAD_MUTEX_PP_ERRORCHECK_NP,
3180 PTHREAD_MUTEX_PP_ADAPTIVE_NP): New enum values.
3181 * pthread_mutex_init.c (__pthread_mutex_init): Handle non-robust
3183 * pthread_mutex_lock.c (__pthread_mutex_lock): Handle TPP mutexes.
3184 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Likewise.
3185 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Likewise.
3186 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Likewise.
3188 * pthread_setschedparam.c (__pthread_setschedparam): Handle priority
3190 * pthread_setschedprio.c (pthread_setschedprio): Likewise.
3191 * pthread_mutexattr_getprioceiling.c
3192 (pthread_mutexattr_getprioceiling): If ceiling is 0, ensure it is
3193 in the SCHED_FIFO priority range.
3194 * pthread_mutexattr_setprioceiling.c
3195 (pthread_mutexattr_setprioceiling): Fix prioceiling validation.
3196 * pthread_mutex_getprioceiling.c (pthread_mutex_getprioceiling): Fail
3197 if mutex is not TPP. Ceiling is now in __data.__lock.
3198 * pthread_mutex_setprioceiling.c: Include stdbool.h.
3199 (pthread_mutex_setprioceiling): Fix prioceiling validation. Ceiling
3200 is now in __data.__lock. Add locking.
3201 * pthread_create.c (__free_tcb): Free pd->tpp structure.
3202 * Makefile (libpthread-routines): Add tpp.
3203 (xtests): Add tst-mutexpp1, tst-mutexpp6 and tst-mutexpp10.
3204 * tst-tpp.h: New file.
3205 * tst-mutexpp1.c: New file.
3206 * tst-mutexpp6.c: New file.
3207 * tst-mutexpp10.c: New file.
3208 * tst-mutex1.c (TEST_FUNCTION): Don't redefine if already defined.
3209 * tst-mutex6.c (TEST_FUNCTION): Likewise.
3211 2006-08-12 Ulrich Drepper <drepper@redhat.com>
3214 * pthread_join.c (pthread_join): Account for self being canceled
3215 when checking for deadlocks.
3216 * tst-join5.c: Cleanups. Allow to be used in tst-join6.
3217 (tf1): Don't print anything after pthread_join returns, this would be
3218 another cancellation point.
3220 * tst-join6.c: New file.
3221 * Makefile (tests): Add tst-join6.
3223 2006-08-03 Ulrich Drepper <drepper@redhat.com>
3226 * pthread_setspecific.c (__pthread_setspecific): Check
3227 out-of-range index before checking for unused key.
3229 * sysdeps/pthread/gai_misc.h: New file.
3231 2006-08-01 Ulrich Drepper <drepper@redhat.com>
3233 * sysdeps/unix/sysv/linux/i386/smp.h: New file. Old Linux-specific
3234 file. Don't use sysctl.
3235 * sysdeps/unix/sysv/linux/smp.h: Always assume SMP. Archs can
3236 overwrite the file if this is likely not true.
3238 2006-07-31 Daniel Jacobowitz <dan@codesourcery.com>
3240 * allocatestack.c (__reclaim_stacks): Reset the PID on cached stacks.
3241 * Makefile (tests): Add tst-getpid3.
3242 * tst-getpid3.c: New file.
3244 2006-07-30 Roland McGrath <roland@redhat.com>
3246 * Makefile (libpthread-routines): Add ptw-sigsuspend.
3248 * sysdeps/unix/sysv/linux/i386/not-cancel.h
3249 (pause_not_cancel): New macro.
3250 (nanosleep_not_cancel): New macro.
3251 (sigsuspend_not_cancel): New macro.
3252 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
3253 nanosleep_not_cancel macro from <not-cancel.h>.
3254 * pthread_mutex_lock.c (__pthread_mutex_lock): Use pause_not_cancel
3255 macro from <not-cancel.h>.
3257 2006-07-28 Ulrich Drepper <drepper@redhat.com>
3258 Jakub Jelinek <jakub@redhat.com>
3260 * descr.h: Change ENQUEUE_MUTEX and DEQUEUE_MUTEX for bit 0
3261 notification of PI mutex. Add ENQUEUE_MUTEX_PI.
3262 * pthreadP.h: Define PTHREAD_MUTEX_PI_* macros for PI mutex types.
3263 * pthread_mutex_setprioceilining.c: Adjust for mutex type name change.
3264 * pthread_mutex_init.c: Add support for priority inheritance mutex.
3265 * pthread_mutex_lock.c: Likewise.
3266 * pthread_mutex_timedlock.c: Likewise.
3267 * pthread_mutex_trylock.c: Likewise.
3268 * pthread_mutex_unlock.c: Likewise.
3269 * sysdeps/pthread/pthread_cond_broadcast.c: For PI mutexes wake
3271 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.c: Likewise.
3272 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.c: Likewise.
3273 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: New file.
3274 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-header): Add
3275 pthread-pi-defines.sym.
3276 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_LOCK_PI,
3277 FUTEX_UNLOCK_PI, and FUTEX_TRYLOCK_PI.
3278 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
3279 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
3280 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
3281 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
3282 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
3283 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
3284 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
3285 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
3286 _POSIX_THREAD_PRIO_INHERIT to 200112L.
3287 * tst-mutex1.c: Adjust to allow use in PI mutex test.
3288 * tst-mutex2.c: Likewise.
3289 * tst-mutex3.c: Likewise.
3290 * tst-mutex4.c: Likewise.
3291 * tst-mutex5.c: Likewise.
3292 * tst-mutex6.c: Likewise.
3293 * tst-mutex7.c: Likewise.
3294 * tst-mutex7a.c: Likewise.
3295 * tst-mutex8.c: Likewise.
3296 * tst-mutex9.c: Likewise.
3297 * tst-robust1.c: Likewise.
3298 * tst-robust7.c: Likewise.
3299 * tst-robust8.c: Likewise.
3300 * tst-mutexpi1.c: New file.
3301 * tst-mutexpi2.c: New file.
3302 * tst-mutexpi3.c: New file.
3303 * tst-mutexpi4.c: New file.
3304 * tst-mutexpi5.c: New file.
3305 * tst-mutexpi6.c: New file.
3306 * tst-mutexpi7.c: New file.
3307 * tst-mutexpi7a.c: New file.
3308 * tst-mutexpi8.c: New file.
3309 * tst-mutexpi9.c: New file.
3310 * tst-robust1.c: New file.
3311 * tst-robust2.c: New file.
3312 * tst-robust3.c: New file.
3313 * tst-robust4.c: New file.
3314 * tst-robust5.c: New file.
3315 * tst-robust6.c: New file.
3316 * tst-robust7.c: New file.
3317 * tst-robust8.c: New file.
3318 * Makefile (tests): Add the new tests.
3320 * pthread_create.c (start_thread): Add some casts to avoid warnings.
3321 * pthread_mutex_destroy.c: Remove unneeded label.
3323 2006-07-01 Ulrich Drepper <drepper@redhat.com>
3325 * pthread_mutex_init.c (__pthread_mutex_init): Move some
3326 computations to compile time.
3328 2006-06-04 Ulrich Drepper <drepper@redhat.com>
3330 * sysdeps/pthread/pthread.h: Add pthread_equal inline version.
3332 2006-05-15 Ulrich Drepper <drepper@redhat.com>
3334 * sysdeps/unix/sysv/linux/fork.h: Mark __fork_handlers as hidden.
3336 2006-05-11 Ulrich Drepper <drepper@redhat.com>
3338 * pthread_key_create.c (__pthread_key_create): Do away with
3339 __pthread_keys_lock.
3341 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
3342 (__kernel_cpumask_size): Mark as hidden.
3343 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
3345 * sem_open.c (__sem_mappings_lock): Mark as hidden.
3346 * semaphoreP.h (__sem_mappings_lock): Likewise.
3348 2006-05-10 Ulrich Drepper <drepper@redhat.com>
3350 * pthread_atfork.c: Mark __dso_handle as hidden.
3352 2006-05-09 Ulrich Drepper <drepper@redhat.com>
3355 * sysdeps/pthread/unwind-forcedunwind.c: Different solution for
3356 the reload problem. Change the one path in pthread_cancel_init
3357 which causes the problem. Force gcc to reload. Simplify callers.
3358 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c
3359 (_Unwind_GetBSP): Undo last patch.
3361 2006-05-07 Ulrich Drepper <drepper@redhat.com>
3363 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: Make sure the
3364 function pointer is reloaded after pthread_cancel_init calls.
3367 * sysdeps/pthread/unwind-forcedunwind.c: Make sure functions
3368 pointers are reloaded after pthread_cancel_init calls.
3370 2006-05-01 Ulrich Drepper <drepper@redhat.com>
3372 * sysdeps/pthread/allocalim.h (__libc_use_alloca): Mark with
3375 2006-04-27 Ulrich Drepper <drepper@redhat.com>
3377 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
3378 Allocate new object which is passed to timer_sigev_thread so that
3379 the timer can be deleted before the new thread is scheduled.
3381 2006-04-26 Roland McGrath <roland@redhat.com>
3383 * sysdeps/x86_64/tls.h: Include <asm/prctl.h> inside [! __ASSEMBLER__].
3385 2006-04-08 Ulrich Drepper <drepper@redhat.com>
3387 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove branch predicion
3388 suffix for conditional jumps.
3389 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
3390 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
3391 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
3392 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
3393 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
3394 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
3396 * init.c (sigcancel_handler): Compare with correct PID even if the
3397 thread is in the middle of a fork call.
3398 (sighandler_setxid): Likewise.
3399 Reported by Suzuki K P <suzuki@in.ibm.com> .
3401 2006-04-07 Jakub Jelinek <jakub@redhat.com>
3403 * pthreadP.h (FUTEX_TID_MASK): Sync with kernel.
3405 2006-04-06 Ulrich Drepper <drepper@redhat.com>
3407 * pthread_getattr_np.c (pthread_getattr_np): Close fp if getrlimit
3408 fails [Coverity CID 105].
3410 2006-04-05 Ulrich Drepper <drepper@redhat.com>
3412 * sysdeps/pthread/pthread.h: Add nonnull attributes.
3414 2006-04-03 Steven Munroe <sjmunroe@us.ibm.com>
3417 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h [_ARCH_PWR4]:
3418 Define __lll_rel_instr using lwsync.
3420 2006-03-27 Ulrich Drepper <drepper@redhat.com>
3422 * allocatestack.c (allocate_stack): Always initialize robust_head.
3423 * descr.h: Define struct robust_list_head.
3424 (struct pthread): Use robust_list_head in robust mutex list definition.
3425 Adjust ENQUEUE_MUTEX and DEQUEUE_MUTEX.
3426 * init.c [!__ASSUME_SET_ROBUST_LIST] (__set_robust_list_avail): Define.
3427 (__pthread_initialize_minimal_internal): Register robust_list with
3429 * pthreadP.h: Remove PRIVATE_ from PTHREAD_MUTEX_ROBUST_* names.
3430 Declare __set_robust_list_avail.
3431 * pthread_create.c (start_thread): Register robust_list of new thread.
3432 [!__ASSUME_SET_ROBUST_LIST]: If robust_list is not empty wake up
3434 * pthread_mutex_destroy.c: For robust mutexes don't look at the
3435 number of users, it's unreliable.
3436 * pthread_mutex_init.c: Allow use of pshared robust mutexes if
3437 set_robust_list syscall is available.
3438 * pthread_mutex_consistent.c: Adjust for PTHREAD_MUTEX_ROBUST_* rename.
3439 * pthread_mutex_lock.c: Simplify robust mutex code a bit.
3440 Set robust_head.list_op_pending before trying to lock a robust mutex.
3441 * pthread_mutex_timedlock.c: Likewise.
3442 * pthread_mutex_trylock.c: Likewise.
3443 * pthread_mutex_unlock.c: Likewise for unlocking.
3444 * Makefile (tests): Add tst-robust8.
3445 * tst-robust8.c: New file.
3447 2006-03-08 Andreas Schwab <schwab@suse.de>
3449 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h
3450 (DL_SYSINFO_IMPLEMENTATION): Add missing newline.
3452 2006-03-05 Roland McGrath <roland@redhat.com>
3454 * configure (libc_add_on): Disable add-on when $add_ons_automatic = yes
3455 and $config_os doesn't match *linux*.
3457 2006-03-05 David S. Miller <davem@sunset.davemloft.net>
3459 * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S:
3460 Use __syscall_error.
3461 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
3462 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: Likewise.
3463 * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: Likewise.
3464 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
3465 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: Likewise.
3466 * sysdeps/unix/sysv/linux/sparc/Makefile: New file.
3468 2006-03-02 Ulrich Drepper <drepper@redhat.com>
3470 * sysdeps/unix/sysv/linux/aio_misc.h: Various cleanups.
3472 2006-03-01 Ulrich Drepper <drepper@redhat.com>
3474 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
3475 (__lll_robust_lock_wait): Also set FUTEX_WAITERS bit if we got the
3477 (__lll_robust_timedlock_wait): Likewise.
3478 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S
3479 (__lll_robust_lock_wait): Likewise.
3480 (__lll_robust_timedlock_wait): Likewise.
3481 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
3482 (__lll_robust_lock_wait): Likewise.
3483 (__lll_robust_timedlock_wait): Likewise.
3485 2006-03-01 Jakub Jelinek <jakub@redhat.com>
3487 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_robust_mutex_dead,
3488 lll_robust_mutex_trylock, lll_robust_mutex_lock,
3489 lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
3490 lll_robust_mutex_unlock): Define.
3491 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
3493 2006-02-28 H.J. Lu <hongjiu.lu@intel.com>
3495 * sysdeps/unix/sysv/linux/ia64/clone2.S: Include <clone2.S>
3496 instead of <clone.S>.
3498 2006-02-27 Jakub Jelinek <jakub@redhat.com>
3500 * Makefile (libpthread-routines): Add
3501 pthread_mutexattr_[sg]etprotocol, pthread_mutexattr_[sg]etprioceiling
3502 and pthread_mutex_[sg]etprioceiling.
3503 * Versions (GLIBC_2.4): Export pthread_mutexattr_getprotocol,
3504 pthread_mutexattr_setprotocol, pthread_mutexattr_getprioceiling,
3505 pthread_mutexattr_setprioceiling, pthread_mutex_getprioceiling and
3506 pthread_mutex_setprioceiling.
3507 * sysdeps/pthread/pthread.h (PTHREAD_PRIO_NONE, PTHREAD_PRIO_INHERIT,
3508 PTHREAD_PRIO_PROTECT): New enum values.
3509 (pthread_mutexattr_getprotocol, pthread_mutexattr_setprotocol,
3510 pthread_mutexattr_getprioceiling, pthread_mutexattr_setprioceiling,
3511 pthread_mutex_getprioceiling, pthread_mutex_setprioceiling): New
3513 * pthreadP.h (PTHREAD_MUTEX_PRIO_INHERIT_PRIVATE_NP,
3514 PTHREAD_MUTEX_PRIO_PROTECT_PRIVATE_NP): New enum values.
3515 (PTHREAD_MUTEX_PRIO_CEILING_SHIFT, PTHREAD_MUTEX_PRIO_CEILING_MASK):
3517 (PTHREAD_MUTEXATTR_PROTOCOL_SHIFT, PTHREAD_MUTEXATTR_PROTOCOL_MASK,
3518 PTHREAD_MUTEXATTR_PRIO_CEILING_SHIFT,
3519 PTHREAD_MUTEXATTR_PRIO_CEILING_MASK): Define.
3520 (PTHREAD_MUTEXATTR_FLAG_BITS): Or in PTHREAD_MUTEXATTR_PROTOCOL_MASK
3521 and PTHREAD_MUTEXATTR_PRIO_CEILING_MASK.
3522 * pthread_mutex_init.c (__pthread_mutex_init): For the time being
3523 return ENOTSUP for PTHREAD_PRIO_INHERIT or PTHREAD_PRIO_PROTECT
3525 * pthread_mutex_getprioceiling.c: New file.
3526 * pthread_mutex_setprioceiling.c: New file.
3527 * pthread_mutexattr_getprioceiling.c: New file.
3528 * pthread_mutexattr_setprioceiling.c: New file.
3529 * pthread_mutexattr_getprotocol.c: New file.
3530 * pthread_mutexattr_setprotocol.c: New file.
3532 2006-02-27 Daniel Jacobowitz <dan@codesourcery.com>
3534 * sysdeps/unix/sysv/linux/aio_misc.h: Include <limits.h>.
3536 2006-02-27 Roland McGrath <roland@redhat.com>
3538 * sysdeps/pthread/Subdirs: List nptl here too.
3539 * configure (libc_add_on_canonical): New variable.
3541 * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: Use #include_next.
3543 * sysdeps/unix/sysv/linux/sleep.c: Use #include_next after #include of
3544 self to get main source tree's file.
3545 * sysdeps/unix/sysv/linux/alpha/clone.S: Likewise.
3546 * sysdeps/unix/sysv/linux/i386/clone.S: Likewise.
3547 * sysdeps/unix/sysv/linux/i386/vfork.S: Likewise.
3548 * sysdeps/unix/sysv/linux/ia64/clone2.S: Likewise.
3549 * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: Likewise.
3550 * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: Likewise.
3551 * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: Likewise.
3552 * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: Likewise.
3553 * sysdeps/unix/sysv/linux/sh/clone.S: Likewise.
3554 * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: Likewise.
3555 * sysdeps/unix/sysv/linux/sparc/sparc64/clone.S: Likewise.
3556 * sysdeps/unix/sysv/linux/x86_64/clone.S: Likewise.
3557 * sysdeps/unix/sysv/linux/x86_64/vfork.S: Likewise.
3559 * Makefile: Use $(sysdirs) in vpath directive.
3561 * sysdeps/pthread/Makefile (CFLAGS-libc-start.c): Variable removed.
3562 (CPPFLAGS-timer_routines.c): Likewise.
3564 * Makeconfig (includes): Variable removed.
3566 2006-02-26 Roland McGrath <roland@redhat.com>
3568 * sysdeps/generic/pt-raise.c: Moved to ...
3569 * pt-raise.c: ... here.
3570 * sysdeps/generic/lowlevellock.h: Moved to ...
3571 * lowlevellock.h: ... here.
3573 2006-02-23 Roland McGrath <roland@redhat.com>
3575 * descr.h (struct pthread): Add final member `end_padding'.
3576 (PTHREAD_STRUCT_END_PADDING): Use it.
3578 2006-02-20 Roland McGrath <roland@redhat.com>
3580 * sysdeps/mips: Directory removed, saved in ports repository.
3581 * sysdeps/unix/sysv/linux/mips: Likewise.
3583 2006-02-18 Ulrich Drepper <drepper@redhat.com>
3585 * tst-robust1.c: Add second mutex to check that the mutex list is
3588 2006-02-17 Jakub Jelinek <jakub@redhat.com>
3590 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_mutex_dead,
3591 lll_robust_mutex_trylock, lll_robust_mutex_lock,
3592 lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
3593 lll_robust_mutex_unlock): New macros.
3594 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
3595 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
3596 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
3597 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
3598 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: New file.
3600 2006-02-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3602 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Add lll_robust_mutex_*
3604 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: New file.
3606 2006-02-17 Ulrich Drepper <drepper@redhat.com>
3608 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
3609 (lll_robust_mutex_unlock): Avoid unnecessary wakeups.
3610 * sysdeps/unix/sysv/linux/i386/lowlevellock.h
3611 (lll_robust_mutex_unlock): Likewise.
3613 2006-02-13 Jakub Jelinek <jakub@redhat.com>
3615 * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX):
3616 Set robust_list.__next rather than robust_list.
3617 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
3618 (__pthread_list_t): New typedef.
3619 (pthread_mutex_t): Replace __next and __prev fields with __list.
3620 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
3621 (__pthread_list_t): New typedef.
3622 (pthread_mutex_t): Replace __next and __prev fields with __list.
3623 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
3624 (__pthread_list_t, __pthread_slist_t): New typedefs.
3625 (pthread_mutex_t): Replace __next and __prev fields with __list.
3626 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
3627 (__pthread_list_t, __pthread_slist_t): New typedefs.
3628 (pthread_mutex_t): Replace __next and __prev fields with __list.
3629 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
3630 (__pthread_list_t, __pthread_slist_t): New typedefs.
3631 (pthread_mutex_t): Replace __next and __prev fields with __list.
3632 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h
3633 (__pthread_slist_t): New typedef.
3634 (pthread_mutex_t): Replace __next field with __list.
3636 2006-02-15 Ulrich Drepper <drepper@redhat.com>
3638 * pthreadP.h: Define PTHREAD_MUTEX_INCONSISTENT instead of
3639 PTHREAD_MUTEX_OWNERDEAD.
3640 (PTHREAD_MUTEX_ROBUST_PRIVATE_NP): Define as 16, not 256.
3641 Define FUTEX_WAITERS, FUTEX_OWNER_DIED, FUTEX_TID_MASK.
3642 * Makefile (libpthread-routines): Add lowlevelrobustlock.
3643 * pthread_create.c (start_thread): Very much simplify robust_list loop.
3644 * pthread_mutex_consistent.c: Inconsistent mutex have __owner now set
3645 to PTHREAD_MUTEX_INCONSISTENT.
3646 * pthread_mutex_destroy.c: Allow destroying of inconsistent mutexes.
3647 * pthread_mutex_lock.c: Reimplement robust mutex handling.
3648 * pthread_mutex_trylock.c: Likewise.
3649 * pthread_mutex_timedlock.c: Likewise.
3650 * pthread_mutex_unlock.c: Likewise.
3651 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
3652 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
3653 lowlevelrobustlock.sym.
3654 * sysdeps/unix/sysv/linux/lowlevelrobustlock.sym: New file.
3655 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add lll_robust_mutex_*
3657 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
3658 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: New file.
3659 * sysdeps/unix/sysv/linux/i386/i586/lowlevelrobustlock.S: New file.
3660 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrobustlock.S: New file.
3661 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: New file.
3663 2006-02-12 Ulrich Drepper <drepper@redhat.com>
3665 * allocatestack.c (allocate_stack): Initialize robust_list.
3666 * init.c (__pthread_initialize_minimal_internal): Likewise.
3667 * descr.h (struct xid_command): Pretty printing.
3668 (struct pthread): Use __pthread_list_t or __pthread_slist_t for
3669 robust_list. Adjust macros.
3670 * pthread_create.c (start_thread): Adjust robust_list handling.
3671 * phtread_mutex_unlock.c: Don't allow unlocking from any thread
3672 but the owner for all robust mutex types.
3673 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
3674 __pthread_list_t and __pthread_slist_t. Use them in pthread_mutex_t.
3675 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3676 * sysdeps/pthread/pthread.h: Adjust mutex initializers.
3678 * sysdeps/unix/sysv/linux/i386/not-cancel.h: Define openat_not_cancel,
3679 openat_not_cancel_3, openat64_not_cancel, and openat64_not_cancel_3.
3681 2006-02-08 Jakub Jelinek <jakub@redhat.com>
3683 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait,
3684 lll_futex_timedwait, lll_wait_tid): Add "memory" clobber.
3686 2006-01-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3688 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_futex_wait):
3690 (lll_futex_timed_wait): Define.
3692 2006-01-19 Ulrich Drepper <drepper@redhat.com>
3694 * tst-cancel4.c: Test ppoll.
3696 2006-01-18 Andreas Jaeger <aj@suse.de>
3699 * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h
3700 (pthread_mutex_t): Follow changes for other archs. Based on patch
3701 by Jim Gifford <patches@jg555.com>.
3703 2006-01-13 Richard Henderson <rth@redhat.com>
3705 * sysdeps/alpha/tls.h (tcbhead_t): Rename member to __private.
3707 2006-01-10 Roland McGrath <roland@redhat.com>
3709 * sysdeps/alpha/jmpbuf-unwind.h: File moved to main source tree.
3710 * sysdeps/i386/jmpbuf-unwind.h: Likewise.
3711 * sysdeps/mips/jmpbuf-unwind.h: Likewise.
3712 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
3713 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
3714 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
3715 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
3716 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
3717 * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
3718 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
3720 2006-01-09 Roland McGrath <roland@redhat.com>
3722 * tst-initializers1-c89.c: New file.
3723 * tst-initializers1-c99.c: New file.
3724 * tst-initializers1-gnu89.c: New file.
3725 * tst-initializers1-gnu99.c: New file.
3726 * Makefile (tests): Add them.
3727 (CFLAGS-tst-initializers1-c89.c): New variable.
3728 (CFLAGS-tst-initializers1-c99.c): New variable.
3729 (CFLAGS-tst-initializers1-gnu89.c): New variable.
3730 (CFLAGS-tst-initializers1-gnu99.c): New variable.
3732 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
3733 Use __extension__ on anonymous union definition.
3734 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3735 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
3736 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3737 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3738 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
3740 2006-01-08 Jakub Jelinek <jakub@redhat.com>
3742 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
3743 Don't give the union a name because it changes the mangled name.
3744 Instead name the struct for __data.
3745 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_mutex_t):
3747 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_mutex_t):
3750 2006-01-09 Jakub Jelinek <jakub@redhat.com>
3752 * sysdeps/sparc/sparc64/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Add
3753 stack bias to mc_ftp field.
3755 2006-01-07 Ulrich Drepper <drepper@redhat.com>
3757 * sysdeps/pthread/aio_misc.h (AIO_MISC_WAIT): Work around gcc
3758 being too clever and reloading the futex value where it shouldn't.
3760 2006-01-06 Ulrich Drepper <drepper@redhat.com>
3762 * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX): Use
3765 2006-01-06 Jakub Jelinek <jakub@redhat.com>
3767 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
3770 2006-01-06 Ulrich Drepper <drepper@redhat.com>
3772 * sysdeps/ia64/tls.h (tcbhead_t): Rename private member to __private.
3773 * sysdeps/ia64/tcb-offsets.sym: Adjust for private->__private
3774 rename in tcbhead_t.
3776 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
3777 Don't give the union a name because it changes the mangled name.
3778 Instead name the struct for __data.
3779 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3780 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3781 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3782 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3783 * pthread_create.c (start_thread): Adjust robust mutex free loop.
3784 * descr.h (ENQUEUE_MUTEX, DEQUEUE_MUTEX): Adjust.
3786 2006-01-05 Ulrich Drepper <drepper@redhat.com>
3788 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
3790 (lll_futex_timed_wait): Define.
3791 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
3792 * sysdeps/pthread/aio_misc.h: New file.
3794 2006-01-03 Joseph S. Myers <joseph@codesourcery.com>
3796 * Makefile ($(objpfx)$(multidir)): Use mkdir -p.
3798 2006-01-03 Steven Munroe <sjmunroe@us.ibm.com>
3800 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
3801 (PSEUDO): Remove redundant cfi_startproc and cfi_endproc directives.
3802 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
3804 2006-01-04 Ulrich Drepper <drepper@redhat.com>
3806 * tst-cancel24.cc: Use C headers instead of C++ headers.
3808 2006-01-03 Jakub Jelinek <jakub@redhat.com>
3810 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Remove #error for
3811 sparc-linux configured glibc.
3812 (lll_futex_wake_unlock): Define to 1 for sparc-linux configured glibc.
3813 (__lll_mutex_trylock, __lll_mutex_cond_trylock, __lll_mutex_lock,
3814 __lll_mutex_cond_lock, __lll_mutex_timedlock): Use
3815 atomic_compare_and_exchange_val_24_acq instead of
3816 atomic_compare_and_exchange_val_acq.
3817 (lll_mutex_unlock, lll_mutex_unlock_force): Use atomic_exchange_24_rel
3818 instead of atomic_exchange_rel.
3819 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: New file.
3820 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c: New
3822 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c: New
3824 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: New file.
3825 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: New file.
3826 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: New file.
3827 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c: New file.
3828 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: New file.
3829 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
3831 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
3833 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: New file.
3834 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: New file.
3835 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c: New
3837 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_trywait.c: New
3839 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: New file.
3841 2006-01-03 Ulrich Drepper <drepper@redhat.com>
3843 * sysdeps/pthread/pthread.h [__WORDSIZE==64]: Don't use cast in
3846 2006-01-02 Jakub Jelinek <jakub@redhat.com>
3848 * sysdeps/sparc/tls.h (tcbhead_t): Add pointer_guard field.
3849 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
3850 THREAD_COPY_POINTER_GUARD): Define.
3851 * sysdeps/sparc/tcb-offsets.sym (POINTER_GUARD): Define.
3852 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Revert 2005-12-27 changes.
3854 2006-01-01 Ulrich Drepper <drepper@redhat.com>
3856 * version.c: Update copyright year.
3858 2005-12-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3860 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Remove explicit
3861 .eh_frame section, use cfi_* directives.
3862 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Add cfi instrumentation.
3864 2005-12-30 Ulrich Drepper <drepper@redhat.com>
3866 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Undo last change for
3869 2005-12-29 Ulrich Drepper <drepper@redhat.com>
3871 * sysdeps/pthread/sigaction.c: Removed.
3872 * sigaction.c: New file.
3873 * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-sigaction.c.
3875 2005-12-28 Ulrich Drepper <drepper@redhat.com>
3877 * Makefile (tests): Add tst-signal7.
3878 * tst-signal7.c: New file.
3880 2005-12-27 Roland McGrath <roland@redhat.com>
3882 * sysdeps/x86_64/jmpbuf-unwind.h (_jmpbuf_sp): New inline function.
3883 (_JMPBUF_UNWINDS_ADJ): Use it, to PTR_DEMANGLE before comparison.
3884 * sysdeps/alpha/jmpbuf-unwind.h: Likewise.
3885 * sysdeps/i386/jmpbuf-unwind.h: Likewise.
3886 * sysdeps/mips/jmpbuf-unwind.h: Likewise.
3887 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
3888 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
3889 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
3890 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
3891 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
3892 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
3894 2005-12-27 Jakub Jelinek <jakub@redhat.com>
3896 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Add __next
3897 and __prev field to pthread_mutex_t.
3898 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3899 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3900 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3901 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
3902 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Add __next field
3905 2005-12-26 Ulrich Drepper <drepper@redhat.com>
3907 * pthreadP.h: Define PTHREAD_MUTEX_ROBUST_PRIVATE_NP,
3908 PTHREAD_MUTEX_ROBUST_PRIVATE_RECURSIVE_NP,
3909 PTHREAD_MUTEX_ROBUST_PRIVATE_ERRORCHECK_NP,
3910 PTHREAD_MUTEX_ROBUST_PRIVATE_ADAPTIVE_NP,
3911 PTHREAD_MUTEXATTR_FLAG_ROBUST, PTHREAD_MUTEXATTR_FLAG_PSHARED,
3912 and PTHREAD_MUTEXATTR_FLAG_BITS.
3913 * descr.h (struct pthread): Add robust_list field and define
3914 ENQUEUE_MUTEX and DEQUEUE_MUTEX macros.
3915 * pthread_mutexattr_getrobust.c: New file.
3916 * pthread_mutexattr_setrobust.c: New file.
3917 * pthread_mutex_consistent.c: New file.
3918 * sysdeps/pthread/pthread.h: Declare pthread_mutexattr_getrobust,
3919 pthread_mutexattr_setrobust, and pthread_mutex_consistent.
3920 Define PTHREAD_MUTEX_STALLED_NP and PTHREAD_MUTEX_ROBUST_NP.
3921 Adjust pthread_mutex_t initializers.
3922 * nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Add __next
3923 field to pthread_mutex_t.
3924 * nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Add __next
3925 and __prev field to pthread_mutex_t.
3926 * Versions [GLIBC_2.4]: Export pthread_mutexattr_getrobust_np,
3927 pthread_mutexattr_setrobust_np, and pthread_mutex_consistent_np.
3928 * pthread_mutexattr_getpshared.c: Use PTHREAD_MUTEXATTR_FLAG_PSHARED
3929 and PTHREAD_MUTEXATTR_FLAG_BITS macros instead of magic numbers.
3930 * pthread_mutexattr_gettype.c: Likewise.
3931 * pthread_mutexattr_setpshared.c: Likewise.
3932 * pthread_mutexattr_settype.c: Likewise.
3933 * pthread_mutex_init.c: Reject robust+pshared attribute for now.
3934 Initialize mutex kind according to robust flag.
3935 * pthread_mutex_lock.c: Implement local robust mutex.
3936 * pthread_mutex_timedlock.c: Likewise.
3937 * pthread_mutex_trylock.c: Likewise.
3938 * pthread_mutex_unlock.c: Likewise.
3939 * pthread_create.c (start_thread): Mark robust mutexes which remained
3941 * tst-robust1.c: New file.
3942 * tst-robust2.c: New file.
3943 * tst-robust3.c: New file.
3944 * tst-robust4.c: New file.
3945 * tst-robust5.c: New file.
3946 * tst-robust6.c: New file.
3947 * tst-robust7.c: New file.
3948 * Makefile (libpthread-routines): Add pthread_mutexattr_getrobust,
3949 pthread_mutexattr_setrobust, and pthread_mutex_consistent.
3950 (tests): Add tst-robust1, tst-robust2, tst-robust3, tst-robust4,
3951 tst-robust5, tst-robust6, and tst-robust7.
3953 * tst-typesizes.c: New file.
3954 * Makefile (tests): Add tst-typesizes.
3956 * tst-once3.c: More debug output.
3958 2005-12-24 Ulrich Drepper <drepper@redhat.com>
3960 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Add break
3961 missing after last change.
3963 * version.c: Update copyright year.
3965 2005-12-23 Ulrich Drepper <drepper@redhat.com>
3967 * pthread_mutex_destroy.c: Set mutex type to an invalid value.
3968 * pthread_mutex_lock.c: Return EINVAL for invalid mutex type.
3969 * pthread_mutex_trylock.c: Likewise.
3970 * pthread_mutex_timedlock.c: Likewise.
3971 * pthread_mutex_unlock.c: Likewise.
3973 2005-12-22 Roland McGrath <roland@redhat.com>
3975 * sysdeps/pthread/sigaction.c: Use "" instead of <> to include self,
3976 so that #include_next's search location is not reset to the -I..
3977 directory where <nptl/...> can be found.
3979 2005-12-22 Ulrich Drepper <drepper@redhat.com>
3982 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
3983 Fix unwind info. Remove useless branch prediction prefix.
3984 * tst-cancel24.cc: New file.
3985 * Makefile: Add rules to build and run tst-cancel24.
3987 2005-12-21 Roland McGrath <roland@redhat.com>
3989 * libc-cancellation.c: Use <> rather than "" #includes.
3990 * pt-cleanup.c: Likewise.
3991 * pthread_create.c: Likewise.
3992 * pthread_join.c: Likewise.
3993 * pthread_timedjoin.c: Likewise.
3994 * pthread_tryjoin.c: Likewise.
3995 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Likewise.
3996 * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
3997 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
3998 * unwind.c: Likewise.
4000 2005-12-19 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4002 * sysdeps/sh/tcb-offsets.sym: Add POINTER_GUARD.
4003 * sysdeps/sh/tls.h (tcbhead_t): Remove private and add pointer_guard.
4004 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
4005 THREAD_COPY_POINTER_GUARD): Define.
4007 2005-12-19 Jakub Jelinek <jakub@redhat.com>
4009 * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): Make room for 2 uintptr_t's
4011 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
4012 THREAD_COPY_POINTER_GUARD): Define.
4013 * sysdeps/powerpc/tcb-offsets.sym (POINTER_GUARD): Add.
4014 * sysdeps/powerpc/tls.h (tcbhead_t): Add pointer_guard field.
4015 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
4016 THREAD_COPY_POINTER_GUARD): Define.
4017 * sysdeps/s390/tcb-offsets.sym (STACK_GUARD): Add.
4018 * sysdeps/s390/tls.h (THREAD_GET_POINTER_GUARD,
4019 THREAD_SET_POINTER_GUARD, THREAD_COPY_POINTER_GUARD): Define.
4020 * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S (__ia64_longjmp):
4021 Use PTR_DEMANGLE for B0 if defined.
4023 2005-12-17 Ulrich Drepper <drepper@redhat.com>
4025 * pthread_create.c (__pthread_create_2_1): Use
4026 THREAD_COPY_POINTER_GUARD if available.
4027 * sysdeps/i386/tcb-offsets.sym: Add POINTER_GUARD.
4028 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
4029 * sysdeps/i386/tls.h (tcbhead_t): Add pointer_guard.
4030 Define THREAD_SET_POINTER_GUARD and THREAD_COPY_POINTER_GUARD.
4031 * sysdeps/x86_64/tls.h: Likewise.
4033 2005-12-15 Roland McGrath <roland@redhat.com>
4035 * sysdeps/unix/sysv/linux/mq_notify.c: Don't use sysdeps/generic.
4037 2005-12-13 Ulrich Drepper <drepper@redhat.com>
4039 * sysdeps/pthread/sigfillset.c: Adjust for files moved out of
4041 * errno-loc.c: New file.
4043 2005-12-12 Roland McGrath <roland@redhat.com>
4045 * init.c (__pthread_initialize_minimal_internal): Do __static_tls_size
4046 adjustments before choosing stack size. Update minimum stack size
4047 calculation to match allocate_stack change.
4049 2005-12-12 Ulrich Drepper <drepper@redhat.com>
4051 * allocatestack.c (allocate_stack): Don't demand that there is an
4052 additional full page available on the stack beside guard, TLS, the
4055 2005-11-24 Ulrich Drepper <drepper@redhat.com>
4057 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
4058 (__cleanup_fct_attribute): Use __regparm__ not regparm.
4060 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: When
4061 compiling 32-bit code we must define __cleanup_fct_attribute.
4063 005-11-24 Jakub Jelinek <jakub@redhat.com>
4066 * sysdeps/pthread/pthread.h (__pthread_unwind_next): Use
4067 __attribute__ instead of __attribute.
4068 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
4069 (__cleanup_fct_attribute): Likewise.
4071 2005-11-17 Jakub Jelinek <jakub@redhat.com>
4073 * sysdeps/pthread/unwind-forcedunwind.c (pthread_cancel_init): Put
4074 a write barrier before writing libgcc_s_getcfa.
4076 2005-11-06 Ulrich Drepper <drepper@redhat.com>
4078 * sysdeps/unix/sysv/linux/configure: Removed.
4080 2005-11-05 Ulrich Drepper <drepper@redhat.com>
4082 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Remove trace of
4083 optional init_array/fini_array support.
4085 2005-10-24 Roland McGrath <roland@redhat.com>
4087 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Remove unnecessary
4088 versioned_symbol use.
4090 2005-10-16 Roland McGrath <roland@redhat.com>
4092 * init.c (__pthread_initialize_minimal_internal): Even when using a
4093 compile-time default stack size, apply the minimum that allocate_stack
4094 will require, and round up to page size.
4096 2005-10-10 Daniel Jacobowitz <dan@codesourcery.com>
4098 * Makefile ($(test-modules)): Remove static pattern rule.
4100 2005-10-14 Jakub Jelinek <jakub@redhat.com>
4101 Ulrich Drepper <drepper@redhat.com>
4103 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix stack
4104 alignment in callback function.
4105 * Makefile: Add rules to build and run tst-align3.
4106 * tst-align3.c: New file.
4108 2005-10-03 Jakub Jelinek <jakub@redhat.com>
4110 * allocatestack.c (setxid_signal_thread): Add
4111 INTERNAL_SYSCALL_DECL (err).
4113 2005-10-02 Jakub Jelinek <jakub@redhat.com>
4115 * allocatestack.c (setxid_signal_thread): Need to use
4116 atomic_compare_and_exchange_bool_acq.
4118 2005-10-01 Ulrich Drepper <drepper@redhat.com>
4119 Jakub Jelinek <jakub@redhat.com>
4121 * descr.h: Define SETXID_BIT and SETXID_BITMASK. Adjust
4123 (struct pthread): Move specific_used field to avoid padding.
4124 Add setxid_futex field.
4125 * init.c (sighandler_setxid): Reset setxid flag and release the
4127 * allocatestack.c (setxid_signal_thread): New function. Broken
4128 out of the bodies of the two loops in __nptl_setxid. For undetached
4129 threads check whether they are exiting and if yes, don't send a signal.
4130 (__nptl_setxid): Simplify loops by using setxid_signal_thread.
4131 * pthread_create.c (start_thread): For undetached threads, check
4132 whether setxid bit is set. If yes, wait until signal has been
4135 * allocatestack.c (STACK_VARIABLES): Initialize them.
4136 * pthread_create.c (__pthread_create_2_1): Initialize pd.
4138 2004-09-02 Jakub Jelinek <jakub@redhat.com>
4140 * pthread_cond_destroy.c (__pthread_cond_destroy): If there are
4141 waiters, awake all waiters on the associated mutex.
4143 2005-09-22 Roland McGrath <roland@redhat.com>
4145 * perf.c [__x86_64__] (HP_TIMING_NOW): New macro (copied from
4146 ../sysdeps/x86_64/hp-timing.h).
4148 2005-08-29 Jakub Jelinek <jakub@redhat.com>
4150 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_WAKE_OP,
4151 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
4152 (lll_futex_wake_unlock): Define.
4153 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_WAKE_OP,
4154 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
4155 (lll_futex_wake_unlock): Define.
4156 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_WAKE_OP,
4157 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
4158 (lll_futex_wake_unlock): Define.
4159 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_WAKE_OP,
4160 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
4161 (lll_futex_wake_unlock): Define.
4162 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_WAKE_OP,
4163 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
4164 (lll_futex_wake_unlock): Define.
4165 * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal): Use
4166 lll_futex_wake_unlock.
4167 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
4168 (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
4169 (__pthread_cond_signal): Use FUTEX_WAKE_OP.
4170 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
4171 (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
4172 (__pthread_cond_signal): Use FUTEX_WAKE_OP.
4174 2005-09-05 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4176 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
4177 Fix typo in register name.
4179 2005-08-23 Ulrich Drepper <drepper@redhat.com>
4181 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
4182 Use __sigfillset. Document that sigfillset does the right thing wrt
4185 2005-07-11 Jakub Jelinek <jakub@redhat.com>
4188 * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER,
4189 PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP,
4190 PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP,
4191 PTHREAD_MUTEX_ADAPTIVE_NP, PTHREAD_RWLOCK_INITIALIZER,
4192 PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP,
4193 PTHREAD_COND_INITIALIZER): Supply zeros for all fields
4195 * Makefile (tests): Add tst-initializers1.
4196 (CFLAGS-tst-initializers1.c): Set.
4197 * tst-initializers1.c: New test.
4199 2005-07-11 Jakub Jelinek <jakub@redhat.com>
4201 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_rwlock_t):
4202 Make sure __flags are located at offset 48 from the start of the
4205 2005-07-02 Roland McGrath <roland@redhat.com>
4207 * Makeconfig: Comment fix.
4209 2005-07-05 Jakub Jelinek <jakub@redhat.com>
4211 * descr.h (PTHREAD_STRUCT_END_PADDING): Define.
4212 * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): If PTHREAD_STRUCT_END_PADDING
4213 is smaller than 8 bytes, increase TLS_PRE_TCB_SIZE by 16 bytes.
4214 (THREAD_SYSINFO, THREAD_SELF, DB_THREAD_SELF): Don't assume
4215 TLS_PRE_TCB_SIZE is sizeof (struct pthread).
4216 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
4217 * sysdeps/ia64/tcb-offsets.sym (PID, TID, MULTIPLE_THREADS_OFFSET):
4218 Use TLS_PRE_TCB_SIZE instead of sizeof (struct pthread).
4219 * sysdeps/unix/sysv/linux/ia64/createthread.c (TLS_VALUE): Don't
4220 assume TLS_PRE_TCB_SIZE is sizeof (struct pthread).
4222 2005-06-25 Jakub Jelinek <jakub@redhat.com>
4224 * sysdeps/i386/tls.h (tcbhead_t): Add stack_guard field.
4225 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
4226 * sysdeps/x86_64/tls.h (tcbhead_t): Add sysinfo and stack_guard
4228 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
4229 * sysdeps/s390/tls.h (tcbhead_t): Add stack_guard
4230 field. Put in sysinfo field unconditionally.
4231 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
4232 * sysdeps/powerpc/tls.h (tcbhead_t): Add stack_guard field.
4233 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
4234 * sysdeps/sparc/tls.h (tcbhead_t): Add sysinfo and stack_guard
4236 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
4237 * pthread_create.c (__pthread_create_2_1): Use
4238 THREAD_COPY_STACK_GUARD macro.
4239 * Makefile: Add rules to build and run tst-stackguard1{,-static}
4241 * tst-stackguard1.c: New file.
4242 * tst-stackguard1-static.c: New file.
4244 2005-06-14 Alan Modra <amodra@bigpond.net.au>
4246 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
4247 Invoke CGOTSETUP and CGOTRESTORE.
4248 (CGOTSETUP, CGOTRESTORE): Define.
4250 2005-05-29 Richard Henderson <rth@redhat.com>
4252 * tst-cancel4.c (WRITE_BUFFER_SIZE): New.
4253 (tf_write, tf_writev): Use it.
4254 (do_test): Use socketpair instead of pipe. Set SO_SNDBUF to
4257 2005-05-23 Jakub Jelinek <jakub@redhat.com>
4259 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
4260 [IS_IN_librt] (CENABLE, CDISABLE): Use JUMPTARGET instead of
4261 __librt_*_asynccancel@local.
4263 2005-05-17 Alan Modra <amodra@bigpond.net.au>
4265 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Delete
4266 all occurrences of JUMPTARGET. Instead append @local to labels.
4268 2005-05-20 Jakub Jelinek <jakub@redhat.com>
4270 * sysdeps/i386/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN): Define to
4271 size/alignment of struct pthread rather than tcbhead_t.
4272 * sysdeps/x86_64/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
4274 * sysdeps/s390/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
4276 * sysdeps/sparc/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
4279 2005-05-19 Richard Henderson <rth@redhat.com>
4281 * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use
4282 __sync_val_compare_and_swap, not explicit _si variant.
4283 * sysdeps/ia64/pthread_spin_trylock.c (pthread_spin_trylock): Likewise.
4285 2005-05-03 Ulrich Drepper <drepper@redhat.com>
4288 * sysdeps/pthread/pthread.h: Avoid empty initializers.
4290 2005-05-03 Jakub Jelinek <jakub@redhat.com>
4292 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Remove explicit
4293 .eh_frame section, use cfi_* directives.
4295 2005-04-27 Jakub Jelinek <jakub@redhat.com>
4297 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: Use <> instead
4300 2005-04-27 Ulrich Drepper <drepper@redhat.com>
4303 * tst-cancel17.c (do_test): Add arbitrary factor to make sure
4306 2005-04-27 Roland McGrath <roland@redhat.com>
4308 * Makefile (tests): Remove tst-clock2.
4310 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Handle
4311 CLOCK_PROCESS_CPUTIME_ID and CLOCK_PROCESS_THREAD_ID specially,
4312 translating to the kernel clockid_t for our own process/thread clock.
4314 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: New file.
4316 2005-04-15 Jakub Jelinek <jakub@redhat.com>
4318 * old_pthread_cond_init.c: Include <errno.h>.
4319 (__pthread_cond_init_2_0): Fail with EINVAL if COND_ATTR is
4320 process shared or uses clock other than CLOCK_REALTIME.
4321 * pthread_cond_init.c (__pthread_cond_init): Remove bogus comment.
4323 2005-04-13 David S. Miller <davem@davemloft.net>
4325 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: New file.
4326 * sysdeps/sparc/sparc64/clone.S: New file.
4328 2005-04-05 Jakub Jelinek <jakub@redhat.com>
4331 * sysdeps/pthread/pthread.h (__pthread_cleanup_routine): Use
4332 __inline instead of inline.
4333 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_routine): Likewise.
4335 2005-03-31 Jakub Jelinek <jakub@redhat.com>
4337 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Use
4338 functionally equivalent, but shorter instructions.
4339 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
4340 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
4341 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
4343 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
4344 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
4345 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
4346 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
4347 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4348 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
4349 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
4351 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
4352 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
4353 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4354 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
4355 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
4357 2005-03-28 Daniel Jacobowitz <dan@codesourcery.com>
4359 * sysdeps/mips/Makefile: New file.
4360 * sysdeps/mips/nptl-sysdep.S: New file.
4361 * sysdeps/mips/tcb-offsets.sym: New file.
4362 * sysdeps/mips/pthread_spin_lock.S: New file.
4363 * sysdeps/mips/pthread_spin_trylock.S: New file.
4364 * sysdeps/mips/pthreaddef.h: New file.
4365 * sysdeps/mips/tls.h: New file.
4366 * sysdeps/mips/jmpbuf-unwind.h: New file.
4367 * sysdeps/unix/sysv/linux/mips/lowlevellock.h: New file.
4368 * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h: New file.
4369 * sysdeps/unix/sysv/linux/mips/bits/semaphore.h: New file.
4370 * sysdeps/unix/sysv/linux/mips/pthread_once.c: New file.
4371 * sysdeps/unix/sysv/linux/mips/fork.c: New file.
4372 * sysdeps/unix/sysv/linux/mips/pt-vfork.S: New file.
4373 * sysdeps/unix/sysv/linux/mips/vfork.S: New file.
4374 * sysdeps/unix/sysv/linux/mips/clone.S: New file.
4375 * sysdeps/unix/sysv/linux/mips/createthread.c: New file.
4376 * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: New file.
4378 2005-03-23 Ulrich Drepper <drepper@redhat.com>
4381 * pthread_create.c (__pthread_create_2_1): Rename syscall error
4384 2005-03-10 Jakub Jelinek <jakub@redhat.com>
4386 * tst-getpid1.c (do_test): Align stack passed to clone{2,}.
4388 2005-02-25 Roland McGrath <roland@redhat.com>
4390 * alloca_cutoff.c: Correct license text.
4391 * tst-unload.c: Likewise.
4392 * sysdeps/pthread/allocalim.h: Likewise.
4393 * sysdeps/pthread/pt-initfini.c: Likewise.
4394 * sysdeps/pthread/bits/libc-lock.h: Likewise.
4395 * sysdeps/pthread/bits/sigthread.h: Likewise.
4396 * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
4397 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
4399 2005-02-16 Roland McGrath <roland@redhat.com>
4401 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
4402 Use unsigned int * for ptr_nthreads.
4404 2005-02-14 Alan Modra <amodra@bigpond.net.au>
4407 * sysdeps/powerpc/tcb-offsets.sym (thread_offsetof): Redefine to suit
4410 2005-02-07 Richard Henderson <rth@redhat.com>
4413 * sysdeps/pthread/pthread.h (__sigsetjmp): Use pointer as first
4416 2004-11-03 Marcus Brinkmann <marcus@gnu.org>
4418 * sysdeps/generic/lowlevellock.h (__generic_mutex_unlock): Fix
4419 order of arguments in invocation of atomic_add_zero.
4421 2005-01-26 Jakub Jelinek <jakub@redhat.com>
4424 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S (__new_sem_trywait):
4425 Use direct %gs segment access or, if NO_TLS_DIRECT_SEG_REFS,
4426 at least gotntpoff relocation and addition.
4427 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
4429 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
4431 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
4434 2005-01-06 Ulrich Drepper <drepper@redhat.com>
4436 * allocatestack.c (init_one_static_tls): Adjust initialization of DTV
4437 entry for static tls deallocation fix.
4438 * sysdeps/alpha/tls.h (dtv_t): Change pointer type to be struct which
4439 also contains information whether the memory pointed to is static
4441 * sysdeps/i386/tls.h: Likewise.
4442 * sysdeps/ia64/tls.h: Likewise.
4443 * sysdeps/powerpc/tls.h: Likewise.
4444 * sysdeps/s390/tls.h: Likewise.
4445 * sysdeps/sh/tls.h: Likewise.
4446 * sysdeps/sparc/tls.h: Likewise.
4447 * sysdeps/x86_64/tls.h: Likewise.
4449 2004-12-27 Ulrich Drepper <drepper@redhat.com>
4451 * init.c (__pthread_initialize_minimal_internal): Use __sigemptyset.
4453 2004-12-21 Jakub Jelinek <jakub@redhat.com>
4455 * sysdeps/i386/tls.h (CALL_THREAD_FCT): Maintain 16 byte alignment of
4457 * Makefile (tests): Add tst-align2.
4458 * tst-align2.c: New test.
4459 * sysdeps/i386/Makefile (CFLAGS-tst-align{,2}.c): Add
4460 -mpreferred-stack-boundary=4.
4462 2004-12-18 Roland McGrath <roland@redhat.com>
4464 * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h:
4465 New file removed withdrawn for the moment.
4467 2004-12-17 Richard Henderson <rth@redhat.com>
4469 * sysdeps/unix/sysv/linux/alpha/clone.S: New file.
4470 * sysdeps/alpha/tcb-offsets.sym (TID_OFFSET): New.
4472 2004-12-16 Ulrich Drepper <drepper@redhat.com>
4474 * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h: New file.
4475 Increased PTHREAD_STACK_MIN.
4477 * tst-context1.c (stacks): Use bigger stack size.
4479 2004-12-16 Jakub Jelinek <jakub@redhat.com>
4481 * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: New file.
4482 * sysdeps/sparc/tcb-offsets.sym: Add TID.
4484 2004-12-15 Jakub Jelinek <jakub@redhat.com>
4486 * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: New file.
4487 * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: New file.
4488 * sysdeps/s390/tcb-offsets.sym (TID): Add.
4490 2004-12-15 Ulrich Drepper <drepper@redhat.com>
4492 * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: New file.
4494 2004-12-14 Ulrich Drepper <drepper@redhat.com>
4496 * sysdeps/powerpc/tcb-offsets.sym: Add TID.
4497 * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: New file.
4499 * tst-getpid1.c: If child crashes, report this first. Print which
4502 2004-12-09 Ulrich Drepper <drepper@redhat.com>
4504 * init.c (__pthread_initialize_minimal_internal): Also unblock
4507 2004-12-01 Jakub Jelinek <jakub@redhat.com>
4509 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_CPUTIME,
4510 _POSIX_THREAD_CPUTIME): Define to 0.
4511 * sysdeps/pthread/timer_create.c (timer_create): Remove unused code
4512 handling CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID.
4513 * sysdeps/pthread/timer_routines.c (__timer_signal_thread_pclk,
4514 __timer_signal_thread_tclk): Remove.
4515 (init_module): Remove their initialization.
4516 (thread_cleanup): Remove their cleanup assertions.
4517 * sysdeps/pthread/posix-timer.h (__timer_signal_thread_pclk,
4518 __timer_signal_thread_tclk): Remove.
4519 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Removed.
4520 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Removed.
4521 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Removed.
4523 2004-12-07 Jakub Jelinek <jakub@redhat.com>
4525 * sysdeps/ia64/tcb-offsets.sym (TID): Add.
4526 * sysdeps/unix/sysv/linux/ia64/clone2.S: New file.
4528 * Makefile (tests): Add tst-getpid2.
4529 * tst-getpid1.c (TEST_CLONE_FLAGS): Define.
4530 (do_test): Use it. Use __clone2 instead of clone on ia64.
4531 * tst-getpid2.c: New test.
4533 2004-12-07 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4535 * sysdeps/unix/sysv/linux/sh/clone.S: New file.
4537 2004-12-04 Ulrich Drepper <drepper@redhat.com>
4539 * Makefile (tests): Add tst-getpid1.
4540 * tst-getpid1.c: New file.
4541 * sysdeps/unix/sysv/linux/i386/clone.S: New file.
4542 * sysdeps/unix/sysv/linux/x86_64/clone.S: New file.
4544 2004-12-02 Roland McGrath <roland@redhat.com>
4546 * Makefile (libpthread-nonshared): Variable removed.
4547 ($(objpfx)libpthread_nonshared.a): Target removed.
4548 ($(inst_libdir)/libpthread_nonshared.a): Likewise.
4549 These are now handled by generic magic from
4550 libpthread-static-only-routines being set.
4552 2004-11-27 Ulrich Drepper <drepper@redhat.com>
4554 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_PRIORITIZED_IO,
4555 _POSIX2_CHAR_TERM, _POSIX_THREAD_PRIO_INHERIT,
4556 _POSIX_THREAD_PRIO_PROTECT): Define.
4557 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
4558 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
4559 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
4561 2004-11-26 Jakub Jelinek <jakub@redhat.com>
4563 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_ADVISORY_INFO,
4564 _POSIX_SPORADIC_SERVER, _POSIX_THREAD_SPORADIC_SERVER, _POSIX_TRACE,
4565 _POSIX_TRACE_EVENT_FILTER, _POSIX_TRACE_INHERIT, _POSIX_TRACE_LOG,
4566 _POSIX_TYPED_MEMORY_OBJECTS, _POSIX_IPV6, _POSIX_RAW_SOCKETS): Define.
4567 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
4568 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
4569 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
4571 2004-11-24 Ulrich Drepper <drepper@redhat.com>
4573 * sysdeps/x86_64/Makefile [nptl]: Define CFLAGS-pthread_create.c.
4575 * Makefile (libpthread-routines): Add pthread_setschedprio.
4576 * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setschedprio.
4577 * sysdeps/pthread/pthread.h: Declare pthread_setschedprio.
4578 * pthread_setschedprio.c: New file.
4580 2004-11-20 Jakub Jelinek <jakub@redhat.com>
4582 * pthread_create.c (pthread_cancel): Add PTHREAD_STATIC_FN_REQUIRE.
4583 * pthread_cancel.c (pthread_create): Likewise.
4585 * Makefile (libpthread-routines): Add vars.
4586 * sysdeps/pthread/createthread.c (__pthread_multiple_threads): Remove.
4587 * init.c (__default_stacksize, __is_smp): Remove.
4589 * pthreadP.h (__find_thread_by_id): If !SHARED, add weak_function
4590 and define a wrapper macro.
4591 (PTHREAD_STATIC_FN_REQUIRE): Define.
4592 * allocatestack.c (__find_thread_by_id): Undefine.
4593 * pthread_create (__pthread_keys): Remove.
4594 (pthread_mutex_lock, pthread_mutex_unlock, pthread_once,
4595 pthread_key_create, pthread_setspecific, pthread_getspecific): Add
4596 PTHREAD_STATIC_FN_REQUIRE.
4598 2004-11-18 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4600 * sysdeps/sh/tls.h (DB_THREAD_SELF): Set the correct bias
4601 parameter to REGISTER macro.
4603 2004-11-17 Roland McGrath <roland@redhat.com>
4605 * sysdeps/unix/sysv/linux/timer_routines.c (__start_helper_thread):
4606 Make sure SIGCANCEL is blocked as well.
4608 2004-11-10 Jakub Jelinek <jakub@redhat.com>
4610 * sysdeps/pthread/setxid.h: New file.
4611 * sysdeps/pthread/pthread-functions.h (HAVE_PTR__NPTL_SETXID): Remove.
4612 (struct xid_command): Add forward decl.
4613 (struct pthread_functions): Change return type of __nptl_setxid hook
4615 * pthreadP.h (__nptl_setxid): Change return type to int.
4616 * allocatestack.c (__nptl_setxid): Call INTERNAL_SYSCALL_NCS in the
4617 calling thread, return its return value and set errno on failure.
4618 * descr.h (struct xid_command): Change id type to long array.
4620 * Makefile: Add rules to build and test tst-setuid1 and
4622 * tst-setuid1.c: New test.
4623 * tst-setuid1-static.c: New test.
4625 2004-11-10 Jakub Jelinek <jakub@redhat.com>
4627 * Makefile (tests): Add tst-exit3.
4628 * tst-exit3.c: New test.
4630 2004-11-09 Ulrich Drepper <drepper@redhat.com>
4632 * Makefile (tests): Add tst-exit2.
4633 * tst-exit2.c: New file.
4635 2004-11-09 Roland McGrath <roland@redhat.com>
4638 * sysdeps/pthread/createthread.c (do_clone): Increment __nptl_nthreads
4639 here, before calling clone.
4640 * pthread_create.c (start_thread): Don't do it here.
4642 2004-11-02 Jakub Jelinek <jakub@redhat.com>
4644 * sysdeps/unix/sysv/linux/smp.h: Include <errno.h>.
4646 2004-10-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4648 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
4649 Set ETIMEDOUT to errno when time is up. Tweak to avoid
4652 2004-10-28 Jakub Jelinek <jakub@redhat.com>
4654 * pthread_create.c (__pthread_create_2_1): Avoid leaking stacks
4655 if sched_priority is not between minprio and maxprio.
4657 2004-10-25 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4659 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
4660 (__pthread_cond_timedwait): Use clock_gettime syscall if exists.
4662 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
4663 (__lll_mutex_timedlock_wait): Fix a bad branch condition.
4665 2004-10-24 Ulrich Drepper <drepper@redhat.com>
4667 * sysdeps/unix/sysv/linux/smp.h (is_smp_system): Use
4668 not-cancelable I/O functions.
4670 2004-10-21 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4672 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
4673 (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
4674 make sure 2 is stored in the futex and we looked at the old value.
4675 Fix a few other problems to return the correct value.
4677 2004-10-14 Richard Henderson <rth@redhat.com>
4679 * sysdeps/alpha/tcb-offsets.sym (thread_offsetof): Redefine to
4682 2004-10-06 Jakub Jelinek <jakub@redhat.com>
4684 * sysdeps/unix/sysv/linux/jmp-unwind.c: Include pthreadP.h instead
4685 of pthread-functions.h and pthreaddef.h.
4686 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Likewise.
4688 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
4689 Change __data.__nwaiters from int to unsigned int.
4691 * tst-clock2.c (do_test): Don't fail if _POSIX_THREAD_CPUTIME == 0 and
4692 sysconf (_SC_THREAD_CPUTIME) returns negative value.
4694 * allocatestack.c (__find_thread_by_id): Move attribute_hidden
4697 * sysdeps/s390/jmpbuf-unwind.h: Include bits/wordsize.h.
4698 (JMPBUF_CFA_UNWINDS_ADJ): Subtract 96 resp. 160 bytes from CFA.
4700 2004-10-06 Ulrich Drepper <drepper@redhat.com>
4702 * tst-cancel4.c (tf_msgrcv): Check for failure in msgget. If the
4703 test fails, remove message queue.
4704 (tf_msgsnd): Likewise.
4706 2004-10-05 Jakub Jelinek <jakub@redhat.com>
4708 * tst-clock1.c: Change #ifdef to #if defined.
4709 * tst-clock2.c: Likewise.
4710 * tst-cond11.c: Likewise.
4712 * sysdeps/pthread/timer_create.c (timer_create): Use
4713 defined _POSIX_CPUTIME && _POSIX_CPUTIME >= 0 instead of
4714 defined CLOCK_PROCESS_CPUTIME_ID #ifs and similarly for
4717 2004-10-05 Jakub Jelinek <jakub@redhat.com>
4719 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h (_POSIX_CPUTIME,
4720 _POSIX_THREAD_CPUTIME): Define to 0.
4722 2004-10-04 Ulrich Drepper <drepper@redhat.com>
4724 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Define _POSIX_CPUTIME
4725 and _POSIX_THREAD_CPUTIME to zero.
4726 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
4727 * tst-barrier2.c: Fix testing for POSIX feature.
4728 * tst-clock1.c: Likewise.
4729 * tst-clock2.c: Likewise.
4730 * tst-cond11.c: Likewise.
4731 * tst-cond4.c: Likewise.
4732 * tst-cond6.c: Likewise.
4733 * tst-flock2.c: Likewise.
4734 * tst-mutex4.c: Likewise.
4735 * tst-mutex9.c: Likewise.
4736 * tst-rwlock12.c: Likewise.
4737 * tst-rwlock4.c: Likewise.
4738 * tst-signal1.c: Likewise.
4739 * tst-spin2.c: Likewise.
4740 * sysdeps/pthread/posix-timer.h: Likewise.
4741 * sysdeps/pthread/timer_create.c: Likewise.
4742 * sysdeps/pthread/timer_routines.c: Likewise.
4744 2004-10-01 Ulrich Drepper <drepper@redhat.com>
4746 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4747 (__lll_mutex_timedlock_wait): Address futex correctly.
4749 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
4750 (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
4751 make sure 2 is stored in the futex and we looked at the old value.
4752 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4753 (__lll_mutex_timedlock_wait): Likewise. Fix a few other problems
4754 which might very well made the code not working at all before.
4757 2004-09-28 Ulrich Drepper <drepper@redhat.com>
4759 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
4760 allow SIGSETXID to be sent.
4761 * sysdeps/pthread/sigaction.c (__sigaction): Don't allow action
4762 for SIGSETXID to be defined.
4763 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
4764 SIGSETXID cannot be blocked.
4766 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4767 Add __extension__ to long long types.
4768 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4769 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4770 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4771 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4772 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
4773 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4774 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4776 2004-09-25 Ulrich Drepper <drepper@redhat.com>
4778 * descr.h (struct pthread): Add stopped_start field.
4779 * sysdeps/pthread/createthread.c (create_thread): Set
4780 start_stopped flag in descriptor for new thread appropriately.
4781 * pthread_create.c (start_thread): Only take lock to be stopped on
4782 startup if stopped_start flag says so.
4784 2004-09-24 Ulrich Drepper <drepper@redhat.com>
4786 * pthread_create.c (__pthread_create_2_1): Remember whether thread
4787 is created detached and if yes, do not try to free the stack in case
4788 the thread creation failed.
4789 * sysdeps/pthread/createthread.c (do_clone): Free stack here if clone
4790 call fails. Don't depend on INTERNAL_SYSCALL_ERRNO return zero in
4791 case there has been no error. [BZ #405]
4793 * pthread_create.c (start_thread): Don't wait for scheduler data
4794 etc to be set at the beginning of the function. The cancellation
4795 infrastructure must have been set up. And enable async
4796 cancellation before potentially going to sleep. [BZ #401]
4798 2004-09-20 Ulrich Drepper <drepper@redhat.com>
4800 * Versions: Remove exports for pthread_set*id_np functions.
4801 * sysdeps/pthread/pthread.h: Remove pthread_set*id_np prototypes
4803 * Makefile: Don't build pthread_set*id code for now.
4805 2004-09-19 Ulrich Drepper <drepper@redhat.com>
4807 * sysdeps/unix/sysv/linux/allocrtsig.c: Allocate second signal for
4809 * allocatestack.c (__nptl_setxid): New function.
4810 * descr.h (struct xid_command): Define type.
4811 * init.c (pthread_functions): Add ptr__nptl_setxid initialization.
4812 (sighandler_setxid): New function.
4813 (__pthread_initialize_minimal): Register sighandler_setxid for
4815 * pt-allocrtsig.c: Update comment.
4816 * pthreadP.h: Define SIGSETXID. Declare __xidcmd variable.
4817 Declare __nptl_setxid.
4818 * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_setxid.
4819 * sysdeps/pthread/pthread.h: Declare pthread_setgid_np,
4820 pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
4821 pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
4822 and pthread_setresuid_np.
4823 * pthread_setgid_np.c: New file.
4824 * pthread_setuid_np.c: New file.
4825 * pthread_setegid_np.c: New file.
4826 * pthread_seteuid_np.c: New file.
4827 * pthread_setregid_np.c: New file.
4828 * pthread_setreuid_np.c: New file.
4829 * pthread_setresgid_np.c: New file.
4830 * pthread_setresuid_np.c: New file.
4831 * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setgid_np,
4832 pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
4833 pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
4834 and pthread_setresuid_np.
4835 * Makefile (libpthread-routines): Add pthread_setuid, pthread_seteuid,
4836 pthread_setreuid, pthread_setresuid, pthread_setgid, pthread_setegid,
4837 pthread_setregid, and pthread_setresgid.
4839 2004-09-18 Ulrich Drepper <drepper@redhat.com>
4841 * allocatestack.c (allocate_stack): Return EAGAIN instead of
4842 ENOMEM when out of memory.
4844 2004-09-10 Roland McGrath <roland@redhat.com>
4847 * allocatestack.c (allocate_stack): Remove [__ASSUME_CLONE_STOPPED]
4848 code, since we don't try to use the broken CLONE_STOPPED any more.
4849 * pthread_create.c (start_thread): Likewise.
4851 2004-09-15 Richard Henderson <rth@redhat.com>
4853 * sysdeps/unix/sysv/linux/alpha/vfork.S: Use libc_hidden_def.
4855 2004-09-01 David Mosberger <davidm@hpl.hp.com>
4857 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h
4858 (__libc_unwind_longjmp): Delete macro and declare as function.
4859 * sysdeps/unix/sysv/linux/ia64/Makefile (sysdep_routines): Mention
4860 __ia64_longjmp, sigstack_longjmp, and __sigstack_longjmp for
4862 * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S: New file.
4863 * sysdeps/unix/sysv/linux/ia64/__sigstack_longjmp.c: New file.
4864 * sysdeps/unix/sysv/linux/ia64/unwind_longjmp.c: New file.
4866 2004-09-12 Ulrich Drepper <drepper@redhat.com>
4868 * sysdeps/pthread/pthread.h: Make rwlock prototypes available also
4870 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define rwlock
4871 types also for __USE_XOPEN2K.
4872 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4873 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4874 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4875 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4876 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4877 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4878 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4881 2004-09-08 Ulrich Drepper <drepper@redhat.com>
4883 * sysdeps/pthread/pthread.h
4884 (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Make safe for C++.
4885 (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
4886 (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
4887 (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Likewise.
4890 2004-09-07 Ulrich Drepper <drepper@redhat.com>
4892 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Allow
4893 PSEUDO to be used with . prefix.
4895 * sysdeps/unix/sysv/linux/alpha/pthread_once.c (__pthread_once):
4896 Use atomic_increment instead of atomic_exchange_and_add.
4897 * sysdeps/unix/sysv/linux/sparc/pthread_once.c (__pthread_once):
4899 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
4901 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
4904 * allocatestack.c (allocate_stack): Use atomic_increment_val
4905 instead of atomic_exchange_and_add.
4906 * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Likewise.
4907 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
4909 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
4912 * sysdeps/pthread/pthread.h (pthread_once): Remove __THROW since
4913 the initialization function might throw.
4915 2005-09-05 Richard Henderson <rth@redhat.com>
4917 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
4918 Move definition inside libpthread, libc, librt check. Provide
4919 definition for rtld.
4921 2004-09-02 Ulrich Drepper <drepper@redhat.com>
4923 * sysdeps/alpha/jmpbuf-unwind.h: Define __libc_unwind_longjmp.
4924 * sysdeps/i386/jmpbuf-unwind.h: Likewise
4925 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
4926 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
4927 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
4928 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
4929 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
4930 * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
4933 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
4934 Rename __data.__clock to __data.__nwaiters, make it unsigned int.
4935 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
4937 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
4938 Decrement __nwaiters. If pthread_cond_destroy has been called and
4939 this is the last waiter, signal pthread_cond_destroy caller and
4940 avoid using the pthread_cond_t structure after unlock.
4941 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4942 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4943 Read clock type from the least significant bits of __nwaiters instead
4945 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4946 * sysdeps/unix/sysv/linux/internaltypes.h: Define COND_CLOCK_BITS.
4948 2004-08-31 Jakub Jelinek <jakub@redhat.com>
4951 * Makefile (tests): Add tst-cond20 and tst-cond21.
4952 * tst-cond20.c: New test.
4953 * tst-cond21.c: New test.
4954 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
4955 (pthread_cond_t): Rename __data.__clock to __data.__nwaiters, make
4957 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
4959 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
4960 (pthread_cond_t): Likewise.
4961 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
4963 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4965 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
4967 * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_clock): Remove.
4968 (cond_nwaiters): New.
4970 * pthread_cond_destroy.c (__pthread_cond_destroy): Return EBUSY
4971 if there are waiters not signalled yet.
4972 Wait until all already signalled waiters wake up.
4973 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Decrement
4974 __nwaiters. If pthread_cond_destroy has been called and this is the
4975 last waiter, signal pthread_cond_destroy caller and avoid using
4976 the pthread_cond_t structure after unlock.
4977 (__pthread_cond_wait): Increment __nwaiters in the beginning,
4978 decrement it when leaving. If pthread_cond_destroy has been called
4979 and this is the last waiter, signal pthread_cond_destroy caller.
4980 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
4981 Likewise. Read clock type from the least significant bits of
4982 __nwaiters instead of __clock.
4983 * pthread_condattr_setclock.c (pthread_condattr_setclock): Check
4984 whether clock ID can be encoded in COND_CLOCK_BITS bits.
4985 * pthread_condattr_getclock.c (pthread_condattr_getclock): Decode
4986 clock type just from the last COND_CLOCK_BITS bits of value.
4987 * pthread_cond_init.c (__pthread_cond_init): Initialize __nwaiters
4988 instead of __clock, just from second bit of condattr's value.
4990 2004-08-30 Jakub Jelinek <jakub@redhat.com>
4992 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Include
4993 bits/wordsize.h. Make the header match i386 header when __WORDSIZE
4995 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
4997 2004-08-15 Roland McGrath <roland@frob.com>
4999 * pthread_atfork.c: Update copyright terms including special exception
5000 for these trivial files, which are statically linked into executables
5001 that use dynamic linking for the significant library code.
5003 2004-08-09 Jakub Jelinek <jakub@redhat.com>
5005 * DESIGN-rwlock.txt: Add decreasing of nr_readers_queued to
5006 pthread_rwlock_rdlock.
5007 * sysdeps/pthread/pthread_rwlock_rdlock (__pthread_rwlock_rdlock):
5008 Decrease __nr_readers_queued after reacquiring lock.
5009 * sysdeps/pthread/pthread_rwlock_timedrdlock
5010 (pthread_rwlock_timedrdlock): Likewise.
5011 Reported by Bob Cook <bobcook47@hotmail.com>.
5013 2004-08-11 Jakub Jelinek <jakub@redhat.com>
5015 * tst-rwlock14.c (tf): Read main thread handle from *ARG
5016 before pthread_barrier_wait.
5018 2004-08-07 Ulrich Drepper <drepper@redhat.com>
5020 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
5021 Remove unnecessary exception handling data.
5023 2004-07-23 Jakub Jelinek <jakub@redhat.com>
5026 * sysdeps/pthread/pthread.h (pthread_getcpuclockid): Use __clockid_t
5027 instead of clockid_t.
5029 2004-07-21 Roland McGrath <roland@redhat.com>
5031 * Makefile ($(objpfx)multidir.mk): Use $(make-target-directory).
5033 2004-07-19 Roland McGrath <roland@redhat.com>
5035 * tst-cancel4.c (tf_waitid): Use WEXITED flag bit if available.
5037 2004-07-02 Roland McGrath <roland@redhat.com>
5039 * configure: Don't exit.
5041 2004-07-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5043 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
5044 (__pthread_cond_timedwait): Check for invalid nanosecond in
5047 2004-07-07 Ulrich Drepper <drepper@redhat.com>
5049 * Makefile: Add rules to build and run tst-fini1.
5050 * tst-fini1.c: New file.
5051 * tst-fini1mod.c: New file.
5053 2004-07-05 Ulrich Drepper <drepper@redhat.com>
5055 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define NO_CANCELLATION
5056 if no cancellation support is needed.
5057 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
5058 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
5059 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
5060 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
5061 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
5062 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
5063 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
5064 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
5065 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
5067 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define __NR_futex
5068 only if not already defined.
5070 2004-07-05 Jakub Jelinek <jakub@redhat.com>
5072 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_unlock): Use
5073 constraint "m" instead of "0" for futex.
5075 * shlib-versions: Add powerpc64-.*-linux.*.
5077 2004-07-04 Jakub Jelinek <jakub@redhat.com>
5079 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
5080 (pthread_rwlock_timedrdlock): Use cmpq instead of cmpl to check
5082 * tst-rwlock14.c (do_test): Test for invalid tv_nsec equal to
5083 1 billion and 64-bit tv_nsec which is valid when truncated to 32
5086 2004-06-29 Roland McGrath <roland@redhat.com>
5088 * Banner: NPTL no longer has its own version number.
5089 * Makefile (nptl-version): Variable removed.
5090 * sysdeps/pthread/Makefile (CFLAGS-confstr.c): Set LIBPTHREAD_VERSION
5091 using $(version), the glibc version number.
5093 2004-06-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5095 * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
5096 Fix branch offset for a PLT entry.
5097 * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
5099 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
5101 * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
5103 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait):
5106 2004-06-28 Jakub Jelinek <jakub@redhat.com>
5108 * sysdeps/alpha/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define
5111 2004-06-28 Jakub Jelinek <jakub@redhat.com>
5113 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
5114 (pthread_rwlock_timedwrlock): Return EINVAL if tv_nsec is negative,
5116 * sysdeps/pthread/pthread_rwlock_timedrdlock.c
5117 (pthread_rwlock_timedrdlock): Likewise.
5119 2004-06-22 Jakub Jelinek <jakub@redhat.com>
5121 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
5122 Set __r7 to val, not mutex.
5124 2004-06-27 Ulrich Drepper <drepper@redhat.com>
5126 * Makefile: Add rules to build tst-rwlock14.
5127 * tst-rwlock14.c: New file.
5129 2004-06-24 Boris Hu <boris.hu@intel.com>
5131 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Add timeout validation
5133 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
5135 2004-06-19 Andreas Jaeger <aj@suse.de>
5137 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix
5138 assembler in last patch.
5140 2004-06-17 Ulrich Drepper <drepper@redhat.com>
5142 * sysdeps/pthread/pthread_cond_timedwait.c
5143 (__pthread_cond_timedwait): Also check for negativ nanoseconds.
5144 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5145 (__pthread_cond_timedwait): Check for invalid nanosecond in
5147 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5148 * tst-cond19.c: New file.
5149 * Makefile: Add rules to build and run tst-cond19.
5151 2004-06-15 Steven Munroe <sjmunroe@us.ibm.com>
5153 * tst-context1.c (GUARD_PATTERN): Defined.
5154 (tst_context_t): Define struct containing ucontext_t & guard words.
5155 (ctx): Declare as an array of tst_context_t.
5156 (fct): Verify uc_link & guard words are still valid.
5157 (tf): Initialize guard words in ctx. Adjust ctx refs for new struct.
5159 2004-06-13 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5161 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
5162 Add __data.__futex field, reshuffle __data.__clock.
5163 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
5164 (__pthread_cond_signal): Increment __futex at the same time as
5165 __wakeup_seq or __total_seq. Pass address of __futex instead of
5166 address of low 32-bits of __wakeup_seq to futex syscall.
5167 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
5168 (__pthread_cond_wait): Likewise. Pass __futex value from before
5169 releasing internal lock to FUTEX_WAIT.
5170 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
5171 (__pthread_cond_timedwait): Likewise.
5172 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
5173 (FUTEX_CMP_REQUEUE): Define.
5174 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
5175 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
5176 Pass __futex value from before the unlock and __futex address instead
5177 of address of low 32-bits of __wakeup_seq to futex syscall.
5178 Fallback to FUTEX_WAKE all on any errors.
5180 2004-06-08 Jakub Jelinek <jakub@redhat.com>
5182 * pthread_mutexattr_getpshared.c (pthread_mutex_getpshared): Fix
5184 * pthread_mutexattr_gettype.c (pthread_mutexattr_gettype): Likewise.
5185 * pthread_mutexattr_init.c (__pthread_mutexattr_init): Likewise.
5186 * pthread_mutexattr_settype.c (__pthread_mutexattr_settype): Likewise.
5187 * pthread_mutexattr_setpshared.c (pthread_mutexattr_setpshared):
5188 Likewise. Reported by Bob Cook <bobcook47@hotmail.com>.
5190 2004-06-11 Martin Schwidefsky <schwidefsky@de.ibm.com>
5192 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_compare_and_swap):
5193 Add memory clobber to inline assembly.
5194 (__lll_mutex_trylock): Likewise.
5195 (__lll_mutex_cond_trylock): Likewise.
5197 2004-06-07 Martin Schwidefsky <schwidefsky@de.ibm.com>
5199 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
5200 Pass val argument as 6th system call argument in %r7.
5202 2004-05-21 Jakub Jelinek <jakub@redhat.com>
5204 * Makefile (tests): Add tst-cond16.
5205 * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_futex): Add.
5206 * pthread_cond_init.c (__pthread_cond_init): Clear __data.__futex.
5207 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
5208 Add __data.__futex field, reshuffle __data.__clock.
5209 * sysdeps/unix/sysv/linux/i386/pthread_cond_signal.S
5210 (__pthread_cond_signal): Increment __futex at the same time as
5211 __wakeup_seq or __total_seq. Pass address of __futex instead of
5212 address of low 32-bits of __wakeup_seq to futex syscall.
5213 * sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S
5214 (__pthread_cond_wait): Likewise. Pass __futex value from before
5215 releasing internal lock to FUTEX_WAIT.
5216 * sysdeps/unix/sysv/linux/i386/pthread_cond_timedwait.S
5217 (__pthread_cond_timedwait): Likewise.
5218 * sysdeps/unix/sysv/linux/i386/pthread_cond_broadcast.S
5219 (FUTEX_CMP_REQUEUE): Define.
5220 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
5221 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
5222 Pass __futex value from before the unlock and __futex address instead
5223 of address of low 32-bits of __wakeup_seq to futex syscall.
5224 Fallback to FUTEX_WAKE all on any errors.
5225 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_CMP_REQUEUE):
5227 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
5228 internally. Return non-zero if error, zero if success.
5229 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
5230 Add __data.__futex field, reshuffle __data.__clock.
5231 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_CMP_REQUEUE):
5233 (lll_futex_requeue): Add val argument, return 1 unconditionally
5235 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
5236 Add __data.__futex field, reshuffle __data.__clock.
5237 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_CMP_REQUEUE):
5239 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
5240 internally. Return non-zero if error, zero if success.
5241 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
5242 (pthread_cond_t): Add __data.__futex field, reshuffle __data.__clock.
5243 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_CMP_REQUEUE):
5245 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
5246 internally. Return non-zero if error, zero if success.
5247 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
5248 Add __data.__futex field, reshuffle __data.__clock.
5249 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_CMP_REQUEUE):
5251 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
5252 internally. Return non-zero if error, zero if success.
5253 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
5254 Add __data.__futex field, reshuffle __data.__clock.
5255 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
5256 Add __data.__futex field, reshuffle __data.__clock.
5257 * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal):
5258 Increment __futex at the same time as __wakeup_seq or __total_seq.
5259 Pass address of __futex instead of address of low 32-bits of
5260 __wakeup_seq to futex syscall.
5261 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
5262 Pass __futex value from before releasing internal lock
5264 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
5265 Likewise. Avoid unnecessary shadowing of variables.
5266 * sysdeps/pthread/pthread_cond_broadcast.c (__pthread_cond_broadcast):
5267 Set __futex to 2 * __total_seq. Pass __futex value from before the
5268 unlock and __futex address instead of address of low 32-bits of
5269 __wakeup_seq to futex_requeue macro, adjust for new return value
5271 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
5272 (__pthread_cond_signal): Increment __futex at the same time as
5273 __wakeup_seq or __total_seq. Pass address of __futex instead of
5274 address of low 32-bits of __wakeup_seq to futex syscall.
5275 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
5276 (__pthread_cond_wait): Likewise. Pass __futex value from before
5277 releasing internal lock to FUTEX_WAIT.
5278 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
5279 (__pthread_cond_timedwait): Likewise.
5280 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
5281 (FUTEX_CMP_REQUEUE): Define.
5282 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
5283 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
5284 Pass __futex value from before the unlock and __futex address instead
5285 of address of low 32-bits of __wakeup_seq to futex syscall.
5286 Fallback to FUTEX_WAKE all on any errors.
5288 2004-06-03 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5290 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_mutex_lock):
5291 Add nop to align the end of critical section.
5292 (lll_mutex_cond_lock, lll_mutex_timedlock): Likewise.
5294 2004-06-01 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5296 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
5297 Add __broadcast_seq field.
5298 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Mark
5299 all waiters as woken with woken_seq and bump broadcast counter.
5300 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use new
5301 __broadcast_seq. Increment __woken_seq correctly when cleanuped.
5302 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
5303 Comment typo fixes. Avoid returning -ETIMEDOUT.
5305 2004-06-01 Ulrich Drepper <drepper@redhat.com>
5307 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5308 (__condvar_tw_cleanup): Fix access to saved broadcast_seq value.
5309 Reported by Kaz Kojima.
5311 2004-05-25 Jakub Jelinek <jakub@redhat.com>
5313 * sysdeps/unix/sysv/linux/aio_misc.h: New file.
5315 2004-05-21 Jakub Jelinek <jakub@redhat.com>
5317 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Compare
5318 __broadcast_seq with bc_seq after acquiring internal lock instead of
5321 2004-05-18 Jakub Jelinek <jakub@redhat.com>
5323 * Makefile (.NOTPARALLEL): Only serialize make check/xcheck, not
5325 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5326 (__pthread_cond_timedwait): Avoid returning -ETIMEDOUT.
5327 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
5328 (pthread_cond_t): Add __data.__broadcast_seq field.
5329 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
5330 (FRAME_SIZE): Define.
5331 (__pthread_cond_timedwait): Use it. Store/check broadcast_seq.
5333 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S (FRAME_SIZE):
5335 (__pthread_cond_wait): Use it. Store/check broadcast_seq. Comment
5337 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
5338 (__pthread_cond_broadcast): Increment broadcast_seq. Comment typo
5341 2004-05-18 Ulrich Drepper <drepper@redhat.com>
5343 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add broadcast_seq entry.
5344 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
5345 Add __broadcast_seq field.
5346 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5347 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5348 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5349 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
5350 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5351 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Mark
5352 all waiters as woken with woken_seq and bump broadcast counter.
5353 * sysdeps/pthread/pthread_cond_broadcast.c: Likewise.
5354 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use new
5355 __broadcast_seq field.
5356 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5357 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
5358 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
5359 * pthread_cond_init.c: Initialize __broadcast_seq field.
5360 * Makefile (tests): Add tst-cond17 and tst-cond18.
5361 Add .NOTPARALLEL goal.
5362 * tst-cond16.c: New file. From Jakub.
5363 * tst-cond17.c: New file. From Jakub.
5364 * tst-cond18.c: New file. From Jakub.
5366 2004-05-16 Ulrich Drepper <drepper@redhat.com>
5368 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Correct some
5371 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
5372 Parametrize frame size. Correct some unwind info.
5373 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5375 2004-05-04 Jakub Jelinek <jakub@redhat.com>
5377 * tst-stack3.c: Note testing functionality beyond POSIX.
5379 2004-05-04 Jakub Jelinek <jakub@redhat.com>
5381 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (USE___THREAD):
5382 Change conditional from ifdef to if.
5384 2004-04-23 Jakub Jelinek <jakub@redhat.com>
5386 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SYSDEP_CANCEL_ERRNO,
5387 SYSDEP_CANCEL_ERROR): Define.
5390 2004-05-01 Jakub Jelinek <jakub@redhat.com>
5392 * Versions (libpthread): Remove __pthread_cleanup_upto@@GLIBC_PRIVATE.
5394 2004-04-20 Jakub Jelinek <jakub@redhat.com>
5396 * sem_unlink.c (sem_unlink): Change EPERM into EACCES.
5398 2004-04-19 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5400 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Add frame info.
5401 Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
5402 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Remove unneeded frame
5403 info. Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
5405 2004-04-19 Ulrich Drepper <drepper@redhat.com>
5407 * sysdeps/unix/sysv/linux/timer_routines.c: Make sure helper
5408 thread has all signals blocked.
5410 2004-04-18 Andreas Jaeger <aj@suse.de>
5412 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h
5413 (SEM_VALUE_MAX): Add missing brace.
5415 2004-04-17 Jakub Jelinek <jakub@redhat.com>
5417 * sysdeps/pthread/Makefile (tests): Add tst-mqueue8x
5419 (CFLAGS-tst-mqueue8x.c): Add -fexceptions.
5420 * sysdeps/pthread/tst-mqueue8x.c: New test.
5421 * tst-cancel4.c: Update comment about message queues.
5423 * sysdeps/pthread/timer_gettime.c (timer_gettime): For expired timer
5424 return it_value { 0, 0 }.
5425 * sysdeps/pthread/timer_create.c (timer_create): Handle SIGEV_NONE
5427 * sysdeps/pthread/timer_routines.c (thread_expire_timer): Remove
5428 assertion for SIGEV_NONE.
5429 (thread_attr_compare): Compare all attributes, not just a partial
5432 2004-04-17 Jakub Jelinek <jakub@redhat.com>
5434 * sysdeps/unix/sysv/linux/mq_notify.c: Include stdlib.h.
5436 2004-04-17 Ulrich Drepper <drepper@redhat.com>
5438 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h (SEM_VALUE_MAX):
5439 Just use a plain number.
5440 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
5441 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
5442 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
5443 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
5444 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
5445 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
5446 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
5448 2004-04-16 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5450 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Remove unneeded
5452 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
5454 2004-04-15 Jakub Jelinek <jakub@redhat.com>
5456 * sysdeps/unix/sysv/linux/timer_routines.c: Include errno.h.
5457 (timer_helper_thread): Use inline rt_sigtimedwait syscall instead
5458 of calling sigwaitinfo.
5460 2004-04-16 Ulrich Drepper <drepper@redhat.com>
5462 * allocatestack.c (allocate_stack): Set reported_guardsize
5464 * pthread_getattr_np.c (pthread_getattr_np): Use
5465 reported_guardsize instead of guardsize.
5466 * descr.h (struct pthread): Add reported_guardsize field.
5468 2004-04-13 Jakub Jelinek <jakub@redhat.com>
5470 * sysdeps/unix/sysv/linux/mq_notify.c: Shut up GCC warning.
5472 2004-04-12 Ulrich Drepper <drepper@redhat.com>
5474 * sysdeps/unix/sysv/linux/mq-notify.c: New file.
5476 2004-04-08 Jakub Jelinek <jakub@redhat.com>
5478 * sysdeps/unix/sysv/linux/bits/local_lim.h (MQ_PRIO_MAX): Define.
5479 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h (MQ_PRIO_MAX): Define.
5480 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h (MQ_PRIO_MAX): Define.
5481 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h (MQ_PRIO_MAX): Define.
5482 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
5484 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
5485 (_POSIX_MESSAGE_PASSING): Define.
5486 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h
5487 (_POSIX_MESSAGE_PASSING): Define.
5488 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h
5489 (_POSIX_MESSAGE_PASSING): Define.
5491 2004-04-04 Ulrich Drepper <drepper@redhat.com>
5493 * tst-context1.c (fct): Check whether correct stack is used.
5495 2004-04-03 Ulrich Drepper <drepper@redhat.com>
5497 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Never use
5498 matching constraints for asm mem parameters.
5500 * tst-clock2.c (tf): Don't define unless needed.
5502 2004-03-30 H.J. Lu <hongjiu.lu@intel.com>
5504 * Makefile (link-libc-static): Use $(static-gnulib) instead of
5507 2004-03-30 Ulrich Drepper <drepper@redhat.com>
5509 * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_deallocate_tsd.
5510 * init.c (pthread_functions): Add ptr__nptl_deallocate_tsd.
5511 * pthreadP.h: Declare __nptl_deallocate_tsd.
5512 * pthread_create.c (deallocate_tsd): Remove to __nptl_deallocate_tsd.
5515 * Makefile (tests): Add tst-tsd5.
5516 * tst-tsd5.c: New file.
5518 2004-03-29 Ulrich Drepper <drepper@redhat.com>
5520 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
5521 (__pthread_attr_setaffinity_old): Prepend GLIBC_ to version names
5522 is SHLIB_COMPAT check.
5523 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
5524 (__pthread_attr_getaffinity_old): Likewise.
5525 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
5526 (__pthread_getaffinity_old): Likewise.
5527 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
5528 (__pthread_setaffinity_old): Likewise.
5530 2004-03-26 Ulrich Drepper <drepper@redhat.com>
5532 * allocatestack.c (_make_stacks_executable): Call
5533 _dl_make_stack_executable first.
5535 2004-03-24 Roland McGrath <roland@redhat.com>
5537 * sysdeps/i386/pthread_spin_lock.c (pthread_spin_lock): Use "m"
5538 constraint instead of "0".
5540 2004-03-24 Ulrich Drepper <drepper@redhat.com>
5542 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
5543 (lll_mutex_cond_trylock): Define as wrapper around __lll_cond_trylock.
5545 * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Reorganize
5546 code to avoid warning.
5548 2004-03-24 Andreas Jaeger <aj@suse.de>
5550 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
5551 (__pthread_attr_setaffinity_old): Remove const.
5553 2004-03-23 Ulrich Drepper <drepper@redhat.com>
5555 * sysdeps/unix/sysv/linux/smp.h: New file.
5556 * sysdeps/unix/sysv/linux/sh/smp.h: New file.
5557 * init.c: Define __is_smp.
5558 (__pthread_initialize_minimal_internal): Call is_smp_system to
5559 initialize __is_smp.
5560 * pthreadP.h: Declare __is_smp.
5561 Define MAX_ADAPTIVE_COUNT is necessary.
5562 * pthread_mutex_init.c: Add comment regarding __spins field.
5563 * pthread_mutex_lock.c: Implement adaptive mutex type.
5564 * pthread_mutex_timedlock.c: Likewise.
5565 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
5566 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
5568 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
5569 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5570 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5571 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
5572 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5573 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5574 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5575 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define
5576 lll_mutex_cond_trylock.
5577 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5578 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
5579 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5580 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5581 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
5582 Define BUSY_WAIT_NOP.
5583 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5584 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5586 * tst-mutex5.c: Add support for testing adaptive mutexes.
5587 * tst-mutex7.c: Likewise.
5588 * tst-mutex5a.c: New file.
5589 * tst-mutex7a.c: New file.
5590 * Makefile (tests): Add tst-mutex5a and tst-mutex7a.
5592 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
5593 (__lll_mutex_timedlock_wait): Preserve r8 and r9 since the
5594 vgettimeofday call might destroy the content.
5596 * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use hint
5599 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
5600 No need to restrict type of ret. Make it int. Add comment.
5602 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
5603 Remove unnecessary setne instruction.
5605 2004-03-22 Jakub Jelinek <jakub@redhat.com>
5607 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
5608 (__pthread_getaffinity_new): Use INT_MAX instead of UINT_MAX.
5609 * pthread_getattr_np.c (pthread_getattr_np): Double size every cycle.
5610 If realloc fails, break out of the loop.
5612 2004-03-20 Andreas Jaeger <aj@suse.de>
5614 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
5615 (__pthread_setaffinity_old): Fix interface.
5616 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
5617 (__pthread_getaffinity_old): Likewise.
5619 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
5620 (__pthread_setaffinity_new): Remove duplicate declaration.
5622 2004-03-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5624 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Save
5625 the return value to a safe register.
5626 (CDISABLE): Set the function argument correctly.
5628 2004-03-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5630 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XCHG): Define.
5631 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
5632 Rewrite so that only one locked memory operation per round is needed.
5633 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
5634 (pthread_barrier_wait): After wakeup, release lock only when the
5635 last thread stopped using the barrier object.
5636 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
5637 (__pthread_cond_wait): Don't store mutex address if the current
5638 value is ~0l. Add correct cleanup support and unwind info.
5639 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
5640 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
5641 (__pthread_cond_broadcast): Don't use requeue for pshared condvars.
5642 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Update comment.
5643 * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
5644 Add correct cleanup support and unwind info.
5645 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
5646 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Add unwind
5647 information for syscall wrappers.
5649 2004-03-18 Ulrich Drepper <drepper@redhat.com>
5651 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
5652 cpusetsize field, remove next.
5653 * sysdeps/pthread/pthread.h (pthread_getaffinity_np): Add new second
5654 parameter for size of the CPU set.
5655 (pthread_setaffinity_np): Likewise.
5656 (pthread_attr_getaffinity_np): Likewise.
5657 (pthread_attr_setaffinity_np): Likewise.
5658 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: Implement
5659 interface change, keep compatibility code.
5660 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
5661 * sysdeps/unix/sysv/linux/pthread_getaffinity.c: Likewise.
5662 * sysdeps/unix/sysv/linux/pthread_setaffinity.c: Likewise.
5663 * pthreadP.h: Remove hidden_proto for pthread_getaffinity_np. Declare
5664 __pthread_getaffinity_np.
5665 * Versions: Add version for changed interfaces.
5666 * tst-attr3.c: Adjust test for interface change.
5667 * pthread_getattr_np.c: Query the kernel about the affinity mask with
5668 increasing buffer sizes.
5669 * pthread_attr_destroy.c: Remove unused list handling.
5670 * pthread_attr_init.c: Likewise.
5672 2004-03-17 Roland McGrath <roland@redhat.com>
5674 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Pass missing
5675 first argument to clock_getres so we ever enable kernel timers.
5677 2004-03-15 Ulrich Weigand <uweigand@de.ibm.com>
5679 * init.c (nptl_version): Add __attribute_used__ to nptl_version.
5681 2004-03-12 Richard Henderson <rth@redhat.com>
5683 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Propagate
5684 oldvalue from CENABLE to CDISABLE.
5686 2004-03-12 Ulrich Drepper <drepper@redhat.com>
5688 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define HOST_NAME_MAX.
5689 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
5690 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
5691 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
5693 2004-03-11 Richard Henderson <rth@redhat.com>
5695 * sysdeps/alpha/tcb-offsets.sym (PID_OFFSET): New.
5696 * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: Save/restore PID.
5697 * sysdeps/unix/sysv/linux/alpha/vfork.S: New file.
5699 2004-03-11 Jakub Jelinek <jakub@redhat.com>
5701 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Use jgnl
5702 instead of jnl instruction to jump to SYSCALL_ERROR_LABEL.
5703 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S (__vfork): Likewise.
5705 2004-03-11 Jakub Jelinek <jakub@redhat.com>
5707 * forward.c (__pthread_cond_broadcast_2_0,
5708 __pthread_cond_destroy_2_0, __pthread_cond_init_2_0,
5709 __pthread_cond_signal_2_0, __pthread_cond_wait_2_0,
5710 __pthread_cond_timedwait_2_0): Use return 0 as defaction instead of 0.
5712 2004-03-11 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5714 * sysdeps/sh/tcb-offsets.sym: Add PID.
5715 * sysdeps/unix/sysv/linux/sh/pt-vfork.S: Properly handle PID cache.
5716 * sysdeps/unix/sysv/linux/sh/vfork.S: New file.
5718 2004-03-10 Ulrich Drepper <drepper@redhat.com>
5720 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: No need to
5721 include <sysdep-cancel.h>, vfork is no cancellation point.
5722 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: Likewise.
5723 * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: Likewise.
5724 * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: Likewise.
5726 2004-03-10 Jakub Jelinek <jakub@redhat.com>
5728 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Add
5730 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
5731 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
5733 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S (__vfork):
5735 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
5736 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
5737 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Include tcb-offsets.h.
5738 * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Use DO_CALL instead
5739 of DO_CALL_VIA_BREAK. Work around a gas problem.
5741 * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: Remove.
5742 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: New file.
5743 * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: New file.
5744 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: New file.
5745 * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: New file.
5746 * sysdeps/powerpc/tcb-offsets.sym: Add PID.
5748 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S (__vfork): Don't use
5749 a local register for saving old PID. Negate PID in parent upon exit.
5751 * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: Include
5753 (__vfork): Negate PID if non-zero and set to INT_MIN if zero
5754 before syscall, set to the old value in the parent afterwards.
5755 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: New file.
5756 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: Include
5758 (__vfork): Negate PID if non-zero and set to INT_MIN if zero
5759 before syscall, set to the old value in the parent afterwards.
5760 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: New file.
5761 * sysdeps/s390/tcb-offsets.sym: Add PID.
5763 * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: Remove.
5764 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: New file.
5765 * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S: New file.
5766 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: New file.
5767 * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: New file.
5768 * sysdeps/sparc/tcb-offsets.sym: Add PID.
5770 2004-03-10 Andreas Schwab <schwab@suse.de>
5772 * sysdeps/ia64/tcb-offsets.sym: Add PID.
5773 * sysdeps/unix/sysv/linux/ia64/vfork.S: New file.
5774 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Properly handle PID cache.
5776 2004-03-09 Jakub Jelinek <jakub@redhat.com>
5778 * tst-cancel20.c (do_one_test): Clear in_sh_body first.
5779 * tst-cancel21.c (do_one_test): Likewise.
5780 Reported by Gordon Jin <gordon.jin@intel.com>.
5782 2004-02-09 Jakub Jelinek <jakub@redhat.com>
5784 * sysdeps/unix/sysv/linux/i386/vfork.S (SAVE_PID): Negate PID
5785 if non-zero and set to INT_MIN if zero.
5786 * sysdeps/unix/sysv/linux/x86_64/vfork.S (SAVE_PID): Likewise.
5787 * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Include tcb-offsets.h.
5788 (SAVE_PID, RESTORE_PID): Define.
5790 * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: Include tcb-offsets.h.
5791 Use relative path to avoid including NPTL i386/vfork.S.
5792 (SAVE_PID, RESTORE_PID): Define.
5793 * sysdeps/unix/sysv/linux/raise.c: Include limits.h.
5794 (raise): Handle THREAD_SELF->pid INT_MIN the same as 0.
5795 * Makefile (tests): Add tst-vfork1, tst-vfork2, tst-vfork1x and
5797 (tests-reverse): Add tst-vfork1x and tst-vfork2x.
5798 * tst-vfork1.c: New test.
5799 * tst-vfork2.c: New test.
5800 * tst-vfork1x.c: New test.
5801 * tst-vfork2x.c: New test.
5803 2004-03-08 Ulrich Drepper <drepper@redhat.com>
5805 * sysdeps/i386/tcb-offsets.sym: Add PID.
5806 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
5807 * sysdeps/unix/sysv/linux/i386/vfork.S: New file.
5808 * sysdeps/unix/sysv/linux/x86_64/vfork.S: New file.
5810 2004-03-08 Steven Munroe <sjmunroe@us.ibm.com>
5812 * sysdeps/unix/sysv/linux/powerpc/Versions: Remove leading tabs.
5814 2004-03-08 H.J. Lu <hongjiu.lu@intel.com>
5816 * sysdeps/s390/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
5819 2004-03-07 Ulrich Drepper <drepper@redhat.com>
5821 * sysdeps/ia64/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
5824 * tst-once4.c: Remove unnecessary macro definition.
5826 * tst-mutex7.c (do_test): Limit thread stack size.
5827 * tst-once2.c (do_test): Likewise.
5828 * tst-tls3.c (do_test): Likewise.
5829 * tst-tls1.c (do_test): Likewise.
5830 * tst-signal3.c (do_test): Likewise.
5831 * tst-kill6.c (do_test): Likewise.
5832 * tst-key4.c (do_test): Likewise.
5833 * tst-join4.c (do_test): Likewise.
5834 * tst-fork1.c (do_test): Likewise.
5835 * tst-context1.c (do_test): Likewise.
5836 * tst-cond2.c (do_test): Likewise.
5837 * tst-cond10.c (do_test): Likewise.
5838 * tst-clock2.c (do_test): Likewise.
5839 * tst-cancel10.c (do_test): Likewise.
5840 * tst-basic2.c (do_test): Likewise.
5841 * tst-barrier4.c (do_test): Likewise.
5843 2004-03-05 Ulrich Drepper <drepper@redhat.com>
5845 * sysdeps/i386/tls.h: Use GLRO instead of GL where appropriate.
5847 2004-03-01 Ulrich Drepper <drepper@redhat.com>
5849 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5850 (__pthread_cond_timedwait): Optimize wakeup test.
5851 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
5852 (__pthread_cond_wait): Likewise.
5853 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
5854 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
5857 2004-02-29 Ulrich Drepper <drepper@redhat.com>
5859 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
5860 (__lll_mutex_lock_wait): Optimize a bit more. Just one copy of
5861 the atomic instruction needed.
5862 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
5863 (__lll_mutex_lock_wait): Likewise.
5865 2004-02-28 Ulrich Drepper <drepper@redhat.com>
5867 * Makefile (tests): Add tst-cond14 and tst-cond15.
5868 * tst-cond14.c: New file.
5869 * tst-cond15.c: New file.
5871 2004-02-27 Ulrich Drepper <drepper@redhat.com>
5873 * sysdeps/pthread/createthread.c (create_thread): Remove use of
5874 CLONE_STOPPED. We cannot use SIGCONT which means CLONE_STOPPED
5875 needs to be implemented differently to be useful.
5877 2004-02-26 Ulrich Drepper <drepper@redhat.com>
5879 * pthread_attr_setschedparam.c: Don't test priority against limits
5880 here. Set ATTR_FLAG_SCHED_SET flag.
5881 * pthread_attr_setschedpolicy.c: Set ATTR_FLAG_POLICY_SET flag.
5882 * pthread_create.c (__pthread_create_2_1): Copy scheduling attributes
5883 from parent thread to child. If attribute is used and scheduling
5884 parameters are not inherited, copy parameters from attribute or
5885 compute them. Check priority value.
5886 * pthread_getschedparam.c: If the parameters aren't known yet get
5887 them from the kernel.
5888 * pthread_setschedparam.c: Set ATTR_FLAG_SCHED_SET and
5889 ATTR_FLAG_POLICY_SET flag for thread.
5890 * sysdeps/unix/sysv/linux/internaltypes.h: Define ATTR_FLAG_SCHED_SET
5891 and ATTR_FLAG_POLICY_SET.
5893 * sysdeps/pthread/createthread.c: Use tgkill if possible.
5895 * pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr): Don't
5896 fail if stack address hasn't been set. Just return 0.
5898 2004-02-25 Ulrich Drepper <drepper@redhat.com>
5900 * Makefile (tests-nolibpthread): Add tst-unload. Don't link with
5901 libpthread for the files in this list.
5902 (CFLAGS-tst-unload): Removed.
5903 * tst-unload.c (do_test): Don't use complete path for
5906 * Makefile: Define sonames for tst-tls5mod, tst-_res1mod1, and
5909 2004-02-22 Ulrich Drepper <drepper@redhat.com>
5911 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
5912 (__lll_mutex_lock_wait): Rewrite so that only one locked memory
5913 operation per round is needed.
5914 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
5915 (__lll_mutex_lock_wait): Likewise.
5917 2004-02-20 Ulrich Drepper <drepper@redhat.com>
5919 * tst-cancel9.c (cleanup): Don't print to stderr.
5921 2004-02-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5923 * sysdeps/sh/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Fix variable name.
5925 2004-02-20 Jakub Jelinek <jakub@redhat.com>
5927 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
5928 (__syscall_error_handler2): Call CDISABLE.
5929 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
5930 (__syscall_error_handler2): Call CDISABLE.
5932 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
5933 Release lock before the loop, don't reacquire it.
5935 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h (DL_ARGV_NOT_RELRO): Define.
5937 2004-02-19 Andreas Schwab <schwab@suse.de>
5939 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
5942 2004-02-18 Ulrich Drepper <drepper@redhat.com>
5944 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
5945 (pthread_barrier_wait): After wakeup, release lock only when the
5946 last thread stopped using the barrier object.
5947 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S
5948 (pthread_barrier_wait): Likewise.
5949 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
5951 * Makefile (tests): Add tst-barrier4.
5952 * tst-barrier4.c: New file.
5954 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5955 (__pthread_cond_timedwait): Perform timeout test while holding
5956 internal lock to prevent wakeup race.
5957 Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
5958 * sysdeps/pthread/pthread_cond_timedwait.c
5959 (__pthread_cond_timedwait): Likewise.
5960 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
5961 (__pthread_cond_timedwait): Likewise.
5963 2004-02-18 Jakub Jelinek <jakub@redhat.com>
5965 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S
5966 (__pthread_rwlock_unlock): Access WRITER as 32-bit value.
5967 * Makefile (tests): Add tst-rwlock13.
5968 * tst-rwlock13.c: New test.
5970 2004-02-16 Ulrich Drepper <drepper@redhat.com>
5972 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5973 (__condvar_tw_cleanup): Little optimization.
5974 Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
5976 2004-02-16 Steven Munroe <sjmunroe@us.ibm.com>
5978 * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: Replace libc with
5979 libpthread as "lib" parameter to SHLIB_COMPAT.
5980 (__novmx_siglongjmp): Fix typo in function name.
5981 (__novmx_longjmp): Fix typo in function name.
5983 2004-02-13 Ulrich Drepper <drepper@redhat.com>
5985 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Add a
5988 * sysdeps/generic/pt-longjmp.c: Moved to...
5989 * sysdeps/pthread/pt-longjmp.c: ...here. New file.
5991 2004-01-29 Steven Munroe <sjmunroe@us.ibm.com>
5993 * Makefile (libpthread-routines): Add pt-cleanup.
5994 * pt-longjmp.c: Removed.
5995 * pt-cleanup.c: Copied __pthread_cleanup_upto to here. New file.
5996 * sysdeps/generic/pt-longjmp.c: Copied longjmp to here. New file.
5997 * sysdeps/unix/sysv/linux/powerpc/Versions: New file.
5998 Version longjmp, siglongjmp for GLIBC_2.3.4.
5999 * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: New File.
6001 2004-02-13 Ulrich Drepper <drepper@redhat.com>
6003 * sysdeps/pthread/pthread_cond_timedwait.c
6004 (__pthread_cond_timedwait): Optimize. Drop internal lock earlier.
6005 Reuse code. Add __builtin_expects.
6007 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6008 (__pthread_cond_timedwait): Get internal lock in case timeout has
6009 passed before the futex syscall.
6010 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6012 2004-01-20 Ulrich Drepper <drepper@redhat.com>
6014 * allocatestack.c: Pretty printing.
6016 * sysdeps/pthread/createthread.c (create_thread): Don't add
6017 CLONE_DETACHED bit if it is not necessary.
6019 2004-01-16 Ulrich Drepper <drepper@redhat.com>
6021 * pthread_getattr_np.c: Include ldsodefs.h.
6023 2004-01-16 Richard Henderson <rth@redhat.com>
6025 * allocatestack.c: Don't declare __libc_stack_end.
6026 * init.c (__pthread_initialize_minimal_internal): Likewise.
6027 * pthread_getattr_np.c (pthread_getattr_np): Likewise.
6029 2004-01-15 Richard Henderson <rth@redhat.com>
6031 * sysdeps/alpha/tls.h (tcbhead_t): Add private.
6032 (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE,
6033 TLS_PRE_TCB_SIZE, TLS_TCB_ALIGN, INSTALL_DTV, INSTALL_NEW_DTV,
6034 GET_DTV, THREAD_DTV, THREAD_SELF, DB_THREAD_SELF): Match ia64.
6035 (TLS_TCB_OFFSET, THREAD_ID, NO_TLS_OFFSET): Remove.
6036 (THREAD_GETMEM, THREAD_GETMEM_NC): Simplify.
6037 (THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
6038 * sysdeps/unix/sysv/linux/alpha/createthread.c (TLS_VALUE): Match ia64.
6040 2004-01-14 Ulrich Drepper <drepper@redhat.com>
6042 * init.c (pthread_functions): Make array const.
6044 2004-01-13 Ulrich Drepper <drepper@redhat.com>
6046 * allocatestack.c (__make_stacks_executable): Change interface.
6047 Check parameters. Pass parameter on to libc counterpart.
6048 * pthreadP.h: Change declaration.
6050 2004-01-13 Richard Henderson <rth@redhat.com>
6052 * pthread_attr_setstack.c (__old_pthread_attr_setstack): Use
6054 * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize):
6057 * sysdeps/alpha/Makefile: New file.
6058 * sysdeps/alpha/tcb-offsets.sym: New file.
6059 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
6060 Use MULTIPLE_THREADS_OFFSET to implement !libpthread !libc version.
6062 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Rewrite based
6065 2004-01-08 Jakub Jelinek <jakub@redhat.com>
6067 * Makefile (tests): Add tst-backtrace1.
6068 * tst-backtrace1.c: New test.
6070 2003-12-11 Ulrich Weigand <uweigand@de.ibm.com>
6072 * sysdeps/alpha/tls.h (DB_THREAD_SELF): Pass bit size of thread
6073 register as second parameter to the REGISTER macro.
6074 * sysdeps/ia64/tls.h (DB_THREAD_SELF): Likewise.
6075 * sysdeps/powerpc/tls.h (DB_THREAD_SELF): Likewise.
6076 * sysdeps/sh/tls.h (DB_THREAD_SELF): Likewise.
6077 * sysdeps/sparc/tls.h (DB_THREAD_SELF): Likewise.
6078 * sysdeps/s390/tls.h (DB_THREAD_SELF): Pass __WORDSIZE as bit size
6079 of thread register as second parameter to REGISTER macro in 64 case.
6081 2004-01-03 Ulrich Drepper <drepper@redhat.com>
6083 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Removed.
6084 (CFLAGS-getpid.o): Defined.
6085 (CFLAGS-getpid.os): Defined.
6087 2003-12-31 Ulrich Drepper <drepper@redhat.com>
6089 * pthread_getattr_np.c (pthread_getattr_np): Make sure stack info
6090 returned for main thread does not overlap with any other VMA.
6091 Patch by Jakub Jelinek.
6093 2003-12-29 Jakub Jelinek <jakub@redhat.com>
6095 * tst-raise1.c: Include stdio.h.
6097 2003-12-23 Jakub Jelinek <jakub@redhat.com>
6099 * sysdeps/unix/sysv/linux/raise.c (raise): Protect pid = selftid
6100 setting with __ASSUME_TGKILL || defined __NR_tgkill.
6101 If pid is 0, set it to selftid.
6102 * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Make inline.
6103 Don't set self->pid but self->tid. If self->pid == 0 and self->tid
6104 != 0, return self->tid without doing a syscall.
6105 * descr.h (struct pthread): Move pid field after tid.
6107 * Makefile (tests): Add tst-raise1.
6108 * tst-raise1.c: New file.
6110 2003-12-23 Roland McGrath <roland@redhat.com>
6112 * tst-oddstacklimit.c: New file.
6113 * Makefile (tests): Add it.
6114 (tst-oddstacklimit-ENV): New variable.
6116 * init.c (__pthread_initialize_minimal_internal): Round stack rlimit
6117 value up to page size for __default_stacksize.
6119 2003-12-21 Ulrich Drepper <drepper@redhat.com>
6121 * Makefile (tests): Add tst-eintr5.
6122 * tst-eintr5.c: New file.
6124 * eintr.c (eintr_source): Prevent sending signal to self.
6126 * tst-eintr2.c (tf1): Improve error message.
6128 2003-12-20 Ulrich Drepper <drepper@redhat.com>
6130 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Define.
6131 * sysdeps/unix/sysv/linux/getpid.c: New file.
6132 * pthread_cancel.c: Add comment explaining use of PID field.
6133 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
6134 * pthread_getattr_np.c: Use abs() when comparing PID and TID fields.
6135 * sysdeps/unix/sysv/linux/fork.c: Negate PID field of parent
6136 temporarily to signal the field must not be relied on and updated
6138 * sysdeps/unix/sysv/linux/pt-raise.c: Handle case where PID is
6139 temporarily negative.
6140 * sysdeps/unix/sysv/linux/raise.c: Likewise.
6142 2003-12-19 Ulrich Drepper <drepper@redhat.com>
6144 * eintr.c (setup_eintr): Add new parameter. Pass to thread function.
6145 (eintr_source): If ARG != NULL, use pthread_kill.
6146 * tst-eintr1.c: Adjust for this change.
6147 * tst-eintr2.c: Likewise.
6148 * Makefile (tests): Add tst-eintr3 and tst-eintr4.
6149 * tst-eintr3.c: New file.
6150 * tst-eintr4.c: New file.
6152 2003-12-19 Jakub Jelinek <jakub@redhat.com>
6154 * libc-cancellation.c (__libc_enable_asynccancel): Don't cancel
6155 if CANCELSTATE_BITMASK is set.
6156 * sysdeps/pthread/librt-cancellation.c (__librt_enable_asynccancel):
6159 * Makefile (tests): Add tst-cancel22 and tst-cancel23.
6160 (tests-reverse): Add tst-cancel23.
6161 * tst-cancel22.c: New test.
6162 * tst-cancel23.c: New test.
6164 2003-12-18 Ulrich Drepper <drepper@redhat.com>
6166 * tst-eintr1.c: Better error messages.
6168 * Makefile (tests): Add tst-eintr2.
6169 * tst-eintr2.c: New file.
6171 2003-12-18 Jakub Jelinek <jakub@redhat.com>
6173 * Makefile (tests): Add tst-cancel21 and tst-cancelx21.
6174 (CFLAGS-tst-cancelx21.c): Set.
6175 * tst-cancel21.c: New test.
6176 * tst-cancelx21.c: New test.
6178 * unwind.c (FRAME_LEFT): Add adj argument. Subtract it from each
6180 (unwind_stop): Use _JMPBUF_CFA_UNWINDS_ADJ macro instead of
6181 _JMPBUF_CFA_UNWINDS. Adjust FRAME_LEFT invocations.
6182 * pt-longjmp.c: Include jmpbuf-unwind.h.
6183 (__pthread_cleanup_upto): Use _JMPBUF_UNWINDS_ADJ macro instead of
6184 _JMPBUF_UNWINDS. Adjust compared pointers.
6185 * init.c (__pthread_initialize_minimal_internal): Initialize
6186 pd->stackblock_size.
6187 * sysdeps/pthread/jmpbuf-unwind.h: Removed.
6188 * sysdeps/alpha/jmpbuf-unwind.h: New file.
6189 * sysdeps/i386/jmpbuf-unwind.h: New file.
6190 * sysdeps/powerpc/jmpbuf-unwind.h: New file.
6191 * sysdeps/s390/jmpbuf-unwind.h: New file.
6192 * sysdeps/sh/jmpbuf-unwind.h: New file.
6193 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: New file.
6194 * sysdeps/x86_64/jmpbuf-unwind.h: New file.
6195 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Include stdint.h.
6196 (_JMPBUF_CFA_UNWINDS): Remove.
6197 (_JMPBUF_CFA_UNWINDS_ADJ, _JMPBUF_UNWINDS_ADJ): Define.
6199 2003-12-12 Jakub Jelinek <jakub@redhat.com>
6201 * Makefile (tests): Add tst-cancel20 and tst-cancelx20.
6202 (CFLAGS-tst-cancelx20.c): Set.
6203 * tst-cancel20.c: New test.
6204 * tst-cancelx20.c: New test.
6206 2003-12-17 Ulrich Drepper <drepper@redhat.com>
6208 * init.c (__pthread_initialize_minimal_internal): Don't treat
6209 architectures with separate register stack special here when
6210 computing default stack size.
6212 2003-12-17 Roland McGrath <roland@redhat.com>
6214 * Makefile (tst-cancelx7-ARGS): New variable.
6215 Reportd by Greg Schafer <gschafer@zip.com.au>.
6217 2003-12-17 Jakub Jelinek <jakub@redhat.com>
6219 * Makefile (tests): Add tst-stack3. Depend on $(objpfx)tst-stack3-mem.
6220 (generated): Add tst-stack3.mtrace and tst-stack3-mem.
6221 (tst-stack3-ENV): Set.
6222 ($(objpfx)tst-stack3-mem): New.
6223 * tst-stack3.c: New test.
6225 2003-12-10 David Mosberger <davidm@hpl.hp.com>
6227 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init_EPILOG_BEGINS):
6228 Add unwind directives. Drop unused .regstk directive.
6229 (_fini_EPILOG_BEGINS): Add unwind directives.
6231 2003-12-11 Ulrich Drepper <drepper@redhat.com>
6233 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
6234 Assume parameter is a pointer.
6235 (lll_futex_wake): Likewise.
6236 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_wait):
6238 (lll_futex_wake): Likewise.
6239 Reported by Boris Hu.
6240 * sysdeps/unix/sysv/linux/unregister-atfork.c
6241 (__unregister_atfork): Pass pointer to refcntr to lll_futex_wait.
6243 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Simplify a bit.
6245 2003-12-10 Ulrich Drepper <drepper@redhat.com>
6247 * sysdeps/pthread/bits/libc-lock.h (__rtld_lock_initialize): Define.
6248 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Call
6249 __rtld_lock_initialize for ld.so lock.
6250 Patch in part by Adam Li <adam.li@intel.com>.
6252 2003-12-02 David Mosberger <davidm@hpl.hp.com>
6254 * Makefile (link-libc-static): Remove -lgcc_eh---it's already mentioned
6255 in $(gnulib). Also, remove stale comment.
6257 2003-11-12 David Mosberger <davidm@hpl.hp.com>
6259 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Take
6260 advantage of new syscall stub and optimize accordingly.
6262 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__NR_futex): Rename
6263 from SYS_futex, to match expectations of
6264 sysdep.h:DO_INLINE_SYSCALL.
6265 (lll_futex_clobbers): Remove.
6266 (lll_futex_timed_wait): Rewrite in terms of DO_INLINE_SYSCALL.
6267 (lll_futex_wake): Likewise.
6268 (lll_futex_requeue): Likewise.
6269 (__lll_mutex_trylock): Rewrite to a macro, so we can include this
6270 file before DO_INLINE_SYSCALL is defined (proposed by Jakub
6272 (__lll_mutex_lock): Likewise.
6273 (__lll_mutex_cond_lock): Likewise.
6274 (__lll_mutex_timed_lock): Likewise.
6275 (__lll_mutex_unlock): Likewise.
6276 (__lll_mutex_unlock_force): Likewise.
6278 * sysdeps/ia64/tls.h: Move declaration of __thread_self up so it
6279 comes before the include of <sysdep.h>.
6280 (THREAD_SELF_SYSINFO): New macro.
6281 (THREAD_SYSINFO): Likewise.
6282 (INIT_SYSINFO): New macro.
6283 (TLS_INIT_TP): Call INIT_SYSINFO.
6285 * sysdeps/ia64/tcb-offsets.sym: Add SYSINFO_OFFSET.
6287 * sysdeps/pthread/createthread.c (create_thread): Use
6288 THREAD_SELF_SYSINFO and THREAD_SYSINFO instead of open code.
6289 * allocatestack.c (allocate_stack): Use THREAD_SYSINFO and
6290 THREAD_SELF_SYSINFO instead of open code.
6291 * sysdeps/i386/tls.h (THREAD_SELF_SYSINFO): New macro.
6292 (THREAD_SYSINFO): Likewise.
6294 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: New file.
6296 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Work around gas problem.
6298 2003-12-06 Ulrich Drepper <drepper@redhat.com>
6300 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Use .init_array
6301 instead of .init. Patch by David Mosberger.
6303 2003-11-30 Thorsten Kukuk <kukuk@suse.de>
6305 * sysdeps/pthread/configure.in: Remove broken declaration in C
6306 cleanup handling check.
6308 2003-11-30 Andreas Jaeger <aj@suse.de>
6310 * Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time).
6311 * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
6314 2003-11-27 Jakub Jelinek <jakub@redhat.com>
6316 * sysdeps/unix/sysv/linux/internaltypes.h (ATTR_FLAG_OLDATTR): Define.
6317 * pthread_attr_destroy.c: Include shlib-compat.h.
6318 (__pthread_attr_destroy): Return immediately if ATTR_FLAG_OLDATTR
6319 is set in iattr->flags.
6320 * pthread_attr_init.c (__pthread_attr_init_2_0): Set ATTR_FLAG_OLDATTR.
6322 2003-11-21 Jakub Jelinek <jakub@redhat.com>
6324 * Makefile (distribute): Add tst-cleanup4aux.c.
6326 * tst-cond12.c (prepare): Add prototype. Move after test-skeleton.c
6329 2003-11-21 Ulrich Drepper <drepper@redhat.com>
6331 * tst-cond12.c (do_test): If USE_COND_SIGNAL is defined, use
6332 pthread_cond_signal.
6334 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Don't
6335 store mutex address if the current value is ~0l.
6336 * sysdeps/pthread/pthread_cond_timedwait.c
6337 (__pthread_cond_timedwait): Likewise.
6338 * sysdeps/pthread/pthread_cond_broadcast.c
6339 (__pthread_cond_broadcast): Don't use requeue for pshared
6342 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
6343 (__pthread_cond_wait): Don't store mutex address if the current
6345 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
6346 (__pthread_cond_timedwait): Likewise.
6347 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
6348 (__pthread_cond_broadcast): Don't use requeue for pshared
6351 * pthread_cond_init.c (__pthread_cond_init): Initialize __mutex
6352 element with ~0l for pshared condvars, with NULL otherwise.
6354 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
6355 (__pthread_cond_wait): Don't store mutex address if the current
6357 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6358 (__pthread_cond_timedwait): Likewise.
6359 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
6360 (__pthread_cond_broadcast): Don't use requeue for pshared
6363 * Makefile: Add rules to build and run tst-cond12 and tst-cond13.
6364 * tst-cond12.c: New file.
6365 * tst-cond13.c: New file.
6367 2003-11-17 Ulrich Drepper <drepper@redhat.com>
6369 * sysdeps/pthread/configure.in: Make missing forced unwind support
6372 2003-11-11 Ulrich Drepper <drepper@redhat.com>
6374 * pthreadP.h: Don't declare __pthread_unwind as weak inside libpthread.
6376 2003-11-06 Ulrich Drepper <drepper@redhat.com>
6378 * Makefile: Add magic to clean up correctly.
6380 2003-11-05 Jakub Jelinek <jakub@redhat.com>
6382 * unwind.c (FRAME_LEFT): Define.
6383 (unwind_stop): Handle old style cleanups here.
6384 (__pthread_unwind): Handle old style cleanups only if
6385 !HAVE_FORCED_UNWIND.
6386 * Makefile (tests): Add tst-cleanup4 and tst-cleanupx4.
6387 (CFLAGS-tst-cleanupx4.c): Add -fexceptions.
6388 ($(objpfx)tst-cleanup4): Depend on $(objpfx)tst-cleanup4aux.o.
6389 ($(objpfx)tst-cleanupx4): Likewise.
6390 * tst-cleanup4.c: New test.
6391 * tst-cleanup4aux.c: New.
6392 * tst-cleanupx4.c: New test.
6394 2003-11-04 Ulrich Drepper <drepper@redhat.com>
6396 * sysdeps/pthread/bits/stdio-lock.h: Use lll_*lock instead of
6397 lll_mutex_*lock macros to skip atomic operations on some archs.
6399 2003-11-03 Ulrich Drepper <drepper@redhat.com>
6401 * sysdeps/pthread/tst-timer.c (main): Initialize
6402 sigev2.sigev_value as well.
6404 2003-10-15 Roland McGrath <roland@redhat.com>
6406 * sysdeps/pthread/configure.in: Barf if visibility attribute support
6408 * sysdeps/pthread/configure: Regenerated.
6410 2003-10-09 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6412 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Completely revamp the
6413 locking macros. No distinction between normal and mutex locking
6415 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Rewrite mutex locking.
6416 Merge bits from lowlevelmutex.S we still need.
6417 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Remove.
6418 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
6419 * sysdeps/unix/sysv/linux/sh/not-cancel.h: New file.
6420 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Adjust for
6421 new mutex implementation.
6422 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Likewise.
6423 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
6424 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
6425 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
6426 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
6427 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
6428 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
6429 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
6430 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
6431 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO): Also defined
6432 symbol for entry point to avoid cancellation.
6434 2003-10-07 Jakub Jelinek <jakub@redhat.com>
6436 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Backout 2003-10-02
6438 (SAVE_OLDTYPE_0): Fix a typo.
6440 2003-10-03 Ulrich Drepper <drepper@redhat.com>
6442 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
6443 Check __sigsetjmp return value. Reported by Daniel Jacobowitz.
6445 2003-10-02 Ulrich Drepper <drepper@redhat.com>
6447 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (DOCARGS_1): Use
6450 2003-10-02 Jakub Jelinek <jakub@redhat.com>
6452 * Makefile (tests): Add tst-cancel19.
6453 * tst-cancel19.c: New test.
6455 2003-10-02 Ulrich Drepper <drepper@redhat.com>
6457 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix saving and
6458 restoring of the old cancellation type.
6460 2003-09-30 Jakub Jelinek <jakub@redhat.com>
6462 * sysdeps/pthread/malloc-machine.h: Remove misleading comment.
6464 2003-09-27 Wolfram Gloger <wg@malloc.de>
6466 * sysdeps/pthread/malloc-machine.h: New file
6468 2003-09-24 Roland McGrath <roland@redhat.com>
6470 * allocatestack.c (__make_stacks_executable): Don't ignore return
6471 value from _dl_make_stack_executable.
6473 2003-09-24 Ulrich Drepper <drepper@redhat.com>
6475 * allocatestack.c (__make_stacks_executable): Also change
6476 permission of the currently unused stacks.
6478 * allocatestack.c (change_stack_perm): Split out from
6479 __make_stacks_executable.
6480 (allocate_stack): If the required permission changed between the time
6481 we started preparing the stack and queueing it, change the permission.
6482 (__make_stacks_executable): Call change_stack_perm.
6484 * Makefile: Build tst-execstack-mod locally.
6485 * tst-execstack-mod.c: New file.
6487 2003-09-23 Jakub Jelinek <jakub@redhat.com>
6489 * Makefile (tests): Only add tst-execstack if have-z-execstack is yes.
6491 2003-09-23 Roland McGrath <roland@redhat.com>
6493 * tst-execstack.c: New file.
6494 * Makefile (tests): Add it.
6495 ($(objpfx)tst-execstack, $(objpfx)tst-execstack.out): New targets.
6496 (LDFLAGS-tst-execstack): New variable.
6498 * allocatestack.c (allocate_stack): Use GL(dl_stack_flags) to decide
6499 whether to use PROT_EXEC for stack mmap.
6500 (__make_stacks_executable): New function.
6501 * pthreadP.h: Declare it.
6502 * init.c (__pthread_initialize_minimal_internal): Set
6503 GL(dl_make_stack_executable_hook) to that.
6505 2003-09-22 Ulrich Drepper <drepper@redhat.com>
6507 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Adjust for latest
6508 recommendation from AMD re avoidance of lock prefix.
6510 2003-09-22 Jakub Jelinek <jakub@redhat.com>
6512 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait): Use
6513 lll_futex_timed_wait instead of lll_futex_wait.
6514 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Removed.
6515 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Removed.
6516 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: Removed.
6517 * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: Removed.
6518 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Removed.
6519 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Removed.
6520 * sysdeps/unix/sysv/linux/s390/sem_post.c: Removed.
6521 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Removed.
6522 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Include atomic.h.
6523 Completely revamp the locking macros. No distinction between
6524 normal and mutex locking anymore.
6525 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
6526 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock_wait,
6527 __lll_lock_timedwait): Fix prototypes.
6528 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_lock_wait,
6529 __lll_lock_timedwait): Likewise.
6530 (lll_mutex_lock, lll_mutex_cond_lock): Use _val instead of _bool
6531 macros, add __builtin_expect.
6532 (lll_mutex_timedlock): Likewise. Fix return value.
6533 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Removed.
6534 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: Removed.
6535 * sysdeps/unix/sysv/linux/i386/i586/lowlevelmutex.S: Removed.
6536 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: Removed.
6537 * sysdeps/unix/sysv/linux/i386/i686/lowlevelmutex.S: Removed.
6538 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: Removed.
6539 * sysdeps/unix/sysv/linux/lowlevelmutex.c: Removed.
6540 * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: Removed.
6542 2003-09-22 Ulrich Drepper <drepper@redhat.com>
6544 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
6545 (__lll_mutex_lock_wait): Minor optimization to avoid one atomic
6546 operation if possible.
6548 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Don't play tricks
6549 like jumping over the lock prefix.
6551 2003-09-21 Ulrich Drepper <drepper@redhat.com>
6553 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Completely revamp the
6554 locking macros. No distinction between normal and mutex locking
6556 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
6557 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
6558 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
6559 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Rewrite mutex
6560 locking. Merge bits from lowlevelmutex.S we still need.
6561 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
6562 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
6563 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Removed.
6564 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Removed.
6565 * Makefile (routines): Remove libc-lowlevelmutex.
6566 (libpthread-rountines): Remove lowlevelmutex.
6567 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Adjust
6568 for new mutex implementation.
6569 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
6570 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6571 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6572 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
6573 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
6575 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
6577 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
6578 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
6579 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise
6580 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
6581 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6582 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6583 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
6584 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
6586 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
6588 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
6589 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
6590 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
6592 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
6593 * sysdeps/pthread/pthread_cond_signal.c: Don't use requeue.
6595 2003-09-20 Ulrich Drepper <drepper@redhat.com>
6597 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't match memory
6598 in parameters of asm with output parameters.
6600 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Change
6601 type of DECR parameter to int.
6602 * pthreadP.h: Adjust prototype of __pthread_mutex_unlock_usercnt.
6604 2003-09-18 Jakub Jelinek <jakub@redhat.com>
6606 * tst-attr3.c (tf, do_test): Print stack start/end/size and
6607 guardsize for each thread.
6609 2003-09-17 Jakub Jelinek <jakub@redhat.com>
6611 * sysdeps/pthread/pthread.h (pthread_getattr_np): Clarify usage.
6612 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
6613 (pthread_attr_setaffinity_np): Handle cpuset == NULL.
6615 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
6616 (pthread_attr_getaffinity_np): Don't segfault if iattr->cpuset is
6618 * pthread_getattr_np.c: Set cpuset using pthread_getaffinity_np.
6619 * pthreadP.h (pthread_getaffinity_np): Add hidden_proto.
6620 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
6621 (pthread_getaffinity_np): Add hidden_def.
6623 * Makefile (tests): Add tst-attr3.
6624 * tst-attr3.c: New test.
6626 * sysdeps/i386/Makefile (CFLAGS-tst-align.c): Remove.
6628 2003-09-15 Jakub Jelinek <jakub@redhat.com>
6630 * sysdeps/i386/Makefile (CFLAGS-pthread_create.c,
6631 CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
6633 2003-09-17 Jakub Jelinek <jakub@redhat.com>
6635 * Makefile (CFLAGS-tst-align.c): Add $(stack-align-test-flags).
6636 * tst-align.c: Include tst-stack-align.h.
6637 (tf, do_test): Use TEST_STACK_ALIGN macro.
6639 2003-09-17 Ulrich Drepper <drepper@redhat.com>
6641 * pthread_attr_init.c (__pthread_attr_init_2_0): Remove unused
6644 2003-09-16 Ulrich Drepper <drepper@redhat.com>
6646 * pthread_getattr_np.c (pthread_getattr_np): Correctly fill in the
6647 stack-related values for the initial thread.
6649 2003-09-15 Jakub Jelinek <jakub@redhat.com>
6651 * Makefile (CFLAGS-pthread_once.c): Add $(uses-callbacks).
6653 2003-09-11 Ulrich Drepper <drepper@redhat.com>
6655 * pthread_mutex_lock.c: Minor code rearrangements.
6657 2003-09-05 Roland McGrath <roland@redhat.com>
6659 * pthread_create.c (__pthread_pthread_sizeof_descr): Removed.
6660 Instead, include ../nptl_db/db_info.c to do its magic.
6661 * pthread_key_create.c (__pthread_pthread_keys_max): Removed.
6662 (__pthread_pthread_key_2ndlevel_size): Likewise.
6663 * sysdeps/alpha/tls.h (DB_THREAD_SELF): New macro.
6664 * sysdeps/i386/tls.h (DB_THREAD_SELF): New macro.
6665 * sysdeps/ia64/tls.h (DB_THREAD_SELF): New macro.
6666 * sysdeps/powerpc/tls.h (DB_THREAD_SELF): New macro.
6667 * sysdeps/s390/tls.h (DB_THREAD_SELF): New macro.
6668 * sysdeps/sh/tls.h (DB_THREAD_SELF): New macro.
6669 * sysdeps/sparc/tls.h (DB_THREAD_SELF): New macro.
6670 * sysdeps/x86_64/tls.h (DB_THREAD_SELF): New macro.
6671 * sysdeps/alpha/td_ta_map_lwp2thr.c: File removed.
6672 * sysdeps/generic/td_ta_map_lwp2thr.c: File removed.
6673 * sysdeps/i386/td_ta_map_lwp2thr.c: File removed.
6674 * sysdeps/ia64/td_ta_map_lwp2thr.c: File removed.
6675 * sysdeps/powerpc/td_ta_map_lwp2thr.c: File removed.
6676 * sysdeps/s390/td_ta_map_lwp2thr.c: File removed.
6677 * sysdeps/sh/td_ta_map_lwp2thr.c: File removed.
6678 * sysdeps/sparc/td_ta_map_lwp2thr.c: File removed.
6679 * sysdeps/x86_64/td_ta_map_lwp2thr.c: File removed.
6681 2003-09-08 Ulrich Drepper <drepper@redhat.com>
6683 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Change type
6684 of pthread_t to be compatible with LT.
6685 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
6686 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6687 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6688 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6689 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
6690 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6691 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
6693 2003-09-04 Ulrich Drepper <drepper@redhat.com>
6695 * sysdeps/unix/sysv/linux/i386/not-cancel.h (fcntl_not_cancel): Define.
6697 2003-09-04 Jakub Jelinek <jakub@redhat.com>
6699 * unwind-forcedunwind.c: Move to...
6700 * sysdeps/pthread/unwind-forcedunwind.c: ...here.
6701 (pthread_cancel_init): Use ARCH_CANCEL_INIT if defined.
6702 * sysdeps/pthread/jmpbuf-unwind.h: New file.
6703 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: New file.
6704 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: New file.
6705 * unwind.c: Include jmpbuf-unwind.h.
6706 (unwind_stop): Use _JMPBUF_CFA_UNWINDS macro.
6708 2003-09-02 Jakub Jelinek <jakub@redhat.com>
6710 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: New file.
6711 * sysdeps/unix/sysv/linux/ia64/Versions (libpthread): Export
6712 pthread_attr_setstack and pthread_attr_setstacksize @@GLIBC_2.3.3.
6713 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: New file.
6714 * sysdeps/unix/sysv/linux/alpha/Versions: New file.
6715 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: New file.
6716 * sysdeps/unix/sysv/linux/sparc/Versions: New file.
6717 * pthread_attr_setstack.c (__old_pthread_attr_setstack): New function.
6718 (pthread_attr_setstack): If PTHREAD_STACK_MIN != 16384, export
6719 as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.2.
6720 * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize): New
6722 (pthread_attr_setstacksize): If PTHREAD_STACK_MIN != 16384, export
6723 as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.1.
6724 * Makefile (tests): Add tst-stack2.
6725 * tst-stack2.c: New test.
6726 * tst-stack1.c: Include limits.h and sys/param.h.
6727 (do_test): Set size to MAX (4 * getpagesize (), PTHREAD_STACK_MIN).
6729 * pthread_condattr_setpshared.c: Include errno.h.
6730 (pthread_condattr_setpshared): Return EINVAL if pshared
6731 is neither PTHREAD_PROCESS_PRIVATE nor PTHREAD_PROCESS_SHARED.
6733 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Also
6734 defined symbol for entry point to avoid cancellation.
6735 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
6737 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
6739 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
6741 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h (PSEUDO):
6743 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
6745 * sysdeps/unix/sysv/linux/i386/not-cancel.h (__open_nocancel,
6746 __close_nocancel, __read_nocancel, __write_nocancel,
6747 __waitpid_nocancel): Add attribute_hidden. If not in libc.so,
6748 libpthread.so or librt.so, define to corresponding function
6749 without _nocancel suffix.
6750 * sysdeps/unix/sysv/linux/s390/not-cancel.h: New file.
6751 * sysdeps/unix/sysv/linux/powerpc/not-cancel.h: New file.
6752 * sysdeps/unix/sysv/linux/sparc/not-cancel.h: New file.
6754 * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: Fix a typo.
6756 2003-09-02 Ulrich Drepper <drepper@redhat.com>
6758 * sysdeps/unix/sysv/linux/i386/not-cancel.h: New file.
6759 * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: New file.
6761 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Make sure the code
6762 in subsections has a symbol associated with it.
6764 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Also
6765 defined symbol for entry point to avoid cancellation.
6766 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Likewise.
6768 2003-09-01 Jakub Jelinek <jakub@redhat.com>
6770 * Makefile (tests): Add tst-tls5.
6771 (module-names): Add tst-tls5mod{,a,b,c,d,e,f}.
6772 ($(objpfx)tst-tls5mod{,a,b,c,d,e,f}.so-no-z-defs): Set to yes.
6773 ($(objpfx)tst-tls5): New.
6774 ($(objpfx)tst-tls6.out): Likewise.
6775 (tests): Depend on $(objpfx)tst-tls6.out.
6776 * tst-tls3.c: Include stdint.h and pthreaddef.h.
6777 (do_test): Check pthread_self () return value alignment.
6778 * tst-tls3mod.c: Include stdint.h and pthreaddef.h.
6779 (tf): Check pthread_self () return value alignment.
6780 * tst-tls5.c: New test.
6782 * tst-tls5mod.c: New.
6783 * tst-tls5moda.c: New.
6784 * tst-tls5modb.c: New.
6785 * tst-tls5modc.c: New.
6786 * tst-tls5modd.c: New.
6787 * tst-tls5mode.c: New.
6788 * tst-tls5modf.c: New.
6789 * tst-tls6.sh: New test.
6791 * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Add
6792 ptr___pthread_cond_timedwait and ptr___pthread_cond_timedwait_2_0.
6793 * init.c (pthread_functions): Initialize them.
6794 * forward.c (pthread_cond_timedwait@GLIBC_2.0,
6795 pthread_cond_timedwait@@GLIBC_2.3.2): New forwards.
6796 * Versions (libc): Export pthread_cond_timedwait@GLIBC_2.0,
6797 pthread_cond_timedwait@@GLIBC_2.3.2.
6799 2003-09-01 Jakub Jelinek <jakub@redhat.com>
6801 * sysdeps/unix/sysv/linux/alpha/timer_create.c: New file.
6802 * sysdeps/unix/sysv/linux/alpha/timer_delete.c: New file.
6803 * sysdeps/unix/sysv/linux/alpha/timer_getoverr.c: New file.
6804 * sysdeps/unix/sysv/linux/alpha/timer_gettime.c: New file.
6805 * sysdeps/unix/sysv/linux/alpha/timer_settime.c: New file.
6806 * sysdeps/unix/sysv/linux/alpha/Versions: New file.
6808 * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
6810 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Define
6811 _POSIX_THREAD_PRIORITY_SCHEDULING.
6812 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
6814 2003-08-31 Ulrich Drepper <drepper@redhat.com>
6816 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock): Avoid
6817 nested function, use static inline function from libio.h.
6818 Code by Richard Henderson.
6820 * sysdeps/pthread/bits/libc-lock.h: Mark pthread_setcancelstate as
6823 2003-08-30 Jakub Jelinek <jakub@redhat.com>
6825 * sysdeps/unix/sysv/linux/sparc/sparc64/Versions: New file.
6826 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_create.c: New file.
6827 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_delete.c: New file.
6828 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_getoverr.c: New file.
6829 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_gettime.c: New file.
6830 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_settime.c: New file.
6831 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
6832 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
6833 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: New file.
6834 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: New file.
6835 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: New file.
6836 * sysdeps/unix/sysv/linux/sparc/pthread_once.c: New file.
6837 * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: New file.
6838 * sysdeps/unix/sysv/linux/sparc/fork.c: New file.
6839 * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
6840 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: New file.
6841 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: New file.
6842 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: New file.
6843 * sysdeps/sparc/sparc32/pthread_spin_lock.c: New file.
6844 * sysdeps/sparc/sparc32/pthread_spin_trylock.c: New file.
6845 * sysdeps/sparc/sparc32/pthreaddef.h: New file.
6846 * sysdeps/sparc/sparc64/pthread_spin_lock.c: New file.
6847 * sysdeps/sparc/sparc64/pthread_spin_trylock.c: New file.
6848 * sysdeps/sparc/sparc64/pthread_spin_unlock.c: New file.
6849 * sysdeps/sparc/sparc64/pthreaddef.h: New file.
6850 * sysdeps/sparc/tls.h: New file.
6851 * sysdeps/sparc/tcb-offsets.sym: New file.
6852 * sysdeps/sparc/Makefile: New file.
6853 * sysdeps/sparc/td_ta_map_lwp2thr.c: New file.
6854 * init.c [__sparc__] (__NR_set_tid_address): Define.
6856 2003-08-29 Jakub Jelinek <jakub@redhat.com>
6858 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock,
6859 _IO_release_lock): Define.
6861 2003-08-29 Jakub Jelinek <jakuB@redhat.com>
6863 * tst-cancel4.c (tf_sigwait, tf_sigwaitinfo, tf_sigtimedwait): Add
6864 sigemptyset before sigaddset. Reported by jreiser@BitWagon.com.
6866 2003-08-27 Ulrich Drepper <drepper@redhat.com>
6868 * sysdeps/pthread/pthread.h (pthread_exit): Remove __THROW.
6869 (__pthread_cleanup_class): Add missing return types of member
6872 2003-08-26 Steven Munroe <sjmunroe@us.ibm.com>
6874 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
6875 (lll_mutex_unlock_force): Add memory barrier between store and futex
6878 2003-08-25 Ulrich Drepper <drepper@redhat.com>
6880 * tst-cancel4.c (do_test): Also unlink tempfname and remove
6881 tempmsg in first loop.
6883 2003-08-18 Ulrich Drepper <drepper@redhat.com>
6885 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
6886 _POSIX_THREAD_PRIORITY_SCHEDULING.
6887 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
6889 2003-08-07 Jakub Jelinek <jakub@redhat.com>
6891 * sysdeps/pthread/bits/libc-lock.h [_LIBC && SHARED]
6892 (__rtld_lock_default_lock_recursive,
6893 __rtld_lock_default_unlock_recursive): Define.
6894 [_LIBC && SHARED] (__rtld_lock_lock_recursive,
6895 __rtld_lock_unlock_recursive): Define using
6896 GL(_dl_rtld_*lock_recursive).
6897 * init.c (__pthread_initialize_minimal_internal): Initialize
6898 _dl_rtld_lock_recursive and _dl_rtld_unlock_recursive.
6899 Lock GL(_dl_load_lock) the same number of times as
6900 GL(_dl_load_lock) using non-mt implementation was nested.
6902 * pthreadP.h (__pthread_cleanup_upto): Add hidden_proto.
6903 * pt-longjmp.c (__pthread_cleanup_upto): Add hidden_def.
6905 2003-08-06 Jakub Jelinek <jakub@redhat.com>
6907 * tst-cancel17.c (do_test): Make len2 maximum of page size and
6910 2003-08-07 Jakub Jelinek <jakub@redhat.com>
6912 * pthread_create.c (__pthread_create_2_0): Clear new_attr.cpuset.
6914 2003-08-03 Jakub Jelinek <jakub@redhat.com>
6916 * sysdeps/pthread/createthread.c (do_clone): Move error handling
6917 to first syscall error check. Move syscall error check for tkill
6918 into __ASSUME_CLONE_STOPPED #ifdef.
6920 2003-08-02 Ulrich Drepper <drepper@redhat.com>
6922 * sysdeps/pthread/createthread.c (do_clone): If __ASSUME_CLONE_STOPPED
6923 is not defined, do explicit synchronization.
6924 (create_thread): Do not lock pd->lock here. If __ASSUME_CLONE_STOPPED
6925 is not defined also unlock pd->lock for non-debugging case in case
6927 * pthread_create.c (start_thread): Always get and release pd->lock
6928 if __ASSUME_CLONE_STOPPED is not defined.
6929 (start_thread_debug): Removed. Adjust users.
6930 * allocatestack.c (allocate_stack): Always initialize lock if
6931 __ASSUME_CLONE_STOPPED is not defined.
6932 * Makefile (tests): Add tst-sched1.
6933 * tst-sched1.c: New file.
6935 * sysdeps/pthread/createthread.c (do_clone): Only use
6936 sched_setschduler and pass correct parameters.
6938 2003-07-31 Jakub Jelinek <jakub@redhat.com>
6940 * sysdeps/pthread/pthread.h (pthread_attr_setstackaddr,
6941 pthread_attr_setstacksize): Change PTHREAD_STACK_SIZE to
6942 PTHREAD_STACK_MIN in comments.
6944 2003-07-31 Jakub Jelinek <jakub@redhat.com>
6946 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
6947 Shut up warnings if INTERNAL_SYSCALL_ERROR_P does not use its first
6949 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Likewise.
6950 * pthread_condattr_setclock.c (pthread_condattr_setclock): Likewise.
6951 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Include pthreaddef.h.
6952 (__pthread_cleanup_upto): Fix prototype.
6953 (_longjmp_unwind): Adjust caller.
6954 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_timedlock):
6955 Change second argument to const struct pointer.
6956 * tst-sem8.c (main): Remove unused s2 and s3 variables.
6957 * tst-sem9.c (main): Likewise.
6958 * unwind.c: Include string.h for strlen prototype.
6960 2003-07-31 Ulrich Drepper <drepper@redhat.com>
6962 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6963 (__pthread_cond_timedwait): Don't use cmov unless HAVE_CMOV is defined.
6964 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S:
6966 Patch by Nicholas Miell <nmiell@attbi.com>.
6968 2003-07-30 Jakub Jelinek <jakub@redhat.com>
6970 * init.c (__pthread_initialize_minimal_internal): Initialize
6971 GL(dl_init_static_tls).
6972 * pthreadP.h (__pthread_init_static_tls): New prototype.
6973 * allocatestack.c (init_one_static_tls, __pthread_init_static_tls):
6975 * Makefile (tests): Add tst-tls4.
6976 (modules-names): Add tst-tls4moda and tst-tls4modb.
6977 ($(objpfx)tst-tls4): Link against libdl and libpthread.
6978 ($(objpfx)tst-tls4.out): Depend on tst-tls4moda.so and
6980 * tst-tls4.c: New file.
6981 * tst-tls4moda.c: New file.
6982 * tst-tls4modb.c: New file.
6984 2003-06-19 Daniel Jacobowitz <drow@mvista.com>
6986 * sysdeps/pthread/timer_create.c (timer_create): Call timer_delref
6987 before __timer_dealloc.
6988 * sysdeps/pthread/timer_routines.c (__timer_thread_find_matching):
6989 Don't call list_unlink.
6991 2003-07-29 Roland McGrath <roland@redhat.com>
6993 * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
6995 2003-07-25 Jakub Jelinek <jakub@redhat.com>
6997 * tst-cancel17.c (do_test): Check if aio_cancel failed.
6998 Don't reuse struct aiocb A if it failed.
6999 Write fpathconf (fds[1], _PC_PIPE_BUF) + 2 bytes using aio_write,
7000 not just one byte, as that does not block.
7002 2003-07-22 Jakub Jelinek <jakub@redhat.com>
7004 * sysdeps/pthread/unwind-resume.c: New file.
7005 * sysdeps/pthread/Makefile (routines, shared-only-routines): Add
7006 unwind-resume in csu subdir.
7007 (CFLAGS-unwind-resume.c, CFLAGS-rt-unwind-resume.c): Compile with
7009 (librt-sysdep_routines, librt-shared-only-routines): Add
7011 * sysdeps/pthread/rt-unwind-resume.c: New file.
7012 * unwind-forcedunwind.c: New file.
7013 * Makefile (libpthread-routines): Add unwind-forcedunwind.
7014 (libpthread-shared-only-routines): Likewise.
7015 (CFLAGS-unwind-forcedunwind.c): Compile with exceptions.
7016 * pthreadP.h (pthread_cancel_init): New prototype.
7017 * pthread_cancel.c (pthread_cancel): Call pthread_cancel_init.
7019 * sysdeps/pthread/createthread.c (do_thread, create_thread): Make
7020 attr argument const struct pthread_attr *.
7022 * res.c (__res_state): Return __resp.
7023 * descr.h: Include resolv.h.
7024 (struct pthread): Add res field.
7025 * pthread_create.c: Include resolv.h.
7026 (start_thread): Initialize __resp.
7027 * Makefile (tests): Add tst-_res1.
7028 (module-names): Add tst-_res1mod1, tst-_res1mod2.
7029 ($(objpfx)tst-_res1mod2.so): Depend on $(objpfx)tst-_res1mod1.so.
7030 ($(objpfx)tst-_res1): Depend on $(objpfx)tst-_res1mod2.so and
7032 * tst-_res1.c: New file.
7033 * tst-_res1mod1.c: New file.
7034 * tst-_res1mod2.c: New file.
7036 2003-07-21 Ulrich Drepper <drepper@redhat.com>
7038 * sysdeps/pthread/createthread.c: Don't define CLONE_STOPPED.
7040 * Makefile: Define various *-no-z-defs variables for test DSOs
7041 which has undefined symbols.
7043 2003-07-21 Steven Munroe <sjmunroe@us.ibm.com>
7045 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
7046 Retry if the stwcx fails to store once_control.
7048 2003-07-20 Ulrich Drepper <drepper@redhat.com>
7050 * Makefile (libpthread-routines): Add pthread_attr_getaffinity and
7051 pthread_attr_setaffinity.
7052 * Versions [libpthread] (GLIBC_2.3.3): Likewise.
7053 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: New file.
7054 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: New file.
7055 * pthread_attr_destroy.c: Free cpuset element if allocated.
7056 * pthread_create.c: Pass iattr as additional parameter to
7058 * sysdeps/pthread/createthread.c: If attribute is provided and
7059 a new thread is created with affinity set or scheduling parameters,
7060 start thread with CLONE_STOPPED.
7061 * sysdeps/pthread/pthread.h: Declare pthread_attr_getaffinity and
7062 pthread_attr_setaffinity.
7063 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
7066 2003-07-15 Ulrich Drepper <drepper@redhat.com>
7068 * tst-tcancel-wrappers.sh: lseek and llseek are not cancelation points.
7070 2003-07-14 Ulrich Drepper <drepper@redhat.com>
7072 * sysdeps/pthread/configure.in: Require CFI directives also for
7075 2003-07-15 Jakub Jelinek <jakub@redhat.com>
7077 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
7080 2003-07-12 Kaz Kojima <kkojima@rr.iij4u.or.jp>
7082 * sysdeps/sh/tcb-offsets.sym: Add RESULT, TID, CANCELHANDLING and
7084 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use more
7085 registers as variables. Call __pthread_mutex_unlock_usercnt.
7086 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7087 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Store TID
7088 not self pointer in __writer. Compare with TID to determine
7090 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7091 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
7093 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
7095 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add cancellation support.
7096 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
7097 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Define all the nice
7098 macros also when compiling librt.
7100 2003-07-11 Jakub Jelinek <jakub@redhat.com>
7102 * Makefile (CFLAGS-pthread_once.c): Add -fexceptions
7103 -fasynchronous-unwind-tables.
7104 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
7105 (PSEUDO): Add cfi directives.
7106 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO):
7108 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
7111 2003-07-08 Jakub Jelinek <jakub@redhat.com>
7113 * pthreadP.h (__pthread_unwind_next, __pthread_register_cancel,
7114 __pthread_unregister_cancel): Add prototypes and hidden_proto.
7115 * unwind.c (__pthread_unwind_next): Add hidden_def.
7116 * cleanup.c (__pthread_register_cancel, __pthread_unregister_cancel):
7118 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
7119 Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
7120 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
7122 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
7123 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
7125 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once): Use
7126 HIDDEN_JUMPTARGET to call __pthread_register_cancel,
7127 __pthread_unregister_cancel and __pthread_unwind_next.
7129 2003-07-04 Jakub Jelinek <jakub@redhat.com>
7131 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Use
7132 different symbol for the cancellation syscall wrapper and
7133 non-cancellation syscall wrapper.
7134 (PSEUDO_END): Define.
7136 2003-07-05 Richard Henderson <rth@redhat.com>
7138 * sysdeps/alpha/elf/pt-initfini.c: Avoid .ent/.end.
7139 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_wait,
7140 lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
7141 return actual return value from the syscall, not 0.
7143 2003-07-07 Ulrich Drepper <drepper@redhat.com>
7145 * descr.h (struct pthread): Add pid field.
7146 * allocatestack.c (allocate_stack): Initialize pid field in descriptor.
7147 (__reclaim_stacks): Likewise.
7148 * init.c (sigcancel_handler): If __ASSUME_CORRECT_SI_PID is defined
7149 also check for PID of the signal source.
7150 (__pthread_initialize_minimal_internal): Also initialize pid field
7151 of initial thread's descriptor.
7152 * pthread_cancel.c: Use tgkill instead of tkill if possible.
7153 * sysdeps/unix/sysv/linux/fork.c: Likewise.
7154 * sysdeps/unix/sysv/linux/pt-raise.c: Likewise.
7155 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
7156 * sysdeps/unix/sysv/linux/raise.c: Likewise.
7158 2003-07-05 Ulrich Drepper <drepper@redhat.com>
7160 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_push): Renamed.
7161 Fix use of parameter.
7162 (__libc_cleanup_pop): Likewise.
7164 2003-07-04 Ulrich Drepper <drepper@redhat.com>
7166 * init.c (sigcancel_handler): Change parameters to match handler
7167 for SA_SIGACTION. Check signal number and code to recognize
7168 invalid invocations.
7170 2003-07-03 Roland McGrath <roland@redhat.com>
7172 * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr):
7173 Apply sizeof (struct pthread) bias to r13 value.
7175 2003-07-03 Ulrich Drepper <drepper@redhat.com>
7177 * sysdeps/pthread/configure.in: Require CFI directives.
7179 * sysdeps/pthread/librt-cancellation.c (__pthread_unwind): Remove
7181 * pthreadP.h (__pthread_unwind): Add hidden_proto if used in
7182 libpthread compilation.
7183 * unwind.c (__pthread_unwind): Add hidden_def.
7184 * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_unwind.
7186 2003-07-01 Ulrich Drepper <drepper@redhat.com>
7188 * libc-cancellation.c (__libc_cleanup_routine): Define.
7189 * sysdeps/pthread/bits/libc-lock.h (__pthread_cleanup_push): Define.
7190 (__pthread_cleanup_pop): Define.
7192 2003-07-01 Richard Henderson <rth@redhat.com>
7194 * sysdeps/alpha/elf/pt-initfini.c: New file.
7195 * sysdeps/alpha/pthread_spin_lock.S: New file.
7196 * sysdeps/alpha/pthread_spin_trylock.S: New file.
7197 * sysdeps/alpha/pthreaddef.h: New file.
7198 * sysdeps/alpha/td_ta_map_lwp2thr.c: New file.
7199 * sysdeps/alpha/tls.h: New file.
7200 * sysdeps/unix/sysv/linux/alpha/Makefile: New file.
7201 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: New file.
7202 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: New file.
7203 * sysdeps/unix/sysv/linux/alpha/createthread.c: New file.
7204 * sysdeps/unix/sysv/linux/alpha/fork.c: New file.
7205 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: New file.
7206 * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: New file.
7207 * sysdeps/unix/sysv/linux/alpha/pthread_once.c: New file.
7208 * sysdeps/unix/sysv/linux/alpha/sem_post.c: New file.
7209 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
7211 2003-07-01 Ulrich Drepper <drepper@redhat.com>
7213 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Add correct
7214 cleanup support and unwind info.
7216 2003-06-30 Ulrich Drepper <drepper@redhat.com>
7218 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
7219 Use correct cleanup handler registration. Add unwind info.
7220 * sysdeps/unix/sysv/linux/unwindbuf.sym: New file.
7221 * sysdeps/unix/sysv/linux/Makefile: Add rule to build unwindbuf.h.
7222 * tst-once3.c: Add cleanup handler and check it is called.
7223 * tst-once4.c: Likewise.
7224 * tst-oncex3.c: New file.
7225 * tst-oncex4.c: New file.
7226 * Makefile: Add rules to build and run tst-oncex3 and tst-oncex4.
7228 2003-06-29 Ulrich Drepper <drepper@redhat.com>
7230 * sysdeps/pthread/configure.in: Check for C cleanup handling in gcc.
7232 2003-06-27 Ulrich Drepper <drepper@redhat.com>
7234 * tst-cancel4.c (tf_msgrcv): Use IPC_PRIVATE in msgget call.
7235 (tf_msgsnd): Likewise.
7237 * tst-cancel4.c (tf_msgrcv): Strengthen test against valid
7238 premature returns a bit more.
7240 2003-06-26 Ulrich Drepper <drepper@redhat.com>
7242 * sysdeps/pthread/librt-cancellation.c: Move __pthread_unwind
7243 definition to the front.
7245 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rename
7246 the cleanup functions to make the names unique. Fix dwarf opcode
7248 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Rename cleanup
7249 functions to make the names unique. Fix CFA offset for two blocks.
7251 2003-06-25 Ulrich Drepper <drepper@redhat.com>
7253 * sysdeps/pthread/pthread.h (class __pthread_cleanup_class): Add
7254 missing closing braces.
7255 Patch by Christophe Saout <christophe@saout.de>.
7257 2003-06-24 Roland McGrath <roland@redhat.com>
7259 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Typo fix.
7261 2003-06-24 Ulrich Drepper <drepper@redhat.com>
7263 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: New file.
7264 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: New file.
7266 * pthreadP.h: Declare __find_thread_by_id.
7267 * allocatestack.c [HP_TIMING_AVAIL]: Define __find_thread_by_id.
7268 * pthread_clock_gettime.c: Allow using other thread's clock.
7269 * pthread_clock_settime.c: Likewise.
7270 * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
7271 * Makefile: Add rules to build and run tst-clock2.
7272 * tst-clock2.c: New file.
7274 2003-06-23 Ulrich Drepper <drepper@redhat.com>
7276 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rewrite
7277 to use exception-based cleanup handler.
7278 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7280 * tst-cond8.c (ch): Announce that we are done.
7282 * pthreadP.h (__pthread_mutex_cond_lock): Mark with internal_function.
7284 * tst-cancel17.c (tf): Retry aio_suspend in case of EINTR.
7285 Also test aio_suspend with timeout value.
7287 2003-06-22 Ulrich Drepper <drepper@redhat.com>
7289 * pthreadP.h: Mark __pthread_mutex_unlock_usercnt also hidden.
7290 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Add
7293 * pthreadP.h (__pthread_mutex_init_internal): Mark hidden.
7294 (__pthread_mutex_lock_internal): Likewise.
7295 (__pthread_mutex_unlock_internal): Likewise.
7296 (__pthread_mutex_unlock_usercnt): Declare.
7297 * pthread_mutex_destroy.c: Always fail if used in any way.
7298 * pthread_mutex_init.c: Update comment.
7299 * pthread_mutex_lock.c: If NO_INCR is not defined adjust __nusers.
7300 * pthread_mutex_timedlock.c: Adjust __nusers.
7301 * pthread_mutex_trylock.c: Adjust __nusers.
7302 * pthread_mutex_unlock.c: Old code is in __pthread_mutex_unlock_usercnt
7303 and public interfaces are wrapper with pass additional parameter.
7304 __pthread_mutex_unlock_usercnt does not adjust __nusers if second
7306 * tst-mutex8.c: New file.
7307 * Makefile (tests): Add tst-mutex8.
7308 * sysdeps/pthread/pthread_cond_timedwait.c: Call
7309 __pthread_mutex_unlock_usercnt.
7310 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
7311 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7312 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7313 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7314 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7315 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Define NO_INCR.
7316 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
7318 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7319 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7320 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7321 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
7322 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
7324 * pthread_mutex_lock.c: Don't store THREAD_ID in __owner, use TID.
7325 * pthread_mutex_timedlock.c: Likewise.
7326 * pthread_mutex_trylock.c: Adjust __nusers.
7327 * pthread_mutex_unlock.c: Compare with TID not THREAD_ID.
7328 * tst-mutex9.c: New file.
7329 * Makefile (tests): Add tst-mutex9.
7330 * sysdeps/i386/tls.h: Remove THREAD_ID definition.
7331 * sysdeps/ia64/tls.h: Likewise.
7332 * sysdeps/powerpc/tls.h: Likewise.
7333 * sysdeps/s390/tls.h: Likewise.
7334 * sysdeps/sh/tls.h: Likewise.
7335 * sysdeps/x86_64/tls.h: Likewise.
7336 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
7337 Change type of __owner.
7338 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7339 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7340 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7341 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
7342 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
7344 2003-06-19 Jakub Jelinek <jakub@redhat.com>
7346 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Move to...
7347 * sysdeps/unix/sysv/linux/sem_post.c: ...here.
7349 * sysdeps/unix/sysv/linux/sem_post.c: Move to...
7350 * sysdeps/unix/sysv/linux/powerpc/sem_post.c: ... here. Pass nr + 1
7351 instead of nr to lll_futex_wake. Only set errno and return -1
7354 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_wait,
7355 lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
7356 return actual return value from the syscall, not 0.
7358 2003-06-18 Ulrich Drepper <drepper@redhat.com>
7360 * tst-cancel4.c (tf_msgsnd): Don't always use 100 as the type,
7361 find a random value.
7362 (tf_msgrcv): Likewise. Also don't report msgrcv returns if
7365 * sysdeps/unix/sysv/linux/timer_settime.c: Add prototype for
7366 compat_timer_settime.
7367 * sysdeps/unix/sysv/linux/timer_gettime.c: Add prototype for
7368 compat_timer_gettime.
7369 * sysdeps/unix/sysv/linux/timer_getoverr.c: Add prototype for
7370 compat_timer_getoverrun.
7371 * sysdeps/unix/sysv/linux/timer_delete.c: Add prototype for
7372 compat_timer_delete.
7374 * pthread_mutex_destroy.c (__pthread_mutex_destroy): For
7375 error-checking mutex detect busy mutexes.
7377 2003-06-17 Ulrich Drepper <drepper@redhat.com>
7379 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_mutex_lock):
7380 Add ax to clobber list.
7381 (lll_mutex_cond_lock): Likewise.
7382 (lll_mutex_unlock): Likewise.
7383 (lll_lock): Likewise.
7384 (lll_unlock): Likewise.
7386 * Makefile: Add rules to build and run tst-cancel18 and tst-cancelx18.
7387 * tst-cancel18.c: New file.
7388 * tst-cancelx18.c: New file.
7390 * tst-cancel4.c: Test connect, creat, msgrcv, msgsnd, sendmsg, sendto,
7393 * Makefile: Add rules to build and run tst-cancel17 and tst-cancel17x.
7394 * tst-cancel17.c: New file.
7395 * tst-cancelx17.c: New file.
7397 * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
7398 * sysdeps/unix/sysv/linux/sigwait.c: New file.
7399 * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
7401 * tst-cancel4.c: Test open, close, pread, pwrite, fsync, and msync.
7403 2003-06-16 Jakub Jelinek <jakub@redhat.com>
7405 * sysdeps/pthread/createthread.c (create_thread): Set
7406 header.multiple_threads unconditionally.
7407 * allocatestack.c (allocate_stack): Likewise.
7408 * descr.h (struct pthread): Add header.multiple_threads
7410 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (CENABLE, CDISABLE):
7411 Define for librt. #error if neither libpthread, libc nor librt.
7412 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (CENABLE, CDISABLE):
7414 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (CENABLE,
7415 CDISABLE): Likewise.
7416 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (CENABLE,
7417 CDISABLE): Likewise.
7418 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (CENABLE,
7419 CDISABLE): Likewise.
7420 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (CENABLE,
7421 CDISABLE): Likewise. Access header.multiple_threads outside of
7422 libc and libpthread.
7423 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (CENABLE, CDISABLE):
7425 * sysdeps/x86_64/tls.h (tcbhead_t): Add multiple_threads.
7426 * sysdeps/x86_64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define.
7428 2003-06-17 Ulrich Drepper <drepper@redhat.com>
7430 * tst-cancel4.c: Add tests for the socket and signal functions, pause.
7431 Also test early cancellation before the thread reaches the cancellation
7434 * Makefile: Compile forward.c with exceptions.
7436 * sysdeps/unix/sysv/linux/sleep.c: New file.
7438 2003-06-16 Ulrich Drepper <drepper@redhat.com>
7440 * Makefile: Add CFLAGS definition to compile function wrappers
7441 duplicated from libc with exceptions.
7442 * tst-cancel4.c: Also check cancellation handlers.
7444 * Makefile: Add rules to build and run tst-cancel16 and
7445 tst-cancelx16. Add missing CFLAGS definitions.
7446 * tst-cancel16.c: New file.
7447 * tst-cancelx16.c: New file.
7449 2003-06-15 Ulrich Drepper <drepper@redhat.com>
7451 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
7452 (DL_SYSINFO_IMPLEMENTATION): Use CFI opcodes.
7453 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
7454 (DL_SYSINFO_IMPLEMENTATION): Likewise.
7456 * pthreadP.h (LIBC_CANCEL_ASYNC): Also define for librt.
7457 (LIBC_CANCEL_RESET): Likewise.
7458 Declare __librt_enable_asynccancel and __librt_disable_asynccancel.
7459 * sysdeps/pthread/Makefile (librt-sysdep_routines): Add
7461 (CFLAGS-libcrt-cancellation.c): Define.
7462 * sysdeps/pthread/librt-cancellation.c: New file.
7463 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define all the nice
7464 macros also when compiling librt.
7465 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
7466 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
7467 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
7468 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
7469 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
7470 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
7471 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
7473 * sysdeps/unix/sysv/linux/timer_create.c: Add prototype for
7474 compat_timer_create.
7476 2003-06-14 Ulrich Drepper <drepper@redhat.com>
7478 * sysdeps/pthread/posix-timer.h (timespec_compare): Always inline.
7480 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
7482 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
7483 Add libc_hidden_def.
7485 2003-06-13 Roland McGrath <roland@redhat.com>
7487 * sysdeps/x86_64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Pass FS
7488 constant from <sys/reg.h> to ps_get_thread_area, not register contents.
7490 2003-06-11 Ulrich Drepper <drepper@redhat.com>
7492 * allocatestack.c (queue_stack): Always inline.
7493 * ptreadhP.h (__do_cancel): Likewise.
7495 2003-06-10 Jakub Jelinek <jakub@redhat.com>
7497 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait): Fix
7500 2003-06-10 Ulrich Drepper <drepper@redhat.com>
7502 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
7503 (__pthread_cond_signal): Remove incorrect second addition for
7506 2003-06-09 Ulrich Drepper <drepper@redhat.com>
7508 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
7509 (__pthread_cond_signal): Use correct futex pointer in
7510 __lll_mutex_lock_wait call.
7512 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
7513 (__pthread_cond_signal): Some more tweaks to handle cond_lock!=0.
7515 2003-06-08 Ulrich Drepper <drepper@redhat.com>
7517 * sysdeps/unix/sysv/linux/s390/sem_wait.c (__new_sem_wait): Make
7519 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
7522 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Remove
7523 hand-written CFI generation code. Since ENTRY/END also initiated
7524 CFI frames this caused two CFI sets to be generated.
7526 2003-06-07 Ulrich Drepper <drepper@redhat.com>
7528 * cleanup_routine.c: New file.
7529 * Versions (libpthread) [GLIBC_2.3.3]: Add __pthread_cleanup_routine.
7530 * sysdeps/pthread/pthread.h: Add support for fully exception-based
7532 * Makefile (libpthread-routines): Add cleanup_routine.
7533 Add more CFLAGS variables to compile with exceptions. Add comments
7534 why which file needs unwind tables.
7535 (tests) [have-forced-unwind==yes]: Add tst-cancelx* and tst-cleanupx*
7537 * tst-cancelx1.c: New file.
7538 * tst-cancelx2.c: New file.
7539 * tst-cancelx3.c: New file.
7540 * tst-cancelx4.c: New file.
7541 * tst-cancelx5.c: New file.
7542 * tst-cancelx6.c: New file.
7543 * tst-cancelx7.c: New file.
7544 * tst-cancelx8.c: New file.
7545 * tst-cancelx9.c: New file.
7546 * tst-cancelx10.c: New file.
7547 * tst-cancelx11.c: New file.
7548 * tst-cancelx12.c: New file.
7549 * tst-cancelx13.c: New file.
7550 * tst-cancelx14.c: New file.
7551 * tst-cancelx15.c: New file.
7552 * tst-cleanupx0.c: New file.
7553 * tst-cleanupx0.expect: New file.
7554 * tst-cleanupx1.c: New file.
7555 * tst-cleanupx2.c: New file.
7556 * tst-cleanupx3.c: New file.
7558 * tst-cleanup0.c: Make standard compliant.
7559 * tst-cleanup1.c: Likewise.
7561 * sysdeps/unix/sysv/linux/sem_timedwait.c: Add cancellation support.
7562 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
7563 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
7564 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
7565 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
7566 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
7567 * sysdeps/i386/tcb-offsets.sym: Add RESULT, CANCELHANDLING, and
7569 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
7570 * tst-cancel12.c: New file.
7571 * tst-cancel13.c: New file.
7572 * tst-cancel14.c: New file.
7573 * tst-cancel15.c: New file.
7574 * Makefile (tests): Add tst-cancel12, tst-cancel13, tst-cancel14,
7577 * tst-cancel1.c: Add some comments.
7579 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Compute relative
7582 2003-06-06 Ulrich Drepper <drepper@redhat.com>
7584 * Makefile (CFLAGS-pthread_cancel.c): Define.
7586 2003-06-05 Ulrich Drepper <drepper@redhat.com>
7588 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_rwlock_t):
7589 Change type of __writer element to int.
7590 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7591 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7592 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7593 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7594 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
7595 * sysdeps/i386/tcb-offsets.sym: Replace SELF entry with TID entry.
7596 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
7597 * pthread_rwlock_trywrlock.c: Store TID not self pointer in __writer.
7598 Compare with TID to determine deadlocks.
7599 * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
7600 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
7601 * sysdeps/pthread/pthread_rwlock_timedwrlock.: Likewise.
7602 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
7603 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
7604 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
7606 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
7608 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
7609 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
7610 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
7612 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
7614 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
7615 * Makefile (tests): Add tst-rwlock12.
7616 * tst-rwlock12.c: New file.
7618 2003-06-05 Jakub Jelinek <jakub@redhat.com>
7620 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait,
7621 __lll_timedlock_wait, lll_unlock_wake_cb, __lll_timedwait_tid):
7622 Remove bogus hidden_proto.
7623 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
7625 * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_lock,
7626 lll_unlock_wake_cb, ___lll_timedwait_tid): Likewise.
7627 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (___lll_mutex_lock,
7628 ___lll_mutex_timedlock): Likewise.
7630 2003-06-04 Ulrich Drepper <drepper@redhat.com>
7632 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
7633 (__pthread_cond_signal): Add some code to eventually handle
7636 2003-06-01 Ulrich Drepper <drepper@redhat.com>
7638 * Makefile (tests): Add tst-exec4.
7639 (tst-exec4-ARGS): Define.
7640 * tst-exec4.c: New file.
7642 2003-05-31 Ulrich Drepper <drepper@redhat.com>
7644 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
7645 Also fail if tv_nsec < 0.
7646 (__lll_timedwait_tid): Likewise.
7647 * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
7648 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_timedwait_tid):
7650 * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_timedwait_tid):
7652 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (__lll_mutex_timedlock):
7654 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
7656 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_timedwait_tid):
7658 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_timedwait_tid):
7661 * Makefile (tests): Add tst-sem8 and tst-sem9.
7662 * tst-sem8.c: New file.
7663 * tst-sem9.c: New file.
7664 * sem_open.c: Fix creation of in_use record if the file exists but
7667 * posix-timer.h: Remove old, unused timer_id2ptr and timer_ptr2id
7670 * sysdeps/pthread/timer_create.c (timer_create): In case
7671 evp==NULL, assign timer ID to sival_ptr.
7673 * descr.h (struct pthread_unwind_buf): Change type of prev element to
7674 struct pthread_unwind_buf *.
7675 (struct pthread): Likewise for cleanup_jmp_buf element.
7677 * cleanup.c (__pthread_register_cancel): Add cast to avoid warning.
7678 * cleanup_defer.c (__pthread_register_cancel_defer): Likewise.
7679 * unwind.c (__pthread_unwind_next): Likewise.
7681 2003-05-30 Ulrich Drepper <drepper@redhat.com>
7683 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
7684 (lll_futex_timed_wait): Use int for futex value parameter.
7685 (lll_futex_wake): Likewise.
7686 (lll_futex_requeue): Likewise.
7688 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
7689 Replace one memory operation with one register operation.
7691 * tst-join4.c (do_test): Fix error message.
7693 * tst-rwlock6.c (do_test): Use correct format specifier.
7695 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
7696 (__lll_mutex_lock_wait): Replace one memory operation with one
7698 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S
7699 (__lll_mutex_lock_wait): Likewise.
7701 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
7702 (__lll_mutex_cond_lock): Add one to value parameter of
7703 __lll_lock_wait to reflect reality in the futex syscall.
7704 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
7705 (lll_mutex_cond_lock): Likewise.
7707 2003-05-30 Jakub Jelinek <jakub@redhat.com>
7709 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_cond_lock):
7711 (lll_mutex_cond_lock): Define.
7713 2003-05-29 Ulrich Drepper <drepper@redhat.com>
7715 * Makefile (tests): Add tst-signal6.
7716 * tst-signal6.c: New file.
7718 * sysdeps/unix/sysv/linux/s390/lowlevellock.h
7719 (__lll_mutex_unlock_force): New function
7720 (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
7722 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
7723 (__lll_mutex_unlock_force): New function.
7724 (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
7726 * tst-rwlock7.c (do_test): Use correct format specifier.
7728 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue):
7729 Find break parameter in correct asm argument.
7731 2003-05-27 Jakub Jelinek <jakub@redhat.com>
7733 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_clobbers):
7735 (lll_futex_requeue): Fix __o3 constraint, return negative errno if
7737 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
7739 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_REQUEUE,
7740 lll_futex_requeue, lll_mutex_unlock_force): Define.
7742 2003-05-30 Jakub Jelinek <jakub@redhat.com>
7744 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
7745 (pthread_cond_t): Add __mutex.
7746 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_REQUEUE,
7747 lll_futex_requeue, lll_mutex_unlock_force): Define.
7749 2003-05-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
7751 * sysdeps/sh/tcb-offsets.sym: Define MUTEX_FUTEX.
7752 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
7754 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (SYSCALL_WITH_INST_PAD):
7756 (lll_futex_wait, lll_futex_wake): Define.
7757 * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: New file.
7758 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Try using
7759 FUTEX_REQUEUE instead of FUTEX_WAIT.
7760 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
7761 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Remember
7762 mutex which was used in condvar structure. Call
7763 __pthread_mutex_cond_lock instead of __pthread_mutex_lock_internal.
7764 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
7766 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Don't
7767 include tcb-offsets.h. Read wakeup value in locked region.
7768 Use the value of gbr register as THREAD_ID.
7769 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7770 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
7771 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
7773 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Remove futex related
7776 2003-05-28 Ulrich Drepper <drepper@redhat.com>
7778 * sysdeps/pthread/pthread_cond_broadcast.c
7779 (__pthread_cond_broadcast): Fix typo: MAX_INT -> INT_MAX.
7781 2003-05-26 Ulrich Drepper <drepper@redhat.com>
7783 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Fix
7784 typo in register name.
7785 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use parameters
7786 correctly. Actually use requeue. Little optimization.
7787 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Store
7788 mutex address early. Handle cancellation state as 32-bit value.
7789 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7790 Remove unnecessary label.
7792 2003-05-25 Ulrich Drepper <drepper@redhat.com>
7794 * sysdeps/pthread/pthread_cond_broadcast.c: Try using FUTEX_REQUEUE
7795 instead of FUTEX_WAIT.
7796 * sysdeps/pthread/pthread_cond_signal.c: Likewise.
7797 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
7798 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
7799 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
7800 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
7801 * sysdeps/pthread/pthread_cond_timedwait.c: Remember mutex which was
7802 used in condvar structure. Call __pthread_mutex_cond_lock instead
7803 of __pthread_mutex_lock_internal.
7804 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7805 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7806 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
7807 (__condvar_cleanup): Always call __pthread_mutex_cond_lock.
7808 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7809 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7810 * sysdeps/unix/sysv/linux/Makefile (libpthread-sysdep_routines):
7811 Add pthread_mutex_cond_lock.
7812 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add dep_mutex.
7813 * sysdeps/unix/sysv/linux/pthread_cond_mutex_lock.c: New file.
7814 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define
7815 lll_mutex_cond_lock.
7816 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
7817 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
7818 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
7820 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7821 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
7823 * sysdeps/i386/tcb-offsets.sym: Define MUTEX_FUTEX.
7824 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
7826 * pthreadP.h: Declare __pthread_mutex_cond_lock.
7827 * pthread_mutex_lock.c: Define LLL_MUTEX_LOCK if not already defined.
7828 Use it instead of lll_mutex_lock. If __pthread_mutex_lock is a
7829 macro don't define aliases.
7831 * cancellation.c: Remove __pthread_enable_asynccancel_2.
7832 * pthreadP.h: Remove declaration of __pthread_enable_asynccancel_2.
7833 * sysdeps/pthread/pthread_cond_timedwait.c: Use
7834 __pthread_enable_asynccancel instead of __pthread_enable_asynccancel_2.
7835 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7836 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7837 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
7838 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7839 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7841 2003-05-17 Ulrich Drepper <drepper@redhat.com>
7843 * sem_open.c: Fix one endless loop. Implement correct semantics
7844 wrt opening the same semaphore more then once.
7845 * sem_close.c: Adjust for sem_open change.
7846 * semaphoreP.h: Include <semaphore.h>. Define struct inuse_sem.
7847 Declare __sem_mappings, __sem_mappings_lock, __sem_search.
7848 * Makefile (tests): Add tst-sem7.
7849 * tst-sem7.c: New file.
7851 2003-05-16 Roland McGrath <roland@redhat.com>
7853 * sysdeps/unix/sysv/linux/register-atfork.c (libc_freeres_fn): Fix
7854 uninitialized variable braino.
7856 2003-05-16 Ulrich Drepper <drepper@redhat.com>
7858 * sysdeps/unix/sysv/linux/timer_gettime.c (timer_gettime): Correct
7859 test for syscall availability.
7861 * sysdeps/unix/sysv/linux/timer_settime.c (timer_settime): Set
7862 __no_posix_timers to -1 if the syscalls don't exist.
7864 * pthread_join.c (pthread_join): Set tid field of the joined
7865 thread to -1. This isn't necessary but helps to recognize some
7866 error conditions with almost no cost.
7868 * allocatestack.c (FREE_P): Also negative values indicate an
7871 * unwind.c: Include <unistd.h>.
7873 2003-05-14 Ulrich Drepper <drepper@redhat.com>
7875 * Makefile ($(objpfx)$(multidir)): Add rule to create the directory.
7877 2003-05-14 Jakub Jelinek <jakub@redhat.com>
7879 * Makefile (crti-objs, crtn-objs): New variables.
7880 (omit-deps, extra-objs): Add crtn.
7881 ($(objpfx)libpthread.so): Depend on both crti and crtn
7882 and links to them in multidir.
7883 ($(objpfx)crtn.S, $(objpfx)crtn.o): New rules.
7885 2003-05-12 Steven Munroe <sjmunroe@us.ibm.com>
7887 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
7888 (lll_mutex_unlock): Use atomic_exchange_rel.
7890 2003-05-11 Ulrich Drepper <drepper@redhat.com>
7892 * cond-perf.c (cons): Add missing locking around setting of alldone.
7894 2003-05-10 Ulrich Drepper <drepper@redhat.com>
7896 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Remove futex
7898 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
7900 2003-05-09 Ulrich Drepper <drepper@redhat.com>
7902 * tst-sem6.c: New file.
7903 * Makefile (tests): Add tst-sem6.
7905 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (___lll_mutex_unlock):
7906 Use atomic_exchange_rel instead of atomic_exchange.
7907 * sysdeps/unix/sysv/linux/lowlevellock.c (lll_unlock_wake_cb):
7910 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Improve quality of
7911 code for lll_futex_wait and lll_futex_wake in static apps. Use
7912 vsyscall is possible.
7914 * sysdeps/unix/sysv/linux/pthread_getaffinity.c: New file.
7915 * sysdeps/unix/sysv/linux/pthread_setaffinity.c: New file.
7916 * sysdeps/pthread/pthread.h: Declare pthread_getaffinity_np and
7917 pthread_setaffinity_np.
7918 * Versions [libpthread] (GLIBC_2.3.3): Add pthread_getaffinity_np
7919 and pthread_setaffinity_np.
7920 * Makefile (libpthread-routines): Add pthread_getaffinity and
7921 pthread_setaffinity.
7923 * allocatestack.c (allocate_stack): If ARCH_RETRY_MMAP is defined,
7924 use it in case mmap to allocate the stack fails.
7925 * sysdeps/unix/sysv/linux/x86_64/Makefile: Don't define
7926 ARCH_MAP_FLAGS here.
7927 * sysdeps/x86_64/pthreaddef.h: Define ARCH_MAP_FLAGS and
7930 2003-05-08 Ulrich Drepper <drepper@redhat.com>
7932 * sysdeps/unix/sysv/linux/fork.c: Complete rewrite of the atfork
7933 handler implementation. It is now lockless in fork().
7934 * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
7935 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
7936 * sysdeps/unix/sysv/linux/fork.h: Don't include <link.h>. Don't
7937 declare the __fork_*_lists.
7938 (struct fork_handler): Include pointers to all three functions.
7939 Add next, refcntr and need_signal elements.
7940 (__fork_handlers): New declaration.
7941 (__register_atfork_malloc): Remove declaration.
7942 (HAVE_register_atfork_malloc): Remove definition.
7943 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove
7944 __pthread_child_handler variable.
7945 (__libc_pthread_init): Use __register_atfork instead of explicitly
7947 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define lll_futex_wait
7949 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
7951 * unwind.c (unwind_cleanup): Print error message and then abort. This
7952 function must never be reached.
7954 * cond-perf.c: New file.
7956 2003-05-05 Ulrich Drepper <drepper@redhat.com>
7958 * sysdeps/i386/tls.h (TLS_INIT_TP): Include \n in error message.
7960 2003-05-04 Roland McGrath <roland@redhat.com>
7962 * Makefile ($(objpfx)../libc.so): New target.
7964 2003-05-02 Ulrich Drepper <drepper@redhat.com>
7966 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
7967 (pthread_condattr_t): Size is only an int, don't use long for
7969 (pthread_mutexattr_t): Likewise.
7970 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7971 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
7972 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7974 2003-05-01 Ulrich Drepper <drepper@redhat.com>
7976 * sysdeps/i386/tls.h: Define THREAD_ID.
7977 * sysdeps/ia64/tls.h: Likewise.
7978 * sysdeps/powerpc/tls.h: Likewise.
7979 * sysdeps/s390/tls.h: Likewise.
7980 * sysdeps/sh/tls.h: Likewise.
7981 * sysdeps/x86_64/tls.h: Likewise.
7982 * pthread_mutex_lock.c: Use THREAD_ID instead of THREAD_SELF to
7984 * pthread_mutex_timedlock.c: Likewise.
7985 * pthread_mutex_trylock.c: Likewise.
7986 * pthread_mutex_unlock.c: Likewise.
7987 * pthread_rwlock_trywrlock.c: Likewise.
7988 * sysdeps/pthread/pthread_rwlocklock_rdlock.c: Likewise.
7989 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
7990 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
7991 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
7993 * sysdeps/pthread/createthread.c (create_thread): Use CLONE_SYSVSEM
7996 2003-04-29 Jakub Jelinek <jakub@redhat.com>
7998 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
7999 (__SIZEOF_PTHREAD_COND_T): Define to 48.
8000 (pthread_rwlock_t): Add 16 bytes of pad instead of 8 before __flags.
8001 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
8002 Make __align long long instead of long.
8003 (pthread_rwlock_t): Formatting.
8004 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
8005 (pthread_rwlock_t): Formatting.
8006 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
8007 (pthread_cond_t): Make __align long long instead of long.
8008 (pthread_rwlock_t): Move __flags field to the same position as in
8011 2003-04-30 Ulrich Drepper <drepper@redhat.com>
8013 * tst-rwlock6.c (do_test): Use correct printf format specifiers.
8014 * tst-rwlock7.c (do_test): Likewise.
8016 2003-04-26 Roland McGrath <roland@redhat.com>
8018 * Makefile ($(test-modules)): Depend on $(common-objpfx)shlib.lds.
8020 2003-04-22 Jakub Jelinek <jakub@redhat.com>
8022 * allocatestack.c (TLS_TPADJ): Add TLS_PRE_TCB_SIZE instead of
8023 sizeof (struct pthread).
8024 (allocate_stack): Subtract TLS_PRE_TCB_SIZE bytes instead of
8026 * sysdeps/powerpc/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Define
8028 (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Define to alignment of
8030 (TLS_PRE_TCB_SIZE): Increase to cover tcbhead_t preceeded by pad
8032 (INSTALL_DTV, GET_DTV, THREAD_DTV): tcbhead_t is immediately before
8034 (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Don't add TLS_TCB_SIZE
8036 (NO_TLS_OFFSET): Define.
8037 * sysdeps/unix/sysv/linux/powerpc/createthread.c (TLS_VALUE): Don't
8038 add TLS_TCB_SIZE unnecessarily.
8040 2003-04-22 Roland McGrath <roland@redhat.com>
8042 * Makeconfig (shared-thread-library): Reverse link order to work
8045 2003-04-22 Ulrich Drepper <drepper@redhat.com>
8047 * semaphore.h: Fix typo in comment.
8049 2003-04-21 Ulrich Drepper <drepper@redhat.com>
8051 * sysdeps/pthread/sigfillset.c: New file.
8053 * init.c (__pthread_initialize_minimal): Don't block SIGTIMER.
8054 * pthreadP.h: Make SIGTIMER and SIGCANCEL the same.
8055 * sysdeps/pthread/pthread_sigmask.c: Remove handling of SIGTIMER.
8056 * sysdeps/pthread/sigaction.c: Likewise.
8057 * sysdeps/pthread/sigprocmask.c: New file.
8058 * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): Define as
8060 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
8061 Block SIGTIMER. Also handle SI_TKILL events and terminate thread
8064 2003-04-19 Ulrich Drepper <drepper@redhat.com>
8066 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
8067 (DL_SYSINFO_IMPLEMENTATION): Add .eh_frame information.
8069 * sysdeps/unix/sysv/linux/unregister-atfork.c
8070 (__unregister_atfork): Don't free memory not allocated dynamically.
8072 * semaphore.h: Remove __THROW marker from cancellation points.
8073 * nptl/sysdeps/pthread/pthread.h: Likewise.
8075 2003-04-18 Ulrich Drepper <drepper@redhat.com>
8077 * sysdeps/pthread/pthread.h: Don't mark pthread_testcancel,
8078 pthread_cancel, pthread_setcancelstate, and pthread_setcanceltype with
8081 2003-04-16 Jakub Jelinek <jakub@redhat.com>
8083 * tst-cancel4.c (do_test): Use %zd instead of %d when printing cnt.
8085 2003-04-15 Roland McGrath <roland@redhat.com>
8087 * forward.c (__pthread_unwind): Tweak to avoid warning.
8089 2003-04-15 Ulrich Drepper <drepper@redhat.com>
8091 * pthreadP.h: Move THREAD_ATOMIC_* replacements to the top.
8093 2003-04-14 Ulrich Drepper <drepper@redhat.com>
8095 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Don't
8096 overflow CFA advance instructions.
8097 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8099 2003-04-14 Jakub Jelinek <jakub@redhat.com>
8101 * sysdeps/i386/tls.h: Rename LOCK to LOCK_PREFIX.
8102 * sysdeps/i386/pthread_spin_lock.c: Likewise.
8103 * sysdeps/x86_64/tls.h: Likewise. Define LOCK_PREFIX if not already
8106 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Use
8107 DW_CFA_advance_loc2 for .Laddl-.Lsubl.
8108 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
8109 DW_CFA_advance_loc for .Laddl-.Lsubl.
8111 2003-04-13 Ulrich Drepper <drepper@redhat.com>
8113 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Don't use
8114 position-independent unwind data for static libraries.
8115 Add missing unwind info. Add comments.
8117 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Add unwind info.
8118 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8119 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8120 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8122 2003-04-12 Ulrich Drepper <drepper@redhat.com>
8124 * Makefile: Make sure all cancellation points are compiled with
8125 exception and asynchronous unwind tables.
8127 * sysdeps/x86_64/tls.h (THREAD_SETMEM): Word around compiler bug
8128 which mishandles loading of global object addresses in PIC.
8129 (THREAD_SETMEM_NC): Likewise.
8131 2003-04-11 Ulrich Drepper <drepper@redhat.com>
8133 * pthread.h: Define new data structure for cleanup buffer. Declare
8134 new cleanup handler interfaces.
8135 * descr.h: Include <unwind.h> if necessary. Define pthread_unwind_buf.
8136 (struct pthread): Add cleanup_jmp_buf pointer. Define
8137 HAVE_CLEANUP_JMP_BUF and not HAVE_CANCELBUF.
8138 * pthreadP.h: Declare __pthread_unwind. Define __do_cancel to use
8139 it. Declare old cleanup handler installation functions.
8140 * cleanup.c: Rewrite. Install handler for unwind-based cleanup
8142 * cleanup_defer.c: Likewise.
8143 * cleanup_compat.c: New file. Old cleanup code.
8144 * cleanup_def_compat.c: New file. Old cleanup code.
8145 * pthread_create.c (start_thread): Initialize cleanup_jmp_buf element
8146 if own thread descriptor.
8147 * unwind.c: New file.
8148 * forward.c: Add __pthread_unwind.
8149 * init.c (pthread_functions): Add __pthread_unwind.
8150 * sysdeps/pthread/pthread-functions.s (struct pthread_functions):
8151 Add ptr___pthread_unwind.
8152 * Versions [GLIBC_2.3.3] (libpthread): Export new cleanup handling
8153 and unwind function.
8154 * Makefile (libpthread-routines): Add cleanup_compat,
8155 cleanup_def_compat, and unwind. Define CFLAGS to enable unwind
8156 table generation if necessary.
8157 * version.c: Record whether unwind support is compiled in.
8158 * sysdeps/pthread/configure.in: Add checks for unwind unterfaces.
8159 * sysdeps/pthread/bits/libc-lock.h: Add prototypes of the old cleanup
8161 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add quite a bit of
8162 complication to generate unwind information for syscall wrappers.
8163 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
8164 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
8165 __cleanup_fct_attribute.
8167 * Makefile: Add rules to build and run tst-cleanup0.
8168 * tst-cleanup0.c: New file.
8169 * tst-cleanup0.expect: New file.
8171 * pthread_create.c (deallocate_tsd): Don't take parameter. Adjust
8172 caller. Optimize to avoid often unecessary local variable.
8174 2003-04-11 Roland McGrath <roland@redhat.com>
8176 * Makefile ($(objpfx)multidir.mk): New target, generated makefile that
8177 sets variable `multidir'; include that.
8178 (generated): Add it.
8179 ($(objpfx)$(multidir)/crti.o): New target.
8180 [$(multidir) != .] (generated-dirs, extra-objs, omit-deps): Add it.
8182 2003-04-11 Ulrich Drepper <drepper@redhat.com>
8184 * tst-attr2.c (do_test): Add cast to avoid warning.
8185 * tst-mutex4.c (do_test): Likewise.
8187 2003-04-10 Ulrich Drepper <drepper@redhat.com>
8189 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset CPU clocks
8192 2003-04-09 Ulrich Drepper <drepper@redhat.com>
8194 * Makefile (tests): Add tst-detach1.
8195 * tst-detach1.c: New file.
8197 2003-04-08 Ulrich Drepper <drepper@redhat.com>
8199 * sysdeps/pthread/pthread.h: Remove duplicate
8200 pthread_cleanup_{push,pop} definitions.
8202 * tst-barrier2.c: Eliminate warnings.
8203 * tst-cancel4.c: Likewise.
8204 * tst-cond4.c: Likewise.
8205 * tst-cond6.c: Likewise.
8206 * tst-detach1.c: Likewise.
8207 * tst-rwlock4.c: Likewise.
8208 * tst-rwlock6.c: Likewise.
8209 * tst-rwlock7.c: Likewise.
8210 * tst-sem3.c: Likewise.
8211 * tst-spin2.c: Likewise.
8212 * tst-umask1.c: Likewise.
8214 2003-04-07 Ulrich Drepper <drepper@redhat.com>
8216 * pthread_detach.c (pthread_detach): Fix test for invalid TID.
8218 2003-04-06 Ulrich Drepper <drepper@redhat.com>
8220 * descr.h (struct pthread): Move cancelhandling member to the front.
8222 2003-04-05 Ulrich Drepper <drepper@redhat.com>
8224 * sysdeps/unix/sysv/linux/register-atfork.c: Define malloc_prepare,
8225 malloc_parent, and malloc_child statically.
8226 (__register_atfork_malloc): New function.
8227 (free_mem): Don't free any of the malloc_* variables on the list.
8228 * sysdeps/unix/sysv/linux/fork.h: Declare __register_atfork_malloc.
8229 Define HAVE_register_atfork_malloc.
8231 2003-04-04 Ulrich Drepper <drepper@redhat.com>
8233 * sysdeps/pthread/createthread.c (create_thread): Add some more
8234 comments explaining when to set multiple_threads and when not.
8236 * pthreadP.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
8237 THREAD_ATOMIC_BIT_SET if not already defined.
8238 * sysdeps/i386/tls.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
8239 THREAD_ATOMIC_BIT_SET:
8240 * sysdeps/x86_64/tls.h: Likewise.
8241 * cleanup_defer.c (_pthread_cleanup_push_defer): Rewrite to use
8242 THREAD_ATOMIC_CMPXCHG_VAL.
8243 (_pthread_cleanup_pop_restore): Likewise.
8244 * cancellation.c (__pthread_enable_asynccancel): Likewise.
8245 (__pthread_enable_asynccancel_2): Likewise.
8246 (__pthread_disable_asynccancel): Likewise.
8247 * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
8248 (__libc_disable_asynccancel): Likewise.
8249 * init.c (sigcancel_handler): Likewise.
8250 * pthread_setcancelstate.c (__pthread_setcancelstate): Likewise.
8251 * pthread_setcanceltype.c (__pthread_setcanceltype): Likewise.
8253 2003-04-03 Ulrich Drepper <drepper@redhat.com>
8255 * init.c (sigcancel_handler): Don't set EXITING_BIT here.
8256 * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
8257 * pthreadP.h (__do_cancel): Set EXITING_BIT here.
8258 * Makefile (tests): Add tst-cancel11.
8259 * tst-cancel11.c: New file.
8261 2003-04-01 Ulrich Drepper <drepper@redhat.com>
8263 * pthread_create.c (deallocate_tsd): Clear/free memory after the last
8264 round, not the first. Use specific_used flag instead of local
8265 found_nonzero variable. Use THREAD_[SG]ETMEM where possible.
8266 (__free_tcb): Don't call deallocate_tsd here.
8267 (start_thread): Call deallocate_tsd here.
8268 * pthread_setspecific.c: Set specific_used flag really only when
8270 * Makefile (tests): Add tst-tsd3.c and tst-tsd4.
8271 * tst-tsd3.c: New file.
8272 * tst-tsd4.c: New file.
8274 2003-03-31 Ulrich Drepper <drepper@redhat.com>
8276 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_mutex_lock):
8277 Use atomic_exchange_and_add instead of __lll_add.
8278 (__lll_mutex_timedlock): Likewise.
8279 Patch by Ian Wienand.
8281 2003-03-24 Steven Munroe <sjmunroe@us.ibm.com>
8283 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
8284 (SINGLE_THREAD_P): Fix typo.
8285 * tst-cancel-wrappers.sh: Handle '.'ed symbols.
8287 2003-03-31 Ulrich Drepper <drepper@redhat.com>
8289 * Makefile (tests): Add tst-align.
8290 * tst-align.c: New file.
8291 * sysdeps/i386/Makefile: Define CFLAGS-tst-align.
8293 * sysdeps/i386/tls.h (CALL_THREAD_FCT): Align stack of called
8296 * tst-tsd2.c: Add casts to avoid warnings.
8298 2003-03-30 Ulrich Drepper <drepper@redhat.com>
8300 * descr.h (struct pthread): Move most often used elements to the front.
8302 2003-03-29 Ulrich Drepper <drepper@redhat.com>
8304 * Makefile (libpthread-routines): Add pthread_atfork.
8305 (libpthread-static-only-routines): Add pthread_atfork.
8307 2003-03-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
8309 * sysdeps/sh/tls.h: Include nptl/descr.h after the definition
8311 (INSTALL_DTV): Add parens.
8312 (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
8313 Use passed descr instead of THREAD_SELF.
8314 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S
8315 (__lll_mutex_timedlock_wait): Correct expected value after
8317 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S:
8318 Release lock before waking up the waiters.
8319 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Correct exit
8320 criteria. Reorderstruct passed to cleanup handler. Fix
8321 handling of cancellation and failung pthread_mutex_unlock call.
8322 Use __pthread_enable_asynccancel_2 instead of
8323 __pthread_enable_asynccancel.
8324 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
8325 Return result of lock re-get if it fails.
8326 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Fix wrong argument
8327 for __pthread_cleanup_push.
8328 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Fix
8329 completely broken rwlock implementation.
8330 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
8331 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
8332 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
8333 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
8334 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
8335 * sysdeps/unix/sysv/linux/sh/sem_post.S: Fix error value. Use
8336 versioned_symbol macro.
8337 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Use versioned_symbol macro.
8338 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
8340 2003-03-27 Ulrich Drepper <drepper@redhat.com>
8342 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Don't declare
8343 __timer_helper_thread. Declare __start_helper_thread, __helper_once,
8345 (struct timer): Remove th and bar field.
8346 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Remove
8347 debugging code. Create only one helper thread.
8348 * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Don't kill
8350 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
8351 Renamed. Define statically. Use thread info from siginfo.
8352 (__helper_once): New variable.
8353 (__helper_tid): New variable.
8354 (__reset_helper_control): New function.
8355 (__start_helper_thread): New function.
8357 * pthread_create.c (start_thread): Don't use setjmp inside
8358 __builtin_expect to work around gcc bug.
8360 * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Even if
8361 timer_delete syscall fails, but not with ENOSYS, set
8364 * sysdeps/unix/sysv/linux/timer_settime.c [!__ASSUME_POSIX_TIMERS]
8365 (timer_settime): Fix typo.
8366 * sysdeps/unix/sysv/linux/timer_getoverr.c
8367 [!__ASSUME_POSIX_TIMERS] (timer_getoverrun): Likewise.
8369 2003-03-27 Jakub Jelinek <jakub@redhat.com>
8371 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Fix
8372 offset of cleanupbuf.__prev.
8374 2003-03-26 Jakub Jelinek <jakub@redhat.com>
8376 * sysdeps/unix/sysv/linux/timer_getoverr.c: Fix typo in name
8379 2003-03-26 Ulrich Drepper <drepper@redhat.com>
8381 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): If EVP ==
8382 NULL provide default definition to syscall.
8384 2003-03-25 Roland McGrath <roland@redhat.com>
8386 * sysdeps/pthread/posix-timer.h (TIMER_MAX): Define if not defined.
8387 (timer_id2ptr): Fix typo.
8389 2003-03-25 Ulrich Drepper <drepper@redhat.com>
8391 * pthreadP.h: Define SIGCANCEL and SIGTIMER.
8392 * sysdeps/i386/pthreaddef.h: Remove SIGCANCEL definition.
8393 * sysdeps/ia64/pthreaddef.h: Likewise.
8394 * sysdeps/powerpc/pthreaddef.h: Likewise.
8395 * sysdeps/s390/pthreaddef.h: Likewise.
8396 * sysdeps/sh/pthreaddef.h: Likewise.
8397 * sysdeps/x86_64/pthreaddef.h: Likewise.
8398 * init.c (__pthread_initialize_minimal): Block SIGTIMER.
8399 * sysdeps/pthread/sigaction.c: Also prevent SIGTIMER handler from
8401 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
8402 SIGTIMER is not unblocked.
8403 * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): One more
8405 * sysdeps/unix/sysv/linux/pthread_kill.c: Do not allow SIGTIMER to
8407 * sysdeps/pthread/posix-timer.h (timer_id2ptr, timer_ptr2id): Just
8408 pass pointer through as ID.
8409 * sysdeps/unix/sysv/linux/bits/local_lim.h (TIMER_MAX): Removed.
8410 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: New file.
8411 * sysdeps/unix/sysv/linux/timer_create.c: New file.
8412 * sysdeps/unix/sysv/linux/timer_delete.c: New file.
8413 * sysdeps/unix/sysv/linux/timer_getoverr.c: New file.
8414 * sysdeps/unix/sysv/linux/timer_gettime.c: New file.
8415 * sysdeps/unix/sysv/linux/timer_routines.c: New file.
8416 * sysdeps/unix/sysv/linux/timer_settime.c: New file.
8417 * sysdeps/unix/sysv/linux/ia64/Versions: New file.
8418 * sysdeps/unix/sysv/linux/ia64/timer_create.c: New file.
8419 * sysdeps/unix/sysv/linux/ia64/timer_delete.c: New file.
8420 * sysdeps/unix/sysv/linux/ia64/timer_getoverr.c: New file.
8421 * sysdeps/unix/sysv/linux/ia64/timer_gettime.c: New file.
8422 * sysdeps/unix/sysv/linux/ia64/timer_settime.c: New file.
8423 * sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions: New file.
8424 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_create.c: New file.
8425 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_delete.c: New file.
8426 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_getoverr.c: New file.
8427 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_gettime.c: New file.
8428 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_settime.c: New file.
8429 * sysdeps/unix/sysv/linux/s390/s390-64/Versions: New file.
8430 * sysdeps/unix/sysv/linux/s390/s390-64/timer_create.c: New file.
8431 * sysdeps/unix/sysv/linux/s390/s390-64/timer_delete.c: New file.
8432 * sysdeps/unix/sysv/linux/s390/s390-64/timer_getoverr.c: New file.
8433 * sysdeps/unix/sysv/linux/s390/s390-64/timer_gettime.c: New file.
8434 * sysdeps/unix/sysv/linux/s390/s390-64/timer_settime.c: New file.
8435 * sysdeps/unix/sysv/linux/x86_64/Versions: New file.
8436 * sysdeps/unix/sysv/linux/x86_64/compat-timer.h: New file.
8437 * sysdeps/unix/sysv/linux/x86_64/timer_create.c: New file.
8438 * sysdeps/unix/sysv/linux/x86_64/timer_delete.c: New file.
8439 * sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c: New file.
8440 * sysdeps/unix/sysv/linux/x86_64/timer_gettime.c: New file.
8441 * sysdeps/unix/sysv/linux/x86_64/timer_settime.c: New file.
8443 * pthreadP.h: Remove FRAME_LEFT definition.
8444 * cleanup.c (_pthread_cleanup_push): Don't check for reference to
8445 already left frame. Programs which have this problem are not POSIX
8447 * cleanup_defer.c (_pthread_cleanup_push_defer): Likewise.
8449 2003-03-24 Ulrich Drepper <drepper@redhat.com>
8451 * sysdeps/pthread/tst-timer.c: Check return values of the
8454 2003-03-23 Roland McGrath <roland@redhat.com>
8456 * tst-tls3.c (do_test) [! HAVE___THREAD]: Don't test anything.
8457 * tst-tls3mod.c: Likewise.
8458 * tst-tls1.c: Likewise.
8459 * tst-tls2.c: Likewise.
8461 * tst-mutex5.c (do_test): Unlock before destroy, otherwise we invoke
8464 * tst-join5.c (tf1, tf2): Add a cast.
8466 * Makeconfig (includes): Append -I$(..)nptl to this variable.
8468 * tst-barrier2.c (do_test) [! _POSIX_THREAD_PROCESS_SHARED]:
8469 Don't test anything.
8470 * tst-cond4.c: Likewise.
8471 * tst-cond6.c: Likewise.
8472 * tst-flock2.c: Likewise.
8473 * tst-mutex4.c: Likewise.
8474 * tst-rwlock4.c: Likewise.
8475 * tst-signal1.c: Likewise.
8476 * tst-spin2.c: Likewise.
8477 * tst-cond11.c [! _POSIX_CLOCK_SELECTION]: Likewise.
8479 * tst-mutex4.c: Use test-skeleton.c.
8480 * tst-spin2.c: Likewise.
8481 * tst-sysconf.c: Likewise.
8482 * tst-barrier2.c: Likewise.
8483 * tst-cond4.c: Likewise.
8484 * tst-cond6.c: Likewise.
8485 * tst-rwlock4.c: Likewise.
8486 * tst-unload.c: Likewise.
8487 * tst-flock2.c (do_test): Use return instead of exit.
8489 2003-03-22 Jakub Jelinek <jakub@redhat.com>
8491 * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
8493 2003-03-21 Ulrich Drepper <drepper@redhat.com>
8495 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
8496 (__lll_mutex_trylock): Use atomic_compare_and_exchange_val_acq
8497 instead of __lll_compare_and_swap.
8498 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
8500 Removed definition if __lll_compare_and_swap.
8502 * cancellation.c: Adjust for new form of compare&exchange macros.
8503 * cleanup_defer.c: Likewise.
8505 * libc-cancellation.c: Likewise.
8506 * old_pthread_cond_broadcast.c: Likewise.
8507 * old_pthread_cond_signal.c: Likewise.
8508 * old_pthread_cond_timedwait.c: Likewise.
8509 * old_pthread_cond_wait.c: Likewise.
8510 * pthread_cancel.c: Likewise.
8511 * pthread_create.c: Likewise.
8512 * pthread_detach.c: Likewise.
8513 * pthread_join.c: Likewise.
8514 * pthread_key_delete.c: Likewise.
8515 * pthread_setcancelstate.c: Likewise.
8516 * pthread_setcanceltype.c: Likewise.
8517 * pthread_timedjoin.c: Likewise.
8518 * pthread_tryjoin.c: Likewise.
8519 * sysdeps/pthread/createthread.c: Likewise.
8521 2003-03-20 Ulrich Drepper <drepper@redhat.com>
8523 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Include <atomic.h>.
8524 Remove __lll_add, __lll_dec_if_positive, and __lll_test_and_set
8525 definitions. Replace uses with calls to atomic_* functions.
8526 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
8527 * sysdeps/unix/sysv/linux/lowlevellock.c: Replace __lll_add and
8528 __lll_test_and_set calls with atomic_exchange_and_add and
8529 atomic_exchange calls respectively.
8530 * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
8531 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
8532 * sysdeps/unix/sysv/linux/sem_trywait.c: Likewise.
8533 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
8534 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Likewise.
8535 * sysdeps/unix/sysv/linux/ia64/sem_port.c: Likewise.
8536 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
8538 * allocatestack.c (allocate_stack): Assume atomic_exchange_and_add
8539 returns the old value.
8541 2003-03-20 Martin Schwidefsky <sky@mschwid3.boeblingen.de.ibm.com>
8543 * sysdeps/s390/pthread_spin_lock.c (pthread_spin_lock): Use type
8544 int for variable OLDVAL and correct inline assembler contraint.
8545 * sysdeps/s390/pthread_spin_trylock.c (pthread_spin_trylock): Use
8546 type int for variable OLD.
8548 * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it
8550 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
8551 (SINGLE_THREAD_P): Use global variable __local_multiple_threads
8552 instead of multiple_threads field in the TCB.
8554 2003-03-19 Ulrich Drepper <drepper@redhat.com>
8556 * sysdeps/i386/i686/bits/atomic.h: Removed.
8557 * sysdeps/i386/i586/bits/atomic.h: Removed.
8558 * sysdeps/i386/i486/bits/atomic.h: Removed. Moved to glibc.
8559 * sysdeps/x86_64/bits/atomic.h: Removed. Moved to glibc.
8560 * sysdeps/s390/bits/atomic.h: Removed. Moved to glibc.
8561 * sysdeps/sh/bits/atomic.h: Removed. Moved to glibc.
8562 * sysdeps/ia64/bits/atomic.h: Removed. Moved to glibc.
8563 * sysdeps/powerpc/bits/atomic.h: Removed. Moved to glibc.
8564 * atomic.h: Removed. Moved to glibc.
8566 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Add
8567 support for clock selection.
8569 * sysdeps/pthread/pthread_cond_broadcast.c: Release lock before
8572 2003-03-18 Roland McGrath <roland@redhat.com>
8574 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
8575 Add __lll_rel_instr first. Add memory clobber.
8576 (lll_mutex_unlock): Use __lll_test_and_set.
8577 From Paul Mackerras <paulus@samba.org>.
8579 * sysdeps/powerpc/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define
8581 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
8582 (SINGLE_THREAD_P): Add `header.' prefix.
8583 From Paul Mackerras <paulus@samba.org>.
8585 * Versions (libpthread: GLIBC_2.3.2): Move pthread_tryjoin_np and
8586 pthread_timedjoin_np to ...
8587 (libpthread: GLIBC_2.3.3): ... here.
8588 (libpthread: GLIBC_2.2): Move pthread_barrierattr_getpshared there too.
8590 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
8591 Avoid shadowing VAL variable.
8593 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
8596 2003-03-18 Ulrich Drepper <drepper@redhat.com>
8598 * Makefile (tests): Add tst-cond11.
8599 * tst-cond11.c: New file.
8601 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Reorder
8602 struct passed to cleanup handler to eliminate one more
8604 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8606 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
8607 (pthrad_cond_t): Replace __unused field with __clock.
8609 * sysdeps/pthread/pthread_cond_wait.c: Release condvar lock before
8610 waken all waiters in cleanup handler.
8611 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8612 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8614 * pthread_condattr_getclock.c: New file.
8615 * pthread_condattr_setclock.c: New file.
8616 * sysdeps/pthread/pthread.h: Declare these new functions.
8617 * Versions [GLIBC_2.3.3] (libpthread): Add the new functions.
8618 * Makefile (libpthread-routines): Add the new functions.
8619 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_condattr):
8620 Renamed field to value. Document use of the bits.
8621 * pthread_condattr_getpshared.c: Adjust for struct pthread_condattr
8623 * pthread_condattr_setpshared.c: Likewise.
8624 * pthread_cond_init.c (__pthread_cond_init): Initialized __clock field.
8625 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add cond_clock symbol.
8626 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
8628 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8629 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
8630 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
8631 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
8632 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
8633 Implement clock selection.
8634 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
8635 * pthread-errnos.sym: Add ENOSYS.
8636 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
8637 _POSIX_CLOCK_SELECTION.
8638 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
8640 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Remove
8641 invalid .size directive.
8643 2003-03-17 Roland McGrath <roland@redhat.com>
8645 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
8648 2003-03-17 Ulrich Drepper <drepper@redhat.com>
8650 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Use __builtin_expect.
8651 Use __lll_add instead of spelling it out. Use protected symbol names.
8652 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Use __builtin_expect.
8654 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_compare_and_swap):
8655 Renamed from lll_compare_and_swap. Use new name where necessary.
8656 (__lll_add): Defined.
8657 (__lll_dec_if_positive): Defined.
8658 (__lll_test_and_set): Defined.
8659 * sysdeps/ia64/pthread_spin_init.c: Removed.
8660 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Removed.
8661 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Removed.
8662 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Removed.
8663 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Removed.
8664 * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: Removed.
8665 * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: Removed.
8666 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Removed.
8667 * sysdeps/ia64/bits/atomic.h: Add __builtin_expect where appropriate.
8668 * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
8669 __sync_lock_release_si.
8670 Patch by Jakub Jelinek.
8672 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
8673 Fix timeout handling.
8674 (__lll_timedwait_tid): Likewise.
8675 (lll_unlock_wake_cb): Wake up other waiters if necessary.
8676 Patch by Jakub Jelinek.
8678 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Pretty printing.
8680 2003-03-17 Roland McGrath <roland@redhat.com>
8682 PowerPC port contributed by Paul Mackerras <paulus@samba.org>.
8683 * sysdeps/pthread/pthread_spin_init.c: New file.
8684 * sysdeps/pthread/pthread_spin_unlock.c: New file.
8685 * sysdeps/powerpc/Makefile: New file.
8686 * sysdeps/powerpc/pthread_spin_lock.c: New file.
8687 * sysdeps/powerpc/pthread_spin_trylock.c: New file.
8688 * sysdeps/powerpc/pthreaddef.h: New file.
8689 * sysdeps/powerpc/tcb-offsets.sym: New file.
8690 * sysdeps/powerpc/td_ta_map_lwp2thr.c: New file.
8691 * sysdeps/powerpc/tls.h: New file.
8692 * sysdeps/powerpc/bits/atomic.h: New file.
8693 * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: New file.
8694 * sysdeps/unix/sysv/linux/libc-lowlevellock.c: New file.
8695 * sysdeps/unix/sysv/linux/lowlevellock.c: New file.
8697 * sysdeps/unix/sysv/linux/lowlevelmutex.c: New file.
8698 * sysdeps/unix/sysv/linux/sem_post.c: New file.
8699 * sysdeps/unix/sysv/linux/sem_timedwait.c: New file.
8700 * sysdeps/unix/sysv/linux/sem_trywait.c: New file.
8701 * sysdeps/unix/sysv/linux/sem_wait.c: New file.
8702 * sysdeps/unix/sysv/linux/powerpc/Makefile: New file.
8703 * sysdeps/unix/sysv/linux/powerpc/createthread.c: New file.
8704 * sysdeps/unix/sysv/linux/powerpc/fork.c: New file.
8705 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: New file.
8706 * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: New file.
8707 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: New file.
8708 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: New file.
8709 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: New file.
8710 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
8711 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New file.
8713 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Use __gettimeofday,
8715 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Likewise.
8716 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
8717 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Likewise.
8718 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Likewise.
8719 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
8721 2003-03-17 Ulrich Drepper <drepper@redhat.com>
8723 * sysdeps/pthread/pthread_cond_wait.c: Correct exit criteria.
8724 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
8725 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8726 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8727 Patch by Ewald Snel <ewald@rambo.its.tudelft.nl>.
8729 2003-03-16 Roland McGrath <roland@redhat.com>
8731 * tst-fork4.c: Include <string.h>.
8732 * tst-signal2.c: Likewise.
8733 * tst-mutex5.c (do_test): exit -> return.
8734 * tst-mutex2.c: Include <stdlib.h>.
8736 2003-03-16 Ulrich Drepper <drepper@redhat.com>
8738 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
8739 (__lll_mutex_timedlock_wait): Correct expected value after
8740 spurious wakeup. Otherwise we would never wait again.
8742 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Work around red
8743 zone versus inline asm stupidity. Use correct instructions.
8745 * tst-rwlock6.c: Add some more status output.
8747 2003-03-15 Roland McGrath <roland@redhat.com>
8749 * sysdeps/pthread/configure.in: New file.
8750 * sysdeps/pthread/configure: New file (generated).
8752 2003-03-15 Ulrich Drepper <drepper@redhat.com>
8754 * allocatestack.c (allocate_stack): Store the exact stack size of
8755 user allocated stacks.
8757 2003-03-15 Jakub Jelinek <jakub@redhat.com>
8759 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
8760 (SINGLE_THREAD): Use `header' prefix instead of `header.data'.
8761 * sysdeps/sh/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
8762 * sysdeps/sh/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define.
8763 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
8764 Use `header.' prefix.
8765 * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
8767 2003-03-15 Ulrich Drepper <drepper@redhat.com>
8769 * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Don't use
8770 __builtin_frame_address, use stack pointer.
8772 * sysdeps/unix/sysv/linux/jmp-unwind.c: Use CURRENT_STACK_FRAME
8773 instead of __builtin_frame_pointer.
8775 2003-03-14 Ulrich Drepper <drepper@redhat.com>
8777 * tst-basic1.c (do_test): Add cast to avoid warning.
8778 * tst-basic2.c (do_test): Likewise.
8780 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use correct
8781 amount of stack correction.
8783 * tst-fork4.c: Use test-skeleton.c.
8785 2003-03-14 Roland McGrath <roland@redhat.com>
8787 * init.c: Fix typo "#eli" for "#else".
8789 2003-03-14 Steven Munroe <sjmunroe@us.ibm.com>
8791 * allocatestack.c (__stack_user): Use hidden_data_def.
8792 * pthread_create.c (__pthread_keys): Likewise.
8794 * init.c [__powerpc__] (__NR_set_tid_address): Define it.
8796 2003-03-14 Roland McGrath <roland@redhat.com>
8798 * tst-fork4.c: New file.
8799 * Makefile (tests): Add it.
8801 * descr.h (struct pthread): Move the union out of [!TLS_DTV_AT_TP], so
8802 we always define the padding space.
8803 [!TLS_DTV_AT_TP]: Give tcbhead_t field a name, `header', since GCC
8804 stopped supporting its own extensions fully.
8805 [TLS_MULTIPLE_THREADS_IN_TCB]: Put `multiple_threads' inside a wrapper
8806 struct also called `header', so `header.multiple_threads' is the field
8807 name to use on all machines.
8808 * allocatestack.c (allocate_stack): Use `header.' prefix.
8809 * sysdeps/pthread/createthread.c (create_thread): Likewise.
8810 * pthread_create.c (__pthread_create_2_1): Likewise.
8811 * sysdeps/i386/tls.h (INSTALL_NEW_DTV, THREAD_DTV): Likewise.
8812 (THREAD_SELF): Likewise.
8813 * sysdeps/x86_64/tls.h: Likewise.
8814 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
8815 (SINGLE_THREAD_P): Likewise.
8816 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
8817 (SINGLE_THREAD_P): Likewise.
8818 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
8819 (SINGLE_THREAD_P): Likewise.
8821 * sysdeps/s390/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Use REGS[18]
8824 2003-03-14 Ulrich Drepper <drepper@redhat.com>
8826 * pthread_create.c (start_thread): Use CALL_THREAD_FCT if defined.
8827 * sysdeps/i386/tls.h: Define CALL_THREAD_FCT.
8829 * pthread_create.c (start_thread): setjmp is expected to return 0.
8831 * sysdeps/x86_64/tls.h (THREAD_GETMEM): Mark asms volatile.
8832 (THREAD_GETMEM_NC): Likewise.
8834 2003-03-13 Ulrich Drepper <drepper@redhat.com>
8836 * allocatestack.c (allocate_stack): If MULTI_PAGE_ALIASING is defined
8837 and the size of the stack which must be allocated is a multiple,
8838 allocate one more page.
8839 * sysdeps/i386/i686/Makefile: Don't define COLORING_INCREMENT, but
8840 MULTI_PAGE_ALIASING.
8842 2003-03-13 Roland McGrath <roland@redhat.com>
8844 * pthread_create.c (start_thread): Set EXITING_BIT after the
8845 event-reporting (and destructors), not before.
8847 2003-03-13 Jakub Jelinek <jakub@redhat.com>
8849 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_timed_wait,
8850 lll_futex_wake): Declare register variables as long int instead of
8851 unsigned long int. Patch by Ian Wienand <ianw@gelato.unsw.edu.au>.
8852 Make syscall arguments clobbered by the syscall.
8853 (lll_futex_wait): Define using lll_futex_timed_wait.
8855 * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Cast regs[13]
8858 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Only declare and set
8861 * allocatestack.c (nptl_ncreated): Only declare if
8862 COLORING_INCREMENT != 0.
8864 * pthreadP.h (__pthread_enable_asynccancel_2): New prototype.
8865 (__libc_enable_asynccancel_2): Remove prototype.
8867 * sysdeps/unix/sysv/linux/ia64/fork.c (ARCH_FORK): Swap ptid and
8868 ctid to match kernel.
8870 2003-03-12 Ulrich Drepper <drepper@redhat.com>
8872 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add
8873 libc_multiple_threads.
8874 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Move definition of
8875 __libc_multiple_threads to...
8876 * sysdeps/unix/sysv/linux/libc_multiple_threads.c: ...here. New file.
8878 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Remove unnecessary
8880 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
8881 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
8883 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
8884 (__pthread_once_internal): Define.
8886 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Use shlib-compat.h
8887 macros instead of .symver directly.
8888 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
8889 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
8891 * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Include tcb-offsets.h.
8892 * sysdeps/x86_64/tcb-offsets.sym: New file.
8893 * sysdeps/x86_64/Makefile: New file.
8895 * sysdeps/i386/tcb-offsets.sym: Add SELF.
8896 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use SELF
8897 to access own pthread_t in TCB.
8898 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8900 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8902 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8904 2003-03-12 Roland McGrath <roland@redhat.com>
8906 * pthread-errnos.sym: New file.
8907 * Makefile (gen-as-const-headers): New variable, list that file.
8908 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include generated
8909 header <pthread-errnos.h> instead of defining errno values here.
8910 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
8911 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
8912 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
8913 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8914 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8916 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8918 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
8919 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8920 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
8921 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
8922 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
8923 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
8924 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
8925 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
8926 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8927 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
8928 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
8929 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
8930 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
8931 * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
8932 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
8933 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
8934 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
8935 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
8936 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
8937 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
8938 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
8939 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
8940 * sysdeps/i386/i486/pthread_spin_trylock.S: Likewise.
8941 * sysdeps/x86_64/pthread_spin_trylock.S: Likewise.
8942 * sysdeps/sh/pthread_spin_trylock.S: Likewise.
8943 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
8944 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
8946 * sysdeps/unix/sysv/linux/fork.c: Add an assert to check that
8947 CLONE_CHILD_SETTID worked.
8949 2003-03-12 Ulrich Drepper <drepper@redhat.com>
8951 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: New
8953 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S: New
8956 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
8957 (pthread_cond_t): Add padding.
8959 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: New file.
8960 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: New file.
8961 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: New file.
8963 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
8964 (__pthread_rwlock_timedwrlock): Add missing opcode suffix.
8965 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
8966 (__pthread_rwlock_timedrdlock): Likewise.
8967 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
8968 (__pthread_rwlock_wrlock): Likewise.
8969 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
8970 (__pthread_rwlock_rdlock): Likewise.
8972 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: New file.
8974 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Return
8975 result of lock re-get if it fails.
8977 2003-03-11 Ulrich Drepper <drepper@redhat.com>
8979 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Fix asm syntax.
8980 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
8981 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
8982 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
8983 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8984 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
8985 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
8986 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
8987 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
8988 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
8990 * sysdeps/x86_64/tls.h (THREAD_SELF, THREAD_GETMEM, THREAD_GETMEM_NC,
8991 THREAD_SETMEM, THREAD_SETMEM_NC): Correct asm syntax.
8993 * allocatestack.c [! TLS_MULTIPLE_THREADS_IN_TCB] (allocate_stack):
8994 Initialize *__libc_multiple_threads_ptr not __libc_multiple_threads.
8995 * sysdeps/pthread/createthread.c [! TLS_MULTIPLE_THREADS_IN_TCB]
8996 (create_thread): Likewise.
8997 Define __pthread_multiple_threads and __libc_multiple_threads_ptr.
8998 * init.c (__pthread_initialize_minimal_internal): Initialize
8999 __libc_multiple_threads_ptr if necessary.
9000 * pthreadP.h: Adjust prototype for __libc_pthread_init. Declare
9001 __pthread_multiple_threads and __libc_multiple_threads_ptr.
9002 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Define
9003 __libc_multiple_threads.
9004 (__libc_pthread_init): Return pointer to __libc_pthread_init if
9007 * sysdeps/i386/tls.h (THREAD_SETMEM): Fix one-byte variant.
9008 (THREAD_SETMEM_NC): Likewise.
9010 * sysdeps/x86_64/pthread_spin_trylock.c: Removed.
9011 * sysdeps/x86_64/pthread_spin_trylock.S: New file.
9012 * sysdeps/x86_64/pthread_spin_unlock.c: Removed.
9013 * sysdeps/x86_64/pthread_spin_unlock.S: New file.
9015 * sysdeps/i386/i486/pthread_spin_trylock.S (pthread_spin_trylock):
9016 Eliminate one entire instruction.
9018 * cancellation.c (__pthread_enable_asynccancel_2): New function.
9019 * pthreadP.h: Declare __pthread_enable_asynccancel_2.
9020 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
9021 (__pthread_cond_timedwait): Use __pthread_enable_asynccancel_2
9022 instead of __pthread_enable_asynccancel.
9023 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
9024 (__pthread_cond_wait): Likewise.
9025 * sysdeps/pthread/pthread_cond_timedwait.c
9026 (__pthread_cond_timedwait): Likewise.
9027 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
9029 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
9030 (__condvar_cleanup): Wake up all waiters in case we got signaled
9031 after being woken up but before disabling asynchronous
9033 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
9034 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
9035 (__condvar_cleanup): Likewise.
9037 * init.c (__NR_set_tid_address): If already defined, don't redefine.
9038 Make it an error if architecture has no #if case. Add x86-64.
9040 * sysdeps/unix/sysv/linux/x86_64/Makefile: Add flags for
9041 pt-initfini.s generation.
9043 * sysdeps/x86_64/tls.h: Include <asm/prctl.h>.
9044 (TLS_INIT_TP): Fix typo.
9046 2003-03-11 Jakub Jelinek <jakub@redhat.com>
9048 * sysdeps/ia64/bits/atomic.h (atomic_exchange_and_add): Swap 2nd and
9049 3rd argument of __arch_compare_and_exchange_{32,64}_val_acq.
9051 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Include semaphore.h.
9052 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
9053 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Likewise.
9054 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Likewise.
9055 * sysdeps/unix/sysv/linux/s390/sem_post.c: Likewise.
9056 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
9057 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
9058 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
9060 2003-03-11 Ulrich Drepper <drepper@redhat.com>
9062 * sysdeps/pthread/pthread_cond_timedwait.c
9063 (__pthread_cond_timedwait): Return the result of the final
9064 locking. If it succeeds, the regular function return value.
9066 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait):
9067 Return result of the final locking.
9068 * version.c (__nptl_main): Work around problems with the strange
9069 INTERNAL_SYSCALL macro on ppc32.
9070 * init.c (__pthread_initialize_minimal_internal): Unblock
9071 SIGCANCEL in case the parent blocked it.
9072 Reported by Paul Mackerras <paulus@samba.org>.
9074 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: New file.
9075 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: New file.
9076 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: New file.
9078 2003-03-11 Jakub Jelinek <jakub@redhat.com>
9080 * sysdeps/pthread/pthread_cond_timedwait.c
9081 (__pthread_cond_timedwait): Unlock and fail if
9082 __pthread_mutex_unlock_internal failed.
9084 * sysdeps/pthread/createthread.c (ARCH_CLONE): Define if not defined.
9085 (create_thread): Only assert PD->tcb != NULL under [TLS_TCB_AT_TP].
9087 * allocatestack.c (ALLOCATE_STACK_PARMS): New macro.
9088 [NEED_SEPARATE_REGISTER_STACK] (STACK_VARIABLES,
9089 STACK_VARIABLES_ARGS, STACK_VARIABLES_PARMS, ALLOCATE_STACK_PARMS,
9090 ALLOCATE_STACK): New macros.
9091 (TLS_TPADJ): New macro.
9092 (get_cached_stack, queue_stack, __deallocate_stack): Use TLS_TPADJ.
9093 (allocate_stack): Handle TLS_DTV_AT_TP and
9094 NEED_SEPARATE_REGISTER_STACK. Use TLS_TPADJ.
9095 * pthread_create.c (__pthread_create_2_1) [! TLS_TCB_AT_TP]:
9097 * init.c [__ia64__] (__NR_set_tid_address): Define.
9099 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: New file.
9100 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: New file.
9101 * sysdeps/unix/sysv/linux/ia64/fork.c: New file.
9102 * sysdeps/unix/sysv/linux/ia64/createthread.c: New file.
9103 * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: New file.
9104 * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: New file.
9105 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: New file.
9106 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: New file.
9107 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: New file.
9108 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
9109 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: New file.
9110 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: New file.
9111 * sysdeps/unix/sysv/linux/ia64/sem_post.c: New file.
9112 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: New file.
9113 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: New file.
9114 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: New file.
9115 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
9116 * sysdeps/ia64/bits/atomic.h: New file.
9117 * sysdeps/ia64/Makefile: New file.
9118 * sysdeps/ia64/pthread_spin_init.c: New file.
9119 * sysdeps/ia64/pthread_spin_lock.c: New file.
9120 * sysdeps/ia64/pthread_spin_trylock.c: New file.
9121 * sysdeps/ia64/pthread_spin_unlock.c: New file.
9122 * sysdeps/ia64/pthreaddef.h: New file.
9123 * sysdeps/ia64/tcb-offsets.sym: New file.
9124 * sysdeps/ia64/td_ta_map_lwp2thr.c: New file.
9125 * sysdeps/ia64/tls.h: New file.
9127 * sysdeps/s390/pthreaddef.h (__exit_thread_inline): Pass 1 argument
9128 to syscall instead of no arguments.
9130 2003-03-10 Ulrich Drepper <drepper@redhat.com>
9132 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: New file.
9133 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: New file.
9134 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: New file.
9135 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: New file.
9137 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Fix error value in
9140 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: New file
9142 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
9143 lowlevelbarrier.sym.
9144 * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: New file.
9145 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S:
9146 Include lowlevelbarrier.h and don't define offsets locally.
9147 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Likewise.
9149 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
9150 (__lll_mutex_lock_wait): Reverse order of first two parameters.
9151 (__lll_mutex_timedlock_wait): Likewise.
9152 (lll_mutex_lock): Adjust asm for that.
9153 (lll_mutex_timedlock): Likewise. Mark cx, cc, r10 as clobbered.
9154 (lll_lock): Adjust asm for operand order change.
9155 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: New file.
9156 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: New file.
9158 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_lock_wait):
9159 Reverse order of parameters.
9160 (__lll_timedwait_tid): Remove regparms attribute.
9161 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: New file.
9162 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: New file.
9164 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
9165 (__lll_timedwait_tid): Remove one unnecessary instruction.
9167 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Define
9168 __lll_mutex_timedlock_wait only for NOT_IN_libc.
9169 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Include
9172 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
9173 lll_unlock_wake_cb, __lll_wait_tid, and __lll_timedwait_tid only
9175 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Include
9178 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Don't define
9179 LOCK is already defined. Don't define __lll_mutex_timedlock_wait
9181 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Only
9182 define LOCK here (if UP is not defined). The actual code is in
9185 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Don't define
9186 LOCK is already defined. Don't define lll_unlock_wake_cb and
9187 __lll_timedwait_tid for libc.so.
9188 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Only
9189 define LOCK here (if UP is not defined). The actual code is in
9192 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Not needed anymore.
9193 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: Likewise.
9194 * sysdeps/unix/sysv/linux/s390/sem_post.c: Include lowlevellock.h
9195 instead of lowlevelsem.h.
9196 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
9197 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
9198 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
9200 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
9202 * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: New file.
9203 * sysdeps/unix/sysv/linux/i386/lowlevelrwlock.h: Removed.
9204 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: Removed.
9206 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_trylock): Fix
9208 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_trylock): Undo
9211 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: New file.
9213 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove declaration
9214 of __libc_locking_needed.
9215 (lll_trylock): Initialize %eax to zero.
9217 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Update
9218 pthread_cond_t definition.
9220 2003-03-10 Roland McGrath <roland@redhat.com>
9222 * sysdeps/unix/sysv/linux/lowlevelcond.sym: New file.
9223 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add it.
9224 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: File removed.
9225 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: Likewise.
9226 * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: Likewise.
9228 * allocatestack.c (allocate_stack) [!TLS_MULTIPLE_THREADS_IN_TCB]:
9229 Instead of setting PD->multiple_threads, set globals
9230 __pthread_multiple_threads and __libc_multiple_threads.
9231 * sysdeps/pthread/createthread.c (create_thread): Likewise.
9232 * sysdeps/i386/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it.
9233 * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Likewise.
9235 * descr.h (struct pthread): Conditionalize first member on
9236 [!TLS_DTV_AT_TP]. Replace the `header' member with an anonymous union
9237 containing an anonymous tcbhead_t. Move `list' member out.
9238 [TLS_MULTIPLE_THREADS_IN_TCB]: Define a `multiple_threads' member.
9239 * allocatestack.c: Remove use of `header.data.' prefix.
9240 * pthread_create.c: Likewise.
9241 * init.c (__pthread_initialize_minimal_internal): Likewise.
9242 * sysdeps/pthread/createthread.c (create_thread): Likewise.
9243 * sysdeps/i386/tls.h (INSTALL_DTV): Add parens.
9244 (THREAD_SELF, THREAD_DTV, INSTALL_NEW_DTV): No `header.data.' prefix.
9245 * sysdeps/x86_64/tls.h: Likewise.
9246 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
9247 (SINGLE_THREAD_P): Likewise.
9248 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
9249 (SINGLE_THREAD_P): Likewise.
9250 * sysdeps/i386/tls.h (tcbhead_t): Remove `list' member.
9251 * sysdeps/s390/tls.h (tcbhead_t): Likewise.
9253 2003-03-09 Ulrich Drepper <drepper@redhat.com>
9255 * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: New file.
9257 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
9258 * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
9260 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix many
9261 leftovers from the ia32 code.
9263 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Remove unneccessary
9265 (clear_once_control): Don't load %esi.
9267 * sysdeps/x86_64/tls.h: Remove all traces of segment descriptor
9270 * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
9272 * sysdeps/unix/sysv/linux/s390/createthread.c: Moved to...
9273 * sysdeps/unix/sysv/linux/createthread.c: ...here.
9275 * Makefile (tests): Add tst-cond10.
9276 * tst-cond10.c: New file.
9278 2003-03-08 Ulrich Drepper <drepper@redhat.com>
9280 * tst-tls2.c (do_test): Add TEMP_FAILURE_RETRY around sem_wait call.
9281 * tst-signal3.c (do_test): Likewise.
9282 * tst-sem5.c (do_test): Likewise.
9283 * tst-kill6.c (do_test): Likewise.
9284 * tst-tls3.c (do_test): Likewise. Include <errno.h>.
9286 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use add/sub instead
9288 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
9289 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise
9290 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
9291 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
9292 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
9293 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
9294 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
9296 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
9298 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
9299 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
9300 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9301 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
9302 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
9303 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
9304 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
9305 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
9307 * allocatestack.c (allocate_stack): If mprotect() fails free the
9310 2003-03-07 Ulrich Drepper <drepper@redhat.com>
9312 * sysdeps/i386/i486/bits/atomic.h: Fix a few unused definitions.
9314 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove all trace of
9315 lll_wake_tid. This was used only to work around kernel limits in
9317 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
9318 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Likewise.
9319 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
9320 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
9322 * init.c (__static_tls_align_m1): Renamed from __static_tls_align.
9323 (__pthread_initialize_minimal_internal): Change initialization of
9324 __static_tls_align_m1 appropriately.
9325 * pthreadP.h (__static_tls_align_m1): Renamed from
9327 * allocatestack.c (allocate_stack): Use __static_tls_align_m1
9328 instead of __static_tls_align-1.
9330 2003-03-04 Ulrich Drepper <drepper@redhat.com>
9332 * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
9334 * pthread_create.c: Define __pthread_keys using nocommon
9335 attribute, not by placing it explicitly in bss.
9336 Remove DEFINE_DEALLOC definition. Not needed anymore.
9338 * allocatestack.c: Define ARCH_MAP_FLAGS if not already defined.
9339 Use it in mmap call to allocate stacks.
9341 * sysdeps/pthread/createthread.c (create_thread): Fix comment.
9343 * pthread_create.c (start_thread): Use THREAD_SETMEM to store
9344 result of the thread function.
9346 2003-03-03 Ulrich Drepper <drepper@redhat.com>
9348 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: Removed. The generic
9349 version is just fine.
9351 * sysdeps/unix/sysv/linux/libc_pthread_init.c
9352 (__pthread_child_handler): Renamed from pthread_child_handler,
9353 exported, and marked hidden. Change all users.
9354 * sysdeps/unix/sysv/linux/register-atfork.c (free_mem): Do not
9355 free __pthread_child_handler from child list.
9357 2003-03-03 Martin Schwidefsky <schwidefsky@de.ibm.com>
9359 * atomic.h (atomic_exchange_and_add): Return newval, not oldval.
9361 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
9362 Fix handling of cancellation and failing pthread_mutex_unlock call.
9363 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
9364 (__pthread_cond_wait): Likewise.
9366 * sysdeps/pthread/pthread_rwlock_timedrdlock.c
9367 (pthread_rwlock_timedrdlock): Fix clobber of result variable by
9368 lll_futex_timed_wait call.
9369 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
9370 (pthread_rwlock_timedwrlock): Likewise.
9372 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
9373 Don't define lll_unlock_wake_cb and ___lll_timedwait_tid in libc.so.
9374 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Remove XXX comments.
9376 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Fix
9377 check of lll_futex_wake return value.
9379 2003-03-03 Roland McGrath <roland@redhat.com>
9381 * forward.c: Fix typo in __pthread_attr_init_2_0 compat_symbol decl.
9383 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
9384 Argument to ptr___pthread_cleanup_upto is __jmp_buf, not jmp_buf.
9385 * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
9387 2003-03-02 Ulrich Drepper <drepper@redhat.com>
9389 * sysdeps/pthread/timer_create.c (timer_create): Return correct
9390 error for CPU clocks.
9392 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
9393 _POSIX_MONOTONIC_CLOCK.
9394 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
9396 * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
9399 2003-03-01 Ulrich Drepper <drepper@redhat.com>
9401 * descr.h (struct pthread): Move cleanup field to the front.
9403 2003-03-01 Roland McGrath <roland@redhat.com>
9405 * sem_open.c (sem_open): Braino fix.
9407 2003-03-01 Ulrich Drepper <drepper@redhat.com>
9409 * sysdeps/i386/tcb-offsets.sym: Add CLEANUP and CLEANUP_PREV.
9410 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Inline
9411 __pthread_cleanup_pop functionality.
9412 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9414 * descr.h (struct pthread): Move tid field to the front now that
9417 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S
9418 (__lll_mutex_timedlock_wait): Remove.
9419 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
9420 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
9421 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
9422 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
9423 (lll_unlock_wake_cb): Don't save and restore %esi.
9424 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
9426 (__lll_timedwait_tid): Add alignment.
9427 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
9428 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
9430 (__lll_timedwait_tid): Removed.
9431 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
9432 (__pthread_cond_broadcast): Don't save, load, and restore %esi.
9433 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
9434 (pthread_barrier_wait): Don't save, load, and restore %esi for
9436 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
9437 (__pthread_cond_signal): Don't save, load, and restore %esi.
9438 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
9439 (__pthread_rwlock_unlock): Don't save, load, and restore %esi.
9440 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
9441 Don't save, load, and restore %esi.
9443 2003-02-27 Ulrich Drepper <drepper@redhat.com>
9445 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
9446 Release lock before waking up the waiters.
9448 * tst-exit1.c (do_test): Don't start more than one thread in parallel.
9450 * tst-rwlock9.c (writer_thread): Correct adding TIMEOUT.
9451 (reader_thread): Likewise.
9453 * sysdeps/pthread/pthread_rwlock_unlock.c
9454 (__pthread_rwlock_unlock): Release internal lock early. Don't try
9455 to wake up readers if there are none.
9457 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
9458 Release internal lock before wake threads.
9460 2003-02-26 Ulrich Drepper <drepper@redhat.com>
9462 * Makefile (tests): Add tst-rwlock10 and tst-rwlock11.
9463 * tst-rwlock8.c: Initialize lock with INIT. Allow INIT to be
9465 * tst-rwlock9.c: Likewise.
9466 * tst-rwlock10.c: New file.
9467 * tst-rwlock11.c: New file.
9469 * Makefile (tests): Add tst-dlsym1.
9470 * tst-dlsym1.c: New file.
9472 * init.c (__pthread_initialize_minimal_internal): Set
9473 GL(dl_error_catch_tsd) to __libc_dl_error_tsd.
9474 * Versions (libc:GLIBC_PRIVATE): Export __libc_dl_error_tsd.
9476 2003-02-24 Ulrich Drepper <drepper@redhat.com>
9478 * sem_open.c (sem_open): Fix handling of O_CREAT without O_EXCL.
9480 * tst-cond2.c: Fix sychronization with child.
9482 * tst-rwlock8.c (reader_thread): Remove unused variable.
9484 * Makefile: Add rules to build and run tst-tls3.
9485 * tst-tls3.c: New file.
9486 * tst-tls3mod.c: New file.
9488 * Makefile (tests): Add tst-rwlock8 and tst-rwlock9.
9489 * tst-rwlock8.c: New file.
9490 * tst-rwlock9.c: New file.
9491 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Fix
9492 complete broken rwlock implementation.
9493 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
9495 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
9497 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
9498 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
9499 * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
9500 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
9501 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
9502 * sysdeps/pthread/pthread_rwlock_unlock.c: Likewise.
9503 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
9505 2003-02-23 Roland McGrath <roland@redhat.com>
9507 * Makefile (nptl-version): Change regexp so case sensitivity is ok.
9509 2003-02-23 Ulrich Drepper <drepper@redhat.com>
9511 * Makefile (tests): Add tst-context1.
9512 * tst-context1.c: New file.
9514 * Makefile (tests): Add tst-tls1 and tst-tls2.
9515 * tst-tls1.c: New file.
9516 * tst-tls2.c: New file.
9518 * libc-cancellation.c (__libc_enable_asynccancel): Correct test
9521 * pthread_create.c (start_thread): Set EXITING_BIT early.
9523 * sysdeps/i386/tls.h (THREAD_GETMEM): Mark asm as volatile.
9524 (THREAD_GETMEM_NC): Likewise.
9526 2003-02-22 Ulrich Drepper <drepper@redhat.com>
9528 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Shave
9529 off 3 more bytes by using offset-less instructions when possible.
9531 * Makefile: Add dependency for $(objpfx)version.d.
9533 * eintr.c (eintr_source): Add unnecessary return but the compiler
9536 * tst-kill3.c: Include <unistd.h>.
9538 2003-02-21 Roland McGrath <roland@redhat.com>
9540 * pthread_create.c (start_thread): Call __libc_thread_freeres.
9542 2003-02-21 Ulrich Drepper <drepper@redhat.com>
9544 * Makefile (tests): Add tst-eintr1.
9545 (distribute): Add eintr.c.
9546 * tst-eintr1.c: New file.
9547 * eintr.c: New file.
9549 * pthread_cancel.c (pthread_cancel): Use tkill directly.
9551 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill):
9552 Disallow sending SIGCANCEL.
9554 * Makefile (tests): Remove tst-basic7. Add tst-kill1, tst-kill2,
9555 tst-kill3, tst-kill4, tst-kill5, tst-kill6.
9556 * tst-kill1.c: New file.
9557 * tst-kill2.c: New file.
9558 * tst-kill3.c: New file.
9559 * tst-kill5.c: New file.
9560 * tst-kill6.c: New file.
9561 * tst-basic7.c: Renamed to...
9562 * tst-kill4.c: ...this.
9564 2003-02-21 Roland McGrath <roland@redhat.com>
9566 * Makefile (install-lib-ldscripts): New variable.
9568 2003-02-21 Ulrich Drepper <drepper@redhat.com>
9570 * pthreadP.h: Define INVALID_TD_P and INVALID_NOT_TERMINATED_TD_P.
9571 * pthread_cancel.c: Use INVALID_TD_P.
9572 * pthread_detach.c: Likewise.
9573 * pthread_getschedparam.c: Likewise.
9574 * pthread_setschedparam.c: Likewise.
9575 * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
9576 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
9577 * pthread_join.c: Use INVALID_NOT_TERMINATED_TD_P.
9578 * pthread_timedjoin.c: Likewise.
9580 * tst-basic7.c: Include <signal.h>.
9582 * pthread_join.c (pthread_join): Limited checking for invalid
9584 * pthread_timedjoin.c (pthread_timedjoin_np): Likewise.
9586 2003-02-20 Ulrich Drepper <drepper@redhat.com>
9588 * pthread_create.c (deallocate_tsd): Reset found_nonzero at the
9589 beginning of the loop. Clear the entire first block of TSD.
9590 * Makefile (tests): Add tst-key4.
9591 * tst-key4.c: New file.
9593 2003-02-18 Ulrich Drepper <drepper@redhat.com>
9595 * Makefile (tests): Add tst-basic7.
9596 * tst-basic7.c: New file.
9598 * pthread_create.c (deallocate_tsd): Mark as internal_function.
9599 Add some more __builtin_expect.
9601 * pthreadP.h: Define dummy version of DEBUGGING_P.
9603 2003-02-17 Ulrich Drepper <drepper@redhat.com>
9605 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remnove
9606 _POSIX_THREAD_PRIORITY_SCHEDULING.
9607 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
9608 _XOPEN_REALTIME_THREADS.
9609 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
9611 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): The
9612 kernel returns EINVAL for PID <= 0, work around it.
9614 * Makefile (tests): Add tst-signal5.
9615 * tst-signal5.c: New file.
9617 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
9620 * tst-cancel1.c (tf): Block all signals.
9622 * Makefile (tests): Add tst-basic6.
9623 * tst-basic6.c: New file.
9625 * tst-basic1.c: Add test for process ID.
9627 * Makefile (tests): Add tst-cancel10.
9628 * tst-cancel10.c: New file.
9630 * Makefile (tests): Add tst-signal4.
9631 * tst-signal4.c: New file.
9633 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use
9634 __sigismember instead of sigismember. Add __builtin_expect.
9636 2003-02-16 Ulrich Drepper <drepper@redhat.com>
9638 * tst-attr1.c (do_test): Add tests for pthread_setcanceltype,
9639 pthread_setcancelstate, and pthread_rwlock_setpshared.
9641 * tst-cancel7.c (do_test): Make sure the pid file exists before
9642 canceling the thread.
9644 * tst-rwlock6.c: More pthread_rwlock_timedwrlock and
9645 pthread_rwlock_timedrdlock tests.
9646 * tst-rwlock7.c: More pthread_rwlock_timedwrlock tests.
9647 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
9648 Check for invalid tv_nsec field.
9649 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
9652 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Protect
9653 recursive mutex of overflow.
9655 * tst-attr1.c (do_test): Add test for pthread_mutexattr_setpshared.
9657 * libc-cancellation.c (__libc_enable_asynccancel): Rewrite to avoid
9658 going into an endless loop.
9659 * Makefile (tests): Add tst-cancel9.
9660 * tst-cancel9.c: New file.
9662 * pthread_cancel.c (pthread_cancel): Use the result of __pthread_kill.
9664 2003-02-15 Ulrich Drepper <drepper@redhat.com>
9666 * tst-mutex5.c (do_test): Add more timedlock tests.
9668 * tst-mutex2.c: Tests of trylock and unlock with ERROR mutexes.
9669 * tst-mutex3.c (do_test): Add tests for trylock with RECURSIVE mutexes.
9671 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
9672 use INLINE_SYSCALL. Error number is returned, not -1.
9674 * pthreadP.h: Mark declarations of __find_in_stack_list, __free_tcb,
9675 and __deallocate_stack with internal_function.
9676 * pthread_create.c: Adjust definitions appropriately.
9677 * allocatestack.c: Likewise.
9679 * pthread_join.c: Add one more __builtin_expect.
9680 * pthread_timedjoin.c: Likewise.
9682 * pthread_getspecific.c (__pthread_getspecific): Clear data->data
9683 not data of sequence number does not match.
9684 Add one __builtin_expect.
9686 * Makefile (tests): Add tst-clock1.
9687 * tst-clock1.c: New file.
9689 * pthread_setconcurrency.c (pthread_setconcurrency): Fail for
9691 * Makefile (tests): Add tst-basic5.
9692 * tst-basic5.c: New file.
9694 2003-02-14 Ulrich Drepper <drepper@redhat.com>
9696 * Makefile (tests): Add tst-basic4.
9697 * tst-basic4.c: New file.
9699 * pthreadP.h: Add declaraction for __nptl_nthreads.
9700 * pthread_create.c: Define __nptl_nthreads
9701 (start_thread): Increment __nptl_nthreads at beginning. Decrement
9702 after thread is done. If then zero, call exit(0).
9703 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
9704 Add ptr_nthreads. Define HAVE_PTR_NTHREADS.
9705 * init.c (pthread_functions): Initialize ptr_nthreads.
9706 * allocatestack.c (nptl_nthreads): Remove definition and all uses.
9707 (__reclaim_stacks): Decrement __nptl_nthreads.
9708 * sysdeps/pthread/Makefile [$(subdir)==csu] (CFLAGS-libc-start.c):
9710 * Makefile (tests): Add tst-basic3.
9711 * tst-basic3.c: New file.
9713 * descr.h: Define CANCELING_BIT and CANCELING_BITMASK. Introduce
9714 after CANCELTYPE_BIT, move the other bits up. Update CANCEL_RESTMASK.
9715 * init.c (sigcancel_handler): Also set CANCELING_BITMASK bit in newval.
9716 * pthread_cancel.c (pthread_cancel): Likewise. Also set CANCELING_BIT
9717 if asynchronous canceling is enabled.
9718 * pthread_join.c (pthread_join): When recognizing circular joins,
9719 take into account the other thread might be already canceled.
9720 * Makefile (tests): Add tst-join5.
9721 * tst-join5.c: New file.
9723 * Makefile (tests): Add tst-join4.
9724 * tst-join4.c: New file.
9726 2003-02-13 Ulrich Drepper <drepper@redhat.com>
9728 * tst-cond4.c (main): Add test of pthread_attr_getpshared.
9730 2003-02-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
9732 * sysdeps/s390/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM,
9733 THREAD_SETMEM_NC): Use passed descr instead of THREAD_SELF.
9734 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind): Avoid
9736 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Include <sys/time.h>
9738 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Return
9739 error if lll_futex_wake failed.
9741 2003-02-13 Ulrich Drepper <drepper@redhat.com>
9743 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Fix
9744 handling of cancellation and failung pthread_mutex_unlock call.
9745 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9746 * Makefile (tests): Add tst-cond8 and tst-cond9.
9747 * tst-cond8.c: New file.
9748 * tst-cond9.c: New file.
9750 * tst-cond7.c (do_test): Unlock the mutex before canceling the thread.
9752 * sysdeps/pthread/pthread.h: Add missing initializers. Protect
9753 non-standard initializers with __USE_GNU.
9755 * Makefile (tests): Add tst-cleanup3.
9756 * tst-cleanup3.c: New file.
9758 2003-02-12 Ulrich Drepper <drepper@redhat.com>
9760 * Makefile (tests): Add tst-attr1 and tst-attr2.
9761 * tst-attr1.c: New file.
9762 * tst-attr2.c: New file.
9764 * Makefile: Add rules to build and run tst-atfork2 test.
9765 * tst-atfork2.c: New file.
9766 * tst-atfork2mod.c: New file.
9768 * sysdeps/unix/sysv/linux/unregister-atfork.c
9769 (__unregister_atfork): Free the memory allocated for the handlers
9770 after removing them from the lists.
9772 * sysdeps/unix/sysv/linux/register-atfork.c: Define memeory
9775 * tst-atfork1.c (do_test): Wait for the child we forked.
9776 Report error in child.
9778 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Fix comment.
9780 * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
9782 2003-02-10 Ulrich Drepper <drepper@redhat.com>
9784 * Makefile (tests): Add tst-cancel8.
9785 * tst-cancel8.c: New file.
9787 * sysdeps/unix/sysv/linux/i386/pthread_once.S (clear_once_control): Fix
9788 clearing of control variable.
9789 * Makefile (tests): Add tst-once3 and tst-once4.
9790 * tst-once3.c: New file.
9791 * tst-once4.c: New file.
9793 2003-02-08 kaz Kojima <kkojima@rr.iij4u.or.jp>
9795 * sysdeps/sh/Makefile: New file.
9796 * sysdeps/sh/bits/atomic.h: New file.
9797 * sysdeps/sh/pthread_spin_init.c: New file.
9798 * sysdeps/sh/pthread_spin_lock.c: New file.
9799 * sysdeps/sh/pthread_spin_trylock.S: New file.
9800 * sysdeps/sh/pthread_spin_unlock.S: New file.
9801 * sysdeps/sh/pthreaddef.h: New file.
9802 * sysdeps/sh/tcb-offsets.sym: New file.
9803 * sysdeps/sh/td_ta_map_lwp2thr.c: New file.
9804 * sysdeps/sh/tls.h: New file.
9805 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: New file.
9806 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: New file.
9807 * sysdeps/unix/sysv/linux/sh/createthread.c: New file.
9808 * sysdeps/unix/sysv/linux/sh/fork.c: New file.
9809 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: New file.
9810 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: New file.
9811 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h: New file.
9812 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: New file.
9813 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: New file.
9814 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: New file.
9815 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: New file.
9816 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: New file.
9817 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
9818 * sysdeps/unix/sysv/linux/sh/pt-vfork.S: New file.
9819 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: New file.
9820 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: New file.
9821 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: New file.
9822 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: New file.
9823 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: New file.
9824 * sysdeps/unix/sysv/linux/sh/pthread_once.S: New file.
9825 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: New file.
9826 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: New file.
9827 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: New file.
9828 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: New file.
9829 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: New file.
9830 * sysdeps/unix/sysv/linux/sh/sem_post.S: New file.
9831 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: New file.
9832 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: New file.
9833 * sysdeps/unix/sysv/linux/sh/sem_wait.S: New file.
9834 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
9836 2003-02-08 Ulrich Drepper <drepper@redhat.com>
9838 * tst-cond2.c: Rearrange code to not rely on behavior undefined
9841 * tst-basic2.c (do_test): Lock mutex before creating the thread.
9843 2003-02-07 Ulrich Drepper <drepper@redhat.com>
9845 * sysdeps/x86_64/tls.h: Remove unnecessary macros, left over from x86.
9846 (TLS_GET_FS): New #define.
9847 (TLS_SET_FS): New #define.
9848 Correct value of __NR_set_thread_area.
9850 * sysdeps/x86_64/td_ta_map_lwp2thr.c: New file.
9852 2003-02-06 Ulrich Drepper <drepper@redhat.com>
9854 * Makefile (tests): Add tst-popen1.
9855 * tst-popen1.c: New file.
9857 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Remove wrong
9858 but inactive generalization.
9859 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9860 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
9861 Minor optimization, remove one instruction.
9862 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
9864 2003-02-04 Martin Schwidefsky <schwidefsky@de.ibm.com>
9866 * sysdeps/unix/sysv/linux/s390/fork.c: Correct order of parameters.
9868 2003-01-31 Martin Schwidefsky <schwidefsky@de.ibm.com>
9870 * init.c (__NR_set_tid_address): Add #ifdef for s390.
9871 * sysdeps/pthread/pthread_barrier_wait.c: New file.
9872 * sysdeps/pthread/pthread_cond_broadcast.c: New file.
9873 * sysdeps/pthread/pthread_cond_signal.c: New file.
9874 * sysdeps/pthread/pthread_cond_timedwait.c: New file.
9875 * sysdeps/pthread/pthread_cond_wait.c: New file.
9876 * sysdeps/pthread/pthread_rwlock_rdlock.c: New file.
9877 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: New file.
9878 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: New file.
9879 * sysdeps/pthread/pthread_rwlock_unlock.c: New file.
9880 * sysdeps/pthread/pthread_rwlock_wrlock.c: New file.
9881 * sysdeps/s390/Makefile: New file.
9882 * sysdeps/s390/bits/atomic.h: New file.
9883 * sysdeps/s390/pthread_spin_init.c: New file.
9884 * sysdeps/s390/pthread_spin_lock.c: New file.
9885 * sysdeps/s390/pthread_spin_trylock.c: New file.
9886 * sysdeps/s390/pthread_spin_unlock.c: New file.
9887 * sysdeps/s390/pthreaddef.h: New file.
9888 * sysdeps/s390/tcb-offsets.sym: New file.
9889 * sysdeps/s390/td_ta_map_lwp2thr.c: New file.
9890 * sysdeps/s390/tls.h: New file.
9891 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: New file.
9892 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: New file.
9893 * sysdeps/unix/sysv/linux/s390/createthread.c: New file.
9894 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: New file.
9895 * sysdeps/unix/sysv/linux/s390/fork.c: New file.
9896 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: New file.
9897 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
9898 * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: New file.
9899 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: New file.
9900 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: New file.
9901 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: New file.
9902 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: New file.
9903 * sysdeps/unix/sysv/linux/s390/pthread_once.c: New file.
9904 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: New file.
9905 * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: New file.
9906 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
9907 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
9908 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: New file.
9909 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
9910 * sysdeps/unix/sysv/linux/s390/sem_post.c: New file.
9911 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: New file.
9912 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
9913 * sysdeps/unix/sysv/linux/s390/sem_wait.c: New file.
9915 2003-02-04 Ulrich Drepper <drepper@redhat.com>
9917 * atomic.h: Add a couple more default implementations.
9918 (atomic_compare_and_exchange_acq): Use
9919 __arch_compare_and_exchange_32_acq in return value definition. It
9921 (atomic_bit_set): Renamed from atomic_set_bit.
9922 Add missing atomic_ prefixes.
9924 * sysdeps/pthread/bits/libc-lock.h (__libc_once): In case no
9925 thread library is available, use correct value to mark initialized
9928 2003-02-03 Ulrich Drepper <drepper@redhat.com>
9930 * allocatestack.c (allocate_stack): Use __getpagesize instead of
9931 __sysconf to determine pagesize.
9933 * pthread_create.c: Include <atomic.h>.
9934 * allocatestack.c (allocate_stack): Implement coloring of the
9935 allocated stack memory. Rename pagesize to pagesize_m1. It's the
9936 size minus one. Adjust users.
9937 * sysdeps/i386/i686/Makefile: New file.
9939 2003-02-02 Ulrich Drepper <drepper@redhat.com>
9941 * allocatestack.c: Improve comment throughout the file.
9943 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
9944 (__lll_lock_wait): Add branch prediction.
9945 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
9946 (__lll_lock_wait): Likewise.
9947 (lll_unlock_wake_cb): Removed.
9949 2003-01-31 Ulrich Drepper <drepper@redhat.com>
9951 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Remove
9952 _POSIX_THREAD_PRIORITY_SCHEDULING.
9954 2003-01-30 Jakub Jelinek <jakub@redhat.com>
9956 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
9957 Fix return type of ptr___pthread_getspecific.
9959 2003-01-29 Ulrich Drepper <drepper@redhat.com>
9961 * Makefile (tests): Add tst-umask1.
9962 (tst-umask1-ARGS): Define.
9963 * tst-umask1.c: New file.
9965 2003-01-28 Ulrich Drepper <drepper@redhat.com>
9967 * Makefile (libpthread-routines): Remove lowlevelrwlock. Add
9968 pthread_rwlock_rdlock, pthread_rwlock_timedrdlock,
9969 pthread_rwlock_wrlock, pthread_rwlock_timedwrlock, and
9970 pthread_rwlock_unlock.
9971 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Removed
9972 * sysdeps/unix/sysv/linux/i386/i586/lowlevelrwlock.S: Removed
9973 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Removed
9974 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: New file.
9975 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
9977 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: New file.
9978 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
9980 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: New file.
9981 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_rdlock.S: New file.
9982 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedrdlock.S:
9984 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_wrlock.S: New file.
9985 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedwrlock.S:
9987 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_unlock.S: New file.
9988 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_rdlock.S: New file.
9989 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedrdlock.S:
9991 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_wrlock.S: New file.
9992 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedwrlock.S:
9994 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_unlock.S: New file.
9996 * Makefile (libpthread-routines): Remove lowlevelcond and
9997 lowlevelsem. Add sem_wait, sem_trywait, sem_timedwait, sem_post,
9998 pthread_cond_wait, pthread_cond_timedwait, pthread_cond_signal,
9999 and pthread_cond_broadcast.
10000 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Removed
10001 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Removed
10002 * sysdeps/unix/sysv/linux/i386/i586/lowlevelsem.S: Removed
10003 * sysdeps/unix/sysv/linux/i386/i586/lowlevelcond.S: Removed
10004 * sysdeps/unix/sysv/linux/i386/i686/lowlevelsem.S: Removed
10005 * sysdeps/unix/sysv/linux/i386/i686/lowlevelcond.S: Removed
10006 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: New file.
10007 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: New file.
10008 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: New file.
10009 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: New file.
10010 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: New file.
10011 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: New file.
10012 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: New file.
10013 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: New file.
10014 * sysdeps/unix/sysv/linux/i386/i586/sem_wait.S: New file.
10015 * sysdeps/unix/sysv/linux/i386/i586/sem_trywait.S: New file.
10016 * sysdeps/unix/sysv/linux/i386/i586/sem_timedwait.S: New file.
10017 * sysdeps/unix/sysv/linux/i386/i586/sem_post.S: New file.
10018 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_wait.S: New file.
10019 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_timedwait.S: New file.
10020 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_signal.S: New file.
10021 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_broadcast.S: New file.
10022 * sysdeps/unix/sysv/linux/i386/i686/sem_wait.S: New file.
10023 * sysdeps/unix/sysv/linux/i386/i686/sem_trywait.S: New file.
10024 * sysdeps/unix/sysv/linux/i386/i686/sem_timedwait.S: New file.
10025 * sysdeps/unix/sysv/linux/i386/i686/sem_post.S: New file.
10026 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_wait.S: New file.
10027 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S: New file.
10028 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_signal.S: New file.
10029 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_broadcast.S: New file.
10030 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: New file.
10032 * sysdeps/unix/sysv/linux/i386/createthread.c: Define
10033 PREPARE_CREATE and TLS_VALUE with x86-specific bits. All the rest
10034 of the code is moved to ...
10035 * sysdeps/pthread/createthread.c: ...here. New file.
10037 2003-01-27 Ulrich Drepper <drepper@redhat.com>
10039 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S
10040 (__new_sem_post): Clear %eax before returning.
10041 Reported by MAEDA Naoaki <maeda.naoaki@jp.fujitsu.com>.
10043 * Makefile (tests): Add tst-cleanup2.
10044 * tst-cleanup2.c: New file.
10046 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
10047 Interpret first parameter correctly.
10049 2003-01-17 Ulrich Drepper <drepper@redhat.com>
10051 * Makefile (headers): Add bits/semaphore.h.
10053 2003-01-16 Jakub Jelinek <jakub@redhat.com>
10055 * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize _head->sysinfo even
10058 2003-01-14 Ulrich Drepper <drepper@redhat.com>
10060 * sem_open.c (sem_open): Return SEM_FAILED if existing semaphore
10061 must be used and mapping failed.
10062 Reported by Luke Elliott <luke.elliott@activfinancial.com>.
10064 * Makefile (CFLAGS-pthread_self.os): Define this, not
10065 CFLAGS-pthread_self.c.
10067 2003-01-13 Ulrich Drepper <drepper@redhat.com>
10069 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Don't export
10070 lll_unlock_wake_cb.
10072 * Makefile (libpthread-routines): Add version. Add rules to build
10073 version.os and banner.h.
10074 * version.c: New file.
10076 2003-01-13 Jakub Jelinek <jakub@redhat.com>
10078 * pthread_mutex_lock.c (__pthread_mutex_lock_internal): Make
10079 the alias unconditional.
10080 * pthread_mutex_unlock.c (__pthread_mutex_unlock_internal): Likewise.
10082 2003-01-13 Ulrich Drepper <drepper@redhat.com>
10084 * Makefile (CFLAGS-pthread_self.c): New definition.
10086 2003-01-06 Jakub Jelinek <jakub@redhat.com>
10088 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Add
10089 INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
10090 * sysdeps/unix/sysv/linux/raise.c (raise): Likewise.
10091 * init.c (__pthread_initialize_minimal_internal): Likewise.
10093 2003-01-07 Jakub Jelinek <jakub@redhat.com>
10095 * pthreadP.h (__pthread_cond_timedwait): Add prototype.
10097 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
10098 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
10099 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
10100 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
10101 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
10102 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
10104 2003-01-06 Jakub Jelinek <jakub@redhat.com>
10106 * pthreadP.h (LIBC_CANCEL_HANDLED): Define.
10107 * pt-system.c (LIBC_CANCEL_HANDLED): Add.
10108 * tst-cancel-wrappers.sh: Remove all exceptions.
10110 2003-01-05 Ulrich Drepper <drepper@redhat.com>
10112 * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
10113 features. Reported by Marijn Ros <marijn@mad.scientist.com>.
10115 * sysdeps/unix/sysv/linux/jmp-unwind.c: Include <pthread-functions.h>.
10116 Use __libc_pthread_functions array if SHARED.
10118 * pthreadP.h: Move pthread_cond_2_0_t definition to...
10119 * sysdeps/unix/sysv/linux/internaltypes.h: ...here.
10121 * sysdeps/pthread/bits/libc-lock.h (__libc_ptf_call): New #define.
10122 (__libc_rwlock_rdlock, __libc_rwlock_wrlock, __libc_rwlock_unlock,
10123 __libc_key_create, __libc_getspecific, __libc_setspecific): Use
10124 __libc_ptf_call instead of __libc_maybe_call.
10125 (PTF): New #define.
10126 (__libc_cleanup_region_start): Wrap function name with PTF call.
10127 (__libc_cleanup_region_end): Likewise.
10128 (__libc_cleanup_end): Likewise.
10130 * pthread_getspecific.c: Add __pthread_getspecific_internal alias.
10131 * pthread_setspecific.c: Add __pthread_setspecific_internal alias.
10132 * pthread_key_create.c: Add __pthread_key_create_internal alias.
10133 * pthreadP.h: Add prototypes.
10135 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Add
10136 __pthread_rwlock_rdlock, __pthread_rwlock_wrlock, and
10137 __pthread_rwlock_unlock aliases.
10138 * pthreadP.h: Add prototypes for new aliases.
10140 * pthreadP.h (struct pthead_functions): Moved to...
10141 * sysdeps/pthread/pthread-functions.h: ...here. New file.
10142 * init.c (pthread_functions): Add initializers for new elements.
10144 * cleanup_defer.c: Add __pthread_cleanup_push_defer and
10145 __pthread_cleanup_pop_restore aliases.
10146 * pthreadP.h: Add prototypes.
10148 * cleanup.c: Rename _GI_pthread_cleanup_push to __pthread_cleanup_push
10149 and _GI_pthread_cleanup_pop to __pthread_cleanup_pop.
10150 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Adjust caller.
10151 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
10152 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
10153 * pthreadP.h: Adjust prototypes and callers.
10155 2003-01-04 Ulrich Drepper <drepper@redhat.com>
10157 * Makefile (tests): Add tst-cancel7.
10158 (tst-cancel7-ARGS): New variable.
10159 * tst-cancel7.c: New file.
10161 * old_pthread_cond_broadcast.c: Optimize initialization a bit to work
10162 around gcc defficiencies.
10163 * old_pthread_cond_signal.c: Likewise.
10164 * old_pthread_cond_timedwait.c: Likewise.
10165 * old_pthread_cond_wait.c: Likewise.
10167 * pthreadP.h (pthread_cond_2_0_t): Remove unneeded lock element.
10169 2003-01-03 Ulrich Drepper <drepper@redhat.com>
10171 * Makefile (tests): Add tst-cond7.
10172 * tst-cond7.c: New file.
10174 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
10175 (condvar_cleanup): Get condvar address from the right place.
10177 * atomic.h: Correct definitions of atomic_full_barrier,
10178 atomic_read_barrier, atomic_write_barrier.
10180 * old_pthread_cond_broadcast.c: Make memory allocate and initialization
10182 * old_pthread_cond_signal.c: Likewise.
10183 * old_pthread_cond_timedwait.c: Likewise.
10184 * old_pthread_cond_wait.c: Likewise.
10186 2003-01-03 Jakub Jelinek <jakub@redhat.com>
10188 * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
10190 2003-01-03 Ulrich Drepper <drepper@redhat.com>
10192 * pthreadP.h (pthread_cond_2_0_t): New type.
10193 (struct pthread_functions): Use new type for 2.0 condvar callbacks.
10194 Use new type for the 2.0 condvar function prototypes.
10195 * forward.c: Use pthread_cond_2_0_t for 2.0 condvar functions.
10196 * old_pthread_cond_init.c: Use pthread_cond_2_0_t for condvar
10198 * old_pthread_cond_destroy.c: Likewise.
10199 * old_pthread_cond_broadcast.c: Likewise. Lock appropriately.
10200 * old_pthread_cond_signal.c: Likewise.
10201 * old_pthread_cond_timedwait.c: Likewise.
10202 * old_pthread_cond_wait.c: Likewise.
10204 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
10205 (__pthread_cond_wait): Don't save cancellation mode and seq value
10208 * herrno.c (__h_errno_location): Don't define as weak.
10210 2003-01-02 Jakub Jelinek <jakub@redhat.com>
10212 * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
10213 pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
10214 and pthread_cond_wait.
10215 * old_pthread_cond_broadcast.c (__old_pthread_cond_broadcast):
10217 (__pthread_cond_broadcast_2_0): ... this.
10218 * old_pthread_cond_destroy.c (__old_pthread_cond_destroy):
10220 (__pthread_cond_destroy_2_0): ... this.
10221 * old_pthread_cond_init.c (__old_pthread_cond_init):
10223 (__pthread_cond_init_2_0): ... this.
10224 * old_pthread_cond_signal.c (__old_pthread_cond_signal):
10226 (__pthread_cond_signal_2_0): ... this.
10227 * old_pthread_cond_wait.c (__old_pthread_cond_wait):
10229 (__pthread_cond_wait_2_0): ... this.
10230 * pthread_cond_destroy.c: Include shlib-compat.h.
10231 (pthread_cond_destroy): Change strong_alias into versioned_symbol.
10232 * pthread_cond_init.c: Include shlib-compat.h.
10233 (pthread_cond_init): Change strong_alias into versioned_symbol.
10234 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_cond_*
10235 fields to ptr___pthread_cond_* and add ptr___pthread_cond_*_2_0
10237 (__pthread_cond_broadcast_2_0, __pthread_cond_destroy_2_0,
10238 __pthread_cond_init_2_0, __pthread_cond_signal_2_0,
10239 __pthread_cond_wait_2_0): New prototypes.
10240 (__old_pthread_cond_broadcast, __old_pthread_cond_destroy,
10241 __old_pthread_cond_init, __old_pthread_cond_signal,
10242 __old_pthread_cond_wait): Removed.
10243 * init.c: Include shlib-compat.h.
10244 (pthread_functions): Guard ptr___pthread_attr_init_2_0
10245 initialization with SHLIB_COMPAT (GLIBC_2_0, GLIBC_2_1).
10246 Rename ptr_pthread_cond_* to ptr___pthread_cond_*, initialize
10247 ptr___pthread_cond_*_2_0 fields.
10248 * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
10249 pthread_cond_*@GLIBC_2.0 compatibility symbols.
10251 * sysdeps/pthread/sigaction.c (SIGCANCEL): Only define if
10252 LIBC_SIGACTION was not yet defined.
10253 [!defined LIBC_SIGACTION]: Define LIBC_SIGACTION, #include self.
10254 [!defined LIBC_SIGACTION] (__sigaction): New function and
10256 [!defined LIBC_SIGACTION] (sigaction): New weak_alias.
10257 [defined LIBC_SIGACTION]: #include_next <sigaction.c>.
10259 2003-01-02 Jakub Jelinek <jakub@redhat.com>
10261 * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
10263 2003-01-02 Ulrich Drepper <drepper@redhat.com>
10265 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
10266 New, larger type definition.
10267 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: New condvar
10269 * Versions [libpthread]: Add definitions for new pthread_cond_*
10270 interfaces for version GLIBC_2.3.2.
10271 * pthread_cond_init.c: Update initialization for new type definition.
10272 * Makefile (libpthread-routines): Remove pthread_cond_wait,
10273 pthread_cond_timedwait, pthread_cond_signal, and
10274 pthread_cond_broadcast. Add old_pthread_cond_init,
10275 old_pthread_cond_destroy, old_pthread_cond_wait,
10276 old_pthread_cond_timedwait, old_pthread_cond_signal, and
10277 old_pthread_cond_broadcast.
10278 * old_pthread_cond_broadcast.c: New file.
10279 * old_pthread_cond_destroy.c: New file.
10280 * old_pthread_cond_init.c: New file.
10281 * old_pthread_cond_signal.c: New file.
10282 * old_pthread_cond_timedwait.c: New file.
10283 * old_pthread_cond_wait.c: New file.
10284 * pthreadP.h: Add prototypes for the compatibility interfaces.
10286 * pthread_cond_destroy.c: Don't include <errno.h>.
10288 2003-01-01 Ulrich Drepper <drepper@redhat.com>
10290 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Avoid
10291 unnecessary zero offset when addressing MUTEX.
10293 2002-12-31 Ulrich Drepper <drepper@redhat.com>
10295 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
10297 * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
10298 for __register_atfork.
10300 2002-12-31 Jakub Jelinek <jakub@redhat.com>
10302 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use __ASSEMBLER__
10303 instead of ASSEMBLER test macro.
10305 * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
10306 __libc_current_sigrtmax): Add libc_hidden_def.
10308 * sysdeps/pthread/list.h: Remove assert.h include.
10310 2002-12-31 Ulrich Drepper <drepper@redhat.com>
10312 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Use
10313 __pthread_initialize_minimal_internal not
10314 __pthread_initialize_minimal.
10316 2002-12-30 Ulrich Drepper <drepper@redhat.com>
10318 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Mark
10319 __pthread_initialize_minimal as hidden.
10321 * init.c (__pthread_initialize_minimal_internal): Don't mark as
10324 2002-12-31 Jakub Jelinek <jakub@redhat.com>
10326 * Makefile ($(inst_libdir)/libpthread.so): Depend on
10327 $(common-objpfx)format.lds, include that into the output script.
10329 (extra-B-pthread.so): Change linuxthreads/ into nptl/.
10331 2002-12-28 Andreas Jaeger <aj@suse.de>
10333 * sysdeps/unix/sysv/linux/xstatconv.c (xstat_conv): Adjust for
10334 nsec resolution changes.
10335 (xstat64_conv): Likewise.
10336 (xstat32_conv): Likewise.
10337 * sysdeps/unix/sysv/linux/kernel_stat.h: Add nsec resolution for
10338 struct kernel_stat.
10339 * sysdeps/unix/sysv/linux/bits/stat.h: Add nsec resolution for
10340 structs stat and stat64.
10341 * time/time.h (__timespec_defined): Define for __USE_MISC.
10342 * io/sys/stat.h [__USE_MISC]: Define __need_timespec for struct stat.
10344 2002-12-30 Jakub Jelinek <jakub@redhat.com>
10346 * forward.c (FORWARD2): Renamed from FORWARD3. Remove unused export
10348 (pthread_attr_init_2_0, pthread_attr_init_2_1): Use FORWARD macro.
10349 (pthread_exit): Use strong_alias to avoid warnings.
10350 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_exit
10351 and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
10352 ptr___pthread_attr_init_2_*.
10353 * init.c (pthread_functions): Adjust.
10355 2002-12-29 Ulrich Drepper <drepper@redhat.com>
10357 * forward.c: Make all functions available by default again. It
10358 caused too much trouble.
10360 * pt-siglongjmp.c: Removed.
10362 2002-12-28 Jakub Jelinek <jakub@redhat.com>
10364 * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
10365 (SYSINFO_OFFSET, MULTIPLE_THREADS_OFFSET): Remove.
10366 * sysdeps/i386/Makefile: New file.
10367 * sysdeps/i386/tcb-offsets.sym: New file.
10368 * sysdeps/pthread/tcb-offsets.h: New file.
10369 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
10370 Remove MULTIPLE_THREADS_OFFSET and SYSINFO_OFFSET checks.
10372 * sysdeps/unix/sysv/linux/Versions [libc] (GLIBC_PRIVATE): Move
10373 __register_atfork...
10374 (GLIBC_2.3.2): ...here.
10376 2002-12-28 Ulrich Drepper <drepper@redhat.com>
10378 * sysdeps/pthread/pthread.h: Mark pthread_attr_getstackaddr and
10379 pthread_attr_setstackaddr with __attribute_deprecated__.
10381 2002-12-27 Jakub Jelinek <jakub@redhat.com>
10383 * pt-system.c (system): Remove cancellation handling.
10384 * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
10385 cancellation routines.
10387 2002-12-28 Ulrich Drepper <drepper@redhat.com>
10389 * descr.h: Include <dl-sysdep.h>.
10390 (struct pthread): Move header.data.list to the back of the struct.
10391 * sysdeps/i386/tls.h (tcbhead_t): Move list to the back of the struct.
10392 (MULTIPLE_THREADS_OFFSET): Adjust offset.
10393 (SYSINFO_OFFSEET): Likewise.
10395 2002-12-27 Jakub Jelinek <jakub@redhat.com>
10397 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h (USE_DL_SYSINFO):
10399 (DL_SYSINFO_DEFAULT): Cast to uintptr_t to avoid warnings.
10400 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h (NEED_DL_SYSINFO,
10401 DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION): Define.
10402 (USE_DL_SYSINFO): Undef.
10404 2002-12-22 Jakub Jelinek <jakub@redhat.com>
10406 * Makefile (tests-reverse): Use $(objpfx)../libc.so instead of
10407 $(common-objpfx)libc.so.
10408 * tst-cancel4.c (tf_write, tf_writev): Increase buf sizes so that
10409 it is bigger than pipe buffer size even on arches with bigger
10411 (tf_usleep): Cast usleep argument to useconds_t to avoid warnings.
10413 2002-12-25 Ulrich Drepper <drepper@redhat.com>
10415 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Implement
10416 correct errno access for case that USE___THREAD is not defined.
10418 2002-12-24 Ulrich Drepper <drepper@redhat.com>
10420 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Add missing #endif.
10421 Patch by Marijn Ros <marijn@mad.scientist.com>.
10423 2002-12-22 Roland McGrath <roland@redhat.com>
10425 * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
10427 2002-12-20 Ulrich Drepper <drepper@redhat.com>
10429 * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_inexpensive): Define.
10431 2002-12-19 Ulrich Drepper <drepper@redhat.com>
10433 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Don't define
10434 NEED_DL_SYSINFO since no processor < i686 had the sysenter opcode.
10435 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: New file.
10437 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Use ENTER_KERNEL instead
10439 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
10440 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Likewise.
10441 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Likewise.
10442 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
10443 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
10444 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Likewise.
10445 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Likewise.
10446 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
10448 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add support for using
10450 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
10452 * sysdeps/i386/tls.h: Unconditionally include <dl-sysdep.h>.
10454 * allocatestack.c (allocate_stack) [NEED_DL_SYSINFO]: Set sysinfo
10456 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Check
10457 that sysinfo is properly initialized.
10458 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define RTLD_PRIVATE_ERRNO
10459 to 1 only for ld.so.
10461 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
10462 RTLD_CORRECT_DYNAMIC_WEAK.
10464 2002-12-19 Jakub Jelinek <jakub@redhat.com>
10466 * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
10467 Use return 0 as 6th argument to FORWARD4.
10468 * pthread_equal.c: Include pthreadP.h instead of pthread.h.
10470 2002-12-18 Ulrich Drepper <drepper@redhat.com>
10472 * descr.h (struct pthread) [NEED_DL_SYSINFO]: Add sysinfo member.
10473 * sysdeps/i386/tls.h (tcbhead_t): Add sysinfo member.
10474 Define SYSINFO_OFFSEET if NEED_DL_SYSINFO is defined.
10475 (INIT_SYSINFO): New #define.
10476 (TLS_TP_INIT): Use INIT_SYSINFO.
10477 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
10478 At test to make sure SYSINFO_OFFSET value is correct.
10479 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
10481 2002-12-18 Jakub Jelinek <jakub@redhat.com>
10483 * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
10484 * sysdeps/unix/sysv/linux/raise.c (gsignal): Add weak alias to raise.
10485 * Versions [libc: GLIBC_2.0]: Add pthread_attr_init.
10486 [libpthread: GLIBC_2.1]: Remove __pthread_rwlock_init,
10487 __pthread_rwlock_destroy, __pthread_rwlock_rdlock,
10488 __pthread_rwlock_wrlock, __pthread_rwlock_unlock,
10489 __pthread_rwlock_tryrdlock and __pthread_rwlock_trywrlock.
10491 2002-12-18 Ulrich Drepper <drepper@redhat.com>
10493 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use ENTER_KERNEL
10494 macro instead of using int $0x80 directly.
10496 * sysdeps/pthread/bits/stdio-lock.h: New file.
10497 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: New file.
10498 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: New file.
10499 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: New file.
10500 * Makefile (routines): Add libc-lowlevelmutex.
10502 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Remove
10503 __i686.get_pc_thunk.dx.
10505 2002-12-17 Jakub Jelinek <jakub@redhat.com>
10507 * Makefile (libpthread-shared-only-routines): Add pt-allocrtsig.
10508 (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
10509 ($(objpfx)tst-cancel-wrappers.out): New rule.
10510 * tst-cancel-wrappers.sh: New test.
10511 * tst-locale1.c: Include signal.h.
10512 (uselocale): Test static linking of __libc_current_sigrt*.
10514 2002-12-17 Ulrich Drepper <drepper@redhat.com>
10516 * Makefile (tests): Add tst-cancel6.
10517 * tst-cancel6.c: New file
10519 2002-12-17 Jakub Jelinek <jakub@redhat.com>
10521 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
10522 Define meaningfully for assembler as well.
10523 * pthreadP.h (struct pthread_functions): Remove
10524 ptr_pthread_attr_init field. Add ptr_pthread_attr_init_2_0
10525 and ptr_pthread_attr_init_2_1 fields.
10526 * init.c (pthread_functions): Initialize ptr_pthread_attr_init_2_0
10527 and ptr_pthread_attr_init_2_1 instead of ptr_pthread_attr_init.
10528 * forward.c (FORWARD4): Renamed from FORWARD3. Add export argument.
10529 (FORWARD3): Define using FORWARD4.
10530 (pthread_attr_init): Provide both @GLIBC_2.0 and @@GLIBC_2.1
10532 * pt-system.c: Remove duplicate stdlib.h include.
10534 2002-12-16 Ulrich Drepper <drepper@redhat.com>
10536 * sem_init.c: Define sem_init@GLIBC_2.0.
10537 * sem_destroy.c: Define sem_destroy@GLIBC_2.0.
10538 * sem_getvalue.c: Define sem_getvalue@GLIBC_2.0.
10540 * flockfile.c: Moved to...
10541 * sysdeps/pthread/flockfile.c: ...here. New file.
10542 * funlockfile.c: Moved to...
10543 * sysdeps/pthread/funlockfile.c: ...here. New file.
10544 * ftrylockfile.c: Moved to...
10545 * sysdeps/pthread/ftrylockfile.c: ...here. New file.
10547 2002-12-16 Jakub Jelinek <jakub@redhat.com>
10549 * libc-cancellation.c: Guard both function with
10550 #if !defined NOT_IN_libc.
10551 * Makefile (libpthread-routines): Use ptw-, not pt- prefix for the
10552 automatically provided pthread wrappers.
10553 * pthreadP.h (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define to
10554 CANCEL_* if IS_IN_libpthread and to dummy versions if not in libc
10556 * pt-open.c: Removed.
10557 * pt-fcntl.c: Removed.
10558 * pt-fsync.c: Removed.
10559 * pt-lseek.c: Removed.
10560 * pt-msgrcv.c: Removed.
10561 * pt-msgsnd.c: Removed.
10562 * pt-msync.c: Removed.
10563 * pt-nanosleep.c: Removed.
10564 * pt-open64.c: Removed.
10565 * pt-pause.c: Removed.
10566 * pt-pread.c: Removed.
10567 * pt-pread64.c: Removed.
10568 * pt-pwrite.c: Removed.
10569 * pt-pwrite64.c: Removed.
10570 * pt-read.c: Removed.
10571 * pt-recv.c: Removed.
10572 * pt-recvfrom.c: Removed.
10573 * pt-recvmsg.c: Removed.
10574 * pt-send.c: Removed.
10575 * pt-sendto.c: Removed.
10576 * pt-sigtimedwait.c: Removed.
10577 * pt-sigwait.c: Removed.
10578 * pt-wait.c: Removed.
10579 * pt-waitpid.c: Removed.
10580 * pt-write.c: Removed.
10581 * pt-accept.c: Removed.
10582 * pt-close.c: Removed.
10583 * pt-connect.c: Removed.
10584 * pt-lseek64.c: Removed.
10585 * pt-sendmsg.c: Removed.
10586 * pt-tcdrain.c: Removed.
10588 2002-12-15 Ulrich Drepper <drepper@redhat.com>
10590 * init.c (__pthread_initialize_minimal_internal): Renamed from
10591 __pthread_initialize_minimal. Make old name an alias. This
10592 converts a normal relocation into a relative relocation.
10594 * pt-fcntl.c (__fcntl): Use fcntl64 syscall, not fcntl.
10596 * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
10597 readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
10598 * Makefile (libpthread-routines): Remove pt-creat, pt-poll,
10599 pt-pselect, pt-readv, pt-select, pt-sigpause, pt-sigsuspend,
10600 pt-sigwaitinfo, pt-waitid, and pt-writev.
10601 * pt-creat.c: Removed.
10602 * pt-poll.c: Removed.
10603 * pt-pselect.c: Removed.
10604 * pt-readv.c: Removed.
10605 * pt-select.c: Removed.
10606 * pt-sigpause.c: Removed.
10607 * pt-sigsuspend.c: Removed.
10608 * pt-sigwaitinfo.c: Removed.
10609 * pt-waitid.c: Removed.
10610 * pt-writev.c: Removed.
10612 * init.c (pthread_functions): New variable.
10613 (__pthread_initialize_minimal): Pass pointer to pthread_functions
10614 (or NULL) to __libc_pthread_init.
10615 * forward.c: Rewrite to use __libc:pthread_functions array to get
10616 function addresses.
10617 * sysdeps/unix/sysv/linux/fork.h: Remove __libc_pthread_init
10619 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
10620 Take new parameter. Copy content of variable pointed to by it
10621 to __libc_pthread_init.
10623 * pthreadP.h (struct pthread_functions): New type.
10624 (__libc_pthread_init): Declare.
10626 * pthread_attr_destroy.c: Add namespace protected alias.
10627 * pthread_attr_getdetachstate.c: Likewise.
10628 * pthread_attr_getinheritsched.c: Likewise.
10629 * pthread_attr_getschedparam.c: Likewise.
10630 * pthread_attr_getschedpolicy.c: Likewise.
10631 * pthread_attr_getscope.c: Likewise.
10632 * pthread_attr_setdetachstate.c: Likewise.
10633 * pthread_attr_setinheritsched.c: Likewise.
10634 * pthread_attr_setschedparam.c: Likewise.
10635 * pthread_attr_setschedpolicy.c: Likewise.
10636 * pthread_attr_setscope.c: Likewise.
10637 * pthread_cond_broadcast.c: Likewise.
10638 * pthread_cond_destroy.c: Likewise.
10639 * pthread_cond_init.c: Likewise.
10640 * pthread_cond_signal.c: Likewise.
10641 * pthread_cond_wait.c: Likewise.
10642 * pthread_condattr_destroy.c: Likewise.
10643 * pthread_condattr_init.c: Likewise.
10644 * pthread_equal.c: Likewise.
10645 * pthread_exit.c: Likewise.
10646 * pthread_getschedparam.c: Likewise.
10647 * pthread_self.c: Likewise.
10648 * pthread_setcancelstate.c: Likewise.
10649 * pthread_setschedparam.c: Likewise.
10650 * pthread_mutex_destroy.c: Likewise.
10651 * pthread_mutex_init.c: Likewise.
10652 * pthreadP.h: Add prototypes for the aliases.
10654 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Set
10655 multiple_threads member in correct TCB to 1.
10657 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define
10658 SINGLE_THREAD_P. If in libc or libpthread examine multiple_thread
10659 member of thread decriptor, otherwise return unconditionally 1.
10661 2002-12-14 Ulrich Drepper <drepper@redhat.com>
10663 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Changes folded into the
10664 regular Linux version. Remove file.
10665 * sysdeps/unix/sysv/linux/connect.S: Likewise. Remove file.
10666 * sysdeps/unix/sysv/linux/llseek.c: Likewise. Remove file.
10667 * sysdeps/unix/sysv/linux/msgrcv.c: Likewise. Remove file.
10668 * sysdeps/unix/sysv/linux/msgsnd.c: Likewise. Remove file.
10669 * sysdeps/unix/sysv/linux/open64.c: Likewise. Remove file.
10670 * sysdeps/unix/sysv/linux/poll.c: Likewise. Remove file.
10671 * sysdeps/unix/sysv/linux/pread.c: Likewise. Remove file.
10672 * sysdeps/unix/sysv/linux/pread64.c: Likewise. Remove file.
10673 * sysdeps/unix/sysv/linux/pselect.c: Likewise. Remove file.
10674 * sysdeps/unix/sysv/linux/pwrite.c: Likewise. Remove file.
10675 * sysdeps/unix/sysv/linux/pwrite64.c: Likewise. Remove file.
10676 * sysdeps/unix/sysv/linux/readv.c: Likewise. Remove file.
10677 * sysdeps/unix/sysv/linux/recv.S: Likewise. Remove file.
10678 * sysdeps/unix/sysv/linux/recvfrom.S: Likewise. Remove file.
10679 * sysdeps/unix/sysv/linux/recvmsg.S: Likewise. Remove file.
10680 * sysdeps/unix/sysv/linux/send.S: Likewise. Remove file.
10681 * sysdeps/unix/sysv/linux/sendmsg.S: Likewise. Remove file.
10682 * sysdeps/unix/sysv/linux/sendto.S: Likewise. Remove file.
10683 * sysdeps/unix/sysv/linux/sigpause.c: Likewise. Remove file.
10684 * sysdeps/unix/sysv/linux/sigsuspend.c: Likewise. Remove file.
10685 * sysdeps/unix/sysv/linux/sigtimedwait.c: Likewise. Remove file.
10686 * sysdeps/unix/sysv/linux/sigwait.c: Likewise. Remove file.
10687 * sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise. Remove file.
10688 * sysdeps/unix/sysv/linux/system.c: Likewise. Remove file.
10689 * sysdeps/unix/sysv/linux/tcdrain.c: Likewise. Remove file.
10690 * sysdeps/unix/sysv/linux/wait.c: Likewise. Remove file.
10691 * sysdeps/unix/sysv/linux/waitid.c: Likewise. Remove file.
10692 * sysdeps/unix/sysv/linux/waitpid.c: Likewise. Remove file.
10693 * sysdeps/unix/sysv/linux/writev.c: Likewise. Remove file.
10694 * sysdeps/unix/sysv/linux/i386/fcntl.c: Likewise. Remove file.
10696 2002-12-14 Jakub Jelinek <jakub@redhat.com>
10698 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
10699 * sysdeps/unix/sysv/linux/open.c: Removed.
10700 * sysdeps/unix/sysv/linux/fsync.c: Removed.
10701 * sysdeps/unix/sysv/linux/lseek.c: Removed.
10702 * sysdeps/unix/sysv/linux/msync.c: Removed.
10703 * sysdeps/unix/sysv/linux/read.c: Removed.
10704 * sysdeps/unix/sysv/linux/close.c: Removed.
10705 * sysdeps/unix/sysv/linux/creat.c: Removed.
10706 * sysdeps/unix/sysv/linux/nanosleep.c: Removed.
10707 * sysdeps/unix/sysv/linux/pause.c: Removed.
10708 * sysdeps/unix/sysv/linux/select.c: Removed.
10709 * sysdeps/unix/sysv/linux/write.c: Removed.
10711 2002-12-14 Ulrich Drepper <drepper@redhat.com>
10713 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Check multiple_threads
10714 element in TCB to see whether locking is needed.
10716 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Check that
10717 MULTIPLE_THREADS_OFFSET value is correct.
10719 * sysdeps/unix/sysv/linux/close.c: New file.
10720 * sysdeps/unix/sysv/linux/connect.S: New file.
10721 * sysdeps/unix/sysv/linux/creat.c: New file.
10722 * sysdeps/unix/sysv/linux/fsync.c: New file.
10723 * sysdeps/unix/sysv/linux/llseek.c: New file.
10724 * sysdeps/unix/sysv/linux/lseek.c: New file.
10725 * sysdeps/unix/sysv/linux/msgrcv.c: New file.
10726 * sysdeps/unix/sysv/linux/msgsnd.c: New file.
10727 * sysdeps/unix/sysv/linux/msync.c: New file.
10728 * sysdeps/unix/sysv/linux/nanosleep.c: New file.
10729 * sysdeps/unix/sysv/linux/open.c: New file.
10730 * sysdeps/unix/sysv/linux/open64.c: New file.
10731 * sysdeps/unix/sysv/linux/pause.c: New file.
10732 * sysdeps/unix/sysv/linux/poll.c: New file.
10733 * sysdeps/unix/sysv/linux/pread.c: New file.
10734 * sysdeps/unix/sysv/linux/pread64.c: New file.
10735 * sysdeps/unix/sysv/linux/pselect.c: New file.
10736 * sysdeps/unix/sysv/linux/pwrite.c: New file.
10737 * sysdeps/unix/sysv/linux/pwrite64.c: New file.
10738 * sysdeps/unix/sysv/linux/readv.c: New file.
10739 * sysdeps/unix/sysv/linux/recv.S: New file.
10740 * sysdeps/unix/sysv/linux/recvfrom.S: New file.
10741 * sysdeps/unix/sysv/linux/recvmsg.S: New file.
10742 * sysdeps/unix/sysv/linux/select.c: New file.
10743 * sysdeps/unix/sysv/linux/send.S: New file.
10744 * sysdeps/unix/sysv/linux/sendmsg.S: New file.
10745 * sysdeps/unix/sysv/linux/sendto.S: New file.
10746 * sysdeps/unix/sysv/linux/sigpause.c: New file.
10747 * sysdeps/unix/sysv/linux/sigsuspend.c: New file.
10748 * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
10749 * sysdeps/unix/sysv/linux/sigwait.c: New file.
10750 * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
10751 * sysdeps/unix/sysv/linux/system.c: New file.
10752 * sysdeps/unix/sysv/linux/tcdrain.c: New file.
10753 * sysdeps/unix/sysv/linux/wait.c: New file.
10754 * sysdeps/unix/sysv/linux/waitid.c: New file.
10755 * sysdeps/unix/sysv/linux/waitpid.c: New file.
10756 * sysdeps/unix/sysv/linux/writev.c: New file.
10757 * sysdeps/unix/sysv/linux/i386/fcntl.c: New file.
10759 * pt-readv.c: Fix comment.
10761 2002-12-14 Jakub Jelinek <jakub@redhat.com>
10763 * tst-cleanup1.c: Include stdlib.h.
10765 * tst-cancel5.c: New test.
10766 * Makefile (tests): Add tst-cancel5.
10767 (tst-cancel5): Link against libc.so libpthread.so in that order.
10769 2002-12-13 Ulrich Drepper <drepper@redhat.com>
10771 * forward.c (test_loaded): Prevent recursive calls.
10773 * Makefile (routines): Add libc-cancellation.
10774 * libc-cancellation.c: New file.
10775 * descr.h (struct pthread): Add multiple_threads field.
10776 * allocatestack.c (allocate_stack): Initialize multiple_header field of
10777 new thread descriptor to 1.
10778 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread):
10779 Initialize multiple_thread field after successful thread creation.
10780 * cancellation.c (__do_cancel): Move to pthreadP.h.
10781 (__pthread_enable_asynccancel): Remove parameter from __do_cancel call.
10782 (__pthread_disable_asynccancel): Add internal_function attribute.
10783 * init.c (sigcancel_handler): Remove parameter from __do_cancel call.
10784 * pthread_setcancelstate.c: Likewise.
10785 * pthread_setcanceltype.c: Likewise.
10786 * pthread_exit.c: Likewise.
10787 * pthreadP.h (CANCELLATION_P): Likewise.
10788 (__do_cancel): Define as static inline.
10789 (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): New #defines.
10790 (__libc_enable_asynccancel, __libc_disable_asynccancel): New
10792 * sysdeps/i386/tls.h (tcbhead_t): Add list and multiple_threads
10793 fields. Define MULTIPLE_THREADS_OFFSET.
10794 * sysdeps/pthread/bits/libc-lock.h: Remove __libc_locking_needed
10796 * sysdeps/unix/sysv/linux/accept.S: New file.
10797 * sysdeps/unix/sysv/linux/read.c: New file.
10798 * sysdeps/unix/sysv/linux/write.c: New file.
10799 * sysdeps/unix/sysv/linux/i386/pt-socket.S: New file.
10800 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove definition and
10801 initialization of __libc_locking_needed.
10802 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't use
10803 __libc_locking_needed, use multiple_threads field in TCB.
10804 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
10806 2002-12-12 Ulrich Drepper <drepper@redhat.com>
10808 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: Use i486
10810 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: Likewise.
10812 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Correct
10813 access to __libc_locking_needed for PIC.
10815 2002-12-12 Jakub Jelinek <jakub@redhat.com>
10817 * sysdeps/pthread/bits/libc-lock.h (__libc_locking_needed): Only
10818 declare for libc.so.
10819 (__libc_lock_init, __libc_lock_init_recursive): Change into comma
10821 (__libc_lock_lock): Put into statement expression.
10822 (__libc_lock_unlock): Remove trailing semicolon.
10823 * sysdeps/unix/sysv/linux/fork.h (__libc_pthread_init): Fix typo.
10825 2002-12-12 Roland McGrath <roland@redhat.com>
10827 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use asm operand with
10828 "m" constraint to refer to __libc_locking_needed. Declare it here.
10830 2002-12-12 Ulrich Drepper <drepper@redhat.com>
10832 * sysdeps/unix/sysv/linux/fork-gen.c: Renamed to...
10833 * sysdeps/unix/sysv/linux/libc_pthread_init.c: ...this.
10834 Initialize __libc_locking_needed.
10835 * init.c (__pthread_initialize_minimal): Call __libc_pthread_init
10836 instead of __register_pthread_fork_handler.
10837 * sysdeps/pthread/bits/libc-lock.h: Declare __libc_locking_needed.
10838 * sysdeps/unix/sysv/linux/Makefile (sysdep_routimes): Replace
10839 fork-gen with libc_pthread_init.
10840 * sysdeps/unix/sysv/linux/Versions: Use __libc_pthread_init instead
10841 of __register_pthread_fork_handler.
10842 * sysdeps/unix/sysv/linux/fork.h: Declare __libc_pthread_init instead
10843 of __register_pthread_fork_handler.
10844 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use
10845 __libc_locking_needed to determine whether lock prefix can be avoided.
10846 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
10848 2002-12-11 Ulrich Drepper <drepper@redhat.com>
10850 * Makefile (tests): Add tst-cleanup1.
10851 * tst-cleanup1.c: New file.
10852 * cancellation.c (__cleanup_thread): Removed.
10853 (__do_cancel): Remove call to __cleanup_thread.
10854 * pthreadP.h: Remove __cleanup_thread prorotype.
10856 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
10857 Remember function and argument even if cancellation handler
10858 function is not available.
10859 (__libc_cleanup_region_end): Execute registered function directly if
10860 pthread functions are not available.
10861 (__libc_cleanup_end): Likewise.
10863 * init.c (__pthread_initialize_minimal): Fix initialization in
10864 static lib by preventing gcc from being too clever.
10866 2002-12-10 Ulrich Drepper <drepper@redhat.com>
10868 * init.c (__pthread_initialize_minimal): Remove unneccesary
10871 * Makefile (tests): We can run tst-locale2 now.
10873 2002-12-09 Ulrich Drepper <drepper@redhat.com>
10875 * Versions: Remove duplicated sigwait entry.
10877 2002-12-08 Ulrich Drepper <drepper@redhat.com>
10879 * pthreadP.h: Enable pthread_cleanup_{push,pop} optimizations only
10882 * pt-fcntl.c (__fcntl): Initialize oldtype to avoid warning.
10884 * pthreadP.h: Declare __pthread_enable_asynccancel and
10885 __pthread_disable_asynccancel.
10886 (CANCEL_ASYNC): Use __pthread_enable_asynccancel.
10887 (CANCEL_RESET): Use __pthread_disable_asynccancel.
10888 * cancellation.c (__pthread_enable_asynccancel): New function.
10889 (__pthread_disable_asynccancel): New function.
10890 * pt-accept.c: Adjust for CANCEL_ASYNC and CANCEL_RESET change.
10891 * pt-close.c: Likewise.
10892 * pt-connect.c: Likewise.
10893 * pt-creat.c: Likewise.
10894 * pt-fcntl.c: Likewise.
10895 * pt-fsync.c: Likewise.
10896 * pt-lseek.c: Likewise.
10897 * pt-lseek64.c: Likewise.
10898 * pt-msgrcv.c: Likewise.
10899 * pt-msgsnd.c: Likewise.
10900 * pt-msync.c: Likewise.
10901 * pt-nanosleep.c: Likewise.
10902 * pt-open.c: Likewise.
10903 * pt-open64.c: Likewise.
10904 * pt-pause.c: Likewise.
10905 * pt-poll.c: Likewise.
10906 * pt-pread.c: Likewise.
10907 * pt-pread64.c: Likewise.
10908 * pt-pselect.c: Likewise.
10909 * pt-pwrite.c: Likewise.
10910 * pt-pwrite64.c: Likewise.
10911 * pt-read.c: Likewise.
10912 * pt-readv.c: Likewise.
10913 * pt-recv.c: Likewise.
10914 * pt-recvfrom.c: Likewise.
10915 * pt-recvmsg.c: Likewise.
10916 * pt-select.c: Likewise.
10917 * pt-send.c: Likewise.
10918 * pt-sendmsg.c: Likewise.
10919 * pt-sendto.c: Likewise.
10920 * pt-sigpause.c: Likewise.
10921 * pt-sigsuspend.c: Likewise.
10922 * pt-sigtimedwait.c: Likewise.
10923 * pt-sigwait.c: Likewise.
10924 * pt-sigwaitinfo.c: Likewise.
10925 * pt-system.c: Likewise.
10926 * pt-tcdrain.c: Likewise.
10927 * pt-wait.c: Likewise.
10928 * pt-waitid.c: Likewise.
10929 * pt-waitpid.c: Likewise.
10930 * pt-write.c: Likewise.
10931 * pt-writev.c: Likewise.
10932 * pthread_join.c: Likewise.
10933 * pthread_timedjoin.c: Likewise.
10935 * pt-sigpause.c (sigsuspend): Call __sigsuspend.
10936 (__xpg_sigpause): New function.
10937 * Versions (libpthread:GLIBC_2.3.2): Add __xpg_sigpause.
10939 2002-12-07 Ulrich Drepper <drepper@redhat.com>
10941 * Makefile (CFLAGS-ftrylockfile.c): Add -D_IO_MTSAFE_IO.
10943 * cleanup.c: Move declarations of _GI_pthread_cleanup_push and
10944 _GI_pthread_cleanup_pop to pthreadP.h.
10946 * ftrylockfile.c: Use _IO_lock_trylock instead of
10947 pthread_mutex_trylock.
10949 * pthreadP.h (CANCEL_ASYNC): Use __pthread_setcanceltype.
10950 (CANCEL_RESET): Likewise.
10951 (__pthread_setcanceltype_): Declare.
10952 (__pthread_mutex_lock_internal): Declare.
10953 (__pthread_mutex_unlock_internal): Declare.
10954 (__pthread_once_internal): Declare.
10955 (pthread_cleanup_push): Redefine using _GI_pthread_cleanup_push.
10956 (pthread_cleanup_pop): Redefine using _GI_pthread_cleanup_pop.
10958 * pthread_cond_timedwait.c: Use INTUSE is calls to pthread_mutex_lock
10959 and pthread_mutex_unlock.
10960 * pthread_cond_wait.c: Likewise.
10961 * pthread_mutex_lock.c: Use INTDEF to define alias if needed.
10962 * pthread_mutex_unlock.c: Likewise.
10964 * pthread_setcanceltype.c: Add additional alias
10965 __pthread_setcanceltype.
10967 * sem_unlink.c (sem_unlink): Use __pthread_once with INTDEF.
10968 * sem_open.c (sem_open): Likewise.
10969 Use __libc_open, __libc_write, and __libc_close instead of
10970 open, write, and close respectively.
10972 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_trylock_internal):
10973 Rewrite as statement expression since it must return a value.
10975 * pthread_cancel.c: Use __pthread_kill instead of pthread_kill.
10976 * sysdeps/unix/sysv/linux/pthread_kill.c: Define additional alias
10979 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Define additional
10980 alias __pthread_once_internal.
10982 * sysdeps/unix/sysv/linux/raise.c: Use libc_hidden_def for raise.
10984 2002-12-06 Ulrich Drepper <drepper@redhat.com>
10986 * Makefile (tests): Add tst-stdio1 and tst-stdio2.
10987 * tst-stdio1.c: New file.
10988 * tst-stdio2.c: New file.
10990 * init.c (__pthread_initialize_minimal): Correct INIT_LIST_HEAD use.
10992 * Makefile (tests): Comment out tst-locale2 for now.
10993 (CFLAGS-flockfile.c, CFLAGS-funlockfile.c): Define to -D_IO_MTSAFE_IO.
10995 * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-fork.c to
10997 * sysdeps/unix/sysv/linux/fork.c: Include <bits/stdio-lock.h>.
10998 Use _IO_lock_init instead of explicit assignment.
11000 * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
11001 Define __libc_lock_* and __libc_lock_recursive macros with
11002 lowlevellock macros, not pthread mutexes.
11004 * flockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_lock instead
11005 of pthread_mutex_lock.
11006 * funlockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_unlock
11007 instead of pthread_mutex_unlock.
11009 2002-12-06 Roland McGrath <roland@redhat.com>
11011 * allocatestack.c (__stack_user): Use uninitialized defn.
11012 * init.c (__pthread_initialize_minimal): Initialize it here.
11014 2002-12-05 Roland McGrath <roland@redhat.com>
11016 * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
11018 * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
11020 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Add
11021 missing & here too.
11023 2002-12-05 Ulrich Drepper <drepper@redhat.com>
11025 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
11027 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: New file.
11028 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: New file.
11029 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: New file.
11030 * sysdeps/pthread/bits/libc-lock.h: Use lowlevellock implementation
11031 for __libc_lock_* macros.
11032 * Makefile (routines): Add libc-lowlevellock.
11034 2002-10-09 Roland McGrath <roland@redhat.com>
11036 * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
11037 Under [__PIC__], call the function via the pointer fetched for
11038 comparison rather than a call by name that uses the PLT.
11039 (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
11040 (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
11041 (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
11042 (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
11043 (__libc_key_create, __libc_getspecific, __libc_setspecific): Use it.
11045 2002-12-04 Roland McGrath <roland@redhat.com>
11047 * forward.c (pthread_self): Use FORWARD3 macro to correct return type.
11049 * sysdeps/i386/td_ta_map_lwp2thr.c: Moved from ../nptl_db.
11050 * sysdeps/generic/td_ta_map_lwp2thr.c: New file.
11052 * pthread_create.c (start_thread): Add missing & on __nptl_last_event.
11054 2002-12-04 Ulrich Drepper <drepper@redhat.com>
11056 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Make pthread_t
11057 a completely opaque, non-integer type.
11058 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
11060 2002-12-05 Jakub Jelinek <jakub@redhat.com>
11062 * sysdeps/i386/tls.h: Include stdlib.h.
11063 * sysdeps/x86_64/tls.h: Likewise.
11065 2002-12-04 Ulrich Drepper <drepper@redhat.com>
11067 * Makefile (tests): Add tst-locale2.
11068 (tests-static): Likewise.
11069 * tst-locale2.c: New file.
11071 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Mark asms as
11072 volatile and add memory clobbers to lock operations.
11074 2002-12-03 Ulrich Drepper <drepper@redhat.com>
11076 * sysdeps/i386/i686/bits/atomic.h: Use i486 version.
11077 * sysdeps/i386/i486/bits/atomic.h: New file.
11078 * sysdeps/i386/i586/bits/atomic.h: New file.
11079 * sysdeps/i386/i686/pthread_spin_trylock.S: Define HAVE_CMOV and
11080 include i486 version.
11081 * sysdeps/i386/i486/pthread_spin_trylock.S: New file.
11082 * sysdeps/i386/i586/pthread_spin_trylock.S: New file.
11083 Patch by Marijn Ros <marijn@mad.scientist.com>.
11085 * allocatestack.c (get_cached_stack): Don't crash if we first
11086 found a stack with a larger size then needed.
11087 Reported by Hui Huang <hui.huang@sun.com>.
11089 * Makefile (tests): Add tst-sysconf.
11090 * tst-sysconf.c: New file.
11092 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine
11093 PTHREAD_THREADS_MAX.
11095 2002-12-02 Roland McGrath <roland@redhat.com>
11097 * pthreadP.h (__stack_user, __nptl_create_event, __nptl_death_event):
11098 Declare using hidden_proto instead of attribute_hidden, so there are
11099 non-.hidden static symbols for gdb to find.
11100 (__pthread_keys): Likewise.
11101 * events.c (__nptl_create_event, __nptl_death_event): Add hidden_def.
11102 * allocatestack.c (__stack_user): Likewise.
11103 * pthread_create.c (__pthread_keys): Likewise.
11104 (__nptl_threads_events, __nptl_last_event): Make these static instead
11106 * pthread_key_create.c (__pthread_pthread_keys_max,
11107 __pthread_pthread_key_2ndlevel_size): Renamed from __linuxthreads_*.
11109 2002-12-02 Ulrich Drepper <drepper@redhat.com>
11111 * Makefile (tests): Add tst-locale1. If buid-static is yes link
11113 * tst-locale1.c: New file.
11115 * pthread_cond_timedwait.c: Include <stdlib.h>.
11117 * Makefile (tests): Add tst-fork2 and tst-fork3.
11118 * tst-fork2.c: New file.
11119 * tst-fork3.c: New file.
11121 2002-11-28 Ulrich Drepper <drepper@redhat.com>
11123 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
11125 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
11126 require it to 200112L.
11128 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Use cmov
11129 instruction only if HAVE_CMOV is defined.
11130 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Define HAVE_CMOV.
11132 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: New file.
11134 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: New file.
11136 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: New file.
11138 * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: New file.
11140 2002-11-27 Ulrich Drepper <drepper@redhat.com>
11142 * sysdeps/x86_64/bits/atomic.h: New file.
11144 * sysdeps/i386/i686/bits/atomic.h: Fix asm syntax for 8- and
11147 * sysdeps/unix/sysv/linux/raise.c (raise): Use INTERNAL_SYSCALL if
11148 possible since gettid cannot fail.
11150 * sysdeps/x86_64/pthreaddef.h: New file.
11152 * sysdeps/i386/pthreaddef.h (gettid): Removed.
11154 * sysdeps/x86_64/pthread_spin_init.c: New file.
11155 * sysdeps/x86_64/pthread_spin_lock.c: New file.
11156 * sysdeps/x86_64/pthread_spin_trylock.c: New file.
11157 * sysdeps/x86_64/pthread_spin_unlock.c: New file.
11159 * sysdeps/i386/i686/pthread_spin_trylock.S (pthread_spin_trylock):
11160 Add missing lock prefix. Minute optimization.
11162 * tst-spin2.c (main): Also check successful trylock call.
11164 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use correct
11165 syscall. Fix typo in case INTERNAL_SYSCALL is not used.
11167 * sysdeps/i386/pthread_spin_destroy.c: Moved to...
11168 * sysdeps/pthread/pthread_spin_destroy.c: ...here. New file.
11170 * sysdeps/i386/pthread_sigmask.c: Removed. Use the generic code.
11171 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Return correct
11172 value in case of an error. Add support for INTERNAL_SYSCALL.
11174 * sysdeps/i386/pthread_sigmask.c (pthread_sigmask): Return correct
11175 value in case of an error.
11177 * sysdeps/x86_64/tls.h: New file.
11179 2002-11-26 Ulrich Drepper <drepper@redhat.com>
11181 * sysdeps/i386/tls.h (THREAD_GETMEM_NC): Change interface. It now
11182 takes the array member name and the index as parameters.
11183 (THREAD_SETMEM_NC): Likewise.
11184 * pthread_getspecific.c: Use new THREAD_GETMEM_NC interface.
11185 * pthread_setspecific.c: Use new THREAD_GETMEM_NC and THREAD_SETMEM_NC
11188 * sysdeps/i386/tls.h (THREAD_SETMEM): Use size of member element
11189 to decide which code to use.
11190 (THREAD_SETMEM_NC): Likewise.
11192 * allocatestack.c (queue_stack): Don't remove stack from list here.
11193 Do it in the caller. Correct condition to prematurely terminate
11194 loop to free stacks.
11195 (__deallocate_stack): Remove stack from list here.
11197 2002-11-26 Ulrich Drepper <drepper@redhat.com>
11199 * Makefile (tests): Add tst-stack1.
11200 * tst-stack1.c: New file.
11202 * allocatestack.c (allocate_stack): Initialize the TCB on a user
11205 * pthread_attr_getstack.c: Return bottom of the thread area.
11207 2002-11-25 Ulrich Drepper <drepper@redhat.com>
11209 * Makefile (libpthread-routines): Add pt-allocrtsig and
11210 pthread_kill_other_threads.
11211 * pt-allocrtsig.c: New file.
11212 * pthread_kill_other_threads.c: New file.
11213 * sysdeps/unix/sysv/linux/allocrtsig.c: Add additional aliases for
11214 all three functions.
11215 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
11217 * sysdeps/unix/sysv/linux/Versions (libc:GLIBC_PRIVATE): Export
11218 __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
11219 and __libc_allocate_rtsig_private.
11220 * Versions (libpthread): Export pthread_kill_other_threads_np,
11221 __libc_current_sigrtmin, and __libc_current_sigrtmax.
11223 2002-11-24 Ulrich Drepper <drepper@redhat.com>
11225 * allocatestack.c (allocate_stack): stackaddr in attribute points to
11226 the end of the stack. Adjust computations.
11227 When mprotect call fails dequeue stack and free it.
11228 * pthread_attr_setstack.c: Store top of the stack in stackaddr
11230 * pthread_getattr_np.c: Likewise.
11232 * descr.h (IS_DETACHED): Add some more parenthesis to prevent
11235 2002-11-23 Ulrich Drepper <drepper@redhat.com>
11237 * sysdeps/pthread/pthread.h (pthread_self): __THROW must come before
11238 attribute definitions. Patch by Luca Barbieri <ldb@ldb.ods.org>.
11240 2002-11-22 Ulrich Drepper <drepper@redhat.com>
11242 * pthread_getspecific.c: Optimize access to first 2nd-level array.
11243 * pthread_setspecific.c: Likewise.
11245 2002-11-21 Ulrich Drepper <drepper@redhat.com>
11247 * sysdeps/unix/sysv/linux/i386/createthread.c: Remove CLONE_ flags
11248 definitions. Get them from the official place.
11249 * sysdeps/unix/sysv/linux/i386/fork.c: Likewise.
11251 * sysdeps/unix/sysv/linux/i386/createthread.c: Update CLONE_* flags.
11252 Use new CLONE_ flags in clone() calls.
11254 * sysdeps/unix/sysv/linux/fork.c: Use ARCH_FORK to actually fork.
11255 * sysdeps/unix/sysv/linux/i386/fork.c: New file.
11257 * Versions: Add pthread_* functions for libc.
11258 * forward.c: New file.
11260 * sysdeps/pthread/Makefile (libpthread-sysdeps_routines): Add
11262 * herrno.c: New file.
11265 * Makefile (libpthread-routines): Remove sem_post, sem_wait,
11266 sem_trywait, and sem_timedwait. Add herrno and res.
11267 * sem_init.c: Don't initialize lock and waiters members.
11268 * sem_open.c: Likewise.
11269 * sem_post.c: Removed.
11270 * sem_wait.c: Removed.
11271 * sem_trywait.c: Removed.
11272 * sem_timedwait.c: Removed.
11273 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Complete rewrite.
11274 Includes full implementations of sem_post, sem_wait, sem_trywait,
11276 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Adjust
11277 for new implementation.
11278 * sysdeps/unix/sysv/linux/internaltypes.h (struct sem): Remove lock
11279 and waiters fields.
11281 * tst-sem3.c: Improve error message.
11282 * tst-signal3.c: Likewise.
11284 * init.c (__pthread_initialize_minimal): Use set_tid_address syscall
11285 to tell the kernel about the termination futex and to initialize tid
11286 member. Don't initialize main_thread.
11287 * descr.h (struct pthread): Remove main_thread member.
11288 * cancelllation.c (__do_cancel): Remove code handling main thread.
11289 The main thread is not special anymore.
11291 * allocatestack.c (__reclaim_stacks): Mark stacks as unused. Add
11292 size of the stacks to stack_cache_actsize.
11294 * pt-readv.c: Add missing "defined".
11295 * pt-sigwait.c: Likewise.
11296 * pt-writev.c: Likewise.
11298 2002-11-09 Ulrich Drepper <drepper@redhat.com>
11300 * Versions: Export __connect from libpthread.
11301 Patch by Luca Barbieri <ldb@ldb.ods.org>.
11303 * Makefile (libpthread-routines): Add pt-raise.
11304 * sysdeps/unix/sysv/linux/raise.c: New file.
11305 * sysdeps/unix/sysv/linux/pt-raise.c: New file.
11306 * sysdeps/generic/pt-raise.c: New file.
11308 * pthread_cond_init.c: Initialize all data elements of the condvar
11309 structure. Patch by Luca Barbieri <ldb@ldb.ods.org>.
11311 * pthread_attr_init.c: Actually implement 2.0 compatibility version.
11312 * pthread_create.c: Likewise.
11314 * Makefile (tests): Add tst-key1, tst-key2, tst-key3.
11315 * tst-key1.c: New file.
11316 * tst-key2.c: New file.
11317 * tst-key3.c: New file.
11319 * Versions: Export pthread_detach for version GLIBC_2.0.
11320 Reported by Saurabh Desai <sdesai@austin.ibm.com>.
11322 2002-11-08 Ulrich Drepper <drepper@redhat.com>
11324 * pthread_key_create.c: Terminate search after an unused key was found.
11325 Patch by Luca Barbieri <ldb@ldb.ods.org>.
11327 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Return zero.
11328 Patch by Luca Barbieri <ldb@ldb.ods.org>.
11330 2002-10-10 Ulrich Drepper <drepper@redhat.com>
11332 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Use slow generic
11333 dynamic lookup for errno in PIC.
11335 * allocatestack.c (get_cached_stack): Rearrange code slightly to
11336 release the stack lock as soon as possible.
11337 Call _dl_allocate_tls_init for TCB from the cache to re-initialize
11338 the static TLS block.
11339 (allocate_stack): Call _dl_allocate_tls_init for user-provided stack.
11341 * cancellation.c: Renamed from cancelation.c.
11342 * Makefile: Adjust accordingly.
11343 * pthreadP.h (CANCELLATION_P): Renamed from CANCELATION_P.
11344 * cleanup_defer.c: Use CANCELLATION_P.
11345 * pthread_testcancel.c: Likewise.
11346 * descr.h: Fix spelling in comments.
11347 * init.c: Likewise.
11348 * pthread_getattr_np.c: Likewise.
11349 * pthread_getschedparam.c: Likewise.
11350 * pthread_setschedparam.c: Likewise.
11351 * Versions: Likewise.
11353 * pt-pselect.c: New file.
11354 * Makefile (libpthread-routines): Add pt-pselect.
11355 * Versions: Add pselect.
11357 * tst-cancel4.c: New file.
11358 * Makefile (tests): Add tst-cancel4.
11360 2002-10-09 Ulrich Drepper <drepper@redhat.com>
11362 * pthread_mutex_lock.c: Always record lock ownership.
11363 * pthread_mutex_timedlock.c: Likewise.
11364 * pthread_mutex_trylock.c: Likewise.
11366 * pt-readv.c: New file.
11367 * pt-writev.c: New file.
11368 * pt-creat.c: New file.
11369 * pt-msgrcv.c: New file.
11370 * pt-msgsnd.c: New file.
11371 * pt-poll.c: New file.
11372 * pt-select.c: New file.
11373 * pt-sigpause.c: New file.
11374 * pt-sigsuspend.c: New file.
11375 * pt-sigwait.c: New file.
11376 * pt-sigwaitinfo.c: New file.
11377 * pt-waitid.c: New file.
11378 * Makefile (libpthread-routines): Add pt-readv, pt-writev, pt-creat,
11379 pt-msgrcv, pt-msgsnd, pt-poll, pt-select, pt-sigpause, pt-sigsuspend,
11380 pt-sigwait, pt-sigwaitinfo, and pt-waitid.
11381 * Versions: Add all the new functions.
11383 * tst-exit1.c: New file.
11384 * Makefile (tests): Add tst-exit1.
11386 * sem_timedwait.c: Minor optimization for more optimal fastpath.
11388 2002-10-08 Ulrich Drepper <drepper@redhat.com>
11390 * pt-fcntl.c: Only enable asynchronous cancellation for F_SETLKW.
11392 * pthread_join.c: Enable asynchronous cancellation around lll_wait_tid
11393 call. pthread_join is an official cancellation point.
11394 * pthread_timedjoin.c: Likewise.
11396 * pthread_cond_wait.c: Revert order in which internal lock are dropped
11397 and the condvar's mutex are retrieved.
11398 * pthread_cond_timedwait.c: Likewise.
11399 Reported by dice@saros.East.Sun.COM.
11401 2002-10-07 Ulrich Drepper <drepper@redhat.com>
11403 * pthreadP.h: Cut out all type definitions and move them...
11404 * sysdeps/unix/sysv/linux/internaltypes.h: ...here. New file.
11405 * pthreadP.h: Include <internaltypes.h>.
11407 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Little
11408 performance tweaks.
11410 * sem_trywait.c: Shuffle #includes around to get right order.
11411 * sem_timedwait.c: Likewise.
11412 * sem_post.c: Likewise.
11413 * sem_wait.c: Likewise.
11415 * nptl 0.3 released.
11417 * Makefile (tests): Add tst-signal3.
11418 * tst-signal3.c: New file.
11420 2002-10-05 Ulrich Drepper <drepper@redhat.com>
11422 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Tell the compiler that
11423 the asms modify the sem object.
11424 (__lll_sem_timedwait): Now takes struct sem* as first parameter.
11426 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h (sem_t): Don't expose
11427 the actual members.
11428 * pthreadP.h (struct sem): New type. Actual semaphore type.
11429 * semaphoreP.h: Include pthreadP.h.
11430 * sem_getvalue.c: Adjust to sem_t change.
11431 * sem_init.c: Likewise.
11432 * sem_open.c: Likewise.
11433 * sem_post.c: Likewise.
11434 * sem_timedwait.c: Likewise.
11435 * sem_trywait.c: Likewise.
11436 * sem_wait.c: Likewise.
11438 2002-10-04 Ulrich Drepper <drepper@redhat.com>
11440 * Makefile (tests): Add tst-basic2, tst-exec1, tst-exec3, tst-exec3.
11441 * tst-basic2.c: New file.
11442 * tst-exec1.c: New file.
11443 * tst-exec2.c: New file.
11444 * tst-exec3.c: New file.
11446 * tst-fork1.c: Remove extra */.
11448 * nptl 0.2 released. The API for IA-32 is complete.