]> git.ipfire.org Git - thirdparty/glibc.git/blob - nptl/ChangeLog
Hide reference to mktemp in libpthread
[thirdparty/glibc.git] / nptl / ChangeLog
1 2013-01-16 Andreas Schwab <schwab@suse.de>
2
3 [BZ #14327]
4 * sem_open.c (sem_open): Use __mktemp instead of mktemp.
5
6 2013-01-11 Carlos O'Donell <codonell@redhat.com>
7
8 * allocatestack.c (allocate_stack): Add comment. Remove assert
9 on attr.
10
11 2013-01-11 H.J. Lu <hongjiu.lu@intel.com>
12
13 * Makefile (tst-cancel7-ARGS: Replace $(host-built-program-cmd)
14 with $(host-test-program-cmd).
15 (tst-exec4-ARGS): Likewise.
16 (tst-stackguard1-ARGS): Likewise.
17 ($(objpfx)tst-tls6.out): Don't pass $(elf-objpfx) to tst-tls6.sh.
18 Replace $(rtld-installed-name) with $(test-via-rtld-prefix).
19 * tst-tls6.sh (elf_objpfx): Removed.
20 (rtld_installed_name): Renamed to ...
21 (test_via_rtld_prefix): This.
22 (tst_tls5): Prepend ${test_via_rtld_prefix}.
23
24 2013-01-02 Joseph Myers <joseph@codesourcery.com>
25
26 * All files with FSF copyright notices: Update copyright dates
27 using scripts/update-copyrights.
28
29 2013-01-01 Joseph Myers <joseph@codesourcery.com>
30
31 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Reformat
32 copyright notice.
33
34 2012-12-28 Andi Kleen <ak@linux.intel.com>
35
36 * pthread_rwlock_tryrdlock.c (__pthread_rwlock_tryrdlock): Convert
37 to prototype.
38 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock):
39 Likewise.
40
41 2012-12-27 David S. Miller <davem@davemloft.net>
42
43 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h
44 (lll_futex_timed_wait_bitset): New macro.
45
46 2012-12-27 Siddhesh Poyarekar <siddhesh@redhat.com>
47
48 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (SYS_futex):
49 Remove definition.
50 (lll_futex_timed_wait): Replace assembly code with
51 INTERNAL_SYSCALL.
52 (lll_futex_timed_wait_bitset): Likewise.
53 (lll_futex_wake): Likewise.
54 (lll_futex_requeue): Likewise.
55 (lll_futex_wake_unlock): Likewise.
56
57 2012-12-08 Siddhesh Poyarekar <siddhesh@redhat.com>
58
59 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind):
60 Declare LOCAL_VAR as char.
61
62 2012-12-04 Joseph Myers <joseph@codesourcery.com>
63
64 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__old_sem_post):
65 Cast result of atomic_increment_val to (void) instead of storing
66 in otherwise-unused variable.
67
68 2012-12-03 Allan McRae <allan@archlinux.org>
69
70 * Makefile (LDFLAGS-tst-cond24, LDFLAGS-tst-cond25): Remove.
71
72 2012-11-26 H.J. Lu <hongjiu.lu@intel.com>
73
74 * unwind.c (__pthread_unwind): Pass address of unwind_cleanup
75 to THREAD_SETMEM.
76 * sysdeps/i386/tls.h: Include <libc-internal.h>.
77 (THREAD_SETMEM): Use cast_to_integer before casting to uint64_t.
78 (THREAD_SETMEM_NC): Likewise.
79 * sysdeps/x86_64/tls.h: Include <libc-internal.h>.
80 (THREAD_SETMEM): Use cast_to_integer before casting to uint64_t.
81 (THREAD_SETMEM_NC): Likewise.
82
83 2012-11-21 Joseph Myers <joseph@codesourcery.com>
84
85 * sysdeps/unix/sysv/linux/sem_post.c (__old_sem_post): Cast result
86 of atomic_increment_val to (void) instead of storing in
87 otherwise-unused variable.
88
89 * pthread_cond_timedwait.c (__pthread_cond_timedwait)
90 [__NR_clock_gettime]: Cast result of INTERNAL_VSYSCALL to void
91 instead of storing in otherwise-unused variable.
92
93 2012-11-14 Marcus Shawcroft <marcus.shawcroft@linaro.org>
94
95 * Makefile (CFLAGS-open.c, CFLAGS-open64.c, CFLAGS-pause.c)
96 (CFLAGS-recv.c, CFLAGS-send.c): Define.
97
98 2012-11-06 Chris Metcalf <cmetcalf@tilera.com>
99
100 * tst-sem14.c (TIMEOUT): Set timeout to 10 seconds.
101 * tst-cond24.c (TIMEOUT): Increase from 10 to 20 seconds.
102
103 2012-11-05 Siddhesh Poyarekar <siddhesh@redhat.com>
104
105 * pthread_cond_timedwait.c (__pthread_cond_timedwait): Time out
106 if absolute timeout is negative.
107 [__ASSUME_FUTEX_CLOCK_REALTIME &&
108 lll_futex_timed_wait_bitset]: Use lll_futex_timed_wait_bitset.
109 * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock):
110 Likewise.
111 * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock):
112 Likewise.
113 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
114 (__lll_robust_timedlock_wait): Likewise.
115 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
116 (lll_futex_timed_wait_bitset): New macro.
117 * sysdeps/unix/sysv/linux/s390/lowlevellock.h
118 (lll_futex_timed_wait_bitset): Likewise.
119
120 2012-11-03 David S. Miller <davem@davemloft.net>
121
122 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (BUSY_WAIT_NOP):
123 Add missing spaces.
124 (__cpu_relax): Likewise.
125
126 2012-11-02 H.J. Lu <hongjiu.lu@intel.com>
127
128 * sysdeps/x86_64/tls.h: Don't include <xmmintrin.h>.
129 (__128bits): New struct typedef.
130 (tcbhead_t): Replace __m128 with __128bits.
131
132 2012-10-30 Aurelien Jarno <aurelien@aurel32.net>
133 Joseph Myers <joseph@codesourcery.com>
134
135 * Makefile (tst-cancel7-ARGS): Use exec in --command argument.
136
137 2012-10-28 David S. Miller <davem@davemloft.net>
138
139 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (BUSY_WAIT_NOP):
140 Define when we have v9 instructions available.
141 * sysdeps/unix/sysv/linux/sparc/sparc64/cpu_relax.S: New file.
142 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/cpu_relax.S: New
143 file.
144 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/Makefile: New
145 file.
146 * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: Add cpu_relax
147 to libpthread-routines.
148
149 2012-10-25 Roland McGrath <roland@hack.frob.com>
150
151 * tst-cond-except.c (TEST_FUNCTION): New macro.
152
153 2012-10-25 Joseph Myers <joseph@codesourcery.com>
154
155 * Makefile ($(objpfx)tst-tls6.out): Use $(BASH) not $(SHELL) to
156 run tst-tls6.sh.
157 * tst-tls6.sh: Use /bin/bash not /bin/sh.
158
159 2012-10-25 Roland McGrath <roland@hack.frob.com>
160
161 * tst-basic2.c (do_test): Return RESULT, not always zero.
162
163 * tst-cond25.c: Include <stdint.h>
164 (waiter): Add casts to uintptr_t between casting integer<->pointer.
165 (timed_waiter): Likewise.
166 (do_test_wait): Likewise.
167 * tst-cond-except.c (thr): Likewise.
168 (do_test): Use prototype definition.
169
170 2012-10-24 Joseph Myers <joseph@codesourcery.com>
171 Jim Blandy <jimb@codesourcery.com>
172
173 * Makefile ($(objpfx)tst-tls6.out): Pass $(test-wrapper-env) to
174 tst-tls6.sh.
175 * tst-tls6.sh (test_wrapper_env): New variable. Use it to run
176 programs with LD_PRELOAD set.
177
178 2012-10-24 Roland McGrath <roland@hack.frob.com>
179
180 * Makefile ($(objpfx)tst-cond11, $(objpfx)tst-cond19): Targets removed.
181 ($(objpfx)tst-sem5, $(objpfx)tst-cancel18): Likewise.
182 ((objpfx)tst-cancelx18, $(objpfx)tst-clock2): Likewise.
183 ($(objpfx)tst-rwlock14): Likewise.
184
185 2012-10-24 Joseph Myers <joseph@codesourcery.com>
186
187 * Makefile (tests): Remove tst-oddstacklimit.
188 (test-srcs): New variable.
189 (tst-oddstacklimit-ENV): Remove.
190 [$(run-built-tests) = yes] (tests): Depend on
191 $(objpfx)tst-oddstacklimit.out.
192 [$(run-built-tests) = yes] ($(objpfx)tst-oddstacklimit.out): New
193 target.
194 * tst-oddstacklimit.c: Do not include "tst-basic1.c". Use
195 setrlimit before executing tst-basic1 test passed to --command.
196
197 2012-10-23 Joseph Myers <joseph@codesourcery.com>
198
199 * Makefile [$(cross-compiling) = no]: Change condition to
200 [$(run-built-tests) = yes].
201
202 2012-10-23 Jim Blandy <jimb@codesourcery.com>
203 Joseph Myers <joseph@codesourcery.com>
204
205 * Makefile (tst-cancel7-ARGS): Use $(host-built-program-cmd).
206 (tst-exec4-ARGS): Likewise.
207 (tst-stackguard1-ARGS): Likewise.
208
209 2012-10-21 Jim Blandy <jimb@codesourcery.com>
210 Joseph Myers <joseph@codesourcery.com>
211
212 * Makefile ($(objpfx)tst-cancel-wrappers.out): Pass $(NM) to
213 tst-cancel-wrappers.sh.
214 * tst-cancel-wrappers.sh: Use nm program given as first argument,
215 not hardcoded "nm".
216
217 2012-10-17 Siddhesh Poyarekar <siddhesh@redhat.com>
218
219 * tst-cond25.c (do_test_wait): Don't check for return value from
220 pthread_cancel.
221
222 2012-10-16 Siddhesh Poyarekar <siddhesh@redhat.com>
223
224 [BZ #14652]
225 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
226 (__condvar_tw_cleanup): Adjust the mutex data structure if it
227 was locked by FUTEX_WAIT_REQUEUE_PI.
228 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait
229 (__condvar_w_cleanup): Likewise.
230 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
231 (__condvar_cleanup2): Likewise.
232 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
233 (__condvar_cleanup1): Likewise.
234
235 2012-10-10 Carlos O'Donell <carlos@systemhalted.org>
236
237 * sysdeps/pthread/pthread.h [!(defined __GNUC__ &&
238 defined __EXCEPTIONS) && defined __USE_GNU]
239 (pthread_cleanup_push_defer_np): Fix formatting.
240
241 2012-10-10 Siddhesh Poyarekar <siddhesh@redhat.com>
242
243 [BZ #14652]
244 * Makefile (tests): New test case tst-cond25.
245 (LDFLAGS-tst-cond25): Link tst-cond25 against librt.
246 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
247 (__condvar_tw_cleanup): Lock mutex only if we don't already
248 own it.
249 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
250 (__condvar_w_cleanup): Likewise.
251 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: Add TID_MASK.
252 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
253 (__condvar_cleanup2): Lock mutex only if we don't already
254 own it.
255 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
256 (__condvar_cleanup1): Likewise.
257 * tst-cond25.c: New test case.
258
259 2012-10-09 Roland McGrath <roland@hack.frob.com>
260
261 * sysdeps/pthread/configure: Regenerated.
262 * sysdeps/x86_64/configure: Regenerated.
263
264 2012-10-05 David S. Miller <davem@davemloft.net>
265
266 [BZ #14568]
267 * sysdeps/sparc/tls.h (DB_THREAD_SELF_INCLUDE): Delete.
268 (DB_THREAD_SELF): Use constants for the register offsets. Correct
269 the case of a 64-bit debugger with a 32-bit inferior.
270
271 2012-10-05 H.J. Lu <hongjiu.lu@intel.com>
272
273 [BZ #14557]
274 * Makefile (tests-static): Add tst-cancel24-static,
275 tst-cond8-static tst-mutex8-static, tst-mutexpi8-static,
276 tst-sem11-static and tst-sem12-static.
277 (tests): Likewise.
278 (LDLIBS-tst-cancel24-static): New macro.
279 * tst-cancel24-static.cc: New file.
280 * tst-cond8-static.c: Likewise.
281 * tst-mutex8-static.c: Likewise.
282 * tst-mutexpi8-static.c: Likewise.
283 * tst-sem11-static.c: Likewise.
284 * tst-sem12-static.c: Likewise.
285
286 2012-10-05 Siddhesh Poyarekar <siddhesh@redhat.com>
287
288 [BZ #14417]
289 * Makefile (tests): New test case tst-cond24.
290 (LDFLAGS-tst-cond24): Link tst-cond24 against librt.
291 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
292 (__pthread_cond_timedwait): Unlock mutex before going back to
293 wait in PI case.
294 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
295 (__pthread_cond_wait): Likewise. Revert handling of EAGAIN
296 return from futex_wait.
297 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
298 (__pthread_cond_timedwait): Unlock mutex before going back to
299 wait in PI case. Set requeue_pi flag only if wait returned 0.
300 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
301 (__pthread_cond_wait): Likewise. Revert handling of EAGAIN
302 return from futex_wait.
303 * tst-cond24.c: New test case.
304
305 2012-10-04 Roland McGrath <roland@hack.frob.com>
306
307 * pthread_create.c (start_thread): Use __madvise, not madvise.
308
309 2012-10-02 H.J. Lu <hongjiu.lu@intel.com>
310
311 * sysdeps/i386/tls.h: Update copyright years.
312
313 2012-10-02 Siddhesh Poyarekar <siddhesh@redhat.com>
314
315 * pthread_create.c (start_thread): Fix clone flag name in
316 comment to CLONE_CHILD_CLEARTID.
317 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
318 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
319 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
320 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
321 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
322 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
323
324 2012-10-01 Siddhesh Poyarekar <siddhesh@redhat.com>
325
326 [BZ #14477]
327 * Makefile (tests): Add tst-cond-except.
328 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
329 (__pthread_cond_timedwait): Mark instructions where %ebx is
330 incremented in PI case.
331 (.gcc_except_table): Add entry to jump to __condvar_tw_cleanup2
332 for the marked PI case instructions.
333 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
334 (__pthread_cond_wait): Mark instructions where %ebx is
335 incremented in PI case.
336 (.gcc_except_table): Add entry to jump to __condvar_w_cleanup2
337 for the marked PI case instructions.
338 * tst-cond-except.c: New test case.
339
340 2012-09-24 Dmitry V. Levin <ldv@altlinux.org>
341
342 * tst-tls6.sh: Add "set -e".
343 * Makefile: Do not specify -e option when running testsuite
344 shell scripts.
345
346 * tst-tls6.sh: Add copyright header.
347
348 2012-09-24 H.J. Lu <hongjiu.lu@intel.com>
349
350 * sysdeps/x86_64/tls.h (THREAD_SETMEM): Add "()" when casting
351 to uint64_t for 64-bit store.
352 (THREAD_SETMEM_NC): Likewise.
353
354 2012-09-19 H.J. Lu <hongjiu.lu@intel.com>
355
356 * sysdeps/i386/tls.h (THREAD_SETMEM): Cast to uint64_t for
357 64-bit store.
358 (THREAD_SETMEM_NC): Likewise.
359
360 2012-09-14 Jeff Law <law@redhat.com>
361
362 [BZ #14583]
363 * sysdeps/pthread/pthread.h: Fix prototype of __sigsetjmp.
364
365 2012-09-13 H.J. Lu <hongjiu.lu@intel.com>
366
367 [BZ #14576]
368 * sysdeps/pthread/bits/libc-lockP.h (__rtld_lock_init_recursive):
369 Removed.
370
371 2012-09-07 H.J. Lu <hongjiu.lu@intel.com>
372
373 * Makefile (LDFLAGS-tst-cancel24): Renamed to ...
374 (LDLIBS-tst-cancel24): This.
375
376 2012-09-06 H.J. Lu <hongjiu.lu@intel.com>
377
378 [BZ #14545]
379 * Makefile (tests-static): Add tst-cancel21-static.
380 (tests): Likewise.
381 * tst-cancel21-static.c: New file.
382
383 2012-09-01 Joseph Myers <joseph@codesourcery.com>
384
385 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c
386 [!__ASSUME_POSIX_CPU_TIMERS]: Remove conditional code.
387 [__NR_clock_getres]: Make code unconditional.
388 (pthread_getcpuclockid): Remove code left unreachable by removal
389 of conditionals.
390
391 2012-08-31 Joseph Myers <joseph@codesourcery.com>
392
393 [BZ #14532]
394 * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Use
395 atomic_compare_and_exchange_bool_rel.
396 * tst-sem14.c: New file.
397 * Makefile (tests): Add tst-sem14.
398
399 2012-08-15 Roland McGrath <roland@hack.frob.com>
400
401 * Makefile (CFLAGS-flockfile.c): Use $(libio-mtsafe) instead
402 of -D_IO_MTSAFE_IO.
403 (CFLAGS-ftrylockfile.c, CFLAGS-funlockfile.c): Likewise.
404 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-fork.c): Likewise.
405
406 2012-08-16 Joseph Myers <joseph@codesourcery.com>
407
408 * pthread_cond_timedwait.c (__pthread_cond_timedwait)
409 [!__ASSUME_POSIX_TIMERS]: Remove conditional code.
410 * pthread_condattr_setclock.c (pthread_condattr_setclock)
411 [!__ASSUME_POSIX_TIMERS]: Likewise.
412 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
413 (__pthread_cond_timedwait) [!__ASSUME_POSIX_TIMERS]: Likewise.
414 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c
415 [!__ASSUME_POSIX_TIMERS]: Likewise.
416 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
417 (__pthread_cond_timedwait) [!__ASSUME_POSIX_TIMERS]: Likewise.
418 * sysdeps/unix/sysv/linux/timer_create.c [__NR_timer_create]: Make
419 code unconditional.
420 [!__NR-timer_create]: Remove conditional code.
421 (timer_create) [!__ASSUME_POSIX_TIMERS]: Likewise.
422 * sysdeps/unix/sysv/linux/timer_delete.c [__NR_timer_delete]: Make
423 code unconditional.
424 [!__NR_timer_delete]: Remove conditional code.
425 (timer_delete) [!__ASSUME_POSIX_TIMERS]: Likewise.
426 * sysdeps/unix/sysv/linux/timer_getoverr.c
427 [__NR_timer_getoverrun]: Make code unconditional.
428 [!__NR_timer_getoverrun]: Remove conditional code.
429 (timer_getoverrun) [!__ASSUME_POSIX_TIMERS]: Likewise.
430 * sysdeps/unix/sysv/linux/timer_gettime.c [__NR_timer_gettime]:
431 Make code unconditional.
432 [!__NR_timer_gettime]: Remove conditional code.
433 (timer_gettime) [!__ASSUME_POSIX_TIMERS]: Likewise.
434 * sysdeps/unix/sysv/linux/timer_routines.c [__NR_timer_create]:
435 Make code unconditional.
436 [!__ASSUME_POSIX_TIMERS]: Remove conditional code.
437 * sysdeps/unix/sysv/linux/timer_settime.c [__NR_timer_settime]:
438 Make code unconditional.
439 [!__NR_timer_settime]: Remove conditional code.
440 (timer_settime) [!__ASSUME_POSIX_TIMERS]: Likewise.
441 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
442 (__pthread_cond_timedwait) [!__ASSUME_POSIX_TIMERS]: Remove
443 conditional code.
444
445 2012-08-15 Tom de Vries <vries@codesourcery.com>
446 Maxim Kuvyrkov <maxim@codesourcery.com>
447
448 * sysdeps/pthread/bits/libc-lockP.h (__libc_lock_lock)
449 (__libc_lock_trylock): Allow pre-existing definitions.
450
451 2012-08-15 Maxim Kuvyrkov <maxim@codesourcery.com>
452
453 * pthread_spin_lock.c: New file.
454 * pthread_spin_trylock.c: New file.
455
456 2012-08-08 Joseph Myers <joseph@codesourcery.com>
457
458 * allocatestack.c (setxid_signal_thread) [__ASSUME_TGKILL]: Make
459 code unconditional.
460 (setxid_signal_thread) [!__ASSUME_TGKILL]: Remove conditional code.
461 * pthread_cancel.c (pthread_cancel) [__ASSUME_TGKILL]: Make code
462 unconditional.
463 (pthread_cancel) [!__ASSUME_TGKILL]: Remove conditional code.
464 * sysdeps/pthread/createthread.c (do_clone) [__ASSUME_TGKILL]:
465 Make code unconditional.
466 (do_clone) [!__ASSUME_TGKILL]: Remove conditional code.
467 * sysdeps/unix/sysv/linux/pt-raise.c (raise) [__ASSUME_TGKILL ||
468 __NR_tgkill]: Make code unconditional.
469 (raise) [__ASSUME_TGKILL]: Likewise.
470 (raise) [!__ASSUME_TGKILL]: Remove conditional code.
471 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill)
472 [__ASSUME_TGKILL]: Make code unconditional.
473 (__pthread_kill) [!__ASSUME_TGKILL]: Remove conditional code.
474 * sysdeps/unix/sysv/linux/raise.c (raise) [__ASSUME_TGKILL ||
475 __NR_tgkill]: Make code unconditional.
476 (raise) [__ASSUME_TGKILL]: Likewise.
477 (raise) [!__ASSUME_TGKILL]: Remove conditional code.
478
479 2012-08-07 Joseph Myers <joseph@codesourcery.com>
480
481 * sysdeps/pthread/createthread.c (create_thread)
482 [!__ASSUME_NO_CLONE_DETACHED]: Remove conditional code.
483
484 2012-08-03 Joseph Myers <joseph@codesourcery.com>
485
486 * nptl-init.c (sigcancel_handler) [__ASSUME_CORRECT_SI_PID]: Make
487 code unconditional.
488 (sighandler_setxid) [__ASSUME_CORRECT_SI_PID]: Likewise.
489
490 2012-07-28 Siddhesh Poyarekar <siddhesh@redhat.com>
491
492 * tst-pthread-getattr.c (MAX_STACK_SIZE): New macro.
493 (pagesize): New static variable.
494 (allocate_and_test): Return MEM. Rename parameter to TARGET.
495 (check_stack_top): New local variables MEM and PAGEMASK. Cap
496 stack size to MAX_STACK_SIZE. Call allocate_and_test for
497 halfway up the stack top page. Verify that the top page was
498 written into.
499 (do_test): Get pagesize using sysconf.
500
501 2012-07-25 Andreas Schwab <schwab@linux-m68k.org>
502
503 * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Remove pseudo_end
504 label.
505 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Likewise.
506 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO):
507 Likewise.
508
509 2012-07-25 Siddhesh Poyarekar <siddhesh@redhat.com>
510
511 * tst-pthread-getattr.c: Revert last change.
512
513 2012-07-20 Siddhesh Poyarekar <siddhesh@redhat.com>
514
515 * tst-pthread-getattr.c (MAX_STACK_SIZE): New max cap for stack
516 size.
517 (_MIN): New macro.
518 (allocate_and_test): Return STACKADDR. Access STACKADDR instead
519 of MEM to test.
520 (check_stack_top): Read valued written into STACKADDR in
521 allocate_and_test. Cap stack size to MAX_STACK_SIZE.
522
523 2012-07-19 Siddhesh Poyarekar <siddhesh@redhat.com>
524
525 * nptl-init.c (sighandler_setxid): Fix the comment that
526 describes it.
527
528 2012-06-23 Thomas Schwinge <thomas@codesourcery.com>
529
530 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S
531 (__lll_robust_timedlock_wait): Simplify CFI directives.
532
533 2012-06-20 Siddhesh Poyarekar <siddhesh@redhat.com>
534
535 [BZ #12416]
536 * Makefile (tests): Add test case.
537 * pthread_getattr_np.c (pthread_getattr_np): Deduct pages below
538 the __libc_stack_end page from stacksize. Truncate stacksize to
539 make it page aligned when it is computed from RLIMIT_STACK.
540 * tst-pthread-getattr.c: New test case. Verify that stackaddr is
541 accessible.
542
543 2012-06-07 Carlos Sánchez de La Lama <csanchezdll@gmail.com>
544
545 [BZ #14205]
546 * sysdeps/sparc/sparc32/pthread_spin_lock.S: Do not use v9
547 branches.
548
549 2012-06-04 Siddhesh Poyarekar <siddhesh@redhat.com>
550 Jakub Jelinek <jakub@redhat.com>
551
552 [BZ #14188]
553 * sysdeps/pthread/pthread.h
554 [!(defined __GNUC__ && defined __EXCEPTIONS)]
555 (pthread_cleanup_push, pthread_cleanup_push_defer_np): Use
556 __libc_unlikely instead of __builtin_expect.
557
558 2012-05-30 H.J. Lu <hongjiu.lu@intel.com>
559
560 [BZ #14117]
561 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Removed.
562 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
563 * sysdeps/unix/sysv/linux/i386/Implies: New file.
564 * sysdeps/unix/sysv/linux/x86_64/Implies: Likewise.
565 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Renamed
566 to ...
567 * sysdeps/unix/sysv/linux/x86/bits/pthreadtypes.h: This.
568 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Renamed
569 to ...
570 * sysdeps/unix/sysv/linux/x86/bits/semaphore.h: This.
571
572 2012-05-30 Andreas Schwab <schwab@linux-m68k.org>
573
574 [BZ #14132]
575 * nptl-init.c (pthread_functions): Remove use of INTUSE and
576 _internal aliases.
577 (__pthread_initialize_minimal_internal): Likewise.
578 * sem_open.c: Likewise.
579 * sem_unlink.c: Likewise.
580 * pthreadP.h: Replace _internal aliases by hidden_proto
581 declarations.
582 * pthread_getspecific.c: Replace _internal alias by hidden_def.
583 * pthread_key_create.c: Likewise.
584 * pthread_mutex_destroy.c: Likewise.
585 * pthread_mutex_init.c: Likewise.
586 * pthread_mutex_lock.c: Likewise.
587 * pthread_mutex_unlock.c: Likewise.
588 * pthread_once.c: Likewise.
589 * pthread_rwlock_rdlock.c: Likewise.
590 * pthread_rwlock_unlock.c: Likewise.
591 * pthread_rwlock_wrlock.c: Likewise.
592 * pthread_setspecific.c: Likewise.
593 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S:
594 Likewise.
595 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
596 Likewise.
597 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
598 Likewise.
599 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
600 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
601 * sysdeps/unix/sysv/linux/s390/pthread_once.c: Likewise.
602 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Likewise.
603 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
604 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
605 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
606 * sysdeps/unix/sysv/linux/sparc/pthread_once.c: Likewise.
607 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
608 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S:
609 Likewise.
610 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S:
611 Likewise.
612 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S:
613 Likewise.
614
615 2012-05-27 Chung-Lin Tang <cltang@codesourcery.com>
616
617 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO, LOAD_ARGS_1)
618 (LOAD_ARGS_2 ,LOAD_ARGS_3 ,LOAD_ARGS_4): Add CFI restores.
619
620 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_lock_wait_private)
621 (__lll_lock_wait, __lll_timedlock_wait, __lll_timedwait_tid): Add CFI
622 directives.
623 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S
624 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): Likewise.
625 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
626 (pthread_barrier_wait): Likewise.
627 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
628 (__pthread_cond_broadcast): Likewise.
629 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
630 (__pthread_cond_signal): Likewise.
631 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
632 (__pthread_cond_timedwait): Likewise.
633 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S (__pthread_cond_wait):
634 Likewise.
635 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S
636 (__pthread_rwlock_rdlock): Likewise.
637 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S
638 (pthread_rwlock_timedrdlock): Likewise.
639 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S
640 (pthread_rwlock_timedwrlock): Likewise.
641 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S
642 (__pthread_rwlock_unlock): Likewise.
643 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S
644 (__pthread_rwlock_wrlock): Likewise.
645 * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post): Likewise.
646 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait): Likewise.
647 * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
648 Likewise.
649 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
650
651 2012-05-26 Siddhesh Poyarekar <siddhesh@redhat.com>
652
653 [BZ #12416]
654 * nptl/pthread_getattr_np.c (pthread_getattr_np): Use
655 __libc_stack_end rounded to the end of containing page as the
656 real stack end.
657
658 2012-05-25 Rayson Ho <rho@redhat.com>
659
660 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Low-level SystemTap
661 probes for i386.
662 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
663 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
664 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
665 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
666 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
667 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
668 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
669 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
670
671 2012-05-25 Rayson Ho <rho@redhat.com>
672 Roland McGrath <roland@hack.frob.com>
673
674 * DESIGN-systemtap-probes.txt: New file.
675 * pthread_cond_broadcast.c: SystemTap probes.
676 * pthread_cond_init.c: Likewise.
677 * pthread_cond_signal.c: Likewise.
678 * pthread_cond_wait.c: Likewise.
679 * pthread_cond_destroy.c: Likewise.
680 * pthread_create.c: Likewise.
681 * pthread_join.c: Likewise.
682 * pthread_mutex_destroy.c: Likewise.
683 * pthread_mutex_init.c: Likewise.
684 * pthread_mutex_lock.c: Likewise.
685 * pthread_mutex_timedlock.c: Likewise.
686 * pthread_mutex_unlock.c: Likewise.
687 * pthread_rwlock_destroy.c: Likewise.
688 * pthread_rwlock_rdlock.c: Likewise.
689 * pthread_rwlock_unlock.c: Likewise.
690 * pthread_rwlock_wrlock.c: Likewise.
691 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
692 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
693 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
694 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
695 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
696 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
697 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
698 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
699
700 2012-05-24 Roland McGrath <roland@hack.frob.com>
701
702 * pthread_create.c (start_thread): Define pthread_start LIBC_PROBE.
703
704 2012-05-17 Andreas Jaeger <aj@suse.de>
705
706 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
707 (HAVE_DL_DISCOVER_OSVERSION): Don't declare _dl_discover_osversion
708 only for older kernels.
709
710 2012-05-15 Joseph Myers <joseph@codesourcery.com>
711
712 * pthreadP.h [!__NR_set_robust_list] (__NR_set_robust_list): Do
713 not define.
714
715 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
716
717 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_lock): Load
718 futex pointer into RDI_LP. Use RSP_LP to operate on stack.
719 (lll_robust_lock): Likewise.
720 (lll_cond_lock): Likewise.
721 (lll_robust_cond_lock): Likewise.
722 (lll_timedlock): Likewise.
723 (lll_robust_timedlock): Likewise.
724 (lll_unlock): Likewise.
725 (lll_robust_unlock): Likewise.
726
727 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
728
729 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use
730 LP_OP(cmp) and RCX_LP on dep_mutex pointer.
731
732 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
733
734 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Use LP_OP(op)
735 on NWAITERS.
736 (__gcc_personality_v0): Replace 8-byte data alignment with
737 LP_SIZE alignment and .quad with ASM_ADDR.
738
739 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
740
741 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Use LP_OP(op)
742 on NWAITERS.
743 (__gcc_personality_v0): Replace 8-byte data alignment with
744 LP_SIZE alignment and .quad with ASM_ADDR.
745
746 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
747
748 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Use LP_OP(cmp) on
749 NWAITERS, which is unsigned long int.
750
751 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
752
753 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
754 (__gcc_personality_v0): Replace 8-byte data alignment with
755 LP_SIZE alignment and .quad with ASM_ADDR.
756
757 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
758
759 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Use
760 LP_OP(cmp), RSI_LP and R8_LP on dep_mutex pointer. Load
761 __vdso_clock_gettime pointer into RAX_LP.
762 (__gcc_personality_v0): Replace 8-byte data alignment with
763 LP_SIZE alignment and .quad with ASM_ADDR.
764
765 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
766
767 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Use
768 LP_OP(cmp), RSI_LP and R8_LP on dep_mutex pointer. Load
769 __vdso_clock_gettime pointer into RAX_LP.
770 (__gcc_personality_v0): Replace 8-byte data alignment with
771 LP_SIZE alignment and .quad with ASM_ADDR.
772
773 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
774
775 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Use
776 LP_OP(cmp) and R8_LP on dep_mutex pointer.
777
778 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
779
780 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Use LP_OP(mov)
781 to update pointer in memory. Load pointer into RDI_LP.
782
783 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
784
785 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
786 (LLL_STUB_UNWIND_INFO_START): Align label to LP_SIZE instead
787 of 8.
788 (LLL_STUB_UNWIND_INFO_END): Likewise.
789 (lll_timedlock): Load timeout pointer into RDX_LP.
790 (lll_robust_timedlock): Likewise.
791
792 2012-05-15 Siddhesh Poyarekar <siddhesh@redhat.com>
793 Jakub Jelinek <jakub@redhat.com>
794
795 [BZ #13613]
796 * Makefile (tests): Add test cases.
797 * descr.h (struct pthread): Add a comment describing multiple_threads.
798 * pthreadP.h (__pthread_multiple_threads): Expand comment to include
799 single-process case.
800 * pthread_cancel.c (pthread_cancel): Enable multiple_threads
801 before setting cancelstate of the thread.
802 * sysdeps/unix/sysv/linux/libc_multiple_threads.c
803 (__libc_multiple_threads): Add explanatory comment.
804 * tst-cancel-self-cancelstate.c: New test case.
805 * tst-cancel-self-canceltype.c: Likewise.
806 * tst-cancel-self-cleanup.c: Supporting file for test cases.
807 * tst-cancel-self-testcancel.c: New test case.
808 * tst-cancel-self.c: Likewise.
809 * vars.c: Expand comment to include single-process case.
810
811 2012-05-14 H.J. Lu <hongjiu.lu@intel.com>
812
813 * sysdeps/x86_64/tls.h: Don't include <bits/wordsize.h>.
814 (tcbhead_t): Remove __x86_64__ check. Align rtld_savespace_sse
815 to 32 bytes.
816
817 2012-05-14 H.J. Lu <hongjiu.lu@intel.com>
818
819 * sysdeps/pthread/pthread.h (__PTHREAD_RWLOCK_INT_FLAGS_SHARED):
820 New.
821 (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Check
822 __PTHREAD_RWLOCK_INT_FLAGS_SHARED instead of __WORDSIZE.
823
824 2012-05-14 H.J. Lu <hongjiu.lu@intel.com>
825
826 * shlib-versions: Move x86_64-.*-linux.* entry to ...
827 * sysdeps/x86_64/64/shlib-versions: Here. New file.
828 * sysdeps/x86_64/x32/shlib-versions: New file.
829
830 2012-05-14 H.J. Lu <hongjiu.lu@intel.com>
831
832 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Define x32
833 __SIZEOF_PTHREAD_XXX_T.
834 (__pthread_internal_list): Check __x86_64__ instead of __WORDSIZE.
835 (pthread_mutex_t): Likewise.
836 (pthread_rwlock_t): Likewise.
837 (__PTHREAD_RWLOCK_INT_FLAGS_SHARED): New. Defined if __x86_64__
838 is defined.
839
840 2012-05-11 H.J. Lu <hongjiu.lu@intel.com>
841
842 * sysdeps/x86_64/x32/tls.h: New file.
843
844 2012-05-11 H.J. Lu <hongjiu.lu@intel.com>
845
846 * sysdeps/x86_64/tls.h (THREAD_SETMEM): Use uint64_t on 64-bit
847 integer.
848 (THREAD_SETMEM_NC): Likewise.
849
850 2012-05-11 H.J. Lu <hongjiu.lu@intel.com>
851
852 * sysdeps/x86_64/tls.h (THREAD_SELF): Replace movq/%q0 with
853 mov/%0.
854
855 2012-05-11 H.J. Lu <hongjiu.lu@intel.com>
856
857 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
858 (__cleanup_fct_attribute): Check __x86_64__ instead of
859 __WORDSIZE.
860
861 2012-05-11 H.J. Lu <hongjiu.lu@intel.com>
862
863 * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER): Check
864 __PTHREAD_MUTEX_HAVE_PREV instead of __WORDSIZE.
865 (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Likewise.
866 (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
867 (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
868
869 2012-05-11 H.J. Lu <hongjiu.lu@intel.com>
870
871 * pthread_create.c (start_thread): Check __PTHREAD_MUTEX_HAVE_PREV
872 instead of __WORDSIZE.
873
874 2012-05-10 Thomas Schwinge <thomas@schwinge.name>
875
876 [BZ #3748]
877 * sysdeps/pthread/bits/libc-lockP.h (__libc_once_get): New macro.
878
879 2012-05-09 Chung-Lin Tang <cltang@codesourcery.com>
880
881 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
882 (__pthread_cond_timedwait): Use CFI directives.
883 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
884 (__pthread_cond_wait): Likewise.
885 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait): Likewise.
886 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
887
888 2012-05-03 David S. Miller <davem@davemloft.net>
889
890 * sysdeps/sparc/sparc64/pthread_spin_unlock.S: Fix thinko, we
891 always have to return 0, especially for the pthread_spin_init
892 alias.
893 * sysdeps/sparc/sparc32/pthread_spin_lock.S: Add missing trailing
894 newline.
895 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.S: Likewise.
896 * sysdeps/sparc/sparc64/pthread_spin_lock.S: Likewise.
897
898 2012-05-02 David S. Miller <davem@davemloft.net>
899
900 * sysdeps/sparc/sparc64/pthread_spin_lock.S: New.
901 * sysdeps/sparc/sparc64/pthread_spin_lock.c: Delete.
902 * sysdeps/sparc/sparc64/pthread_spin_unlock.S: New.
903 * sysdeps/sparc/sparc64/pthread_spin_unlock.c: Delete.
904 * sysdeps/sparc/sparc64/pthread_spin_trylock.S: New.
905 * sysdeps/sparc/sparc64/pthread_spin_trylock.c: Delete.
906 * sysdeps/sparc/sparc64/pthread_spin_init.c: New.
907 * sysdeps/sparc/sparc32/pthread_spin_lock.S: New.
908 * sysdeps/sparc/sparc32/pthread_spin_lock.c: Delete.
909 * sysdeps/sparc/sparc32/pthread_spin_trylock.S: New.
910 * sysdeps/sparc/sparc32/pthread_spin_trylock.c: Delete.
911 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.S: New.
912 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: Delete.
913 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.S: New.
914 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: Delete.
915 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.S: New.
916 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: Delete.
917 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_init.c: New.
918
919 2012-05-02 Allan McRae <allan@archlinux.org>
920
921 * Makefile: (LDFLAGS-tst-tls5): Use $(no-as-needed).
922 (LDFLAGS-tst-cancel24): Likewise.
923
924 2012-05-02 Paul Pluzhnikov <ppluzhnikov@google.com>
925
926 * sysdeps/i386/pthread_spin_lock.S: New.
927 * sysdeps/i386/pthread_spin_lock.c: Delete.
928 * sysdeps/x86_64/pthread_spin_lock.S: New.
929 * sysdeps/x86_64/pthread_spin_lock.c: Delete.
930
931 2012-04-28 Andreas Schwab <schwab@linux-m68k.org>
932
933 * Makefile ($(objpfx)tst-stack3-mem, $(objpfx)tst-tls6.out): Don't
934 run when cross-compiling.
935
936 2012-04-26 Siddhesh Poyarekar <siddhesh@redhat.com>
937
938 * sysdeps/pthread/unwind-forcedunwind.c: Include gnu/lib-names.h
939 instead of libgcc_s.h.
940
941 2012-04-20 Paul Pluzhnikov <ppluzhnikov@google.com>
942
943 * sysdeps/x86_64/tls.h (TLS_GET_FS, TLS_SET_FS): Delete.
944
945 2012-03-27 David S. Miller <davem@davemloft.net>
946
947 * tst-cond16.c (do_test): Use a thread stack size which is either
948 PTHREAD_STACK_MIN or the page size, whichever is larger.
949 * tst-cond18.c (do_test): Likewise.
950
951 2012-03-19 H.J. Lu <hongjiu.lu@intel.com>
952
953 * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Use
954 register char * __asm__("rsp") to get stack frame.
955
956 2012-03-19 H.J. Lu <hongjiu.lu@intel.com>
957
958 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (SYS_futex): Use
959 __NR_futex directly.
960
961 2012-03-19 H.J. Lu <hongjiu.lu@intel.com>
962
963 * unwind.c (unwind_stop): Cast _Unwind_GetCFA return to
964 _Unwind_Ptr first.
965
966 2012-03-16 David S. Miller <davem@davemloft.net>
967
968 [BZ #13844]
969 * sysdeps/unix/sysv/linux/libc-lowlevellock.c: Include using <..>
970 instead of "...".
971 * sysdeps/unix/sysv/linux/sparc/sparc32/libc-lowlevellock.c:
972 Delete, not needed.
973
974 2012-03-15 David S. Miller <davem@davemloft.net>
975
976 [BZ #13844]
977 * sysdeps/unix/sysv/linux/sparc/sparc32/libc-lowlevellock.c: New file.
978
979 2012-03-09 Paul Eggert <eggert@cs.ucla.edu>
980
981 [BZ #13673]
982 * pt-crti.S: Replace FSF snail mail address with URL.
983
984 2012-03-09 Joseph Myers <joseph@codesourcery.com>
985
986 * sysdeps/pthread/pthread.h (__need_clockid_t, __need_timespec):
987 Do not define before including <time.h>.
988
989 2012-03-08 David S. Miller <davem@davemloft.net>
990
991 * sysdeps/unix/sysv/linux/sparc/sem_post.c: Update copyright year.
992
993 2012-03-08 Thomas Schwinge <thomas@codesourcery.com>
994
995 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
996 Check for timestamp before the Epoch.
997
998 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait): Fix
999 updating nwaiters.
1000
1001 * tst-sem13.c (do_test): Add another test case.
1002 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
1003 Fix updating nwaiters.
1004
1005 2012-03-07 Joseph Myers <joseph@codesourcery.com>
1006
1007 [BZ #10545]
1008 * sysdeps/pthread/configure.in (libc_cv_forced_unwind): Change
1009 link test to a compile test.
1010 (libc_cv_c_cleanup): Likewise. Declare puts rather than including
1011 <stdio.h>.
1012 * sysdeps/pthread/configure: Regenerated.
1013
1014 2012-03-07 Ulrich Drepper <drepper@gmail.com>
1015
1016 * Makefile (distribute): Remove variable.
1017
1018 2012-01-23 Thomas Schwinge <thomas@codesourcery.com>
1019
1020 * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Get rid of
1021 superfluous assignment.
1022 * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c (sem_timedwait):
1023 Likewise.
1024 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c
1025 (sem_timedwait): Likewise.
1026
1027 2012-03-06 Ulrich Drepper <drepper@gmail.com>
1028
1029 * sysdeps/pthread/bits/libc-lock.h: Move information not needed in
1030 installed headers to...
1031 * sysdeps/pthread/bits/libc-lockP.h: ...here. New file.
1032
1033 2012-03-06 David S. Miller <davem@davemloft.net>
1034
1035 * sysdeps/unix/sysv/linux/sparc/sem_post.c (__new_sem_post): Use
1036 atomic_increment and remove unused local variable.
1037 (__old_sem_post): Likewise.
1038
1039 2012-02-27 David S. Miller <davem@davemloft.net>
1040
1041 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Don't refer to
1042 non-existing __pthread_attr.
1043 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
1044 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
1045 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
1046 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
1047 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
1048
1049 2012-02-26 Ulrich Drepper <drepper@gmail.com>
1050
1051 * sysdeps/pthread/pthread.h: Define __need_clockid_t for __USE_XOPEN2K.
1052
1053 * sysdeps/pthread/pthread.h: Define __need_timespec before including
1054 <time.h>.
1055 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Name pthread_attr_t
1056 union.
1057 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
1058 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
1059 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
1060 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
1061 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
1062
1063 2012-02-21 Joseph Myers <joseph@codesourcery.com>
1064
1065 [BZ #13695]
1066 * Makefile (generated): Remove crti.S, crtn.S, defs.h and
1067 pt-initfini.s.
1068 [crti.S not in sysdirs] (omit-deps): Do not append.
1069 [crti.S not in sysdirs] (CFLAGS-pt-initfini.s): Remove variable.
1070 [crti.S not in sysdirs] (pt-initfini.c): Remove vpath directive.
1071 [crti.S not in sysdirs] ($(objpfx)crti.S): Remove rule.
1072 [crti.S not in sysdirs] ($(objpfx)crtn.S): Likewise.
1073 [crti.S not in sysdirs] ($(objpfx)defs.h): Likewise.
1074 [crti.S not in sysdirs] ($(objpfx)crti.o): Likewise.
1075 [crti.S not in sysdirs] ($(objpfx)crtn.o): Likewise.
1076 [crti.S in sysdirs] (extra-objs): Append unconditionally.
1077 [crti.S in sysdirs] ($(objpfx)crti.o): Define rule
1078 unconditionally.
1079 * sysdeps/pthread/pt-initfini.c: Remove file.
1080
1081 2012-02-16 Richard Henderson <rth@twiddle.net>
1082
1083 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: Remove file.
1084 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: Remove file.
1085
1086 2012-02-15 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1087
1088 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: Remove file.
1089
1090 2012-02-16 David S. Miller <davem@davemloft.net>
1091
1092 * sysdeps/sparc/Makefile: Add -fPIC when building pt-crti.S and crtn.S
1093
1094 2012-02-15 Marek Polacek <polacek@redhat.com>
1095
1096 * sysdeps/unix/sysv/linux/x86_64/Makefile: Remove file.
1097
1098 2012-02-09 Paul Eggert <eggert@cs.ucla.edu>
1099
1100 Replace FSF snail mail address with URLs, as per GNU coding standards.
1101
1102 2012-02-08 Andreas Schwab <schwab@linux-m68k.org>
1103
1104 * Makefile (extra-objs) [crti.S in sysdirs]: Add pt-crti.o.
1105
1106 2012-02-08 Joseph Myers <joseph@codesourcery.com>
1107
1108 Support crti.S and crtn.S provided directly by architectures.
1109 * Makefile [crti.S in sysdirs] (omit-deps): Do not append.
1110 [crti.S in sysdirs] (CFLAGS-pt-initfini.s): Do not define variable.
1111 [crti.S in sysdirs] ($(objpfx)pt-initfini.s): Disable rule.
1112 [crti.S in sysdirs] ($(objpfx)crti.S): Likewise.
1113 [crti.S in sysdirs] ($(objpfx)crtn.S): Likewise.
1114 [crti.S in sysdirs] ($(objpfx)defs.h): Likewise.
1115 [crti.S in sysdirs] ($(objpfx)crti.o): Likewise.
1116 [crti.S in sysdirs] ($(objpfx)crtn.o): Likewise.
1117 [crti.S in sysdirs] (pt-initfini.c): Remove vpath directive.
1118 [crti.S in sysdirs] ($(objpfx)crti.o): New rule.
1119 * pt-crti.S: New file.
1120 * sysdeps/unix/sysv/linux/i386/Makefile: Remove file.
1121
1122 2012-02-03 Joseph Myers <joseph@codesourcery.com>
1123
1124 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
1125 macros for PIC register setup.
1126 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
1127 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
1128 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
1129 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
1130 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
1131
1132 2012-01-11 Marek Polacek <polacek@redhat.com>
1133
1134 * forward.c (FORWARD_NORETURN): Define macro.
1135 (__pthread_unwind): Use FORWARD_NORETURN macro to avoid warning.
1136 (__pthread_exit): Likewise.
1137
1138 2012-01-10 Ulrich Drepper <drepper@gmail.com>
1139
1140 * sysdeps/pthread/pthread.h: Add const attribute to pthread_equal.
1141
1142 * pthreadP.h: Add noreturn to __pthread_exit.
1143 * sysdeps/pthread/pthread-functions.h: Likewise for ptr___pthread_exit.
1144
1145 2011-12-30 Adhemerval Zanella <azanella@linux.vnet.ibm.com>
1146
1147 * sysdeps/unix/sysv/linux/aio_misc.h (__aio_create_helper_thread):
1148 Call pthread_attr_setstacksize() with result of
1149 __pthread_get_minstack() to account for application TLS usage.
1150
1151 2012-01-08 Marek Polacek <polacek@redhat.com>
1152
1153 * sysdeps/unix/sysv/linux/mq_notify.c: Include <nptl/pthreadP.h>.
1154
1155 2012-01-07 Ulrich Drepper <drepper@gmail.com>
1156
1157 [BZ #13553]
1158 * pthreadP.h: Use const instead of __const.
1159 * semaphore.h: Likewise.
1160 * sysdeps/pthread/bits/libc-lock.h: Likewise.
1161 * sysdeps/pthread/bits/sigthread.h: Likewise.
1162 * sysdeps/pthread/pthread.h: Likewise.
1163
1164 * Makefile: Remove elf=yes test, only ELF is supported.
1165
1166 * shlib-versions: Remove entries for ports architectures.
1167
1168 In case anyone cares, the IA-64 architecture could move to ports.
1169 * sysdeps/ia64/*: Removed.
1170 * sysdeps/unix/sysv/linux/ia64/*: Removed.
1171
1172 2011-12-22 Ulrich Drepper <drepper@gmail.com>
1173
1174 * sysdeps/pthread/gai_misc.h (__gai_create_helper_thread): Use
1175 __pthread_get_minstack.
1176 * sysdeps/unix/sysv/linux/mq_notify.c (init_mq_netlink): Likewise.
1177
1178 [BZ #13088]
1179 * sysdeps/unix/sysv/linux/timer_routines.c: Get minimum stack size
1180 through __pthread_get_minstack.
1181 * nptl-init.c (__pthread_initialize_minimal_internal): Get page size
1182 directly from _rtld_global_ro.
1183 (__pthread_get_minstack): New function.
1184 * pthreadP.h: Declare __pthread_get_minstack.
1185 * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_get_minstack.
1186
1187 2011-12-21 Ulrich Drepper <drepper@gmail.com>
1188
1189 [BZ #13515]
1190 * sysdeps/unix/sysv/linux/pthread_getname.c (pthread_getname_np):
1191 Correct reading name from file.
1192
1193 2011-12-14 Carlos O'Donell <carlos@systemhalted.org>
1194
1195 * allocatestack.c (allocate_stack): Return errno on failure.
1196
1197 2011-12-14 Jeff Law <law@redhat.com>
1198
1199 [BZ #5245]
1200 * pthread_create.c (__pthread_create_2_1): Translate ENOMEM to EAGAIN.
1201
1202 2011-11-28 Andreas Schwab <schwab@redhat.com>
1203
1204 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Handle
1205 EAGAIN from FUTEX_WAIT_REQUEUE_PI.
1206 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1207
1208 2011-11-15 Ulrich Drepper <drepper@gmail.com>
1209
1210 * pthread_getattr_np.c (pthread_getattr_np): Set FD_CLOEXEC for
1211 /proc/self/maps.
1212
1213 2011-10-29 Ulrich Drepper <drepper@gmail.com>
1214
1215 [BZ #13358]
1216 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1217 (__pthread_cond_timedwait): Initialize %r15 correctly also for code
1218 path for kernels with FUTEX_CLOCK_REALTIME.
1219 Debugged by H.J. Lu <hjl.tools@gmail.com>.
1220
1221 2011-10-27 Andreas Schwab <schwab@redhat.com>
1222
1223 [BZ #13344]
1224 * sysdeps/pthread/pthread.h: Use __THREADNL instead of __THREAD
1225 for memory synchronization functions.
1226 * semaphore.h: Likewise.
1227
1228 2011-10-24 Ulrich Drepper <drepper@gmail.com>
1229
1230 * tst-cancel7.c: Avoid warning.
1231 * tst-mutex6.c: Likewise.
1232 * tst-mutex9.c: Likewise.
1233 * tst-mutexpi6.c: Likewise.
1234
1235 2011-10-23 Ulrich Drepper <drepper@gmail.com>
1236
1237 * sysdeps/i386/tls.h: Remove #include <list.h>.
1238
1239 2011-10-15 Ulrich Drepper <drepper@gmail.com>
1240
1241 * pthread_create.c (start_thread): Call __ctype_init.
1242
1243 2011-09-15 Andreas Schwab <schwab@redhat.com>
1244
1245 * sysdeps/pthread/list.h: Define only list_t if __need_list_t is
1246 defined.
1247 (list_add): Add atomic_write_barrier.
1248 * descr.h: Define __need_list_t before including <list.h>.
1249 * nptl-init.c: Include <list.h>
1250 * allocatestack.c: Likewise.
1251
1252 2011-09-11 Ulrich Drepper <drepper@gmail.com>
1253
1254 * sysdeps/i386/tls.h: Remove HAVE_TLS_SUPPORT test.
1255 * sysdeps/ia64/tls.h: Likewise.
1256 * sysdeps/powerpc/tls.h: Likewise.
1257 * sysdeps/s390/tls.h: Likewise.
1258 * sysdeps/sh/tls.h: Likewise.
1259 * sysdeps/sparc/tls.h: Likewise.
1260 * sysdeps/x86_64/tls.h: Likewise.
1261
1262 2011-09-10 Ulrich Drepper <drepper@gmail.com>
1263
1264 * sysdeps/pthread/malloc-machine.h: Define MUTEX_INITIALIZER.
1265
1266 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Don't handle
1267 !USE___THREAD.
1268 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
1269 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
1270 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
1271 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
1272 * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
1273 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
1274 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
1275 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
1276 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
1277 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1278 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
1279 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
1280
1281 * tst-tls1.c: Support for __thread is now mandatory.
1282 * tst-tls2.c: Likewise.
1283 * tst-tls3.c: Likewise.
1284 * tst-tls3mod.c: Likewise.
1285 * tst-tls4.c: Likewise.
1286 * tst-tls4moda.c: Likewise.
1287 * tst-tls4modb.c: Likewise.
1288 * tst-tls5.h: Likewise.
1289
1290 2011-09-08 Ulrich Drepper <drepper@gmail.com>
1291
1292 [BZ #12403]
1293 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
1294 (pthread_rwlock_timedwrlock): Use correct macro in test.
1295 Patch by H.J. Lu <hongjiu.lu@intel.com>.
1296
1297 2011-09-06 Ulrich Drepper <drepper@gmail.com>
1298
1299 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait): Don't
1300 use gettimeofday vsyscall, just call gettimeofday.
1301 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
1302 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
1303 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
1304 Likewise.
1305 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1306 Likewise.
1307 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1308 Simplify __vdso_clock_gettime use.
1309
1310 2011-09-05 David S. Miller <davem@davemloft.net>
1311
1312 * sysdeps/unix/sysv/linux/sem_timedwait.c (do_futex_timed_wait):
1313 New function.
1314 (sem_timedwait): Call it to force an exception region around
1315 the async cancel enable and the futex operation.
1316 * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c: Likewise.
1317 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: Likewise.
1318 * sysdeps/unix/sysv/linux/sem_wait.c (do_futex_wait): New function.
1319 (__new_sem_wait): Call it to force an exception region around
1320 the async cancel enable and the futex operation.
1321 * sysdeps/unix/sysv/linux/sparc/sem_wait.c: Likewise.
1322 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: Likewise.
1323
1324 2011-08-31 Andreas Schwab <schwab@redhat.com>
1325
1326 * allocatestack.c (setxid_mark_thread): Ensure that the exiting
1327 thread is woken up.
1328
1329 2011-08-20 David S. Miller <davem@davemloft.net>
1330
1331 * Makefile (tst-cleanup0.out): Fix typo in output redirection.
1332
1333 2011-08-14 Roland McGrath <roland@hack.frob.com>
1334
1335 * sysdeps/i386/pthreaddef.h (TCB_ALIGNMENT): Set to 64, optimal on Atom.
1336 * sysdeps/x86_64/pthreaddef.h (TCB_ALIGNMENT): Likewise.
1337
1338 2011-08-08 Andreas Schwab <schwab@redhat.com>
1339
1340 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Maintain aligned
1341 stack.
1342 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1343 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1344
1345 2011-07-22 Ulrich Drepper <drepper@gmail.com>
1346
1347 * sysdeps/pthread/unwind-forcedunwind.c (_Unwind_Resume): Add read
1348 barrier.
1349 (__gcc_personality_v0): Likewise.
1350 (_Unwind_ForcedUnwind): Likewise.
1351 (_Unwind_GetCFA): Likewise.
1352
1353 2011-07-14 Roland McGrath <roland@hack.frob.com>
1354
1355 * allocatestack.c (__reclaim_stacks): Use uintptr_t cast rather than
1356 UINTMAX_C.
1357
1358 2011-06-30 Ulrich Drepper <drepper@gmail.com>
1359
1360 * nptl-init.c (__nptl_set_robust): New function.
1361 (pthread_functions): Add reference.
1362 * npthreadP.h: Declare __nptl_set_robust.
1363 * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
1364 ptr_set_robust member.
1365 * sysdeps/unix/sysv/linux/fork.c: Call set_robust_list syscall in
1366 child if threads are used.
1367
1368 2011-06-14 Andreas Jaeger <aj@suse.de>
1369
1370 * pthread_rwlock_init.c: Include <string.h> for memset declaration.
1371
1372 2011-05-11 Ulrich Drepper <drepper@gmail.com>
1373
1374 [BZ #386]
1375 * allocatestack.c (allocate_stack): Convert ENOMEM error to EAGAIN.
1376
1377 2011-04-10 Ulrich Drepper <drepper@gmail.com>
1378
1379 [BZ #12650]
1380 * allocatestack.c (get_cached_stack): Deallocate DTV entries before
1381 clearing memory.
1382 Patch partly by Robert Rex <robert.rex@exasol.com>.
1383
1384 2011-01-19 Roland McGrath <roland@redhat.com>
1385
1386 * pthread_cond_wait.c (__pthread_cond_wait): Fix comment typo.
1387 * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
1388 * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Likewise.
1389 * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
1390 * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock): Likewise.
1391 * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock): Likewise.
1392
1393 2011-01-16 Andreas Schwab <schwab@linux-m68k.org>
1394
1395 * Makefile (test-extras): Add tst-cleanup4aux.
1396
1397 2011-01-14 Ulrich Drepper <drepper@gmail.com>
1398
1399 [BZ #10563]
1400 * sysdeps/pthread/setxid.h (__SETXID_1): Add cast to assignment.
1401 (__SETXID_2): Likewise.
1402 (__SETXID_3): Likewise.
1403
1404 2011-01-13 Ulrich Drepper <drepper@gmail.com>
1405
1406 [BZ #10484]
1407 * Versions [libc] (GLIBC_PRIVATE): Export __libc_alloca_cutoff.
1408 * alloca_cutoff.c: Add libc_hidden_def.
1409
1410 2010-10-13 H.J. Lu <hongjiu.lu@intel.com>
1411
1412 [BZ #12113]
1413 * sysdeps/x86_64/pthreaddef.h (TCB_ALIGNMENT): Changed to 32.
1414 * sysdeps/x86_64/tls.h (TLS_TCB_ALIGN): Defined with alignment
1415 of "struct pthread".
1416
1417 2010-09-21 Andreas Schwab <schwab@redhat.com>
1418
1419 * sysdeps/pthread/pthread.h (pthread_cleanup_push)
1420 [!__EXCEPTIONS]: Mangle local variable not_first_call.
1421 (pthread_cleanup_push_defer_np): Likewise.
1422
1423 2010-09-03 Ulrich Drepper <drepper@redhat.com>
1424
1425 * sysdeps/pthread/allocalim.h (__libc_use_alloca): Expect blocks are
1426 small.
1427
1428 2010-08-10 Dinakar Guniguntala <dino@in.ibm.com>
1429 Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
1430
1431 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: If
1432 FUTEX_WAKE_OP fails make sure to call FUTEX_WAKE instead.
1433
1434 2010-08-12 H.J. Lu <hongjiu.lu@intel.com>
1435
1436 * sysdeps/unix/sysv/linux/i386/Makefile: New file.
1437
1438 2010-05-01 Alan Modra <amodra@gmail.com>
1439
1440 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
1441 (PSEUDO): Use correct cr save. Don't use wrong parm save area
1442 to save temps. Correct cfi for possible later frame manipulation.
1443 (DOCARGS_1, UNDOCARGS_1): Use the correct parm save area.
1444 (DOCARGS_2, UNDOCARGS_2, DOCARGS_3, UNDOCARGS_3): Likewise.
1445 (DOCARGS_4, UNDOCARGS_4, DOCARGS_5, UNDOCARGS_5): Likewise.
1446 (DOCARGS_6, UNDOCARGS_6): Likewise.
1447 (CENABLE, CDISABLE): Add nops for non-shared calls.
1448
1449 2010-07-06 Andreas Schwab <schwab@redhat.com>
1450
1451 * sysdeps/unix/sysv/linux/pthread_getname.c (pthread_getname_np):
1452 Fix type mismatch.
1453
1454 2010-07-03 Ulrich Drepper <drepper@redhat.com>
1455
1456 * tst-abstime.c (do_test): Some more cleanups
1457
1458 2010-07-02 Ulrich Drepper <drepper@redhat.com>
1459
1460 * tst-abstime.c: Correct testing and add test for sem_timedwait.
1461
1462 2010-07-01 Andreas Schwab <schwab@redhat.com>
1463 Ulrich Drepper <drepper@redhat.com>
1464
1465 * Makefile (tests): Add tst-abstime.
1466 * tst-abstime.c: New file.
1467 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
1468 (__lll_timedlock_wait): Check for timestamp before the Epoch.
1469 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
1470 (__lll_timedlock_wait): Likewise.
1471 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
1472 (__lll_robust_timedlock_wait): Likewise.
1473 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1474 (__pthread_cond_timedwait): Likewise.
1475 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
1476 (pthread_rwlock_timedrdlock): Likewise.
1477 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
1478 (pthread_rwlock_timedwrlock): Likewise.
1479 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
1480 Likewise.
1481
1482 2010-07-01 Ulrich Drepper <drepper@redhat.com>
1483
1484 * Makefile (tst-_res1): Add tst-_res1mod1 to dependency list.
1485
1486 2010-06-01 Takashi Yoshii <takashi.yoshii.zj@renesas.com>
1487
1488 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Fix incorrect
1489 location of ifndef __ASSUME_FUTEX_CLOCK_REALTIME.
1490
1491 2010-04-09 Ulrich Drepper <drepper@redhat.com>
1492
1493 [BZ #11390]
1494 * sysdeps/unix/sysv/linux/pthread_getname.c: New file.
1495 * sysdeps/unix/sysv/linux/pthread_setname.c: New file.
1496 * nptl/sysdeps/pthread/pthread.h: Declare pthread_getname and
1497 pthread_setname.
1498 * Makefile (libpthread-routines): Add pthread_getname and
1499 pthread_setname.
1500 * Versions: Export pthread_getname and pthread_setname for GLIBC_2.12.
1501
1502 2010-04-05 Thomas Schwinge <thomas@schwinge.name>
1503
1504 * sysdeps/pthread/unwind-resume.c: Moved to main tree sysdeps/gnu/.
1505 * sysdeps/pthread/rt-unwind-resume.c: Likewise.
1506 * sysdeps/pthread/Makefile: Remove csu section and rt section's
1507 unwind-resume bits, now in main tree sysdeps/gnu/Makefile instead.
1508
1509 2010-03-23 Luis Machado <luisgpm@br.ibm.com>
1510
1511 * pthread_cond_timedwait.c: Add check for
1512 HAVE_CLOCK_GETTIME_VSYSCALL to use VDSO whenever possible.
1513 (pthread_cond_timedwait): Use INTERNAL_VSYSCALL instead of
1514 INTERNAL_SYSCALL.
1515
1516 2010-03-09 Ulrich Drepper <drepper@redhat.com>
1517
1518 * pthread_create.c (__pthread_create_2_1): If priorities are incorrect
1519 and the call fails wake eventually waiting setxid threads. Don't free
1520 stack here if we try starting a thread.
1521 * sysdeps/pthread/createthread.c (do_clone): Only wake setxid waiter
1522 if the clone call failed.
1523
1524 2010-03-08 Andreas Schwab <schwab@redhat.com>
1525
1526 * pthread_create.c (__pthread_create_2_1): Don't set setxid_futex.
1527 * allocatestack.c (get_cached_stack): Set setxid_futex.
1528 (allocate_stack): Likewise.
1529
1530 2010-03-05 Andreas Schwab <schwab@redhat.com>
1531 Ulrich Drepper <drepper@redhat.com>
1532
1533 * allocatestack.c (setxid_mark_thread): Delay handling of thread if
1534 it is creating a thread or it is just being created.
1535 * pthread_create.c (start_thread): Wake setxid thread if it is
1536 waiting.
1537 (__pthread_create_2_1): Initialize setxid_futex.
1538 * sysdeps/pthread/createthread.c (do_clone): Wake setxid thread if it
1539 is waiting.
1540
1541 2010-01-15 Ulrich Drepper <drepper@redhat.com>
1542
1543 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
1544 Fix unwind info.
1545 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1546
1547 2010-01-15 Michal Schmidt <mschmidt@redhat.com>
1548
1549 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
1550 Fix pthread_cond_timedwait with requeue-PI.
1551 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
1552 Fix pthread_cond_wait with requeue-PI.
1553
1554 2010-01-14 Ulrich Drepper <drepper@redhat.com>
1555
1556 * Versions: Add pthread_mutex_consistent, pthread_mutexattr_getrobust,
1557 and pthread_mutexattr_setrobust for GLIBC_2.12.
1558 * pthread_mutex_consistent.c: Define alias pthread_mutex_consistent.
1559 * pthread_mutexattr_getrobust.c: Define alias
1560 pthread_mutexattr_getrobust.
1561 * pthread_mutexattr_setrobust.c: Define alias
1562 pthread_mutexattr_setrobust.
1563
1564 2010-01-12 Ulrich Drepper <drepper@redhat.com>
1565
1566 * sysdeps/pthread/pthread.h: Cleanup. Fix up for XPG7.
1567
1568 2010-01-08 Ulrich Drepper <drepper@redhat.com>
1569
1570 * sysdeps/pthread/pthread.h: Fix pthread_mutex_consistent declaration.
1571
1572 2009-12-18 Thomas Schwinge <thomas@codesourcery.com>
1573
1574 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c (_init): Don't
1575 call __gmon_start__.
1576 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c (_init): Likewise.
1577
1578 2009-12-17 Ulrich Drepper <drepper@redhat.com>
1579
1580 * pthread_rwlock_init.c (__pthread_rwlock_init): Simplify code by
1581 using memset.
1582
1583 2009-12-01 Dinakar Guniguntala <dino@in.ibm.com>
1584
1585 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.h: Define
1586 FUTEX_WAIT_REQUEUE_PI and FUTEX_CMP_REQUEUE_PI.
1587 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: If mutex
1588 is a non robust PI mutex, then use FUTEX_CMP_REQUEUE_PI.
1589 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
1590 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: If mutex
1591 is a non robust PI mutex, then use FUTEX_WAIT_REQUEUE_PI.
1592 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1593
1594 2009-12-12 Ulrich Drepper <drepper@redhat.com>
1595
1596 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
1597 Don't update nwaiters after invalid timeout is recognized.
1598
1599 2009-11-27 Thomas Schwinge <thomas@codesourcery.com>
1600
1601 * sysdeps/unix/sysv/linux/sh/pt-initfini.c (_init): Don't call
1602 __gmon_start__.
1603
1604 2009-11-27 Andreas Schwab <schwab@redhat.com>
1605
1606 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Reload
1607 THREAD_SELF->cancelhandling after returning from futex call.
1608
1609 2009-11-24 Ulrich Drepper <drepper@redhat.com>
1610
1611 * tst-sem13.c: New file.
1612 * Makefile (tests): Add tst-sem13.
1613
1614 2009-11-22 Roland McGrath <roland@redhat.com>
1615
1616 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: # include "i686/dl-sysdep.h"
1617 instead of recapitulating its contents.
1618
1619 2009-11-18 Ulrich Drepper <drepper@redhat.com>
1620
1621 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Minor
1622 optimizations and cleanups.
1623
1624 2009-11-18 Dinakar Guniguntala <dino@in.ibm.com>
1625
1626 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
1627 Remove redundant code. Fix cfi offsets.
1628 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
1629 Fix cfi offsets.
1630
1631 2009-11-17 Ulrich Drepper <drepper@redhat.com>
1632
1633 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Minimally
1634 reduce size of unwind info.
1635
1636 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Convert to use
1637 cfi directives.
1638 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1639 Based on a patch by Dinakar Guniguntala <dino@in.ibm.com>.
1640
1641 2009-11-03 Andreas Schwab <schwab@linux-m68k.org>
1642
1643 [BZ #4457]
1644 * sysdeps/pthread/unwind-resume.c: Include <libgcc_s.h> and use
1645 LIBGCC_S_SO.
1646 * sysdeps/pthread/unwind-forcedunwind.c: Likewise.
1647
1648 2009-10-30 Ulrich Drepper <drepper@redhat.com>
1649
1650 * tst-sem11.c (main): Rewrite to avoid aliasing problems.
1651
1652 [BZ #3270]
1653 * allocatestack.c (__nptl_setxid): Perform the operation in multiple
1654 steps to avoid races with creation and terminations.
1655 * nptl-init.c (sighandler_setxid): Adjust.
1656 Patch by Daniel Jacobowitz.
1657
1658 2009-09-07 Andreas Schwab <schwab@redhat.com>
1659
1660 * sysdeps/pthread/bits/libc-lock.h (BP_SYM): Remove space before paren.
1661
1662 2009-09-02 Suzuki K P <suzuki@in.ibm.com>
1663 Joseph Myers <joseph@codesourcery.com>
1664
1665 [BZ #7094]
1666 * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
1667 Initialize the sigev_notify field for newly created timer to make sure
1668 the timer gets deleted from the active timer's list upon timer_delete.
1669
1670 2009-08-27 Andrew Stubbs <ams@codesourcery.com>
1671
1672 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
1673 Correct a logic error.
1674
1675 2009-08-25 Ulrich Drepper <drepper@redhat.com>
1676
1677 * sysdeps/x86_64/tls.h (RTLD_ENABLE_FOREIGN_CALL): Store old value
1678 of the field in local variables.
1679 (RTLD_FINALIZE_FOREIGN_CALL): Restore rtld_must_xmm_save from local
1680 variable and don't unconditionally clear it.
1681
1682 2009-08-24 Ulrich Drepper <drepper@redhat.com>
1683
1684 * pthread_create.c (start_thread): Hint to the kernel that memory for
1685 the stack can be reused. We do not mark all the memory. The part
1686 still in use and some reserve are kept.
1687
1688 2009-08-23 Ulrich Drepper <drepper@redhat.com>
1689
1690 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Clean up namespace.
1691
1692 2009-08-11 Ulrich Drepper <drepper@redhat.com>
1693
1694 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Add CFI
1695 directives.
1696
1697 2009-08-10 Ulrich Drepper <drepper@redhat.com>
1698
1699 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Add CFI
1700 directives.
1701 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
1702
1703 2009-08-10 Andreas Schwab <schwab@redhat.com>
1704
1705 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
1706 (__pthread_cond_signal): Don't clobber register used for syscall
1707 number.
1708
1709 2009-08-08 Ulrich Drepper <drepper@redhat.com>
1710
1711 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
1712 Optimize code path used when FUTEX_CLOCK_REALTIME is supported.
1713
1714 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
1715 (__pthread_cond_wait): Optimize by avoiding use of callee-safe
1716 register.
1717
1718 2009-08-07 Ulrich Drepper <drepper@redhat.com>
1719
1720 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Little optimizations
1721 enabled by the special *_asynccancel functions.
1722 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1723 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1724
1725 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Include lowlevellock.h.
1726
1727 2009-08-04 Ulrich Drepper <drepper@redhat.com>
1728
1729 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: New file.
1730 * sysdeps/unix/sysv/linux/x86_64/libc-cancellation.S: New file.
1731 * sysdeps/unix/sysv/linux/x86_64/librt-cancellation.S: New file.
1732 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Optimize
1733 since we can assume the special __*_{en,dis}able_asynccancel
1734 functions.
1735 (PUSHARGS_*, POPARGS_*, SAVESTK_*, RESTSTK_*): Removed.
1736 * sysdeps/x86_64/tcb-offsets.sym: Add cancellation-related bits
1737 and PTHREAD_CANCELED.
1738
1739 2009-07-31 Ulrich Drepper <drepper@redhat.com>
1740
1741 * descr.h: Better definition of *_BITMASK macros for cancellation.
1742
1743 2009-07-29 Ulrich Drepper <drepper@redhat.com>
1744
1745 * sysdeps/x86_64/tls.h (TLS_TCB_ALIGN): Define explicitly to 32.
1746
1747 * sysdeps/x86_64/tls.h (tcbhead_t): Add room for SSE registers the
1748 dynamic linker might have to save.
1749 Define RTLD_CHECK_FOREIGN_CALL, RTLD_ENABLE_FOREIGN_CALL,
1750 RTLD_PREPARE_FOREIGN_CALL, and RTLD_FINALIZE_FOREIGN_CALL. Pretty
1751 printing.
1752
1753 * sysdeps/x86_64/tcb-offsets.sym: Add RTLD_SAVESPACE_SSE.
1754
1755 2009-07-28 Ulrich Drepper <drepper@redhat.com>
1756
1757 * pthread_mutex_lock.c [NO_INCR] (__pthread_mutex_cond_lock_adjust):
1758 New function.
1759 * pthreadP.h: Declare __pthread_mutex_cond_lock_adjust.
1760 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: Add ROBUST_BIT.
1761 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Don't use
1762 requeue_pi for robust mutexes.
1763 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
1764 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1765 Don't only skip __pthread_mutex_cond_lock. Call instead
1766 __pthread_mutex_cond_lock_adjust.
1767 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1768
1769 * pthread_mutex_unlock.c (__pthread_mutex_unlock_full): Minor
1770 optimization of PI mutex handling.
1771
1772 2009-07-27 Ulrich Drepper <drepper@redhat.com>
1773
1774 [BZ #10418]
1775 * pthread_mutex_unlock.c (__pthread_mutex_unlock_full): Use _rel
1776 instead of of _acq variants of cmpxchg.
1777
1778 2009-07-23 Ulrich Drepper <drepper@redhat.com>
1779
1780 * sysdeps/x86_64/configure.in: New file.
1781
1782 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix error
1783 path when not using absolute timeout futex.
1784
1785 2009-07-20 Ulrich Drepper <drepper@redhat.com>
1786
1787 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Minor
1788 optimizations of last changes.
1789 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1790
1791 2009-07-19 Ulrich Drepper <drepper@redhat.com>
1792
1793 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
1794 FUTEX_WAIT_REQUEUE_PI and FUTEX_CMP_REQUEUE_PI.
1795 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: If mutex
1796 is a PI mutex, then use FUTEX_CMP_REQUEUE_PI.
1797 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
1798 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: If mutex
1799 is a PI mutex, then use FUTEX_WAIT_REQUEUE_PI.
1800 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1801
1802 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1803 (__pthread_cond_timedwait): Make more robust.
1804
1805 2009-07-18 Ulrich Drepper <drepper@redhat.com>
1806
1807 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
1808 (__lll_robust_timedlock_wait): If possible use FUTEX_WAIT_BITSET to
1809 directly use absolute timeout.
1810
1811 * tst-sem5.c (do_test): Add test for premature timeout.
1812 * Makefile: Linu tst-sem5 with librt.
1813
1814 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
1815 (pthread_rwlock_timedwrlock): If possible use FUTEX_WAIT_BITSET to
1816 directly use absolute timeout.
1817 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
1818 (pthread_rwlock_timedrdlock): Likewise.
1819
1820 * tst-cond11.c (run_test): Add test to check that the timeout is
1821 long enough.
1822
1823 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
1824 (__pthread_cond_timedwait): If possible use FUTEX_WAIT_BITSET to
1825 directly use absolute timeout.
1826
1827 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
1828 (__pthread_cond_wait): Convert to using exception handler instead of
1829 registered unwind buffer.
1830 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1831 (__pthread_cond_timedwait): Likewise.
1832
1833 2009-07-17 Ulrich Drepper <drepper@redhat.com>
1834
1835 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
1836 If possible use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME to directly
1837 use absolute timeout.
1838
1839 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Optimize
1840 handling of uncontested semaphore.
1841
1842 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
1843 (__condvar_cleanup): Rewrite to use cfi directives instead of
1844 hand-coded unwind tables.
1845 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S (__pthread_once):
1846 Likewise.
1847 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
1848 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
1849 Likewise.
1850
1851 2009-06-12 Ulrich Drepper <drepper@redhat.com>
1852
1853 * Makefile (libpthread-routines): Add pthread_sigqueue.
1854 * Versions: Add pthread_sigqueue for GLIBC_2.11.
1855 * sysdeps/pthread/bits/sigthread.h: Declare pthread_sigqueue.
1856 * sysdeps/unix/sysv/linux/pthread_sigqueue.c: New file.
1857
1858 2009-06-11 Ulrich Drepper <drepper@redhat.com>
1859
1860 [BZ #10262]
1861 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
1862 (LOAD_FUTEX_WAIT_ABS): Fix futex parameter in case private futexes
1863 cannot be assumed.
1864 Patch by Bryan Kadzban <bz-glibc@kdzbn.homelinux.net>.
1865
1866 2009-05-16 Ulrich Drepper <drepper@redhat.com>
1867
1868 * libc-cancellation.c: Move __libc_cleanup_routine to...
1869 * libc-cleanup.c: ...here. New file.
1870 * Makefile (routines): Add libc-cleanup.
1871
1872 * cancellation.c (__pthread_disable_asynccancel): Remove unnecessary
1873 test.
1874 * libc-cancellation.c: Use <nptl/cancellation.c: to define the code.
1875 * sysdeps/pthread/librt-cancellation.c: Likewise.
1876
1877 [BZ #9924]
1878 * nptl-init.c: Renamed from init.c.
1879 * Makefile: Change all occurences of init.c to nptl-init.c.
1880
1881 2009-05-15 Ulrich Drepper <drepper@redhat.com>
1882
1883 * cancellation.c (__pthread_disable_asynccancel): Correct the bits
1884 to test when deciding on the delay.
1885 * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
1886 * pthread_cancel.c: Close race between deciding on sending a signal
1887 and setting the CANCELING_BIT bit.
1888
1889 * cancellation.c (__pthread_disable_asynccancel): Don't return if
1890 thread is canceled.
1891 * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
1892
1893 2009-04-27 Ulrich Drepper <drepper@redhat.com>
1894
1895 * cancellation.c (__pthread_disable_asynccancel): Use THREAD_ATOMIC_AND
1896 is available.
1897 * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
1898 * sysdeps/x86_64/tls.h: Define THREAD_ATOMIC_AND.
1899 * sysdeps/i386/tls.h: Likewise.
1900 (tcbhead_t): Add __private_tm member.
1901
1902 2009-04-26 Ulrich Drepper <drepper@redhat.com>
1903
1904 * sem_open.c (sem_open): Rewrite initialization of initsem to
1905 avoid warnings.
1906
1907 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
1908 Avoid warning by using may_alias attribute on ptrhack.
1909
1910 2009-04-22 Ulrich Drepper <drepper@redhat.com>
1911
1912 [BZ #10090]
1913 * pthread_attr_setschedparam.c (__pthread_attr_setschedparam):
1914 Check policy and priority for validity.
1915 Patch mostly by Zhang Xiliang <zhangxiliang@cn.fujitsu.com>.
1916
1917 2009-03-15 Ulrich Drepper <drepper@redhat.com>
1918
1919 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1920 (__pthread_cond_timedwait): Change to use cfi directives instead of
1921 hand-coded unwind sections.
1922
1923 2009-03-10 Ulrich Drepper <drepper@redhat.com>
1924
1925 * init.c (nptl_freeres): Compile only for SHARED.
1926
1927 2009-03-09 Jakub Jelinek <jakub@redhat.com>
1928
1929 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Define
1930 FUTEX_WAIT_BITSET, FUTEX_WAKE_BITSET, FUTEX_CLOCK_REALTIME and
1931 FUTEX_BITSET_MATCH_ANY.
1932
1933 2009-02-27 Roland McGrath <roland@redhat.com>
1934
1935 * init.c (__nptl_initial_report_events): Mark __attribute_used__.
1936 * pthread_create.c (__nptl_threads_events, __nptl_last_event): Likewise.
1937
1938 2009-02-26 Ulrich Drepper <drepper@redhat.com>
1939
1940 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
1941 _POSIX_THREAD_ROBUST_PRIO_INHERIT and
1942 _POSIX_THREAD_ROBUST_PRIO_PROTECT. Reset value of macros from
1943 200112L to 200809L.
1944
1945 2009-02-25 Ulrich Drepper <drepper@redhat.com>
1946
1947 * sysdeps/pthread/pthread.h: The robust mutex functions are in
1948 POSIX 2008.
1949
1950 2009-02-24 Ulrich Drepper <drepper@redhat.com>
1951
1952 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_BITS_POSIX_OPT_H):
1953 Unify name of include protector macro.
1954
1955 2009-02-14 SUGIOKA Toshinobu <sugioka@itonet.co.jp>
1956
1957 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
1958 LOAD_FUTEX_WAIT_ABS even if (FUTEX_WAIT == 0).
1959
1960 2009-01-29 Ulrich Drepper <drepper@redhat.com>
1961
1962 * sysdeps/pthread/unwind-forcedunwind.c: Encrypt all function
1963 pointer variables.
1964
1965 * allocatestack.c (__free_stacks): Renamed from free_stacks.
1966 (__free_stack_cache): Removed. Change callers to call __free_stacks.
1967 * init.c (nptl_freeres): New function.
1968 (pthread_functions): Initialize ptr_freeres to nptl_freeres.
1969 * pthreadP.h: Don't declare __free_stack_cache. Declare __free_stacks.
1970 * sysdeps/pthread/unwind-forcedunwind.c (libgcc_s_handle): New
1971 variable.
1972 (pthread_cancel_init): Depend in libgcc_s_handle for decision to
1973 load DSO. Assign last.
1974 (__unwind_freeres): New function.
1975
1976 * allocatestack.c (__reclaim_stacks): Reset in_flight_stack later
1977 for better debugging. No need to use stack_list_add here.
1978
1979 2009-01-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1980
1981 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
1982 (__lll_timedlock_wait): Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME
1983 instead of computing relative timeout.
1984 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
1985 FUTEX_CLOCK_REALTIME and FUTEX_BITSET_MATCH_ANY.
1986
1987 2009-01-25 Ulrich Drepper <drepper@redhat.com>
1988
1989 * pthread_mutex_lock.c (__pthread_mutex_lock): Remove unused label out.
1990
1991 2009-01-08 Ulrich Drepper <drepper@redhat.com>
1992
1993 * sysdeps/pthread/list.h (list_add): Initialize new element first.
1994 (list_add_tail): Removed.
1995
1996 2009-01-07 Ulrich Drepper <drepper@redhat.com>
1997
1998 * (in_flight_stack): New variable.
1999 (stack_list_del): New function. Use instead of list_del.
2000 (stack_list_add): New function. Use instead of list_add when adding to
2001 stack_cache and stack_used lists.
2002 (__reclaim_stacks): Complete operations on stack_cache and stack_used lists
2003 when the fork call interrupted another thread.
2004
2005 2009-01-04 Ulrich Drepper <drepper@redhat.com>
2006
2007 * init.c (__pthread_initialize_minimal_internal): Optimize test
2008 FUTEX_CLOCK_REALTIME a bit.
2009
2010 2009-01-03 Ulrich Drepper <drepper@redhat.com>
2011
2012 * init.c (__pthread_initialize_minimal_internal): Cheat a bit by
2013 only passing five parameters to FUTEX_WAIT_BITSET call.
2014
2015 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
2016 (__lll_timedlock_wait): Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME
2017 instead of computing relative timeout.
2018
2019 2009-01-02 Ulrich Drepper <drepper@redhat.com>
2020
2021 * init.c (__pthread_initialize_minimal_internal): Check for
2022 FUTEX_CLOCK_REALTIME flag.
2023 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
2024 Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME instead of computing
2025 relative timeout.
2026
2027 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
2028 FUTEX_CLOCK_REALTIME and FUTEX_BITSET_MATCH_ANY.
2029 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
2030 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2031 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2032 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2033
2034 2008-12-09 Ulrich Drepper <drepper@redhat.com>
2035
2036 * sysdeps/pthread/pthread.h (pthread_cleanup_pop): Use { } as empty
2037 loop body instead of ; to avoid gcc warnings.
2038 (pthread_cleanup_pop_restore_np): Likewise.
2039 Patch by Caolán McNamara <caolanm@redhat.com>.
2040
2041 2008-12-09 Jakub Jelinek <jakub@redhat.com>
2042
2043 * pthread_mutex_lock.c (__pthread_mutex_lock): Handle only the
2044 fast path here, for robust/PI/PP mutexes call
2045 __pthread_mutex_lock_full. Don't use switch, instead use a series
2046 of ifs according to their probability.
2047 (__pthread_mutex_lock_full): New function.
2048 * pthread_mutex_unlock.c: Include assert.h.
2049 (__pthread_mutex_unlock_usercnt): Handle only the
2050 fast path here, for robust/PI/PP mutexes call
2051 __pthread_mutex_unlock_full. Don't use switch, instead use a series
2052 of ifs according to their probability.
2053 (__pthread_mutex_unlock_full): New function.
2054 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c
2055 (__pthread_mutex_lock_full): Define.
2056
2057 2008-12-08 Ulrich Drepper <drepper@redhat.com>
2058
2059 * sysdeps/x86_64/tls.h (tcbhead_t): Add fields reserved for TM
2060 implementation. Add necessary padding and.
2061 * descr.h (struct pthread): Increase padding for tcbhead_t to 24
2062 words.
2063
2064 2008-12-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2065
2066 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define FUTEX_WAIT_BITSET
2067 and FUTEX_WAKE_BITSET.
2068
2069 2008-12-02 Ulrich Drepper <drepper@redhat.com>
2070
2071 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_WAIT_BITSET
2072 and FUTEX_WAKE_BITSET.
2073 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2074 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2075 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2076 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2077
2078 2008-11-25 Roland McGrath <roland@redhat.com>
2079
2080 * sysdeps/alpha, sysdeps/unix/sysv/linux/alpha:
2081 Subdirectories moved to ports repository as
2082 sysdeps/.../nptl subdirectories.
2083
2084 2008-11-12 Jakub Jelinek <jakub@redhat.com>
2085
2086 [BZ #7008]
2087 * pthread_condattr_setclock.c (pthread_condattr_setclock): Fix masking
2088 of old value.
2089 * pthread_cond_init.c (__pthread_cond_init): Fix
2090 cond->__data.__nwaiters initialization.
2091 * Makefile (tests): Add tst-cond23.
2092 * tst-cond23.c: New test.
2093
2094 2008-11-07 Jakub Jelinek <jakub@redhat.com>
2095
2096 * sysdeps/pthread/malloc-machine.h (MALLOC): Adjust __libc_tsd_define
2097 arguments.
2098 (tsd_setspecific, tsd_getspecific): Adjust __libc_tsd_{set,get}
2099 arguments.
2100
2101 2008-11-01 Ulrich Drepper <drepper@redhat.com>
2102
2103 [BZ #6955]
2104 * pthread_mutex_lock.c: Add support for private PI mutexes.
2105 * pthread_mutex_timedlock.c: Likewise.
2106 * pthread_mutex_trylock.c: Likewise.
2107 * pthread_mutex_unlock.c: Likewise.
2108 Patch mostly by Ben Jackson <ben@ben.com>.
2109
2110 2008-10-31 Ulrich Drepper <drepper@redhat.com>
2111
2112 [BZ #6843]
2113 * sysdeps/pthread/gai_misc.h (__gai_create_helper_thread):
2114 Increase stack size for helper thread.
2115
2116 2008-10-06 Martin Schwidefsky <schwidefsky@de.ibm.com>
2117
2118 * sysdeps/s390/tls.h (THREAD_SET_STACK_GUARD): Add empty inline
2119 assembly with a clobber list for access registers a0 and a1.
2120
2121 2008-09-11 Martin Schwidefsky <schwidefsky@de.ibm.com>
2122
2123 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Add memory barrier
2124 to force runp->refcntr to be read from memory.
2125
2126 2008-09-08 Richard Guenther <rguenther@suse.de>
2127
2128 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_lock,
2129 lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
2130 lll_timedlock, lll_robust_timedlock, lll_unlock,
2131 lll_robust_unlock): Promote private to int.
2132
2133 2008-08-15 Ulrich Drepper <drepper@redhat.com>
2134
2135 * sysdeps/x86_64/pthreaddef.h: Remove ARCH_MAP_FLAGS and
2136 ARCH_RETRY_MMAP definitions.
2137 * allocatestack.c: Remove definition of ARCH_MAP_FLAGS.
2138 Define MAP_STACK when not defined.
2139 (allocate_stack): Use MAP_STACK instead of ARCH_MAP_FLAGS. Remove
2140 handling of ARCH_RETRY_MMAP.
2141
2142 2008-07-30 Ulrich Drepper <drepper@redhat.com>
2143
2144 * tst-align2.c (f): Print message that f is reached.
2145
2146 2008-04-28 Hiroki Kaminaga <kaminaga@sm.sony.co.jp>
2147
2148 [BZ #6740]
2149 * sysdeps/powerpc/tcb-offsets.sym (PRIVATE_FUTEX_OFFSET): Guard symbol
2150 definition with #ifndef __ASSUME_PRIVATE_FUTEX.
2151
2152 2008-07-25 Ulrich Drepper <drepper@redhat.com>
2153
2154 * sysdeps/unix/sysv/linux/mq_notify.c (init_mq_netlink): Use
2155 SOCK_CLOEXEC if possible.
2156
2157 2008-05-29 Ulrich Drepper <drepper@redhat.com>
2158
2159 * Makefile (tests): Add tst-rwlock2a.
2160 * tst-rwlock2.c: Use TYPE macro to decide what rwlock type to use.
2161 * tst-rwlock2a.c: New file.
2162
2163 2008-06-12 Ulrich Drepper <drepper@redhat.com>
2164
2165 * sysdeps/pthread/pthread.h: Remove inadvertant checkin.
2166
2167 2008-05-17 Samuel Thibault <samuel.thibault@ens-lyon.org>
2168
2169 * sysdeps/pthread/pthread.h: Fix typo in comment.
2170
2171 2008-05-28 Ulrich Drepper <drepper@redhat.com>
2172
2173 * sysdeps/pthread/createthread.c (do_clone): Pass accurate length
2174 of CPU set to the kernel.
2175
2176 2008-05-23 Paul Pluzhnikov <ppluzhnikov@google.com>
2177
2178 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Add
2179 cfi directives.
2180 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
2181 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
2182 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
2183 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
2184 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
2185 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
2186
2187 2008-05-22 Paul Pluzhnikov <ppluzhnikov@google.com>
2188
2189 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S: Add
2190 cfi directives.
2191 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2192 Likewise.
2193 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
2194 Likewise.
2195 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
2196 Likewise.
2197
2198 2008-05-26 Ulrich Drepper <drepper@redhat.com>
2199
2200 * tst-typesizes.c: Explicitly check __SIZEOF_PTHREAD_* constants.
2201
2202 2008-05-20 Jakub Jelinek <jakub@redhat.com>
2203
2204 David S. Miller <davem@davemloft.net>
2205
2206 * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: New file.
2207
2208 2008-05-10 Ulrich Drepper <drepper@redhat.com>
2209
2210 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Access
2211 __pshared correctly.
2212 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2213 Likewise.
2214 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2215 Likewise.
2216 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
2217 Likewise.
2218 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
2219 Likewise.
2220 Reported by Clemens Kolbitsch <clemens.kol@gmx.at>.
2221
2222 2008-04-14 David S. Miller <davem@davemloft.net>
2223
2224 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
2225 (__old_sem_wait): Fix argument to lll_futex_wait().
2226
2227 2007-11-26 Daniel Jacobowitz <dan@codesourcery.com>
2228
2229 * pthread_create.c: Require pthread_mutex_trylock and
2230 pthread_key_delete for libgcc.
2231
2232 2008-04-08 Jakub Jelinek <jakub@redhat.com>
2233
2234 [BZ #6020]
2235 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h
2236 (lll_futex_wake_unlock): Add private argument to the pre-v9 macro.
2237 Patch by Sunil Amitkumar Janki <devel.sjanki@gmail.com>.
2238
2239 2008-03-27 Ulrich Drepper <drepper@redhat.com>
2240
2241 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine ARG_MAX if
2242 <linux/limits.h> has defined it.
2243 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
2244 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
2245 * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
2246 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
2247
2248 2008-03-18 Jakub Jelinek <jakub@redhat.com>
2249
2250 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Use __ASSEMBLER__ instead
2251 of ASSEMBLER.
2252 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
2253 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Likewise.
2254
2255 2008-03-14 Ulrich Drepper <drepper@redhat.com>
2256
2257 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
2258 HAVE_DL_DISCOVER_OSVERSION.
2259 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
2260 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Likewise.
2261
2262 2008-03-07 Ulrich Drepper <drepper@redhat.com>
2263
2264 [BZ #5778]
2265 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Change
2266 _POSIX_CHOWN_RESTRICTED value to zero.
2267
2268 2008-01-31 Roland McGrath <roland@redhat.com>
2269
2270 * Makefile (omit-deps): Variable removed.
2271
2272 2008-01-30 Ulrich Drepper <drepper@redhat.com>
2273
2274 * sysdeps/unix/sysv/linux/x86_64/sem_post.S (sem_post): Avoid
2275 unnecessary addr32 prefix.
2276
2277 2008-01-29 Roland McGrath <roland@redhat.com>
2278
2279 * Makeconfig (ptw-CPPFLAGS, sysd-rules-patterns): New variables.
2280
2281 2008-01-22 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2282
2283 * sysdeps/unix/sysv/linux/sh/sem_post.S: Don't overflow value field.
2284
2285 2008-01-21 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2286
2287 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XADD): Use
2288 a scratch register.
2289 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
2290 (__lll_lock_wait_private): Fix typo.
2291 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
2292 (pthread_barrier_wait): Likewise. Adjust XADD use.
2293 * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
2294 Adjust XADD use.
2295 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S
2296 (pthread_rwlock_timedrdlock): Return correct return value.
2297 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S
2298 (pthread_rwlock_timedwrlock): Likewise.
2299
2300 2008-01-15 Ulrich Drepper <drepper@redhat.com>
2301
2302 * tst-eintr2.c (do_test): make sure that if mutex_lock in main
2303 thread returns the program exits with an error code.
2304
2305 2008-01-10 Ulrich Drepper <drepper@redhat.com>
2306
2307 * pthread-errnos.sym: Add EOVERFLOW.
2308 * sysdeps/unix/sysv/linux/structsem.sym: Add SEM_VALUE_MAX.
2309 * sysdeps/unix/sysv/linux/sem_post.c: Don't overflow value field.
2310 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
2311 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
2312
2313 2007-12-14 Ulrich Drepper <drepper@redhat.com>
2314
2315 * sysdeps/x86_64/pthreaddef.h (ARCH_RETRY_MMAP): Take additional
2316 parameter. Passed it as permission to mmap.
2317 * allocatestack.c (allocate_stack): Pass prot as second parameter
2318 to ARCH_RETRY_MMAP.
2319
2320 2007-12-12 Ulrich Drepper <drepper@redhat.com>
2321
2322 * tst-basic7.c: Allocate memory for the stack.
2323
2324 [BZ #5465]
2325 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S [!SHARED]
2326 (__pthread_cond_timedwait): Don't use VDSO.
2327 Patch by Michal Januszewski.
2328
2329 2007-12-07 Ulrich Drepper <drepper@redhat.com>
2330
2331 [BZ #5455]
2332 * sysdeps/pthread/pthread.h [!__EXCEPTIONS] (pthread_cleanup_pop):
2333 Allow label before pthread_cleanup_pop.
2334 (pthread_cleanup_pop_restore_np): Likewise.
2335
2336 2007-12-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2337
2338 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
2339 Store 2 before returning ETIMEDOUT.
2340
2341 2007-11-23 Ulrich Drepper <drepper@redhat.com>
2342
2343 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
2344 Store 2 before returning ETIMEDOUT.
2345 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise
2346 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
2347 (__lll_lock_wait_private): Optimize.
2348 (__lll_lock_wait): Likewise.
2349
2350 2007-11-20 Jakub Jelinek <jakub@redhat.com>
2351
2352 * sysdeps/pthread/pthread.h (pthread_cleanup_push,
2353 pthread_cleanup_push_defer_np): Add extra (void *) cast to shut up
2354 g++ 4.1 and 4.2 -Wstrict-aliasing warnings.
2355
2356 2007-11-08 Ulrich Drepper <drepper@redhat.com>
2357
2358 [BZ #5240]
2359 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
2360 If we time out, try one last time to lock the futex to avoid
2361 losing a wakeup signal.
2362 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
2363 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
2364
2365 [BZ #5245]
2366 * sysdeps/pthread/createthread.c (do_clone): Translate clone error
2367 if necessary.
2368
2369 2007-11-07 Ulrich Drepper <drepper@redhat.com>
2370
2371 [BZ #5245]
2372 * allocatestack.c (allocate_stack): Change ENOMEM error in case
2373 mmap failed to EAGAIN.
2374 * Makefile (tests): Add tst-basic7.
2375 * tst-basic7.c: New file.
2376
2377 2007-11-05 Ulrich Drepper <drepper@redhat.com>
2378
2379 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
2380 Use __linkin_atfork.
2381
2382 2007-11-03 Mike Frysinger <vapier@gentoo.org>
2383
2384 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (LOAD_FUTEX_WAIT): Add
2385 missing line continuations.
2386 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S (LOAD_FUTEX_WAIT,
2387 LOAD_FUTEX_WAKE): Likewise. Also add missing 3rd parameter.
2388
2389 2007-10-28 Ulrich Drepper <drepper@redhat.com>
2390
2391 [BZ #5220]
2392 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Declare
2393 __active_timer_sigev_thread and __active_timer_sigev_thread_lock.
2394 (struct timer): Add next element.
2395 * sysdeps/unix/sysv/linux/timer_create.c: For SIGEV_THREAD timers,
2396 enqueue timer structure into __active_timer_sigev_thread list.
2397 * sysdeps/unix/sysv/linux/timer_delete.c: For SIGEV_THREAD timers,
2398 remove timer struct from __active_timer_sigev_thread.
2399 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
2400 Before using timer structure make sure it is still on the
2401 __active_timer_sigev_thread list. Keep lock until done.
2402 Define __active_timer_sigev_thread and
2403 __active_timer_sigev_thread_lock.
2404
2405 2007-10-27 Ulrich Drepper <drepper@redhat.com>
2406
2407 * sysdeps/pthread/malloc-machine.h: Define ATFORK_MEM.
2408 Redefine thread_atfork for use of ATFORK_MEM.
2409 * sysdeps/unix/sysv/linux/fork.h: Define __linkin_atfork.
2410 * sysdeps/unix/sysv/linux/register-atfork.c (__linkin_atfork): New
2411 function.
2412 * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
2413 Use atomic operation when removing first element of list.
2414
2415 2007-10-17 Jakub Jelinek <jakub@redhat.com>
2416
2417 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__old_sem_post): New
2418 routine instead of an alias to __new_sem_post.
2419
2420 2007-10-15 Jakub Jelinek <jakub@redhat.com>
2421
2422 * init.c (__pthread_initialize_minimal): Initialize word to appease
2423 valgrind.
2424
2425 2007-10-10 Jakub Jelinek <jakub@redhat.com>
2426
2427 * sysdeps/pthread/bits/libc-lock.h (__libc_rwlock_init): Inside of
2428 libc.so just clear NAME.
2429 (__libc_rwlock_fini): Nop inside of libc.so.
2430 * tst-initializers1.c (main): Test if PTHREAD_RWLOCK_INITIALIZER is
2431 all zeros.
2432
2433 2007-09-02 Ulrich Drepper <drepper@redhat.com>
2434
2435 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
2436 (__pthread_cond_wait): Fix unlocking of internal lock after mutex
2437 unlocking failed.
2438 Patch by Luca Barbieri <luca.barbieri@gmail.com>.
2439
2440 2007-08-21 Ulrich Drepper <drepper@redhat.com>
2441
2442 [BZ #4938]
2443 * allocatestack.c (__reclaim_stacks): Clear the TSD in the
2444 reclaimed stack if necessary.
2445 * Makefile (tests): Add tst-tsd6.
2446 * tst-tsd6.c: New file.
2447
2448 2007-08-21 Jakub Jelinek <jakub@redhat.com>
2449
2450 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_dead):
2451 Add private argument.
2452
2453 2007-08-20 Ulrich Drepper <drepper@redhat.com>
2454
2455 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
2456 (__pthread_cond_timedwait): Use clock_gettime from VDSO if possible.
2457
2458 2007-08-16 Jakub Jelinek <jakub@redhat.com>
2459
2460 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h
2461 (__lll_robust_timedlock): Pass private as last argument to
2462 __lll_robust_timedlock_wait.
2463 (__lll_unlock): Fix a pasto.
2464
2465 2007-08-15 Jakub Jelinek <jakub@redhat.com>
2466
2467 * sysdeps/unix/sysv/linux/sparc/internaltypes.h (sparc_new_sem,
2468 sparc_old_sem): New structs.
2469 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
2470 (__sem_wait_cleanup): New function.
2471 (__new_sem_wait): Use sparc_new_sem structure. Bump and afterwards
2472 decrease nwaiters. Register __sem_wait_cleanup as cleanup handler.
2473 Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
2474 lll_futex_wait.
2475 (__old_sem_wait): New function.
2476 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: Include
2477 nptl/sysdeps/unix/sysv/linux/sparc version.
2478 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c:
2479 Likewise.
2480 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: Likewise.
2481 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c
2482 (__new_sem_trywait): Use sparc_old_sem structure.
2483 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c
2484 (sem_timedwait): Use sparc_new_sem structure. Bump and afterwards
2485 decrease nwaiters. Register __sem_wait_cleanup as cleanup handler.
2486 Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
2487 lll_futex_timed_wait.
2488 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c (__new_sem_post):
2489 Use sparc_new_sem structure. Only wake if nwaiters > 0. Pass
2490 isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
2491 lll_futex_wake.
2492 (__old_sem_post): New function.
2493 * sysdeps/unix/sysv/linux/sparc/sem_wait.c: New file.
2494 * sysdeps/unix/sysv/linux/sparc/sem_init.c: New file.
2495 * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c: New file.
2496 * sysdeps/unix/sysv/linux/sparc/sem_post.c: New file.
2497 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: Remove.
2498 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: Remove.
2499
2500 2007-08-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2501
2502 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
2503 (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
2504 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2505 Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
2506 * sysdeps/unix/sysv/linux/shpthread_cond_signal.S
2507 (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
2508 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2509 Use FUTEX_WAKE_OP.
2510 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
2511 kernel-features.h and tcb-offsets.h.
2512 (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
2513 lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
2514 process private.
2515 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
2516 tcb-offsets.h.
2517 (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE
2518 to lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
2519 process private.
2520 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use #ifdef
2521 __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
2522 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
2523 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
2524 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
2525 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
2526 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
2527
2528 2007-08-14 Jakub Jelinek <jakub@redhat.com>
2529
2530 * sysdeps/unix/sysv/linux/lowlevellock.c: Comment fix.
2531 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
2532 (__lll_timedwait_tid): Pass LLL_SHARED as 4th argument to
2533 lll_futex_timed_wait.
2534
2535 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (__lll_unlock,
2536 __lll_robust_unlock): Rewrite as macros instead of inline functions.
2537 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_unlock,
2538 __lll_robust_unlock, __lll_wait_tid): Likewise.
2539
2540 2007-08-13 Jakub Jelinek <jakub@redhat.com>
2541
2542 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
2543 Fix a pasto.
2544 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
2545 (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
2546 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2547 Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
2548 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
2549 (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
2550 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2551 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Include
2552 kernel-features.h.
2553 (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
2554 lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
2555 process private. Switch DW_CFA_advance_loc1 and some
2556 DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
2557 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
2558 (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE to
2559 lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
2560 process private. Switch DW_CFA_advance_loc{1,2} and some
2561 DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
2562 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use
2563 #ifdef __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
2564 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2565 Likewise.
2566 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
2567 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
2568 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2569 Likewise.
2570 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
2571 (__pthread_cond_broadcast): Compare %r8 instead of
2572 dep_mutex-cond_*(%rdi) with $-1.
2573 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
2574 (__pthread_cond_signal): Xor FUTEX_WAKE_OP with FUTEX_WAKE instead
2575 of oring.
2576
2577 2007-08-13 Ulrich Drepper <drepper@redhat.com>
2578
2579 * sysdeps/unix/sysv/linux/i386/i786/Implies: New file.
2580
2581 2007-08-13 Jakub Jelinek <jakub@redhat.com>
2582
2583 * allocatestack.c: Include kernel-features.h.
2584 * pthread_create.c: Likewise.
2585 * pthread_mutex_init.c: Likewise.
2586 * init.c: Likewise.
2587 * pthread_cond_timedwait.c: Likewise.
2588 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
2589 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2590 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
2591 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
2592 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
2593 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2594 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2595 Likewise.
2596 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2597 Likewise.
2598 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2599 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2600 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
2601 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
2602
2603 2007-08-12 Jakub Jelinek <jakub@redhat.com>
2604
2605 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
2606 [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
2607 byte elements. One of them is the new __shared element.
2608 [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
2609 adjust names of other padding elements.
2610 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
2611 [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
2612 byte elements. One of them is the new __shared element.
2613 [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
2614 adjust names of other padding elements.
2615 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_rwlock_t):
2616 Renamed __pad1 element to __shared, adjust names of other padding
2617 elements.
2618 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
2619 (pthread_rwlock_t): Likewise.
2620 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock): Fix a
2621 typo.
2622
2623 2007-08-09 Anton Blanchard <anton@samba.org>
2624
2625 * sysdeps/unix/sysv/linux/powerpc/pthread_spin_unlock.c: New file.
2626
2627 2007-08-12 Ulrich Drepper <drepper@redhat.com>
2628
2629 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Include
2630 <kernel-features.h>.
2631 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
2632
2633 2007-08-11 Ulrich Drepper <drepper@redhat.com>
2634
2635 * pthreadP.h (PTHREAD_ROBUST_MUTEX_PSHARED): Define.
2636 * pthread_mutex_lock.c: Use it instead of PTHREAD_MUTEX_PSHARED when
2637 dealing with robust mutexes.
2638 * pthread_mutex_timedlock.c: Likewise.
2639 * pthread_mutex_trylock.c: Likewise.
2640 * pthread_mutex_unlock.c: Likewise.
2641 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
2642
2643 2007-08-06 Jakub Jelinek <jakub@redhat.com>
2644
2645 * pthreadP.h (PTHREAD_MUTEX_PSHARED_BIT): Define.
2646 (PTHREAD_MUTEX_TYPE): Mask __kind with 127.
2647 (PTHREAD_MUTEX_PSHARED): Define.
2648 * pthread_mutex_init.c (__pthread_mutex_init): Set
2649 PTHREAD_MUTEX_PSHARED_BIT for pshared or robust
2650 mutexes.
2651 * pthread_mutex_lock.c (LLL_MUTEX_LOCK): Take mutex as argument
2652 instead of its __data.__lock field, pass PTHREAD_MUTEX_PSHARED
2653 as second argument to lll_lock.
2654 (LLL_MUTEX_TRYLOCK): Take mutex as argument
2655 instead of its __data.__lock field.
2656 (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
2657 __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
2658 to lll_robust_lock.
2659 (__pthread_mutex_lock): Update LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
2660 LLL_ROBUST_MUTEX_LOCK users, use PTHREAD_MUTEX_TYPE (mutex)
2661 instead of mutex->__data.__kind directly, pass
2662 PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock and lll_futex_wait.
2663 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Use
2664 PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
2665 directly, pass PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock.
2666 (pthread_mutex_timedlock): Pass PTHREAD_MUTEX_PSHARED (mutex)
2667 to lll_timedlock, lll_robust_timedlock, lll_unlock and
2668 lll_futex_timed_wait. Use PTHREAD_MUTEX_TYPE (mutex) instead
2669 of mutex->__data.__kind directly.
2670 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Pass
2671 PTHREAD_MUTEX_PSHARED (mutex) to lll_timedlock,
2672 lll_robust_timedlock, lll_unlock and lll_futex_timed_wait. Use
2673 PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind directly.
2674 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Pass
2675 PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock, lll_robust_unlock
2676 and lll_futex_wake.
2677 * pthread_mutex_setprioceiling.c (pthread_mutex_setprioceiling): Pass
2678 PTHREAD_MUTEX_PSHARED (mutex) to lll_futex_wait and lll_futex_wake.
2679 Use PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
2680 directly.
2681 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK):
2682 Take mutex as argument instead of its __data.__lock field, pass
2683 PTHREAD_MUTEX_PSHARED as second argument to lll_cond_lock.
2684 (LLL_MUTEX_TRYLOCK): Take mutex as argument instead of its
2685 __data.__lock field.
2686 (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
2687 __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
2688 to lll_robust_cond_lock.
2689 * pthread_cond_broadcast.c (__pthread_cond_broadcast): Add pshared
2690 variable, pass it to lll_lock, lll_unlock, lll_futex_requeue and
2691 lll_futex_wake. Don't use lll_futex_requeue if dependent mutex
2692 has PTHREAD_MUTEX_PSHARED_BIT bit set in its __data.__kind.
2693 * pthread_cond_destroy.c (__pthread_cond_destroy): Add pshared
2694 variable, pass it to lll_lock, lll_unlock, lll_futex_wake and
2695 lll_futex_wait.
2696 * pthread_cond_signal.c (__pthread_cond_signal): Add pshared
2697 variable, pass it to lll_lock, lll_unlock, lll_futex_wake_unlock and
2698 lll_futex_wake.
2699 * pthread_cond_timedwait.c (__pthread_cond_wait): Add
2700 pshared variable, pass it to lll_lock, lll_unlock,
2701 lll_futex_timedwait and lll_futex_wake.
2702 * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait): Add
2703 pshared variable, pass it to lll_lock, lll_unlock, lll_futex_wait
2704 and lll_futex_wake.
2705 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_requeue,
2706 lll_futex_wake_unlock): Add private argument, use __lll_private_flag
2707 macro.
2708 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue,
2709 lll_futex_wake_unlock): Likewise.
2710 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_requeue):
2711 Likewise.
2712 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_futex_requeue,
2713 lll_futex_wake_unlock): Likewise.
2714 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_requeue):
2715 Likewise.
2716 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue,
2717 lll_futex_wake_unlock): Likewise.
2718 (lll_futex_wake): Fix a typo.
2719 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym (PS_BIT): Add.
2720 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
2721 (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
2722 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2723 Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
2724 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
2725 (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
2726 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2727 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
2728 (__pthread_cond_timedwait): Likewise.
2729 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
2730 (__condvar_cleanup, __pthread_cond_wait): Likewise.
2731
2732 2007-08-05 Jakub Jelinek <jakub@redhat.com>
2733
2734 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
2735 Don't use CGOTSETUP and CGOTRESTORE macros.
2736 (CGOTSETUP, CGOTRESTORE): Remove.
2737 <IS_IN_rtld> (CENABLE, CDISABLE): Don't use JUMPTARGET, branch to
2738 @local symbol.
2739
2740 2007-08-01 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2741
2742 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Remove
2743 definitions for private futexes.
2744 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Include
2745 kernel-features.h and lowlevellock.h. Use private futexes if
2746 they are available.
2747 (__lll_lock_wait_private, __lll_unlock_wake_private): New.
2748 (__lll_mutex_lock_wait): Rename to
2749 (__lll_lock_wait): ... this. Don't compile in for libc.so.
2750 (__lll_mutex_timedlock_wait): Rename to ...
2751 (__lll_timedlock_wait): ... this. Use __NR_gettimeofday.
2752 Don't compile in for libc.so.
2753 (__lll_mutex_unlock_wake): Rename to ...
2754 (__lll_unlock_wake): ... this. Don't compile in for libc.so.
2755 (__lll_timedwait_tid): Use __NR_gettimeofday.
2756 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Allow including
2757 the header from assembler. Renamed all lll_mutex_* resp.
2758 lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
2759 Renamed all LLL_MUTEX_LOCK_* macros to LLL_LOCK_*.
2760 (FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE):
2761 Define.
2762 (__lll_lock_wait_private): Add prototype.
2763 (__lll_lock_wait, __lll_timedlock_wait, __lll_robust_lock_wait,
2764 __lll_robust_timedlock_wait, __lll_unlock_wake_private,
2765 __lll_unlock_wake): Likewise.
2766 (lll_lock): Add private argument. Call __lll_lock_wait_private
2767 if private is constant LLL_PRIVATE.
2768 (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
2769 lll_timedlock, lll_robust_timedlock): Add private argument.
2770 (lll_unlock): Add private argument. Call __lll_unlock_wake_private
2771 if private is constant LLL_PRIVATE.
2772 (lll_robust_unlock, lll_robust_dead): Add private argument.
2773 (lll_lock_t): Remove.
2774 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
2775 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
2776 lll_cond_wake, lll_cond_broadcast): Remove.
2777 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: Include
2778 kernel-features.h and lowlevellock.h.
2779 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
2780 (LOAD_FUTEX_WAIT): Define.
2781 (__lll_robust_mutex_lock_wait): Rename to ...
2782 (__lll_robust_lock_wait): ... this. Add private argument.
2783 Use LOAD_FUTEX_WAIT macro.
2784 (__lll_robust_mutex_timedlock_wait): Rename to ...
2785 (__lll_robust_timedlock_wait): ... this. Add private argument.
2786 Use __NR_gettimeofday. Use LOAD_FUTEX_WAIT macro.
2787 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Include
2788 lowlevellock.h.
2789 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
2790 (pthread_barrier_wait): Use __lll_{lock,unlock}_* instead of
2791 __lll_mutex_{lock,unlock}_*.
2792 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Include
2793 lowlevellock.h and pthread-errnos.h.
2794 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
2795 FUTEX_CMP_REQUEUE, EINVAL): Remove.
2796 (__pthread_cond_broadcast): Use __lll_{lock,unlock}_* instead of
2797 __lll_mutex_{lock,unlock}_*.
2798 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Include
2799 lowlevellock.h and pthread-errnos.h.
2800 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE, EINVAL): Remove.
2801 (__pthread_cond_signal): Use __lll_{lock,unlock}_* instead of
2802 __lll_mutex_{lock,unlock}_*.
2803 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
2804 lowlevellock.h.
2805 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE): Remove.
2806 (__pthread_cond_timedwait): Use __lll_{lock,unlock}_* instead of
2807 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
2808 (__condvar_tw_cleanup): Likewise.
2809 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
2810 lowlevellock.h.
2811 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
2812 (__pthread_cond_wait): Use __lll_{lock,unlock}_* instead of
2813 __lll_mutex_{lock,unlock}_*.
2814 ( __condvar_w_cleanup): Likewise.
2815 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Include lowlevellock.h.
2816 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
2817 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Include
2818 lowlevellock.h.
2819 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
2820 (__pthread_rwlock_rdlock): Use __lll_{lock,unlock}_* instead of
2821 __lll_mutex_{lock,unlock}_*.
2822 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Include
2823 lowlevellock.h.
2824 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
2825 FUTEX_PRIVATE_FLAG): Remove.
2826 (pthread_rwlock_timedrdlock): Use __lll_{lock,unlock}_* instead of
2827 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
2828 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Include
2829 lowlevellock.h.
2830 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
2831 FUTEX_PRIVATE_FLAG): Remove.
2832 (pthread_rwlock_timedwrlock): Use __lll_{lock,unlock}_* instead of
2833 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
2834 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Include
2835 lowlevellock.h.
2836 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
2837 (__pthread_rwlock_unlock): Use __lll_{lock,unlock}_* instead of
2838 __lll_mutex_{lock,unlock}_*.
2839 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Include
2840 lowlevellock.h.
2841 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
2842 (__pthread_rwlock_wrlock): Use __lll_{lock,unlock}_* instead of
2843 __lll_mutex_{lock,unlock}_*.
2844 * sysdeps/unix/sysv/linux/sh/sem_post.S: Include lowlevellock.h.
2845 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
2846 (__new_sem_post): Use standard initial exec code sequences.
2847 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Include
2848 lowlevellock.h.
2849 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
2850 FUTEX_PRIVATE_FLAG): Remove.
2851 (sem_timedwait): Use __NR_gettimeofday. Use standard initial
2852 exec code sequences.
2853 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Include lowlevellock.h.
2854 (__new_sem_trywait): Use standard initial exec code sequences.
2855 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Include lowlevellock.h.
2856 (__new_sem_wait): Use standard initial exec code sequences.
2857
2858 2007-07-31 Anton Blanchard <anton@samba.org>
2859
2860 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
2861 Use __asm __volatile (__lll_acq_instr ::: "memory") instead of
2862 atomic_full_barrier.
2863
2864 2007-07-31 Jakub Jelinek <jakub@redhat.com>
2865
2866 * allocatestack.c (stack_cache_lock): Change type to int.
2867 (get_cached_stack, allocate_stack, __deallocate_stack,
2868 __make_stacks_executable, __find_thread_by_id, __nptl_setxid,
2869 __pthread_init_static_tls, __wait_lookup_done): Add LLL_PRIVATE
2870 as second argument to lll_lock and lll_unlock macros on
2871 stack_cache_lock.
2872 * pthread_create.c (__find_in_stack_list): Likewise.
2873 (start_thread): Similarly with pd->lock. Use lll_robust_dead
2874 macro instead of lll_robust_mutex_dead, pass LLL_SHARED to it
2875 as second argument.
2876 * descr.h (struct pthread): Change lock and setxid_futex field
2877 type to int.
2878 * old_pthread_cond_broadcast.c (__pthread_cond_broadcast_2_0): Use
2879 LLL_LOCK_INITIALIZER instead of LLL_MUTEX_LOCK_INITIALIZER.
2880 * old_pthread_cond_signal.c (__pthread_cond_signal_2_0): Likewise.
2881 * old_pthread_cond_timedwait.c (__pthread_cond_timedwait_2_0):
2882 Likewise.
2883 * old_pthread_cond_wait.c (__pthread_cond_wait_2_0): Likewise.
2884 * pthread_cond_init.c (__pthread_cond_init): Likewise.
2885 * pthreadP.h (__attr_list_lock): Change type to int.
2886 * pthread_attr_init.c (__attr_list_lock): Likewise.
2887 * pthread_barrier_destroy.c (pthread_barrier_destroy): Pass
2888 ibarrier->private ^ FUTEX_PRIVATE_FLAG as second argument to
2889 lll_{,un}lock.
2890 * pthread_barrier_wait.c (pthread_barrier_wait): Likewise and
2891 also for lll_futex_{wake,wait}.
2892 * pthread_barrier_init.c (pthread_barrier_init): Make iattr
2893 a pointer to const.
2894 * pthread_cond_broadcast.c (__pthread_cond_broadcast): Pass
2895 LLL_SHARED as second argument to lll_{,un}lock.
2896 * pthread_cond_destroy.c (__pthread_cond_destroy): Likewise.
2897 * pthread_cond_signal.c (__pthread_cond_singal): Likewise.
2898 * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
2899 * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait):
2900 Likewise.
2901 * pthread_getattr_np.c (pthread_getattr_np): Add LLL_PRIVATE
2902 as second argument to lll_{,un}lock macros on pd->lock.
2903 * pthread_getschedparam.c (__pthread_getschedparam): Likewise.
2904 * pthread_setschedparam.c (__pthread_setschedparam): Likewise.
2905 * pthread_setschedprio.c (pthread_setschedprio): Likewise.
2906 * tpp.c (__pthread_tpp_change_priority, __pthread_current_priority):
2907 Likewise.
2908 * sysdeps/pthread/createthread.c (do_clone, create_thread):
2909 Likewise.
2910 * pthread_once.c (once_lock): Change type to int.
2911 (__pthread_once): Pass LLL_PRIVATE as second argument to
2912 lll_{,un}lock macros on once_lock.
2913 * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Use
2914 lll_{,un}lock macros instead of lll_mutex_{,un}lock, pass
2915 rwlock->__data.__shared as second argument to them and similarly
2916 for lll_futex_w*.
2917 * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock):
2918 Likewise.
2919 * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock):
2920 Likewise.
2921 * pthread_rwlock_tryrdlock.c (__pthread_rwlock_tryrdlock): Likewise.
2922 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Likewise.
2923 * pthread_rwlock_unlock.c (__pthread_rwlock_unlock): Likewise.
2924 * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
2925 * sem_close.c (sem_close): Pass LLL_PRIVATE as second argument
2926 to lll_{,un}lock macros on __sem_mappings_lock.
2927 * sem_open.c (check_add_mapping): Likewise.
2928 (__sem_mappings_lock): Change type to int.
2929 * semaphoreP.h (__sem_mappings_lock): Likewise.
2930 * pthread_mutex_lock.c (LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
2931 LLL_ROBUST_MUTEX_LOCK): Use lll_{,try,robust_}lock macros
2932 instead of lll_*mutex_*, pass LLL_SHARED as last
2933 argument.
2934 (__pthread_mutex_lock): Use lll_unlock instead of lll_mutex_unlock,
2935 pass LLL_SHARED as last argument.
2936 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK,
2937 LLL_MUTEX_TRYLOCK, LLL_ROBUST_MUTEX_LOCK): Use
2938 lll_{cond_,cond_try,robust_cond}lock macros instead of lll_*mutex_*,
2939 pass LLL_SHARED as last argument.
2940 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
2941 lll_{timed,try,robust_timed,un}lock instead of lll_*mutex*, pass
2942 LLL_SHARED as last argument.
2943 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Similarly.
2944 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt):
2945 Similarly.
2946 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_lock,
2947 __libc_lock_lock_recursive, __libc_lock_unlock,
2948 __libc_lock_unlock_recursive): Pass LLL_PRIVATE as second
2949 argument to lll_{,un}lock.
2950 * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_lock,
2951 _IO_lock_unlock): Likewise.
2952 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Don't use
2953 compound literal.
2954 * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
2955 Pass LLL_PRIVATE as second argument to lll_{,un}lock macros on
2956 __fork_lock.
2957 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork,
2958 free_mem): Likewise.
2959 (__fork_lock): Change type to int.
2960 * sysdeps/unix/sysv/linux/fork.h (__fork_lock): Likewise.
2961 * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Pass
2962 isem->private ^ FUTEX_PRIVATE_FLAG as second argument to
2963 lll_futex_wake.
2964 * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
2965 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Likewise.
2966 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait_private):
2967 New function.
2968 (__lll_lock_wait, __lll_timedlock_wait): Add private argument and
2969 pass it through to lll_futex_*wait, only compile in when
2970 IS_IN_libpthread.
2971 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
2972 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): Add private
2973 argument and pass it through to lll_futex_*wait.
2974 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Renamed all
2975 lll_mutex_* resp. lll_robust_mutex_* macros to lll_* resp.
2976 lll_robust_*. Renamed all __lll_mutex_* resp. __lll_robust_mutex_*
2977 inline functions to __lll_* resp. __lll_robust_*.
2978 (LLL_MUTEX_LOCK_INITIALIZER): Remove.
2979 (lll_mutex_dead): Add private argument.
2980 (__lll_lock_wait_private): New prototype.
2981 (__lll_lock_wait, __lll_robust_lock_wait, __lll_lock_timedwait,
2982 __lll_robust_lock_timedwait): Add private argument to prototypes.
2983 (__lll_lock): Add private argument, if it is constant LLL_PRIVATE,
2984 call __lll_lock_wait_private, otherwise pass private to
2985 __lll_lock_wait.
2986 (__lll_robust_lock, __lll_cond_lock, __lll_timedlock,
2987 __lll_robust_timedlock): Add private argument, pass it to
2988 __lll_*wait functions.
2989 (__lll_unlock): Add private argument, if it is constant LLL_PRIVATE,
2990 call __lll_unlock_wake_private, otherwise pass private to
2991 __lll_unlock_wake.
2992 (__lll_robust_unlock): Add private argument, pass it to
2993 __lll_robust_unlock_wake.
2994 (lll_lock, lll_robust_lock, lll_cond_lock, lll_timedlock,
2995 lll_robust_timedlock, lll_unlock, lll_robust_unlock): Add private
2996 argument, pass it through to __lll_* inline function.
2997 (__lll_mutex_unlock_force, lll_mutex_unlock_force): Remove.
2998 (lll_lock_t): Remove.
2999 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
3000 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
3001 lll_cond_wake, lll_cond_broadcast): Remove.
3002 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
3003 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
3004 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
3005 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
3006 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Allow including
3007 the header from assembler. Renamed all lll_mutex_* resp.
3008 lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
3009 (LOCK, FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP,
3010 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3011 (LLL_MUTEX_LOCK_INITIALIZER, LLL_MUTEX_LOCK_INITIALIZER_LOCKED,
3012 LLL_MUTEX_LOCK_INITIALIZER_WAITERS): Remove.
3013 (__lll_mutex_lock_wait, __lll_mutex_timedlock_wait,
3014 __lll_mutex_unlock_wake, __lll_lock_wait, __lll_unlock_wake):
3015 Remove prototype.
3016 (__lll_trylock_asm, __lll_lock_asm_start, __lll_unlock_asm): Define.
3017 (lll_robust_trylock, lll_cond_trylock): Use LLL_LOCK_INITIALIZER*
3018 rather than LLL_MUTEX_LOCK_INITIALIZER* macros.
3019 (lll_trylock): Likewise, use __lll_trylock_asm, pass
3020 MULTIPLE_THREADS_OFFSET as another asm operand.
3021 (lll_lock): Add private argument, use __lll_lock_asm_start, pass
3022 MULTIPLE_THREADS_OFFSET as last asm operand, call
3023 __lll_lock_wait_private if private is constant LLL_PRIVATE,
3024 otherwise pass private as another argument to __lll_lock_wait.
3025 (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
3026 lll_timedlock, lll_robust_timedlock): Add private argument, pass
3027 private as another argument to __lll_*lock_wait call.
3028 (lll_unlock): Add private argument, use __lll_unlock_asm, pass
3029 MULTIPLE_THREADS_OFFSET as another asm operand, call
3030 __lll_unlock_wake_private if private is constant LLL_PRIVATE,
3031 otherwise pass private as another argument to __lll_unlock_wake.
3032 (lll_robust_unlock): Add private argument, pass private as another
3033 argument to __lll_unlock_wake.
3034 (lll_robust_dead): Add private argument, use __lll_private_flag
3035 macro.
3036 (lll_islocked): Use LLL_LOCK_INITIALIZER instead of
3037 LLL_MUTEX_LOCK_INITIALIZER.
3038 (lll_lock_t): Remove.
3039 (LLL_LOCK_INITIALIZER_WAITERS): Define.
3040 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
3041 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
3042 lll_cond_wake, lll_cond_broadcast): Remove.
3043 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
3044 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Revert
3045 2007-05-2{3,9} changes.
3046 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Include
3047 kernel-features.h and lowlevellock.h.
3048 (LOAD_PRIVATE_FUTEX_WAIT): Define.
3049 (LOAD_FUTEX_WAIT): Rewritten.
3050 (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
3051 define.
3052 (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
3053 (__lll_mutex_lock_wait): Rename to ...
3054 (__lll_lock_wait): ... this. Take futex addr from %edx instead of
3055 %ecx, %ecx is now private argument. Don't compile in for libc.so.
3056 (__lll_mutex_timedlock_wait): Rename to ...
3057 (__lll_timedlock_wait): ... this. Use __NR_gettimeofday. %esi
3058 contains private argument. Don't compile in for libc.so.
3059 (__lll_mutex_unlock_wake): Rename to ...
3060 (__lll_unlock_wake): ... this. %ecx contains private argument.
3061 Don't compile in for libc.so.
3062 (__lll_timedwait_tid): Use __NR_gettimeofday.
3063 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Include
3064 kernel-features.h and lowlevellock.h.
3065 (LOAD_FUTEX_WAIT): Define.
3066 (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
3067 define.
3068 (__lll_robust_mutex_lock_wait): Rename to ...
3069 (__lll_robust_lock_wait): ... this. Futex addr is now in %edx
3070 argument, %ecx argument contains private. Use LOAD_FUTEX_WAIT
3071 macro.
3072 (__lll_robust_mutex_timedlock_wait): Rename to ...
3073 (__lll_robust_timedlock_wait): ... this. Use __NR_gettimeofday.
3074 %esi argument contains private, use LOAD_FUTEX_WAIT macro.
3075 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Include
3076 lowlevellock.h.
3077 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3078 (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
3079 PRIVATE(%ebx) ^ LLL_SHARED as private argument in %ecx to
3080 __lll_lock_wait and __lll_unlock_wake, pass MUTEX(%ebx) address
3081 to __lll_lock_wait in %edx.
3082 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
3083 Include lowlevellock.h and pthread-errnos.h.
3084 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
3085 FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
3086 (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*, pass
3087 cond_lock address in %edx rather than %ecx to __lll_lock_wait,
3088 pass LLL_SHARED in %ecx to both __lll_lock_wait and
3089 __lll_unlock_wake.
3090 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
3091 Include lowlevellock.h and pthread-errnos.h.
3092 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
3093 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
3094 (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*, pass
3095 cond_lock address in %edx rather than %ecx to __lll_lock_wait,
3096 pass LLL_SHARED in %ecx to both __lll_lock_wait and
3097 __lll_unlock_wake.
3098 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
3099 Include lowlevellock.h.
3100 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
3101 Don't define.
3102 (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*, pass
3103 cond_lock address in %edx rather than %ecx to __lll_lock_wait,
3104 pass LLL_SHARED in %ecx to both __lll_lock_wait and
3105 __lll_unlock_wake. Use __NR_gettimeofday.
3106 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
3107 Include lowlevellock.h.
3108 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3109 (__pthread_cond_wait, __condvar_w_cleanup): Rename __lll_mutex_*
3110 to __lll_*, pass cond_lock address in %edx rather than %ecx to
3111 __lll_lock_wait, pass LLL_SHARED in %ecx to both __lll_lock_wait
3112 and __lll_unlock_wake.
3113 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S:
3114 Include lowlevellock.h.
3115 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3116 (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*, pass
3117 MUTEX(%ebx) address in %edx rather than %ecx to
3118 __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
3119 and __lll_unlock_wake. Move return value from %ecx to %edx
3120 register.
3121 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
3122 Include lowlevellock.h.
3123 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
3124 Don't define.
3125 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
3126 MUTEX(%ebp) address in %edx rather than %ecx to
3127 __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
3128 and __lll_unlock_wake. Move return value from %ecx to %edx
3129 register. Use __NR_gettimeofday.
3130 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
3131 Include lowlevellock.h.
3132 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
3133 Don't define.
3134 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
3135 MUTEX(%ebp) address in %edx rather than %ecx to
3136 __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
3137 and __lll_unlock_wake. Move return value from %ecx to %edx
3138 register. Use __NR_gettimeofday.
3139 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
3140 Include lowlevellock.h.
3141 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3142 (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*, pass
3143 MUTEX(%edi) address in %edx rather than %ecx to
3144 __lll_lock_wait, pass PSHARED(%edi) in %ecx to both __lll_lock_wait
3145 and __lll_unlock_wake.
3146 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
3147 Include lowlevellock.h.
3148 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3149 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
3150 MUTEX(%ebx) address in %edx rather than %ecx to
3151 __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
3152 and __lll_unlock_wake. Move return value from %ecx to %edx
3153 register.
3154 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Include
3155 lowlevellock.h.
3156 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
3157 define.
3158 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Include lowlevellock.h.
3159 (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
3160 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Include
3161 lowlevellock.h.
3162 (LOCK, SYS_futex, SYS_gettimeofday, FUTEX_WAIT): Don't define.
3163 (sem_timedwait): Use __NR_gettimeofday.
3164 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Include
3165 lowlevellock.h.
3166 (LOCK): Don't define.
3167 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include
3168 lowlevellock.h.
3169 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
3170 * sysdeps/unix/sysv/linux/powerpc/sem_post.c: Wake only when there
3171 are waiters.
3172 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Revert
3173 2007-05-2{3,9} changes.
3174 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Include
3175 kernel-features.h and lowlevellock.h.
3176 (LOAD_PRIVATE_FUTEX_WAIT): Define.
3177 (LOAD_FUTEX_WAIT): Rewritten.
3178 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
3179 (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
3180 (__lll_mutex_lock_wait): Rename to ...
3181 (__lll_lock_wait): ... this. %esi is now private argument.
3182 Don't compile in for libc.so.
3183 (__lll_mutex_timedlock_wait): Rename to ...
3184 (__lll_timedlock_wait): ... this. %esi contains private argument.
3185 Don't compile in for libc.so.
3186 (__lll_mutex_unlock_wake): Rename to ...
3187 (__lll_unlock_wake): ... this. %esi contains private argument.
3188 Don't compile in for libc.so.
3189 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Include
3190 kernel-features.h and lowlevellock.h.
3191 (LOAD_FUTEX_WAIT): Define.
3192 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
3193 (__lll_robust_mutex_lock_wait): Rename to ...
3194 (__lll_robust_lock_wait): ... this. %esi argument contains private.
3195 Use LOAD_FUTEX_WAIT macro.
3196 (__lll_robust_mutex_timedlock_wait): Rename to ...
3197 (__lll_robust_timedlock_wait): ... this. %esi argument contains
3198 private, use LOAD_FUTEX_WAIT macro.
3199 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Include
3200 lowlevellock.h.
3201 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3202 (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
3203 PRIVATE(%rdi) ^ LLL_SHARED as private argument in %esi to
3204 __lll_lock_wait and __lll_unlock_wake.
3205 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S:
3206 Include lowlevellock.h and pthread-errnos.h.
3207 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
3208 FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
3209 (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*,
3210 pass LLL_SHARED in %esi to both __lll_lock_wait and
3211 __lll_unlock_wake.
3212 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S:
3213 Include lowlevellock.h and pthread-errnos.h.
3214 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
3215 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
3216 (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*,
3217 pass LLL_SHARED in %esi to both __lll_lock_wait and
3218 __lll_unlock_wake.
3219 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:
3220 Include lowlevellock.h.
3221 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3222 (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*,
3223 pass LLL_SHARED in %esi to both __lll_lock_wait and
3224 __lll_unlock_wake.
3225 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
3226 Include lowlevellock.h.
3227 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3228 (__pthread_cond_wait, __condvar_cleanup): Rename __lll_mutex_*
3229 to __lll_*, pass LLL_SHARED in %esi to both __lll_lock_wait
3230 and __lll_unlock_wake.
3231 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S:
3232 Include lowlevellock.h.
3233 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
3234 Don't define.
3235 (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*,
3236 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
3237 and __lll_unlock_wake.
3238 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
3239 Include lowlevellock.h.
3240 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
3241 Don't define.
3242 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
3243 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
3244 and __lll_unlock_wake.
3245 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3246 Include lowlevellock.h.
3247 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
3248 Don't define.
3249 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
3250 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
3251 and __lll_unlock_wake.
3252 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S:
3253 Include lowlevellock.h.
3254 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
3255 Don't define.
3256 (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*,
3257 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
3258 and __lll_unlock_wake.
3259 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S:
3260 Include lowlevellock.h.
3261 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
3262 Don't define.
3263 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
3264 pass PSHARED(%rdi) in %ecx to both __lll_lock_wait
3265 and __lll_unlock_wake.
3266 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Include
3267 lowlevellock.h.
3268 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
3269 define.
3270 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Include lowlevellock.h.
3271 (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
3272 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Include
3273 lowlevellock.h.
3274 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
3275 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Include
3276 lowlevellock.h.
3277 (LOCK): Don't define.
3278 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Include
3279 lowlevellock.h.
3280 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
3281 * sysdeps/unix/sysv/linux/sparc/internaltypes.h: New file.
3282 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_destroy.c: New file.
3283 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_init.c: New file.
3284 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_wait.c: New file.
3285 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
3286 (__lll_lock_wait_private): New function.
3287 (__lll_lock_wait, __lll_timedlock_wait): Add private argument, pass
3288 it to lll_futex_*wait. Don't compile in for libc.so.
3289 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c:
3290 Remove.
3291 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c
3292 (struct sparc_pthread_barrier): Remove.
3293 (pthread_barrier_wait): Use union sparc_pthread_barrier instead of
3294 struct sparc_pthread_barrier. Pass
3295 ibarrier->s.pshared ? LLL_SHARED : LLL_PRIVATE to lll_{,un}lock
3296 and lll_futex_wait macros.
3297 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
3298 Remove.
3299 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
3300 Include sparc pthread_barrier_wait.c instead of generic one.
3301
3302 2007-07-30 Jakub Jelinek <jakub@redhat.com>
3303
3304 * tst-rwlock14.c (do_test): Avoid warnings on 32-bit arches.
3305
3306 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
3307 (pthread_rwlock_timedrdlock): Copy futex retval to %esi rather than
3308 %ecx.
3309 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
3310 (pthread_rwlock_timedwrlock): Likewise.
3311 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
3312 (__pthread_rwlock_unlock): Fix MUTEX != 0 args to __lll_*.
3313
3314 2007-07-31 Jakub Jelinek <jakub@redhat.com>
3315
3316 * sysdeps/sparc/tls.h (tcbhead_t): Add private_futex field.
3317
3318 2007-07-26 Jakub Jelinek <jakub@redhat.com>
3319
3320 * tst-locale2.c (useless): Add return statement.
3321
3322 2007-07-24 Jakub Jelinek <jakub@redhat.com>
3323
3324 * allocatestack.c (__nptl_setxid, __wait_lookup_done): Replace
3325 lll_private_futex_* (*) with lll_futex_* (*, LLL_PRIVATE).
3326 * pthread_create.c (start_thread): Likewise.
3327 * init.c (sighandler_setxid): Likewise.
3328 * sysdeps/alpha/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3329 * sysdeps/ia64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3330 * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3331 * sysdeps/s390/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3332 * sysdeps/powerpc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3333 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3334 * sysdeps/sparc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3335 * sysdeps/sh/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3336 * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY, AIO_MISC_WAIT):
3337 Likewise.
3338 * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY, GAI_MISC_WAIT):
3339 Likewise.
3340 * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
3341 Likewise.
3342 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_waitzero,
3343 __rtld_notify): Likewise.
3344 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Likewise.
3345 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (clear_once_control,
3346 __pthread_once): Likewise.
3347 * sysdeps/unix/sysv/linux/alpha/pthread_once.c (clear_once_control,
3348 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
3349 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_PRIVATE_FLAG,
3350 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
3351 (lll_futex_wait): Add private argument, define as wrapper around
3352 lll_futex_timed_wait.
3353 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
3354 use __lll_private_flag macro.
3355 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
3356 __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
3357 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (clear_once_control,
3358 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
3359 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_PRIVATE_FLAG,
3360 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
3361 (lll_futex_wait): Add private argument, define as wrapper around
3362 lll_futex_timed_wait.
3363 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
3364 use __lll_private_flag macro.
3365 (__lll_mutex_unlock, __lll_robust_mutex_unlock, lll_wait_tid,
3366 __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
3367 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
3368 Define.
3369 (lll_futex_timed_wait, lll_futex_wake): Use it.
3370 (lll_private_futex_wait, lll_private_futex_timed_wait,
3371 lll_private_futex_wake): Removed.
3372 * sysdeps/unix/sysv/linux/s390/pthread_once.c (clear_once_control,
3373 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
3374 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_PRIVATE_FLAG,
3375 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
3376 (lll_futex_wait): Add private argument, define as wrapper around
3377 lll_futex_timed_wait.
3378 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
3379 use __lll_private_flag macro.
3380 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
3381 lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
3382 to lll_futex_*.
3383 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
3384 (lll_private_futex_wait, lll_private_futex_timed_wait,
3385 lll_private_futex_wake): Removed.
3386 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_private_flag):
3387 Fix !__ASSUME_PRIVATE_FUTEX non-constant private case.
3388 (lll_private_futex_wait, lll_private_futex_timed_wait,
3389 lll_private_futex_wake): Removed.
3390 * sysdeps/unix/sysv/linux/sparc/pthread_once.c (clear_once_control,
3391 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
3392 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_PRIVATE_FLAG,
3393 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
3394 (lll_futex_wait): Add private argument, define as wrapper around
3395 lll_futex_timed_wait.
3396 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
3397 use __lll_private_flag macro.
3398 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
3399 lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
3400 to lll_futex_*.
3401 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (__lll_private_flag):
3402 Define.
3403 (lll_futex_timed_wait, lll_futex_wake): Use it.
3404 (lll_private_futex_wait, lll_private_futex_timed_wait,
3405 lll_private_futex_wake): Removed.
3406
3407 2007-07-27 Jakub Jelinek <jakub@redhat.com>
3408
3409 * sysdeps/sparc/tls.h (tcbhead_t): Move gscope_flag to the end
3410 of the structure for sparc32.
3411
3412 2007-07-26 Aurelien Jarno <aurelien@aurel32.net>
3413
3414 * sysdeps/sparc/tls.h (tcbhead_t): Add gscope_flag.
3415
3416 2007-07-23 Ulrich Drepper <drepper@redhat.com>
3417
3418 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
3419 code used when private futexes are assumed.
3420 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3421 Likewise.
3422
3423 2007-07-23 Jakub Jelinek <jakub@redhat.com>
3424
3425 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
3426 (__lll_private_flag): Define.
3427 (lll_futex_wait): Define as a wrapper around lll_futex_timed_wait.
3428 (lll_futex_timed_wait, lll_futex_wake, lll_futex_wake_unlock): Use
3429 __lll_private_flag.
3430 (lll_private_futex_wait, lll_private_futex_timedwait,
3431 lll_private_futex_wake): Define as wrapper around non-_private
3432 macros.
3433 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
3434 (__lll_private_flag): Define.
3435 (lll_futex_timed_wait, lll_futex_wake): Use __lll_private_flag.
3436 (lll_private_futex_wait, lll_private_futex_timedwait,
3437 lll_private_futex_wake): Define as wrapper around non-_private
3438 macros.
3439
3440 2007-07-10 Steven Munroe <sjmunroe@us.ibm.com>
3441
3442 * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Add LLL_SHARED
3443 parameter to lll_futex_wait call.
3444 * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
3445
3446 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
3447 Replace lll_futex_wait with lll_private_futex_wait.
3448 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
3449 Add LLL_SHARED parameter to lll_futex_wake().
3450
3451 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define LLL_PRIVATE
3452 LLL_SHARED, lll_private_futex_wait, lll_private_futex_timed_wait and
3453 lll_private_futex_wake.
3454 (lll_futex_wait): Add private parameter. Adjust FUTEX_PRIVATE_FLAG
3455 bit from private parm before syscall.
3456 (lll_futex_timed_wait): Likewise.
3457 (lll_futex_wake): Likewise.
3458 (lll_futex_wake_unlock): Likewise.
3459 (lll_mutex_unlock): Add LLL_SHARED parm to lll_futex_wake call.
3460 (lll_robust_mutex_unlock): Likewise.
3461 (lll_mutex_unlock_force): Likewise.
3462 (lll_wait_tid): Add LLL_SHARED parm to lll_futex_wait call.
3463
3464 2007-07-23 Ulrich Drepper <drepper@redhat.com>
3465
3466 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
3467 compilation when unconditionally using private futexes.
3468 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
3469 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3470 Likewise.
3471 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
3472 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
3473
3474 2007-07-17 Jakub Jelinek <jakub@redhat.com>
3475
3476 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock_clear_flags2):
3477 Define.
3478
3479 2007-07-06 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3480
3481 * sysdeps/sh/tls.h: Include stdlib.h, list.h, sysdep.h and
3482 kernel-features.h.
3483
3484 2007-05-16 Roland McGrath <roland@redhat.com>
3485
3486 * init.c (__nptl_initial_report_events): New variable.
3487 (__pthread_initialize_minimal_internal): Initialize pd->report_events
3488 to that.
3489
3490 2007-06-22 Jakub Jelinek <jakub@redhat.com>
3491
3492 * pthread_getattr_np.c (pthread_getattr_np): Clear cpuset and
3493 cpusetsize if pthread_getaffinity_np failed with ENOSYS.
3494
3495 2007-06-19 Ulrich Drepper <drepper@redhat.com>
3496
3497 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Remove mrlock
3498 implementation.
3499
3500 2007-06-18 Ulrich Drepper <drepper@redhat.com>
3501
3502 * pthreadP.h: Define PTHREAD_MUTEX_TYPE.
3503 * phtread_mutex_lock.c: Use PTHREAD_MUTEX_TYPE.
3504 * pthread_mutex_timedlock.c: Likewise.
3505 * pthread_mutex_trylock.c: Likewise.
3506 * pthread_mutex_unlock.c: Likewise.
3507
3508 2007-06-17 Andreas Schwab <schwab@suse.de>
3509
3510 * sysdeps/pthread/pt-initfini.c: Tell gcc about the nonstandard
3511 sections.
3512
3513 2007-06-17 Ulrich Drepper <drepper@redhat.com>
3514
3515 * allocatestack.c (allocate_stack): Make code compile if
3516 __ASSUME_PRIVATE_FUTEX is set.
3517
3518 2007-06-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3519
3520 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S:
3521 (__pthread_rwlock_rdlock): Don't use non SH-3/4 instruction.
3522 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S:
3523 (__pthread_rwlock_wrlock): Likewise.
3524 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
3525 (pthread_rwlock_timedrdlock): Likewise.
3526 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
3527 (pthread_rwlock_timedwrlock): Likewise.
3528 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S:
3529 (__pthread_rwlock_unlock): Likewise.
3530
3531 2007-06-10 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3532
3533 * sysdeps/sh/tcb-offsets.sym: Add PRIVATE_FUTEX.
3534 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Include endian.h.
3535 Split __flags into __flags, __shared, __pad1 and __pad2.
3536 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Use private
3537 futexes if they are available.
3538 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Adjust so that change
3539 in libc-lowlevellock.S allow using private futexes.
3540 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
3541 FUTEX_PRIVATE_FLAG. Add additional parameter to lll_futex_wait,
3542 lll_futex_timed_wait and lll_futex_wake. Change lll_futex_wait
3543 to call lll_futex_timed_wait. Add lll_private_futex_wait,
3544 lll_private_futex_timed_wait and lll_private_futex_wake.
3545 (lll_robust_mutex_unlock): Fix typo.
3546 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Use private
3547 field in futex command setup.
3548 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Use
3549 COND_NWAITERS_SHIFT instead of COND_CLOCK_BITS.
3550 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
3551 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use private futexes
3552 if they are available. Remove clear_once_control.
3553 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Use private
3554 futexes if they are available.
3555 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
3556 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
3557 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
3558 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
3559 * sysdeps/unix/sysv/linux/sh/sem_post.S: Add private futex support.
3560 Wake only when there are waiters.
3561 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add private futex
3562 support. Indicate that there are waiters. Remove unnecessary
3563 extra cancellation test.
3564 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise. Removed
3565 left-over duplication of __sem_wait_cleanup.
3566
3567 2007-06-07 Ulrich Drepper <drepper@redhat.com>
3568
3569 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Add additional
3570 parameter to lll_futex_wait, lll_futex_timed_wait, and
3571 lll_futex_wake. Change lll_futex_wait to call lll_futex_timed_wait.
3572 Add lll_private_futex_wait, lll_private_futex_timed_wait, and
3573 lll_private_futex_wake.
3574 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
3575 * allocatestack.c: Adjust use of lll_futex_* macros.
3576 * init.c: Likewise.
3577 * lowlevellock.h: Likewise.
3578 * pthread_barrier_wait.c: Likewise.
3579 * pthread_cond_broadcast.c: Likewise.
3580 * pthread_cond_destroy.c: Likewise.
3581 * pthread_cond_signal.c: Likewise.
3582 * pthread_cond_timedwait.c: Likewise.
3583 * pthread_cond_wait.c: Likewise.
3584 * pthread_create.c: Likewise.
3585 * pthread_mutex_lock.c: Likewise.
3586 * pthread_mutex_setprioceiling.c: Likewise.
3587 * pthread_mutex_timedlock.c: Likewise.
3588 * pthread_mutex_unlock.c: Likewise.
3589 * pthread_rwlock_timedrdlock.c: Likewise.
3590 * pthread_rwlock_timedwrlock.c: Likewise.
3591 * pthread_rwlock_unlock.c: Likewise.
3592 * sysdeps/alpha/tls.h: Likewise.
3593 * sysdeps/i386/tls.h: Likewise.
3594 * sysdeps/ia64/tls.h: Likewise.
3595 * sysdeps/powerpc/tls.h: Likewise.
3596 * sysdeps/pthread/aio_misc.h: Likewise.
3597 * sysdeps/pthread/gai_misc.h: Likewise.
3598 * sysdeps/s390/tls.h: Likewise.
3599 * sysdeps/sh/tls.h: Likewise.
3600 * sysdeps/sparc/tls.h: Likewise.
3601 * sysdeps/unix/sysv/linux/fork.c: Likewise.
3602 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
3603 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: Likewise.
3604 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Likewise.
3605 * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
3606 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
3607 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
3608 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
3609 * sysdeps/unix/sysv/linux/sparc/pthread_once.c: Likewise.
3610 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c:
3611 Likewise.
3612 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: Likewise.
3613 * sysdeps/x86_64/tls.h: Likewise.
3614
3615 2007-05-29 Ulrich Drepper <drepper@redhat.com>
3616
3617 * pthread_getattr_np.c: No need to install a cancellation handler,
3618 this is no cancellation point.
3619 * pthread_getschedparam.c: Likewise.
3620 * pthread_setschedparam.c: Likewise.
3621 * pthread_setschedprio.c: Likewise.
3622 * sysdeps/unix/sysv/linux/lowlevellock.c: Remove all traces of
3623 lll_unlock_wake_cb.
3624 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
3625 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
3626 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
3627 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
3628 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
3629 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
3630 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
3631 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
3632 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
3633 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: Likewise.
3634 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
3635 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
3636
3637 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Checking
3638 whether there are more than one thread makes no sense here since
3639 we only call the slow path if the locks are taken.
3640 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Likewise.
3641
3642 * sysdeps/unix/sysv/linux/internaltypes.h: Introduce
3643 COND_NWAITERS_SHIFT.
3644 * pthread_cond_destroy.c: Use COND_NWAITERS_SHIFT instead of
3645 COND_CLOCK_BITS.
3646 * pthread_cond_init.c: Likewise.
3647 * pthread_cond_timedwait.c: Likewise.
3648 * pthread_cond_wait.c: Likewise.
3649 * pthread_condattr_getclock.c: Likewise.
3650 * pthread_condattr_setclock.c: Likewise.
3651 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Likewise.
3652 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3653 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
3654 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3655 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3656
3657 2007-05-28 Jakub Jelinek <jakub@redhat.com>
3658
3659 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c: Include
3660 unistd.h.
3661
3662 * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Use explicit
3663 insn suffix.
3664 (THREAD_GSCOPE_GET_FLAG): Remove.
3665 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Remove.
3666 * allocatestack.c (__wait_lookup_done): Revert 2007-05-24
3667 changes.
3668 * sysdeps/powerpc/tls.h (tcbhead_t): Remove gscope_flag.
3669 (THREAD_GSCOPE_GET_FLAG): Remove.
3670 (THREAD_GSCOPE_RESET_FLAG): Use THREAD_SELF->header.gscope_flag
3671 instead of THREAD_GSCOPE_GET_FLAG.
3672 (THREAD_GSCOPE_SET_FLAG): Likewise. Add atomic_write_barrier after
3673 it.
3674 * sysdeps/s390/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
3675 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
3676 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
3677 THREAD_GSCOPE_WAIT): Define.
3678 * sysdeps/sparc/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
3679 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
3680 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
3681 THREAD_GSCOPE_WAIT): Define.
3682 * sysdeps/sh/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
3683 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
3684 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
3685 THREAD_GSCOPE_WAIT): Define.
3686 * sysdeps/ia64/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
3687 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
3688 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
3689 THREAD_GSCOPE_WAIT): Define.
3690
3691 2007-05-24 Richard Henderson <rth@redhat.com>
3692
3693 * descr.h (struct pthread): Add header.gscope_flag.
3694 * sysdeps/alpha/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
3695 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
3696 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
3697 THREAD_GSCOPE_WAIT): Define.
3698
3699 2007-05-27 Ulrich Drepper <drepper@redhat.com>
3700
3701 * init.c: Make it compile with older kernel headers.
3702
3703 * tst-initializers1.c: Show through exit code which test failed.
3704
3705 * pthread_rwlock_init.c: Also initialize __shared field.
3706 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Split __flags
3707 element in rwlock structure into four byte elements. One of them is
3708 the new __shared element.
3709 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h [__WORDSIZE=32]:
3710 Likewise.
3711 [__WORDSIZE=64]: Renamed __pad1 element int rwlock structure to
3712 __shared, adjust names of other padding elements.
3713 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3714 * sysdeps/pthread/pthread.h: Adjust rwlock initializers.
3715 * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: Add PSHARED.
3716 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define
3717 FUTEX_PRIVATE_FLAG.
3718 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Change main
3719 futex to use private operations if possible.
3720 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
3721 Likewise.
3722 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3723 Likewise.
3724 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
3725 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
3726 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
3727 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
3728 Likewise.
3729 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
3730 Likewise.
3731 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
3732 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
3733
3734 2007-05-26 Ulrich Drepper <drepper@redhat.com>
3735
3736 * pthreadP.h (PTHREAD_RWLOCK_PREFER_READER_P): Define.
3737 * pthread_rwlock_rdlock.c: Use PTHREAD_RWLOCK_PREFER_READER_P.
3738 * pthread_rwlock_timedrdlock.c: Likewise.
3739 * pthread_rwlock_tryrdlock.c: Likewise.
3740
3741 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S (sem_trywait): Tiny
3742 optimization.
3743
3744 * sysdeps/unix/sysv/linux/sem_wait.c: Add missing break.
3745 * sysdeps/unix/sysv/linux/sem_timedwait.c: Removed left-over
3746 duplication of __sem_wait_cleanup.
3747
3748 * allocatestack.c: Revert last change.
3749 * init.c: Likewise.
3750 * sysdeps/i386/tls.h: Likewise.
3751 * sysdeps/x86_64/tls.h: Likewise.
3752 * descr.h [TLS_DTV_AT_TP] (struct pthread): Add private_futex field to
3753 header structure.
3754 * sysdeps/powerpc/tcb-offsets.sym: Add PRIVATE_FUTEX_OFFSET.
3755
3756 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_barrier):
3757 Add private field.
3758 * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: Add PRIVATE definition.
3759 * pthread_barrier_init.c: Set private flag if pshared and private
3760 futexes are supported.
3761 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Use
3762 private field in futex command setup.
3763 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
3764
3765 2007-05-25 Ulrich Drepper <drepper@redhat.com>
3766
3767 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Add private futex
3768 support.
3769 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
3770 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
3771 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
3772 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
3773 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
3774
3775 * semaphoreP.h: Declare __old_sem_init and __old_sem_wait.
3776 * sem_init.c (__new_sem_init): Rewrite to initialize all three
3777 fields in the structure.
3778 (__old_sem_init): New function.
3779 * sem_open.c: Initialize all fields of the structure.
3780 * sem_getvalue.c: Adjust for renamed element.
3781 * sysdeps/unix/sysv/linux/Makefile [subdir=nptl]
3782 (gen-as-const-headers): Add structsem.sym.
3783 * sysdeps/unix/sysv/linux/structsem.sym: New file.
3784 * sysdeps/unix/sysv/linux/internaltypes.h: Rename struct sem to
3785 struct new_sem. Add struct old_sem.
3786 * sysdeps/unix/sysv/linux/sem_post.c: Wake only when there are waiters.
3787 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
3788 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
3789 * sysdeps/unix/sysv/linux/sem_wait.c: Indicate that there are waiters.
3790 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
3791 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
3792 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
3793 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
3794 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
3795 * Makefile (tests): Add tst-sem10, tst-sem11, tst-sem12.
3796 * tst-sem10.c: New file.
3797 * tst-sem11.c: New file.
3798 * tst-sem12.c: New file.
3799 * tst-typesizes.c: Test struct new_sem and struct old_sem instead
3800 of struct sem.
3801
3802 2007-05-25 Ulrich Drepper <drepper@redhat.com>
3803 Jakub Jelinek <jakub@redhat.com>
3804
3805 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
3806 Move __pthread_enable_asynccancel right before futex syscall.
3807 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
3808 Likewise.
3809
3810 2007-05-24 Jakub Jelinek <jakub@redhat.com>
3811
3812 * sysdeps/i386/tls.h (THREAD_SET_PRIVATE_FUTEX,
3813 THREAD_COPY_PRIVATE_FUTEX): Define.
3814 * sysdeps/x86_64/tls.h (THREAD_SET_PRIVATE_FUTEX,
3815 THREAD_COPY_PRIVATE_FUTEX): Define.
3816 * allocatestack.c (allocate_stack): Use THREAD_COPY_PRIVATE_FUTEX.
3817 * init.c (__pthread_initialize_minimal_internal): Use
3818 THREAD_SET_PRIVATE_FUTEX.
3819
3820 * sysdeps/powerpc/tls.h (tcbhead_t): Add gscope_flag.
3821 (THREAD_GSCOPE_FLAG_UNUSED, THREAD_GSCOPE_FLAG_USED,
3822 THREAD_GSCOPE_FLAG_WAIT): Define.
3823 (THREAD_GSCOPE_GET_FLAG, THREAD_GSCOPE_SET_FLAG,
3824 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_WAIT): Define.
3825 * sysdeps/i386/tls.h (THREAD_GSCOPE_WAIT): Don't use
3826 PTR_DEMANGLE.
3827 (THREAD_GSCOPE_GET_FLAG): Define.
3828 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Define.
3829 * allocatestack.c (__wait_lookup_done): Use THREAD_GSCOPE_GET_FLAG
3830 instead of ->header.gscope_flag directly.
3831
3832 2007-05-23 Ulrich Drepper <drepper@redhat.com>
3833
3834 * init.c (__pthread_initialize_minimal_internal): Check whether
3835 private futexes are available.
3836 * allocatestack.c (allocate_stack): Copy private_futex field from
3837 current thread into the new stack.
3838 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Use private
3839 futexes if they are available.
3840 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise
3841 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Adjust so that change
3842 in libc-lowlevellock.S allow using private futexes.
3843 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
3844 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
3845 FUTEX_PRIVATE_FLAG.
3846 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
3847 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use private futexes
3848 if they are available.
3849 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
3850 * sysdeps/x86_64/tcb-offsets.sym: Add PRIVATE_FUTEX.
3851 * sysdeps/i386/tcb-offsets.sym: Likewise.
3852 * sysdeps/x86_64/tls.h (tcbhead_t): Add private_futex field.
3853 * sysdeps/i386/tls.h (tcbhead_t): Likewise.
3854
3855 2007-05-21 Ulrich Drepper <drepper@redhat.com>
3856
3857 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
3858 Remove ptr_wait_lookup_done again.
3859 * init.c (pthread_functions): Don't add .ptr_wait_lookup_done here.
3860 (__pthread_initialize_minimal_internal): Initialize
3861 _dl_wait_lookup_done pointer in _rtld_global directly.
3862 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
3863 Remove code to code _dl_wait_lookup_done.
3864 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_WAIT): The pointer is not
3865 encrypted for now.
3866
3867 2007-05-21 Jakub Jelinek <jakub@redhat.com>
3868
3869 * tst-robust9.c (do_test): Don't fail if ENABLE_PI and
3870 pthread_mutex_init failed with ENOTSUP.
3871
3872 2007-05-19 Ulrich Drepper <drepper@redhat.com>
3873
3874 * allocatestack.c (__wait_lookup_done): New function.
3875 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
3876 Add ptr_wait_lookup_done.
3877 * init.c (pthread_functions): Initialize .ptr_wait_lookup_done.
3878 * pthreadP.h: Declare __wait_lookup_done.
3879 * sysdeps/i386/tls.h (tcbhead_t): Add gscope_flag.
3880 Define macros to implement reference handling of global scope.
3881 * sysdeps/x86_64/tls.h: Likewise.
3882 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
3883 Initialize GL(dl_wait_lookup_done).
3884
3885 2007-05-17 Ulrich Drepper <drepper@redhat.com>
3886
3887 [BZ #4512]
3888 * pthread_mutex_lock.c: Preserve FUTEX_WAITERS bit when dead owner
3889 is detected.
3890 * pthread_mutex_timedlock.c: Likewise.
3891 * pthread_mutex_trylock.c: Likewise.
3892 Patch in part by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
3893
3894 * Makefile (tests): Add tst-robust9 and tst-robustpi9.
3895 * tst-robust9.c: New file.
3896 * tst-robustpi9.c: New file.
3897
3898 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Remove
3899 unnecessary extra cancellation test.
3900
3901 2007-05-14 Ulrich Drepper <drepper@redhat.com>
3902
3903 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Remove unnecessary
3904 extra cancellation test.
3905 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
3906
3907 2007-05-10 Ulrich Drepper <drepper@redhat.com>
3908
3909 * descr.h (struct pthread): Rearrange members to fill hole in
3910 64-bit layout.
3911
3912 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
3913 (__pthread_setaffinity_new): If syscall was successful and
3914 RESET_VGETCPU_CACHE is defined, use it before returning.
3915 * sysdeps/unix/sysv/linux/x86_64/pthread_setaffinity.c: New file.
3916
3917 2007-05-10 Jakub Jelinek <jakub@redhat.com>
3918
3919 [BZ #4455]
3920 * tst-align2.c: Include stackinfo.h.
3921 * tst-getpid1.c: Likewise.
3922
3923 2007-05-02 Carlos O'Donell <carlos@systemhalted.org>
3924
3925 [BZ #4455]
3926 * tst-align2.c (do_test): Add _STACK_GROWS_UP case.
3927 * tst-getpid1.c (do_test): Likewise.
3928
3929 [BZ #4456]
3930 * allocatestack.c (change_stack_perm): Add _STACK_GROWS_UP case.
3931 (allocate_stack): Likewise.
3932
3933 2007-05-07 Ulrich Drepper <drepper@redhat.com>
3934
3935 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
3936 (__lll_robust_lock_wait): Fix race caused by reloading of futex value.
3937 (__lll_robust_timedlock_wait): Likewise.
3938 Reported by Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>.
3939
3940 2007-05-06 Mike Frysinger <vapier@gentoo.org>
3941
3942 [BZ #4465]
3943 * tst-cancel-wrappers.sh: Set C["fdatasync"] to 1.
3944 * tst-cancel4.c (tf_fdatasync): New test.
3945
3946 2007-04-27 Ulrich Drepper <drepper@redhat.com>
3947
3948 [BZ #4392]
3949 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Treat error
3950 check mutexes like normal mutexes.
3951
3952 [BZ #4306]
3953 * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
3954 Initialize the whole sigevent structure to appease valgrind.
3955
3956 2007-04-25 Ulrich Drepper <drepper@redhat.com>
3957
3958 * sysdeps/x86_64/tls.h (tcbhead_t): Add vgetcpu_cache.
3959 * sysdeps/x86_64/tcb-offsets.sym: Add VGETCPU_CACHE_OFFSET.
3960
3961 2007-04-06 Ulrich Drepper <drepper@redhat.com>
3962
3963 * tst-locale1.c: Avoid warnings.
3964 * tst-locale2.c: Likewise.
3965
3966 2007-03-19 Steven Munroe <sjmunroe@us.ibm.com>
3967
3968 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
3969 (__lll_robust_trylock): Add MUTEX_HINT_ACQ to lwarx instruction.
3970
3971 2007-03-16 Jakub Jelinek <jakub@redhat.com>
3972
3973 * sysdeps/pthread/bits/libc-lock.h: Use __extern_inline and
3974 __extern_always_inline where appropriate.
3975 * sysdeps/pthread/pthread.h: Likewise.
3976
3977 2007-03-13 Richard Henderson <rth@redhat.com>
3978
3979 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Use two
3980 separate cfi regions for the two subsections.
3981
3982 2007-02-25 Ulrich Drepper <drepper@redhat.com>
3983
3984 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset refcntr in
3985 new thread, don't just decrement it.
3986 Patch by Suzuki K P <suzuki@in.ibm.com>.
3987
3988 2007-02-21 Ulrich Drepper <drepper@redhat.com>
3989
3990 * sysdeps/pthread/pthread-functions.h: Correct last patch, correct
3991 PTHFCT_CALL definition.
3992
3993 2007-02-18 Ulrich Drepper <drepper@redhat.com>
3994
3995 * sysdeps/pthread/pthread-functions.h: If PTR_DEMANGLE is not
3996 available, don't use it.
3997
3998 2007-02-09 Jakub Jelinek <jakub@redhat.com>
3999
4000 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4001 (__lll_mutex_timedlock_wait): Use correct pointer when we don't
4002 call into the kernel to delay.
4003
4004 2007-01-18 Ulrich Drepper <drepper@redhat.com>
4005
4006 * tst-initializers1.c: We want to test the initializers as seen
4007 outside of libc, so undefined _LIBC.
4008
4009 * pthread_join.c (cleanup): Avoid warning.
4010
4011 2007-01-17 Ulrich Drepper <drepper@redhat.com>
4012
4013 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4014 (__lll_timedwait_tid): Add unwind info.
4015
4016 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Don't just copy the
4017 function table, mangle the pointers.
4018 * sysdeps/pthread/pthread-functions.h: Define PTHFCT_CALL.
4019 * forward.c: Use PTHFCT_CALL and __libc_pthread_functions_init.
4020 * sysdeps/pthread/bits/libc-lock.h: When using __libc_pthread_functions
4021 demangle pointers before use.
4022 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Use PTHFCT_CALL to
4023 demangle pointer.
4024 * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
4025 * sysdeps/pthread/setxid.h: Likewise.
4026
4027 2007-01-12 Ulrich Drepper <drepper@redhat.com>
4028
4029 * tst-rwlock7.c: Show some more information in case of correct
4030 behavior.
4031
4032 2007-01-11 Ulrich Drepper <drepper@redhat.com>
4033
4034 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
4035 (lll_futex_timed_wait): Undo part of last change, don't negate
4036 return value.
4037
4038 2007-01-10 Ulrich Drepper <drepper@redhat.com>
4039
4040 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Cleanups. Define
4041 FUTEX_CMP_REQUEUE and lll_futex_requeue.
4042
4043 2006-12-28 David S. Miller <davem@davemloft.net>
4044
4045 * shlib-versions: Fix sparc64 linux target specification.
4046
4047 2007-01-10 Jakub Jelinek <jakub@redhat.com>
4048
4049 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
4050 Adjust include path for pthread_barrier_wait.c move.
4051
4052 2006-12-21 Jakub Jelinek <jakub@redhat.com>
4053
4054 * sysdeps/unix/sysv/linux/pthread_kill.c (pthread_kill): Make sure
4055 tid isn't reread from pd->tid in between ESRCH test and the syscall.
4056
4057 2006-12-06 Jakub Jelinek <jakub@redhat.com>
4058
4059 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Handle
4060 6 argument cancellable syscalls.
4061 (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
4062 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO): Handle
4063 6 argument cancellable syscalls.
4064 (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
4065
4066 2006-12-09 Ulrich Drepper <drepper@redhat.com>
4067
4068 * sysdeps/unix/sysv/linux/rtld-lowlevel.h
4069 (__rtld_mrlock_initialize): Add missing closing parenthesis.
4070
4071 2006-10-30 Jakub Jelinek <jakub@redhat.com>
4072
4073 * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
4074 __sync_lock_release instead of __sync_lock_release_si.
4075
4076 2006-10-29 Jakub Jelinek <jakub@redhat.com>
4077
4078 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (RTLD_SINGLE_THREAD_P):
4079 Define.
4080 (SINGLE_THREAD_P): Define to 1 if IS_IN_rtld.
4081 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Likewise.
4082 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
4083 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
4084 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
4085 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
4086 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
4087 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
4088 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
4089 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
4090 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
4091
4092 2006-10-27 Ulrich Drepper <drepper@redhat.com>
4093
4094 * sysdeps/pthread/pthread_barrier_wait.c: Move to...
4095 * pthread_barrier_wait.c: ...here.
4096 * sysdeps/pthread/pthread_cond_broadcast.c: Move to...
4097 * pthread_cond_broadcast.c: ...here.
4098 * sysdeps/pthread/pthread_cond_signal.c: Move to...
4099 * pthread_cond_signal.c: ...here.
4100 * sysdeps/pthread/pthread_cond_timedwait.c: Move to...
4101 * pthread_cond_timedwait.c: ...here.
4102 * sysdeps/pthread/pthread_cond_wait.c: Move to...
4103 * pthread_cond_wait.c: ...here.
4104 * sysdeps/pthread/pthread_once.c: Move to...
4105 * pthread_once.c: ...here.
4106 * sysdeps/pthread/pthread_rwlock_rdlock.c: Move to...
4107 * pthread_rwlock_rdlock.c: ...here.
4108 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Move to...
4109 * pthread_rwlock_timedrdlock.c: ...here.
4110 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Move to...
4111 * pthread_rwlock_timedwrlock.c: ...here.
4112 * sysdeps/pthread/pthread_rwlock_unlock.c: Move to...
4113 * pthread_rwlock_unlock.c: ...here.
4114 * sysdeps/pthread/pthread_rwlock_wrlock.c: Move to...
4115 * pthread_rwlock_wrlock.c: ...here.
4116 * sysdeps/pthread/pthread_spin_destroy.c: Move to...
4117 * pthread_spin_destroy.c: ...here.
4118 * sysdeps/pthread/pthread_spin_init.c: Move to...
4119 * pthread_spin_init.c: ...here.
4120 * sysdeps/pthread/pthread_spin_unlock.c: Move to...
4121 * pthread_spin_unlock.c: ...here.
4122 * sysdeps/pthread/pthread_getcpuclockid.c: Move to...
4123 * pthread_getcpuclockid.c: ...here.
4124
4125 * init.c: USE_TLS support is now always enabled.
4126 * tst-tls5.h: Likewise.
4127 * sysdeps/alpha/tls.h: Likewise.
4128 * sysdeps/i386/tls.h: Likewise.
4129 * sysdeps/ia64/tls.h: Likewise.
4130 * sysdeps/powerpc/tls.h: Likewise.
4131 * sysdeps/s390/tls.h: Likewise.
4132 * sysdeps/sh/tls.h: Likewise.
4133 * sysdeps/sparc/tls.h: Likewise.
4134 * sysdeps/x86_64/tls.h: Likewise.
4135
4136 2006-10-27 Jakub Jelinek <jakub@redhat.com>
4137
4138 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
4139 __rtld_mrlock_change): Update oldval if atomic compare and exchange
4140 failed.
4141
4142 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
4143 Define to THREAD_SELF->header.multiple_threads.
4144 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
4145 Likewise.
4146 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
4147 Likewise.
4148 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
4149 (SINGLE_THREAD_P): Likewise.
4150 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
4151 (SINGLE_THREAD_P): Likewise.
4152 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
4153 (SINGLE_THREAD_P): Likewise.
4154 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
4155 (SINGLE_THREAD_P): Likewise.
4156 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (SINGLE_THREAD_P):
4157 Likewise.
4158 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
4159 (SINGLE_THREAD_P): Likewise.
4160 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
4161 (SINGLE_THREAD_P): Likewise.
4162 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (SINGLE_THREAD_P):
4163 Likewise.
4164
4165 2006-10-26 Jakub Jelinek <jakub@redhat.com>
4166
4167 * pthread_attr_setstacksize.c (NEW_VERNUM): Define to GLIBC_2_3_3
4168 by default rather than 2_3_3.
4169
4170 2006-10-17 Jakub Jelinek <jakub@redhat.com>
4171
4172 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
4173 __rtld_mrlock_unlock, __rtld_mrlock_change, __rtld_mrlock_done): Use
4174 atomic_* instead of catomic_* macros.
4175
4176 2006-10-12 Ulrich Drepper <drepper@redhat.com>
4177
4178 [BZ #3285]
4179 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add SEM_VALUE_MAX.
4180 * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
4181 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
4182 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
4183 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
4184 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Remove SEM_VALUE_MAX.
4185 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
4186 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
4187 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
4188 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: Likewise.
4189 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
4190 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
4191 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
4192
4193 2006-10-11 Ulrich Drepper <drepper@redhat.com>
4194
4195 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add support for
4196 cancelable syscalls with six parameters.
4197
4198 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Use catomic_*
4199 operations instead of atomic_*.
4200
4201 2006-10-09 Ulrich Drepper <drepper@redhat.com>
4202
4203 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: New file..
4204
4205 2006-10-07 Ulrich Drepper <drepper@redhat.com>
4206
4207 * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: New file.
4208 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstack.c: New file.
4209 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c:
4210 New file.
4211 * pthread_attr_setstack.c: Allow overwriting the version number of the
4212 new symbol.
4213 * pthread_attr_setstacksize.c: Likewise.
4214 (__old_pthread_attr_setstacksize): If STACKSIZE_ADJUST is defined use
4215 it.
4216 * sysdeps/unix/sysv/linux/powerpc/Versions (libpthread): Add
4217 pthread_attr_setstack and pthread_attr_setstacksize to GLIBC_2.6.
4218
4219 2006-09-24 Ulrich Drepper <drepper@redhat.com>
4220
4221 [BZ #3251]
4222 * descr.h (ENQUEUE_MUTEX_BOTH): Add cast to avoid warning.
4223 Patch by Petr Baudis.
4224
4225 2006-09-18 Jakub Jelinek <jakub@redhat.com>
4226
4227 * tst-kill4.c (do_test): Explicitly set tf thread's stack size.
4228
4229 * tst-cancel2.c (tf): Loop as long as something was written.
4230
4231 2006-09-12 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4232
4233 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: For PI
4234 mutexes wake all mutexes.
4235 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Don't increment
4236 WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
4237 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4238
4239 2006-09-12 Ulrich Drepper <drepper@redhat.com>
4240
4241 * tst-cond22.c (tf): Slight changes to the pthread_cond_wait use
4242 to guarantee the thread is always canceled.
4243
4244 2006-09-08 Jakub Jelinek <jakub@redhat.com>
4245
4246 * tst-cond22.c: Include pthread.h instead of pthreadP.h.
4247 Include stdlib.h.
4248 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Only
4249 increase FUTEX if increasing WAKEUP_SEQ. Fix comment typo.
4250 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
4251 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4252 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4253
4254 2006-09-08 Ulrich Drepper <drepper@redhat.com>
4255
4256 [BZ #3123]
4257 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Don't
4258 increment WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
4259 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
4260 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4261 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4262 * Makefile (tests): Add tst-cond22.
4263 * tst-cond22.c: New file.
4264
4265 2006-09-05 Ulrich Drepper <drepper@redhat.com>
4266
4267 [BZ #3124]
4268 * descr.h (struct pthread): Add parent_cancelhandling.
4269 * sysdeps/pthread/createthread.c (create_thread): Pass parent
4270 cancelhandling value to child.
4271 * pthread_create.c (start_thread): If parent thread was canceled
4272 reset the SIGCANCEL mask.
4273 * Makefile (tests): Add tst-cancel25.
4274 * tst-cancel25.c: New file.
4275
4276 2006-09-05 Jakub Jelinek <jakub@redhat.com>
4277 Ulrich Drepper <drepper@redhat.com>
4278
4279 * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY): Don't decrement
4280 counterp if it is already zero.
4281 * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY): Likewise..
4282
4283 2006-03-04 Jakub Jelinek <jakub@redhat.com>
4284 Roland McGrath <roland@redhat.com>
4285
4286 * sysdeps/unix/sysv/linux/i386/lowlevellock.h
4287 (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
4288 LLL_STUB_UNWIND_INFO_3, LLL_STUB_UNWIND_INFO_4): Define.
4289 (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
4290 lll_robust_mutex_cond_lock, lll_mutex_timedlock,
4291 lll_robust_mutex_timedlock, lll_mutex_unlock,
4292 lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
4293 Add _L_*_ symbols around the subsection.
4294 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Add unwind info.
4295 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Likewise.
4296
4297 2006-03-03 Jakub Jelinek <jakub@redhat.com>
4298 Roland McGrath <roland@redhat.com>
4299
4300 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
4301 (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
4302 LLL_STUB_UNWIND_INFO_5, LLL_STUB_UNWIND_INFO_6): Define.
4303 (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
4304 lll_robust_mutex_cond_lock, lll_mutex_timedlock,
4305 lll_robust_mutex_timedlock, lll_mutex_unlock,
4306 lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
4307 Add _L_*_ symbols around the subsection.
4308 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Add unwind info.
4309 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
4310
4311 2006-08-31 Ulrich Drepper <drepper@redhat.com>
4312
4313 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Undo last
4314 change because it can disturb too much existing code. If real hard
4315 reader preference is needed we'll introduce another type.
4316 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
4317 (pthread_rwlock_timedwrlock): Likewise.
4318 * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
4319 Likewise.
4320
4321 2006-08-30 Ulrich Drepper <drepper@redhat.com>
4322
4323 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Respect
4324 reader preference.
4325 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
4326 (pthread_rwlock_timedwrlock): Likewise.
4327 * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
4328 Likewise.
4329
4330 2006-08-25 Jakub Jelinek <jakub@redhat.com>
4331
4332 * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libpthread):
4333 Only define ifdef SHARED.
4334
4335 2006-08-23 Ulrich Drepper <drepper@redhat.com>
4336
4337 * allocatestack.c (queue_stack): Move freeing of surplus stacks to...
4338 (free_stacks): ...here.
4339 (__free_stack_cache): New function.
4340 * pthreadP.h: Declare __free_stack_cache.
4341 * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
4342 ptr_freeres.
4343 * init.c (pthread_functions): Initialize ptr_freeres.
4344 * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libptread):
4345 New freeres function.
4346
4347 2006-07-30 Joseph S. Myers <joseph@codesourcery.com>
4348
4349 [BZ #3018]
4350 * Makefile (extra-objs): Add modules to extra-test-objs instead.
4351
4352 2006-08-20 Ulrich Drepper <drepper@redhat.com>
4353
4354 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
4355 _XOPEN_REALTIME_THREADS.
4356
4357 2006-08-15 Jakub Jelinek <jakub@redhat.com>
4358
4359 * sysdeps/unix/sysv/linux/clock_settime.c (INTERNAL_VSYSCALL): Use
4360 HAVE_CLOCK_GETRES_VSYSCALL as guard macro rather than
4361 HAVE_CLOCK_GETTIME_VSYSCALL.
4362 (maybe_syscall_settime_cpu): Use plain INTERNAL_VSYSCALL here.
4363
4364 2006-08-14 Jakub Jelinek <jakub@redhat.com>
4365
4366 * sysdeps/unix/sysv/linux/bits/posix_opt.h
4367 (_POSIX_THREAD_PRIO_PROTECT): Define to 200112L.
4368 * descr.h (struct priority_protection_data): New type.
4369 (struct pthread): Add tpp field.
4370 * pthreadP.h (PTHREAD_MUTEX_PP_NORMAL_NP,
4371 PTHREAD_MUTEX_PP_RECURSIVE_NP, PTHREAD_MUTEX_PP_ERRORCHECK_NP,
4372 PTHREAD_MUTEX_PP_ADAPTIVE_NP): New enum values.
4373 * pthread_mutex_init.c (__pthread_mutex_init): Handle non-robust
4374 TPP mutexes.
4375 * pthread_mutex_lock.c (__pthread_mutex_lock): Handle TPP mutexes.
4376 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Likewise.
4377 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Likewise.
4378 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Likewise.
4379 * tpp.c: New file.
4380 * pthread_setschedparam.c (__pthread_setschedparam): Handle priority
4381 boosted by TPP.
4382 * pthread_setschedprio.c (pthread_setschedprio): Likewise.
4383 * pthread_mutexattr_getprioceiling.c
4384 (pthread_mutexattr_getprioceiling): If ceiling is 0, ensure it is
4385 in the SCHED_FIFO priority range.
4386 * pthread_mutexattr_setprioceiling.c
4387 (pthread_mutexattr_setprioceiling): Fix prioceiling validation.
4388 * pthread_mutex_getprioceiling.c (pthread_mutex_getprioceiling): Fail
4389 if mutex is not TPP. Ceiling is now in __data.__lock.
4390 * pthread_mutex_setprioceiling.c: Include stdbool.h.
4391 (pthread_mutex_setprioceiling): Fix prioceiling validation. Ceiling
4392 is now in __data.__lock. Add locking.
4393 * pthread_create.c (__free_tcb): Free pd->tpp structure.
4394 * Makefile (libpthread-routines): Add tpp.
4395 (xtests): Add tst-mutexpp1, tst-mutexpp6 and tst-mutexpp10.
4396 * tst-tpp.h: New file.
4397 * tst-mutexpp1.c: New file.
4398 * tst-mutexpp6.c: New file.
4399 * tst-mutexpp10.c: New file.
4400 * tst-mutex1.c (TEST_FUNCTION): Don't redefine if already defined.
4401 * tst-mutex6.c (TEST_FUNCTION): Likewise.
4402
4403 2006-08-12 Ulrich Drepper <drepper@redhat.com>
4404
4405 [BZ #2843]
4406 * pthread_join.c (pthread_join): Account for self being canceled
4407 when checking for deadlocks.
4408 * tst-join5.c: Cleanups. Allow to be used in tst-join6.
4409 (tf1): Don't print anything after pthread_join returns, this would be
4410 another cancellation point.
4411 (tf2): Likewise.
4412 * tst-join6.c: New file.
4413 * Makefile (tests): Add tst-join6.
4414
4415 2006-08-03 Ulrich Drepper <drepper@redhat.com>
4416
4417 [BZ #2892]
4418 * pthread_setspecific.c (__pthread_setspecific): Check
4419 out-of-range index before checking for unused key.
4420
4421 * sysdeps/pthread/gai_misc.h: New file.
4422
4423 2006-08-01 Ulrich Drepper <drepper@redhat.com>
4424
4425 * sysdeps/unix/sysv/linux/i386/smp.h: New file. Old Linux-specific
4426 file. Don't use sysctl.
4427 * sysdeps/unix/sysv/linux/smp.h: Always assume SMP. Archs can
4428 overwrite the file if this is likely not true.
4429
4430 2006-07-31 Daniel Jacobowitz <dan@codesourcery.com>
4431
4432 * allocatestack.c (__reclaim_stacks): Reset the PID on cached stacks.
4433 * Makefile (tests): Add tst-getpid3.
4434 * tst-getpid3.c: New file.
4435
4436 2006-07-30 Roland McGrath <roland@redhat.com>
4437
4438 * Makefile (libpthread-routines): Add ptw-sigsuspend.
4439
4440 * sysdeps/unix/sysv/linux/i386/not-cancel.h
4441 (pause_not_cancel): New macro.
4442 (nanosleep_not_cancel): New macro.
4443 (sigsuspend_not_cancel): New macro.
4444 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
4445 nanosleep_not_cancel macro from <not-cancel.h>.
4446 * pthread_mutex_lock.c (__pthread_mutex_lock): Use pause_not_cancel
4447 macro from <not-cancel.h>.
4448
4449 2006-07-28 Ulrich Drepper <drepper@redhat.com>
4450 Jakub Jelinek <jakub@redhat.com>
4451
4452 * descr.h: Change ENQUEUE_MUTEX and DEQUEUE_MUTEX for bit 0
4453 notification of PI mutex. Add ENQUEUE_MUTEX_PI.
4454 * pthreadP.h: Define PTHREAD_MUTEX_PI_* macros for PI mutex types.
4455 * pthread_mutex_setprioceilining.c: Adjust for mutex type name change.
4456 * pthread_mutex_init.c: Add support for priority inheritance mutex.
4457 * pthread_mutex_lock.c: Likewise.
4458 * pthread_mutex_timedlock.c: Likewise.
4459 * pthread_mutex_trylock.c: Likewise.
4460 * pthread_mutex_unlock.c: Likewise.
4461 * sysdeps/pthread/pthread_cond_broadcast.c: For PI mutexes wake
4462 all mutexes.
4463 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.c: Likewise.
4464 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.c: Likewise.
4465 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: New file.
4466 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-header): Add
4467 pthread-pi-defines.sym.
4468 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_LOCK_PI,
4469 FUTEX_UNLOCK_PI, and FUTEX_TRYLOCK_PI.
4470 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
4471 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
4472 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
4473 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
4474 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
4475 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
4476 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
4477 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
4478 _POSIX_THREAD_PRIO_INHERIT to 200112L.
4479 * tst-mutex1.c: Adjust to allow use in PI mutex test.
4480 * tst-mutex2.c: Likewise.
4481 * tst-mutex3.c: Likewise.
4482 * tst-mutex4.c: Likewise.
4483 * tst-mutex5.c: Likewise.
4484 * tst-mutex6.c: Likewise.
4485 * tst-mutex7.c: Likewise.
4486 * tst-mutex7a.c: Likewise.
4487 * tst-mutex8.c: Likewise.
4488 * tst-mutex9.c: Likewise.
4489 * tst-robust1.c: Likewise.
4490 * tst-robust7.c: Likewise.
4491 * tst-robust8.c: Likewise.
4492 * tst-mutexpi1.c: New file.
4493 * tst-mutexpi2.c: New file.
4494 * tst-mutexpi3.c: New file.
4495 * tst-mutexpi4.c: New file.
4496 * tst-mutexpi5.c: New file.
4497 * tst-mutexpi6.c: New file.
4498 * tst-mutexpi7.c: New file.
4499 * tst-mutexpi7a.c: New file.
4500 * tst-mutexpi8.c: New file.
4501 * tst-mutexpi9.c: New file.
4502 * tst-robust1.c: New file.
4503 * tst-robust2.c: New file.
4504 * tst-robust3.c: New file.
4505 * tst-robust4.c: New file.
4506 * tst-robust5.c: New file.
4507 * tst-robust6.c: New file.
4508 * tst-robust7.c: New file.
4509 * tst-robust8.c: New file.
4510 * Makefile (tests): Add the new tests.
4511
4512 * pthread_create.c (start_thread): Add some casts to avoid warnings.
4513 * pthread_mutex_destroy.c: Remove unneeded label.
4514
4515 2006-07-01 Ulrich Drepper <drepper@redhat.com>
4516
4517 * pthread_mutex_init.c (__pthread_mutex_init): Move some
4518 computations to compile time.
4519
4520 2006-06-04 Ulrich Drepper <drepper@redhat.com>
4521
4522 * sysdeps/pthread/pthread.h: Add pthread_equal inline version.
4523
4524 2006-05-15 Ulrich Drepper <drepper@redhat.com>
4525
4526 * sysdeps/unix/sysv/linux/fork.h: Mark __fork_handlers as hidden.
4527
4528 2006-05-11 Ulrich Drepper <drepper@redhat.com>
4529
4530 * pthread_key_create.c (__pthread_key_create): Do away with
4531 __pthread_keys_lock.
4532
4533 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4534 (__kernel_cpumask_size): Mark as hidden.
4535 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
4536
4537 * sem_open.c (__sem_mappings_lock): Mark as hidden.
4538 * semaphoreP.h (__sem_mappings_lock): Likewise.
4539
4540 2006-05-10 Ulrich Drepper <drepper@redhat.com>
4541
4542 * pthread_atfork.c: Mark __dso_handle as hidden.
4543
4544 2006-05-09 Ulrich Drepper <drepper@redhat.com>
4545
4546 [BZ #2644]
4547 * sysdeps/pthread/unwind-forcedunwind.c: Different solution for
4548 the reload problem. Change the one path in pthread_cancel_init
4549 which causes the problem. Force gcc to reload. Simplify callers.
4550 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c
4551 (_Unwind_GetBSP): Undo last patch.
4552
4553 2006-05-07 Ulrich Drepper <drepper@redhat.com>
4554
4555 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: Make sure the
4556 function pointer is reloaded after pthread_cancel_init calls.
4557
4558 [BZ #2644]
4559 * sysdeps/pthread/unwind-forcedunwind.c: Make sure functions
4560 pointers are reloaded after pthread_cancel_init calls.
4561
4562 2006-05-01 Ulrich Drepper <drepper@redhat.com>
4563
4564 * sysdeps/pthread/allocalim.h (__libc_use_alloca): Mark with
4565 __always_inline.
4566
4567 2006-04-27 Ulrich Drepper <drepper@redhat.com>
4568
4569 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
4570 Allocate new object which is passed to timer_sigev_thread so that
4571 the timer can be deleted before the new thread is scheduled.
4572
4573 2006-04-26 Roland McGrath <roland@redhat.com>
4574
4575 * sysdeps/x86_64/tls.h: Include <asm/prctl.h> inside [! __ASSEMBLER__].
4576
4577 2006-04-08 Ulrich Drepper <drepper@redhat.com>
4578
4579 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove branch predicion
4580 suffix for conditional jumps.
4581 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
4582 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
4583 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
4584 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
4585 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
4586 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
4587
4588 * init.c (sigcancel_handler): Compare with correct PID even if the
4589 thread is in the middle of a fork call.
4590 (sighandler_setxid): Likewise.
4591 Reported by Suzuki K P <suzuki@in.ibm.com> .
4592
4593 2006-04-07 Jakub Jelinek <jakub@redhat.com>
4594
4595 * pthreadP.h (FUTEX_TID_MASK): Sync with kernel.
4596
4597 2006-04-06 Ulrich Drepper <drepper@redhat.com>
4598
4599 * pthread_getattr_np.c (pthread_getattr_np): Close fp if getrlimit
4600 fails [Coverity CID 105].
4601
4602 2006-04-05 Ulrich Drepper <drepper@redhat.com>
4603
4604 * sysdeps/pthread/pthread.h: Add nonnull attributes.
4605
4606 2006-04-03 Steven Munroe <sjmunroe@us.ibm.com>
4607
4608 [BZ #2505]
4609 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h [_ARCH_PWR4]:
4610 Define __lll_rel_instr using lwsync.
4611
4612 2006-03-27 Ulrich Drepper <drepper@redhat.com>
4613
4614 * allocatestack.c (allocate_stack): Always initialize robust_head.
4615 * descr.h: Define struct robust_list_head.
4616 (struct pthread): Use robust_list_head in robust mutex list definition.
4617 Adjust ENQUEUE_MUTEX and DEQUEUE_MUTEX.
4618 * init.c [!__ASSUME_SET_ROBUST_LIST] (__set_robust_list_avail): Define.
4619 (__pthread_initialize_minimal_internal): Register robust_list with
4620 the kernel.
4621 * pthreadP.h: Remove PRIVATE_ from PTHREAD_MUTEX_ROBUST_* names.
4622 Declare __set_robust_list_avail.
4623 * pthread_create.c (start_thread): Register robust_list of new thread.
4624 [!__ASSUME_SET_ROBUST_LIST]: If robust_list is not empty wake up
4625 waiters.
4626 * pthread_mutex_destroy.c: For robust mutexes don't look at the
4627 number of users, it's unreliable.
4628 * pthread_mutex_init.c: Allow use of pshared robust mutexes if
4629 set_robust_list syscall is available.
4630 * pthread_mutex_consistent.c: Adjust for PTHREAD_MUTEX_ROBUST_* rename.
4631 * pthread_mutex_lock.c: Simplify robust mutex code a bit.
4632 Set robust_head.list_op_pending before trying to lock a robust mutex.
4633 * pthread_mutex_timedlock.c: Likewise.
4634 * pthread_mutex_trylock.c: Likewise.
4635 * pthread_mutex_unlock.c: Likewise for unlocking.
4636 * Makefile (tests): Add tst-robust8.
4637 * tst-robust8.c: New file.
4638
4639 2006-03-08 Andreas Schwab <schwab@suse.de>
4640
4641 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h
4642 (DL_SYSINFO_IMPLEMENTATION): Add missing newline.
4643
4644 2006-03-05 Roland McGrath <roland@redhat.com>
4645
4646 * configure (libc_add_on): Disable add-on when $add_ons_automatic = yes
4647 and $config_os doesn't match *linux*.
4648
4649 2006-03-05 David S. Miller <davem@sunset.davemloft.net>
4650
4651 * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S:
4652 Use __syscall_error.
4653 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
4654 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: Likewise.
4655 * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: Likewise.
4656 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
4657 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: Likewise.
4658 * sysdeps/unix/sysv/linux/sparc/Makefile: New file.
4659
4660 2006-03-02 Ulrich Drepper <drepper@redhat.com>
4661
4662 * sysdeps/unix/sysv/linux/aio_misc.h: Various cleanups.
4663
4664 2006-03-01 Ulrich Drepper <drepper@redhat.com>
4665
4666 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
4667 (__lll_robust_lock_wait): Also set FUTEX_WAITERS bit if we got the
4668 mutex.
4669 (__lll_robust_timedlock_wait): Likewise.
4670 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S
4671 (__lll_robust_lock_wait): Likewise.
4672 (__lll_robust_timedlock_wait): Likewise.
4673 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
4674 (__lll_robust_lock_wait): Likewise.
4675 (__lll_robust_timedlock_wait): Likewise.
4676
4677 2006-03-01 Jakub Jelinek <jakub@redhat.com>
4678
4679 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_robust_mutex_dead,
4680 lll_robust_mutex_trylock, lll_robust_mutex_lock,
4681 lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
4682 lll_robust_mutex_unlock): Define.
4683 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
4684
4685 2006-02-28 H.J. Lu <hongjiu.lu@intel.com>
4686
4687 * sysdeps/unix/sysv/linux/ia64/clone2.S: Include <clone2.S>
4688 instead of <clone.S>.
4689
4690 2006-02-27 Jakub Jelinek <jakub@redhat.com>
4691
4692 * Makefile (libpthread-routines): Add
4693 pthread_mutexattr_[sg]etprotocol, pthread_mutexattr_[sg]etprioceiling
4694 and pthread_mutex_[sg]etprioceiling.
4695 * Versions (GLIBC_2.4): Export pthread_mutexattr_getprotocol,
4696 pthread_mutexattr_setprotocol, pthread_mutexattr_getprioceiling,
4697 pthread_mutexattr_setprioceiling, pthread_mutex_getprioceiling and
4698 pthread_mutex_setprioceiling.
4699 * sysdeps/pthread/pthread.h (PTHREAD_PRIO_NONE, PTHREAD_PRIO_INHERIT,
4700 PTHREAD_PRIO_PROTECT): New enum values.
4701 (pthread_mutexattr_getprotocol, pthread_mutexattr_setprotocol,
4702 pthread_mutexattr_getprioceiling, pthread_mutexattr_setprioceiling,
4703 pthread_mutex_getprioceiling, pthread_mutex_setprioceiling): New
4704 prototypes.
4705 * pthreadP.h (PTHREAD_MUTEX_PRIO_INHERIT_PRIVATE_NP,
4706 PTHREAD_MUTEX_PRIO_PROTECT_PRIVATE_NP): New enum values.
4707 (PTHREAD_MUTEX_PRIO_CEILING_SHIFT, PTHREAD_MUTEX_PRIO_CEILING_MASK):
4708 Define.
4709 (PTHREAD_MUTEXATTR_PROTOCOL_SHIFT, PTHREAD_MUTEXATTR_PROTOCOL_MASK,
4710 PTHREAD_MUTEXATTR_PRIO_CEILING_SHIFT,
4711 PTHREAD_MUTEXATTR_PRIO_CEILING_MASK): Define.
4712 (PTHREAD_MUTEXATTR_FLAG_BITS): Or in PTHREAD_MUTEXATTR_PROTOCOL_MASK
4713 and PTHREAD_MUTEXATTR_PRIO_CEILING_MASK.
4714 * pthread_mutex_init.c (__pthread_mutex_init): For the time being
4715 return ENOTSUP for PTHREAD_PRIO_INHERIT or PTHREAD_PRIO_PROTECT
4716 protocol mutexes.
4717 * pthread_mutex_getprioceiling.c: New file.
4718 * pthread_mutex_setprioceiling.c: New file.
4719 * pthread_mutexattr_getprioceiling.c: New file.
4720 * pthread_mutexattr_setprioceiling.c: New file.
4721 * pthread_mutexattr_getprotocol.c: New file.
4722 * pthread_mutexattr_setprotocol.c: New file.
4723
4724 2006-02-27 Daniel Jacobowitz <dan@codesourcery.com>
4725
4726 * sysdeps/unix/sysv/linux/aio_misc.h: Include <limits.h>.
4727
4728 2006-02-27 Roland McGrath <roland@redhat.com>
4729
4730 * sysdeps/pthread/Subdirs: List nptl here too.
4731 * configure (libc_add_on_canonical): New variable.
4732
4733 * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: Use #include_next.
4734
4735 * sysdeps/unix/sysv/linux/sleep.c: Use #include_next after #include of
4736 self to get main source tree's file.
4737 * sysdeps/unix/sysv/linux/alpha/clone.S: Likewise.
4738 * sysdeps/unix/sysv/linux/i386/clone.S: Likewise.
4739 * sysdeps/unix/sysv/linux/i386/vfork.S: Likewise.
4740 * sysdeps/unix/sysv/linux/ia64/clone2.S: Likewise.
4741 * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: Likewise.
4742 * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: Likewise.
4743 * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: Likewise.
4744 * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: Likewise.
4745 * sysdeps/unix/sysv/linux/sh/clone.S: Likewise.
4746 * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: Likewise.
4747 * sysdeps/unix/sysv/linux/sparc/sparc64/clone.S: Likewise.
4748 * sysdeps/unix/sysv/linux/x86_64/clone.S: Likewise.
4749 * sysdeps/unix/sysv/linux/x86_64/vfork.S: Likewise.
4750
4751 * Makefile: Use $(sysdirs) in vpath directive.
4752
4753 * sysdeps/pthread/Makefile (CFLAGS-libc-start.c): Variable removed.
4754 (CPPFLAGS-timer_routines.c): Likewise.
4755
4756 * Makeconfig (includes): Variable removed.
4757
4758 2006-02-26 Roland McGrath <roland@redhat.com>
4759
4760 * sysdeps/generic/pt-raise.c: Moved to ...
4761 * pt-raise.c: ... here.
4762 * sysdeps/generic/lowlevellock.h: Moved to ...
4763 * lowlevellock.h: ... here.
4764
4765 2006-02-23 Roland McGrath <roland@redhat.com>
4766
4767 * descr.h (struct pthread): Add final member `end_padding'.
4768 (PTHREAD_STRUCT_END_PADDING): Use it.
4769
4770 2006-02-20 Roland McGrath <roland@redhat.com>
4771
4772 * sysdeps/mips: Directory removed, saved in ports repository.
4773 * sysdeps/unix/sysv/linux/mips: Likewise.
4774
4775 2006-02-18 Ulrich Drepper <drepper@redhat.com>
4776
4777 * tst-robust1.c: Add second mutex to check that the mutex list is
4778 handled correctly.
4779
4780 2006-02-17 Jakub Jelinek <jakub@redhat.com>
4781
4782 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_mutex_dead,
4783 lll_robust_mutex_trylock, lll_robust_mutex_lock,
4784 lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
4785 lll_robust_mutex_unlock): New macros.
4786 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
4787 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
4788 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
4789 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
4790 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: New file.
4791
4792 2006-02-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4793
4794 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Add lll_robust_mutex_*
4795 definitions.
4796 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: New file.
4797
4798 2006-02-17 Ulrich Drepper <drepper@redhat.com>
4799
4800 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
4801 (lll_robust_mutex_unlock): Avoid unnecessary wakeups.
4802 * sysdeps/unix/sysv/linux/i386/lowlevellock.h
4803 (lll_robust_mutex_unlock): Likewise.
4804
4805 2006-02-13 Jakub Jelinek <jakub@redhat.com>
4806
4807 * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX):
4808 Set robust_list.__next rather than robust_list.
4809 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
4810 (__pthread_list_t): New typedef.
4811 (pthread_mutex_t): Replace __next and __prev fields with __list.
4812 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
4813 (__pthread_list_t): New typedef.
4814 (pthread_mutex_t): Replace __next and __prev fields with __list.
4815 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
4816 (__pthread_list_t, __pthread_slist_t): New typedefs.
4817 (pthread_mutex_t): Replace __next and __prev fields with __list.
4818 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
4819 (__pthread_list_t, __pthread_slist_t): New typedefs.
4820 (pthread_mutex_t): Replace __next and __prev fields with __list.
4821 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
4822 (__pthread_list_t, __pthread_slist_t): New typedefs.
4823 (pthread_mutex_t): Replace __next and __prev fields with __list.
4824 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h
4825 (__pthread_slist_t): New typedef.
4826 (pthread_mutex_t): Replace __next field with __list.
4827
4828 2006-02-15 Ulrich Drepper <drepper@redhat.com>
4829
4830 * pthreadP.h: Define PTHREAD_MUTEX_INCONSISTENT instead of
4831 PTHREAD_MUTEX_OWNERDEAD.
4832 (PTHREAD_MUTEX_ROBUST_PRIVATE_NP): Define as 16, not 256.
4833 Define FUTEX_WAITERS, FUTEX_OWNER_DIED, FUTEX_TID_MASK.
4834 * Makefile (libpthread-routines): Add lowlevelrobustlock.
4835 * pthread_create.c (start_thread): Very much simplify robust_list loop.
4836 * pthread_mutex_consistent.c: Inconsistent mutex have __owner now set
4837 to PTHREAD_MUTEX_INCONSISTENT.
4838 * pthread_mutex_destroy.c: Allow destroying of inconsistent mutexes.
4839 * pthread_mutex_lock.c: Reimplement robust mutex handling.
4840 * pthread_mutex_trylock.c: Likewise.
4841 * pthread_mutex_timedlock.c: Likewise.
4842 * pthread_mutex_unlock.c: Likewise.
4843 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
4844 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
4845 lowlevelrobustlock.sym.
4846 * sysdeps/unix/sysv/linux/lowlevelrobustlock.sym: New file.
4847 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add lll_robust_mutex_*
4848 definitions.
4849 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
4850 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: New file.
4851 * sysdeps/unix/sysv/linux/i386/i586/lowlevelrobustlock.S: New file.
4852 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrobustlock.S: New file.
4853 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: New file.
4854
4855 2006-02-12 Ulrich Drepper <drepper@redhat.com>
4856
4857 * allocatestack.c (allocate_stack): Initialize robust_list.
4858 * init.c (__pthread_initialize_minimal_internal): Likewise.
4859 * descr.h (struct xid_command): Pretty printing.
4860 (struct pthread): Use __pthread_list_t or __pthread_slist_t for
4861 robust_list. Adjust macros.
4862 * pthread_create.c (start_thread): Adjust robust_list handling.
4863 * phtread_mutex_unlock.c: Don't allow unlocking from any thread
4864 but the owner for all robust mutex types.
4865 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
4866 __pthread_list_t and __pthread_slist_t. Use them in pthread_mutex_t.
4867 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4868 * sysdeps/pthread/pthread.h: Adjust mutex initializers.
4869
4870 * sysdeps/unix/sysv/linux/i386/not-cancel.h: Define openat_not_cancel,
4871 openat_not_cancel_3, openat64_not_cancel, and openat64_not_cancel_3.
4872
4873 2006-02-08 Jakub Jelinek <jakub@redhat.com>
4874
4875 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait,
4876 lll_futex_timedwait, lll_wait_tid): Add "memory" clobber.
4877
4878 2006-01-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4879
4880 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_futex_wait):
4881 Return status.
4882 (lll_futex_timed_wait): Define.
4883
4884 2006-01-19 Ulrich Drepper <drepper@redhat.com>
4885
4886 * tst-cancel4.c: Test ppoll.
4887
4888 2006-01-18 Andreas Jaeger <aj@suse.de>
4889
4890 [BZ #2167]
4891 * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h
4892 (pthread_mutex_t): Follow changes for other archs. Based on patch
4893 by Jim Gifford <patches@jg555.com>.
4894
4895 2006-01-13 Richard Henderson <rth@redhat.com>
4896
4897 * sysdeps/alpha/tls.h (tcbhead_t): Rename member to __private.
4898
4899 2006-01-10 Roland McGrath <roland@redhat.com>
4900
4901 * sysdeps/alpha/jmpbuf-unwind.h: File moved to main source tree.
4902 * sysdeps/i386/jmpbuf-unwind.h: Likewise.
4903 * sysdeps/mips/jmpbuf-unwind.h: Likewise.
4904 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
4905 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
4906 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
4907 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
4908 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
4909 * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
4910 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
4911
4912 2006-01-09 Roland McGrath <roland@redhat.com>
4913
4914 * tst-initializers1-c89.c: New file.
4915 * tst-initializers1-c99.c: New file.
4916 * tst-initializers1-gnu89.c: New file.
4917 * tst-initializers1-gnu99.c: New file.
4918 * Makefile (tests): Add them.
4919 (CFLAGS-tst-initializers1-c89.c): New variable.
4920 (CFLAGS-tst-initializers1-c99.c): New variable.
4921 (CFLAGS-tst-initializers1-gnu89.c): New variable.
4922 (CFLAGS-tst-initializers1-gnu99.c): New variable.
4923
4924 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
4925 Use __extension__ on anonymous union definition.
4926 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4927 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4928 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4929 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4930 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4931
4932 2006-01-08 Jakub Jelinek <jakub@redhat.com>
4933
4934 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
4935 Don't give the union a name because it changes the mangled name.
4936 Instead name the struct for __data.
4937 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_mutex_t):
4938 Likewise.
4939 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_mutex_t):
4940 Likewise.
4941
4942 2006-01-09 Jakub Jelinek <jakub@redhat.com>
4943
4944 * sysdeps/sparc/sparc64/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Add
4945 stack bias to mc_ftp field.
4946
4947 2006-01-07 Ulrich Drepper <drepper@redhat.com>
4948
4949 * sysdeps/pthread/aio_misc.h (AIO_MISC_WAIT): Work around gcc
4950 being too clever and reloading the futex value where it shouldn't.
4951
4952 2006-01-06 Ulrich Drepper <drepper@redhat.com>
4953
4954 * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX): Use
4955 correct type.
4956
4957 2006-01-06 Jakub Jelinek <jakub@redhat.com>
4958
4959 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
4960 Add cfi directives.
4961
4962 2006-01-06 Ulrich Drepper <drepper@redhat.com>
4963
4964 * sysdeps/ia64/tls.h (tcbhead_t): Rename private member to __private.
4965 * sysdeps/ia64/tcb-offsets.sym: Adjust for private->__private
4966 rename in tcbhead_t.
4967
4968 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
4969 Don't give the union a name because it changes the mangled name.
4970 Instead name the struct for __data.
4971 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4972 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4973 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4974 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4975 * pthread_create.c (start_thread): Adjust robust mutex free loop.
4976 * descr.h (ENQUEUE_MUTEX, DEQUEUE_MUTEX): Adjust.
4977
4978 2006-01-05 Ulrich Drepper <drepper@redhat.com>
4979
4980 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
4981 Return status.
4982 (lll_futex_timed_wait): Define.
4983 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
4984 * sysdeps/pthread/aio_misc.h: New file.
4985
4986 2006-01-03 Joseph S. Myers <joseph@codesourcery.com>
4987
4988 * Makefile ($(objpfx)$(multidir)): Use mkdir -p.
4989
4990 2006-01-03 Steven Munroe <sjmunroe@us.ibm.com>
4991
4992 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
4993 (PSEUDO): Remove redundant cfi_startproc and cfi_endproc directives.
4994 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
4995
4996 2006-01-04 Ulrich Drepper <drepper@redhat.com>
4997
4998 * tst-cancel24.cc: Use C headers instead of C++ headers.
4999
5000 2006-01-03 Jakub Jelinek <jakub@redhat.com>
5001
5002 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Remove #error for
5003 sparc-linux configured glibc.
5004 (lll_futex_wake_unlock): Define to 1 for sparc-linux configured glibc.
5005 (__lll_mutex_trylock, __lll_mutex_cond_trylock, __lll_mutex_lock,
5006 __lll_mutex_cond_lock, __lll_mutex_timedlock): Use
5007 atomic_compare_and_exchange_val_24_acq instead of
5008 atomic_compare_and_exchange_val_acq.
5009 (lll_mutex_unlock, lll_mutex_unlock_force): Use atomic_exchange_24_rel
5010 instead of atomic_exchange_rel.
5011 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: New file.
5012 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c: New
5013 file.
5014 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c: New
5015 file.
5016 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: New file.
5017 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: New file.
5018 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: New file.
5019 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c: New file.
5020 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: New file.
5021 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
5022 New file.
5023 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
5024 New file.
5025 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: New file.
5026 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: New file.
5027 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c: New
5028 file.
5029 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_trywait.c: New
5030 file.
5031 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: New file.
5032
5033 2006-01-03 Ulrich Drepper <drepper@redhat.com>
5034
5035 * sysdeps/pthread/pthread.h [__WORDSIZE==64]: Don't use cast in
5036 mutex initializers.
5037
5038 2006-01-02 Jakub Jelinek <jakub@redhat.com>
5039
5040 * sysdeps/sparc/tls.h (tcbhead_t): Add pointer_guard field.
5041 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
5042 THREAD_COPY_POINTER_GUARD): Define.
5043 * sysdeps/sparc/tcb-offsets.sym (POINTER_GUARD): Define.
5044 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Revert 2005-12-27 changes.
5045
5046 2006-01-01 Ulrich Drepper <drepper@redhat.com>
5047
5048 * version.c: Update copyright year.
5049
5050 2005-12-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5051
5052 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Remove explicit
5053 .eh_frame section, use cfi_* directives.
5054 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Add cfi instrumentation.
5055
5056 2005-12-30 Ulrich Drepper <drepper@redhat.com>
5057
5058 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Undo last change for
5059 now.
5060
5061 2005-12-29 Ulrich Drepper <drepper@redhat.com>
5062
5063 * sysdeps/pthread/sigaction.c: Removed.
5064 * sigaction.c: New file.
5065 * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-sigaction.c.
5066
5067 2005-12-28 Ulrich Drepper <drepper@redhat.com>
5068
5069 * Makefile (tests): Add tst-signal7.
5070 * tst-signal7.c: New file.
5071
5072 2005-12-27 Roland McGrath <roland@redhat.com>
5073
5074 * sysdeps/x86_64/jmpbuf-unwind.h (_jmpbuf_sp): New inline function.
5075 (_JMPBUF_UNWINDS_ADJ): Use it, to PTR_DEMANGLE before comparison.
5076 * sysdeps/alpha/jmpbuf-unwind.h: Likewise.
5077 * sysdeps/i386/jmpbuf-unwind.h: Likewise.
5078 * sysdeps/mips/jmpbuf-unwind.h: Likewise.
5079 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
5080 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
5081 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
5082 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
5083 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
5084 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
5085
5086 2005-12-27 Jakub Jelinek <jakub@redhat.com>
5087
5088 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Add __next
5089 and __prev field to pthread_mutex_t.
5090 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5091 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5092 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5093 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5094 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Add __next field
5095 to pthread_mutex_t.
5096
5097 2005-12-26 Ulrich Drepper <drepper@redhat.com>
5098
5099 * pthreadP.h: Define PTHREAD_MUTEX_ROBUST_PRIVATE_NP,
5100 PTHREAD_MUTEX_ROBUST_PRIVATE_RECURSIVE_NP,
5101 PTHREAD_MUTEX_ROBUST_PRIVATE_ERRORCHECK_NP,
5102 PTHREAD_MUTEX_ROBUST_PRIVATE_ADAPTIVE_NP,
5103 PTHREAD_MUTEXATTR_FLAG_ROBUST, PTHREAD_MUTEXATTR_FLAG_PSHARED,
5104 and PTHREAD_MUTEXATTR_FLAG_BITS.
5105 * descr.h (struct pthread): Add robust_list field and define
5106 ENQUEUE_MUTEX and DEQUEUE_MUTEX macros.
5107 * pthread_mutexattr_getrobust.c: New file.
5108 * pthread_mutexattr_setrobust.c: New file.
5109 * pthread_mutex_consistent.c: New file.
5110 * sysdeps/pthread/pthread.h: Declare pthread_mutexattr_getrobust,
5111 pthread_mutexattr_setrobust, and pthread_mutex_consistent.
5112 Define PTHREAD_MUTEX_STALLED_NP and PTHREAD_MUTEX_ROBUST_NP.
5113 Adjust pthread_mutex_t initializers.
5114 * nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Add __next
5115 field to pthread_mutex_t.
5116 * nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Add __next
5117 and __prev field to pthread_mutex_t.
5118 * Versions [GLIBC_2.4]: Export pthread_mutexattr_getrobust_np,
5119 pthread_mutexattr_setrobust_np, and pthread_mutex_consistent_np.
5120 * pthread_mutexattr_getpshared.c: Use PTHREAD_MUTEXATTR_FLAG_PSHARED
5121 and PTHREAD_MUTEXATTR_FLAG_BITS macros instead of magic numbers.
5122 * pthread_mutexattr_gettype.c: Likewise.
5123 * pthread_mutexattr_setpshared.c: Likewise.
5124 * pthread_mutexattr_settype.c: Likewise.
5125 * pthread_mutex_init.c: Reject robust+pshared attribute for now.
5126 Initialize mutex kind according to robust flag.
5127 * pthread_mutex_lock.c: Implement local robust mutex.
5128 * pthread_mutex_timedlock.c: Likewise.
5129 * pthread_mutex_trylock.c: Likewise.
5130 * pthread_mutex_unlock.c: Likewise.
5131 * pthread_create.c (start_thread): Mark robust mutexes which remained
5132 locked as dead.
5133 * tst-robust1.c: New file.
5134 * tst-robust2.c: New file.
5135 * tst-robust3.c: New file.
5136 * tst-robust4.c: New file.
5137 * tst-robust5.c: New file.
5138 * tst-robust6.c: New file.
5139 * tst-robust7.c: New file.
5140 * Makefile (libpthread-routines): Add pthread_mutexattr_getrobust,
5141 pthread_mutexattr_setrobust, and pthread_mutex_consistent.
5142 (tests): Add tst-robust1, tst-robust2, tst-robust3, tst-robust4,
5143 tst-robust5, tst-robust6, and tst-robust7.
5144
5145 * tst-typesizes.c: New file.
5146 * Makefile (tests): Add tst-typesizes.
5147
5148 * tst-once3.c: More debug output.
5149
5150 2005-12-24 Ulrich Drepper <drepper@redhat.com>
5151
5152 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Add break
5153 missing after last change.
5154
5155 * version.c: Update copyright year.
5156
5157 2005-12-23 Ulrich Drepper <drepper@redhat.com>
5158
5159 * pthread_mutex_destroy.c: Set mutex type to an invalid value.
5160 * pthread_mutex_lock.c: Return EINVAL for invalid mutex type.
5161 * pthread_mutex_trylock.c: Likewise.
5162 * pthread_mutex_timedlock.c: Likewise.
5163 * pthread_mutex_unlock.c: Likewise.
5164
5165 2005-12-22 Roland McGrath <roland@redhat.com>
5166
5167 * sysdeps/pthread/sigaction.c: Use "" instead of <> to include self,
5168 so that #include_next's search location is not reset to the -I..
5169 directory where <nptl/...> can be found.
5170
5171 2005-12-22 Ulrich Drepper <drepper@redhat.com>
5172
5173 [BZ #1913]
5174 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
5175 Fix unwind info. Remove useless branch prediction prefix.
5176 * tst-cancel24.cc: New file.
5177 * Makefile: Add rules to build and run tst-cancel24.
5178
5179 2005-12-21 Roland McGrath <roland@redhat.com>
5180
5181 * libc-cancellation.c: Use <> rather than "" #includes.
5182 * pt-cleanup.c: Likewise.
5183 * pthread_create.c: Likewise.
5184 * pthread_join.c: Likewise.
5185 * pthread_timedjoin.c: Likewise.
5186 * pthread_tryjoin.c: Likewise.
5187 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Likewise.
5188 * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
5189 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
5190 * unwind.c: Likewise.
5191
5192 2005-12-19 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5193
5194 * sysdeps/sh/tcb-offsets.sym: Add POINTER_GUARD.
5195 * sysdeps/sh/tls.h (tcbhead_t): Remove private and add pointer_guard.
5196 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
5197 THREAD_COPY_POINTER_GUARD): Define.
5198
5199 2005-12-19 Jakub Jelinek <jakub@redhat.com>
5200
5201 * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): Make room for 2 uintptr_t's
5202 rather than one.
5203 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
5204 THREAD_COPY_POINTER_GUARD): Define.
5205 * sysdeps/powerpc/tcb-offsets.sym (POINTER_GUARD): Add.
5206 * sysdeps/powerpc/tls.h (tcbhead_t): Add pointer_guard field.
5207 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
5208 THREAD_COPY_POINTER_GUARD): Define.
5209 * sysdeps/s390/tcb-offsets.sym (STACK_GUARD): Add.
5210 * sysdeps/s390/tls.h (THREAD_GET_POINTER_GUARD,
5211 THREAD_SET_POINTER_GUARD, THREAD_COPY_POINTER_GUARD): Define.
5212 * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S (__ia64_longjmp):
5213 Use PTR_DEMANGLE for B0 if defined.
5214
5215 2005-12-17 Ulrich Drepper <drepper@redhat.com>
5216
5217 * pthread_create.c (__pthread_create_2_1): Use
5218 THREAD_COPY_POINTER_GUARD if available.
5219 * sysdeps/i386/tcb-offsets.sym: Add POINTER_GUARD.
5220 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
5221 * sysdeps/i386/tls.h (tcbhead_t): Add pointer_guard.
5222 Define THREAD_SET_POINTER_GUARD and THREAD_COPY_POINTER_GUARD.
5223 * sysdeps/x86_64/tls.h: Likewise.
5224
5225 2005-12-15 Roland McGrath <roland@redhat.com>
5226
5227 * sysdeps/unix/sysv/linux/mq_notify.c: Don't use sysdeps/generic.
5228
5229 2005-12-13 Ulrich Drepper <drepper@redhat.com>
5230
5231 * sysdeps/pthread/sigfillset.c: Adjust for files moved out of
5232 sysdeps/generic.
5233 * errno-loc.c: New file.
5234
5235 2005-12-12 Roland McGrath <roland@redhat.com>
5236
5237 * init.c (__pthread_initialize_minimal_internal): Do __static_tls_size
5238 adjustments before choosing stack size. Update minimum stack size
5239 calculation to match allocate_stack change.
5240
5241 2005-12-12 Ulrich Drepper <drepper@redhat.com>
5242
5243 * allocatestack.c (allocate_stack): Don't demand that there is an
5244 additional full page available on the stack beside guard, TLS, the
5245 minimum stack.
5246
5247 2005-11-24 Ulrich Drepper <drepper@redhat.com>
5248
5249 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
5250 (__cleanup_fct_attribute): Use __regparm__ not regparm.
5251
5252 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: When
5253 compiling 32-bit code we must define __cleanup_fct_attribute.
5254
5255 005-11-24 Jakub Jelinek <jakub@redhat.com>
5256
5257 [BZ #1920]
5258 * sysdeps/pthread/pthread.h (__pthread_unwind_next): Use
5259 __attribute__ instead of __attribute.
5260 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
5261 (__cleanup_fct_attribute): Likewise.
5262
5263 2005-11-17 Jakub Jelinek <jakub@redhat.com>
5264
5265 * sysdeps/pthread/unwind-forcedunwind.c (pthread_cancel_init): Put
5266 a write barrier before writing libgcc_s_getcfa.
5267
5268 2005-11-06 Ulrich Drepper <drepper@redhat.com>
5269
5270 * sysdeps/unix/sysv/linux/configure: Removed.
5271
5272 2005-11-05 Ulrich Drepper <drepper@redhat.com>
5273
5274 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Remove trace of
5275 optional init_array/fini_array support.
5276
5277 2005-10-24 Roland McGrath <roland@redhat.com>
5278
5279 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Remove unnecessary
5280 versioned_symbol use.
5281
5282 2005-10-16 Roland McGrath <roland@redhat.com>
5283
5284 * init.c (__pthread_initialize_minimal_internal): Even when using a
5285 compile-time default stack size, apply the minimum that allocate_stack
5286 will require, and round up to page size.
5287
5288 2005-10-10 Daniel Jacobowitz <dan@codesourcery.com>
5289
5290 * Makefile ($(test-modules)): Remove static pattern rule.
5291
5292 2005-10-14 Jakub Jelinek <jakub@redhat.com>
5293 Ulrich Drepper <drepper@redhat.com>
5294
5295 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix stack
5296 alignment in callback function.
5297 * Makefile: Add rules to build and run tst-align3.
5298 * tst-align3.c: New file.
5299
5300 2005-10-03 Jakub Jelinek <jakub@redhat.com>
5301
5302 * allocatestack.c (setxid_signal_thread): Add
5303 INTERNAL_SYSCALL_DECL (err).
5304
5305 2005-10-02 Jakub Jelinek <jakub@redhat.com>
5306
5307 * allocatestack.c (setxid_signal_thread): Need to use
5308 atomic_compare_and_exchange_bool_acq.
5309
5310 2005-10-01 Ulrich Drepper <drepper@redhat.com>
5311 Jakub Jelinek <jakub@redhat.com>
5312
5313 * descr.h: Define SETXID_BIT and SETXID_BITMASK. Adjust
5314 CANCEL_RESTMASK.
5315 (struct pthread): Move specific_used field to avoid padding.
5316 Add setxid_futex field.
5317 * init.c (sighandler_setxid): Reset setxid flag and release the
5318 setxid futex.
5319 * allocatestack.c (setxid_signal_thread): New function. Broken
5320 out of the bodies of the two loops in __nptl_setxid. For undetached
5321 threads check whether they are exiting and if yes, don't send a signal.
5322 (__nptl_setxid): Simplify loops by using setxid_signal_thread.
5323 * pthread_create.c (start_thread): For undetached threads, check
5324 whether setxid bit is set. If yes, wait until signal has been
5325 processed.
5326
5327 * allocatestack.c (STACK_VARIABLES): Initialize them.
5328 * pthread_create.c (__pthread_create_2_1): Initialize pd.
5329
5330 2004-09-02 Jakub Jelinek <jakub@redhat.com>
5331
5332 * pthread_cond_destroy.c (__pthread_cond_destroy): If there are
5333 waiters, awake all waiters on the associated mutex.
5334
5335 2005-09-22 Roland McGrath <roland@redhat.com>
5336
5337 * perf.c [__x86_64__] (HP_TIMING_NOW): New macro (copied from
5338 ../sysdeps/x86_64/hp-timing.h).
5339
5340 2005-08-29 Jakub Jelinek <jakub@redhat.com>
5341
5342 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_WAKE_OP,
5343 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5344 (lll_futex_wake_unlock): Define.
5345 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_WAKE_OP,
5346 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5347 (lll_futex_wake_unlock): Define.
5348 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_WAKE_OP,
5349 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5350 (lll_futex_wake_unlock): Define.
5351 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_WAKE_OP,
5352 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5353 (lll_futex_wake_unlock): Define.
5354 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_WAKE_OP,
5355 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5356 (lll_futex_wake_unlock): Define.
5357 * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal): Use
5358 lll_futex_wake_unlock.
5359 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
5360 (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5361 (__pthread_cond_signal): Use FUTEX_WAKE_OP.
5362 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
5363 (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5364 (__pthread_cond_signal): Use FUTEX_WAKE_OP.
5365
5366 2005-09-05 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5367
5368 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
5369 Fix typo in register name.
5370
5371 2005-08-23 Ulrich Drepper <drepper@redhat.com>
5372
5373 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
5374 Use __sigfillset. Document that sigfillset does the right thing wrt
5375 to SIGSETXID.
5376
5377 2005-07-11 Jakub Jelinek <jakub@redhat.com>
5378
5379 [BZ #1102]
5380 * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER,
5381 PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP,
5382 PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP,
5383 PTHREAD_MUTEX_ADAPTIVE_NP, PTHREAD_RWLOCK_INITIALIZER,
5384 PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP,
5385 PTHREAD_COND_INITIALIZER): Supply zeros for all fields
5386 in the structure.
5387 * Makefile (tests): Add tst-initializers1.
5388 (CFLAGS-tst-initializers1.c): Set.
5389 * tst-initializers1.c: New test.
5390
5391 2005-07-11 Jakub Jelinek <jakub@redhat.com>
5392
5393 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_rwlock_t):
5394 Make sure __flags are located at offset 48 from the start of the
5395 structure.
5396
5397 2005-07-02 Roland McGrath <roland@redhat.com>
5398
5399 * Makeconfig: Comment fix.
5400
5401 2005-07-05 Jakub Jelinek <jakub@redhat.com>
5402
5403 * descr.h (PTHREAD_STRUCT_END_PADDING): Define.
5404 * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): If PTHREAD_STRUCT_END_PADDING
5405 is smaller than 8 bytes, increase TLS_PRE_TCB_SIZE by 16 bytes.
5406 (THREAD_SYSINFO, THREAD_SELF, DB_THREAD_SELF): Don't assume
5407 TLS_PRE_TCB_SIZE is sizeof (struct pthread).
5408 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5409 * sysdeps/ia64/tcb-offsets.sym (PID, TID, MULTIPLE_THREADS_OFFSET):
5410 Use TLS_PRE_TCB_SIZE instead of sizeof (struct pthread).
5411 * sysdeps/unix/sysv/linux/ia64/createthread.c (TLS_VALUE): Don't
5412 assume TLS_PRE_TCB_SIZE is sizeof (struct pthread).
5413
5414 2005-06-25 Jakub Jelinek <jakub@redhat.com>
5415
5416 * sysdeps/i386/tls.h (tcbhead_t): Add stack_guard field.
5417 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5418 * sysdeps/x86_64/tls.h (tcbhead_t): Add sysinfo and stack_guard
5419 fields.
5420 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5421 * sysdeps/s390/tls.h (tcbhead_t): Add stack_guard
5422 field. Put in sysinfo field unconditionally.
5423 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5424 * sysdeps/powerpc/tls.h (tcbhead_t): Add stack_guard field.
5425 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5426 * sysdeps/sparc/tls.h (tcbhead_t): Add sysinfo and stack_guard
5427 fields.
5428 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5429 * pthread_create.c (__pthread_create_2_1): Use
5430 THREAD_COPY_STACK_GUARD macro.
5431 * Makefile: Add rules to build and run tst-stackguard1{,-static}
5432 tests.
5433 * tst-stackguard1.c: New file.
5434 * tst-stackguard1-static.c: New file.
5435
5436 2005-06-14 Alan Modra <amodra@bigpond.net.au>
5437
5438 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
5439 Invoke CGOTSETUP and CGOTRESTORE.
5440 (CGOTSETUP, CGOTRESTORE): Define.
5441
5442 2005-05-29 Richard Henderson <rth@redhat.com>
5443
5444 * tst-cancel4.c (WRITE_BUFFER_SIZE): New.
5445 (tf_write, tf_writev): Use it.
5446 (do_test): Use socketpair instead of pipe. Set SO_SNDBUF to
5447 the system minimum.
5448
5449 2005-05-23 Jakub Jelinek <jakub@redhat.com>
5450
5451 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
5452 [IS_IN_librt] (CENABLE, CDISABLE): Use JUMPTARGET instead of
5453 __librt_*_asynccancel@local.
5454
5455 2005-05-17 Alan Modra <amodra@bigpond.net.au>
5456
5457 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Delete
5458 all occurrences of JUMPTARGET. Instead append @local to labels.
5459
5460 2005-05-20 Jakub Jelinek <jakub@redhat.com>
5461
5462 * sysdeps/i386/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN): Define to
5463 size/alignment of struct pthread rather than tcbhead_t.
5464 * sysdeps/x86_64/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
5465 Likewise.
5466 * sysdeps/s390/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
5467 Likewise.
5468 * sysdeps/sparc/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
5469 Likewise.
5470
5471 2005-05-19 Richard Henderson <rth@redhat.com>
5472
5473 * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use
5474 __sync_val_compare_and_swap, not explicit _si variant.
5475 * sysdeps/ia64/pthread_spin_trylock.c (pthread_spin_trylock): Likewise.
5476
5477 2005-05-03 Ulrich Drepper <drepper@redhat.com>
5478
5479 [BZ #915]
5480 * sysdeps/pthread/pthread.h: Avoid empty initializers.
5481
5482 2005-05-03 Jakub Jelinek <jakub@redhat.com>
5483
5484 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Remove explicit
5485 .eh_frame section, use cfi_* directives.
5486
5487 2005-04-27 Jakub Jelinek <jakub@redhat.com>
5488
5489 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: Use <> instead
5490 of "" includes.
5491
5492 2005-04-27 Ulrich Drepper <drepper@redhat.com>
5493
5494 [BZ #1075]
5495 * tst-cancel17.c (do_test): Add arbitrary factor to make sure
5496 aio_write blocks.
5497
5498 2005-04-27 Roland McGrath <roland@redhat.com>
5499
5500 * Makefile (tests): Remove tst-clock2.
5501
5502 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Handle
5503 CLOCK_PROCESS_CPUTIME_ID and CLOCK_PROCESS_THREAD_ID specially,
5504 translating to the kernel clockid_t for our own process/thread clock.
5505
5506 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: New file.
5507
5508 2005-04-15 Jakub Jelinek <jakub@redhat.com>
5509
5510 * old_pthread_cond_init.c: Include <errno.h>.
5511 (__pthread_cond_init_2_0): Fail with EINVAL if COND_ATTR is
5512 process shared or uses clock other than CLOCK_REALTIME.
5513 * pthread_cond_init.c (__pthread_cond_init): Remove bogus comment.
5514
5515 2005-04-13 David S. Miller <davem@davemloft.net>
5516
5517 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: New file.
5518 * sysdeps/sparc/sparc64/clone.S: New file.
5519
5520 2005-04-05 Jakub Jelinek <jakub@redhat.com>
5521
5522 [BZ #1102]
5523 * sysdeps/pthread/pthread.h (__pthread_cleanup_routine): Use
5524 __inline instead of inline.
5525 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_routine): Likewise.
5526
5527 2005-03-31 Jakub Jelinek <jakub@redhat.com>
5528
5529 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Use
5530 functionally equivalent, but shorter instructions.
5531 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
5532 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
5533 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
5534 Likewise.
5535 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
5536 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
5537 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
5538 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
5539 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5540 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
5541 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
5542 Likewise.
5543 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
5544 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
5545 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
5546 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
5547 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
5548
5549 2005-03-28 Daniel Jacobowitz <dan@codesourcery.com>
5550
5551 * sysdeps/mips/Makefile: New file.
5552 * sysdeps/mips/nptl-sysdep.S: New file.
5553 * sysdeps/mips/tcb-offsets.sym: New file.
5554 * sysdeps/mips/pthread_spin_lock.S: New file.
5555 * sysdeps/mips/pthread_spin_trylock.S: New file.
5556 * sysdeps/mips/pthreaddef.h: New file.
5557 * sysdeps/mips/tls.h: New file.
5558 * sysdeps/mips/jmpbuf-unwind.h: New file.
5559 * sysdeps/unix/sysv/linux/mips/lowlevellock.h: New file.
5560 * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h: New file.
5561 * sysdeps/unix/sysv/linux/mips/bits/semaphore.h: New file.
5562 * sysdeps/unix/sysv/linux/mips/pthread_once.c: New file.
5563 * sysdeps/unix/sysv/linux/mips/fork.c: New file.
5564 * sysdeps/unix/sysv/linux/mips/pt-vfork.S: New file.
5565 * sysdeps/unix/sysv/linux/mips/vfork.S: New file.
5566 * sysdeps/unix/sysv/linux/mips/clone.S: New file.
5567 * sysdeps/unix/sysv/linux/mips/createthread.c: New file.
5568 * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: New file.
5569
5570 2005-03-23 Ulrich Drepper <drepper@redhat.com>
5571
5572 [BZ #1112]
5573 * pthread_create.c (__pthread_create_2_1): Rename syscall error
5574 variable to scerr.
5575
5576 2005-03-10 Jakub Jelinek <jakub@redhat.com>
5577
5578 * tst-getpid1.c (do_test): Align stack passed to clone{2,}.
5579
5580 2005-02-25 Roland McGrath <roland@redhat.com>
5581
5582 * alloca_cutoff.c: Correct license text.
5583 * tst-unload.c: Likewise.
5584 * sysdeps/pthread/allocalim.h: Likewise.
5585 * sysdeps/pthread/pt-initfini.c: Likewise.
5586 * sysdeps/pthread/bits/libc-lock.h: Likewise.
5587 * sysdeps/pthread/bits/sigthread.h: Likewise.
5588 * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
5589 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
5590
5591 2005-02-16 Roland McGrath <roland@redhat.com>
5592
5593 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
5594 Use unsigned int * for ptr_nthreads.
5595
5596 2005-02-14 Alan Modra <amodra@bigpond.net.au>
5597
5598 [BZ #721]
5599 * sysdeps/powerpc/tcb-offsets.sym (thread_offsetof): Redefine to suit
5600 gcc4.
5601
5602 2005-02-07 Richard Henderson <rth@redhat.com>
5603
5604 [BZ #787]
5605 * sysdeps/pthread/pthread.h (__sigsetjmp): Use pointer as first
5606 argument.
5607
5608 2004-11-03 Marcus Brinkmann <marcus@gnu.org>
5609
5610 * sysdeps/generic/lowlevellock.h (__generic_mutex_unlock): Fix
5611 order of arguments in invocation of atomic_add_zero.
5612
5613 2005-01-26 Jakub Jelinek <jakub@redhat.com>
5614
5615 [BZ #737]
5616 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S (__new_sem_trywait):
5617 Use direct %gs segment access or, if NO_TLS_DIRECT_SEG_REFS,
5618 at least gotntpoff relocation and addition.
5619 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
5620 Likewise.
5621 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
5622 Likewise.
5623 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
5624 Likewise.
5625
5626 2005-01-06 Ulrich Drepper <drepper@redhat.com>
5627
5628 * allocatestack.c (init_one_static_tls): Adjust initialization of DTV
5629 entry for static tls deallocation fix.
5630 * sysdeps/alpha/tls.h (dtv_t): Change pointer type to be struct which
5631 also contains information whether the memory pointed to is static
5632 TLS or not.
5633 * sysdeps/i386/tls.h: Likewise.
5634 * sysdeps/ia64/tls.h: Likewise.
5635 * sysdeps/powerpc/tls.h: Likewise.
5636 * sysdeps/s390/tls.h: Likewise.
5637 * sysdeps/sh/tls.h: Likewise.
5638 * sysdeps/sparc/tls.h: Likewise.
5639 * sysdeps/x86_64/tls.h: Likewise.
5640
5641 2004-12-27 Ulrich Drepper <drepper@redhat.com>
5642
5643 * init.c (__pthread_initialize_minimal_internal): Use __sigemptyset.
5644
5645 2004-12-21 Jakub Jelinek <jakub@redhat.com>
5646
5647 * sysdeps/i386/tls.h (CALL_THREAD_FCT): Maintain 16 byte alignment of
5648 %esp.
5649 * Makefile (tests): Add tst-align2.
5650 * tst-align2.c: New test.
5651 * sysdeps/i386/Makefile (CFLAGS-tst-align{,2}.c): Add
5652 -mpreferred-stack-boundary=4.
5653
5654 2004-12-18 Roland McGrath <roland@redhat.com>
5655
5656 * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h:
5657 New file removed withdrawn for the moment.
5658
5659 2004-12-17 Richard Henderson <rth@redhat.com>
5660
5661 * sysdeps/unix/sysv/linux/alpha/clone.S: New file.
5662 * sysdeps/alpha/tcb-offsets.sym (TID_OFFSET): New.
5663
5664 2004-12-16 Ulrich Drepper <drepper@redhat.com>
5665
5666 * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h: New file.
5667 Increased PTHREAD_STACK_MIN.
5668
5669 * tst-context1.c (stacks): Use bigger stack size.
5670
5671 2004-12-16 Jakub Jelinek <jakub@redhat.com>
5672
5673 * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: New file.
5674 * sysdeps/sparc/tcb-offsets.sym: Add TID.
5675
5676 2004-12-15 Jakub Jelinek <jakub@redhat.com>
5677
5678 * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: New file.
5679 * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: New file.
5680 * sysdeps/s390/tcb-offsets.sym (TID): Add.
5681
5682 2004-12-15 Ulrich Drepper <drepper@redhat.com>
5683
5684 * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: New file.
5685
5686 2004-12-14 Ulrich Drepper <drepper@redhat.com>
5687
5688 * sysdeps/powerpc/tcb-offsets.sym: Add TID.
5689 * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: New file.
5690
5691 * tst-getpid1.c: If child crashes, report this first. Print which
5692 signal.
5693
5694 2004-12-09 Ulrich Drepper <drepper@redhat.com>
5695
5696 * init.c (__pthread_initialize_minimal_internal): Also unblock
5697 SIGSETXID.
5698
5699 2004-12-01 Jakub Jelinek <jakub@redhat.com>
5700
5701 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_CPUTIME,
5702 _POSIX_THREAD_CPUTIME): Define to 0.
5703 * sysdeps/pthread/timer_create.c (timer_create): Remove unused code
5704 handling CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID.
5705 * sysdeps/pthread/timer_routines.c (__timer_signal_thread_pclk,
5706 __timer_signal_thread_tclk): Remove.
5707 (init_module): Remove their initialization.
5708 (thread_cleanup): Remove their cleanup assertions.
5709 * sysdeps/pthread/posix-timer.h (__timer_signal_thread_pclk,
5710 __timer_signal_thread_tclk): Remove.
5711 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Removed.
5712 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Removed.
5713 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Removed.
5714
5715 2004-12-07 Jakub Jelinek <jakub@redhat.com>
5716
5717 * sysdeps/ia64/tcb-offsets.sym (TID): Add.
5718 * sysdeps/unix/sysv/linux/ia64/clone2.S: New file.
5719
5720 * Makefile (tests): Add tst-getpid2.
5721 * tst-getpid1.c (TEST_CLONE_FLAGS): Define.
5722 (do_test): Use it. Use __clone2 instead of clone on ia64.
5723 * tst-getpid2.c: New test.
5724
5725 2004-12-07 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5726
5727 * sysdeps/unix/sysv/linux/sh/clone.S: New file.
5728
5729 2004-12-04 Ulrich Drepper <drepper@redhat.com>
5730
5731 * Makefile (tests): Add tst-getpid1.
5732 * tst-getpid1.c: New file.
5733 * sysdeps/unix/sysv/linux/i386/clone.S: New file.
5734 * sysdeps/unix/sysv/linux/x86_64/clone.S: New file.
5735
5736 2004-12-02 Roland McGrath <roland@redhat.com>
5737
5738 * Makefile (libpthread-nonshared): Variable removed.
5739 ($(objpfx)libpthread_nonshared.a): Target removed.
5740 ($(inst_libdir)/libpthread_nonshared.a): Likewise.
5741 These are now handled by generic magic from
5742 libpthread-static-only-routines being set.
5743
5744 2004-11-27 Ulrich Drepper <drepper@redhat.com>
5745
5746 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_PRIORITIZED_IO,
5747 _POSIX2_CHAR_TERM, _POSIX_THREAD_PRIO_INHERIT,
5748 _POSIX_THREAD_PRIO_PROTECT): Define.
5749 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
5750 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
5751 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
5752
5753 2004-11-26 Jakub Jelinek <jakub@redhat.com>
5754
5755 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_ADVISORY_INFO,
5756 _POSIX_SPORADIC_SERVER, _POSIX_THREAD_SPORADIC_SERVER, _POSIX_TRACE,
5757 _POSIX_TRACE_EVENT_FILTER, _POSIX_TRACE_INHERIT, _POSIX_TRACE_LOG,
5758 _POSIX_TYPED_MEMORY_OBJECTS, _POSIX_IPV6, _POSIX_RAW_SOCKETS): Define.
5759 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
5760 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
5761 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
5762
5763 2004-11-24 Ulrich Drepper <drepper@redhat.com>
5764
5765 * sysdeps/x86_64/Makefile [nptl]: Define CFLAGS-pthread_create.c.
5766
5767 * Makefile (libpthread-routines): Add pthread_setschedprio.
5768 * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setschedprio.
5769 * sysdeps/pthread/pthread.h: Declare pthread_setschedprio.
5770 * pthread_setschedprio.c: New file.
5771
5772 2004-11-20 Jakub Jelinek <jakub@redhat.com>
5773
5774 * pthread_create.c (pthread_cancel): Add PTHREAD_STATIC_FN_REQUIRE.
5775 * pthread_cancel.c (pthread_create): Likewise.
5776
5777 * Makefile (libpthread-routines): Add vars.
5778 * sysdeps/pthread/createthread.c (__pthread_multiple_threads): Remove.
5779 * init.c (__default_stacksize, __is_smp): Remove.
5780 * vars.c: New file.
5781 * pthreadP.h (__find_thread_by_id): If !SHARED, add weak_function
5782 and define a wrapper macro.
5783 (PTHREAD_STATIC_FN_REQUIRE): Define.
5784 * allocatestack.c (__find_thread_by_id): Undefine.
5785 * pthread_create (__pthread_keys): Remove.
5786 (pthread_mutex_lock, pthread_mutex_unlock, pthread_once,
5787 pthread_key_create, pthread_setspecific, pthread_getspecific): Add
5788 PTHREAD_STATIC_FN_REQUIRE.
5789
5790 2004-11-18 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5791
5792 * sysdeps/sh/tls.h (DB_THREAD_SELF): Set the correct bias
5793 parameter to REGISTER macro.
5794
5795 2004-11-17 Roland McGrath <roland@redhat.com>
5796
5797 * sysdeps/unix/sysv/linux/timer_routines.c (__start_helper_thread):
5798 Make sure SIGCANCEL is blocked as well.
5799
5800 2004-11-10 Jakub Jelinek <jakub@redhat.com>
5801
5802 * sysdeps/pthread/setxid.h: New file.
5803 * sysdeps/pthread/pthread-functions.h (HAVE_PTR__NPTL_SETXID): Remove.
5804 (struct xid_command): Add forward decl.
5805 (struct pthread_functions): Change return type of __nptl_setxid hook
5806 to int.
5807 * pthreadP.h (__nptl_setxid): Change return type to int.
5808 * allocatestack.c (__nptl_setxid): Call INTERNAL_SYSCALL_NCS in the
5809 calling thread, return its return value and set errno on failure.
5810 * descr.h (struct xid_command): Change id type to long array.
5811
5812 * Makefile: Add rules to build and test tst-setuid1 and
5813 tst-setuid1-static.
5814 * tst-setuid1.c: New test.
5815 * tst-setuid1-static.c: New test.
5816
5817 2004-11-10 Jakub Jelinek <jakub@redhat.com>
5818
5819 * Makefile (tests): Add tst-exit3.
5820 * tst-exit3.c: New test.
5821
5822 2004-11-09 Ulrich Drepper <drepper@redhat.com>
5823
5824 * Makefile (tests): Add tst-exit2.
5825 * tst-exit2.c: New file.
5826
5827 2004-11-09 Roland McGrath <roland@redhat.com>
5828
5829 [BZ #530]
5830 * sysdeps/pthread/createthread.c (do_clone): Increment __nptl_nthreads
5831 here, before calling clone.
5832 * pthread_create.c (start_thread): Don't do it here.
5833
5834 2004-11-02 Jakub Jelinek <jakub@redhat.com>
5835
5836 * sysdeps/unix/sysv/linux/smp.h: Include <errno.h>.
5837
5838 2004-10-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5839
5840 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
5841 Set ETIMEDOUT to errno when time is up. Tweak to avoid
5842 assembler warning.
5843
5844 2004-10-28 Jakub Jelinek <jakub@redhat.com>
5845
5846 * pthread_create.c (__pthread_create_2_1): Avoid leaking stacks
5847 if sched_priority is not between minprio and maxprio.
5848
5849 2004-10-25 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5850
5851 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
5852 (__pthread_cond_timedwait): Use clock_gettime syscall if exists.
5853
5854 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
5855 (__lll_mutex_timedlock_wait): Fix a bad branch condition.
5856
5857 2004-10-24 Ulrich Drepper <drepper@redhat.com>
5858
5859 * sysdeps/unix/sysv/linux/smp.h (is_smp_system): Use
5860 not-cancelable I/O functions.
5861
5862 2004-10-21 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5863
5864 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
5865 (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
5866 make sure 2 is stored in the futex and we looked at the old value.
5867 Fix a few other problems to return the correct value.
5868
5869 2004-10-14 Richard Henderson <rth@redhat.com>
5870
5871 * sysdeps/alpha/tcb-offsets.sym (thread_offsetof): Redefine to
5872 make gcc4 happy.
5873
5874 2004-10-06 Jakub Jelinek <jakub@redhat.com>
5875
5876 * sysdeps/unix/sysv/linux/jmp-unwind.c: Include pthreadP.h instead
5877 of pthread-functions.h and pthreaddef.h.
5878 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Likewise.
5879
5880 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
5881 Change __data.__nwaiters from int to unsigned int.
5882
5883 * tst-clock2.c (do_test): Don't fail if _POSIX_THREAD_CPUTIME == 0 and
5884 sysconf (_SC_THREAD_CPUTIME) returns negative value.
5885
5886 * allocatestack.c (__find_thread_by_id): Move attribute_hidden
5887 before return type.
5888
5889 * sysdeps/s390/jmpbuf-unwind.h: Include bits/wordsize.h.
5890 (JMPBUF_CFA_UNWINDS_ADJ): Subtract 96 resp. 160 bytes from CFA.
5891
5892 2004-10-06 Ulrich Drepper <drepper@redhat.com>
5893
5894 * tst-cancel4.c (tf_msgrcv): Check for failure in msgget. If the
5895 test fails, remove message queue.
5896 (tf_msgsnd): Likewise.
5897
5898 2004-10-05 Jakub Jelinek <jakub@redhat.com>
5899
5900 * tst-clock1.c: Change #ifdef to #if defined.
5901 * tst-clock2.c: Likewise.
5902 * tst-cond11.c: Likewise.
5903
5904 * sysdeps/pthread/timer_create.c (timer_create): Use
5905 defined _POSIX_CPUTIME && _POSIX_CPUTIME >= 0 instead of
5906 defined CLOCK_PROCESS_CPUTIME_ID #ifs and similarly for
5907 THREAD_CPUTIME.
5908
5909 2004-10-05 Jakub Jelinek <jakub@redhat.com>
5910
5911 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h (_POSIX_CPUTIME,
5912 _POSIX_THREAD_CPUTIME): Define to 0.
5913
5914 2004-10-04 Ulrich Drepper <drepper@redhat.com>
5915
5916 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Define _POSIX_CPUTIME
5917 and _POSIX_THREAD_CPUTIME to zero.
5918 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
5919 * tst-barrier2.c: Fix testing for POSIX feature.
5920 * tst-clock1.c: Likewise.
5921 * tst-clock2.c: Likewise.
5922 * tst-cond11.c: Likewise.
5923 * tst-cond4.c: Likewise.
5924 * tst-cond6.c: Likewise.
5925 * tst-flock2.c: Likewise.
5926 * tst-mutex4.c: Likewise.
5927 * tst-mutex9.c: Likewise.
5928 * tst-rwlock12.c: Likewise.
5929 * tst-rwlock4.c: Likewise.
5930 * tst-signal1.c: Likewise.
5931 * tst-spin2.c: Likewise.
5932 * sysdeps/pthread/posix-timer.h: Likewise.
5933 * sysdeps/pthread/timer_create.c: Likewise.
5934 * sysdeps/pthread/timer_routines.c: Likewise.
5935
5936 2004-10-01 Ulrich Drepper <drepper@redhat.com>
5937
5938 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
5939 (__lll_mutex_timedlock_wait): Address futex correctly.
5940
5941 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
5942 (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
5943 make sure 2 is stored in the futex and we looked at the old value.
5944 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
5945 (__lll_mutex_timedlock_wait): Likewise. Fix a few other problems
5946 which might very well made the code not working at all before.
5947 [BZ #417]
5948
5949 2004-09-28 Ulrich Drepper <drepper@redhat.com>
5950
5951 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
5952 allow SIGSETXID to be sent.
5953 * sysdeps/pthread/sigaction.c (__sigaction): Don't allow action
5954 for SIGSETXID to be defined.
5955 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
5956 SIGSETXID cannot be blocked.
5957
5958 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
5959 Add __extension__ to long long types.
5960 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5961 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5962 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5963 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5964 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
5965 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
5966 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5967
5968 2004-09-25 Ulrich Drepper <drepper@redhat.com>
5969
5970 * descr.h (struct pthread): Add stopped_start field.
5971 * sysdeps/pthread/createthread.c (create_thread): Set
5972 start_stopped flag in descriptor for new thread appropriately.
5973 * pthread_create.c (start_thread): Only take lock to be stopped on
5974 startup if stopped_start flag says so.
5975
5976 2004-09-24 Ulrich Drepper <drepper@redhat.com>
5977
5978 * pthread_create.c (__pthread_create_2_1): Remember whether thread
5979 is created detached and if yes, do not try to free the stack in case
5980 the thread creation failed.
5981 * sysdeps/pthread/createthread.c (do_clone): Free stack here if clone
5982 call fails. Don't depend on INTERNAL_SYSCALL_ERRNO return zero in
5983 case there has been no error. [BZ #405]
5984
5985 * pthread_create.c (start_thread): Don't wait for scheduler data
5986 etc to be set at the beginning of the function. The cancellation
5987 infrastructure must have been set up. And enable async
5988 cancellation before potentially going to sleep. [BZ #401]
5989
5990 2004-09-20 Ulrich Drepper <drepper@redhat.com>
5991
5992 * Versions: Remove exports for pthread_set*id_np functions.
5993 * sysdeps/pthread/pthread.h: Remove pthread_set*id_np prototypes
5994 for now.
5995 * Makefile: Don't build pthread_set*id code for now.
5996
5997 2004-09-19 Ulrich Drepper <drepper@redhat.com>
5998
5999 * sysdeps/unix/sysv/linux/allocrtsig.c: Allocate second signal for
6000 internal use.
6001 * allocatestack.c (__nptl_setxid): New function.
6002 * descr.h (struct xid_command): Define type.
6003 * init.c (pthread_functions): Add ptr__nptl_setxid initialization.
6004 (sighandler_setxid): New function.
6005 (__pthread_initialize_minimal): Register sighandler_setxid for
6006 SIGCANCEL.
6007 * pt-allocrtsig.c: Update comment.
6008 * pthreadP.h: Define SIGSETXID. Declare __xidcmd variable.
6009 Declare __nptl_setxid.
6010 * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_setxid.
6011 * sysdeps/pthread/pthread.h: Declare pthread_setgid_np,
6012 pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
6013 pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
6014 and pthread_setresuid_np.
6015 * pthread_setgid_np.c: New file.
6016 * pthread_setuid_np.c: New file.
6017 * pthread_setegid_np.c: New file.
6018 * pthread_seteuid_np.c: New file.
6019 * pthread_setregid_np.c: New file.
6020 * pthread_setreuid_np.c: New file.
6021 * pthread_setresgid_np.c: New file.
6022 * pthread_setresuid_np.c: New file.
6023 * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setgid_np,
6024 pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
6025 pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
6026 and pthread_setresuid_np.
6027 * Makefile (libpthread-routines): Add pthread_setuid, pthread_seteuid,
6028 pthread_setreuid, pthread_setresuid, pthread_setgid, pthread_setegid,
6029 pthread_setregid, and pthread_setresgid.
6030
6031 2004-09-18 Ulrich Drepper <drepper@redhat.com>
6032
6033 * allocatestack.c (allocate_stack): Return EAGAIN instead of
6034 ENOMEM when out of memory.
6035
6036 2004-09-10 Roland McGrath <roland@redhat.com>
6037
6038 [BZ #379]
6039 * allocatestack.c (allocate_stack): Remove [__ASSUME_CLONE_STOPPED]
6040 code, since we don't try to use the broken CLONE_STOPPED any more.
6041 * pthread_create.c (start_thread): Likewise.
6042
6043 2004-09-15 Richard Henderson <rth@redhat.com>
6044
6045 * sysdeps/unix/sysv/linux/alpha/vfork.S: Use libc_hidden_def.
6046
6047 2004-09-01 David Mosberger <davidm@hpl.hp.com>
6048
6049 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h
6050 (__libc_unwind_longjmp): Delete macro and declare as function.
6051 * sysdeps/unix/sysv/linux/ia64/Makefile (sysdep_routines): Mention
6052 __ia64_longjmp, sigstack_longjmp, and __sigstack_longjmp for
6053 nptl directory.
6054 * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S: New file.
6055 * sysdeps/unix/sysv/linux/ia64/__sigstack_longjmp.c: New file.
6056 * sysdeps/unix/sysv/linux/ia64/unwind_longjmp.c: New file.
6057
6058 2004-09-12 Ulrich Drepper <drepper@redhat.com>
6059
6060 * sysdeps/pthread/pthread.h: Make rwlock prototypes available also
6061 for __USE_XOPEN2K.
6062 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define rwlock
6063 types also for __USE_XOPEN2K.
6064 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
6065 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6066 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6067 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6068 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6069 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
6070 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6071 [BZ #320]
6072
6073 2004-09-08 Ulrich Drepper <drepper@redhat.com>
6074
6075 * sysdeps/pthread/pthread.h
6076 (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Make safe for C++.
6077 (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
6078 (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
6079 (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Likewise.
6080 [BZ #375]
6081
6082 2004-09-07 Ulrich Drepper <drepper@redhat.com>
6083
6084 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Allow
6085 PSEUDO to be used with . prefix.
6086
6087 * sysdeps/unix/sysv/linux/alpha/pthread_once.c (__pthread_once):
6088 Use atomic_increment instead of atomic_exchange_and_add.
6089 * sysdeps/unix/sysv/linux/sparc/pthread_once.c (__pthread_once):
6090 Likewise.
6091 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
6092 Likewise.
6093 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
6094 Likewise.
6095
6096 * allocatestack.c (allocate_stack): Use atomic_increment_val
6097 instead of atomic_exchange_and_add.
6098 * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Likewise.
6099 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
6100 Likewise.
6101 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
6102 Likewise.
6103
6104 * sysdeps/pthread/pthread.h (pthread_once): Remove __THROW since
6105 the initialization function might throw.
6106
6107 2005-09-05 Richard Henderson <rth@redhat.com>
6108
6109 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
6110 Move definition inside libpthread, libc, librt check. Provide
6111 definition for rtld.
6112
6113 2004-09-02 Ulrich Drepper <drepper@redhat.com>
6114
6115 * sysdeps/alpha/jmpbuf-unwind.h: Define __libc_unwind_longjmp.
6116 * sysdeps/i386/jmpbuf-unwind.h: Likewise
6117 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
6118 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
6119 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
6120 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
6121 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
6122 * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
6123 * unwind.c: Use it.
6124
6125 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
6126 Rename __data.__clock to __data.__nwaiters, make it unsigned int.
6127 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
6128 Likewise.
6129 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
6130 Decrement __nwaiters. If pthread_cond_destroy has been called and
6131 this is the last waiter, signal pthread_cond_destroy caller and
6132 avoid using the pthread_cond_t structure after unlock.
6133 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6134 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6135 Read clock type from the least significant bits of __nwaiters instead
6136 of __clock.
6137 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6138 * sysdeps/unix/sysv/linux/internaltypes.h: Define COND_CLOCK_BITS.
6139
6140 2004-08-31 Jakub Jelinek <jakub@redhat.com>
6141
6142 [BZ #342]
6143 * Makefile (tests): Add tst-cond20 and tst-cond21.
6144 * tst-cond20.c: New test.
6145 * tst-cond21.c: New test.
6146 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
6147 (pthread_cond_t): Rename __data.__clock to __data.__nwaiters, make
6148 it unsigned int.
6149 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
6150 Likewise.
6151 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
6152 (pthread_cond_t): Likewise.
6153 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
6154 Likewise.
6155 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
6156 Likewise.
6157 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
6158 Likewise.
6159 * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_clock): Remove.
6160 (cond_nwaiters): New.
6161 (clock_bits): New.
6162 * pthread_cond_destroy.c (__pthread_cond_destroy): Return EBUSY
6163 if there are waiters not signalled yet.
6164 Wait until all already signalled waiters wake up.
6165 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Decrement
6166 __nwaiters. If pthread_cond_destroy has been called and this is the
6167 last waiter, signal pthread_cond_destroy caller and avoid using
6168 the pthread_cond_t structure after unlock.
6169 (__pthread_cond_wait): Increment __nwaiters in the beginning,
6170 decrement it when leaving. If pthread_cond_destroy has been called
6171 and this is the last waiter, signal pthread_cond_destroy caller.
6172 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
6173 Likewise. Read clock type from the least significant bits of
6174 __nwaiters instead of __clock.
6175 * pthread_condattr_setclock.c (pthread_condattr_setclock): Check
6176 whether clock ID can be encoded in COND_CLOCK_BITS bits.
6177 * pthread_condattr_getclock.c (pthread_condattr_getclock): Decode
6178 clock type just from the last COND_CLOCK_BITS bits of value.
6179 * pthread_cond_init.c (__pthread_cond_init): Initialize __nwaiters
6180 instead of __clock, just from second bit of condattr's value.
6181
6182 2004-08-30 Jakub Jelinek <jakub@redhat.com>
6183
6184 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Include
6185 bits/wordsize.h. Make the header match i386 header when __WORDSIZE
6186 != 64.
6187 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
6188
6189 2004-08-15 Roland McGrath <roland@frob.com>
6190
6191 * pthread_atfork.c: Update copyright terms including special exception
6192 for these trivial files, which are statically linked into executables
6193 that use dynamic linking for the significant library code.
6194
6195 2004-08-09 Jakub Jelinek <jakub@redhat.com>
6196
6197 * DESIGN-rwlock.txt: Add decreasing of nr_readers_queued to
6198 pthread_rwlock_rdlock.
6199 * sysdeps/pthread/pthread_rwlock_rdlock (__pthread_rwlock_rdlock):
6200 Decrease __nr_readers_queued after reacquiring lock.
6201 * sysdeps/pthread/pthread_rwlock_timedrdlock
6202 (pthread_rwlock_timedrdlock): Likewise.
6203 Reported by Bob Cook <bobcook47@hotmail.com>.
6204
6205 2004-08-11 Jakub Jelinek <jakub@redhat.com>
6206
6207 * tst-rwlock14.c (tf): Read main thread handle from *ARG
6208 before pthread_barrier_wait.
6209
6210 2004-08-07 Ulrich Drepper <drepper@redhat.com>
6211
6212 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
6213 Remove unnecessary exception handling data.
6214
6215 2004-07-23 Jakub Jelinek <jakub@redhat.com>
6216
6217 [BZ #284]
6218 * sysdeps/pthread/pthread.h (pthread_getcpuclockid): Use __clockid_t
6219 instead of clockid_t.
6220
6221 2004-07-21 Roland McGrath <roland@redhat.com>
6222
6223 * Makefile ($(objpfx)multidir.mk): Use $(make-target-directory).
6224
6225 2004-07-19 Roland McGrath <roland@redhat.com>
6226
6227 * tst-cancel4.c (tf_waitid): Use WEXITED flag bit if available.
6228
6229 2004-07-02 Roland McGrath <roland@redhat.com>
6230
6231 * configure: Don't exit.
6232
6233 2004-07-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6234
6235 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
6236 (__pthread_cond_timedwait): Check for invalid nanosecond in
6237 timeout value.
6238
6239 2004-07-07 Ulrich Drepper <drepper@redhat.com>
6240
6241 * Makefile: Add rules to build and run tst-fini1.
6242 * tst-fini1.c: New file.
6243 * tst-fini1mod.c: New file.
6244
6245 2004-07-05 Ulrich Drepper <drepper@redhat.com>
6246
6247 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define NO_CANCELLATION
6248 if no cancellation support is needed.
6249 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
6250 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
6251 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
6252 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
6253 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
6254 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
6255 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
6256 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
6257 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
6258
6259 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define __NR_futex
6260 only if not already defined.
6261
6262 2004-07-05 Jakub Jelinek <jakub@redhat.com>
6263
6264 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_unlock): Use
6265 constraint "m" instead of "0" for futex.
6266
6267 * shlib-versions: Add powerpc64-.*-linux.*.
6268
6269 2004-07-04 Jakub Jelinek <jakub@redhat.com>
6270
6271 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
6272 (pthread_rwlock_timedrdlock): Use cmpq instead of cmpl to check
6273 for valid tv_nsec.
6274 * tst-rwlock14.c (do_test): Test for invalid tv_nsec equal to
6275 1 billion and 64-bit tv_nsec which is valid when truncated to 32
6276 bits.
6277
6278 2004-06-29 Roland McGrath <roland@redhat.com>
6279
6280 * Banner: NPTL no longer has its own version number.
6281 * Makefile (nptl-version): Variable removed.
6282 * sysdeps/pthread/Makefile (CFLAGS-confstr.c): Set LIBPTHREAD_VERSION
6283 using $(version), the glibc version number.
6284
6285 2004-06-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6286
6287 * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
6288 Fix branch offset for a PLT entry.
6289 * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
6290 Likewise.
6291 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
6292 Likewise.
6293 * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
6294 Likewise.
6295 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait):
6296 Likewise.
6297
6298 2004-06-28 Jakub Jelinek <jakub@redhat.com>
6299
6300 * sysdeps/alpha/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define
6301 unconditionally.
6302
6303 2004-06-28 Jakub Jelinek <jakub@redhat.com>
6304
6305 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
6306 (pthread_rwlock_timedwrlock): Return EINVAL if tv_nsec is negative,
6307 instead of tv_sec.
6308 * sysdeps/pthread/pthread_rwlock_timedrdlock.c
6309 (pthread_rwlock_timedrdlock): Likewise.
6310
6311 2004-06-22 Jakub Jelinek <jakub@redhat.com>
6312
6313 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
6314 Set __r7 to val, not mutex.
6315
6316 2004-06-27 Ulrich Drepper <drepper@redhat.com>
6317
6318 * Makefile: Add rules to build tst-rwlock14.
6319 * tst-rwlock14.c: New file.
6320
6321 2004-06-24 Boris Hu <boris.hu@intel.com>
6322
6323 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Add timeout validation
6324 check.
6325 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
6326
6327 2004-06-19 Andreas Jaeger <aj@suse.de>
6328
6329 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix
6330 assembler in last patch.
6331
6332 2004-06-17 Ulrich Drepper <drepper@redhat.com>
6333
6334 * sysdeps/pthread/pthread_cond_timedwait.c
6335 (__pthread_cond_timedwait): Also check for negativ nanoseconds.
6336 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6337 (__pthread_cond_timedwait): Check for invalid nanosecond in
6338 timeout value.
6339 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6340 * tst-cond19.c: New file.
6341 * Makefile: Add rules to build and run tst-cond19.
6342
6343 2004-06-15 Steven Munroe <sjmunroe@us.ibm.com>
6344
6345 * tst-context1.c (GUARD_PATTERN): Defined.
6346 (tst_context_t): Define struct containing ucontext_t & guard words.
6347 (ctx): Declare as an array of tst_context_t.
6348 (fct): Verify uc_link & guard words are still valid.
6349 (tf): Initialize guard words in ctx. Adjust ctx refs for new struct.
6350
6351 2004-06-13 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6352
6353 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
6354 Add __data.__futex field, reshuffle __data.__clock.
6355 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
6356 (__pthread_cond_signal): Increment __futex at the same time as
6357 __wakeup_seq or __total_seq. Pass address of __futex instead of
6358 address of low 32-bits of __wakeup_seq to futex syscall.
6359 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
6360 (__pthread_cond_wait): Likewise. Pass __futex value from before
6361 releasing internal lock to FUTEX_WAIT.
6362 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
6363 (__pthread_cond_timedwait): Likewise.
6364 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
6365 (FUTEX_CMP_REQUEUE): Define.
6366 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
6367 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
6368 Pass __futex value from before the unlock and __futex address instead
6369 of address of low 32-bits of __wakeup_seq to futex syscall.
6370 Fallback to FUTEX_WAKE all on any errors.
6371
6372 2004-06-08 Jakub Jelinek <jakub@redhat.com>
6373
6374 * pthread_mutexattr_getpshared.c (pthread_mutex_getpshared): Fix
6375 comment typo.
6376 * pthread_mutexattr_gettype.c (pthread_mutexattr_gettype): Likewise.
6377 * pthread_mutexattr_init.c (__pthread_mutexattr_init): Likewise.
6378 * pthread_mutexattr_settype.c (__pthread_mutexattr_settype): Likewise.
6379 * pthread_mutexattr_setpshared.c (pthread_mutexattr_setpshared):
6380 Likewise. Reported by Bob Cook <bobcook47@hotmail.com>.
6381
6382 2004-06-11 Martin Schwidefsky <schwidefsky@de.ibm.com>
6383
6384 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_compare_and_swap):
6385 Add memory clobber to inline assembly.
6386 (__lll_mutex_trylock): Likewise.
6387 (__lll_mutex_cond_trylock): Likewise.
6388
6389 2004-06-07 Martin Schwidefsky <schwidefsky@de.ibm.com>
6390
6391 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
6392 Pass val argument as 6th system call argument in %r7.
6393
6394 2004-05-21 Jakub Jelinek <jakub@redhat.com>
6395
6396 * Makefile (tests): Add tst-cond16.
6397 * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_futex): Add.
6398 * pthread_cond_init.c (__pthread_cond_init): Clear __data.__futex.
6399 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
6400 Add __data.__futex field, reshuffle __data.__clock.
6401 * sysdeps/unix/sysv/linux/i386/pthread_cond_signal.S
6402 (__pthread_cond_signal): Increment __futex at the same time as
6403 __wakeup_seq or __total_seq. Pass address of __futex instead of
6404 address of low 32-bits of __wakeup_seq to futex syscall.
6405 * sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S
6406 (__pthread_cond_wait): Likewise. Pass __futex value from before
6407 releasing internal lock to FUTEX_WAIT.
6408 * sysdeps/unix/sysv/linux/i386/pthread_cond_timedwait.S
6409 (__pthread_cond_timedwait): Likewise.
6410 * sysdeps/unix/sysv/linux/i386/pthread_cond_broadcast.S
6411 (FUTEX_CMP_REQUEUE): Define.
6412 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
6413 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
6414 Pass __futex value from before the unlock and __futex address instead
6415 of address of low 32-bits of __wakeup_seq to futex syscall.
6416 Fallback to FUTEX_WAKE all on any errors.
6417 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_CMP_REQUEUE):
6418 Define.
6419 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
6420 internally. Return non-zero if error, zero if success.
6421 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
6422 Add __data.__futex field, reshuffle __data.__clock.
6423 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_CMP_REQUEUE):
6424 Define.
6425 (lll_futex_requeue): Add val argument, return 1 unconditionally
6426 for the time being.
6427 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
6428 Add __data.__futex field, reshuffle __data.__clock.
6429 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_CMP_REQUEUE):
6430 Define.
6431 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
6432 internally. Return non-zero if error, zero if success.
6433 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
6434 (pthread_cond_t): Add __data.__futex field, reshuffle __data.__clock.
6435 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_CMP_REQUEUE):
6436 Define.
6437 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
6438 internally. Return non-zero if error, zero if success.
6439 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
6440 Add __data.__futex field, reshuffle __data.__clock.
6441 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_CMP_REQUEUE):
6442 Define.
6443 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
6444 internally. Return non-zero if error, zero if success.
6445 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
6446 Add __data.__futex field, reshuffle __data.__clock.
6447 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
6448 Add __data.__futex field, reshuffle __data.__clock.
6449 * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal):
6450 Increment __futex at the same time as __wakeup_seq or __total_seq.
6451 Pass address of __futex instead of address of low 32-bits of
6452 __wakeup_seq to futex syscall.
6453 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
6454 Pass __futex value from before releasing internal lock
6455 to FUTEX_WAIT.
6456 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
6457 Likewise. Avoid unnecessary shadowing of variables.
6458 * sysdeps/pthread/pthread_cond_broadcast.c (__pthread_cond_broadcast):
6459 Set __futex to 2 * __total_seq. Pass __futex value from before the
6460 unlock and __futex address instead of address of low 32-bits of
6461 __wakeup_seq to futex_requeue macro, adjust for new return value
6462 meaning.
6463 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
6464 (__pthread_cond_signal): Increment __futex at the same time as
6465 __wakeup_seq or __total_seq. Pass address of __futex instead of
6466 address of low 32-bits of __wakeup_seq to futex syscall.
6467 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
6468 (__pthread_cond_wait): Likewise. Pass __futex value from before
6469 releasing internal lock to FUTEX_WAIT.
6470 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
6471 (__pthread_cond_timedwait): Likewise.
6472 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
6473 (FUTEX_CMP_REQUEUE): Define.
6474 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
6475 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
6476 Pass __futex value from before the unlock and __futex address instead
6477 of address of low 32-bits of __wakeup_seq to futex syscall.
6478 Fallback to FUTEX_WAKE all on any errors.
6479
6480 2004-06-03 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6481
6482 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_mutex_lock):
6483 Add nop to align the end of critical section.
6484 (lll_mutex_cond_lock, lll_mutex_timedlock): Likewise.
6485
6486 2004-06-01 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6487
6488 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
6489 Add __broadcast_seq field.
6490 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Mark
6491 all waiters as woken with woken_seq and bump broadcast counter.
6492 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use new
6493 __broadcast_seq. Increment __woken_seq correctly when cleanuped.
6494 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
6495 Comment typo fixes. Avoid returning -ETIMEDOUT.
6496
6497 2004-06-01 Ulrich Drepper <drepper@redhat.com>
6498
6499 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6500 (__condvar_tw_cleanup): Fix access to saved broadcast_seq value.
6501 Reported by Kaz Kojima.
6502
6503 2004-05-25 Jakub Jelinek <jakub@redhat.com>
6504
6505 * sysdeps/unix/sysv/linux/aio_misc.h: New file.
6506
6507 2004-05-21 Jakub Jelinek <jakub@redhat.com>
6508
6509 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Compare
6510 __broadcast_seq with bc_seq after acquiring internal lock instead of
6511 before it.
6512
6513 2004-05-18 Jakub Jelinek <jakub@redhat.com>
6514
6515 * Makefile (.NOTPARALLEL): Only serialize make check/xcheck, not
6516 compilation.
6517 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6518 (__pthread_cond_timedwait): Avoid returning -ETIMEDOUT.
6519 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
6520 (pthread_cond_t): Add __data.__broadcast_seq field.
6521 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
6522 (FRAME_SIZE): Define.
6523 (__pthread_cond_timedwait): Use it. Store/check broadcast_seq.
6524 Comment typo fixes.
6525 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S (FRAME_SIZE):
6526 Define.
6527 (__pthread_cond_wait): Use it. Store/check broadcast_seq. Comment
6528 typo fixes.
6529 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
6530 (__pthread_cond_broadcast): Increment broadcast_seq. Comment typo
6531 fixes.
6532
6533 2004-05-18 Ulrich Drepper <drepper@redhat.com>
6534
6535 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add broadcast_seq entry.
6536 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
6537 Add __broadcast_seq field.
6538 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6539 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6540 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
6541 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
6542 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6543 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Mark
6544 all waiters as woken with woken_seq and bump broadcast counter.
6545 * sysdeps/pthread/pthread_cond_broadcast.c: Likewise.
6546 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use new
6547 __broadcast_seq field.
6548 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6549 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
6550 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
6551 * pthread_cond_init.c: Initialize __broadcast_seq field.
6552 * Makefile (tests): Add tst-cond17 and tst-cond18.
6553 Add .NOTPARALLEL goal.
6554 * tst-cond16.c: New file. From Jakub.
6555 * tst-cond17.c: New file. From Jakub.
6556 * tst-cond18.c: New file. From Jakub.
6557
6558 2004-05-16 Ulrich Drepper <drepper@redhat.com>
6559
6560 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Correct some
6561 unwind info.
6562
6563 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
6564 Parametrize frame size. Correct some unwind info.
6565 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6566
6567 2004-05-04 Jakub Jelinek <jakub@redhat.com>
6568
6569 * tst-stack3.c: Note testing functionality beyond POSIX.
6570
6571 2004-05-04 Jakub Jelinek <jakub@redhat.com>
6572
6573 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (USE___THREAD):
6574 Change conditional from ifdef to if.
6575
6576 2004-04-23 Jakub Jelinek <jakub@redhat.com>
6577
6578 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SYSDEP_CANCEL_ERRNO,
6579 SYSDEP_CANCEL_ERROR): Define.
6580 (PSEUDO): Use it.
6581
6582 2004-05-01 Jakub Jelinek <jakub@redhat.com>
6583
6584 * Versions (libpthread): Remove __pthread_cleanup_upto@@GLIBC_PRIVATE.
6585
6586 2004-04-20 Jakub Jelinek <jakub@redhat.com>
6587
6588 * sem_unlink.c (sem_unlink): Change EPERM into EACCES.
6589
6590 2004-04-19 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6591
6592 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Add frame info.
6593 Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
6594 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Remove unneeded frame
6595 info. Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
6596
6597 2004-04-19 Ulrich Drepper <drepper@redhat.com>
6598
6599 * sysdeps/unix/sysv/linux/timer_routines.c: Make sure helper
6600 thread has all signals blocked.
6601
6602 2004-04-18 Andreas Jaeger <aj@suse.de>
6603
6604 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h
6605 (SEM_VALUE_MAX): Add missing brace.
6606
6607 2004-04-17 Jakub Jelinek <jakub@redhat.com>
6608
6609 * sysdeps/pthread/Makefile (tests): Add tst-mqueue8x
6610 in rt subdir.
6611 (CFLAGS-tst-mqueue8x.c): Add -fexceptions.
6612 * sysdeps/pthread/tst-mqueue8x.c: New test.
6613 * tst-cancel4.c: Update comment about message queues.
6614
6615 * sysdeps/pthread/timer_gettime.c (timer_gettime): For expired timer
6616 return it_value { 0, 0 }.
6617 * sysdeps/pthread/timer_create.c (timer_create): Handle SIGEV_NONE
6618 like SIGEV_SIGNAL.
6619 * sysdeps/pthread/timer_routines.c (thread_expire_timer): Remove
6620 assertion for SIGEV_NONE.
6621 (thread_attr_compare): Compare all attributes, not just a partial
6622 subset.
6623
6624 2004-04-17 Jakub Jelinek <jakub@redhat.com>
6625
6626 * sysdeps/unix/sysv/linux/mq_notify.c: Include stdlib.h.
6627
6628 2004-04-17 Ulrich Drepper <drepper@redhat.com>
6629
6630 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h (SEM_VALUE_MAX):
6631 Just use a plain number.
6632 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
6633 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
6634 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
6635 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
6636 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
6637 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
6638 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
6639
6640 2004-04-16 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6641
6642 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Remove unneeded
6643 frame info.
6644 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
6645
6646 2004-04-15 Jakub Jelinek <jakub@redhat.com>
6647
6648 * sysdeps/unix/sysv/linux/timer_routines.c: Include errno.h.
6649 (timer_helper_thread): Use inline rt_sigtimedwait syscall instead
6650 of calling sigwaitinfo.
6651
6652 2004-04-16 Ulrich Drepper <drepper@redhat.com>
6653
6654 * allocatestack.c (allocate_stack): Set reported_guardsize
6655 unconditionally.
6656 * pthread_getattr_np.c (pthread_getattr_np): Use
6657 reported_guardsize instead of guardsize.
6658 * descr.h (struct pthread): Add reported_guardsize field.
6659
6660 2004-04-13 Jakub Jelinek <jakub@redhat.com>
6661
6662 * sysdeps/unix/sysv/linux/mq_notify.c: Shut up GCC warning.
6663
6664 2004-04-12 Ulrich Drepper <drepper@redhat.com>
6665
6666 * sysdeps/unix/sysv/linux/mq-notify.c: New file.
6667
6668 2004-04-08 Jakub Jelinek <jakub@redhat.com>
6669
6670 * sysdeps/unix/sysv/linux/bits/local_lim.h (MQ_PRIO_MAX): Define.
6671 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h (MQ_PRIO_MAX): Define.
6672 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h (MQ_PRIO_MAX): Define.
6673 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h (MQ_PRIO_MAX): Define.
6674 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
6675 Define.
6676 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
6677 (_POSIX_MESSAGE_PASSING): Define.
6678 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h
6679 (_POSIX_MESSAGE_PASSING): Define.
6680 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h
6681 (_POSIX_MESSAGE_PASSING): Define.
6682
6683 2004-04-04 Ulrich Drepper <drepper@redhat.com>
6684
6685 * tst-context1.c (fct): Check whether correct stack is used.
6686
6687 2004-04-03 Ulrich Drepper <drepper@redhat.com>
6688
6689 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Never use
6690 matching constraints for asm mem parameters.
6691
6692 * tst-clock2.c (tf): Don't define unless needed.
6693
6694 2004-03-30 H.J. Lu <hongjiu.lu@intel.com>
6695
6696 * Makefile (link-libc-static): Use $(static-gnulib) instead of
6697 $(gnulib).
6698
6699 2004-03-30 Ulrich Drepper <drepper@redhat.com>
6700
6701 * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_deallocate_tsd.
6702 * init.c (pthread_functions): Add ptr__nptl_deallocate_tsd.
6703 * pthreadP.h: Declare __nptl_deallocate_tsd.
6704 * pthread_create.c (deallocate_tsd): Remove to __nptl_deallocate_tsd.
6705 Adjust caller.
6706
6707 * Makefile (tests): Add tst-tsd5.
6708 * tst-tsd5.c: New file.
6709
6710 2004-03-29 Ulrich Drepper <drepper@redhat.com>
6711
6712 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
6713 (__pthread_attr_setaffinity_old): Prepend GLIBC_ to version names
6714 is SHLIB_COMPAT check.
6715 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
6716 (__pthread_attr_getaffinity_old): Likewise.
6717 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
6718 (__pthread_getaffinity_old): Likewise.
6719 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
6720 (__pthread_setaffinity_old): Likewise.
6721
6722 2004-03-26 Ulrich Drepper <drepper@redhat.com>
6723
6724 * allocatestack.c (_make_stacks_executable): Call
6725 _dl_make_stack_executable first.
6726
6727 2004-03-24 Roland McGrath <roland@redhat.com>
6728
6729 * sysdeps/i386/pthread_spin_lock.c (pthread_spin_lock): Use "m"
6730 constraint instead of "0".
6731
6732 2004-03-24 Ulrich Drepper <drepper@redhat.com>
6733
6734 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
6735 (lll_mutex_cond_trylock): Define as wrapper around __lll_cond_trylock.
6736
6737 * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Reorganize
6738 code to avoid warning.
6739
6740 2004-03-24 Andreas Jaeger <aj@suse.de>
6741
6742 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
6743 (__pthread_attr_setaffinity_old): Remove const.
6744
6745 2004-03-23 Ulrich Drepper <drepper@redhat.com>
6746
6747 * sysdeps/unix/sysv/linux/smp.h: New file.
6748 * sysdeps/unix/sysv/linux/sh/smp.h: New file.
6749 * init.c: Define __is_smp.
6750 (__pthread_initialize_minimal_internal): Call is_smp_system to
6751 initialize __is_smp.
6752 * pthreadP.h: Declare __is_smp.
6753 Define MAX_ADAPTIVE_COUNT is necessary.
6754 * pthread_mutex_init.c: Add comment regarding __spins field.
6755 * pthread_mutex_lock.c: Implement adaptive mutex type.
6756 * pthread_mutex_timedlock.c: Likewise.
6757 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
6758 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
6759 Add __spins field.
6760 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
6761 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6762 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6763 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6764 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6765 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
6766 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6767 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define
6768 lll_mutex_cond_trylock.
6769 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6770 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6771 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6772 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
6773 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
6774 Define BUSY_WAIT_NOP.
6775 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6776 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6777
6778 * tst-mutex5.c: Add support for testing adaptive mutexes.
6779 * tst-mutex7.c: Likewise.
6780 * tst-mutex5a.c: New file.
6781 * tst-mutex7a.c: New file.
6782 * Makefile (tests): Add tst-mutex5a and tst-mutex7a.
6783
6784 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
6785 (__lll_mutex_timedlock_wait): Preserve r8 and r9 since the
6786 vgettimeofday call might destroy the content.
6787
6788 * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use hint
6789 @pause in the loop.
6790
6791 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
6792 No need to restrict type of ret. Make it int. Add comment.
6793
6794 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
6795 Remove unnecessary setne instruction.
6796
6797 2004-03-22 Jakub Jelinek <jakub@redhat.com>
6798
6799 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
6800 (__pthread_getaffinity_new): Use INT_MAX instead of UINT_MAX.
6801 * pthread_getattr_np.c (pthread_getattr_np): Double size every cycle.
6802 If realloc fails, break out of the loop.
6803
6804 2004-03-20 Andreas Jaeger <aj@suse.de>
6805
6806 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
6807 (__pthread_setaffinity_old): Fix interface.
6808 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
6809 (__pthread_getaffinity_old): Likewise.
6810
6811 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
6812 (__pthread_setaffinity_new): Remove duplicate declaration.
6813
6814 2004-03-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6815
6816 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Save
6817 the return value to a safe register.
6818 (CDISABLE): Set the function argument correctly.
6819
6820 2004-03-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6821
6822 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XCHG): Define.
6823 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
6824 Rewrite so that only one locked memory operation per round is needed.
6825 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
6826 (pthread_barrier_wait): After wakeup, release lock only when the
6827 last thread stopped using the barrier object.
6828 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
6829 (__pthread_cond_wait): Don't store mutex address if the current
6830 value is ~0l. Add correct cleanup support and unwind info.
6831 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
6832 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
6833 (__pthread_cond_broadcast): Don't use requeue for pshared condvars.
6834 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Update comment.
6835 * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
6836 Add correct cleanup support and unwind info.
6837 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
6838 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Add unwind
6839 information for syscall wrappers.
6840
6841 2004-03-18 Ulrich Drepper <drepper@redhat.com>
6842
6843 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
6844 cpusetsize field, remove next.
6845 * sysdeps/pthread/pthread.h (pthread_getaffinity_np): Add new second
6846 parameter for size of the CPU set.
6847 (pthread_setaffinity_np): Likewise.
6848 (pthread_attr_getaffinity_np): Likewise.
6849 (pthread_attr_setaffinity_np): Likewise.
6850 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: Implement
6851 interface change, keep compatibility code.
6852 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
6853 * sysdeps/unix/sysv/linux/pthread_getaffinity.c: Likewise.
6854 * sysdeps/unix/sysv/linux/pthread_setaffinity.c: Likewise.
6855 * pthreadP.h: Remove hidden_proto for pthread_getaffinity_np. Declare
6856 __pthread_getaffinity_np.
6857 * Versions: Add version for changed interfaces.
6858 * tst-attr3.c: Adjust test for interface change.
6859 * pthread_getattr_np.c: Query the kernel about the affinity mask with
6860 increasing buffer sizes.
6861 * pthread_attr_destroy.c: Remove unused list handling.
6862 * pthread_attr_init.c: Likewise.
6863
6864 2004-03-17 Roland McGrath <roland@redhat.com>
6865
6866 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Pass missing
6867 first argument to clock_getres so we ever enable kernel timers.
6868
6869 2004-03-15 Ulrich Weigand <uweigand@de.ibm.com>
6870
6871 * init.c (nptl_version): Add __attribute_used__ to nptl_version.
6872
6873 2004-03-12 Richard Henderson <rth@redhat.com>
6874
6875 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Propagate
6876 oldvalue from CENABLE to CDISABLE.
6877
6878 2004-03-12 Ulrich Drepper <drepper@redhat.com>
6879
6880 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define HOST_NAME_MAX.
6881 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
6882 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
6883 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
6884
6885 2004-03-11 Richard Henderson <rth@redhat.com>
6886
6887 * sysdeps/alpha/tcb-offsets.sym (PID_OFFSET): New.
6888 * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: Save/restore PID.
6889 * sysdeps/unix/sysv/linux/alpha/vfork.S: New file.
6890
6891 2004-03-11 Jakub Jelinek <jakub@redhat.com>
6892
6893 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Use jgnl
6894 instead of jnl instruction to jump to SYSCALL_ERROR_LABEL.
6895 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S (__vfork): Likewise.
6896
6897 2004-03-11 Jakub Jelinek <jakub@redhat.com>
6898
6899 * forward.c (__pthread_cond_broadcast_2_0,
6900 __pthread_cond_destroy_2_0, __pthread_cond_init_2_0,
6901 __pthread_cond_signal_2_0, __pthread_cond_wait_2_0,
6902 __pthread_cond_timedwait_2_0): Use return 0 as defaction instead of 0.
6903
6904 2004-03-11 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6905
6906 * sysdeps/sh/tcb-offsets.sym: Add PID.
6907 * sysdeps/unix/sysv/linux/sh/pt-vfork.S: Properly handle PID cache.
6908 * sysdeps/unix/sysv/linux/sh/vfork.S: New file.
6909
6910 2004-03-10 Ulrich Drepper <drepper@redhat.com>
6911
6912 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: No need to
6913 include <sysdep-cancel.h>, vfork is no cancellation point.
6914 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: Likewise.
6915 * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: Likewise.
6916 * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: Likewise.
6917
6918 2004-03-10 Jakub Jelinek <jakub@redhat.com>
6919
6920 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Add
6921 libc_hidden_def.
6922 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
6923 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
6924 Likewise.
6925 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S (__vfork):
6926 Likewise.
6927 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
6928 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
6929 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Include tcb-offsets.h.
6930 * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Use DO_CALL instead
6931 of DO_CALL_VIA_BREAK. Work around a gas problem.
6932
6933 * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: Remove.
6934 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: New file.
6935 * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: New file.
6936 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: New file.
6937 * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: New file.
6938 * sysdeps/powerpc/tcb-offsets.sym: Add PID.
6939
6940 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S (__vfork): Don't use
6941 a local register for saving old PID. Negate PID in parent upon exit.
6942
6943 * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: Include
6944 tcb-offsets.h.
6945 (__vfork): Negate PID if non-zero and set to INT_MIN if zero
6946 before syscall, set to the old value in the parent afterwards.
6947 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: New file.
6948 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: Include
6949 tcb-offsets.h.
6950 (__vfork): Negate PID if non-zero and set to INT_MIN if zero
6951 before syscall, set to the old value in the parent afterwards.
6952 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: New file.
6953 * sysdeps/s390/tcb-offsets.sym: Add PID.
6954
6955 * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: Remove.
6956 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: New file.
6957 * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S: New file.
6958 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: New file.
6959 * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: New file.
6960 * sysdeps/sparc/tcb-offsets.sym: Add PID.
6961
6962 2004-03-10 Andreas Schwab <schwab@suse.de>
6963
6964 * sysdeps/ia64/tcb-offsets.sym: Add PID.
6965 * sysdeps/unix/sysv/linux/ia64/vfork.S: New file.
6966 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Properly handle PID cache.
6967
6968 2004-03-09 Jakub Jelinek <jakub@redhat.com>
6969
6970 * tst-cancel20.c (do_one_test): Clear in_sh_body first.
6971 * tst-cancel21.c (do_one_test): Likewise.
6972 Reported by Gordon Jin <gordon.jin@intel.com>.
6973
6974 2004-02-09 Jakub Jelinek <jakub@redhat.com>
6975
6976 * sysdeps/unix/sysv/linux/i386/vfork.S (SAVE_PID): Negate PID
6977 if non-zero and set to INT_MIN if zero.
6978 * sysdeps/unix/sysv/linux/x86_64/vfork.S (SAVE_PID): Likewise.
6979 * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Include tcb-offsets.h.
6980 (SAVE_PID, RESTORE_PID): Define.
6981 (__vfork): Use it.
6982 * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: Include tcb-offsets.h.
6983 Use relative path to avoid including NPTL i386/vfork.S.
6984 (SAVE_PID, RESTORE_PID): Define.
6985 * sysdeps/unix/sysv/linux/raise.c: Include limits.h.
6986 (raise): Handle THREAD_SELF->pid INT_MIN the same as 0.
6987 * Makefile (tests): Add tst-vfork1, tst-vfork2, tst-vfork1x and
6988 tst-vfork2x.
6989 (tests-reverse): Add tst-vfork1x and tst-vfork2x.
6990 * tst-vfork1.c: New test.
6991 * tst-vfork2.c: New test.
6992 * tst-vfork1x.c: New test.
6993 * tst-vfork2x.c: New test.
6994
6995 2004-03-08 Ulrich Drepper <drepper@redhat.com>
6996
6997 * sysdeps/i386/tcb-offsets.sym: Add PID.
6998 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
6999 * sysdeps/unix/sysv/linux/i386/vfork.S: New file.
7000 * sysdeps/unix/sysv/linux/x86_64/vfork.S: New file.
7001
7002 2004-03-08 Steven Munroe <sjmunroe@us.ibm.com>
7003
7004 * sysdeps/unix/sysv/linux/powerpc/Versions: Remove leading tabs.
7005
7006 2004-03-08 H.J. Lu <hongjiu.lu@intel.com>
7007
7008 * sysdeps/s390/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
7009 _rtld_global_ro.
7010
7011 2004-03-07 Ulrich Drepper <drepper@redhat.com>
7012
7013 * sysdeps/ia64/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
7014 _rtld_global_ro.
7015
7016 * tst-once4.c: Remove unnecessary macro definition.
7017
7018 * tst-mutex7.c (do_test): Limit thread stack size.
7019 * tst-once2.c (do_test): Likewise.
7020 * tst-tls3.c (do_test): Likewise.
7021 * tst-tls1.c (do_test): Likewise.
7022 * tst-signal3.c (do_test): Likewise.
7023 * tst-kill6.c (do_test): Likewise.
7024 * tst-key4.c (do_test): Likewise.
7025 * tst-join4.c (do_test): Likewise.
7026 * tst-fork1.c (do_test): Likewise.
7027 * tst-context1.c (do_test): Likewise.
7028 * tst-cond2.c (do_test): Likewise.
7029 * tst-cond10.c (do_test): Likewise.
7030 * tst-clock2.c (do_test): Likewise.
7031 * tst-cancel10.c (do_test): Likewise.
7032 * tst-basic2.c (do_test): Likewise.
7033 * tst-barrier4.c (do_test): Likewise.
7034
7035 2004-03-05 Ulrich Drepper <drepper@redhat.com>
7036
7037 * sysdeps/i386/tls.h: Use GLRO instead of GL where appropriate.
7038
7039 2004-03-01 Ulrich Drepper <drepper@redhat.com>
7040
7041 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7042 (__pthread_cond_timedwait): Optimize wakeup test.
7043 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
7044 (__pthread_cond_wait): Likewise.
7045 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
7046 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
7047 Likewise.
7048
7049 2004-02-29 Ulrich Drepper <drepper@redhat.com>
7050
7051 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
7052 (__lll_mutex_lock_wait): Optimize a bit more. Just one copy of
7053 the atomic instruction needed.
7054 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
7055 (__lll_mutex_lock_wait): Likewise.
7056
7057 2004-02-28 Ulrich Drepper <drepper@redhat.com>
7058
7059 * Makefile (tests): Add tst-cond14 and tst-cond15.
7060 * tst-cond14.c: New file.
7061 * tst-cond15.c: New file.
7062
7063 2004-02-27 Ulrich Drepper <drepper@redhat.com>
7064
7065 * sysdeps/pthread/createthread.c (create_thread): Remove use of
7066 CLONE_STOPPED. We cannot use SIGCONT which means CLONE_STOPPED
7067 needs to be implemented differently to be useful.
7068
7069 2004-02-26 Ulrich Drepper <drepper@redhat.com>
7070
7071 * pthread_attr_setschedparam.c: Don't test priority against limits
7072 here. Set ATTR_FLAG_SCHED_SET flag.
7073 * pthread_attr_setschedpolicy.c: Set ATTR_FLAG_POLICY_SET flag.
7074 * pthread_create.c (__pthread_create_2_1): Copy scheduling attributes
7075 from parent thread to child. If attribute is used and scheduling
7076 parameters are not inherited, copy parameters from attribute or
7077 compute them. Check priority value.
7078 * pthread_getschedparam.c: If the parameters aren't known yet get
7079 them from the kernel.
7080 * pthread_setschedparam.c: Set ATTR_FLAG_SCHED_SET and
7081 ATTR_FLAG_POLICY_SET flag for thread.
7082 * sysdeps/unix/sysv/linux/internaltypes.h: Define ATTR_FLAG_SCHED_SET
7083 and ATTR_FLAG_POLICY_SET.
7084
7085 * sysdeps/pthread/createthread.c: Use tgkill if possible.
7086
7087 * pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr): Don't
7088 fail if stack address hasn't been set. Just return 0.
7089
7090 2004-02-25 Ulrich Drepper <drepper@redhat.com>
7091
7092 * Makefile (tests-nolibpthread): Add tst-unload. Don't link with
7093 libpthread for the files in this list.
7094 (CFLAGS-tst-unload): Removed.
7095 * tst-unload.c (do_test): Don't use complete path for
7096 LIBPHREAD_SO.
7097
7098 * Makefile: Define sonames for tst-tls5mod, tst-_res1mod1, and
7099 tst-_res1mod2.
7100
7101 2004-02-22 Ulrich Drepper <drepper@redhat.com>
7102
7103 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
7104 (__lll_mutex_lock_wait): Rewrite so that only one locked memory
7105 operation per round is needed.
7106 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
7107 (__lll_mutex_lock_wait): Likewise.
7108
7109 2004-02-20 Ulrich Drepper <drepper@redhat.com>
7110
7111 * tst-cancel9.c (cleanup): Don't print to stderr.
7112
7113 2004-02-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
7114
7115 * sysdeps/sh/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Fix variable name.
7116
7117 2004-02-20 Jakub Jelinek <jakub@redhat.com>
7118
7119 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
7120 (__syscall_error_handler2): Call CDISABLE.
7121 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
7122 (__syscall_error_handler2): Call CDISABLE.
7123
7124 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
7125 Release lock before the loop, don't reacquire it.
7126
7127 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h (DL_ARGV_NOT_RELRO): Define.
7128
7129 2004-02-19 Andreas Schwab <schwab@suse.de>
7130
7131 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
7132 Fix last change.
7133
7134 2004-02-18 Ulrich Drepper <drepper@redhat.com>
7135
7136 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
7137 (pthread_barrier_wait): After wakeup, release lock only when the
7138 last thread stopped using the barrier object.
7139 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S
7140 (pthread_barrier_wait): Likewise.
7141 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
7142 Likewise.
7143 * Makefile (tests): Add tst-barrier4.
7144 * tst-barrier4.c: New file.
7145
7146 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7147 (__pthread_cond_timedwait): Perform timeout test while holding
7148 internal lock to prevent wakeup race.
7149 Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
7150 * sysdeps/pthread/pthread_cond_timedwait.c
7151 (__pthread_cond_timedwait): Likewise.
7152 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
7153 (__pthread_cond_timedwait): Likewise.
7154
7155 2004-02-18 Jakub Jelinek <jakub@redhat.com>
7156
7157 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S
7158 (__pthread_rwlock_unlock): Access WRITER as 32-bit value.
7159 * Makefile (tests): Add tst-rwlock13.
7160 * tst-rwlock13.c: New test.
7161
7162 2004-02-16 Ulrich Drepper <drepper@redhat.com>
7163
7164 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7165 (__condvar_tw_cleanup): Little optimization.
7166 Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
7167
7168 2004-02-16 Steven Munroe <sjmunroe@us.ibm.com>
7169
7170 * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: Replace libc with
7171 libpthread as "lib" parameter to SHLIB_COMPAT.
7172 (__novmx_siglongjmp): Fix typo in function name.
7173 (__novmx_longjmp): Fix typo in function name.
7174
7175 2004-02-13 Ulrich Drepper <drepper@redhat.com>
7176
7177 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Add a
7178 __builtin_expect.
7179
7180 * sysdeps/generic/pt-longjmp.c: Moved to...
7181 * sysdeps/pthread/pt-longjmp.c: ...here. New file.
7182
7183 2004-01-29 Steven Munroe <sjmunroe@us.ibm.com>
7184
7185 * Makefile (libpthread-routines): Add pt-cleanup.
7186 * pt-longjmp.c: Removed.
7187 * pt-cleanup.c: Copied __pthread_cleanup_upto to here. New file.
7188 * sysdeps/generic/pt-longjmp.c: Copied longjmp to here. New file.
7189 * sysdeps/unix/sysv/linux/powerpc/Versions: New file.
7190 Version longjmp, siglongjmp for GLIBC_2.3.4.
7191 * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: New File.
7192
7193 2004-02-13 Ulrich Drepper <drepper@redhat.com>
7194
7195 * sysdeps/pthread/pthread_cond_timedwait.c
7196 (__pthread_cond_timedwait): Optimize. Drop internal lock earlier.
7197 Reuse code. Add __builtin_expects.
7198
7199 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7200 (__pthread_cond_timedwait): Get internal lock in case timeout has
7201 passed before the futex syscall.
7202 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7203
7204 2004-01-20 Ulrich Drepper <drepper@redhat.com>
7205
7206 * allocatestack.c: Pretty printing.
7207
7208 * sysdeps/pthread/createthread.c (create_thread): Don't add
7209 CLONE_DETACHED bit if it is not necessary.
7210
7211 2004-01-16 Ulrich Drepper <drepper@redhat.com>
7212
7213 * pthread_getattr_np.c: Include ldsodefs.h.
7214
7215 2004-01-16 Richard Henderson <rth@redhat.com>
7216
7217 * allocatestack.c: Don't declare __libc_stack_end.
7218 * init.c (__pthread_initialize_minimal_internal): Likewise.
7219 * pthread_getattr_np.c (pthread_getattr_np): Likewise.
7220
7221 2004-01-15 Richard Henderson <rth@redhat.com>
7222
7223 * sysdeps/alpha/tls.h (tcbhead_t): Add private.
7224 (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE,
7225 TLS_PRE_TCB_SIZE, TLS_TCB_ALIGN, INSTALL_DTV, INSTALL_NEW_DTV,
7226 GET_DTV, THREAD_DTV, THREAD_SELF, DB_THREAD_SELF): Match ia64.
7227 (TLS_TCB_OFFSET, THREAD_ID, NO_TLS_OFFSET): Remove.
7228 (THREAD_GETMEM, THREAD_GETMEM_NC): Simplify.
7229 (THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
7230 * sysdeps/unix/sysv/linux/alpha/createthread.c (TLS_VALUE): Match ia64.
7231
7232 2004-01-14 Ulrich Drepper <drepper@redhat.com>
7233
7234 * init.c (pthread_functions): Make array const.
7235
7236 2004-01-13 Ulrich Drepper <drepper@redhat.com>
7237
7238 * allocatestack.c (__make_stacks_executable): Change interface.
7239 Check parameters. Pass parameter on to libc counterpart.
7240 * pthreadP.h: Change declaration.
7241
7242 2004-01-13 Richard Henderson <rth@redhat.com>
7243
7244 * pthread_attr_setstack.c (__old_pthread_attr_setstack): Use
7245 prototype form.
7246 * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize):
7247 Likewise.
7248
7249 * sysdeps/alpha/Makefile: New file.
7250 * sysdeps/alpha/tcb-offsets.sym: New file.
7251 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
7252 Use MULTIPLE_THREADS_OFFSET to implement !libpthread !libc version.
7253
7254 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Rewrite based
7255 on powerpc version.
7256
7257 2004-01-08 Jakub Jelinek <jakub@redhat.com>
7258
7259 * Makefile (tests): Add tst-backtrace1.
7260 * tst-backtrace1.c: New test.
7261
7262 2003-12-11 Ulrich Weigand <uweigand@de.ibm.com>
7263
7264 * sysdeps/alpha/tls.h (DB_THREAD_SELF): Pass bit size of thread
7265 register as second parameter to the REGISTER macro.
7266 * sysdeps/ia64/tls.h (DB_THREAD_SELF): Likewise.
7267 * sysdeps/powerpc/tls.h (DB_THREAD_SELF): Likewise.
7268 * sysdeps/sh/tls.h (DB_THREAD_SELF): Likewise.
7269 * sysdeps/sparc/tls.h (DB_THREAD_SELF): Likewise.
7270 * sysdeps/s390/tls.h (DB_THREAD_SELF): Pass __WORDSIZE as bit size
7271 of thread register as second parameter to REGISTER macro in 64 case.
7272
7273 2004-01-03 Ulrich Drepper <drepper@redhat.com>
7274
7275 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Removed.
7276 (CFLAGS-getpid.o): Defined.
7277 (CFLAGS-getpid.os): Defined.
7278
7279 2003-12-31 Ulrich Drepper <drepper@redhat.com>
7280
7281 * pthread_getattr_np.c (pthread_getattr_np): Make sure stack info
7282 returned for main thread does not overlap with any other VMA.
7283 Patch by Jakub Jelinek.
7284
7285 2003-12-29 Jakub Jelinek <jakub@redhat.com>
7286
7287 * tst-raise1.c: Include stdio.h.
7288
7289 2003-12-23 Jakub Jelinek <jakub@redhat.com>
7290
7291 * sysdeps/unix/sysv/linux/raise.c (raise): Protect pid = selftid
7292 setting with __ASSUME_TGKILL || defined __NR_tgkill.
7293 If pid is 0, set it to selftid.
7294 * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Make inline.
7295 Don't set self->pid but self->tid. If self->pid == 0 and self->tid
7296 != 0, return self->tid without doing a syscall.
7297 * descr.h (struct pthread): Move pid field after tid.
7298
7299 * Makefile (tests): Add tst-raise1.
7300 * tst-raise1.c: New file.
7301
7302 2003-12-23 Roland McGrath <roland@redhat.com>
7303
7304 * tst-oddstacklimit.c: New file.
7305 * Makefile (tests): Add it.
7306 (tst-oddstacklimit-ENV): New variable.
7307
7308 * init.c (__pthread_initialize_minimal_internal): Round stack rlimit
7309 value up to page size for __default_stacksize.
7310
7311 2003-12-21 Ulrich Drepper <drepper@redhat.com>
7312
7313 * Makefile (tests): Add tst-eintr5.
7314 * tst-eintr5.c: New file.
7315
7316 * eintr.c (eintr_source): Prevent sending signal to self.
7317
7318 * tst-eintr2.c (tf1): Improve error message.
7319
7320 2003-12-20 Ulrich Drepper <drepper@redhat.com>
7321
7322 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Define.
7323 * sysdeps/unix/sysv/linux/getpid.c: New file.
7324 * pthread_cancel.c: Add comment explaining use of PID field.
7325 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
7326 * pthread_getattr_np.c: Use abs() when comparing PID and TID fields.
7327 * sysdeps/unix/sysv/linux/fork.c: Negate PID field of parent
7328 temporarily to signal the field must not be relied on and updated
7329 by getpid().
7330 * sysdeps/unix/sysv/linux/pt-raise.c: Handle case where PID is
7331 temporarily negative.
7332 * sysdeps/unix/sysv/linux/raise.c: Likewise.
7333
7334 2003-12-19 Ulrich Drepper <drepper@redhat.com>
7335
7336 * eintr.c (setup_eintr): Add new parameter. Pass to thread function.
7337 (eintr_source): If ARG != NULL, use pthread_kill.
7338 * tst-eintr1.c: Adjust for this change.
7339 * tst-eintr2.c: Likewise.
7340 * Makefile (tests): Add tst-eintr3 and tst-eintr4.
7341 * tst-eintr3.c: New file.
7342 * tst-eintr4.c: New file.
7343
7344 2003-12-19 Jakub Jelinek <jakub@redhat.com>
7345
7346 * libc-cancellation.c (__libc_enable_asynccancel): Don't cancel
7347 if CANCELSTATE_BITMASK is set.
7348 * sysdeps/pthread/librt-cancellation.c (__librt_enable_asynccancel):
7349 Likewise.
7350
7351 * Makefile (tests): Add tst-cancel22 and tst-cancel23.
7352 (tests-reverse): Add tst-cancel23.
7353 * tst-cancel22.c: New test.
7354 * tst-cancel23.c: New test.
7355
7356 2003-12-18 Ulrich Drepper <drepper@redhat.com>
7357
7358 * tst-eintr1.c: Better error messages.
7359
7360 * Makefile (tests): Add tst-eintr2.
7361 * tst-eintr2.c: New file.
7362
7363 2003-12-18 Jakub Jelinek <jakub@redhat.com>
7364
7365 * Makefile (tests): Add tst-cancel21 and tst-cancelx21.
7366 (CFLAGS-tst-cancelx21.c): Set.
7367 * tst-cancel21.c: New test.
7368 * tst-cancelx21.c: New test.
7369
7370 * unwind.c (FRAME_LEFT): Add adj argument. Subtract it from each
7371 comparison operand.
7372 (unwind_stop): Use _JMPBUF_CFA_UNWINDS_ADJ macro instead of
7373 _JMPBUF_CFA_UNWINDS. Adjust FRAME_LEFT invocations.
7374 * pt-longjmp.c: Include jmpbuf-unwind.h.
7375 (__pthread_cleanup_upto): Use _JMPBUF_UNWINDS_ADJ macro instead of
7376 _JMPBUF_UNWINDS. Adjust compared pointers.
7377 * init.c (__pthread_initialize_minimal_internal): Initialize
7378 pd->stackblock_size.
7379 * sysdeps/pthread/jmpbuf-unwind.h: Removed.
7380 * sysdeps/alpha/jmpbuf-unwind.h: New file.
7381 * sysdeps/i386/jmpbuf-unwind.h: New file.
7382 * sysdeps/powerpc/jmpbuf-unwind.h: New file.
7383 * sysdeps/s390/jmpbuf-unwind.h: New file.
7384 * sysdeps/sh/jmpbuf-unwind.h: New file.
7385 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: New file.
7386 * sysdeps/x86_64/jmpbuf-unwind.h: New file.
7387 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Include stdint.h.
7388 (_JMPBUF_CFA_UNWINDS): Remove.
7389 (_JMPBUF_CFA_UNWINDS_ADJ, _JMPBUF_UNWINDS_ADJ): Define.
7390
7391 2003-12-12 Jakub Jelinek <jakub@redhat.com>
7392
7393 * Makefile (tests): Add tst-cancel20 and tst-cancelx20.
7394 (CFLAGS-tst-cancelx20.c): Set.
7395 * tst-cancel20.c: New test.
7396 * tst-cancelx20.c: New test.
7397
7398 2003-12-17 Ulrich Drepper <drepper@redhat.com>
7399
7400 * init.c (__pthread_initialize_minimal_internal): Don't treat
7401 architectures with separate register stack special here when
7402 computing default stack size.
7403
7404 2003-12-17 Roland McGrath <roland@redhat.com>
7405
7406 * Makefile (tst-cancelx7-ARGS): New variable.
7407 Reportd by Greg Schafer <gschafer@zip.com.au>.
7408
7409 2003-12-17 Jakub Jelinek <jakub@redhat.com>
7410
7411 * Makefile (tests): Add tst-stack3. Depend on $(objpfx)tst-stack3-mem.
7412 (generated): Add tst-stack3.mtrace and tst-stack3-mem.
7413 (tst-stack3-ENV): Set.
7414 ($(objpfx)tst-stack3-mem): New.
7415 * tst-stack3.c: New test.
7416
7417 2003-12-10 David Mosberger <davidm@hpl.hp.com>
7418
7419 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init_EPILOG_BEGINS):
7420 Add unwind directives. Drop unused .regstk directive.
7421 (_fini_EPILOG_BEGINS): Add unwind directives.
7422
7423 2003-12-11 Ulrich Drepper <drepper@redhat.com>
7424
7425 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
7426 Assume parameter is a pointer.
7427 (lll_futex_wake): Likewise.
7428 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_wait):
7429 Likewise.
7430 (lll_futex_wake): Likewise.
7431 Reported by Boris Hu.
7432 * sysdeps/unix/sysv/linux/unregister-atfork.c
7433 (__unregister_atfork): Pass pointer to refcntr to lll_futex_wait.
7434
7435 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Simplify a bit.
7436
7437 2003-12-10 Ulrich Drepper <drepper@redhat.com>
7438
7439 * sysdeps/pthread/bits/libc-lock.h (__rtld_lock_initialize): Define.
7440 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Call
7441 __rtld_lock_initialize for ld.so lock.
7442 Patch in part by Adam Li <adam.li@intel.com>.
7443
7444 2003-12-02 David Mosberger <davidm@hpl.hp.com>
7445
7446 * Makefile (link-libc-static): Remove -lgcc_eh---it's already mentioned
7447 in $(gnulib). Also, remove stale comment.
7448
7449 2003-11-12 David Mosberger <davidm@hpl.hp.com>
7450
7451 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Take
7452 advantage of new syscall stub and optimize accordingly.
7453
7454 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__NR_futex): Rename
7455 from SYS_futex, to match expectations of
7456 sysdep.h:DO_INLINE_SYSCALL.
7457 (lll_futex_clobbers): Remove.
7458 (lll_futex_timed_wait): Rewrite in terms of DO_INLINE_SYSCALL.
7459 (lll_futex_wake): Likewise.
7460 (lll_futex_requeue): Likewise.
7461 (__lll_mutex_trylock): Rewrite to a macro, so we can include this
7462 file before DO_INLINE_SYSCALL is defined (proposed by Jakub
7463 Jelinek).
7464 (__lll_mutex_lock): Likewise.
7465 (__lll_mutex_cond_lock): Likewise.
7466 (__lll_mutex_timed_lock): Likewise.
7467 (__lll_mutex_unlock): Likewise.
7468 (__lll_mutex_unlock_force): Likewise.
7469
7470 * sysdeps/ia64/tls.h: Move declaration of __thread_self up so it
7471 comes before the include of <sysdep.h>.
7472 (THREAD_SELF_SYSINFO): New macro.
7473 (THREAD_SYSINFO): Likewise.
7474 (INIT_SYSINFO): New macro.
7475 (TLS_INIT_TP): Call INIT_SYSINFO.
7476
7477 * sysdeps/ia64/tcb-offsets.sym: Add SYSINFO_OFFSET.
7478
7479 * sysdeps/pthread/createthread.c (create_thread): Use
7480 THREAD_SELF_SYSINFO and THREAD_SYSINFO instead of open code.
7481 * allocatestack.c (allocate_stack): Use THREAD_SYSINFO and
7482 THREAD_SELF_SYSINFO instead of open code.
7483 * sysdeps/i386/tls.h (THREAD_SELF_SYSINFO): New macro.
7484 (THREAD_SYSINFO): Likewise.
7485
7486 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: New file.
7487
7488 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Work around gas problem.
7489
7490 2003-12-06 Ulrich Drepper <drepper@redhat.com>
7491
7492 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Use .init_array
7493 instead of .init. Patch by David Mosberger.
7494
7495 2003-11-30 Thorsten Kukuk <kukuk@suse.de>
7496
7497 * sysdeps/pthread/configure.in: Remove broken declaration in C
7498 cleanup handling check.
7499
7500 2003-11-30 Andreas Jaeger <aj@suse.de>
7501
7502 * Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time).
7503 * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
7504 Likewise.
7505
7506 2003-11-27 Jakub Jelinek <jakub@redhat.com>
7507
7508 * sysdeps/unix/sysv/linux/internaltypes.h (ATTR_FLAG_OLDATTR): Define.
7509 * pthread_attr_destroy.c: Include shlib-compat.h.
7510 (__pthread_attr_destroy): Return immediately if ATTR_FLAG_OLDATTR
7511 is set in iattr->flags.
7512 * pthread_attr_init.c (__pthread_attr_init_2_0): Set ATTR_FLAG_OLDATTR.
7513
7514 2003-11-21 Jakub Jelinek <jakub@redhat.com>
7515
7516 * Makefile (distribute): Add tst-cleanup4aux.c.
7517
7518 * tst-cond12.c (prepare): Add prototype. Move after test-skeleton.c
7519 include.
7520
7521 2003-11-21 Ulrich Drepper <drepper@redhat.com>
7522
7523 * tst-cond12.c (do_test): If USE_COND_SIGNAL is defined, use
7524 pthread_cond_signal.
7525
7526 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Don't
7527 store mutex address if the current value is ~0l.
7528 * sysdeps/pthread/pthread_cond_timedwait.c
7529 (__pthread_cond_timedwait): Likewise.
7530 * sysdeps/pthread/pthread_cond_broadcast.c
7531 (__pthread_cond_broadcast): Don't use requeue for pshared
7532 condvars.
7533
7534 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
7535 (__pthread_cond_wait): Don't store mutex address if the current
7536 value is ~0l.
7537 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
7538 (__pthread_cond_timedwait): Likewise.
7539 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
7540 (__pthread_cond_broadcast): Don't use requeue for pshared
7541 condvars.
7542
7543 * pthread_cond_init.c (__pthread_cond_init): Initialize __mutex
7544 element with ~0l for pshared condvars, with NULL otherwise.
7545
7546 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
7547 (__pthread_cond_wait): Don't store mutex address if the current
7548 value is ~0l.
7549 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7550 (__pthread_cond_timedwait): Likewise.
7551 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
7552 (__pthread_cond_broadcast): Don't use requeue for pshared
7553 condvars.
7554
7555 * Makefile: Add rules to build and run tst-cond12 and tst-cond13.
7556 * tst-cond12.c: New file.
7557 * tst-cond13.c: New file.
7558
7559 2003-11-17 Ulrich Drepper <drepper@redhat.com>
7560
7561 * sysdeps/pthread/configure.in: Make missing forced unwind support
7562 fatal.
7563
7564 2003-11-11 Ulrich Drepper <drepper@redhat.com>
7565
7566 * pthreadP.h: Don't declare __pthread_unwind as weak inside libpthread.
7567
7568 2003-11-06 Ulrich Drepper <drepper@redhat.com>
7569
7570 * Makefile: Add magic to clean up correctly.
7571
7572 2003-11-05 Jakub Jelinek <jakub@redhat.com>
7573
7574 * unwind.c (FRAME_LEFT): Define.
7575 (unwind_stop): Handle old style cleanups here.
7576 (__pthread_unwind): Handle old style cleanups only if
7577 !HAVE_FORCED_UNWIND.
7578 * Makefile (tests): Add tst-cleanup4 and tst-cleanupx4.
7579 (CFLAGS-tst-cleanupx4.c): Add -fexceptions.
7580 ($(objpfx)tst-cleanup4): Depend on $(objpfx)tst-cleanup4aux.o.
7581 ($(objpfx)tst-cleanupx4): Likewise.
7582 * tst-cleanup4.c: New test.
7583 * tst-cleanup4aux.c: New.
7584 * tst-cleanupx4.c: New test.
7585
7586 2003-11-04 Ulrich Drepper <drepper@redhat.com>
7587
7588 * sysdeps/pthread/bits/stdio-lock.h: Use lll_*lock instead of
7589 lll_mutex_*lock macros to skip atomic operations on some archs.
7590
7591 2003-11-03 Ulrich Drepper <drepper@redhat.com>
7592
7593 * sysdeps/pthread/tst-timer.c (main): Initialize
7594 sigev2.sigev_value as well.
7595
7596 2003-10-15 Roland McGrath <roland@redhat.com>
7597
7598 * sysdeps/pthread/configure.in: Barf if visibility attribute support
7599 is missing.
7600 * sysdeps/pthread/configure: Regenerated.
7601
7602 2003-10-09 Kaz Kojima <kkojima@rr.iij4u.or.jp>
7603
7604 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Completely revamp the
7605 locking macros. No distinction between normal and mutex locking
7606 anymore.
7607 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Rewrite mutex locking.
7608 Merge bits from lowlevelmutex.S we still need.
7609 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Remove.
7610 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
7611 * sysdeps/unix/sysv/linux/sh/not-cancel.h: New file.
7612 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Adjust for
7613 new mutex implementation.
7614 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Likewise.
7615 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
7616 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7617 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
7618 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
7619 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
7620 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
7621 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
7622 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7623 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO): Also defined
7624 symbol for entry point to avoid cancellation.
7625
7626 2003-10-07 Jakub Jelinek <jakub@redhat.com>
7627
7628 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Backout 2003-10-02
7629 changes.
7630 (SAVE_OLDTYPE_0): Fix a typo.
7631
7632 2003-10-03 Ulrich Drepper <drepper@redhat.com>
7633
7634 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
7635 Check __sigsetjmp return value. Reported by Daniel Jacobowitz.
7636
7637 2003-10-02 Ulrich Drepper <drepper@redhat.com>
7638
7639 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (DOCARGS_1): Use
7640 correct offset.
7641
7642 2003-10-02 Jakub Jelinek <jakub@redhat.com>
7643
7644 * Makefile (tests): Add tst-cancel19.
7645 * tst-cancel19.c: New test.
7646
7647 2003-10-02 Ulrich Drepper <drepper@redhat.com>
7648
7649 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix saving and
7650 restoring of the old cancellation type.
7651
7652 2003-09-30 Jakub Jelinek <jakub@redhat.com>
7653
7654 * sysdeps/pthread/malloc-machine.h: Remove misleading comment.
7655
7656 2003-09-27 Wolfram Gloger <wg@malloc.de>
7657
7658 * sysdeps/pthread/malloc-machine.h: New file
7659
7660 2003-09-24 Roland McGrath <roland@redhat.com>
7661
7662 * allocatestack.c (__make_stacks_executable): Don't ignore return
7663 value from _dl_make_stack_executable.
7664
7665 2003-09-24 Ulrich Drepper <drepper@redhat.com>
7666
7667 * allocatestack.c (__make_stacks_executable): Also change
7668 permission of the currently unused stacks.
7669
7670 * allocatestack.c (change_stack_perm): Split out from
7671 __make_stacks_executable.
7672 (allocate_stack): If the required permission changed between the time
7673 we started preparing the stack and queueing it, change the permission.
7674 (__make_stacks_executable): Call change_stack_perm.
7675
7676 * Makefile: Build tst-execstack-mod locally.
7677 * tst-execstack-mod.c: New file.
7678
7679 2003-09-23 Jakub Jelinek <jakub@redhat.com>
7680
7681 * Makefile (tests): Only add tst-execstack if have-z-execstack is yes.
7682
7683 2003-09-23 Roland McGrath <roland@redhat.com>
7684
7685 * tst-execstack.c: New file.
7686 * Makefile (tests): Add it.
7687 ($(objpfx)tst-execstack, $(objpfx)tst-execstack.out): New targets.
7688 (LDFLAGS-tst-execstack): New variable.
7689
7690 * allocatestack.c (allocate_stack): Use GL(dl_stack_flags) to decide
7691 whether to use PROT_EXEC for stack mmap.
7692 (__make_stacks_executable): New function.
7693 * pthreadP.h: Declare it.
7694 * init.c (__pthread_initialize_minimal_internal): Set
7695 GL(dl_make_stack_executable_hook) to that.
7696
7697 2003-09-22 Ulrich Drepper <drepper@redhat.com>
7698
7699 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Adjust for latest
7700 recommendation from AMD re avoidance of lock prefix.
7701
7702 2003-09-22 Jakub Jelinek <jakub@redhat.com>
7703
7704 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait): Use
7705 lll_futex_timed_wait instead of lll_futex_wait.
7706 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Removed.
7707 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Removed.
7708 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: Removed.
7709 * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: Removed.
7710 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Removed.
7711 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Removed.
7712 * sysdeps/unix/sysv/linux/s390/sem_post.c: Removed.
7713 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Removed.
7714 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Include atomic.h.
7715 Completely revamp the locking macros. No distinction between
7716 normal and mutex locking anymore.
7717 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
7718 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock_wait,
7719 __lll_lock_timedwait): Fix prototypes.
7720 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_lock_wait,
7721 __lll_lock_timedwait): Likewise.
7722 (lll_mutex_lock, lll_mutex_cond_lock): Use _val instead of _bool
7723 macros, add __builtin_expect.
7724 (lll_mutex_timedlock): Likewise. Fix return value.
7725 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Removed.
7726 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: Removed.
7727 * sysdeps/unix/sysv/linux/i386/i586/lowlevelmutex.S: Removed.
7728 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: Removed.
7729 * sysdeps/unix/sysv/linux/i386/i686/lowlevelmutex.S: Removed.
7730 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: Removed.
7731 * sysdeps/unix/sysv/linux/lowlevelmutex.c: Removed.
7732 * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: Removed.
7733
7734 2003-09-22 Ulrich Drepper <drepper@redhat.com>
7735
7736 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
7737 (__lll_mutex_lock_wait): Minor optimization to avoid one atomic
7738 operation if possible.
7739
7740 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Don't play tricks
7741 like jumping over the lock prefix.
7742
7743 2003-09-21 Ulrich Drepper <drepper@redhat.com>
7744
7745 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Completely revamp the
7746 locking macros. No distinction between normal and mutex locking
7747 anymore.
7748 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
7749 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
7750 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
7751 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Rewrite mutex
7752 locking. Merge bits from lowlevelmutex.S we still need.
7753 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
7754 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
7755 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Removed.
7756 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Removed.
7757 * Makefile (routines): Remove libc-lowlevelmutex.
7758 (libpthread-rountines): Remove lowlevelmutex.
7759 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Adjust
7760 for new mutex implementation.
7761 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
7762 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7763 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7764 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
7765 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
7766 Likewise.
7767 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
7768 Likewise.
7769 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
7770 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
7771 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise
7772 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
7773 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7774 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7775 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
7776 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
7777 Likewise.
7778 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
7779 Likewise.
7780 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
7781 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
7782 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
7783 Don't use requeue.
7784 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
7785 * sysdeps/pthread/pthread_cond_signal.c: Don't use requeue.
7786
7787 2003-09-20 Ulrich Drepper <drepper@redhat.com>
7788
7789 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't match memory
7790 in parameters of asm with output parameters.
7791
7792 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Change
7793 type of DECR parameter to int.
7794 * pthreadP.h: Adjust prototype of __pthread_mutex_unlock_usercnt.
7795
7796 2003-09-18 Jakub Jelinek <jakub@redhat.com>
7797
7798 * tst-attr3.c (tf, do_test): Print stack start/end/size and
7799 guardsize for each thread.
7800
7801 2003-09-17 Jakub Jelinek <jakub@redhat.com>
7802
7803 * sysdeps/pthread/pthread.h (pthread_getattr_np): Clarify usage.
7804 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
7805 (pthread_attr_setaffinity_np): Handle cpuset == NULL.
7806
7807 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
7808 (pthread_attr_getaffinity_np): Don't segfault if iattr->cpuset is
7809 NULL.
7810 * pthread_getattr_np.c: Set cpuset using pthread_getaffinity_np.
7811 * pthreadP.h (pthread_getaffinity_np): Add hidden_proto.
7812 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
7813 (pthread_getaffinity_np): Add hidden_def.
7814
7815 * Makefile (tests): Add tst-attr3.
7816 * tst-attr3.c: New test.
7817
7818 * sysdeps/i386/Makefile (CFLAGS-tst-align.c): Remove.
7819
7820 2003-09-15 Jakub Jelinek <jakub@redhat.com>
7821
7822 * sysdeps/i386/Makefile (CFLAGS-pthread_create.c,
7823 CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
7824
7825 2003-09-17 Jakub Jelinek <jakub@redhat.com>
7826
7827 * Makefile (CFLAGS-tst-align.c): Add $(stack-align-test-flags).
7828 * tst-align.c: Include tst-stack-align.h.
7829 (tf, do_test): Use TEST_STACK_ALIGN macro.
7830
7831 2003-09-17 Ulrich Drepper <drepper@redhat.com>
7832
7833 * pthread_attr_init.c (__pthread_attr_init_2_0): Remove unused
7834 variable.
7835
7836 2003-09-16 Ulrich Drepper <drepper@redhat.com>
7837
7838 * pthread_getattr_np.c (pthread_getattr_np): Correctly fill in the
7839 stack-related values for the initial thread.
7840
7841 2003-09-15 Jakub Jelinek <jakub@redhat.com>
7842
7843 * Makefile (CFLAGS-pthread_once.c): Add $(uses-callbacks).
7844
7845 2003-09-11 Ulrich Drepper <drepper@redhat.com>
7846
7847 * pthread_mutex_lock.c: Minor code rearrangements.
7848
7849 2003-09-05 Roland McGrath <roland@redhat.com>
7850
7851 * pthread_create.c (__pthread_pthread_sizeof_descr): Removed.
7852 Instead, include ../nptl_db/db_info.c to do its magic.
7853 * pthread_key_create.c (__pthread_pthread_keys_max): Removed.
7854 (__pthread_pthread_key_2ndlevel_size): Likewise.
7855 * sysdeps/alpha/tls.h (DB_THREAD_SELF): New macro.
7856 * sysdeps/i386/tls.h (DB_THREAD_SELF): New macro.
7857 * sysdeps/ia64/tls.h (DB_THREAD_SELF): New macro.
7858 * sysdeps/powerpc/tls.h (DB_THREAD_SELF): New macro.
7859 * sysdeps/s390/tls.h (DB_THREAD_SELF): New macro.
7860 * sysdeps/sh/tls.h (DB_THREAD_SELF): New macro.
7861 * sysdeps/sparc/tls.h (DB_THREAD_SELF): New macro.
7862 * sysdeps/x86_64/tls.h (DB_THREAD_SELF): New macro.
7863 * sysdeps/alpha/td_ta_map_lwp2thr.c: File removed.
7864 * sysdeps/generic/td_ta_map_lwp2thr.c: File removed.
7865 * sysdeps/i386/td_ta_map_lwp2thr.c: File removed.
7866 * sysdeps/ia64/td_ta_map_lwp2thr.c: File removed.
7867 * sysdeps/powerpc/td_ta_map_lwp2thr.c: File removed.
7868 * sysdeps/s390/td_ta_map_lwp2thr.c: File removed.
7869 * sysdeps/sh/td_ta_map_lwp2thr.c: File removed.
7870 * sysdeps/sparc/td_ta_map_lwp2thr.c: File removed.
7871 * sysdeps/x86_64/td_ta_map_lwp2thr.c: File removed.
7872
7873 2003-09-08 Ulrich Drepper <drepper@redhat.com>
7874
7875 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Change type
7876 of pthread_t to be compatible with LT.
7877 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
7878 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
7879 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7880 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7881 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
7882 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7883 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
7884
7885 2003-09-04 Ulrich Drepper <drepper@redhat.com>
7886
7887 * sysdeps/unix/sysv/linux/i386/not-cancel.h (fcntl_not_cancel): Define.
7888
7889 2003-09-04 Jakub Jelinek <jakub@redhat.com>
7890
7891 * unwind-forcedunwind.c: Move to...
7892 * sysdeps/pthread/unwind-forcedunwind.c: ...here.
7893 (pthread_cancel_init): Use ARCH_CANCEL_INIT if defined.
7894 * sysdeps/pthread/jmpbuf-unwind.h: New file.
7895 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: New file.
7896 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: New file.
7897 * unwind.c: Include jmpbuf-unwind.h.
7898 (unwind_stop): Use _JMPBUF_CFA_UNWINDS macro.
7899
7900 2003-09-02 Jakub Jelinek <jakub@redhat.com>
7901
7902 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: New file.
7903 * sysdeps/unix/sysv/linux/ia64/Versions (libpthread): Export
7904 pthread_attr_setstack and pthread_attr_setstacksize @@GLIBC_2.3.3.
7905 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: New file.
7906 * sysdeps/unix/sysv/linux/alpha/Versions: New file.
7907 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: New file.
7908 * sysdeps/unix/sysv/linux/sparc/Versions: New file.
7909 * pthread_attr_setstack.c (__old_pthread_attr_setstack): New function.
7910 (pthread_attr_setstack): If PTHREAD_STACK_MIN != 16384, export
7911 as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.2.
7912 * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize): New
7913 function.
7914 (pthread_attr_setstacksize): If PTHREAD_STACK_MIN != 16384, export
7915 as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.1.
7916 * Makefile (tests): Add tst-stack2.
7917 * tst-stack2.c: New test.
7918 * tst-stack1.c: Include limits.h and sys/param.h.
7919 (do_test): Set size to MAX (4 * getpagesize (), PTHREAD_STACK_MIN).
7920
7921 * pthread_condattr_setpshared.c: Include errno.h.
7922 (pthread_condattr_setpshared): Return EINVAL if pshared
7923 is neither PTHREAD_PROCESS_PRIVATE nor PTHREAD_PROCESS_SHARED.
7924
7925 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Also
7926 defined symbol for entry point to avoid cancellation.
7927 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
7928 Likewise.
7929 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
7930 Likewise.
7931 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
7932 Likewise.
7933 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h (PSEUDO):
7934 Likewise.
7935 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
7936 Likewise.
7937 * sysdeps/unix/sysv/linux/i386/not-cancel.h (__open_nocancel,
7938 __close_nocancel, __read_nocancel, __write_nocancel,
7939 __waitpid_nocancel): Add attribute_hidden. If not in libc.so,
7940 libpthread.so or librt.so, define to corresponding function
7941 without _nocancel suffix.
7942 * sysdeps/unix/sysv/linux/s390/not-cancel.h: New file.
7943 * sysdeps/unix/sysv/linux/powerpc/not-cancel.h: New file.
7944 * sysdeps/unix/sysv/linux/sparc/not-cancel.h: New file.
7945
7946 * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: Fix a typo.
7947
7948 2003-09-02 Ulrich Drepper <drepper@redhat.com>
7949
7950 * sysdeps/unix/sysv/linux/i386/not-cancel.h: New file.
7951 * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: New file.
7952
7953 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Make sure the code
7954 in subsections has a symbol associated with it.
7955
7956 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Also
7957 defined symbol for entry point to avoid cancellation.
7958 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Likewise.
7959
7960 2003-09-01 Jakub Jelinek <jakub@redhat.com>
7961
7962 * Makefile (tests): Add tst-tls5.
7963 (module-names): Add tst-tls5mod{,a,b,c,d,e,f}.
7964 ($(objpfx)tst-tls5mod{,a,b,c,d,e,f}.so-no-z-defs): Set to yes.
7965 ($(objpfx)tst-tls5): New.
7966 ($(objpfx)tst-tls6.out): Likewise.
7967 (tests): Depend on $(objpfx)tst-tls6.out.
7968 * tst-tls3.c: Include stdint.h and pthreaddef.h.
7969 (do_test): Check pthread_self () return value alignment.
7970 * tst-tls3mod.c: Include stdint.h and pthreaddef.h.
7971 (tf): Check pthread_self () return value alignment.
7972 * tst-tls5.c: New test.
7973 * tst-tls5.h: New.
7974 * tst-tls5mod.c: New.
7975 * tst-tls5moda.c: New.
7976 * tst-tls5modb.c: New.
7977 * tst-tls5modc.c: New.
7978 * tst-tls5modd.c: New.
7979 * tst-tls5mode.c: New.
7980 * tst-tls5modf.c: New.
7981 * tst-tls6.sh: New test.
7982
7983 * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Add
7984 ptr___pthread_cond_timedwait and ptr___pthread_cond_timedwait_2_0.
7985 * init.c (pthread_functions): Initialize them.
7986 * forward.c (pthread_cond_timedwait@GLIBC_2.0,
7987 pthread_cond_timedwait@@GLIBC_2.3.2): New forwards.
7988 * Versions (libc): Export pthread_cond_timedwait@GLIBC_2.0,
7989 pthread_cond_timedwait@@GLIBC_2.3.2.
7990
7991 2003-09-01 Jakub Jelinek <jakub@redhat.com>
7992
7993 * sysdeps/unix/sysv/linux/alpha/timer_create.c: New file.
7994 * sysdeps/unix/sysv/linux/alpha/timer_delete.c: New file.
7995 * sysdeps/unix/sysv/linux/alpha/timer_getoverr.c: New file.
7996 * sysdeps/unix/sysv/linux/alpha/timer_gettime.c: New file.
7997 * sysdeps/unix/sysv/linux/alpha/timer_settime.c: New file.
7998 * sysdeps/unix/sysv/linux/alpha/Versions: New file.
7999
8000 * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
8001
8002 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Define
8003 _POSIX_THREAD_PRIORITY_SCHEDULING.
8004 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
8005
8006 2003-08-31 Ulrich Drepper <drepper@redhat.com>
8007
8008 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock): Avoid
8009 nested function, use static inline function from libio.h.
8010 Code by Richard Henderson.
8011
8012 * sysdeps/pthread/bits/libc-lock.h: Mark pthread_setcancelstate as
8013 weak.
8014
8015 2003-08-30 Jakub Jelinek <jakub@redhat.com>
8016
8017 * sysdeps/unix/sysv/linux/sparc/sparc64/Versions: New file.
8018 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_create.c: New file.
8019 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_delete.c: New file.
8020 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_getoverr.c: New file.
8021 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_gettime.c: New file.
8022 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_settime.c: New file.
8023 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
8024 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
8025 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: New file.
8026 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: New file.
8027 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: New file.
8028 * sysdeps/unix/sysv/linux/sparc/pthread_once.c: New file.
8029 * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: New file.
8030 * sysdeps/unix/sysv/linux/sparc/fork.c: New file.
8031 * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
8032 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: New file.
8033 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: New file.
8034 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: New file.
8035 * sysdeps/sparc/sparc32/pthread_spin_lock.c: New file.
8036 * sysdeps/sparc/sparc32/pthread_spin_trylock.c: New file.
8037 * sysdeps/sparc/sparc32/pthreaddef.h: New file.
8038 * sysdeps/sparc/sparc64/pthread_spin_lock.c: New file.
8039 * sysdeps/sparc/sparc64/pthread_spin_trylock.c: New file.
8040 * sysdeps/sparc/sparc64/pthread_spin_unlock.c: New file.
8041 * sysdeps/sparc/sparc64/pthreaddef.h: New file.
8042 * sysdeps/sparc/tls.h: New file.
8043 * sysdeps/sparc/tcb-offsets.sym: New file.
8044 * sysdeps/sparc/Makefile: New file.
8045 * sysdeps/sparc/td_ta_map_lwp2thr.c: New file.
8046 * init.c [__sparc__] (__NR_set_tid_address): Define.
8047
8048 2003-08-29 Jakub Jelinek <jakub@redhat.com>
8049
8050 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock,
8051 _IO_release_lock): Define.
8052
8053 2003-08-29 Jakub Jelinek <jakuB@redhat.com>
8054
8055 * tst-cancel4.c (tf_sigwait, tf_sigwaitinfo, tf_sigtimedwait): Add
8056 sigemptyset before sigaddset. Reported by jreiser@BitWagon.com.
8057
8058 2003-08-27 Ulrich Drepper <drepper@redhat.com>
8059
8060 * sysdeps/pthread/pthread.h (pthread_exit): Remove __THROW.
8061 (__pthread_cleanup_class): Add missing return types of member
8062 functions.
8063
8064 2003-08-26 Steven Munroe <sjmunroe@us.ibm.com>
8065
8066 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
8067 (lll_mutex_unlock_force): Add memory barrier between store and futex
8068 syscall.
8069
8070 2003-08-25 Ulrich Drepper <drepper@redhat.com>
8071
8072 * tst-cancel4.c (do_test): Also unlink tempfname and remove
8073 tempmsg in first loop.
8074
8075 2003-08-18 Ulrich Drepper <drepper@redhat.com>
8076
8077 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
8078 _POSIX_THREAD_PRIORITY_SCHEDULING.
8079 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
8080
8081 2003-08-07 Jakub Jelinek <jakub@redhat.com>
8082
8083 * sysdeps/pthread/bits/libc-lock.h [_LIBC && SHARED]
8084 (__rtld_lock_default_lock_recursive,
8085 __rtld_lock_default_unlock_recursive): Define.
8086 [_LIBC && SHARED] (__rtld_lock_lock_recursive,
8087 __rtld_lock_unlock_recursive): Define using
8088 GL(_dl_rtld_*lock_recursive).
8089 * init.c (__pthread_initialize_minimal_internal): Initialize
8090 _dl_rtld_lock_recursive and _dl_rtld_unlock_recursive.
8091 Lock GL(_dl_load_lock) the same number of times as
8092 GL(_dl_load_lock) using non-mt implementation was nested.
8093
8094 * pthreadP.h (__pthread_cleanup_upto): Add hidden_proto.
8095 * pt-longjmp.c (__pthread_cleanup_upto): Add hidden_def.
8096
8097 2003-08-06 Jakub Jelinek <jakub@redhat.com>
8098
8099 * tst-cancel17.c (do_test): Make len2 maximum of page size and
8100 PIPE_BUF.
8101
8102 2003-08-07 Jakub Jelinek <jakub@redhat.com>
8103
8104 * pthread_create.c (__pthread_create_2_0): Clear new_attr.cpuset.
8105
8106 2003-08-03 Jakub Jelinek <jakub@redhat.com>
8107
8108 * sysdeps/pthread/createthread.c (do_clone): Move error handling
8109 to first syscall error check. Move syscall error check for tkill
8110 into __ASSUME_CLONE_STOPPED #ifdef.
8111
8112 2003-08-02 Ulrich Drepper <drepper@redhat.com>
8113
8114 * sysdeps/pthread/createthread.c (do_clone): If __ASSUME_CLONE_STOPPED
8115 is not defined, do explicit synchronization.
8116 (create_thread): Do not lock pd->lock here. If __ASSUME_CLONE_STOPPED
8117 is not defined also unlock pd->lock for non-debugging case in case
8118 it is necessary.
8119 * pthread_create.c (start_thread): Always get and release pd->lock
8120 if __ASSUME_CLONE_STOPPED is not defined.
8121 (start_thread_debug): Removed. Adjust users.
8122 * allocatestack.c (allocate_stack): Always initialize lock if
8123 __ASSUME_CLONE_STOPPED is not defined.
8124 * Makefile (tests): Add tst-sched1.
8125 * tst-sched1.c: New file.
8126
8127 * sysdeps/pthread/createthread.c (do_clone): Only use
8128 sched_setschduler and pass correct parameters.
8129
8130 2003-07-31 Jakub Jelinek <jakub@redhat.com>
8131
8132 * sysdeps/pthread/pthread.h (pthread_attr_setstackaddr,
8133 pthread_attr_setstacksize): Change PTHREAD_STACK_SIZE to
8134 PTHREAD_STACK_MIN in comments.
8135
8136 2003-07-31 Jakub Jelinek <jakub@redhat.com>
8137
8138 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
8139 Shut up warnings if INTERNAL_SYSCALL_ERROR_P does not use its first
8140 argument.
8141 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Likewise.
8142 * pthread_condattr_setclock.c (pthread_condattr_setclock): Likewise.
8143 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Include pthreaddef.h.
8144 (__pthread_cleanup_upto): Fix prototype.
8145 (_longjmp_unwind): Adjust caller.
8146 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_timedlock):
8147 Change second argument to const struct pointer.
8148 * tst-sem8.c (main): Remove unused s2 and s3 variables.
8149 * tst-sem9.c (main): Likewise.
8150 * unwind.c: Include string.h for strlen prototype.
8151
8152 2003-07-31 Ulrich Drepper <drepper@redhat.com>
8153
8154 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
8155 (__pthread_cond_timedwait): Don't use cmov unless HAVE_CMOV is defined.
8156 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S:
8157 Define HAVE_CMOV.
8158 Patch by Nicholas Miell <nmiell@attbi.com>.
8159
8160 2003-07-30 Jakub Jelinek <jakub@redhat.com>
8161
8162 * init.c (__pthread_initialize_minimal_internal): Initialize
8163 GL(dl_init_static_tls).
8164 * pthreadP.h (__pthread_init_static_tls): New prototype.
8165 * allocatestack.c (init_one_static_tls, __pthread_init_static_tls):
8166 New functions.
8167 * Makefile (tests): Add tst-tls4.
8168 (modules-names): Add tst-tls4moda and tst-tls4modb.
8169 ($(objpfx)tst-tls4): Link against libdl and libpthread.
8170 ($(objpfx)tst-tls4.out): Depend on tst-tls4moda.so and
8171 tst-tls4modb.so.
8172 * tst-tls4.c: New file.
8173 * tst-tls4moda.c: New file.
8174 * tst-tls4modb.c: New file.
8175
8176 2003-06-19 Daniel Jacobowitz <drow@mvista.com>
8177
8178 * sysdeps/pthread/timer_create.c (timer_create): Call timer_delref
8179 before __timer_dealloc.
8180 * sysdeps/pthread/timer_routines.c (__timer_thread_find_matching):
8181 Don't call list_unlink.
8182
8183 2003-07-29 Roland McGrath <roland@redhat.com>
8184
8185 * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
8186
8187 2003-07-25 Jakub Jelinek <jakub@redhat.com>
8188
8189 * tst-cancel17.c (do_test): Check if aio_cancel failed.
8190 Don't reuse struct aiocb A if it failed.
8191 Write fpathconf (fds[1], _PC_PIPE_BUF) + 2 bytes using aio_write,
8192 not just one byte, as that does not block.
8193
8194 2003-07-22 Jakub Jelinek <jakub@redhat.com>
8195
8196 * sysdeps/pthread/unwind-resume.c: New file.
8197 * sysdeps/pthread/Makefile (routines, shared-only-routines): Add
8198 unwind-resume in csu subdir.
8199 (CFLAGS-unwind-resume.c, CFLAGS-rt-unwind-resume.c): Compile with
8200 exceptions.
8201 (librt-sysdep_routines, librt-shared-only-routines): Add
8202 rt-unwind-resume.
8203 * sysdeps/pthread/rt-unwind-resume.c: New file.
8204 * unwind-forcedunwind.c: New file.
8205 * Makefile (libpthread-routines): Add unwind-forcedunwind.
8206 (libpthread-shared-only-routines): Likewise.
8207 (CFLAGS-unwind-forcedunwind.c): Compile with exceptions.
8208 * pthreadP.h (pthread_cancel_init): New prototype.
8209 * pthread_cancel.c (pthread_cancel): Call pthread_cancel_init.
8210
8211 * sysdeps/pthread/createthread.c (do_thread, create_thread): Make
8212 attr argument const struct pthread_attr *.
8213
8214 * res.c (__res_state): Return __resp.
8215 * descr.h: Include resolv.h.
8216 (struct pthread): Add res field.
8217 * pthread_create.c: Include resolv.h.
8218 (start_thread): Initialize __resp.
8219 * Makefile (tests): Add tst-_res1.
8220 (module-names): Add tst-_res1mod1, tst-_res1mod2.
8221 ($(objpfx)tst-_res1mod2.so): Depend on $(objpfx)tst-_res1mod1.so.
8222 ($(objpfx)tst-_res1): Depend on $(objpfx)tst-_res1mod2.so and
8223 libpthread.
8224 * tst-_res1.c: New file.
8225 * tst-_res1mod1.c: New file.
8226 * tst-_res1mod2.c: New file.
8227
8228 2003-07-21 Ulrich Drepper <drepper@redhat.com>
8229
8230 * sysdeps/pthread/createthread.c: Don't define CLONE_STOPPED.
8231
8232 * Makefile: Define various *-no-z-defs variables for test DSOs
8233 which has undefined symbols.
8234
8235 2003-07-21 Steven Munroe <sjmunroe@us.ibm.com>
8236
8237 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
8238 Retry if the stwcx fails to store once_control.
8239
8240 2003-07-20 Ulrich Drepper <drepper@redhat.com>
8241
8242 * Makefile (libpthread-routines): Add pthread_attr_getaffinity and
8243 pthread_attr_setaffinity.
8244 * Versions [libpthread] (GLIBC_2.3.3): Likewise.
8245 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: New file.
8246 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: New file.
8247 * pthread_attr_destroy.c: Free cpuset element if allocated.
8248 * pthread_create.c: Pass iattr as additional parameter to
8249 create_thread.
8250 * sysdeps/pthread/createthread.c: If attribute is provided and
8251 a new thread is created with affinity set or scheduling parameters,
8252 start thread with CLONE_STOPPED.
8253 * sysdeps/pthread/pthread.h: Declare pthread_attr_getaffinity and
8254 pthread_attr_setaffinity.
8255 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
8256 cpuset element.
8257
8258 2003-07-15 Ulrich Drepper <drepper@redhat.com>
8259
8260 * tst-tcancel-wrappers.sh: lseek and llseek are not cancelation points.
8261
8262 2003-07-14 Ulrich Drepper <drepper@redhat.com>
8263
8264 * sysdeps/pthread/configure.in: Require CFI directives also for
8265 ppc and s390.
8266
8267 2003-07-15 Jakub Jelinek <jakub@redhat.com>
8268
8269 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
8270 Add cfi directives.
8271
8272 2003-07-12 Kaz Kojima <kkojima@rr.iij4u.or.jp>
8273
8274 * sysdeps/sh/tcb-offsets.sym: Add RESULT, TID, CANCELHANDLING and
8275 CLEANUP_JMP_BUF.
8276 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use more
8277 registers as variables. Call __pthread_mutex_unlock_usercnt.
8278 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
8279 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Store TID
8280 not self pointer in __writer. Compare with TID to determine
8281 deadlocks.
8282 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
8283 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
8284 Likewise.
8285 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
8286 Likewise.
8287 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add cancellation support.
8288 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
8289 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Define all the nice
8290 macros also when compiling librt.
8291
8292 2003-07-11 Jakub Jelinek <jakub@redhat.com>
8293
8294 * Makefile (CFLAGS-pthread_once.c): Add -fexceptions
8295 -fasynchronous-unwind-tables.
8296 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
8297 (PSEUDO): Add cfi directives.
8298 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO):
8299 Likewise.
8300 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
8301 Likewise.
8302
8303 2003-07-08 Jakub Jelinek <jakub@redhat.com>
8304
8305 * pthreadP.h (__pthread_unwind_next, __pthread_register_cancel,
8306 __pthread_unregister_cancel): Add prototypes and hidden_proto.
8307 * unwind.c (__pthread_unwind_next): Add hidden_def.
8308 * cleanup.c (__pthread_register_cancel, __pthread_unregister_cancel):
8309 Likewise.
8310 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
8311 Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
8312 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
8313 Likewise.
8314 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
8315 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
8316 Likewise.
8317 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once): Use
8318 HIDDEN_JUMPTARGET to call __pthread_register_cancel,
8319 __pthread_unregister_cancel and __pthread_unwind_next.
8320
8321 2003-07-04 Jakub Jelinek <jakub@redhat.com>
8322
8323 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Use
8324 different symbol for the cancellation syscall wrapper and
8325 non-cancellation syscall wrapper.
8326 (PSEUDO_END): Define.
8327
8328 2003-07-05 Richard Henderson <rth@redhat.com>
8329
8330 * sysdeps/alpha/elf/pt-initfini.c: Avoid .ent/.end.
8331 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_wait,
8332 lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
8333 return actual return value from the syscall, not 0.
8334
8335 2003-07-07 Ulrich Drepper <drepper@redhat.com>
8336
8337 * descr.h (struct pthread): Add pid field.
8338 * allocatestack.c (allocate_stack): Initialize pid field in descriptor.
8339 (__reclaim_stacks): Likewise.
8340 * init.c (sigcancel_handler): If __ASSUME_CORRECT_SI_PID is defined
8341 also check for PID of the signal source.
8342 (__pthread_initialize_minimal_internal): Also initialize pid field
8343 of initial thread's descriptor.
8344 * pthread_cancel.c: Use tgkill instead of tkill if possible.
8345 * sysdeps/unix/sysv/linux/fork.c: Likewise.
8346 * sysdeps/unix/sysv/linux/pt-raise.c: Likewise.
8347 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
8348 * sysdeps/unix/sysv/linux/raise.c: Likewise.
8349
8350 2003-07-05 Ulrich Drepper <drepper@redhat.com>
8351
8352 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_push): Renamed.
8353 Fix use of parameter.
8354 (__libc_cleanup_pop): Likewise.
8355
8356 2003-07-04 Ulrich Drepper <drepper@redhat.com>
8357
8358 * init.c (sigcancel_handler): Change parameters to match handler
8359 for SA_SIGACTION. Check signal number and code to recognize
8360 invalid invocations.
8361
8362 2003-07-03 Roland McGrath <roland@redhat.com>
8363
8364 * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr):
8365 Apply sizeof (struct pthread) bias to r13 value.
8366
8367 2003-07-03 Ulrich Drepper <drepper@redhat.com>
8368
8369 * sysdeps/pthread/configure.in: Require CFI directives.
8370
8371 * sysdeps/pthread/librt-cancellation.c (__pthread_unwind): Remove
8372 definition.
8373 * pthreadP.h (__pthread_unwind): Add hidden_proto if used in
8374 libpthread compilation.
8375 * unwind.c (__pthread_unwind): Add hidden_def.
8376 * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_unwind.
8377
8378 2003-07-01 Ulrich Drepper <drepper@redhat.com>
8379
8380 * libc-cancellation.c (__libc_cleanup_routine): Define.
8381 * sysdeps/pthread/bits/libc-lock.h (__pthread_cleanup_push): Define.
8382 (__pthread_cleanup_pop): Define.
8383
8384 2003-07-01 Richard Henderson <rth@redhat.com>
8385
8386 * sysdeps/alpha/elf/pt-initfini.c: New file.
8387 * sysdeps/alpha/pthread_spin_lock.S: New file.
8388 * sysdeps/alpha/pthread_spin_trylock.S: New file.
8389 * sysdeps/alpha/pthreaddef.h: New file.
8390 * sysdeps/alpha/td_ta_map_lwp2thr.c: New file.
8391 * sysdeps/alpha/tls.h: New file.
8392 * sysdeps/unix/sysv/linux/alpha/Makefile: New file.
8393 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: New file.
8394 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: New file.
8395 * sysdeps/unix/sysv/linux/alpha/createthread.c: New file.
8396 * sysdeps/unix/sysv/linux/alpha/fork.c: New file.
8397 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: New file.
8398 * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: New file.
8399 * sysdeps/unix/sysv/linux/alpha/pthread_once.c: New file.
8400 * sysdeps/unix/sysv/linux/alpha/sem_post.c: New file.
8401 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
8402
8403 2003-07-01 Ulrich Drepper <drepper@redhat.com>
8404
8405 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Add correct
8406 cleanup support and unwind info.
8407
8408 2003-06-30 Ulrich Drepper <drepper@redhat.com>
8409
8410 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
8411 Use correct cleanup handler registration. Add unwind info.
8412 * sysdeps/unix/sysv/linux/unwindbuf.sym: New file.
8413 * sysdeps/unix/sysv/linux/Makefile: Add rule to build unwindbuf.h.
8414 * tst-once3.c: Add cleanup handler and check it is called.
8415 * tst-once4.c: Likewise.
8416 * tst-oncex3.c: New file.
8417 * tst-oncex4.c: New file.
8418 * Makefile: Add rules to build and run tst-oncex3 and tst-oncex4.
8419
8420 2003-06-29 Ulrich Drepper <drepper@redhat.com>
8421
8422 * sysdeps/pthread/configure.in: Check for C cleanup handling in gcc.
8423
8424 2003-06-27 Ulrich Drepper <drepper@redhat.com>
8425
8426 * tst-cancel4.c (tf_msgrcv): Use IPC_PRIVATE in msgget call.
8427 (tf_msgsnd): Likewise.
8428
8429 * tst-cancel4.c (tf_msgrcv): Strengthen test against valid
8430 premature returns a bit more.
8431
8432 2003-06-26 Ulrich Drepper <drepper@redhat.com>
8433
8434 * sysdeps/pthread/librt-cancellation.c: Move __pthread_unwind
8435 definition to the front.
8436
8437 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rename
8438 the cleanup functions to make the names unique. Fix dwarf opcode
8439 un unwind table.
8440 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Rename cleanup
8441 functions to make the names unique. Fix CFA offset for two blocks.
8442
8443 2003-06-25 Ulrich Drepper <drepper@redhat.com>
8444
8445 * sysdeps/pthread/pthread.h (class __pthread_cleanup_class): Add
8446 missing closing braces.
8447 Patch by Christophe Saout <christophe@saout.de>.
8448
8449 2003-06-24 Roland McGrath <roland@redhat.com>
8450
8451 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Typo fix.
8452
8453 2003-06-24 Ulrich Drepper <drepper@redhat.com>
8454
8455 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: New file.
8456 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: New file.
8457
8458 * pthreadP.h: Declare __find_thread_by_id.
8459 * allocatestack.c [HP_TIMING_AVAIL]: Define __find_thread_by_id.
8460 * pthread_clock_gettime.c: Allow using other thread's clock.
8461 * pthread_clock_settime.c: Likewise.
8462 * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
8463 * Makefile: Add rules to build and run tst-clock2.
8464 * tst-clock2.c: New file.
8465
8466 2003-06-23 Ulrich Drepper <drepper@redhat.com>
8467
8468 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rewrite
8469 to use exception-based cleanup handler.
8470 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8471
8472 * tst-cond8.c (ch): Announce that we are done.
8473
8474 * pthreadP.h (__pthread_mutex_cond_lock): Mark with internal_function.
8475
8476 * tst-cancel17.c (tf): Retry aio_suspend in case of EINTR.
8477 Also test aio_suspend with timeout value.
8478
8479 2003-06-22 Ulrich Drepper <drepper@redhat.com>
8480
8481 * pthreadP.h: Mark __pthread_mutex_unlock_usercnt also hidden.
8482 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Add
8483 attribute_hidden.
8484
8485 * pthreadP.h (__pthread_mutex_init_internal): Mark hidden.
8486 (__pthread_mutex_lock_internal): Likewise.
8487 (__pthread_mutex_unlock_internal): Likewise.
8488 (__pthread_mutex_unlock_usercnt): Declare.
8489 * pthread_mutex_destroy.c: Always fail if used in any way.
8490 * pthread_mutex_init.c: Update comment.
8491 * pthread_mutex_lock.c: If NO_INCR is not defined adjust __nusers.
8492 * pthread_mutex_timedlock.c: Adjust __nusers.
8493 * pthread_mutex_trylock.c: Adjust __nusers.
8494 * pthread_mutex_unlock.c: Old code is in __pthread_mutex_unlock_usercnt
8495 and public interfaces are wrapper with pass additional parameter.
8496 __pthread_mutex_unlock_usercnt does not adjust __nusers if second
8497 parameter zero.
8498 * tst-mutex8.c: New file.
8499 * Makefile (tests): Add tst-mutex8.
8500 * sysdeps/pthread/pthread_cond_timedwait.c: Call
8501 __pthread_mutex_unlock_usercnt.
8502 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
8503 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8504 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8505 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8506 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8507 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Define NO_INCR.
8508 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
8509 Add __nusers.
8510 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8511 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
8512 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
8513 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
8514 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
8515
8516 * pthread_mutex_lock.c: Don't store THREAD_ID in __owner, use TID.
8517 * pthread_mutex_timedlock.c: Likewise.
8518 * pthread_mutex_trylock.c: Adjust __nusers.
8519 * pthread_mutex_unlock.c: Compare with TID not THREAD_ID.
8520 * tst-mutex9.c: New file.
8521 * Makefile (tests): Add tst-mutex9.
8522 * sysdeps/i386/tls.h: Remove THREAD_ID definition.
8523 * sysdeps/ia64/tls.h: Likewise.
8524 * sysdeps/powerpc/tls.h: Likewise.
8525 * sysdeps/s390/tls.h: Likewise.
8526 * sysdeps/sh/tls.h: Likewise.
8527 * sysdeps/x86_64/tls.h: Likewise.
8528 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
8529 Change type of __owner.
8530 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8531 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
8532 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
8533 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
8534 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
8535
8536 2003-06-19 Jakub Jelinek <jakub@redhat.com>
8537
8538 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Move to...
8539 * sysdeps/unix/sysv/linux/sem_post.c: ...here.
8540
8541 * sysdeps/unix/sysv/linux/sem_post.c: Move to...
8542 * sysdeps/unix/sysv/linux/powerpc/sem_post.c: ... here. Pass nr + 1
8543 instead of nr to lll_futex_wake. Only set errno and return -1
8544 if err < 0.
8545
8546 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_wait,
8547 lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
8548 return actual return value from the syscall, not 0.
8549
8550 2003-06-18 Ulrich Drepper <drepper@redhat.com>
8551
8552 * tst-cancel4.c (tf_msgsnd): Don't always use 100 as the type,
8553 find a random value.
8554 (tf_msgrcv): Likewise. Also don't report msgrcv returns if
8555 errno==EIDRM.
8556
8557 * sysdeps/unix/sysv/linux/timer_settime.c: Add prototype for
8558 compat_timer_settime.
8559 * sysdeps/unix/sysv/linux/timer_gettime.c: Add prototype for
8560 compat_timer_gettime.
8561 * sysdeps/unix/sysv/linux/timer_getoverr.c: Add prototype for
8562 compat_timer_getoverrun.
8563 * sysdeps/unix/sysv/linux/timer_delete.c: Add prototype for
8564 compat_timer_delete.
8565
8566 * pthread_mutex_destroy.c (__pthread_mutex_destroy): For
8567 error-checking mutex detect busy mutexes.
8568
8569 2003-06-17 Ulrich Drepper <drepper@redhat.com>
8570
8571 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_mutex_lock):
8572 Add ax to clobber list.
8573 (lll_mutex_cond_lock): Likewise.
8574 (lll_mutex_unlock): Likewise.
8575 (lll_lock): Likewise.
8576 (lll_unlock): Likewise.
8577
8578 * Makefile: Add rules to build and run tst-cancel18 and tst-cancelx18.
8579 * tst-cancel18.c: New file.
8580 * tst-cancelx18.c: New file.
8581
8582 * tst-cancel4.c: Test connect, creat, msgrcv, msgsnd, sendmsg, sendto,
8583 and tcdrain.
8584
8585 * Makefile: Add rules to build and run tst-cancel17 and tst-cancel17x.
8586 * tst-cancel17.c: New file.
8587 * tst-cancelx17.c: New file.
8588
8589 * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
8590 * sysdeps/unix/sysv/linux/sigwait.c: New file.
8591 * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
8592
8593 * tst-cancel4.c: Test open, close, pread, pwrite, fsync, and msync.
8594
8595 2003-06-16 Jakub Jelinek <jakub@redhat.com>
8596
8597 * sysdeps/pthread/createthread.c (create_thread): Set
8598 header.multiple_threads unconditionally.
8599 * allocatestack.c (allocate_stack): Likewise.
8600 * descr.h (struct pthread): Add header.multiple_threads
8601 unconditionally.
8602 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (CENABLE, CDISABLE):
8603 Define for librt. #error if neither libpthread, libc nor librt.
8604 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (CENABLE, CDISABLE):
8605 Likewise.
8606 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (CENABLE,
8607 CDISABLE): Likewise.
8608 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (CENABLE,
8609 CDISABLE): Likewise.
8610 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (CENABLE,
8611 CDISABLE): Likewise.
8612 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (CENABLE,
8613 CDISABLE): Likewise. Access header.multiple_threads outside of
8614 libc and libpthread.
8615 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (CENABLE, CDISABLE):
8616 Likewise.
8617 * sysdeps/x86_64/tls.h (tcbhead_t): Add multiple_threads.
8618 * sysdeps/x86_64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define.
8619
8620 2003-06-17 Ulrich Drepper <drepper@redhat.com>
8621
8622 * tst-cancel4.c: Add tests for the socket and signal functions, pause.
8623 Also test early cancellation before the thread reaches the cancellation
8624 point.
8625
8626 * Makefile: Compile forward.c with exceptions.
8627
8628 * sysdeps/unix/sysv/linux/sleep.c: New file.
8629
8630 2003-06-16 Ulrich Drepper <drepper@redhat.com>
8631
8632 * Makefile: Add CFLAGS definition to compile function wrappers
8633 duplicated from libc with exceptions.
8634 * tst-cancel4.c: Also check cancellation handlers.
8635
8636 * Makefile: Add rules to build and run tst-cancel16 and
8637 tst-cancelx16. Add missing CFLAGS definitions.
8638 * tst-cancel16.c: New file.
8639 * tst-cancelx16.c: New file.
8640
8641 2003-06-15 Ulrich Drepper <drepper@redhat.com>
8642
8643 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
8644 (DL_SYSINFO_IMPLEMENTATION): Use CFI opcodes.
8645 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
8646 (DL_SYSINFO_IMPLEMENTATION): Likewise.
8647
8648 * pthreadP.h (LIBC_CANCEL_ASYNC): Also define for librt.
8649 (LIBC_CANCEL_RESET): Likewise.
8650 Declare __librt_enable_asynccancel and __librt_disable_asynccancel.
8651 * sysdeps/pthread/Makefile (librt-sysdep_routines): Add
8652 librt-cancellation.
8653 (CFLAGS-libcrt-cancellation.c): Define.
8654 * sysdeps/pthread/librt-cancellation.c: New file.
8655 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define all the nice
8656 macros also when compiling librt.
8657 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
8658 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
8659 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
8660 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
8661 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
8662 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
8663 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
8664
8665 * sysdeps/unix/sysv/linux/timer_create.c: Add prototype for
8666 compat_timer_create.
8667
8668 2003-06-14 Ulrich Drepper <drepper@redhat.com>
8669
8670 * sysdeps/pthread/posix-timer.h (timespec_compare): Always inline.
8671
8672 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
8673 __register_atfork.
8674 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
8675 Add libc_hidden_def.
8676
8677 2003-06-13 Roland McGrath <roland@redhat.com>
8678
8679 * sysdeps/x86_64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Pass FS
8680 constant from <sys/reg.h> to ps_get_thread_area, not register contents.
8681
8682 2003-06-11 Ulrich Drepper <drepper@redhat.com>
8683
8684 * allocatestack.c (queue_stack): Always inline.
8685 * ptreadhP.h (__do_cancel): Likewise.
8686
8687 2003-06-10 Jakub Jelinek <jakub@redhat.com>
8688
8689 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait): Fix
8690 a typo.
8691
8692 2003-06-10 Ulrich Drepper <drepper@redhat.com>
8693
8694 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
8695 (__pthread_cond_signal): Remove incorrect second addition for
8696 cond_lock!=0.
8697
8698 2003-06-09 Ulrich Drepper <drepper@redhat.com>
8699
8700 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
8701 (__pthread_cond_signal): Use correct futex pointer in
8702 __lll_mutex_lock_wait call.
8703
8704 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
8705 (__pthread_cond_signal): Some more tweaks to handle cond_lock!=0.
8706
8707 2003-06-08 Ulrich Drepper <drepper@redhat.com>
8708
8709 * sysdeps/unix/sysv/linux/s390/sem_wait.c (__new_sem_wait): Make
8710 cancelable.
8711 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
8712 Likewise.
8713
8714 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Remove
8715 hand-written CFI generation code. Since ENTRY/END also initiated
8716 CFI frames this caused two CFI sets to be generated.
8717
8718 2003-06-07 Ulrich Drepper <drepper@redhat.com>
8719
8720 * cleanup_routine.c: New file.
8721 * Versions (libpthread) [GLIBC_2.3.3]: Add __pthread_cleanup_routine.
8722 * sysdeps/pthread/pthread.h: Add support for fully exception-based
8723 cleanup handling.
8724 * Makefile (libpthread-routines): Add cleanup_routine.
8725 Add more CFLAGS variables to compile with exceptions. Add comments
8726 why which file needs unwind tables.
8727 (tests) [have-forced-unwind==yes]: Add tst-cancelx* and tst-cleanupx*
8728 tests.
8729 * tst-cancelx1.c: New file.
8730 * tst-cancelx2.c: New file.
8731 * tst-cancelx3.c: New file.
8732 * tst-cancelx4.c: New file.
8733 * tst-cancelx5.c: New file.
8734 * tst-cancelx6.c: New file.
8735 * tst-cancelx7.c: New file.
8736 * tst-cancelx8.c: New file.
8737 * tst-cancelx9.c: New file.
8738 * tst-cancelx10.c: New file.
8739 * tst-cancelx11.c: New file.
8740 * tst-cancelx12.c: New file.
8741 * tst-cancelx13.c: New file.
8742 * tst-cancelx14.c: New file.
8743 * tst-cancelx15.c: New file.
8744 * tst-cleanupx0.c: New file.
8745 * tst-cleanupx0.expect: New file.
8746 * tst-cleanupx1.c: New file.
8747 * tst-cleanupx2.c: New file.
8748 * tst-cleanupx3.c: New file.
8749
8750 * tst-cleanup0.c: Make standard compliant.
8751 * tst-cleanup1.c: Likewise.
8752
8753 * sysdeps/unix/sysv/linux/sem_timedwait.c: Add cancellation support.
8754 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
8755 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
8756 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
8757 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
8758 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
8759 * sysdeps/i386/tcb-offsets.sym: Add RESULT, CANCELHANDLING, and
8760 CLEANUP_JMP_BUF.
8761 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
8762 * tst-cancel12.c: New file.
8763 * tst-cancel13.c: New file.
8764 * tst-cancel14.c: New file.
8765 * tst-cancel15.c: New file.
8766 * Makefile (tests): Add tst-cancel12, tst-cancel13, tst-cancel14,
8767 and tst-cancel15.
8768
8769 * tst-cancel1.c: Add some comments.
8770
8771 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Compute relative
8772 timeout correctly.
8773
8774 2003-06-06 Ulrich Drepper <drepper@redhat.com>
8775
8776 * Makefile (CFLAGS-pthread_cancel.c): Define.
8777
8778 2003-06-05 Ulrich Drepper <drepper@redhat.com>
8779
8780 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_rwlock_t):
8781 Change type of __writer element to int.
8782 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8783 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
8784 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
8785 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
8786 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
8787 * sysdeps/i386/tcb-offsets.sym: Replace SELF entry with TID entry.
8788 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
8789 * pthread_rwlock_trywrlock.c: Store TID not self pointer in __writer.
8790 Compare with TID to determine deadlocks.
8791 * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
8792 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
8793 * sysdeps/pthread/pthread_rwlock_timedwrlock.: Likewise.
8794 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
8795 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
8796 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8797 Likewise.
8798 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8799 Likewise.
8800 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8801 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
8802 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
8803 Likewise.
8804 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
8805 Likewise.
8806 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
8807 * Makefile (tests): Add tst-rwlock12.
8808 * tst-rwlock12.c: New file.
8809
8810 2003-06-05 Jakub Jelinek <jakub@redhat.com>
8811
8812 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait,
8813 __lll_timedlock_wait, lll_unlock_wake_cb, __lll_timedwait_tid):
8814 Remove bogus hidden_proto.
8815 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
8816 Likewise.
8817 * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_lock,
8818 lll_unlock_wake_cb, ___lll_timedwait_tid): Likewise.
8819 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (___lll_mutex_lock,
8820 ___lll_mutex_timedlock): Likewise.
8821
8822 2003-06-04 Ulrich Drepper <drepper@redhat.com>
8823
8824 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
8825 (__pthread_cond_signal): Add some code to eventually handle
8826 cond_lock!=0.
8827
8828 2003-06-01 Ulrich Drepper <drepper@redhat.com>
8829
8830 * Makefile (tests): Add tst-exec4.
8831 (tst-exec4-ARGS): Define.
8832 * tst-exec4.c: New file.
8833
8834 2003-05-31 Ulrich Drepper <drepper@redhat.com>
8835
8836 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
8837 Also fail if tv_nsec < 0.
8838 (__lll_timedwait_tid): Likewise.
8839 * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
8840 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_timedwait_tid):
8841 Likewise.
8842 * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_timedwait_tid):
8843 Likewise.
8844 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (__lll_mutex_timedlock):
8845 Likewise.
8846 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
8847 Likewise.
8848 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_timedwait_tid):
8849 Likewise.
8850 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_timedwait_tid):
8851 Likewise.
8852
8853 * Makefile (tests): Add tst-sem8 and tst-sem9.
8854 * tst-sem8.c: New file.
8855 * tst-sem9.c: New file.
8856 * sem_open.c: Fix creation of in_use record if the file exists but
8857 no internal record.
8858
8859 * posix-timer.h: Remove old, unused timer_id2ptr and timer_ptr2id
8860 definitions.
8861
8862 * sysdeps/pthread/timer_create.c (timer_create): In case
8863 evp==NULL, assign timer ID to sival_ptr.
8864
8865 * descr.h (struct pthread_unwind_buf): Change type of prev element to
8866 struct pthread_unwind_buf *.
8867 (struct pthread): Likewise for cleanup_jmp_buf element.
8868
8869 * cleanup.c (__pthread_register_cancel): Add cast to avoid warning.
8870 * cleanup_defer.c (__pthread_register_cancel_defer): Likewise.
8871 * unwind.c (__pthread_unwind_next): Likewise.
8872
8873 2003-05-30 Ulrich Drepper <drepper@redhat.com>
8874
8875 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
8876 (lll_futex_timed_wait): Use int for futex value parameter.
8877 (lll_futex_wake): Likewise.
8878 (lll_futex_requeue): Likewise.
8879
8880 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
8881 Replace one memory operation with one register operation.
8882
8883 * tst-join4.c (do_test): Fix error message.
8884
8885 * tst-rwlock6.c (do_test): Use correct format specifier.
8886
8887 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
8888 (__lll_mutex_lock_wait): Replace one memory operation with one
8889 register operation.
8890 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S
8891 (__lll_mutex_lock_wait): Likewise.
8892
8893 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
8894 (__lll_mutex_cond_lock): Add one to value parameter of
8895 __lll_lock_wait to reflect reality in the futex syscall.
8896 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
8897 (lll_mutex_cond_lock): Likewise.
8898
8899 2003-05-30 Jakub Jelinek <jakub@redhat.com>
8900
8901 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_cond_lock):
8902 New function.
8903 (lll_mutex_cond_lock): Define.
8904
8905 2003-05-29 Ulrich Drepper <drepper@redhat.com>
8906
8907 * Makefile (tests): Add tst-signal6.
8908 * tst-signal6.c: New file.
8909
8910 * sysdeps/unix/sysv/linux/s390/lowlevellock.h
8911 (__lll_mutex_unlock_force): New function
8912 (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
8913
8914 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
8915 (__lll_mutex_unlock_force): New function.
8916 (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
8917
8918 * tst-rwlock7.c (do_test): Use correct format specifier.
8919
8920 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue):
8921 Find break parameter in correct asm argument.
8922
8923 2003-05-27 Jakub Jelinek <jakub@redhat.com>
8924
8925 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_clobbers):
8926 Remove out4.
8927 (lll_futex_requeue): Fix __o3 constraint, return negative errno if
8928 error occured.
8929 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
8930 Add __mutex.
8931 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_REQUEUE,
8932 lll_futex_requeue, lll_mutex_unlock_force): Define.
8933
8934 2003-05-30 Jakub Jelinek <jakub@redhat.com>
8935
8936 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
8937 (pthread_cond_t): Add __mutex.
8938 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_REQUEUE,
8939 lll_futex_requeue, lll_mutex_unlock_force): Define.
8940
8941 2003-05-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
8942
8943 * sysdeps/sh/tcb-offsets.sym: Define MUTEX_FUTEX.
8944 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
8945 Add __mutex field.
8946 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (SYSCALL_WITH_INST_PAD):
8947 Define.
8948 (lll_futex_wait, lll_futex_wake): Define.
8949 * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: New file.
8950 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Try using
8951 FUTEX_REQUEUE instead of FUTEX_WAIT.
8952 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
8953 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Remember
8954 mutex which was used in condvar structure. Call
8955 __pthread_mutex_cond_lock instead of __pthread_mutex_lock_internal.
8956 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
8957
8958 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Don't
8959 include tcb-offsets.h. Read wakeup value in locked region.
8960 Use the value of gbr register as THREAD_ID.
8961 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
8962 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
8963 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
8964
8965 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Remove futex related
8966 macros.
8967
8968 2003-05-28 Ulrich Drepper <drepper@redhat.com>
8969
8970 * sysdeps/pthread/pthread_cond_broadcast.c
8971 (__pthread_cond_broadcast): Fix typo: MAX_INT -> INT_MAX.
8972
8973 2003-05-26 Ulrich Drepper <drepper@redhat.com>
8974
8975 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Fix
8976 typo in register name.
8977 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use parameters
8978 correctly. Actually use requeue. Little optimization.
8979 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Store
8980 mutex address early. Handle cancellation state as 32-bit value.
8981 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8982 Remove unnecessary label.
8983
8984 2003-05-25 Ulrich Drepper <drepper@redhat.com>
8985
8986 * sysdeps/pthread/pthread_cond_broadcast.c: Try using FUTEX_REQUEUE
8987 instead of FUTEX_WAIT.
8988 * sysdeps/pthread/pthread_cond_signal.c: Likewise.
8989 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
8990 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
8991 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
8992 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
8993 * sysdeps/pthread/pthread_cond_timedwait.c: Remember mutex which was
8994 used in condvar structure. Call __pthread_mutex_cond_lock instead
8995 of __pthread_mutex_lock_internal.
8996 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8997 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8998 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
8999 (__condvar_cleanup): Always call __pthread_mutex_cond_lock.
9000 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
9001 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
9002 * sysdeps/unix/sysv/linux/Makefile (libpthread-sysdep_routines):
9003 Add pthread_mutex_cond_lock.
9004 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add dep_mutex.
9005 * sysdeps/unix/sysv/linux/pthread_cond_mutex_lock.c: New file.
9006 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define
9007 lll_mutex_cond_lock.
9008 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
9009 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
9010 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
9011 Add __mutex field.
9012 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
9013 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
9014
9015 * sysdeps/i386/tcb-offsets.sym: Define MUTEX_FUTEX.
9016 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
9017
9018 * pthreadP.h: Declare __pthread_mutex_cond_lock.
9019 * pthread_mutex_lock.c: Define LLL_MUTEX_LOCK if not already defined.
9020 Use it instead of lll_mutex_lock. If __pthread_mutex_lock is a
9021 macro don't define aliases.
9022
9023 * cancellation.c: Remove __pthread_enable_asynccancel_2.
9024 * pthreadP.h: Remove declaration of __pthread_enable_asynccancel_2.
9025 * sysdeps/pthread/pthread_cond_timedwait.c: Use
9026 __pthread_enable_asynccancel instead of __pthread_enable_asynccancel_2.
9027 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9028 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
9029 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
9030 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
9031 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
9032
9033 2003-05-17 Ulrich Drepper <drepper@redhat.com>
9034
9035 * sem_open.c: Fix one endless loop. Implement correct semantics
9036 wrt opening the same semaphore more then once.
9037 * sem_close.c: Adjust for sem_open change.
9038 * semaphoreP.h: Include <semaphore.h>. Define struct inuse_sem.
9039 Declare __sem_mappings, __sem_mappings_lock, __sem_search.
9040 * Makefile (tests): Add tst-sem7.
9041 * tst-sem7.c: New file.
9042
9043 2003-05-16 Roland McGrath <roland@redhat.com>
9044
9045 * sysdeps/unix/sysv/linux/register-atfork.c (libc_freeres_fn): Fix
9046 uninitialized variable braino.
9047
9048 2003-05-16 Ulrich Drepper <drepper@redhat.com>
9049
9050 * sysdeps/unix/sysv/linux/timer_gettime.c (timer_gettime): Correct
9051 test for syscall availability.
9052
9053 * sysdeps/unix/sysv/linux/timer_settime.c (timer_settime): Set
9054 __no_posix_timers to -1 if the syscalls don't exist.
9055
9056 * pthread_join.c (pthread_join): Set tid field of the joined
9057 thread to -1. This isn't necessary but helps to recognize some
9058 error conditions with almost no cost.
9059
9060 * allocatestack.c (FREE_P): Also negative values indicate an
9061 unused stack.
9062
9063 * unwind.c: Include <unistd.h>.
9064
9065 2003-05-14 Ulrich Drepper <drepper@redhat.com>
9066
9067 * Makefile ($(objpfx)$(multidir)): Add rule to create the directory.
9068
9069 2003-05-14 Jakub Jelinek <jakub@redhat.com>
9070
9071 * Makefile (crti-objs, crtn-objs): New variables.
9072 (omit-deps, extra-objs): Add crtn.
9073 ($(objpfx)libpthread.so): Depend on both crti and crtn
9074 and links to them in multidir.
9075 ($(objpfx)crtn.S, $(objpfx)crtn.o): New rules.
9076
9077 2003-05-12 Steven Munroe <sjmunroe@us.ibm.com>
9078
9079 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
9080 (lll_mutex_unlock): Use atomic_exchange_rel.
9081
9082 2003-05-11 Ulrich Drepper <drepper@redhat.com>
9083
9084 * cond-perf.c (cons): Add missing locking around setting of alldone.
9085
9086 2003-05-10 Ulrich Drepper <drepper@redhat.com>
9087
9088 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Remove futex
9089 related macros.
9090 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
9091
9092 2003-05-09 Ulrich Drepper <drepper@redhat.com>
9093
9094 * tst-sem6.c: New file.
9095 * Makefile (tests): Add tst-sem6.
9096
9097 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (___lll_mutex_unlock):
9098 Use atomic_exchange_rel instead of atomic_exchange.
9099 * sysdeps/unix/sysv/linux/lowlevellock.c (lll_unlock_wake_cb):
9100 Likewise.
9101
9102 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Improve quality of
9103 code for lll_futex_wait and lll_futex_wake in static apps. Use
9104 vsyscall is possible.
9105
9106 * sysdeps/unix/sysv/linux/pthread_getaffinity.c: New file.
9107 * sysdeps/unix/sysv/linux/pthread_setaffinity.c: New file.
9108 * sysdeps/pthread/pthread.h: Declare pthread_getaffinity_np and
9109 pthread_setaffinity_np.
9110 * Versions [libpthread] (GLIBC_2.3.3): Add pthread_getaffinity_np
9111 and pthread_setaffinity_np.
9112 * Makefile (libpthread-routines): Add pthread_getaffinity and
9113 pthread_setaffinity.
9114
9115 * allocatestack.c (allocate_stack): If ARCH_RETRY_MMAP is defined,
9116 use it in case mmap to allocate the stack fails.
9117 * sysdeps/unix/sysv/linux/x86_64/Makefile: Don't define
9118 ARCH_MAP_FLAGS here.
9119 * sysdeps/x86_64/pthreaddef.h: Define ARCH_MAP_FLAGS and
9120 ARCH_RETRY_MMAP.
9121
9122 2003-05-08 Ulrich Drepper <drepper@redhat.com>
9123
9124 * sysdeps/unix/sysv/linux/fork.c: Complete rewrite of the atfork
9125 handler implementation. It is now lockless in fork().
9126 * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
9127 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
9128 * sysdeps/unix/sysv/linux/fork.h: Don't include <link.h>. Don't
9129 declare the __fork_*_lists.
9130 (struct fork_handler): Include pointers to all three functions.
9131 Add next, refcntr and need_signal elements.
9132 (__fork_handlers): New declaration.
9133 (__register_atfork_malloc): Remove declaration.
9134 (HAVE_register_atfork_malloc): Remove definition.
9135 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove
9136 __pthread_child_handler variable.
9137 (__libc_pthread_init): Use __register_atfork instead of explicitly
9138 adding to the list.
9139 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define lll_futex_wait
9140 and lll_futex_wake.
9141 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
9142
9143 * unwind.c (unwind_cleanup): Print error message and then abort. This
9144 function must never be reached.
9145
9146 * cond-perf.c: New file.
9147
9148 2003-05-05 Ulrich Drepper <drepper@redhat.com>
9149
9150 * sysdeps/i386/tls.h (TLS_INIT_TP): Include \n in error message.
9151
9152 2003-05-04 Roland McGrath <roland@redhat.com>
9153
9154 * Makefile ($(objpfx)../libc.so): New target.
9155
9156 2003-05-02 Ulrich Drepper <drepper@redhat.com>
9157
9158 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
9159 (pthread_condattr_t): Size is only an int, don't use long for
9160 alignment.
9161 (pthread_mutexattr_t): Likewise.
9162 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
9163 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
9164 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
9165
9166 2003-05-01 Ulrich Drepper <drepper@redhat.com>
9167
9168 * sysdeps/i386/tls.h: Define THREAD_ID.
9169 * sysdeps/ia64/tls.h: Likewise.
9170 * sysdeps/powerpc/tls.h: Likewise.
9171 * sysdeps/s390/tls.h: Likewise.
9172 * sysdeps/sh/tls.h: Likewise.
9173 * sysdeps/x86_64/tls.h: Likewise.
9174 * pthread_mutex_lock.c: Use THREAD_ID instead of THREAD_SELF to
9175 record ownership.
9176 * pthread_mutex_timedlock.c: Likewise.
9177 * pthread_mutex_trylock.c: Likewise.
9178 * pthread_mutex_unlock.c: Likewise.
9179 * pthread_rwlock_trywrlock.c: Likewise.
9180 * sysdeps/pthread/pthread_rwlocklock_rdlock.c: Likewise.
9181 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
9182 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
9183 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
9184
9185 * sysdeps/pthread/createthread.c (create_thread): Use CLONE_SYSVSEM
9186 flag.
9187
9188 2003-04-29 Jakub Jelinek <jakub@redhat.com>
9189
9190 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
9191 (__SIZEOF_PTHREAD_COND_T): Define to 48.
9192 (pthread_rwlock_t): Add 16 bytes of pad instead of 8 before __flags.
9193 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
9194 Make __align long long instead of long.
9195 (pthread_rwlock_t): Formatting.
9196 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
9197 (pthread_rwlock_t): Formatting.
9198 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
9199 (pthread_cond_t): Make __align long long instead of long.
9200 (pthread_rwlock_t): Move __flags field to the same position as in
9201 linuxthreads.
9202
9203 2003-04-30 Ulrich Drepper <drepper@redhat.com>
9204
9205 * tst-rwlock6.c (do_test): Use correct printf format specifiers.
9206 * tst-rwlock7.c (do_test): Likewise.
9207
9208 2003-04-26 Roland McGrath <roland@redhat.com>
9209
9210 * Makefile ($(test-modules)): Depend on $(common-objpfx)shlib.lds.
9211
9212 2003-04-22 Jakub Jelinek <jakub@redhat.com>
9213
9214 * allocatestack.c (TLS_TPADJ): Add TLS_PRE_TCB_SIZE instead of
9215 sizeof (struct pthread).
9216 (allocate_stack): Subtract TLS_PRE_TCB_SIZE bytes instead of
9217 1 struct pthread.
9218 * sysdeps/powerpc/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Define
9219 to 0.
9220 (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Define to alignment of
9221 struct pthread.
9222 (TLS_PRE_TCB_SIZE): Increase to cover tcbhead_t preceeded by pad
9223 to 32-bit bytes.
9224 (INSTALL_DTV, GET_DTV, THREAD_DTV): tcbhead_t is immediately before
9225 tcbp.
9226 (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Don't add TLS_TCB_SIZE
9227 unneccessarily.
9228 (NO_TLS_OFFSET): Define.
9229 * sysdeps/unix/sysv/linux/powerpc/createthread.c (TLS_VALUE): Don't
9230 add TLS_TCB_SIZE unnecessarily.
9231
9232 2003-04-22 Roland McGrath <roland@redhat.com>
9233
9234 * Makeconfig (shared-thread-library): Reverse link order to work
9235 around linker bug.
9236
9237 2003-04-22 Ulrich Drepper <drepper@redhat.com>
9238
9239 * semaphore.h: Fix typo in comment.
9240
9241 2003-04-21 Ulrich Drepper <drepper@redhat.com>
9242
9243 * sysdeps/pthread/sigfillset.c: New file.
9244
9245 * init.c (__pthread_initialize_minimal): Don't block SIGTIMER.
9246 * pthreadP.h: Make SIGTIMER and SIGCANCEL the same.
9247 * sysdeps/pthread/pthread_sigmask.c: Remove handling of SIGTIMER.
9248 * sysdeps/pthread/sigaction.c: Likewise.
9249 * sysdeps/pthread/sigprocmask.c: New file.
9250 * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): Define as
9251 __SIGRTMIN+1.
9252 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
9253 Block SIGTIMER. Also handle SI_TKILL events and terminate thread
9254 in this case.
9255
9256 2003-04-19 Ulrich Drepper <drepper@redhat.com>
9257
9258 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
9259 (DL_SYSINFO_IMPLEMENTATION): Add .eh_frame information.
9260
9261 * sysdeps/unix/sysv/linux/unregister-atfork.c
9262 (__unregister_atfork): Don't free memory not allocated dynamically.
9263
9264 * semaphore.h: Remove __THROW marker from cancellation points.
9265 * nptl/sysdeps/pthread/pthread.h: Likewise.
9266
9267 2003-04-18 Ulrich Drepper <drepper@redhat.com>
9268
9269 * sysdeps/pthread/pthread.h: Don't mark pthread_testcancel,
9270 pthread_cancel, pthread_setcancelstate, and pthread_setcanceltype with
9271 __THROW.
9272
9273 2003-04-16 Jakub Jelinek <jakub@redhat.com>
9274
9275 * tst-cancel4.c (do_test): Use %zd instead of %d when printing cnt.
9276
9277 2003-04-15 Roland McGrath <roland@redhat.com>
9278
9279 * forward.c (__pthread_unwind): Tweak to avoid warning.
9280
9281 2003-04-15 Ulrich Drepper <drepper@redhat.com>
9282
9283 * pthreadP.h: Move THREAD_ATOMIC_* replacements to the top.
9284
9285 2003-04-14 Ulrich Drepper <drepper@redhat.com>
9286
9287 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Don't
9288 overflow CFA advance instructions.
9289 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
9290
9291 2003-04-14 Jakub Jelinek <jakub@redhat.com>
9292
9293 * sysdeps/i386/tls.h: Rename LOCK to LOCK_PREFIX.
9294 * sysdeps/i386/pthread_spin_lock.c: Likewise.
9295 * sysdeps/x86_64/tls.h: Likewise. Define LOCK_PREFIX if not already
9296 defined.
9297
9298 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Use
9299 DW_CFA_advance_loc2 for .Laddl-.Lsubl.
9300 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
9301 DW_CFA_advance_loc for .Laddl-.Lsubl.
9302
9303 2003-04-13 Ulrich Drepper <drepper@redhat.com>
9304
9305 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Don't use
9306 position-independent unwind data for static libraries.
9307 Add missing unwind info. Add comments.
9308
9309 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Add unwind info.
9310 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
9311 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
9312 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9313
9314 2003-04-12 Ulrich Drepper <drepper@redhat.com>
9315
9316 * Makefile: Make sure all cancellation points are compiled with
9317 exception and asynchronous unwind tables.
9318
9319 * sysdeps/x86_64/tls.h (THREAD_SETMEM): Word around compiler bug
9320 which mishandles loading of global object addresses in PIC.
9321 (THREAD_SETMEM_NC): Likewise.
9322
9323 2003-04-11 Ulrich Drepper <drepper@redhat.com>
9324
9325 * pthread.h: Define new data structure for cleanup buffer. Declare
9326 new cleanup handler interfaces.
9327 * descr.h: Include <unwind.h> if necessary. Define pthread_unwind_buf.
9328 (struct pthread): Add cleanup_jmp_buf pointer. Define
9329 HAVE_CLEANUP_JMP_BUF and not HAVE_CANCELBUF.
9330 * pthreadP.h: Declare __pthread_unwind. Define __do_cancel to use
9331 it. Declare old cleanup handler installation functions.
9332 * cleanup.c: Rewrite. Install handler for unwind-based cleanup
9333 handling.
9334 * cleanup_defer.c: Likewise.
9335 * cleanup_compat.c: New file. Old cleanup code.
9336 * cleanup_def_compat.c: New file. Old cleanup code.
9337 * pthread_create.c (start_thread): Initialize cleanup_jmp_buf element
9338 if own thread descriptor.
9339 * unwind.c: New file.
9340 * forward.c: Add __pthread_unwind.
9341 * init.c (pthread_functions): Add __pthread_unwind.
9342 * sysdeps/pthread/pthread-functions.s (struct pthread_functions):
9343 Add ptr___pthread_unwind.
9344 * Versions [GLIBC_2.3.3] (libpthread): Export new cleanup handling
9345 and unwind function.
9346 * Makefile (libpthread-routines): Add cleanup_compat,
9347 cleanup_def_compat, and unwind. Define CFLAGS to enable unwind
9348 table generation if necessary.
9349 * version.c: Record whether unwind support is compiled in.
9350 * sysdeps/pthread/configure.in: Add checks for unwind unterfaces.
9351 * sysdeps/pthread/bits/libc-lock.h: Add prototypes of the old cleanup
9352 handler interfaces.
9353 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add quite a bit of
9354 complication to generate unwind information for syscall wrappers.
9355 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
9356 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
9357 __cleanup_fct_attribute.
9358
9359 * Makefile: Add rules to build and run tst-cleanup0.
9360 * tst-cleanup0.c: New file.
9361 * tst-cleanup0.expect: New file.
9362
9363 * pthread_create.c (deallocate_tsd): Don't take parameter. Adjust
9364 caller. Optimize to avoid often unecessary local variable.
9365
9366 2003-04-11 Roland McGrath <roland@redhat.com>
9367
9368 * Makefile ($(objpfx)multidir.mk): New target, generated makefile that
9369 sets variable `multidir'; include that.
9370 (generated): Add it.
9371 ($(objpfx)$(multidir)/crti.o): New target.
9372 [$(multidir) != .] (generated-dirs, extra-objs, omit-deps): Add it.
9373
9374 2003-04-11 Ulrich Drepper <drepper@redhat.com>
9375
9376 * tst-attr2.c (do_test): Add cast to avoid warning.
9377 * tst-mutex4.c (do_test): Likewise.
9378
9379 2003-04-10 Ulrich Drepper <drepper@redhat.com>
9380
9381 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset CPU clocks
9382 in child.
9383
9384 2003-04-09 Ulrich Drepper <drepper@redhat.com>
9385
9386 * Makefile (tests): Add tst-detach1.
9387 * tst-detach1.c: New file.
9388
9389 2003-04-08 Ulrich Drepper <drepper@redhat.com>
9390
9391 * sysdeps/pthread/pthread.h: Remove duplicate
9392 pthread_cleanup_{push,pop} definitions.
9393
9394 * tst-barrier2.c: Eliminate warnings.
9395 * tst-cancel4.c: Likewise.
9396 * tst-cond4.c: Likewise.
9397 * tst-cond6.c: Likewise.
9398 * tst-detach1.c: Likewise.
9399 * tst-rwlock4.c: Likewise.
9400 * tst-rwlock6.c: Likewise.
9401 * tst-rwlock7.c: Likewise.
9402 * tst-sem3.c: Likewise.
9403 * tst-spin2.c: Likewise.
9404 * tst-umask1.c: Likewise.
9405
9406 2003-04-07 Ulrich Drepper <drepper@redhat.com>
9407
9408 * pthread_detach.c (pthread_detach): Fix test for invalid TID.
9409
9410 2003-04-06 Ulrich Drepper <drepper@redhat.com>
9411
9412 * descr.h (struct pthread): Move cancelhandling member to the front.
9413
9414 2003-04-05 Ulrich Drepper <drepper@redhat.com>
9415
9416 * sysdeps/unix/sysv/linux/register-atfork.c: Define malloc_prepare,
9417 malloc_parent, and malloc_child statically.
9418 (__register_atfork_malloc): New function.
9419 (free_mem): Don't free any of the malloc_* variables on the list.
9420 * sysdeps/unix/sysv/linux/fork.h: Declare __register_atfork_malloc.
9421 Define HAVE_register_atfork_malloc.
9422
9423 2003-04-04 Ulrich Drepper <drepper@redhat.com>
9424
9425 * sysdeps/pthread/createthread.c (create_thread): Add some more
9426 comments explaining when to set multiple_threads and when not.
9427
9428 * pthreadP.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
9429 THREAD_ATOMIC_BIT_SET if not already defined.
9430 * sysdeps/i386/tls.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
9431 THREAD_ATOMIC_BIT_SET:
9432 * sysdeps/x86_64/tls.h: Likewise.
9433 * cleanup_defer.c (_pthread_cleanup_push_defer): Rewrite to use
9434 THREAD_ATOMIC_CMPXCHG_VAL.
9435 (_pthread_cleanup_pop_restore): Likewise.
9436 * cancellation.c (__pthread_enable_asynccancel): Likewise.
9437 (__pthread_enable_asynccancel_2): Likewise.
9438 (__pthread_disable_asynccancel): Likewise.
9439 * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
9440 (__libc_disable_asynccancel): Likewise.
9441 * init.c (sigcancel_handler): Likewise.
9442 * pthread_setcancelstate.c (__pthread_setcancelstate): Likewise.
9443 * pthread_setcanceltype.c (__pthread_setcanceltype): Likewise.
9444
9445 2003-04-03 Ulrich Drepper <drepper@redhat.com>
9446
9447 * init.c (sigcancel_handler): Don't set EXITING_BIT here.
9448 * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
9449 * pthreadP.h (__do_cancel): Set EXITING_BIT here.
9450 * Makefile (tests): Add tst-cancel11.
9451 * tst-cancel11.c: New file.
9452
9453 2003-04-01 Ulrich Drepper <drepper@redhat.com>
9454
9455 * pthread_create.c (deallocate_tsd): Clear/free memory after the last
9456 round, not the first. Use specific_used flag instead of local
9457 found_nonzero variable. Use THREAD_[SG]ETMEM where possible.
9458 (__free_tcb): Don't call deallocate_tsd here.
9459 (start_thread): Call deallocate_tsd here.
9460 * pthread_setspecific.c: Set specific_used flag really only when
9461 needed.
9462 * Makefile (tests): Add tst-tsd3.c and tst-tsd4.
9463 * tst-tsd3.c: New file.
9464 * tst-tsd4.c: New file.
9465
9466 2003-03-31 Ulrich Drepper <drepper@redhat.com>
9467
9468 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_mutex_lock):
9469 Use atomic_exchange_and_add instead of __lll_add.
9470 (__lll_mutex_timedlock): Likewise.
9471 Patch by Ian Wienand.
9472
9473 2003-03-24 Steven Munroe <sjmunroe@us.ibm.com>
9474
9475 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
9476 (SINGLE_THREAD_P): Fix typo.
9477 * tst-cancel-wrappers.sh: Handle '.'ed symbols.
9478
9479 2003-03-31 Ulrich Drepper <drepper@redhat.com>
9480
9481 * Makefile (tests): Add tst-align.
9482 * tst-align.c: New file.
9483 * sysdeps/i386/Makefile: Define CFLAGS-tst-align.
9484
9485 * sysdeps/i386/tls.h (CALL_THREAD_FCT): Align stack of called
9486 function correctly.
9487
9488 * tst-tsd2.c: Add casts to avoid warnings.
9489
9490 2003-03-30 Ulrich Drepper <drepper@redhat.com>
9491
9492 * descr.h (struct pthread): Move most often used elements to the front.
9493
9494 2003-03-29 Ulrich Drepper <drepper@redhat.com>
9495
9496 * Makefile (libpthread-routines): Add pthread_atfork.
9497 (libpthread-static-only-routines): Add pthread_atfork.
9498
9499 2003-03-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
9500
9501 * sysdeps/sh/tls.h: Include nptl/descr.h after the definition
9502 of TLS_DTV_AT_TP.
9503 (INSTALL_DTV): Add parens.
9504 (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
9505 Use passed descr instead of THREAD_SELF.
9506 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S
9507 (__lll_mutex_timedlock_wait): Correct expected value after
9508 spurious wakeup.
9509 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S:
9510 Release lock before waking up the waiters.
9511 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Correct exit
9512 criteria. Reorderstruct passed to cleanup handler. Fix
9513 handling of cancellation and failung pthread_mutex_unlock call.
9514 Use __pthread_enable_asynccancel_2 instead of
9515 __pthread_enable_asynccancel.
9516 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
9517 Return result of lock re-get if it fails.
9518 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Fix wrong argument
9519 for __pthread_cleanup_push.
9520 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Fix
9521 completely broken rwlock implementation.
9522 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
9523 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
9524 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
9525 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
9526 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
9527 * sysdeps/unix/sysv/linux/sh/sem_post.S: Fix error value. Use
9528 versioned_symbol macro.
9529 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Use versioned_symbol macro.
9530 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
9531
9532 2003-03-27 Ulrich Drepper <drepper@redhat.com>
9533
9534 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Don't declare
9535 __timer_helper_thread. Declare __start_helper_thread, __helper_once,
9536 and __helper_tid.
9537 (struct timer): Remove th and bar field.
9538 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Remove
9539 debugging code. Create only one helper thread.
9540 * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Don't kill
9541 helper thread.
9542 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
9543 Renamed. Define statically. Use thread info from siginfo.
9544 (__helper_once): New variable.
9545 (__helper_tid): New variable.
9546 (__reset_helper_control): New function.
9547 (__start_helper_thread): New function.
9548
9549 * pthread_create.c (start_thread): Don't use setjmp inside
9550 __builtin_expect to work around gcc bug.
9551
9552 * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Even if
9553 timer_delete syscall fails, but not with ENOSYS, set
9554 __no_posix_timers.
9555
9556 * sysdeps/unix/sysv/linux/timer_settime.c [!__ASSUME_POSIX_TIMERS]
9557 (timer_settime): Fix typo.
9558 * sysdeps/unix/sysv/linux/timer_getoverr.c
9559 [!__ASSUME_POSIX_TIMERS] (timer_getoverrun): Likewise.
9560
9561 2003-03-27 Jakub Jelinek <jakub@redhat.com>
9562
9563 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Fix
9564 offset of cleanupbuf.__prev.
9565
9566 2003-03-26 Jakub Jelinek <jakub@redhat.com>
9567
9568 * sysdeps/unix/sysv/linux/timer_getoverr.c: Fix typo in name
9569 of included file.
9570
9571 2003-03-26 Ulrich Drepper <drepper@redhat.com>
9572
9573 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): If EVP ==
9574 NULL provide default definition to syscall.
9575
9576 2003-03-25 Roland McGrath <roland@redhat.com>
9577
9578 * sysdeps/pthread/posix-timer.h (TIMER_MAX): Define if not defined.
9579 (timer_id2ptr): Fix typo.
9580
9581 2003-03-25 Ulrich Drepper <drepper@redhat.com>
9582
9583 * pthreadP.h: Define SIGCANCEL and SIGTIMER.
9584 * sysdeps/i386/pthreaddef.h: Remove SIGCANCEL definition.
9585 * sysdeps/ia64/pthreaddef.h: Likewise.
9586 * sysdeps/powerpc/pthreaddef.h: Likewise.
9587 * sysdeps/s390/pthreaddef.h: Likewise.
9588 * sysdeps/sh/pthreaddef.h: Likewise.
9589 * sysdeps/x86_64/pthreaddef.h: Likewise.
9590 * init.c (__pthread_initialize_minimal): Block SIGTIMER.
9591 * sysdeps/pthread/sigaction.c: Also prevent SIGTIMER handler from
9592 being changed.
9593 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
9594 SIGTIMER is not unblocked.
9595 * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): One more
9596 RT signal taken.
9597 * sysdeps/unix/sysv/linux/pthread_kill.c: Do not allow SIGTIMER to
9598 be send.
9599 * sysdeps/pthread/posix-timer.h (timer_id2ptr, timer_ptr2id): Just
9600 pass pointer through as ID.
9601 * sysdeps/unix/sysv/linux/bits/local_lim.h (TIMER_MAX): Removed.
9602 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: New file.
9603 * sysdeps/unix/sysv/linux/timer_create.c: New file.
9604 * sysdeps/unix/sysv/linux/timer_delete.c: New file.
9605 * sysdeps/unix/sysv/linux/timer_getoverr.c: New file.
9606 * sysdeps/unix/sysv/linux/timer_gettime.c: New file.
9607 * sysdeps/unix/sysv/linux/timer_routines.c: New file.
9608 * sysdeps/unix/sysv/linux/timer_settime.c: New file.
9609 * sysdeps/unix/sysv/linux/ia64/Versions: New file.
9610 * sysdeps/unix/sysv/linux/ia64/timer_create.c: New file.
9611 * sysdeps/unix/sysv/linux/ia64/timer_delete.c: New file.
9612 * sysdeps/unix/sysv/linux/ia64/timer_getoverr.c: New file.
9613 * sysdeps/unix/sysv/linux/ia64/timer_gettime.c: New file.
9614 * sysdeps/unix/sysv/linux/ia64/timer_settime.c: New file.
9615 * sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions: New file.
9616 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_create.c: New file.
9617 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_delete.c: New file.
9618 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_getoverr.c: New file.
9619 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_gettime.c: New file.
9620 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_settime.c: New file.
9621 * sysdeps/unix/sysv/linux/s390/s390-64/Versions: New file.
9622 * sysdeps/unix/sysv/linux/s390/s390-64/timer_create.c: New file.
9623 * sysdeps/unix/sysv/linux/s390/s390-64/timer_delete.c: New file.
9624 * sysdeps/unix/sysv/linux/s390/s390-64/timer_getoverr.c: New file.
9625 * sysdeps/unix/sysv/linux/s390/s390-64/timer_gettime.c: New file.
9626 * sysdeps/unix/sysv/linux/s390/s390-64/timer_settime.c: New file.
9627 * sysdeps/unix/sysv/linux/x86_64/Versions: New file.
9628 * sysdeps/unix/sysv/linux/x86_64/compat-timer.h: New file.
9629 * sysdeps/unix/sysv/linux/x86_64/timer_create.c: New file.
9630 * sysdeps/unix/sysv/linux/x86_64/timer_delete.c: New file.
9631 * sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c: New file.
9632 * sysdeps/unix/sysv/linux/x86_64/timer_gettime.c: New file.
9633 * sysdeps/unix/sysv/linux/x86_64/timer_settime.c: New file.
9634
9635 * pthreadP.h: Remove FRAME_LEFT definition.
9636 * cleanup.c (_pthread_cleanup_push): Don't check for reference to
9637 already left frame. Programs which have this problem are not POSIX
9638 compliant.
9639 * cleanup_defer.c (_pthread_cleanup_push_defer): Likewise.
9640
9641 2003-03-24 Ulrich Drepper <drepper@redhat.com>
9642
9643 * sysdeps/pthread/tst-timer.c: Check return values of the
9644 functions we test.
9645
9646 2003-03-23 Roland McGrath <roland@redhat.com>
9647
9648 * tst-tls3.c (do_test) [! HAVE___THREAD]: Don't test anything.
9649 * tst-tls3mod.c: Likewise.
9650 * tst-tls1.c: Likewise.
9651 * tst-tls2.c: Likewise.
9652
9653 * tst-mutex5.c (do_test): Unlock before destroy, otherwise we invoke
9654 undefined behavior.
9655
9656 * tst-join5.c (tf1, tf2): Add a cast.
9657
9658 * Makeconfig (includes): Append -I$(..)nptl to this variable.
9659
9660 * tst-barrier2.c (do_test) [! _POSIX_THREAD_PROCESS_SHARED]:
9661 Don't test anything.
9662 * tst-cond4.c: Likewise.
9663 * tst-cond6.c: Likewise.
9664 * tst-flock2.c: Likewise.
9665 * tst-mutex4.c: Likewise.
9666 * tst-rwlock4.c: Likewise.
9667 * tst-signal1.c: Likewise.
9668 * tst-spin2.c: Likewise.
9669 * tst-cond11.c [! _POSIX_CLOCK_SELECTION]: Likewise.
9670
9671 * tst-mutex4.c: Use test-skeleton.c.
9672 * tst-spin2.c: Likewise.
9673 * tst-sysconf.c: Likewise.
9674 * tst-barrier2.c: Likewise.
9675 * tst-cond4.c: Likewise.
9676 * tst-cond6.c: Likewise.
9677 * tst-rwlock4.c: Likewise.
9678 * tst-unload.c: Likewise.
9679 * tst-flock2.c (do_test): Use return instead of exit.
9680
9681 2003-03-22 Jakub Jelinek <jakub@redhat.com>
9682
9683 * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
9684
9685 2003-03-21 Ulrich Drepper <drepper@redhat.com>
9686
9687 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
9688 (__lll_mutex_trylock): Use atomic_compare_and_exchange_val_acq
9689 instead of __lll_compare_and_swap.
9690 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
9691 Likewise.
9692 Removed definition if __lll_compare_and_swap.
9693
9694 * cancellation.c: Adjust for new form of compare&exchange macros.
9695 * cleanup_defer.c: Likewise.
9696 * init.c: Likewise.
9697 * libc-cancellation.c: Likewise.
9698 * old_pthread_cond_broadcast.c: Likewise.
9699 * old_pthread_cond_signal.c: Likewise.
9700 * old_pthread_cond_timedwait.c: Likewise.
9701 * old_pthread_cond_wait.c: Likewise.
9702 * pthread_cancel.c: Likewise.
9703 * pthread_create.c: Likewise.
9704 * pthread_detach.c: Likewise.
9705 * pthread_join.c: Likewise.
9706 * pthread_key_delete.c: Likewise.
9707 * pthread_setcancelstate.c: Likewise.
9708 * pthread_setcanceltype.c: Likewise.
9709 * pthread_timedjoin.c: Likewise.
9710 * pthread_tryjoin.c: Likewise.
9711 * sysdeps/pthread/createthread.c: Likewise.
9712
9713 2003-03-20 Ulrich Drepper <drepper@redhat.com>
9714
9715 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Include <atomic.h>.
9716 Remove __lll_add, __lll_dec_if_positive, and __lll_test_and_set
9717 definitions. Replace uses with calls to atomic_* functions.
9718 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
9719 * sysdeps/unix/sysv/linux/lowlevellock.c: Replace __lll_add and
9720 __lll_test_and_set calls with atomic_exchange_and_add and
9721 atomic_exchange calls respectively.
9722 * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
9723 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
9724 * sysdeps/unix/sysv/linux/sem_trywait.c: Likewise.
9725 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
9726 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Likewise.
9727 * sysdeps/unix/sysv/linux/ia64/sem_port.c: Likewise.
9728 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
9729
9730 * allocatestack.c (allocate_stack): Assume atomic_exchange_and_add
9731 returns the old value.
9732
9733 2003-03-20 Martin Schwidefsky <sky@mschwid3.boeblingen.de.ibm.com>
9734
9735 * sysdeps/s390/pthread_spin_lock.c (pthread_spin_lock): Use type
9736 int for variable OLDVAL and correct inline assembler contraint.
9737 * sysdeps/s390/pthread_spin_trylock.c (pthread_spin_trylock): Use
9738 type int for variable OLD.
9739
9740 * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it
9741 only for s390-32.
9742 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
9743 (SINGLE_THREAD_P): Use global variable __local_multiple_threads
9744 instead of multiple_threads field in the TCB.
9745
9746 2003-03-19 Ulrich Drepper <drepper@redhat.com>
9747
9748 * sysdeps/i386/i686/bits/atomic.h: Removed.
9749 * sysdeps/i386/i586/bits/atomic.h: Removed.
9750 * sysdeps/i386/i486/bits/atomic.h: Removed. Moved to glibc.
9751 * sysdeps/x86_64/bits/atomic.h: Removed. Moved to glibc.
9752 * sysdeps/s390/bits/atomic.h: Removed. Moved to glibc.
9753 * sysdeps/sh/bits/atomic.h: Removed. Moved to glibc.
9754 * sysdeps/ia64/bits/atomic.h: Removed. Moved to glibc.
9755 * sysdeps/powerpc/bits/atomic.h: Removed. Moved to glibc.
9756 * atomic.h: Removed. Moved to glibc.
9757
9758 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Add
9759 support for clock selection.
9760
9761 * sysdeps/pthread/pthread_cond_broadcast.c: Release lock before
9762 signalling waiters.
9763
9764 2003-03-18 Roland McGrath <roland@redhat.com>
9765
9766 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
9767 Add __lll_rel_instr first. Add memory clobber.
9768 (lll_mutex_unlock): Use __lll_test_and_set.
9769 From Paul Mackerras <paulus@samba.org>.
9770
9771 * sysdeps/powerpc/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define
9772 unconditionally.
9773 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
9774 (SINGLE_THREAD_P): Add `header.' prefix.
9775 From Paul Mackerras <paulus@samba.org>.
9776
9777 * Versions (libpthread: GLIBC_2.3.2): Move pthread_tryjoin_np and
9778 pthread_timedjoin_np to ...
9779 (libpthread: GLIBC_2.3.3): ... here.
9780 (libpthread: GLIBC_2.2): Move pthread_barrierattr_getpshared there too.
9781
9782 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
9783 Avoid shadowing VAL variable.
9784
9785 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
9786 New macro.
9787
9788 2003-03-18 Ulrich Drepper <drepper@redhat.com>
9789
9790 * Makefile (tests): Add tst-cond11.
9791 * tst-cond11.c: New file.
9792
9793 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Reorder
9794 struct passed to cleanup handler to eliminate one more
9795 instruction.
9796 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9797
9798 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
9799 (pthrad_cond_t): Replace __unused field with __clock.
9800
9801 * sysdeps/pthread/pthread_cond_wait.c: Release condvar lock before
9802 waken all waiters in cleanup handler.
9803 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
9804 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
9805
9806 * pthread_condattr_getclock.c: New file.
9807 * pthread_condattr_setclock.c: New file.
9808 * sysdeps/pthread/pthread.h: Declare these new functions.
9809 * Versions [GLIBC_2.3.3] (libpthread): Add the new functions.
9810 * Makefile (libpthread-routines): Add the new functions.
9811 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_condattr):
9812 Renamed field to value. Document use of the bits.
9813 * pthread_condattr_getpshared.c: Adjust for struct pthread_condattr
9814 change.
9815 * pthread_condattr_setpshared.c: Likewise.
9816 * pthread_cond_init.c (__pthread_cond_init): Initialized __clock field.
9817 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add cond_clock symbol.
9818 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
9819 Add __clock field.
9820 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
9821 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
9822 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
9823 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
9824 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
9825 Implement clock selection.
9826 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
9827 * pthread-errnos.sym: Add ENOSYS.
9828 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
9829 _POSIX_CLOCK_SELECTION.
9830 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
9831
9832 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Remove
9833 invalid .size directive.
9834
9835 2003-03-17 Roland McGrath <roland@redhat.com>
9836
9837 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
9838 Formatting tweaks.
9839
9840 2003-03-17 Ulrich Drepper <drepper@redhat.com>
9841
9842 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Use __builtin_expect.
9843 Use __lll_add instead of spelling it out. Use protected symbol names.
9844 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Use __builtin_expect.
9845 Use __lll_add.
9846 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_compare_and_swap):
9847 Renamed from lll_compare_and_swap. Use new name where necessary.
9848 (__lll_add): Defined.
9849 (__lll_dec_if_positive): Defined.
9850 (__lll_test_and_set): Defined.
9851 * sysdeps/ia64/pthread_spin_init.c: Removed.
9852 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Removed.
9853 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Removed.
9854 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Removed.
9855 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Removed.
9856 * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: Removed.
9857 * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: Removed.
9858 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Removed.
9859 * sysdeps/ia64/bits/atomic.h: Add __builtin_expect where appropriate.
9860 * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
9861 __sync_lock_release_si.
9862 Patch by Jakub Jelinek.
9863
9864 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
9865 Fix timeout handling.
9866 (__lll_timedwait_tid): Likewise.
9867 (lll_unlock_wake_cb): Wake up other waiters if necessary.
9868 Patch by Jakub Jelinek.
9869
9870 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Pretty printing.
9871
9872 2003-03-17 Roland McGrath <roland@redhat.com>
9873
9874 PowerPC port contributed by Paul Mackerras <paulus@samba.org>.
9875 * sysdeps/pthread/pthread_spin_init.c: New file.
9876 * sysdeps/pthread/pthread_spin_unlock.c: New file.
9877 * sysdeps/powerpc/Makefile: New file.
9878 * sysdeps/powerpc/pthread_spin_lock.c: New file.
9879 * sysdeps/powerpc/pthread_spin_trylock.c: New file.
9880 * sysdeps/powerpc/pthreaddef.h: New file.
9881 * sysdeps/powerpc/tcb-offsets.sym: New file.
9882 * sysdeps/powerpc/td_ta_map_lwp2thr.c: New file.
9883 * sysdeps/powerpc/tls.h: New file.
9884 * sysdeps/powerpc/bits/atomic.h: New file.
9885 * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: New file.
9886 * sysdeps/unix/sysv/linux/libc-lowlevellock.c: New file.
9887 * sysdeps/unix/sysv/linux/lowlevellock.c: New file.
9888
9889 * sysdeps/unix/sysv/linux/lowlevelmutex.c: New file.
9890 * sysdeps/unix/sysv/linux/sem_post.c: New file.
9891 * sysdeps/unix/sysv/linux/sem_timedwait.c: New file.
9892 * sysdeps/unix/sysv/linux/sem_trywait.c: New file.
9893 * sysdeps/unix/sysv/linux/sem_wait.c: New file.
9894 * sysdeps/unix/sysv/linux/powerpc/Makefile: New file.
9895 * sysdeps/unix/sysv/linux/powerpc/createthread.c: New file.
9896 * sysdeps/unix/sysv/linux/powerpc/fork.c: New file.
9897 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: New file.
9898 * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: New file.
9899 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: New file.
9900 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: New file.
9901 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: New file.
9902 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
9903 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New file.
9904
9905 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Use __gettimeofday,
9906 not gettimeofday.
9907 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Likewise.
9908 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
9909 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Likewise.
9910 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Likewise.
9911 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
9912
9913 2003-03-17 Ulrich Drepper <drepper@redhat.com>
9914
9915 * sysdeps/pthread/pthread_cond_wait.c: Correct exit criteria.
9916 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
9917 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9918 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
9919 Patch by Ewald Snel <ewald@rambo.its.tudelft.nl>.
9920
9921 2003-03-16 Roland McGrath <roland@redhat.com>
9922
9923 * tst-fork4.c: Include <string.h>.
9924 * tst-signal2.c: Likewise.
9925 * tst-mutex5.c (do_test): exit -> return.
9926 * tst-mutex2.c: Include <stdlib.h>.
9927
9928 2003-03-16 Ulrich Drepper <drepper@redhat.com>
9929
9930 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
9931 (__lll_mutex_timedlock_wait): Correct expected value after
9932 spurious wakeup. Otherwise we would never wait again.
9933
9934 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Work around red
9935 zone versus inline asm stupidity. Use correct instructions.
9936
9937 * tst-rwlock6.c: Add some more status output.
9938
9939 2003-03-15 Roland McGrath <roland@redhat.com>
9940
9941 * sysdeps/pthread/configure.in: New file.
9942 * sysdeps/pthread/configure: New file (generated).
9943
9944 2003-03-15 Ulrich Drepper <drepper@redhat.com>
9945
9946 * allocatestack.c (allocate_stack): Store the exact stack size of
9947 user allocated stacks.
9948
9949 2003-03-15 Jakub Jelinek <jakub@redhat.com>
9950
9951 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
9952 (SINGLE_THREAD): Use `header' prefix instead of `header.data'.
9953 * sysdeps/sh/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
9954 * sysdeps/sh/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define.
9955 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
9956 Use `header.' prefix.
9957 * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
9958
9959 2003-03-15 Ulrich Drepper <drepper@redhat.com>
9960
9961 * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Don't use
9962 __builtin_frame_address, use stack pointer.
9963
9964 * sysdeps/unix/sysv/linux/jmp-unwind.c: Use CURRENT_STACK_FRAME
9965 instead of __builtin_frame_pointer.
9966
9967 2003-03-14 Ulrich Drepper <drepper@redhat.com>
9968
9969 * tst-basic1.c (do_test): Add cast to avoid warning.
9970 * tst-basic2.c (do_test): Likewise.
9971
9972 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use correct
9973 amount of stack correction.
9974
9975 * tst-fork4.c: Use test-skeleton.c.
9976
9977 2003-03-14 Roland McGrath <roland@redhat.com>
9978
9979 * init.c: Fix typo "#eli" for "#else".
9980
9981 2003-03-14 Steven Munroe <sjmunroe@us.ibm.com>
9982
9983 * allocatestack.c (__stack_user): Use hidden_data_def.
9984 * pthread_create.c (__pthread_keys): Likewise.
9985
9986 * init.c [__powerpc__] (__NR_set_tid_address): Define it.
9987
9988 2003-03-14 Roland McGrath <roland@redhat.com>
9989
9990 * tst-fork4.c: New file.
9991 * Makefile (tests): Add it.
9992
9993 * descr.h (struct pthread): Move the union out of [!TLS_DTV_AT_TP], so
9994 we always define the padding space.
9995 [!TLS_DTV_AT_TP]: Give tcbhead_t field a name, `header', since GCC
9996 stopped supporting its own extensions fully.
9997 [TLS_MULTIPLE_THREADS_IN_TCB]: Put `multiple_threads' inside a wrapper
9998 struct also called `header', so `header.multiple_threads' is the field
9999 name to use on all machines.
10000 * allocatestack.c (allocate_stack): Use `header.' prefix.
10001 * sysdeps/pthread/createthread.c (create_thread): Likewise.
10002 * pthread_create.c (__pthread_create_2_1): Likewise.
10003 * sysdeps/i386/tls.h (INSTALL_NEW_DTV, THREAD_DTV): Likewise.
10004 (THREAD_SELF): Likewise.
10005 * sysdeps/x86_64/tls.h: Likewise.
10006 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
10007 (SINGLE_THREAD_P): Likewise.
10008 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
10009 (SINGLE_THREAD_P): Likewise.
10010 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
10011 (SINGLE_THREAD_P): Likewise.
10012
10013 * sysdeps/s390/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Use REGS[18]
10014 value directly.
10015
10016 2003-03-14 Ulrich Drepper <drepper@redhat.com>
10017
10018 * pthread_create.c (start_thread): Use CALL_THREAD_FCT if defined.
10019 * sysdeps/i386/tls.h: Define CALL_THREAD_FCT.
10020
10021 * pthread_create.c (start_thread): setjmp is expected to return 0.
10022
10023 * sysdeps/x86_64/tls.h (THREAD_GETMEM): Mark asms volatile.
10024 (THREAD_GETMEM_NC): Likewise.
10025
10026 2003-03-13 Ulrich Drepper <drepper@redhat.com>
10027
10028 * allocatestack.c (allocate_stack): If MULTI_PAGE_ALIASING is defined
10029 and the size of the stack which must be allocated is a multiple,
10030 allocate one more page.
10031 * sysdeps/i386/i686/Makefile: Don't define COLORING_INCREMENT, but
10032 MULTI_PAGE_ALIASING.
10033
10034 2003-03-13 Roland McGrath <roland@redhat.com>
10035
10036 * pthread_create.c (start_thread): Set EXITING_BIT after the
10037 event-reporting (and destructors), not before.
10038
10039 2003-03-13 Jakub Jelinek <jakub@redhat.com>
10040
10041 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_timed_wait,
10042 lll_futex_wake): Declare register variables as long int instead of
10043 unsigned long int. Patch by Ian Wienand <ianw@gelato.unsw.edu.au>.
10044 Make syscall arguments clobbered by the syscall.
10045 (lll_futex_wait): Define using lll_futex_timed_wait.
10046
10047 * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Cast regs[13]
10048 to void *.
10049
10050 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Only declare and set
10051 PPID if [! NDEBUG].
10052
10053 * allocatestack.c (nptl_ncreated): Only declare if
10054 COLORING_INCREMENT != 0.
10055
10056 * pthreadP.h (__pthread_enable_asynccancel_2): New prototype.
10057 (__libc_enable_asynccancel_2): Remove prototype.
10058
10059 * sysdeps/unix/sysv/linux/ia64/fork.c (ARCH_FORK): Swap ptid and
10060 ctid to match kernel.
10061
10062 2003-03-12 Ulrich Drepper <drepper@redhat.com>
10063
10064 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add
10065 libc_multiple_threads.
10066 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Move definition of
10067 __libc_multiple_threads to...
10068 * sysdeps/unix/sysv/linux/libc_multiple_threads.c: ...here. New file.
10069
10070 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Remove unnecessary
10071 versioning.
10072 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
10073 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
10074
10075 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
10076 (__pthread_once_internal): Define.
10077
10078 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Use shlib-compat.h
10079 macros instead of .symver directly.
10080 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
10081 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
10082
10083 * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Include tcb-offsets.h.
10084 * sysdeps/x86_64/tcb-offsets.sym: New file.
10085 * sysdeps/x86_64/Makefile: New file.
10086
10087 * sysdeps/i386/tcb-offsets.sym: Add SELF.
10088 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use SELF
10089 to access own pthread_t in TCB.
10090 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
10091 Likewise.
10092 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
10093 Likewise.
10094 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
10095
10096 2003-03-12 Roland McGrath <roland@redhat.com>
10097
10098 * pthread-errnos.sym: New file.
10099 * Makefile (gen-as-const-headers): New variable, list that file.
10100 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include generated
10101 header <pthread-errnos.h> instead of defining errno values here.
10102 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
10103 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
10104 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
10105 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
10106 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
10107 Likewise.
10108 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
10109 Likewise.
10110 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
10111 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10112 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
10113 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
10114 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
10115 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
10116 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
10117 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
10118 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
10119 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
10120 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
10121 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
10122 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
10123 * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
10124 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
10125 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
10126 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
10127 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
10128 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
10129 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
10130 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
10131 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
10132 * sysdeps/i386/i486/pthread_spin_trylock.S: Likewise.
10133 * sysdeps/x86_64/pthread_spin_trylock.S: Likewise.
10134 * sysdeps/sh/pthread_spin_trylock.S: Likewise.
10135 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
10136 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
10137
10138 * sysdeps/unix/sysv/linux/fork.c: Add an assert to check that
10139 CLONE_CHILD_SETTID worked.
10140
10141 2003-03-12 Ulrich Drepper <drepper@redhat.com>
10142
10143 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: New
10144 file.
10145 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S: New
10146 file.
10147
10148 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
10149 (pthread_cond_t): Add padding.
10150
10151 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: New file.
10152 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: New file.
10153 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: New file.
10154
10155 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
10156 (__pthread_rwlock_timedwrlock): Add missing opcode suffix.
10157 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
10158 (__pthread_rwlock_timedrdlock): Likewise.
10159 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
10160 (__pthread_rwlock_wrlock): Likewise.
10161 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
10162 (__pthread_rwlock_rdlock): Likewise.
10163
10164 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: New file.
10165
10166 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Return
10167 result of lock re-get if it fails.
10168
10169 2003-03-11 Ulrich Drepper <drepper@redhat.com>
10170
10171 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Fix asm syntax.
10172 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
10173 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
10174 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
10175 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
10176 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
10177 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
10178 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
10179 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
10180 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
10181
10182 * sysdeps/x86_64/tls.h (THREAD_SELF, THREAD_GETMEM, THREAD_GETMEM_NC,
10183 THREAD_SETMEM, THREAD_SETMEM_NC): Correct asm syntax.
10184
10185 * allocatestack.c [! TLS_MULTIPLE_THREADS_IN_TCB] (allocate_stack):
10186 Initialize *__libc_multiple_threads_ptr not __libc_multiple_threads.
10187 * sysdeps/pthread/createthread.c [! TLS_MULTIPLE_THREADS_IN_TCB]
10188 (create_thread): Likewise.
10189 Define __pthread_multiple_threads and __libc_multiple_threads_ptr.
10190 * init.c (__pthread_initialize_minimal_internal): Initialize
10191 __libc_multiple_threads_ptr if necessary.
10192 * pthreadP.h: Adjust prototype for __libc_pthread_init. Declare
10193 __pthread_multiple_threads and __libc_multiple_threads_ptr.
10194 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Define
10195 __libc_multiple_threads.
10196 (__libc_pthread_init): Return pointer to __libc_pthread_init if
10197 necessary.
10198
10199 * sysdeps/i386/tls.h (THREAD_SETMEM): Fix one-byte variant.
10200 (THREAD_SETMEM_NC): Likewise.
10201
10202 * sysdeps/x86_64/pthread_spin_trylock.c: Removed.
10203 * sysdeps/x86_64/pthread_spin_trylock.S: New file.
10204 * sysdeps/x86_64/pthread_spin_unlock.c: Removed.
10205 * sysdeps/x86_64/pthread_spin_unlock.S: New file.
10206
10207 * sysdeps/i386/i486/pthread_spin_trylock.S (pthread_spin_trylock):
10208 Eliminate one entire instruction.
10209
10210 * cancellation.c (__pthread_enable_asynccancel_2): New function.
10211 * pthreadP.h: Declare __pthread_enable_asynccancel_2.
10212 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
10213 (__pthread_cond_timedwait): Use __pthread_enable_asynccancel_2
10214 instead of __pthread_enable_asynccancel.
10215 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
10216 (__pthread_cond_wait): Likewise.
10217 * sysdeps/pthread/pthread_cond_timedwait.c
10218 (__pthread_cond_timedwait): Likewise.
10219 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
10220
10221 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
10222 (__condvar_cleanup): Wake up all waiters in case we got signaled
10223 after being woken up but before disabling asynchronous
10224 cancellation.
10225 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
10226 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
10227 (__condvar_cleanup): Likewise.
10228
10229 * init.c (__NR_set_tid_address): If already defined, don't redefine.
10230 Make it an error if architecture has no #if case. Add x86-64.
10231
10232 * sysdeps/unix/sysv/linux/x86_64/Makefile: Add flags for
10233 pt-initfini.s generation.
10234
10235 * sysdeps/x86_64/tls.h: Include <asm/prctl.h>.
10236 (TLS_INIT_TP): Fix typo.
10237
10238 2003-03-11 Jakub Jelinek <jakub@redhat.com>
10239
10240 * sysdeps/ia64/bits/atomic.h (atomic_exchange_and_add): Swap 2nd and
10241 3rd argument of __arch_compare_and_exchange_{32,64}_val_acq.
10242
10243 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Include semaphore.h.
10244 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
10245 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Likewise.
10246 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Likewise.
10247 * sysdeps/unix/sysv/linux/s390/sem_post.c: Likewise.
10248 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
10249 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
10250 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
10251
10252 2003-03-11 Ulrich Drepper <drepper@redhat.com>
10253
10254 * sysdeps/pthread/pthread_cond_timedwait.c
10255 (__pthread_cond_timedwait): Return the result of the final
10256 locking. If it succeeds, the regular function return value.
10257
10258 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait):
10259 Return result of the final locking.
10260 * version.c (__nptl_main): Work around problems with the strange
10261 INTERNAL_SYSCALL macro on ppc32.
10262 * init.c (__pthread_initialize_minimal_internal): Unblock
10263 SIGCANCEL in case the parent blocked it.
10264 Reported by Paul Mackerras <paulus@samba.org>.
10265
10266 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: New file.
10267 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: New file.
10268 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: New file.
10269
10270 2003-03-11 Jakub Jelinek <jakub@redhat.com>
10271
10272 * sysdeps/pthread/pthread_cond_timedwait.c
10273 (__pthread_cond_timedwait): Unlock and fail if
10274 __pthread_mutex_unlock_internal failed.
10275
10276 * sysdeps/pthread/createthread.c (ARCH_CLONE): Define if not defined.
10277 (create_thread): Only assert PD->tcb != NULL under [TLS_TCB_AT_TP].
10278 Use ARCH_CLONE.
10279 * allocatestack.c (ALLOCATE_STACK_PARMS): New macro.
10280 [NEED_SEPARATE_REGISTER_STACK] (STACK_VARIABLES,
10281 STACK_VARIABLES_ARGS, STACK_VARIABLES_PARMS, ALLOCATE_STACK_PARMS,
10282 ALLOCATE_STACK): New macros.
10283 (TLS_TPADJ): New macro.
10284 (get_cached_stack, queue_stack, __deallocate_stack): Use TLS_TPADJ.
10285 (allocate_stack): Handle TLS_DTV_AT_TP and
10286 NEED_SEPARATE_REGISTER_STACK. Use TLS_TPADJ.
10287 * pthread_create.c (__pthread_create_2_1) [! TLS_TCB_AT_TP]:
10288 Don't set PD->self.
10289 * init.c [__ia64__] (__NR_set_tid_address): Define.
10290
10291 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: New file.
10292 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: New file.
10293 * sysdeps/unix/sysv/linux/ia64/fork.c: New file.
10294 * sysdeps/unix/sysv/linux/ia64/createthread.c: New file.
10295 * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: New file.
10296 * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: New file.
10297 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: New file.
10298 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: New file.
10299 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: New file.
10300 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
10301 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: New file.
10302 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: New file.
10303 * sysdeps/unix/sysv/linux/ia64/sem_post.c: New file.
10304 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: New file.
10305 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: New file.
10306 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: New file.
10307 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
10308 * sysdeps/ia64/bits/atomic.h: New file.
10309 * sysdeps/ia64/Makefile: New file.
10310 * sysdeps/ia64/pthread_spin_init.c: New file.
10311 * sysdeps/ia64/pthread_spin_lock.c: New file.
10312 * sysdeps/ia64/pthread_spin_trylock.c: New file.
10313 * sysdeps/ia64/pthread_spin_unlock.c: New file.
10314 * sysdeps/ia64/pthreaddef.h: New file.
10315 * sysdeps/ia64/tcb-offsets.sym: New file.
10316 * sysdeps/ia64/td_ta_map_lwp2thr.c: New file.
10317 * sysdeps/ia64/tls.h: New file.
10318
10319 * sysdeps/s390/pthreaddef.h (__exit_thread_inline): Pass 1 argument
10320 to syscall instead of no arguments.
10321
10322 2003-03-10 Ulrich Drepper <drepper@redhat.com>
10323
10324 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: New file.
10325 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: New file.
10326 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: New file.
10327 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: New file.
10328
10329 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Fix error value in
10330 unused code.
10331
10332 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: New file
10333
10334 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
10335 lowlevelbarrier.sym.
10336 * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: New file.
10337 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S:
10338 Include lowlevelbarrier.h and don't define offsets locally.
10339 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Likewise.
10340
10341 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
10342 (__lll_mutex_lock_wait): Reverse order of first two parameters.
10343 (__lll_mutex_timedlock_wait): Likewise.
10344 (lll_mutex_lock): Adjust asm for that.
10345 (lll_mutex_timedlock): Likewise. Mark cx, cc, r10 as clobbered.
10346 (lll_lock): Adjust asm for operand order change.
10347 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: New file.
10348 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: New file.
10349
10350 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_lock_wait):
10351 Reverse order of parameters.
10352 (__lll_timedwait_tid): Remove regparms attribute.
10353 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: New file.
10354 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: New file.
10355
10356 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
10357 (__lll_timedwait_tid): Remove one unnecessary instruction.
10358
10359 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Define
10360 __lll_mutex_timedlock_wait only for NOT_IN_libc.
10361 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Include
10362 lowlevelmutex.S.
10363
10364 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
10365 lll_unlock_wake_cb, __lll_wait_tid, and __lll_timedwait_tid only
10366 for NOT_IN_libc.
10367 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Include
10368 lowlevellock.S.
10369
10370 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Don't define
10371 LOCK is already defined. Don't define __lll_mutex_timedlock_wait
10372 for libc.so.
10373 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Only
10374 define LOCK here (if UP is not defined). The actual code is in
10375 lowlevelmutex.S.
10376
10377 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Don't define
10378 LOCK is already defined. Don't define lll_unlock_wake_cb and
10379 __lll_timedwait_tid for libc.so.
10380 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Only
10381 define LOCK here (if UP is not defined). The actual code is in
10382 lowlevellock.S.
10383
10384 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Not needed anymore.
10385 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: Likewise.
10386 * sysdeps/unix/sysv/linux/s390/sem_post.c: Include lowlevellock.h
10387 instead of lowlevelsem.h.
10388 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
10389 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
10390 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
10391
10392 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
10393 lowlevelrwlock.sym.
10394 * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: New file.
10395 * sysdeps/unix/sysv/linux/i386/lowlevelrwlock.h: Removed.
10396 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: Removed.
10397
10398 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_trylock): Fix
10399 register loading.
10400 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_trylock): Undo
10401 last changed. D'oh.
10402
10403 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: New file.
10404
10405 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove declaration
10406 of __libc_locking_needed.
10407 (lll_trylock): Initialize %eax to zero.
10408
10409 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Update
10410 pthread_cond_t definition.
10411
10412 2003-03-10 Roland McGrath <roland@redhat.com>
10413
10414 * sysdeps/unix/sysv/linux/lowlevelcond.sym: New file.
10415 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add it.
10416 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: File removed.
10417 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: Likewise.
10418 * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: Likewise.
10419
10420 * allocatestack.c (allocate_stack) [!TLS_MULTIPLE_THREADS_IN_TCB]:
10421 Instead of setting PD->multiple_threads, set globals
10422 __pthread_multiple_threads and __libc_multiple_threads.
10423 * sysdeps/pthread/createthread.c (create_thread): Likewise.
10424 * sysdeps/i386/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it.
10425 * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Likewise.
10426
10427 * descr.h (struct pthread): Conditionalize first member on
10428 [!TLS_DTV_AT_TP]. Replace the `header' member with an anonymous union
10429 containing an anonymous tcbhead_t. Move `list' member out.
10430 [TLS_MULTIPLE_THREADS_IN_TCB]: Define a `multiple_threads' member.
10431 * allocatestack.c: Remove use of `header.data.' prefix.
10432 * pthread_create.c: Likewise.
10433 * init.c (__pthread_initialize_minimal_internal): Likewise.
10434 * sysdeps/pthread/createthread.c (create_thread): Likewise.
10435 * sysdeps/i386/tls.h (INSTALL_DTV): Add parens.
10436 (THREAD_SELF, THREAD_DTV, INSTALL_NEW_DTV): No `header.data.' prefix.
10437 * sysdeps/x86_64/tls.h: Likewise.
10438 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
10439 (SINGLE_THREAD_P): Likewise.
10440 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
10441 (SINGLE_THREAD_P): Likewise.
10442 * sysdeps/i386/tls.h (tcbhead_t): Remove `list' member.
10443 * sysdeps/s390/tls.h (tcbhead_t): Likewise.
10444
10445 2003-03-09 Ulrich Drepper <drepper@redhat.com>
10446
10447 * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: New file.
10448
10449 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
10450 * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
10451
10452 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix many
10453 leftovers from the ia32 code.
10454
10455 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Remove unneccessary
10456 memory load.
10457 (clear_once_control): Don't load %esi.
10458
10459 * sysdeps/x86_64/tls.h: Remove all traces of segment descriptor
10460 handling.
10461
10462 * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
10463
10464 * sysdeps/unix/sysv/linux/s390/createthread.c: Moved to...
10465 * sysdeps/unix/sysv/linux/createthread.c: ...here.
10466
10467 * Makefile (tests): Add tst-cond10.
10468 * tst-cond10.c: New file.
10469
10470 2003-03-08 Ulrich Drepper <drepper@redhat.com>
10471
10472 * tst-tls2.c (do_test): Add TEMP_FAILURE_RETRY around sem_wait call.
10473 * tst-signal3.c (do_test): Likewise.
10474 * tst-sem5.c (do_test): Likewise.
10475 * tst-kill6.c (do_test): Likewise.
10476 * tst-tls3.c (do_test): Likewise. Include <errno.h>.
10477
10478 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use add/sub instead
10479 of inc/dec.
10480 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
10481 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise
10482 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
10483 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
10484 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
10485 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
10486 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
10487 Likewise.
10488 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
10489 Likewise.
10490 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
10491 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
10492 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10493 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
10494 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
10495 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
10496 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
10497 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
10498
10499 * allocatestack.c (allocate_stack): If mprotect() fails free the
10500 TLS memory.
10501
10502 2003-03-07 Ulrich Drepper <drepper@redhat.com>
10503
10504 * sysdeps/i386/i486/bits/atomic.h: Fix a few unused definitions.
10505
10506 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove all trace of
10507 lll_wake_tid. This was used only to work around kernel limits in
10508 the early days.
10509 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
10510 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Likewise.
10511 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
10512 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
10513
10514 * init.c (__static_tls_align_m1): Renamed from __static_tls_align.
10515 (__pthread_initialize_minimal_internal): Change initialization of
10516 __static_tls_align_m1 appropriately.
10517 * pthreadP.h (__static_tls_align_m1): Renamed from
10518 __static_tls_align.
10519 * allocatestack.c (allocate_stack): Use __static_tls_align_m1
10520 instead of __static_tls_align-1.
10521
10522 2003-03-04 Ulrich Drepper <drepper@redhat.com>
10523
10524 * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
10525
10526 * pthread_create.c: Define __pthread_keys using nocommon
10527 attribute, not by placing it explicitly in bss.
10528 Remove DEFINE_DEALLOC definition. Not needed anymore.
10529
10530 * allocatestack.c: Define ARCH_MAP_FLAGS if not already defined.
10531 Use it in mmap call to allocate stacks.
10532
10533 * sysdeps/pthread/createthread.c (create_thread): Fix comment.
10534
10535 * pthread_create.c (start_thread): Use THREAD_SETMEM to store
10536 result of the thread function.
10537
10538 2003-03-03 Ulrich Drepper <drepper@redhat.com>
10539
10540 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: Removed. The generic
10541 version is just fine.
10542
10543 * sysdeps/unix/sysv/linux/libc_pthread_init.c
10544 (__pthread_child_handler): Renamed from pthread_child_handler,
10545 exported, and marked hidden. Change all users.
10546 * sysdeps/unix/sysv/linux/register-atfork.c (free_mem): Do not
10547 free __pthread_child_handler from child list.
10548
10549 2003-03-03 Martin Schwidefsky <schwidefsky@de.ibm.com>
10550
10551 * atomic.h (atomic_exchange_and_add): Return newval, not oldval.
10552
10553 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
10554 Fix handling of cancellation and failing pthread_mutex_unlock call.
10555 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
10556 (__pthread_cond_wait): Likewise.
10557
10558 * sysdeps/pthread/pthread_rwlock_timedrdlock.c
10559 (pthread_rwlock_timedrdlock): Fix clobber of result variable by
10560 lll_futex_timed_wait call.
10561 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
10562 (pthread_rwlock_timedwrlock): Likewise.
10563
10564 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
10565 Don't define lll_unlock_wake_cb and ___lll_timedwait_tid in libc.so.
10566 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Remove XXX comments.
10567
10568 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Fix
10569 check of lll_futex_wake return value.
10570
10571 2003-03-03 Roland McGrath <roland@redhat.com>
10572
10573 * forward.c: Fix typo in __pthread_attr_init_2_0 compat_symbol decl.
10574
10575 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
10576 Argument to ptr___pthread_cleanup_upto is __jmp_buf, not jmp_buf.
10577 * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
10578
10579 2003-03-02 Ulrich Drepper <drepper@redhat.com>
10580
10581 * sysdeps/pthread/timer_create.c (timer_create): Return correct
10582 error for CPU clocks.
10583
10584 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
10585 _POSIX_MONOTONIC_CLOCK.
10586 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
10587
10588 * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
10589 recent kernels.
10590
10591 2003-03-01 Ulrich Drepper <drepper@redhat.com>
10592
10593 * descr.h (struct pthread): Move cleanup field to the front.
10594
10595 2003-03-01 Roland McGrath <roland@redhat.com>
10596
10597 * sem_open.c (sem_open): Braino fix.
10598
10599 2003-03-01 Ulrich Drepper <drepper@redhat.com>
10600
10601 * sysdeps/i386/tcb-offsets.sym: Add CLEANUP and CLEANUP_PREV.
10602 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Inline
10603 __pthread_cleanup_pop functionality.
10604 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10605
10606 * descr.h (struct pthread): Move tid field to the front now that
10607 it is often used.
10608
10609 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S
10610 (__lll_mutex_timedlock_wait): Remove.
10611 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
10612 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
10613 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
10614 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
10615 (lll_unlock_wake_cb): Don't save and restore %esi.
10616 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
10617 %esi.
10618 (__lll_timedwait_tid): Add alignment.
10619 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
10620 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
10621 %esi.
10622 (__lll_timedwait_tid): Removed.
10623 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
10624 (__pthread_cond_broadcast): Don't save, load, and restore %esi.
10625 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
10626 (pthread_barrier_wait): Don't save, load, and restore %esi for
10627 last thread.
10628 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
10629 (__pthread_cond_signal): Don't save, load, and restore %esi.
10630 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
10631 (__pthread_rwlock_unlock): Don't save, load, and restore %esi.
10632 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
10633 Don't save, load, and restore %esi.
10634
10635 2003-02-27 Ulrich Drepper <drepper@redhat.com>
10636
10637 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
10638 Release lock before waking up the waiters.
10639
10640 * tst-exit1.c (do_test): Don't start more than one thread in parallel.
10641
10642 * tst-rwlock9.c (writer_thread): Correct adding TIMEOUT.
10643 (reader_thread): Likewise.
10644
10645 * sysdeps/pthread/pthread_rwlock_unlock.c
10646 (__pthread_rwlock_unlock): Release internal lock early. Don't try
10647 to wake up readers if there are none.
10648
10649 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
10650 Release internal lock before wake threads.
10651
10652 2003-02-26 Ulrich Drepper <drepper@redhat.com>
10653
10654 * Makefile (tests): Add tst-rwlock10 and tst-rwlock11.
10655 * tst-rwlock8.c: Initialize lock with INIT. Allow INIT to be
10656 predefined.
10657 * tst-rwlock9.c: Likewise.
10658 * tst-rwlock10.c: New file.
10659 * tst-rwlock11.c: New file.
10660
10661 * Makefile (tests): Add tst-dlsym1.
10662 * tst-dlsym1.c: New file.
10663
10664 * init.c (__pthread_initialize_minimal_internal): Set
10665 GL(dl_error_catch_tsd) to __libc_dl_error_tsd.
10666 * Versions (libc:GLIBC_PRIVATE): Export __libc_dl_error_tsd.
10667
10668 2003-02-24 Ulrich Drepper <drepper@redhat.com>
10669
10670 * sem_open.c (sem_open): Fix handling of O_CREAT without O_EXCL.
10671
10672 * tst-cond2.c: Fix sychronization with child.
10673
10674 * tst-rwlock8.c (reader_thread): Remove unused variable.
10675
10676 * Makefile: Add rules to build and run tst-tls3.
10677 * tst-tls3.c: New file.
10678 * tst-tls3mod.c: New file.
10679
10680 * Makefile (tests): Add tst-rwlock8 and tst-rwlock9.
10681 * tst-rwlock8.c: New file.
10682 * tst-rwlock9.c: New file.
10683 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Fix
10684 complete broken rwlock implementation.
10685 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
10686 Likewise.
10687 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
10688 Likewise.
10689 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
10690 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
10691 * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
10692 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
10693 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
10694 * sysdeps/pthread/pthread_rwlock_unlock.c: Likewise.
10695 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
10696
10697 2003-02-23 Roland McGrath <roland@redhat.com>
10698
10699 * Makefile (nptl-version): Change regexp so case sensitivity is ok.
10700
10701 2003-02-23 Ulrich Drepper <drepper@redhat.com>
10702
10703 * Makefile (tests): Add tst-context1.
10704 * tst-context1.c: New file.
10705
10706 * Makefile (tests): Add tst-tls1 and tst-tls2.
10707 * tst-tls1.c: New file.
10708 * tst-tls2.c: New file.
10709
10710 * libc-cancellation.c (__libc_enable_asynccancel): Correct test
10711 for failed cmpxchg.
10712
10713 * pthread_create.c (start_thread): Set EXITING_BIT early.
10714
10715 * sysdeps/i386/tls.h (THREAD_GETMEM): Mark asm as volatile.
10716 (THREAD_GETMEM_NC): Likewise.
10717
10718 2003-02-22 Ulrich Drepper <drepper@redhat.com>
10719
10720 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Shave
10721 off 3 more bytes by using offset-less instructions when possible.
10722
10723 * Makefile: Add dependency for $(objpfx)version.d.
10724
10725 * eintr.c (eintr_source): Add unnecessary return but the compiler
10726 insists.
10727
10728 * tst-kill3.c: Include <unistd.h>.
10729
10730 2003-02-21 Roland McGrath <roland@redhat.com>
10731
10732 * pthread_create.c (start_thread): Call __libc_thread_freeres.
10733
10734 2003-02-21 Ulrich Drepper <drepper@redhat.com>
10735
10736 * Makefile (tests): Add tst-eintr1.
10737 (distribute): Add eintr.c.
10738 * tst-eintr1.c: New file.
10739 * eintr.c: New file.
10740
10741 * pthread_cancel.c (pthread_cancel): Use tkill directly.
10742
10743 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill):
10744 Disallow sending SIGCANCEL.
10745
10746 * Makefile (tests): Remove tst-basic7. Add tst-kill1, tst-kill2,
10747 tst-kill3, tst-kill4, tst-kill5, tst-kill6.
10748 * tst-kill1.c: New file.
10749 * tst-kill2.c: New file.
10750 * tst-kill3.c: New file.
10751 * tst-kill5.c: New file.
10752 * tst-kill6.c: New file.
10753 * tst-basic7.c: Renamed to...
10754 * tst-kill4.c: ...this.
10755
10756 2003-02-21 Roland McGrath <roland@redhat.com>
10757
10758 * Makefile (install-lib-ldscripts): New variable.
10759
10760 2003-02-21 Ulrich Drepper <drepper@redhat.com>
10761
10762 * pthreadP.h: Define INVALID_TD_P and INVALID_NOT_TERMINATED_TD_P.
10763 * pthread_cancel.c: Use INVALID_TD_P.
10764 * pthread_detach.c: Likewise.
10765 * pthread_getschedparam.c: Likewise.
10766 * pthread_setschedparam.c: Likewise.
10767 * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
10768 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
10769 * pthread_join.c: Use INVALID_NOT_TERMINATED_TD_P.
10770 * pthread_timedjoin.c: Likewise.
10771
10772 * tst-basic7.c: Include <signal.h>.
10773
10774 * pthread_join.c (pthread_join): Limited checking for invalid
10775 descriptors.
10776 * pthread_timedjoin.c (pthread_timedjoin_np): Likewise.
10777
10778 2003-02-20 Ulrich Drepper <drepper@redhat.com>
10779
10780 * pthread_create.c (deallocate_tsd): Reset found_nonzero at the
10781 beginning of the loop. Clear the entire first block of TSD.
10782 * Makefile (tests): Add tst-key4.
10783 * tst-key4.c: New file.
10784
10785 2003-02-18 Ulrich Drepper <drepper@redhat.com>
10786
10787 * Makefile (tests): Add tst-basic7.
10788 * tst-basic7.c: New file.
10789
10790 * pthread_create.c (deallocate_tsd): Mark as internal_function.
10791 Add some more __builtin_expect.
10792
10793 * pthreadP.h: Define dummy version of DEBUGGING_P.
10794
10795 2003-02-17 Ulrich Drepper <drepper@redhat.com>
10796
10797 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remnove
10798 _POSIX_THREAD_PRIORITY_SCHEDULING.
10799 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
10800 _XOPEN_REALTIME_THREADS.
10801 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
10802
10803 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): The
10804 kernel returns EINVAL for PID <= 0, work around it.
10805
10806 * Makefile (tests): Add tst-signal5.
10807 * tst-signal5.c: New file.
10808
10809 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
10810 and LOGIN_NAME_MAX.
10811
10812 * tst-cancel1.c (tf): Block all signals.
10813
10814 * Makefile (tests): Add tst-basic6.
10815 * tst-basic6.c: New file.
10816
10817 * tst-basic1.c: Add test for process ID.
10818
10819 * Makefile (tests): Add tst-cancel10.
10820 * tst-cancel10.c: New file.
10821
10822 * Makefile (tests): Add tst-signal4.
10823 * tst-signal4.c: New file.
10824
10825 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use
10826 __sigismember instead of sigismember. Add __builtin_expect.
10827
10828 2003-02-16 Ulrich Drepper <drepper@redhat.com>
10829
10830 * tst-attr1.c (do_test): Add tests for pthread_setcanceltype,
10831 pthread_setcancelstate, and pthread_rwlock_setpshared.
10832
10833 * tst-cancel7.c (do_test): Make sure the pid file exists before
10834 canceling the thread.
10835
10836 * tst-rwlock6.c: More pthread_rwlock_timedwrlock and
10837 pthread_rwlock_timedrdlock tests.
10838 * tst-rwlock7.c: More pthread_rwlock_timedwrlock tests.
10839 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
10840 Check for invalid tv_nsec field.
10841 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
10842 Likewise.
10843
10844 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Protect
10845 recursive mutex of overflow.
10846
10847 * tst-attr1.c (do_test): Add test for pthread_mutexattr_setpshared.
10848
10849 * libc-cancellation.c (__libc_enable_asynccancel): Rewrite to avoid
10850 going into an endless loop.
10851 * Makefile (tests): Add tst-cancel9.
10852 * tst-cancel9.c: New file.
10853
10854 * pthread_cancel.c (pthread_cancel): Use the result of __pthread_kill.
10855
10856 2003-02-15 Ulrich Drepper <drepper@redhat.com>
10857
10858 * tst-mutex5.c (do_test): Add more timedlock tests.
10859
10860 * tst-mutex2.c: Tests of trylock and unlock with ERROR mutexes.
10861 * tst-mutex3.c (do_test): Add tests for trylock with RECURSIVE mutexes.
10862
10863 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
10864 use INLINE_SYSCALL. Error number is returned, not -1.
10865
10866 * pthreadP.h: Mark declarations of __find_in_stack_list, __free_tcb,
10867 and __deallocate_stack with internal_function.
10868 * pthread_create.c: Adjust definitions appropriately.
10869 * allocatestack.c: Likewise.
10870
10871 * pthread_join.c: Add one more __builtin_expect.
10872 * pthread_timedjoin.c: Likewise.
10873
10874 * pthread_getspecific.c (__pthread_getspecific): Clear data->data
10875 not data of sequence number does not match.
10876 Add one __builtin_expect.
10877
10878 * Makefile (tests): Add tst-clock1.
10879 * tst-clock1.c: New file.
10880
10881 * pthread_setconcurrency.c (pthread_setconcurrency): Fail for
10882 negative arguments.
10883 * Makefile (tests): Add tst-basic5.
10884 * tst-basic5.c: New file.
10885
10886 2003-02-14 Ulrich Drepper <drepper@redhat.com>
10887
10888 * Makefile (tests): Add tst-basic4.
10889 * tst-basic4.c: New file.
10890
10891 * pthreadP.h: Add declaraction for __nptl_nthreads.
10892 * pthread_create.c: Define __nptl_nthreads
10893 (start_thread): Increment __nptl_nthreads at beginning. Decrement
10894 after thread is done. If then zero, call exit(0).
10895 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
10896 Add ptr_nthreads. Define HAVE_PTR_NTHREADS.
10897 * init.c (pthread_functions): Initialize ptr_nthreads.
10898 * allocatestack.c (nptl_nthreads): Remove definition and all uses.
10899 (__reclaim_stacks): Decrement __nptl_nthreads.
10900 * sysdeps/pthread/Makefile [$(subdir)==csu] (CFLAGS-libc-start.c):
10901 Define.
10902 * Makefile (tests): Add tst-basic3.
10903 * tst-basic3.c: New file.
10904
10905 * descr.h: Define CANCELING_BIT and CANCELING_BITMASK. Introduce
10906 after CANCELTYPE_BIT, move the other bits up. Update CANCEL_RESTMASK.
10907 * init.c (sigcancel_handler): Also set CANCELING_BITMASK bit in newval.
10908 * pthread_cancel.c (pthread_cancel): Likewise. Also set CANCELING_BIT
10909 if asynchronous canceling is enabled.
10910 * pthread_join.c (pthread_join): When recognizing circular joins,
10911 take into account the other thread might be already canceled.
10912 * Makefile (tests): Add tst-join5.
10913 * tst-join5.c: New file.
10914
10915 * Makefile (tests): Add tst-join4.
10916 * tst-join4.c: New file.
10917
10918 2003-02-13 Ulrich Drepper <drepper@redhat.com>
10919
10920 * tst-cond4.c (main): Add test of pthread_attr_getpshared.
10921
10922 2003-02-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
10923
10924 * sysdeps/s390/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM,
10925 THREAD_SETMEM_NC): Use passed descr instead of THREAD_SELF.
10926 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind): Avoid
10927 warning.
10928 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Include <sys/time.h>
10929 to avoid warning.
10930 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Return
10931 error if lll_futex_wake failed.
10932
10933 2003-02-13 Ulrich Drepper <drepper@redhat.com>
10934
10935 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Fix
10936 handling of cancellation and failung pthread_mutex_unlock call.
10937 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10938 * Makefile (tests): Add tst-cond8 and tst-cond9.
10939 * tst-cond8.c: New file.
10940 * tst-cond9.c: New file.
10941
10942 * tst-cond7.c (do_test): Unlock the mutex before canceling the thread.
10943
10944 * sysdeps/pthread/pthread.h: Add missing initializers. Protect
10945 non-standard initializers with __USE_GNU.
10946
10947 * Makefile (tests): Add tst-cleanup3.
10948 * tst-cleanup3.c: New file.
10949
10950 2003-02-12 Ulrich Drepper <drepper@redhat.com>
10951
10952 * Makefile (tests): Add tst-attr1 and tst-attr2.
10953 * tst-attr1.c: New file.
10954 * tst-attr2.c: New file.
10955
10956 * Makefile: Add rules to build and run tst-atfork2 test.
10957 * tst-atfork2.c: New file.
10958 * tst-atfork2mod.c: New file.
10959
10960 * sysdeps/unix/sysv/linux/unregister-atfork.c
10961 (__unregister_atfork): Free the memory allocated for the handlers
10962 after removing them from the lists.
10963
10964 * sysdeps/unix/sysv/linux/register-atfork.c: Define memeory
10965 cleanup function.
10966
10967 * tst-atfork1.c (do_test): Wait for the child we forked.
10968 Report error in child.
10969
10970 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Fix comment.
10971
10972 * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
10973
10974 2003-02-10 Ulrich Drepper <drepper@redhat.com>
10975
10976 * Makefile (tests): Add tst-cancel8.
10977 * tst-cancel8.c: New file.
10978
10979 * sysdeps/unix/sysv/linux/i386/pthread_once.S (clear_once_control): Fix
10980 clearing of control variable.
10981 * Makefile (tests): Add tst-once3 and tst-once4.
10982 * tst-once3.c: New file.
10983 * tst-once4.c: New file.
10984
10985 2003-02-08 kaz Kojima <kkojima@rr.iij4u.or.jp>
10986
10987 * sysdeps/sh/Makefile: New file.
10988 * sysdeps/sh/bits/atomic.h: New file.
10989 * sysdeps/sh/pthread_spin_init.c: New file.
10990 * sysdeps/sh/pthread_spin_lock.c: New file.
10991 * sysdeps/sh/pthread_spin_trylock.S: New file.
10992 * sysdeps/sh/pthread_spin_unlock.S: New file.
10993 * sysdeps/sh/pthreaddef.h: New file.
10994 * sysdeps/sh/tcb-offsets.sym: New file.
10995 * sysdeps/sh/td_ta_map_lwp2thr.c: New file.
10996 * sysdeps/sh/tls.h: New file.
10997 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: New file.
10998 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: New file.
10999 * sysdeps/unix/sysv/linux/sh/createthread.c: New file.
11000 * sysdeps/unix/sysv/linux/sh/fork.c: New file.
11001 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: New file.
11002 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: New file.
11003 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h: New file.
11004 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: New file.
11005 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: New file.
11006 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: New file.
11007 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: New file.
11008 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: New file.
11009 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
11010 * sysdeps/unix/sysv/linux/sh/pt-vfork.S: New file.
11011 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: New file.
11012 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: New file.
11013 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: New file.
11014 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: New file.
11015 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: New file.
11016 * sysdeps/unix/sysv/linux/sh/pthread_once.S: New file.
11017 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: New file.
11018 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: New file.
11019 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: New file.
11020 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: New file.
11021 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: New file.
11022 * sysdeps/unix/sysv/linux/sh/sem_post.S: New file.
11023 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: New file.
11024 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: New file.
11025 * sysdeps/unix/sysv/linux/sh/sem_wait.S: New file.
11026 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
11027
11028 2003-02-08 Ulrich Drepper <drepper@redhat.com>
11029
11030 * tst-cond2.c: Rearrange code to not rely on behavior undefined
11031 according to POSIX.
11032
11033 * tst-basic2.c (do_test): Lock mutex before creating the thread.
11034
11035 2003-02-07 Ulrich Drepper <drepper@redhat.com>
11036
11037 * sysdeps/x86_64/tls.h: Remove unnecessary macros, left over from x86.
11038 (TLS_GET_FS): New #define.
11039 (TLS_SET_FS): New #define.
11040 Correct value of __NR_set_thread_area.
11041
11042 * sysdeps/x86_64/td_ta_map_lwp2thr.c: New file.
11043
11044 2003-02-06 Ulrich Drepper <drepper@redhat.com>
11045
11046 * Makefile (tests): Add tst-popen1.
11047 * tst-popen1.c: New file.
11048
11049 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Remove wrong
11050 but inactive generalization.
11051 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
11052 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
11053 Minor optimization, remove one instruction.
11054 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
11055
11056 2003-02-04 Martin Schwidefsky <schwidefsky@de.ibm.com>
11057
11058 * sysdeps/unix/sysv/linux/s390/fork.c: Correct order of parameters.
11059
11060 2003-01-31 Martin Schwidefsky <schwidefsky@de.ibm.com>
11061
11062 * init.c (__NR_set_tid_address): Add #ifdef for s390.
11063 * sysdeps/pthread/pthread_barrier_wait.c: New file.
11064 * sysdeps/pthread/pthread_cond_broadcast.c: New file.
11065 * sysdeps/pthread/pthread_cond_signal.c: New file.
11066 * sysdeps/pthread/pthread_cond_timedwait.c: New file.
11067 * sysdeps/pthread/pthread_cond_wait.c: New file.
11068 * sysdeps/pthread/pthread_rwlock_rdlock.c: New file.
11069 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: New file.
11070 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: New file.
11071 * sysdeps/pthread/pthread_rwlock_unlock.c: New file.
11072 * sysdeps/pthread/pthread_rwlock_wrlock.c: New file.
11073 * sysdeps/s390/Makefile: New file.
11074 * sysdeps/s390/bits/atomic.h: New file.
11075 * sysdeps/s390/pthread_spin_init.c: New file.
11076 * sysdeps/s390/pthread_spin_lock.c: New file.
11077 * sysdeps/s390/pthread_spin_trylock.c: New file.
11078 * sysdeps/s390/pthread_spin_unlock.c: New file.
11079 * sysdeps/s390/pthreaddef.h: New file.
11080 * sysdeps/s390/tcb-offsets.sym: New file.
11081 * sysdeps/s390/td_ta_map_lwp2thr.c: New file.
11082 * sysdeps/s390/tls.h: New file.
11083 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: New file.
11084 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: New file.
11085 * sysdeps/unix/sysv/linux/s390/createthread.c: New file.
11086 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: New file.
11087 * sysdeps/unix/sysv/linux/s390/fork.c: New file.
11088 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: New file.
11089 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
11090 * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: New file.
11091 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: New file.
11092 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: New file.
11093 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: New file.
11094 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: New file.
11095 * sysdeps/unix/sysv/linux/s390/pthread_once.c: New file.
11096 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: New file.
11097 * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: New file.
11098 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
11099 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
11100 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: New file.
11101 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
11102 * sysdeps/unix/sysv/linux/s390/sem_post.c: New file.
11103 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: New file.
11104 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
11105 * sysdeps/unix/sysv/linux/s390/sem_wait.c: New file.
11106
11107 2003-02-04 Ulrich Drepper <drepper@redhat.com>
11108
11109 * atomic.h: Add a couple more default implementations.
11110 (atomic_compare_and_exchange_acq): Use
11111 __arch_compare_and_exchange_32_acq in return value definition. It
11112 always exists.
11113 (atomic_bit_set): Renamed from atomic_set_bit.
11114 Add missing atomic_ prefixes.
11115
11116 * sysdeps/pthread/bits/libc-lock.h (__libc_once): In case no
11117 thread library is available, use correct value to mark initialized
11118 once variable.
11119
11120 2003-02-03 Ulrich Drepper <drepper@redhat.com>
11121
11122 * allocatestack.c (allocate_stack): Use __getpagesize instead of
11123 __sysconf to determine pagesize.
11124
11125 * pthread_create.c: Include <atomic.h>.
11126 * allocatestack.c (allocate_stack): Implement coloring of the
11127 allocated stack memory. Rename pagesize to pagesize_m1. It's the
11128 size minus one. Adjust users.
11129 * sysdeps/i386/i686/Makefile: New file.
11130
11131 2003-02-02 Ulrich Drepper <drepper@redhat.com>
11132
11133 * allocatestack.c: Improve comment throughout the file.
11134
11135 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
11136 (__lll_lock_wait): Add branch prediction.
11137 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
11138 (__lll_lock_wait): Likewise.
11139 (lll_unlock_wake_cb): Removed.
11140
11141 2003-01-31 Ulrich Drepper <drepper@redhat.com>
11142
11143 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Remove
11144 _POSIX_THREAD_PRIORITY_SCHEDULING.
11145
11146 2003-01-30 Jakub Jelinek <jakub@redhat.com>
11147
11148 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
11149 Fix return type of ptr___pthread_getspecific.
11150
11151 2003-01-29 Ulrich Drepper <drepper@redhat.com>
11152
11153 * Makefile (tests): Add tst-umask1.
11154 (tst-umask1-ARGS): Define.
11155 * tst-umask1.c: New file.
11156
11157 2003-01-28 Ulrich Drepper <drepper@redhat.com>
11158
11159 * Makefile (libpthread-routines): Remove lowlevelrwlock. Add
11160 pthread_rwlock_rdlock, pthread_rwlock_timedrdlock,
11161 pthread_rwlock_wrlock, pthread_rwlock_timedwrlock, and
11162 pthread_rwlock_unlock.
11163 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Removed
11164 * sysdeps/unix/sysv/linux/i386/i586/lowlevelrwlock.S: Removed
11165 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Removed
11166 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: New file.
11167 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
11168 New file.
11169 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: New file.
11170 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
11171 New file.
11172 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: New file.
11173 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_rdlock.S: New file.
11174 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedrdlock.S:
11175 New file.
11176 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_wrlock.S: New file.
11177 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedwrlock.S:
11178 New file.
11179 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_unlock.S: New file.
11180 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_rdlock.S: New file.
11181 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedrdlock.S:
11182 New file.
11183 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_wrlock.S: New file.
11184 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedwrlock.S:
11185 New file.
11186 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_unlock.S: New file.
11187
11188 * Makefile (libpthread-routines): Remove lowlevelcond and
11189 lowlevelsem. Add sem_wait, sem_trywait, sem_timedwait, sem_post,
11190 pthread_cond_wait, pthread_cond_timedwait, pthread_cond_signal,
11191 and pthread_cond_broadcast.
11192 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Removed
11193 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Removed
11194 * sysdeps/unix/sysv/linux/i386/i586/lowlevelsem.S: Removed
11195 * sysdeps/unix/sysv/linux/i386/i586/lowlevelcond.S: Removed
11196 * sysdeps/unix/sysv/linux/i386/i686/lowlevelsem.S: Removed
11197 * sysdeps/unix/sysv/linux/i386/i686/lowlevelcond.S: Removed
11198 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: New file.
11199 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: New file.
11200 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: New file.
11201 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: New file.
11202 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: New file.
11203 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: New file.
11204 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: New file.
11205 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: New file.
11206 * sysdeps/unix/sysv/linux/i386/i586/sem_wait.S: New file.
11207 * sysdeps/unix/sysv/linux/i386/i586/sem_trywait.S: New file.
11208 * sysdeps/unix/sysv/linux/i386/i586/sem_timedwait.S: New file.
11209 * sysdeps/unix/sysv/linux/i386/i586/sem_post.S: New file.
11210 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_wait.S: New file.
11211 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_timedwait.S: New file.
11212 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_signal.S: New file.
11213 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_broadcast.S: New file.
11214 * sysdeps/unix/sysv/linux/i386/i686/sem_wait.S: New file.
11215 * sysdeps/unix/sysv/linux/i386/i686/sem_trywait.S: New file.
11216 * sysdeps/unix/sysv/linux/i386/i686/sem_timedwait.S: New file.
11217 * sysdeps/unix/sysv/linux/i386/i686/sem_post.S: New file.
11218 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_wait.S: New file.
11219 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S: New file.
11220 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_signal.S: New file.
11221 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_broadcast.S: New file.
11222 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: New file.
11223
11224 * sysdeps/unix/sysv/linux/i386/createthread.c: Define
11225 PREPARE_CREATE and TLS_VALUE with x86-specific bits. All the rest
11226 of the code is moved to ...
11227 * sysdeps/pthread/createthread.c: ...here. New file.
11228
11229 2003-01-27 Ulrich Drepper <drepper@redhat.com>
11230
11231 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S
11232 (__new_sem_post): Clear %eax before returning.
11233 Reported by MAEDA Naoaki <maeda.naoaki@jp.fujitsu.com>.
11234
11235 * Makefile (tests): Add tst-cleanup2.
11236 * tst-cleanup2.c: New file.
11237
11238 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
11239 Interpret first parameter correctly.
11240
11241 2003-01-17 Ulrich Drepper <drepper@redhat.com>
11242
11243 * Makefile (headers): Add bits/semaphore.h.
11244
11245 2003-01-16 Jakub Jelinek <jakub@redhat.com>
11246
11247 * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize _head->sysinfo even
11248 if not SHARED.
11249
11250 2003-01-14 Ulrich Drepper <drepper@redhat.com>
11251
11252 * sem_open.c (sem_open): Return SEM_FAILED if existing semaphore
11253 must be used and mapping failed.
11254 Reported by Luke Elliott <luke.elliott@activfinancial.com>.
11255
11256 * Makefile (CFLAGS-pthread_self.os): Define this, not
11257 CFLAGS-pthread_self.c.
11258
11259 2003-01-13 Ulrich Drepper <drepper@redhat.com>
11260
11261 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Don't export
11262 lll_unlock_wake_cb.
11263
11264 * Makefile (libpthread-routines): Add version. Add rules to build
11265 version.os and banner.h.
11266 * version.c: New file.
11267
11268 2003-01-13 Jakub Jelinek <jakub@redhat.com>
11269
11270 * pthread_mutex_lock.c (__pthread_mutex_lock_internal): Make
11271 the alias unconditional.
11272 * pthread_mutex_unlock.c (__pthread_mutex_unlock_internal): Likewise.
11273
11274 2003-01-13 Ulrich Drepper <drepper@redhat.com>
11275
11276 * Makefile (CFLAGS-pthread_self.c): New definition.
11277
11278 2003-01-06 Jakub Jelinek <jakub@redhat.com>
11279
11280 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Add
11281 INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
11282 * sysdeps/unix/sysv/linux/raise.c (raise): Likewise.
11283 * init.c (__pthread_initialize_minimal_internal): Likewise.
11284
11285 2003-01-07 Jakub Jelinek <jakub@redhat.com>
11286
11287 * pthreadP.h (__pthread_cond_timedwait): Add prototype.
11288
11289 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
11290 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
11291 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
11292 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
11293 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
11294 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
11295
11296 2003-01-06 Jakub Jelinek <jakub@redhat.com>
11297
11298 * pthreadP.h (LIBC_CANCEL_HANDLED): Define.
11299 * pt-system.c (LIBC_CANCEL_HANDLED): Add.
11300 * tst-cancel-wrappers.sh: Remove all exceptions.
11301
11302 2003-01-05 Ulrich Drepper <drepper@redhat.com>
11303
11304 * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
11305 features. Reported by Marijn Ros <marijn@mad.scientist.com>.
11306
11307 * sysdeps/unix/sysv/linux/jmp-unwind.c: Include <pthread-functions.h>.
11308 Use __libc_pthread_functions array if SHARED.
11309
11310 * pthreadP.h: Move pthread_cond_2_0_t definition to...
11311 * sysdeps/unix/sysv/linux/internaltypes.h: ...here.
11312
11313 * sysdeps/pthread/bits/libc-lock.h (__libc_ptf_call): New #define.
11314 (__libc_rwlock_rdlock, __libc_rwlock_wrlock, __libc_rwlock_unlock,
11315 __libc_key_create, __libc_getspecific, __libc_setspecific): Use
11316 __libc_ptf_call instead of __libc_maybe_call.
11317 (PTF): New #define.
11318 (__libc_cleanup_region_start): Wrap function name with PTF call.
11319 (__libc_cleanup_region_end): Likewise.
11320 (__libc_cleanup_end): Likewise.
11321
11322 * pthread_getspecific.c: Add __pthread_getspecific_internal alias.
11323 * pthread_setspecific.c: Add __pthread_setspecific_internal alias.
11324 * pthread_key_create.c: Add __pthread_key_create_internal alias.
11325 * pthreadP.h: Add prototypes.
11326
11327 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Add
11328 __pthread_rwlock_rdlock, __pthread_rwlock_wrlock, and
11329 __pthread_rwlock_unlock aliases.
11330 * pthreadP.h: Add prototypes for new aliases.
11331
11332 * pthreadP.h (struct pthead_functions): Moved to...
11333 * sysdeps/pthread/pthread-functions.h: ...here. New file.
11334 * init.c (pthread_functions): Add initializers for new elements.
11335
11336 * cleanup_defer.c: Add __pthread_cleanup_push_defer and
11337 __pthread_cleanup_pop_restore aliases.
11338 * pthreadP.h: Add prototypes.
11339
11340 * cleanup.c: Rename _GI_pthread_cleanup_push to __pthread_cleanup_push
11341 and _GI_pthread_cleanup_pop to __pthread_cleanup_pop.
11342 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Adjust caller.
11343 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
11344 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
11345 * pthreadP.h: Adjust prototypes and callers.
11346
11347 2003-01-04 Ulrich Drepper <drepper@redhat.com>
11348
11349 * Makefile (tests): Add tst-cancel7.
11350 (tst-cancel7-ARGS): New variable.
11351 * tst-cancel7.c: New file.
11352
11353 * old_pthread_cond_broadcast.c: Optimize initialization a bit to work
11354 around gcc defficiencies.
11355 * old_pthread_cond_signal.c: Likewise.
11356 * old_pthread_cond_timedwait.c: Likewise.
11357 * old_pthread_cond_wait.c: Likewise.
11358
11359 * pthreadP.h (pthread_cond_2_0_t): Remove unneeded lock element.
11360
11361 2003-01-03 Ulrich Drepper <drepper@redhat.com>
11362
11363 * Makefile (tests): Add tst-cond7.
11364 * tst-cond7.c: New file.
11365
11366 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
11367 (condvar_cleanup): Get condvar address from the right place.
11368
11369 * atomic.h: Correct definitions of atomic_full_barrier,
11370 atomic_read_barrier, atomic_write_barrier.
11371
11372 * old_pthread_cond_broadcast.c: Make memory allocate and initialization
11373 race-free.
11374 * old_pthread_cond_signal.c: Likewise.
11375 * old_pthread_cond_timedwait.c: Likewise.
11376 * old_pthread_cond_wait.c: Likewise.
11377
11378 2003-01-03 Jakub Jelinek <jakub@redhat.com>
11379
11380 * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
11381
11382 2003-01-03 Ulrich Drepper <drepper@redhat.com>
11383
11384 * pthreadP.h (pthread_cond_2_0_t): New type.
11385 (struct pthread_functions): Use new type for 2.0 condvar callbacks.
11386 Use new type for the 2.0 condvar function prototypes.
11387 * forward.c: Use pthread_cond_2_0_t for 2.0 condvar functions.
11388 * old_pthread_cond_init.c: Use pthread_cond_2_0_t for condvar
11389 parameter.
11390 * old_pthread_cond_destroy.c: Likewise.
11391 * old_pthread_cond_broadcast.c: Likewise. Lock appropriately.
11392 * old_pthread_cond_signal.c: Likewise.
11393 * old_pthread_cond_timedwait.c: Likewise.
11394 * old_pthread_cond_wait.c: Likewise.
11395
11396 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
11397 (__pthread_cond_wait): Don't save cancellation mode and seq value
11398 in same location.
11399
11400 * herrno.c (__h_errno_location): Don't define as weak.
11401
11402 2003-01-02 Jakub Jelinek <jakub@redhat.com>
11403
11404 * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
11405 pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
11406 and pthread_cond_wait.
11407 * old_pthread_cond_broadcast.c (__old_pthread_cond_broadcast):
11408 Renamed to...
11409 (__pthread_cond_broadcast_2_0): ... this.
11410 * old_pthread_cond_destroy.c (__old_pthread_cond_destroy):
11411 Renamed to...
11412 (__pthread_cond_destroy_2_0): ... this.
11413 * old_pthread_cond_init.c (__old_pthread_cond_init):
11414 Renamed to...
11415 (__pthread_cond_init_2_0): ... this.
11416 * old_pthread_cond_signal.c (__old_pthread_cond_signal):
11417 Renamed to...
11418 (__pthread_cond_signal_2_0): ... this.
11419 * old_pthread_cond_wait.c (__old_pthread_cond_wait):
11420 Renamed to...
11421 (__pthread_cond_wait_2_0): ... this.
11422 * pthread_cond_destroy.c: Include shlib-compat.h.
11423 (pthread_cond_destroy): Change strong_alias into versioned_symbol.
11424 * pthread_cond_init.c: Include shlib-compat.h.
11425 (pthread_cond_init): Change strong_alias into versioned_symbol.
11426 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_cond_*
11427 fields to ptr___pthread_cond_* and add ptr___pthread_cond_*_2_0
11428 fields.
11429 (__pthread_cond_broadcast_2_0, __pthread_cond_destroy_2_0,
11430 __pthread_cond_init_2_0, __pthread_cond_signal_2_0,
11431 __pthread_cond_wait_2_0): New prototypes.
11432 (__old_pthread_cond_broadcast, __old_pthread_cond_destroy,
11433 __old_pthread_cond_init, __old_pthread_cond_signal,
11434 __old_pthread_cond_wait): Removed.
11435 * init.c: Include shlib-compat.h.
11436 (pthread_functions): Guard ptr___pthread_attr_init_2_0
11437 initialization with SHLIB_COMPAT (GLIBC_2_0, GLIBC_2_1).
11438 Rename ptr_pthread_cond_* to ptr___pthread_cond_*, initialize
11439 ptr___pthread_cond_*_2_0 fields.
11440 * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
11441 pthread_cond_*@GLIBC_2.0 compatibility symbols.
11442
11443 * sysdeps/pthread/sigaction.c (SIGCANCEL): Only define if
11444 LIBC_SIGACTION was not yet defined.
11445 [!defined LIBC_SIGACTION]: Define LIBC_SIGACTION, #include self.
11446 [!defined LIBC_SIGACTION] (__sigaction): New function and
11447 libc_hidden_weak.
11448 [!defined LIBC_SIGACTION] (sigaction): New weak_alias.
11449 [defined LIBC_SIGACTION]: #include_next <sigaction.c>.
11450
11451 2003-01-02 Jakub Jelinek <jakub@redhat.com>
11452
11453 * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
11454
11455 2003-01-02 Ulrich Drepper <drepper@redhat.com>
11456
11457 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
11458 New, larger type definition.
11459 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: New condvar
11460 implementation.
11461 * Versions [libpthread]: Add definitions for new pthread_cond_*
11462 interfaces for version GLIBC_2.3.2.
11463 * pthread_cond_init.c: Update initialization for new type definition.
11464 * Makefile (libpthread-routines): Remove pthread_cond_wait,
11465 pthread_cond_timedwait, pthread_cond_signal, and
11466 pthread_cond_broadcast. Add old_pthread_cond_init,
11467 old_pthread_cond_destroy, old_pthread_cond_wait,
11468 old_pthread_cond_timedwait, old_pthread_cond_signal, and
11469 old_pthread_cond_broadcast.
11470 * old_pthread_cond_broadcast.c: New file.
11471 * old_pthread_cond_destroy.c: New file.
11472 * old_pthread_cond_init.c: New file.
11473 * old_pthread_cond_signal.c: New file.
11474 * old_pthread_cond_timedwait.c: New file.
11475 * old_pthread_cond_wait.c: New file.
11476 * pthreadP.h: Add prototypes for the compatibility interfaces.
11477
11478 * pthread_cond_destroy.c: Don't include <errno.h>.
11479
11480 2003-01-01 Ulrich Drepper <drepper@redhat.com>
11481
11482 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Avoid
11483 unnecessary zero offset when addressing MUTEX.
11484
11485 2002-12-31 Ulrich Drepper <drepper@redhat.com>
11486
11487 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
11488 __register_atfork.
11489 * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
11490 for __register_atfork.
11491
11492 2002-12-31 Jakub Jelinek <jakub@redhat.com>
11493
11494 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use __ASSEMBLER__
11495 instead of ASSEMBLER test macro.
11496
11497 * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
11498 __libc_current_sigrtmax): Add libc_hidden_def.
11499
11500 * sysdeps/pthread/list.h: Remove assert.h include.
11501
11502 2002-12-31 Ulrich Drepper <drepper@redhat.com>
11503
11504 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Use
11505 __pthread_initialize_minimal_internal not
11506 __pthread_initialize_minimal.
11507
11508 2002-12-30 Ulrich Drepper <drepper@redhat.com>
11509
11510 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Mark
11511 __pthread_initialize_minimal as hidden.
11512
11513 * init.c (__pthread_initialize_minimal_internal): Don't mark as
11514 constructor.
11515
11516 2002-12-31 Jakub Jelinek <jakub@redhat.com>
11517
11518 * Makefile ($(inst_libdir)/libpthread.so): Depend on
11519 $(common-objpfx)format.lds, include that into the output script.
11520 Fix comment.
11521 (extra-B-pthread.so): Change linuxthreads/ into nptl/.
11522
11523 2002-12-28 Andreas Jaeger <aj@suse.de>
11524
11525 * sysdeps/unix/sysv/linux/xstatconv.c (xstat_conv): Adjust for
11526 nsec resolution changes.
11527 (xstat64_conv): Likewise.
11528 (xstat32_conv): Likewise.
11529 * sysdeps/unix/sysv/linux/kernel_stat.h: Add nsec resolution for
11530 struct kernel_stat.
11531 * sysdeps/unix/sysv/linux/bits/stat.h: Add nsec resolution for
11532 structs stat and stat64.
11533 * time/time.h (__timespec_defined): Define for __USE_MISC.
11534 * io/sys/stat.h [__USE_MISC]: Define __need_timespec for struct stat.
11535
11536 2002-12-30 Jakub Jelinek <jakub@redhat.com>
11537
11538 * forward.c (FORWARD2): Renamed from FORWARD3. Remove unused export
11539 argument.
11540 (pthread_attr_init_2_0, pthread_attr_init_2_1): Use FORWARD macro.
11541 (pthread_exit): Use strong_alias to avoid warnings.
11542 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_exit
11543 and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
11544 ptr___pthread_attr_init_2_*.
11545 * init.c (pthread_functions): Adjust.
11546
11547 2002-12-29 Ulrich Drepper <drepper@redhat.com>
11548
11549 * forward.c: Make all functions available by default again. It
11550 caused too much trouble.
11551
11552 * pt-siglongjmp.c: Removed.
11553
11554 2002-12-28 Jakub Jelinek <jakub@redhat.com>
11555
11556 * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
11557 (SYSINFO_OFFSET, MULTIPLE_THREADS_OFFSET): Remove.
11558 * sysdeps/i386/Makefile: New file.
11559 * sysdeps/i386/tcb-offsets.sym: New file.
11560 * sysdeps/pthread/tcb-offsets.h: New file.
11561 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
11562 Remove MULTIPLE_THREADS_OFFSET and SYSINFO_OFFSET checks.
11563
11564 * sysdeps/unix/sysv/linux/Versions [libc] (GLIBC_PRIVATE): Move
11565 __register_atfork...
11566 (GLIBC_2.3.2): ...here.
11567
11568 2002-12-28 Ulrich Drepper <drepper@redhat.com>
11569
11570 * sysdeps/pthread/pthread.h: Mark pthread_attr_getstackaddr and
11571 pthread_attr_setstackaddr with __attribute_deprecated__.
11572
11573 2002-12-27 Jakub Jelinek <jakub@redhat.com>
11574
11575 * pt-system.c (system): Remove cancellation handling.
11576 * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
11577 cancellation routines.
11578
11579 2002-12-28 Ulrich Drepper <drepper@redhat.com>
11580
11581 * descr.h: Include <dl-sysdep.h>.
11582 (struct pthread): Move header.data.list to the back of the struct.
11583 * sysdeps/i386/tls.h (tcbhead_t): Move list to the back of the struct.
11584 (MULTIPLE_THREADS_OFFSET): Adjust offset.
11585 (SYSINFO_OFFSEET): Likewise.
11586
11587 2002-12-27 Jakub Jelinek <jakub@redhat.com>
11588
11589 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h (USE_DL_SYSINFO):
11590 Define.
11591 (DL_SYSINFO_DEFAULT): Cast to uintptr_t to avoid warnings.
11592 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h (NEED_DL_SYSINFO,
11593 DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION): Define.
11594 (USE_DL_SYSINFO): Undef.
11595
11596 2002-12-22 Jakub Jelinek <jakub@redhat.com>
11597
11598 * Makefile (tests-reverse): Use $(objpfx)../libc.so instead of
11599 $(common-objpfx)libc.so.
11600 * tst-cancel4.c (tf_write, tf_writev): Increase buf sizes so that
11601 it is bigger than pipe buffer size even on arches with bigger
11602 page size.
11603 (tf_usleep): Cast usleep argument to useconds_t to avoid warnings.
11604
11605 2002-12-25 Ulrich Drepper <drepper@redhat.com>
11606
11607 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Implement
11608 correct errno access for case that USE___THREAD is not defined.
11609
11610 2002-12-24 Ulrich Drepper <drepper@redhat.com>
11611
11612 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Add missing #endif.
11613 Patch by Marijn Ros <marijn@mad.scientist.com>.
11614
11615 2002-12-22 Roland McGrath <roland@redhat.com>
11616
11617 * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
11618
11619 2002-12-20 Ulrich Drepper <drepper@redhat.com>
11620
11621 * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_inexpensive): Define.
11622
11623 2002-12-19 Ulrich Drepper <drepper@redhat.com>
11624
11625 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Don't define
11626 NEED_DL_SYSINFO since no processor < i686 had the sysenter opcode.
11627 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: New file.
11628
11629 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Use ENTER_KERNEL instead
11630 of int $0x80.
11631 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
11632 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Likewise.
11633 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Likewise.
11634 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
11635 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
11636 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Likewise.
11637 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Likewise.
11638 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
11639
11640 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add support for using
11641 sysenter.
11642 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
11643
11644 * sysdeps/i386/tls.h: Unconditionally include <dl-sysdep.h>.
11645
11646 * allocatestack.c (allocate_stack) [NEED_DL_SYSINFO]: Set sysinfo
11647 in new TCB.
11648 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Check
11649 that sysinfo is properly initialized.
11650 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define RTLD_PRIVATE_ERRNO
11651 to 1 only for ld.so.
11652
11653 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
11654 RTLD_CORRECT_DYNAMIC_WEAK.
11655
11656 2002-12-19 Jakub Jelinek <jakub@redhat.com>
11657
11658 * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
11659 Use return 0 as 6th argument to FORWARD4.
11660 * pthread_equal.c: Include pthreadP.h instead of pthread.h.
11661
11662 2002-12-18 Ulrich Drepper <drepper@redhat.com>
11663
11664 * descr.h (struct pthread) [NEED_DL_SYSINFO]: Add sysinfo member.
11665 * sysdeps/i386/tls.h (tcbhead_t): Add sysinfo member.
11666 Define SYSINFO_OFFSEET if NEED_DL_SYSINFO is defined.
11667 (INIT_SYSINFO): New #define.
11668 (TLS_TP_INIT): Use INIT_SYSINFO.
11669 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
11670 At test to make sure SYSINFO_OFFSET value is correct.
11671 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
11672
11673 2002-12-18 Jakub Jelinek <jakub@redhat.com>
11674
11675 * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
11676 * sysdeps/unix/sysv/linux/raise.c (gsignal): Add weak alias to raise.
11677 * Versions [libc: GLIBC_2.0]: Add pthread_attr_init.
11678 [libpthread: GLIBC_2.1]: Remove __pthread_rwlock_init,
11679 __pthread_rwlock_destroy, __pthread_rwlock_rdlock,
11680 __pthread_rwlock_wrlock, __pthread_rwlock_unlock,
11681 __pthread_rwlock_tryrdlock and __pthread_rwlock_trywrlock.
11682
11683 2002-12-18 Ulrich Drepper <drepper@redhat.com>
11684
11685 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use ENTER_KERNEL
11686 macro instead of using int $0x80 directly.
11687
11688 * sysdeps/pthread/bits/stdio-lock.h: New file.
11689 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: New file.
11690 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: New file.
11691 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: New file.
11692 * Makefile (routines): Add libc-lowlevelmutex.
11693
11694 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Remove
11695 __i686.get_pc_thunk.dx.
11696
11697 2002-12-17 Jakub Jelinek <jakub@redhat.com>
11698
11699 * Makefile (libpthread-shared-only-routines): Add pt-allocrtsig.
11700 (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
11701 ($(objpfx)tst-cancel-wrappers.out): New rule.
11702 * tst-cancel-wrappers.sh: New test.
11703 * tst-locale1.c: Include signal.h.
11704 (uselocale): Test static linking of __libc_current_sigrt*.
11705
11706 2002-12-17 Ulrich Drepper <drepper@redhat.com>
11707
11708 * Makefile (tests): Add tst-cancel6.
11709 * tst-cancel6.c: New file
11710
11711 2002-12-17 Jakub Jelinek <jakub@redhat.com>
11712
11713 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
11714 Define meaningfully for assembler as well.
11715 * pthreadP.h (struct pthread_functions): Remove
11716 ptr_pthread_attr_init field. Add ptr_pthread_attr_init_2_0
11717 and ptr_pthread_attr_init_2_1 fields.
11718 * init.c (pthread_functions): Initialize ptr_pthread_attr_init_2_0
11719 and ptr_pthread_attr_init_2_1 instead of ptr_pthread_attr_init.
11720 * forward.c (FORWARD4): Renamed from FORWARD3. Add export argument.
11721 (FORWARD3): Define using FORWARD4.
11722 (pthread_attr_init): Provide both @GLIBC_2.0 and @@GLIBC_2.1
11723 versions.
11724 * pt-system.c: Remove duplicate stdlib.h include.
11725
11726 2002-12-16 Ulrich Drepper <drepper@redhat.com>
11727
11728 * sem_init.c: Define sem_init@GLIBC_2.0.
11729 * sem_destroy.c: Define sem_destroy@GLIBC_2.0.
11730 * sem_getvalue.c: Define sem_getvalue@GLIBC_2.0.
11731
11732 * flockfile.c: Moved to...
11733 * sysdeps/pthread/flockfile.c: ...here. New file.
11734 * funlockfile.c: Moved to...
11735 * sysdeps/pthread/funlockfile.c: ...here. New file.
11736 * ftrylockfile.c: Moved to...
11737 * sysdeps/pthread/ftrylockfile.c: ...here. New file.
11738
11739 2002-12-16 Jakub Jelinek <jakub@redhat.com>
11740
11741 * libc-cancellation.c: Guard both function with
11742 #if !defined NOT_IN_libc.
11743 * Makefile (libpthread-routines): Use ptw-, not pt- prefix for the
11744 automatically provided pthread wrappers.
11745 * pthreadP.h (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define to
11746 CANCEL_* if IS_IN_libpthread and to dummy versions if not in libc
11747 nor in libpthread.
11748 * pt-open.c: Removed.
11749 * pt-fcntl.c: Removed.
11750 * pt-fsync.c: Removed.
11751 * pt-lseek.c: Removed.
11752 * pt-msgrcv.c: Removed.
11753 * pt-msgsnd.c: Removed.
11754 * pt-msync.c: Removed.
11755 * pt-nanosleep.c: Removed.
11756 * pt-open64.c: Removed.
11757 * pt-pause.c: Removed.
11758 * pt-pread.c: Removed.
11759 * pt-pread64.c: Removed.
11760 * pt-pwrite.c: Removed.
11761 * pt-pwrite64.c: Removed.
11762 * pt-read.c: Removed.
11763 * pt-recv.c: Removed.
11764 * pt-recvfrom.c: Removed.
11765 * pt-recvmsg.c: Removed.
11766 * pt-send.c: Removed.
11767 * pt-sendto.c: Removed.
11768 * pt-sigtimedwait.c: Removed.
11769 * pt-sigwait.c: Removed.
11770 * pt-wait.c: Removed.
11771 * pt-waitpid.c: Removed.
11772 * pt-write.c: Removed.
11773 * pt-accept.c: Removed.
11774 * pt-close.c: Removed.
11775 * pt-connect.c: Removed.
11776 * pt-lseek64.c: Removed.
11777 * pt-sendmsg.c: Removed.
11778 * pt-tcdrain.c: Removed.
11779
11780 2002-12-15 Ulrich Drepper <drepper@redhat.com>
11781
11782 * init.c (__pthread_initialize_minimal_internal): Renamed from
11783 __pthread_initialize_minimal. Make old name an alias. This
11784 converts a normal relocation into a relative relocation.
11785
11786 * pt-fcntl.c (__fcntl): Use fcntl64 syscall, not fcntl.
11787
11788 * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
11789 readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
11790 * Makefile (libpthread-routines): Remove pt-creat, pt-poll,
11791 pt-pselect, pt-readv, pt-select, pt-sigpause, pt-sigsuspend,
11792 pt-sigwaitinfo, pt-waitid, and pt-writev.
11793 * pt-creat.c: Removed.
11794 * pt-poll.c: Removed.
11795 * pt-pselect.c: Removed.
11796 * pt-readv.c: Removed.
11797 * pt-select.c: Removed.
11798 * pt-sigpause.c: Removed.
11799 * pt-sigsuspend.c: Removed.
11800 * pt-sigwaitinfo.c: Removed.
11801 * pt-waitid.c: Removed.
11802 * pt-writev.c: Removed.
11803
11804 * init.c (pthread_functions): New variable.
11805 (__pthread_initialize_minimal): Pass pointer to pthread_functions
11806 (or NULL) to __libc_pthread_init.
11807 * forward.c: Rewrite to use __libc:pthread_functions array to get
11808 function addresses.
11809 * sysdeps/unix/sysv/linux/fork.h: Remove __libc_pthread_init
11810 prototype.
11811 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
11812 Take new parameter. Copy content of variable pointed to by it
11813 to __libc_pthread_init.
11814
11815 * pthreadP.h (struct pthread_functions): New type.
11816 (__libc_pthread_init): Declare.
11817
11818 * pthread_attr_destroy.c: Add namespace protected alias.
11819 * pthread_attr_getdetachstate.c: Likewise.
11820 * pthread_attr_getinheritsched.c: Likewise.
11821 * pthread_attr_getschedparam.c: Likewise.
11822 * pthread_attr_getschedpolicy.c: Likewise.
11823 * pthread_attr_getscope.c: Likewise.
11824 * pthread_attr_setdetachstate.c: Likewise.
11825 * pthread_attr_setinheritsched.c: Likewise.
11826 * pthread_attr_setschedparam.c: Likewise.
11827 * pthread_attr_setschedpolicy.c: Likewise.
11828 * pthread_attr_setscope.c: Likewise.
11829 * pthread_cond_broadcast.c: Likewise.
11830 * pthread_cond_destroy.c: Likewise.
11831 * pthread_cond_init.c: Likewise.
11832 * pthread_cond_signal.c: Likewise.
11833 * pthread_cond_wait.c: Likewise.
11834 * pthread_condattr_destroy.c: Likewise.
11835 * pthread_condattr_init.c: Likewise.
11836 * pthread_equal.c: Likewise.
11837 * pthread_exit.c: Likewise.
11838 * pthread_getschedparam.c: Likewise.
11839 * pthread_self.c: Likewise.
11840 * pthread_setcancelstate.c: Likewise.
11841 * pthread_setschedparam.c: Likewise.
11842 * pthread_mutex_destroy.c: Likewise.
11843 * pthread_mutex_init.c: Likewise.
11844 * pthreadP.h: Add prototypes for the aliases.
11845
11846 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Set
11847 multiple_threads member in correct TCB to 1.
11848
11849 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define
11850 SINGLE_THREAD_P. If in libc or libpthread examine multiple_thread
11851 member of thread decriptor, otherwise return unconditionally 1.
11852
11853 2002-12-14 Ulrich Drepper <drepper@redhat.com>
11854
11855 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Changes folded into the
11856 regular Linux version. Remove file.
11857 * sysdeps/unix/sysv/linux/connect.S: Likewise. Remove file.
11858 * sysdeps/unix/sysv/linux/llseek.c: Likewise. Remove file.
11859 * sysdeps/unix/sysv/linux/msgrcv.c: Likewise. Remove file.
11860 * sysdeps/unix/sysv/linux/msgsnd.c: Likewise. Remove file.
11861 * sysdeps/unix/sysv/linux/open64.c: Likewise. Remove file.
11862 * sysdeps/unix/sysv/linux/poll.c: Likewise. Remove file.
11863 * sysdeps/unix/sysv/linux/pread.c: Likewise. Remove file.
11864 * sysdeps/unix/sysv/linux/pread64.c: Likewise. Remove file.
11865 * sysdeps/unix/sysv/linux/pselect.c: Likewise. Remove file.
11866 * sysdeps/unix/sysv/linux/pwrite.c: Likewise. Remove file.
11867 * sysdeps/unix/sysv/linux/pwrite64.c: Likewise. Remove file.
11868 * sysdeps/unix/sysv/linux/readv.c: Likewise. Remove file.
11869 * sysdeps/unix/sysv/linux/recv.S: Likewise. Remove file.
11870 * sysdeps/unix/sysv/linux/recvfrom.S: Likewise. Remove file.
11871 * sysdeps/unix/sysv/linux/recvmsg.S: Likewise. Remove file.
11872 * sysdeps/unix/sysv/linux/send.S: Likewise. Remove file.
11873 * sysdeps/unix/sysv/linux/sendmsg.S: Likewise. Remove file.
11874 * sysdeps/unix/sysv/linux/sendto.S: Likewise. Remove file.
11875 * sysdeps/unix/sysv/linux/sigpause.c: Likewise. Remove file.
11876 * sysdeps/unix/sysv/linux/sigsuspend.c: Likewise. Remove file.
11877 * sysdeps/unix/sysv/linux/sigtimedwait.c: Likewise. Remove file.
11878 * sysdeps/unix/sysv/linux/sigwait.c: Likewise. Remove file.
11879 * sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise. Remove file.
11880 * sysdeps/unix/sysv/linux/system.c: Likewise. Remove file.
11881 * sysdeps/unix/sysv/linux/tcdrain.c: Likewise. Remove file.
11882 * sysdeps/unix/sysv/linux/wait.c: Likewise. Remove file.
11883 * sysdeps/unix/sysv/linux/waitid.c: Likewise. Remove file.
11884 * sysdeps/unix/sysv/linux/waitpid.c: Likewise. Remove file.
11885 * sysdeps/unix/sysv/linux/writev.c: Likewise. Remove file.
11886 * sysdeps/unix/sysv/linux/i386/fcntl.c: Likewise. Remove file.
11887
11888 2002-12-14 Jakub Jelinek <jakub@redhat.com>
11889
11890 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
11891 * sysdeps/unix/sysv/linux/open.c: Removed.
11892 * sysdeps/unix/sysv/linux/fsync.c: Removed.
11893 * sysdeps/unix/sysv/linux/lseek.c: Removed.
11894 * sysdeps/unix/sysv/linux/msync.c: Removed.
11895 * sysdeps/unix/sysv/linux/read.c: Removed.
11896 * sysdeps/unix/sysv/linux/close.c: Removed.
11897 * sysdeps/unix/sysv/linux/creat.c: Removed.
11898 * sysdeps/unix/sysv/linux/nanosleep.c: Removed.
11899 * sysdeps/unix/sysv/linux/pause.c: Removed.
11900 * sysdeps/unix/sysv/linux/select.c: Removed.
11901 * sysdeps/unix/sysv/linux/write.c: Removed.
11902
11903 2002-12-14 Ulrich Drepper <drepper@redhat.com>
11904
11905 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Check multiple_threads
11906 element in TCB to see whether locking is needed.
11907
11908 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Check that
11909 MULTIPLE_THREADS_OFFSET value is correct.
11910
11911 * sysdeps/unix/sysv/linux/close.c: New file.
11912 * sysdeps/unix/sysv/linux/connect.S: New file.
11913 * sysdeps/unix/sysv/linux/creat.c: New file.
11914 * sysdeps/unix/sysv/linux/fsync.c: New file.
11915 * sysdeps/unix/sysv/linux/llseek.c: New file.
11916 * sysdeps/unix/sysv/linux/lseek.c: New file.
11917 * sysdeps/unix/sysv/linux/msgrcv.c: New file.
11918 * sysdeps/unix/sysv/linux/msgsnd.c: New file.
11919 * sysdeps/unix/sysv/linux/msync.c: New file.
11920 * sysdeps/unix/sysv/linux/nanosleep.c: New file.
11921 * sysdeps/unix/sysv/linux/open.c: New file.
11922 * sysdeps/unix/sysv/linux/open64.c: New file.
11923 * sysdeps/unix/sysv/linux/pause.c: New file.
11924 * sysdeps/unix/sysv/linux/poll.c: New file.
11925 * sysdeps/unix/sysv/linux/pread.c: New file.
11926 * sysdeps/unix/sysv/linux/pread64.c: New file.
11927 * sysdeps/unix/sysv/linux/pselect.c: New file.
11928 * sysdeps/unix/sysv/linux/pwrite.c: New file.
11929 * sysdeps/unix/sysv/linux/pwrite64.c: New file.
11930 * sysdeps/unix/sysv/linux/readv.c: New file.
11931 * sysdeps/unix/sysv/linux/recv.S: New file.
11932 * sysdeps/unix/sysv/linux/recvfrom.S: New file.
11933 * sysdeps/unix/sysv/linux/recvmsg.S: New file.
11934 * sysdeps/unix/sysv/linux/select.c: New file.
11935 * sysdeps/unix/sysv/linux/send.S: New file.
11936 * sysdeps/unix/sysv/linux/sendmsg.S: New file.
11937 * sysdeps/unix/sysv/linux/sendto.S: New file.
11938 * sysdeps/unix/sysv/linux/sigpause.c: New file.
11939 * sysdeps/unix/sysv/linux/sigsuspend.c: New file.
11940 * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
11941 * sysdeps/unix/sysv/linux/sigwait.c: New file.
11942 * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
11943 * sysdeps/unix/sysv/linux/system.c: New file.
11944 * sysdeps/unix/sysv/linux/tcdrain.c: New file.
11945 * sysdeps/unix/sysv/linux/wait.c: New file.
11946 * sysdeps/unix/sysv/linux/waitid.c: New file.
11947 * sysdeps/unix/sysv/linux/waitpid.c: New file.
11948 * sysdeps/unix/sysv/linux/writev.c: New file.
11949 * sysdeps/unix/sysv/linux/i386/fcntl.c: New file.
11950
11951 * pt-readv.c: Fix comment.
11952
11953 2002-12-14 Jakub Jelinek <jakub@redhat.com>
11954
11955 * tst-cleanup1.c: Include stdlib.h.
11956
11957 * tst-cancel5.c: New test.
11958 * Makefile (tests): Add tst-cancel5.
11959 (tst-cancel5): Link against libc.so libpthread.so in that order.
11960
11961 2002-12-13 Ulrich Drepper <drepper@redhat.com>
11962
11963 * forward.c (test_loaded): Prevent recursive calls.
11964
11965 * Makefile (routines): Add libc-cancellation.
11966 * libc-cancellation.c: New file.
11967 * descr.h (struct pthread): Add multiple_threads field.
11968 * allocatestack.c (allocate_stack): Initialize multiple_header field of
11969 new thread descriptor to 1.
11970 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread):
11971 Initialize multiple_thread field after successful thread creation.
11972 * cancellation.c (__do_cancel): Move to pthreadP.h.
11973 (__pthread_enable_asynccancel): Remove parameter from __do_cancel call.
11974 (__pthread_disable_asynccancel): Add internal_function attribute.
11975 * init.c (sigcancel_handler): Remove parameter from __do_cancel call.
11976 * pthread_setcancelstate.c: Likewise.
11977 * pthread_setcanceltype.c: Likewise.
11978 * pthread_exit.c: Likewise.
11979 * pthreadP.h (CANCELLATION_P): Likewise.
11980 (__do_cancel): Define as static inline.
11981 (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): New #defines.
11982 (__libc_enable_asynccancel, __libc_disable_asynccancel): New
11983 declarations.
11984 * sysdeps/i386/tls.h (tcbhead_t): Add list and multiple_threads
11985 fields. Define MULTIPLE_THREADS_OFFSET.
11986 * sysdeps/pthread/bits/libc-lock.h: Remove __libc_locking_needed
11987 declaration.
11988 * sysdeps/unix/sysv/linux/accept.S: New file.
11989 * sysdeps/unix/sysv/linux/read.c: New file.
11990 * sysdeps/unix/sysv/linux/write.c: New file.
11991 * sysdeps/unix/sysv/linux/i386/pt-socket.S: New file.
11992 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove definition and
11993 initialization of __libc_locking_needed.
11994 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't use
11995 __libc_locking_needed, use multiple_threads field in TCB.
11996 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
11997
11998 2002-12-12 Ulrich Drepper <drepper@redhat.com>
11999
12000 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: Use i486
12001 version.
12002 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: Likewise.
12003
12004 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Correct
12005 access to __libc_locking_needed for PIC.
12006
12007 2002-12-12 Jakub Jelinek <jakub@redhat.com>
12008
12009 * sysdeps/pthread/bits/libc-lock.h (__libc_locking_needed): Only
12010 declare for libc.so.
12011 (__libc_lock_init, __libc_lock_init_recursive): Change into comma
12012 expression.
12013 (__libc_lock_lock): Put into statement expression.
12014 (__libc_lock_unlock): Remove trailing semicolon.
12015 * sysdeps/unix/sysv/linux/fork.h (__libc_pthread_init): Fix typo.
12016
12017 2002-12-12 Roland McGrath <roland@redhat.com>
12018
12019 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use asm operand with
12020 "m" constraint to refer to __libc_locking_needed. Declare it here.
12021
12022 2002-12-12 Ulrich Drepper <drepper@redhat.com>
12023
12024 * sysdeps/unix/sysv/linux/fork-gen.c: Renamed to...
12025 * sysdeps/unix/sysv/linux/libc_pthread_init.c: ...this.
12026 Initialize __libc_locking_needed.
12027 * init.c (__pthread_initialize_minimal): Call __libc_pthread_init
12028 instead of __register_pthread_fork_handler.
12029 * sysdeps/pthread/bits/libc-lock.h: Declare __libc_locking_needed.
12030 * sysdeps/unix/sysv/linux/Makefile (sysdep_routimes): Replace
12031 fork-gen with libc_pthread_init.
12032 * sysdeps/unix/sysv/linux/Versions: Use __libc_pthread_init instead
12033 of __register_pthread_fork_handler.
12034 * sysdeps/unix/sysv/linux/fork.h: Declare __libc_pthread_init instead
12035 of __register_pthread_fork_handler.
12036 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use
12037 __libc_locking_needed to determine whether lock prefix can be avoided.
12038 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
12039
12040 2002-12-11 Ulrich Drepper <drepper@redhat.com>
12041
12042 * Makefile (tests): Add tst-cleanup1.
12043 * tst-cleanup1.c: New file.
12044 * cancellation.c (__cleanup_thread): Removed.
12045 (__do_cancel): Remove call to __cleanup_thread.
12046 * pthreadP.h: Remove __cleanup_thread prorotype.
12047
12048 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
12049 Remember function and argument even if cancellation handler
12050 function is not available.
12051 (__libc_cleanup_region_end): Execute registered function directly if
12052 pthread functions are not available.
12053 (__libc_cleanup_end): Likewise.
12054
12055 * init.c (__pthread_initialize_minimal): Fix initialization in
12056 static lib by preventing gcc from being too clever.
12057
12058 2002-12-10 Ulrich Drepper <drepper@redhat.com>
12059
12060 * init.c (__pthread_initialize_minimal): Remove unneccesary
12061 sigaddset call.
12062
12063 * Makefile (tests): We can run tst-locale2 now.
12064
12065 2002-12-09 Ulrich Drepper <drepper@redhat.com>
12066
12067 * Versions: Remove duplicated sigwait entry.
12068
12069 2002-12-08 Ulrich Drepper <drepper@redhat.com>
12070
12071 * pthreadP.h: Enable pthread_cleanup_{push,pop} optimizations only
12072 inside libpthread.
12073
12074 * pt-fcntl.c (__fcntl): Initialize oldtype to avoid warning.
12075
12076 * pthreadP.h: Declare __pthread_enable_asynccancel and
12077 __pthread_disable_asynccancel.
12078 (CANCEL_ASYNC): Use __pthread_enable_asynccancel.
12079 (CANCEL_RESET): Use __pthread_disable_asynccancel.
12080 * cancellation.c (__pthread_enable_asynccancel): New function.
12081 (__pthread_disable_asynccancel): New function.
12082 * pt-accept.c: Adjust for CANCEL_ASYNC and CANCEL_RESET change.
12083 * pt-close.c: Likewise.
12084 * pt-connect.c: Likewise.
12085 * pt-creat.c: Likewise.
12086 * pt-fcntl.c: Likewise.
12087 * pt-fsync.c: Likewise.
12088 * pt-lseek.c: Likewise.
12089 * pt-lseek64.c: Likewise.
12090 * pt-msgrcv.c: Likewise.
12091 * pt-msgsnd.c: Likewise.
12092 * pt-msync.c: Likewise.
12093 * pt-nanosleep.c: Likewise.
12094 * pt-open.c: Likewise.
12095 * pt-open64.c: Likewise.
12096 * pt-pause.c: Likewise.
12097 * pt-poll.c: Likewise.
12098 * pt-pread.c: Likewise.
12099 * pt-pread64.c: Likewise.
12100 * pt-pselect.c: Likewise.
12101 * pt-pwrite.c: Likewise.
12102 * pt-pwrite64.c: Likewise.
12103 * pt-read.c: Likewise.
12104 * pt-readv.c: Likewise.
12105 * pt-recv.c: Likewise.
12106 * pt-recvfrom.c: Likewise.
12107 * pt-recvmsg.c: Likewise.
12108 * pt-select.c: Likewise.
12109 * pt-send.c: Likewise.
12110 * pt-sendmsg.c: Likewise.
12111 * pt-sendto.c: Likewise.
12112 * pt-sigpause.c: Likewise.
12113 * pt-sigsuspend.c: Likewise.
12114 * pt-sigtimedwait.c: Likewise.
12115 * pt-sigwait.c: Likewise.
12116 * pt-sigwaitinfo.c: Likewise.
12117 * pt-system.c: Likewise.
12118 * pt-tcdrain.c: Likewise.
12119 * pt-wait.c: Likewise.
12120 * pt-waitid.c: Likewise.
12121 * pt-waitpid.c: Likewise.
12122 * pt-write.c: Likewise.
12123 * pt-writev.c: Likewise.
12124 * pthread_join.c: Likewise.
12125 * pthread_timedjoin.c: Likewise.
12126
12127 * pt-sigpause.c (sigsuspend): Call __sigsuspend.
12128 (__xpg_sigpause): New function.
12129 * Versions (libpthread:GLIBC_2.3.2): Add __xpg_sigpause.
12130
12131 2002-12-07 Ulrich Drepper <drepper@redhat.com>
12132
12133 * Makefile (CFLAGS-ftrylockfile.c): Add -D_IO_MTSAFE_IO.
12134
12135 * cleanup.c: Move declarations of _GI_pthread_cleanup_push and
12136 _GI_pthread_cleanup_pop to pthreadP.h.
12137
12138 * ftrylockfile.c: Use _IO_lock_trylock instead of
12139 pthread_mutex_trylock.
12140
12141 * pthreadP.h (CANCEL_ASYNC): Use __pthread_setcanceltype.
12142 (CANCEL_RESET): Likewise.
12143 (__pthread_setcanceltype_): Declare.
12144 (__pthread_mutex_lock_internal): Declare.
12145 (__pthread_mutex_unlock_internal): Declare.
12146 (__pthread_once_internal): Declare.
12147 (pthread_cleanup_push): Redefine using _GI_pthread_cleanup_push.
12148 (pthread_cleanup_pop): Redefine using _GI_pthread_cleanup_pop.
12149
12150 * pthread_cond_timedwait.c: Use INTUSE is calls to pthread_mutex_lock
12151 and pthread_mutex_unlock.
12152 * pthread_cond_wait.c: Likewise.
12153 * pthread_mutex_lock.c: Use INTDEF to define alias if needed.
12154 * pthread_mutex_unlock.c: Likewise.
12155
12156 * pthread_setcanceltype.c: Add additional alias
12157 __pthread_setcanceltype.
12158
12159 * sem_unlink.c (sem_unlink): Use __pthread_once with INTDEF.
12160 * sem_open.c (sem_open): Likewise.
12161 Use __libc_open, __libc_write, and __libc_close instead of
12162 open, write, and close respectively.
12163
12164 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_trylock_internal):
12165 Rewrite as statement expression since it must return a value.
12166
12167 * pthread_cancel.c: Use __pthread_kill instead of pthread_kill.
12168 * sysdeps/unix/sysv/linux/pthread_kill.c: Define additional alias
12169 __pthread_kill.
12170
12171 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Define additional
12172 alias __pthread_once_internal.
12173
12174 * sysdeps/unix/sysv/linux/raise.c: Use libc_hidden_def for raise.
12175
12176 2002-12-06 Ulrich Drepper <drepper@redhat.com>
12177
12178 * Makefile (tests): Add tst-stdio1 and tst-stdio2.
12179 * tst-stdio1.c: New file.
12180 * tst-stdio2.c: New file.
12181
12182 * init.c (__pthread_initialize_minimal): Correct INIT_LIST_HEAD use.
12183
12184 * Makefile (tests): Comment out tst-locale2 for now.
12185 (CFLAGS-flockfile.c, CFLAGS-funlockfile.c): Define to -D_IO_MTSAFE_IO.
12186
12187 * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-fork.c to
12188 -D_IO_MTSAFE_IO.
12189 * sysdeps/unix/sysv/linux/fork.c: Include <bits/stdio-lock.h>.
12190 Use _IO_lock_init instead of explicit assignment.
12191
12192 * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
12193 Define __libc_lock_* and __libc_lock_recursive macros with
12194 lowlevellock macros, not pthread mutexes.
12195
12196 * flockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_lock instead
12197 of pthread_mutex_lock.
12198 * funlockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_unlock
12199 instead of pthread_mutex_unlock.
12200
12201 2002-12-06 Roland McGrath <roland@redhat.com>
12202
12203 * allocatestack.c (__stack_user): Use uninitialized defn.
12204 * init.c (__pthread_initialize_minimal): Initialize it here.
12205
12206 2002-12-05 Roland McGrath <roland@redhat.com>
12207
12208 * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
12209 string.
12210 * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
12211
12212 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Add
12213 missing & here too.
12214
12215 2002-12-05 Ulrich Drepper <drepper@redhat.com>
12216
12217 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
12218 lowlevellock.
12219 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: New file.
12220 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: New file.
12221 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: New file.
12222 * sysdeps/pthread/bits/libc-lock.h: Use lowlevellock implementation
12223 for __libc_lock_* macros.
12224 * Makefile (routines): Add libc-lowlevellock.
12225
12226 2002-10-09 Roland McGrath <roland@redhat.com>
12227
12228 * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
12229 Under [__PIC__], call the function via the pointer fetched for
12230 comparison rather than a call by name that uses the PLT.
12231 (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
12232 (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
12233 (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
12234 (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
12235 (__libc_key_create, __libc_getspecific, __libc_setspecific): Use it.
12236
12237 2002-12-04 Roland McGrath <roland@redhat.com>
12238
12239 * forward.c (pthread_self): Use FORWARD3 macro to correct return type.
12240
12241 * sysdeps/i386/td_ta_map_lwp2thr.c: Moved from ../nptl_db.
12242 * sysdeps/generic/td_ta_map_lwp2thr.c: New file.
12243
12244 * pthread_create.c (start_thread): Add missing & on __nptl_last_event.
12245
12246 2002-12-04 Ulrich Drepper <drepper@redhat.com>
12247
12248 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Make pthread_t
12249 a completely opaque, non-integer type.
12250 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
12251
12252 2002-12-05 Jakub Jelinek <jakub@redhat.com>
12253
12254 * sysdeps/i386/tls.h: Include stdlib.h.
12255 * sysdeps/x86_64/tls.h: Likewise.
12256
12257 2002-12-04 Ulrich Drepper <drepper@redhat.com>
12258
12259 * Makefile (tests): Add tst-locale2.
12260 (tests-static): Likewise.
12261 * tst-locale2.c: New file.
12262
12263 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Mark asms as
12264 volatile and add memory clobbers to lock operations.
12265
12266 2002-12-03 Ulrich Drepper <drepper@redhat.com>
12267
12268 * sysdeps/i386/i686/bits/atomic.h: Use i486 version.
12269 * sysdeps/i386/i486/bits/atomic.h: New file.
12270 * sysdeps/i386/i586/bits/atomic.h: New file.
12271 * sysdeps/i386/i686/pthread_spin_trylock.S: Define HAVE_CMOV and
12272 include i486 version.
12273 * sysdeps/i386/i486/pthread_spin_trylock.S: New file.
12274 * sysdeps/i386/i586/pthread_spin_trylock.S: New file.
12275 Patch by Marijn Ros <marijn@mad.scientist.com>.
12276
12277 * allocatestack.c (get_cached_stack): Don't crash if we first
12278 found a stack with a larger size then needed.
12279 Reported by Hui Huang <hui.huang@sun.com>.
12280
12281 * Makefile (tests): Add tst-sysconf.
12282 * tst-sysconf.c: New file.
12283
12284 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine
12285 PTHREAD_THREADS_MAX.
12286
12287 2002-12-02 Roland McGrath <roland@redhat.com>
12288
12289 * pthreadP.h (__stack_user, __nptl_create_event, __nptl_death_event):
12290 Declare using hidden_proto instead of attribute_hidden, so there are
12291 non-.hidden static symbols for gdb to find.
12292 (__pthread_keys): Likewise.
12293 * events.c (__nptl_create_event, __nptl_death_event): Add hidden_def.
12294 * allocatestack.c (__stack_user): Likewise.
12295 * pthread_create.c (__pthread_keys): Likewise.
12296 (__nptl_threads_events, __nptl_last_event): Make these static instead
12297 of hidden.
12298 * pthread_key_create.c (__pthread_pthread_keys_max,
12299 __pthread_pthread_key_2ndlevel_size): Renamed from __linuxthreads_*.
12300
12301 2002-12-02 Ulrich Drepper <drepper@redhat.com>
12302
12303 * Makefile (tests): Add tst-locale1. If buid-static is yes link
12304 statically.
12305 * tst-locale1.c: New file.
12306
12307 * pthread_cond_timedwait.c: Include <stdlib.h>.
12308
12309 * Makefile (tests): Add tst-fork2 and tst-fork3.
12310 * tst-fork2.c: New file.
12311 * tst-fork3.c: New file.
12312
12313 2002-11-28 Ulrich Drepper <drepper@redhat.com>
12314
12315 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
12316
12317 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
12318 require it to 200112L.
12319
12320 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Use cmov
12321 instruction only if HAVE_CMOV is defined.
12322 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Define HAVE_CMOV.
12323
12324 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: New file.
12325
12326 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: New file.
12327
12328 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: New file.
12329
12330 * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: New file.
12331
12332 2002-11-27 Ulrich Drepper <drepper@redhat.com>
12333
12334 * sysdeps/x86_64/bits/atomic.h: New file.
12335
12336 * sysdeps/i386/i686/bits/atomic.h: Fix asm syntax for 8- and
12337 16-bit operations.
12338
12339 * sysdeps/unix/sysv/linux/raise.c (raise): Use INTERNAL_SYSCALL if
12340 possible since gettid cannot fail.
12341
12342 * sysdeps/x86_64/pthreaddef.h: New file.
12343
12344 * sysdeps/i386/pthreaddef.h (gettid): Removed.
12345
12346 * sysdeps/x86_64/pthread_spin_init.c: New file.
12347 * sysdeps/x86_64/pthread_spin_lock.c: New file.
12348 * sysdeps/x86_64/pthread_spin_trylock.c: New file.
12349 * sysdeps/x86_64/pthread_spin_unlock.c: New file.
12350
12351 * sysdeps/i386/i686/pthread_spin_trylock.S (pthread_spin_trylock):
12352 Add missing lock prefix. Minute optimization.
12353
12354 * tst-spin2.c (main): Also check successful trylock call.
12355
12356 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use correct
12357 syscall. Fix typo in case INTERNAL_SYSCALL is not used.
12358
12359 * sysdeps/i386/pthread_spin_destroy.c: Moved to...
12360 * sysdeps/pthread/pthread_spin_destroy.c: ...here. New file.
12361
12362 * sysdeps/i386/pthread_sigmask.c: Removed. Use the generic code.
12363 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Return correct
12364 value in case of an error. Add support for INTERNAL_SYSCALL.
12365
12366 * sysdeps/i386/pthread_sigmask.c (pthread_sigmask): Return correct
12367 value in case of an error.
12368
12369 * sysdeps/x86_64/tls.h: New file.
12370
12371 2002-11-26 Ulrich Drepper <drepper@redhat.com>
12372
12373 * sysdeps/i386/tls.h (THREAD_GETMEM_NC): Change interface. It now
12374 takes the array member name and the index as parameters.
12375 (THREAD_SETMEM_NC): Likewise.
12376 * pthread_getspecific.c: Use new THREAD_GETMEM_NC interface.
12377 * pthread_setspecific.c: Use new THREAD_GETMEM_NC and THREAD_SETMEM_NC
12378 interfaces.
12379
12380 * sysdeps/i386/tls.h (THREAD_SETMEM): Use size of member element
12381 to decide which code to use.
12382 (THREAD_SETMEM_NC): Likewise.
12383
12384 * allocatestack.c (queue_stack): Don't remove stack from list here.
12385 Do it in the caller. Correct condition to prematurely terminate
12386 loop to free stacks.
12387 (__deallocate_stack): Remove stack from list here.
12388
12389 2002-11-26 Ulrich Drepper <drepper@redhat.com>
12390
12391 * Makefile (tests): Add tst-stack1.
12392 * tst-stack1.c: New file.
12393
12394 * allocatestack.c (allocate_stack): Initialize the TCB on a user
12395 provided stack.
12396
12397 * pthread_attr_getstack.c: Return bottom of the thread area.
12398
12399 2002-11-25 Ulrich Drepper <drepper@redhat.com>
12400
12401 * Makefile (libpthread-routines): Add pt-allocrtsig and
12402 pthread_kill_other_threads.
12403 * pt-allocrtsig.c: New file.
12404 * pthread_kill_other_threads.c: New file.
12405 * sysdeps/unix/sysv/linux/allocrtsig.c: Add additional aliases for
12406 all three functions.
12407 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
12408 allocrtsig.
12409 * sysdeps/unix/sysv/linux/Versions (libc:GLIBC_PRIVATE): Export
12410 __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
12411 and __libc_allocate_rtsig_private.
12412 * Versions (libpthread): Export pthread_kill_other_threads_np,
12413 __libc_current_sigrtmin, and __libc_current_sigrtmax.
12414
12415 2002-11-24 Ulrich Drepper <drepper@redhat.com>
12416
12417 * allocatestack.c (allocate_stack): stackaddr in attribute points to
12418 the end of the stack. Adjust computations.
12419 When mprotect call fails dequeue stack and free it.
12420 * pthread_attr_setstack.c: Store top of the stack in stackaddr
12421 attribute.
12422 * pthread_getattr_np.c: Likewise.
12423
12424 * descr.h (IS_DETACHED): Add some more parenthesis to prevent
12425 surprises.
12426
12427 2002-11-23 Ulrich Drepper <drepper@redhat.com>
12428
12429 * sysdeps/pthread/pthread.h (pthread_self): __THROW must come before
12430 attribute definitions. Patch by Luca Barbieri <ldb@ldb.ods.org>.
12431
12432 2002-11-22 Ulrich Drepper <drepper@redhat.com>
12433
12434 * pthread_getspecific.c: Optimize access to first 2nd-level array.
12435 * pthread_setspecific.c: Likewise.
12436
12437 2002-11-21 Ulrich Drepper <drepper@redhat.com>
12438
12439 * sysdeps/unix/sysv/linux/i386/createthread.c: Remove CLONE_ flags
12440 definitions. Get them from the official place.
12441 * sysdeps/unix/sysv/linux/i386/fork.c: Likewise.
12442
12443 * sysdeps/unix/sysv/linux/i386/createthread.c: Update CLONE_* flags.
12444 Use new CLONE_ flags in clone() calls.
12445
12446 * sysdeps/unix/sysv/linux/fork.c: Use ARCH_FORK to actually fork.
12447 * sysdeps/unix/sysv/linux/i386/fork.c: New file.
12448
12449 * Versions: Add pthread_* functions for libc.
12450 * forward.c: New file.
12451
12452 * sysdeps/pthread/Makefile (libpthread-sysdeps_routines): Add
12453 errno-loc.
12454 * herrno.c: New file.
12455 * res.c: New file.
12456
12457 * Makefile (libpthread-routines): Remove sem_post, sem_wait,
12458 sem_trywait, and sem_timedwait. Add herrno and res.
12459 * sem_init.c: Don't initialize lock and waiters members.
12460 * sem_open.c: Likewise.
12461 * sem_post.c: Removed.
12462 * sem_wait.c: Removed.
12463 * sem_trywait.c: Removed.
12464 * sem_timedwait.c: Removed.
12465 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Complete rewrite.
12466 Includes full implementations of sem_post, sem_wait, sem_trywait,
12467 and sem_timedwait.
12468 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Adjust
12469 for new implementation.
12470 * sysdeps/unix/sysv/linux/internaltypes.h (struct sem): Remove lock
12471 and waiters fields.
12472
12473 * tst-sem3.c: Improve error message.
12474 * tst-signal3.c: Likewise.
12475
12476 * init.c (__pthread_initialize_minimal): Use set_tid_address syscall
12477 to tell the kernel about the termination futex and to initialize tid
12478 member. Don't initialize main_thread.
12479 * descr.h (struct pthread): Remove main_thread member.
12480 * cancelllation.c (__do_cancel): Remove code handling main thread.
12481 The main thread is not special anymore.
12482
12483 * allocatestack.c (__reclaim_stacks): Mark stacks as unused. Add
12484 size of the stacks to stack_cache_actsize.
12485
12486 * pt-readv.c: Add missing "defined".
12487 * pt-sigwait.c: Likewise.
12488 * pt-writev.c: Likewise.
12489
12490 2002-11-09 Ulrich Drepper <drepper@redhat.com>
12491
12492 * Versions: Export __connect from libpthread.
12493 Patch by Luca Barbieri <ldb@ldb.ods.org>.
12494
12495 * Makefile (libpthread-routines): Add pt-raise.
12496 * sysdeps/unix/sysv/linux/raise.c: New file.
12497 * sysdeps/unix/sysv/linux/pt-raise.c: New file.
12498 * sysdeps/generic/pt-raise.c: New file.
12499
12500 * pthread_cond_init.c: Initialize all data elements of the condvar
12501 structure. Patch by Luca Barbieri <ldb@ldb.ods.org>.
12502
12503 * pthread_attr_init.c: Actually implement 2.0 compatibility version.
12504 * pthread_create.c: Likewise.
12505
12506 * Makefile (tests): Add tst-key1, tst-key2, tst-key3.
12507 * tst-key1.c: New file.
12508 * tst-key2.c: New file.
12509 * tst-key3.c: New file.
12510
12511 * Versions: Export pthread_detach for version GLIBC_2.0.
12512 Reported by Saurabh Desai <sdesai@austin.ibm.com>.
12513
12514 2002-11-08 Ulrich Drepper <drepper@redhat.com>
12515
12516 * pthread_key_create.c: Terminate search after an unused key was found.
12517 Patch by Luca Barbieri <ldb@ldb.ods.org>.
12518
12519 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Return zero.
12520 Patch by Luca Barbieri <ldb@ldb.ods.org>.
12521
12522 2002-10-10 Ulrich Drepper <drepper@redhat.com>
12523
12524 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Use slow generic
12525 dynamic lookup for errno in PIC.
12526
12527 * allocatestack.c (get_cached_stack): Rearrange code slightly to
12528 release the stack lock as soon as possible.
12529 Call _dl_allocate_tls_init for TCB from the cache to re-initialize
12530 the static TLS block.
12531 (allocate_stack): Call _dl_allocate_tls_init for user-provided stack.
12532
12533 * cancellation.c: Renamed from cancelation.c.
12534 * Makefile: Adjust accordingly.
12535 * pthreadP.h (CANCELLATION_P): Renamed from CANCELATION_P.
12536 * cleanup_defer.c: Use CANCELLATION_P.
12537 * pthread_testcancel.c: Likewise.
12538 * descr.h: Fix spelling in comments.
12539 * init.c: Likewise.
12540 * pthread_getattr_np.c: Likewise.
12541 * pthread_getschedparam.c: Likewise.
12542 * pthread_setschedparam.c: Likewise.
12543 * Versions: Likewise.
12544
12545 * pt-pselect.c: New file.
12546 * Makefile (libpthread-routines): Add pt-pselect.
12547 * Versions: Add pselect.
12548
12549 * tst-cancel4.c: New file.
12550 * Makefile (tests): Add tst-cancel4.
12551
12552 2002-10-09 Ulrich Drepper <drepper@redhat.com>
12553
12554 * pthread_mutex_lock.c: Always record lock ownership.
12555 * pthread_mutex_timedlock.c: Likewise.
12556 * pthread_mutex_trylock.c: Likewise.
12557
12558 * pt-readv.c: New file.
12559 * pt-writev.c: New file.
12560 * pt-creat.c: New file.
12561 * pt-msgrcv.c: New file.
12562 * pt-msgsnd.c: New file.
12563 * pt-poll.c: New file.
12564 * pt-select.c: New file.
12565 * pt-sigpause.c: New file.
12566 * pt-sigsuspend.c: New file.
12567 * pt-sigwait.c: New file.
12568 * pt-sigwaitinfo.c: New file.
12569 * pt-waitid.c: New file.
12570 * Makefile (libpthread-routines): Add pt-readv, pt-writev, pt-creat,
12571 pt-msgrcv, pt-msgsnd, pt-poll, pt-select, pt-sigpause, pt-sigsuspend,
12572 pt-sigwait, pt-sigwaitinfo, and pt-waitid.
12573 * Versions: Add all the new functions.
12574
12575 * tst-exit1.c: New file.
12576 * Makefile (tests): Add tst-exit1.
12577
12578 * sem_timedwait.c: Minor optimization for more optimal fastpath.
12579
12580 2002-10-08 Ulrich Drepper <drepper@redhat.com>
12581
12582 * pt-fcntl.c: Only enable asynchronous cancellation for F_SETLKW.
12583
12584 * pthread_join.c: Enable asynchronous cancellation around lll_wait_tid
12585 call. pthread_join is an official cancellation point.
12586 * pthread_timedjoin.c: Likewise.
12587
12588 * pthread_cond_wait.c: Revert order in which internal lock are dropped
12589 and the condvar's mutex are retrieved.
12590 * pthread_cond_timedwait.c: Likewise.
12591 Reported by dice@saros.East.Sun.COM.
12592
12593 2002-10-07 Ulrich Drepper <drepper@redhat.com>
12594
12595 * pthreadP.h: Cut out all type definitions and move them...
12596 * sysdeps/unix/sysv/linux/internaltypes.h: ...here. New file.
12597 * pthreadP.h: Include <internaltypes.h>.
12598
12599 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Little
12600 performance tweaks.
12601
12602 * sem_trywait.c: Shuffle #includes around to get right order.
12603 * sem_timedwait.c: Likewise.
12604 * sem_post.c: Likewise.
12605 * sem_wait.c: Likewise.
12606
12607 * nptl 0.3 released.
12608
12609 * Makefile (tests): Add tst-signal3.
12610 * tst-signal3.c: New file.
12611
12612 2002-10-05 Ulrich Drepper <drepper@redhat.com>
12613
12614 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Tell the compiler that
12615 the asms modify the sem object.
12616 (__lll_sem_timedwait): Now takes struct sem* as first parameter.
12617
12618 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h (sem_t): Don't expose
12619 the actual members.
12620 * pthreadP.h (struct sem): New type. Actual semaphore type.
12621 * semaphoreP.h: Include pthreadP.h.
12622 * sem_getvalue.c: Adjust to sem_t change.
12623 * sem_init.c: Likewise.
12624 * sem_open.c: Likewise.
12625 * sem_post.c: Likewise.
12626 * sem_timedwait.c: Likewise.
12627 * sem_trywait.c: Likewise.
12628 * sem_wait.c: Likewise.
12629
12630 2002-10-04 Ulrich Drepper <drepper@redhat.com>
12631
12632 * Makefile (tests): Add tst-basic2, tst-exec1, tst-exec3, tst-exec3.
12633 * tst-basic2.c: New file.
12634 * tst-exec1.c: New file.
12635 * tst-exec2.c: New file.
12636 * tst-exec3.c: New file.
12637
12638 * tst-fork1.c: Remove extra */.
12639
12640 * nptl 0.2 released. The API for IA-32 is complete.