1 2012-10-05 Siddhesh Poyarekar <siddhesh@redhat.com>
4 * Makefile (tests): New test case tst-cond24.
5 (LDFLAGS-tst-cond24): Link tst-cond24 against librt.
6 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7 (__pthread_cond_timedwait): Unlock mutex before going back to
9 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
10 (__pthread_cond_wait): Likewise. Revert handling of EAGAIN
11 return from futex_wait.
12 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
13 (__pthread_cond_timedwait): Unlock mutex before going back to
14 wait in PI case. Set requeue_pi flag only if wait returned 0.
15 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
16 (__pthread_cond_wait): Likewise. Revert handling of EAGAIN
17 return from futex_wait.
18 * tst-cond24.c: New test case.
20 2012-10-04 Roland McGrath <roland@hack.frob.com>
22 * pthread_create.c (start_thread): Use __madvise, not madvise.
24 2012-10-02 H.J. Lu <hongjiu.lu@intel.com>
26 * sysdeps/i386/tls.h: Update copyright years.
28 2012-10-02 Siddhesh Poyarekar <siddhesh@redhat.com>
30 * pthread_create.c (start_thread): Fix clone flag name in
31 comment to CLONE_CHILD_CLEARTID.
32 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
33 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
34 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
35 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
36 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
37 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
39 2012-10-01 Siddhesh Poyarekar <siddhesh@redhat.com>
42 * Makefile (tests): Add tst-cond-except.
43 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
44 (__pthread_cond_timedwait): Mark instructions where %ebx is
45 incremented in PI case.
46 (.gcc_except_table): Add entry to jump to __condvar_tw_cleanup2
47 for the marked PI case instructions.
48 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
49 (__pthread_cond_wait): Mark instructions where %ebx is
50 incremented in PI case.
51 (.gcc_except_table): Add entry to jump to __condvar_w_cleanup2
52 for the marked PI case instructions.
53 * tst-cond-except.c: New test case.
55 2012-09-24 Dmitry V. Levin <ldv@altlinux.org>
57 * tst-tls6.sh: Add "set -e".
58 * Makefile: Do not specify -e option when running testsuite
61 * tst-tls6.sh: Add copyright header.
63 2012-09-24 H.J. Lu <hongjiu.lu@intel.com>
65 * sysdeps/x86_64/tls.h (THREAD_SETMEM): Add "()" when casting
66 to uint64_t for 64-bit store.
67 (THREAD_SETMEM_NC): Likewise.
69 2012-09-19 H.J. Lu <hongjiu.lu@intel.com>
71 * sysdeps/i386/tls.h (THREAD_SETMEM): Cast to uint64_t for
73 (THREAD_SETMEM_NC): Likewise.
75 2012-09-14 Jeff Law <law@redhat.com>
78 * sysdeps/pthread/pthread.h: Fix prototype of __sigsetjmp.
80 2012-09-13 H.J. Lu <hongjiu.lu@intel.com>
83 * sysdeps/pthread/bits/libc-lockP.h (__rtld_lock_init_recursive):
86 2012-09-07 H.J. Lu <hongjiu.lu@intel.com>
88 * Makefile (LDFLAGS-tst-cancel24): Renamed to ...
89 (LDLIBS-tst-cancel24): This.
91 2012-09-06 H.J. Lu <hongjiu.lu@intel.com>
94 * Makefile (tests-static): Add tst-cancel21-static.
96 * tst-cancel21-static.c: New file.
98 2012-09-01 Joseph Myers <joseph@codesourcery.com>
100 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c
101 [!__ASSUME_POSIX_CPU_TIMERS]: Remove conditional code.
102 [__NR_clock_getres]: Make code unconditional.
103 (pthread_getcpuclockid): Remove code left unreachable by removal
106 2012-08-31 Joseph Myers <joseph@codesourcery.com>
109 * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Use
110 atomic_compare_and_exchange_bool_rel.
111 * tst-sem14.c: New file.
112 * Makefile (tests): Add tst-sem14.
114 2012-08-15 Roland McGrath <roland@hack.frob.com>
116 * Makefile (CFLAGS-flockfile.c): Use $(libio-mtsafe) instead
118 (CFLAGS-ftrylockfile.c, CFLAGS-funlockfile.c): Likewise.
119 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-fork.c): Likewise.
121 2012-08-16 Joseph Myers <joseph@codesourcery.com>
123 * pthread_cond_timedwait.c (__pthread_cond_timedwait)
124 [!__ASSUME_POSIX_TIMERS]: Remove conditional code.
125 * pthread_condattr_setclock.c (pthread_condattr_setclock)
126 [!__ASSUME_POSIX_TIMERS]: Likewise.
127 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
128 (__pthread_cond_timedwait) [!__ASSUME_POSIX_TIMERS]: Likewise.
129 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c
130 [!__ASSUME_POSIX_TIMERS]: Likewise.
131 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
132 (__pthread_cond_timedwait) [!__ASSUME_POSIX_TIMERS]: Likewise.
133 * sysdeps/unix/sysv/linux/timer_create.c [__NR_timer_create]: Make
135 [!__NR-timer_create]: Remove conditional code.
136 (timer_create) [!__ASSUME_POSIX_TIMERS]: Likewise.
137 * sysdeps/unix/sysv/linux/timer_delete.c [__NR_timer_delete]: Make
139 [!__NR_timer_delete]: Remove conditional code.
140 (timer_delete) [!__ASSUME_POSIX_TIMERS]: Likewise.
141 * sysdeps/unix/sysv/linux/timer_getoverr.c
142 [__NR_timer_getoverrun]: Make code unconditional.
143 [!__NR_timer_getoverrun]: Remove conditional code.
144 (timer_getoverrun) [!__ASSUME_POSIX_TIMERS]: Likewise.
145 * sysdeps/unix/sysv/linux/timer_gettime.c [__NR_timer_gettime]:
146 Make code unconditional.
147 [!__NR_timer_gettime]: Remove conditional code.
148 (timer_gettime) [!__ASSUME_POSIX_TIMERS]: Likewise.
149 * sysdeps/unix/sysv/linux/timer_routines.c [__NR_timer_create]:
150 Make code unconditional.
151 [!__ASSUME_POSIX_TIMERS]: Remove conditional code.
152 * sysdeps/unix/sysv/linux/timer_settime.c [__NR_timer_settime]:
153 Make code unconditional.
154 [!__NR_timer_settime]: Remove conditional code.
155 (timer_settime) [!__ASSUME_POSIX_TIMERS]: Likewise.
156 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
157 (__pthread_cond_timedwait) [!__ASSUME_POSIX_TIMERS]: Remove
160 2012-08-15 Tom de Vries <vries@codesourcery.com>
161 Maxim Kuvyrkov <maxim@codesourcery.com>
163 * sysdeps/pthread/bits/libc-lockP.h (__libc_lock_lock)
164 (__libc_lock_trylock): Allow pre-existing definitions.
166 2012-08-15 Maxim Kuvyrkov <maxim@codesourcery.com>
168 * pthread_spin_lock.c: New file.
169 * pthread_spin_trylock.c: New file.
171 2012-08-08 Joseph Myers <joseph@codesourcery.com>
173 * allocatestack.c (setxid_signal_thread) [__ASSUME_TGKILL]: Make
175 (setxid_signal_thread) [!__ASSUME_TGKILL]: Remove conditional code.
176 * pthread_cancel.c (pthread_cancel) [__ASSUME_TGKILL]: Make code
178 (pthread_cancel) [!__ASSUME_TGKILL]: Remove conditional code.
179 * sysdeps/pthread/createthread.c (do_clone) [__ASSUME_TGKILL]:
180 Make code unconditional.
181 (do_clone) [!__ASSUME_TGKILL]: Remove conditional code.
182 * sysdeps/unix/sysv/linux/pt-raise.c (raise) [__ASSUME_TGKILL ||
183 __NR_tgkill]: Make code unconditional.
184 (raise) [__ASSUME_TGKILL]: Likewise.
185 (raise) [!__ASSUME_TGKILL]: Remove conditional code.
186 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill)
187 [__ASSUME_TGKILL]: Make code unconditional.
188 (__pthread_kill) [!__ASSUME_TGKILL]: Remove conditional code.
189 * sysdeps/unix/sysv/linux/raise.c (raise) [__ASSUME_TGKILL ||
190 __NR_tgkill]: Make code unconditional.
191 (raise) [__ASSUME_TGKILL]: Likewise.
192 (raise) [!__ASSUME_TGKILL]: Remove conditional code.
194 2012-08-07 Joseph Myers <joseph@codesourcery.com>
196 * sysdeps/pthread/createthread.c (create_thread)
197 [!__ASSUME_NO_CLONE_DETACHED]: Remove conditional code.
199 2012-08-03 Joseph Myers <joseph@codesourcery.com>
201 * nptl-init.c (sigcancel_handler) [__ASSUME_CORRECT_SI_PID]: Make
203 (sighandler_setxid) [__ASSUME_CORRECT_SI_PID]: Likewise.
205 2012-07-28 Siddhesh Poyarekar <siddhesh@redhat.com>
207 * tst-pthread-getattr.c (MAX_STACK_SIZE): New macro.
208 (pagesize): New static variable.
209 (allocate_and_test): Return MEM. Rename parameter to TARGET.
210 (check_stack_top): New local variables MEM and PAGEMASK. Cap
211 stack size to MAX_STACK_SIZE. Call allocate_and_test for
212 halfway up the stack top page. Verify that the top page was
214 (do_test): Get pagesize using sysconf.
216 2012-07-25 Andreas Schwab <schwab@linux-m68k.org>
218 * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Remove pseudo_end
220 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Likewise.
221 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO):
224 2012-07-25 Siddhesh Poyarekar <siddhesh@redhat.com>
226 * tst-pthread-getattr.c: Revert last change.
228 2012-07-20 Siddhesh Poyarekar <siddhesh@redhat.com>
230 * tst-pthread-getattr.c (MAX_STACK_SIZE): New max cap for stack
233 (allocate_and_test): Return STACKADDR. Access STACKADDR instead
235 (check_stack_top): Read valued written into STACKADDR in
236 allocate_and_test. Cap stack size to MAX_STACK_SIZE.
238 2012-07-19 Siddhesh Poyarekar <siddhesh@redhat.com>
240 * nptl-init.c (sighandler_setxid): Fix the comment that
243 2012-06-23 Thomas Schwinge <thomas@codesourcery.com>
245 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S
246 (__lll_robust_timedlock_wait): Simplify CFI directives.
248 2012-06-20 Siddhesh Poyarekar <siddhesh@redhat.com>
251 * Makefile (tests): Add test case.
252 * pthread_getattr_np.c (pthread_getattr_np): Deduct pages below
253 the __libc_stack_end page from stacksize. Truncate stacksize to
254 make it page aligned when it is computed from RLIMIT_STACK.
255 * tst-pthread-getattr.c: New test case. Verify that stackaddr is
258 2012-06-07 Carlos Sánchez de La Lama <csanchezdll@gmail.com>
261 * sysdeps/sparc/sparc32/pthread_spin_lock.S: Do not use v9
264 2012-06-04 Siddhesh Poyarekar <siddhesh@redhat.com>
265 Jakub Jelinek <jakub@redhat.com>
268 * sysdeps/pthread/pthread.h
269 [!(defined __GNUC__ && defined __EXCEPTIONS)]
270 (pthread_cleanup_push, pthread_cleanup_push_defer_np): Use
271 __libc_unlikely instead of __builtin_expect.
273 2012-05-30 H.J. Lu <hongjiu.lu@intel.com>
276 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Removed.
277 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
278 * sysdeps/unix/sysv/linux/i386/Implies: New file.
279 * sysdeps/unix/sysv/linux/x86_64/Implies: Likewise.
280 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Renamed
282 * sysdeps/unix/sysv/linux/x86/bits/pthreadtypes.h: This.
283 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Renamed
285 * sysdeps/unix/sysv/linux/x86/bits/semaphore.h: This.
287 2012-05-30 Andreas Schwab <schwab@linux-m68k.org>
290 * nptl-init.c (pthread_functions): Remove use of INTUSE and
292 (__pthread_initialize_minimal_internal): Likewise.
293 * sem_open.c: Likewise.
294 * sem_unlink.c: Likewise.
295 * pthreadP.h: Replace _internal aliases by hidden_proto
297 * pthread_getspecific.c: Replace _internal alias by hidden_def.
298 * pthread_key_create.c: Likewise.
299 * pthread_mutex_destroy.c: Likewise.
300 * pthread_mutex_init.c: Likewise.
301 * pthread_mutex_lock.c: Likewise.
302 * pthread_mutex_unlock.c: Likewise.
303 * pthread_once.c: Likewise.
304 * pthread_rwlock_rdlock.c: Likewise.
305 * pthread_rwlock_unlock.c: Likewise.
306 * pthread_rwlock_wrlock.c: Likewise.
307 * pthread_setspecific.c: Likewise.
308 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S:
310 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
312 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
314 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
315 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
316 * sysdeps/unix/sysv/linux/s390/pthread_once.c: Likewise.
317 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Likewise.
318 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
319 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
320 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
321 * sysdeps/unix/sysv/linux/sparc/pthread_once.c: Likewise.
322 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
323 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S:
325 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S:
327 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S:
330 2012-05-27 Chung-Lin Tang <cltang@codesourcery.com>
332 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO, LOAD_ARGS_1)
333 (LOAD_ARGS_2 ,LOAD_ARGS_3 ,LOAD_ARGS_4): Add CFI restores.
335 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_lock_wait_private)
336 (__lll_lock_wait, __lll_timedlock_wait, __lll_timedwait_tid): Add CFI
338 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S
339 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): Likewise.
340 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
341 (pthread_barrier_wait): Likewise.
342 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
343 (__pthread_cond_broadcast): Likewise.
344 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
345 (__pthread_cond_signal): Likewise.
346 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
347 (__pthread_cond_timedwait): Likewise.
348 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S (__pthread_cond_wait):
350 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S
351 (__pthread_rwlock_rdlock): Likewise.
352 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S
353 (pthread_rwlock_timedrdlock): Likewise.
354 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S
355 (pthread_rwlock_timedwrlock): Likewise.
356 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S
357 (__pthread_rwlock_unlock): Likewise.
358 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S
359 (__pthread_rwlock_wrlock): Likewise.
360 * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post): Likewise.
361 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait): Likewise.
362 * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
364 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
366 2012-05-26 Siddhesh Poyarekar <siddhesh@redhat.com>
369 * nptl/pthread_getattr_np.c (pthread_getattr_np): Use
370 __libc_stack_end rounded to the end of containing page as the
373 2012-05-25 Rayson Ho <rho@redhat.com>
375 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Low-level SystemTap
377 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
378 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
379 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
380 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
381 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
382 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
383 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
384 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
386 2012-05-25 Rayson Ho <rho@redhat.com>
387 Roland McGrath <roland@hack.frob.com>
389 * DESIGN-systemtap-probes.txt: New file.
390 * pthread_cond_broadcast.c: SystemTap probes.
391 * pthread_cond_init.c: Likewise.
392 * pthread_cond_signal.c: Likewise.
393 * pthread_cond_wait.c: Likewise.
394 * pthread_cond_destroy.c: Likewise.
395 * pthread_create.c: Likewise.
396 * pthread_join.c: Likewise.
397 * pthread_mutex_destroy.c: Likewise.
398 * pthread_mutex_init.c: Likewise.
399 * pthread_mutex_lock.c: Likewise.
400 * pthread_mutex_timedlock.c: Likewise.
401 * pthread_mutex_unlock.c: Likewise.
402 * pthread_rwlock_destroy.c: Likewise.
403 * pthread_rwlock_rdlock.c: Likewise.
404 * pthread_rwlock_unlock.c: Likewise.
405 * pthread_rwlock_wrlock.c: Likewise.
406 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
407 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
408 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
409 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
410 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
411 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
412 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
413 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
415 2012-05-24 Roland McGrath <roland@hack.frob.com>
417 * pthread_create.c (start_thread): Define pthread_start LIBC_PROBE.
419 2012-05-17 Andreas Jaeger <aj@suse.de>
421 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
422 (HAVE_DL_DISCOVER_OSVERSION): Don't declare _dl_discover_osversion
423 only for older kernels.
425 2012-05-15 Joseph Myers <joseph@codesourcery.com>
427 * pthreadP.h [!__NR_set_robust_list] (__NR_set_robust_list): Do
430 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
432 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_lock): Load
433 futex pointer into RDI_LP. Use RSP_LP to operate on stack.
434 (lll_robust_lock): Likewise.
435 (lll_cond_lock): Likewise.
436 (lll_robust_cond_lock): Likewise.
437 (lll_timedlock): Likewise.
438 (lll_robust_timedlock): Likewise.
439 (lll_unlock): Likewise.
440 (lll_robust_unlock): Likewise.
442 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
444 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use
445 LP_OP(cmp) and RCX_LP on dep_mutex pointer.
447 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
449 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Use LP_OP(op)
451 (__gcc_personality_v0): Replace 8-byte data alignment with
452 LP_SIZE alignment and .quad with ASM_ADDR.
454 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
456 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Use LP_OP(op)
458 (__gcc_personality_v0): Replace 8-byte data alignment with
459 LP_SIZE alignment and .quad with ASM_ADDR.
461 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
463 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Use LP_OP(cmp) on
464 NWAITERS, which is unsigned long int.
466 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
468 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
469 (__gcc_personality_v0): Replace 8-byte data alignment with
470 LP_SIZE alignment and .quad with ASM_ADDR.
472 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
474 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Use
475 LP_OP(cmp), RSI_LP and R8_LP on dep_mutex pointer. Load
476 __vdso_clock_gettime pointer into RAX_LP.
477 (__gcc_personality_v0): Replace 8-byte data alignment with
478 LP_SIZE alignment and .quad with ASM_ADDR.
480 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
482 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Use
483 LP_OP(cmp), RSI_LP and R8_LP on dep_mutex pointer. Load
484 __vdso_clock_gettime pointer into RAX_LP.
485 (__gcc_personality_v0): Replace 8-byte data alignment with
486 LP_SIZE alignment and .quad with ASM_ADDR.
488 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
490 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Use
491 LP_OP(cmp) and R8_LP on dep_mutex pointer.
493 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
495 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Use LP_OP(mov)
496 to update pointer in memory. Load pointer into RDI_LP.
498 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
500 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
501 (LLL_STUB_UNWIND_INFO_START): Align label to LP_SIZE instead
503 (LLL_STUB_UNWIND_INFO_END): Likewise.
504 (lll_timedlock): Load timeout pointer into RDX_LP.
505 (lll_robust_timedlock): Likewise.
507 2012-05-15 Siddhesh Poyarekar <siddhesh@redhat.com>
508 Jakub Jelinek <jakub@redhat.com>
511 * Makefile (tests): Add test cases.
512 * descr.h (struct pthread): Add a comment describing multiple_threads.
513 * pthreadP.h (__pthread_multiple_threads): Expand comment to include
515 * pthread_cancel.c (pthread_cancel): Enable multiple_threads
516 before setting cancelstate of the thread.
517 * sysdeps/unix/sysv/linux/libc_multiple_threads.c
518 (__libc_multiple_threads): Add explanatory comment.
519 * tst-cancel-self-cancelstate.c: New test case.
520 * tst-cancel-self-canceltype.c: Likewise.
521 * tst-cancel-self-cleanup.c: Supporting file for test cases.
522 * tst-cancel-self-testcancel.c: New test case.
523 * tst-cancel-self.c: Likewise.
524 * vars.c: Expand comment to include single-process case.
526 2012-05-14 H.J. Lu <hongjiu.lu@intel.com>
528 * sysdeps/x86_64/tls.h: Don't include <bits/wordsize.h>.
529 (tcbhead_t): Remove __x86_64__ check. Align rtld_savespace_sse
532 2012-05-14 H.J. Lu <hongjiu.lu@intel.com>
534 * sysdeps/pthread/pthread.h (__PTHREAD_RWLOCK_INT_FLAGS_SHARED):
536 (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Check
537 __PTHREAD_RWLOCK_INT_FLAGS_SHARED instead of __WORDSIZE.
539 2012-05-14 H.J. Lu <hongjiu.lu@intel.com>
541 * shlib-versions: Move x86_64-.*-linux.* entry to ...
542 * sysdeps/x86_64/64/shlib-versions: Here. New file.
543 * sysdeps/x86_64/x32/shlib-versions: New file.
545 2012-05-14 H.J. Lu <hongjiu.lu@intel.com>
547 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Define x32
548 __SIZEOF_PTHREAD_XXX_T.
549 (__pthread_internal_list): Check __x86_64__ instead of __WORDSIZE.
550 (pthread_mutex_t): Likewise.
551 (pthread_rwlock_t): Likewise.
552 (__PTHREAD_RWLOCK_INT_FLAGS_SHARED): New. Defined if __x86_64__
555 2012-05-11 H.J. Lu <hongjiu.lu@intel.com>
557 * sysdeps/x86_64/x32/tls.h: New file.
559 2012-05-11 H.J. Lu <hongjiu.lu@intel.com>
561 * sysdeps/x86_64/tls.h (THREAD_SETMEM): Use uint64_t on 64-bit
563 (THREAD_SETMEM_NC): Likewise.
565 2012-05-11 H.J. Lu <hongjiu.lu@intel.com>
567 * sysdeps/x86_64/tls.h (THREAD_SELF): Replace movq/%q0 with
570 2012-05-11 H.J. Lu <hongjiu.lu@intel.com>
572 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
573 (__cleanup_fct_attribute): Check __x86_64__ instead of
576 2012-05-11 H.J. Lu <hongjiu.lu@intel.com>
578 * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER): Check
579 __PTHREAD_MUTEX_HAVE_PREV instead of __WORDSIZE.
580 (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Likewise.
581 (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
582 (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
584 2012-05-11 H.J. Lu <hongjiu.lu@intel.com>
586 * pthread_create.c (start_thread): Check __PTHREAD_MUTEX_HAVE_PREV
587 instead of __WORDSIZE.
589 2012-05-10 Thomas Schwinge <thomas@schwinge.name>
592 * sysdeps/pthread/bits/libc-lockP.h (__libc_once_get): New macro.
594 2012-05-09 Chung-Lin Tang <cltang@codesourcery.com>
596 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
597 (__pthread_cond_timedwait): Use CFI directives.
598 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
599 (__pthread_cond_wait): Likewise.
600 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait): Likewise.
601 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
603 2012-05-03 David S. Miller <davem@davemloft.net>
605 * sysdeps/sparc/sparc64/pthread_spin_unlock.S: Fix thinko, we
606 always have to return 0, especially for the pthread_spin_init
608 * sysdeps/sparc/sparc32/pthread_spin_lock.S: Add missing trailing
610 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.S: Likewise.
611 * sysdeps/sparc/sparc64/pthread_spin_lock.S: Likewise.
613 2012-05-02 David S. Miller <davem@davemloft.net>
615 * sysdeps/sparc/sparc64/pthread_spin_lock.S: New.
616 * sysdeps/sparc/sparc64/pthread_spin_lock.c: Delete.
617 * sysdeps/sparc/sparc64/pthread_spin_unlock.S: New.
618 * sysdeps/sparc/sparc64/pthread_spin_unlock.c: Delete.
619 * sysdeps/sparc/sparc64/pthread_spin_trylock.S: New.
620 * sysdeps/sparc/sparc64/pthread_spin_trylock.c: Delete.
621 * sysdeps/sparc/sparc64/pthread_spin_init.c: New.
622 * sysdeps/sparc/sparc32/pthread_spin_lock.S: New.
623 * sysdeps/sparc/sparc32/pthread_spin_lock.c: Delete.
624 * sysdeps/sparc/sparc32/pthread_spin_trylock.S: New.
625 * sysdeps/sparc/sparc32/pthread_spin_trylock.c: Delete.
626 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.S: New.
627 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: Delete.
628 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.S: New.
629 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: Delete.
630 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.S: New.
631 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: Delete.
632 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_init.c: New.
634 2012-05-02 Allan McRae <allan@archlinux.org>
636 * Makefile: (LDFLAGS-tst-tls5): Use $(no-as-needed).
637 (LDFLAGS-tst-cancel24): Likewise.
639 2012-05-02 Paul Pluzhnikov <ppluzhnikov@google.com>
641 * sysdeps/i386/pthread_spin_lock.S: New.
642 * sysdeps/i386/pthread_spin_lock.c: Delete.
643 * sysdeps/x86_64/pthread_spin_lock.S: New.
644 * sysdeps/x86_64/pthread_spin_lock.c: Delete.
646 2012-04-28 Andreas Schwab <schwab@linux-m68k.org>
648 * Makefile ($(objpfx)tst-stack3-mem, $(objpfx)tst-tls6.out): Don't
649 run when cross-compiling.
651 2012-04-26 Siddhesh Poyarekar <siddhesh@redhat.com>
653 * sysdeps/pthread/unwind-forcedunwind.c: Include gnu/lib-names.h
654 instead of libgcc_s.h.
656 2012-04-20 Paul Pluzhnikov <ppluzhnikov@google.com>
658 * sysdeps/x86_64/tls.h (TLS_GET_FS, TLS_SET_FS): Delete.
660 2012-03-27 David S. Miller <davem@davemloft.net>
662 * tst-cond16.c (do_test): Use a thread stack size which is either
663 PTHREAD_STACK_MIN or the page size, whichever is larger.
664 * tst-cond18.c (do_test): Likewise.
666 2012-03-19 H.J. Lu <hongjiu.lu@intel.com>
668 * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Use
669 register char * __asm__("rsp") to get stack frame.
671 2012-03-19 H.J. Lu <hongjiu.lu@intel.com>
673 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (SYS_futex): Use
676 2012-03-19 H.J. Lu <hongjiu.lu@intel.com>
678 * unwind.c (unwind_stop): Cast _Unwind_GetCFA return to
681 2012-03-16 David S. Miller <davem@davemloft.net>
684 * sysdeps/unix/sysv/linux/libc-lowlevellock.c: Include using <..>
686 * sysdeps/unix/sysv/linux/sparc/sparc32/libc-lowlevellock.c:
689 2012-03-15 David S. Miller <davem@davemloft.net>
692 * sysdeps/unix/sysv/linux/sparc/sparc32/libc-lowlevellock.c: New file.
694 2012-03-09 Paul Eggert <eggert@cs.ucla.edu>
697 * pt-crti.S: Replace FSF snail mail address with URL.
699 2012-03-09 Joseph Myers <joseph@codesourcery.com>
701 * sysdeps/pthread/pthread.h (__need_clockid_t, __need_timespec):
702 Do not define before including <time.h>.
704 2012-03-08 David S. Miller <davem@davemloft.net>
706 * sysdeps/unix/sysv/linux/sparc/sem_post.c: Update copyright year.
708 2012-03-08 Thomas Schwinge <thomas@codesourcery.com>
710 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
711 Check for timestamp before the Epoch.
713 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait): Fix
716 * tst-sem13.c (do_test): Add another test case.
717 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
718 Fix updating nwaiters.
720 2012-03-07 Joseph Myers <joseph@codesourcery.com>
723 * sysdeps/pthread/configure.in (libc_cv_forced_unwind): Change
724 link test to a compile test.
725 (libc_cv_c_cleanup): Likewise. Declare puts rather than including
727 * sysdeps/pthread/configure: Regenerated.
729 2012-03-07 Ulrich Drepper <drepper@gmail.com>
731 * Makefile (distribute): Remove variable.
733 2012-01-23 Thomas Schwinge <thomas@codesourcery.com>
735 * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Get rid of
736 superfluous assignment.
737 * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c (sem_timedwait):
739 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c
740 (sem_timedwait): Likewise.
742 2012-03-06 Ulrich Drepper <drepper@gmail.com>
744 * sysdeps/pthread/bits/libc-lock.h: Move information not needed in
745 installed headers to...
746 * sysdeps/pthread/bits/libc-lockP.h: ...here. New file.
748 2012-03-06 David S. Miller <davem@davemloft.net>
750 * sysdeps/unix/sysv/linux/sparc/sem_post.c (__new_sem_post): Use
751 atomic_increment and remove unused local variable.
752 (__old_sem_post): Likewise.
754 2012-02-27 David S. Miller <davem@davemloft.net>
756 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Don't refer to
757 non-existing __pthread_attr.
758 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
759 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
760 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
761 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
762 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
764 2012-02-26 Ulrich Drepper <drepper@gmail.com>
766 * sysdeps/pthread/pthread.h: Define __need_clockid_t for __USE_XOPEN2K.
768 * sysdeps/pthread/pthread.h: Define __need_timespec before including
770 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Name pthread_attr_t
772 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
773 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
774 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
775 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
776 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
778 2012-02-21 Joseph Myers <joseph@codesourcery.com>
781 * Makefile (generated): Remove crti.S, crtn.S, defs.h and
783 [crti.S not in sysdirs] (omit-deps): Do not append.
784 [crti.S not in sysdirs] (CFLAGS-pt-initfini.s): Remove variable.
785 [crti.S not in sysdirs] (pt-initfini.c): Remove vpath directive.
786 [crti.S not in sysdirs] ($(objpfx)crti.S): Remove rule.
787 [crti.S not in sysdirs] ($(objpfx)crtn.S): Likewise.
788 [crti.S not in sysdirs] ($(objpfx)defs.h): Likewise.
789 [crti.S not in sysdirs] ($(objpfx)crti.o): Likewise.
790 [crti.S not in sysdirs] ($(objpfx)crtn.o): Likewise.
791 [crti.S in sysdirs] (extra-objs): Append unconditionally.
792 [crti.S in sysdirs] ($(objpfx)crti.o): Define rule
794 * sysdeps/pthread/pt-initfini.c: Remove file.
796 2012-02-16 Richard Henderson <rth@twiddle.net>
798 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: Remove file.
799 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: Remove file.
801 2012-02-15 Kaz Kojima <kkojima@rr.iij4u.or.jp>
803 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: Remove file.
805 2012-02-16 David S. Miller <davem@davemloft.net>
807 * sysdeps/sparc/Makefile: Add -fPIC when building pt-crti.S and crtn.S
809 2012-02-15 Marek Polacek <polacek@redhat.com>
811 * sysdeps/unix/sysv/linux/x86_64/Makefile: Remove file.
813 2012-02-09 Paul Eggert <eggert@cs.ucla.edu>
815 Replace FSF snail mail address with URLs, as per GNU coding standards.
817 2012-02-08 Andreas Schwab <schwab@linux-m68k.org>
819 * Makefile (extra-objs) [crti.S in sysdirs]: Add pt-crti.o.
821 2012-02-08 Joseph Myers <joseph@codesourcery.com>
823 Support crti.S and crtn.S provided directly by architectures.
824 * Makefile [crti.S in sysdirs] (omit-deps): Do not append.
825 [crti.S in sysdirs] (CFLAGS-pt-initfini.s): Do not define variable.
826 [crti.S in sysdirs] ($(objpfx)pt-initfini.s): Disable rule.
827 [crti.S in sysdirs] ($(objpfx)crti.S): Likewise.
828 [crti.S in sysdirs] ($(objpfx)crtn.S): Likewise.
829 [crti.S in sysdirs] ($(objpfx)defs.h): Likewise.
830 [crti.S in sysdirs] ($(objpfx)crti.o): Likewise.
831 [crti.S in sysdirs] ($(objpfx)crtn.o): Likewise.
832 [crti.S in sysdirs] (pt-initfini.c): Remove vpath directive.
833 [crti.S in sysdirs] ($(objpfx)crti.o): New rule.
834 * pt-crti.S: New file.
835 * sysdeps/unix/sysv/linux/i386/Makefile: Remove file.
837 2012-02-03 Joseph Myers <joseph@codesourcery.com>
839 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
840 macros for PIC register setup.
841 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
842 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
843 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
844 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
845 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
847 2012-01-11 Marek Polacek <polacek@redhat.com>
849 * forward.c (FORWARD_NORETURN): Define macro.
850 (__pthread_unwind): Use FORWARD_NORETURN macro to avoid warning.
851 (__pthread_exit): Likewise.
853 2012-01-10 Ulrich Drepper <drepper@gmail.com>
855 * sysdeps/pthread/pthread.h: Add const attribute to pthread_equal.
857 * pthreadP.h: Add noreturn to __pthread_exit.
858 * sysdeps/pthread/pthread-functions.h: Likewise for ptr___pthread_exit.
860 2011-12-30 Adhemerval Zanella <azanella@linux.vnet.ibm.com>
862 * sysdeps/unix/sysv/linux/aio_misc.h (__aio_create_helper_thread):
863 Call pthread_attr_setstacksize() with result of
864 __pthread_get_minstack() to account for application TLS usage.
866 2012-01-08 Marek Polacek <polacek@redhat.com>
868 * sysdeps/unix/sysv/linux/mq_notify.c: Include <nptl/pthreadP.h>.
870 2012-01-07 Ulrich Drepper <drepper@gmail.com>
873 * pthreadP.h: Use const instead of __const.
874 * semaphore.h: Likewise.
875 * sysdeps/pthread/bits/libc-lock.h: Likewise.
876 * sysdeps/pthread/bits/sigthread.h: Likewise.
877 * sysdeps/pthread/pthread.h: Likewise.
879 * Makefile: Remove elf=yes test, only ELF is supported.
881 * shlib-versions: Remove entries for ports architectures.
883 In case anyone cares, the IA-64 architecture could move to ports.
884 * sysdeps/ia64/*: Removed.
885 * sysdeps/unix/sysv/linux/ia64/*: Removed.
887 2011-12-22 Ulrich Drepper <drepper@gmail.com>
889 * sysdeps/pthread/gai_misc.h (__gai_create_helper_thread): Use
890 __pthread_get_minstack.
891 * sysdeps/unix/sysv/linux/mq_notify.c (init_mq_netlink): Likewise.
894 * sysdeps/unix/sysv/linux/timer_routines.c: Get minimum stack size
895 through __pthread_get_minstack.
896 * nptl-init.c (__pthread_initialize_minimal_internal): Get page size
897 directly from _rtld_global_ro.
898 (__pthread_get_minstack): New function.
899 * pthreadP.h: Declare __pthread_get_minstack.
900 * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_get_minstack.
902 2011-12-21 Ulrich Drepper <drepper@gmail.com>
905 * sysdeps/unix/sysv/linux/pthread_getname.c (pthread_getname_np):
906 Correct reading name from file.
908 2011-12-14 Carlos O'Donell <carlos@systemhalted.org>
910 * allocatestack.c (allocate_stack): Return errno on failure.
912 2011-12-14 Jeff Law <law@redhat.com>
915 * pthread_create.c (__pthread_create_2_1): Translate ENOMEM to EAGAIN.
917 2011-11-28 Andreas Schwab <schwab@redhat.com>
919 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Handle
920 EAGAIN from FUTEX_WAIT_REQUEUE_PI.
921 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
923 2011-11-15 Ulrich Drepper <drepper@gmail.com>
925 * pthread_getattr_np.c (pthread_getattr_np): Set FD_CLOEXEC for
928 2011-10-29 Ulrich Drepper <drepper@gmail.com>
931 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
932 (__pthread_cond_timedwait): Initialize %r15 correctly also for code
933 path for kernels with FUTEX_CLOCK_REALTIME.
934 Debugged by H.J. Lu <hjl.tools@gmail.com>.
936 2011-10-27 Andreas Schwab <schwab@redhat.com>
939 * sysdeps/pthread/pthread.h: Use __THREADNL instead of __THREAD
940 for memory synchronization functions.
941 * semaphore.h: Likewise.
943 2011-10-24 Ulrich Drepper <drepper@gmail.com>
945 * tst-cancel7.c: Avoid warning.
946 * tst-mutex6.c: Likewise.
947 * tst-mutex9.c: Likewise.
948 * tst-mutexpi6.c: Likewise.
950 2011-10-23 Ulrich Drepper <drepper@gmail.com>
952 * sysdeps/i386/tls.h: Remove #include <list.h>.
954 2011-10-15 Ulrich Drepper <drepper@gmail.com>
956 * pthread_create.c (start_thread): Call __ctype_init.
958 2011-09-15 Andreas Schwab <schwab@redhat.com>
960 * sysdeps/pthread/list.h: Define only list_t if __need_list_t is
962 (list_add): Add atomic_write_barrier.
963 * descr.h: Define __need_list_t before including <list.h>.
964 * nptl-init.c: Include <list.h>
965 * allocatestack.c: Likewise.
967 2011-09-11 Ulrich Drepper <drepper@gmail.com>
969 * sysdeps/i386/tls.h: Remove HAVE_TLS_SUPPORT test.
970 * sysdeps/ia64/tls.h: Likewise.
971 * sysdeps/powerpc/tls.h: Likewise.
972 * sysdeps/s390/tls.h: Likewise.
973 * sysdeps/sh/tls.h: Likewise.
974 * sysdeps/sparc/tls.h: Likewise.
975 * sysdeps/x86_64/tls.h: Likewise.
977 2011-09-10 Ulrich Drepper <drepper@gmail.com>
979 * sysdeps/pthread/malloc-machine.h: Define MUTEX_INITIALIZER.
981 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Don't handle
983 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
984 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
985 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
986 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
987 * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
988 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
989 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
990 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
991 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
992 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
993 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
994 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
996 * tst-tls1.c: Support for __thread is now mandatory.
997 * tst-tls2.c: Likewise.
998 * tst-tls3.c: Likewise.
999 * tst-tls3mod.c: Likewise.
1000 * tst-tls4.c: Likewise.
1001 * tst-tls4moda.c: Likewise.
1002 * tst-tls4modb.c: Likewise.
1003 * tst-tls5.h: Likewise.
1005 2011-09-08 Ulrich Drepper <drepper@gmail.com>
1008 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
1009 (pthread_rwlock_timedwrlock): Use correct macro in test.
1010 Patch by H.J. Lu <hongjiu.lu@intel.com>.
1012 2011-09-06 Ulrich Drepper <drepper@gmail.com>
1014 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait): Don't
1015 use gettimeofday vsyscall, just call gettimeofday.
1016 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
1017 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
1018 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
1020 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1022 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1023 Simplify __vdso_clock_gettime use.
1025 2011-09-05 David S. Miller <davem@davemloft.net>
1027 * sysdeps/unix/sysv/linux/sem_timedwait.c (do_futex_timed_wait):
1029 (sem_timedwait): Call it to force an exception region around
1030 the async cancel enable and the futex operation.
1031 * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c: Likewise.
1032 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: Likewise.
1033 * sysdeps/unix/sysv/linux/sem_wait.c (do_futex_wait): New function.
1034 (__new_sem_wait): Call it to force an exception region around
1035 the async cancel enable and the futex operation.
1036 * sysdeps/unix/sysv/linux/sparc/sem_wait.c: Likewise.
1037 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: Likewise.
1039 2011-08-31 Andreas Schwab <schwab@redhat.com>
1041 * allocatestack.c (setxid_mark_thread): Ensure that the exiting
1044 2011-08-20 David S. Miller <davem@davemloft.net>
1046 * Makefile (tst-cleanup0.out): Fix typo in output redirection.
1048 2011-08-14 Roland McGrath <roland@hack.frob.com>
1050 * sysdeps/i386/pthreaddef.h (TCB_ALIGNMENT): Set to 64, optimal on Atom.
1051 * sysdeps/x86_64/pthreaddef.h (TCB_ALIGNMENT): Likewise.
1053 2011-08-08 Andreas Schwab <schwab@redhat.com>
1055 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Maintain aligned
1057 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1058 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1060 2011-07-22 Ulrich Drepper <drepper@gmail.com>
1062 * sysdeps/pthread/unwind-forcedunwind.c (_Unwind_Resume): Add read
1064 (__gcc_personality_v0): Likewise.
1065 (_Unwind_ForcedUnwind): Likewise.
1066 (_Unwind_GetCFA): Likewise.
1068 2011-07-14 Roland McGrath <roland@hack.frob.com>
1070 * allocatestack.c (__reclaim_stacks): Use uintptr_t cast rather than
1073 2011-06-30 Ulrich Drepper <drepper@gmail.com>
1075 * nptl-init.c (__nptl_set_robust): New function.
1076 (pthread_functions): Add reference.
1077 * npthreadP.h: Declare __nptl_set_robust.
1078 * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
1079 ptr_set_robust member.
1080 * sysdeps/unix/sysv/linux/fork.c: Call set_robust_list syscall in
1081 child if threads are used.
1083 2011-06-14 Andreas Jaeger <aj@suse.de>
1085 * pthread_rwlock_init.c: Include <string.h> for memset declaration.
1087 2011-05-11 Ulrich Drepper <drepper@gmail.com>
1090 * allocatestack.c (allocate_stack): Convert ENOMEM error to EAGAIN.
1092 2011-04-10 Ulrich Drepper <drepper@gmail.com>
1095 * allocatestack.c (get_cached_stack): Deallocate DTV entries before
1097 Patch partly by Robert Rex <robert.rex@exasol.com>.
1099 2011-01-19 Roland McGrath <roland@redhat.com>
1101 * pthread_cond_wait.c (__pthread_cond_wait): Fix comment typo.
1102 * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
1103 * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Likewise.
1104 * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
1105 * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock): Likewise.
1106 * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock): Likewise.
1108 2011-01-16 Andreas Schwab <schwab@linux-m68k.org>
1110 * Makefile (test-extras): Add tst-cleanup4aux.
1112 2011-01-14 Ulrich Drepper <drepper@gmail.com>
1115 * sysdeps/pthread/setxid.h (__SETXID_1): Add cast to assignment.
1116 (__SETXID_2): Likewise.
1117 (__SETXID_3): Likewise.
1119 2011-01-13 Ulrich Drepper <drepper@gmail.com>
1122 * Versions [libc] (GLIBC_PRIVATE): Export __libc_alloca_cutoff.
1123 * alloca_cutoff.c: Add libc_hidden_def.
1125 2010-10-13 H.J. Lu <hongjiu.lu@intel.com>
1128 * sysdeps/x86_64/pthreaddef.h (TCB_ALIGNMENT): Changed to 32.
1129 * sysdeps/x86_64/tls.h (TLS_TCB_ALIGN): Defined with alignment
1130 of "struct pthread".
1132 2010-09-21 Andreas Schwab <schwab@redhat.com>
1134 * sysdeps/pthread/pthread.h (pthread_cleanup_push)
1135 [!__EXCEPTIONS]: Mangle local variable not_first_call.
1136 (pthread_cleanup_push_defer_np): Likewise.
1138 2010-09-03 Ulrich Drepper <drepper@redhat.com>
1140 * sysdeps/pthread/allocalim.h (__libc_use_alloca): Expect blocks are
1143 2010-08-10 Dinakar Guniguntala <dino@in.ibm.com>
1144 Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
1146 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: If
1147 FUTEX_WAKE_OP fails make sure to call FUTEX_WAKE instead.
1149 2010-08-12 H.J. Lu <hongjiu.lu@intel.com>
1151 * sysdeps/unix/sysv/linux/i386/Makefile: New file.
1153 2010-05-01 Alan Modra <amodra@gmail.com>
1155 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
1156 (PSEUDO): Use correct cr save. Don't use wrong parm save area
1157 to save temps. Correct cfi for possible later frame manipulation.
1158 (DOCARGS_1, UNDOCARGS_1): Use the correct parm save area.
1159 (DOCARGS_2, UNDOCARGS_2, DOCARGS_3, UNDOCARGS_3): Likewise.
1160 (DOCARGS_4, UNDOCARGS_4, DOCARGS_5, UNDOCARGS_5): Likewise.
1161 (DOCARGS_6, UNDOCARGS_6): Likewise.
1162 (CENABLE, CDISABLE): Add nops for non-shared calls.
1164 2010-07-06 Andreas Schwab <schwab@redhat.com>
1166 * sysdeps/unix/sysv/linux/pthread_getname.c (pthread_getname_np):
1169 2010-07-03 Ulrich Drepper <drepper@redhat.com>
1171 * tst-abstime.c (do_test): Some more cleanups
1173 2010-07-02 Ulrich Drepper <drepper@redhat.com>
1175 * tst-abstime.c: Correct testing and add test for sem_timedwait.
1177 2010-07-01 Andreas Schwab <schwab@redhat.com>
1178 Ulrich Drepper <drepper@redhat.com>
1180 * Makefile (tests): Add tst-abstime.
1181 * tst-abstime.c: New file.
1182 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
1183 (__lll_timedlock_wait): Check for timestamp before the Epoch.
1184 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
1185 (__lll_timedlock_wait): Likewise.
1186 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
1187 (__lll_robust_timedlock_wait): Likewise.
1188 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1189 (__pthread_cond_timedwait): Likewise.
1190 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
1191 (pthread_rwlock_timedrdlock): Likewise.
1192 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
1193 (pthread_rwlock_timedwrlock): Likewise.
1194 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
1197 2010-07-01 Ulrich Drepper <drepper@redhat.com>
1199 * Makefile (tst-_res1): Add tst-_res1mod1 to dependency list.
1201 2010-06-01 Takashi Yoshii <takashi.yoshii.zj@renesas.com>
1203 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Fix incorrect
1204 location of ifndef __ASSUME_FUTEX_CLOCK_REALTIME.
1206 2010-04-09 Ulrich Drepper <drepper@redhat.com>
1209 * sysdeps/unix/sysv/linux/pthread_getname.c: New file.
1210 * sysdeps/unix/sysv/linux/pthread_setname.c: New file.
1211 * nptl/sysdeps/pthread/pthread.h: Declare pthread_getname and
1213 * Makefile (libpthread-routines): Add pthread_getname and
1215 * Versions: Export pthread_getname and pthread_setname for GLIBC_2.12.
1217 2010-04-05 Thomas Schwinge <thomas@schwinge.name>
1219 * sysdeps/pthread/unwind-resume.c: Moved to main tree sysdeps/gnu/.
1220 * sysdeps/pthread/rt-unwind-resume.c: Likewise.
1221 * sysdeps/pthread/Makefile: Remove csu section and rt section's
1222 unwind-resume bits, now in main tree sysdeps/gnu/Makefile instead.
1224 2010-03-23 Luis Machado <luisgpm@br.ibm.com>
1226 * pthread_cond_timedwait.c: Add check for
1227 HAVE_CLOCK_GETTIME_VSYSCALL to use VDSO whenever possible.
1228 (pthread_cond_timedwait): Use INTERNAL_VSYSCALL instead of
1231 2010-03-09 Ulrich Drepper <drepper@redhat.com>
1233 * pthread_create.c (__pthread_create_2_1): If priorities are incorrect
1234 and the call fails wake eventually waiting setxid threads. Don't free
1235 stack here if we try starting a thread.
1236 * sysdeps/pthread/createthread.c (do_clone): Only wake setxid waiter
1237 if the clone call failed.
1239 2010-03-08 Andreas Schwab <schwab@redhat.com>
1241 * pthread_create.c (__pthread_create_2_1): Don't set setxid_futex.
1242 * allocatestack.c (get_cached_stack): Set setxid_futex.
1243 (allocate_stack): Likewise.
1245 2010-03-05 Andreas Schwab <schwab@redhat.com>
1246 Ulrich Drepper <drepper@redhat.com>
1248 * allocatestack.c (setxid_mark_thread): Delay handling of thread if
1249 it is creating a thread or it is just being created.
1250 * pthread_create.c (start_thread): Wake setxid thread if it is
1252 (__pthread_create_2_1): Initialize setxid_futex.
1253 * sysdeps/pthread/createthread.c (do_clone): Wake setxid thread if it
1256 2010-01-15 Ulrich Drepper <drepper@redhat.com>
1258 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
1260 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1262 2010-01-15 Michal Schmidt <mschmidt@redhat.com>
1264 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
1265 Fix pthread_cond_timedwait with requeue-PI.
1266 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
1267 Fix pthread_cond_wait with requeue-PI.
1269 2010-01-14 Ulrich Drepper <drepper@redhat.com>
1271 * Versions: Add pthread_mutex_consistent, pthread_mutexattr_getrobust,
1272 and pthread_mutexattr_setrobust for GLIBC_2.12.
1273 * pthread_mutex_consistent.c: Define alias pthread_mutex_consistent.
1274 * pthread_mutexattr_getrobust.c: Define alias
1275 pthread_mutexattr_getrobust.
1276 * pthread_mutexattr_setrobust.c: Define alias
1277 pthread_mutexattr_setrobust.
1279 2010-01-12 Ulrich Drepper <drepper@redhat.com>
1281 * sysdeps/pthread/pthread.h: Cleanup. Fix up for XPG7.
1283 2010-01-08 Ulrich Drepper <drepper@redhat.com>
1285 * sysdeps/pthread/pthread.h: Fix pthread_mutex_consistent declaration.
1287 2009-12-18 Thomas Schwinge <thomas@codesourcery.com>
1289 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c (_init): Don't
1290 call __gmon_start__.
1291 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c (_init): Likewise.
1293 2009-12-17 Ulrich Drepper <drepper@redhat.com>
1295 * pthread_rwlock_init.c (__pthread_rwlock_init): Simplify code by
1298 2009-12-01 Dinakar Guniguntala <dino@in.ibm.com>
1300 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.h: Define
1301 FUTEX_WAIT_REQUEUE_PI and FUTEX_CMP_REQUEUE_PI.
1302 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: If mutex
1303 is a non robust PI mutex, then use FUTEX_CMP_REQUEUE_PI.
1304 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
1305 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: If mutex
1306 is a non robust PI mutex, then use FUTEX_WAIT_REQUEUE_PI.
1307 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1309 2009-12-12 Ulrich Drepper <drepper@redhat.com>
1311 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
1312 Don't update nwaiters after invalid timeout is recognized.
1314 2009-11-27 Thomas Schwinge <thomas@codesourcery.com>
1316 * sysdeps/unix/sysv/linux/sh/pt-initfini.c (_init): Don't call
1319 2009-11-27 Andreas Schwab <schwab@redhat.com>
1321 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Reload
1322 THREAD_SELF->cancelhandling after returning from futex call.
1324 2009-11-24 Ulrich Drepper <drepper@redhat.com>
1326 * tst-sem13.c: New file.
1327 * Makefile (tests): Add tst-sem13.
1329 2009-11-22 Roland McGrath <roland@redhat.com>
1331 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: # include "i686/dl-sysdep.h"
1332 instead of recapitulating its contents.
1334 2009-11-18 Ulrich Drepper <drepper@redhat.com>
1336 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Minor
1337 optimizations and cleanups.
1339 2009-11-18 Dinakar Guniguntala <dino@in.ibm.com>
1341 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
1342 Remove redundant code. Fix cfi offsets.
1343 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
1346 2009-11-17 Ulrich Drepper <drepper@redhat.com>
1348 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Minimally
1349 reduce size of unwind info.
1351 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Convert to use
1353 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1354 Based on a patch by Dinakar Guniguntala <dino@in.ibm.com>.
1356 2009-11-03 Andreas Schwab <schwab@linux-m68k.org>
1359 * sysdeps/pthread/unwind-resume.c: Include <libgcc_s.h> and use
1361 * sysdeps/pthread/unwind-forcedunwind.c: Likewise.
1363 2009-10-30 Ulrich Drepper <drepper@redhat.com>
1365 * tst-sem11.c (main): Rewrite to avoid aliasing problems.
1368 * allocatestack.c (__nptl_setxid): Perform the operation in multiple
1369 steps to avoid races with creation and terminations.
1370 * nptl-init.c (sighandler_setxid): Adjust.
1371 Patch by Daniel Jacobowitz.
1373 2009-09-07 Andreas Schwab <schwab@redhat.com>
1375 * sysdeps/pthread/bits/libc-lock.h (BP_SYM): Remove space before paren.
1377 2009-09-02 Suzuki K P <suzuki@in.ibm.com>
1378 Joseph Myers <joseph@codesourcery.com>
1381 * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
1382 Initialize the sigev_notify field for newly created timer to make sure
1383 the timer gets deleted from the active timer's list upon timer_delete.
1385 2009-08-27 Andrew Stubbs <ams@codesourcery.com>
1387 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
1388 Correct a logic error.
1390 2009-08-25 Ulrich Drepper <drepper@redhat.com>
1392 * sysdeps/x86_64/tls.h (RTLD_ENABLE_FOREIGN_CALL): Store old value
1393 of the field in local variables.
1394 (RTLD_FINALIZE_FOREIGN_CALL): Restore rtld_must_xmm_save from local
1395 variable and don't unconditionally clear it.
1397 2009-08-24 Ulrich Drepper <drepper@redhat.com>
1399 * pthread_create.c (start_thread): Hint to the kernel that memory for
1400 the stack can be reused. We do not mark all the memory. The part
1401 still in use and some reserve are kept.
1403 2009-08-23 Ulrich Drepper <drepper@redhat.com>
1405 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Clean up namespace.
1407 2009-08-11 Ulrich Drepper <drepper@redhat.com>
1409 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Add CFI
1412 2009-08-10 Ulrich Drepper <drepper@redhat.com>
1414 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Add CFI
1416 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
1418 2009-08-10 Andreas Schwab <schwab@redhat.com>
1420 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
1421 (__pthread_cond_signal): Don't clobber register used for syscall
1424 2009-08-08 Ulrich Drepper <drepper@redhat.com>
1426 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
1427 Optimize code path used when FUTEX_CLOCK_REALTIME is supported.
1429 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
1430 (__pthread_cond_wait): Optimize by avoiding use of callee-safe
1433 2009-08-07 Ulrich Drepper <drepper@redhat.com>
1435 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Little optimizations
1436 enabled by the special *_asynccancel functions.
1437 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1438 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1440 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Include lowlevellock.h.
1442 2009-08-04 Ulrich Drepper <drepper@redhat.com>
1444 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: New file.
1445 * sysdeps/unix/sysv/linux/x86_64/libc-cancellation.S: New file.
1446 * sysdeps/unix/sysv/linux/x86_64/librt-cancellation.S: New file.
1447 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Optimize
1448 since we can assume the special __*_{en,dis}able_asynccancel
1450 (PUSHARGS_*, POPARGS_*, SAVESTK_*, RESTSTK_*): Removed.
1451 * sysdeps/x86_64/tcb-offsets.sym: Add cancellation-related bits
1452 and PTHREAD_CANCELED.
1454 2009-07-31 Ulrich Drepper <drepper@redhat.com>
1456 * descr.h: Better definition of *_BITMASK macros for cancellation.
1458 2009-07-29 Ulrich Drepper <drepper@redhat.com>
1460 * sysdeps/x86_64/tls.h (TLS_TCB_ALIGN): Define explicitly to 32.
1462 * sysdeps/x86_64/tls.h (tcbhead_t): Add room for SSE registers the
1463 dynamic linker might have to save.
1464 Define RTLD_CHECK_FOREIGN_CALL, RTLD_ENABLE_FOREIGN_CALL,
1465 RTLD_PREPARE_FOREIGN_CALL, and RTLD_FINALIZE_FOREIGN_CALL. Pretty
1468 * sysdeps/x86_64/tcb-offsets.sym: Add RTLD_SAVESPACE_SSE.
1470 2009-07-28 Ulrich Drepper <drepper@redhat.com>
1472 * pthread_mutex_lock.c [NO_INCR] (__pthread_mutex_cond_lock_adjust):
1474 * pthreadP.h: Declare __pthread_mutex_cond_lock_adjust.
1475 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: Add ROBUST_BIT.
1476 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Don't use
1477 requeue_pi for robust mutexes.
1478 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
1479 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1480 Don't only skip __pthread_mutex_cond_lock. Call instead
1481 __pthread_mutex_cond_lock_adjust.
1482 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1484 * pthread_mutex_unlock.c (__pthread_mutex_unlock_full): Minor
1485 optimization of PI mutex handling.
1487 2009-07-27 Ulrich Drepper <drepper@redhat.com>
1490 * pthread_mutex_unlock.c (__pthread_mutex_unlock_full): Use _rel
1491 instead of of _acq variants of cmpxchg.
1493 2009-07-23 Ulrich Drepper <drepper@redhat.com>
1495 * sysdeps/x86_64/configure.in: New file.
1497 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix error
1498 path when not using absolute timeout futex.
1500 2009-07-20 Ulrich Drepper <drepper@redhat.com>
1502 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Minor
1503 optimizations of last changes.
1504 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1506 2009-07-19 Ulrich Drepper <drepper@redhat.com>
1508 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
1509 FUTEX_WAIT_REQUEUE_PI and FUTEX_CMP_REQUEUE_PI.
1510 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: If mutex
1511 is a PI mutex, then use FUTEX_CMP_REQUEUE_PI.
1512 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
1513 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: If mutex
1514 is a PI mutex, then use FUTEX_WAIT_REQUEUE_PI.
1515 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1517 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1518 (__pthread_cond_timedwait): Make more robust.
1520 2009-07-18 Ulrich Drepper <drepper@redhat.com>
1522 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
1523 (__lll_robust_timedlock_wait): If possible use FUTEX_WAIT_BITSET to
1524 directly use absolute timeout.
1526 * tst-sem5.c (do_test): Add test for premature timeout.
1527 * Makefile: Linu tst-sem5 with librt.
1529 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
1530 (pthread_rwlock_timedwrlock): If possible use FUTEX_WAIT_BITSET to
1531 directly use absolute timeout.
1532 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
1533 (pthread_rwlock_timedrdlock): Likewise.
1535 * tst-cond11.c (run_test): Add test to check that the timeout is
1538 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
1539 (__pthread_cond_timedwait): If possible use FUTEX_WAIT_BITSET to
1540 directly use absolute timeout.
1542 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
1543 (__pthread_cond_wait): Convert to using exception handler instead of
1544 registered unwind buffer.
1545 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1546 (__pthread_cond_timedwait): Likewise.
1548 2009-07-17 Ulrich Drepper <drepper@redhat.com>
1550 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
1551 If possible use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME to directly
1552 use absolute timeout.
1554 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Optimize
1555 handling of uncontested semaphore.
1557 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
1558 (__condvar_cleanup): Rewrite to use cfi directives instead of
1559 hand-coded unwind tables.
1560 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S (__pthread_once):
1562 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
1563 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
1566 2009-06-12 Ulrich Drepper <drepper@redhat.com>
1568 * Makefile (libpthread-routines): Add pthread_sigqueue.
1569 * Versions: Add pthread_sigqueue for GLIBC_2.11.
1570 * sysdeps/pthread/bits/sigthread.h: Declare pthread_sigqueue.
1571 * sysdeps/unix/sysv/linux/pthread_sigqueue.c: New file.
1573 2009-06-11 Ulrich Drepper <drepper@redhat.com>
1576 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
1577 (LOAD_FUTEX_WAIT_ABS): Fix futex parameter in case private futexes
1579 Patch by Bryan Kadzban <bz-glibc@kdzbn.homelinux.net>.
1581 2009-05-16 Ulrich Drepper <drepper@redhat.com>
1583 * libc-cancellation.c: Move __libc_cleanup_routine to...
1584 * libc-cleanup.c: ...here. New file.
1585 * Makefile (routines): Add libc-cleanup.
1587 * cancellation.c (__pthread_disable_asynccancel): Remove unnecessary
1589 * libc-cancellation.c: Use <nptl/cancellation.c: to define the code.
1590 * sysdeps/pthread/librt-cancellation.c: Likewise.
1593 * nptl-init.c: Renamed from init.c.
1594 * Makefile: Change all occurences of init.c to nptl-init.c.
1596 2009-05-15 Ulrich Drepper <drepper@redhat.com>
1598 * cancellation.c (__pthread_disable_asynccancel): Correct the bits
1599 to test when deciding on the delay.
1600 * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
1601 * pthread_cancel.c: Close race between deciding on sending a signal
1602 and setting the CANCELING_BIT bit.
1604 * cancellation.c (__pthread_disable_asynccancel): Don't return if
1606 * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
1608 2009-04-27 Ulrich Drepper <drepper@redhat.com>
1610 * cancellation.c (__pthread_disable_asynccancel): Use THREAD_ATOMIC_AND
1612 * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
1613 * sysdeps/x86_64/tls.h: Define THREAD_ATOMIC_AND.
1614 * sysdeps/i386/tls.h: Likewise.
1615 (tcbhead_t): Add __private_tm member.
1617 2009-04-26 Ulrich Drepper <drepper@redhat.com>
1619 * sem_open.c (sem_open): Rewrite initialization of initsem to
1622 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
1623 Avoid warning by using may_alias attribute on ptrhack.
1625 2009-04-22 Ulrich Drepper <drepper@redhat.com>
1628 * pthread_attr_setschedparam.c (__pthread_attr_setschedparam):
1629 Check policy and priority for validity.
1630 Patch mostly by Zhang Xiliang <zhangxiliang@cn.fujitsu.com>.
1632 2009-03-15 Ulrich Drepper <drepper@redhat.com>
1634 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1635 (__pthread_cond_timedwait): Change to use cfi directives instead of
1636 hand-coded unwind sections.
1638 2009-03-10 Ulrich Drepper <drepper@redhat.com>
1640 * init.c (nptl_freeres): Compile only for SHARED.
1642 2009-03-09 Jakub Jelinek <jakub@redhat.com>
1644 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Define
1645 FUTEX_WAIT_BITSET, FUTEX_WAKE_BITSET, FUTEX_CLOCK_REALTIME and
1646 FUTEX_BITSET_MATCH_ANY.
1648 2009-02-27 Roland McGrath <roland@redhat.com>
1650 * init.c (__nptl_initial_report_events): Mark __attribute_used__.
1651 * pthread_create.c (__nptl_threads_events, __nptl_last_event): Likewise.
1653 2009-02-26 Ulrich Drepper <drepper@redhat.com>
1655 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
1656 _POSIX_THREAD_ROBUST_PRIO_INHERIT and
1657 _POSIX_THREAD_ROBUST_PRIO_PROTECT. Reset value of macros from
1660 2009-02-25 Ulrich Drepper <drepper@redhat.com>
1662 * sysdeps/pthread/pthread.h: The robust mutex functions are in
1665 2009-02-24 Ulrich Drepper <drepper@redhat.com>
1667 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_BITS_POSIX_OPT_H):
1668 Unify name of include protector macro.
1670 2009-02-14 SUGIOKA Toshinobu <sugioka@itonet.co.jp>
1672 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
1673 LOAD_FUTEX_WAIT_ABS even if (FUTEX_WAIT == 0).
1675 2009-01-29 Ulrich Drepper <drepper@redhat.com>
1677 * sysdeps/pthread/unwind-forcedunwind.c: Encrypt all function
1680 * allocatestack.c (__free_stacks): Renamed from free_stacks.
1681 (__free_stack_cache): Removed. Change callers to call __free_stacks.
1682 * init.c (nptl_freeres): New function.
1683 (pthread_functions): Initialize ptr_freeres to nptl_freeres.
1684 * pthreadP.h: Don't declare __free_stack_cache. Declare __free_stacks.
1685 * sysdeps/pthread/unwind-forcedunwind.c (libgcc_s_handle): New
1687 (pthread_cancel_init): Depend in libgcc_s_handle for decision to
1688 load DSO. Assign last.
1689 (__unwind_freeres): New function.
1691 * allocatestack.c (__reclaim_stacks): Reset in_flight_stack later
1692 for better debugging. No need to use stack_list_add here.
1694 2009-01-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1696 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
1697 (__lll_timedlock_wait): Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME
1698 instead of computing relative timeout.
1699 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
1700 FUTEX_CLOCK_REALTIME and FUTEX_BITSET_MATCH_ANY.
1702 2009-01-25 Ulrich Drepper <drepper@redhat.com>
1704 * pthread_mutex_lock.c (__pthread_mutex_lock): Remove unused label out.
1706 2009-01-08 Ulrich Drepper <drepper@redhat.com>
1708 * sysdeps/pthread/list.h (list_add): Initialize new element first.
1709 (list_add_tail): Removed.
1711 2009-01-07 Ulrich Drepper <drepper@redhat.com>
1713 * (in_flight_stack): New variable.
1714 (stack_list_del): New function. Use instead of list_del.
1715 (stack_list_add): New function. Use instead of list_add when adding to
1716 stack_cache and stack_used lists.
1717 (__reclaim_stacks): Complete operations on stack_cache and stack_used lists
1718 when the fork call interrupted another thread.
1720 2009-01-04 Ulrich Drepper <drepper@redhat.com>
1722 * init.c (__pthread_initialize_minimal_internal): Optimize test
1723 FUTEX_CLOCK_REALTIME a bit.
1725 2009-01-03 Ulrich Drepper <drepper@redhat.com>
1727 * init.c (__pthread_initialize_minimal_internal): Cheat a bit by
1728 only passing five parameters to FUTEX_WAIT_BITSET call.
1730 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
1731 (__lll_timedlock_wait): Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME
1732 instead of computing relative timeout.
1734 2009-01-02 Ulrich Drepper <drepper@redhat.com>
1736 * init.c (__pthread_initialize_minimal_internal): Check for
1737 FUTEX_CLOCK_REALTIME flag.
1738 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
1739 Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME instead of computing
1742 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
1743 FUTEX_CLOCK_REALTIME and FUTEX_BITSET_MATCH_ANY.
1744 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
1745 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
1746 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
1747 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
1749 2008-12-09 Ulrich Drepper <drepper@redhat.com>
1751 * sysdeps/pthread/pthread.h (pthread_cleanup_pop): Use { } as empty
1752 loop body instead of ; to avoid gcc warnings.
1753 (pthread_cleanup_pop_restore_np): Likewise.
1754 Patch by Caolán McNamara <caolanm@redhat.com>.
1756 2008-12-09 Jakub Jelinek <jakub@redhat.com>
1758 * pthread_mutex_lock.c (__pthread_mutex_lock): Handle only the
1759 fast path here, for robust/PI/PP mutexes call
1760 __pthread_mutex_lock_full. Don't use switch, instead use a series
1761 of ifs according to their probability.
1762 (__pthread_mutex_lock_full): New function.
1763 * pthread_mutex_unlock.c: Include assert.h.
1764 (__pthread_mutex_unlock_usercnt): Handle only the
1765 fast path here, for robust/PI/PP mutexes call
1766 __pthread_mutex_unlock_full. Don't use switch, instead use a series
1767 of ifs according to their probability.
1768 (__pthread_mutex_unlock_full): New function.
1769 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c
1770 (__pthread_mutex_lock_full): Define.
1772 2008-12-08 Ulrich Drepper <drepper@redhat.com>
1774 * sysdeps/x86_64/tls.h (tcbhead_t): Add fields reserved for TM
1775 implementation. Add necessary padding and.
1776 * descr.h (struct pthread): Increase padding for tcbhead_t to 24
1779 2008-12-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1781 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define FUTEX_WAIT_BITSET
1782 and FUTEX_WAKE_BITSET.
1784 2008-12-02 Ulrich Drepper <drepper@redhat.com>
1786 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_WAIT_BITSET
1787 and FUTEX_WAKE_BITSET.
1788 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
1789 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
1790 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
1791 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
1793 2008-11-25 Roland McGrath <roland@redhat.com>
1795 * sysdeps/alpha, sysdeps/unix/sysv/linux/alpha:
1796 Subdirectories moved to ports repository as
1797 sysdeps/.../nptl subdirectories.
1799 2008-11-12 Jakub Jelinek <jakub@redhat.com>
1802 * pthread_condattr_setclock.c (pthread_condattr_setclock): Fix masking
1804 * pthread_cond_init.c (__pthread_cond_init): Fix
1805 cond->__data.__nwaiters initialization.
1806 * Makefile (tests): Add tst-cond23.
1807 * tst-cond23.c: New test.
1809 2008-11-07 Jakub Jelinek <jakub@redhat.com>
1811 * sysdeps/pthread/malloc-machine.h (MALLOC): Adjust __libc_tsd_define
1813 (tsd_setspecific, tsd_getspecific): Adjust __libc_tsd_{set,get}
1816 2008-11-01 Ulrich Drepper <drepper@redhat.com>
1819 * pthread_mutex_lock.c: Add support for private PI mutexes.
1820 * pthread_mutex_timedlock.c: Likewise.
1821 * pthread_mutex_trylock.c: Likewise.
1822 * pthread_mutex_unlock.c: Likewise.
1823 Patch mostly by Ben Jackson <ben@ben.com>.
1825 2008-10-31 Ulrich Drepper <drepper@redhat.com>
1828 * sysdeps/pthread/gai_misc.h (__gai_create_helper_thread):
1829 Increase stack size for helper thread.
1831 2008-10-06 Martin Schwidefsky <schwidefsky@de.ibm.com>
1833 * sysdeps/s390/tls.h (THREAD_SET_STACK_GUARD): Add empty inline
1834 assembly with a clobber list for access registers a0 and a1.
1836 2008-09-11 Martin Schwidefsky <schwidefsky@de.ibm.com>
1838 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Add memory barrier
1839 to force runp->refcntr to be read from memory.
1841 2008-09-08 Richard Guenther <rguenther@suse.de>
1843 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_lock,
1844 lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
1845 lll_timedlock, lll_robust_timedlock, lll_unlock,
1846 lll_robust_unlock): Promote private to int.
1848 2008-08-15 Ulrich Drepper <drepper@redhat.com>
1850 * sysdeps/x86_64/pthreaddef.h: Remove ARCH_MAP_FLAGS and
1851 ARCH_RETRY_MMAP definitions.
1852 * allocatestack.c: Remove definition of ARCH_MAP_FLAGS.
1853 Define MAP_STACK when not defined.
1854 (allocate_stack): Use MAP_STACK instead of ARCH_MAP_FLAGS. Remove
1855 handling of ARCH_RETRY_MMAP.
1857 2008-07-30 Ulrich Drepper <drepper@redhat.com>
1859 * tst-align2.c (f): Print message that f is reached.
1861 2008-04-28 Hiroki Kaminaga <kaminaga@sm.sony.co.jp>
1864 * sysdeps/powerpc/tcb-offsets.sym (PRIVATE_FUTEX_OFFSET): Guard symbol
1865 definition with #ifndef __ASSUME_PRIVATE_FUTEX.
1867 2008-07-25 Ulrich Drepper <drepper@redhat.com>
1869 * sysdeps/unix/sysv/linux/mq_notify.c (init_mq_netlink): Use
1870 SOCK_CLOEXEC if possible.
1872 2008-05-29 Ulrich Drepper <drepper@redhat.com>
1874 * Makefile (tests): Add tst-rwlock2a.
1875 * tst-rwlock2.c: Use TYPE macro to decide what rwlock type to use.
1876 * tst-rwlock2a.c: New file.
1878 2008-06-12 Ulrich Drepper <drepper@redhat.com>
1880 * sysdeps/pthread/pthread.h: Remove inadvertant checkin.
1882 2008-05-17 Samuel Thibault <samuel.thibault@ens-lyon.org>
1884 * sysdeps/pthread/pthread.h: Fix typo in comment.
1886 2008-05-28 Ulrich Drepper <drepper@redhat.com>
1888 * sysdeps/pthread/createthread.c (do_clone): Pass accurate length
1889 of CPU set to the kernel.
1891 2008-05-23 Paul Pluzhnikov <ppluzhnikov@google.com>
1893 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Add
1895 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
1896 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
1897 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
1898 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
1899 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
1900 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
1902 2008-05-22 Paul Pluzhnikov <ppluzhnikov@google.com>
1904 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S: Add
1906 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1908 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
1910 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1913 2008-05-26 Ulrich Drepper <drepper@redhat.com>
1915 * tst-typesizes.c: Explicitly check __SIZEOF_PTHREAD_* constants.
1917 2008-05-20 Jakub Jelinek <jakub@redhat.com>
1919 David S. Miller <davem@davemloft.net>
1921 * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: New file.
1923 2008-05-10 Ulrich Drepper <drepper@redhat.com>
1925 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Access
1926 __pshared correctly.
1927 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1929 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1931 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
1933 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
1935 Reported by Clemens Kolbitsch <clemens.kol@gmx.at>.
1937 2008-04-14 David S. Miller <davem@davemloft.net>
1939 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
1940 (__old_sem_wait): Fix argument to lll_futex_wait().
1942 2007-11-26 Daniel Jacobowitz <dan@codesourcery.com>
1944 * pthread_create.c: Require pthread_mutex_trylock and
1945 pthread_key_delete for libgcc.
1947 2008-04-08 Jakub Jelinek <jakub@redhat.com>
1950 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h
1951 (lll_futex_wake_unlock): Add private argument to the pre-v9 macro.
1952 Patch by Sunil Amitkumar Janki <devel.sjanki@gmail.com>.
1954 2008-03-27 Ulrich Drepper <drepper@redhat.com>
1956 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine ARG_MAX if
1957 <linux/limits.h> has defined it.
1958 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
1959 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
1960 * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
1961 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
1963 2008-03-18 Jakub Jelinek <jakub@redhat.com>
1965 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Use __ASSEMBLER__ instead
1967 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
1968 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Likewise.
1970 2008-03-14 Ulrich Drepper <drepper@redhat.com>
1972 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
1973 HAVE_DL_DISCOVER_OSVERSION.
1974 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
1975 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Likewise.
1977 2008-03-07 Ulrich Drepper <drepper@redhat.com>
1980 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Change
1981 _POSIX_CHOWN_RESTRICTED value to zero.
1983 2008-01-31 Roland McGrath <roland@redhat.com>
1985 * Makefile (omit-deps): Variable removed.
1987 2008-01-30 Ulrich Drepper <drepper@redhat.com>
1989 * sysdeps/unix/sysv/linux/x86_64/sem_post.S (sem_post): Avoid
1990 unnecessary addr32 prefix.
1992 2008-01-29 Roland McGrath <roland@redhat.com>
1994 * Makeconfig (ptw-CPPFLAGS, sysd-rules-patterns): New variables.
1996 2008-01-22 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1998 * sysdeps/unix/sysv/linux/sh/sem_post.S: Don't overflow value field.
2000 2008-01-21 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2002 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XADD): Use
2004 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
2005 (__lll_lock_wait_private): Fix typo.
2006 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
2007 (pthread_barrier_wait): Likewise. Adjust XADD use.
2008 * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
2010 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S
2011 (pthread_rwlock_timedrdlock): Return correct return value.
2012 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S
2013 (pthread_rwlock_timedwrlock): Likewise.
2015 2008-01-15 Ulrich Drepper <drepper@redhat.com>
2017 * tst-eintr2.c (do_test): make sure that if mutex_lock in main
2018 thread returns the program exits with an error code.
2020 2008-01-10 Ulrich Drepper <drepper@redhat.com>
2022 * pthread-errnos.sym: Add EOVERFLOW.
2023 * sysdeps/unix/sysv/linux/structsem.sym: Add SEM_VALUE_MAX.
2024 * sysdeps/unix/sysv/linux/sem_post.c: Don't overflow value field.
2025 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
2026 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
2028 2007-12-14 Ulrich Drepper <drepper@redhat.com>
2030 * sysdeps/x86_64/pthreaddef.h (ARCH_RETRY_MMAP): Take additional
2031 parameter. Passed it as permission to mmap.
2032 * allocatestack.c (allocate_stack): Pass prot as second parameter
2035 2007-12-12 Ulrich Drepper <drepper@redhat.com>
2037 * tst-basic7.c: Allocate memory for the stack.
2040 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S [!SHARED]
2041 (__pthread_cond_timedwait): Don't use VDSO.
2042 Patch by Michal Januszewski.
2044 2007-12-07 Ulrich Drepper <drepper@redhat.com>
2047 * sysdeps/pthread/pthread.h [!__EXCEPTIONS] (pthread_cleanup_pop):
2048 Allow label before pthread_cleanup_pop.
2049 (pthread_cleanup_pop_restore_np): Likewise.
2051 2007-12-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2053 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
2054 Store 2 before returning ETIMEDOUT.
2056 2007-11-23 Ulrich Drepper <drepper@redhat.com>
2058 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
2059 Store 2 before returning ETIMEDOUT.
2060 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise
2061 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
2062 (__lll_lock_wait_private): Optimize.
2063 (__lll_lock_wait): Likewise.
2065 2007-11-20 Jakub Jelinek <jakub@redhat.com>
2067 * sysdeps/pthread/pthread.h (pthread_cleanup_push,
2068 pthread_cleanup_push_defer_np): Add extra (void *) cast to shut up
2069 g++ 4.1 and 4.2 -Wstrict-aliasing warnings.
2071 2007-11-08 Ulrich Drepper <drepper@redhat.com>
2074 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
2075 If we time out, try one last time to lock the futex to avoid
2076 losing a wakeup signal.
2077 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
2078 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
2081 * sysdeps/pthread/createthread.c (do_clone): Translate clone error
2084 2007-11-07 Ulrich Drepper <drepper@redhat.com>
2087 * allocatestack.c (allocate_stack): Change ENOMEM error in case
2088 mmap failed to EAGAIN.
2089 * Makefile (tests): Add tst-basic7.
2090 * tst-basic7.c: New file.
2092 2007-11-05 Ulrich Drepper <drepper@redhat.com>
2094 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
2095 Use __linkin_atfork.
2097 2007-11-03 Mike Frysinger <vapier@gentoo.org>
2099 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (LOAD_FUTEX_WAIT): Add
2100 missing line continuations.
2101 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S (LOAD_FUTEX_WAIT,
2102 LOAD_FUTEX_WAKE): Likewise. Also add missing 3rd parameter.
2104 2007-10-28 Ulrich Drepper <drepper@redhat.com>
2107 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Declare
2108 __active_timer_sigev_thread and __active_timer_sigev_thread_lock.
2109 (struct timer): Add next element.
2110 * sysdeps/unix/sysv/linux/timer_create.c: For SIGEV_THREAD timers,
2111 enqueue timer structure into __active_timer_sigev_thread list.
2112 * sysdeps/unix/sysv/linux/timer_delete.c: For SIGEV_THREAD timers,
2113 remove timer struct from __active_timer_sigev_thread.
2114 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
2115 Before using timer structure make sure it is still on the
2116 __active_timer_sigev_thread list. Keep lock until done.
2117 Define __active_timer_sigev_thread and
2118 __active_timer_sigev_thread_lock.
2120 2007-10-27 Ulrich Drepper <drepper@redhat.com>
2122 * sysdeps/pthread/malloc-machine.h: Define ATFORK_MEM.
2123 Redefine thread_atfork for use of ATFORK_MEM.
2124 * sysdeps/unix/sysv/linux/fork.h: Define __linkin_atfork.
2125 * sysdeps/unix/sysv/linux/register-atfork.c (__linkin_atfork): New
2127 * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
2128 Use atomic operation when removing first element of list.
2130 2007-10-17 Jakub Jelinek <jakub@redhat.com>
2132 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__old_sem_post): New
2133 routine instead of an alias to __new_sem_post.
2135 2007-10-15 Jakub Jelinek <jakub@redhat.com>
2137 * init.c (__pthread_initialize_minimal): Initialize word to appease
2140 2007-10-10 Jakub Jelinek <jakub@redhat.com>
2142 * sysdeps/pthread/bits/libc-lock.h (__libc_rwlock_init): Inside of
2143 libc.so just clear NAME.
2144 (__libc_rwlock_fini): Nop inside of libc.so.
2145 * tst-initializers1.c (main): Test if PTHREAD_RWLOCK_INITIALIZER is
2148 2007-09-02 Ulrich Drepper <drepper@redhat.com>
2150 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
2151 (__pthread_cond_wait): Fix unlocking of internal lock after mutex
2153 Patch by Luca Barbieri <luca.barbieri@gmail.com>.
2155 2007-08-21 Ulrich Drepper <drepper@redhat.com>
2158 * allocatestack.c (__reclaim_stacks): Clear the TSD in the
2159 reclaimed stack if necessary.
2160 * Makefile (tests): Add tst-tsd6.
2161 * tst-tsd6.c: New file.
2163 2007-08-21 Jakub Jelinek <jakub@redhat.com>
2165 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_dead):
2166 Add private argument.
2168 2007-08-20 Ulrich Drepper <drepper@redhat.com>
2170 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
2171 (__pthread_cond_timedwait): Use clock_gettime from VDSO if possible.
2173 2007-08-16 Jakub Jelinek <jakub@redhat.com>
2175 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h
2176 (__lll_robust_timedlock): Pass private as last argument to
2177 __lll_robust_timedlock_wait.
2178 (__lll_unlock): Fix a pasto.
2180 2007-08-15 Jakub Jelinek <jakub@redhat.com>
2182 * sysdeps/unix/sysv/linux/sparc/internaltypes.h (sparc_new_sem,
2183 sparc_old_sem): New structs.
2184 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
2185 (__sem_wait_cleanup): New function.
2186 (__new_sem_wait): Use sparc_new_sem structure. Bump and afterwards
2187 decrease nwaiters. Register __sem_wait_cleanup as cleanup handler.
2188 Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
2190 (__old_sem_wait): New function.
2191 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: Include
2192 nptl/sysdeps/unix/sysv/linux/sparc version.
2193 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c:
2195 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: Likewise.
2196 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c
2197 (__new_sem_trywait): Use sparc_old_sem structure.
2198 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c
2199 (sem_timedwait): Use sparc_new_sem structure. Bump and afterwards
2200 decrease nwaiters. Register __sem_wait_cleanup as cleanup handler.
2201 Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
2202 lll_futex_timed_wait.
2203 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c (__new_sem_post):
2204 Use sparc_new_sem structure. Only wake if nwaiters > 0. Pass
2205 isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
2207 (__old_sem_post): New function.
2208 * sysdeps/unix/sysv/linux/sparc/sem_wait.c: New file.
2209 * sysdeps/unix/sysv/linux/sparc/sem_init.c: New file.
2210 * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c: New file.
2211 * sysdeps/unix/sysv/linux/sparc/sem_post.c: New file.
2212 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: Remove.
2213 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: Remove.
2215 2007-08-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2217 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
2218 (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
2219 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2220 Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
2221 * sysdeps/unix/sysv/linux/shpthread_cond_signal.S
2222 (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
2223 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2225 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
2226 kernel-features.h and tcb-offsets.h.
2227 (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
2228 lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
2230 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
2232 (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE
2233 to lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
2235 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use #ifdef
2236 __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
2237 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
2238 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
2239 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
2240 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
2241 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
2243 2007-08-14 Jakub Jelinek <jakub@redhat.com>
2245 * sysdeps/unix/sysv/linux/lowlevellock.c: Comment fix.
2246 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
2247 (__lll_timedwait_tid): Pass LLL_SHARED as 4th argument to
2248 lll_futex_timed_wait.
2250 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (__lll_unlock,
2251 __lll_robust_unlock): Rewrite as macros instead of inline functions.
2252 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_unlock,
2253 __lll_robust_unlock, __lll_wait_tid): Likewise.
2255 2007-08-13 Jakub Jelinek <jakub@redhat.com>
2257 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
2259 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
2260 (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
2261 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2262 Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
2263 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
2264 (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
2265 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2266 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Include
2268 (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
2269 lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
2270 process private. Switch DW_CFA_advance_loc1 and some
2271 DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
2272 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
2273 (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE to
2274 lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
2275 process private. Switch DW_CFA_advance_loc{1,2} and some
2276 DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
2277 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use
2278 #ifdef __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
2279 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2281 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
2282 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
2283 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2285 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
2286 (__pthread_cond_broadcast): Compare %r8 instead of
2287 dep_mutex-cond_*(%rdi) with $-1.
2288 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
2289 (__pthread_cond_signal): Xor FUTEX_WAKE_OP with FUTEX_WAKE instead
2292 2007-08-13 Ulrich Drepper <drepper@redhat.com>
2294 * sysdeps/unix/sysv/linux/i386/i786/Implies: New file.
2296 2007-08-13 Jakub Jelinek <jakub@redhat.com>
2298 * allocatestack.c: Include kernel-features.h.
2299 * pthread_create.c: Likewise.
2300 * pthread_mutex_init.c: Likewise.
2302 * pthread_cond_timedwait.c: Likewise.
2303 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
2304 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2305 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
2306 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
2307 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
2308 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2309 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2311 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2313 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2314 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2315 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
2316 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
2318 2007-08-12 Jakub Jelinek <jakub@redhat.com>
2320 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
2321 [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
2322 byte elements. One of them is the new __shared element.
2323 [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
2324 adjust names of other padding elements.
2325 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
2326 [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
2327 byte elements. One of them is the new __shared element.
2328 [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
2329 adjust names of other padding elements.
2330 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_rwlock_t):
2331 Renamed __pad1 element to __shared, adjust names of other padding
2333 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
2334 (pthread_rwlock_t): Likewise.
2335 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock): Fix a
2338 2007-08-09 Anton Blanchard <anton@samba.org>
2340 * sysdeps/unix/sysv/linux/powerpc/pthread_spin_unlock.c: New file.
2342 2007-08-12 Ulrich Drepper <drepper@redhat.com>
2344 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Include
2345 <kernel-features.h>.
2346 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
2348 2007-08-11 Ulrich Drepper <drepper@redhat.com>
2350 * pthreadP.h (PTHREAD_ROBUST_MUTEX_PSHARED): Define.
2351 * pthread_mutex_lock.c: Use it instead of PTHREAD_MUTEX_PSHARED when
2352 dealing with robust mutexes.
2353 * pthread_mutex_timedlock.c: Likewise.
2354 * pthread_mutex_trylock.c: Likewise.
2355 * pthread_mutex_unlock.c: Likewise.
2356 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
2358 2007-08-06 Jakub Jelinek <jakub@redhat.com>
2360 * pthreadP.h (PTHREAD_MUTEX_PSHARED_BIT): Define.
2361 (PTHREAD_MUTEX_TYPE): Mask __kind with 127.
2362 (PTHREAD_MUTEX_PSHARED): Define.
2363 * pthread_mutex_init.c (__pthread_mutex_init): Set
2364 PTHREAD_MUTEX_PSHARED_BIT for pshared or robust
2366 * pthread_mutex_lock.c (LLL_MUTEX_LOCK): Take mutex as argument
2367 instead of its __data.__lock field, pass PTHREAD_MUTEX_PSHARED
2368 as second argument to lll_lock.
2369 (LLL_MUTEX_TRYLOCK): Take mutex as argument
2370 instead of its __data.__lock field.
2371 (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
2372 __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
2374 (__pthread_mutex_lock): Update LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
2375 LLL_ROBUST_MUTEX_LOCK users, use PTHREAD_MUTEX_TYPE (mutex)
2376 instead of mutex->__data.__kind directly, pass
2377 PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock and lll_futex_wait.
2378 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Use
2379 PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
2380 directly, pass PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock.
2381 (pthread_mutex_timedlock): Pass PTHREAD_MUTEX_PSHARED (mutex)
2382 to lll_timedlock, lll_robust_timedlock, lll_unlock and
2383 lll_futex_timed_wait. Use PTHREAD_MUTEX_TYPE (mutex) instead
2384 of mutex->__data.__kind directly.
2385 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Pass
2386 PTHREAD_MUTEX_PSHARED (mutex) to lll_timedlock,
2387 lll_robust_timedlock, lll_unlock and lll_futex_timed_wait. Use
2388 PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind directly.
2389 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Pass
2390 PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock, lll_robust_unlock
2392 * pthread_mutex_setprioceiling.c (pthread_mutex_setprioceiling): Pass
2393 PTHREAD_MUTEX_PSHARED (mutex) to lll_futex_wait and lll_futex_wake.
2394 Use PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
2396 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK):
2397 Take mutex as argument instead of its __data.__lock field, pass
2398 PTHREAD_MUTEX_PSHARED as second argument to lll_cond_lock.
2399 (LLL_MUTEX_TRYLOCK): Take mutex as argument instead of its
2400 __data.__lock field.
2401 (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
2402 __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
2403 to lll_robust_cond_lock.
2404 * pthread_cond_broadcast.c (__pthread_cond_broadcast): Add pshared
2405 variable, pass it to lll_lock, lll_unlock, lll_futex_requeue and
2406 lll_futex_wake. Don't use lll_futex_requeue if dependent mutex
2407 has PTHREAD_MUTEX_PSHARED_BIT bit set in its __data.__kind.
2408 * pthread_cond_destroy.c (__pthread_cond_destroy): Add pshared
2409 variable, pass it to lll_lock, lll_unlock, lll_futex_wake and
2411 * pthread_cond_signal.c (__pthread_cond_signal): Add pshared
2412 variable, pass it to lll_lock, lll_unlock, lll_futex_wake_unlock and
2414 * pthread_cond_timedwait.c (__pthread_cond_wait): Add
2415 pshared variable, pass it to lll_lock, lll_unlock,
2416 lll_futex_timedwait and lll_futex_wake.
2417 * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait): Add
2418 pshared variable, pass it to lll_lock, lll_unlock, lll_futex_wait
2420 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_requeue,
2421 lll_futex_wake_unlock): Add private argument, use __lll_private_flag
2423 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue,
2424 lll_futex_wake_unlock): Likewise.
2425 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_requeue):
2427 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_futex_requeue,
2428 lll_futex_wake_unlock): Likewise.
2429 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_requeue):
2431 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue,
2432 lll_futex_wake_unlock): Likewise.
2433 (lll_futex_wake): Fix a typo.
2434 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym (PS_BIT): Add.
2435 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
2436 (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
2437 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2438 Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
2439 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
2440 (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
2441 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2442 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
2443 (__pthread_cond_timedwait): Likewise.
2444 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
2445 (__condvar_cleanup, __pthread_cond_wait): Likewise.
2447 2007-08-05 Jakub Jelinek <jakub@redhat.com>
2449 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
2450 Don't use CGOTSETUP and CGOTRESTORE macros.
2451 (CGOTSETUP, CGOTRESTORE): Remove.
2452 <IS_IN_rtld> (CENABLE, CDISABLE): Don't use JUMPTARGET, branch to
2455 2007-08-01 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2457 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Remove
2458 definitions for private futexes.
2459 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Include
2460 kernel-features.h and lowlevellock.h. Use private futexes if
2462 (__lll_lock_wait_private, __lll_unlock_wake_private): New.
2463 (__lll_mutex_lock_wait): Rename to
2464 (__lll_lock_wait): ... this. Don't compile in for libc.so.
2465 (__lll_mutex_timedlock_wait): Rename to ...
2466 (__lll_timedlock_wait): ... this. Use __NR_gettimeofday.
2467 Don't compile in for libc.so.
2468 (__lll_mutex_unlock_wake): Rename to ...
2469 (__lll_unlock_wake): ... this. Don't compile in for libc.so.
2470 (__lll_timedwait_tid): Use __NR_gettimeofday.
2471 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Allow including
2472 the header from assembler. Renamed all lll_mutex_* resp.
2473 lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
2474 Renamed all LLL_MUTEX_LOCK_* macros to LLL_LOCK_*.
2475 (FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE):
2477 (__lll_lock_wait_private): Add prototype.
2478 (__lll_lock_wait, __lll_timedlock_wait, __lll_robust_lock_wait,
2479 __lll_robust_timedlock_wait, __lll_unlock_wake_private,
2480 __lll_unlock_wake): Likewise.
2481 (lll_lock): Add private argument. Call __lll_lock_wait_private
2482 if private is constant LLL_PRIVATE.
2483 (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
2484 lll_timedlock, lll_robust_timedlock): Add private argument.
2485 (lll_unlock): Add private argument. Call __lll_unlock_wake_private
2486 if private is constant LLL_PRIVATE.
2487 (lll_robust_unlock, lll_robust_dead): Add private argument.
2488 (lll_lock_t): Remove.
2489 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
2490 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
2491 lll_cond_wake, lll_cond_broadcast): Remove.
2492 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: Include
2493 kernel-features.h and lowlevellock.h.
2494 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
2495 (LOAD_FUTEX_WAIT): Define.
2496 (__lll_robust_mutex_lock_wait): Rename to ...
2497 (__lll_robust_lock_wait): ... this. Add private argument.
2498 Use LOAD_FUTEX_WAIT macro.
2499 (__lll_robust_mutex_timedlock_wait): Rename to ...
2500 (__lll_robust_timedlock_wait): ... this. Add private argument.
2501 Use __NR_gettimeofday. Use LOAD_FUTEX_WAIT macro.
2502 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Include
2504 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
2505 (pthread_barrier_wait): Use __lll_{lock,unlock}_* instead of
2506 __lll_mutex_{lock,unlock}_*.
2507 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Include
2508 lowlevellock.h and pthread-errnos.h.
2509 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
2510 FUTEX_CMP_REQUEUE, EINVAL): Remove.
2511 (__pthread_cond_broadcast): Use __lll_{lock,unlock}_* instead of
2512 __lll_mutex_{lock,unlock}_*.
2513 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Include
2514 lowlevellock.h and pthread-errnos.h.
2515 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE, EINVAL): Remove.
2516 (__pthread_cond_signal): Use __lll_{lock,unlock}_* instead of
2517 __lll_mutex_{lock,unlock}_*.
2518 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
2520 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE): Remove.
2521 (__pthread_cond_timedwait): Use __lll_{lock,unlock}_* instead of
2522 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
2523 (__condvar_tw_cleanup): Likewise.
2524 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
2526 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
2527 (__pthread_cond_wait): Use __lll_{lock,unlock}_* instead of
2528 __lll_mutex_{lock,unlock}_*.
2529 ( __condvar_w_cleanup): Likewise.
2530 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Include lowlevellock.h.
2531 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
2532 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Include
2534 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
2535 (__pthread_rwlock_rdlock): Use __lll_{lock,unlock}_* instead of
2536 __lll_mutex_{lock,unlock}_*.
2537 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Include
2539 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
2540 FUTEX_PRIVATE_FLAG): Remove.
2541 (pthread_rwlock_timedrdlock): Use __lll_{lock,unlock}_* instead of
2542 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
2543 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Include
2545 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
2546 FUTEX_PRIVATE_FLAG): Remove.
2547 (pthread_rwlock_timedwrlock): Use __lll_{lock,unlock}_* instead of
2548 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
2549 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Include
2551 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
2552 (__pthread_rwlock_unlock): Use __lll_{lock,unlock}_* instead of
2553 __lll_mutex_{lock,unlock}_*.
2554 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Include
2556 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
2557 (__pthread_rwlock_wrlock): Use __lll_{lock,unlock}_* instead of
2558 __lll_mutex_{lock,unlock}_*.
2559 * sysdeps/unix/sysv/linux/sh/sem_post.S: Include lowlevellock.h.
2560 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
2561 (__new_sem_post): Use standard initial exec code sequences.
2562 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Include
2564 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
2565 FUTEX_PRIVATE_FLAG): Remove.
2566 (sem_timedwait): Use __NR_gettimeofday. Use standard initial
2567 exec code sequences.
2568 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Include lowlevellock.h.
2569 (__new_sem_trywait): Use standard initial exec code sequences.
2570 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Include lowlevellock.h.
2571 (__new_sem_wait): Use standard initial exec code sequences.
2573 2007-07-31 Anton Blanchard <anton@samba.org>
2575 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
2576 Use __asm __volatile (__lll_acq_instr ::: "memory") instead of
2577 atomic_full_barrier.
2579 2007-07-31 Jakub Jelinek <jakub@redhat.com>
2581 * allocatestack.c (stack_cache_lock): Change type to int.
2582 (get_cached_stack, allocate_stack, __deallocate_stack,
2583 __make_stacks_executable, __find_thread_by_id, __nptl_setxid,
2584 __pthread_init_static_tls, __wait_lookup_done): Add LLL_PRIVATE
2585 as second argument to lll_lock and lll_unlock macros on
2587 * pthread_create.c (__find_in_stack_list): Likewise.
2588 (start_thread): Similarly with pd->lock. Use lll_robust_dead
2589 macro instead of lll_robust_mutex_dead, pass LLL_SHARED to it
2591 * descr.h (struct pthread): Change lock and setxid_futex field
2593 * old_pthread_cond_broadcast.c (__pthread_cond_broadcast_2_0): Use
2594 LLL_LOCK_INITIALIZER instead of LLL_MUTEX_LOCK_INITIALIZER.
2595 * old_pthread_cond_signal.c (__pthread_cond_signal_2_0): Likewise.
2596 * old_pthread_cond_timedwait.c (__pthread_cond_timedwait_2_0):
2598 * old_pthread_cond_wait.c (__pthread_cond_wait_2_0): Likewise.
2599 * pthread_cond_init.c (__pthread_cond_init): Likewise.
2600 * pthreadP.h (__attr_list_lock): Change type to int.
2601 * pthread_attr_init.c (__attr_list_lock): Likewise.
2602 * pthread_barrier_destroy.c (pthread_barrier_destroy): Pass
2603 ibarrier->private ^ FUTEX_PRIVATE_FLAG as second argument to
2605 * pthread_barrier_wait.c (pthread_barrier_wait): Likewise and
2606 also for lll_futex_{wake,wait}.
2607 * pthread_barrier_init.c (pthread_barrier_init): Make iattr
2609 * pthread_cond_broadcast.c (__pthread_cond_broadcast): Pass
2610 LLL_SHARED as second argument to lll_{,un}lock.
2611 * pthread_cond_destroy.c (__pthread_cond_destroy): Likewise.
2612 * pthread_cond_signal.c (__pthread_cond_singal): Likewise.
2613 * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
2614 * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait):
2616 * pthread_getattr_np.c (pthread_getattr_np): Add LLL_PRIVATE
2617 as second argument to lll_{,un}lock macros on pd->lock.
2618 * pthread_getschedparam.c (__pthread_getschedparam): Likewise.
2619 * pthread_setschedparam.c (__pthread_setschedparam): Likewise.
2620 * pthread_setschedprio.c (pthread_setschedprio): Likewise.
2621 * tpp.c (__pthread_tpp_change_priority, __pthread_current_priority):
2623 * sysdeps/pthread/createthread.c (do_clone, create_thread):
2625 * pthread_once.c (once_lock): Change type to int.
2626 (__pthread_once): Pass LLL_PRIVATE as second argument to
2627 lll_{,un}lock macros on once_lock.
2628 * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Use
2629 lll_{,un}lock macros instead of lll_mutex_{,un}lock, pass
2630 rwlock->__data.__shared as second argument to them and similarly
2632 * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock):
2634 * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock):
2636 * pthread_rwlock_tryrdlock.c (__pthread_rwlock_tryrdlock): Likewise.
2637 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Likewise.
2638 * pthread_rwlock_unlock.c (__pthread_rwlock_unlock): Likewise.
2639 * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
2640 * sem_close.c (sem_close): Pass LLL_PRIVATE as second argument
2641 to lll_{,un}lock macros on __sem_mappings_lock.
2642 * sem_open.c (check_add_mapping): Likewise.
2643 (__sem_mappings_lock): Change type to int.
2644 * semaphoreP.h (__sem_mappings_lock): Likewise.
2645 * pthread_mutex_lock.c (LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
2646 LLL_ROBUST_MUTEX_LOCK): Use lll_{,try,robust_}lock macros
2647 instead of lll_*mutex_*, pass LLL_SHARED as last
2649 (__pthread_mutex_lock): Use lll_unlock instead of lll_mutex_unlock,
2650 pass LLL_SHARED as last argument.
2651 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK,
2652 LLL_MUTEX_TRYLOCK, LLL_ROBUST_MUTEX_LOCK): Use
2653 lll_{cond_,cond_try,robust_cond}lock macros instead of lll_*mutex_*,
2654 pass LLL_SHARED as last argument.
2655 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
2656 lll_{timed,try,robust_timed,un}lock instead of lll_*mutex*, pass
2657 LLL_SHARED as last argument.
2658 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Similarly.
2659 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt):
2661 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_lock,
2662 __libc_lock_lock_recursive, __libc_lock_unlock,
2663 __libc_lock_unlock_recursive): Pass LLL_PRIVATE as second
2664 argument to lll_{,un}lock.
2665 * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_lock,
2666 _IO_lock_unlock): Likewise.
2667 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Don't use
2669 * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
2670 Pass LLL_PRIVATE as second argument to lll_{,un}lock macros on
2672 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork,
2673 free_mem): Likewise.
2674 (__fork_lock): Change type to int.
2675 * sysdeps/unix/sysv/linux/fork.h (__fork_lock): Likewise.
2676 * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Pass
2677 isem->private ^ FUTEX_PRIVATE_FLAG as second argument to
2679 * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
2680 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Likewise.
2681 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait_private):
2683 (__lll_lock_wait, __lll_timedlock_wait): Add private argument and
2684 pass it through to lll_futex_*wait, only compile in when
2686 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
2687 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): Add private
2688 argument and pass it through to lll_futex_*wait.
2689 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Renamed all
2690 lll_mutex_* resp. lll_robust_mutex_* macros to lll_* resp.
2691 lll_robust_*. Renamed all __lll_mutex_* resp. __lll_robust_mutex_*
2692 inline functions to __lll_* resp. __lll_robust_*.
2693 (LLL_MUTEX_LOCK_INITIALIZER): Remove.
2694 (lll_mutex_dead): Add private argument.
2695 (__lll_lock_wait_private): New prototype.
2696 (__lll_lock_wait, __lll_robust_lock_wait, __lll_lock_timedwait,
2697 __lll_robust_lock_timedwait): Add private argument to prototypes.
2698 (__lll_lock): Add private argument, if it is constant LLL_PRIVATE,
2699 call __lll_lock_wait_private, otherwise pass private to
2701 (__lll_robust_lock, __lll_cond_lock, __lll_timedlock,
2702 __lll_robust_timedlock): Add private argument, pass it to
2703 __lll_*wait functions.
2704 (__lll_unlock): Add private argument, if it is constant LLL_PRIVATE,
2705 call __lll_unlock_wake_private, otherwise pass private to
2707 (__lll_robust_unlock): Add private argument, pass it to
2708 __lll_robust_unlock_wake.
2709 (lll_lock, lll_robust_lock, lll_cond_lock, lll_timedlock,
2710 lll_robust_timedlock, lll_unlock, lll_robust_unlock): Add private
2711 argument, pass it through to __lll_* inline function.
2712 (__lll_mutex_unlock_force, lll_mutex_unlock_force): Remove.
2713 (lll_lock_t): Remove.
2714 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
2715 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
2716 lll_cond_wake, lll_cond_broadcast): Remove.
2717 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2718 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2719 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2720 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
2721 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Allow including
2722 the header from assembler. Renamed all lll_mutex_* resp.
2723 lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
2724 (LOCK, FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP,
2725 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
2726 (LLL_MUTEX_LOCK_INITIALIZER, LLL_MUTEX_LOCK_INITIALIZER_LOCKED,
2727 LLL_MUTEX_LOCK_INITIALIZER_WAITERS): Remove.
2728 (__lll_mutex_lock_wait, __lll_mutex_timedlock_wait,
2729 __lll_mutex_unlock_wake, __lll_lock_wait, __lll_unlock_wake):
2731 (__lll_trylock_asm, __lll_lock_asm_start, __lll_unlock_asm): Define.
2732 (lll_robust_trylock, lll_cond_trylock): Use LLL_LOCK_INITIALIZER*
2733 rather than LLL_MUTEX_LOCK_INITIALIZER* macros.
2734 (lll_trylock): Likewise, use __lll_trylock_asm, pass
2735 MULTIPLE_THREADS_OFFSET as another asm operand.
2736 (lll_lock): Add private argument, use __lll_lock_asm_start, pass
2737 MULTIPLE_THREADS_OFFSET as last asm operand, call
2738 __lll_lock_wait_private if private is constant LLL_PRIVATE,
2739 otherwise pass private as another argument to __lll_lock_wait.
2740 (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
2741 lll_timedlock, lll_robust_timedlock): Add private argument, pass
2742 private as another argument to __lll_*lock_wait call.
2743 (lll_unlock): Add private argument, use __lll_unlock_asm, pass
2744 MULTIPLE_THREADS_OFFSET as another asm operand, call
2745 __lll_unlock_wake_private if private is constant LLL_PRIVATE,
2746 otherwise pass private as another argument to __lll_unlock_wake.
2747 (lll_robust_unlock): Add private argument, pass private as another
2748 argument to __lll_unlock_wake.
2749 (lll_robust_dead): Add private argument, use __lll_private_flag
2751 (lll_islocked): Use LLL_LOCK_INITIALIZER instead of
2752 LLL_MUTEX_LOCK_INITIALIZER.
2753 (lll_lock_t): Remove.
2754 (LLL_LOCK_INITIALIZER_WAITERS): Define.
2755 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
2756 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
2757 lll_cond_wake, lll_cond_broadcast): Remove.
2758 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2759 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Revert
2760 2007-05-2{3,9} changes.
2761 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Include
2762 kernel-features.h and lowlevellock.h.
2763 (LOAD_PRIVATE_FUTEX_WAIT): Define.
2764 (LOAD_FUTEX_WAIT): Rewritten.
2765 (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
2767 (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
2768 (__lll_mutex_lock_wait): Rename to ...
2769 (__lll_lock_wait): ... this. Take futex addr from %edx instead of
2770 %ecx, %ecx is now private argument. Don't compile in for libc.so.
2771 (__lll_mutex_timedlock_wait): Rename to ...
2772 (__lll_timedlock_wait): ... this. Use __NR_gettimeofday. %esi
2773 contains private argument. Don't compile in for libc.so.
2774 (__lll_mutex_unlock_wake): Rename to ...
2775 (__lll_unlock_wake): ... this. %ecx contains private argument.
2776 Don't compile in for libc.so.
2777 (__lll_timedwait_tid): Use __NR_gettimeofday.
2778 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Include
2779 kernel-features.h and lowlevellock.h.
2780 (LOAD_FUTEX_WAIT): Define.
2781 (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
2783 (__lll_robust_mutex_lock_wait): Rename to ...
2784 (__lll_robust_lock_wait): ... this. Futex addr is now in %edx
2785 argument, %ecx argument contains private. Use LOAD_FUTEX_WAIT
2787 (__lll_robust_mutex_timedlock_wait): Rename to ...
2788 (__lll_robust_timedlock_wait): ... this. Use __NR_gettimeofday.
2789 %esi argument contains private, use LOAD_FUTEX_WAIT macro.
2790 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Include
2792 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2793 (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
2794 PRIVATE(%ebx) ^ LLL_SHARED as private argument in %ecx to
2795 __lll_lock_wait and __lll_unlock_wake, pass MUTEX(%ebx) address
2796 to __lll_lock_wait in %edx.
2797 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
2798 Include lowlevellock.h and pthread-errnos.h.
2799 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
2800 FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
2801 (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*, pass
2802 cond_lock address in %edx rather than %ecx to __lll_lock_wait,
2803 pass LLL_SHARED in %ecx to both __lll_lock_wait and
2805 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
2806 Include lowlevellock.h and pthread-errnos.h.
2807 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
2808 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
2809 (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*, pass
2810 cond_lock address in %edx rather than %ecx to __lll_lock_wait,
2811 pass LLL_SHARED in %ecx to both __lll_lock_wait and
2813 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
2814 Include lowlevellock.h.
2815 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
2817 (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*, pass
2818 cond_lock address in %edx rather than %ecx to __lll_lock_wait,
2819 pass LLL_SHARED in %ecx to both __lll_lock_wait and
2820 __lll_unlock_wake. Use __NR_gettimeofday.
2821 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
2822 Include lowlevellock.h.
2823 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2824 (__pthread_cond_wait, __condvar_w_cleanup): Rename __lll_mutex_*
2825 to __lll_*, pass cond_lock address in %edx rather than %ecx to
2826 __lll_lock_wait, pass LLL_SHARED in %ecx to both __lll_lock_wait
2827 and __lll_unlock_wake.
2828 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S:
2829 Include lowlevellock.h.
2830 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2831 (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*, pass
2832 MUTEX(%ebx) address in %edx rather than %ecx to
2833 __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
2834 and __lll_unlock_wake. Move return value from %ecx to %edx
2836 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2837 Include lowlevellock.h.
2838 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
2840 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
2841 MUTEX(%ebp) address in %edx rather than %ecx to
2842 __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
2843 and __lll_unlock_wake. Move return value from %ecx to %edx
2844 register. Use __NR_gettimeofday.
2845 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2846 Include lowlevellock.h.
2847 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
2849 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
2850 MUTEX(%ebp) address in %edx rather than %ecx to
2851 __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
2852 and __lll_unlock_wake. Move return value from %ecx to %edx
2853 register. Use __NR_gettimeofday.
2854 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
2855 Include lowlevellock.h.
2856 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2857 (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*, pass
2858 MUTEX(%edi) address in %edx rather than %ecx to
2859 __lll_lock_wait, pass PSHARED(%edi) in %ecx to both __lll_lock_wait
2860 and __lll_unlock_wake.
2861 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
2862 Include lowlevellock.h.
2863 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2864 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
2865 MUTEX(%ebx) address in %edx rather than %ecx to
2866 __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
2867 and __lll_unlock_wake. Move return value from %ecx to %edx
2869 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Include
2871 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
2873 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Include lowlevellock.h.
2874 (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
2875 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Include
2877 (LOCK, SYS_futex, SYS_gettimeofday, FUTEX_WAIT): Don't define.
2878 (sem_timedwait): Use __NR_gettimeofday.
2879 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Include
2881 (LOCK): Don't define.
2882 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include
2884 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
2885 * sysdeps/unix/sysv/linux/powerpc/sem_post.c: Wake only when there
2887 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Revert
2888 2007-05-2{3,9} changes.
2889 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Include
2890 kernel-features.h and lowlevellock.h.
2891 (LOAD_PRIVATE_FUTEX_WAIT): Define.
2892 (LOAD_FUTEX_WAIT): Rewritten.
2893 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
2894 (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
2895 (__lll_mutex_lock_wait): Rename to ...
2896 (__lll_lock_wait): ... this. %esi is now private argument.
2897 Don't compile in for libc.so.
2898 (__lll_mutex_timedlock_wait): Rename to ...
2899 (__lll_timedlock_wait): ... this. %esi contains private argument.
2900 Don't compile in for libc.so.
2901 (__lll_mutex_unlock_wake): Rename to ...
2902 (__lll_unlock_wake): ... this. %esi contains private argument.
2903 Don't compile in for libc.so.
2904 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Include
2905 kernel-features.h and lowlevellock.h.
2906 (LOAD_FUTEX_WAIT): Define.
2907 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
2908 (__lll_robust_mutex_lock_wait): Rename to ...
2909 (__lll_robust_lock_wait): ... this. %esi argument contains private.
2910 Use LOAD_FUTEX_WAIT macro.
2911 (__lll_robust_mutex_timedlock_wait): Rename to ...
2912 (__lll_robust_timedlock_wait): ... this. %esi argument contains
2913 private, use LOAD_FUTEX_WAIT macro.
2914 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Include
2916 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2917 (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
2918 PRIVATE(%rdi) ^ LLL_SHARED as private argument in %esi to
2919 __lll_lock_wait and __lll_unlock_wake.
2920 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S:
2921 Include lowlevellock.h and pthread-errnos.h.
2922 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
2923 FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
2924 (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*,
2925 pass LLL_SHARED in %esi to both __lll_lock_wait and
2927 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S:
2928 Include lowlevellock.h and pthread-errnos.h.
2929 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
2930 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
2931 (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*,
2932 pass LLL_SHARED in %esi to both __lll_lock_wait and
2934 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:
2935 Include lowlevellock.h.
2936 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2937 (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*,
2938 pass LLL_SHARED in %esi to both __lll_lock_wait and
2940 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
2941 Include lowlevellock.h.
2942 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2943 (__pthread_cond_wait, __condvar_cleanup): Rename __lll_mutex_*
2944 to __lll_*, pass LLL_SHARED in %esi to both __lll_lock_wait
2945 and __lll_unlock_wake.
2946 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S:
2947 Include lowlevellock.h.
2948 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
2950 (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*,
2951 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
2952 and __lll_unlock_wake.
2953 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
2954 Include lowlevellock.h.
2955 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
2957 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
2958 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
2959 and __lll_unlock_wake.
2960 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
2961 Include lowlevellock.h.
2962 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
2964 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
2965 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
2966 and __lll_unlock_wake.
2967 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S:
2968 Include lowlevellock.h.
2969 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
2971 (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*,
2972 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
2973 and __lll_unlock_wake.
2974 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S:
2975 Include lowlevellock.h.
2976 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
2978 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
2979 pass PSHARED(%rdi) in %ecx to both __lll_lock_wait
2980 and __lll_unlock_wake.
2981 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Include
2983 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
2985 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Include lowlevellock.h.
2986 (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
2987 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Include
2989 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
2990 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Include
2992 (LOCK): Don't define.
2993 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Include
2995 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
2996 * sysdeps/unix/sysv/linux/sparc/internaltypes.h: New file.
2997 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_destroy.c: New file.
2998 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_init.c: New file.
2999 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_wait.c: New file.
3000 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
3001 (__lll_lock_wait_private): New function.
3002 (__lll_lock_wait, __lll_timedlock_wait): Add private argument, pass
3003 it to lll_futex_*wait. Don't compile in for libc.so.
3004 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c:
3006 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c
3007 (struct sparc_pthread_barrier): Remove.
3008 (pthread_barrier_wait): Use union sparc_pthread_barrier instead of
3009 struct sparc_pthread_barrier. Pass
3010 ibarrier->s.pshared ? LLL_SHARED : LLL_PRIVATE to lll_{,un}lock
3011 and lll_futex_wait macros.
3012 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
3014 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
3015 Include sparc pthread_barrier_wait.c instead of generic one.
3017 2007-07-30 Jakub Jelinek <jakub@redhat.com>
3019 * tst-rwlock14.c (do_test): Avoid warnings on 32-bit arches.
3021 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
3022 (pthread_rwlock_timedrdlock): Copy futex retval to %esi rather than
3024 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
3025 (pthread_rwlock_timedwrlock): Likewise.
3026 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
3027 (__pthread_rwlock_unlock): Fix MUTEX != 0 args to __lll_*.
3029 2007-07-31 Jakub Jelinek <jakub@redhat.com>
3031 * sysdeps/sparc/tls.h (tcbhead_t): Add private_futex field.
3033 2007-07-26 Jakub Jelinek <jakub@redhat.com>
3035 * tst-locale2.c (useless): Add return statement.
3037 2007-07-24 Jakub Jelinek <jakub@redhat.com>
3039 * allocatestack.c (__nptl_setxid, __wait_lookup_done): Replace
3040 lll_private_futex_* (*) with lll_futex_* (*, LLL_PRIVATE).
3041 * pthread_create.c (start_thread): Likewise.
3042 * init.c (sighandler_setxid): Likewise.
3043 * sysdeps/alpha/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3044 * sysdeps/ia64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3045 * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3046 * sysdeps/s390/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3047 * sysdeps/powerpc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3048 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3049 * sysdeps/sparc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3050 * sysdeps/sh/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3051 * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY, AIO_MISC_WAIT):
3053 * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY, GAI_MISC_WAIT):
3055 * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
3057 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_waitzero,
3058 __rtld_notify): Likewise.
3059 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Likewise.
3060 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (clear_once_control,
3061 __pthread_once): Likewise.
3062 * sysdeps/unix/sysv/linux/alpha/pthread_once.c (clear_once_control,
3063 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
3064 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_PRIVATE_FLAG,
3065 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
3066 (lll_futex_wait): Add private argument, define as wrapper around
3067 lll_futex_timed_wait.
3068 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
3069 use __lll_private_flag macro.
3070 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
3071 __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
3072 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (clear_once_control,
3073 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
3074 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_PRIVATE_FLAG,
3075 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
3076 (lll_futex_wait): Add private argument, define as wrapper around
3077 lll_futex_timed_wait.
3078 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
3079 use __lll_private_flag macro.
3080 (__lll_mutex_unlock, __lll_robust_mutex_unlock, lll_wait_tid,
3081 __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
3082 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
3084 (lll_futex_timed_wait, lll_futex_wake): Use it.
3085 (lll_private_futex_wait, lll_private_futex_timed_wait,
3086 lll_private_futex_wake): Removed.
3087 * sysdeps/unix/sysv/linux/s390/pthread_once.c (clear_once_control,
3088 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
3089 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_PRIVATE_FLAG,
3090 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
3091 (lll_futex_wait): Add private argument, define as wrapper around
3092 lll_futex_timed_wait.
3093 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
3094 use __lll_private_flag macro.
3095 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
3096 lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
3098 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
3099 (lll_private_futex_wait, lll_private_futex_timed_wait,
3100 lll_private_futex_wake): Removed.
3101 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_private_flag):
3102 Fix !__ASSUME_PRIVATE_FUTEX non-constant private case.
3103 (lll_private_futex_wait, lll_private_futex_timed_wait,
3104 lll_private_futex_wake): Removed.
3105 * sysdeps/unix/sysv/linux/sparc/pthread_once.c (clear_once_control,
3106 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
3107 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_PRIVATE_FLAG,
3108 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
3109 (lll_futex_wait): Add private argument, define as wrapper around
3110 lll_futex_timed_wait.
3111 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
3112 use __lll_private_flag macro.
3113 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
3114 lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
3116 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (__lll_private_flag):
3118 (lll_futex_timed_wait, lll_futex_wake): Use it.
3119 (lll_private_futex_wait, lll_private_futex_timed_wait,
3120 lll_private_futex_wake): Removed.
3122 2007-07-27 Jakub Jelinek <jakub@redhat.com>
3124 * sysdeps/sparc/tls.h (tcbhead_t): Move gscope_flag to the end
3125 of the structure for sparc32.
3127 2007-07-26 Aurelien Jarno <aurelien@aurel32.net>
3129 * sysdeps/sparc/tls.h (tcbhead_t): Add gscope_flag.
3131 2007-07-23 Ulrich Drepper <drepper@redhat.com>
3133 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
3134 code used when private futexes are assumed.
3135 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3138 2007-07-23 Jakub Jelinek <jakub@redhat.com>
3140 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
3141 (__lll_private_flag): Define.
3142 (lll_futex_wait): Define as a wrapper around lll_futex_timed_wait.
3143 (lll_futex_timed_wait, lll_futex_wake, lll_futex_wake_unlock): Use
3145 (lll_private_futex_wait, lll_private_futex_timedwait,
3146 lll_private_futex_wake): Define as wrapper around non-_private
3148 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
3149 (__lll_private_flag): Define.
3150 (lll_futex_timed_wait, lll_futex_wake): Use __lll_private_flag.
3151 (lll_private_futex_wait, lll_private_futex_timedwait,
3152 lll_private_futex_wake): Define as wrapper around non-_private
3155 2007-07-10 Steven Munroe <sjmunroe@us.ibm.com>
3157 * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Add LLL_SHARED
3158 parameter to lll_futex_wait call.
3159 * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
3161 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
3162 Replace lll_futex_wait with lll_private_futex_wait.
3163 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
3164 Add LLL_SHARED parameter to lll_futex_wake().
3166 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define LLL_PRIVATE
3167 LLL_SHARED, lll_private_futex_wait, lll_private_futex_timed_wait and
3168 lll_private_futex_wake.
3169 (lll_futex_wait): Add private parameter. Adjust FUTEX_PRIVATE_FLAG
3170 bit from private parm before syscall.
3171 (lll_futex_timed_wait): Likewise.
3172 (lll_futex_wake): Likewise.
3173 (lll_futex_wake_unlock): Likewise.
3174 (lll_mutex_unlock): Add LLL_SHARED parm to lll_futex_wake call.
3175 (lll_robust_mutex_unlock): Likewise.
3176 (lll_mutex_unlock_force): Likewise.
3177 (lll_wait_tid): Add LLL_SHARED parm to lll_futex_wait call.
3179 2007-07-23 Ulrich Drepper <drepper@redhat.com>
3181 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
3182 compilation when unconditionally using private futexes.
3183 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
3184 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3186 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
3187 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
3189 2007-07-17 Jakub Jelinek <jakub@redhat.com>
3191 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock_clear_flags2):
3194 2007-07-06 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3196 * sysdeps/sh/tls.h: Include stdlib.h, list.h, sysdep.h and
3199 2007-05-16 Roland McGrath <roland@redhat.com>
3201 * init.c (__nptl_initial_report_events): New variable.
3202 (__pthread_initialize_minimal_internal): Initialize pd->report_events
3205 2007-06-22 Jakub Jelinek <jakub@redhat.com>
3207 * pthread_getattr_np.c (pthread_getattr_np): Clear cpuset and
3208 cpusetsize if pthread_getaffinity_np failed with ENOSYS.
3210 2007-06-19 Ulrich Drepper <drepper@redhat.com>
3212 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Remove mrlock
3215 2007-06-18 Ulrich Drepper <drepper@redhat.com>
3217 * pthreadP.h: Define PTHREAD_MUTEX_TYPE.
3218 * phtread_mutex_lock.c: Use PTHREAD_MUTEX_TYPE.
3219 * pthread_mutex_timedlock.c: Likewise.
3220 * pthread_mutex_trylock.c: Likewise.
3221 * pthread_mutex_unlock.c: Likewise.
3223 2007-06-17 Andreas Schwab <schwab@suse.de>
3225 * sysdeps/pthread/pt-initfini.c: Tell gcc about the nonstandard
3228 2007-06-17 Ulrich Drepper <drepper@redhat.com>
3230 * allocatestack.c (allocate_stack): Make code compile if
3231 __ASSUME_PRIVATE_FUTEX is set.
3233 2007-06-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3235 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S:
3236 (__pthread_rwlock_rdlock): Don't use non SH-3/4 instruction.
3237 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S:
3238 (__pthread_rwlock_wrlock): Likewise.
3239 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
3240 (pthread_rwlock_timedrdlock): Likewise.
3241 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
3242 (pthread_rwlock_timedwrlock): Likewise.
3243 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S:
3244 (__pthread_rwlock_unlock): Likewise.
3246 2007-06-10 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3248 * sysdeps/sh/tcb-offsets.sym: Add PRIVATE_FUTEX.
3249 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Include endian.h.
3250 Split __flags into __flags, __shared, __pad1 and __pad2.
3251 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Use private
3252 futexes if they are available.
3253 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Adjust so that change
3254 in libc-lowlevellock.S allow using private futexes.
3255 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
3256 FUTEX_PRIVATE_FLAG. Add additional parameter to lll_futex_wait,
3257 lll_futex_timed_wait and lll_futex_wake. Change lll_futex_wait
3258 to call lll_futex_timed_wait. Add lll_private_futex_wait,
3259 lll_private_futex_timed_wait and lll_private_futex_wake.
3260 (lll_robust_mutex_unlock): Fix typo.
3261 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Use private
3262 field in futex command setup.
3263 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Use
3264 COND_NWAITERS_SHIFT instead of COND_CLOCK_BITS.
3265 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
3266 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use private futexes
3267 if they are available. Remove clear_once_control.
3268 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Use private
3269 futexes if they are available.
3270 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
3271 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
3272 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
3273 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
3274 * sysdeps/unix/sysv/linux/sh/sem_post.S: Add private futex support.
3275 Wake only when there are waiters.
3276 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add private futex
3277 support. Indicate that there are waiters. Remove unnecessary
3278 extra cancellation test.
3279 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise. Removed
3280 left-over duplication of __sem_wait_cleanup.
3282 2007-06-07 Ulrich Drepper <drepper@redhat.com>
3284 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Add additional
3285 parameter to lll_futex_wait, lll_futex_timed_wait, and
3286 lll_futex_wake. Change lll_futex_wait to call lll_futex_timed_wait.
3287 Add lll_private_futex_wait, lll_private_futex_timed_wait, and
3288 lll_private_futex_wake.
3289 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
3290 * allocatestack.c: Adjust use of lll_futex_* macros.
3292 * lowlevellock.h: Likewise.
3293 * pthread_barrier_wait.c: Likewise.
3294 * pthread_cond_broadcast.c: Likewise.
3295 * pthread_cond_destroy.c: Likewise.
3296 * pthread_cond_signal.c: Likewise.
3297 * pthread_cond_timedwait.c: Likewise.
3298 * pthread_cond_wait.c: Likewise.
3299 * pthread_create.c: Likewise.
3300 * pthread_mutex_lock.c: Likewise.
3301 * pthread_mutex_setprioceiling.c: Likewise.
3302 * pthread_mutex_timedlock.c: Likewise.
3303 * pthread_mutex_unlock.c: Likewise.
3304 * pthread_rwlock_timedrdlock.c: Likewise.
3305 * pthread_rwlock_timedwrlock.c: Likewise.
3306 * pthread_rwlock_unlock.c: Likewise.
3307 * sysdeps/alpha/tls.h: Likewise.
3308 * sysdeps/i386/tls.h: Likewise.
3309 * sysdeps/ia64/tls.h: Likewise.
3310 * sysdeps/powerpc/tls.h: Likewise.
3311 * sysdeps/pthread/aio_misc.h: Likewise.
3312 * sysdeps/pthread/gai_misc.h: Likewise.
3313 * sysdeps/s390/tls.h: Likewise.
3314 * sysdeps/sh/tls.h: Likewise.
3315 * sysdeps/sparc/tls.h: Likewise.
3316 * sysdeps/unix/sysv/linux/fork.c: Likewise.
3317 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
3318 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: Likewise.
3319 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Likewise.
3320 * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
3321 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
3322 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
3323 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
3324 * sysdeps/unix/sysv/linux/sparc/pthread_once.c: Likewise.
3325 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c:
3327 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: Likewise.
3328 * sysdeps/x86_64/tls.h: Likewise.
3330 2007-05-29 Ulrich Drepper <drepper@redhat.com>
3332 * pthread_getattr_np.c: No need to install a cancellation handler,
3333 this is no cancellation point.
3334 * pthread_getschedparam.c: Likewise.
3335 * pthread_setschedparam.c: Likewise.
3336 * pthread_setschedprio.c: Likewise.
3337 * sysdeps/unix/sysv/linux/lowlevellock.c: Remove all traces of
3339 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
3340 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
3341 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
3342 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
3343 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
3344 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
3345 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
3346 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
3347 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
3348 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: Likewise.
3349 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
3350 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
3352 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Checking
3353 whether there are more than one thread makes no sense here since
3354 we only call the slow path if the locks are taken.
3355 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Likewise.
3357 * sysdeps/unix/sysv/linux/internaltypes.h: Introduce
3358 COND_NWAITERS_SHIFT.
3359 * pthread_cond_destroy.c: Use COND_NWAITERS_SHIFT instead of
3361 * pthread_cond_init.c: Likewise.
3362 * pthread_cond_timedwait.c: Likewise.
3363 * pthread_cond_wait.c: Likewise.
3364 * pthread_condattr_getclock.c: Likewise.
3365 * pthread_condattr_setclock.c: Likewise.
3366 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Likewise.
3367 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3368 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
3369 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3370 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3372 2007-05-28 Jakub Jelinek <jakub@redhat.com>
3374 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c: Include
3377 * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Use explicit
3379 (THREAD_GSCOPE_GET_FLAG): Remove.
3380 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Remove.
3381 * allocatestack.c (__wait_lookup_done): Revert 2007-05-24
3383 * sysdeps/powerpc/tls.h (tcbhead_t): Remove gscope_flag.
3384 (THREAD_GSCOPE_GET_FLAG): Remove.
3385 (THREAD_GSCOPE_RESET_FLAG): Use THREAD_SELF->header.gscope_flag
3386 instead of THREAD_GSCOPE_GET_FLAG.
3387 (THREAD_GSCOPE_SET_FLAG): Likewise. Add atomic_write_barrier after
3389 * sysdeps/s390/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
3390 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
3391 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
3392 THREAD_GSCOPE_WAIT): Define.
3393 * sysdeps/sparc/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
3394 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
3395 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
3396 THREAD_GSCOPE_WAIT): Define.
3397 * sysdeps/sh/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
3398 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
3399 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
3400 THREAD_GSCOPE_WAIT): Define.
3401 * sysdeps/ia64/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
3402 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
3403 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
3404 THREAD_GSCOPE_WAIT): Define.
3406 2007-05-24 Richard Henderson <rth@redhat.com>
3408 * descr.h (struct pthread): Add header.gscope_flag.
3409 * sysdeps/alpha/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
3410 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
3411 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
3412 THREAD_GSCOPE_WAIT): Define.
3414 2007-05-27 Ulrich Drepper <drepper@redhat.com>
3416 * init.c: Make it compile with older kernel headers.
3418 * tst-initializers1.c: Show through exit code which test failed.
3420 * pthread_rwlock_init.c: Also initialize __shared field.
3421 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Split __flags
3422 element in rwlock structure into four byte elements. One of them is
3423 the new __shared element.
3424 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h [__WORDSIZE=32]:
3426 [__WORDSIZE=64]: Renamed __pad1 element int rwlock structure to
3427 __shared, adjust names of other padding elements.
3428 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3429 * sysdeps/pthread/pthread.h: Adjust rwlock initializers.
3430 * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: Add PSHARED.
3431 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define
3433 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Change main
3434 futex to use private operations if possible.
3435 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
3437 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3439 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
3440 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
3441 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
3442 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
3444 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
3446 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
3447 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
3449 2007-05-26 Ulrich Drepper <drepper@redhat.com>
3451 * pthreadP.h (PTHREAD_RWLOCK_PREFER_READER_P): Define.
3452 * pthread_rwlock_rdlock.c: Use PTHREAD_RWLOCK_PREFER_READER_P.
3453 * pthread_rwlock_timedrdlock.c: Likewise.
3454 * pthread_rwlock_tryrdlock.c: Likewise.
3456 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S (sem_trywait): Tiny
3459 * sysdeps/unix/sysv/linux/sem_wait.c: Add missing break.
3460 * sysdeps/unix/sysv/linux/sem_timedwait.c: Removed left-over
3461 duplication of __sem_wait_cleanup.
3463 * allocatestack.c: Revert last change.
3465 * sysdeps/i386/tls.h: Likewise.
3466 * sysdeps/x86_64/tls.h: Likewise.
3467 * descr.h [TLS_DTV_AT_TP] (struct pthread): Add private_futex field to
3469 * sysdeps/powerpc/tcb-offsets.sym: Add PRIVATE_FUTEX_OFFSET.
3471 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_barrier):
3473 * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: Add PRIVATE definition.
3474 * pthread_barrier_init.c: Set private flag if pshared and private
3475 futexes are supported.
3476 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Use
3477 private field in futex command setup.
3478 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
3480 2007-05-25 Ulrich Drepper <drepper@redhat.com>
3482 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Add private futex
3484 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
3485 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
3486 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
3487 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
3488 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
3490 * semaphoreP.h: Declare __old_sem_init and __old_sem_wait.
3491 * sem_init.c (__new_sem_init): Rewrite to initialize all three
3492 fields in the structure.
3493 (__old_sem_init): New function.
3494 * sem_open.c: Initialize all fields of the structure.
3495 * sem_getvalue.c: Adjust for renamed element.
3496 * sysdeps/unix/sysv/linux/Makefile [subdir=nptl]
3497 (gen-as-const-headers): Add structsem.sym.
3498 * sysdeps/unix/sysv/linux/structsem.sym: New file.
3499 * sysdeps/unix/sysv/linux/internaltypes.h: Rename struct sem to
3500 struct new_sem. Add struct old_sem.
3501 * sysdeps/unix/sysv/linux/sem_post.c: Wake only when there are waiters.
3502 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
3503 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
3504 * sysdeps/unix/sysv/linux/sem_wait.c: Indicate that there are waiters.
3505 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
3506 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
3507 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
3508 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
3509 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
3510 * Makefile (tests): Add tst-sem10, tst-sem11, tst-sem12.
3511 * tst-sem10.c: New file.
3512 * tst-sem11.c: New file.
3513 * tst-sem12.c: New file.
3514 * tst-typesizes.c: Test struct new_sem and struct old_sem instead
3517 2007-05-25 Ulrich Drepper <drepper@redhat.com>
3518 Jakub Jelinek <jakub@redhat.com>
3520 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
3521 Move __pthread_enable_asynccancel right before futex syscall.
3522 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
3525 2007-05-24 Jakub Jelinek <jakub@redhat.com>
3527 * sysdeps/i386/tls.h (THREAD_SET_PRIVATE_FUTEX,
3528 THREAD_COPY_PRIVATE_FUTEX): Define.
3529 * sysdeps/x86_64/tls.h (THREAD_SET_PRIVATE_FUTEX,
3530 THREAD_COPY_PRIVATE_FUTEX): Define.
3531 * allocatestack.c (allocate_stack): Use THREAD_COPY_PRIVATE_FUTEX.
3532 * init.c (__pthread_initialize_minimal_internal): Use
3533 THREAD_SET_PRIVATE_FUTEX.
3535 * sysdeps/powerpc/tls.h (tcbhead_t): Add gscope_flag.
3536 (THREAD_GSCOPE_FLAG_UNUSED, THREAD_GSCOPE_FLAG_USED,
3537 THREAD_GSCOPE_FLAG_WAIT): Define.
3538 (THREAD_GSCOPE_GET_FLAG, THREAD_GSCOPE_SET_FLAG,
3539 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_WAIT): Define.
3540 * sysdeps/i386/tls.h (THREAD_GSCOPE_WAIT): Don't use
3542 (THREAD_GSCOPE_GET_FLAG): Define.
3543 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Define.
3544 * allocatestack.c (__wait_lookup_done): Use THREAD_GSCOPE_GET_FLAG
3545 instead of ->header.gscope_flag directly.
3547 2007-05-23 Ulrich Drepper <drepper@redhat.com>
3549 * init.c (__pthread_initialize_minimal_internal): Check whether
3550 private futexes are available.
3551 * allocatestack.c (allocate_stack): Copy private_futex field from
3552 current thread into the new stack.
3553 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Use private
3554 futexes if they are available.
3555 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise
3556 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Adjust so that change
3557 in libc-lowlevellock.S allow using private futexes.
3558 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
3559 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
3561 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
3562 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use private futexes
3563 if they are available.
3564 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
3565 * sysdeps/x86_64/tcb-offsets.sym: Add PRIVATE_FUTEX.
3566 * sysdeps/i386/tcb-offsets.sym: Likewise.
3567 * sysdeps/x86_64/tls.h (tcbhead_t): Add private_futex field.
3568 * sysdeps/i386/tls.h (tcbhead_t): Likewise.
3570 2007-05-21 Ulrich Drepper <drepper@redhat.com>
3572 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
3573 Remove ptr_wait_lookup_done again.
3574 * init.c (pthread_functions): Don't add .ptr_wait_lookup_done here.
3575 (__pthread_initialize_minimal_internal): Initialize
3576 _dl_wait_lookup_done pointer in _rtld_global directly.
3577 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
3578 Remove code to code _dl_wait_lookup_done.
3579 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_WAIT): The pointer is not
3582 2007-05-21 Jakub Jelinek <jakub@redhat.com>
3584 * tst-robust9.c (do_test): Don't fail if ENABLE_PI and
3585 pthread_mutex_init failed with ENOTSUP.
3587 2007-05-19 Ulrich Drepper <drepper@redhat.com>
3589 * allocatestack.c (__wait_lookup_done): New function.
3590 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
3591 Add ptr_wait_lookup_done.
3592 * init.c (pthread_functions): Initialize .ptr_wait_lookup_done.
3593 * pthreadP.h: Declare __wait_lookup_done.
3594 * sysdeps/i386/tls.h (tcbhead_t): Add gscope_flag.
3595 Define macros to implement reference handling of global scope.
3596 * sysdeps/x86_64/tls.h: Likewise.
3597 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
3598 Initialize GL(dl_wait_lookup_done).
3600 2007-05-17 Ulrich Drepper <drepper@redhat.com>
3603 * pthread_mutex_lock.c: Preserve FUTEX_WAITERS bit when dead owner
3605 * pthread_mutex_timedlock.c: Likewise.
3606 * pthread_mutex_trylock.c: Likewise.
3607 Patch in part by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
3609 * Makefile (tests): Add tst-robust9 and tst-robustpi9.
3610 * tst-robust9.c: New file.
3611 * tst-robustpi9.c: New file.
3613 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Remove
3614 unnecessary extra cancellation test.
3616 2007-05-14 Ulrich Drepper <drepper@redhat.com>
3618 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Remove unnecessary
3619 extra cancellation test.
3620 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
3622 2007-05-10 Ulrich Drepper <drepper@redhat.com>
3624 * descr.h (struct pthread): Rearrange members to fill hole in
3627 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
3628 (__pthread_setaffinity_new): If syscall was successful and
3629 RESET_VGETCPU_CACHE is defined, use it before returning.
3630 * sysdeps/unix/sysv/linux/x86_64/pthread_setaffinity.c: New file.
3632 2007-05-10 Jakub Jelinek <jakub@redhat.com>
3635 * tst-align2.c: Include stackinfo.h.
3636 * tst-getpid1.c: Likewise.
3638 2007-05-02 Carlos O'Donell <carlos@systemhalted.org>
3641 * tst-align2.c (do_test): Add _STACK_GROWS_UP case.
3642 * tst-getpid1.c (do_test): Likewise.
3645 * allocatestack.c (change_stack_perm): Add _STACK_GROWS_UP case.
3646 (allocate_stack): Likewise.
3648 2007-05-07 Ulrich Drepper <drepper@redhat.com>
3650 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
3651 (__lll_robust_lock_wait): Fix race caused by reloading of futex value.
3652 (__lll_robust_timedlock_wait): Likewise.
3653 Reported by Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>.
3655 2007-05-06 Mike Frysinger <vapier@gentoo.org>
3658 * tst-cancel-wrappers.sh: Set C["fdatasync"] to 1.
3659 * tst-cancel4.c (tf_fdatasync): New test.
3661 2007-04-27 Ulrich Drepper <drepper@redhat.com>
3664 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Treat error
3665 check mutexes like normal mutexes.
3668 * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
3669 Initialize the whole sigevent structure to appease valgrind.
3671 2007-04-25 Ulrich Drepper <drepper@redhat.com>
3673 * sysdeps/x86_64/tls.h (tcbhead_t): Add vgetcpu_cache.
3674 * sysdeps/x86_64/tcb-offsets.sym: Add VGETCPU_CACHE_OFFSET.
3676 2007-04-06 Ulrich Drepper <drepper@redhat.com>
3678 * tst-locale1.c: Avoid warnings.
3679 * tst-locale2.c: Likewise.
3681 2007-03-19 Steven Munroe <sjmunroe@us.ibm.com>
3683 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
3684 (__lll_robust_trylock): Add MUTEX_HINT_ACQ to lwarx instruction.
3686 2007-03-16 Jakub Jelinek <jakub@redhat.com>
3688 * sysdeps/pthread/bits/libc-lock.h: Use __extern_inline and
3689 __extern_always_inline where appropriate.
3690 * sysdeps/pthread/pthread.h: Likewise.
3692 2007-03-13 Richard Henderson <rth@redhat.com>
3694 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Use two
3695 separate cfi regions for the two subsections.
3697 2007-02-25 Ulrich Drepper <drepper@redhat.com>
3699 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset refcntr in
3700 new thread, don't just decrement it.
3701 Patch by Suzuki K P <suzuki@in.ibm.com>.
3703 2007-02-21 Ulrich Drepper <drepper@redhat.com>
3705 * sysdeps/pthread/pthread-functions.h: Correct last patch, correct
3706 PTHFCT_CALL definition.
3708 2007-02-18 Ulrich Drepper <drepper@redhat.com>
3710 * sysdeps/pthread/pthread-functions.h: If PTR_DEMANGLE is not
3711 available, don't use it.
3713 2007-02-09 Jakub Jelinek <jakub@redhat.com>
3715 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
3716 (__lll_mutex_timedlock_wait): Use correct pointer when we don't
3717 call into the kernel to delay.
3719 2007-01-18 Ulrich Drepper <drepper@redhat.com>
3721 * tst-initializers1.c: We want to test the initializers as seen
3722 outside of libc, so undefined _LIBC.
3724 * pthread_join.c (cleanup): Avoid warning.
3726 2007-01-17 Ulrich Drepper <drepper@redhat.com>
3728 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
3729 (__lll_timedwait_tid): Add unwind info.
3731 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Don't just copy the
3732 function table, mangle the pointers.
3733 * sysdeps/pthread/pthread-functions.h: Define PTHFCT_CALL.
3734 * forward.c: Use PTHFCT_CALL and __libc_pthread_functions_init.
3735 * sysdeps/pthread/bits/libc-lock.h: When using __libc_pthread_functions
3736 demangle pointers before use.
3737 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Use PTHFCT_CALL to
3739 * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
3740 * sysdeps/pthread/setxid.h: Likewise.
3742 2007-01-12 Ulrich Drepper <drepper@redhat.com>
3744 * tst-rwlock7.c: Show some more information in case of correct
3747 2007-01-11 Ulrich Drepper <drepper@redhat.com>
3749 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
3750 (lll_futex_timed_wait): Undo part of last change, don't negate
3753 2007-01-10 Ulrich Drepper <drepper@redhat.com>
3755 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Cleanups. Define
3756 FUTEX_CMP_REQUEUE and lll_futex_requeue.
3758 2006-12-28 David S. Miller <davem@davemloft.net>
3760 * shlib-versions: Fix sparc64 linux target specification.
3762 2007-01-10 Jakub Jelinek <jakub@redhat.com>
3764 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
3765 Adjust include path for pthread_barrier_wait.c move.
3767 2006-12-21 Jakub Jelinek <jakub@redhat.com>
3769 * sysdeps/unix/sysv/linux/pthread_kill.c (pthread_kill): Make sure
3770 tid isn't reread from pd->tid in between ESRCH test and the syscall.
3772 2006-12-06 Jakub Jelinek <jakub@redhat.com>
3774 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Handle
3775 6 argument cancellable syscalls.
3776 (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
3777 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO): Handle
3778 6 argument cancellable syscalls.
3779 (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
3781 2006-12-09 Ulrich Drepper <drepper@redhat.com>
3783 * sysdeps/unix/sysv/linux/rtld-lowlevel.h
3784 (__rtld_mrlock_initialize): Add missing closing parenthesis.
3786 2006-10-30 Jakub Jelinek <jakub@redhat.com>
3788 * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
3789 __sync_lock_release instead of __sync_lock_release_si.
3791 2006-10-29 Jakub Jelinek <jakub@redhat.com>
3793 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (RTLD_SINGLE_THREAD_P):
3795 (SINGLE_THREAD_P): Define to 1 if IS_IN_rtld.
3796 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Likewise.
3797 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
3798 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
3799 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
3800 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
3801 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
3802 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
3803 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
3804 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
3805 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
3807 2006-10-27 Ulrich Drepper <drepper@redhat.com>
3809 * sysdeps/pthread/pthread_barrier_wait.c: Move to...
3810 * pthread_barrier_wait.c: ...here.
3811 * sysdeps/pthread/pthread_cond_broadcast.c: Move to...
3812 * pthread_cond_broadcast.c: ...here.
3813 * sysdeps/pthread/pthread_cond_signal.c: Move to...
3814 * pthread_cond_signal.c: ...here.
3815 * sysdeps/pthread/pthread_cond_timedwait.c: Move to...
3816 * pthread_cond_timedwait.c: ...here.
3817 * sysdeps/pthread/pthread_cond_wait.c: Move to...
3818 * pthread_cond_wait.c: ...here.
3819 * sysdeps/pthread/pthread_once.c: Move to...
3820 * pthread_once.c: ...here.
3821 * sysdeps/pthread/pthread_rwlock_rdlock.c: Move to...
3822 * pthread_rwlock_rdlock.c: ...here.
3823 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Move to...
3824 * pthread_rwlock_timedrdlock.c: ...here.
3825 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Move to...
3826 * pthread_rwlock_timedwrlock.c: ...here.
3827 * sysdeps/pthread/pthread_rwlock_unlock.c: Move to...
3828 * pthread_rwlock_unlock.c: ...here.
3829 * sysdeps/pthread/pthread_rwlock_wrlock.c: Move to...
3830 * pthread_rwlock_wrlock.c: ...here.
3831 * sysdeps/pthread/pthread_spin_destroy.c: Move to...
3832 * pthread_spin_destroy.c: ...here.
3833 * sysdeps/pthread/pthread_spin_init.c: Move to...
3834 * pthread_spin_init.c: ...here.
3835 * sysdeps/pthread/pthread_spin_unlock.c: Move to...
3836 * pthread_spin_unlock.c: ...here.
3837 * sysdeps/pthread/pthread_getcpuclockid.c: Move to...
3838 * pthread_getcpuclockid.c: ...here.
3840 * init.c: USE_TLS support is now always enabled.
3841 * tst-tls5.h: Likewise.
3842 * sysdeps/alpha/tls.h: Likewise.
3843 * sysdeps/i386/tls.h: Likewise.
3844 * sysdeps/ia64/tls.h: Likewise.
3845 * sysdeps/powerpc/tls.h: Likewise.
3846 * sysdeps/s390/tls.h: Likewise.
3847 * sysdeps/sh/tls.h: Likewise.
3848 * sysdeps/sparc/tls.h: Likewise.
3849 * sysdeps/x86_64/tls.h: Likewise.
3851 2006-10-27 Jakub Jelinek <jakub@redhat.com>
3853 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
3854 __rtld_mrlock_change): Update oldval if atomic compare and exchange
3857 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
3858 Define to THREAD_SELF->header.multiple_threads.
3859 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
3861 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
3863 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
3864 (SINGLE_THREAD_P): Likewise.
3865 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
3866 (SINGLE_THREAD_P): Likewise.
3867 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
3868 (SINGLE_THREAD_P): Likewise.
3869 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
3870 (SINGLE_THREAD_P): Likewise.
3871 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (SINGLE_THREAD_P):
3873 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
3874 (SINGLE_THREAD_P): Likewise.
3875 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
3876 (SINGLE_THREAD_P): Likewise.
3877 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (SINGLE_THREAD_P):
3880 2006-10-26 Jakub Jelinek <jakub@redhat.com>
3882 * pthread_attr_setstacksize.c (NEW_VERNUM): Define to GLIBC_2_3_3
3883 by default rather than 2_3_3.
3885 2006-10-17 Jakub Jelinek <jakub@redhat.com>
3887 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
3888 __rtld_mrlock_unlock, __rtld_mrlock_change, __rtld_mrlock_done): Use
3889 atomic_* instead of catomic_* macros.
3891 2006-10-12 Ulrich Drepper <drepper@redhat.com>
3894 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add SEM_VALUE_MAX.
3895 * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
3896 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
3897 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
3898 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
3899 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Remove SEM_VALUE_MAX.
3900 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
3901 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
3902 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
3903 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: Likewise.
3904 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
3905 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
3906 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
3908 2006-10-11 Ulrich Drepper <drepper@redhat.com>
3910 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add support for
3911 cancelable syscalls with six parameters.
3913 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Use catomic_*
3914 operations instead of atomic_*.
3916 2006-10-09 Ulrich Drepper <drepper@redhat.com>
3918 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: New file..
3920 2006-10-07 Ulrich Drepper <drepper@redhat.com>
3922 * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: New file.
3923 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstack.c: New file.
3924 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c:
3926 * pthread_attr_setstack.c: Allow overwriting the version number of the
3928 * pthread_attr_setstacksize.c: Likewise.
3929 (__old_pthread_attr_setstacksize): If STACKSIZE_ADJUST is defined use
3931 * sysdeps/unix/sysv/linux/powerpc/Versions (libpthread): Add
3932 pthread_attr_setstack and pthread_attr_setstacksize to GLIBC_2.6.
3934 2006-09-24 Ulrich Drepper <drepper@redhat.com>
3937 * descr.h (ENQUEUE_MUTEX_BOTH): Add cast to avoid warning.
3938 Patch by Petr Baudis.
3940 2006-09-18 Jakub Jelinek <jakub@redhat.com>
3942 * tst-kill4.c (do_test): Explicitly set tf thread's stack size.
3944 * tst-cancel2.c (tf): Loop as long as something was written.
3946 2006-09-12 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3948 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: For PI
3949 mutexes wake all mutexes.
3950 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Don't increment
3951 WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
3952 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
3954 2006-09-12 Ulrich Drepper <drepper@redhat.com>
3956 * tst-cond22.c (tf): Slight changes to the pthread_cond_wait use
3957 to guarantee the thread is always canceled.
3959 2006-09-08 Jakub Jelinek <jakub@redhat.com>
3961 * tst-cond22.c: Include pthread.h instead of pthreadP.h.
3963 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Only
3964 increase FUTEX if increasing WAKEUP_SEQ. Fix comment typo.
3965 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
3966 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3967 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3969 2006-09-08 Ulrich Drepper <drepper@redhat.com>
3972 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Don't
3973 increment WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
3974 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
3975 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3976 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3977 * Makefile (tests): Add tst-cond22.
3978 * tst-cond22.c: New file.
3980 2006-09-05 Ulrich Drepper <drepper@redhat.com>
3983 * descr.h (struct pthread): Add parent_cancelhandling.
3984 * sysdeps/pthread/createthread.c (create_thread): Pass parent
3985 cancelhandling value to child.
3986 * pthread_create.c (start_thread): If parent thread was canceled
3987 reset the SIGCANCEL mask.
3988 * Makefile (tests): Add tst-cancel25.
3989 * tst-cancel25.c: New file.
3991 2006-09-05 Jakub Jelinek <jakub@redhat.com>
3992 Ulrich Drepper <drepper@redhat.com>
3994 * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY): Don't decrement
3995 counterp if it is already zero.
3996 * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY): Likewise..
3998 2006-03-04 Jakub Jelinek <jakub@redhat.com>
3999 Roland McGrath <roland@redhat.com>
4001 * sysdeps/unix/sysv/linux/i386/lowlevellock.h
4002 (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
4003 LLL_STUB_UNWIND_INFO_3, LLL_STUB_UNWIND_INFO_4): Define.
4004 (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
4005 lll_robust_mutex_cond_lock, lll_mutex_timedlock,
4006 lll_robust_mutex_timedlock, lll_mutex_unlock,
4007 lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
4008 Add _L_*_ symbols around the subsection.
4009 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Add unwind info.
4010 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Likewise.
4012 2006-03-03 Jakub Jelinek <jakub@redhat.com>
4013 Roland McGrath <roland@redhat.com>
4015 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
4016 (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
4017 LLL_STUB_UNWIND_INFO_5, LLL_STUB_UNWIND_INFO_6): Define.
4018 (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
4019 lll_robust_mutex_cond_lock, lll_mutex_timedlock,
4020 lll_robust_mutex_timedlock, lll_mutex_unlock,
4021 lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
4022 Add _L_*_ symbols around the subsection.
4023 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Add unwind info.
4024 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
4026 2006-08-31 Ulrich Drepper <drepper@redhat.com>
4028 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Undo last
4029 change because it can disturb too much existing code. If real hard
4030 reader preference is needed we'll introduce another type.
4031 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
4032 (pthread_rwlock_timedwrlock): Likewise.
4033 * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
4036 2006-08-30 Ulrich Drepper <drepper@redhat.com>
4038 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Respect
4040 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
4041 (pthread_rwlock_timedwrlock): Likewise.
4042 * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
4045 2006-08-25 Jakub Jelinek <jakub@redhat.com>
4047 * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libpthread):
4048 Only define ifdef SHARED.
4050 2006-08-23 Ulrich Drepper <drepper@redhat.com>
4052 * allocatestack.c (queue_stack): Move freeing of surplus stacks to...
4053 (free_stacks): ...here.
4054 (__free_stack_cache): New function.
4055 * pthreadP.h: Declare __free_stack_cache.
4056 * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
4058 * init.c (pthread_functions): Initialize ptr_freeres.
4059 * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libptread):
4060 New freeres function.
4062 2006-07-30 Joseph S. Myers <joseph@codesourcery.com>
4065 * Makefile (extra-objs): Add modules to extra-test-objs instead.
4067 2006-08-20 Ulrich Drepper <drepper@redhat.com>
4069 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
4070 _XOPEN_REALTIME_THREADS.
4072 2006-08-15 Jakub Jelinek <jakub@redhat.com>
4074 * sysdeps/unix/sysv/linux/clock_settime.c (INTERNAL_VSYSCALL): Use
4075 HAVE_CLOCK_GETRES_VSYSCALL as guard macro rather than
4076 HAVE_CLOCK_GETTIME_VSYSCALL.
4077 (maybe_syscall_settime_cpu): Use plain INTERNAL_VSYSCALL here.
4079 2006-08-14 Jakub Jelinek <jakub@redhat.com>
4081 * sysdeps/unix/sysv/linux/bits/posix_opt.h
4082 (_POSIX_THREAD_PRIO_PROTECT): Define to 200112L.
4083 * descr.h (struct priority_protection_data): New type.
4084 (struct pthread): Add tpp field.
4085 * pthreadP.h (PTHREAD_MUTEX_PP_NORMAL_NP,
4086 PTHREAD_MUTEX_PP_RECURSIVE_NP, PTHREAD_MUTEX_PP_ERRORCHECK_NP,
4087 PTHREAD_MUTEX_PP_ADAPTIVE_NP): New enum values.
4088 * pthread_mutex_init.c (__pthread_mutex_init): Handle non-robust
4090 * pthread_mutex_lock.c (__pthread_mutex_lock): Handle TPP mutexes.
4091 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Likewise.
4092 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Likewise.
4093 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Likewise.
4095 * pthread_setschedparam.c (__pthread_setschedparam): Handle priority
4097 * pthread_setschedprio.c (pthread_setschedprio): Likewise.
4098 * pthread_mutexattr_getprioceiling.c
4099 (pthread_mutexattr_getprioceiling): If ceiling is 0, ensure it is
4100 in the SCHED_FIFO priority range.
4101 * pthread_mutexattr_setprioceiling.c
4102 (pthread_mutexattr_setprioceiling): Fix prioceiling validation.
4103 * pthread_mutex_getprioceiling.c (pthread_mutex_getprioceiling): Fail
4104 if mutex is not TPP. Ceiling is now in __data.__lock.
4105 * pthread_mutex_setprioceiling.c: Include stdbool.h.
4106 (pthread_mutex_setprioceiling): Fix prioceiling validation. Ceiling
4107 is now in __data.__lock. Add locking.
4108 * pthread_create.c (__free_tcb): Free pd->tpp structure.
4109 * Makefile (libpthread-routines): Add tpp.
4110 (xtests): Add tst-mutexpp1, tst-mutexpp6 and tst-mutexpp10.
4111 * tst-tpp.h: New file.
4112 * tst-mutexpp1.c: New file.
4113 * tst-mutexpp6.c: New file.
4114 * tst-mutexpp10.c: New file.
4115 * tst-mutex1.c (TEST_FUNCTION): Don't redefine if already defined.
4116 * tst-mutex6.c (TEST_FUNCTION): Likewise.
4118 2006-08-12 Ulrich Drepper <drepper@redhat.com>
4121 * pthread_join.c (pthread_join): Account for self being canceled
4122 when checking for deadlocks.
4123 * tst-join5.c: Cleanups. Allow to be used in tst-join6.
4124 (tf1): Don't print anything after pthread_join returns, this would be
4125 another cancellation point.
4127 * tst-join6.c: New file.
4128 * Makefile (tests): Add tst-join6.
4130 2006-08-03 Ulrich Drepper <drepper@redhat.com>
4133 * pthread_setspecific.c (__pthread_setspecific): Check
4134 out-of-range index before checking for unused key.
4136 * sysdeps/pthread/gai_misc.h: New file.
4138 2006-08-01 Ulrich Drepper <drepper@redhat.com>
4140 * sysdeps/unix/sysv/linux/i386/smp.h: New file. Old Linux-specific
4141 file. Don't use sysctl.
4142 * sysdeps/unix/sysv/linux/smp.h: Always assume SMP. Archs can
4143 overwrite the file if this is likely not true.
4145 2006-07-31 Daniel Jacobowitz <dan@codesourcery.com>
4147 * allocatestack.c (__reclaim_stacks): Reset the PID on cached stacks.
4148 * Makefile (tests): Add tst-getpid3.
4149 * tst-getpid3.c: New file.
4151 2006-07-30 Roland McGrath <roland@redhat.com>
4153 * Makefile (libpthread-routines): Add ptw-sigsuspend.
4155 * sysdeps/unix/sysv/linux/i386/not-cancel.h
4156 (pause_not_cancel): New macro.
4157 (nanosleep_not_cancel): New macro.
4158 (sigsuspend_not_cancel): New macro.
4159 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
4160 nanosleep_not_cancel macro from <not-cancel.h>.
4161 * pthread_mutex_lock.c (__pthread_mutex_lock): Use pause_not_cancel
4162 macro from <not-cancel.h>.
4164 2006-07-28 Ulrich Drepper <drepper@redhat.com>
4165 Jakub Jelinek <jakub@redhat.com>
4167 * descr.h: Change ENQUEUE_MUTEX and DEQUEUE_MUTEX for bit 0
4168 notification of PI mutex. Add ENQUEUE_MUTEX_PI.
4169 * pthreadP.h: Define PTHREAD_MUTEX_PI_* macros for PI mutex types.
4170 * pthread_mutex_setprioceilining.c: Adjust for mutex type name change.
4171 * pthread_mutex_init.c: Add support for priority inheritance mutex.
4172 * pthread_mutex_lock.c: Likewise.
4173 * pthread_mutex_timedlock.c: Likewise.
4174 * pthread_mutex_trylock.c: Likewise.
4175 * pthread_mutex_unlock.c: Likewise.
4176 * sysdeps/pthread/pthread_cond_broadcast.c: For PI mutexes wake
4178 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.c: Likewise.
4179 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.c: Likewise.
4180 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: New file.
4181 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-header): Add
4182 pthread-pi-defines.sym.
4183 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_LOCK_PI,
4184 FUTEX_UNLOCK_PI, and FUTEX_TRYLOCK_PI.
4185 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
4186 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
4187 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
4188 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
4189 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
4190 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
4191 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
4192 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
4193 _POSIX_THREAD_PRIO_INHERIT to 200112L.
4194 * tst-mutex1.c: Adjust to allow use in PI mutex test.
4195 * tst-mutex2.c: Likewise.
4196 * tst-mutex3.c: Likewise.
4197 * tst-mutex4.c: Likewise.
4198 * tst-mutex5.c: Likewise.
4199 * tst-mutex6.c: Likewise.
4200 * tst-mutex7.c: Likewise.
4201 * tst-mutex7a.c: Likewise.
4202 * tst-mutex8.c: Likewise.
4203 * tst-mutex9.c: Likewise.
4204 * tst-robust1.c: Likewise.
4205 * tst-robust7.c: Likewise.
4206 * tst-robust8.c: Likewise.
4207 * tst-mutexpi1.c: New file.
4208 * tst-mutexpi2.c: New file.
4209 * tst-mutexpi3.c: New file.
4210 * tst-mutexpi4.c: New file.
4211 * tst-mutexpi5.c: New file.
4212 * tst-mutexpi6.c: New file.
4213 * tst-mutexpi7.c: New file.
4214 * tst-mutexpi7a.c: New file.
4215 * tst-mutexpi8.c: New file.
4216 * tst-mutexpi9.c: New file.
4217 * tst-robust1.c: New file.
4218 * tst-robust2.c: New file.
4219 * tst-robust3.c: New file.
4220 * tst-robust4.c: New file.
4221 * tst-robust5.c: New file.
4222 * tst-robust6.c: New file.
4223 * tst-robust7.c: New file.
4224 * tst-robust8.c: New file.
4225 * Makefile (tests): Add the new tests.
4227 * pthread_create.c (start_thread): Add some casts to avoid warnings.
4228 * pthread_mutex_destroy.c: Remove unneeded label.
4230 2006-07-01 Ulrich Drepper <drepper@redhat.com>
4232 * pthread_mutex_init.c (__pthread_mutex_init): Move some
4233 computations to compile time.
4235 2006-06-04 Ulrich Drepper <drepper@redhat.com>
4237 * sysdeps/pthread/pthread.h: Add pthread_equal inline version.
4239 2006-05-15 Ulrich Drepper <drepper@redhat.com>
4241 * sysdeps/unix/sysv/linux/fork.h: Mark __fork_handlers as hidden.
4243 2006-05-11 Ulrich Drepper <drepper@redhat.com>
4245 * pthread_key_create.c (__pthread_key_create): Do away with
4246 __pthread_keys_lock.
4248 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4249 (__kernel_cpumask_size): Mark as hidden.
4250 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
4252 * sem_open.c (__sem_mappings_lock): Mark as hidden.
4253 * semaphoreP.h (__sem_mappings_lock): Likewise.
4255 2006-05-10 Ulrich Drepper <drepper@redhat.com>
4257 * pthread_atfork.c: Mark __dso_handle as hidden.
4259 2006-05-09 Ulrich Drepper <drepper@redhat.com>
4262 * sysdeps/pthread/unwind-forcedunwind.c: Different solution for
4263 the reload problem. Change the one path in pthread_cancel_init
4264 which causes the problem. Force gcc to reload. Simplify callers.
4265 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c
4266 (_Unwind_GetBSP): Undo last patch.
4268 2006-05-07 Ulrich Drepper <drepper@redhat.com>
4270 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: Make sure the
4271 function pointer is reloaded after pthread_cancel_init calls.
4274 * sysdeps/pthread/unwind-forcedunwind.c: Make sure functions
4275 pointers are reloaded after pthread_cancel_init calls.
4277 2006-05-01 Ulrich Drepper <drepper@redhat.com>
4279 * sysdeps/pthread/allocalim.h (__libc_use_alloca): Mark with
4282 2006-04-27 Ulrich Drepper <drepper@redhat.com>
4284 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
4285 Allocate new object which is passed to timer_sigev_thread so that
4286 the timer can be deleted before the new thread is scheduled.
4288 2006-04-26 Roland McGrath <roland@redhat.com>
4290 * sysdeps/x86_64/tls.h: Include <asm/prctl.h> inside [! __ASSEMBLER__].
4292 2006-04-08 Ulrich Drepper <drepper@redhat.com>
4294 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove branch predicion
4295 suffix for conditional jumps.
4296 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
4297 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
4298 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
4299 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
4300 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
4301 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
4303 * init.c (sigcancel_handler): Compare with correct PID even if the
4304 thread is in the middle of a fork call.
4305 (sighandler_setxid): Likewise.
4306 Reported by Suzuki K P <suzuki@in.ibm.com> .
4308 2006-04-07 Jakub Jelinek <jakub@redhat.com>
4310 * pthreadP.h (FUTEX_TID_MASK): Sync with kernel.
4312 2006-04-06 Ulrich Drepper <drepper@redhat.com>
4314 * pthread_getattr_np.c (pthread_getattr_np): Close fp if getrlimit
4315 fails [Coverity CID 105].
4317 2006-04-05 Ulrich Drepper <drepper@redhat.com>
4319 * sysdeps/pthread/pthread.h: Add nonnull attributes.
4321 2006-04-03 Steven Munroe <sjmunroe@us.ibm.com>
4324 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h [_ARCH_PWR4]:
4325 Define __lll_rel_instr using lwsync.
4327 2006-03-27 Ulrich Drepper <drepper@redhat.com>
4329 * allocatestack.c (allocate_stack): Always initialize robust_head.
4330 * descr.h: Define struct robust_list_head.
4331 (struct pthread): Use robust_list_head in robust mutex list definition.
4332 Adjust ENQUEUE_MUTEX and DEQUEUE_MUTEX.
4333 * init.c [!__ASSUME_SET_ROBUST_LIST] (__set_robust_list_avail): Define.
4334 (__pthread_initialize_minimal_internal): Register robust_list with
4336 * pthreadP.h: Remove PRIVATE_ from PTHREAD_MUTEX_ROBUST_* names.
4337 Declare __set_robust_list_avail.
4338 * pthread_create.c (start_thread): Register robust_list of new thread.
4339 [!__ASSUME_SET_ROBUST_LIST]: If robust_list is not empty wake up
4341 * pthread_mutex_destroy.c: For robust mutexes don't look at the
4342 number of users, it's unreliable.
4343 * pthread_mutex_init.c: Allow use of pshared robust mutexes if
4344 set_robust_list syscall is available.
4345 * pthread_mutex_consistent.c: Adjust for PTHREAD_MUTEX_ROBUST_* rename.
4346 * pthread_mutex_lock.c: Simplify robust mutex code a bit.
4347 Set robust_head.list_op_pending before trying to lock a robust mutex.
4348 * pthread_mutex_timedlock.c: Likewise.
4349 * pthread_mutex_trylock.c: Likewise.
4350 * pthread_mutex_unlock.c: Likewise for unlocking.
4351 * Makefile (tests): Add tst-robust8.
4352 * tst-robust8.c: New file.
4354 2006-03-08 Andreas Schwab <schwab@suse.de>
4356 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h
4357 (DL_SYSINFO_IMPLEMENTATION): Add missing newline.
4359 2006-03-05 Roland McGrath <roland@redhat.com>
4361 * configure (libc_add_on): Disable add-on when $add_ons_automatic = yes
4362 and $config_os doesn't match *linux*.
4364 2006-03-05 David S. Miller <davem@sunset.davemloft.net>
4366 * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S:
4367 Use __syscall_error.
4368 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
4369 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: Likewise.
4370 * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: Likewise.
4371 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
4372 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: Likewise.
4373 * sysdeps/unix/sysv/linux/sparc/Makefile: New file.
4375 2006-03-02 Ulrich Drepper <drepper@redhat.com>
4377 * sysdeps/unix/sysv/linux/aio_misc.h: Various cleanups.
4379 2006-03-01 Ulrich Drepper <drepper@redhat.com>
4381 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
4382 (__lll_robust_lock_wait): Also set FUTEX_WAITERS bit if we got the
4384 (__lll_robust_timedlock_wait): Likewise.
4385 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S
4386 (__lll_robust_lock_wait): Likewise.
4387 (__lll_robust_timedlock_wait): Likewise.
4388 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
4389 (__lll_robust_lock_wait): Likewise.
4390 (__lll_robust_timedlock_wait): Likewise.
4392 2006-03-01 Jakub Jelinek <jakub@redhat.com>
4394 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_robust_mutex_dead,
4395 lll_robust_mutex_trylock, lll_robust_mutex_lock,
4396 lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
4397 lll_robust_mutex_unlock): Define.
4398 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
4400 2006-02-28 H.J. Lu <hongjiu.lu@intel.com>
4402 * sysdeps/unix/sysv/linux/ia64/clone2.S: Include <clone2.S>
4403 instead of <clone.S>.
4405 2006-02-27 Jakub Jelinek <jakub@redhat.com>
4407 * Makefile (libpthread-routines): Add
4408 pthread_mutexattr_[sg]etprotocol, pthread_mutexattr_[sg]etprioceiling
4409 and pthread_mutex_[sg]etprioceiling.
4410 * Versions (GLIBC_2.4): Export pthread_mutexattr_getprotocol,
4411 pthread_mutexattr_setprotocol, pthread_mutexattr_getprioceiling,
4412 pthread_mutexattr_setprioceiling, pthread_mutex_getprioceiling and
4413 pthread_mutex_setprioceiling.
4414 * sysdeps/pthread/pthread.h (PTHREAD_PRIO_NONE, PTHREAD_PRIO_INHERIT,
4415 PTHREAD_PRIO_PROTECT): New enum values.
4416 (pthread_mutexattr_getprotocol, pthread_mutexattr_setprotocol,
4417 pthread_mutexattr_getprioceiling, pthread_mutexattr_setprioceiling,
4418 pthread_mutex_getprioceiling, pthread_mutex_setprioceiling): New
4420 * pthreadP.h (PTHREAD_MUTEX_PRIO_INHERIT_PRIVATE_NP,
4421 PTHREAD_MUTEX_PRIO_PROTECT_PRIVATE_NP): New enum values.
4422 (PTHREAD_MUTEX_PRIO_CEILING_SHIFT, PTHREAD_MUTEX_PRIO_CEILING_MASK):
4424 (PTHREAD_MUTEXATTR_PROTOCOL_SHIFT, PTHREAD_MUTEXATTR_PROTOCOL_MASK,
4425 PTHREAD_MUTEXATTR_PRIO_CEILING_SHIFT,
4426 PTHREAD_MUTEXATTR_PRIO_CEILING_MASK): Define.
4427 (PTHREAD_MUTEXATTR_FLAG_BITS): Or in PTHREAD_MUTEXATTR_PROTOCOL_MASK
4428 and PTHREAD_MUTEXATTR_PRIO_CEILING_MASK.
4429 * pthread_mutex_init.c (__pthread_mutex_init): For the time being
4430 return ENOTSUP for PTHREAD_PRIO_INHERIT or PTHREAD_PRIO_PROTECT
4432 * pthread_mutex_getprioceiling.c: New file.
4433 * pthread_mutex_setprioceiling.c: New file.
4434 * pthread_mutexattr_getprioceiling.c: New file.
4435 * pthread_mutexattr_setprioceiling.c: New file.
4436 * pthread_mutexattr_getprotocol.c: New file.
4437 * pthread_mutexattr_setprotocol.c: New file.
4439 2006-02-27 Daniel Jacobowitz <dan@codesourcery.com>
4441 * sysdeps/unix/sysv/linux/aio_misc.h: Include <limits.h>.
4443 2006-02-27 Roland McGrath <roland@redhat.com>
4445 * sysdeps/pthread/Subdirs: List nptl here too.
4446 * configure (libc_add_on_canonical): New variable.
4448 * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: Use #include_next.
4450 * sysdeps/unix/sysv/linux/sleep.c: Use #include_next after #include of
4451 self to get main source tree's file.
4452 * sysdeps/unix/sysv/linux/alpha/clone.S: Likewise.
4453 * sysdeps/unix/sysv/linux/i386/clone.S: Likewise.
4454 * sysdeps/unix/sysv/linux/i386/vfork.S: Likewise.
4455 * sysdeps/unix/sysv/linux/ia64/clone2.S: Likewise.
4456 * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: Likewise.
4457 * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: Likewise.
4458 * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: Likewise.
4459 * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: Likewise.
4460 * sysdeps/unix/sysv/linux/sh/clone.S: Likewise.
4461 * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: Likewise.
4462 * sysdeps/unix/sysv/linux/sparc/sparc64/clone.S: Likewise.
4463 * sysdeps/unix/sysv/linux/x86_64/clone.S: Likewise.
4464 * sysdeps/unix/sysv/linux/x86_64/vfork.S: Likewise.
4466 * Makefile: Use $(sysdirs) in vpath directive.
4468 * sysdeps/pthread/Makefile (CFLAGS-libc-start.c): Variable removed.
4469 (CPPFLAGS-timer_routines.c): Likewise.
4471 * Makeconfig (includes): Variable removed.
4473 2006-02-26 Roland McGrath <roland@redhat.com>
4475 * sysdeps/generic/pt-raise.c: Moved to ...
4476 * pt-raise.c: ... here.
4477 * sysdeps/generic/lowlevellock.h: Moved to ...
4478 * lowlevellock.h: ... here.
4480 2006-02-23 Roland McGrath <roland@redhat.com>
4482 * descr.h (struct pthread): Add final member `end_padding'.
4483 (PTHREAD_STRUCT_END_PADDING): Use it.
4485 2006-02-20 Roland McGrath <roland@redhat.com>
4487 * sysdeps/mips: Directory removed, saved in ports repository.
4488 * sysdeps/unix/sysv/linux/mips: Likewise.
4490 2006-02-18 Ulrich Drepper <drepper@redhat.com>
4492 * tst-robust1.c: Add second mutex to check that the mutex list is
4495 2006-02-17 Jakub Jelinek <jakub@redhat.com>
4497 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_mutex_dead,
4498 lll_robust_mutex_trylock, lll_robust_mutex_lock,
4499 lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
4500 lll_robust_mutex_unlock): New macros.
4501 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
4502 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
4503 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
4504 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
4505 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: New file.
4507 2006-02-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4509 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Add lll_robust_mutex_*
4511 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: New file.
4513 2006-02-17 Ulrich Drepper <drepper@redhat.com>
4515 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
4516 (lll_robust_mutex_unlock): Avoid unnecessary wakeups.
4517 * sysdeps/unix/sysv/linux/i386/lowlevellock.h
4518 (lll_robust_mutex_unlock): Likewise.
4520 2006-02-13 Jakub Jelinek <jakub@redhat.com>
4522 * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX):
4523 Set robust_list.__next rather than robust_list.
4524 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
4525 (__pthread_list_t): New typedef.
4526 (pthread_mutex_t): Replace __next and __prev fields with __list.
4527 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
4528 (__pthread_list_t): New typedef.
4529 (pthread_mutex_t): Replace __next and __prev fields with __list.
4530 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
4531 (__pthread_list_t, __pthread_slist_t): New typedefs.
4532 (pthread_mutex_t): Replace __next and __prev fields with __list.
4533 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
4534 (__pthread_list_t, __pthread_slist_t): New typedefs.
4535 (pthread_mutex_t): Replace __next and __prev fields with __list.
4536 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
4537 (__pthread_list_t, __pthread_slist_t): New typedefs.
4538 (pthread_mutex_t): Replace __next and __prev fields with __list.
4539 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h
4540 (__pthread_slist_t): New typedef.
4541 (pthread_mutex_t): Replace __next field with __list.
4543 2006-02-15 Ulrich Drepper <drepper@redhat.com>
4545 * pthreadP.h: Define PTHREAD_MUTEX_INCONSISTENT instead of
4546 PTHREAD_MUTEX_OWNERDEAD.
4547 (PTHREAD_MUTEX_ROBUST_PRIVATE_NP): Define as 16, not 256.
4548 Define FUTEX_WAITERS, FUTEX_OWNER_DIED, FUTEX_TID_MASK.
4549 * Makefile (libpthread-routines): Add lowlevelrobustlock.
4550 * pthread_create.c (start_thread): Very much simplify robust_list loop.
4551 * pthread_mutex_consistent.c: Inconsistent mutex have __owner now set
4552 to PTHREAD_MUTEX_INCONSISTENT.
4553 * pthread_mutex_destroy.c: Allow destroying of inconsistent mutexes.
4554 * pthread_mutex_lock.c: Reimplement robust mutex handling.
4555 * pthread_mutex_trylock.c: Likewise.
4556 * pthread_mutex_timedlock.c: Likewise.
4557 * pthread_mutex_unlock.c: Likewise.
4558 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
4559 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
4560 lowlevelrobustlock.sym.
4561 * sysdeps/unix/sysv/linux/lowlevelrobustlock.sym: New file.
4562 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add lll_robust_mutex_*
4564 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
4565 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: New file.
4566 * sysdeps/unix/sysv/linux/i386/i586/lowlevelrobustlock.S: New file.
4567 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrobustlock.S: New file.
4568 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: New file.
4570 2006-02-12 Ulrich Drepper <drepper@redhat.com>
4572 * allocatestack.c (allocate_stack): Initialize robust_list.
4573 * init.c (__pthread_initialize_minimal_internal): Likewise.
4574 * descr.h (struct xid_command): Pretty printing.
4575 (struct pthread): Use __pthread_list_t or __pthread_slist_t for
4576 robust_list. Adjust macros.
4577 * pthread_create.c (start_thread): Adjust robust_list handling.
4578 * phtread_mutex_unlock.c: Don't allow unlocking from any thread
4579 but the owner for all robust mutex types.
4580 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
4581 __pthread_list_t and __pthread_slist_t. Use them in pthread_mutex_t.
4582 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4583 * sysdeps/pthread/pthread.h: Adjust mutex initializers.
4585 * sysdeps/unix/sysv/linux/i386/not-cancel.h: Define openat_not_cancel,
4586 openat_not_cancel_3, openat64_not_cancel, and openat64_not_cancel_3.
4588 2006-02-08 Jakub Jelinek <jakub@redhat.com>
4590 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait,
4591 lll_futex_timedwait, lll_wait_tid): Add "memory" clobber.
4593 2006-01-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4595 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_futex_wait):
4597 (lll_futex_timed_wait): Define.
4599 2006-01-19 Ulrich Drepper <drepper@redhat.com>
4601 * tst-cancel4.c: Test ppoll.
4603 2006-01-18 Andreas Jaeger <aj@suse.de>
4606 * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h
4607 (pthread_mutex_t): Follow changes for other archs. Based on patch
4608 by Jim Gifford <patches@jg555.com>.
4610 2006-01-13 Richard Henderson <rth@redhat.com>
4612 * sysdeps/alpha/tls.h (tcbhead_t): Rename member to __private.
4614 2006-01-10 Roland McGrath <roland@redhat.com>
4616 * sysdeps/alpha/jmpbuf-unwind.h: File moved to main source tree.
4617 * sysdeps/i386/jmpbuf-unwind.h: Likewise.
4618 * sysdeps/mips/jmpbuf-unwind.h: Likewise.
4619 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
4620 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
4621 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
4622 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
4623 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
4624 * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
4625 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
4627 2006-01-09 Roland McGrath <roland@redhat.com>
4629 * tst-initializers1-c89.c: New file.
4630 * tst-initializers1-c99.c: New file.
4631 * tst-initializers1-gnu89.c: New file.
4632 * tst-initializers1-gnu99.c: New file.
4633 * Makefile (tests): Add them.
4634 (CFLAGS-tst-initializers1-c89.c): New variable.
4635 (CFLAGS-tst-initializers1-c99.c): New variable.
4636 (CFLAGS-tst-initializers1-gnu89.c): New variable.
4637 (CFLAGS-tst-initializers1-gnu99.c): New variable.
4639 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
4640 Use __extension__ on anonymous union definition.
4641 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4642 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4643 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4644 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4645 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4647 2006-01-08 Jakub Jelinek <jakub@redhat.com>
4649 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
4650 Don't give the union a name because it changes the mangled name.
4651 Instead name the struct for __data.
4652 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_mutex_t):
4654 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_mutex_t):
4657 2006-01-09 Jakub Jelinek <jakub@redhat.com>
4659 * sysdeps/sparc/sparc64/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Add
4660 stack bias to mc_ftp field.
4662 2006-01-07 Ulrich Drepper <drepper@redhat.com>
4664 * sysdeps/pthread/aio_misc.h (AIO_MISC_WAIT): Work around gcc
4665 being too clever and reloading the futex value where it shouldn't.
4667 2006-01-06 Ulrich Drepper <drepper@redhat.com>
4669 * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX): Use
4672 2006-01-06 Jakub Jelinek <jakub@redhat.com>
4674 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
4677 2006-01-06 Ulrich Drepper <drepper@redhat.com>
4679 * sysdeps/ia64/tls.h (tcbhead_t): Rename private member to __private.
4680 * sysdeps/ia64/tcb-offsets.sym: Adjust for private->__private
4681 rename in tcbhead_t.
4683 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
4684 Don't give the union a name because it changes the mangled name.
4685 Instead name the struct for __data.
4686 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4687 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4688 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4689 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4690 * pthread_create.c (start_thread): Adjust robust mutex free loop.
4691 * descr.h (ENQUEUE_MUTEX, DEQUEUE_MUTEX): Adjust.
4693 2006-01-05 Ulrich Drepper <drepper@redhat.com>
4695 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
4697 (lll_futex_timed_wait): Define.
4698 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
4699 * sysdeps/pthread/aio_misc.h: New file.
4701 2006-01-03 Joseph S. Myers <joseph@codesourcery.com>
4703 * Makefile ($(objpfx)$(multidir)): Use mkdir -p.
4705 2006-01-03 Steven Munroe <sjmunroe@us.ibm.com>
4707 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
4708 (PSEUDO): Remove redundant cfi_startproc and cfi_endproc directives.
4709 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
4711 2006-01-04 Ulrich Drepper <drepper@redhat.com>
4713 * tst-cancel24.cc: Use C headers instead of C++ headers.
4715 2006-01-03 Jakub Jelinek <jakub@redhat.com>
4717 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Remove #error for
4718 sparc-linux configured glibc.
4719 (lll_futex_wake_unlock): Define to 1 for sparc-linux configured glibc.
4720 (__lll_mutex_trylock, __lll_mutex_cond_trylock, __lll_mutex_lock,
4721 __lll_mutex_cond_lock, __lll_mutex_timedlock): Use
4722 atomic_compare_and_exchange_val_24_acq instead of
4723 atomic_compare_and_exchange_val_acq.
4724 (lll_mutex_unlock, lll_mutex_unlock_force): Use atomic_exchange_24_rel
4725 instead of atomic_exchange_rel.
4726 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: New file.
4727 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c: New
4729 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c: New
4731 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: New file.
4732 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: New file.
4733 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: New file.
4734 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c: New file.
4735 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: New file.
4736 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
4738 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
4740 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: New file.
4741 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: New file.
4742 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c: New
4744 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_trywait.c: New
4746 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: New file.
4748 2006-01-03 Ulrich Drepper <drepper@redhat.com>
4750 * sysdeps/pthread/pthread.h [__WORDSIZE==64]: Don't use cast in
4753 2006-01-02 Jakub Jelinek <jakub@redhat.com>
4755 * sysdeps/sparc/tls.h (tcbhead_t): Add pointer_guard field.
4756 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
4757 THREAD_COPY_POINTER_GUARD): Define.
4758 * sysdeps/sparc/tcb-offsets.sym (POINTER_GUARD): Define.
4759 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Revert 2005-12-27 changes.
4761 2006-01-01 Ulrich Drepper <drepper@redhat.com>
4763 * version.c: Update copyright year.
4765 2005-12-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4767 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Remove explicit
4768 .eh_frame section, use cfi_* directives.
4769 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Add cfi instrumentation.
4771 2005-12-30 Ulrich Drepper <drepper@redhat.com>
4773 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Undo last change for
4776 2005-12-29 Ulrich Drepper <drepper@redhat.com>
4778 * sysdeps/pthread/sigaction.c: Removed.
4779 * sigaction.c: New file.
4780 * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-sigaction.c.
4782 2005-12-28 Ulrich Drepper <drepper@redhat.com>
4784 * Makefile (tests): Add tst-signal7.
4785 * tst-signal7.c: New file.
4787 2005-12-27 Roland McGrath <roland@redhat.com>
4789 * sysdeps/x86_64/jmpbuf-unwind.h (_jmpbuf_sp): New inline function.
4790 (_JMPBUF_UNWINDS_ADJ): Use it, to PTR_DEMANGLE before comparison.
4791 * sysdeps/alpha/jmpbuf-unwind.h: Likewise.
4792 * sysdeps/i386/jmpbuf-unwind.h: Likewise.
4793 * sysdeps/mips/jmpbuf-unwind.h: Likewise.
4794 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
4795 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
4796 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
4797 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
4798 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
4799 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
4801 2005-12-27 Jakub Jelinek <jakub@redhat.com>
4803 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Add __next
4804 and __prev field to pthread_mutex_t.
4805 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4806 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4807 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4808 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4809 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Add __next field
4812 2005-12-26 Ulrich Drepper <drepper@redhat.com>
4814 * pthreadP.h: Define PTHREAD_MUTEX_ROBUST_PRIVATE_NP,
4815 PTHREAD_MUTEX_ROBUST_PRIVATE_RECURSIVE_NP,
4816 PTHREAD_MUTEX_ROBUST_PRIVATE_ERRORCHECK_NP,
4817 PTHREAD_MUTEX_ROBUST_PRIVATE_ADAPTIVE_NP,
4818 PTHREAD_MUTEXATTR_FLAG_ROBUST, PTHREAD_MUTEXATTR_FLAG_PSHARED,
4819 and PTHREAD_MUTEXATTR_FLAG_BITS.
4820 * descr.h (struct pthread): Add robust_list field and define
4821 ENQUEUE_MUTEX and DEQUEUE_MUTEX macros.
4822 * pthread_mutexattr_getrobust.c: New file.
4823 * pthread_mutexattr_setrobust.c: New file.
4824 * pthread_mutex_consistent.c: New file.
4825 * sysdeps/pthread/pthread.h: Declare pthread_mutexattr_getrobust,
4826 pthread_mutexattr_setrobust, and pthread_mutex_consistent.
4827 Define PTHREAD_MUTEX_STALLED_NP and PTHREAD_MUTEX_ROBUST_NP.
4828 Adjust pthread_mutex_t initializers.
4829 * nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Add __next
4830 field to pthread_mutex_t.
4831 * nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Add __next
4832 and __prev field to pthread_mutex_t.
4833 * Versions [GLIBC_2.4]: Export pthread_mutexattr_getrobust_np,
4834 pthread_mutexattr_setrobust_np, and pthread_mutex_consistent_np.
4835 * pthread_mutexattr_getpshared.c: Use PTHREAD_MUTEXATTR_FLAG_PSHARED
4836 and PTHREAD_MUTEXATTR_FLAG_BITS macros instead of magic numbers.
4837 * pthread_mutexattr_gettype.c: Likewise.
4838 * pthread_mutexattr_setpshared.c: Likewise.
4839 * pthread_mutexattr_settype.c: Likewise.
4840 * pthread_mutex_init.c: Reject robust+pshared attribute for now.
4841 Initialize mutex kind according to robust flag.
4842 * pthread_mutex_lock.c: Implement local robust mutex.
4843 * pthread_mutex_timedlock.c: Likewise.
4844 * pthread_mutex_trylock.c: Likewise.
4845 * pthread_mutex_unlock.c: Likewise.
4846 * pthread_create.c (start_thread): Mark robust mutexes which remained
4848 * tst-robust1.c: New file.
4849 * tst-robust2.c: New file.
4850 * tst-robust3.c: New file.
4851 * tst-robust4.c: New file.
4852 * tst-robust5.c: New file.
4853 * tst-robust6.c: New file.
4854 * tst-robust7.c: New file.
4855 * Makefile (libpthread-routines): Add pthread_mutexattr_getrobust,
4856 pthread_mutexattr_setrobust, and pthread_mutex_consistent.
4857 (tests): Add tst-robust1, tst-robust2, tst-robust3, tst-robust4,
4858 tst-robust5, tst-robust6, and tst-robust7.
4860 * tst-typesizes.c: New file.
4861 * Makefile (tests): Add tst-typesizes.
4863 * tst-once3.c: More debug output.
4865 2005-12-24 Ulrich Drepper <drepper@redhat.com>
4867 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Add break
4868 missing after last change.
4870 * version.c: Update copyright year.
4872 2005-12-23 Ulrich Drepper <drepper@redhat.com>
4874 * pthread_mutex_destroy.c: Set mutex type to an invalid value.
4875 * pthread_mutex_lock.c: Return EINVAL for invalid mutex type.
4876 * pthread_mutex_trylock.c: Likewise.
4877 * pthread_mutex_timedlock.c: Likewise.
4878 * pthread_mutex_unlock.c: Likewise.
4880 2005-12-22 Roland McGrath <roland@redhat.com>
4882 * sysdeps/pthread/sigaction.c: Use "" instead of <> to include self,
4883 so that #include_next's search location is not reset to the -I..
4884 directory where <nptl/...> can be found.
4886 2005-12-22 Ulrich Drepper <drepper@redhat.com>
4889 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
4890 Fix unwind info. Remove useless branch prediction prefix.
4891 * tst-cancel24.cc: New file.
4892 * Makefile: Add rules to build and run tst-cancel24.
4894 2005-12-21 Roland McGrath <roland@redhat.com>
4896 * libc-cancellation.c: Use <> rather than "" #includes.
4897 * pt-cleanup.c: Likewise.
4898 * pthread_create.c: Likewise.
4899 * pthread_join.c: Likewise.
4900 * pthread_timedjoin.c: Likewise.
4901 * pthread_tryjoin.c: Likewise.
4902 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Likewise.
4903 * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
4904 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
4905 * unwind.c: Likewise.
4907 2005-12-19 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4909 * sysdeps/sh/tcb-offsets.sym: Add POINTER_GUARD.
4910 * sysdeps/sh/tls.h (tcbhead_t): Remove private and add pointer_guard.
4911 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
4912 THREAD_COPY_POINTER_GUARD): Define.
4914 2005-12-19 Jakub Jelinek <jakub@redhat.com>
4916 * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): Make room for 2 uintptr_t's
4918 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
4919 THREAD_COPY_POINTER_GUARD): Define.
4920 * sysdeps/powerpc/tcb-offsets.sym (POINTER_GUARD): Add.
4921 * sysdeps/powerpc/tls.h (tcbhead_t): Add pointer_guard field.
4922 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
4923 THREAD_COPY_POINTER_GUARD): Define.
4924 * sysdeps/s390/tcb-offsets.sym (STACK_GUARD): Add.
4925 * sysdeps/s390/tls.h (THREAD_GET_POINTER_GUARD,
4926 THREAD_SET_POINTER_GUARD, THREAD_COPY_POINTER_GUARD): Define.
4927 * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S (__ia64_longjmp):
4928 Use PTR_DEMANGLE for B0 if defined.
4930 2005-12-17 Ulrich Drepper <drepper@redhat.com>
4932 * pthread_create.c (__pthread_create_2_1): Use
4933 THREAD_COPY_POINTER_GUARD if available.
4934 * sysdeps/i386/tcb-offsets.sym: Add POINTER_GUARD.
4935 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
4936 * sysdeps/i386/tls.h (tcbhead_t): Add pointer_guard.
4937 Define THREAD_SET_POINTER_GUARD and THREAD_COPY_POINTER_GUARD.
4938 * sysdeps/x86_64/tls.h: Likewise.
4940 2005-12-15 Roland McGrath <roland@redhat.com>
4942 * sysdeps/unix/sysv/linux/mq_notify.c: Don't use sysdeps/generic.
4944 2005-12-13 Ulrich Drepper <drepper@redhat.com>
4946 * sysdeps/pthread/sigfillset.c: Adjust for files moved out of
4948 * errno-loc.c: New file.
4950 2005-12-12 Roland McGrath <roland@redhat.com>
4952 * init.c (__pthread_initialize_minimal_internal): Do __static_tls_size
4953 adjustments before choosing stack size. Update minimum stack size
4954 calculation to match allocate_stack change.
4956 2005-12-12 Ulrich Drepper <drepper@redhat.com>
4958 * allocatestack.c (allocate_stack): Don't demand that there is an
4959 additional full page available on the stack beside guard, TLS, the
4962 2005-11-24 Ulrich Drepper <drepper@redhat.com>
4964 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
4965 (__cleanup_fct_attribute): Use __regparm__ not regparm.
4967 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: When
4968 compiling 32-bit code we must define __cleanup_fct_attribute.
4970 005-11-24 Jakub Jelinek <jakub@redhat.com>
4973 * sysdeps/pthread/pthread.h (__pthread_unwind_next): Use
4974 __attribute__ instead of __attribute.
4975 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
4976 (__cleanup_fct_attribute): Likewise.
4978 2005-11-17 Jakub Jelinek <jakub@redhat.com>
4980 * sysdeps/pthread/unwind-forcedunwind.c (pthread_cancel_init): Put
4981 a write barrier before writing libgcc_s_getcfa.
4983 2005-11-06 Ulrich Drepper <drepper@redhat.com>
4985 * sysdeps/unix/sysv/linux/configure: Removed.
4987 2005-11-05 Ulrich Drepper <drepper@redhat.com>
4989 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Remove trace of
4990 optional init_array/fini_array support.
4992 2005-10-24 Roland McGrath <roland@redhat.com>
4994 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Remove unnecessary
4995 versioned_symbol use.
4997 2005-10-16 Roland McGrath <roland@redhat.com>
4999 * init.c (__pthread_initialize_minimal_internal): Even when using a
5000 compile-time default stack size, apply the minimum that allocate_stack
5001 will require, and round up to page size.
5003 2005-10-10 Daniel Jacobowitz <dan@codesourcery.com>
5005 * Makefile ($(test-modules)): Remove static pattern rule.
5007 2005-10-14 Jakub Jelinek <jakub@redhat.com>
5008 Ulrich Drepper <drepper@redhat.com>
5010 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix stack
5011 alignment in callback function.
5012 * Makefile: Add rules to build and run tst-align3.
5013 * tst-align3.c: New file.
5015 2005-10-03 Jakub Jelinek <jakub@redhat.com>
5017 * allocatestack.c (setxid_signal_thread): Add
5018 INTERNAL_SYSCALL_DECL (err).
5020 2005-10-02 Jakub Jelinek <jakub@redhat.com>
5022 * allocatestack.c (setxid_signal_thread): Need to use
5023 atomic_compare_and_exchange_bool_acq.
5025 2005-10-01 Ulrich Drepper <drepper@redhat.com>
5026 Jakub Jelinek <jakub@redhat.com>
5028 * descr.h: Define SETXID_BIT and SETXID_BITMASK. Adjust
5030 (struct pthread): Move specific_used field to avoid padding.
5031 Add setxid_futex field.
5032 * init.c (sighandler_setxid): Reset setxid flag and release the
5034 * allocatestack.c (setxid_signal_thread): New function. Broken
5035 out of the bodies of the two loops in __nptl_setxid. For undetached
5036 threads check whether they are exiting and if yes, don't send a signal.
5037 (__nptl_setxid): Simplify loops by using setxid_signal_thread.
5038 * pthread_create.c (start_thread): For undetached threads, check
5039 whether setxid bit is set. If yes, wait until signal has been
5042 * allocatestack.c (STACK_VARIABLES): Initialize them.
5043 * pthread_create.c (__pthread_create_2_1): Initialize pd.
5045 2004-09-02 Jakub Jelinek <jakub@redhat.com>
5047 * pthread_cond_destroy.c (__pthread_cond_destroy): If there are
5048 waiters, awake all waiters on the associated mutex.
5050 2005-09-22 Roland McGrath <roland@redhat.com>
5052 * perf.c [__x86_64__] (HP_TIMING_NOW): New macro (copied from
5053 ../sysdeps/x86_64/hp-timing.h).
5055 2005-08-29 Jakub Jelinek <jakub@redhat.com>
5057 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_WAKE_OP,
5058 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5059 (lll_futex_wake_unlock): Define.
5060 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_WAKE_OP,
5061 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5062 (lll_futex_wake_unlock): Define.
5063 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_WAKE_OP,
5064 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5065 (lll_futex_wake_unlock): Define.
5066 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_WAKE_OP,
5067 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5068 (lll_futex_wake_unlock): Define.
5069 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_WAKE_OP,
5070 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5071 (lll_futex_wake_unlock): Define.
5072 * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal): Use
5073 lll_futex_wake_unlock.
5074 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
5075 (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5076 (__pthread_cond_signal): Use FUTEX_WAKE_OP.
5077 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
5078 (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5079 (__pthread_cond_signal): Use FUTEX_WAKE_OP.
5081 2005-09-05 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5083 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
5084 Fix typo in register name.
5086 2005-08-23 Ulrich Drepper <drepper@redhat.com>
5088 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
5089 Use __sigfillset. Document that sigfillset does the right thing wrt
5092 2005-07-11 Jakub Jelinek <jakub@redhat.com>
5095 * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER,
5096 PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP,
5097 PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP,
5098 PTHREAD_MUTEX_ADAPTIVE_NP, PTHREAD_RWLOCK_INITIALIZER,
5099 PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP,
5100 PTHREAD_COND_INITIALIZER): Supply zeros for all fields
5102 * Makefile (tests): Add tst-initializers1.
5103 (CFLAGS-tst-initializers1.c): Set.
5104 * tst-initializers1.c: New test.
5106 2005-07-11 Jakub Jelinek <jakub@redhat.com>
5108 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_rwlock_t):
5109 Make sure __flags are located at offset 48 from the start of the
5112 2005-07-02 Roland McGrath <roland@redhat.com>
5114 * Makeconfig: Comment fix.
5116 2005-07-05 Jakub Jelinek <jakub@redhat.com>
5118 * descr.h (PTHREAD_STRUCT_END_PADDING): Define.
5119 * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): If PTHREAD_STRUCT_END_PADDING
5120 is smaller than 8 bytes, increase TLS_PRE_TCB_SIZE by 16 bytes.
5121 (THREAD_SYSINFO, THREAD_SELF, DB_THREAD_SELF): Don't assume
5122 TLS_PRE_TCB_SIZE is sizeof (struct pthread).
5123 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5124 * sysdeps/ia64/tcb-offsets.sym (PID, TID, MULTIPLE_THREADS_OFFSET):
5125 Use TLS_PRE_TCB_SIZE instead of sizeof (struct pthread).
5126 * sysdeps/unix/sysv/linux/ia64/createthread.c (TLS_VALUE): Don't
5127 assume TLS_PRE_TCB_SIZE is sizeof (struct pthread).
5129 2005-06-25 Jakub Jelinek <jakub@redhat.com>
5131 * sysdeps/i386/tls.h (tcbhead_t): Add stack_guard field.
5132 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5133 * sysdeps/x86_64/tls.h (tcbhead_t): Add sysinfo and stack_guard
5135 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5136 * sysdeps/s390/tls.h (tcbhead_t): Add stack_guard
5137 field. Put in sysinfo field unconditionally.
5138 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5139 * sysdeps/powerpc/tls.h (tcbhead_t): Add stack_guard field.
5140 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5141 * sysdeps/sparc/tls.h (tcbhead_t): Add sysinfo and stack_guard
5143 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5144 * pthread_create.c (__pthread_create_2_1): Use
5145 THREAD_COPY_STACK_GUARD macro.
5146 * Makefile: Add rules to build and run tst-stackguard1{,-static}
5148 * tst-stackguard1.c: New file.
5149 * tst-stackguard1-static.c: New file.
5151 2005-06-14 Alan Modra <amodra@bigpond.net.au>
5153 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
5154 Invoke CGOTSETUP and CGOTRESTORE.
5155 (CGOTSETUP, CGOTRESTORE): Define.
5157 2005-05-29 Richard Henderson <rth@redhat.com>
5159 * tst-cancel4.c (WRITE_BUFFER_SIZE): New.
5160 (tf_write, tf_writev): Use it.
5161 (do_test): Use socketpair instead of pipe. Set SO_SNDBUF to
5164 2005-05-23 Jakub Jelinek <jakub@redhat.com>
5166 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
5167 [IS_IN_librt] (CENABLE, CDISABLE): Use JUMPTARGET instead of
5168 __librt_*_asynccancel@local.
5170 2005-05-17 Alan Modra <amodra@bigpond.net.au>
5172 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Delete
5173 all occurrences of JUMPTARGET. Instead append @local to labels.
5175 2005-05-20 Jakub Jelinek <jakub@redhat.com>
5177 * sysdeps/i386/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN): Define to
5178 size/alignment of struct pthread rather than tcbhead_t.
5179 * sysdeps/x86_64/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
5181 * sysdeps/s390/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
5183 * sysdeps/sparc/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
5186 2005-05-19 Richard Henderson <rth@redhat.com>
5188 * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use
5189 __sync_val_compare_and_swap, not explicit _si variant.
5190 * sysdeps/ia64/pthread_spin_trylock.c (pthread_spin_trylock): Likewise.
5192 2005-05-03 Ulrich Drepper <drepper@redhat.com>
5195 * sysdeps/pthread/pthread.h: Avoid empty initializers.
5197 2005-05-03 Jakub Jelinek <jakub@redhat.com>
5199 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Remove explicit
5200 .eh_frame section, use cfi_* directives.
5202 2005-04-27 Jakub Jelinek <jakub@redhat.com>
5204 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: Use <> instead
5207 2005-04-27 Ulrich Drepper <drepper@redhat.com>
5210 * tst-cancel17.c (do_test): Add arbitrary factor to make sure
5213 2005-04-27 Roland McGrath <roland@redhat.com>
5215 * Makefile (tests): Remove tst-clock2.
5217 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Handle
5218 CLOCK_PROCESS_CPUTIME_ID and CLOCK_PROCESS_THREAD_ID specially,
5219 translating to the kernel clockid_t for our own process/thread clock.
5221 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: New file.
5223 2005-04-15 Jakub Jelinek <jakub@redhat.com>
5225 * old_pthread_cond_init.c: Include <errno.h>.
5226 (__pthread_cond_init_2_0): Fail with EINVAL if COND_ATTR is
5227 process shared or uses clock other than CLOCK_REALTIME.
5228 * pthread_cond_init.c (__pthread_cond_init): Remove bogus comment.
5230 2005-04-13 David S. Miller <davem@davemloft.net>
5232 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: New file.
5233 * sysdeps/sparc/sparc64/clone.S: New file.
5235 2005-04-05 Jakub Jelinek <jakub@redhat.com>
5238 * sysdeps/pthread/pthread.h (__pthread_cleanup_routine): Use
5239 __inline instead of inline.
5240 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_routine): Likewise.
5242 2005-03-31 Jakub Jelinek <jakub@redhat.com>
5244 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Use
5245 functionally equivalent, but shorter instructions.
5246 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
5247 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
5248 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
5250 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
5251 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
5252 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
5253 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
5254 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5255 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
5256 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
5258 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
5259 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
5260 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
5261 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
5262 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
5264 2005-03-28 Daniel Jacobowitz <dan@codesourcery.com>
5266 * sysdeps/mips/Makefile: New file.
5267 * sysdeps/mips/nptl-sysdep.S: New file.
5268 * sysdeps/mips/tcb-offsets.sym: New file.
5269 * sysdeps/mips/pthread_spin_lock.S: New file.
5270 * sysdeps/mips/pthread_spin_trylock.S: New file.
5271 * sysdeps/mips/pthreaddef.h: New file.
5272 * sysdeps/mips/tls.h: New file.
5273 * sysdeps/mips/jmpbuf-unwind.h: New file.
5274 * sysdeps/unix/sysv/linux/mips/lowlevellock.h: New file.
5275 * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h: New file.
5276 * sysdeps/unix/sysv/linux/mips/bits/semaphore.h: New file.
5277 * sysdeps/unix/sysv/linux/mips/pthread_once.c: New file.
5278 * sysdeps/unix/sysv/linux/mips/fork.c: New file.
5279 * sysdeps/unix/sysv/linux/mips/pt-vfork.S: New file.
5280 * sysdeps/unix/sysv/linux/mips/vfork.S: New file.
5281 * sysdeps/unix/sysv/linux/mips/clone.S: New file.
5282 * sysdeps/unix/sysv/linux/mips/createthread.c: New file.
5283 * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: New file.
5285 2005-03-23 Ulrich Drepper <drepper@redhat.com>
5288 * pthread_create.c (__pthread_create_2_1): Rename syscall error
5291 2005-03-10 Jakub Jelinek <jakub@redhat.com>
5293 * tst-getpid1.c (do_test): Align stack passed to clone{2,}.
5295 2005-02-25 Roland McGrath <roland@redhat.com>
5297 * alloca_cutoff.c: Correct license text.
5298 * tst-unload.c: Likewise.
5299 * sysdeps/pthread/allocalim.h: Likewise.
5300 * sysdeps/pthread/pt-initfini.c: Likewise.
5301 * sysdeps/pthread/bits/libc-lock.h: Likewise.
5302 * sysdeps/pthread/bits/sigthread.h: Likewise.
5303 * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
5304 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
5306 2005-02-16 Roland McGrath <roland@redhat.com>
5308 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
5309 Use unsigned int * for ptr_nthreads.
5311 2005-02-14 Alan Modra <amodra@bigpond.net.au>
5314 * sysdeps/powerpc/tcb-offsets.sym (thread_offsetof): Redefine to suit
5317 2005-02-07 Richard Henderson <rth@redhat.com>
5320 * sysdeps/pthread/pthread.h (__sigsetjmp): Use pointer as first
5323 2004-11-03 Marcus Brinkmann <marcus@gnu.org>
5325 * sysdeps/generic/lowlevellock.h (__generic_mutex_unlock): Fix
5326 order of arguments in invocation of atomic_add_zero.
5328 2005-01-26 Jakub Jelinek <jakub@redhat.com>
5331 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S (__new_sem_trywait):
5332 Use direct %gs segment access or, if NO_TLS_DIRECT_SEG_REFS,
5333 at least gotntpoff relocation and addition.
5334 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
5336 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
5338 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
5341 2005-01-06 Ulrich Drepper <drepper@redhat.com>
5343 * allocatestack.c (init_one_static_tls): Adjust initialization of DTV
5344 entry for static tls deallocation fix.
5345 * sysdeps/alpha/tls.h (dtv_t): Change pointer type to be struct which
5346 also contains information whether the memory pointed to is static
5348 * sysdeps/i386/tls.h: Likewise.
5349 * sysdeps/ia64/tls.h: Likewise.
5350 * sysdeps/powerpc/tls.h: Likewise.
5351 * sysdeps/s390/tls.h: Likewise.
5352 * sysdeps/sh/tls.h: Likewise.
5353 * sysdeps/sparc/tls.h: Likewise.
5354 * sysdeps/x86_64/tls.h: Likewise.
5356 2004-12-27 Ulrich Drepper <drepper@redhat.com>
5358 * init.c (__pthread_initialize_minimal_internal): Use __sigemptyset.
5360 2004-12-21 Jakub Jelinek <jakub@redhat.com>
5362 * sysdeps/i386/tls.h (CALL_THREAD_FCT): Maintain 16 byte alignment of
5364 * Makefile (tests): Add tst-align2.
5365 * tst-align2.c: New test.
5366 * sysdeps/i386/Makefile (CFLAGS-tst-align{,2}.c): Add
5367 -mpreferred-stack-boundary=4.
5369 2004-12-18 Roland McGrath <roland@redhat.com>
5371 * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h:
5372 New file removed withdrawn for the moment.
5374 2004-12-17 Richard Henderson <rth@redhat.com>
5376 * sysdeps/unix/sysv/linux/alpha/clone.S: New file.
5377 * sysdeps/alpha/tcb-offsets.sym (TID_OFFSET): New.
5379 2004-12-16 Ulrich Drepper <drepper@redhat.com>
5381 * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h: New file.
5382 Increased PTHREAD_STACK_MIN.
5384 * tst-context1.c (stacks): Use bigger stack size.
5386 2004-12-16 Jakub Jelinek <jakub@redhat.com>
5388 * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: New file.
5389 * sysdeps/sparc/tcb-offsets.sym: Add TID.
5391 2004-12-15 Jakub Jelinek <jakub@redhat.com>
5393 * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: New file.
5394 * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: New file.
5395 * sysdeps/s390/tcb-offsets.sym (TID): Add.
5397 2004-12-15 Ulrich Drepper <drepper@redhat.com>
5399 * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: New file.
5401 2004-12-14 Ulrich Drepper <drepper@redhat.com>
5403 * sysdeps/powerpc/tcb-offsets.sym: Add TID.
5404 * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: New file.
5406 * tst-getpid1.c: If child crashes, report this first. Print which
5409 2004-12-09 Ulrich Drepper <drepper@redhat.com>
5411 * init.c (__pthread_initialize_minimal_internal): Also unblock
5414 2004-12-01 Jakub Jelinek <jakub@redhat.com>
5416 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_CPUTIME,
5417 _POSIX_THREAD_CPUTIME): Define to 0.
5418 * sysdeps/pthread/timer_create.c (timer_create): Remove unused code
5419 handling CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID.
5420 * sysdeps/pthread/timer_routines.c (__timer_signal_thread_pclk,
5421 __timer_signal_thread_tclk): Remove.
5422 (init_module): Remove their initialization.
5423 (thread_cleanup): Remove their cleanup assertions.
5424 * sysdeps/pthread/posix-timer.h (__timer_signal_thread_pclk,
5425 __timer_signal_thread_tclk): Remove.
5426 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Removed.
5427 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Removed.
5428 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Removed.
5430 2004-12-07 Jakub Jelinek <jakub@redhat.com>
5432 * sysdeps/ia64/tcb-offsets.sym (TID): Add.
5433 * sysdeps/unix/sysv/linux/ia64/clone2.S: New file.
5435 * Makefile (tests): Add tst-getpid2.
5436 * tst-getpid1.c (TEST_CLONE_FLAGS): Define.
5437 (do_test): Use it. Use __clone2 instead of clone on ia64.
5438 * tst-getpid2.c: New test.
5440 2004-12-07 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5442 * sysdeps/unix/sysv/linux/sh/clone.S: New file.
5444 2004-12-04 Ulrich Drepper <drepper@redhat.com>
5446 * Makefile (tests): Add tst-getpid1.
5447 * tst-getpid1.c: New file.
5448 * sysdeps/unix/sysv/linux/i386/clone.S: New file.
5449 * sysdeps/unix/sysv/linux/x86_64/clone.S: New file.
5451 2004-12-02 Roland McGrath <roland@redhat.com>
5453 * Makefile (libpthread-nonshared): Variable removed.
5454 ($(objpfx)libpthread_nonshared.a): Target removed.
5455 ($(inst_libdir)/libpthread_nonshared.a): Likewise.
5456 These are now handled by generic magic from
5457 libpthread-static-only-routines being set.
5459 2004-11-27 Ulrich Drepper <drepper@redhat.com>
5461 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_PRIORITIZED_IO,
5462 _POSIX2_CHAR_TERM, _POSIX_THREAD_PRIO_INHERIT,
5463 _POSIX_THREAD_PRIO_PROTECT): Define.
5464 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
5465 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
5466 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
5468 2004-11-26 Jakub Jelinek <jakub@redhat.com>
5470 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_ADVISORY_INFO,
5471 _POSIX_SPORADIC_SERVER, _POSIX_THREAD_SPORADIC_SERVER, _POSIX_TRACE,
5472 _POSIX_TRACE_EVENT_FILTER, _POSIX_TRACE_INHERIT, _POSIX_TRACE_LOG,
5473 _POSIX_TYPED_MEMORY_OBJECTS, _POSIX_IPV6, _POSIX_RAW_SOCKETS): Define.
5474 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
5475 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
5476 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
5478 2004-11-24 Ulrich Drepper <drepper@redhat.com>
5480 * sysdeps/x86_64/Makefile [nptl]: Define CFLAGS-pthread_create.c.
5482 * Makefile (libpthread-routines): Add pthread_setschedprio.
5483 * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setschedprio.
5484 * sysdeps/pthread/pthread.h: Declare pthread_setschedprio.
5485 * pthread_setschedprio.c: New file.
5487 2004-11-20 Jakub Jelinek <jakub@redhat.com>
5489 * pthread_create.c (pthread_cancel): Add PTHREAD_STATIC_FN_REQUIRE.
5490 * pthread_cancel.c (pthread_create): Likewise.
5492 * Makefile (libpthread-routines): Add vars.
5493 * sysdeps/pthread/createthread.c (__pthread_multiple_threads): Remove.
5494 * init.c (__default_stacksize, __is_smp): Remove.
5496 * pthreadP.h (__find_thread_by_id): If !SHARED, add weak_function
5497 and define a wrapper macro.
5498 (PTHREAD_STATIC_FN_REQUIRE): Define.
5499 * allocatestack.c (__find_thread_by_id): Undefine.
5500 * pthread_create (__pthread_keys): Remove.
5501 (pthread_mutex_lock, pthread_mutex_unlock, pthread_once,
5502 pthread_key_create, pthread_setspecific, pthread_getspecific): Add
5503 PTHREAD_STATIC_FN_REQUIRE.
5505 2004-11-18 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5507 * sysdeps/sh/tls.h (DB_THREAD_SELF): Set the correct bias
5508 parameter to REGISTER macro.
5510 2004-11-17 Roland McGrath <roland@redhat.com>
5512 * sysdeps/unix/sysv/linux/timer_routines.c (__start_helper_thread):
5513 Make sure SIGCANCEL is blocked as well.
5515 2004-11-10 Jakub Jelinek <jakub@redhat.com>
5517 * sysdeps/pthread/setxid.h: New file.
5518 * sysdeps/pthread/pthread-functions.h (HAVE_PTR__NPTL_SETXID): Remove.
5519 (struct xid_command): Add forward decl.
5520 (struct pthread_functions): Change return type of __nptl_setxid hook
5522 * pthreadP.h (__nptl_setxid): Change return type to int.
5523 * allocatestack.c (__nptl_setxid): Call INTERNAL_SYSCALL_NCS in the
5524 calling thread, return its return value and set errno on failure.
5525 * descr.h (struct xid_command): Change id type to long array.
5527 * Makefile: Add rules to build and test tst-setuid1 and
5529 * tst-setuid1.c: New test.
5530 * tst-setuid1-static.c: New test.
5532 2004-11-10 Jakub Jelinek <jakub@redhat.com>
5534 * Makefile (tests): Add tst-exit3.
5535 * tst-exit3.c: New test.
5537 2004-11-09 Ulrich Drepper <drepper@redhat.com>
5539 * Makefile (tests): Add tst-exit2.
5540 * tst-exit2.c: New file.
5542 2004-11-09 Roland McGrath <roland@redhat.com>
5545 * sysdeps/pthread/createthread.c (do_clone): Increment __nptl_nthreads
5546 here, before calling clone.
5547 * pthread_create.c (start_thread): Don't do it here.
5549 2004-11-02 Jakub Jelinek <jakub@redhat.com>
5551 * sysdeps/unix/sysv/linux/smp.h: Include <errno.h>.
5553 2004-10-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5555 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
5556 Set ETIMEDOUT to errno when time is up. Tweak to avoid
5559 2004-10-28 Jakub Jelinek <jakub@redhat.com>
5561 * pthread_create.c (__pthread_create_2_1): Avoid leaking stacks
5562 if sched_priority is not between minprio and maxprio.
5564 2004-10-25 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5566 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
5567 (__pthread_cond_timedwait): Use clock_gettime syscall if exists.
5569 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
5570 (__lll_mutex_timedlock_wait): Fix a bad branch condition.
5572 2004-10-24 Ulrich Drepper <drepper@redhat.com>
5574 * sysdeps/unix/sysv/linux/smp.h (is_smp_system): Use
5575 not-cancelable I/O functions.
5577 2004-10-21 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5579 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
5580 (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
5581 make sure 2 is stored in the futex and we looked at the old value.
5582 Fix a few other problems to return the correct value.
5584 2004-10-14 Richard Henderson <rth@redhat.com>
5586 * sysdeps/alpha/tcb-offsets.sym (thread_offsetof): Redefine to
5589 2004-10-06 Jakub Jelinek <jakub@redhat.com>
5591 * sysdeps/unix/sysv/linux/jmp-unwind.c: Include pthreadP.h instead
5592 of pthread-functions.h and pthreaddef.h.
5593 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Likewise.
5595 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
5596 Change __data.__nwaiters from int to unsigned int.
5598 * tst-clock2.c (do_test): Don't fail if _POSIX_THREAD_CPUTIME == 0 and
5599 sysconf (_SC_THREAD_CPUTIME) returns negative value.
5601 * allocatestack.c (__find_thread_by_id): Move attribute_hidden
5604 * sysdeps/s390/jmpbuf-unwind.h: Include bits/wordsize.h.
5605 (JMPBUF_CFA_UNWINDS_ADJ): Subtract 96 resp. 160 bytes from CFA.
5607 2004-10-06 Ulrich Drepper <drepper@redhat.com>
5609 * tst-cancel4.c (tf_msgrcv): Check for failure in msgget. If the
5610 test fails, remove message queue.
5611 (tf_msgsnd): Likewise.
5613 2004-10-05 Jakub Jelinek <jakub@redhat.com>
5615 * tst-clock1.c: Change #ifdef to #if defined.
5616 * tst-clock2.c: Likewise.
5617 * tst-cond11.c: Likewise.
5619 * sysdeps/pthread/timer_create.c (timer_create): Use
5620 defined _POSIX_CPUTIME && _POSIX_CPUTIME >= 0 instead of
5621 defined CLOCK_PROCESS_CPUTIME_ID #ifs and similarly for
5624 2004-10-05 Jakub Jelinek <jakub@redhat.com>
5626 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h (_POSIX_CPUTIME,
5627 _POSIX_THREAD_CPUTIME): Define to 0.
5629 2004-10-04 Ulrich Drepper <drepper@redhat.com>
5631 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Define _POSIX_CPUTIME
5632 and _POSIX_THREAD_CPUTIME to zero.
5633 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
5634 * tst-barrier2.c: Fix testing for POSIX feature.
5635 * tst-clock1.c: Likewise.
5636 * tst-clock2.c: Likewise.
5637 * tst-cond11.c: Likewise.
5638 * tst-cond4.c: Likewise.
5639 * tst-cond6.c: Likewise.
5640 * tst-flock2.c: Likewise.
5641 * tst-mutex4.c: Likewise.
5642 * tst-mutex9.c: Likewise.
5643 * tst-rwlock12.c: Likewise.
5644 * tst-rwlock4.c: Likewise.
5645 * tst-signal1.c: Likewise.
5646 * tst-spin2.c: Likewise.
5647 * sysdeps/pthread/posix-timer.h: Likewise.
5648 * sysdeps/pthread/timer_create.c: Likewise.
5649 * sysdeps/pthread/timer_routines.c: Likewise.
5651 2004-10-01 Ulrich Drepper <drepper@redhat.com>
5653 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
5654 (__lll_mutex_timedlock_wait): Address futex correctly.
5656 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
5657 (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
5658 make sure 2 is stored in the futex and we looked at the old value.
5659 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
5660 (__lll_mutex_timedlock_wait): Likewise. Fix a few other problems
5661 which might very well made the code not working at all before.
5664 2004-09-28 Ulrich Drepper <drepper@redhat.com>
5666 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
5667 allow SIGSETXID to be sent.
5668 * sysdeps/pthread/sigaction.c (__sigaction): Don't allow action
5669 for SIGSETXID to be defined.
5670 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
5671 SIGSETXID cannot be blocked.
5673 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
5674 Add __extension__ to long long types.
5675 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5676 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5677 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5678 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5679 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
5680 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
5681 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5683 2004-09-25 Ulrich Drepper <drepper@redhat.com>
5685 * descr.h (struct pthread): Add stopped_start field.
5686 * sysdeps/pthread/createthread.c (create_thread): Set
5687 start_stopped flag in descriptor for new thread appropriately.
5688 * pthread_create.c (start_thread): Only take lock to be stopped on
5689 startup if stopped_start flag says so.
5691 2004-09-24 Ulrich Drepper <drepper@redhat.com>
5693 * pthread_create.c (__pthread_create_2_1): Remember whether thread
5694 is created detached and if yes, do not try to free the stack in case
5695 the thread creation failed.
5696 * sysdeps/pthread/createthread.c (do_clone): Free stack here if clone
5697 call fails. Don't depend on INTERNAL_SYSCALL_ERRNO return zero in
5698 case there has been no error. [BZ #405]
5700 * pthread_create.c (start_thread): Don't wait for scheduler data
5701 etc to be set at the beginning of the function. The cancellation
5702 infrastructure must have been set up. And enable async
5703 cancellation before potentially going to sleep. [BZ #401]
5705 2004-09-20 Ulrich Drepper <drepper@redhat.com>
5707 * Versions: Remove exports for pthread_set*id_np functions.
5708 * sysdeps/pthread/pthread.h: Remove pthread_set*id_np prototypes
5710 * Makefile: Don't build pthread_set*id code for now.
5712 2004-09-19 Ulrich Drepper <drepper@redhat.com>
5714 * sysdeps/unix/sysv/linux/allocrtsig.c: Allocate second signal for
5716 * allocatestack.c (__nptl_setxid): New function.
5717 * descr.h (struct xid_command): Define type.
5718 * init.c (pthread_functions): Add ptr__nptl_setxid initialization.
5719 (sighandler_setxid): New function.
5720 (__pthread_initialize_minimal): Register sighandler_setxid for
5722 * pt-allocrtsig.c: Update comment.
5723 * pthreadP.h: Define SIGSETXID. Declare __xidcmd variable.
5724 Declare __nptl_setxid.
5725 * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_setxid.
5726 * sysdeps/pthread/pthread.h: Declare pthread_setgid_np,
5727 pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
5728 pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
5729 and pthread_setresuid_np.
5730 * pthread_setgid_np.c: New file.
5731 * pthread_setuid_np.c: New file.
5732 * pthread_setegid_np.c: New file.
5733 * pthread_seteuid_np.c: New file.
5734 * pthread_setregid_np.c: New file.
5735 * pthread_setreuid_np.c: New file.
5736 * pthread_setresgid_np.c: New file.
5737 * pthread_setresuid_np.c: New file.
5738 * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setgid_np,
5739 pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
5740 pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
5741 and pthread_setresuid_np.
5742 * Makefile (libpthread-routines): Add pthread_setuid, pthread_seteuid,
5743 pthread_setreuid, pthread_setresuid, pthread_setgid, pthread_setegid,
5744 pthread_setregid, and pthread_setresgid.
5746 2004-09-18 Ulrich Drepper <drepper@redhat.com>
5748 * allocatestack.c (allocate_stack): Return EAGAIN instead of
5749 ENOMEM when out of memory.
5751 2004-09-10 Roland McGrath <roland@redhat.com>
5754 * allocatestack.c (allocate_stack): Remove [__ASSUME_CLONE_STOPPED]
5755 code, since we don't try to use the broken CLONE_STOPPED any more.
5756 * pthread_create.c (start_thread): Likewise.
5758 2004-09-15 Richard Henderson <rth@redhat.com>
5760 * sysdeps/unix/sysv/linux/alpha/vfork.S: Use libc_hidden_def.
5762 2004-09-01 David Mosberger <davidm@hpl.hp.com>
5764 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h
5765 (__libc_unwind_longjmp): Delete macro and declare as function.
5766 * sysdeps/unix/sysv/linux/ia64/Makefile (sysdep_routines): Mention
5767 __ia64_longjmp, sigstack_longjmp, and __sigstack_longjmp for
5769 * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S: New file.
5770 * sysdeps/unix/sysv/linux/ia64/__sigstack_longjmp.c: New file.
5771 * sysdeps/unix/sysv/linux/ia64/unwind_longjmp.c: New file.
5773 2004-09-12 Ulrich Drepper <drepper@redhat.com>
5775 * sysdeps/pthread/pthread.h: Make rwlock prototypes available also
5777 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define rwlock
5778 types also for __USE_XOPEN2K.
5779 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
5780 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5781 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5782 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5783 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
5784 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5785 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5788 2004-09-08 Ulrich Drepper <drepper@redhat.com>
5790 * sysdeps/pthread/pthread.h
5791 (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Make safe for C++.
5792 (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
5793 (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
5794 (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Likewise.
5797 2004-09-07 Ulrich Drepper <drepper@redhat.com>
5799 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Allow
5800 PSEUDO to be used with . prefix.
5802 * sysdeps/unix/sysv/linux/alpha/pthread_once.c (__pthread_once):
5803 Use atomic_increment instead of atomic_exchange_and_add.
5804 * sysdeps/unix/sysv/linux/sparc/pthread_once.c (__pthread_once):
5806 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
5808 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
5811 * allocatestack.c (allocate_stack): Use atomic_increment_val
5812 instead of atomic_exchange_and_add.
5813 * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Likewise.
5814 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
5816 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
5819 * sysdeps/pthread/pthread.h (pthread_once): Remove __THROW since
5820 the initialization function might throw.
5822 2005-09-05 Richard Henderson <rth@redhat.com>
5824 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
5825 Move definition inside libpthread, libc, librt check. Provide
5826 definition for rtld.
5828 2004-09-02 Ulrich Drepper <drepper@redhat.com>
5830 * sysdeps/alpha/jmpbuf-unwind.h: Define __libc_unwind_longjmp.
5831 * sysdeps/i386/jmpbuf-unwind.h: Likewise
5832 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
5833 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
5834 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
5835 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
5836 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
5837 * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
5840 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
5841 Rename __data.__clock to __data.__nwaiters, make it unsigned int.
5842 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
5844 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
5845 Decrement __nwaiters. If pthread_cond_destroy has been called and
5846 this is the last waiter, signal pthread_cond_destroy caller and
5847 avoid using the pthread_cond_t structure after unlock.
5848 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
5849 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5850 Read clock type from the least significant bits of __nwaiters instead
5852 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5853 * sysdeps/unix/sysv/linux/internaltypes.h: Define COND_CLOCK_BITS.
5855 2004-08-31 Jakub Jelinek <jakub@redhat.com>
5858 * Makefile (tests): Add tst-cond20 and tst-cond21.
5859 * tst-cond20.c: New test.
5860 * tst-cond21.c: New test.
5861 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
5862 (pthread_cond_t): Rename __data.__clock to __data.__nwaiters, make
5864 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
5866 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
5867 (pthread_cond_t): Likewise.
5868 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
5870 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
5872 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
5874 * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_clock): Remove.
5875 (cond_nwaiters): New.
5877 * pthread_cond_destroy.c (__pthread_cond_destroy): Return EBUSY
5878 if there are waiters not signalled yet.
5879 Wait until all already signalled waiters wake up.
5880 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Decrement
5881 __nwaiters. If pthread_cond_destroy has been called and this is the
5882 last waiter, signal pthread_cond_destroy caller and avoid using
5883 the pthread_cond_t structure after unlock.
5884 (__pthread_cond_wait): Increment __nwaiters in the beginning,
5885 decrement it when leaving. If pthread_cond_destroy has been called
5886 and this is the last waiter, signal pthread_cond_destroy caller.
5887 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
5888 Likewise. Read clock type from the least significant bits of
5889 __nwaiters instead of __clock.
5890 * pthread_condattr_setclock.c (pthread_condattr_setclock): Check
5891 whether clock ID can be encoded in COND_CLOCK_BITS bits.
5892 * pthread_condattr_getclock.c (pthread_condattr_getclock): Decode
5893 clock type just from the last COND_CLOCK_BITS bits of value.
5894 * pthread_cond_init.c (__pthread_cond_init): Initialize __nwaiters
5895 instead of __clock, just from second bit of condattr's value.
5897 2004-08-30 Jakub Jelinek <jakub@redhat.com>
5899 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Include
5900 bits/wordsize.h. Make the header match i386 header when __WORDSIZE
5902 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
5904 2004-08-15 Roland McGrath <roland@frob.com>
5906 * pthread_atfork.c: Update copyright terms including special exception
5907 for these trivial files, which are statically linked into executables
5908 that use dynamic linking for the significant library code.
5910 2004-08-09 Jakub Jelinek <jakub@redhat.com>
5912 * DESIGN-rwlock.txt: Add decreasing of nr_readers_queued to
5913 pthread_rwlock_rdlock.
5914 * sysdeps/pthread/pthread_rwlock_rdlock (__pthread_rwlock_rdlock):
5915 Decrease __nr_readers_queued after reacquiring lock.
5916 * sysdeps/pthread/pthread_rwlock_timedrdlock
5917 (pthread_rwlock_timedrdlock): Likewise.
5918 Reported by Bob Cook <bobcook47@hotmail.com>.
5920 2004-08-11 Jakub Jelinek <jakub@redhat.com>
5922 * tst-rwlock14.c (tf): Read main thread handle from *ARG
5923 before pthread_barrier_wait.
5925 2004-08-07 Ulrich Drepper <drepper@redhat.com>
5927 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
5928 Remove unnecessary exception handling data.
5930 2004-07-23 Jakub Jelinek <jakub@redhat.com>
5933 * sysdeps/pthread/pthread.h (pthread_getcpuclockid): Use __clockid_t
5934 instead of clockid_t.
5936 2004-07-21 Roland McGrath <roland@redhat.com>
5938 * Makefile ($(objpfx)multidir.mk): Use $(make-target-directory).
5940 2004-07-19 Roland McGrath <roland@redhat.com>
5942 * tst-cancel4.c (tf_waitid): Use WEXITED flag bit if available.
5944 2004-07-02 Roland McGrath <roland@redhat.com>
5946 * configure: Don't exit.
5948 2004-07-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5950 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
5951 (__pthread_cond_timedwait): Check for invalid nanosecond in
5954 2004-07-07 Ulrich Drepper <drepper@redhat.com>
5956 * Makefile: Add rules to build and run tst-fini1.
5957 * tst-fini1.c: New file.
5958 * tst-fini1mod.c: New file.
5960 2004-07-05 Ulrich Drepper <drepper@redhat.com>
5962 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define NO_CANCELLATION
5963 if no cancellation support is needed.
5964 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
5965 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
5966 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
5967 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
5968 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
5969 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
5970 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
5971 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
5972 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
5974 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define __NR_futex
5975 only if not already defined.
5977 2004-07-05 Jakub Jelinek <jakub@redhat.com>
5979 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_unlock): Use
5980 constraint "m" instead of "0" for futex.
5982 * shlib-versions: Add powerpc64-.*-linux.*.
5984 2004-07-04 Jakub Jelinek <jakub@redhat.com>
5986 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
5987 (pthread_rwlock_timedrdlock): Use cmpq instead of cmpl to check
5989 * tst-rwlock14.c (do_test): Test for invalid tv_nsec equal to
5990 1 billion and 64-bit tv_nsec which is valid when truncated to 32
5993 2004-06-29 Roland McGrath <roland@redhat.com>
5995 * Banner: NPTL no longer has its own version number.
5996 * Makefile (nptl-version): Variable removed.
5997 * sysdeps/pthread/Makefile (CFLAGS-confstr.c): Set LIBPTHREAD_VERSION
5998 using $(version), the glibc version number.
6000 2004-06-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6002 * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
6003 Fix branch offset for a PLT entry.
6004 * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
6006 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
6008 * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
6010 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait):
6013 2004-06-28 Jakub Jelinek <jakub@redhat.com>
6015 * sysdeps/alpha/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define
6018 2004-06-28 Jakub Jelinek <jakub@redhat.com>
6020 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
6021 (pthread_rwlock_timedwrlock): Return EINVAL if tv_nsec is negative,
6023 * sysdeps/pthread/pthread_rwlock_timedrdlock.c
6024 (pthread_rwlock_timedrdlock): Likewise.
6026 2004-06-22 Jakub Jelinek <jakub@redhat.com>
6028 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
6029 Set __r7 to val, not mutex.
6031 2004-06-27 Ulrich Drepper <drepper@redhat.com>
6033 * Makefile: Add rules to build tst-rwlock14.
6034 * tst-rwlock14.c: New file.
6036 2004-06-24 Boris Hu <boris.hu@intel.com>
6038 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Add timeout validation
6040 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
6042 2004-06-19 Andreas Jaeger <aj@suse.de>
6044 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix
6045 assembler in last patch.
6047 2004-06-17 Ulrich Drepper <drepper@redhat.com>
6049 * sysdeps/pthread/pthread_cond_timedwait.c
6050 (__pthread_cond_timedwait): Also check for negativ nanoseconds.
6051 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6052 (__pthread_cond_timedwait): Check for invalid nanosecond in
6054 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6055 * tst-cond19.c: New file.
6056 * Makefile: Add rules to build and run tst-cond19.
6058 2004-06-15 Steven Munroe <sjmunroe@us.ibm.com>
6060 * tst-context1.c (GUARD_PATTERN): Defined.
6061 (tst_context_t): Define struct containing ucontext_t & guard words.
6062 (ctx): Declare as an array of tst_context_t.
6063 (fct): Verify uc_link & guard words are still valid.
6064 (tf): Initialize guard words in ctx. Adjust ctx refs for new struct.
6066 2004-06-13 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6068 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
6069 Add __data.__futex field, reshuffle __data.__clock.
6070 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
6071 (__pthread_cond_signal): Increment __futex at the same time as
6072 __wakeup_seq or __total_seq. Pass address of __futex instead of
6073 address of low 32-bits of __wakeup_seq to futex syscall.
6074 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
6075 (__pthread_cond_wait): Likewise. Pass __futex value from before
6076 releasing internal lock to FUTEX_WAIT.
6077 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
6078 (__pthread_cond_timedwait): Likewise.
6079 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
6080 (FUTEX_CMP_REQUEUE): Define.
6081 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
6082 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
6083 Pass __futex value from before the unlock and __futex address instead
6084 of address of low 32-bits of __wakeup_seq to futex syscall.
6085 Fallback to FUTEX_WAKE all on any errors.
6087 2004-06-08 Jakub Jelinek <jakub@redhat.com>
6089 * pthread_mutexattr_getpshared.c (pthread_mutex_getpshared): Fix
6091 * pthread_mutexattr_gettype.c (pthread_mutexattr_gettype): Likewise.
6092 * pthread_mutexattr_init.c (__pthread_mutexattr_init): Likewise.
6093 * pthread_mutexattr_settype.c (__pthread_mutexattr_settype): Likewise.
6094 * pthread_mutexattr_setpshared.c (pthread_mutexattr_setpshared):
6095 Likewise. Reported by Bob Cook <bobcook47@hotmail.com>.
6097 2004-06-11 Martin Schwidefsky <schwidefsky@de.ibm.com>
6099 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_compare_and_swap):
6100 Add memory clobber to inline assembly.
6101 (__lll_mutex_trylock): Likewise.
6102 (__lll_mutex_cond_trylock): Likewise.
6104 2004-06-07 Martin Schwidefsky <schwidefsky@de.ibm.com>
6106 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
6107 Pass val argument as 6th system call argument in %r7.
6109 2004-05-21 Jakub Jelinek <jakub@redhat.com>
6111 * Makefile (tests): Add tst-cond16.
6112 * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_futex): Add.
6113 * pthread_cond_init.c (__pthread_cond_init): Clear __data.__futex.
6114 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
6115 Add __data.__futex field, reshuffle __data.__clock.
6116 * sysdeps/unix/sysv/linux/i386/pthread_cond_signal.S
6117 (__pthread_cond_signal): Increment __futex at the same time as
6118 __wakeup_seq or __total_seq. Pass address of __futex instead of
6119 address of low 32-bits of __wakeup_seq to futex syscall.
6120 * sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S
6121 (__pthread_cond_wait): Likewise. Pass __futex value from before
6122 releasing internal lock to FUTEX_WAIT.
6123 * sysdeps/unix/sysv/linux/i386/pthread_cond_timedwait.S
6124 (__pthread_cond_timedwait): Likewise.
6125 * sysdeps/unix/sysv/linux/i386/pthread_cond_broadcast.S
6126 (FUTEX_CMP_REQUEUE): Define.
6127 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
6128 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
6129 Pass __futex value from before the unlock and __futex address instead
6130 of address of low 32-bits of __wakeup_seq to futex syscall.
6131 Fallback to FUTEX_WAKE all on any errors.
6132 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_CMP_REQUEUE):
6134 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
6135 internally. Return non-zero if error, zero if success.
6136 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
6137 Add __data.__futex field, reshuffle __data.__clock.
6138 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_CMP_REQUEUE):
6140 (lll_futex_requeue): Add val argument, return 1 unconditionally
6142 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
6143 Add __data.__futex field, reshuffle __data.__clock.
6144 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_CMP_REQUEUE):
6146 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
6147 internally. Return non-zero if error, zero if success.
6148 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
6149 (pthread_cond_t): Add __data.__futex field, reshuffle __data.__clock.
6150 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_CMP_REQUEUE):
6152 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
6153 internally. Return non-zero if error, zero if success.
6154 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
6155 Add __data.__futex field, reshuffle __data.__clock.
6156 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_CMP_REQUEUE):
6158 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
6159 internally. Return non-zero if error, zero if success.
6160 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
6161 Add __data.__futex field, reshuffle __data.__clock.
6162 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
6163 Add __data.__futex field, reshuffle __data.__clock.
6164 * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal):
6165 Increment __futex at the same time as __wakeup_seq or __total_seq.
6166 Pass address of __futex instead of address of low 32-bits of
6167 __wakeup_seq to futex syscall.
6168 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
6169 Pass __futex value from before releasing internal lock
6171 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
6172 Likewise. Avoid unnecessary shadowing of variables.
6173 * sysdeps/pthread/pthread_cond_broadcast.c (__pthread_cond_broadcast):
6174 Set __futex to 2 * __total_seq. Pass __futex value from before the
6175 unlock and __futex address instead of address of low 32-bits of
6176 __wakeup_seq to futex_requeue macro, adjust for new return value
6178 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
6179 (__pthread_cond_signal): Increment __futex at the same time as
6180 __wakeup_seq or __total_seq. Pass address of __futex instead of
6181 address of low 32-bits of __wakeup_seq to futex syscall.
6182 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
6183 (__pthread_cond_wait): Likewise. Pass __futex value from before
6184 releasing internal lock to FUTEX_WAIT.
6185 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
6186 (__pthread_cond_timedwait): Likewise.
6187 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
6188 (FUTEX_CMP_REQUEUE): Define.
6189 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
6190 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
6191 Pass __futex value from before the unlock and __futex address instead
6192 of address of low 32-bits of __wakeup_seq to futex syscall.
6193 Fallback to FUTEX_WAKE all on any errors.
6195 2004-06-03 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6197 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_mutex_lock):
6198 Add nop to align the end of critical section.
6199 (lll_mutex_cond_lock, lll_mutex_timedlock): Likewise.
6201 2004-06-01 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6203 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
6204 Add __broadcast_seq field.
6205 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Mark
6206 all waiters as woken with woken_seq and bump broadcast counter.
6207 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use new
6208 __broadcast_seq. Increment __woken_seq correctly when cleanuped.
6209 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
6210 Comment typo fixes. Avoid returning -ETIMEDOUT.
6212 2004-06-01 Ulrich Drepper <drepper@redhat.com>
6214 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6215 (__condvar_tw_cleanup): Fix access to saved broadcast_seq value.
6216 Reported by Kaz Kojima.
6218 2004-05-25 Jakub Jelinek <jakub@redhat.com>
6220 * sysdeps/unix/sysv/linux/aio_misc.h: New file.
6222 2004-05-21 Jakub Jelinek <jakub@redhat.com>
6224 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Compare
6225 __broadcast_seq with bc_seq after acquiring internal lock instead of
6228 2004-05-18 Jakub Jelinek <jakub@redhat.com>
6230 * Makefile (.NOTPARALLEL): Only serialize make check/xcheck, not
6232 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6233 (__pthread_cond_timedwait): Avoid returning -ETIMEDOUT.
6234 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
6235 (pthread_cond_t): Add __data.__broadcast_seq field.
6236 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
6237 (FRAME_SIZE): Define.
6238 (__pthread_cond_timedwait): Use it. Store/check broadcast_seq.
6240 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S (FRAME_SIZE):
6242 (__pthread_cond_wait): Use it. Store/check broadcast_seq. Comment
6244 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
6245 (__pthread_cond_broadcast): Increment broadcast_seq. Comment typo
6248 2004-05-18 Ulrich Drepper <drepper@redhat.com>
6250 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add broadcast_seq entry.
6251 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
6252 Add __broadcast_seq field.
6253 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6254 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6255 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
6256 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
6257 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6258 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Mark
6259 all waiters as woken with woken_seq and bump broadcast counter.
6260 * sysdeps/pthread/pthread_cond_broadcast.c: Likewise.
6261 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use new
6262 __broadcast_seq field.
6263 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6264 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
6265 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
6266 * pthread_cond_init.c: Initialize __broadcast_seq field.
6267 * Makefile (tests): Add tst-cond17 and tst-cond18.
6268 Add .NOTPARALLEL goal.
6269 * tst-cond16.c: New file. From Jakub.
6270 * tst-cond17.c: New file. From Jakub.
6271 * tst-cond18.c: New file. From Jakub.
6273 2004-05-16 Ulrich Drepper <drepper@redhat.com>
6275 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Correct some
6278 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
6279 Parametrize frame size. Correct some unwind info.
6280 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6282 2004-05-04 Jakub Jelinek <jakub@redhat.com>
6284 * tst-stack3.c: Note testing functionality beyond POSIX.
6286 2004-05-04 Jakub Jelinek <jakub@redhat.com>
6288 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (USE___THREAD):
6289 Change conditional from ifdef to if.
6291 2004-04-23 Jakub Jelinek <jakub@redhat.com>
6293 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SYSDEP_CANCEL_ERRNO,
6294 SYSDEP_CANCEL_ERROR): Define.
6297 2004-05-01 Jakub Jelinek <jakub@redhat.com>
6299 * Versions (libpthread): Remove __pthread_cleanup_upto@@GLIBC_PRIVATE.
6301 2004-04-20 Jakub Jelinek <jakub@redhat.com>
6303 * sem_unlink.c (sem_unlink): Change EPERM into EACCES.
6305 2004-04-19 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6307 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Add frame info.
6308 Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
6309 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Remove unneeded frame
6310 info. Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
6312 2004-04-19 Ulrich Drepper <drepper@redhat.com>
6314 * sysdeps/unix/sysv/linux/timer_routines.c: Make sure helper
6315 thread has all signals blocked.
6317 2004-04-18 Andreas Jaeger <aj@suse.de>
6319 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h
6320 (SEM_VALUE_MAX): Add missing brace.
6322 2004-04-17 Jakub Jelinek <jakub@redhat.com>
6324 * sysdeps/pthread/Makefile (tests): Add tst-mqueue8x
6326 (CFLAGS-tst-mqueue8x.c): Add -fexceptions.
6327 * sysdeps/pthread/tst-mqueue8x.c: New test.
6328 * tst-cancel4.c: Update comment about message queues.
6330 * sysdeps/pthread/timer_gettime.c (timer_gettime): For expired timer
6331 return it_value { 0, 0 }.
6332 * sysdeps/pthread/timer_create.c (timer_create): Handle SIGEV_NONE
6334 * sysdeps/pthread/timer_routines.c (thread_expire_timer): Remove
6335 assertion for SIGEV_NONE.
6336 (thread_attr_compare): Compare all attributes, not just a partial
6339 2004-04-17 Jakub Jelinek <jakub@redhat.com>
6341 * sysdeps/unix/sysv/linux/mq_notify.c: Include stdlib.h.
6343 2004-04-17 Ulrich Drepper <drepper@redhat.com>
6345 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h (SEM_VALUE_MAX):
6346 Just use a plain number.
6347 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
6348 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
6349 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
6350 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
6351 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
6352 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
6353 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
6355 2004-04-16 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6357 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Remove unneeded
6359 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
6361 2004-04-15 Jakub Jelinek <jakub@redhat.com>
6363 * sysdeps/unix/sysv/linux/timer_routines.c: Include errno.h.
6364 (timer_helper_thread): Use inline rt_sigtimedwait syscall instead
6365 of calling sigwaitinfo.
6367 2004-04-16 Ulrich Drepper <drepper@redhat.com>
6369 * allocatestack.c (allocate_stack): Set reported_guardsize
6371 * pthread_getattr_np.c (pthread_getattr_np): Use
6372 reported_guardsize instead of guardsize.
6373 * descr.h (struct pthread): Add reported_guardsize field.
6375 2004-04-13 Jakub Jelinek <jakub@redhat.com>
6377 * sysdeps/unix/sysv/linux/mq_notify.c: Shut up GCC warning.
6379 2004-04-12 Ulrich Drepper <drepper@redhat.com>
6381 * sysdeps/unix/sysv/linux/mq-notify.c: New file.
6383 2004-04-08 Jakub Jelinek <jakub@redhat.com>
6385 * sysdeps/unix/sysv/linux/bits/local_lim.h (MQ_PRIO_MAX): Define.
6386 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h (MQ_PRIO_MAX): Define.
6387 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h (MQ_PRIO_MAX): Define.
6388 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h (MQ_PRIO_MAX): Define.
6389 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
6391 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
6392 (_POSIX_MESSAGE_PASSING): Define.
6393 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h
6394 (_POSIX_MESSAGE_PASSING): Define.
6395 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h
6396 (_POSIX_MESSAGE_PASSING): Define.
6398 2004-04-04 Ulrich Drepper <drepper@redhat.com>
6400 * tst-context1.c (fct): Check whether correct stack is used.
6402 2004-04-03 Ulrich Drepper <drepper@redhat.com>
6404 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Never use
6405 matching constraints for asm mem parameters.
6407 * tst-clock2.c (tf): Don't define unless needed.
6409 2004-03-30 H.J. Lu <hongjiu.lu@intel.com>
6411 * Makefile (link-libc-static): Use $(static-gnulib) instead of
6414 2004-03-30 Ulrich Drepper <drepper@redhat.com>
6416 * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_deallocate_tsd.
6417 * init.c (pthread_functions): Add ptr__nptl_deallocate_tsd.
6418 * pthreadP.h: Declare __nptl_deallocate_tsd.
6419 * pthread_create.c (deallocate_tsd): Remove to __nptl_deallocate_tsd.
6422 * Makefile (tests): Add tst-tsd5.
6423 * tst-tsd5.c: New file.
6425 2004-03-29 Ulrich Drepper <drepper@redhat.com>
6427 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
6428 (__pthread_attr_setaffinity_old): Prepend GLIBC_ to version names
6429 is SHLIB_COMPAT check.
6430 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
6431 (__pthread_attr_getaffinity_old): Likewise.
6432 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
6433 (__pthread_getaffinity_old): Likewise.
6434 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
6435 (__pthread_setaffinity_old): Likewise.
6437 2004-03-26 Ulrich Drepper <drepper@redhat.com>
6439 * allocatestack.c (_make_stacks_executable): Call
6440 _dl_make_stack_executable first.
6442 2004-03-24 Roland McGrath <roland@redhat.com>
6444 * sysdeps/i386/pthread_spin_lock.c (pthread_spin_lock): Use "m"
6445 constraint instead of "0".
6447 2004-03-24 Ulrich Drepper <drepper@redhat.com>
6449 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
6450 (lll_mutex_cond_trylock): Define as wrapper around __lll_cond_trylock.
6452 * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Reorganize
6453 code to avoid warning.
6455 2004-03-24 Andreas Jaeger <aj@suse.de>
6457 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
6458 (__pthread_attr_setaffinity_old): Remove const.
6460 2004-03-23 Ulrich Drepper <drepper@redhat.com>
6462 * sysdeps/unix/sysv/linux/smp.h: New file.
6463 * sysdeps/unix/sysv/linux/sh/smp.h: New file.
6464 * init.c: Define __is_smp.
6465 (__pthread_initialize_minimal_internal): Call is_smp_system to
6466 initialize __is_smp.
6467 * pthreadP.h: Declare __is_smp.
6468 Define MAX_ADAPTIVE_COUNT is necessary.
6469 * pthread_mutex_init.c: Add comment regarding __spins field.
6470 * pthread_mutex_lock.c: Implement adaptive mutex type.
6471 * pthread_mutex_timedlock.c: Likewise.
6472 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
6473 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
6475 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
6476 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6477 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6478 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6479 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6480 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
6481 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6482 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define
6483 lll_mutex_cond_trylock.
6484 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6485 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6486 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6487 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
6488 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
6489 Define BUSY_WAIT_NOP.
6490 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6491 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6493 * tst-mutex5.c: Add support for testing adaptive mutexes.
6494 * tst-mutex7.c: Likewise.
6495 * tst-mutex5a.c: New file.
6496 * tst-mutex7a.c: New file.
6497 * Makefile (tests): Add tst-mutex5a and tst-mutex7a.
6499 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
6500 (__lll_mutex_timedlock_wait): Preserve r8 and r9 since the
6501 vgettimeofday call might destroy the content.
6503 * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use hint
6506 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
6507 No need to restrict type of ret. Make it int. Add comment.
6509 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
6510 Remove unnecessary setne instruction.
6512 2004-03-22 Jakub Jelinek <jakub@redhat.com>
6514 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
6515 (__pthread_getaffinity_new): Use INT_MAX instead of UINT_MAX.
6516 * pthread_getattr_np.c (pthread_getattr_np): Double size every cycle.
6517 If realloc fails, break out of the loop.
6519 2004-03-20 Andreas Jaeger <aj@suse.de>
6521 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
6522 (__pthread_setaffinity_old): Fix interface.
6523 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
6524 (__pthread_getaffinity_old): Likewise.
6526 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
6527 (__pthread_setaffinity_new): Remove duplicate declaration.
6529 2004-03-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6531 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Save
6532 the return value to a safe register.
6533 (CDISABLE): Set the function argument correctly.
6535 2004-03-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6537 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XCHG): Define.
6538 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
6539 Rewrite so that only one locked memory operation per round is needed.
6540 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
6541 (pthread_barrier_wait): After wakeup, release lock only when the
6542 last thread stopped using the barrier object.
6543 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
6544 (__pthread_cond_wait): Don't store mutex address if the current
6545 value is ~0l. Add correct cleanup support and unwind info.
6546 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
6547 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
6548 (__pthread_cond_broadcast): Don't use requeue for pshared condvars.
6549 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Update comment.
6550 * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
6551 Add correct cleanup support and unwind info.
6552 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
6553 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Add unwind
6554 information for syscall wrappers.
6556 2004-03-18 Ulrich Drepper <drepper@redhat.com>
6558 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
6559 cpusetsize field, remove next.
6560 * sysdeps/pthread/pthread.h (pthread_getaffinity_np): Add new second
6561 parameter for size of the CPU set.
6562 (pthread_setaffinity_np): Likewise.
6563 (pthread_attr_getaffinity_np): Likewise.
6564 (pthread_attr_setaffinity_np): Likewise.
6565 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: Implement
6566 interface change, keep compatibility code.
6567 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
6568 * sysdeps/unix/sysv/linux/pthread_getaffinity.c: Likewise.
6569 * sysdeps/unix/sysv/linux/pthread_setaffinity.c: Likewise.
6570 * pthreadP.h: Remove hidden_proto for pthread_getaffinity_np. Declare
6571 __pthread_getaffinity_np.
6572 * Versions: Add version for changed interfaces.
6573 * tst-attr3.c: Adjust test for interface change.
6574 * pthread_getattr_np.c: Query the kernel about the affinity mask with
6575 increasing buffer sizes.
6576 * pthread_attr_destroy.c: Remove unused list handling.
6577 * pthread_attr_init.c: Likewise.
6579 2004-03-17 Roland McGrath <roland@redhat.com>
6581 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Pass missing
6582 first argument to clock_getres so we ever enable kernel timers.
6584 2004-03-15 Ulrich Weigand <uweigand@de.ibm.com>
6586 * init.c (nptl_version): Add __attribute_used__ to nptl_version.
6588 2004-03-12 Richard Henderson <rth@redhat.com>
6590 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Propagate
6591 oldvalue from CENABLE to CDISABLE.
6593 2004-03-12 Ulrich Drepper <drepper@redhat.com>
6595 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define HOST_NAME_MAX.
6596 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
6597 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
6598 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
6600 2004-03-11 Richard Henderson <rth@redhat.com>
6602 * sysdeps/alpha/tcb-offsets.sym (PID_OFFSET): New.
6603 * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: Save/restore PID.
6604 * sysdeps/unix/sysv/linux/alpha/vfork.S: New file.
6606 2004-03-11 Jakub Jelinek <jakub@redhat.com>
6608 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Use jgnl
6609 instead of jnl instruction to jump to SYSCALL_ERROR_LABEL.
6610 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S (__vfork): Likewise.
6612 2004-03-11 Jakub Jelinek <jakub@redhat.com>
6614 * forward.c (__pthread_cond_broadcast_2_0,
6615 __pthread_cond_destroy_2_0, __pthread_cond_init_2_0,
6616 __pthread_cond_signal_2_0, __pthread_cond_wait_2_0,
6617 __pthread_cond_timedwait_2_0): Use return 0 as defaction instead of 0.
6619 2004-03-11 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6621 * sysdeps/sh/tcb-offsets.sym: Add PID.
6622 * sysdeps/unix/sysv/linux/sh/pt-vfork.S: Properly handle PID cache.
6623 * sysdeps/unix/sysv/linux/sh/vfork.S: New file.
6625 2004-03-10 Ulrich Drepper <drepper@redhat.com>
6627 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: No need to
6628 include <sysdep-cancel.h>, vfork is no cancellation point.
6629 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: Likewise.
6630 * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: Likewise.
6631 * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: Likewise.
6633 2004-03-10 Jakub Jelinek <jakub@redhat.com>
6635 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Add
6637 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
6638 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
6640 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S (__vfork):
6642 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
6643 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
6644 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Include tcb-offsets.h.
6645 * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Use DO_CALL instead
6646 of DO_CALL_VIA_BREAK. Work around a gas problem.
6648 * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: Remove.
6649 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: New file.
6650 * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: New file.
6651 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: New file.
6652 * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: New file.
6653 * sysdeps/powerpc/tcb-offsets.sym: Add PID.
6655 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S (__vfork): Don't use
6656 a local register for saving old PID. Negate PID in parent upon exit.
6658 * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: Include
6660 (__vfork): Negate PID if non-zero and set to INT_MIN if zero
6661 before syscall, set to the old value in the parent afterwards.
6662 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: New file.
6663 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: Include
6665 (__vfork): Negate PID if non-zero and set to INT_MIN if zero
6666 before syscall, set to the old value in the parent afterwards.
6667 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: New file.
6668 * sysdeps/s390/tcb-offsets.sym: Add PID.
6670 * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: Remove.
6671 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: New file.
6672 * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S: New file.
6673 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: New file.
6674 * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: New file.
6675 * sysdeps/sparc/tcb-offsets.sym: Add PID.
6677 2004-03-10 Andreas Schwab <schwab@suse.de>
6679 * sysdeps/ia64/tcb-offsets.sym: Add PID.
6680 * sysdeps/unix/sysv/linux/ia64/vfork.S: New file.
6681 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Properly handle PID cache.
6683 2004-03-09 Jakub Jelinek <jakub@redhat.com>
6685 * tst-cancel20.c (do_one_test): Clear in_sh_body first.
6686 * tst-cancel21.c (do_one_test): Likewise.
6687 Reported by Gordon Jin <gordon.jin@intel.com>.
6689 2004-02-09 Jakub Jelinek <jakub@redhat.com>
6691 * sysdeps/unix/sysv/linux/i386/vfork.S (SAVE_PID): Negate PID
6692 if non-zero and set to INT_MIN if zero.
6693 * sysdeps/unix/sysv/linux/x86_64/vfork.S (SAVE_PID): Likewise.
6694 * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Include tcb-offsets.h.
6695 (SAVE_PID, RESTORE_PID): Define.
6697 * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: Include tcb-offsets.h.
6698 Use relative path to avoid including NPTL i386/vfork.S.
6699 (SAVE_PID, RESTORE_PID): Define.
6700 * sysdeps/unix/sysv/linux/raise.c: Include limits.h.
6701 (raise): Handle THREAD_SELF->pid INT_MIN the same as 0.
6702 * Makefile (tests): Add tst-vfork1, tst-vfork2, tst-vfork1x and
6704 (tests-reverse): Add tst-vfork1x and tst-vfork2x.
6705 * tst-vfork1.c: New test.
6706 * tst-vfork2.c: New test.
6707 * tst-vfork1x.c: New test.
6708 * tst-vfork2x.c: New test.
6710 2004-03-08 Ulrich Drepper <drepper@redhat.com>
6712 * sysdeps/i386/tcb-offsets.sym: Add PID.
6713 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
6714 * sysdeps/unix/sysv/linux/i386/vfork.S: New file.
6715 * sysdeps/unix/sysv/linux/x86_64/vfork.S: New file.
6717 2004-03-08 Steven Munroe <sjmunroe@us.ibm.com>
6719 * sysdeps/unix/sysv/linux/powerpc/Versions: Remove leading tabs.
6721 2004-03-08 H.J. Lu <hongjiu.lu@intel.com>
6723 * sysdeps/s390/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
6726 2004-03-07 Ulrich Drepper <drepper@redhat.com>
6728 * sysdeps/ia64/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
6731 * tst-once4.c: Remove unnecessary macro definition.
6733 * tst-mutex7.c (do_test): Limit thread stack size.
6734 * tst-once2.c (do_test): Likewise.
6735 * tst-tls3.c (do_test): Likewise.
6736 * tst-tls1.c (do_test): Likewise.
6737 * tst-signal3.c (do_test): Likewise.
6738 * tst-kill6.c (do_test): Likewise.
6739 * tst-key4.c (do_test): Likewise.
6740 * tst-join4.c (do_test): Likewise.
6741 * tst-fork1.c (do_test): Likewise.
6742 * tst-context1.c (do_test): Likewise.
6743 * tst-cond2.c (do_test): Likewise.
6744 * tst-cond10.c (do_test): Likewise.
6745 * tst-clock2.c (do_test): Likewise.
6746 * tst-cancel10.c (do_test): Likewise.
6747 * tst-basic2.c (do_test): Likewise.
6748 * tst-barrier4.c (do_test): Likewise.
6750 2004-03-05 Ulrich Drepper <drepper@redhat.com>
6752 * sysdeps/i386/tls.h: Use GLRO instead of GL where appropriate.
6754 2004-03-01 Ulrich Drepper <drepper@redhat.com>
6756 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6757 (__pthread_cond_timedwait): Optimize wakeup test.
6758 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
6759 (__pthread_cond_wait): Likewise.
6760 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
6761 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
6764 2004-02-29 Ulrich Drepper <drepper@redhat.com>
6766 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
6767 (__lll_mutex_lock_wait): Optimize a bit more. Just one copy of
6768 the atomic instruction needed.
6769 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
6770 (__lll_mutex_lock_wait): Likewise.
6772 2004-02-28 Ulrich Drepper <drepper@redhat.com>
6774 * Makefile (tests): Add tst-cond14 and tst-cond15.
6775 * tst-cond14.c: New file.
6776 * tst-cond15.c: New file.
6778 2004-02-27 Ulrich Drepper <drepper@redhat.com>
6780 * sysdeps/pthread/createthread.c (create_thread): Remove use of
6781 CLONE_STOPPED. We cannot use SIGCONT which means CLONE_STOPPED
6782 needs to be implemented differently to be useful.
6784 2004-02-26 Ulrich Drepper <drepper@redhat.com>
6786 * pthread_attr_setschedparam.c: Don't test priority against limits
6787 here. Set ATTR_FLAG_SCHED_SET flag.
6788 * pthread_attr_setschedpolicy.c: Set ATTR_FLAG_POLICY_SET flag.
6789 * pthread_create.c (__pthread_create_2_1): Copy scheduling attributes
6790 from parent thread to child. If attribute is used and scheduling
6791 parameters are not inherited, copy parameters from attribute or
6792 compute them. Check priority value.
6793 * pthread_getschedparam.c: If the parameters aren't known yet get
6794 them from the kernel.
6795 * pthread_setschedparam.c: Set ATTR_FLAG_SCHED_SET and
6796 ATTR_FLAG_POLICY_SET flag for thread.
6797 * sysdeps/unix/sysv/linux/internaltypes.h: Define ATTR_FLAG_SCHED_SET
6798 and ATTR_FLAG_POLICY_SET.
6800 * sysdeps/pthread/createthread.c: Use tgkill if possible.
6802 * pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr): Don't
6803 fail if stack address hasn't been set. Just return 0.
6805 2004-02-25 Ulrich Drepper <drepper@redhat.com>
6807 * Makefile (tests-nolibpthread): Add tst-unload. Don't link with
6808 libpthread for the files in this list.
6809 (CFLAGS-tst-unload): Removed.
6810 * tst-unload.c (do_test): Don't use complete path for
6813 * Makefile: Define sonames for tst-tls5mod, tst-_res1mod1, and
6816 2004-02-22 Ulrich Drepper <drepper@redhat.com>
6818 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
6819 (__lll_mutex_lock_wait): Rewrite so that only one locked memory
6820 operation per round is needed.
6821 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
6822 (__lll_mutex_lock_wait): Likewise.
6824 2004-02-20 Ulrich Drepper <drepper@redhat.com>
6826 * tst-cancel9.c (cleanup): Don't print to stderr.
6828 2004-02-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6830 * sysdeps/sh/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Fix variable name.
6832 2004-02-20 Jakub Jelinek <jakub@redhat.com>
6834 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
6835 (__syscall_error_handler2): Call CDISABLE.
6836 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
6837 (__syscall_error_handler2): Call CDISABLE.
6839 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
6840 Release lock before the loop, don't reacquire it.
6842 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h (DL_ARGV_NOT_RELRO): Define.
6844 2004-02-19 Andreas Schwab <schwab@suse.de>
6846 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
6849 2004-02-18 Ulrich Drepper <drepper@redhat.com>
6851 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
6852 (pthread_barrier_wait): After wakeup, release lock only when the
6853 last thread stopped using the barrier object.
6854 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S
6855 (pthread_barrier_wait): Likewise.
6856 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
6858 * Makefile (tests): Add tst-barrier4.
6859 * tst-barrier4.c: New file.
6861 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6862 (__pthread_cond_timedwait): Perform timeout test while holding
6863 internal lock to prevent wakeup race.
6864 Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
6865 * sysdeps/pthread/pthread_cond_timedwait.c
6866 (__pthread_cond_timedwait): Likewise.
6867 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
6868 (__pthread_cond_timedwait): Likewise.
6870 2004-02-18 Jakub Jelinek <jakub@redhat.com>
6872 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S
6873 (__pthread_rwlock_unlock): Access WRITER as 32-bit value.
6874 * Makefile (tests): Add tst-rwlock13.
6875 * tst-rwlock13.c: New test.
6877 2004-02-16 Ulrich Drepper <drepper@redhat.com>
6879 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6880 (__condvar_tw_cleanup): Little optimization.
6881 Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
6883 2004-02-16 Steven Munroe <sjmunroe@us.ibm.com>
6885 * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: Replace libc with
6886 libpthread as "lib" parameter to SHLIB_COMPAT.
6887 (__novmx_siglongjmp): Fix typo in function name.
6888 (__novmx_longjmp): Fix typo in function name.
6890 2004-02-13 Ulrich Drepper <drepper@redhat.com>
6892 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Add a
6895 * sysdeps/generic/pt-longjmp.c: Moved to...
6896 * sysdeps/pthread/pt-longjmp.c: ...here. New file.
6898 2004-01-29 Steven Munroe <sjmunroe@us.ibm.com>
6900 * Makefile (libpthread-routines): Add pt-cleanup.
6901 * pt-longjmp.c: Removed.
6902 * pt-cleanup.c: Copied __pthread_cleanup_upto to here. New file.
6903 * sysdeps/generic/pt-longjmp.c: Copied longjmp to here. New file.
6904 * sysdeps/unix/sysv/linux/powerpc/Versions: New file.
6905 Version longjmp, siglongjmp for GLIBC_2.3.4.
6906 * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: New File.
6908 2004-02-13 Ulrich Drepper <drepper@redhat.com>
6910 * sysdeps/pthread/pthread_cond_timedwait.c
6911 (__pthread_cond_timedwait): Optimize. Drop internal lock earlier.
6912 Reuse code. Add __builtin_expects.
6914 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6915 (__pthread_cond_timedwait): Get internal lock in case timeout has
6916 passed before the futex syscall.
6917 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6919 2004-01-20 Ulrich Drepper <drepper@redhat.com>
6921 * allocatestack.c: Pretty printing.
6923 * sysdeps/pthread/createthread.c (create_thread): Don't add
6924 CLONE_DETACHED bit if it is not necessary.
6926 2004-01-16 Ulrich Drepper <drepper@redhat.com>
6928 * pthread_getattr_np.c: Include ldsodefs.h.
6930 2004-01-16 Richard Henderson <rth@redhat.com>
6932 * allocatestack.c: Don't declare __libc_stack_end.
6933 * init.c (__pthread_initialize_minimal_internal): Likewise.
6934 * pthread_getattr_np.c (pthread_getattr_np): Likewise.
6936 2004-01-15 Richard Henderson <rth@redhat.com>
6938 * sysdeps/alpha/tls.h (tcbhead_t): Add private.
6939 (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE,
6940 TLS_PRE_TCB_SIZE, TLS_TCB_ALIGN, INSTALL_DTV, INSTALL_NEW_DTV,
6941 GET_DTV, THREAD_DTV, THREAD_SELF, DB_THREAD_SELF): Match ia64.
6942 (TLS_TCB_OFFSET, THREAD_ID, NO_TLS_OFFSET): Remove.
6943 (THREAD_GETMEM, THREAD_GETMEM_NC): Simplify.
6944 (THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
6945 * sysdeps/unix/sysv/linux/alpha/createthread.c (TLS_VALUE): Match ia64.
6947 2004-01-14 Ulrich Drepper <drepper@redhat.com>
6949 * init.c (pthread_functions): Make array const.
6951 2004-01-13 Ulrich Drepper <drepper@redhat.com>
6953 * allocatestack.c (__make_stacks_executable): Change interface.
6954 Check parameters. Pass parameter on to libc counterpart.
6955 * pthreadP.h: Change declaration.
6957 2004-01-13 Richard Henderson <rth@redhat.com>
6959 * pthread_attr_setstack.c (__old_pthread_attr_setstack): Use
6961 * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize):
6964 * sysdeps/alpha/Makefile: New file.
6965 * sysdeps/alpha/tcb-offsets.sym: New file.
6966 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
6967 Use MULTIPLE_THREADS_OFFSET to implement !libpthread !libc version.
6969 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Rewrite based
6972 2004-01-08 Jakub Jelinek <jakub@redhat.com>
6974 * Makefile (tests): Add tst-backtrace1.
6975 * tst-backtrace1.c: New test.
6977 2003-12-11 Ulrich Weigand <uweigand@de.ibm.com>
6979 * sysdeps/alpha/tls.h (DB_THREAD_SELF): Pass bit size of thread
6980 register as second parameter to the REGISTER macro.
6981 * sysdeps/ia64/tls.h (DB_THREAD_SELF): Likewise.
6982 * sysdeps/powerpc/tls.h (DB_THREAD_SELF): Likewise.
6983 * sysdeps/sh/tls.h (DB_THREAD_SELF): Likewise.
6984 * sysdeps/sparc/tls.h (DB_THREAD_SELF): Likewise.
6985 * sysdeps/s390/tls.h (DB_THREAD_SELF): Pass __WORDSIZE as bit size
6986 of thread register as second parameter to REGISTER macro in 64 case.
6988 2004-01-03 Ulrich Drepper <drepper@redhat.com>
6990 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Removed.
6991 (CFLAGS-getpid.o): Defined.
6992 (CFLAGS-getpid.os): Defined.
6994 2003-12-31 Ulrich Drepper <drepper@redhat.com>
6996 * pthread_getattr_np.c (pthread_getattr_np): Make sure stack info
6997 returned for main thread does not overlap with any other VMA.
6998 Patch by Jakub Jelinek.
7000 2003-12-29 Jakub Jelinek <jakub@redhat.com>
7002 * tst-raise1.c: Include stdio.h.
7004 2003-12-23 Jakub Jelinek <jakub@redhat.com>
7006 * sysdeps/unix/sysv/linux/raise.c (raise): Protect pid = selftid
7007 setting with __ASSUME_TGKILL || defined __NR_tgkill.
7008 If pid is 0, set it to selftid.
7009 * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Make inline.
7010 Don't set self->pid but self->tid. If self->pid == 0 and self->tid
7011 != 0, return self->tid without doing a syscall.
7012 * descr.h (struct pthread): Move pid field after tid.
7014 * Makefile (tests): Add tst-raise1.
7015 * tst-raise1.c: New file.
7017 2003-12-23 Roland McGrath <roland@redhat.com>
7019 * tst-oddstacklimit.c: New file.
7020 * Makefile (tests): Add it.
7021 (tst-oddstacklimit-ENV): New variable.
7023 * init.c (__pthread_initialize_minimal_internal): Round stack rlimit
7024 value up to page size for __default_stacksize.
7026 2003-12-21 Ulrich Drepper <drepper@redhat.com>
7028 * Makefile (tests): Add tst-eintr5.
7029 * tst-eintr5.c: New file.
7031 * eintr.c (eintr_source): Prevent sending signal to self.
7033 * tst-eintr2.c (tf1): Improve error message.
7035 2003-12-20 Ulrich Drepper <drepper@redhat.com>
7037 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Define.
7038 * sysdeps/unix/sysv/linux/getpid.c: New file.
7039 * pthread_cancel.c: Add comment explaining use of PID field.
7040 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
7041 * pthread_getattr_np.c: Use abs() when comparing PID and TID fields.
7042 * sysdeps/unix/sysv/linux/fork.c: Negate PID field of parent
7043 temporarily to signal the field must not be relied on and updated
7045 * sysdeps/unix/sysv/linux/pt-raise.c: Handle case where PID is
7046 temporarily negative.
7047 * sysdeps/unix/sysv/linux/raise.c: Likewise.
7049 2003-12-19 Ulrich Drepper <drepper@redhat.com>
7051 * eintr.c (setup_eintr): Add new parameter. Pass to thread function.
7052 (eintr_source): If ARG != NULL, use pthread_kill.
7053 * tst-eintr1.c: Adjust for this change.
7054 * tst-eintr2.c: Likewise.
7055 * Makefile (tests): Add tst-eintr3 and tst-eintr4.
7056 * tst-eintr3.c: New file.
7057 * tst-eintr4.c: New file.
7059 2003-12-19 Jakub Jelinek <jakub@redhat.com>
7061 * libc-cancellation.c (__libc_enable_asynccancel): Don't cancel
7062 if CANCELSTATE_BITMASK is set.
7063 * sysdeps/pthread/librt-cancellation.c (__librt_enable_asynccancel):
7066 * Makefile (tests): Add tst-cancel22 and tst-cancel23.
7067 (tests-reverse): Add tst-cancel23.
7068 * tst-cancel22.c: New test.
7069 * tst-cancel23.c: New test.
7071 2003-12-18 Ulrich Drepper <drepper@redhat.com>
7073 * tst-eintr1.c: Better error messages.
7075 * Makefile (tests): Add tst-eintr2.
7076 * tst-eintr2.c: New file.
7078 2003-12-18 Jakub Jelinek <jakub@redhat.com>
7080 * Makefile (tests): Add tst-cancel21 and tst-cancelx21.
7081 (CFLAGS-tst-cancelx21.c): Set.
7082 * tst-cancel21.c: New test.
7083 * tst-cancelx21.c: New test.
7085 * unwind.c (FRAME_LEFT): Add adj argument. Subtract it from each
7087 (unwind_stop): Use _JMPBUF_CFA_UNWINDS_ADJ macro instead of
7088 _JMPBUF_CFA_UNWINDS. Adjust FRAME_LEFT invocations.
7089 * pt-longjmp.c: Include jmpbuf-unwind.h.
7090 (__pthread_cleanup_upto): Use _JMPBUF_UNWINDS_ADJ macro instead of
7091 _JMPBUF_UNWINDS. Adjust compared pointers.
7092 * init.c (__pthread_initialize_minimal_internal): Initialize
7093 pd->stackblock_size.
7094 * sysdeps/pthread/jmpbuf-unwind.h: Removed.
7095 * sysdeps/alpha/jmpbuf-unwind.h: New file.
7096 * sysdeps/i386/jmpbuf-unwind.h: New file.
7097 * sysdeps/powerpc/jmpbuf-unwind.h: New file.
7098 * sysdeps/s390/jmpbuf-unwind.h: New file.
7099 * sysdeps/sh/jmpbuf-unwind.h: New file.
7100 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: New file.
7101 * sysdeps/x86_64/jmpbuf-unwind.h: New file.
7102 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Include stdint.h.
7103 (_JMPBUF_CFA_UNWINDS): Remove.
7104 (_JMPBUF_CFA_UNWINDS_ADJ, _JMPBUF_UNWINDS_ADJ): Define.
7106 2003-12-12 Jakub Jelinek <jakub@redhat.com>
7108 * Makefile (tests): Add tst-cancel20 and tst-cancelx20.
7109 (CFLAGS-tst-cancelx20.c): Set.
7110 * tst-cancel20.c: New test.
7111 * tst-cancelx20.c: New test.
7113 2003-12-17 Ulrich Drepper <drepper@redhat.com>
7115 * init.c (__pthread_initialize_minimal_internal): Don't treat
7116 architectures with separate register stack special here when
7117 computing default stack size.
7119 2003-12-17 Roland McGrath <roland@redhat.com>
7121 * Makefile (tst-cancelx7-ARGS): New variable.
7122 Reportd by Greg Schafer <gschafer@zip.com.au>.
7124 2003-12-17 Jakub Jelinek <jakub@redhat.com>
7126 * Makefile (tests): Add tst-stack3. Depend on $(objpfx)tst-stack3-mem.
7127 (generated): Add tst-stack3.mtrace and tst-stack3-mem.
7128 (tst-stack3-ENV): Set.
7129 ($(objpfx)tst-stack3-mem): New.
7130 * tst-stack3.c: New test.
7132 2003-12-10 David Mosberger <davidm@hpl.hp.com>
7134 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init_EPILOG_BEGINS):
7135 Add unwind directives. Drop unused .regstk directive.
7136 (_fini_EPILOG_BEGINS): Add unwind directives.
7138 2003-12-11 Ulrich Drepper <drepper@redhat.com>
7140 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
7141 Assume parameter is a pointer.
7142 (lll_futex_wake): Likewise.
7143 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_wait):
7145 (lll_futex_wake): Likewise.
7146 Reported by Boris Hu.
7147 * sysdeps/unix/sysv/linux/unregister-atfork.c
7148 (__unregister_atfork): Pass pointer to refcntr to lll_futex_wait.
7150 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Simplify a bit.
7152 2003-12-10 Ulrich Drepper <drepper@redhat.com>
7154 * sysdeps/pthread/bits/libc-lock.h (__rtld_lock_initialize): Define.
7155 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Call
7156 __rtld_lock_initialize for ld.so lock.
7157 Patch in part by Adam Li <adam.li@intel.com>.
7159 2003-12-02 David Mosberger <davidm@hpl.hp.com>
7161 * Makefile (link-libc-static): Remove -lgcc_eh---it's already mentioned
7162 in $(gnulib). Also, remove stale comment.
7164 2003-11-12 David Mosberger <davidm@hpl.hp.com>
7166 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Take
7167 advantage of new syscall stub and optimize accordingly.
7169 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__NR_futex): Rename
7170 from SYS_futex, to match expectations of
7171 sysdep.h:DO_INLINE_SYSCALL.
7172 (lll_futex_clobbers): Remove.
7173 (lll_futex_timed_wait): Rewrite in terms of DO_INLINE_SYSCALL.
7174 (lll_futex_wake): Likewise.
7175 (lll_futex_requeue): Likewise.
7176 (__lll_mutex_trylock): Rewrite to a macro, so we can include this
7177 file before DO_INLINE_SYSCALL is defined (proposed by Jakub
7179 (__lll_mutex_lock): Likewise.
7180 (__lll_mutex_cond_lock): Likewise.
7181 (__lll_mutex_timed_lock): Likewise.
7182 (__lll_mutex_unlock): Likewise.
7183 (__lll_mutex_unlock_force): Likewise.
7185 * sysdeps/ia64/tls.h: Move declaration of __thread_self up so it
7186 comes before the include of <sysdep.h>.
7187 (THREAD_SELF_SYSINFO): New macro.
7188 (THREAD_SYSINFO): Likewise.
7189 (INIT_SYSINFO): New macro.
7190 (TLS_INIT_TP): Call INIT_SYSINFO.
7192 * sysdeps/ia64/tcb-offsets.sym: Add SYSINFO_OFFSET.
7194 * sysdeps/pthread/createthread.c (create_thread): Use
7195 THREAD_SELF_SYSINFO and THREAD_SYSINFO instead of open code.
7196 * allocatestack.c (allocate_stack): Use THREAD_SYSINFO and
7197 THREAD_SELF_SYSINFO instead of open code.
7198 * sysdeps/i386/tls.h (THREAD_SELF_SYSINFO): New macro.
7199 (THREAD_SYSINFO): Likewise.
7201 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: New file.
7203 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Work around gas problem.
7205 2003-12-06 Ulrich Drepper <drepper@redhat.com>
7207 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Use .init_array
7208 instead of .init. Patch by David Mosberger.
7210 2003-11-30 Thorsten Kukuk <kukuk@suse.de>
7212 * sysdeps/pthread/configure.in: Remove broken declaration in C
7213 cleanup handling check.
7215 2003-11-30 Andreas Jaeger <aj@suse.de>
7217 * Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time).
7218 * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
7221 2003-11-27 Jakub Jelinek <jakub@redhat.com>
7223 * sysdeps/unix/sysv/linux/internaltypes.h (ATTR_FLAG_OLDATTR): Define.
7224 * pthread_attr_destroy.c: Include shlib-compat.h.
7225 (__pthread_attr_destroy): Return immediately if ATTR_FLAG_OLDATTR
7226 is set in iattr->flags.
7227 * pthread_attr_init.c (__pthread_attr_init_2_0): Set ATTR_FLAG_OLDATTR.
7229 2003-11-21 Jakub Jelinek <jakub@redhat.com>
7231 * Makefile (distribute): Add tst-cleanup4aux.c.
7233 * tst-cond12.c (prepare): Add prototype. Move after test-skeleton.c
7236 2003-11-21 Ulrich Drepper <drepper@redhat.com>
7238 * tst-cond12.c (do_test): If USE_COND_SIGNAL is defined, use
7239 pthread_cond_signal.
7241 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Don't
7242 store mutex address if the current value is ~0l.
7243 * sysdeps/pthread/pthread_cond_timedwait.c
7244 (__pthread_cond_timedwait): Likewise.
7245 * sysdeps/pthread/pthread_cond_broadcast.c
7246 (__pthread_cond_broadcast): Don't use requeue for pshared
7249 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
7250 (__pthread_cond_wait): Don't store mutex address if the current
7252 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
7253 (__pthread_cond_timedwait): Likewise.
7254 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
7255 (__pthread_cond_broadcast): Don't use requeue for pshared
7258 * pthread_cond_init.c (__pthread_cond_init): Initialize __mutex
7259 element with ~0l for pshared condvars, with NULL otherwise.
7261 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
7262 (__pthread_cond_wait): Don't store mutex address if the current
7264 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7265 (__pthread_cond_timedwait): Likewise.
7266 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
7267 (__pthread_cond_broadcast): Don't use requeue for pshared
7270 * Makefile: Add rules to build and run tst-cond12 and tst-cond13.
7271 * tst-cond12.c: New file.
7272 * tst-cond13.c: New file.
7274 2003-11-17 Ulrich Drepper <drepper@redhat.com>
7276 * sysdeps/pthread/configure.in: Make missing forced unwind support
7279 2003-11-11 Ulrich Drepper <drepper@redhat.com>
7281 * pthreadP.h: Don't declare __pthread_unwind as weak inside libpthread.
7283 2003-11-06 Ulrich Drepper <drepper@redhat.com>
7285 * Makefile: Add magic to clean up correctly.
7287 2003-11-05 Jakub Jelinek <jakub@redhat.com>
7289 * unwind.c (FRAME_LEFT): Define.
7290 (unwind_stop): Handle old style cleanups here.
7291 (__pthread_unwind): Handle old style cleanups only if
7292 !HAVE_FORCED_UNWIND.
7293 * Makefile (tests): Add tst-cleanup4 and tst-cleanupx4.
7294 (CFLAGS-tst-cleanupx4.c): Add -fexceptions.
7295 ($(objpfx)tst-cleanup4): Depend on $(objpfx)tst-cleanup4aux.o.
7296 ($(objpfx)tst-cleanupx4): Likewise.
7297 * tst-cleanup4.c: New test.
7298 * tst-cleanup4aux.c: New.
7299 * tst-cleanupx4.c: New test.
7301 2003-11-04 Ulrich Drepper <drepper@redhat.com>
7303 * sysdeps/pthread/bits/stdio-lock.h: Use lll_*lock instead of
7304 lll_mutex_*lock macros to skip atomic operations on some archs.
7306 2003-11-03 Ulrich Drepper <drepper@redhat.com>
7308 * sysdeps/pthread/tst-timer.c (main): Initialize
7309 sigev2.sigev_value as well.
7311 2003-10-15 Roland McGrath <roland@redhat.com>
7313 * sysdeps/pthread/configure.in: Barf if visibility attribute support
7315 * sysdeps/pthread/configure: Regenerated.
7317 2003-10-09 Kaz Kojima <kkojima@rr.iij4u.or.jp>
7319 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Completely revamp the
7320 locking macros. No distinction between normal and mutex locking
7322 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Rewrite mutex locking.
7323 Merge bits from lowlevelmutex.S we still need.
7324 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Remove.
7325 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
7326 * sysdeps/unix/sysv/linux/sh/not-cancel.h: New file.
7327 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Adjust for
7328 new mutex implementation.
7329 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Likewise.
7330 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
7331 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7332 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
7333 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
7334 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
7335 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
7336 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
7337 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7338 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO): Also defined
7339 symbol for entry point to avoid cancellation.
7341 2003-10-07 Jakub Jelinek <jakub@redhat.com>
7343 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Backout 2003-10-02
7345 (SAVE_OLDTYPE_0): Fix a typo.
7347 2003-10-03 Ulrich Drepper <drepper@redhat.com>
7349 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
7350 Check __sigsetjmp return value. Reported by Daniel Jacobowitz.
7352 2003-10-02 Ulrich Drepper <drepper@redhat.com>
7354 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (DOCARGS_1): Use
7357 2003-10-02 Jakub Jelinek <jakub@redhat.com>
7359 * Makefile (tests): Add tst-cancel19.
7360 * tst-cancel19.c: New test.
7362 2003-10-02 Ulrich Drepper <drepper@redhat.com>
7364 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix saving and
7365 restoring of the old cancellation type.
7367 2003-09-30 Jakub Jelinek <jakub@redhat.com>
7369 * sysdeps/pthread/malloc-machine.h: Remove misleading comment.
7371 2003-09-27 Wolfram Gloger <wg@malloc.de>
7373 * sysdeps/pthread/malloc-machine.h: New file
7375 2003-09-24 Roland McGrath <roland@redhat.com>
7377 * allocatestack.c (__make_stacks_executable): Don't ignore return
7378 value from _dl_make_stack_executable.
7380 2003-09-24 Ulrich Drepper <drepper@redhat.com>
7382 * allocatestack.c (__make_stacks_executable): Also change
7383 permission of the currently unused stacks.
7385 * allocatestack.c (change_stack_perm): Split out from
7386 __make_stacks_executable.
7387 (allocate_stack): If the required permission changed between the time
7388 we started preparing the stack and queueing it, change the permission.
7389 (__make_stacks_executable): Call change_stack_perm.
7391 * Makefile: Build tst-execstack-mod locally.
7392 * tst-execstack-mod.c: New file.
7394 2003-09-23 Jakub Jelinek <jakub@redhat.com>
7396 * Makefile (tests): Only add tst-execstack if have-z-execstack is yes.
7398 2003-09-23 Roland McGrath <roland@redhat.com>
7400 * tst-execstack.c: New file.
7401 * Makefile (tests): Add it.
7402 ($(objpfx)tst-execstack, $(objpfx)tst-execstack.out): New targets.
7403 (LDFLAGS-tst-execstack): New variable.
7405 * allocatestack.c (allocate_stack): Use GL(dl_stack_flags) to decide
7406 whether to use PROT_EXEC for stack mmap.
7407 (__make_stacks_executable): New function.
7408 * pthreadP.h: Declare it.
7409 * init.c (__pthread_initialize_minimal_internal): Set
7410 GL(dl_make_stack_executable_hook) to that.
7412 2003-09-22 Ulrich Drepper <drepper@redhat.com>
7414 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Adjust for latest
7415 recommendation from AMD re avoidance of lock prefix.
7417 2003-09-22 Jakub Jelinek <jakub@redhat.com>
7419 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait): Use
7420 lll_futex_timed_wait instead of lll_futex_wait.
7421 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Removed.
7422 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Removed.
7423 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: Removed.
7424 * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: Removed.
7425 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Removed.
7426 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Removed.
7427 * sysdeps/unix/sysv/linux/s390/sem_post.c: Removed.
7428 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Removed.
7429 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Include atomic.h.
7430 Completely revamp the locking macros. No distinction between
7431 normal and mutex locking anymore.
7432 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
7433 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock_wait,
7434 __lll_lock_timedwait): Fix prototypes.
7435 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_lock_wait,
7436 __lll_lock_timedwait): Likewise.
7437 (lll_mutex_lock, lll_mutex_cond_lock): Use _val instead of _bool
7438 macros, add __builtin_expect.
7439 (lll_mutex_timedlock): Likewise. Fix return value.
7440 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Removed.
7441 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: Removed.
7442 * sysdeps/unix/sysv/linux/i386/i586/lowlevelmutex.S: Removed.
7443 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: Removed.
7444 * sysdeps/unix/sysv/linux/i386/i686/lowlevelmutex.S: Removed.
7445 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: Removed.
7446 * sysdeps/unix/sysv/linux/lowlevelmutex.c: Removed.
7447 * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: Removed.
7449 2003-09-22 Ulrich Drepper <drepper@redhat.com>
7451 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
7452 (__lll_mutex_lock_wait): Minor optimization to avoid one atomic
7453 operation if possible.
7455 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Don't play tricks
7456 like jumping over the lock prefix.
7458 2003-09-21 Ulrich Drepper <drepper@redhat.com>
7460 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Completely revamp the
7461 locking macros. No distinction between normal and mutex locking
7463 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
7464 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
7465 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
7466 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Rewrite mutex
7467 locking. Merge bits from lowlevelmutex.S we still need.
7468 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
7469 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
7470 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Removed.
7471 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Removed.
7472 * Makefile (routines): Remove libc-lowlevelmutex.
7473 (libpthread-rountines): Remove lowlevelmutex.
7474 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Adjust
7475 for new mutex implementation.
7476 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
7477 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7478 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7479 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
7480 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
7482 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
7484 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
7485 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
7486 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise
7487 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
7488 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7489 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7490 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
7491 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
7493 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
7495 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
7496 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
7497 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
7499 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
7500 * sysdeps/pthread/pthread_cond_signal.c: Don't use requeue.
7502 2003-09-20 Ulrich Drepper <drepper@redhat.com>
7504 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't match memory
7505 in parameters of asm with output parameters.
7507 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Change
7508 type of DECR parameter to int.
7509 * pthreadP.h: Adjust prototype of __pthread_mutex_unlock_usercnt.
7511 2003-09-18 Jakub Jelinek <jakub@redhat.com>
7513 * tst-attr3.c (tf, do_test): Print stack start/end/size and
7514 guardsize for each thread.
7516 2003-09-17 Jakub Jelinek <jakub@redhat.com>
7518 * sysdeps/pthread/pthread.h (pthread_getattr_np): Clarify usage.
7519 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
7520 (pthread_attr_setaffinity_np): Handle cpuset == NULL.
7522 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
7523 (pthread_attr_getaffinity_np): Don't segfault if iattr->cpuset is
7525 * pthread_getattr_np.c: Set cpuset using pthread_getaffinity_np.
7526 * pthreadP.h (pthread_getaffinity_np): Add hidden_proto.
7527 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
7528 (pthread_getaffinity_np): Add hidden_def.
7530 * Makefile (tests): Add tst-attr3.
7531 * tst-attr3.c: New test.
7533 * sysdeps/i386/Makefile (CFLAGS-tst-align.c): Remove.
7535 2003-09-15 Jakub Jelinek <jakub@redhat.com>
7537 * sysdeps/i386/Makefile (CFLAGS-pthread_create.c,
7538 CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
7540 2003-09-17 Jakub Jelinek <jakub@redhat.com>
7542 * Makefile (CFLAGS-tst-align.c): Add $(stack-align-test-flags).
7543 * tst-align.c: Include tst-stack-align.h.
7544 (tf, do_test): Use TEST_STACK_ALIGN macro.
7546 2003-09-17 Ulrich Drepper <drepper@redhat.com>
7548 * pthread_attr_init.c (__pthread_attr_init_2_0): Remove unused
7551 2003-09-16 Ulrich Drepper <drepper@redhat.com>
7553 * pthread_getattr_np.c (pthread_getattr_np): Correctly fill in the
7554 stack-related values for the initial thread.
7556 2003-09-15 Jakub Jelinek <jakub@redhat.com>
7558 * Makefile (CFLAGS-pthread_once.c): Add $(uses-callbacks).
7560 2003-09-11 Ulrich Drepper <drepper@redhat.com>
7562 * pthread_mutex_lock.c: Minor code rearrangements.
7564 2003-09-05 Roland McGrath <roland@redhat.com>
7566 * pthread_create.c (__pthread_pthread_sizeof_descr): Removed.
7567 Instead, include ../nptl_db/db_info.c to do its magic.
7568 * pthread_key_create.c (__pthread_pthread_keys_max): Removed.
7569 (__pthread_pthread_key_2ndlevel_size): Likewise.
7570 * sysdeps/alpha/tls.h (DB_THREAD_SELF): New macro.
7571 * sysdeps/i386/tls.h (DB_THREAD_SELF): New macro.
7572 * sysdeps/ia64/tls.h (DB_THREAD_SELF): New macro.
7573 * sysdeps/powerpc/tls.h (DB_THREAD_SELF): New macro.
7574 * sysdeps/s390/tls.h (DB_THREAD_SELF): New macro.
7575 * sysdeps/sh/tls.h (DB_THREAD_SELF): New macro.
7576 * sysdeps/sparc/tls.h (DB_THREAD_SELF): New macro.
7577 * sysdeps/x86_64/tls.h (DB_THREAD_SELF): New macro.
7578 * sysdeps/alpha/td_ta_map_lwp2thr.c: File removed.
7579 * sysdeps/generic/td_ta_map_lwp2thr.c: File removed.
7580 * sysdeps/i386/td_ta_map_lwp2thr.c: File removed.
7581 * sysdeps/ia64/td_ta_map_lwp2thr.c: File removed.
7582 * sysdeps/powerpc/td_ta_map_lwp2thr.c: File removed.
7583 * sysdeps/s390/td_ta_map_lwp2thr.c: File removed.
7584 * sysdeps/sh/td_ta_map_lwp2thr.c: File removed.
7585 * sysdeps/sparc/td_ta_map_lwp2thr.c: File removed.
7586 * sysdeps/x86_64/td_ta_map_lwp2thr.c: File removed.
7588 2003-09-08 Ulrich Drepper <drepper@redhat.com>
7590 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Change type
7591 of pthread_t to be compatible with LT.
7592 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
7593 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
7594 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7595 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7596 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
7597 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7598 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
7600 2003-09-04 Ulrich Drepper <drepper@redhat.com>
7602 * sysdeps/unix/sysv/linux/i386/not-cancel.h (fcntl_not_cancel): Define.
7604 2003-09-04 Jakub Jelinek <jakub@redhat.com>
7606 * unwind-forcedunwind.c: Move to...
7607 * sysdeps/pthread/unwind-forcedunwind.c: ...here.
7608 (pthread_cancel_init): Use ARCH_CANCEL_INIT if defined.
7609 * sysdeps/pthread/jmpbuf-unwind.h: New file.
7610 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: New file.
7611 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: New file.
7612 * unwind.c: Include jmpbuf-unwind.h.
7613 (unwind_stop): Use _JMPBUF_CFA_UNWINDS macro.
7615 2003-09-02 Jakub Jelinek <jakub@redhat.com>
7617 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: New file.
7618 * sysdeps/unix/sysv/linux/ia64/Versions (libpthread): Export
7619 pthread_attr_setstack and pthread_attr_setstacksize @@GLIBC_2.3.3.
7620 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: New file.
7621 * sysdeps/unix/sysv/linux/alpha/Versions: New file.
7622 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: New file.
7623 * sysdeps/unix/sysv/linux/sparc/Versions: New file.
7624 * pthread_attr_setstack.c (__old_pthread_attr_setstack): New function.
7625 (pthread_attr_setstack): If PTHREAD_STACK_MIN != 16384, export
7626 as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.2.
7627 * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize): New
7629 (pthread_attr_setstacksize): If PTHREAD_STACK_MIN != 16384, export
7630 as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.1.
7631 * Makefile (tests): Add tst-stack2.
7632 * tst-stack2.c: New test.
7633 * tst-stack1.c: Include limits.h and sys/param.h.
7634 (do_test): Set size to MAX (4 * getpagesize (), PTHREAD_STACK_MIN).
7636 * pthread_condattr_setpshared.c: Include errno.h.
7637 (pthread_condattr_setpshared): Return EINVAL if pshared
7638 is neither PTHREAD_PROCESS_PRIVATE nor PTHREAD_PROCESS_SHARED.
7640 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Also
7641 defined symbol for entry point to avoid cancellation.
7642 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
7644 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
7646 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
7648 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h (PSEUDO):
7650 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
7652 * sysdeps/unix/sysv/linux/i386/not-cancel.h (__open_nocancel,
7653 __close_nocancel, __read_nocancel, __write_nocancel,
7654 __waitpid_nocancel): Add attribute_hidden. If not in libc.so,
7655 libpthread.so or librt.so, define to corresponding function
7656 without _nocancel suffix.
7657 * sysdeps/unix/sysv/linux/s390/not-cancel.h: New file.
7658 * sysdeps/unix/sysv/linux/powerpc/not-cancel.h: New file.
7659 * sysdeps/unix/sysv/linux/sparc/not-cancel.h: New file.
7661 * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: Fix a typo.
7663 2003-09-02 Ulrich Drepper <drepper@redhat.com>
7665 * sysdeps/unix/sysv/linux/i386/not-cancel.h: New file.
7666 * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: New file.
7668 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Make sure the code
7669 in subsections has a symbol associated with it.
7671 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Also
7672 defined symbol for entry point to avoid cancellation.
7673 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Likewise.
7675 2003-09-01 Jakub Jelinek <jakub@redhat.com>
7677 * Makefile (tests): Add tst-tls5.
7678 (module-names): Add tst-tls5mod{,a,b,c,d,e,f}.
7679 ($(objpfx)tst-tls5mod{,a,b,c,d,e,f}.so-no-z-defs): Set to yes.
7680 ($(objpfx)tst-tls5): New.
7681 ($(objpfx)tst-tls6.out): Likewise.
7682 (tests): Depend on $(objpfx)tst-tls6.out.
7683 * tst-tls3.c: Include stdint.h and pthreaddef.h.
7684 (do_test): Check pthread_self () return value alignment.
7685 * tst-tls3mod.c: Include stdint.h and pthreaddef.h.
7686 (tf): Check pthread_self () return value alignment.
7687 * tst-tls5.c: New test.
7689 * tst-tls5mod.c: New.
7690 * tst-tls5moda.c: New.
7691 * tst-tls5modb.c: New.
7692 * tst-tls5modc.c: New.
7693 * tst-tls5modd.c: New.
7694 * tst-tls5mode.c: New.
7695 * tst-tls5modf.c: New.
7696 * tst-tls6.sh: New test.
7698 * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Add
7699 ptr___pthread_cond_timedwait and ptr___pthread_cond_timedwait_2_0.
7700 * init.c (pthread_functions): Initialize them.
7701 * forward.c (pthread_cond_timedwait@GLIBC_2.0,
7702 pthread_cond_timedwait@@GLIBC_2.3.2): New forwards.
7703 * Versions (libc): Export pthread_cond_timedwait@GLIBC_2.0,
7704 pthread_cond_timedwait@@GLIBC_2.3.2.
7706 2003-09-01 Jakub Jelinek <jakub@redhat.com>
7708 * sysdeps/unix/sysv/linux/alpha/timer_create.c: New file.
7709 * sysdeps/unix/sysv/linux/alpha/timer_delete.c: New file.
7710 * sysdeps/unix/sysv/linux/alpha/timer_getoverr.c: New file.
7711 * sysdeps/unix/sysv/linux/alpha/timer_gettime.c: New file.
7712 * sysdeps/unix/sysv/linux/alpha/timer_settime.c: New file.
7713 * sysdeps/unix/sysv/linux/alpha/Versions: New file.
7715 * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
7717 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Define
7718 _POSIX_THREAD_PRIORITY_SCHEDULING.
7719 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
7721 2003-08-31 Ulrich Drepper <drepper@redhat.com>
7723 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock): Avoid
7724 nested function, use static inline function from libio.h.
7725 Code by Richard Henderson.
7727 * sysdeps/pthread/bits/libc-lock.h: Mark pthread_setcancelstate as
7730 2003-08-30 Jakub Jelinek <jakub@redhat.com>
7732 * sysdeps/unix/sysv/linux/sparc/sparc64/Versions: New file.
7733 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_create.c: New file.
7734 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_delete.c: New file.
7735 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_getoverr.c: New file.
7736 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_gettime.c: New file.
7737 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_settime.c: New file.
7738 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
7739 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
7740 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: New file.
7741 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: New file.
7742 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: New file.
7743 * sysdeps/unix/sysv/linux/sparc/pthread_once.c: New file.
7744 * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: New file.
7745 * sysdeps/unix/sysv/linux/sparc/fork.c: New file.
7746 * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
7747 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: New file.
7748 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: New file.
7749 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: New file.
7750 * sysdeps/sparc/sparc32/pthread_spin_lock.c: New file.
7751 * sysdeps/sparc/sparc32/pthread_spin_trylock.c: New file.
7752 * sysdeps/sparc/sparc32/pthreaddef.h: New file.
7753 * sysdeps/sparc/sparc64/pthread_spin_lock.c: New file.
7754 * sysdeps/sparc/sparc64/pthread_spin_trylock.c: New file.
7755 * sysdeps/sparc/sparc64/pthread_spin_unlock.c: New file.
7756 * sysdeps/sparc/sparc64/pthreaddef.h: New file.
7757 * sysdeps/sparc/tls.h: New file.
7758 * sysdeps/sparc/tcb-offsets.sym: New file.
7759 * sysdeps/sparc/Makefile: New file.
7760 * sysdeps/sparc/td_ta_map_lwp2thr.c: New file.
7761 * init.c [__sparc__] (__NR_set_tid_address): Define.
7763 2003-08-29 Jakub Jelinek <jakub@redhat.com>
7765 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock,
7766 _IO_release_lock): Define.
7768 2003-08-29 Jakub Jelinek <jakuB@redhat.com>
7770 * tst-cancel4.c (tf_sigwait, tf_sigwaitinfo, tf_sigtimedwait): Add
7771 sigemptyset before sigaddset. Reported by jreiser@BitWagon.com.
7773 2003-08-27 Ulrich Drepper <drepper@redhat.com>
7775 * sysdeps/pthread/pthread.h (pthread_exit): Remove __THROW.
7776 (__pthread_cleanup_class): Add missing return types of member
7779 2003-08-26 Steven Munroe <sjmunroe@us.ibm.com>
7781 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
7782 (lll_mutex_unlock_force): Add memory barrier between store and futex
7785 2003-08-25 Ulrich Drepper <drepper@redhat.com>
7787 * tst-cancel4.c (do_test): Also unlink tempfname and remove
7788 tempmsg in first loop.
7790 2003-08-18 Ulrich Drepper <drepper@redhat.com>
7792 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
7793 _POSIX_THREAD_PRIORITY_SCHEDULING.
7794 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
7796 2003-08-07 Jakub Jelinek <jakub@redhat.com>
7798 * sysdeps/pthread/bits/libc-lock.h [_LIBC && SHARED]
7799 (__rtld_lock_default_lock_recursive,
7800 __rtld_lock_default_unlock_recursive): Define.
7801 [_LIBC && SHARED] (__rtld_lock_lock_recursive,
7802 __rtld_lock_unlock_recursive): Define using
7803 GL(_dl_rtld_*lock_recursive).
7804 * init.c (__pthread_initialize_minimal_internal): Initialize
7805 _dl_rtld_lock_recursive and _dl_rtld_unlock_recursive.
7806 Lock GL(_dl_load_lock) the same number of times as
7807 GL(_dl_load_lock) using non-mt implementation was nested.
7809 * pthreadP.h (__pthread_cleanup_upto): Add hidden_proto.
7810 * pt-longjmp.c (__pthread_cleanup_upto): Add hidden_def.
7812 2003-08-06 Jakub Jelinek <jakub@redhat.com>
7814 * tst-cancel17.c (do_test): Make len2 maximum of page size and
7817 2003-08-07 Jakub Jelinek <jakub@redhat.com>
7819 * pthread_create.c (__pthread_create_2_0): Clear new_attr.cpuset.
7821 2003-08-03 Jakub Jelinek <jakub@redhat.com>
7823 * sysdeps/pthread/createthread.c (do_clone): Move error handling
7824 to first syscall error check. Move syscall error check for tkill
7825 into __ASSUME_CLONE_STOPPED #ifdef.
7827 2003-08-02 Ulrich Drepper <drepper@redhat.com>
7829 * sysdeps/pthread/createthread.c (do_clone): If __ASSUME_CLONE_STOPPED
7830 is not defined, do explicit synchronization.
7831 (create_thread): Do not lock pd->lock here. If __ASSUME_CLONE_STOPPED
7832 is not defined also unlock pd->lock for non-debugging case in case
7834 * pthread_create.c (start_thread): Always get and release pd->lock
7835 if __ASSUME_CLONE_STOPPED is not defined.
7836 (start_thread_debug): Removed. Adjust users.
7837 * allocatestack.c (allocate_stack): Always initialize lock if
7838 __ASSUME_CLONE_STOPPED is not defined.
7839 * Makefile (tests): Add tst-sched1.
7840 * tst-sched1.c: New file.
7842 * sysdeps/pthread/createthread.c (do_clone): Only use
7843 sched_setschduler and pass correct parameters.
7845 2003-07-31 Jakub Jelinek <jakub@redhat.com>
7847 * sysdeps/pthread/pthread.h (pthread_attr_setstackaddr,
7848 pthread_attr_setstacksize): Change PTHREAD_STACK_SIZE to
7849 PTHREAD_STACK_MIN in comments.
7851 2003-07-31 Jakub Jelinek <jakub@redhat.com>
7853 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
7854 Shut up warnings if INTERNAL_SYSCALL_ERROR_P does not use its first
7856 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Likewise.
7857 * pthread_condattr_setclock.c (pthread_condattr_setclock): Likewise.
7858 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Include pthreaddef.h.
7859 (__pthread_cleanup_upto): Fix prototype.
7860 (_longjmp_unwind): Adjust caller.
7861 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_timedlock):
7862 Change second argument to const struct pointer.
7863 * tst-sem8.c (main): Remove unused s2 and s3 variables.
7864 * tst-sem9.c (main): Likewise.
7865 * unwind.c: Include string.h for strlen prototype.
7867 2003-07-31 Ulrich Drepper <drepper@redhat.com>
7869 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7870 (__pthread_cond_timedwait): Don't use cmov unless HAVE_CMOV is defined.
7871 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S:
7873 Patch by Nicholas Miell <nmiell@attbi.com>.
7875 2003-07-30 Jakub Jelinek <jakub@redhat.com>
7877 * init.c (__pthread_initialize_minimal_internal): Initialize
7878 GL(dl_init_static_tls).
7879 * pthreadP.h (__pthread_init_static_tls): New prototype.
7880 * allocatestack.c (init_one_static_tls, __pthread_init_static_tls):
7882 * Makefile (tests): Add tst-tls4.
7883 (modules-names): Add tst-tls4moda and tst-tls4modb.
7884 ($(objpfx)tst-tls4): Link against libdl and libpthread.
7885 ($(objpfx)tst-tls4.out): Depend on tst-tls4moda.so and
7887 * tst-tls4.c: New file.
7888 * tst-tls4moda.c: New file.
7889 * tst-tls4modb.c: New file.
7891 2003-06-19 Daniel Jacobowitz <drow@mvista.com>
7893 * sysdeps/pthread/timer_create.c (timer_create): Call timer_delref
7894 before __timer_dealloc.
7895 * sysdeps/pthread/timer_routines.c (__timer_thread_find_matching):
7896 Don't call list_unlink.
7898 2003-07-29 Roland McGrath <roland@redhat.com>
7900 * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
7902 2003-07-25 Jakub Jelinek <jakub@redhat.com>
7904 * tst-cancel17.c (do_test): Check if aio_cancel failed.
7905 Don't reuse struct aiocb A if it failed.
7906 Write fpathconf (fds[1], _PC_PIPE_BUF) + 2 bytes using aio_write,
7907 not just one byte, as that does not block.
7909 2003-07-22 Jakub Jelinek <jakub@redhat.com>
7911 * sysdeps/pthread/unwind-resume.c: New file.
7912 * sysdeps/pthread/Makefile (routines, shared-only-routines): Add
7913 unwind-resume in csu subdir.
7914 (CFLAGS-unwind-resume.c, CFLAGS-rt-unwind-resume.c): Compile with
7916 (librt-sysdep_routines, librt-shared-only-routines): Add
7918 * sysdeps/pthread/rt-unwind-resume.c: New file.
7919 * unwind-forcedunwind.c: New file.
7920 * Makefile (libpthread-routines): Add unwind-forcedunwind.
7921 (libpthread-shared-only-routines): Likewise.
7922 (CFLAGS-unwind-forcedunwind.c): Compile with exceptions.
7923 * pthreadP.h (pthread_cancel_init): New prototype.
7924 * pthread_cancel.c (pthread_cancel): Call pthread_cancel_init.
7926 * sysdeps/pthread/createthread.c (do_thread, create_thread): Make
7927 attr argument const struct pthread_attr *.
7929 * res.c (__res_state): Return __resp.
7930 * descr.h: Include resolv.h.
7931 (struct pthread): Add res field.
7932 * pthread_create.c: Include resolv.h.
7933 (start_thread): Initialize __resp.
7934 * Makefile (tests): Add tst-_res1.
7935 (module-names): Add tst-_res1mod1, tst-_res1mod2.
7936 ($(objpfx)tst-_res1mod2.so): Depend on $(objpfx)tst-_res1mod1.so.
7937 ($(objpfx)tst-_res1): Depend on $(objpfx)tst-_res1mod2.so and
7939 * tst-_res1.c: New file.
7940 * tst-_res1mod1.c: New file.
7941 * tst-_res1mod2.c: New file.
7943 2003-07-21 Ulrich Drepper <drepper@redhat.com>
7945 * sysdeps/pthread/createthread.c: Don't define CLONE_STOPPED.
7947 * Makefile: Define various *-no-z-defs variables for test DSOs
7948 which has undefined symbols.
7950 2003-07-21 Steven Munroe <sjmunroe@us.ibm.com>
7952 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
7953 Retry if the stwcx fails to store once_control.
7955 2003-07-20 Ulrich Drepper <drepper@redhat.com>
7957 * Makefile (libpthread-routines): Add pthread_attr_getaffinity and
7958 pthread_attr_setaffinity.
7959 * Versions [libpthread] (GLIBC_2.3.3): Likewise.
7960 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: New file.
7961 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: New file.
7962 * pthread_attr_destroy.c: Free cpuset element if allocated.
7963 * pthread_create.c: Pass iattr as additional parameter to
7965 * sysdeps/pthread/createthread.c: If attribute is provided and
7966 a new thread is created with affinity set or scheduling parameters,
7967 start thread with CLONE_STOPPED.
7968 * sysdeps/pthread/pthread.h: Declare pthread_attr_getaffinity and
7969 pthread_attr_setaffinity.
7970 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
7973 2003-07-15 Ulrich Drepper <drepper@redhat.com>
7975 * tst-tcancel-wrappers.sh: lseek and llseek are not cancelation points.
7977 2003-07-14 Ulrich Drepper <drepper@redhat.com>
7979 * sysdeps/pthread/configure.in: Require CFI directives also for
7982 2003-07-15 Jakub Jelinek <jakub@redhat.com>
7984 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
7987 2003-07-12 Kaz Kojima <kkojima@rr.iij4u.or.jp>
7989 * sysdeps/sh/tcb-offsets.sym: Add RESULT, TID, CANCELHANDLING and
7991 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use more
7992 registers as variables. Call __pthread_mutex_unlock_usercnt.
7993 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7994 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Store TID
7995 not self pointer in __writer. Compare with TID to determine
7997 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7998 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
8000 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
8002 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add cancellation support.
8003 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
8004 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Define all the nice
8005 macros also when compiling librt.
8007 2003-07-11 Jakub Jelinek <jakub@redhat.com>
8009 * Makefile (CFLAGS-pthread_once.c): Add -fexceptions
8010 -fasynchronous-unwind-tables.
8011 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
8012 (PSEUDO): Add cfi directives.
8013 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO):
8015 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
8018 2003-07-08 Jakub Jelinek <jakub@redhat.com>
8020 * pthreadP.h (__pthread_unwind_next, __pthread_register_cancel,
8021 __pthread_unregister_cancel): Add prototypes and hidden_proto.
8022 * unwind.c (__pthread_unwind_next): Add hidden_def.
8023 * cleanup.c (__pthread_register_cancel, __pthread_unregister_cancel):
8025 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
8026 Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
8027 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
8029 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
8030 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
8032 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once): Use
8033 HIDDEN_JUMPTARGET to call __pthread_register_cancel,
8034 __pthread_unregister_cancel and __pthread_unwind_next.
8036 2003-07-04 Jakub Jelinek <jakub@redhat.com>
8038 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Use
8039 different symbol for the cancellation syscall wrapper and
8040 non-cancellation syscall wrapper.
8041 (PSEUDO_END): Define.
8043 2003-07-05 Richard Henderson <rth@redhat.com>
8045 * sysdeps/alpha/elf/pt-initfini.c: Avoid .ent/.end.
8046 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_wait,
8047 lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
8048 return actual return value from the syscall, not 0.
8050 2003-07-07 Ulrich Drepper <drepper@redhat.com>
8052 * descr.h (struct pthread): Add pid field.
8053 * allocatestack.c (allocate_stack): Initialize pid field in descriptor.
8054 (__reclaim_stacks): Likewise.
8055 * init.c (sigcancel_handler): If __ASSUME_CORRECT_SI_PID is defined
8056 also check for PID of the signal source.
8057 (__pthread_initialize_minimal_internal): Also initialize pid field
8058 of initial thread's descriptor.
8059 * pthread_cancel.c: Use tgkill instead of tkill if possible.
8060 * sysdeps/unix/sysv/linux/fork.c: Likewise.
8061 * sysdeps/unix/sysv/linux/pt-raise.c: Likewise.
8062 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
8063 * sysdeps/unix/sysv/linux/raise.c: Likewise.
8065 2003-07-05 Ulrich Drepper <drepper@redhat.com>
8067 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_push): Renamed.
8068 Fix use of parameter.
8069 (__libc_cleanup_pop): Likewise.
8071 2003-07-04 Ulrich Drepper <drepper@redhat.com>
8073 * init.c (sigcancel_handler): Change parameters to match handler
8074 for SA_SIGACTION. Check signal number and code to recognize
8075 invalid invocations.
8077 2003-07-03 Roland McGrath <roland@redhat.com>
8079 * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr):
8080 Apply sizeof (struct pthread) bias to r13 value.
8082 2003-07-03 Ulrich Drepper <drepper@redhat.com>
8084 * sysdeps/pthread/configure.in: Require CFI directives.
8086 * sysdeps/pthread/librt-cancellation.c (__pthread_unwind): Remove
8088 * pthreadP.h (__pthread_unwind): Add hidden_proto if used in
8089 libpthread compilation.
8090 * unwind.c (__pthread_unwind): Add hidden_def.
8091 * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_unwind.
8093 2003-07-01 Ulrich Drepper <drepper@redhat.com>
8095 * libc-cancellation.c (__libc_cleanup_routine): Define.
8096 * sysdeps/pthread/bits/libc-lock.h (__pthread_cleanup_push): Define.
8097 (__pthread_cleanup_pop): Define.
8099 2003-07-01 Richard Henderson <rth@redhat.com>
8101 * sysdeps/alpha/elf/pt-initfini.c: New file.
8102 * sysdeps/alpha/pthread_spin_lock.S: New file.
8103 * sysdeps/alpha/pthread_spin_trylock.S: New file.
8104 * sysdeps/alpha/pthreaddef.h: New file.
8105 * sysdeps/alpha/td_ta_map_lwp2thr.c: New file.
8106 * sysdeps/alpha/tls.h: New file.
8107 * sysdeps/unix/sysv/linux/alpha/Makefile: New file.
8108 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: New file.
8109 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: New file.
8110 * sysdeps/unix/sysv/linux/alpha/createthread.c: New file.
8111 * sysdeps/unix/sysv/linux/alpha/fork.c: New file.
8112 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: New file.
8113 * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: New file.
8114 * sysdeps/unix/sysv/linux/alpha/pthread_once.c: New file.
8115 * sysdeps/unix/sysv/linux/alpha/sem_post.c: New file.
8116 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
8118 2003-07-01 Ulrich Drepper <drepper@redhat.com>
8120 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Add correct
8121 cleanup support and unwind info.
8123 2003-06-30 Ulrich Drepper <drepper@redhat.com>
8125 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
8126 Use correct cleanup handler registration. Add unwind info.
8127 * sysdeps/unix/sysv/linux/unwindbuf.sym: New file.
8128 * sysdeps/unix/sysv/linux/Makefile: Add rule to build unwindbuf.h.
8129 * tst-once3.c: Add cleanup handler and check it is called.
8130 * tst-once4.c: Likewise.
8131 * tst-oncex3.c: New file.
8132 * tst-oncex4.c: New file.
8133 * Makefile: Add rules to build and run tst-oncex3 and tst-oncex4.
8135 2003-06-29 Ulrich Drepper <drepper@redhat.com>
8137 * sysdeps/pthread/configure.in: Check for C cleanup handling in gcc.
8139 2003-06-27 Ulrich Drepper <drepper@redhat.com>
8141 * tst-cancel4.c (tf_msgrcv): Use IPC_PRIVATE in msgget call.
8142 (tf_msgsnd): Likewise.
8144 * tst-cancel4.c (tf_msgrcv): Strengthen test against valid
8145 premature returns a bit more.
8147 2003-06-26 Ulrich Drepper <drepper@redhat.com>
8149 * sysdeps/pthread/librt-cancellation.c: Move __pthread_unwind
8150 definition to the front.
8152 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rename
8153 the cleanup functions to make the names unique. Fix dwarf opcode
8155 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Rename cleanup
8156 functions to make the names unique. Fix CFA offset for two blocks.
8158 2003-06-25 Ulrich Drepper <drepper@redhat.com>
8160 * sysdeps/pthread/pthread.h (class __pthread_cleanup_class): Add
8161 missing closing braces.
8162 Patch by Christophe Saout <christophe@saout.de>.
8164 2003-06-24 Roland McGrath <roland@redhat.com>
8166 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Typo fix.
8168 2003-06-24 Ulrich Drepper <drepper@redhat.com>
8170 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: New file.
8171 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: New file.
8173 * pthreadP.h: Declare __find_thread_by_id.
8174 * allocatestack.c [HP_TIMING_AVAIL]: Define __find_thread_by_id.
8175 * pthread_clock_gettime.c: Allow using other thread's clock.
8176 * pthread_clock_settime.c: Likewise.
8177 * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
8178 * Makefile: Add rules to build and run tst-clock2.
8179 * tst-clock2.c: New file.
8181 2003-06-23 Ulrich Drepper <drepper@redhat.com>
8183 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rewrite
8184 to use exception-based cleanup handler.
8185 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8187 * tst-cond8.c (ch): Announce that we are done.
8189 * pthreadP.h (__pthread_mutex_cond_lock): Mark with internal_function.
8191 * tst-cancel17.c (tf): Retry aio_suspend in case of EINTR.
8192 Also test aio_suspend with timeout value.
8194 2003-06-22 Ulrich Drepper <drepper@redhat.com>
8196 * pthreadP.h: Mark __pthread_mutex_unlock_usercnt also hidden.
8197 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Add
8200 * pthreadP.h (__pthread_mutex_init_internal): Mark hidden.
8201 (__pthread_mutex_lock_internal): Likewise.
8202 (__pthread_mutex_unlock_internal): Likewise.
8203 (__pthread_mutex_unlock_usercnt): Declare.
8204 * pthread_mutex_destroy.c: Always fail if used in any way.
8205 * pthread_mutex_init.c: Update comment.
8206 * pthread_mutex_lock.c: If NO_INCR is not defined adjust __nusers.
8207 * pthread_mutex_timedlock.c: Adjust __nusers.
8208 * pthread_mutex_trylock.c: Adjust __nusers.
8209 * pthread_mutex_unlock.c: Old code is in __pthread_mutex_unlock_usercnt
8210 and public interfaces are wrapper with pass additional parameter.
8211 __pthread_mutex_unlock_usercnt does not adjust __nusers if second
8213 * tst-mutex8.c: New file.
8214 * Makefile (tests): Add tst-mutex8.
8215 * sysdeps/pthread/pthread_cond_timedwait.c: Call
8216 __pthread_mutex_unlock_usercnt.
8217 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
8218 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8219 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8220 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8221 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8222 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Define NO_INCR.
8223 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
8225 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8226 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
8227 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
8228 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
8229 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
8231 * pthread_mutex_lock.c: Don't store THREAD_ID in __owner, use TID.
8232 * pthread_mutex_timedlock.c: Likewise.
8233 * pthread_mutex_trylock.c: Adjust __nusers.
8234 * pthread_mutex_unlock.c: Compare with TID not THREAD_ID.
8235 * tst-mutex9.c: New file.
8236 * Makefile (tests): Add tst-mutex9.
8237 * sysdeps/i386/tls.h: Remove THREAD_ID definition.
8238 * sysdeps/ia64/tls.h: Likewise.
8239 * sysdeps/powerpc/tls.h: Likewise.
8240 * sysdeps/s390/tls.h: Likewise.
8241 * sysdeps/sh/tls.h: Likewise.
8242 * sysdeps/x86_64/tls.h: Likewise.
8243 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
8244 Change type of __owner.
8245 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8246 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
8247 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
8248 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
8249 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
8251 2003-06-19 Jakub Jelinek <jakub@redhat.com>
8253 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Move to...
8254 * sysdeps/unix/sysv/linux/sem_post.c: ...here.
8256 * sysdeps/unix/sysv/linux/sem_post.c: Move to...
8257 * sysdeps/unix/sysv/linux/powerpc/sem_post.c: ... here. Pass nr + 1
8258 instead of nr to lll_futex_wake. Only set errno and return -1
8261 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_wait,
8262 lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
8263 return actual return value from the syscall, not 0.
8265 2003-06-18 Ulrich Drepper <drepper@redhat.com>
8267 * tst-cancel4.c (tf_msgsnd): Don't always use 100 as the type,
8268 find a random value.
8269 (tf_msgrcv): Likewise. Also don't report msgrcv returns if
8272 * sysdeps/unix/sysv/linux/timer_settime.c: Add prototype for
8273 compat_timer_settime.
8274 * sysdeps/unix/sysv/linux/timer_gettime.c: Add prototype for
8275 compat_timer_gettime.
8276 * sysdeps/unix/sysv/linux/timer_getoverr.c: Add prototype for
8277 compat_timer_getoverrun.
8278 * sysdeps/unix/sysv/linux/timer_delete.c: Add prototype for
8279 compat_timer_delete.
8281 * pthread_mutex_destroy.c (__pthread_mutex_destroy): For
8282 error-checking mutex detect busy mutexes.
8284 2003-06-17 Ulrich Drepper <drepper@redhat.com>
8286 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_mutex_lock):
8287 Add ax to clobber list.
8288 (lll_mutex_cond_lock): Likewise.
8289 (lll_mutex_unlock): Likewise.
8290 (lll_lock): Likewise.
8291 (lll_unlock): Likewise.
8293 * Makefile: Add rules to build and run tst-cancel18 and tst-cancelx18.
8294 * tst-cancel18.c: New file.
8295 * tst-cancelx18.c: New file.
8297 * tst-cancel4.c: Test connect, creat, msgrcv, msgsnd, sendmsg, sendto,
8300 * Makefile: Add rules to build and run tst-cancel17 and tst-cancel17x.
8301 * tst-cancel17.c: New file.
8302 * tst-cancelx17.c: New file.
8304 * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
8305 * sysdeps/unix/sysv/linux/sigwait.c: New file.
8306 * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
8308 * tst-cancel4.c: Test open, close, pread, pwrite, fsync, and msync.
8310 2003-06-16 Jakub Jelinek <jakub@redhat.com>
8312 * sysdeps/pthread/createthread.c (create_thread): Set
8313 header.multiple_threads unconditionally.
8314 * allocatestack.c (allocate_stack): Likewise.
8315 * descr.h (struct pthread): Add header.multiple_threads
8317 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (CENABLE, CDISABLE):
8318 Define for librt. #error if neither libpthread, libc nor librt.
8319 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (CENABLE, CDISABLE):
8321 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (CENABLE,
8322 CDISABLE): Likewise.
8323 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (CENABLE,
8324 CDISABLE): Likewise.
8325 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (CENABLE,
8326 CDISABLE): Likewise.
8327 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (CENABLE,
8328 CDISABLE): Likewise. Access header.multiple_threads outside of
8329 libc and libpthread.
8330 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (CENABLE, CDISABLE):
8332 * sysdeps/x86_64/tls.h (tcbhead_t): Add multiple_threads.
8333 * sysdeps/x86_64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define.
8335 2003-06-17 Ulrich Drepper <drepper@redhat.com>
8337 * tst-cancel4.c: Add tests for the socket and signal functions, pause.
8338 Also test early cancellation before the thread reaches the cancellation
8341 * Makefile: Compile forward.c with exceptions.
8343 * sysdeps/unix/sysv/linux/sleep.c: New file.
8345 2003-06-16 Ulrich Drepper <drepper@redhat.com>
8347 * Makefile: Add CFLAGS definition to compile function wrappers
8348 duplicated from libc with exceptions.
8349 * tst-cancel4.c: Also check cancellation handlers.
8351 * Makefile: Add rules to build and run tst-cancel16 and
8352 tst-cancelx16. Add missing CFLAGS definitions.
8353 * tst-cancel16.c: New file.
8354 * tst-cancelx16.c: New file.
8356 2003-06-15 Ulrich Drepper <drepper@redhat.com>
8358 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
8359 (DL_SYSINFO_IMPLEMENTATION): Use CFI opcodes.
8360 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
8361 (DL_SYSINFO_IMPLEMENTATION): Likewise.
8363 * pthreadP.h (LIBC_CANCEL_ASYNC): Also define for librt.
8364 (LIBC_CANCEL_RESET): Likewise.
8365 Declare __librt_enable_asynccancel and __librt_disable_asynccancel.
8366 * sysdeps/pthread/Makefile (librt-sysdep_routines): Add
8368 (CFLAGS-libcrt-cancellation.c): Define.
8369 * sysdeps/pthread/librt-cancellation.c: New file.
8370 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define all the nice
8371 macros also when compiling librt.
8372 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
8373 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
8374 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
8375 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
8376 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
8377 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
8378 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
8380 * sysdeps/unix/sysv/linux/timer_create.c: Add prototype for
8381 compat_timer_create.
8383 2003-06-14 Ulrich Drepper <drepper@redhat.com>
8385 * sysdeps/pthread/posix-timer.h (timespec_compare): Always inline.
8387 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
8389 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
8390 Add libc_hidden_def.
8392 2003-06-13 Roland McGrath <roland@redhat.com>
8394 * sysdeps/x86_64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Pass FS
8395 constant from <sys/reg.h> to ps_get_thread_area, not register contents.
8397 2003-06-11 Ulrich Drepper <drepper@redhat.com>
8399 * allocatestack.c (queue_stack): Always inline.
8400 * ptreadhP.h (__do_cancel): Likewise.
8402 2003-06-10 Jakub Jelinek <jakub@redhat.com>
8404 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait): Fix
8407 2003-06-10 Ulrich Drepper <drepper@redhat.com>
8409 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
8410 (__pthread_cond_signal): Remove incorrect second addition for
8413 2003-06-09 Ulrich Drepper <drepper@redhat.com>
8415 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
8416 (__pthread_cond_signal): Use correct futex pointer in
8417 __lll_mutex_lock_wait call.
8419 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
8420 (__pthread_cond_signal): Some more tweaks to handle cond_lock!=0.
8422 2003-06-08 Ulrich Drepper <drepper@redhat.com>
8424 * sysdeps/unix/sysv/linux/s390/sem_wait.c (__new_sem_wait): Make
8426 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
8429 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Remove
8430 hand-written CFI generation code. Since ENTRY/END also initiated
8431 CFI frames this caused two CFI sets to be generated.
8433 2003-06-07 Ulrich Drepper <drepper@redhat.com>
8435 * cleanup_routine.c: New file.
8436 * Versions (libpthread) [GLIBC_2.3.3]: Add __pthread_cleanup_routine.
8437 * sysdeps/pthread/pthread.h: Add support for fully exception-based
8439 * Makefile (libpthread-routines): Add cleanup_routine.
8440 Add more CFLAGS variables to compile with exceptions. Add comments
8441 why which file needs unwind tables.
8442 (tests) [have-forced-unwind==yes]: Add tst-cancelx* and tst-cleanupx*
8444 * tst-cancelx1.c: New file.
8445 * tst-cancelx2.c: New file.
8446 * tst-cancelx3.c: New file.
8447 * tst-cancelx4.c: New file.
8448 * tst-cancelx5.c: New file.
8449 * tst-cancelx6.c: New file.
8450 * tst-cancelx7.c: New file.
8451 * tst-cancelx8.c: New file.
8452 * tst-cancelx9.c: New file.
8453 * tst-cancelx10.c: New file.
8454 * tst-cancelx11.c: New file.
8455 * tst-cancelx12.c: New file.
8456 * tst-cancelx13.c: New file.
8457 * tst-cancelx14.c: New file.
8458 * tst-cancelx15.c: New file.
8459 * tst-cleanupx0.c: New file.
8460 * tst-cleanupx0.expect: New file.
8461 * tst-cleanupx1.c: New file.
8462 * tst-cleanupx2.c: New file.
8463 * tst-cleanupx3.c: New file.
8465 * tst-cleanup0.c: Make standard compliant.
8466 * tst-cleanup1.c: Likewise.
8468 * sysdeps/unix/sysv/linux/sem_timedwait.c: Add cancellation support.
8469 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
8470 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
8471 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
8472 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
8473 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
8474 * sysdeps/i386/tcb-offsets.sym: Add RESULT, CANCELHANDLING, and
8476 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
8477 * tst-cancel12.c: New file.
8478 * tst-cancel13.c: New file.
8479 * tst-cancel14.c: New file.
8480 * tst-cancel15.c: New file.
8481 * Makefile (tests): Add tst-cancel12, tst-cancel13, tst-cancel14,
8484 * tst-cancel1.c: Add some comments.
8486 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Compute relative
8489 2003-06-06 Ulrich Drepper <drepper@redhat.com>
8491 * Makefile (CFLAGS-pthread_cancel.c): Define.
8493 2003-06-05 Ulrich Drepper <drepper@redhat.com>
8495 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_rwlock_t):
8496 Change type of __writer element to int.
8497 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8498 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
8499 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
8500 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
8501 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
8502 * sysdeps/i386/tcb-offsets.sym: Replace SELF entry with TID entry.
8503 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
8504 * pthread_rwlock_trywrlock.c: Store TID not self pointer in __writer.
8505 Compare with TID to determine deadlocks.
8506 * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
8507 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
8508 * sysdeps/pthread/pthread_rwlock_timedwrlock.: Likewise.
8509 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
8510 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
8511 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8513 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8515 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8516 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
8517 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
8519 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
8521 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
8522 * Makefile (tests): Add tst-rwlock12.
8523 * tst-rwlock12.c: New file.
8525 2003-06-05 Jakub Jelinek <jakub@redhat.com>
8527 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait,
8528 __lll_timedlock_wait, lll_unlock_wake_cb, __lll_timedwait_tid):
8529 Remove bogus hidden_proto.
8530 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
8532 * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_lock,
8533 lll_unlock_wake_cb, ___lll_timedwait_tid): Likewise.
8534 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (___lll_mutex_lock,
8535 ___lll_mutex_timedlock): Likewise.
8537 2003-06-04 Ulrich Drepper <drepper@redhat.com>
8539 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
8540 (__pthread_cond_signal): Add some code to eventually handle
8543 2003-06-01 Ulrich Drepper <drepper@redhat.com>
8545 * Makefile (tests): Add tst-exec4.
8546 (tst-exec4-ARGS): Define.
8547 * tst-exec4.c: New file.
8549 2003-05-31 Ulrich Drepper <drepper@redhat.com>
8551 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
8552 Also fail if tv_nsec < 0.
8553 (__lll_timedwait_tid): Likewise.
8554 * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
8555 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_timedwait_tid):
8557 * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_timedwait_tid):
8559 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (__lll_mutex_timedlock):
8561 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
8563 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_timedwait_tid):
8565 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_timedwait_tid):
8568 * Makefile (tests): Add tst-sem8 and tst-sem9.
8569 * tst-sem8.c: New file.
8570 * tst-sem9.c: New file.
8571 * sem_open.c: Fix creation of in_use record if the file exists but
8574 * posix-timer.h: Remove old, unused timer_id2ptr and timer_ptr2id
8577 * sysdeps/pthread/timer_create.c (timer_create): In case
8578 evp==NULL, assign timer ID to sival_ptr.
8580 * descr.h (struct pthread_unwind_buf): Change type of prev element to
8581 struct pthread_unwind_buf *.
8582 (struct pthread): Likewise for cleanup_jmp_buf element.
8584 * cleanup.c (__pthread_register_cancel): Add cast to avoid warning.
8585 * cleanup_defer.c (__pthread_register_cancel_defer): Likewise.
8586 * unwind.c (__pthread_unwind_next): Likewise.
8588 2003-05-30 Ulrich Drepper <drepper@redhat.com>
8590 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
8591 (lll_futex_timed_wait): Use int for futex value parameter.
8592 (lll_futex_wake): Likewise.
8593 (lll_futex_requeue): Likewise.
8595 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
8596 Replace one memory operation with one register operation.
8598 * tst-join4.c (do_test): Fix error message.
8600 * tst-rwlock6.c (do_test): Use correct format specifier.
8602 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
8603 (__lll_mutex_lock_wait): Replace one memory operation with one
8605 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S
8606 (__lll_mutex_lock_wait): Likewise.
8608 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
8609 (__lll_mutex_cond_lock): Add one to value parameter of
8610 __lll_lock_wait to reflect reality in the futex syscall.
8611 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
8612 (lll_mutex_cond_lock): Likewise.
8614 2003-05-30 Jakub Jelinek <jakub@redhat.com>
8616 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_cond_lock):
8618 (lll_mutex_cond_lock): Define.
8620 2003-05-29 Ulrich Drepper <drepper@redhat.com>
8622 * Makefile (tests): Add tst-signal6.
8623 * tst-signal6.c: New file.
8625 * sysdeps/unix/sysv/linux/s390/lowlevellock.h
8626 (__lll_mutex_unlock_force): New function
8627 (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
8629 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
8630 (__lll_mutex_unlock_force): New function.
8631 (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
8633 * tst-rwlock7.c (do_test): Use correct format specifier.
8635 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue):
8636 Find break parameter in correct asm argument.
8638 2003-05-27 Jakub Jelinek <jakub@redhat.com>
8640 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_clobbers):
8642 (lll_futex_requeue): Fix __o3 constraint, return negative errno if
8644 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
8646 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_REQUEUE,
8647 lll_futex_requeue, lll_mutex_unlock_force): Define.
8649 2003-05-30 Jakub Jelinek <jakub@redhat.com>
8651 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
8652 (pthread_cond_t): Add __mutex.
8653 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_REQUEUE,
8654 lll_futex_requeue, lll_mutex_unlock_force): Define.
8656 2003-05-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
8658 * sysdeps/sh/tcb-offsets.sym: Define MUTEX_FUTEX.
8659 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
8661 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (SYSCALL_WITH_INST_PAD):
8663 (lll_futex_wait, lll_futex_wake): Define.
8664 * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: New file.
8665 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Try using
8666 FUTEX_REQUEUE instead of FUTEX_WAIT.
8667 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
8668 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Remember
8669 mutex which was used in condvar structure. Call
8670 __pthread_mutex_cond_lock instead of __pthread_mutex_lock_internal.
8671 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
8673 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Don't
8674 include tcb-offsets.h. Read wakeup value in locked region.
8675 Use the value of gbr register as THREAD_ID.
8676 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
8677 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
8678 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
8680 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Remove futex related
8683 2003-05-28 Ulrich Drepper <drepper@redhat.com>
8685 * sysdeps/pthread/pthread_cond_broadcast.c
8686 (__pthread_cond_broadcast): Fix typo: MAX_INT -> INT_MAX.
8688 2003-05-26 Ulrich Drepper <drepper@redhat.com>
8690 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Fix
8691 typo in register name.
8692 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use parameters
8693 correctly. Actually use requeue. Little optimization.
8694 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Store
8695 mutex address early. Handle cancellation state as 32-bit value.
8696 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8697 Remove unnecessary label.
8699 2003-05-25 Ulrich Drepper <drepper@redhat.com>
8701 * sysdeps/pthread/pthread_cond_broadcast.c: Try using FUTEX_REQUEUE
8702 instead of FUTEX_WAIT.
8703 * sysdeps/pthread/pthread_cond_signal.c: Likewise.
8704 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
8705 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
8706 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
8707 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
8708 * sysdeps/pthread/pthread_cond_timedwait.c: Remember mutex which was
8709 used in condvar structure. Call __pthread_mutex_cond_lock instead
8710 of __pthread_mutex_lock_internal.
8711 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8712 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8713 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
8714 (__condvar_cleanup): Always call __pthread_mutex_cond_lock.
8715 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8716 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8717 * sysdeps/unix/sysv/linux/Makefile (libpthread-sysdep_routines):
8718 Add pthread_mutex_cond_lock.
8719 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add dep_mutex.
8720 * sysdeps/unix/sysv/linux/pthread_cond_mutex_lock.c: New file.
8721 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define
8722 lll_mutex_cond_lock.
8723 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
8724 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
8725 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
8727 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8728 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
8730 * sysdeps/i386/tcb-offsets.sym: Define MUTEX_FUTEX.
8731 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
8733 * pthreadP.h: Declare __pthread_mutex_cond_lock.
8734 * pthread_mutex_lock.c: Define LLL_MUTEX_LOCK if not already defined.
8735 Use it instead of lll_mutex_lock. If __pthread_mutex_lock is a
8736 macro don't define aliases.
8738 * cancellation.c: Remove __pthread_enable_asynccancel_2.
8739 * pthreadP.h: Remove declaration of __pthread_enable_asynccancel_2.
8740 * sysdeps/pthread/pthread_cond_timedwait.c: Use
8741 __pthread_enable_asynccancel instead of __pthread_enable_asynccancel_2.
8742 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8743 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8744 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
8745 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8746 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8748 2003-05-17 Ulrich Drepper <drepper@redhat.com>
8750 * sem_open.c: Fix one endless loop. Implement correct semantics
8751 wrt opening the same semaphore more then once.
8752 * sem_close.c: Adjust for sem_open change.
8753 * semaphoreP.h: Include <semaphore.h>. Define struct inuse_sem.
8754 Declare __sem_mappings, __sem_mappings_lock, __sem_search.
8755 * Makefile (tests): Add tst-sem7.
8756 * tst-sem7.c: New file.
8758 2003-05-16 Roland McGrath <roland@redhat.com>
8760 * sysdeps/unix/sysv/linux/register-atfork.c (libc_freeres_fn): Fix
8761 uninitialized variable braino.
8763 2003-05-16 Ulrich Drepper <drepper@redhat.com>
8765 * sysdeps/unix/sysv/linux/timer_gettime.c (timer_gettime): Correct
8766 test for syscall availability.
8768 * sysdeps/unix/sysv/linux/timer_settime.c (timer_settime): Set
8769 __no_posix_timers to -1 if the syscalls don't exist.
8771 * pthread_join.c (pthread_join): Set tid field of the joined
8772 thread to -1. This isn't necessary but helps to recognize some
8773 error conditions with almost no cost.
8775 * allocatestack.c (FREE_P): Also negative values indicate an
8778 * unwind.c: Include <unistd.h>.
8780 2003-05-14 Ulrich Drepper <drepper@redhat.com>
8782 * Makefile ($(objpfx)$(multidir)): Add rule to create the directory.
8784 2003-05-14 Jakub Jelinek <jakub@redhat.com>
8786 * Makefile (crti-objs, crtn-objs): New variables.
8787 (omit-deps, extra-objs): Add crtn.
8788 ($(objpfx)libpthread.so): Depend on both crti and crtn
8789 and links to them in multidir.
8790 ($(objpfx)crtn.S, $(objpfx)crtn.o): New rules.
8792 2003-05-12 Steven Munroe <sjmunroe@us.ibm.com>
8794 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
8795 (lll_mutex_unlock): Use atomic_exchange_rel.
8797 2003-05-11 Ulrich Drepper <drepper@redhat.com>
8799 * cond-perf.c (cons): Add missing locking around setting of alldone.
8801 2003-05-10 Ulrich Drepper <drepper@redhat.com>
8803 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Remove futex
8805 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
8807 2003-05-09 Ulrich Drepper <drepper@redhat.com>
8809 * tst-sem6.c: New file.
8810 * Makefile (tests): Add tst-sem6.
8812 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (___lll_mutex_unlock):
8813 Use atomic_exchange_rel instead of atomic_exchange.
8814 * sysdeps/unix/sysv/linux/lowlevellock.c (lll_unlock_wake_cb):
8817 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Improve quality of
8818 code for lll_futex_wait and lll_futex_wake in static apps. Use
8819 vsyscall is possible.
8821 * sysdeps/unix/sysv/linux/pthread_getaffinity.c: New file.
8822 * sysdeps/unix/sysv/linux/pthread_setaffinity.c: New file.
8823 * sysdeps/pthread/pthread.h: Declare pthread_getaffinity_np and
8824 pthread_setaffinity_np.
8825 * Versions [libpthread] (GLIBC_2.3.3): Add pthread_getaffinity_np
8826 and pthread_setaffinity_np.
8827 * Makefile (libpthread-routines): Add pthread_getaffinity and
8828 pthread_setaffinity.
8830 * allocatestack.c (allocate_stack): If ARCH_RETRY_MMAP is defined,
8831 use it in case mmap to allocate the stack fails.
8832 * sysdeps/unix/sysv/linux/x86_64/Makefile: Don't define
8833 ARCH_MAP_FLAGS here.
8834 * sysdeps/x86_64/pthreaddef.h: Define ARCH_MAP_FLAGS and
8837 2003-05-08 Ulrich Drepper <drepper@redhat.com>
8839 * sysdeps/unix/sysv/linux/fork.c: Complete rewrite of the atfork
8840 handler implementation. It is now lockless in fork().
8841 * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
8842 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
8843 * sysdeps/unix/sysv/linux/fork.h: Don't include <link.h>. Don't
8844 declare the __fork_*_lists.
8845 (struct fork_handler): Include pointers to all three functions.
8846 Add next, refcntr and need_signal elements.
8847 (__fork_handlers): New declaration.
8848 (__register_atfork_malloc): Remove declaration.
8849 (HAVE_register_atfork_malloc): Remove definition.
8850 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove
8851 __pthread_child_handler variable.
8852 (__libc_pthread_init): Use __register_atfork instead of explicitly
8854 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define lll_futex_wait
8856 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
8858 * unwind.c (unwind_cleanup): Print error message and then abort. This
8859 function must never be reached.
8861 * cond-perf.c: New file.
8863 2003-05-05 Ulrich Drepper <drepper@redhat.com>
8865 * sysdeps/i386/tls.h (TLS_INIT_TP): Include \n in error message.
8867 2003-05-04 Roland McGrath <roland@redhat.com>
8869 * Makefile ($(objpfx)../libc.so): New target.
8871 2003-05-02 Ulrich Drepper <drepper@redhat.com>
8873 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
8874 (pthread_condattr_t): Size is only an int, don't use long for
8876 (pthread_mutexattr_t): Likewise.
8877 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8878 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
8879 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
8881 2003-05-01 Ulrich Drepper <drepper@redhat.com>
8883 * sysdeps/i386/tls.h: Define THREAD_ID.
8884 * sysdeps/ia64/tls.h: Likewise.
8885 * sysdeps/powerpc/tls.h: Likewise.
8886 * sysdeps/s390/tls.h: Likewise.
8887 * sysdeps/sh/tls.h: Likewise.
8888 * sysdeps/x86_64/tls.h: Likewise.
8889 * pthread_mutex_lock.c: Use THREAD_ID instead of THREAD_SELF to
8891 * pthread_mutex_timedlock.c: Likewise.
8892 * pthread_mutex_trylock.c: Likewise.
8893 * pthread_mutex_unlock.c: Likewise.
8894 * pthread_rwlock_trywrlock.c: Likewise.
8895 * sysdeps/pthread/pthread_rwlocklock_rdlock.c: Likewise.
8896 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
8897 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
8898 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
8900 * sysdeps/pthread/createthread.c (create_thread): Use CLONE_SYSVSEM
8903 2003-04-29 Jakub Jelinek <jakub@redhat.com>
8905 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
8906 (__SIZEOF_PTHREAD_COND_T): Define to 48.
8907 (pthread_rwlock_t): Add 16 bytes of pad instead of 8 before __flags.
8908 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
8909 Make __align long long instead of long.
8910 (pthread_rwlock_t): Formatting.
8911 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
8912 (pthread_rwlock_t): Formatting.
8913 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
8914 (pthread_cond_t): Make __align long long instead of long.
8915 (pthread_rwlock_t): Move __flags field to the same position as in
8918 2003-04-30 Ulrich Drepper <drepper@redhat.com>
8920 * tst-rwlock6.c (do_test): Use correct printf format specifiers.
8921 * tst-rwlock7.c (do_test): Likewise.
8923 2003-04-26 Roland McGrath <roland@redhat.com>
8925 * Makefile ($(test-modules)): Depend on $(common-objpfx)shlib.lds.
8927 2003-04-22 Jakub Jelinek <jakub@redhat.com>
8929 * allocatestack.c (TLS_TPADJ): Add TLS_PRE_TCB_SIZE instead of
8930 sizeof (struct pthread).
8931 (allocate_stack): Subtract TLS_PRE_TCB_SIZE bytes instead of
8933 * sysdeps/powerpc/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Define
8935 (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Define to alignment of
8937 (TLS_PRE_TCB_SIZE): Increase to cover tcbhead_t preceeded by pad
8939 (INSTALL_DTV, GET_DTV, THREAD_DTV): tcbhead_t is immediately before
8941 (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Don't add TLS_TCB_SIZE
8943 (NO_TLS_OFFSET): Define.
8944 * sysdeps/unix/sysv/linux/powerpc/createthread.c (TLS_VALUE): Don't
8945 add TLS_TCB_SIZE unnecessarily.
8947 2003-04-22 Roland McGrath <roland@redhat.com>
8949 * Makeconfig (shared-thread-library): Reverse link order to work
8952 2003-04-22 Ulrich Drepper <drepper@redhat.com>
8954 * semaphore.h: Fix typo in comment.
8956 2003-04-21 Ulrich Drepper <drepper@redhat.com>
8958 * sysdeps/pthread/sigfillset.c: New file.
8960 * init.c (__pthread_initialize_minimal): Don't block SIGTIMER.
8961 * pthreadP.h: Make SIGTIMER and SIGCANCEL the same.
8962 * sysdeps/pthread/pthread_sigmask.c: Remove handling of SIGTIMER.
8963 * sysdeps/pthread/sigaction.c: Likewise.
8964 * sysdeps/pthread/sigprocmask.c: New file.
8965 * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): Define as
8967 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
8968 Block SIGTIMER. Also handle SI_TKILL events and terminate thread
8971 2003-04-19 Ulrich Drepper <drepper@redhat.com>
8973 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
8974 (DL_SYSINFO_IMPLEMENTATION): Add .eh_frame information.
8976 * sysdeps/unix/sysv/linux/unregister-atfork.c
8977 (__unregister_atfork): Don't free memory not allocated dynamically.
8979 * semaphore.h: Remove __THROW marker from cancellation points.
8980 * nptl/sysdeps/pthread/pthread.h: Likewise.
8982 2003-04-18 Ulrich Drepper <drepper@redhat.com>
8984 * sysdeps/pthread/pthread.h: Don't mark pthread_testcancel,
8985 pthread_cancel, pthread_setcancelstate, and pthread_setcanceltype with
8988 2003-04-16 Jakub Jelinek <jakub@redhat.com>
8990 * tst-cancel4.c (do_test): Use %zd instead of %d when printing cnt.
8992 2003-04-15 Roland McGrath <roland@redhat.com>
8994 * forward.c (__pthread_unwind): Tweak to avoid warning.
8996 2003-04-15 Ulrich Drepper <drepper@redhat.com>
8998 * pthreadP.h: Move THREAD_ATOMIC_* replacements to the top.
9000 2003-04-14 Ulrich Drepper <drepper@redhat.com>
9002 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Don't
9003 overflow CFA advance instructions.
9004 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
9006 2003-04-14 Jakub Jelinek <jakub@redhat.com>
9008 * sysdeps/i386/tls.h: Rename LOCK to LOCK_PREFIX.
9009 * sysdeps/i386/pthread_spin_lock.c: Likewise.
9010 * sysdeps/x86_64/tls.h: Likewise. Define LOCK_PREFIX if not already
9013 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Use
9014 DW_CFA_advance_loc2 for .Laddl-.Lsubl.
9015 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
9016 DW_CFA_advance_loc for .Laddl-.Lsubl.
9018 2003-04-13 Ulrich Drepper <drepper@redhat.com>
9020 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Don't use
9021 position-independent unwind data for static libraries.
9022 Add missing unwind info. Add comments.
9024 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Add unwind info.
9025 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
9026 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
9027 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9029 2003-04-12 Ulrich Drepper <drepper@redhat.com>
9031 * Makefile: Make sure all cancellation points are compiled with
9032 exception and asynchronous unwind tables.
9034 * sysdeps/x86_64/tls.h (THREAD_SETMEM): Word around compiler bug
9035 which mishandles loading of global object addresses in PIC.
9036 (THREAD_SETMEM_NC): Likewise.
9038 2003-04-11 Ulrich Drepper <drepper@redhat.com>
9040 * pthread.h: Define new data structure for cleanup buffer. Declare
9041 new cleanup handler interfaces.
9042 * descr.h: Include <unwind.h> if necessary. Define pthread_unwind_buf.
9043 (struct pthread): Add cleanup_jmp_buf pointer. Define
9044 HAVE_CLEANUP_JMP_BUF and not HAVE_CANCELBUF.
9045 * pthreadP.h: Declare __pthread_unwind. Define __do_cancel to use
9046 it. Declare old cleanup handler installation functions.
9047 * cleanup.c: Rewrite. Install handler for unwind-based cleanup
9049 * cleanup_defer.c: Likewise.
9050 * cleanup_compat.c: New file. Old cleanup code.
9051 * cleanup_def_compat.c: New file. Old cleanup code.
9052 * pthread_create.c (start_thread): Initialize cleanup_jmp_buf element
9053 if own thread descriptor.
9054 * unwind.c: New file.
9055 * forward.c: Add __pthread_unwind.
9056 * init.c (pthread_functions): Add __pthread_unwind.
9057 * sysdeps/pthread/pthread-functions.s (struct pthread_functions):
9058 Add ptr___pthread_unwind.
9059 * Versions [GLIBC_2.3.3] (libpthread): Export new cleanup handling
9060 and unwind function.
9061 * Makefile (libpthread-routines): Add cleanup_compat,
9062 cleanup_def_compat, and unwind. Define CFLAGS to enable unwind
9063 table generation if necessary.
9064 * version.c: Record whether unwind support is compiled in.
9065 * sysdeps/pthread/configure.in: Add checks for unwind unterfaces.
9066 * sysdeps/pthread/bits/libc-lock.h: Add prototypes of the old cleanup
9068 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add quite a bit of
9069 complication to generate unwind information for syscall wrappers.
9070 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
9071 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
9072 __cleanup_fct_attribute.
9074 * Makefile: Add rules to build and run tst-cleanup0.
9075 * tst-cleanup0.c: New file.
9076 * tst-cleanup0.expect: New file.
9078 * pthread_create.c (deallocate_tsd): Don't take parameter. Adjust
9079 caller. Optimize to avoid often unecessary local variable.
9081 2003-04-11 Roland McGrath <roland@redhat.com>
9083 * Makefile ($(objpfx)multidir.mk): New target, generated makefile that
9084 sets variable `multidir'; include that.
9085 (generated): Add it.
9086 ($(objpfx)$(multidir)/crti.o): New target.
9087 [$(multidir) != .] (generated-dirs, extra-objs, omit-deps): Add it.
9089 2003-04-11 Ulrich Drepper <drepper@redhat.com>
9091 * tst-attr2.c (do_test): Add cast to avoid warning.
9092 * tst-mutex4.c (do_test): Likewise.
9094 2003-04-10 Ulrich Drepper <drepper@redhat.com>
9096 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset CPU clocks
9099 2003-04-09 Ulrich Drepper <drepper@redhat.com>
9101 * Makefile (tests): Add tst-detach1.
9102 * tst-detach1.c: New file.
9104 2003-04-08 Ulrich Drepper <drepper@redhat.com>
9106 * sysdeps/pthread/pthread.h: Remove duplicate
9107 pthread_cleanup_{push,pop} definitions.
9109 * tst-barrier2.c: Eliminate warnings.
9110 * tst-cancel4.c: Likewise.
9111 * tst-cond4.c: Likewise.
9112 * tst-cond6.c: Likewise.
9113 * tst-detach1.c: Likewise.
9114 * tst-rwlock4.c: Likewise.
9115 * tst-rwlock6.c: Likewise.
9116 * tst-rwlock7.c: Likewise.
9117 * tst-sem3.c: Likewise.
9118 * tst-spin2.c: Likewise.
9119 * tst-umask1.c: Likewise.
9121 2003-04-07 Ulrich Drepper <drepper@redhat.com>
9123 * pthread_detach.c (pthread_detach): Fix test for invalid TID.
9125 2003-04-06 Ulrich Drepper <drepper@redhat.com>
9127 * descr.h (struct pthread): Move cancelhandling member to the front.
9129 2003-04-05 Ulrich Drepper <drepper@redhat.com>
9131 * sysdeps/unix/sysv/linux/register-atfork.c: Define malloc_prepare,
9132 malloc_parent, and malloc_child statically.
9133 (__register_atfork_malloc): New function.
9134 (free_mem): Don't free any of the malloc_* variables on the list.
9135 * sysdeps/unix/sysv/linux/fork.h: Declare __register_atfork_malloc.
9136 Define HAVE_register_atfork_malloc.
9138 2003-04-04 Ulrich Drepper <drepper@redhat.com>
9140 * sysdeps/pthread/createthread.c (create_thread): Add some more
9141 comments explaining when to set multiple_threads and when not.
9143 * pthreadP.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
9144 THREAD_ATOMIC_BIT_SET if not already defined.
9145 * sysdeps/i386/tls.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
9146 THREAD_ATOMIC_BIT_SET:
9147 * sysdeps/x86_64/tls.h: Likewise.
9148 * cleanup_defer.c (_pthread_cleanup_push_defer): Rewrite to use
9149 THREAD_ATOMIC_CMPXCHG_VAL.
9150 (_pthread_cleanup_pop_restore): Likewise.
9151 * cancellation.c (__pthread_enable_asynccancel): Likewise.
9152 (__pthread_enable_asynccancel_2): Likewise.
9153 (__pthread_disable_asynccancel): Likewise.
9154 * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
9155 (__libc_disable_asynccancel): Likewise.
9156 * init.c (sigcancel_handler): Likewise.
9157 * pthread_setcancelstate.c (__pthread_setcancelstate): Likewise.
9158 * pthread_setcanceltype.c (__pthread_setcanceltype): Likewise.
9160 2003-04-03 Ulrich Drepper <drepper@redhat.com>
9162 * init.c (sigcancel_handler): Don't set EXITING_BIT here.
9163 * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
9164 * pthreadP.h (__do_cancel): Set EXITING_BIT here.
9165 * Makefile (tests): Add tst-cancel11.
9166 * tst-cancel11.c: New file.
9168 2003-04-01 Ulrich Drepper <drepper@redhat.com>
9170 * pthread_create.c (deallocate_tsd): Clear/free memory after the last
9171 round, not the first. Use specific_used flag instead of local
9172 found_nonzero variable. Use THREAD_[SG]ETMEM where possible.
9173 (__free_tcb): Don't call deallocate_tsd here.
9174 (start_thread): Call deallocate_tsd here.
9175 * pthread_setspecific.c: Set specific_used flag really only when
9177 * Makefile (tests): Add tst-tsd3.c and tst-tsd4.
9178 * tst-tsd3.c: New file.
9179 * tst-tsd4.c: New file.
9181 2003-03-31 Ulrich Drepper <drepper@redhat.com>
9183 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_mutex_lock):
9184 Use atomic_exchange_and_add instead of __lll_add.
9185 (__lll_mutex_timedlock): Likewise.
9186 Patch by Ian Wienand.
9188 2003-03-24 Steven Munroe <sjmunroe@us.ibm.com>
9190 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
9191 (SINGLE_THREAD_P): Fix typo.
9192 * tst-cancel-wrappers.sh: Handle '.'ed symbols.
9194 2003-03-31 Ulrich Drepper <drepper@redhat.com>
9196 * Makefile (tests): Add tst-align.
9197 * tst-align.c: New file.
9198 * sysdeps/i386/Makefile: Define CFLAGS-tst-align.
9200 * sysdeps/i386/tls.h (CALL_THREAD_FCT): Align stack of called
9203 * tst-tsd2.c: Add casts to avoid warnings.
9205 2003-03-30 Ulrich Drepper <drepper@redhat.com>
9207 * descr.h (struct pthread): Move most often used elements to the front.
9209 2003-03-29 Ulrich Drepper <drepper@redhat.com>
9211 * Makefile (libpthread-routines): Add pthread_atfork.
9212 (libpthread-static-only-routines): Add pthread_atfork.
9214 2003-03-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
9216 * sysdeps/sh/tls.h: Include nptl/descr.h after the definition
9218 (INSTALL_DTV): Add parens.
9219 (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
9220 Use passed descr instead of THREAD_SELF.
9221 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S
9222 (__lll_mutex_timedlock_wait): Correct expected value after
9224 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S:
9225 Release lock before waking up the waiters.
9226 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Correct exit
9227 criteria. Reorderstruct passed to cleanup handler. Fix
9228 handling of cancellation and failung pthread_mutex_unlock call.
9229 Use __pthread_enable_asynccancel_2 instead of
9230 __pthread_enable_asynccancel.
9231 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
9232 Return result of lock re-get if it fails.
9233 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Fix wrong argument
9234 for __pthread_cleanup_push.
9235 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Fix
9236 completely broken rwlock implementation.
9237 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
9238 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
9239 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
9240 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
9241 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
9242 * sysdeps/unix/sysv/linux/sh/sem_post.S: Fix error value. Use
9243 versioned_symbol macro.
9244 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Use versioned_symbol macro.
9245 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
9247 2003-03-27 Ulrich Drepper <drepper@redhat.com>
9249 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Don't declare
9250 __timer_helper_thread. Declare __start_helper_thread, __helper_once,
9252 (struct timer): Remove th and bar field.
9253 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Remove
9254 debugging code. Create only one helper thread.
9255 * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Don't kill
9257 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
9258 Renamed. Define statically. Use thread info from siginfo.
9259 (__helper_once): New variable.
9260 (__helper_tid): New variable.
9261 (__reset_helper_control): New function.
9262 (__start_helper_thread): New function.
9264 * pthread_create.c (start_thread): Don't use setjmp inside
9265 __builtin_expect to work around gcc bug.
9267 * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Even if
9268 timer_delete syscall fails, but not with ENOSYS, set
9271 * sysdeps/unix/sysv/linux/timer_settime.c [!__ASSUME_POSIX_TIMERS]
9272 (timer_settime): Fix typo.
9273 * sysdeps/unix/sysv/linux/timer_getoverr.c
9274 [!__ASSUME_POSIX_TIMERS] (timer_getoverrun): Likewise.
9276 2003-03-27 Jakub Jelinek <jakub@redhat.com>
9278 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Fix
9279 offset of cleanupbuf.__prev.
9281 2003-03-26 Jakub Jelinek <jakub@redhat.com>
9283 * sysdeps/unix/sysv/linux/timer_getoverr.c: Fix typo in name
9286 2003-03-26 Ulrich Drepper <drepper@redhat.com>
9288 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): If EVP ==
9289 NULL provide default definition to syscall.
9291 2003-03-25 Roland McGrath <roland@redhat.com>
9293 * sysdeps/pthread/posix-timer.h (TIMER_MAX): Define if not defined.
9294 (timer_id2ptr): Fix typo.
9296 2003-03-25 Ulrich Drepper <drepper@redhat.com>
9298 * pthreadP.h: Define SIGCANCEL and SIGTIMER.
9299 * sysdeps/i386/pthreaddef.h: Remove SIGCANCEL definition.
9300 * sysdeps/ia64/pthreaddef.h: Likewise.
9301 * sysdeps/powerpc/pthreaddef.h: Likewise.
9302 * sysdeps/s390/pthreaddef.h: Likewise.
9303 * sysdeps/sh/pthreaddef.h: Likewise.
9304 * sysdeps/x86_64/pthreaddef.h: Likewise.
9305 * init.c (__pthread_initialize_minimal): Block SIGTIMER.
9306 * sysdeps/pthread/sigaction.c: Also prevent SIGTIMER handler from
9308 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
9309 SIGTIMER is not unblocked.
9310 * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): One more
9312 * sysdeps/unix/sysv/linux/pthread_kill.c: Do not allow SIGTIMER to
9314 * sysdeps/pthread/posix-timer.h (timer_id2ptr, timer_ptr2id): Just
9315 pass pointer through as ID.
9316 * sysdeps/unix/sysv/linux/bits/local_lim.h (TIMER_MAX): Removed.
9317 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: New file.
9318 * sysdeps/unix/sysv/linux/timer_create.c: New file.
9319 * sysdeps/unix/sysv/linux/timer_delete.c: New file.
9320 * sysdeps/unix/sysv/linux/timer_getoverr.c: New file.
9321 * sysdeps/unix/sysv/linux/timer_gettime.c: New file.
9322 * sysdeps/unix/sysv/linux/timer_routines.c: New file.
9323 * sysdeps/unix/sysv/linux/timer_settime.c: New file.
9324 * sysdeps/unix/sysv/linux/ia64/Versions: New file.
9325 * sysdeps/unix/sysv/linux/ia64/timer_create.c: New file.
9326 * sysdeps/unix/sysv/linux/ia64/timer_delete.c: New file.
9327 * sysdeps/unix/sysv/linux/ia64/timer_getoverr.c: New file.
9328 * sysdeps/unix/sysv/linux/ia64/timer_gettime.c: New file.
9329 * sysdeps/unix/sysv/linux/ia64/timer_settime.c: New file.
9330 * sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions: New file.
9331 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_create.c: New file.
9332 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_delete.c: New file.
9333 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_getoverr.c: New file.
9334 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_gettime.c: New file.
9335 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_settime.c: New file.
9336 * sysdeps/unix/sysv/linux/s390/s390-64/Versions: New file.
9337 * sysdeps/unix/sysv/linux/s390/s390-64/timer_create.c: New file.
9338 * sysdeps/unix/sysv/linux/s390/s390-64/timer_delete.c: New file.
9339 * sysdeps/unix/sysv/linux/s390/s390-64/timer_getoverr.c: New file.
9340 * sysdeps/unix/sysv/linux/s390/s390-64/timer_gettime.c: New file.
9341 * sysdeps/unix/sysv/linux/s390/s390-64/timer_settime.c: New file.
9342 * sysdeps/unix/sysv/linux/x86_64/Versions: New file.
9343 * sysdeps/unix/sysv/linux/x86_64/compat-timer.h: New file.
9344 * sysdeps/unix/sysv/linux/x86_64/timer_create.c: New file.
9345 * sysdeps/unix/sysv/linux/x86_64/timer_delete.c: New file.
9346 * sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c: New file.
9347 * sysdeps/unix/sysv/linux/x86_64/timer_gettime.c: New file.
9348 * sysdeps/unix/sysv/linux/x86_64/timer_settime.c: New file.
9350 * pthreadP.h: Remove FRAME_LEFT definition.
9351 * cleanup.c (_pthread_cleanup_push): Don't check for reference to
9352 already left frame. Programs which have this problem are not POSIX
9354 * cleanup_defer.c (_pthread_cleanup_push_defer): Likewise.
9356 2003-03-24 Ulrich Drepper <drepper@redhat.com>
9358 * sysdeps/pthread/tst-timer.c: Check return values of the
9361 2003-03-23 Roland McGrath <roland@redhat.com>
9363 * tst-tls3.c (do_test) [! HAVE___THREAD]: Don't test anything.
9364 * tst-tls3mod.c: Likewise.
9365 * tst-tls1.c: Likewise.
9366 * tst-tls2.c: Likewise.
9368 * tst-mutex5.c (do_test): Unlock before destroy, otherwise we invoke
9371 * tst-join5.c (tf1, tf2): Add a cast.
9373 * Makeconfig (includes): Append -I$(..)nptl to this variable.
9375 * tst-barrier2.c (do_test) [! _POSIX_THREAD_PROCESS_SHARED]:
9376 Don't test anything.
9377 * tst-cond4.c: Likewise.
9378 * tst-cond6.c: Likewise.
9379 * tst-flock2.c: Likewise.
9380 * tst-mutex4.c: Likewise.
9381 * tst-rwlock4.c: Likewise.
9382 * tst-signal1.c: Likewise.
9383 * tst-spin2.c: Likewise.
9384 * tst-cond11.c [! _POSIX_CLOCK_SELECTION]: Likewise.
9386 * tst-mutex4.c: Use test-skeleton.c.
9387 * tst-spin2.c: Likewise.
9388 * tst-sysconf.c: Likewise.
9389 * tst-barrier2.c: Likewise.
9390 * tst-cond4.c: Likewise.
9391 * tst-cond6.c: Likewise.
9392 * tst-rwlock4.c: Likewise.
9393 * tst-unload.c: Likewise.
9394 * tst-flock2.c (do_test): Use return instead of exit.
9396 2003-03-22 Jakub Jelinek <jakub@redhat.com>
9398 * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
9400 2003-03-21 Ulrich Drepper <drepper@redhat.com>
9402 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
9403 (__lll_mutex_trylock): Use atomic_compare_and_exchange_val_acq
9404 instead of __lll_compare_and_swap.
9405 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
9407 Removed definition if __lll_compare_and_swap.
9409 * cancellation.c: Adjust for new form of compare&exchange macros.
9410 * cleanup_defer.c: Likewise.
9412 * libc-cancellation.c: Likewise.
9413 * old_pthread_cond_broadcast.c: Likewise.
9414 * old_pthread_cond_signal.c: Likewise.
9415 * old_pthread_cond_timedwait.c: Likewise.
9416 * old_pthread_cond_wait.c: Likewise.
9417 * pthread_cancel.c: Likewise.
9418 * pthread_create.c: Likewise.
9419 * pthread_detach.c: Likewise.
9420 * pthread_join.c: Likewise.
9421 * pthread_key_delete.c: Likewise.
9422 * pthread_setcancelstate.c: Likewise.
9423 * pthread_setcanceltype.c: Likewise.
9424 * pthread_timedjoin.c: Likewise.
9425 * pthread_tryjoin.c: Likewise.
9426 * sysdeps/pthread/createthread.c: Likewise.
9428 2003-03-20 Ulrich Drepper <drepper@redhat.com>
9430 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Include <atomic.h>.
9431 Remove __lll_add, __lll_dec_if_positive, and __lll_test_and_set
9432 definitions. Replace uses with calls to atomic_* functions.
9433 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
9434 * sysdeps/unix/sysv/linux/lowlevellock.c: Replace __lll_add and
9435 __lll_test_and_set calls with atomic_exchange_and_add and
9436 atomic_exchange calls respectively.
9437 * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
9438 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
9439 * sysdeps/unix/sysv/linux/sem_trywait.c: Likewise.
9440 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
9441 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Likewise.
9442 * sysdeps/unix/sysv/linux/ia64/sem_port.c: Likewise.
9443 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
9445 * allocatestack.c (allocate_stack): Assume atomic_exchange_and_add
9446 returns the old value.
9448 2003-03-20 Martin Schwidefsky <sky@mschwid3.boeblingen.de.ibm.com>
9450 * sysdeps/s390/pthread_spin_lock.c (pthread_spin_lock): Use type
9451 int for variable OLDVAL and correct inline assembler contraint.
9452 * sysdeps/s390/pthread_spin_trylock.c (pthread_spin_trylock): Use
9453 type int for variable OLD.
9455 * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it
9457 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
9458 (SINGLE_THREAD_P): Use global variable __local_multiple_threads
9459 instead of multiple_threads field in the TCB.
9461 2003-03-19 Ulrich Drepper <drepper@redhat.com>
9463 * sysdeps/i386/i686/bits/atomic.h: Removed.
9464 * sysdeps/i386/i586/bits/atomic.h: Removed.
9465 * sysdeps/i386/i486/bits/atomic.h: Removed. Moved to glibc.
9466 * sysdeps/x86_64/bits/atomic.h: Removed. Moved to glibc.
9467 * sysdeps/s390/bits/atomic.h: Removed. Moved to glibc.
9468 * sysdeps/sh/bits/atomic.h: Removed. Moved to glibc.
9469 * sysdeps/ia64/bits/atomic.h: Removed. Moved to glibc.
9470 * sysdeps/powerpc/bits/atomic.h: Removed. Moved to glibc.
9471 * atomic.h: Removed. Moved to glibc.
9473 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Add
9474 support for clock selection.
9476 * sysdeps/pthread/pthread_cond_broadcast.c: Release lock before
9479 2003-03-18 Roland McGrath <roland@redhat.com>
9481 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
9482 Add __lll_rel_instr first. Add memory clobber.
9483 (lll_mutex_unlock): Use __lll_test_and_set.
9484 From Paul Mackerras <paulus@samba.org>.
9486 * sysdeps/powerpc/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define
9488 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
9489 (SINGLE_THREAD_P): Add `header.' prefix.
9490 From Paul Mackerras <paulus@samba.org>.
9492 * Versions (libpthread: GLIBC_2.3.2): Move pthread_tryjoin_np and
9493 pthread_timedjoin_np to ...
9494 (libpthread: GLIBC_2.3.3): ... here.
9495 (libpthread: GLIBC_2.2): Move pthread_barrierattr_getpshared there too.
9497 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
9498 Avoid shadowing VAL variable.
9500 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
9503 2003-03-18 Ulrich Drepper <drepper@redhat.com>
9505 * Makefile (tests): Add tst-cond11.
9506 * tst-cond11.c: New file.
9508 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Reorder
9509 struct passed to cleanup handler to eliminate one more
9511 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9513 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
9514 (pthrad_cond_t): Replace __unused field with __clock.
9516 * sysdeps/pthread/pthread_cond_wait.c: Release condvar lock before
9517 waken all waiters in cleanup handler.
9518 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
9519 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
9521 * pthread_condattr_getclock.c: New file.
9522 * pthread_condattr_setclock.c: New file.
9523 * sysdeps/pthread/pthread.h: Declare these new functions.
9524 * Versions [GLIBC_2.3.3] (libpthread): Add the new functions.
9525 * Makefile (libpthread-routines): Add the new functions.
9526 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_condattr):
9527 Renamed field to value. Document use of the bits.
9528 * pthread_condattr_getpshared.c: Adjust for struct pthread_condattr
9530 * pthread_condattr_setpshared.c: Likewise.
9531 * pthread_cond_init.c (__pthread_cond_init): Initialized __clock field.
9532 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add cond_clock symbol.
9533 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
9535 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
9536 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
9537 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
9538 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
9539 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
9540 Implement clock selection.
9541 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
9542 * pthread-errnos.sym: Add ENOSYS.
9543 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
9544 _POSIX_CLOCK_SELECTION.
9545 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
9547 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Remove
9548 invalid .size directive.
9550 2003-03-17 Roland McGrath <roland@redhat.com>
9552 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
9555 2003-03-17 Ulrich Drepper <drepper@redhat.com>
9557 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Use __builtin_expect.
9558 Use __lll_add instead of spelling it out. Use protected symbol names.
9559 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Use __builtin_expect.
9561 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_compare_and_swap):
9562 Renamed from lll_compare_and_swap. Use new name where necessary.
9563 (__lll_add): Defined.
9564 (__lll_dec_if_positive): Defined.
9565 (__lll_test_and_set): Defined.
9566 * sysdeps/ia64/pthread_spin_init.c: Removed.
9567 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Removed.
9568 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Removed.
9569 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Removed.
9570 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Removed.
9571 * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: Removed.
9572 * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: Removed.
9573 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Removed.
9574 * sysdeps/ia64/bits/atomic.h: Add __builtin_expect where appropriate.
9575 * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
9576 __sync_lock_release_si.
9577 Patch by Jakub Jelinek.
9579 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
9580 Fix timeout handling.
9581 (__lll_timedwait_tid): Likewise.
9582 (lll_unlock_wake_cb): Wake up other waiters if necessary.
9583 Patch by Jakub Jelinek.
9585 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Pretty printing.
9587 2003-03-17 Roland McGrath <roland@redhat.com>
9589 PowerPC port contributed by Paul Mackerras <paulus@samba.org>.
9590 * sysdeps/pthread/pthread_spin_init.c: New file.
9591 * sysdeps/pthread/pthread_spin_unlock.c: New file.
9592 * sysdeps/powerpc/Makefile: New file.
9593 * sysdeps/powerpc/pthread_spin_lock.c: New file.
9594 * sysdeps/powerpc/pthread_spin_trylock.c: New file.
9595 * sysdeps/powerpc/pthreaddef.h: New file.
9596 * sysdeps/powerpc/tcb-offsets.sym: New file.
9597 * sysdeps/powerpc/td_ta_map_lwp2thr.c: New file.
9598 * sysdeps/powerpc/tls.h: New file.
9599 * sysdeps/powerpc/bits/atomic.h: New file.
9600 * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: New file.
9601 * sysdeps/unix/sysv/linux/libc-lowlevellock.c: New file.
9602 * sysdeps/unix/sysv/linux/lowlevellock.c: New file.
9604 * sysdeps/unix/sysv/linux/lowlevelmutex.c: New file.
9605 * sysdeps/unix/sysv/linux/sem_post.c: New file.
9606 * sysdeps/unix/sysv/linux/sem_timedwait.c: New file.
9607 * sysdeps/unix/sysv/linux/sem_trywait.c: New file.
9608 * sysdeps/unix/sysv/linux/sem_wait.c: New file.
9609 * sysdeps/unix/sysv/linux/powerpc/Makefile: New file.
9610 * sysdeps/unix/sysv/linux/powerpc/createthread.c: New file.
9611 * sysdeps/unix/sysv/linux/powerpc/fork.c: New file.
9612 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: New file.
9613 * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: New file.
9614 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: New file.
9615 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: New file.
9616 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: New file.
9617 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
9618 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New file.
9620 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Use __gettimeofday,
9622 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Likewise.
9623 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
9624 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Likewise.
9625 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Likewise.
9626 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
9628 2003-03-17 Ulrich Drepper <drepper@redhat.com>
9630 * sysdeps/pthread/pthread_cond_wait.c: Correct exit criteria.
9631 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
9632 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9633 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
9634 Patch by Ewald Snel <ewald@rambo.its.tudelft.nl>.
9636 2003-03-16 Roland McGrath <roland@redhat.com>
9638 * tst-fork4.c: Include <string.h>.
9639 * tst-signal2.c: Likewise.
9640 * tst-mutex5.c (do_test): exit -> return.
9641 * tst-mutex2.c: Include <stdlib.h>.
9643 2003-03-16 Ulrich Drepper <drepper@redhat.com>
9645 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
9646 (__lll_mutex_timedlock_wait): Correct expected value after
9647 spurious wakeup. Otherwise we would never wait again.
9649 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Work around red
9650 zone versus inline asm stupidity. Use correct instructions.
9652 * tst-rwlock6.c: Add some more status output.
9654 2003-03-15 Roland McGrath <roland@redhat.com>
9656 * sysdeps/pthread/configure.in: New file.
9657 * sysdeps/pthread/configure: New file (generated).
9659 2003-03-15 Ulrich Drepper <drepper@redhat.com>
9661 * allocatestack.c (allocate_stack): Store the exact stack size of
9662 user allocated stacks.
9664 2003-03-15 Jakub Jelinek <jakub@redhat.com>
9666 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
9667 (SINGLE_THREAD): Use `header' prefix instead of `header.data'.
9668 * sysdeps/sh/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
9669 * sysdeps/sh/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define.
9670 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
9671 Use `header.' prefix.
9672 * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
9674 2003-03-15 Ulrich Drepper <drepper@redhat.com>
9676 * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Don't use
9677 __builtin_frame_address, use stack pointer.
9679 * sysdeps/unix/sysv/linux/jmp-unwind.c: Use CURRENT_STACK_FRAME
9680 instead of __builtin_frame_pointer.
9682 2003-03-14 Ulrich Drepper <drepper@redhat.com>
9684 * tst-basic1.c (do_test): Add cast to avoid warning.
9685 * tst-basic2.c (do_test): Likewise.
9687 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use correct
9688 amount of stack correction.
9690 * tst-fork4.c: Use test-skeleton.c.
9692 2003-03-14 Roland McGrath <roland@redhat.com>
9694 * init.c: Fix typo "#eli" for "#else".
9696 2003-03-14 Steven Munroe <sjmunroe@us.ibm.com>
9698 * allocatestack.c (__stack_user): Use hidden_data_def.
9699 * pthread_create.c (__pthread_keys): Likewise.
9701 * init.c [__powerpc__] (__NR_set_tid_address): Define it.
9703 2003-03-14 Roland McGrath <roland@redhat.com>
9705 * tst-fork4.c: New file.
9706 * Makefile (tests): Add it.
9708 * descr.h (struct pthread): Move the union out of [!TLS_DTV_AT_TP], so
9709 we always define the padding space.
9710 [!TLS_DTV_AT_TP]: Give tcbhead_t field a name, `header', since GCC
9711 stopped supporting its own extensions fully.
9712 [TLS_MULTIPLE_THREADS_IN_TCB]: Put `multiple_threads' inside a wrapper
9713 struct also called `header', so `header.multiple_threads' is the field
9714 name to use on all machines.
9715 * allocatestack.c (allocate_stack): Use `header.' prefix.
9716 * sysdeps/pthread/createthread.c (create_thread): Likewise.
9717 * pthread_create.c (__pthread_create_2_1): Likewise.
9718 * sysdeps/i386/tls.h (INSTALL_NEW_DTV, THREAD_DTV): Likewise.
9719 (THREAD_SELF): Likewise.
9720 * sysdeps/x86_64/tls.h: Likewise.
9721 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
9722 (SINGLE_THREAD_P): Likewise.
9723 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
9724 (SINGLE_THREAD_P): Likewise.
9725 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
9726 (SINGLE_THREAD_P): Likewise.
9728 * sysdeps/s390/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Use REGS[18]
9731 2003-03-14 Ulrich Drepper <drepper@redhat.com>
9733 * pthread_create.c (start_thread): Use CALL_THREAD_FCT if defined.
9734 * sysdeps/i386/tls.h: Define CALL_THREAD_FCT.
9736 * pthread_create.c (start_thread): setjmp is expected to return 0.
9738 * sysdeps/x86_64/tls.h (THREAD_GETMEM): Mark asms volatile.
9739 (THREAD_GETMEM_NC): Likewise.
9741 2003-03-13 Ulrich Drepper <drepper@redhat.com>
9743 * allocatestack.c (allocate_stack): If MULTI_PAGE_ALIASING is defined
9744 and the size of the stack which must be allocated is a multiple,
9745 allocate one more page.
9746 * sysdeps/i386/i686/Makefile: Don't define COLORING_INCREMENT, but
9747 MULTI_PAGE_ALIASING.
9749 2003-03-13 Roland McGrath <roland@redhat.com>
9751 * pthread_create.c (start_thread): Set EXITING_BIT after the
9752 event-reporting (and destructors), not before.
9754 2003-03-13 Jakub Jelinek <jakub@redhat.com>
9756 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_timed_wait,
9757 lll_futex_wake): Declare register variables as long int instead of
9758 unsigned long int. Patch by Ian Wienand <ianw@gelato.unsw.edu.au>.
9759 Make syscall arguments clobbered by the syscall.
9760 (lll_futex_wait): Define using lll_futex_timed_wait.
9762 * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Cast regs[13]
9765 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Only declare and set
9768 * allocatestack.c (nptl_ncreated): Only declare if
9769 COLORING_INCREMENT != 0.
9771 * pthreadP.h (__pthread_enable_asynccancel_2): New prototype.
9772 (__libc_enable_asynccancel_2): Remove prototype.
9774 * sysdeps/unix/sysv/linux/ia64/fork.c (ARCH_FORK): Swap ptid and
9775 ctid to match kernel.
9777 2003-03-12 Ulrich Drepper <drepper@redhat.com>
9779 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add
9780 libc_multiple_threads.
9781 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Move definition of
9782 __libc_multiple_threads to...
9783 * sysdeps/unix/sysv/linux/libc_multiple_threads.c: ...here. New file.
9785 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Remove unnecessary
9787 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
9788 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
9790 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
9791 (__pthread_once_internal): Define.
9793 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Use shlib-compat.h
9794 macros instead of .symver directly.
9795 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
9796 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
9798 * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Include tcb-offsets.h.
9799 * sysdeps/x86_64/tcb-offsets.sym: New file.
9800 * sysdeps/x86_64/Makefile: New file.
9802 * sysdeps/i386/tcb-offsets.sym: Add SELF.
9803 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use SELF
9804 to access own pthread_t in TCB.
9805 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
9807 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
9809 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
9811 2003-03-12 Roland McGrath <roland@redhat.com>
9813 * pthread-errnos.sym: New file.
9814 * Makefile (gen-as-const-headers): New variable, list that file.
9815 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include generated
9816 header <pthread-errnos.h> instead of defining errno values here.
9817 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
9818 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
9819 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
9820 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
9821 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
9823 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
9825 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
9826 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9827 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
9828 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
9829 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
9830 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
9831 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
9832 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
9833 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
9834 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
9835 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
9836 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
9837 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
9838 * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
9839 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
9840 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
9841 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
9842 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
9843 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
9844 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
9845 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
9846 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
9847 * sysdeps/i386/i486/pthread_spin_trylock.S: Likewise.
9848 * sysdeps/x86_64/pthread_spin_trylock.S: Likewise.
9849 * sysdeps/sh/pthread_spin_trylock.S: Likewise.
9850 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
9851 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
9853 * sysdeps/unix/sysv/linux/fork.c: Add an assert to check that
9854 CLONE_CHILD_SETTID worked.
9856 2003-03-12 Ulrich Drepper <drepper@redhat.com>
9858 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: New
9860 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S: New
9863 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
9864 (pthread_cond_t): Add padding.
9866 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: New file.
9867 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: New file.
9868 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: New file.
9870 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
9871 (__pthread_rwlock_timedwrlock): Add missing opcode suffix.
9872 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
9873 (__pthread_rwlock_timedrdlock): Likewise.
9874 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
9875 (__pthread_rwlock_wrlock): Likewise.
9876 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
9877 (__pthread_rwlock_rdlock): Likewise.
9879 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: New file.
9881 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Return
9882 result of lock re-get if it fails.
9884 2003-03-11 Ulrich Drepper <drepper@redhat.com>
9886 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Fix asm syntax.
9887 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
9888 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
9889 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
9890 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
9891 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
9892 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
9893 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
9894 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
9895 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
9897 * sysdeps/x86_64/tls.h (THREAD_SELF, THREAD_GETMEM, THREAD_GETMEM_NC,
9898 THREAD_SETMEM, THREAD_SETMEM_NC): Correct asm syntax.
9900 * allocatestack.c [! TLS_MULTIPLE_THREADS_IN_TCB] (allocate_stack):
9901 Initialize *__libc_multiple_threads_ptr not __libc_multiple_threads.
9902 * sysdeps/pthread/createthread.c [! TLS_MULTIPLE_THREADS_IN_TCB]
9903 (create_thread): Likewise.
9904 Define __pthread_multiple_threads and __libc_multiple_threads_ptr.
9905 * init.c (__pthread_initialize_minimal_internal): Initialize
9906 __libc_multiple_threads_ptr if necessary.
9907 * pthreadP.h: Adjust prototype for __libc_pthread_init. Declare
9908 __pthread_multiple_threads and __libc_multiple_threads_ptr.
9909 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Define
9910 __libc_multiple_threads.
9911 (__libc_pthread_init): Return pointer to __libc_pthread_init if
9914 * sysdeps/i386/tls.h (THREAD_SETMEM): Fix one-byte variant.
9915 (THREAD_SETMEM_NC): Likewise.
9917 * sysdeps/x86_64/pthread_spin_trylock.c: Removed.
9918 * sysdeps/x86_64/pthread_spin_trylock.S: New file.
9919 * sysdeps/x86_64/pthread_spin_unlock.c: Removed.
9920 * sysdeps/x86_64/pthread_spin_unlock.S: New file.
9922 * sysdeps/i386/i486/pthread_spin_trylock.S (pthread_spin_trylock):
9923 Eliminate one entire instruction.
9925 * cancellation.c (__pthread_enable_asynccancel_2): New function.
9926 * pthreadP.h: Declare __pthread_enable_asynccancel_2.
9927 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
9928 (__pthread_cond_timedwait): Use __pthread_enable_asynccancel_2
9929 instead of __pthread_enable_asynccancel.
9930 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
9931 (__pthread_cond_wait): Likewise.
9932 * sysdeps/pthread/pthread_cond_timedwait.c
9933 (__pthread_cond_timedwait): Likewise.
9934 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
9936 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
9937 (__condvar_cleanup): Wake up all waiters in case we got signaled
9938 after being woken up but before disabling asynchronous
9940 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
9941 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
9942 (__condvar_cleanup): Likewise.
9944 * init.c (__NR_set_tid_address): If already defined, don't redefine.
9945 Make it an error if architecture has no #if case. Add x86-64.
9947 * sysdeps/unix/sysv/linux/x86_64/Makefile: Add flags for
9948 pt-initfini.s generation.
9950 * sysdeps/x86_64/tls.h: Include <asm/prctl.h>.
9951 (TLS_INIT_TP): Fix typo.
9953 2003-03-11 Jakub Jelinek <jakub@redhat.com>
9955 * sysdeps/ia64/bits/atomic.h (atomic_exchange_and_add): Swap 2nd and
9956 3rd argument of __arch_compare_and_exchange_{32,64}_val_acq.
9958 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Include semaphore.h.
9959 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
9960 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Likewise.
9961 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Likewise.
9962 * sysdeps/unix/sysv/linux/s390/sem_post.c: Likewise.
9963 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
9964 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
9965 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
9967 2003-03-11 Ulrich Drepper <drepper@redhat.com>
9969 * sysdeps/pthread/pthread_cond_timedwait.c
9970 (__pthread_cond_timedwait): Return the result of the final
9971 locking. If it succeeds, the regular function return value.
9973 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait):
9974 Return result of the final locking.
9975 * version.c (__nptl_main): Work around problems with the strange
9976 INTERNAL_SYSCALL macro on ppc32.
9977 * init.c (__pthread_initialize_minimal_internal): Unblock
9978 SIGCANCEL in case the parent blocked it.
9979 Reported by Paul Mackerras <paulus@samba.org>.
9981 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: New file.
9982 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: New file.
9983 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: New file.
9985 2003-03-11 Jakub Jelinek <jakub@redhat.com>
9987 * sysdeps/pthread/pthread_cond_timedwait.c
9988 (__pthread_cond_timedwait): Unlock and fail if
9989 __pthread_mutex_unlock_internal failed.
9991 * sysdeps/pthread/createthread.c (ARCH_CLONE): Define if not defined.
9992 (create_thread): Only assert PD->tcb != NULL under [TLS_TCB_AT_TP].
9994 * allocatestack.c (ALLOCATE_STACK_PARMS): New macro.
9995 [NEED_SEPARATE_REGISTER_STACK] (STACK_VARIABLES,
9996 STACK_VARIABLES_ARGS, STACK_VARIABLES_PARMS, ALLOCATE_STACK_PARMS,
9997 ALLOCATE_STACK): New macros.
9998 (TLS_TPADJ): New macro.
9999 (get_cached_stack, queue_stack, __deallocate_stack): Use TLS_TPADJ.
10000 (allocate_stack): Handle TLS_DTV_AT_TP and
10001 NEED_SEPARATE_REGISTER_STACK. Use TLS_TPADJ.
10002 * pthread_create.c (__pthread_create_2_1) [! TLS_TCB_AT_TP]:
10003 Don't set PD->self.
10004 * init.c [__ia64__] (__NR_set_tid_address): Define.
10006 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: New file.
10007 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: New file.
10008 * sysdeps/unix/sysv/linux/ia64/fork.c: New file.
10009 * sysdeps/unix/sysv/linux/ia64/createthread.c: New file.
10010 * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: New file.
10011 * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: New file.
10012 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: New file.
10013 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: New file.
10014 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: New file.
10015 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
10016 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: New file.
10017 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: New file.
10018 * sysdeps/unix/sysv/linux/ia64/sem_post.c: New file.
10019 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: New file.
10020 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: New file.
10021 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: New file.
10022 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
10023 * sysdeps/ia64/bits/atomic.h: New file.
10024 * sysdeps/ia64/Makefile: New file.
10025 * sysdeps/ia64/pthread_spin_init.c: New file.
10026 * sysdeps/ia64/pthread_spin_lock.c: New file.
10027 * sysdeps/ia64/pthread_spin_trylock.c: New file.
10028 * sysdeps/ia64/pthread_spin_unlock.c: New file.
10029 * sysdeps/ia64/pthreaddef.h: New file.
10030 * sysdeps/ia64/tcb-offsets.sym: New file.
10031 * sysdeps/ia64/td_ta_map_lwp2thr.c: New file.
10032 * sysdeps/ia64/tls.h: New file.
10034 * sysdeps/s390/pthreaddef.h (__exit_thread_inline): Pass 1 argument
10035 to syscall instead of no arguments.
10037 2003-03-10 Ulrich Drepper <drepper@redhat.com>
10039 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: New file.
10040 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: New file.
10041 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: New file.
10042 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: New file.
10044 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Fix error value in
10047 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: New file
10049 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
10050 lowlevelbarrier.sym.
10051 * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: New file.
10052 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S:
10053 Include lowlevelbarrier.h and don't define offsets locally.
10054 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Likewise.
10056 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
10057 (__lll_mutex_lock_wait): Reverse order of first two parameters.
10058 (__lll_mutex_timedlock_wait): Likewise.
10059 (lll_mutex_lock): Adjust asm for that.
10060 (lll_mutex_timedlock): Likewise. Mark cx, cc, r10 as clobbered.
10061 (lll_lock): Adjust asm for operand order change.
10062 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: New file.
10063 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: New file.
10065 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_lock_wait):
10066 Reverse order of parameters.
10067 (__lll_timedwait_tid): Remove regparms attribute.
10068 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: New file.
10069 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: New file.
10071 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
10072 (__lll_timedwait_tid): Remove one unnecessary instruction.
10074 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Define
10075 __lll_mutex_timedlock_wait only for NOT_IN_libc.
10076 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Include
10079 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
10080 lll_unlock_wake_cb, __lll_wait_tid, and __lll_timedwait_tid only
10082 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Include
10085 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Don't define
10086 LOCK is already defined. Don't define __lll_mutex_timedlock_wait
10088 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Only
10089 define LOCK here (if UP is not defined). The actual code is in
10092 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Don't define
10093 LOCK is already defined. Don't define lll_unlock_wake_cb and
10094 __lll_timedwait_tid for libc.so.
10095 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Only
10096 define LOCK here (if UP is not defined). The actual code is in
10099 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Not needed anymore.
10100 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: Likewise.
10101 * sysdeps/unix/sysv/linux/s390/sem_post.c: Include lowlevellock.h
10102 instead of lowlevelsem.h.
10103 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
10104 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
10105 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
10107 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
10108 lowlevelrwlock.sym.
10109 * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: New file.
10110 * sysdeps/unix/sysv/linux/i386/lowlevelrwlock.h: Removed.
10111 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: Removed.
10113 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_trylock): Fix
10115 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_trylock): Undo
10116 last changed. D'oh.
10118 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: New file.
10120 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove declaration
10121 of __libc_locking_needed.
10122 (lll_trylock): Initialize %eax to zero.
10124 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Update
10125 pthread_cond_t definition.
10127 2003-03-10 Roland McGrath <roland@redhat.com>
10129 * sysdeps/unix/sysv/linux/lowlevelcond.sym: New file.
10130 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add it.
10131 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: File removed.
10132 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: Likewise.
10133 * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: Likewise.
10135 * allocatestack.c (allocate_stack) [!TLS_MULTIPLE_THREADS_IN_TCB]:
10136 Instead of setting PD->multiple_threads, set globals
10137 __pthread_multiple_threads and __libc_multiple_threads.
10138 * sysdeps/pthread/createthread.c (create_thread): Likewise.
10139 * sysdeps/i386/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it.
10140 * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Likewise.
10142 * descr.h (struct pthread): Conditionalize first member on
10143 [!TLS_DTV_AT_TP]. Replace the `header' member with an anonymous union
10144 containing an anonymous tcbhead_t. Move `list' member out.
10145 [TLS_MULTIPLE_THREADS_IN_TCB]: Define a `multiple_threads' member.
10146 * allocatestack.c: Remove use of `header.data.' prefix.
10147 * pthread_create.c: Likewise.
10148 * init.c (__pthread_initialize_minimal_internal): Likewise.
10149 * sysdeps/pthread/createthread.c (create_thread): Likewise.
10150 * sysdeps/i386/tls.h (INSTALL_DTV): Add parens.
10151 (THREAD_SELF, THREAD_DTV, INSTALL_NEW_DTV): No `header.data.' prefix.
10152 * sysdeps/x86_64/tls.h: Likewise.
10153 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
10154 (SINGLE_THREAD_P): Likewise.
10155 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
10156 (SINGLE_THREAD_P): Likewise.
10157 * sysdeps/i386/tls.h (tcbhead_t): Remove `list' member.
10158 * sysdeps/s390/tls.h (tcbhead_t): Likewise.
10160 2003-03-09 Ulrich Drepper <drepper@redhat.com>
10162 * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: New file.
10164 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
10165 * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
10167 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix many
10168 leftovers from the ia32 code.
10170 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Remove unneccessary
10172 (clear_once_control): Don't load %esi.
10174 * sysdeps/x86_64/tls.h: Remove all traces of segment descriptor
10177 * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
10179 * sysdeps/unix/sysv/linux/s390/createthread.c: Moved to...
10180 * sysdeps/unix/sysv/linux/createthread.c: ...here.
10182 * Makefile (tests): Add tst-cond10.
10183 * tst-cond10.c: New file.
10185 2003-03-08 Ulrich Drepper <drepper@redhat.com>
10187 * tst-tls2.c (do_test): Add TEMP_FAILURE_RETRY around sem_wait call.
10188 * tst-signal3.c (do_test): Likewise.
10189 * tst-sem5.c (do_test): Likewise.
10190 * tst-kill6.c (do_test): Likewise.
10191 * tst-tls3.c (do_test): Likewise. Include <errno.h>.
10193 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use add/sub instead
10195 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
10196 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise
10197 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
10198 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
10199 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
10200 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
10201 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
10203 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
10205 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
10206 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
10207 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10208 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
10209 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
10210 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
10211 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
10212 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
10214 * allocatestack.c (allocate_stack): If mprotect() fails free the
10217 2003-03-07 Ulrich Drepper <drepper@redhat.com>
10219 * sysdeps/i386/i486/bits/atomic.h: Fix a few unused definitions.
10221 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove all trace of
10222 lll_wake_tid. This was used only to work around kernel limits in
10224 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
10225 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Likewise.
10226 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
10227 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
10229 * init.c (__static_tls_align_m1): Renamed from __static_tls_align.
10230 (__pthread_initialize_minimal_internal): Change initialization of
10231 __static_tls_align_m1 appropriately.
10232 * pthreadP.h (__static_tls_align_m1): Renamed from
10233 __static_tls_align.
10234 * allocatestack.c (allocate_stack): Use __static_tls_align_m1
10235 instead of __static_tls_align-1.
10237 2003-03-04 Ulrich Drepper <drepper@redhat.com>
10239 * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
10241 * pthread_create.c: Define __pthread_keys using nocommon
10242 attribute, not by placing it explicitly in bss.
10243 Remove DEFINE_DEALLOC definition. Not needed anymore.
10245 * allocatestack.c: Define ARCH_MAP_FLAGS if not already defined.
10246 Use it in mmap call to allocate stacks.
10248 * sysdeps/pthread/createthread.c (create_thread): Fix comment.
10250 * pthread_create.c (start_thread): Use THREAD_SETMEM to store
10251 result of the thread function.
10253 2003-03-03 Ulrich Drepper <drepper@redhat.com>
10255 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: Removed. The generic
10256 version is just fine.
10258 * sysdeps/unix/sysv/linux/libc_pthread_init.c
10259 (__pthread_child_handler): Renamed from pthread_child_handler,
10260 exported, and marked hidden. Change all users.
10261 * sysdeps/unix/sysv/linux/register-atfork.c (free_mem): Do not
10262 free __pthread_child_handler from child list.
10264 2003-03-03 Martin Schwidefsky <schwidefsky@de.ibm.com>
10266 * atomic.h (atomic_exchange_and_add): Return newval, not oldval.
10268 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
10269 Fix handling of cancellation and failing pthread_mutex_unlock call.
10270 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
10271 (__pthread_cond_wait): Likewise.
10273 * sysdeps/pthread/pthread_rwlock_timedrdlock.c
10274 (pthread_rwlock_timedrdlock): Fix clobber of result variable by
10275 lll_futex_timed_wait call.
10276 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
10277 (pthread_rwlock_timedwrlock): Likewise.
10279 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
10280 Don't define lll_unlock_wake_cb and ___lll_timedwait_tid in libc.so.
10281 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Remove XXX comments.
10283 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Fix
10284 check of lll_futex_wake return value.
10286 2003-03-03 Roland McGrath <roland@redhat.com>
10288 * forward.c: Fix typo in __pthread_attr_init_2_0 compat_symbol decl.
10290 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
10291 Argument to ptr___pthread_cleanup_upto is __jmp_buf, not jmp_buf.
10292 * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
10294 2003-03-02 Ulrich Drepper <drepper@redhat.com>
10296 * sysdeps/pthread/timer_create.c (timer_create): Return correct
10297 error for CPU clocks.
10299 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
10300 _POSIX_MONOTONIC_CLOCK.
10301 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
10303 * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
10306 2003-03-01 Ulrich Drepper <drepper@redhat.com>
10308 * descr.h (struct pthread): Move cleanup field to the front.
10310 2003-03-01 Roland McGrath <roland@redhat.com>
10312 * sem_open.c (sem_open): Braino fix.
10314 2003-03-01 Ulrich Drepper <drepper@redhat.com>
10316 * sysdeps/i386/tcb-offsets.sym: Add CLEANUP and CLEANUP_PREV.
10317 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Inline
10318 __pthread_cleanup_pop functionality.
10319 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10321 * descr.h (struct pthread): Move tid field to the front now that
10324 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S
10325 (__lll_mutex_timedlock_wait): Remove.
10326 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
10327 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
10328 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
10329 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
10330 (lll_unlock_wake_cb): Don't save and restore %esi.
10331 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
10333 (__lll_timedwait_tid): Add alignment.
10334 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
10335 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
10337 (__lll_timedwait_tid): Removed.
10338 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
10339 (__pthread_cond_broadcast): Don't save, load, and restore %esi.
10340 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
10341 (pthread_barrier_wait): Don't save, load, and restore %esi for
10343 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
10344 (__pthread_cond_signal): Don't save, load, and restore %esi.
10345 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
10346 (__pthread_rwlock_unlock): Don't save, load, and restore %esi.
10347 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
10348 Don't save, load, and restore %esi.
10350 2003-02-27 Ulrich Drepper <drepper@redhat.com>
10352 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
10353 Release lock before waking up the waiters.
10355 * tst-exit1.c (do_test): Don't start more than one thread in parallel.
10357 * tst-rwlock9.c (writer_thread): Correct adding TIMEOUT.
10358 (reader_thread): Likewise.
10360 * sysdeps/pthread/pthread_rwlock_unlock.c
10361 (__pthread_rwlock_unlock): Release internal lock early. Don't try
10362 to wake up readers if there are none.
10364 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
10365 Release internal lock before wake threads.
10367 2003-02-26 Ulrich Drepper <drepper@redhat.com>
10369 * Makefile (tests): Add tst-rwlock10 and tst-rwlock11.
10370 * tst-rwlock8.c: Initialize lock with INIT. Allow INIT to be
10372 * tst-rwlock9.c: Likewise.
10373 * tst-rwlock10.c: New file.
10374 * tst-rwlock11.c: New file.
10376 * Makefile (tests): Add tst-dlsym1.
10377 * tst-dlsym1.c: New file.
10379 * init.c (__pthread_initialize_minimal_internal): Set
10380 GL(dl_error_catch_tsd) to __libc_dl_error_tsd.
10381 * Versions (libc:GLIBC_PRIVATE): Export __libc_dl_error_tsd.
10383 2003-02-24 Ulrich Drepper <drepper@redhat.com>
10385 * sem_open.c (sem_open): Fix handling of O_CREAT without O_EXCL.
10387 * tst-cond2.c: Fix sychronization with child.
10389 * tst-rwlock8.c (reader_thread): Remove unused variable.
10391 * Makefile: Add rules to build and run tst-tls3.
10392 * tst-tls3.c: New file.
10393 * tst-tls3mod.c: New file.
10395 * Makefile (tests): Add tst-rwlock8 and tst-rwlock9.
10396 * tst-rwlock8.c: New file.
10397 * tst-rwlock9.c: New file.
10398 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Fix
10399 complete broken rwlock implementation.
10400 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
10402 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
10404 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
10405 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
10406 * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
10407 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
10408 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
10409 * sysdeps/pthread/pthread_rwlock_unlock.c: Likewise.
10410 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
10412 2003-02-23 Roland McGrath <roland@redhat.com>
10414 * Makefile (nptl-version): Change regexp so case sensitivity is ok.
10416 2003-02-23 Ulrich Drepper <drepper@redhat.com>
10418 * Makefile (tests): Add tst-context1.
10419 * tst-context1.c: New file.
10421 * Makefile (tests): Add tst-tls1 and tst-tls2.
10422 * tst-tls1.c: New file.
10423 * tst-tls2.c: New file.
10425 * libc-cancellation.c (__libc_enable_asynccancel): Correct test
10426 for failed cmpxchg.
10428 * pthread_create.c (start_thread): Set EXITING_BIT early.
10430 * sysdeps/i386/tls.h (THREAD_GETMEM): Mark asm as volatile.
10431 (THREAD_GETMEM_NC): Likewise.
10433 2003-02-22 Ulrich Drepper <drepper@redhat.com>
10435 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Shave
10436 off 3 more bytes by using offset-less instructions when possible.
10438 * Makefile: Add dependency for $(objpfx)version.d.
10440 * eintr.c (eintr_source): Add unnecessary return but the compiler
10443 * tst-kill3.c: Include <unistd.h>.
10445 2003-02-21 Roland McGrath <roland@redhat.com>
10447 * pthread_create.c (start_thread): Call __libc_thread_freeres.
10449 2003-02-21 Ulrich Drepper <drepper@redhat.com>
10451 * Makefile (tests): Add tst-eintr1.
10452 (distribute): Add eintr.c.
10453 * tst-eintr1.c: New file.
10454 * eintr.c: New file.
10456 * pthread_cancel.c (pthread_cancel): Use tkill directly.
10458 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill):
10459 Disallow sending SIGCANCEL.
10461 * Makefile (tests): Remove tst-basic7. Add tst-kill1, tst-kill2,
10462 tst-kill3, tst-kill4, tst-kill5, tst-kill6.
10463 * tst-kill1.c: New file.
10464 * tst-kill2.c: New file.
10465 * tst-kill3.c: New file.
10466 * tst-kill5.c: New file.
10467 * tst-kill6.c: New file.
10468 * tst-basic7.c: Renamed to...
10469 * tst-kill4.c: ...this.
10471 2003-02-21 Roland McGrath <roland@redhat.com>
10473 * Makefile (install-lib-ldscripts): New variable.
10475 2003-02-21 Ulrich Drepper <drepper@redhat.com>
10477 * pthreadP.h: Define INVALID_TD_P and INVALID_NOT_TERMINATED_TD_P.
10478 * pthread_cancel.c: Use INVALID_TD_P.
10479 * pthread_detach.c: Likewise.
10480 * pthread_getschedparam.c: Likewise.
10481 * pthread_setschedparam.c: Likewise.
10482 * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
10483 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
10484 * pthread_join.c: Use INVALID_NOT_TERMINATED_TD_P.
10485 * pthread_timedjoin.c: Likewise.
10487 * tst-basic7.c: Include <signal.h>.
10489 * pthread_join.c (pthread_join): Limited checking for invalid
10491 * pthread_timedjoin.c (pthread_timedjoin_np): Likewise.
10493 2003-02-20 Ulrich Drepper <drepper@redhat.com>
10495 * pthread_create.c (deallocate_tsd): Reset found_nonzero at the
10496 beginning of the loop. Clear the entire first block of TSD.
10497 * Makefile (tests): Add tst-key4.
10498 * tst-key4.c: New file.
10500 2003-02-18 Ulrich Drepper <drepper@redhat.com>
10502 * Makefile (tests): Add tst-basic7.
10503 * tst-basic7.c: New file.
10505 * pthread_create.c (deallocate_tsd): Mark as internal_function.
10506 Add some more __builtin_expect.
10508 * pthreadP.h: Define dummy version of DEBUGGING_P.
10510 2003-02-17 Ulrich Drepper <drepper@redhat.com>
10512 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remnove
10513 _POSIX_THREAD_PRIORITY_SCHEDULING.
10514 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
10515 _XOPEN_REALTIME_THREADS.
10516 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
10518 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): The
10519 kernel returns EINVAL for PID <= 0, work around it.
10521 * Makefile (tests): Add tst-signal5.
10522 * tst-signal5.c: New file.
10524 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
10525 and LOGIN_NAME_MAX.
10527 * tst-cancel1.c (tf): Block all signals.
10529 * Makefile (tests): Add tst-basic6.
10530 * tst-basic6.c: New file.
10532 * tst-basic1.c: Add test for process ID.
10534 * Makefile (tests): Add tst-cancel10.
10535 * tst-cancel10.c: New file.
10537 * Makefile (tests): Add tst-signal4.
10538 * tst-signal4.c: New file.
10540 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use
10541 __sigismember instead of sigismember. Add __builtin_expect.
10543 2003-02-16 Ulrich Drepper <drepper@redhat.com>
10545 * tst-attr1.c (do_test): Add tests for pthread_setcanceltype,
10546 pthread_setcancelstate, and pthread_rwlock_setpshared.
10548 * tst-cancel7.c (do_test): Make sure the pid file exists before
10549 canceling the thread.
10551 * tst-rwlock6.c: More pthread_rwlock_timedwrlock and
10552 pthread_rwlock_timedrdlock tests.
10553 * tst-rwlock7.c: More pthread_rwlock_timedwrlock tests.
10554 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
10555 Check for invalid tv_nsec field.
10556 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
10559 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Protect
10560 recursive mutex of overflow.
10562 * tst-attr1.c (do_test): Add test for pthread_mutexattr_setpshared.
10564 * libc-cancellation.c (__libc_enable_asynccancel): Rewrite to avoid
10565 going into an endless loop.
10566 * Makefile (tests): Add tst-cancel9.
10567 * tst-cancel9.c: New file.
10569 * pthread_cancel.c (pthread_cancel): Use the result of __pthread_kill.
10571 2003-02-15 Ulrich Drepper <drepper@redhat.com>
10573 * tst-mutex5.c (do_test): Add more timedlock tests.
10575 * tst-mutex2.c: Tests of trylock and unlock with ERROR mutexes.
10576 * tst-mutex3.c (do_test): Add tests for trylock with RECURSIVE mutexes.
10578 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
10579 use INLINE_SYSCALL. Error number is returned, not -1.
10581 * pthreadP.h: Mark declarations of __find_in_stack_list, __free_tcb,
10582 and __deallocate_stack with internal_function.
10583 * pthread_create.c: Adjust definitions appropriately.
10584 * allocatestack.c: Likewise.
10586 * pthread_join.c: Add one more __builtin_expect.
10587 * pthread_timedjoin.c: Likewise.
10589 * pthread_getspecific.c (__pthread_getspecific): Clear data->data
10590 not data of sequence number does not match.
10591 Add one __builtin_expect.
10593 * Makefile (tests): Add tst-clock1.
10594 * tst-clock1.c: New file.
10596 * pthread_setconcurrency.c (pthread_setconcurrency): Fail for
10597 negative arguments.
10598 * Makefile (tests): Add tst-basic5.
10599 * tst-basic5.c: New file.
10601 2003-02-14 Ulrich Drepper <drepper@redhat.com>
10603 * Makefile (tests): Add tst-basic4.
10604 * tst-basic4.c: New file.
10606 * pthreadP.h: Add declaraction for __nptl_nthreads.
10607 * pthread_create.c: Define __nptl_nthreads
10608 (start_thread): Increment __nptl_nthreads at beginning. Decrement
10609 after thread is done. If then zero, call exit(0).
10610 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
10611 Add ptr_nthreads. Define HAVE_PTR_NTHREADS.
10612 * init.c (pthread_functions): Initialize ptr_nthreads.
10613 * allocatestack.c (nptl_nthreads): Remove definition and all uses.
10614 (__reclaim_stacks): Decrement __nptl_nthreads.
10615 * sysdeps/pthread/Makefile [$(subdir)==csu] (CFLAGS-libc-start.c):
10617 * Makefile (tests): Add tst-basic3.
10618 * tst-basic3.c: New file.
10620 * descr.h: Define CANCELING_BIT and CANCELING_BITMASK. Introduce
10621 after CANCELTYPE_BIT, move the other bits up. Update CANCEL_RESTMASK.
10622 * init.c (sigcancel_handler): Also set CANCELING_BITMASK bit in newval.
10623 * pthread_cancel.c (pthread_cancel): Likewise. Also set CANCELING_BIT
10624 if asynchronous canceling is enabled.
10625 * pthread_join.c (pthread_join): When recognizing circular joins,
10626 take into account the other thread might be already canceled.
10627 * Makefile (tests): Add tst-join5.
10628 * tst-join5.c: New file.
10630 * Makefile (tests): Add tst-join4.
10631 * tst-join4.c: New file.
10633 2003-02-13 Ulrich Drepper <drepper@redhat.com>
10635 * tst-cond4.c (main): Add test of pthread_attr_getpshared.
10637 2003-02-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
10639 * sysdeps/s390/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM,
10640 THREAD_SETMEM_NC): Use passed descr instead of THREAD_SELF.
10641 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind): Avoid
10643 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Include <sys/time.h>
10645 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Return
10646 error if lll_futex_wake failed.
10648 2003-02-13 Ulrich Drepper <drepper@redhat.com>
10650 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Fix
10651 handling of cancellation and failung pthread_mutex_unlock call.
10652 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10653 * Makefile (tests): Add tst-cond8 and tst-cond9.
10654 * tst-cond8.c: New file.
10655 * tst-cond9.c: New file.
10657 * tst-cond7.c (do_test): Unlock the mutex before canceling the thread.
10659 * sysdeps/pthread/pthread.h: Add missing initializers. Protect
10660 non-standard initializers with __USE_GNU.
10662 * Makefile (tests): Add tst-cleanup3.
10663 * tst-cleanup3.c: New file.
10665 2003-02-12 Ulrich Drepper <drepper@redhat.com>
10667 * Makefile (tests): Add tst-attr1 and tst-attr2.
10668 * tst-attr1.c: New file.
10669 * tst-attr2.c: New file.
10671 * Makefile: Add rules to build and run tst-atfork2 test.
10672 * tst-atfork2.c: New file.
10673 * tst-atfork2mod.c: New file.
10675 * sysdeps/unix/sysv/linux/unregister-atfork.c
10676 (__unregister_atfork): Free the memory allocated for the handlers
10677 after removing them from the lists.
10679 * sysdeps/unix/sysv/linux/register-atfork.c: Define memeory
10682 * tst-atfork1.c (do_test): Wait for the child we forked.
10683 Report error in child.
10685 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Fix comment.
10687 * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
10689 2003-02-10 Ulrich Drepper <drepper@redhat.com>
10691 * Makefile (tests): Add tst-cancel8.
10692 * tst-cancel8.c: New file.
10694 * sysdeps/unix/sysv/linux/i386/pthread_once.S (clear_once_control): Fix
10695 clearing of control variable.
10696 * Makefile (tests): Add tst-once3 and tst-once4.
10697 * tst-once3.c: New file.
10698 * tst-once4.c: New file.
10700 2003-02-08 kaz Kojima <kkojima@rr.iij4u.or.jp>
10702 * sysdeps/sh/Makefile: New file.
10703 * sysdeps/sh/bits/atomic.h: New file.
10704 * sysdeps/sh/pthread_spin_init.c: New file.
10705 * sysdeps/sh/pthread_spin_lock.c: New file.
10706 * sysdeps/sh/pthread_spin_trylock.S: New file.
10707 * sysdeps/sh/pthread_spin_unlock.S: New file.
10708 * sysdeps/sh/pthreaddef.h: New file.
10709 * sysdeps/sh/tcb-offsets.sym: New file.
10710 * sysdeps/sh/td_ta_map_lwp2thr.c: New file.
10711 * sysdeps/sh/tls.h: New file.
10712 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: New file.
10713 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: New file.
10714 * sysdeps/unix/sysv/linux/sh/createthread.c: New file.
10715 * sysdeps/unix/sysv/linux/sh/fork.c: New file.
10716 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: New file.
10717 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: New file.
10718 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h: New file.
10719 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: New file.
10720 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: New file.
10721 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: New file.
10722 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: New file.
10723 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: New file.
10724 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
10725 * sysdeps/unix/sysv/linux/sh/pt-vfork.S: New file.
10726 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: New file.
10727 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: New file.
10728 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: New file.
10729 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: New file.
10730 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: New file.
10731 * sysdeps/unix/sysv/linux/sh/pthread_once.S: New file.
10732 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: New file.
10733 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: New file.
10734 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: New file.
10735 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: New file.
10736 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: New file.
10737 * sysdeps/unix/sysv/linux/sh/sem_post.S: New file.
10738 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: New file.
10739 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: New file.
10740 * sysdeps/unix/sysv/linux/sh/sem_wait.S: New file.
10741 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
10743 2003-02-08 Ulrich Drepper <drepper@redhat.com>
10745 * tst-cond2.c: Rearrange code to not rely on behavior undefined
10746 according to POSIX.
10748 * tst-basic2.c (do_test): Lock mutex before creating the thread.
10750 2003-02-07 Ulrich Drepper <drepper@redhat.com>
10752 * sysdeps/x86_64/tls.h: Remove unnecessary macros, left over from x86.
10753 (TLS_GET_FS): New #define.
10754 (TLS_SET_FS): New #define.
10755 Correct value of __NR_set_thread_area.
10757 * sysdeps/x86_64/td_ta_map_lwp2thr.c: New file.
10759 2003-02-06 Ulrich Drepper <drepper@redhat.com>
10761 * Makefile (tests): Add tst-popen1.
10762 * tst-popen1.c: New file.
10764 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Remove wrong
10765 but inactive generalization.
10766 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10767 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
10768 Minor optimization, remove one instruction.
10769 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
10771 2003-02-04 Martin Schwidefsky <schwidefsky@de.ibm.com>
10773 * sysdeps/unix/sysv/linux/s390/fork.c: Correct order of parameters.
10775 2003-01-31 Martin Schwidefsky <schwidefsky@de.ibm.com>
10777 * init.c (__NR_set_tid_address): Add #ifdef for s390.
10778 * sysdeps/pthread/pthread_barrier_wait.c: New file.
10779 * sysdeps/pthread/pthread_cond_broadcast.c: New file.
10780 * sysdeps/pthread/pthread_cond_signal.c: New file.
10781 * sysdeps/pthread/pthread_cond_timedwait.c: New file.
10782 * sysdeps/pthread/pthread_cond_wait.c: New file.
10783 * sysdeps/pthread/pthread_rwlock_rdlock.c: New file.
10784 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: New file.
10785 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: New file.
10786 * sysdeps/pthread/pthread_rwlock_unlock.c: New file.
10787 * sysdeps/pthread/pthread_rwlock_wrlock.c: New file.
10788 * sysdeps/s390/Makefile: New file.
10789 * sysdeps/s390/bits/atomic.h: New file.
10790 * sysdeps/s390/pthread_spin_init.c: New file.
10791 * sysdeps/s390/pthread_spin_lock.c: New file.
10792 * sysdeps/s390/pthread_spin_trylock.c: New file.
10793 * sysdeps/s390/pthread_spin_unlock.c: New file.
10794 * sysdeps/s390/pthreaddef.h: New file.
10795 * sysdeps/s390/tcb-offsets.sym: New file.
10796 * sysdeps/s390/td_ta_map_lwp2thr.c: New file.
10797 * sysdeps/s390/tls.h: New file.
10798 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: New file.
10799 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: New file.
10800 * sysdeps/unix/sysv/linux/s390/createthread.c: New file.
10801 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: New file.
10802 * sysdeps/unix/sysv/linux/s390/fork.c: New file.
10803 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: New file.
10804 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
10805 * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: New file.
10806 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: New file.
10807 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: New file.
10808 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: New file.
10809 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: New file.
10810 * sysdeps/unix/sysv/linux/s390/pthread_once.c: New file.
10811 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: New file.
10812 * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: New file.
10813 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
10814 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
10815 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: New file.
10816 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
10817 * sysdeps/unix/sysv/linux/s390/sem_post.c: New file.
10818 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: New file.
10819 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
10820 * sysdeps/unix/sysv/linux/s390/sem_wait.c: New file.
10822 2003-02-04 Ulrich Drepper <drepper@redhat.com>
10824 * atomic.h: Add a couple more default implementations.
10825 (atomic_compare_and_exchange_acq): Use
10826 __arch_compare_and_exchange_32_acq in return value definition. It
10828 (atomic_bit_set): Renamed from atomic_set_bit.
10829 Add missing atomic_ prefixes.
10831 * sysdeps/pthread/bits/libc-lock.h (__libc_once): In case no
10832 thread library is available, use correct value to mark initialized
10835 2003-02-03 Ulrich Drepper <drepper@redhat.com>
10837 * allocatestack.c (allocate_stack): Use __getpagesize instead of
10838 __sysconf to determine pagesize.
10840 * pthread_create.c: Include <atomic.h>.
10841 * allocatestack.c (allocate_stack): Implement coloring of the
10842 allocated stack memory. Rename pagesize to pagesize_m1. It's the
10843 size minus one. Adjust users.
10844 * sysdeps/i386/i686/Makefile: New file.
10846 2003-02-02 Ulrich Drepper <drepper@redhat.com>
10848 * allocatestack.c: Improve comment throughout the file.
10850 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
10851 (__lll_lock_wait): Add branch prediction.
10852 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
10853 (__lll_lock_wait): Likewise.
10854 (lll_unlock_wake_cb): Removed.
10856 2003-01-31 Ulrich Drepper <drepper@redhat.com>
10858 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Remove
10859 _POSIX_THREAD_PRIORITY_SCHEDULING.
10861 2003-01-30 Jakub Jelinek <jakub@redhat.com>
10863 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
10864 Fix return type of ptr___pthread_getspecific.
10866 2003-01-29 Ulrich Drepper <drepper@redhat.com>
10868 * Makefile (tests): Add tst-umask1.
10869 (tst-umask1-ARGS): Define.
10870 * tst-umask1.c: New file.
10872 2003-01-28 Ulrich Drepper <drepper@redhat.com>
10874 * Makefile (libpthread-routines): Remove lowlevelrwlock. Add
10875 pthread_rwlock_rdlock, pthread_rwlock_timedrdlock,
10876 pthread_rwlock_wrlock, pthread_rwlock_timedwrlock, and
10877 pthread_rwlock_unlock.
10878 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Removed
10879 * sysdeps/unix/sysv/linux/i386/i586/lowlevelrwlock.S: Removed
10880 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Removed
10881 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: New file.
10882 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
10884 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: New file.
10885 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
10887 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: New file.
10888 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_rdlock.S: New file.
10889 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedrdlock.S:
10891 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_wrlock.S: New file.
10892 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedwrlock.S:
10894 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_unlock.S: New file.
10895 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_rdlock.S: New file.
10896 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedrdlock.S:
10898 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_wrlock.S: New file.
10899 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedwrlock.S:
10901 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_unlock.S: New file.
10903 * Makefile (libpthread-routines): Remove lowlevelcond and
10904 lowlevelsem. Add sem_wait, sem_trywait, sem_timedwait, sem_post,
10905 pthread_cond_wait, pthread_cond_timedwait, pthread_cond_signal,
10906 and pthread_cond_broadcast.
10907 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Removed
10908 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Removed
10909 * sysdeps/unix/sysv/linux/i386/i586/lowlevelsem.S: Removed
10910 * sysdeps/unix/sysv/linux/i386/i586/lowlevelcond.S: Removed
10911 * sysdeps/unix/sysv/linux/i386/i686/lowlevelsem.S: Removed
10912 * sysdeps/unix/sysv/linux/i386/i686/lowlevelcond.S: Removed
10913 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: New file.
10914 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: New file.
10915 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: New file.
10916 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: New file.
10917 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: New file.
10918 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: New file.
10919 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: New file.
10920 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: New file.
10921 * sysdeps/unix/sysv/linux/i386/i586/sem_wait.S: New file.
10922 * sysdeps/unix/sysv/linux/i386/i586/sem_trywait.S: New file.
10923 * sysdeps/unix/sysv/linux/i386/i586/sem_timedwait.S: New file.
10924 * sysdeps/unix/sysv/linux/i386/i586/sem_post.S: New file.
10925 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_wait.S: New file.
10926 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_timedwait.S: New file.
10927 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_signal.S: New file.
10928 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_broadcast.S: New file.
10929 * sysdeps/unix/sysv/linux/i386/i686/sem_wait.S: New file.
10930 * sysdeps/unix/sysv/linux/i386/i686/sem_trywait.S: New file.
10931 * sysdeps/unix/sysv/linux/i386/i686/sem_timedwait.S: New file.
10932 * sysdeps/unix/sysv/linux/i386/i686/sem_post.S: New file.
10933 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_wait.S: New file.
10934 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S: New file.
10935 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_signal.S: New file.
10936 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_broadcast.S: New file.
10937 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: New file.
10939 * sysdeps/unix/sysv/linux/i386/createthread.c: Define
10940 PREPARE_CREATE and TLS_VALUE with x86-specific bits. All the rest
10941 of the code is moved to ...
10942 * sysdeps/pthread/createthread.c: ...here. New file.
10944 2003-01-27 Ulrich Drepper <drepper@redhat.com>
10946 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S
10947 (__new_sem_post): Clear %eax before returning.
10948 Reported by MAEDA Naoaki <maeda.naoaki@jp.fujitsu.com>.
10950 * Makefile (tests): Add tst-cleanup2.
10951 * tst-cleanup2.c: New file.
10953 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
10954 Interpret first parameter correctly.
10956 2003-01-17 Ulrich Drepper <drepper@redhat.com>
10958 * Makefile (headers): Add bits/semaphore.h.
10960 2003-01-16 Jakub Jelinek <jakub@redhat.com>
10962 * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize _head->sysinfo even
10965 2003-01-14 Ulrich Drepper <drepper@redhat.com>
10967 * sem_open.c (sem_open): Return SEM_FAILED if existing semaphore
10968 must be used and mapping failed.
10969 Reported by Luke Elliott <luke.elliott@activfinancial.com>.
10971 * Makefile (CFLAGS-pthread_self.os): Define this, not
10972 CFLAGS-pthread_self.c.
10974 2003-01-13 Ulrich Drepper <drepper@redhat.com>
10976 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Don't export
10977 lll_unlock_wake_cb.
10979 * Makefile (libpthread-routines): Add version. Add rules to build
10980 version.os and banner.h.
10981 * version.c: New file.
10983 2003-01-13 Jakub Jelinek <jakub@redhat.com>
10985 * pthread_mutex_lock.c (__pthread_mutex_lock_internal): Make
10986 the alias unconditional.
10987 * pthread_mutex_unlock.c (__pthread_mutex_unlock_internal): Likewise.
10989 2003-01-13 Ulrich Drepper <drepper@redhat.com>
10991 * Makefile (CFLAGS-pthread_self.c): New definition.
10993 2003-01-06 Jakub Jelinek <jakub@redhat.com>
10995 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Add
10996 INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
10997 * sysdeps/unix/sysv/linux/raise.c (raise): Likewise.
10998 * init.c (__pthread_initialize_minimal_internal): Likewise.
11000 2003-01-07 Jakub Jelinek <jakub@redhat.com>
11002 * pthreadP.h (__pthread_cond_timedwait): Add prototype.
11004 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
11005 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
11006 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
11007 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
11008 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
11009 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
11011 2003-01-06 Jakub Jelinek <jakub@redhat.com>
11013 * pthreadP.h (LIBC_CANCEL_HANDLED): Define.
11014 * pt-system.c (LIBC_CANCEL_HANDLED): Add.
11015 * tst-cancel-wrappers.sh: Remove all exceptions.
11017 2003-01-05 Ulrich Drepper <drepper@redhat.com>
11019 * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
11020 features. Reported by Marijn Ros <marijn@mad.scientist.com>.
11022 * sysdeps/unix/sysv/linux/jmp-unwind.c: Include <pthread-functions.h>.
11023 Use __libc_pthread_functions array if SHARED.
11025 * pthreadP.h: Move pthread_cond_2_0_t definition to...
11026 * sysdeps/unix/sysv/linux/internaltypes.h: ...here.
11028 * sysdeps/pthread/bits/libc-lock.h (__libc_ptf_call): New #define.
11029 (__libc_rwlock_rdlock, __libc_rwlock_wrlock, __libc_rwlock_unlock,
11030 __libc_key_create, __libc_getspecific, __libc_setspecific): Use
11031 __libc_ptf_call instead of __libc_maybe_call.
11032 (PTF): New #define.
11033 (__libc_cleanup_region_start): Wrap function name with PTF call.
11034 (__libc_cleanup_region_end): Likewise.
11035 (__libc_cleanup_end): Likewise.
11037 * pthread_getspecific.c: Add __pthread_getspecific_internal alias.
11038 * pthread_setspecific.c: Add __pthread_setspecific_internal alias.
11039 * pthread_key_create.c: Add __pthread_key_create_internal alias.
11040 * pthreadP.h: Add prototypes.
11042 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Add
11043 __pthread_rwlock_rdlock, __pthread_rwlock_wrlock, and
11044 __pthread_rwlock_unlock aliases.
11045 * pthreadP.h: Add prototypes for new aliases.
11047 * pthreadP.h (struct pthead_functions): Moved to...
11048 * sysdeps/pthread/pthread-functions.h: ...here. New file.
11049 * init.c (pthread_functions): Add initializers for new elements.
11051 * cleanup_defer.c: Add __pthread_cleanup_push_defer and
11052 __pthread_cleanup_pop_restore aliases.
11053 * pthreadP.h: Add prototypes.
11055 * cleanup.c: Rename _GI_pthread_cleanup_push to __pthread_cleanup_push
11056 and _GI_pthread_cleanup_pop to __pthread_cleanup_pop.
11057 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Adjust caller.
11058 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
11059 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
11060 * pthreadP.h: Adjust prototypes and callers.
11062 2003-01-04 Ulrich Drepper <drepper@redhat.com>
11064 * Makefile (tests): Add tst-cancel7.
11065 (tst-cancel7-ARGS): New variable.
11066 * tst-cancel7.c: New file.
11068 * old_pthread_cond_broadcast.c: Optimize initialization a bit to work
11069 around gcc defficiencies.
11070 * old_pthread_cond_signal.c: Likewise.
11071 * old_pthread_cond_timedwait.c: Likewise.
11072 * old_pthread_cond_wait.c: Likewise.
11074 * pthreadP.h (pthread_cond_2_0_t): Remove unneeded lock element.
11076 2003-01-03 Ulrich Drepper <drepper@redhat.com>
11078 * Makefile (tests): Add tst-cond7.
11079 * tst-cond7.c: New file.
11081 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
11082 (condvar_cleanup): Get condvar address from the right place.
11084 * atomic.h: Correct definitions of atomic_full_barrier,
11085 atomic_read_barrier, atomic_write_barrier.
11087 * old_pthread_cond_broadcast.c: Make memory allocate and initialization
11089 * old_pthread_cond_signal.c: Likewise.
11090 * old_pthread_cond_timedwait.c: Likewise.
11091 * old_pthread_cond_wait.c: Likewise.
11093 2003-01-03 Jakub Jelinek <jakub@redhat.com>
11095 * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
11097 2003-01-03 Ulrich Drepper <drepper@redhat.com>
11099 * pthreadP.h (pthread_cond_2_0_t): New type.
11100 (struct pthread_functions): Use new type for 2.0 condvar callbacks.
11101 Use new type for the 2.0 condvar function prototypes.
11102 * forward.c: Use pthread_cond_2_0_t for 2.0 condvar functions.
11103 * old_pthread_cond_init.c: Use pthread_cond_2_0_t for condvar
11105 * old_pthread_cond_destroy.c: Likewise.
11106 * old_pthread_cond_broadcast.c: Likewise. Lock appropriately.
11107 * old_pthread_cond_signal.c: Likewise.
11108 * old_pthread_cond_timedwait.c: Likewise.
11109 * old_pthread_cond_wait.c: Likewise.
11111 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
11112 (__pthread_cond_wait): Don't save cancellation mode and seq value
11115 * herrno.c (__h_errno_location): Don't define as weak.
11117 2003-01-02 Jakub Jelinek <jakub@redhat.com>
11119 * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
11120 pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
11121 and pthread_cond_wait.
11122 * old_pthread_cond_broadcast.c (__old_pthread_cond_broadcast):
11124 (__pthread_cond_broadcast_2_0): ... this.
11125 * old_pthread_cond_destroy.c (__old_pthread_cond_destroy):
11127 (__pthread_cond_destroy_2_0): ... this.
11128 * old_pthread_cond_init.c (__old_pthread_cond_init):
11130 (__pthread_cond_init_2_0): ... this.
11131 * old_pthread_cond_signal.c (__old_pthread_cond_signal):
11133 (__pthread_cond_signal_2_0): ... this.
11134 * old_pthread_cond_wait.c (__old_pthread_cond_wait):
11136 (__pthread_cond_wait_2_0): ... this.
11137 * pthread_cond_destroy.c: Include shlib-compat.h.
11138 (pthread_cond_destroy): Change strong_alias into versioned_symbol.
11139 * pthread_cond_init.c: Include shlib-compat.h.
11140 (pthread_cond_init): Change strong_alias into versioned_symbol.
11141 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_cond_*
11142 fields to ptr___pthread_cond_* and add ptr___pthread_cond_*_2_0
11144 (__pthread_cond_broadcast_2_0, __pthread_cond_destroy_2_0,
11145 __pthread_cond_init_2_0, __pthread_cond_signal_2_0,
11146 __pthread_cond_wait_2_0): New prototypes.
11147 (__old_pthread_cond_broadcast, __old_pthread_cond_destroy,
11148 __old_pthread_cond_init, __old_pthread_cond_signal,
11149 __old_pthread_cond_wait): Removed.
11150 * init.c: Include shlib-compat.h.
11151 (pthread_functions): Guard ptr___pthread_attr_init_2_0
11152 initialization with SHLIB_COMPAT (GLIBC_2_0, GLIBC_2_1).
11153 Rename ptr_pthread_cond_* to ptr___pthread_cond_*, initialize
11154 ptr___pthread_cond_*_2_0 fields.
11155 * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
11156 pthread_cond_*@GLIBC_2.0 compatibility symbols.
11158 * sysdeps/pthread/sigaction.c (SIGCANCEL): Only define if
11159 LIBC_SIGACTION was not yet defined.
11160 [!defined LIBC_SIGACTION]: Define LIBC_SIGACTION, #include self.
11161 [!defined LIBC_SIGACTION] (__sigaction): New function and
11163 [!defined LIBC_SIGACTION] (sigaction): New weak_alias.
11164 [defined LIBC_SIGACTION]: #include_next <sigaction.c>.
11166 2003-01-02 Jakub Jelinek <jakub@redhat.com>
11168 * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
11170 2003-01-02 Ulrich Drepper <drepper@redhat.com>
11172 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
11173 New, larger type definition.
11174 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: New condvar
11176 * Versions [libpthread]: Add definitions for new pthread_cond_*
11177 interfaces for version GLIBC_2.3.2.
11178 * pthread_cond_init.c: Update initialization for new type definition.
11179 * Makefile (libpthread-routines): Remove pthread_cond_wait,
11180 pthread_cond_timedwait, pthread_cond_signal, and
11181 pthread_cond_broadcast. Add old_pthread_cond_init,
11182 old_pthread_cond_destroy, old_pthread_cond_wait,
11183 old_pthread_cond_timedwait, old_pthread_cond_signal, and
11184 old_pthread_cond_broadcast.
11185 * old_pthread_cond_broadcast.c: New file.
11186 * old_pthread_cond_destroy.c: New file.
11187 * old_pthread_cond_init.c: New file.
11188 * old_pthread_cond_signal.c: New file.
11189 * old_pthread_cond_timedwait.c: New file.
11190 * old_pthread_cond_wait.c: New file.
11191 * pthreadP.h: Add prototypes for the compatibility interfaces.
11193 * pthread_cond_destroy.c: Don't include <errno.h>.
11195 2003-01-01 Ulrich Drepper <drepper@redhat.com>
11197 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Avoid
11198 unnecessary zero offset when addressing MUTEX.
11200 2002-12-31 Ulrich Drepper <drepper@redhat.com>
11202 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
11204 * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
11205 for __register_atfork.
11207 2002-12-31 Jakub Jelinek <jakub@redhat.com>
11209 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use __ASSEMBLER__
11210 instead of ASSEMBLER test macro.
11212 * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
11213 __libc_current_sigrtmax): Add libc_hidden_def.
11215 * sysdeps/pthread/list.h: Remove assert.h include.
11217 2002-12-31 Ulrich Drepper <drepper@redhat.com>
11219 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Use
11220 __pthread_initialize_minimal_internal not
11221 __pthread_initialize_minimal.
11223 2002-12-30 Ulrich Drepper <drepper@redhat.com>
11225 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Mark
11226 __pthread_initialize_minimal as hidden.
11228 * init.c (__pthread_initialize_minimal_internal): Don't mark as
11231 2002-12-31 Jakub Jelinek <jakub@redhat.com>
11233 * Makefile ($(inst_libdir)/libpthread.so): Depend on
11234 $(common-objpfx)format.lds, include that into the output script.
11236 (extra-B-pthread.so): Change linuxthreads/ into nptl/.
11238 2002-12-28 Andreas Jaeger <aj@suse.de>
11240 * sysdeps/unix/sysv/linux/xstatconv.c (xstat_conv): Adjust for
11241 nsec resolution changes.
11242 (xstat64_conv): Likewise.
11243 (xstat32_conv): Likewise.
11244 * sysdeps/unix/sysv/linux/kernel_stat.h: Add nsec resolution for
11245 struct kernel_stat.
11246 * sysdeps/unix/sysv/linux/bits/stat.h: Add nsec resolution for
11247 structs stat and stat64.
11248 * time/time.h (__timespec_defined): Define for __USE_MISC.
11249 * io/sys/stat.h [__USE_MISC]: Define __need_timespec for struct stat.
11251 2002-12-30 Jakub Jelinek <jakub@redhat.com>
11253 * forward.c (FORWARD2): Renamed from FORWARD3. Remove unused export
11255 (pthread_attr_init_2_0, pthread_attr_init_2_1): Use FORWARD macro.
11256 (pthread_exit): Use strong_alias to avoid warnings.
11257 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_exit
11258 and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
11259 ptr___pthread_attr_init_2_*.
11260 * init.c (pthread_functions): Adjust.
11262 2002-12-29 Ulrich Drepper <drepper@redhat.com>
11264 * forward.c: Make all functions available by default again. It
11265 caused too much trouble.
11267 * pt-siglongjmp.c: Removed.
11269 2002-12-28 Jakub Jelinek <jakub@redhat.com>
11271 * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
11272 (SYSINFO_OFFSET, MULTIPLE_THREADS_OFFSET): Remove.
11273 * sysdeps/i386/Makefile: New file.
11274 * sysdeps/i386/tcb-offsets.sym: New file.
11275 * sysdeps/pthread/tcb-offsets.h: New file.
11276 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
11277 Remove MULTIPLE_THREADS_OFFSET and SYSINFO_OFFSET checks.
11279 * sysdeps/unix/sysv/linux/Versions [libc] (GLIBC_PRIVATE): Move
11280 __register_atfork...
11281 (GLIBC_2.3.2): ...here.
11283 2002-12-28 Ulrich Drepper <drepper@redhat.com>
11285 * sysdeps/pthread/pthread.h: Mark pthread_attr_getstackaddr and
11286 pthread_attr_setstackaddr with __attribute_deprecated__.
11288 2002-12-27 Jakub Jelinek <jakub@redhat.com>
11290 * pt-system.c (system): Remove cancellation handling.
11291 * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
11292 cancellation routines.
11294 2002-12-28 Ulrich Drepper <drepper@redhat.com>
11296 * descr.h: Include <dl-sysdep.h>.
11297 (struct pthread): Move header.data.list to the back of the struct.
11298 * sysdeps/i386/tls.h (tcbhead_t): Move list to the back of the struct.
11299 (MULTIPLE_THREADS_OFFSET): Adjust offset.
11300 (SYSINFO_OFFSEET): Likewise.
11302 2002-12-27 Jakub Jelinek <jakub@redhat.com>
11304 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h (USE_DL_SYSINFO):
11306 (DL_SYSINFO_DEFAULT): Cast to uintptr_t to avoid warnings.
11307 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h (NEED_DL_SYSINFO,
11308 DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION): Define.
11309 (USE_DL_SYSINFO): Undef.
11311 2002-12-22 Jakub Jelinek <jakub@redhat.com>
11313 * Makefile (tests-reverse): Use $(objpfx)../libc.so instead of
11314 $(common-objpfx)libc.so.
11315 * tst-cancel4.c (tf_write, tf_writev): Increase buf sizes so that
11316 it is bigger than pipe buffer size even on arches with bigger
11318 (tf_usleep): Cast usleep argument to useconds_t to avoid warnings.
11320 2002-12-25 Ulrich Drepper <drepper@redhat.com>
11322 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Implement
11323 correct errno access for case that USE___THREAD is not defined.
11325 2002-12-24 Ulrich Drepper <drepper@redhat.com>
11327 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Add missing #endif.
11328 Patch by Marijn Ros <marijn@mad.scientist.com>.
11330 2002-12-22 Roland McGrath <roland@redhat.com>
11332 * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
11334 2002-12-20 Ulrich Drepper <drepper@redhat.com>
11336 * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_inexpensive): Define.
11338 2002-12-19 Ulrich Drepper <drepper@redhat.com>
11340 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Don't define
11341 NEED_DL_SYSINFO since no processor < i686 had the sysenter opcode.
11342 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: New file.
11344 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Use ENTER_KERNEL instead
11346 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
11347 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Likewise.
11348 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Likewise.
11349 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
11350 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
11351 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Likewise.
11352 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Likewise.
11353 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
11355 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add support for using
11357 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
11359 * sysdeps/i386/tls.h: Unconditionally include <dl-sysdep.h>.
11361 * allocatestack.c (allocate_stack) [NEED_DL_SYSINFO]: Set sysinfo
11363 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Check
11364 that sysinfo is properly initialized.
11365 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define RTLD_PRIVATE_ERRNO
11366 to 1 only for ld.so.
11368 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
11369 RTLD_CORRECT_DYNAMIC_WEAK.
11371 2002-12-19 Jakub Jelinek <jakub@redhat.com>
11373 * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
11374 Use return 0 as 6th argument to FORWARD4.
11375 * pthread_equal.c: Include pthreadP.h instead of pthread.h.
11377 2002-12-18 Ulrich Drepper <drepper@redhat.com>
11379 * descr.h (struct pthread) [NEED_DL_SYSINFO]: Add sysinfo member.
11380 * sysdeps/i386/tls.h (tcbhead_t): Add sysinfo member.
11381 Define SYSINFO_OFFSEET if NEED_DL_SYSINFO is defined.
11382 (INIT_SYSINFO): New #define.
11383 (TLS_TP_INIT): Use INIT_SYSINFO.
11384 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
11385 At test to make sure SYSINFO_OFFSET value is correct.
11386 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
11388 2002-12-18 Jakub Jelinek <jakub@redhat.com>
11390 * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
11391 * sysdeps/unix/sysv/linux/raise.c (gsignal): Add weak alias to raise.
11392 * Versions [libc: GLIBC_2.0]: Add pthread_attr_init.
11393 [libpthread: GLIBC_2.1]: Remove __pthread_rwlock_init,
11394 __pthread_rwlock_destroy, __pthread_rwlock_rdlock,
11395 __pthread_rwlock_wrlock, __pthread_rwlock_unlock,
11396 __pthread_rwlock_tryrdlock and __pthread_rwlock_trywrlock.
11398 2002-12-18 Ulrich Drepper <drepper@redhat.com>
11400 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use ENTER_KERNEL
11401 macro instead of using int $0x80 directly.
11403 * sysdeps/pthread/bits/stdio-lock.h: New file.
11404 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: New file.
11405 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: New file.
11406 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: New file.
11407 * Makefile (routines): Add libc-lowlevelmutex.
11409 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Remove
11410 __i686.get_pc_thunk.dx.
11412 2002-12-17 Jakub Jelinek <jakub@redhat.com>
11414 * Makefile (libpthread-shared-only-routines): Add pt-allocrtsig.
11415 (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
11416 ($(objpfx)tst-cancel-wrappers.out): New rule.
11417 * tst-cancel-wrappers.sh: New test.
11418 * tst-locale1.c: Include signal.h.
11419 (uselocale): Test static linking of __libc_current_sigrt*.
11421 2002-12-17 Ulrich Drepper <drepper@redhat.com>
11423 * Makefile (tests): Add tst-cancel6.
11424 * tst-cancel6.c: New file
11426 2002-12-17 Jakub Jelinek <jakub@redhat.com>
11428 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
11429 Define meaningfully for assembler as well.
11430 * pthreadP.h (struct pthread_functions): Remove
11431 ptr_pthread_attr_init field. Add ptr_pthread_attr_init_2_0
11432 and ptr_pthread_attr_init_2_1 fields.
11433 * init.c (pthread_functions): Initialize ptr_pthread_attr_init_2_0
11434 and ptr_pthread_attr_init_2_1 instead of ptr_pthread_attr_init.
11435 * forward.c (FORWARD4): Renamed from FORWARD3. Add export argument.
11436 (FORWARD3): Define using FORWARD4.
11437 (pthread_attr_init): Provide both @GLIBC_2.0 and @@GLIBC_2.1
11439 * pt-system.c: Remove duplicate stdlib.h include.
11441 2002-12-16 Ulrich Drepper <drepper@redhat.com>
11443 * sem_init.c: Define sem_init@GLIBC_2.0.
11444 * sem_destroy.c: Define sem_destroy@GLIBC_2.0.
11445 * sem_getvalue.c: Define sem_getvalue@GLIBC_2.0.
11447 * flockfile.c: Moved to...
11448 * sysdeps/pthread/flockfile.c: ...here. New file.
11449 * funlockfile.c: Moved to...
11450 * sysdeps/pthread/funlockfile.c: ...here. New file.
11451 * ftrylockfile.c: Moved to...
11452 * sysdeps/pthread/ftrylockfile.c: ...here. New file.
11454 2002-12-16 Jakub Jelinek <jakub@redhat.com>
11456 * libc-cancellation.c: Guard both function with
11457 #if !defined NOT_IN_libc.
11458 * Makefile (libpthread-routines): Use ptw-, not pt- prefix for the
11459 automatically provided pthread wrappers.
11460 * pthreadP.h (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define to
11461 CANCEL_* if IS_IN_libpthread and to dummy versions if not in libc
11463 * pt-open.c: Removed.
11464 * pt-fcntl.c: Removed.
11465 * pt-fsync.c: Removed.
11466 * pt-lseek.c: Removed.
11467 * pt-msgrcv.c: Removed.
11468 * pt-msgsnd.c: Removed.
11469 * pt-msync.c: Removed.
11470 * pt-nanosleep.c: Removed.
11471 * pt-open64.c: Removed.
11472 * pt-pause.c: Removed.
11473 * pt-pread.c: Removed.
11474 * pt-pread64.c: Removed.
11475 * pt-pwrite.c: Removed.
11476 * pt-pwrite64.c: Removed.
11477 * pt-read.c: Removed.
11478 * pt-recv.c: Removed.
11479 * pt-recvfrom.c: Removed.
11480 * pt-recvmsg.c: Removed.
11481 * pt-send.c: Removed.
11482 * pt-sendto.c: Removed.
11483 * pt-sigtimedwait.c: Removed.
11484 * pt-sigwait.c: Removed.
11485 * pt-wait.c: Removed.
11486 * pt-waitpid.c: Removed.
11487 * pt-write.c: Removed.
11488 * pt-accept.c: Removed.
11489 * pt-close.c: Removed.
11490 * pt-connect.c: Removed.
11491 * pt-lseek64.c: Removed.
11492 * pt-sendmsg.c: Removed.
11493 * pt-tcdrain.c: Removed.
11495 2002-12-15 Ulrich Drepper <drepper@redhat.com>
11497 * init.c (__pthread_initialize_minimal_internal): Renamed from
11498 __pthread_initialize_minimal. Make old name an alias. This
11499 converts a normal relocation into a relative relocation.
11501 * pt-fcntl.c (__fcntl): Use fcntl64 syscall, not fcntl.
11503 * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
11504 readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
11505 * Makefile (libpthread-routines): Remove pt-creat, pt-poll,
11506 pt-pselect, pt-readv, pt-select, pt-sigpause, pt-sigsuspend,
11507 pt-sigwaitinfo, pt-waitid, and pt-writev.
11508 * pt-creat.c: Removed.
11509 * pt-poll.c: Removed.
11510 * pt-pselect.c: Removed.
11511 * pt-readv.c: Removed.
11512 * pt-select.c: Removed.
11513 * pt-sigpause.c: Removed.
11514 * pt-sigsuspend.c: Removed.
11515 * pt-sigwaitinfo.c: Removed.
11516 * pt-waitid.c: Removed.
11517 * pt-writev.c: Removed.
11519 * init.c (pthread_functions): New variable.
11520 (__pthread_initialize_minimal): Pass pointer to pthread_functions
11521 (or NULL) to __libc_pthread_init.
11522 * forward.c: Rewrite to use __libc:pthread_functions array to get
11523 function addresses.
11524 * sysdeps/unix/sysv/linux/fork.h: Remove __libc_pthread_init
11526 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
11527 Take new parameter. Copy content of variable pointed to by it
11528 to __libc_pthread_init.
11530 * pthreadP.h (struct pthread_functions): New type.
11531 (__libc_pthread_init): Declare.
11533 * pthread_attr_destroy.c: Add namespace protected alias.
11534 * pthread_attr_getdetachstate.c: Likewise.
11535 * pthread_attr_getinheritsched.c: Likewise.
11536 * pthread_attr_getschedparam.c: Likewise.
11537 * pthread_attr_getschedpolicy.c: Likewise.
11538 * pthread_attr_getscope.c: Likewise.
11539 * pthread_attr_setdetachstate.c: Likewise.
11540 * pthread_attr_setinheritsched.c: Likewise.
11541 * pthread_attr_setschedparam.c: Likewise.
11542 * pthread_attr_setschedpolicy.c: Likewise.
11543 * pthread_attr_setscope.c: Likewise.
11544 * pthread_cond_broadcast.c: Likewise.
11545 * pthread_cond_destroy.c: Likewise.
11546 * pthread_cond_init.c: Likewise.
11547 * pthread_cond_signal.c: Likewise.
11548 * pthread_cond_wait.c: Likewise.
11549 * pthread_condattr_destroy.c: Likewise.
11550 * pthread_condattr_init.c: Likewise.
11551 * pthread_equal.c: Likewise.
11552 * pthread_exit.c: Likewise.
11553 * pthread_getschedparam.c: Likewise.
11554 * pthread_self.c: Likewise.
11555 * pthread_setcancelstate.c: Likewise.
11556 * pthread_setschedparam.c: Likewise.
11557 * pthread_mutex_destroy.c: Likewise.
11558 * pthread_mutex_init.c: Likewise.
11559 * pthreadP.h: Add prototypes for the aliases.
11561 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Set
11562 multiple_threads member in correct TCB to 1.
11564 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define
11565 SINGLE_THREAD_P. If in libc or libpthread examine multiple_thread
11566 member of thread decriptor, otherwise return unconditionally 1.
11568 2002-12-14 Ulrich Drepper <drepper@redhat.com>
11570 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Changes folded into the
11571 regular Linux version. Remove file.
11572 * sysdeps/unix/sysv/linux/connect.S: Likewise. Remove file.
11573 * sysdeps/unix/sysv/linux/llseek.c: Likewise. Remove file.
11574 * sysdeps/unix/sysv/linux/msgrcv.c: Likewise. Remove file.
11575 * sysdeps/unix/sysv/linux/msgsnd.c: Likewise. Remove file.
11576 * sysdeps/unix/sysv/linux/open64.c: Likewise. Remove file.
11577 * sysdeps/unix/sysv/linux/poll.c: Likewise. Remove file.
11578 * sysdeps/unix/sysv/linux/pread.c: Likewise. Remove file.
11579 * sysdeps/unix/sysv/linux/pread64.c: Likewise. Remove file.
11580 * sysdeps/unix/sysv/linux/pselect.c: Likewise. Remove file.
11581 * sysdeps/unix/sysv/linux/pwrite.c: Likewise. Remove file.
11582 * sysdeps/unix/sysv/linux/pwrite64.c: Likewise. Remove file.
11583 * sysdeps/unix/sysv/linux/readv.c: Likewise. Remove file.
11584 * sysdeps/unix/sysv/linux/recv.S: Likewise. Remove file.
11585 * sysdeps/unix/sysv/linux/recvfrom.S: Likewise. Remove file.
11586 * sysdeps/unix/sysv/linux/recvmsg.S: Likewise. Remove file.
11587 * sysdeps/unix/sysv/linux/send.S: Likewise. Remove file.
11588 * sysdeps/unix/sysv/linux/sendmsg.S: Likewise. Remove file.
11589 * sysdeps/unix/sysv/linux/sendto.S: Likewise. Remove file.
11590 * sysdeps/unix/sysv/linux/sigpause.c: Likewise. Remove file.
11591 * sysdeps/unix/sysv/linux/sigsuspend.c: Likewise. Remove file.
11592 * sysdeps/unix/sysv/linux/sigtimedwait.c: Likewise. Remove file.
11593 * sysdeps/unix/sysv/linux/sigwait.c: Likewise. Remove file.
11594 * sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise. Remove file.
11595 * sysdeps/unix/sysv/linux/system.c: Likewise. Remove file.
11596 * sysdeps/unix/sysv/linux/tcdrain.c: Likewise. Remove file.
11597 * sysdeps/unix/sysv/linux/wait.c: Likewise. Remove file.
11598 * sysdeps/unix/sysv/linux/waitid.c: Likewise. Remove file.
11599 * sysdeps/unix/sysv/linux/waitpid.c: Likewise. Remove file.
11600 * sysdeps/unix/sysv/linux/writev.c: Likewise. Remove file.
11601 * sysdeps/unix/sysv/linux/i386/fcntl.c: Likewise. Remove file.
11603 2002-12-14 Jakub Jelinek <jakub@redhat.com>
11605 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
11606 * sysdeps/unix/sysv/linux/open.c: Removed.
11607 * sysdeps/unix/sysv/linux/fsync.c: Removed.
11608 * sysdeps/unix/sysv/linux/lseek.c: Removed.
11609 * sysdeps/unix/sysv/linux/msync.c: Removed.
11610 * sysdeps/unix/sysv/linux/read.c: Removed.
11611 * sysdeps/unix/sysv/linux/close.c: Removed.
11612 * sysdeps/unix/sysv/linux/creat.c: Removed.
11613 * sysdeps/unix/sysv/linux/nanosleep.c: Removed.
11614 * sysdeps/unix/sysv/linux/pause.c: Removed.
11615 * sysdeps/unix/sysv/linux/select.c: Removed.
11616 * sysdeps/unix/sysv/linux/write.c: Removed.
11618 2002-12-14 Ulrich Drepper <drepper@redhat.com>
11620 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Check multiple_threads
11621 element in TCB to see whether locking is needed.
11623 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Check that
11624 MULTIPLE_THREADS_OFFSET value is correct.
11626 * sysdeps/unix/sysv/linux/close.c: New file.
11627 * sysdeps/unix/sysv/linux/connect.S: New file.
11628 * sysdeps/unix/sysv/linux/creat.c: New file.
11629 * sysdeps/unix/sysv/linux/fsync.c: New file.
11630 * sysdeps/unix/sysv/linux/llseek.c: New file.
11631 * sysdeps/unix/sysv/linux/lseek.c: New file.
11632 * sysdeps/unix/sysv/linux/msgrcv.c: New file.
11633 * sysdeps/unix/sysv/linux/msgsnd.c: New file.
11634 * sysdeps/unix/sysv/linux/msync.c: New file.
11635 * sysdeps/unix/sysv/linux/nanosleep.c: New file.
11636 * sysdeps/unix/sysv/linux/open.c: New file.
11637 * sysdeps/unix/sysv/linux/open64.c: New file.
11638 * sysdeps/unix/sysv/linux/pause.c: New file.
11639 * sysdeps/unix/sysv/linux/poll.c: New file.
11640 * sysdeps/unix/sysv/linux/pread.c: New file.
11641 * sysdeps/unix/sysv/linux/pread64.c: New file.
11642 * sysdeps/unix/sysv/linux/pselect.c: New file.
11643 * sysdeps/unix/sysv/linux/pwrite.c: New file.
11644 * sysdeps/unix/sysv/linux/pwrite64.c: New file.
11645 * sysdeps/unix/sysv/linux/readv.c: New file.
11646 * sysdeps/unix/sysv/linux/recv.S: New file.
11647 * sysdeps/unix/sysv/linux/recvfrom.S: New file.
11648 * sysdeps/unix/sysv/linux/recvmsg.S: New file.
11649 * sysdeps/unix/sysv/linux/select.c: New file.
11650 * sysdeps/unix/sysv/linux/send.S: New file.
11651 * sysdeps/unix/sysv/linux/sendmsg.S: New file.
11652 * sysdeps/unix/sysv/linux/sendto.S: New file.
11653 * sysdeps/unix/sysv/linux/sigpause.c: New file.
11654 * sysdeps/unix/sysv/linux/sigsuspend.c: New file.
11655 * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
11656 * sysdeps/unix/sysv/linux/sigwait.c: New file.
11657 * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
11658 * sysdeps/unix/sysv/linux/system.c: New file.
11659 * sysdeps/unix/sysv/linux/tcdrain.c: New file.
11660 * sysdeps/unix/sysv/linux/wait.c: New file.
11661 * sysdeps/unix/sysv/linux/waitid.c: New file.
11662 * sysdeps/unix/sysv/linux/waitpid.c: New file.
11663 * sysdeps/unix/sysv/linux/writev.c: New file.
11664 * sysdeps/unix/sysv/linux/i386/fcntl.c: New file.
11666 * pt-readv.c: Fix comment.
11668 2002-12-14 Jakub Jelinek <jakub@redhat.com>
11670 * tst-cleanup1.c: Include stdlib.h.
11672 * tst-cancel5.c: New test.
11673 * Makefile (tests): Add tst-cancel5.
11674 (tst-cancel5): Link against libc.so libpthread.so in that order.
11676 2002-12-13 Ulrich Drepper <drepper@redhat.com>
11678 * forward.c (test_loaded): Prevent recursive calls.
11680 * Makefile (routines): Add libc-cancellation.
11681 * libc-cancellation.c: New file.
11682 * descr.h (struct pthread): Add multiple_threads field.
11683 * allocatestack.c (allocate_stack): Initialize multiple_header field of
11684 new thread descriptor to 1.
11685 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread):
11686 Initialize multiple_thread field after successful thread creation.
11687 * cancellation.c (__do_cancel): Move to pthreadP.h.
11688 (__pthread_enable_asynccancel): Remove parameter from __do_cancel call.
11689 (__pthread_disable_asynccancel): Add internal_function attribute.
11690 * init.c (sigcancel_handler): Remove parameter from __do_cancel call.
11691 * pthread_setcancelstate.c: Likewise.
11692 * pthread_setcanceltype.c: Likewise.
11693 * pthread_exit.c: Likewise.
11694 * pthreadP.h (CANCELLATION_P): Likewise.
11695 (__do_cancel): Define as static inline.
11696 (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): New #defines.
11697 (__libc_enable_asynccancel, __libc_disable_asynccancel): New
11699 * sysdeps/i386/tls.h (tcbhead_t): Add list and multiple_threads
11700 fields. Define MULTIPLE_THREADS_OFFSET.
11701 * sysdeps/pthread/bits/libc-lock.h: Remove __libc_locking_needed
11703 * sysdeps/unix/sysv/linux/accept.S: New file.
11704 * sysdeps/unix/sysv/linux/read.c: New file.
11705 * sysdeps/unix/sysv/linux/write.c: New file.
11706 * sysdeps/unix/sysv/linux/i386/pt-socket.S: New file.
11707 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove definition and
11708 initialization of __libc_locking_needed.
11709 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't use
11710 __libc_locking_needed, use multiple_threads field in TCB.
11711 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
11713 2002-12-12 Ulrich Drepper <drepper@redhat.com>
11715 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: Use i486
11717 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: Likewise.
11719 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Correct
11720 access to __libc_locking_needed for PIC.
11722 2002-12-12 Jakub Jelinek <jakub@redhat.com>
11724 * sysdeps/pthread/bits/libc-lock.h (__libc_locking_needed): Only
11725 declare for libc.so.
11726 (__libc_lock_init, __libc_lock_init_recursive): Change into comma
11728 (__libc_lock_lock): Put into statement expression.
11729 (__libc_lock_unlock): Remove trailing semicolon.
11730 * sysdeps/unix/sysv/linux/fork.h (__libc_pthread_init): Fix typo.
11732 2002-12-12 Roland McGrath <roland@redhat.com>
11734 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use asm operand with
11735 "m" constraint to refer to __libc_locking_needed. Declare it here.
11737 2002-12-12 Ulrich Drepper <drepper@redhat.com>
11739 * sysdeps/unix/sysv/linux/fork-gen.c: Renamed to...
11740 * sysdeps/unix/sysv/linux/libc_pthread_init.c: ...this.
11741 Initialize __libc_locking_needed.
11742 * init.c (__pthread_initialize_minimal): Call __libc_pthread_init
11743 instead of __register_pthread_fork_handler.
11744 * sysdeps/pthread/bits/libc-lock.h: Declare __libc_locking_needed.
11745 * sysdeps/unix/sysv/linux/Makefile (sysdep_routimes): Replace
11746 fork-gen with libc_pthread_init.
11747 * sysdeps/unix/sysv/linux/Versions: Use __libc_pthread_init instead
11748 of __register_pthread_fork_handler.
11749 * sysdeps/unix/sysv/linux/fork.h: Declare __libc_pthread_init instead
11750 of __register_pthread_fork_handler.
11751 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use
11752 __libc_locking_needed to determine whether lock prefix can be avoided.
11753 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
11755 2002-12-11 Ulrich Drepper <drepper@redhat.com>
11757 * Makefile (tests): Add tst-cleanup1.
11758 * tst-cleanup1.c: New file.
11759 * cancellation.c (__cleanup_thread): Removed.
11760 (__do_cancel): Remove call to __cleanup_thread.
11761 * pthreadP.h: Remove __cleanup_thread prorotype.
11763 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
11764 Remember function and argument even if cancellation handler
11765 function is not available.
11766 (__libc_cleanup_region_end): Execute registered function directly if
11767 pthread functions are not available.
11768 (__libc_cleanup_end): Likewise.
11770 * init.c (__pthread_initialize_minimal): Fix initialization in
11771 static lib by preventing gcc from being too clever.
11773 2002-12-10 Ulrich Drepper <drepper@redhat.com>
11775 * init.c (__pthread_initialize_minimal): Remove unneccesary
11778 * Makefile (tests): We can run tst-locale2 now.
11780 2002-12-09 Ulrich Drepper <drepper@redhat.com>
11782 * Versions: Remove duplicated sigwait entry.
11784 2002-12-08 Ulrich Drepper <drepper@redhat.com>
11786 * pthreadP.h: Enable pthread_cleanup_{push,pop} optimizations only
11789 * pt-fcntl.c (__fcntl): Initialize oldtype to avoid warning.
11791 * pthreadP.h: Declare __pthread_enable_asynccancel and
11792 __pthread_disable_asynccancel.
11793 (CANCEL_ASYNC): Use __pthread_enable_asynccancel.
11794 (CANCEL_RESET): Use __pthread_disable_asynccancel.
11795 * cancellation.c (__pthread_enable_asynccancel): New function.
11796 (__pthread_disable_asynccancel): New function.
11797 * pt-accept.c: Adjust for CANCEL_ASYNC and CANCEL_RESET change.
11798 * pt-close.c: Likewise.
11799 * pt-connect.c: Likewise.
11800 * pt-creat.c: Likewise.
11801 * pt-fcntl.c: Likewise.
11802 * pt-fsync.c: Likewise.
11803 * pt-lseek.c: Likewise.
11804 * pt-lseek64.c: Likewise.
11805 * pt-msgrcv.c: Likewise.
11806 * pt-msgsnd.c: Likewise.
11807 * pt-msync.c: Likewise.
11808 * pt-nanosleep.c: Likewise.
11809 * pt-open.c: Likewise.
11810 * pt-open64.c: Likewise.
11811 * pt-pause.c: Likewise.
11812 * pt-poll.c: Likewise.
11813 * pt-pread.c: Likewise.
11814 * pt-pread64.c: Likewise.
11815 * pt-pselect.c: Likewise.
11816 * pt-pwrite.c: Likewise.
11817 * pt-pwrite64.c: Likewise.
11818 * pt-read.c: Likewise.
11819 * pt-readv.c: Likewise.
11820 * pt-recv.c: Likewise.
11821 * pt-recvfrom.c: Likewise.
11822 * pt-recvmsg.c: Likewise.
11823 * pt-select.c: Likewise.
11824 * pt-send.c: Likewise.
11825 * pt-sendmsg.c: Likewise.
11826 * pt-sendto.c: Likewise.
11827 * pt-sigpause.c: Likewise.
11828 * pt-sigsuspend.c: Likewise.
11829 * pt-sigtimedwait.c: Likewise.
11830 * pt-sigwait.c: Likewise.
11831 * pt-sigwaitinfo.c: Likewise.
11832 * pt-system.c: Likewise.
11833 * pt-tcdrain.c: Likewise.
11834 * pt-wait.c: Likewise.
11835 * pt-waitid.c: Likewise.
11836 * pt-waitpid.c: Likewise.
11837 * pt-write.c: Likewise.
11838 * pt-writev.c: Likewise.
11839 * pthread_join.c: Likewise.
11840 * pthread_timedjoin.c: Likewise.
11842 * pt-sigpause.c (sigsuspend): Call __sigsuspend.
11843 (__xpg_sigpause): New function.
11844 * Versions (libpthread:GLIBC_2.3.2): Add __xpg_sigpause.
11846 2002-12-07 Ulrich Drepper <drepper@redhat.com>
11848 * Makefile (CFLAGS-ftrylockfile.c): Add -D_IO_MTSAFE_IO.
11850 * cleanup.c: Move declarations of _GI_pthread_cleanup_push and
11851 _GI_pthread_cleanup_pop to pthreadP.h.
11853 * ftrylockfile.c: Use _IO_lock_trylock instead of
11854 pthread_mutex_trylock.
11856 * pthreadP.h (CANCEL_ASYNC): Use __pthread_setcanceltype.
11857 (CANCEL_RESET): Likewise.
11858 (__pthread_setcanceltype_): Declare.
11859 (__pthread_mutex_lock_internal): Declare.
11860 (__pthread_mutex_unlock_internal): Declare.
11861 (__pthread_once_internal): Declare.
11862 (pthread_cleanup_push): Redefine using _GI_pthread_cleanup_push.
11863 (pthread_cleanup_pop): Redefine using _GI_pthread_cleanup_pop.
11865 * pthread_cond_timedwait.c: Use INTUSE is calls to pthread_mutex_lock
11866 and pthread_mutex_unlock.
11867 * pthread_cond_wait.c: Likewise.
11868 * pthread_mutex_lock.c: Use INTDEF to define alias if needed.
11869 * pthread_mutex_unlock.c: Likewise.
11871 * pthread_setcanceltype.c: Add additional alias
11872 __pthread_setcanceltype.
11874 * sem_unlink.c (sem_unlink): Use __pthread_once with INTDEF.
11875 * sem_open.c (sem_open): Likewise.
11876 Use __libc_open, __libc_write, and __libc_close instead of
11877 open, write, and close respectively.
11879 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_trylock_internal):
11880 Rewrite as statement expression since it must return a value.
11882 * pthread_cancel.c: Use __pthread_kill instead of pthread_kill.
11883 * sysdeps/unix/sysv/linux/pthread_kill.c: Define additional alias
11886 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Define additional
11887 alias __pthread_once_internal.
11889 * sysdeps/unix/sysv/linux/raise.c: Use libc_hidden_def for raise.
11891 2002-12-06 Ulrich Drepper <drepper@redhat.com>
11893 * Makefile (tests): Add tst-stdio1 and tst-stdio2.
11894 * tst-stdio1.c: New file.
11895 * tst-stdio2.c: New file.
11897 * init.c (__pthread_initialize_minimal): Correct INIT_LIST_HEAD use.
11899 * Makefile (tests): Comment out tst-locale2 for now.
11900 (CFLAGS-flockfile.c, CFLAGS-funlockfile.c): Define to -D_IO_MTSAFE_IO.
11902 * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-fork.c to
11904 * sysdeps/unix/sysv/linux/fork.c: Include <bits/stdio-lock.h>.
11905 Use _IO_lock_init instead of explicit assignment.
11907 * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
11908 Define __libc_lock_* and __libc_lock_recursive macros with
11909 lowlevellock macros, not pthread mutexes.
11911 * flockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_lock instead
11912 of pthread_mutex_lock.
11913 * funlockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_unlock
11914 instead of pthread_mutex_unlock.
11916 2002-12-06 Roland McGrath <roland@redhat.com>
11918 * allocatestack.c (__stack_user): Use uninitialized defn.
11919 * init.c (__pthread_initialize_minimal): Initialize it here.
11921 2002-12-05 Roland McGrath <roland@redhat.com>
11923 * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
11925 * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
11927 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Add
11928 missing & here too.
11930 2002-12-05 Ulrich Drepper <drepper@redhat.com>
11932 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
11934 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: New file.
11935 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: New file.
11936 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: New file.
11937 * sysdeps/pthread/bits/libc-lock.h: Use lowlevellock implementation
11938 for __libc_lock_* macros.
11939 * Makefile (routines): Add libc-lowlevellock.
11941 2002-10-09 Roland McGrath <roland@redhat.com>
11943 * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
11944 Under [__PIC__], call the function via the pointer fetched for
11945 comparison rather than a call by name that uses the PLT.
11946 (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
11947 (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
11948 (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
11949 (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
11950 (__libc_key_create, __libc_getspecific, __libc_setspecific): Use it.
11952 2002-12-04 Roland McGrath <roland@redhat.com>
11954 * forward.c (pthread_self): Use FORWARD3 macro to correct return type.
11956 * sysdeps/i386/td_ta_map_lwp2thr.c: Moved from ../nptl_db.
11957 * sysdeps/generic/td_ta_map_lwp2thr.c: New file.
11959 * pthread_create.c (start_thread): Add missing & on __nptl_last_event.
11961 2002-12-04 Ulrich Drepper <drepper@redhat.com>
11963 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Make pthread_t
11964 a completely opaque, non-integer type.
11965 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
11967 2002-12-05 Jakub Jelinek <jakub@redhat.com>
11969 * sysdeps/i386/tls.h: Include stdlib.h.
11970 * sysdeps/x86_64/tls.h: Likewise.
11972 2002-12-04 Ulrich Drepper <drepper@redhat.com>
11974 * Makefile (tests): Add tst-locale2.
11975 (tests-static): Likewise.
11976 * tst-locale2.c: New file.
11978 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Mark asms as
11979 volatile and add memory clobbers to lock operations.
11981 2002-12-03 Ulrich Drepper <drepper@redhat.com>
11983 * sysdeps/i386/i686/bits/atomic.h: Use i486 version.
11984 * sysdeps/i386/i486/bits/atomic.h: New file.
11985 * sysdeps/i386/i586/bits/atomic.h: New file.
11986 * sysdeps/i386/i686/pthread_spin_trylock.S: Define HAVE_CMOV and
11987 include i486 version.
11988 * sysdeps/i386/i486/pthread_spin_trylock.S: New file.
11989 * sysdeps/i386/i586/pthread_spin_trylock.S: New file.
11990 Patch by Marijn Ros <marijn@mad.scientist.com>.
11992 * allocatestack.c (get_cached_stack): Don't crash if we first
11993 found a stack with a larger size then needed.
11994 Reported by Hui Huang <hui.huang@sun.com>.
11996 * Makefile (tests): Add tst-sysconf.
11997 * tst-sysconf.c: New file.
11999 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine
12000 PTHREAD_THREADS_MAX.
12002 2002-12-02 Roland McGrath <roland@redhat.com>
12004 * pthreadP.h (__stack_user, __nptl_create_event, __nptl_death_event):
12005 Declare using hidden_proto instead of attribute_hidden, so there are
12006 non-.hidden static symbols for gdb to find.
12007 (__pthread_keys): Likewise.
12008 * events.c (__nptl_create_event, __nptl_death_event): Add hidden_def.
12009 * allocatestack.c (__stack_user): Likewise.
12010 * pthread_create.c (__pthread_keys): Likewise.
12011 (__nptl_threads_events, __nptl_last_event): Make these static instead
12013 * pthread_key_create.c (__pthread_pthread_keys_max,
12014 __pthread_pthread_key_2ndlevel_size): Renamed from __linuxthreads_*.
12016 2002-12-02 Ulrich Drepper <drepper@redhat.com>
12018 * Makefile (tests): Add tst-locale1. If buid-static is yes link
12020 * tst-locale1.c: New file.
12022 * pthread_cond_timedwait.c: Include <stdlib.h>.
12024 * Makefile (tests): Add tst-fork2 and tst-fork3.
12025 * tst-fork2.c: New file.
12026 * tst-fork3.c: New file.
12028 2002-11-28 Ulrich Drepper <drepper@redhat.com>
12030 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
12032 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
12033 require it to 200112L.
12035 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Use cmov
12036 instruction only if HAVE_CMOV is defined.
12037 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Define HAVE_CMOV.
12039 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: New file.
12041 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: New file.
12043 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: New file.
12045 * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: New file.
12047 2002-11-27 Ulrich Drepper <drepper@redhat.com>
12049 * sysdeps/x86_64/bits/atomic.h: New file.
12051 * sysdeps/i386/i686/bits/atomic.h: Fix asm syntax for 8- and
12054 * sysdeps/unix/sysv/linux/raise.c (raise): Use INTERNAL_SYSCALL if
12055 possible since gettid cannot fail.
12057 * sysdeps/x86_64/pthreaddef.h: New file.
12059 * sysdeps/i386/pthreaddef.h (gettid): Removed.
12061 * sysdeps/x86_64/pthread_spin_init.c: New file.
12062 * sysdeps/x86_64/pthread_spin_lock.c: New file.
12063 * sysdeps/x86_64/pthread_spin_trylock.c: New file.
12064 * sysdeps/x86_64/pthread_spin_unlock.c: New file.
12066 * sysdeps/i386/i686/pthread_spin_trylock.S (pthread_spin_trylock):
12067 Add missing lock prefix. Minute optimization.
12069 * tst-spin2.c (main): Also check successful trylock call.
12071 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use correct
12072 syscall. Fix typo in case INTERNAL_SYSCALL is not used.
12074 * sysdeps/i386/pthread_spin_destroy.c: Moved to...
12075 * sysdeps/pthread/pthread_spin_destroy.c: ...here. New file.
12077 * sysdeps/i386/pthread_sigmask.c: Removed. Use the generic code.
12078 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Return correct
12079 value in case of an error. Add support for INTERNAL_SYSCALL.
12081 * sysdeps/i386/pthread_sigmask.c (pthread_sigmask): Return correct
12082 value in case of an error.
12084 * sysdeps/x86_64/tls.h: New file.
12086 2002-11-26 Ulrich Drepper <drepper@redhat.com>
12088 * sysdeps/i386/tls.h (THREAD_GETMEM_NC): Change interface. It now
12089 takes the array member name and the index as parameters.
12090 (THREAD_SETMEM_NC): Likewise.
12091 * pthread_getspecific.c: Use new THREAD_GETMEM_NC interface.
12092 * pthread_setspecific.c: Use new THREAD_GETMEM_NC and THREAD_SETMEM_NC
12095 * sysdeps/i386/tls.h (THREAD_SETMEM): Use size of member element
12096 to decide which code to use.
12097 (THREAD_SETMEM_NC): Likewise.
12099 * allocatestack.c (queue_stack): Don't remove stack from list here.
12100 Do it in the caller. Correct condition to prematurely terminate
12101 loop to free stacks.
12102 (__deallocate_stack): Remove stack from list here.
12104 2002-11-26 Ulrich Drepper <drepper@redhat.com>
12106 * Makefile (tests): Add tst-stack1.
12107 * tst-stack1.c: New file.
12109 * allocatestack.c (allocate_stack): Initialize the TCB on a user
12112 * pthread_attr_getstack.c: Return bottom of the thread area.
12114 2002-11-25 Ulrich Drepper <drepper@redhat.com>
12116 * Makefile (libpthread-routines): Add pt-allocrtsig and
12117 pthread_kill_other_threads.
12118 * pt-allocrtsig.c: New file.
12119 * pthread_kill_other_threads.c: New file.
12120 * sysdeps/unix/sysv/linux/allocrtsig.c: Add additional aliases for
12121 all three functions.
12122 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
12124 * sysdeps/unix/sysv/linux/Versions (libc:GLIBC_PRIVATE): Export
12125 __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
12126 and __libc_allocate_rtsig_private.
12127 * Versions (libpthread): Export pthread_kill_other_threads_np,
12128 __libc_current_sigrtmin, and __libc_current_sigrtmax.
12130 2002-11-24 Ulrich Drepper <drepper@redhat.com>
12132 * allocatestack.c (allocate_stack): stackaddr in attribute points to
12133 the end of the stack. Adjust computations.
12134 When mprotect call fails dequeue stack and free it.
12135 * pthread_attr_setstack.c: Store top of the stack in stackaddr
12137 * pthread_getattr_np.c: Likewise.
12139 * descr.h (IS_DETACHED): Add some more parenthesis to prevent
12142 2002-11-23 Ulrich Drepper <drepper@redhat.com>
12144 * sysdeps/pthread/pthread.h (pthread_self): __THROW must come before
12145 attribute definitions. Patch by Luca Barbieri <ldb@ldb.ods.org>.
12147 2002-11-22 Ulrich Drepper <drepper@redhat.com>
12149 * pthread_getspecific.c: Optimize access to first 2nd-level array.
12150 * pthread_setspecific.c: Likewise.
12152 2002-11-21 Ulrich Drepper <drepper@redhat.com>
12154 * sysdeps/unix/sysv/linux/i386/createthread.c: Remove CLONE_ flags
12155 definitions. Get them from the official place.
12156 * sysdeps/unix/sysv/linux/i386/fork.c: Likewise.
12158 * sysdeps/unix/sysv/linux/i386/createthread.c: Update CLONE_* flags.
12159 Use new CLONE_ flags in clone() calls.
12161 * sysdeps/unix/sysv/linux/fork.c: Use ARCH_FORK to actually fork.
12162 * sysdeps/unix/sysv/linux/i386/fork.c: New file.
12164 * Versions: Add pthread_* functions for libc.
12165 * forward.c: New file.
12167 * sysdeps/pthread/Makefile (libpthread-sysdeps_routines): Add
12169 * herrno.c: New file.
12172 * Makefile (libpthread-routines): Remove sem_post, sem_wait,
12173 sem_trywait, and sem_timedwait. Add herrno and res.
12174 * sem_init.c: Don't initialize lock and waiters members.
12175 * sem_open.c: Likewise.
12176 * sem_post.c: Removed.
12177 * sem_wait.c: Removed.
12178 * sem_trywait.c: Removed.
12179 * sem_timedwait.c: Removed.
12180 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Complete rewrite.
12181 Includes full implementations of sem_post, sem_wait, sem_trywait,
12183 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Adjust
12184 for new implementation.
12185 * sysdeps/unix/sysv/linux/internaltypes.h (struct sem): Remove lock
12186 and waiters fields.
12188 * tst-sem3.c: Improve error message.
12189 * tst-signal3.c: Likewise.
12191 * init.c (__pthread_initialize_minimal): Use set_tid_address syscall
12192 to tell the kernel about the termination futex and to initialize tid
12193 member. Don't initialize main_thread.
12194 * descr.h (struct pthread): Remove main_thread member.
12195 * cancelllation.c (__do_cancel): Remove code handling main thread.
12196 The main thread is not special anymore.
12198 * allocatestack.c (__reclaim_stacks): Mark stacks as unused. Add
12199 size of the stacks to stack_cache_actsize.
12201 * pt-readv.c: Add missing "defined".
12202 * pt-sigwait.c: Likewise.
12203 * pt-writev.c: Likewise.
12205 2002-11-09 Ulrich Drepper <drepper@redhat.com>
12207 * Versions: Export __connect from libpthread.
12208 Patch by Luca Barbieri <ldb@ldb.ods.org>.
12210 * Makefile (libpthread-routines): Add pt-raise.
12211 * sysdeps/unix/sysv/linux/raise.c: New file.
12212 * sysdeps/unix/sysv/linux/pt-raise.c: New file.
12213 * sysdeps/generic/pt-raise.c: New file.
12215 * pthread_cond_init.c: Initialize all data elements of the condvar
12216 structure. Patch by Luca Barbieri <ldb@ldb.ods.org>.
12218 * pthread_attr_init.c: Actually implement 2.0 compatibility version.
12219 * pthread_create.c: Likewise.
12221 * Makefile (tests): Add tst-key1, tst-key2, tst-key3.
12222 * tst-key1.c: New file.
12223 * tst-key2.c: New file.
12224 * tst-key3.c: New file.
12226 * Versions: Export pthread_detach for version GLIBC_2.0.
12227 Reported by Saurabh Desai <sdesai@austin.ibm.com>.
12229 2002-11-08 Ulrich Drepper <drepper@redhat.com>
12231 * pthread_key_create.c: Terminate search after an unused key was found.
12232 Patch by Luca Barbieri <ldb@ldb.ods.org>.
12234 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Return zero.
12235 Patch by Luca Barbieri <ldb@ldb.ods.org>.
12237 2002-10-10 Ulrich Drepper <drepper@redhat.com>
12239 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Use slow generic
12240 dynamic lookup for errno in PIC.
12242 * allocatestack.c (get_cached_stack): Rearrange code slightly to
12243 release the stack lock as soon as possible.
12244 Call _dl_allocate_tls_init for TCB from the cache to re-initialize
12245 the static TLS block.
12246 (allocate_stack): Call _dl_allocate_tls_init for user-provided stack.
12248 * cancellation.c: Renamed from cancelation.c.
12249 * Makefile: Adjust accordingly.
12250 * pthreadP.h (CANCELLATION_P): Renamed from CANCELATION_P.
12251 * cleanup_defer.c: Use CANCELLATION_P.
12252 * pthread_testcancel.c: Likewise.
12253 * descr.h: Fix spelling in comments.
12254 * init.c: Likewise.
12255 * pthread_getattr_np.c: Likewise.
12256 * pthread_getschedparam.c: Likewise.
12257 * pthread_setschedparam.c: Likewise.
12258 * Versions: Likewise.
12260 * pt-pselect.c: New file.
12261 * Makefile (libpthread-routines): Add pt-pselect.
12262 * Versions: Add pselect.
12264 * tst-cancel4.c: New file.
12265 * Makefile (tests): Add tst-cancel4.
12267 2002-10-09 Ulrich Drepper <drepper@redhat.com>
12269 * pthread_mutex_lock.c: Always record lock ownership.
12270 * pthread_mutex_timedlock.c: Likewise.
12271 * pthread_mutex_trylock.c: Likewise.
12273 * pt-readv.c: New file.
12274 * pt-writev.c: New file.
12275 * pt-creat.c: New file.
12276 * pt-msgrcv.c: New file.
12277 * pt-msgsnd.c: New file.
12278 * pt-poll.c: New file.
12279 * pt-select.c: New file.
12280 * pt-sigpause.c: New file.
12281 * pt-sigsuspend.c: New file.
12282 * pt-sigwait.c: New file.
12283 * pt-sigwaitinfo.c: New file.
12284 * pt-waitid.c: New file.
12285 * Makefile (libpthread-routines): Add pt-readv, pt-writev, pt-creat,
12286 pt-msgrcv, pt-msgsnd, pt-poll, pt-select, pt-sigpause, pt-sigsuspend,
12287 pt-sigwait, pt-sigwaitinfo, and pt-waitid.
12288 * Versions: Add all the new functions.
12290 * tst-exit1.c: New file.
12291 * Makefile (tests): Add tst-exit1.
12293 * sem_timedwait.c: Minor optimization for more optimal fastpath.
12295 2002-10-08 Ulrich Drepper <drepper@redhat.com>
12297 * pt-fcntl.c: Only enable asynchronous cancellation for F_SETLKW.
12299 * pthread_join.c: Enable asynchronous cancellation around lll_wait_tid
12300 call. pthread_join is an official cancellation point.
12301 * pthread_timedjoin.c: Likewise.
12303 * pthread_cond_wait.c: Revert order in which internal lock are dropped
12304 and the condvar's mutex are retrieved.
12305 * pthread_cond_timedwait.c: Likewise.
12306 Reported by dice@saros.East.Sun.COM.
12308 2002-10-07 Ulrich Drepper <drepper@redhat.com>
12310 * pthreadP.h: Cut out all type definitions and move them...
12311 * sysdeps/unix/sysv/linux/internaltypes.h: ...here. New file.
12312 * pthreadP.h: Include <internaltypes.h>.
12314 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Little
12315 performance tweaks.
12317 * sem_trywait.c: Shuffle #includes around to get right order.
12318 * sem_timedwait.c: Likewise.
12319 * sem_post.c: Likewise.
12320 * sem_wait.c: Likewise.
12322 * nptl 0.3 released.
12324 * Makefile (tests): Add tst-signal3.
12325 * tst-signal3.c: New file.
12327 2002-10-05 Ulrich Drepper <drepper@redhat.com>
12329 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Tell the compiler that
12330 the asms modify the sem object.
12331 (__lll_sem_timedwait): Now takes struct sem* as first parameter.
12333 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h (sem_t): Don't expose
12334 the actual members.
12335 * pthreadP.h (struct sem): New type. Actual semaphore type.
12336 * semaphoreP.h: Include pthreadP.h.
12337 * sem_getvalue.c: Adjust to sem_t change.
12338 * sem_init.c: Likewise.
12339 * sem_open.c: Likewise.
12340 * sem_post.c: Likewise.
12341 * sem_timedwait.c: Likewise.
12342 * sem_trywait.c: Likewise.
12343 * sem_wait.c: Likewise.
12345 2002-10-04 Ulrich Drepper <drepper@redhat.com>
12347 * Makefile (tests): Add tst-basic2, tst-exec1, tst-exec3, tst-exec3.
12348 * tst-basic2.c: New file.
12349 * tst-exec1.c: New file.
12350 * tst-exec2.c: New file.
12351 * tst-exec3.c: New file.
12353 * tst-fork1.c: Remove extra */.
12355 * nptl 0.2 released. The API for IA-32 is complete.