]> git.ipfire.org Git - thirdparty/glibc.git/blame - nptl/ChangeLog
Add support for sparc cryptographic hash opcodes.
[thirdparty/glibc.git] / nptl / ChangeLog
CommitLineData
91e0d40e
CM
12012-11-06 Chris Metcalf <cmetcalf@tilera.com>
2
3 * tst-sem14.c (TIMEOUT): Set timeout to 10 seconds.
4 * tst-cond24.c (TIMEOUT): Increase from 10 to 20 seconds.
5
8f861542
SP
62012-11-05 Siddhesh Poyarekar <siddhesh@redhat.com>
7
8 * pthread_cond_timedwait.c (__pthread_cond_timedwait): Time out
9 if absolute timeout is negative.
10 [__ASSUME_FUTEX_CLOCK_REALTIME &&
11 lll_futex_timed_wait_bitset]: Use lll_futex_timed_wait_bitset.
12 * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock):
13 Likewise.
14 * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock):
15 Likewise.
16 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
17 (__lll_robust_timedlock_wait): Likewise.
18 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
19 (lll_futex_timed_wait_bitset): New macro.
20 * sysdeps/unix/sysv/linux/s390/lowlevellock.h
21 (lll_futex_timed_wait_bitset): Likewise.
22
d3bd58cf
DM
232012-11-03 David S. Miller <davem@davemloft.net>
24
25 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (BUSY_WAIT_NOP):
26 Add missing spaces.
27 (__cpu_relax): Likewise.
28
f62c8abc
L
292012-11-02 H.J. Lu <hongjiu.lu@intel.com>
30
31 * sysdeps/x86_64/tls.h: Don't include <xmmintrin.h>.
32 (__128bits): New struct typedef.
33 (tcbhead_t): Replace __m128 with __128bits.
34
a9879fee
AJ
352012-10-30 Aurelien Jarno <aurelien@aurel32.net>
36 Joseph Myers <joseph@codesourcery.com>
37
38 * Makefile (tst-cancel7-ARGS): Use exec in --command argument.
39
19f1dd5f
DM
402012-10-28 David S. Miller <davem@davemloft.net>
41
42 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (BUSY_WAIT_NOP):
43 Define when we have v9 instructions available.
44 * sysdeps/unix/sysv/linux/sparc/sparc64/cpu_relax.S: New file.
45 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/cpu_relax.S: New
46 file.
47 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/Makefile: New
48 file.
49 * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: Add cpu_relax
50 to libpthread-routines.
51
b9473651
RM
522012-10-25 Roland McGrath <roland@hack.frob.com>
53
54 * tst-cond-except.c (TEST_FUNCTION): New macro.
55
6a345e42
JM
562012-10-25 Joseph Myers <joseph@codesourcery.com>
57
58 * Makefile ($(objpfx)tst-tls6.out): Use $(BASH) not $(SHELL) to
59 run tst-tls6.sh.
60 * tst-tls6.sh: Use /bin/bash not /bin/sh.
61
c0a1472e
RM
622012-10-25 Roland McGrath <roland@hack.frob.com>
63
64 * tst-basic2.c (do_test): Return RESULT, not always zero.
65
66 * tst-cond25.c: Include <stdint.h>
67 (waiter): Add casts to uintptr_t between casting integer<->pointer.
68 (timed_waiter): Likewise.
69 (do_test_wait): Likewise.
70 * tst-cond-except.c (thr): Likewise.
71 (do_test): Use prototype definition.
72
cc1290d0
JM
732012-10-24 Joseph Myers <joseph@codesourcery.com>
74 Jim Blandy <jimb@codesourcery.com>
75
76 * Makefile ($(objpfx)tst-tls6.out): Pass $(test-wrapper-env) to
77 tst-tls6.sh.
78 * tst-tls6.sh (test_wrapper_env): New variable. Use it to run
79 programs with LD_PRELOAD set.
80
6e6249d0
RM
812012-10-24 Roland McGrath <roland@hack.frob.com>
82
83 * Makefile ($(objpfx)tst-cond11, $(objpfx)tst-cond19): Targets removed.
84 ($(objpfx)tst-sem5, $(objpfx)tst-cancel18): Likewise.
85 ((objpfx)tst-cancelx18, $(objpfx)tst-clock2): Likewise.
86 ($(objpfx)tst-rwlock14): Likewise.
87
0bf57f87
JM
882012-10-24 Joseph Myers <joseph@codesourcery.com>
89
90 * Makefile (tests): Remove tst-oddstacklimit.
91 (test-srcs): New variable.
92 (tst-oddstacklimit-ENV): Remove.
93 [$(run-built-tests) = yes] (tests): Depend on
94 $(objpfx)tst-oddstacklimit.out.
95 [$(run-built-tests) = yes] ($(objpfx)tst-oddstacklimit.out): New
96 target.
97 * tst-oddstacklimit.c: Do not include "tst-basic1.c". Use
98 setrlimit before executing tst-basic1 test passed to --command.
99
03ac099f
JM
1002012-10-23 Joseph Myers <joseph@codesourcery.com>
101
102 * Makefile [$(cross-compiling) = no]: Change condition to
103 [$(run-built-tests) = yes].
104
166bca24
JB
1052012-10-23 Jim Blandy <jimb@codesourcery.com>
106 Joseph Myers <joseph@codesourcery.com>
107
108 * Makefile (tst-cancel7-ARGS): Use $(host-built-program-cmd).
109 (tst-exec4-ARGS): Likewise.
110 (tst-stackguard1-ARGS): Likewise.
111
aba75984
JB
1122012-10-21 Jim Blandy <jimb@codesourcery.com>
113 Joseph Myers <joseph@codesourcery.com>
114
115 * Makefile ($(objpfx)tst-cancel-wrappers.out): Pass $(NM) to
116 tst-cancel-wrappers.sh.
117 * tst-cancel-wrappers.sh: Use nm program given as first argument,
118 not hardcoded "nm".
119
37785907
SP
1202012-10-17 Siddhesh Poyarekar <siddhesh@redhat.com>
121
370539fb 122 * tst-cond25.c (do_test_wait): Don't check for return value from
37785907
SP
123 pthread_cancel.
124
9485a404
SP
1252012-10-16 Siddhesh Poyarekar <siddhesh@redhat.com>
126
127 [BZ #14652]
128 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
129 (__condvar_tw_cleanup): Adjust the mutex data structure if it
130 was locked by FUTEX_WAIT_REQUEUE_PI.
131 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait
132 (__condvar_w_cleanup): Likewise.
133 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
134 (__condvar_cleanup2): Likewise.
135 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
136 (__condvar_cleanup1): Likewise.
137
0d522f64
CD
1382012-10-10 Carlos O'Donell <carlos@systemhalted.org>
139
54a41734
CD
140 * sysdeps/pthread/pthread.h [!(defined __GNUC__ &&
141 defined __EXCEPTIONS) && defined __USE_GNU]
142 (pthread_cleanup_push_defer_np): Fix formatting.
0d522f64 143
0e3b5d6a
SP
1442012-10-10 Siddhesh Poyarekar <siddhesh@redhat.com>
145
146 [BZ #14652]
147 * Makefile (tests): New test case tst-cond25.
148 (LDFLAGS-tst-cond25): Link tst-cond25 against librt.
149 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
150 (__condvar_tw_cleanup): Lock mutex only if we don't already
151 own it.
152 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
153 (__condvar_w_cleanup): Likewise.
154 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: Add TID_MASK.
155 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
156 (__condvar_cleanup2): Lock mutex only if we don't already
157 own it.
158 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
159 (__condvar_cleanup1): Likewise.
160 * tst-cond25.c: New test case.
161
b8493de0
RM
1622012-10-09 Roland McGrath <roland@hack.frob.com>
163
164 * sysdeps/pthread/configure: Regenerated.
165 * sysdeps/x86_64/configure: Regenerated.
166
f0762164
DM
1672012-10-05 David S. Miller <davem@davemloft.net>
168
169 [BZ #14568]
170 * sysdeps/sparc/tls.h (DB_THREAD_SELF_INCLUDE): Delete.
171 (DB_THREAD_SELF): Use constants for the register offsets. Correct
172 the case of a 64-bit debugger with a 32-bit inferior.
173
1d1b34df
L
1742012-10-05 H.J. Lu <hongjiu.lu@intel.com>
175
176 [BZ #14557]
177 * Makefile (tests-static): Add tst-cancel24-static,
178 tst-cond8-static tst-mutex8-static, tst-mutexpi8-static,
179 tst-sem11-static and tst-sem12-static.
180 (tests): Likewise.
181 (LDLIBS-tst-cancel24-static): New macro.
182 * tst-cancel24-static.cc: New file.
183 * tst-cond8-static.c: Likewise.
184 * tst-mutex8-static.c: Likewise.
185 * tst-mutexpi8-static.c: Likewise.
186 * tst-sem11-static.c: Likewise.
187 * tst-sem12-static.c: Likewise.
188
c30e8edf
SP
1892012-10-05 Siddhesh Poyarekar <siddhesh@redhat.com>
190
191 [BZ #14417]
192 * Makefile (tests): New test case tst-cond24.
193 (LDFLAGS-tst-cond24): Link tst-cond24 against librt.
194 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
195 (__pthread_cond_timedwait): Unlock mutex before going back to
196 wait in PI case.
197 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
198 (__pthread_cond_wait): Likewise. Revert handling of EAGAIN
199 return from futex_wait.
200 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
201 (__pthread_cond_timedwait): Unlock mutex before going back to
202 wait in PI case. Set requeue_pi flag only if wait returned 0.
203 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
204 (__pthread_cond_wait): Likewise. Revert handling of EAGAIN
205 return from futex_wait.
206 * tst-cond24.c: New test case.
207
9043e228
RM
2082012-10-04 Roland McGrath <roland@hack.frob.com>
209
210 * pthread_create.c (start_thread): Use __madvise, not madvise.
211
b2f80a47
L
2122012-10-02 H.J. Lu <hongjiu.lu@intel.com>
213
214 * sysdeps/i386/tls.h: Update copyright years.
215
adcdc775
SP
2162012-10-02 Siddhesh Poyarekar <siddhesh@redhat.com>
217
218 * pthread_create.c (start_thread): Fix clone flag name in
219 comment to CLONE_CHILD_CLEARTID.
220 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
221 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
222 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
223 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
224 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
225 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
226
55a051c9
SP
2272012-10-01 Siddhesh Poyarekar <siddhesh@redhat.com>
228
229 [BZ #14477]
230 * Makefile (tests): Add tst-cond-except.
231 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
232 (__pthread_cond_timedwait): Mark instructions where %ebx is
233 incremented in PI case.
234 (.gcc_except_table): Add entry to jump to __condvar_tw_cleanup2
235 for the marked PI case instructions.
236 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
237 (__pthread_cond_wait): Mark instructions where %ebx is
238 incremented in PI case.
239 (.gcc_except_table): Add entry to jump to __condvar_w_cleanup2
240 for the marked PI case instructions.
241 * tst-cond-except.c: New test case.
242
9a9028b1
DL
2432012-09-24 Dmitry V. Levin <ldv@altlinux.org>
244
57c69bef
DL
245 * tst-tls6.sh: Add "set -e".
246 * Makefile: Do not specify -e option when running testsuite
247 shell scripts.
248
9a9028b1
DL
249 * tst-tls6.sh: Add copyright header.
250
620f3d26
L
2512012-09-24 H.J. Lu <hongjiu.lu@intel.com>
252
253 * sysdeps/x86_64/tls.h (THREAD_SETMEM): Add "()" when casting
254 to uint64_t for 64-bit store.
255 (THREAD_SETMEM_NC): Likewise.
256
ae30640a
L
2572012-09-19 H.J. Lu <hongjiu.lu@intel.com>
258
259 * sysdeps/i386/tls.h (THREAD_SETMEM): Cast to uint64_t for
260 64-bit store.
261 (THREAD_SETMEM_NC): Likewise.
262
97bc38d7
JL
2632012-09-14 Jeff Law <law@redhat.com>
264
265 [BZ #14583]
266 * sysdeps/pthread/pthread.h: Fix prototype of __sigsetjmp.
267
9503345f
L
2682012-09-13 H.J. Lu <hongjiu.lu@intel.com>
269
270 [BZ #14576]
271 * sysdeps/pthread/bits/libc-lockP.h (__rtld_lock_init_recursive):
272 Removed.
273
e9ceaf25
L
2742012-09-07 H.J. Lu <hongjiu.lu@intel.com>
275
70d37fe0 276 * Makefile (LDFLAGS-tst-cancel24): Renamed to ...
e9ceaf25
L
277 (LDLIBS-tst-cancel24): This.
278
f5fce062
L
2792012-09-06 H.J. Lu <hongjiu.lu@intel.com>
280
281 [BZ #14545]
282 * Makefile (tests-static): Add tst-cancel21-static.
283 (tests): Likewise.
284 * tst-cancel21-static.c: New file.
285
26889eac
JM
2862012-09-01 Joseph Myers <joseph@codesourcery.com>
287
288 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c
289 [!__ASSUME_POSIX_CPU_TIMERS]: Remove conditional code.
290 [__NR_clock_getres]: Make code unconditional.
291 (pthread_getcpuclockid): Remove code left unreachable by removal
292 of conditionals.
293
033d54a2 2942012-08-31 Joseph Myers <joseph@codesourcery.com>
b2e1c562 295
033d54a2
JM
296 [BZ #14532]
297 * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Use
298 atomic_compare_and_exchange_bool_rel.
299 * tst-sem14.c: New file.
300 * Makefile (tests): Add tst-sem14.
b2e1c562 301
c75ccd4c
RM
3022012-08-15 Roland McGrath <roland@hack.frob.com>
303
304 * Makefile (CFLAGS-flockfile.c): Use $(libio-mtsafe) instead
305 of -D_IO_MTSAFE_IO.
306 (CFLAGS-ftrylockfile.c, CFLAGS-funlockfile.c): Likewise.
b2e1c562 307 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-fork.c): Likewise.
c75ccd4c 308
93a78ac4
JM
3092012-08-16 Joseph Myers <joseph@codesourcery.com>
310
311 * pthread_cond_timedwait.c (__pthread_cond_timedwait)
312 [!__ASSUME_POSIX_TIMERS]: Remove conditional code.
313 * pthread_condattr_setclock.c (pthread_condattr_setclock)
314 [!__ASSUME_POSIX_TIMERS]: Likewise.
315 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
316 (__pthread_cond_timedwait) [!__ASSUME_POSIX_TIMERS]: Likewise.
317 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c
318 [!__ASSUME_POSIX_TIMERS]: Likewise.
319 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
320 (__pthread_cond_timedwait) [!__ASSUME_POSIX_TIMERS]: Likewise.
321 * sysdeps/unix/sysv/linux/timer_create.c [__NR_timer_create]: Make
322 code unconditional.
323 [!__NR-timer_create]: Remove conditional code.
324 (timer_create) [!__ASSUME_POSIX_TIMERS]: Likewise.
325 * sysdeps/unix/sysv/linux/timer_delete.c [__NR_timer_delete]: Make
326 code unconditional.
327 [!__NR_timer_delete]: Remove conditional code.
328 (timer_delete) [!__ASSUME_POSIX_TIMERS]: Likewise.
329 * sysdeps/unix/sysv/linux/timer_getoverr.c
330 [__NR_timer_getoverrun]: Make code unconditional.
331 [!__NR_timer_getoverrun]: Remove conditional code.
332 (timer_getoverrun) [!__ASSUME_POSIX_TIMERS]: Likewise.
333 * sysdeps/unix/sysv/linux/timer_gettime.c [__NR_timer_gettime]:
334 Make code unconditional.
335 [!__NR_timer_gettime]: Remove conditional code.
336 (timer_gettime) [!__ASSUME_POSIX_TIMERS]: Likewise.
337 * sysdeps/unix/sysv/linux/timer_routines.c [__NR_timer_create]:
338 Make code unconditional.
339 [!__ASSUME_POSIX_TIMERS]: Remove conditional code.
340 * sysdeps/unix/sysv/linux/timer_settime.c [__NR_timer_settime]:
341 Make code unconditional.
342 [!__NR_timer_settime]: Remove conditional code.
343 (timer_settime) [!__ASSUME_POSIX_TIMERS]: Likewise.
344 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
345 (__pthread_cond_timedwait) [!__ASSUME_POSIX_TIMERS]: Remove
346 conditional code.
347
309becf1
MK
3482012-08-15 Tom de Vries <vries@codesourcery.com>
349 Maxim Kuvyrkov <maxim@codesourcery.com>
350
351 * sysdeps/pthread/bits/libc-lockP.h (__libc_lock_lock)
352 (__libc_lock_trylock): Allow pre-existing definitions.
353
ef400973
MK
3542012-08-15 Maxim Kuvyrkov <maxim@codesourcery.com>
355
356 * pthread_spin_lock.c: New file.
357 * pthread_spin_trylock.c: New file.
358
b36137f1
JM
3592012-08-08 Joseph Myers <joseph@codesourcery.com>
360
361 * allocatestack.c (setxid_signal_thread) [__ASSUME_TGKILL]: Make
362 code unconditional.
363 (setxid_signal_thread) [!__ASSUME_TGKILL]: Remove conditional code.
364 * pthread_cancel.c (pthread_cancel) [__ASSUME_TGKILL]: Make code
365 unconditional.
366 (pthread_cancel) [!__ASSUME_TGKILL]: Remove conditional code.
367 * sysdeps/pthread/createthread.c (do_clone) [__ASSUME_TGKILL]:
368 Make code unconditional.
369 (do_clone) [!__ASSUME_TGKILL]: Remove conditional code.
370 * sysdeps/unix/sysv/linux/pt-raise.c (raise) [__ASSUME_TGKILL ||
371 __NR_tgkill]: Make code unconditional.
372 (raise) [__ASSUME_TGKILL]: Likewise.
373 (raise) [!__ASSUME_TGKILL]: Remove conditional code.
374 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill)
375 [__ASSUME_TGKILL]: Make code unconditional.
376 (__pthread_kill) [!__ASSUME_TGKILL]: Remove conditional code.
377 * sysdeps/unix/sysv/linux/raise.c (raise) [__ASSUME_TGKILL ||
378 __NR_tgkill]: Make code unconditional.
379 (raise) [__ASSUME_TGKILL]: Likewise.
380 (raise) [!__ASSUME_TGKILL]: Remove conditional code.
381
93df14ee
JM
3822012-08-07 Joseph Myers <joseph@codesourcery.com>
383
384 * sysdeps/pthread/createthread.c (create_thread)
385 [!__ASSUME_NO_CLONE_DETACHED]: Remove conditional code.
386
85fe1997
JM
3872012-08-03 Joseph Myers <joseph@codesourcery.com>
388
389 * nptl-init.c (sigcancel_handler) [__ASSUME_CORRECT_SI_PID]: Make
390 code unconditional.
391 (sighandler_setxid) [__ASSUME_CORRECT_SI_PID]: Likewise.
392
fc56c5bb
SP
3932012-07-28 Siddhesh Poyarekar <siddhesh@redhat.com>
394
395 * tst-pthread-getattr.c (MAX_STACK_SIZE): New macro.
396 (pagesize): New static variable.
397 (allocate_and_test): Return MEM. Rename parameter to TARGET.
398 (check_stack_top): New local variables MEM and PAGEMASK. Cap
399 stack size to MAX_STACK_SIZE. Call allocate_and_test for
400 halfway up the stack top page. Verify that the top page was
401 written into.
402 (do_test): Get pagesize using sysconf.
403
842a39cd
AS
4042012-07-25 Andreas Schwab <schwab@linux-m68k.org>
405
406 * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Remove pseudo_end
407 label.
408 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Likewise.
409 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO):
410 Likewise.
411
77b32274
SP
4122012-07-25 Siddhesh Poyarekar <siddhesh@redhat.com>
413
414 * tst-pthread-getattr.c: Revert last change.
415
b2ae49da
SP
4162012-07-20 Siddhesh Poyarekar <siddhesh@redhat.com>
417
418 * tst-pthread-getattr.c (MAX_STACK_SIZE): New max cap for stack
419 size.
420 (_MIN): New macro.
421 (allocate_and_test): Return STACKADDR. Access STACKADDR instead
422 of MEM to test.
423 (check_stack_top): Read valued written into STACKADDR in
424 allocate_and_test. Cap stack size to MAX_STACK_SIZE.
425
a9843058
SP
4262012-07-19 Siddhesh Poyarekar <siddhesh@redhat.com>
427
428 * nptl-init.c (sighandler_setxid): Fix the comment that
429 describes it.
430
4b2c8da7
TS
4312012-06-23 Thomas Schwinge <thomas@codesourcery.com>
432
433 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S
434 (__lll_robust_timedlock_wait): Simplify CFI directives.
435
18b5e737
SP
4362012-06-20 Siddhesh Poyarekar <siddhesh@redhat.com>
437
438 [BZ #12416]
439 * Makefile (tests): Add test case.
440 * pthread_getattr_np.c (pthread_getattr_np): Deduct pages below
441 the __libc_stack_end page from stacksize. Truncate stacksize to
442 make it page aligned when it is computed from RLIMIT_STACK.
443 * tst-pthread-getattr.c: New test case. Verify that stackaddr is
444 accessible.
445
24a6dbed
CSLL
4462012-06-07 Carlos Sánchez de La Lama <csanchezdll@gmail.com>
447
448 [BZ #14205]
449 * sysdeps/sparc/sparc32/pthread_spin_lock.S: Do not use v9
450 branches.
451
4af3879c
SP
4522012-06-04 Siddhesh Poyarekar <siddhesh@redhat.com>
453 Jakub Jelinek <jakub@redhat.com>
454
455 [BZ #14188]
456 * sysdeps/pthread/pthread.h
457 [!(defined __GNUC__ && defined __EXCEPTIONS)]
458 (pthread_cleanup_push, pthread_cleanup_push_defer_np): Use
459 __libc_unlikely instead of __builtin_expect.
460
0e20515a
L
4612012-05-30 H.J. Lu <hongjiu.lu@intel.com>
462
463 [BZ #14117]
464 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Removed.
465 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
466 * sysdeps/unix/sysv/linux/i386/Implies: New file.
467 * sysdeps/unix/sysv/linux/x86_64/Implies: Likewise.
468 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Renamed
469 to ...
470 * sysdeps/unix/sysv/linux/x86/bits/pthreadtypes.h: This.
471 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Renamed
472 to ...
473 * sysdeps/unix/sysv/linux/x86/bits/semaphore.h: This.
474
865eac65
AS
4752012-05-30 Andreas Schwab <schwab@linux-m68k.org>
476
477 [BZ #14132]
478 * nptl-init.c (pthread_functions): Remove use of INTUSE and
479 _internal aliases.
480 (__pthread_initialize_minimal_internal): Likewise.
481 * sem_open.c: Likewise.
482 * sem_unlink.c: Likewise.
483 * pthreadP.h: Replace _internal aliases by hidden_proto
484 declarations.
485 * pthread_getspecific.c: Replace _internal alias by hidden_def.
486 * pthread_key_create.c: Likewise.
487 * pthread_mutex_destroy.c: Likewise.
488 * pthread_mutex_init.c: Likewise.
489 * pthread_mutex_lock.c: Likewise.
490 * pthread_mutex_unlock.c: Likewise.
491 * pthread_once.c: Likewise.
492 * pthread_rwlock_rdlock.c: Likewise.
493 * pthread_rwlock_unlock.c: Likewise.
494 * pthread_rwlock_wrlock.c: Likewise.
495 * pthread_setspecific.c: Likewise.
496 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S:
497 Likewise.
498 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
499 Likewise.
500 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
501 Likewise.
502 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
503 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
504 * sysdeps/unix/sysv/linux/s390/pthread_once.c: Likewise.
505 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Likewise.
506 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
507 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
508 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
509 * sysdeps/unix/sysv/linux/sparc/pthread_once.c: Likewise.
510 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
511 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S:
512 Likewise.
513 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S:
514 Likewise.
515 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S:
516 Likewise.
517
65a4de4e
CLT
5182012-05-27 Chung-Lin Tang <cltang@codesourcery.com>
519
d701a1ab
CLT
520 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO, LOAD_ARGS_1)
521 (LOAD_ARGS_2 ,LOAD_ARGS_3 ,LOAD_ARGS_4): Add CFI restores.
522
65a4de4e
CLT
523 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_lock_wait_private)
524 (__lll_lock_wait, __lll_timedlock_wait, __lll_timedwait_tid): Add CFI
525 directives.
526 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S
527 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): Likewise.
528 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
529 (pthread_barrier_wait): Likewise.
530 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
531 (__pthread_cond_broadcast): Likewise.
532 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
533 (__pthread_cond_signal): Likewise.
534 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
535 (__pthread_cond_timedwait): Likewise.
536 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S (__pthread_cond_wait):
537 Likewise.
538 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S
539 (__pthread_rwlock_rdlock): Likewise.
540 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S
541 (pthread_rwlock_timedrdlock): Likewise.
542 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S
543 (pthread_rwlock_timedwrlock): Likewise.
544 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S
545 (__pthread_rwlock_unlock): Likewise.
546 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S
547 (__pthread_rwlock_wrlock): Likewise.
548 * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post): Likewise.
549 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait): Likewise.
550 * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
551 Likewise.
552 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
553
9c6ea9fa
SP
5542012-05-26 Siddhesh Poyarekar <siddhesh@redhat.com>
555
556 [BZ #12416]
557 * nptl/pthread_getattr_np.c (pthread_getattr_np): Use
558 __libc_stack_end rounded to the end of containing page as the
559 real stack end.
560
17557282
RH
5612012-05-25 Rayson Ho <rho@redhat.com>
562
563 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Low-level SystemTap
564 probes for i386.
565 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
566 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
567 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
568 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
569 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
570 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
571 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
572 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
573
5acf7263
RM
5742012-05-25 Rayson Ho <rho@redhat.com>
575 Roland McGrath <roland@hack.frob.com>
576
577 * DESIGN-systemtap-probes.txt: New file.
578 * pthread_cond_broadcast.c: SystemTap probes.
579 * pthread_cond_init.c: Likewise.
580 * pthread_cond_signal.c: Likewise.
581 * pthread_cond_wait.c: Likewise.
582 * pthread_cond_destroy.c: Likewise.
583 * pthread_create.c: Likewise.
584 * pthread_join.c: Likewise.
585 * pthread_mutex_destroy.c: Likewise.
586 * pthread_mutex_init.c: Likewise.
587 * pthread_mutex_lock.c: Likewise.
588 * pthread_mutex_timedlock.c: Likewise.
589 * pthread_mutex_unlock.c: Likewise.
590 * pthread_rwlock_destroy.c: Likewise.
591 * pthread_rwlock_rdlock.c: Likewise.
592 * pthread_rwlock_unlock.c: Likewise.
593 * pthread_rwlock_wrlock.c: Likewise.
594 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
595 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
596 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
597 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
598 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
599 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
600 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
601 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
602
3a097cc7
RM
6032012-05-24 Roland McGrath <roland@hack.frob.com>
604
605 * pthread_create.c (start_thread): Define pthread_start LIBC_PROBE.
606
de7f5ce7
AJ
6072012-05-17 Andreas Jaeger <aj@suse.de>
608
609 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
610 (HAVE_DL_DISCOVER_OSVERSION): Don't declare _dl_discover_osversion
611 only for older kernels.
612
04807399
JM
6132012-05-15 Joseph Myers <joseph@codesourcery.com>
614
615 * pthreadP.h [!__NR_set_robust_list] (__NR_set_robust_list): Do
616 not define.
617
f16af742
L
6182012-05-15 H.J. Lu <hongjiu.lu@intel.com>
619
620 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_lock): Load
621 futex pointer into RDI_LP. Use RSP_LP to operate on stack.
622 (lll_robust_lock): Likewise.
623 (lll_cond_lock): Likewise.
624 (lll_robust_cond_lock): Likewise.
625 (lll_timedlock): Likewise.
626 (lll_robust_timedlock): Likewise.
627 (lll_unlock): Likewise.
628 (lll_robust_unlock): Likewise.
629
d9754f55
L
6302012-05-15 H.J. Lu <hongjiu.lu@intel.com>
631
632 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use
633 LP_OP(cmp) and RCX_LP on dep_mutex pointer.
634
dde05f00
L
6352012-05-15 H.J. Lu <hongjiu.lu@intel.com>
636
637 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Use LP_OP(op)
638 on NWAITERS.
639 (__gcc_personality_v0): Replace 8-byte data alignment with
640 LP_SIZE alignment and .quad with ASM_ADDR.
641
9dba3b5c
L
6422012-05-15 H.J. Lu <hongjiu.lu@intel.com>
643
644 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Use LP_OP(op)
645 on NWAITERS.
646 (__gcc_personality_v0): Replace 8-byte data alignment with
647 LP_SIZE alignment and .quad with ASM_ADDR.
648
5f658cf1
L
6492012-05-15 H.J. Lu <hongjiu.lu@intel.com>
650
651 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Use LP_OP(cmp) on
652 NWAITERS, which is unsigned long int.
653
6cae4b26
L
6542012-05-15 H.J. Lu <hongjiu.lu@intel.com>
655
656 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
657 (__gcc_personality_v0): Replace 8-byte data alignment with
658 LP_SIZE alignment and .quad with ASM_ADDR.
659
592f90e6
L
6602012-05-15 H.J. Lu <hongjiu.lu@intel.com>
661
662 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Use
663 LP_OP(cmp), RSI_LP and R8_LP on dep_mutex pointer. Load
664 __vdso_clock_gettime pointer into RAX_LP.
665 (__gcc_personality_v0): Replace 8-byte data alignment with
666 LP_SIZE alignment and .quad with ASM_ADDR.
667
0e8860ad
L
6682012-05-15 H.J. Lu <hongjiu.lu@intel.com>
669
670 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Use
671 LP_OP(cmp), RSI_LP and R8_LP on dep_mutex pointer. Load
672 __vdso_clock_gettime pointer into RAX_LP.
673 (__gcc_personality_v0): Replace 8-byte data alignment with
674 LP_SIZE alignment and .quad with ASM_ADDR.
675
30996e93
L
6762012-05-15 H.J. Lu <hongjiu.lu@intel.com>
677
678 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Use
679 LP_OP(cmp) and R8_LP on dep_mutex pointer.
680
289ac435
L
6812012-05-15 H.J. Lu <hongjiu.lu@intel.com>
682
683 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Use LP_OP(mov)
684 to update pointer in memory. Load pointer into RDI_LP.
685
10f74fbc
L
6862012-05-15 H.J. Lu <hongjiu.lu@intel.com>
687
688 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
689 (LLL_STUB_UNWIND_INFO_START): Align label to LP_SIZE instead
690 of 8.
691 (LLL_STUB_UNWIND_INFO_END): Likewise.
692 (lll_timedlock): Load timeout pointer into RDX_LP.
693 (lll_robust_timedlock): Likewise.
694
439bf404
SP
6952012-05-15 Siddhesh Poyarekar <siddhesh@redhat.com>
696 Jakub Jelinek <jakub@redhat.com>
697
698 [BZ #13613]
699 * Makefile (tests): Add test cases.
700 * descr.h (struct pthread): Add a comment describing multiple_threads.
701 * pthreadP.h (__pthread_multiple_threads): Expand comment to include
702 single-process case.
703 * pthread_cancel.c (pthread_cancel): Enable multiple_threads
704 before setting cancelstate of the thread.
705 * sysdeps/unix/sysv/linux/libc_multiple_threads.c
706 (__libc_multiple_threads): Add explanatory comment.
707 * tst-cancel-self-cancelstate.c: New test case.
708 * tst-cancel-self-canceltype.c: Likewise.
709 * tst-cancel-self-cleanup.c: Supporting file for test cases.
710 * tst-cancel-self-testcancel.c: New test case.
711 * tst-cancel-self.c: Likewise.
712 * vars.c: Expand comment to include single-process case.
713
2949684c
L
7142012-05-14 H.J. Lu <hongjiu.lu@intel.com>
715
716 * sysdeps/x86_64/tls.h: Don't include <bits/wordsize.h>.
717 (tcbhead_t): Remove __x86_64__ check. Align rtld_savespace_sse
718 to 32 bytes.
719
245a11d7
L
7202012-05-14 H.J. Lu <hongjiu.lu@intel.com>
721
722 * sysdeps/pthread/pthread.h (__PTHREAD_RWLOCK_INT_FLAGS_SHARED):
723 New.
724 (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Check
725 __PTHREAD_RWLOCK_INT_FLAGS_SHARED instead of __WORDSIZE.
726
0b254d8f
L
7272012-05-14 H.J. Lu <hongjiu.lu@intel.com>
728
729 * shlib-versions: Move x86_64-.*-linux.* entry to ...
730 * sysdeps/x86_64/64/shlib-versions: Here. New file.
731 * sysdeps/x86_64/x32/shlib-versions: New file.
732
b8caea2c
L
7332012-05-14 H.J. Lu <hongjiu.lu@intel.com>
734
735 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Define x32
736 __SIZEOF_PTHREAD_XXX_T.
737 (__pthread_internal_list): Check __x86_64__ instead of __WORDSIZE.
738 (pthread_mutex_t): Likewise.
739 (pthread_rwlock_t): Likewise.
740 (__PTHREAD_RWLOCK_INT_FLAGS_SHARED): New. Defined if __x86_64__
741 is defined.
742
60d45b36
L
7432012-05-11 H.J. Lu <hongjiu.lu@intel.com>
744
745 * sysdeps/x86_64/x32/tls.h: New file.
746
a04e06bc
L
7472012-05-11 H.J. Lu <hongjiu.lu@intel.com>
748
749 * sysdeps/x86_64/tls.h (THREAD_SETMEM): Use uint64_t on 64-bit
750 integer.
751 (THREAD_SETMEM_NC): Likewise.
752
512ec530
L
7532012-05-11 H.J. Lu <hongjiu.lu@intel.com>
754
755 * sysdeps/x86_64/tls.h (THREAD_SELF): Replace movq/%q0 with
756 mov/%0.
757
c0d2c853
L
7582012-05-11 H.J. Lu <hongjiu.lu@intel.com>
759
760 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
761 (__cleanup_fct_attribute): Check __x86_64__ instead of
eae2d36a 762 __WORDSIZE.
c0d2c853 763
1f59b0b1
L
7642012-05-11 H.J. Lu <hongjiu.lu@intel.com>
765
766 * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER): Check
767 __PTHREAD_MUTEX_HAVE_PREV instead of __WORDSIZE.
768 (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Likewise.
769 (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
770 (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
771
c252ec15
L
7722012-05-11 H.J. Lu <hongjiu.lu@intel.com>
773
774 * pthread_create.c (start_thread): Check __PTHREAD_MUTEX_HAVE_PREV
775 instead of __WORDSIZE.
776
be971a2b
TS
7772012-05-10 Thomas Schwinge <thomas@schwinge.name>
778
779 [BZ #3748]
780 * sysdeps/pthread/bits/libc-lockP.h (__libc_once_get): New macro.
781
e1b4354e
CLT
7822012-05-09 Chung-Lin Tang <cltang@codesourcery.com>
783
784 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
785 (__pthread_cond_timedwait): Use CFI directives.
786 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
787 (__pthread_cond_wait): Likewise.
788 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait): Likewise.
789 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
790
76e835cf
DM
7912012-05-03 David S. Miller <davem@davemloft.net>
792
793 * sysdeps/sparc/sparc64/pthread_spin_unlock.S: Fix thinko, we
794 always have to return 0, especially for the pthread_spin_init
795 alias.
796 * sysdeps/sparc/sparc32/pthread_spin_lock.S: Add missing trailing
797 newline.
798 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.S: Likewise.
799 * sysdeps/sparc/sparc64/pthread_spin_lock.S: Likewise.
800
e2dbf201
DM
8012012-05-02 David S. Miller <davem@davemloft.net>
802
803 * sysdeps/sparc/sparc64/pthread_spin_lock.S: New.
804 * sysdeps/sparc/sparc64/pthread_spin_lock.c: Delete.
805 * sysdeps/sparc/sparc64/pthread_spin_unlock.S: New.
806 * sysdeps/sparc/sparc64/pthread_spin_unlock.c: Delete.
807 * sysdeps/sparc/sparc64/pthread_spin_trylock.S: New.
808 * sysdeps/sparc/sparc64/pthread_spin_trylock.c: Delete.
809 * sysdeps/sparc/sparc64/pthread_spin_init.c: New.
810 * sysdeps/sparc/sparc32/pthread_spin_lock.S: New.
811 * sysdeps/sparc/sparc32/pthread_spin_lock.c: Delete.
812 * sysdeps/sparc/sparc32/pthread_spin_trylock.S: New.
813 * sysdeps/sparc/sparc32/pthread_spin_trylock.c: Delete.
814 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.S: New.
815 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: Delete.
816 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.S: New.
817 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: Delete.
818 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.S: New.
819 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: Delete.
820 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_init.c: New.
821
d4c2917f
AM
8222012-05-02 Allan McRae <allan@archlinux.org>
823
824 * Makefile: (LDFLAGS-tst-tls5): Use $(no-as-needed).
825 (LDFLAGS-tst-cancel24): Likewise.
826
b93d565a
PP
8272012-05-02 Paul Pluzhnikov <ppluzhnikov@google.com>
828
829 * sysdeps/i386/pthread_spin_lock.S: New.
830 * sysdeps/i386/pthread_spin_lock.c: Delete.
831 * sysdeps/x86_64/pthread_spin_lock.S: New.
832 * sysdeps/x86_64/pthread_spin_lock.c: Delete.
833
6d5c57fa
AS
8342012-04-28 Andreas Schwab <schwab@linux-m68k.org>
835
836 * Makefile ($(objpfx)tst-stack3-mem, $(objpfx)tst-tls6.out): Don't
837 run when cross-compiling.
838
6e236b92
SP
8392012-04-26 Siddhesh Poyarekar <siddhesh@redhat.com>
840
841 * sysdeps/pthread/unwind-forcedunwind.c: Include gnu/lib-names.h
842 instead of libgcc_s.h.
843
0cec7c54
PP
8442012-04-20 Paul Pluzhnikov <ppluzhnikov@google.com>
845
846 * sysdeps/x86_64/tls.h (TLS_GET_FS, TLS_SET_FS): Delete.
847
7ac88e38
DM
8482012-03-27 David S. Miller <davem@davemloft.net>
849
850 * tst-cond16.c (do_test): Use a thread stack size which is either
851 PTHREAD_STACK_MIN or the page size, whichever is larger.
852 * tst-cond18.c (do_test): Likewise.
853
24d8f4b7
L
8542012-03-19 H.J. Lu <hongjiu.lu@intel.com>
855
856 * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Use
857 register char * __asm__("rsp") to get stack frame.
858
4adaaafc
L
8592012-03-19 H.J. Lu <hongjiu.lu@intel.com>
860
861 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (SYS_futex): Use
862 __NR_futex directly.
863
ca7b8af5
L
8642012-03-19 H.J. Lu <hongjiu.lu@intel.com>
865
866 * unwind.c (unwind_stop): Cast _Unwind_GetCFA return to
867 _Unwind_Ptr first.
868
7e7fa5f8
DM
8692012-03-16 David S. Miller <davem@davemloft.net>
870
871 [BZ #13844]
872 * sysdeps/unix/sysv/linux/libc-lowlevellock.c: Include using <..>
873 instead of "...".
874 * sysdeps/unix/sysv/linux/sparc/sparc32/libc-lowlevellock.c:
875 Delete, not needed.
876
c4a7b16e
DM
8772012-03-15 David S. Miller <davem@davemloft.net>
878
879 [BZ #13844]
880 * sysdeps/unix/sysv/linux/sparc/sparc32/libc-lowlevellock.c: New file.
881
c524201a
PE
8822012-03-09 Paul Eggert <eggert@cs.ucla.edu>
883
884 [BZ #13673]
885 * pt-crti.S: Replace FSF snail mail address with URL.
886
90ad551f
JM
8872012-03-09 Joseph Myers <joseph@codesourcery.com>
888
889 * sysdeps/pthread/pthread.h (__need_clockid_t, __need_timespec):
890 Do not define before including <time.h>.
891
c64bf5fe
DM
8922012-03-08 David S. Miller <davem@davemloft.net>
893
894 * sysdeps/unix/sysv/linux/sparc/sem_post.c: Update copyright year.
895
48aff776
TS
8962012-03-08 Thomas Schwinge <thomas@codesourcery.com>
897
2edd9a79
TS
898 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
899 Check for timestamp before the Epoch.
900
c564a812
TS
901 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait): Fix
902 updating nwaiters.
903
48aff776
TS
904 * tst-sem13.c (do_test): Add another test case.
905 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
906 Fix updating nwaiters.
907
e7dbb1be
JM
9082012-03-07 Joseph Myers <joseph@codesourcery.com>
909
910 [BZ #10545]
911 * sysdeps/pthread/configure.in (libc_cv_forced_unwind): Change
912 link test to a compile test.
913 (libc_cv_c_cleanup): Likewise. Declare puts rather than including
914 <stdio.h>.
915 * sysdeps/pthread/configure: Regenerated.
916
a4300c7a
UD
9172012-03-07 Ulrich Drepper <drepper@gmail.com>
918
919 * Makefile (distribute): Remove variable.
920
840df61e
TS
9212012-01-23 Thomas Schwinge <thomas@codesourcery.com>
922
923 * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Get rid of
924 superfluous assignment.
925 * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c (sem_timedwait):
926 Likewise.
927 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c
928 (sem_timedwait): Likewise.
929
9463518d
UD
9302012-03-06 Ulrich Drepper <drepper@gmail.com>
931
abdf2e19
UD
932 * sysdeps/pthread/bits/libc-lock.h: Move information not needed in
933 installed headers to...
9463518d
UD
934 * sysdeps/pthread/bits/libc-lockP.h: ...here. New file.
935
e9258400
DM
9362012-03-06 David S. Miller <davem@davemloft.net>
937
938 * sysdeps/unix/sysv/linux/sparc/sem_post.c (__new_sem_post): Use
939 atomic_increment and remove unused local variable.
940 (__old_sem_post): Likewise.
941
22f9d9df
DM
9422012-02-27 David S. Miller <davem@davemloft.net>
943
9463518d
UD
944 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Don't refer to
945 non-existing __pthread_attr.
22f9d9df
DM
946 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
947 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
948 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
949 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
950 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
951
4efeffc1
UD
9522012-02-26 Ulrich Drepper <drepper@gmail.com>
953
d94a4670
UD
954 * sysdeps/pthread/pthread.h: Define __need_clockid_t for __USE_XOPEN2K.
955
4efeffc1
UD
956 * sysdeps/pthread/pthread.h: Define __need_timespec before including
957 <time.h>.
958 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Name pthread_attr_t
959 union.
960 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
961 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
962 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
963 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
964 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
965
0e7dfaef
JM
9662012-02-21 Joseph Myers <joseph@codesourcery.com>
967
968 [BZ #13695]
969 * Makefile (generated): Remove crti.S, crtn.S, defs.h and
970 pt-initfini.s.
971 [crti.S not in sysdirs] (omit-deps): Do not append.
972 [crti.S not in sysdirs] (CFLAGS-pt-initfini.s): Remove variable.
973 [crti.S not in sysdirs] (pt-initfini.c): Remove vpath directive.
974 [crti.S not in sysdirs] ($(objpfx)crti.S): Remove rule.
975 [crti.S not in sysdirs] ($(objpfx)crtn.S): Likewise.
976 [crti.S not in sysdirs] ($(objpfx)defs.h): Likewise.
977 [crti.S not in sysdirs] ($(objpfx)crti.o): Likewise.
978 [crti.S not in sysdirs] ($(objpfx)crtn.o): Likewise.
979 [crti.S in sysdirs] (extra-objs): Append unconditionally.
980 [crti.S in sysdirs] ($(objpfx)crti.o): Define rule
981 unconditionally.
982 * sysdeps/pthread/pt-initfini.c: Remove file.
983
e3b69ca7
RH
9842012-02-16 Richard Henderson <rth@twiddle.net>
985
959e12e3
UD
986 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: Remove file.
987 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: Remove file.
e3b69ca7 988
df83af67
KK
9892012-02-15 Kaz Kojima <kkojima@rr.iij4u.or.jp>
990
991 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: Remove file.
992
f63f3380
DM
9932012-02-16 David S. Miller <davem@davemloft.net>
994
995 * sysdeps/sparc/Makefile: Add -fPIC when building pt-crti.S and crtn.S
996
d463ab10
MP
9972012-02-15 Marek Polacek <polacek@redhat.com>
998
999 * sysdeps/unix/sysv/linux/x86_64/Makefile: Remove file.
1000
59ba27a6
PE
10012012-02-09 Paul Eggert <eggert@cs.ucla.edu>
1002
1003 Replace FSF snail mail address with URLs, as per GNU coding standards.
1004
28328403
AS
10052012-02-08 Andreas Schwab <schwab@linux-m68k.org>
1006
1007 * Makefile (extra-objs) [crti.S in sysdirs]: Add pt-crti.o.
1008
3add8e13
JM
10092012-02-08 Joseph Myers <joseph@codesourcery.com>
1010
1011 Support crti.S and crtn.S provided directly by architectures.
1012 * Makefile [crti.S in sysdirs] (omit-deps): Do not append.
1013 [crti.S in sysdirs] (CFLAGS-pt-initfini.s): Do not define variable.
1014 [crti.S in sysdirs] ($(objpfx)pt-initfini.s): Disable rule.
1015 [crti.S in sysdirs] ($(objpfx)crti.S): Likewise.
1016 [crti.S in sysdirs] ($(objpfx)crtn.S): Likewise.
1017 [crti.S in sysdirs] ($(objpfx)defs.h): Likewise.
1018 [crti.S in sysdirs] ($(objpfx)crti.o): Likewise.
1019 [crti.S in sysdirs] ($(objpfx)crtn.o): Likewise.
1020 [crti.S in sysdirs] (pt-initfini.c): Remove vpath directive.
1021 [crti.S in sysdirs] ($(objpfx)crti.o): New rule.
1022 * pt-crti.S: New file.
1023 * sysdeps/unix/sysv/linux/i386/Makefile: Remove file.
1024
9a1d9254
JM
10252012-02-03 Joseph Myers <joseph@codesourcery.com>
1026
1027 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
1028 macros for PIC register setup.
1029 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
1030 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
1031 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
1032 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
1033 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
1034
5452bffe
UD
10352012-01-11 Marek Polacek <polacek@redhat.com>
1036
1037 * forward.c (FORWARD_NORETURN): Define macro.
1038 (__pthread_unwind): Use FORWARD_NORETURN macro to avoid warning.
1039 (__pthread_exit): Likewise.
1040
356fa562
UD
10412012-01-10 Ulrich Drepper <drepper@gmail.com>
1042
8898f020
UD
1043 * sysdeps/pthread/pthread.h: Add const attribute to pthread_equal.
1044
356fa562
UD
1045 * pthreadP.h: Add noreturn to __pthread_exit.
1046 * sysdeps/pthread/pthread-functions.h: Likewise for ptr___pthread_exit.
1047
f5420cf0
AZ
10482011-12-30 Adhemerval Zanella <azanella@linux.vnet.ibm.com>
1049
1050 * sysdeps/unix/sysv/linux/aio_misc.h (__aio_create_helper_thread):
1051 Call pthread_attr_setstacksize() with result of
1052 __pthread_get_minstack() to account for application TLS usage.
1053
c473bd1c
MP
10542012-01-08 Marek Polacek <polacek@redhat.com>
1055
1056 * sysdeps/unix/sysv/linux/mq_notify.c: Include <nptl/pthreadP.h>.
1057
120ced3f
UD
10582012-01-07 Ulrich Drepper <drepper@gmail.com>
1059
a784e502
UD
1060 [BZ #13553]
1061 * pthreadP.h: Use const instead of __const.
1062 * semaphore.h: Likewise.
1063 * sysdeps/pthread/bits/libc-lock.h: Likewise.
1064 * sysdeps/pthread/bits/sigthread.h: Likewise.
1065 * sysdeps/pthread/pthread.h: Likewise.
1066
0269750c
UD
1067 * Makefile: Remove elf=yes test, only ELF is supported.
1068
ecb6fb48
UD
1069 * shlib-versions: Remove entries for ports architectures.
1070
120ced3f
UD
1071 In case anyone cares, the IA-64 architecture could move to ports.
1072 * sysdeps/ia64/*: Removed.
1073 * sysdeps/unix/sysv/linux/ia64/*: Removed.
1074
2c1094bd
UD
10752011-12-22 Ulrich Drepper <drepper@gmail.com>
1076
ee9e0640
UD
1077 * sysdeps/pthread/gai_misc.h (__gai_create_helper_thread): Use
1078 __pthread_get_minstack.
1079 * sysdeps/unix/sysv/linux/mq_notify.c (init_mq_netlink): Likewise.
1080
2c1094bd
UD
1081 [BZ #13088]
1082 * sysdeps/unix/sysv/linux/timer_routines.c: Get minimum stack size
1083 through __pthread_get_minstack.
1084 * nptl-init.c (__pthread_initialize_minimal_internal): Get page size
1085 directly from _rtld_global_ro.
1086 (__pthread_get_minstack): New function.
1087 * pthreadP.h: Declare __pthread_get_minstack.
1088 * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_get_minstack.
1089
60e8585f
UD
10902011-12-21 Ulrich Drepper <drepper@gmail.com>
1091
1092 [BZ #13515]
1093 * sysdeps/unix/sysv/linux/pthread_getname.c (pthread_getname_np):
1094 Correct reading name from file.
1095
caafb2b0
CD
10962011-12-14 Carlos O'Donell <carlos@systemhalted.org>
1097
1098 * allocatestack.c (allocate_stack): Return errno on failure.
1099
e988dba9
JL
11002011-12-14 Jeff Law <law@redhat.com>
1101
1102 [BZ #5245]
1103 * pthread_create.c (__pthread_create_2_1): Translate ENOMEM to EAGAIN.
1104
ade60c89
UD
11052011-11-28 Andreas Schwab <schwab@redhat.com>
1106
1107 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Handle
1108 EAGAIN from FUTEX_WAIT_REQUEUE_PI.
1109 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1110
312be3f9
UD
11112011-11-15 Ulrich Drepper <drepper@gmail.com>
1112
1113 * pthread_getattr_np.c (pthread_getattr_np): Set FD_CLOEXEC for
1114 /proc/self/maps.
1115
c2b18f7a
UD
11162011-10-29 Ulrich Drepper <drepper@gmail.com>
1117
1118 [BZ #13358]
1119 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1120 (__pthread_cond_timedwait): Initialize %r15 correctly also for code
1121 path for kernels with FUTEX_CLOCK_REALTIME.
1122 Debugged by H.J. Lu <hjl.tools@gmail.com>.
1123
3871f58f
AS
11242011-10-27 Andreas Schwab <schwab@redhat.com>
1125
1126 [BZ #13344]
1127 * sysdeps/pthread/pthread.h: Use __THREADNL instead of __THREAD
1128 for memory synchronization functions.
1129 * semaphore.h: Likewise.
1130
485683c3
UD
11312011-10-24 Ulrich Drepper <drepper@gmail.com>
1132
1133 * tst-cancel7.c: Avoid warning.
1134 * tst-mutex6.c: Likewise.
1135 * tst-mutex9.c: Likewise.
1136 * tst-mutexpi6.c: Likewise.
1137
10d005f7
UD
11382011-10-23 Ulrich Drepper <drepper@gmail.com>
1139
1140 * sysdeps/i386/tls.h: Remove #include <list.h>.
1141
fd5bdc09
UD
11422011-10-15 Ulrich Drepper <drepper@gmail.com>
1143
10d005f7 1144 * pthread_create.c (start_thread): Call __ctype_init.
fd5bdc09 1145
7a775e6b
AS
11462011-09-15 Andreas Schwab <schwab@redhat.com>
1147
1148 * sysdeps/pthread/list.h: Define only list_t if __need_list_t is
1149 defined.
1150 (list_add): Add atomic_write_barrier.
1151 * descr.h: Define __need_list_t before including <list.h>.
1152 * nptl-init.c: Include <list.h>
1153 * allocatestack.c: Likewise.
1154
83cd1420
UD
11552011-09-11 Ulrich Drepper <drepper@gmail.com>
1156
1157 * sysdeps/i386/tls.h: Remove HAVE_TLS_SUPPORT test.
1158 * sysdeps/ia64/tls.h: Likewise.
1159 * sysdeps/powerpc/tls.h: Likewise.
1160 * sysdeps/s390/tls.h: Likewise.
1161 * sysdeps/sh/tls.h: Likewise.
1162 * sysdeps/sparc/tls.h: Likewise.
1163 * sysdeps/x86_64/tls.h: Likewise.
1164
3ce1f295
UD
11652011-09-10 Ulrich Drepper <drepper@gmail.com>
1166
02d46fc4
UD
1167 * sysdeps/pthread/malloc-machine.h: Define MUTEX_INITIALIZER.
1168
d063d164
UD
1169 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Don't handle
1170 !USE___THREAD.
1171 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
1172 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
1173 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
1174 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
1175 * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
1176 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
1177 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
1178 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
1179 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
1180 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1181 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
1182 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
1183
3ce1f295
UD
1184 * tst-tls1.c: Support for __thread is now mandatory.
1185 * tst-tls2.c: Likewise.
1186 * tst-tls3.c: Likewise.
1187 * tst-tls3mod.c: Likewise.
1188 * tst-tls4.c: Likewise.
1189 * tst-tls4moda.c: Likewise.
1190 * tst-tls4modb.c: Likewise.
1191 * tst-tls5.h: Likewise.
1192
1e4bd093
L
11932011-09-08 Ulrich Drepper <drepper@gmail.com>
1194
1195 [BZ #12403]
1196 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
1197 (pthread_rwlock_timedwrlock): Use correct macro in test.
1198 Patch by H.J. Lu <hongjiu.lu@intel.com>.
1199
a0e1f41b
UD
12002011-09-06 Ulrich Drepper <drepper@gmail.com>
1201
1202 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait): Don't
1203 use gettimeofday vsyscall, just call gettimeofday.
9e5c9dcd
UD
1204 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
1205 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
1206 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
1207 Likewise.
1208 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1209 Likewise.
1210 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1211 Simplify __vdso_clock_gettime use.
a0e1f41b 1212
39c4451c
DM
12132011-09-05 David S. Miller <davem@davemloft.net>
1214
1215 * sysdeps/unix/sysv/linux/sem_timedwait.c (do_futex_timed_wait):
1216 New function.
1217 (sem_timedwait): Call it to force an exception region around
1218 the async cancel enable and the futex operation.
1219 * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c: Likewise.
1220 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: Likewise.
1221 * sysdeps/unix/sysv/linux/sem_wait.c (do_futex_wait): New function.
1222 (__new_sem_wait): Call it to force an exception region around
1223 the async cancel enable and the futex operation.
1224 * sysdeps/unix/sysv/linux/sparc/sem_wait.c: Likewise.
1225 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: Likewise.
1226
523df511
AS
12272011-08-31 Andreas Schwab <schwab@redhat.com>
1228
1229 * allocatestack.c (setxid_mark_thread): Ensure that the exiting
1230 thread is woken up.
1231
e315850c
DM
12322011-08-20 David S. Miller <davem@davemloft.net>
1233
1234 * Makefile (tst-cleanup0.out): Fix typo in output redirection.
1235
5744c68d
RM
12362011-08-14 Roland McGrath <roland@hack.frob.com>
1237
1238 * sysdeps/i386/pthreaddef.h (TCB_ALIGNMENT): Set to 64, optimal on Atom.
1239 * sysdeps/x86_64/pthreaddef.h (TCB_ALIGNMENT): Likewise.
1240
a724d1b9
AS
12412011-08-08 Andreas Schwab <schwab@redhat.com>
1242
1243 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Maintain aligned
1244 stack.
1245 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1246 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1247
7a03a9c8
UD
12482011-07-22 Ulrich Drepper <drepper@gmail.com>
1249
1250 * sysdeps/pthread/unwind-forcedunwind.c (_Unwind_Resume): Add read
1251 barrier.
1252 (__gcc_personality_v0): Likewise.
1253 (_Unwind_ForcedUnwind): Likewise.
1254 (_Unwind_GetCFA): Likewise.
1255
4b3d3e28
RM
12562011-07-14 Roland McGrath <roland@hack.frob.com>
1257
1258 * allocatestack.c (__reclaim_stacks): Use uintptr_t cast rather than
1259 UINTMAX_C.
1260
6f8326ca
UD
12612011-06-30 Ulrich Drepper <drepper@gmail.com>
1262
1263 * nptl-init.c (__nptl_set_robust): New function.
1264 (pthread_functions): Add reference.
1265 * npthreadP.h: Declare __nptl_set_robust.
1266 * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
1267 ptr_set_robust member.
1268 * sysdeps/unix/sysv/linux/fork.c: Call set_robust_list syscall in
1269 child if threads are used.
1270
c71ca1f8
AJ
12712011-06-14 Andreas Jaeger <aj@suse.de>
1272
1273 * pthread_rwlock_init.c: Include <string.h> for memset declaration.
1274
5bdcc103
UD
12752011-05-11 Ulrich Drepper <drepper@gmail.com>
1276
1277 [BZ #386]
1278 * allocatestack.c (allocate_stack): Convert ENOMEM error to EAGAIN.
1279
e6c61494
UD
12802011-04-10 Ulrich Drepper <drepper@gmail.com>
1281
1282 [BZ #12650]
1283 * allocatestack.c (get_cached_stack): Deallocate DTV entries before
1284 clearing memory.
1285 Patch partly by Robert Rex <robert.rex@exasol.com>.
1286
c5be0f71
RM
12872011-01-19 Roland McGrath <roland@redhat.com>
1288
1289 * pthread_cond_wait.c (__pthread_cond_wait): Fix comment typo.
1290 * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
1291 * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Likewise.
1292 * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
1293 * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock): Likewise.
1294 * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock): Likewise.
1295
1f20b93a
AS
12962011-01-16 Andreas Schwab <schwab@linux-m68k.org>
1297
1298 * Makefile (test-extras): Add tst-cleanup4aux.
1299
70181fdd
UD
13002011-01-14 Ulrich Drepper <drepper@gmail.com>
1301
1302 [BZ #10563]
1303 * sysdeps/pthread/setxid.h (__SETXID_1): Add cast to assignment.
1304 (__SETXID_2): Likewise.
1305 (__SETXID_3): Likewise.
1306
451f001b
UD
13072011-01-13 Ulrich Drepper <drepper@gmail.com>
1308
1309 [BZ #10484]
1310 * Versions [libc] (GLIBC_PRIVATE): Export __libc_alloca_cutoff.
a85b5cb4 1311 * alloca_cutoff.c: Add libc_hidden_def.
451f001b 1312
f9068148
L
13132010-10-13 H.J. Lu <hongjiu.lu@intel.com>
1314
1315 [BZ #12113]
1316 * sysdeps/x86_64/pthreaddef.h (TCB_ALIGNMENT): Changed to 32.
1317 * sysdeps/x86_64/tls.h (TLS_TCB_ALIGN): Defined with alignment
1318 of "struct pthread".
1319
c3758fee
AS
13202010-09-21 Andreas Schwab <schwab@redhat.com>
1321
1322 * sysdeps/pthread/pthread.h (pthread_cleanup_push)
1323 [!__EXCEPTIONS]: Mangle local variable not_first_call.
1324 (pthread_cleanup_push_defer_np): Likewise.
1325
4ac42e19
UD
13262010-09-03 Ulrich Drepper <drepper@redhat.com>
1327
1328 * sysdeps/pthread/allocalim.h (__libc_use_alloca): Expect blocks are
1329 small.
1330
022f6b89
DG
13312010-08-10 Dinakar Guniguntala <dino@in.ibm.com>
1332 Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
1333
1334 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: If
1335 FUTEX_WAKE_OP fails make sure to call FUTEX_WAKE instead.
1336
f8392f40
L
13372010-08-12 H.J. Lu <hongjiu.lu@intel.com>
1338
93f17abf 1339 * sysdeps/unix/sysv/linux/i386/Makefile: New file.
f8392f40 1340
bebff237
AM
13412010-05-01 Alan Modra <amodra@gmail.com>
1342
1343 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
1344 (PSEUDO): Use correct cr save. Don't use wrong parm save area
1345 to save temps. Correct cfi for possible later frame manipulation.
1346 (DOCARGS_1, UNDOCARGS_1): Use the correct parm save area.
1347 (DOCARGS_2, UNDOCARGS_2, DOCARGS_3, UNDOCARGS_3): Likewise.
1348 (DOCARGS_4, UNDOCARGS_4, DOCARGS_5, UNDOCARGS_5): Likewise.
1349 (DOCARGS_6, UNDOCARGS_6): Likewise.
1350 (CENABLE, CDISABLE): Add nops for non-shared calls.
1351
e8ee8bdf
AS
13522010-07-06 Andreas Schwab <schwab@redhat.com>
1353
1354 * sysdeps/unix/sysv/linux/pthread_getname.c (pthread_getname_np):
1355 Fix type mismatch.
1356
03e87550
UD
13572010-07-03 Ulrich Drepper <drepper@redhat.com>
1358
1359 * tst-abstime.c (do_test): Some more cleanups
1360
145569dc
UD
13612010-07-02 Ulrich Drepper <drepper@redhat.com>
1362
1363 * tst-abstime.c: Correct testing and add test for sem_timedwait.
1364
2983d85e
AS
13652010-07-01 Andreas Schwab <schwab@redhat.com>
1366 Ulrich Drepper <drepper@redhat.com>
1367
1368 * Makefile (tests): Add tst-abstime.
1369 * tst-abstime.c: New file.
1370 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
1371 (__lll_timedlock_wait): Check for timestamp before the Epoch.
1372 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
1373 (__lll_timedlock_wait): Likewise.
1374 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
1375 (__lll_robust_timedlock_wait): Likewise.
1376 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1377 (__pthread_cond_timedwait): Likewise.
1378 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
1379 (pthread_rwlock_timedrdlock): Likewise.
1380 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
1381 (pthread_rwlock_timedwrlock): Likewise.
1382 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
1383 Likewise.
1384
72b6e8c8
UD
13852010-07-01 Ulrich Drepper <drepper@redhat.com>
1386
1387 * Makefile (tst-_res1): Add tst-_res1mod1 to dependency list.
1388
4bc93b30
TY
13892010-06-01 Takashi Yoshii <takashi.yoshii.zj@renesas.com>
1390
1391 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Fix incorrect
1392 location of ifndef __ASSUME_FUTEX_CLOCK_REALTIME.
1393
86a4c67f
UD
13942010-04-09 Ulrich Drepper <drepper@redhat.com>
1395
1396 [BZ #11390]
1397 * sysdeps/unix/sysv/linux/pthread_getname.c: New file.
1398 * sysdeps/unix/sysv/linux/pthread_setname.c: New file.
1399 * nptl/sysdeps/pthread/pthread.h: Declare pthread_getname and
1400 pthread_setname.
1401 * Makefile (libpthread-routines): Add pthread_getname and
1402 pthread_setname.
1403 * Versions: Export pthread_getname and pthread_setname for GLIBC_2.12.
1404
f571a994
RM
14052010-04-05 Thomas Schwinge <thomas@schwinge.name>
1406
1407 * sysdeps/pthread/unwind-resume.c: Moved to main tree sysdeps/gnu/.
1408 * sysdeps/pthread/rt-unwind-resume.c: Likewise.
1409 * sysdeps/pthread/Makefile: Remove csu section and rt section's
1410 unwind-resume bits, now in main tree sysdeps/gnu/Makefile instead.
1411
7749bf5f
LM
14122010-03-23 Luis Machado <luisgpm@br.ibm.com>
1413
1414 * pthread_cond_timedwait.c: Add check for
1415 HAVE_CLOCK_GETTIME_VSYSCALL to use VDSO whenever possible.
1416 (pthread_cond_timedwait): Use INTERNAL_VSYSCALL instead of
1417 INTERNAL_SYSCALL.
1418
1d78f299
UD
14192010-03-09 Ulrich Drepper <drepper@redhat.com>
1420
1421 * pthread_create.c (__pthread_create_2_1): If priorities are incorrect
1422 and the call fails wake eventually waiting setxid threads. Don't free
1423 stack here if we try starting a thread.
1424 * sysdeps/pthread/createthread.c (do_clone): Only wake setxid waiter
1425 if the clone call failed.
1426
058e9ba9
AS
14272010-03-08 Andreas Schwab <schwab@redhat.com>
1428
1429 * pthread_create.c (__pthread_create_2_1): Don't set setxid_futex.
1430 * allocatestack.c (get_cached_stack): Set setxid_futex.
1431 (allocate_stack): Likewise.
1432
66f1b8ee
UD
14332010-03-05 Andreas Schwab <schwab@redhat.com>
1434 Ulrich Drepper <drepper@redhat.com>
1435
1436 * allocatestack.c (setxid_mark_thread): Delay handling of thread if
1437 it is creating a thread or it is just being created.
1438 * pthread_create.c (start_thread): Wake setxid thread if it is
1439 waiting.
1440 (__pthread_create_2_1): Initialize setxid_futex.
1441 * sysdeps/pthread/createthread.c (do_clone): Wake setxid thread if it
1442 is waiting.
1443
893549c5
MS
14442010-01-15 Ulrich Drepper <drepper@redhat.com>
1445
1446 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
1447 Fix unwind info.
1448 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1449
14502010-01-15 Michal Schmidt <mschmidt@redhat.com>
1451
1452 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
1453 Fix pthread_cond_timedwait with requeue-PI.
1454 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
1455 Fix pthread_cond_wait with requeue-PI.
1456
402cd987
UD
14572010-01-14 Ulrich Drepper <drepper@redhat.com>
1458
78ee2185
UD
1459 * Versions: Add pthread_mutex_consistent, pthread_mutexattr_getrobust,
1460 and pthread_mutexattr_setrobust for GLIBC_2.12.
402cd987 1461 * pthread_mutex_consistent.c: Define alias pthread_mutex_consistent.
78ee2185
UD
1462 * pthread_mutexattr_getrobust.c: Define alias
1463 pthread_mutexattr_getrobust.
1464 * pthread_mutexattr_setrobust.c: Define alias
1465 pthread_mutexattr_setrobust.
402cd987 1466
d3c7e686
UD
14672010-01-12 Ulrich Drepper <drepper@redhat.com>
1468
1469 * sysdeps/pthread/pthread.h: Cleanup. Fix up for XPG7.
1470
f095bb72
UD
14712010-01-08 Ulrich Drepper <drepper@redhat.com>
1472
1473 * sysdeps/pthread/pthread.h: Fix pthread_mutex_consistent declaration.
1474
d34bd80f
TS
14752009-12-18 Thomas Schwinge <thomas@codesourcery.com>
1476
1477 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c (_init): Don't
1478 call __gmon_start__.
1479 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c (_init): Likewise.
1480
f01c2359
UD
14812009-12-17 Ulrich Drepper <drepper@redhat.com>
1482
1483 * pthread_rwlock_init.c (__pthread_rwlock_init): Simplify code by
1484 using memset.
1485
75956694
DG
14862009-12-01 Dinakar Guniguntala <dino@in.ibm.com>
1487
1488 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.h: Define
1489 FUTEX_WAIT_REQUEUE_PI and FUTEX_CMP_REQUEUE_PI.
1490 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: If mutex
1491 is a non robust PI mutex, then use FUTEX_CMP_REQUEUE_PI.
1492 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
1493 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: If mutex
1494 is a non robust PI mutex, then use FUTEX_WAIT_REQUEUE_PI.
1495 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1496
9554ebf2
UD
14972009-12-12 Ulrich Drepper <drepper@redhat.com>
1498
1499 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
1500 Don't update nwaiters after invalid timeout is recognized.
1501
ebb92a49
TS
15022009-11-27 Thomas Schwinge <thomas@codesourcery.com>
1503
1504 * sysdeps/unix/sysv/linux/sh/pt-initfini.c (_init): Don't call
1505 __gmon_start__.
1506
b55ec98c
AS
15072009-11-27 Andreas Schwab <schwab@redhat.com>
1508
1509 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Reload
1510 THREAD_SELF->cancelhandling after returning from futex call.
1511
80b3a4ea
UD
15122009-11-24 Ulrich Drepper <drepper@redhat.com>
1513
1514 * tst-sem13.c: New file.
1515 * Makefile (tests): Add tst-sem13.
1516
57a299fe
RM
15172009-11-22 Roland McGrath <roland@redhat.com>
1518
1519 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: # include "i686/dl-sysdep.h"
1520 instead of recapitulating its contents.
1521
dfedb126
UD
15222009-11-18 Ulrich Drepper <drepper@redhat.com>
1523
1524 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Minor
1525 optimizations and cleanups.
1526
dd7106b3
DG
15272009-11-18 Dinakar Guniguntala <dino@in.ibm.com>
1528
1529 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
1530 Remove redundant code. Fix cfi offsets.
1531 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
1532 Fix cfi offsets.
1533
f8c10bb4
UD
15342009-11-17 Ulrich Drepper <drepper@redhat.com>
1535
62616842
UD
1536 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Minimally
1537 reduce size of unwind info.
1538
f8c10bb4
UD
1539 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Convert to use
1540 cfi directives.
1541 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1542 Based on a patch by Dinakar Guniguntala <dino@in.ibm.com>.
1543
13f6812f
AS
15442009-11-03 Andreas Schwab <schwab@linux-m68k.org>
1545
1546 [BZ #4457]
1547 * sysdeps/pthread/unwind-resume.c: Include <libgcc_s.h> and use
1548 LIBGCC_S_SO.
1549 * sysdeps/pthread/unwind-forcedunwind.c: Likewise.
1550
25db0f6c
DJ
15512009-10-30 Ulrich Drepper <drepper@redhat.com>
1552
9c04f7c1
UD
1553 * tst-sem11.c (main): Rewrite to avoid aliasing problems.
1554
25db0f6c
DJ
1555 [BZ #3270]
1556 * allocatestack.c (__nptl_setxid): Perform the operation in multiple
1557 steps to avoid races with creation and terminations.
1558 * nptl-init.c (sighandler_setxid): Adjust.
1559 Patch by Daniel Jacobowitz.
1560
3d60eb17
AS
15612009-09-07 Andreas Schwab <schwab@redhat.com>
1562
1563 * sysdeps/pthread/bits/libc-lock.h (BP_SYM): Remove space before paren.
1564
38eb6136
SP
15652009-09-02 Suzuki K P <suzuki@in.ibm.com>
1566 Joseph Myers <joseph@codesourcery.com>
1567
1568 [BZ #7094]
1569 * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
1570 Initialize the sigev_notify field for newly created timer to make sure
01034d75 1571 the timer gets deleted from the active timer's list upon timer_delete.
38eb6136 1572
7812c65b
AS
15732009-08-27 Andrew Stubbs <ams@codesourcery.com>
1574
1575 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
1576 Correct a logic error.
1577
84088310
UD
15782009-08-25 Ulrich Drepper <drepper@redhat.com>
1579
1580 * sysdeps/x86_64/tls.h (RTLD_ENABLE_FOREIGN_CALL): Store old value
1581 of the field in local variables.
1582 (RTLD_FINALIZE_FOREIGN_CALL): Restore rtld_must_xmm_save from local
1583 variable and don't unconditionally clear it.
1584
b42a214c
UD
15852009-08-24 Ulrich Drepper <drepper@redhat.com>
1586
1587 * pthread_create.c (start_thread): Hint to the kernel that memory for
1588 the stack can be reused. We do not mark all the memory. The part
1589 still in use and some reserve are kept.
1590
2d094b73
UD
15912009-08-23 Ulrich Drepper <drepper@redhat.com>
1592
1593 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Clean up namespace.
1594
ae0d5450
UD
15952009-08-11 Ulrich Drepper <drepper@redhat.com>
1596
1597 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Add CFI
1598 directives.
1599
1bc2b97e
UD
16002009-08-10 Ulrich Drepper <drepper@redhat.com>
1601
1602 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Add CFI
1603 directives.
1604 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
1605
ec492239
AS
16062009-08-10 Andreas Schwab <schwab@redhat.com>
1607
1608 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
1609 (__pthread_cond_signal): Don't clobber register used for syscall
1610 number.
1611
49eea97b
UD
16122009-08-08 Ulrich Drepper <drepper@redhat.com>
1613
efa0569d
UD
1614 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
1615 Optimize code path used when FUTEX_CLOCK_REALTIME is supported.
1616
49eea97b
UD
1617 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
1618 (__pthread_cond_wait): Optimize by avoiding use of callee-safe
1619 register.
1620
9083bcc5
UD
16212009-08-07 Ulrich Drepper <drepper@redhat.com>
1622
1623 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Little optimizations
1624 enabled by the special *_asynccancel functions.
1625 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1626 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1627
1628 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Include lowlevellock.h.
1629
421665c4
UD
16302009-08-04 Ulrich Drepper <drepper@redhat.com>
1631
1632 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: New file.
1633 * sysdeps/unix/sysv/linux/x86_64/libc-cancellation.S: New file.
1634 * sysdeps/unix/sysv/linux/x86_64/librt-cancellation.S: New file.
1635 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Optimize
1636 since we can assume the special __*_{en,dis}able_asynccancel
1637 functions.
1638 (PUSHARGS_*, POPARGS_*, SAVESTK_*, RESTSTK_*): Removed.
1639 * sysdeps/x86_64/tcb-offsets.sym: Add cancellation-related bits
1640 and PTHREAD_CANCELED.
1641
bd03a1af
UD
16422009-07-31 Ulrich Drepper <drepper@redhat.com>
1643
1644 * descr.h: Better definition of *_BITMASK macros for cancellation.
1645
b48a267b
UD
16462009-07-29 Ulrich Drepper <drepper@redhat.com>
1647
586fa886
UD
1648 * sysdeps/x86_64/tls.h (TLS_TCB_ALIGN): Define explicitly to 32.
1649
b48a267b 1650 * sysdeps/x86_64/tls.h (tcbhead_t): Add room for SSE registers the
586fa886
UD
1651 dynamic linker might have to save.
1652 Define RTLD_CHECK_FOREIGN_CALL, RTLD_ENABLE_FOREIGN_CALL,
1653 RTLD_PREPARE_FOREIGN_CALL, and RTLD_FINALIZE_FOREIGN_CALL. Pretty
1654 printing.
1655
b48a267b
UD
1656 * sysdeps/x86_64/tcb-offsets.sym: Add RTLD_SAVESPACE_SSE.
1657
b0948ffd
UD
16582009-07-28 Ulrich Drepper <drepper@redhat.com>
1659
1660 * pthread_mutex_lock.c [NO_INCR] (__pthread_mutex_cond_lock_adjust):
1661 New function.
1662 * pthreadP.h: Declare __pthread_mutex_cond_lock_adjust.
1663 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: Add ROBUST_BIT.
1664 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Don't use
1665 requeue_pi for robust mutexes.
1666 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
1667 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1668 Don't only skip __pthread_mutex_cond_lock. Call instead
1669 __pthread_mutex_cond_lock_adjust.
1670 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1671
1672 * pthread_mutex_unlock.c (__pthread_mutex_unlock_full): Minor
1673 optimization of PI mutex handling.
1674
e73e694e
UD
16752009-07-27 Ulrich Drepper <drepper@redhat.com>
1676
1677 [BZ #10418]
1678 * pthread_mutex_unlock.c (__pthread_mutex_unlock_full): Use _rel
1679 instead of of _acq variants of cmpxchg.
1680
f1adf1f4
UD
16812009-07-23 Ulrich Drepper <drepper@redhat.com>
1682
01b597da
UD
1683 * sysdeps/x86_64/configure.in: New file.
1684
f1adf1f4
UD
1685 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix error
1686 path when not using absolute timeout futex.
1687
c3db953c
UD
16882009-07-20 Ulrich Drepper <drepper@redhat.com>
1689
1690 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Minor
1691 optimizations of last changes.
1692 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1693
515a8908
UD
16942009-07-19 Ulrich Drepper <drepper@redhat.com>
1695
42e69bcf
UD
1696 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
1697 FUTEX_WAIT_REQUEUE_PI and FUTEX_CMP_REQUEUE_PI.
1698 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: If mutex
1699 is a PI mutex, then use FUTEX_CMP_REQUEUE_PI.
1700 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
1701 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: If mutex
1702 is a PI mutex, then use FUTEX_WAIT_REQUEUE_PI.
1703 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1704
515a8908
UD
1705 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1706 (__pthread_cond_timedwait): Make more robust.
1707
30b1954a
UD
17082009-07-18 Ulrich Drepper <drepper@redhat.com>
1709
e2dca2fe
UD
1710 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
1711 (__lll_robust_timedlock_wait): If possible use FUTEX_WAIT_BITSET to
1712 directly use absolute timeout.
1713
3d77b268
UD
1714 * tst-sem5.c (do_test): Add test for premature timeout.
1715 * Makefile: Linu tst-sem5 with librt.
1716
d979611e
UD
1717 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
1718 (pthread_rwlock_timedwrlock): If possible use FUTEX_WAIT_BITSET to
1719 directly use absolute timeout.
32c6c342
UD
1720 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
1721 (pthread_rwlock_timedrdlock): Likewise.
d979611e 1722
f8b6cd21
UD
1723 * tst-cond11.c (run_test): Add test to check that the timeout is
1724 long enough.
1725
e88726b4
UD
1726 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
1727 (__pthread_cond_timedwait): If possible use FUTEX_WAIT_BITSET to
1728 directly use absolute timeout.
1729
30b1954a
UD
1730 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
1731 (__pthread_cond_wait): Convert to using exception handler instead of
1732 registered unwind buffer.
92618c95
UD
1733 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1734 (__pthread_cond_timedwait): Likewise.
30b1954a 1735
d52c96e7
UD
17362009-07-17 Ulrich Drepper <drepper@redhat.com>
1737
f351f2b7
UD
1738 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
1739 If possible use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME to directly
1740 use absolute timeout.
1741
0adae468
UD
1742 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Optimize
1743 handling of uncontested semaphore.
1744
d52c96e7
UD
1745 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
1746 (__condvar_cleanup): Rewrite to use cfi directives instead of
1747 hand-coded unwind tables.
63601ccd
UD
1748 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S (__pthread_once):
1749 Likewise.
c3c2f3cf 1750 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
aee2665a
UD
1751 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
1752 Likewise.
d52c96e7 1753
bfdb73e1
UD
17542009-06-12 Ulrich Drepper <drepper@redhat.com>
1755
1756 * Makefile (libpthread-routines): Add pthread_sigqueue.
1757 * Versions: Add pthread_sigqueue for GLIBC_2.11.
1758 * sysdeps/pthread/bits/sigthread.h: Declare pthread_sigqueue.
1759 * sysdeps/unix/sysv/linux/pthread_sigqueue.c: New file.
1760
1828530f
BK
17612009-06-11 Ulrich Drepper <drepper@redhat.com>
1762
1763 [BZ #10262]
1764 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
1765 (LOAD_FUTEX_WAIT_ABS): Fix futex parameter in case private futexes
1766 cannot be assumed.
1767 Patch by Bryan Kadzban <bz-glibc@kdzbn.homelinux.net>.
1768
a5b8b56d
UD
17692009-05-16 Ulrich Drepper <drepper@redhat.com>
1770
e20c4ef0
UD
1771 * libc-cancellation.c: Move __libc_cleanup_routine to...
1772 * libc-cleanup.c: ...here. New file.
1773 * Makefile (routines): Add libc-cleanup.
1774
cba0ca79
UD
1775 * cancellation.c (__pthread_disable_asynccancel): Remove unnecessary
1776 test.
1777 * libc-cancellation.c: Use <nptl/cancellation.c: to define the code.
1778 * sysdeps/pthread/librt-cancellation.c: Likewise.
1779
a5b8b56d
UD
1780 [BZ #9924]
1781 * nptl-init.c: Renamed from init.c.
1782 * Makefile: Change all occurences of init.c to nptl-init.c.
1783
1a7f254b
UD
17842009-05-15 Ulrich Drepper <drepper@redhat.com>
1785
9437b427
UD
1786 * cancellation.c (__pthread_disable_asynccancel): Correct the bits
1787 to test when deciding on the delay.
1788 * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
1789 * pthread_cancel.c: Close race between deciding on sending a signal
1790 and setting the CANCELING_BIT bit.
1791
1a7f254b
UD
1792 * cancellation.c (__pthread_disable_asynccancel): Don't return if
1793 thread is canceled.
1794 * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
1795
d5c157a9
UD
17962009-04-27 Ulrich Drepper <drepper@redhat.com>
1797
1798 * cancellation.c (__pthread_disable_asynccancel): Use THREAD_ATOMIC_AND
1799 is available.
1800 * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
1801 * sysdeps/x86_64/tls.h: Define THREAD_ATOMIC_AND.
1802 * sysdeps/i386/tls.h: Likewise.
1803 (tcbhead_t): Add __private_tm member.
1804
f521be31
UD
18052009-04-26 Ulrich Drepper <drepper@redhat.com>
1806
5efe8650
UD
1807 * sem_open.c (sem_open): Rewrite initialization of initsem to
1808 avoid warnings.
1809
f521be31
UD
1810 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
1811 Avoid warning by using may_alias attribute on ptrhack.
1812
d301a6e1
UD
18132009-04-22 Ulrich Drepper <drepper@redhat.com>
1814
5497de87 1815 [BZ #10090]
d301a6e1
UD
1816 * pthread_attr_setschedparam.c (__pthread_attr_setschedparam):
1817 Check policy and priority for validity.
1818 Patch mostly by Zhang Xiliang <zhangxiliang@cn.fujitsu.com>.
1819
71a5bd3e
UD
18202009-03-15 Ulrich Drepper <drepper@redhat.com>
1821
1822 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1823 (__pthread_cond_timedwait): Change to use cfi directives instead of
1824 hand-coded unwind sections.
1825
30991b8b
UD
18262009-03-10 Ulrich Drepper <drepper@redhat.com>
1827
1828 * init.c (nptl_freeres): Compile only for SHARED.
1829
9920a6b8
JJ
18302009-03-09 Jakub Jelinek <jakub@redhat.com>
1831
1832 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Define
1833 FUTEX_WAIT_BITSET, FUTEX_WAKE_BITSET, FUTEX_CLOCK_REALTIME and
1834 FUTEX_BITSET_MATCH_ANY.
1835
e965d514
RM
18362009-02-27 Roland McGrath <roland@redhat.com>
1837
1838 * init.c (__nptl_initial_report_events): Mark __attribute_used__.
1839 * pthread_create.c (__nptl_threads_events, __nptl_last_event): Likewise.
1840
6cbe890a
UD
18412009-02-26 Ulrich Drepper <drepper@redhat.com>
1842
1843 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
1844 _POSIX_THREAD_ROBUST_PRIO_INHERIT and
1845 _POSIX_THREAD_ROBUST_PRIO_PROTECT. Reset value of macros from
1846 200112L to 200809L.
1847
77db439e
UD
18482009-02-25 Ulrich Drepper <drepper@redhat.com>
1849
1850 * sysdeps/pthread/pthread.h: The robust mutex functions are in
1851 POSIX 2008.
1852
5be0a688
UD
18532009-02-24 Ulrich Drepper <drepper@redhat.com>
1854
1855 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_BITS_POSIX_OPT_H):
1856 Unify name of include protector macro.
1857
4c869eb6
UD
18582009-02-14 SUGIOKA Toshinobu <sugioka@itonet.co.jp>
1859
1860 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
1861 LOAD_FUTEX_WAIT_ABS even if (FUTEX_WAIT == 0).
1862
cca50323
UD
18632009-01-29 Ulrich Drepper <drepper@redhat.com>
1864
7f901dd7
UD
1865 * sysdeps/pthread/unwind-forcedunwind.c: Encrypt all function
1866 pointer variables.
1867
cca50323
UD
1868 * allocatestack.c (__free_stacks): Renamed from free_stacks.
1869 (__free_stack_cache): Removed. Change callers to call __free_stacks.
1870 * init.c (nptl_freeres): New function.
1871 (pthread_functions): Initialize ptr_freeres to nptl_freeres.
1872 * pthreadP.h: Don't declare __free_stack_cache. Declare __free_stacks.
1873 * sysdeps/pthread/unwind-forcedunwind.c (libgcc_s_handle): New
1874 variable.
1875 (pthread_cancel_init): Depend in libgcc_s_handle for decision to
1876 load DSO. Assign last.
1877 (__unwind_freeres): New function.
1878
1879 * allocatestack.c (__reclaim_stacks): Reset in_flight_stack later
1880 for better debugging. No need to use stack_list_add here.
1881
a7bd183f
UD
18822009-01-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1883
1884 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
1885 (__lll_timedlock_wait): Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME
1886 instead of computing relative timeout.
1887 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
1888 FUTEX_CLOCK_REALTIME and FUTEX_BITSET_MATCH_ANY.
1889
563ee1cb
UD
18902009-01-25 Ulrich Drepper <drepper@redhat.com>
1891
1892 * pthread_mutex_lock.c (__pthread_mutex_lock): Remove unused label out.
1893
f25c7b08
UD
18942009-01-08 Ulrich Drepper <drepper@redhat.com>
1895
1896 * sysdeps/pthread/list.h (list_add): Initialize new element first.
1897 (list_add_tail): Removed.
1898
40de0fe3
JJ
18992009-01-07 Ulrich Drepper <drepper@redhat.com>
1900
1901 * (in_flight_stack): New variable.
1902 (stack_list_del): New function. Use instead of list_del.
1903 (stack_list_add): New function. Use instead of list_add when adding to
1904 stack_cache and stack_used lists.
1905 (__reclaim_stacks): Complete operations on stack_cache and stack_used lists
1906 when the fork call interrupted another thread.
1907
3c612057
UD
19082009-01-04 Ulrich Drepper <drepper@redhat.com>
1909
1910 * init.c (__pthread_initialize_minimal_internal): Optimize test
1911 FUTEX_CLOCK_REALTIME a bit.
1912
19834b42
UD
19132009-01-03 Ulrich Drepper <drepper@redhat.com>
1914
1915 * init.c (__pthread_initialize_minimal_internal): Cheat a bit by
1916 only passing five parameters to FUTEX_WAIT_BITSET call.
1917
1918 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
a9fa090b 1919 (__lll_timedlock_wait): Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME
19834b42
UD
1920 instead of computing relative timeout.
1921
7dd650d7
UD
19222009-01-02 Ulrich Drepper <drepper@redhat.com>
1923
cbd8aeb8
UD
1924 * init.c (__pthread_initialize_minimal_internal): Check for
1925 FUTEX_CLOCK_REALTIME flag.
1926 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
a9fa090b 1927 Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME instead of computing
cbd8aeb8
UD
1928 relative timeout.
1929
7dd650d7
UD
1930 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
1931 FUTEX_CLOCK_REALTIME and FUTEX_BITSET_MATCH_ANY.
1932 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
1933 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
1934 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
1935 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
1936
217d45cd
UD
19372008-12-09 Ulrich Drepper <drepper@redhat.com>
1938
1939 * sysdeps/pthread/pthread.h (pthread_cleanup_pop): Use { } as empty
1940 loop body instead of ; to avoid gcc warnings.
1941 (pthread_cleanup_pop_restore_np): Likewise.
1942 Patch by Caolán McNamara <caolanm@redhat.com>.
1943
6de79a49
UD
19442008-12-09 Jakub Jelinek <jakub@redhat.com>
1945
1946 * pthread_mutex_lock.c (__pthread_mutex_lock): Handle only the
1947 fast path here, for robust/PI/PP mutexes call
1948 __pthread_mutex_lock_full. Don't use switch, instead use a series
1949 of ifs according to their probability.
1950 (__pthread_mutex_lock_full): New function.
1951 * pthread_mutex_unlock.c: Include assert.h.
1952 (__pthread_mutex_unlock_usercnt): Handle only the
1953 fast path here, for robust/PI/PP mutexes call
1954 __pthread_mutex_unlock_full. Don't use switch, instead use a series
1955 of ifs according to their probability.
1956 (__pthread_mutex_unlock_full): New function.
1957 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c
1958 (__pthread_mutex_lock_full): Define.
1959
71bb2639
UD
19602008-12-08 Ulrich Drepper <drepper@redhat.com>
1961
1962 * sysdeps/x86_64/tls.h (tcbhead_t): Add fields reserved for TM
1963 implementation. Add necessary padding and.
1964 * descr.h (struct pthread): Increase padding for tcbhead_t to 24
1965 words.
1966
247626f3
UD
19672008-12-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1968
1969 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define FUTEX_WAIT_BITSET
1970 and FUTEX_WAKE_BITSET.
1971
da5ac135
UD
19722008-12-02 Ulrich Drepper <drepper@redhat.com>
1973
1974 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_WAIT_BITSET
1975 and FUTEX_WAKE_BITSET.
1976 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
1977 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
1978 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
1979 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
1980
c0439b95
RM
19812008-11-25 Roland McGrath <roland@redhat.com>
1982
1983 * sysdeps/alpha, sysdeps/unix/sysv/linux/alpha:
1984 Subdirectories moved to ports repository as
1985 sysdeps/.../nptl subdirectories.
1986
0e54a725
UD
19872008-11-12 Jakub Jelinek <jakub@redhat.com>
1988
1989 [BZ #7008]
1990 * pthread_condattr_setclock.c (pthread_condattr_setclock): Fix masking
1991 of old value.
1992 * pthread_cond_init.c (__pthread_cond_init): Fix
1993 cond->__data.__nwaiters initialization.
1994 * Makefile (tests): Add tst-cond23.
1995 * tst-cond23.c: New test.
1996
4b23f9bd
JJ
19972008-11-07 Jakub Jelinek <jakub@redhat.com>
1998
1999 * sysdeps/pthread/malloc-machine.h (MALLOC): Adjust __libc_tsd_define
2000 arguments.
2001 (tsd_setspecific, tsd_getspecific): Adjust __libc_tsd_{set,get}
2002 arguments.
2003
efac1fce
UD
20042008-11-01 Ulrich Drepper <drepper@redhat.com>
2005
2006 [BZ #6955]
2007 * pthread_mutex_lock.c: Add support for private PI mutexes.
2008 * pthread_mutex_timedlock.c: Likewise.
2009 * pthread_mutex_trylock.c: Likewise.
2010 * pthread_mutex_unlock.c: Likewise.
2011 Patch mostly by Ben Jackson <ben@ben.com>.
2012
bf837fa3
UD
20132008-10-31 Ulrich Drepper <drepper@redhat.com>
2014
2015 [BZ #6843]
2016 * sysdeps/pthread/gai_misc.h (__gai_create_helper_thread):
2017 Increase stack size for helper thread.
2018
208bc836
UD
20192008-10-06 Martin Schwidefsky <schwidefsky@de.ibm.com>
2020
2021 * sysdeps/s390/tls.h (THREAD_SET_STACK_GUARD): Add empty inline
2022 assembly with a clobber list for access registers a0 and a1.
2023
17f8b4a9
UD
20242008-09-11 Martin Schwidefsky <schwidefsky@de.ibm.com>
2025
2026 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Add memory barrier
2027 to force runp->refcntr to be read from memory.
2028
2458c748
AJ
20292008-09-08 Richard Guenther <rguenther@suse.de>
2030
2031 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_lock,
2032 lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
2033 lll_timedlock, lll_robust_timedlock, lll_unlock,
2034 lll_robust_unlock): Promote private to int.
2035
965805e8
UD
20362008-08-15 Ulrich Drepper <drepper@redhat.com>
2037
2038 * sysdeps/x86_64/pthreaddef.h: Remove ARCH_MAP_FLAGS and
2039 ARCH_RETRY_MMAP definitions.
2040 * allocatestack.c: Remove definition of ARCH_MAP_FLAGS.
2041 Define MAP_STACK when not defined.
2042 (allocate_stack): Use MAP_STACK instead of ARCH_MAP_FLAGS. Remove
2043 handling of ARCH_RETRY_MMAP.
2044
bd7f4857
UD
20452008-07-30 Ulrich Drepper <drepper@redhat.com>
2046
2047 * tst-align2.c (f): Print message that f is reached.
2048
619cc2f6
UD
20492008-04-28 Hiroki Kaminaga <kaminaga@sm.sony.co.jp>
2050
2051 [BZ #6740]
2052 * sysdeps/powerpc/tcb-offsets.sym (PRIVATE_FUTEX_OFFSET): Guard symbol
2053 definition with #ifndef __ASSUME_PRIVATE_FUTEX.
2054
8ccf22f9
UD
20552008-07-25 Ulrich Drepper <drepper@redhat.com>
2056
2057 * sysdeps/unix/sysv/linux/mq_notify.c (init_mq_netlink): Use
2058 SOCK_CLOEXEC if possible.
2059
20602008-05-29 Ulrich Drepper <drepper@redhat.com>
2061
2062 * Makefile (tests): Add tst-rwlock2a.
2063 * tst-rwlock2.c: Use TYPE macro to decide what rwlock type to use.
2064 * tst-rwlock2a.c: New file.
2065
5a337776
UD
20662008-06-12 Ulrich Drepper <drepper@redhat.com>
2067
2068 * sysdeps/pthread/pthread.h: Remove inadvertant checkin.
2069
e4d6e7f5
UD
20702008-05-17 Samuel Thibault <samuel.thibault@ens-lyon.org>
2071
2072 * sysdeps/pthread/pthread.h: Fix typo in comment.
2073
d6296e88
UD
20742008-05-28 Ulrich Drepper <drepper@redhat.com>
2075
2076 * sysdeps/pthread/createthread.c (do_clone): Pass accurate length
2077 of CPU set to the kernel.
2078
62605cbf
UD
20792008-05-23 Paul Pluzhnikov <ppluzhnikov@google.com>
2080
2081 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Add
2082 cfi directives.
2083 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
2084 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
2085 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
2086 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
2087 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
2088 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
2089
20902008-05-22 Paul Pluzhnikov <ppluzhnikov@google.com>
2091
2092 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S: Add
2093 cfi directives.
2094 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2095 Likewise.
2096 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
2097 Likewise.
2098 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
2099 Likewise.
2100
4b2c85c0
UD
21012008-05-26 Ulrich Drepper <drepper@redhat.com>
2102
2103 * tst-typesizes.c: Explicitly check __SIZEOF_PTHREAD_* constants.
2104
b72f5692 21052008-05-20 Jakub Jelinek <jakub@redhat.com>
4b2c85c0
UD
2106
2107 David S. Miller <davem@davemloft.net>
3b15b590 2108
b72f5692 2109 * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: New file.
3b15b590 2110
cdffaaa6
UD
21112008-05-10 Ulrich Drepper <drepper@redhat.com>
2112
2113 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Access
2114 __pshared correctly.
2115 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2116 Likewise.
2117 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2118 Likewise.
2119 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
2120 Likewise.
2121 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
2122 Likewise.
2123 Reported by Clemens Kolbitsch <clemens.kol@gmx.at>.
2124
2313c48f
JJ
21252008-04-14 David S. Miller <davem@davemloft.net>
2126
2127 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
2128 (__old_sem_wait): Fix argument to lll_futex_wait().
2129
2f611ada
UD
21302007-11-26 Daniel Jacobowitz <dan@codesourcery.com>
2131
2132 * pthread_create.c: Require pthread_mutex_trylock and
2133 pthread_key_delete for libgcc.
2134
d24be489
JJ
21352008-04-08 Jakub Jelinek <jakub@redhat.com>
2136
2137 [BZ #6020]
2138 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h
2139 (lll_futex_wake_unlock): Add private argument to the pre-v9 macro.
2140 Patch by Sunil Amitkumar Janki <devel.sjanki@gmail.com>.
2141
f96853be
UD
21422008-03-27 Ulrich Drepper <drepper@redhat.com>
2143
8ccf22f9 2144 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine ARG_MAX if
f96853be
UD
2145 <linux/limits.h> has defined it.
2146 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
2147 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
2148 * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
2149 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
2150
354b7527
JJ
21512008-03-18 Jakub Jelinek <jakub@redhat.com>
2152
2153 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Use __ASSEMBLER__ instead
2154 of ASSEMBLER.
2155 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
2156 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Likewise.
2157
702ae329
UD
21582008-03-14 Ulrich Drepper <drepper@redhat.com>
2159
2160 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
2161 HAVE_DL_DISCOVER_OSVERSION.
2162 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
2163 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Likewise.
2164
443db178
UD
21652008-03-07 Ulrich Drepper <drepper@redhat.com>
2166
2167 [BZ #5778]
2168 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Change
2169 _POSIX_CHOWN_RESTRICTED value to zero.
2170
67fbfa5c
RM
21712008-01-31 Roland McGrath <roland@redhat.com>
2172
2173 * Makefile (omit-deps): Variable removed.
2174
dd3113da
UD
21752008-01-30 Ulrich Drepper <drepper@redhat.com>
2176
2177 * sysdeps/unix/sysv/linux/x86_64/sem_post.S (sem_post): Avoid
2178 unnecessary addr32 prefix.
2179
16cd816f
RM
21802008-01-29 Roland McGrath <roland@redhat.com>
2181
2182 * Makeconfig (ptw-CPPFLAGS, sysd-rules-patterns): New variables.
2183
b4b166af
UD
21842008-01-22 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2185
2186 * sysdeps/unix/sysv/linux/sh/sem_post.S: Don't overflow value field.
2187
21882008-01-21 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2189
2190 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XADD): Use
2191 a scratch register.
2192 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
2193 (__lll_lock_wait_private): Fix typo.
2194 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
2195 (pthread_barrier_wait): Likewise. Adjust XADD use.
2196 * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
2197 Adjust XADD use.
2198 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S
2199 (pthread_rwlock_timedrdlock): Return correct return value.
2200 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S
16cd816f 2201 (pthread_rwlock_timedwrlock): Likewise.
b4b166af 2202
eaf95a26
UD
22032008-01-15 Ulrich Drepper <drepper@redhat.com>
2204
2205 * tst-eintr2.c (do_test): make sure that if mutex_lock in main
2206 thread returns the program exits with an error code.
2207
ab355d9a
UD
22082008-01-10 Ulrich Drepper <drepper@redhat.com>
2209
2210 * pthread-errnos.sym: Add EOVERFLOW.
2211 * sysdeps/unix/sysv/linux/structsem.sym: Add SEM_VALUE_MAX.
2212 * sysdeps/unix/sysv/linux/sem_post.c: Don't overflow value field.
2213 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
2214 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
2215
b8cca206
UD
22162007-12-14 Ulrich Drepper <drepper@redhat.com>
2217
2218 * sysdeps/x86_64/pthreaddef.h (ARCH_RETRY_MMAP): Take additional
2219 parameter. Passed it as permission to mmap.
2220 * allocatestack.c (allocate_stack): Pass prot as second parameter
2221 to ARCH_RETRY_MMAP.
2222
189dce4f
UD
22232007-12-12 Ulrich Drepper <drepper@redhat.com>
2224
3eb0e1c6
UD
2225 * tst-basic7.c: Allocate memory for the stack.
2226
189dce4f
UD
2227 [BZ #5465]
2228 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S [!SHARED]
2229 (__pthread_cond_timedwait): Don't use VDSO.
58d11795 2230 Patch by Michal Januszewski.
189dce4f 2231
26e21e75
UD
22322007-12-07 Ulrich Drepper <drepper@redhat.com>
2233
2234 [BZ #5455]
2235 * sysdeps/pthread/pthread.h [!__EXCEPTIONS] (pthread_cleanup_pop):
2236 Allow label before pthread_cleanup_pop.
2237 (pthread_cleanup_pop_restore_np): Likewise.
2238
191ec77f
UD
22392007-12-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2240
2241 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
2242 Store 2 before returning ETIMEDOUT.
2243
c012be6f
UD
22442007-11-23 Ulrich Drepper <drepper@redhat.com>
2245
2246 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
2247 Store 2 before returning ETIMEDOUT.
2248 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise
2249 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
2250 (__lll_lock_wait_private): Optimize.
2251 (__lll_lock_wait): Likewise.
2252
77f1e09a
UD
22532007-11-20 Jakub Jelinek <jakub@redhat.com>
2254
2255 * sysdeps/pthread/pthread.h (pthread_cleanup_push,
2256 pthread_cleanup_push_defer_np): Add extra (void *) cast to shut up
2257 g++ 4.1 and 4.2 -Wstrict-aliasing warnings.
2258
0f7e0ee5
UD
22592007-11-08 Ulrich Drepper <drepper@redhat.com>
2260
cbed6a60
UD
2261 [BZ #5240]
2262 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
2263 If we time out, try one last time to lock the futex to avoid
2264 losing a wakeup signal.
2265 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
2266 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
2267
0f7e0ee5
UD
2268 [BZ #5245]
2269 * sysdeps/pthread/createthread.c (do_clone): Translate clone error
2270 if necessary.
2271
f6ed654c
UD
22722007-11-07 Ulrich Drepper <drepper@redhat.com>
2273
2274 [BZ #5245]
2275 * allocatestack.c (allocate_stack): Change ENOMEM error in case
2276 mmap failed to EAGAIN.
2277 * Makefile (tests): Add tst-basic7.
2278 * tst-basic7.c: New file.
2279
b92e3780
UD
22802007-11-05 Ulrich Drepper <drepper@redhat.com>
2281
2282 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
2283 Use __linkin_atfork.
2284
94a749f6
UD
22852007-11-03 Mike Frysinger <vapier@gentoo.org>
2286
2287 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (LOAD_FUTEX_WAIT): Add
2288 missing line continuations.
2289 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S (LOAD_FUTEX_WAIT,
2290 LOAD_FUTEX_WAKE): Likewise. Also add missing 3rd parameter.
2291
f160a450
UD
22922007-10-28 Ulrich Drepper <drepper@redhat.com>
2293
2294 [BZ #5220]
2295 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Declare
2296 __active_timer_sigev_thread and __active_timer_sigev_thread_lock.
2297 (struct timer): Add next element.
2298 * sysdeps/unix/sysv/linux/timer_create.c: For SIGEV_THREAD timers,
2299 enqueue timer structure into __active_timer_sigev_thread list.
2300 * sysdeps/unix/sysv/linux/timer_delete.c: For SIGEV_THREAD timers,
2301 remove timer struct from __active_timer_sigev_thread.
2302 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
2303 Before using timer structure make sure it is still on the
2304 __active_timer_sigev_thread list. Keep lock until done.
2305 Define __active_timer_sigev_thread and
2306 __active_timer_sigev_thread_lock.
2307
94833f11
UD
23082007-10-27 Ulrich Drepper <drepper@redhat.com>
2309
2310 * sysdeps/pthread/malloc-machine.h: Define ATFORK_MEM.
2311 Redefine thread_atfork for use of ATFORK_MEM.
2312 * sysdeps/unix/sysv/linux/fork.h: Define __linkin_atfork.
2313 * sysdeps/unix/sysv/linux/register-atfork.c (__linkin_atfork): New
2314 function.
2315 * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
2316 Use atomic operation when removing first element of list.
2317
96c06e08
JJ
23182007-10-17 Jakub Jelinek <jakub@redhat.com>
2319
2320 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__old_sem_post): New
2321 routine instead of an alias to __new_sem_post.
2322
e807818b
JJ
23232007-10-15 Jakub Jelinek <jakub@redhat.com>
2324
2325 * init.c (__pthread_initialize_minimal): Initialize word to appease
2326 valgrind.
2327
59d430c6
UD
23282007-10-10 Jakub Jelinek <jakub@redhat.com>
2329
2330 * sysdeps/pthread/bits/libc-lock.h (__libc_rwlock_init): Inside of
2331 libc.so just clear NAME.
2332 (__libc_rwlock_fini): Nop inside of libc.so.
2333 * tst-initializers1.c (main): Test if PTHREAD_RWLOCK_INITIALIZER is
2334 all zeros.
2335
221d9d8e
UD
23362007-09-02 Ulrich Drepper <drepper@redhat.com>
2337
2338 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
2339 (__pthread_cond_wait): Fix unlocking of internal lock after mutex
2340 unlocking failed.
2341 Patch by Luca Barbieri <luca.barbieri@gmail.com>.
2342
2a01ce56
UD
23432007-08-21 Ulrich Drepper <drepper@redhat.com>
2344
2345 [BZ #4938]
2346 * allocatestack.c (__reclaim_stacks): Clear the TSD in the
2347 reclaimed stack if necessary.
2348 * Makefile (tests): Add tst-tsd6.
2349 * tst-tsd6.c: New file.
2350
c273641b
JJ
23512007-08-21 Jakub Jelinek <jakub@redhat.com>
2352
2353 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_dead):
2354 Add private argument.
2355
fb84593c
UD
23562007-08-20 Ulrich Drepper <drepper@redhat.com>
2357
2358 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
2359 (__pthread_cond_timedwait): Use clock_gettime from VDSO if possible.
2360
3e8d1eab
JJ
23612007-08-16 Jakub Jelinek <jakub@redhat.com>
2362
2363 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h
2364 (__lll_robust_timedlock): Pass private as last argument to
2365 __lll_robust_timedlock_wait.
2366 (__lll_unlock): Fix a pasto.
2367
e4720b0e
JJ
23682007-08-15 Jakub Jelinek <jakub@redhat.com>
2369
2370 * sysdeps/unix/sysv/linux/sparc/internaltypes.h (sparc_new_sem,
2371 sparc_old_sem): New structs.
2372 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
2373 (__sem_wait_cleanup): New function.
2374 (__new_sem_wait): Use sparc_new_sem structure. Bump and afterwards
2375 decrease nwaiters. Register __sem_wait_cleanup as cleanup handler.
2376 Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
2377 lll_futex_wait.
2378 (__old_sem_wait): New function.
2379 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: Include
2380 nptl/sysdeps/unix/sysv/linux/sparc version.
2381 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c:
2382 Likewise.
2383 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: Likewise.
2384 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c
2385 (__new_sem_trywait): Use sparc_old_sem structure.
2386 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c
2387 (sem_timedwait): Use sparc_new_sem structure. Bump and afterwards
2388 decrease nwaiters. Register __sem_wait_cleanup as cleanup handler.
2389 Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
2390 lll_futex_timed_wait.
2391 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c (__new_sem_post):
2392 Use sparc_new_sem structure. Only wake if nwaiters > 0. Pass
2393 isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
2394 lll_futex_wake.
2395 (__old_sem_post): New function.
2396 * sysdeps/unix/sysv/linux/sparc/sem_wait.c: New file.
2397 * sysdeps/unix/sysv/linux/sparc/sem_init.c: New file.
2398 * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c: New file.
2399 * sysdeps/unix/sysv/linux/sparc/sem_post.c: New file.
2400 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: Remove.
2401 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: Remove.
2402
d13f4a43
UD
24032007-08-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2404
2405 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
2406 (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
2407 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2408 Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
2409 * sysdeps/unix/sysv/linux/shpthread_cond_signal.S
2410 (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
2411 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2412 Use FUTEX_WAKE_OP.
2413 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
2414 kernel-features.h and tcb-offsets.h.
2415 (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
2416 lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
2417 process private.
2418 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
2419 tcb-offsets.h.
2420 (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE
2421 to lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
2422 process private.
2423 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use #ifdef
2424 __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
2425 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
2426 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
2427 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
2428 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
2429 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
2430
702a9414
JJ
24312007-08-14 Jakub Jelinek <jakub@redhat.com>
2432
467d1345
JJ
2433 * sysdeps/unix/sysv/linux/lowlevellock.c: Comment fix.
2434 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
2435 (__lll_timedwait_tid): Pass LLL_SHARED as 4th argument to
2436 lll_futex_timed_wait.
2437
702a9414
JJ
2438 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (__lll_unlock,
2439 __lll_robust_unlock): Rewrite as macros instead of inline functions.
2440 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_unlock,
2441 __lll_robust_unlock, __lll_wait_tid): Likewise.
2442
22502ea2
UD
24432007-08-13 Jakub Jelinek <jakub@redhat.com>
2444
2445 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
2446 Fix a pasto.
2447 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
2448 (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
2449 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2450 Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
2451 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
2452 (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
2453 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2454 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Include
2455 kernel-features.h.
2456 (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
2457 lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
2458 process private. Switch DW_CFA_advance_loc1 and some
2459 DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
2460 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
2461 (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE to
2462 lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
2463 process private. Switch DW_CFA_advance_loc{1,2} and some
2464 DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
2465 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use
2466 #ifdef __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
2467 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2468 Likewise.
2469 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
2470 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
2471 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2472 Likewise.
2473 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
2474 (__pthread_cond_broadcast): Compare %r8 instead of
2475 dep_mutex-cond_*(%rdi) with $-1.
2476 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
2477 (__pthread_cond_signal): Xor FUTEX_WAKE_OP with FUTEX_WAKE instead
2478 of oring.
2479
4baf59ad
UD
24802007-08-13 Ulrich Drepper <drepper@redhat.com>
2481
2482 * sysdeps/unix/sysv/linux/i386/i786/Implies: New file.
2483
9c6f6953
UD
24842007-08-13 Jakub Jelinek <jakub@redhat.com>
2485
2486 * allocatestack.c: Include kernel-features.h.
2487 * pthread_create.c: Likewise.
2488 * pthread_mutex_init.c: Likewise.
2489 * init.c: Likewise.
2490 * pthread_cond_timedwait.c: Likewise.
2491 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
2492 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2493 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
2494 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
2495 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
2496 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2497 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2498 Likewise.
2499 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2500 Likewise.
2501 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2502 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2503 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
2504 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
2505
974a1f0f
UD
25062007-08-12 Jakub Jelinek <jakub@redhat.com>
2507
2508 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
2509 [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
2510 byte elements. One of them is the new __shared element.
2511 [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
2512 adjust names of other padding elements.
2513 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
2514 [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
2515 byte elements. One of them is the new __shared element.
2516 [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
2517 adjust names of other padding elements.
2518 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_rwlock_t):
2519 Renamed __pad1 element to __shared, adjust names of other padding
2520 elements.
2521 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
2522 (pthread_rwlock_t): Likewise.
2523 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock): Fix a
2524 typo.
2525
25262007-08-09 Anton Blanchard <anton@samba.org>
2527
2528 * sysdeps/unix/sysv/linux/powerpc/pthread_spin_unlock.c: New file.
2529
f47e2626
UD
25302007-08-12 Ulrich Drepper <drepper@redhat.com>
2531
2532 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Include
2533 <kernel-features.h>.
2534 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
2535
5bd8a249
UD
25362007-08-11 Ulrich Drepper <drepper@redhat.com>
2537
2538 * pthreadP.h (PTHREAD_ROBUST_MUTEX_PSHARED): Define.
2539 * pthread_mutex_lock.c: Use it instead of PTHREAD_MUTEX_PSHARED when
2540 dealing with robust mutexes.
2541 * pthread_mutex_timedlock.c: Likewise.
2542 * pthread_mutex_trylock.c: Likewise.
2543 * pthread_mutex_unlock.c: Likewise.
2544 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
2545
25462007-08-06 Jakub Jelinek <jakub@redhat.com>
2547
2548 * pthreadP.h (PTHREAD_MUTEX_PSHARED_BIT): Define.
2549 (PTHREAD_MUTEX_TYPE): Mask __kind with 127.
2550 (PTHREAD_MUTEX_PSHARED): Define.
2551 * pthread_mutex_init.c (__pthread_mutex_init): Set
2552 PTHREAD_MUTEX_PSHARED_BIT for pshared or robust
2553 mutexes.
2554 * pthread_mutex_lock.c (LLL_MUTEX_LOCK): Take mutex as argument
2555 instead of its __data.__lock field, pass PTHREAD_MUTEX_PSHARED
2556 as second argument to lll_lock.
2557 (LLL_MUTEX_TRYLOCK): Take mutex as argument
2558 instead of its __data.__lock field.
2559 (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
2560 __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
2561 to lll_robust_lock.
2562 (__pthread_mutex_lock): Update LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
2563 LLL_ROBUST_MUTEX_LOCK users, use PTHREAD_MUTEX_TYPE (mutex)
2564 instead of mutex->__data.__kind directly, pass
2565 PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock and lll_futex_wait.
2566 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Use
2567 PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
2568 directly, pass PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock.
2569 (pthread_mutex_timedlock): Pass PTHREAD_MUTEX_PSHARED (mutex)
2570 to lll_timedlock, lll_robust_timedlock, lll_unlock and
2571 lll_futex_timed_wait. Use PTHREAD_MUTEX_TYPE (mutex) instead
2572 of mutex->__data.__kind directly.
2573 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Pass
2574 PTHREAD_MUTEX_PSHARED (mutex) to lll_timedlock,
2575 lll_robust_timedlock, lll_unlock and lll_futex_timed_wait. Use
2576 PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind directly.
2577 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Pass
2578 PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock, lll_robust_unlock
2579 and lll_futex_wake.
2580 * pthread_mutex_setprioceiling.c (pthread_mutex_setprioceiling): Pass
2581 PTHREAD_MUTEX_PSHARED (mutex) to lll_futex_wait and lll_futex_wake.
2582 Use PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
2583 directly.
2584 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK):
2585 Take mutex as argument instead of its __data.__lock field, pass
2586 PTHREAD_MUTEX_PSHARED as second argument to lll_cond_lock.
2587 (LLL_MUTEX_TRYLOCK): Take mutex as argument instead of its
2588 __data.__lock field.
2589 (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
2590 __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
2591 to lll_robust_cond_lock.
2592 * pthread_cond_broadcast.c (__pthread_cond_broadcast): Add pshared
2593 variable, pass it to lll_lock, lll_unlock, lll_futex_requeue and
2594 lll_futex_wake. Don't use lll_futex_requeue if dependent mutex
2595 has PTHREAD_MUTEX_PSHARED_BIT bit set in its __data.__kind.
2596 * pthread_cond_destroy.c (__pthread_cond_destroy): Add pshared
2597 variable, pass it to lll_lock, lll_unlock, lll_futex_wake and
2598 lll_futex_wait.
2599 * pthread_cond_signal.c (__pthread_cond_signal): Add pshared
2600 variable, pass it to lll_lock, lll_unlock, lll_futex_wake_unlock and
2601 lll_futex_wake.
2602 * pthread_cond_timedwait.c (__pthread_cond_wait): Add
2603 pshared variable, pass it to lll_lock, lll_unlock,
2604 lll_futex_timedwait and lll_futex_wake.
2605 * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait): Add
2606 pshared variable, pass it to lll_lock, lll_unlock, lll_futex_wait
2607 and lll_futex_wake.
2608 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_requeue,
2609 lll_futex_wake_unlock): Add private argument, use __lll_private_flag
2610 macro.
2611 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue,
2612 lll_futex_wake_unlock): Likewise.
2613 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_requeue):
2614 Likewise.
2615 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_futex_requeue,
2616 lll_futex_wake_unlock): Likewise.
2617 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_requeue):
2618 Likewise.
2619 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue,
2620 lll_futex_wake_unlock): Likewise.
2621 (lll_futex_wake): Fix a typo.
2622 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym (PS_BIT): Add.
2623 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
2624 (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
2625 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2626 Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
2627 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
2628 (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
2629 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2630 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
2631 (__pthread_cond_timedwait): Likewise.
2632 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
2633 (__condvar_cleanup, __pthread_cond_wait): Likewise.
2634
0470fa46
JJ
26352007-08-05 Jakub Jelinek <jakub@redhat.com>
2636
2637 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
2638 Don't use CGOTSETUP and CGOTRESTORE macros.
2639 (CGOTSETUP, CGOTRESTORE): Remove.
2640 <IS_IN_rtld> (CENABLE, CDISABLE): Don't use JUMPTARGET, branch to
2641 @local symbol.
2642
64f6281c
UD
26432007-08-01 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2644
2645 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Remove
2646 definitions for private futexes.
2647 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Include
2648 kernel-features.h and lowlevellock.h. Use private futexes if
2649 they are available.
2650 (__lll_lock_wait_private, __lll_unlock_wake_private): New.
2651 (__lll_mutex_lock_wait): Rename to
2652 (__lll_lock_wait): ... this. Don't compile in for libc.so.
2653 (__lll_mutex_timedlock_wait): Rename to ...
2654 (__lll_timedlock_wait): ... this. Use __NR_gettimeofday.
2655 Don't compile in for libc.so.
2656 (__lll_mutex_unlock_wake): Rename to ...
2657 (__lll_unlock_wake): ... this. Don't compile in for libc.so.
2658 (__lll_timedwait_tid): Use __NR_gettimeofday.
2659 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Allow including
2660 the header from assembler. Renamed all lll_mutex_* resp.
2661 lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
2662 Renamed all LLL_MUTEX_LOCK_* macros to LLL_LOCK_*.
2663 (FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE):
2664 Define.
2665 (__lll_lock_wait_private): Add prototype.
2666 (__lll_lock_wait, __lll_timedlock_wait, __lll_robust_lock_wait,
2667 __lll_robust_timedlock_wait, __lll_unlock_wake_private,
2668 __lll_unlock_wake): Likewise.
2669 (lll_lock): Add private argument. Call __lll_lock_wait_private
2670 if private is constant LLL_PRIVATE.
2671 (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
2672 lll_timedlock, lll_robust_timedlock): Add private argument.
2673 (lll_unlock): Add private argument. Call __lll_unlock_wake_private
2674 if private is constant LLL_PRIVATE.
2675 (lll_robust_unlock, lll_robust_dead): Add private argument.
2676 (lll_lock_t): Remove.
2677 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
2678 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
2679 lll_cond_wake, lll_cond_broadcast): Remove.
2680 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: Include
2681 kernel-features.h and lowlevellock.h.
2682 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
2683 (LOAD_FUTEX_WAIT): Define.
2684 (__lll_robust_mutex_lock_wait): Rename to ...
2685 (__lll_robust_lock_wait): ... this. Add private argument.
2686 Use LOAD_FUTEX_WAIT macro.
2687 (__lll_robust_mutex_timedlock_wait): Rename to ...
2688 (__lll_robust_timedlock_wait): ... this. Add private argument.
2689 Use __NR_gettimeofday. Use LOAD_FUTEX_WAIT macro.
2690 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Include
2691 lowlevellock.h.
2692 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
2693 (pthread_barrier_wait): Use __lll_{lock,unlock}_* instead of
2694 __lll_mutex_{lock,unlock}_*.
2695 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Include
2696 lowlevellock.h and pthread-errnos.h.
2697 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
2698 FUTEX_CMP_REQUEUE, EINVAL): Remove.
2699 (__pthread_cond_broadcast): Use __lll_{lock,unlock}_* instead of
2700 __lll_mutex_{lock,unlock}_*.
2701 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Include
2702 lowlevellock.h and pthread-errnos.h.
2703 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE, EINVAL): Remove.
2704 (__pthread_cond_signal): Use __lll_{lock,unlock}_* instead of
2705 __lll_mutex_{lock,unlock}_*.
2706 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
2707 lowlevellock.h.
2708 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE): Remove.
2709 (__pthread_cond_timedwait): Use __lll_{lock,unlock}_* instead of
2710 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
2711 (__condvar_tw_cleanup): Likewise.
2712 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
2713 lowlevellock.h.
2714 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
2715 (__pthread_cond_wait): Use __lll_{lock,unlock}_* instead of
2716 __lll_mutex_{lock,unlock}_*.
2717 ( __condvar_w_cleanup): Likewise.
2718 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Include lowlevellock.h.
2719 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
2720 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Include
2721 lowlevellock.h.
2722 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
2723 (__pthread_rwlock_rdlock): Use __lll_{lock,unlock}_* instead of
2724 __lll_mutex_{lock,unlock}_*.
2725 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Include
2726 lowlevellock.h.
2727 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
2728 FUTEX_PRIVATE_FLAG): Remove.
2729 (pthread_rwlock_timedrdlock): Use __lll_{lock,unlock}_* instead of
2730 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
2731 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Include
2732 lowlevellock.h.
2733 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
2734 FUTEX_PRIVATE_FLAG): Remove.
2735 (pthread_rwlock_timedwrlock): Use __lll_{lock,unlock}_* instead of
2736 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
2737 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Include
2738 lowlevellock.h.
2739 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
2740 (__pthread_rwlock_unlock): Use __lll_{lock,unlock}_* instead of
2741 __lll_mutex_{lock,unlock}_*.
2742 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Include
2743 lowlevellock.h.
2744 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
2745 (__pthread_rwlock_wrlock): Use __lll_{lock,unlock}_* instead of
2746 __lll_mutex_{lock,unlock}_*.
2747 * sysdeps/unix/sysv/linux/sh/sem_post.S: Include lowlevellock.h.
2748 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
2749 (__new_sem_post): Use standard initial exec code sequences.
2750 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Include
2751 lowlevellock.h.
2752 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
2753 FUTEX_PRIVATE_FLAG): Remove.
2754 (sem_timedwait): Use __NR_gettimeofday. Use standard initial
2755 exec code sequences.
2756 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Include lowlevellock.h.
2757 (__new_sem_trywait): Use standard initial exec code sequences.
2758 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Include lowlevellock.h.
2759 (__new_sem_wait): Use standard initial exec code sequences.
2760
e51deae7
UD
27612007-07-31 Anton Blanchard <anton@samba.org>
2762
2763 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
2764 Use __asm __volatile (__lll_acq_instr ::: "memory") instead of
2765 atomic_full_barrier.
2766
27672007-07-31 Jakub Jelinek <jakub@redhat.com>
2768
2769 * allocatestack.c (stack_cache_lock): Change type to int.
2770 (get_cached_stack, allocate_stack, __deallocate_stack,
2771 __make_stacks_executable, __find_thread_by_id, __nptl_setxid,
2772 __pthread_init_static_tls, __wait_lookup_done): Add LLL_PRIVATE
2773 as second argument to lll_lock and lll_unlock macros on
2774 stack_cache_lock.
2775 * pthread_create.c (__find_in_stack_list): Likewise.
2776 (start_thread): Similarly with pd->lock. Use lll_robust_dead
2777 macro instead of lll_robust_mutex_dead, pass LLL_SHARED to it
2778 as second argument.
2779 * descr.h (struct pthread): Change lock and setxid_futex field
2780 type to int.
2781 * old_pthread_cond_broadcast.c (__pthread_cond_broadcast_2_0): Use
2782 LLL_LOCK_INITIALIZER instead of LLL_MUTEX_LOCK_INITIALIZER.
2783 * old_pthread_cond_signal.c (__pthread_cond_signal_2_0): Likewise.
2784 * old_pthread_cond_timedwait.c (__pthread_cond_timedwait_2_0):
2785 Likewise.
2786 * old_pthread_cond_wait.c (__pthread_cond_wait_2_0): Likewise.
2787 * pthread_cond_init.c (__pthread_cond_init): Likewise.
2788 * pthreadP.h (__attr_list_lock): Change type to int.
2789 * pthread_attr_init.c (__attr_list_lock): Likewise.
2790 * pthread_barrier_destroy.c (pthread_barrier_destroy): Pass
2791 ibarrier->private ^ FUTEX_PRIVATE_FLAG as second argument to
2792 lll_{,un}lock.
2793 * pthread_barrier_wait.c (pthread_barrier_wait): Likewise and
2794 also for lll_futex_{wake,wait}.
2795 * pthread_barrier_init.c (pthread_barrier_init): Make iattr
2796 a pointer to const.
2797 * pthread_cond_broadcast.c (__pthread_cond_broadcast): Pass
2798 LLL_SHARED as second argument to lll_{,un}lock.
2799 * pthread_cond_destroy.c (__pthread_cond_destroy): Likewise.
2800 * pthread_cond_signal.c (__pthread_cond_singal): Likewise.
2801 * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
2802 * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait):
2803 Likewise.
2804 * pthread_getattr_np.c (pthread_getattr_np): Add LLL_PRIVATE
2805 as second argument to lll_{,un}lock macros on pd->lock.
2806 * pthread_getschedparam.c (__pthread_getschedparam): Likewise.
2807 * pthread_setschedparam.c (__pthread_setschedparam): Likewise.
2808 * pthread_setschedprio.c (pthread_setschedprio): Likewise.
2809 * tpp.c (__pthread_tpp_change_priority, __pthread_current_priority):
2810 Likewise.
2811 * sysdeps/pthread/createthread.c (do_clone, create_thread):
2812 Likewise.
2813 * pthread_once.c (once_lock): Change type to int.
2814 (__pthread_once): Pass LLL_PRIVATE as second argument to
2815 lll_{,un}lock macros on once_lock.
2816 * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Use
2817 lll_{,un}lock macros instead of lll_mutex_{,un}lock, pass
2818 rwlock->__data.__shared as second argument to them and similarly
2819 for lll_futex_w*.
2820 * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock):
2821 Likewise.
2822 * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock):
2823 Likewise.
2824 * pthread_rwlock_tryrdlock.c (__pthread_rwlock_tryrdlock): Likewise.
2825 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Likewise.
2826 * pthread_rwlock_unlock.c (__pthread_rwlock_unlock): Likewise.
2827 * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
2828 * sem_close.c (sem_close): Pass LLL_PRIVATE as second argument
2829 to lll_{,un}lock macros on __sem_mappings_lock.
2830 * sem_open.c (check_add_mapping): Likewise.
2831 (__sem_mappings_lock): Change type to int.
2832 * semaphoreP.h (__sem_mappings_lock): Likewise.
2833 * pthread_mutex_lock.c (LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
2834 LLL_ROBUST_MUTEX_LOCK): Use lll_{,try,robust_}lock macros
2835 instead of lll_*mutex_*, pass LLL_SHARED as last
2836 argument.
2837 (__pthread_mutex_lock): Use lll_unlock instead of lll_mutex_unlock,
2838 pass LLL_SHARED as last argument.
2839 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK,
2840 LLL_MUTEX_TRYLOCK, LLL_ROBUST_MUTEX_LOCK): Use
2841 lll_{cond_,cond_try,robust_cond}lock macros instead of lll_*mutex_*,
2842 pass LLL_SHARED as last argument.
2843 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
2844 lll_{timed,try,robust_timed,un}lock instead of lll_*mutex*, pass
2845 LLL_SHARED as last argument.
2846 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Similarly.
2847 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt):
2848 Similarly.
2849 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_lock,
2850 __libc_lock_lock_recursive, __libc_lock_unlock,
2851 __libc_lock_unlock_recursive): Pass LLL_PRIVATE as second
2852 argument to lll_{,un}lock.
2853 * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_lock,
2854 _IO_lock_unlock): Likewise.
2855 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Don't use
2856 compound literal.
2857 * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
2858 Pass LLL_PRIVATE as second argument to lll_{,un}lock macros on
2859 __fork_lock.
2860 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork,
2861 free_mem): Likewise.
2862 (__fork_lock): Change type to int.
2863 * sysdeps/unix/sysv/linux/fork.h (__fork_lock): Likewise.
2864 * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Pass
2865 isem->private ^ FUTEX_PRIVATE_FLAG as second argument to
2866 lll_futex_wake.
2867 * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
2868 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Likewise.
2869 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait_private):
2870 New function.
2871 (__lll_lock_wait, __lll_timedlock_wait): Add private argument and
2872 pass it through to lll_futex_*wait, only compile in when
2873 IS_IN_libpthread.
2874 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
2875 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): Add private
2876 argument and pass it through to lll_futex_*wait.
2877 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Renamed all
2878 lll_mutex_* resp. lll_robust_mutex_* macros to lll_* resp.
2879 lll_robust_*. Renamed all __lll_mutex_* resp. __lll_robust_mutex_*
2880 inline functions to __lll_* resp. __lll_robust_*.
2881 (LLL_MUTEX_LOCK_INITIALIZER): Remove.
2882 (lll_mutex_dead): Add private argument.
2883 (__lll_lock_wait_private): New prototype.
2884 (__lll_lock_wait, __lll_robust_lock_wait, __lll_lock_timedwait,
2885 __lll_robust_lock_timedwait): Add private argument to prototypes.
2886 (__lll_lock): Add private argument, if it is constant LLL_PRIVATE,
2887 call __lll_lock_wait_private, otherwise pass private to
2888 __lll_lock_wait.
2889 (__lll_robust_lock, __lll_cond_lock, __lll_timedlock,
2890 __lll_robust_timedlock): Add private argument, pass it to
2891 __lll_*wait functions.
2892 (__lll_unlock): Add private argument, if it is constant LLL_PRIVATE,
2893 call __lll_unlock_wake_private, otherwise pass private to
2894 __lll_unlock_wake.
2895 (__lll_robust_unlock): Add private argument, pass it to
2896 __lll_robust_unlock_wake.
2897 (lll_lock, lll_robust_lock, lll_cond_lock, lll_timedlock,
2898 lll_robust_timedlock, lll_unlock, lll_robust_unlock): Add private
2899 argument, pass it through to __lll_* inline function.
2900 (__lll_mutex_unlock_force, lll_mutex_unlock_force): Remove.
2901 (lll_lock_t): Remove.
2902 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
2903 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
2904 lll_cond_wake, lll_cond_broadcast): Remove.
2905 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2906 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2907 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2908 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
2909 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Allow including
2910 the header from assembler. Renamed all lll_mutex_* resp.
2911 lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
2912 (LOCK, FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP,
2913 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
2914 (LLL_MUTEX_LOCK_INITIALIZER, LLL_MUTEX_LOCK_INITIALIZER_LOCKED,
2915 LLL_MUTEX_LOCK_INITIALIZER_WAITERS): Remove.
2916 (__lll_mutex_lock_wait, __lll_mutex_timedlock_wait,
2917 __lll_mutex_unlock_wake, __lll_lock_wait, __lll_unlock_wake):
2918 Remove prototype.
2919 (__lll_trylock_asm, __lll_lock_asm_start, __lll_unlock_asm): Define.
2920 (lll_robust_trylock, lll_cond_trylock): Use LLL_LOCK_INITIALIZER*
2921 rather than LLL_MUTEX_LOCK_INITIALIZER* macros.
2922 (lll_trylock): Likewise, use __lll_trylock_asm, pass
2923 MULTIPLE_THREADS_OFFSET as another asm operand.
2924 (lll_lock): Add private argument, use __lll_lock_asm_start, pass
2925 MULTIPLE_THREADS_OFFSET as last asm operand, call
2926 __lll_lock_wait_private if private is constant LLL_PRIVATE,
2927 otherwise pass private as another argument to __lll_lock_wait.
2928 (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
2929 lll_timedlock, lll_robust_timedlock): Add private argument, pass
2930 private as another argument to __lll_*lock_wait call.
2931 (lll_unlock): Add private argument, use __lll_unlock_asm, pass
2932 MULTIPLE_THREADS_OFFSET as another asm operand, call
2933 __lll_unlock_wake_private if private is constant LLL_PRIVATE,
2934 otherwise pass private as another argument to __lll_unlock_wake.
2935 (lll_robust_unlock): Add private argument, pass private as another
2936 argument to __lll_unlock_wake.
2937 (lll_robust_dead): Add private argument, use __lll_private_flag
2938 macro.
2939 (lll_islocked): Use LLL_LOCK_INITIALIZER instead of
2940 LLL_MUTEX_LOCK_INITIALIZER.
2941 (lll_lock_t): Remove.
2942 (LLL_LOCK_INITIALIZER_WAITERS): Define.
2943 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
2944 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
2945 lll_cond_wake, lll_cond_broadcast): Remove.
2946 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2947 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Revert
2948 2007-05-2{3,9} changes.
2949 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Include
2950 kernel-features.h and lowlevellock.h.
2951 (LOAD_PRIVATE_FUTEX_WAIT): Define.
2952 (LOAD_FUTEX_WAIT): Rewritten.
2953 (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
2954 define.
2955 (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
2956 (__lll_mutex_lock_wait): Rename to ...
2957 (__lll_lock_wait): ... this. Take futex addr from %edx instead of
2958 %ecx, %ecx is now private argument. Don't compile in for libc.so.
2959 (__lll_mutex_timedlock_wait): Rename to ...
2960 (__lll_timedlock_wait): ... this. Use __NR_gettimeofday. %esi
2961 contains private argument. Don't compile in for libc.so.
2962 (__lll_mutex_unlock_wake): Rename to ...
2963 (__lll_unlock_wake): ... this. %ecx contains private argument.
2964 Don't compile in for libc.so.
2965 (__lll_timedwait_tid): Use __NR_gettimeofday.
2966 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Include
2967 kernel-features.h and lowlevellock.h.
2968 (LOAD_FUTEX_WAIT): Define.
2969 (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
2970 define.
2971 (__lll_robust_mutex_lock_wait): Rename to ...
2972 (__lll_robust_lock_wait): ... this. Futex addr is now in %edx
2973 argument, %ecx argument contains private. Use LOAD_FUTEX_WAIT
2974 macro.
2975 (__lll_robust_mutex_timedlock_wait): Rename to ...
2976 (__lll_robust_timedlock_wait): ... this. Use __NR_gettimeofday.
2977 %esi argument contains private, use LOAD_FUTEX_WAIT macro.
2978 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Include
2979 lowlevellock.h.
2980 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2981 (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
2982 PRIVATE(%ebx) ^ LLL_SHARED as private argument in %ecx to
2983 __lll_lock_wait and __lll_unlock_wake, pass MUTEX(%ebx) address
2984 to __lll_lock_wait in %edx.
2985 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
2986 Include lowlevellock.h and pthread-errnos.h.
2987 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
2988 FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
2989 (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*, pass
2990 cond_lock address in %edx rather than %ecx to __lll_lock_wait,
2991 pass LLL_SHARED in %ecx to both __lll_lock_wait and
2992 __lll_unlock_wake.
2993 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
2994 Include lowlevellock.h and pthread-errnos.h.
2995 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
2996 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
2997 (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*, pass
2998 cond_lock address in %edx rather than %ecx to __lll_lock_wait,
2999 pass LLL_SHARED in %ecx to both __lll_lock_wait and
3000 __lll_unlock_wake.
3001 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
3002 Include lowlevellock.h.
3003 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
3004 Don't define.
3005 (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*, pass
3006 cond_lock address in %edx rather than %ecx to __lll_lock_wait,
3007 pass LLL_SHARED in %ecx to both __lll_lock_wait and
3008 __lll_unlock_wake. Use __NR_gettimeofday.
3009 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
3010 Include lowlevellock.h.
3011 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3012 (__pthread_cond_wait, __condvar_w_cleanup): Rename __lll_mutex_*
3013 to __lll_*, pass cond_lock address in %edx rather than %ecx to
3014 __lll_lock_wait, pass LLL_SHARED in %ecx to both __lll_lock_wait
3015 and __lll_unlock_wake.
3016 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S:
3017 Include lowlevellock.h.
3018 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3019 (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*, pass
3020 MUTEX(%ebx) address in %edx rather than %ecx to
3021 __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
3022 and __lll_unlock_wake. Move return value from %ecx to %edx
3023 register.
3024 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
3025 Include lowlevellock.h.
3026 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
3027 Don't define.
3028 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
3029 MUTEX(%ebp) address in %edx rather than %ecx to
3030 __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
3031 and __lll_unlock_wake. Move return value from %ecx to %edx
3032 register. Use __NR_gettimeofday.
3033 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
3034 Include lowlevellock.h.
3035 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
3036 Don't define.
3037 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
3038 MUTEX(%ebp) address in %edx rather than %ecx to
3039 __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
3040 and __lll_unlock_wake. Move return value from %ecx to %edx
3041 register. Use __NR_gettimeofday.
3042 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
3043 Include lowlevellock.h.
3044 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3045 (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*, pass
3046 MUTEX(%edi) address in %edx rather than %ecx to
3047 __lll_lock_wait, pass PSHARED(%edi) in %ecx to both __lll_lock_wait
3048 and __lll_unlock_wake.
3049 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
3050 Include lowlevellock.h.
3051 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3052 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
3053 MUTEX(%ebx) address in %edx rather than %ecx to
3054 __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
3055 and __lll_unlock_wake. Move return value from %ecx to %edx
3056 register.
3057 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Include
3058 lowlevellock.h.
3059 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
3060 define.
3061 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Include lowlevellock.h.
3062 (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
3063 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Include
3064 lowlevellock.h.
3065 (LOCK, SYS_futex, SYS_gettimeofday, FUTEX_WAIT): Don't define.
3066 (sem_timedwait): Use __NR_gettimeofday.
3067 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Include
3068 lowlevellock.h.
3069 (LOCK): Don't define.
3070 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include
3071 lowlevellock.h.
3072 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
3073 * sysdeps/unix/sysv/linux/powerpc/sem_post.c: Wake only when there
3074 are waiters.
3075 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Revert
3076 2007-05-2{3,9} changes.
3077 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Include
3078 kernel-features.h and lowlevellock.h.
3079 (LOAD_PRIVATE_FUTEX_WAIT): Define.
3080 (LOAD_FUTEX_WAIT): Rewritten.
3081 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
3082 (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
3083 (__lll_mutex_lock_wait): Rename to ...
3084 (__lll_lock_wait): ... this. %esi is now private argument.
3085 Don't compile in for libc.so.
3086 (__lll_mutex_timedlock_wait): Rename to ...
3087 (__lll_timedlock_wait): ... this. %esi contains private argument.
3088 Don't compile in for libc.so.
3089 (__lll_mutex_unlock_wake): Rename to ...
3090 (__lll_unlock_wake): ... this. %esi contains private argument.
3091 Don't compile in for libc.so.
3092 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Include
3093 kernel-features.h and lowlevellock.h.
3094 (LOAD_FUTEX_WAIT): Define.
3095 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
3096 (__lll_robust_mutex_lock_wait): Rename to ...
3097 (__lll_robust_lock_wait): ... this. %esi argument contains private.
3098 Use LOAD_FUTEX_WAIT macro.
3099 (__lll_robust_mutex_timedlock_wait): Rename to ...
3100 (__lll_robust_timedlock_wait): ... this. %esi argument contains
3101 private, use LOAD_FUTEX_WAIT macro.
3102 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Include
3103 lowlevellock.h.
3104 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3105 (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
3106 PRIVATE(%rdi) ^ LLL_SHARED as private argument in %esi to
3107 __lll_lock_wait and __lll_unlock_wake.
3108 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S:
3109 Include lowlevellock.h and pthread-errnos.h.
3110 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
3111 FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
3112 (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*,
3113 pass LLL_SHARED in %esi to both __lll_lock_wait and
3114 __lll_unlock_wake.
3115 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S:
3116 Include lowlevellock.h and pthread-errnos.h.
3117 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
3118 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
3119 (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*,
3120 pass LLL_SHARED in %esi to both __lll_lock_wait and
3121 __lll_unlock_wake.
3122 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:
3123 Include lowlevellock.h.
3124 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3125 (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*,
3126 pass LLL_SHARED in %esi to both __lll_lock_wait and
3127 __lll_unlock_wake.
3128 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
3129 Include lowlevellock.h.
3130 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3131 (__pthread_cond_wait, __condvar_cleanup): Rename __lll_mutex_*
3132 to __lll_*, pass LLL_SHARED in %esi to both __lll_lock_wait
3133 and __lll_unlock_wake.
3134 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S:
3135 Include lowlevellock.h.
3136 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
3137 Don't define.
3138 (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*,
3139 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
3140 and __lll_unlock_wake.
3141 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
3142 Include lowlevellock.h.
3143 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
3144 Don't define.
3145 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
3146 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
3147 and __lll_unlock_wake.
3148 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3149 Include lowlevellock.h.
3150 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
3151 Don't define.
3152 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
3153 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
3154 and __lll_unlock_wake.
3155 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S:
3156 Include lowlevellock.h.
3157 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
3158 Don't define.
3159 (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*,
3160 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
3161 and __lll_unlock_wake.
3162 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S:
3163 Include lowlevellock.h.
3164 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
3165 Don't define.
3166 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
3167 pass PSHARED(%rdi) in %ecx to both __lll_lock_wait
3168 and __lll_unlock_wake.
3169 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Include
3170 lowlevellock.h.
3171 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
3172 define.
3173 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Include lowlevellock.h.
3174 (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
3175 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Include
3176 lowlevellock.h.
3177 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
3178 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Include
3179 lowlevellock.h.
3180 (LOCK): Don't define.
3181 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Include
3182 lowlevellock.h.
3183 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
3184 * sysdeps/unix/sysv/linux/sparc/internaltypes.h: New file.
3185 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_destroy.c: New file.
3186 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_init.c: New file.
3187 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_wait.c: New file.
3188 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
3189 (__lll_lock_wait_private): New function.
3190 (__lll_lock_wait, __lll_timedlock_wait): Add private argument, pass
3191 it to lll_futex_*wait. Don't compile in for libc.so.
3192 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c:
3193 Remove.
3194 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c
3195 (struct sparc_pthread_barrier): Remove.
3196 (pthread_barrier_wait): Use union sparc_pthread_barrier instead of
3197 struct sparc_pthread_barrier. Pass
3198 ibarrier->s.pshared ? LLL_SHARED : LLL_PRIVATE to lll_{,un}lock
3199 and lll_futex_wait macros.
3200 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
3201 Remove.
3202 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
3203 Include sparc pthread_barrier_wait.c instead of generic one.
3204
6f59d56e
UD
32052007-07-30 Jakub Jelinek <jakub@redhat.com>
3206
1475e201
UD
3207 * tst-rwlock14.c (do_test): Avoid warnings on 32-bit arches.
3208
6f59d56e
UD
3209 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
3210 (pthread_rwlock_timedrdlock): Copy futex retval to %esi rather than
3211 %ecx.
3212 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
3213 (pthread_rwlock_timedwrlock): Likewise.
3214 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
3215 (__pthread_rwlock_unlock): Fix MUTEX != 0 args to __lll_*.
3216
558f0300
JJ
32172007-07-31 Jakub Jelinek <jakub@redhat.com>
3218
3219 * sysdeps/sparc/tls.h (tcbhead_t): Add private_futex field.
3220
cedb4109
UD
32212007-07-26 Jakub Jelinek <jakub@redhat.com>
3222
3223 * tst-locale2.c (useless): Add return statement.
3224
085a4412
UD
32252007-07-24 Jakub Jelinek <jakub@redhat.com>
3226
3227 * allocatestack.c (__nptl_setxid, __wait_lookup_done): Replace
3228 lll_private_futex_* (*) with lll_futex_* (*, LLL_PRIVATE).
3229 * pthread_create.c (start_thread): Likewise.
3230 * init.c (sighandler_setxid): Likewise.
3231 * sysdeps/alpha/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3232 * sysdeps/ia64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3233 * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3234 * sysdeps/s390/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3235 * sysdeps/powerpc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3236 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3237 * sysdeps/sparc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3238 * sysdeps/sh/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3239 * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY, AIO_MISC_WAIT):
3240 Likewise.
3241 * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY, GAI_MISC_WAIT):
3242 Likewise.
3243 * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
3244 Likewise.
3245 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_waitzero,
3246 __rtld_notify): Likewise.
3247 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Likewise.
3248 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (clear_once_control,
3249 __pthread_once): Likewise.
3250 * sysdeps/unix/sysv/linux/alpha/pthread_once.c (clear_once_control,
3251 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
3252 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_PRIVATE_FLAG,
3253 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
3254 (lll_futex_wait): Add private argument, define as wrapper around
3255 lll_futex_timed_wait.
3256 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
3257 use __lll_private_flag macro.
3258 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
3259 __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
3260 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (clear_once_control,
3261 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
3262 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_PRIVATE_FLAG,
3263 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
3264 (lll_futex_wait): Add private argument, define as wrapper around
3265 lll_futex_timed_wait.
3266 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
3267 use __lll_private_flag macro.
3268 (__lll_mutex_unlock, __lll_robust_mutex_unlock, lll_wait_tid,
3269 __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
3270 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
3271 Define.
3272 (lll_futex_timed_wait, lll_futex_wake): Use it.
3273 (lll_private_futex_wait, lll_private_futex_timed_wait,
3274 lll_private_futex_wake): Removed.
3275 * sysdeps/unix/sysv/linux/s390/pthread_once.c (clear_once_control,
3276 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
3277 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_PRIVATE_FLAG,
3278 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
3279 (lll_futex_wait): Add private argument, define as wrapper around
3280 lll_futex_timed_wait.
3281 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
3282 use __lll_private_flag macro.
3283 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
3284 lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
3285 to lll_futex_*.
3286 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
3287 (lll_private_futex_wait, lll_private_futex_timed_wait,
3288 lll_private_futex_wake): Removed.
3289 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_private_flag):
3290 Fix !__ASSUME_PRIVATE_FUTEX non-constant private case.
3291 (lll_private_futex_wait, lll_private_futex_timed_wait,
3292 lll_private_futex_wake): Removed.
3293 * sysdeps/unix/sysv/linux/sparc/pthread_once.c (clear_once_control,
3294 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
3295 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_PRIVATE_FLAG,
3296 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
3297 (lll_futex_wait): Add private argument, define as wrapper around
3298 lll_futex_timed_wait.
3299 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
3300 use __lll_private_flag macro.
3301 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
3302 lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
3303 to lll_futex_*.
3304 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (__lll_private_flag):
3305 Define.
3306 (lll_futex_timed_wait, lll_futex_wake): Use it.
3307 (lll_private_futex_wait, lll_private_futex_timed_wait,
3308 lll_private_futex_wake): Removed.
3309
ef0af159
JJ
33102007-07-27 Jakub Jelinek <jakub@redhat.com>
3311
3312 * sysdeps/sparc/tls.h (tcbhead_t): Move gscope_flag to the end
3313 of the structure for sparc32.
3314
33152007-07-26 Aurelien Jarno <aurelien@aurel32.net>
3316
3317 * sysdeps/sparc/tls.h (tcbhead_t): Add gscope_flag.
3318
eb4f5909
UD
33192007-07-23 Ulrich Drepper <drepper@redhat.com>
3320
3321 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
3322 code used when private futexes are assumed.
3323 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3324 Likewise.
3325
b5f13526
UD
33262007-07-23 Jakub Jelinek <jakub@redhat.com>
3327
3328 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
3329 (__lll_private_flag): Define.
3330 (lll_futex_wait): Define as a wrapper around lll_futex_timed_wait.
3331 (lll_futex_timed_wait, lll_futex_wake, lll_futex_wake_unlock): Use
3332 __lll_private_flag.
3333 (lll_private_futex_wait, lll_private_futex_timedwait,
3334 lll_private_futex_wake): Define as wrapper around non-_private
3335 macros.
3336 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
3337 (__lll_private_flag): Define.
3338 (lll_futex_timed_wait, lll_futex_wake): Use __lll_private_flag.
3339 (lll_private_futex_wait, lll_private_futex_timedwait,
3340 lll_private_futex_wake): Define as wrapper around non-_private
3341 macros.
3342
eb7721f2
UD
33432007-07-10 Steven Munroe <sjmunroe@us.ibm.com>
3344
3345 * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Add LLL_SHARED
3346 parameter to lll_futex_wait call.
3347 * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
3348
3349 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
3350 Replace lll_futex_wait with lll_private_futex_wait.
3351 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
3352 Add LLL_SHARED parameter to lll_futex_wake().
3353
3354 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define LLL_PRIVATE
3355 LLL_SHARED, lll_private_futex_wait, lll_private_futex_timed_wait and
3356 lll_private_futex_wake.
3357 (lll_futex_wait): Add private parameter. Adjust FUTEX_PRIVATE_FLAG
3358 bit from private parm before syscall.
3359 (lll_futex_timed_wait): Likewise.
3360 (lll_futex_wake): Likewise.
3361 (lll_futex_wake_unlock): Likewise.
3362 (lll_mutex_unlock): Add LLL_SHARED parm to lll_futex_wake call.
3363 (lll_robust_mutex_unlock): Likewise.
3364 (lll_mutex_unlock_force): Likewise.
3365 (lll_wait_tid): Add LLL_SHARED parm to lll_futex_wait call.
3366
defc45f2
UD
33672007-07-23 Ulrich Drepper <drepper@redhat.com>
3368
3369 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
3370 compilation when unconditionally using private futexes.
3371 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
3372 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3373 Likewise.
3374 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
3375 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
3376
087722b8
UD
33772007-07-17 Jakub Jelinek <jakub@redhat.com>
3378
3379 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock_clear_flags2):
3380 Define.
3381
765c6b0c
UD
33822007-07-06 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3383
3384 * sysdeps/sh/tls.h: Include stdlib.h, list.h, sysdep.h and
3385 kernel-features.h.
3386
7d9d8bd1
RM
33872007-05-16 Roland McGrath <roland@redhat.com>
3388
3389 * init.c (__nptl_initial_report_events): New variable.
3390 (__pthread_initialize_minimal_internal): Initialize pd->report_events
3391 to that.
3392
a4915df2
UD
33932007-06-22 Jakub Jelinek <jakub@redhat.com>
3394
3395 * pthread_getattr_np.c (pthread_getattr_np): Clear cpuset and
3396 cpusetsize if pthread_getaffinity_np failed with ENOSYS.
3397
e4eb675d
UD
33982007-06-19 Ulrich Drepper <drepper@redhat.com>
3399
3400 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Remove mrlock
3401 implementation.
3402
ae1ad3ae
UD
34032007-06-18 Ulrich Drepper <drepper@redhat.com>
3404
3405 * pthreadP.h: Define PTHREAD_MUTEX_TYPE.
3406 * phtread_mutex_lock.c: Use PTHREAD_MUTEX_TYPE.
3407 * pthread_mutex_timedlock.c: Likewise.
3408 * pthread_mutex_trylock.c: Likewise.
3409 * pthread_mutex_unlock.c: Likewise.
3410
89074592
UD
34112007-06-17 Andreas Schwab <schwab@suse.de>
3412
3413 * sysdeps/pthread/pt-initfini.c: Tell gcc about the nonstandard
3414 sections.
3415
d4201cc4
UD
34162007-06-17 Ulrich Drepper <drepper@redhat.com>
3417
3418 * allocatestack.c (allocate_stack): Make code compile if
3419 __ASSUME_PRIVATE_FUTEX is set.
3420
339dbf0e
UD
34212007-06-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3422
3423 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S:
3424 (__pthread_rwlock_rdlock): Don't use non SH-3/4 instruction.
3425 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S:
3426 (__pthread_rwlock_wrlock): Likewise.
3427 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
3428 (pthread_rwlock_timedrdlock): Likewise.
3429 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
3430 (pthread_rwlock_timedwrlock): Likewise.
3431 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S:
3432 (__pthread_rwlock_unlock): Likewise.
3433
34342007-06-10 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3435
3436 * sysdeps/sh/tcb-offsets.sym: Add PRIVATE_FUTEX.
3437 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Include endian.h.
3438 Split __flags into __flags, __shared, __pad1 and __pad2.
3439 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Use private
b42a214c 3440 futexes if they are available.
339dbf0e 3441 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Adjust so that change
b42a214c 3442 in libc-lowlevellock.S allow using private futexes.
339dbf0e
UD
3443 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
3444 FUTEX_PRIVATE_FLAG. Add additional parameter to lll_futex_wait,
3445 lll_futex_timed_wait and lll_futex_wake. Change lll_futex_wait
3446 to call lll_futex_timed_wait. Add lll_private_futex_wait,
3447 lll_private_futex_timed_wait and lll_private_futex_wake.
3448 (lll_robust_mutex_unlock): Fix typo.
3449 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Use private
b42a214c 3450 field in futex command setup.
339dbf0e
UD
3451 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Use
3452 COND_NWAITERS_SHIFT instead of COND_CLOCK_BITS.
3453 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
3454 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use private futexes
b42a214c 3455 if they are available. Remove clear_once_control.
339dbf0e
UD
3456 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Use private
3457 futexes if they are available.
3458 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
3459 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
3460 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
3461 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
3462 * sysdeps/unix/sysv/linux/sh/sem_post.S: Add private futex support.
3463 Wake only when there are waiters.
3464 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add private futex
3465 support. Indicate that there are waiters. Remove unnecessary
b42a214c 3466 extra cancellation test.
339dbf0e
UD
3467 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise. Removed
3468 left-over duplication of __sem_wait_cleanup.
3469
26f56c1c
UD
34702007-06-07 Ulrich Drepper <drepper@redhat.com>
3471
3472 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Add additional
3473 parameter to lll_futex_wait, lll_futex_timed_wait, and
3474 lll_futex_wake. Change lll_futex_wait to call lll_futex_timed_wait.
3475 Add lll_private_futex_wait, lll_private_futex_timed_wait, and
3476 lll_private_futex_wake.
3477 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
3478 * allocatestack.c: Adjust use of lll_futex_* macros.
3479 * init.c: Likewise.
3480 * lowlevellock.h: Likewise.
3481 * pthread_barrier_wait.c: Likewise.
3482 * pthread_cond_broadcast.c: Likewise.
3483 * pthread_cond_destroy.c: Likewise.
3484 * pthread_cond_signal.c: Likewise.
3485 * pthread_cond_timedwait.c: Likewise.
3486 * pthread_cond_wait.c: Likewise.
3487 * pthread_create.c: Likewise.
3488 * pthread_mutex_lock.c: Likewise.
3489 * pthread_mutex_setprioceiling.c: Likewise.
3490 * pthread_mutex_timedlock.c: Likewise.
3491 * pthread_mutex_unlock.c: Likewise.
3492 * pthread_rwlock_timedrdlock.c: Likewise.
3493 * pthread_rwlock_timedwrlock.c: Likewise.
3494 * pthread_rwlock_unlock.c: Likewise.
3495 * sysdeps/alpha/tls.h: Likewise.
3496 * sysdeps/i386/tls.h: Likewise.
3497 * sysdeps/ia64/tls.h: Likewise.
3498 * sysdeps/powerpc/tls.h: Likewise.
3499 * sysdeps/pthread/aio_misc.h: Likewise.
3500 * sysdeps/pthread/gai_misc.h: Likewise.
3501 * sysdeps/s390/tls.h: Likewise.
3502 * sysdeps/sh/tls.h: Likewise.
3503 * sysdeps/sparc/tls.h: Likewise.
3504 * sysdeps/unix/sysv/linux/fork.c: Likewise.
3505 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
3506 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: Likewise.
3507 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Likewise.
3508 * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
3509 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
3510 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
3511 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
3512 * sysdeps/unix/sysv/linux/sparc/pthread_once.c: Likewise.
3513 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c:
3514 Likewise.
3515 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: Likewise.
3516 * sysdeps/x86_64/tls.h: Likewise.
3517
ee5d5755
UD
35182007-05-29 Ulrich Drepper <drepper@redhat.com>
3519
b03b0c29
UD
3520 * pthread_getattr_np.c: No need to install a cancellation handler,
3521 this is no cancellation point.
3522 * pthread_getschedparam.c: Likewise.
3523 * pthread_setschedparam.c: Likewise.
3524 * pthread_setschedprio.c: Likewise.
3525 * sysdeps/unix/sysv/linux/lowlevellock.c: Remove all traces of
3526 lll_unlock_wake_cb.
3527 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
3528 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
3529 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
3530 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
3531 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
3532 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
3533 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
3534 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
3535 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
3536 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: Likewise.
3537 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
3538 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
fc3f0ccb 3539
0154658d
UD
3540 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Checking
3541 whether there are more than one thread makes no sense here since
3542 we only call the slow path if the locks are taken.
3543 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Likewise.
3544
ee5d5755
UD
3545 * sysdeps/unix/sysv/linux/internaltypes.h: Introduce
3546 COND_NWAITERS_SHIFT.
3547 * pthread_cond_destroy.c: Use COND_NWAITERS_SHIFT instead of
3548 COND_CLOCK_BITS.
3549 * pthread_cond_init.c: Likewise.
3550 * pthread_cond_timedwait.c: Likewise.
3551 * pthread_cond_wait.c: Likewise.
3552 * pthread_condattr_getclock.c: Likewise.
3553 * pthread_condattr_setclock.c: Likewise.
3554 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Likewise.
3555 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3556 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
3557 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3558 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3559
991fa82b
UD
35602007-05-28 Jakub Jelinek <jakub@redhat.com>
3561
40f57573
UD
3562 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c: Include
3563 unistd.h.
3564
991fa82b
UD
3565 * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Use explicit
3566 insn suffix.
3567 (THREAD_GSCOPE_GET_FLAG): Remove.
3568 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Remove.
3569 * allocatestack.c (__wait_lookup_done): Revert 2007-05-24
3570 changes.
3571 * sysdeps/powerpc/tls.h (tcbhead_t): Remove gscope_flag.
3572 (THREAD_GSCOPE_GET_FLAG): Remove.
3573 (THREAD_GSCOPE_RESET_FLAG): Use THREAD_SELF->header.gscope_flag
3574 instead of THREAD_GSCOPE_GET_FLAG.
3575 (THREAD_GSCOPE_SET_FLAG): Likewise. Add atomic_write_barrier after
3576 it.
3577 * sysdeps/s390/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
3578 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
3579 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
3580 THREAD_GSCOPE_WAIT): Define.
3581 * sysdeps/sparc/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
3582 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
3583 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
3584 THREAD_GSCOPE_WAIT): Define.
3585 * sysdeps/sh/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
3586 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
3587 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
3588 THREAD_GSCOPE_WAIT): Define.
3589 * sysdeps/ia64/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
3590 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
3591 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
3592 THREAD_GSCOPE_WAIT): Define.
3593
35942007-05-24 Richard Henderson <rth@redhat.com>
3595
3596 * descr.h (struct pthread): Add header.gscope_flag.
3597 * sysdeps/alpha/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
3598 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
3599 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
3600 THREAD_GSCOPE_WAIT): Define.
3601
e59660bc
UD
36022007-05-27 Ulrich Drepper <drepper@redhat.com>
3603
3604 * init.c: Make it compile with older kernel headers.
3605
3606 * tst-initializers1.c: Show through exit code which test failed.
3607
3608 * pthread_rwlock_init.c: Also initialize __shared field.
3609 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Split __flags
3610 element in rwlock structure into four byte elements. One of them is
3611 the new __shared element.
3612 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h [__WORDSIZE=32]:
3613 Likewise.
cd0dbd89 3614 [__WORDSIZE=64]: Renamed __pad1 element int rwlock structure to
e59660bc
UD
3615 __shared, adjust names of other padding elements.
3616 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3617 * sysdeps/pthread/pthread.h: Adjust rwlock initializers.
3618 * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: Add PSHARED.
3619 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define
3620 FUTEX_PRIVATE_FLAG.
3621 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Change main
3622 futex to use private operations if possible.
3623 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
3624 Likewise.
3625 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3626 Likewise.
3627 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
3628 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
50f1dec5
UD
3629 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
3630 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
3631 Likewise.
3632 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
3633 Likewise.
3634 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
3635 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
e59660bc 3636
d8ff3792
UD
36372007-05-26 Ulrich Drepper <drepper@redhat.com>
3638
546346b6
UD
3639 * pthreadP.h (PTHREAD_RWLOCK_PREFER_READER_P): Define.
3640 * pthread_rwlock_rdlock.c: Use PTHREAD_RWLOCK_PREFER_READER_P.
3641 * pthread_rwlock_timedrdlock.c: Likewise.
3642 * pthread_rwlock_tryrdlock.c: Likewise.
3643
a2dd3360
UD
3644 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S (sem_trywait): Tiny
3645 optimization.
3646
6df7ffad
UD
3647 * sysdeps/unix/sysv/linux/sem_wait.c: Add missing break.
3648 * sysdeps/unix/sysv/linux/sem_timedwait.c: Removed left-over
3649 duplication of __sem_wait_cleanup.
3650
3651 * allocatestack.c: Revert last change.
3652 * init.c: Likewise.
3653 * sysdeps/i386/tls.h: Likewise.
3654 * sysdeps/x86_64/tls.h: Likewise.
3655 * descr.h [TLS_DTV_AT_TP] (struct pthread): Add private_futex field to
3656 header structure.
3657 * sysdeps/powerpc/tcb-offsets.sym: Add PRIVATE_FUTEX_OFFSET.
3658
d8ff3792
UD
3659 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_barrier):
3660 Add private field.
3661 * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: Add PRIVATE definition.
3662 * pthread_barrier_init.c: Set private flag if pshared and private
3663 futexes are supported.
3664 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Use
3665 private field in futex command setup.
3666 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
3667
3d2dd6ca
UD
36682007-05-25 Ulrich Drepper <drepper@redhat.com>
3669
42e6c665
UD
3670 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Add private futex
3671 support.
3672 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
3673 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
3674 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
3675 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
3676 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
3677
3d2dd6ca
UD
3678 * semaphoreP.h: Declare __old_sem_init and __old_sem_wait.
3679 * sem_init.c (__new_sem_init): Rewrite to initialize all three
3680 fields in the structure.
3681 (__old_sem_init): New function.
3682 * sem_open.c: Initialize all fields of the structure.
3683 * sem_getvalue.c: Adjust for renamed element.
3684 * sysdeps/unix/sysv/linux/Makefile [subdir=nptl]
3685 (gen-as-const-headers): Add structsem.sym.
3686 * sysdeps/unix/sysv/linux/structsem.sym: New file.
3687 * sysdeps/unix/sysv/linux/internaltypes.h: Rename struct sem to
3688 struct new_sem. Add struct old_sem.
3689 * sysdeps/unix/sysv/linux/sem_post.c: Wake only when there are waiters.
3690 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
3691 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
3692 * sysdeps/unix/sysv/linux/sem_wait.c: Indicate that there are waiters.
3693 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
3694 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
3695 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
3696 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
3697 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
3698 * Makefile (tests): Add tst-sem10, tst-sem11, tst-sem12.
3699 * tst-sem10.c: New file.
3700 * tst-sem11.c: New file.
3701 * tst-sem12.c: New file.
3702 * tst-typesizes.c: Test struct new_sem and struct old_sem instead
3703 of struct sem.
3704
20a4d722
JJ
37052007-05-25 Ulrich Drepper <drepper@redhat.com>
3706 Jakub Jelinek <jakub@redhat.com>
3707
3708 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
3709 Move __pthread_enable_asynccancel right before futex syscall.
3710 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
3711 Likewise.
3712
37132007-05-24 Jakub Jelinek <jakub@redhat.com>
86acd596
UD
3714
3715 * sysdeps/i386/tls.h (THREAD_SET_PRIVATE_FUTEX,
3716 THREAD_COPY_PRIVATE_FUTEX): Define.
3717 * sysdeps/x86_64/tls.h (THREAD_SET_PRIVATE_FUTEX,
3718 THREAD_COPY_PRIVATE_FUTEX): Define.
3719 * allocatestack.c (allocate_stack): Use THREAD_COPY_PRIVATE_FUTEX.
3720 * init.c (__pthread_initialize_minimal_internal): Use
3721 THREAD_SET_PRIVATE_FUTEX.
0a54ab53
UD
3722
3723 * sysdeps/powerpc/tls.h (tcbhead_t): Add gscope_flag.
3724 (THREAD_GSCOPE_FLAG_UNUSED, THREAD_GSCOPE_FLAG_USED,
3725 THREAD_GSCOPE_FLAG_WAIT): Define.
3726 (THREAD_GSCOPE_GET_FLAG, THREAD_GSCOPE_SET_FLAG,
3727 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_WAIT): Define.
3728 * sysdeps/i386/tls.h (THREAD_GSCOPE_WAIT): Don't use
3729 PTR_DEMANGLE.
3730 (THREAD_GSCOPE_GET_FLAG): Define.
3731 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Define.
3732 * allocatestack.c (__wait_lookup_done): Use THREAD_GSCOPE_GET_FLAG
3733 instead of ->header.gscope_flag directly.
3734
5a8075b1
UD
37352007-05-23 Ulrich Drepper <drepper@redhat.com>
3736
3737 * init.c (__pthread_initialize_minimal_internal): Check whether
3738 private futexes are available.
3739 * allocatestack.c (allocate_stack): Copy private_futex field from
3740 current thread into the new stack.
3741 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Use private
3742 futexes if they are available.
3743 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise
3744 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Adjust so that change
3745 in libc-lowlevellock.S allow using private futexes.
3746 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
3747 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
3748 FUTEX_PRIVATE_FLAG.
3749 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
3750 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use private futexes
3751 if they are available.
3752 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
3753 * sysdeps/x86_64/tcb-offsets.sym: Add PRIVATE_FUTEX.
3754 * sysdeps/i386/tcb-offsets.sym: Likewise.
3755 * sysdeps/x86_64/tls.h (tcbhead_t): Add private_futex field.
3756 * sysdeps/i386/tls.h (tcbhead_t): Likewise.
3757
6d59823c
UD
37582007-05-21 Ulrich Drepper <drepper@redhat.com>
3759
3760 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
3761 Remove ptr_wait_lookup_done again.
3762 * init.c (pthread_functions): Don't add .ptr_wait_lookup_done here.
3763 (__pthread_initialize_minimal_internal): Initialize
3764 _dl_wait_lookup_done pointer in _rtld_global directly.
3765 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
3766 Remove code to code _dl_wait_lookup_done.
3767 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_WAIT): The pointer is not
3768 encrypted for now.
3769
2c9718f3
JJ
37702007-05-21 Jakub Jelinek <jakub@redhat.com>
3771
3772 * tst-robust9.c (do_test): Don't fail if ENABLE_PI and
3773 pthread_mutex_init failed with ENOTSUP.
3774
df94b641
UD
37752007-05-19 Ulrich Drepper <drepper@redhat.com>
3776
3777 * allocatestack.c (__wait_lookup_done): New function.
3778 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
3779 Add ptr_wait_lookup_done.
3780 * init.c (pthread_functions): Initialize .ptr_wait_lookup_done.
3781 * pthreadP.h: Declare __wait_lookup_done.
3782 * sysdeps/i386/tls.h (tcbhead_t): Add gscope_flag.
3783 Define macros to implement reference handling of global scope.
3784 * sysdeps/x86_64/tls.h: Likewise.
3785 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
3786 Initialize GL(dl_wait_lookup_done).
3787
bec51a30
UD
37882007-05-17 Ulrich Drepper <drepper@redhat.com>
3789
113ad5fc
UD
3790 [BZ #4512]
3791 * pthread_mutex_lock.c: Preserve FUTEX_WAITERS bit when dead owner
3792 is detected.
3793 * pthread_mutex_timedlock.c: Likewise.
3794 * pthread_mutex_trylock.c: Likewise.
3795 Patch in part by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
3796
3797 * Makefile (tests): Add tst-robust9 and tst-robustpi9.
3798 * tst-robust9.c: New file.
3799 * tst-robustpi9.c: New file.
3800
bec51a30
UD
3801 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Remove
3802 unnecessary extra cancellation test.
3803
83d87915
UD
38042007-05-14 Ulrich Drepper <drepper@redhat.com>
3805
83d87915
UD
3806 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Remove unnecessary
3807 extra cancellation test.
3808 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
3809
3771196d
UD
38102007-05-10 Ulrich Drepper <drepper@redhat.com>
3811
341c566f
UD
3812 * descr.h (struct pthread): Rearrange members to fill hole in
3813 64-bit layout.
3814
3771196d
UD
3815 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
3816 (__pthread_setaffinity_new): If syscall was successful and
3817 RESET_VGETCPU_CACHE is defined, use it before returning.
3818 * sysdeps/unix/sysv/linux/x86_64/pthread_setaffinity.c: New file.
3819
7d29b542
JJ
38202007-05-10 Jakub Jelinek <jakub@redhat.com>
3821
3822 [BZ #4455]
3823 * tst-align2.c: Include stackinfo.h.
3824 * tst-getpid1.c: Likewise.
3825
16105fe0
UD
38262007-05-02 Carlos O'Donell <carlos@systemhalted.org>
3827
29c113f0
UD
3828 [BZ #4455]
3829 * tst-align2.c (do_test): Add _STACK_GROWS_UP case.
3830 * tst-getpid1.c (do_test): Likewise.
3831
16105fe0
UD
3832 [BZ #4456]
3833 * allocatestack.c (change_stack_perm): Add _STACK_GROWS_UP case.
3834 (allocate_stack): Likewise.
3835
6780bc44
UD
38362007-05-07 Ulrich Drepper <drepper@redhat.com>
3837
3838 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
3839 (__lll_robust_lock_wait): Fix race caused by reloading of futex value.
3840 (__lll_robust_timedlock_wait): Likewise.
3841 Reported by Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>.
3842
aa75f64c
UD
38432007-05-06 Mike Frysinger <vapier@gentoo.org>
3844
15eca720 3845 [BZ #4465]
aa75f64c
UD
3846 * tst-cancel-wrappers.sh: Set C["fdatasync"] to 1.
3847 * tst-cancel4.c (tf_fdatasync): New test.
3848
f672076e
UD
38492007-04-27 Ulrich Drepper <drepper@redhat.com>
3850
1bb5f5a1
UD
3851 [BZ #4392]
3852 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Treat error
3853 check mutexes like normal mutexes.
3854
f672076e
UD
3855 [BZ #4306]
3856 * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
3857 Initialize the whole sigevent structure to appease valgrind.
3858
bce20b9a
UD
38592007-04-25 Ulrich Drepper <drepper@redhat.com>
3860
3861 * sysdeps/x86_64/tls.h (tcbhead_t): Add vgetcpu_cache.
3862 * sysdeps/x86_64/tcb-offsets.sym: Add VGETCPU_CACHE_OFFSET.
3863
0c786eac
UD
38642007-04-06 Ulrich Drepper <drepper@redhat.com>
3865
3866 * tst-locale1.c: Avoid warnings.
3867 * tst-locale2.c: Likewise.
3868
e1f0c5bc
UD
38692007-03-19 Steven Munroe <sjmunroe@us.ibm.com>
3870
3871 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
3872 (__lll_robust_trylock): Add MUTEX_HINT_ACQ to lwarx instruction.
3873
965cba04
UD
38742007-03-16 Jakub Jelinek <jakub@redhat.com>
3875
3876 * sysdeps/pthread/bits/libc-lock.h: Use __extern_inline and
3877 __extern_always_inline where appropriate.
3878 * sysdeps/pthread/pthread.h: Likewise.
3879
a5ea509b
RH
38802007-03-13 Richard Henderson <rth@redhat.com>
3881
3882 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Use two
3883 separate cfi regions for the two subsections.
3884
00a1430e
UD
38852007-02-25 Ulrich Drepper <drepper@redhat.com>
3886
3887 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset refcntr in
3888 new thread, don't just decrement it.
3889 Patch by Suzuki K P <suzuki@in.ibm.com>.
3890
63a2f305
UD
38912007-02-21 Ulrich Drepper <drepper@redhat.com>
3892
3893 * sysdeps/pthread/pthread-functions.h: Correct last patch, correct
3894 PTHFCT_CALL definition.
3895
2484468b
UD
38962007-02-18 Ulrich Drepper <drepper@redhat.com>
3897
3898 * sysdeps/pthread/pthread-functions.h: If PTR_DEMANGLE is not
3899 available, don't use it.
3900
5ed61e0f
UD
39012007-02-09 Jakub Jelinek <jakub@redhat.com>
3902
3903 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
3904 (__lll_mutex_timedlock_wait): Use correct pointer when we don't
3905 call into the kernel to delay.
3906
10ccaa5c
UD
39072007-01-18 Ulrich Drepper <drepper@redhat.com>
3908
f8a17855
UD
3909 * tst-initializers1.c: We want to test the initializers as seen
3910 outside of libc, so undefined _LIBC.
3911
10ccaa5c
UD
3912 * pthread_join.c (cleanup): Avoid warning.
3913
ea1533e0
UD
39142007-01-17 Ulrich Drepper <drepper@redhat.com>
3915
1476bce6
UD
3916 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
3917 (__lll_timedwait_tid): Add unwind info.
3918
ea1533e0
UD
3919 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Don't just copy the
3920 function table, mangle the pointers.
3921 * sysdeps/pthread/pthread-functions.h: Define PTHFCT_CALL.
3922 * forward.c: Use PTHFCT_CALL and __libc_pthread_functions_init.
3923 * sysdeps/pthread/bits/libc-lock.h: When using __libc_pthread_functions
3924 demangle pointers before use.
3925 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Use PTHFCT_CALL to
3926 demangle pointer.
3927 * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
3928 * sysdeps/pthread/setxid.h: Likewise.
3929
8980796b
UD
39302007-01-12 Ulrich Drepper <drepper@redhat.com>
3931
3932 * tst-rwlock7.c: Show some more information in case of correct
3933 behavior.
3934
a1d87b5d
UD
39352007-01-11 Ulrich Drepper <drepper@redhat.com>
3936
3937 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
3938 (lll_futex_timed_wait): Undo part of last change, don't negate
3939 return value.
3940
11bf311e 39412007-01-10 Ulrich Drepper <drepper@redhat.com>
66193697 3942
11bf311e
UD
3943 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Cleanups. Define
3944 FUTEX_CMP_REQUEUE and lll_futex_requeue.
66193697 3945
11bf311e 39462006-12-28 David S. Miller <davem@davemloft.net>
14a31e35 3947
11bf311e 3948 * shlib-versions: Fix sparc64 linux target specification.
a744da90 3949
11bf311e 39502007-01-10 Jakub Jelinek <jakub@redhat.com>
a744da90 3951
11bf311e
UD
3952 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
3953 Adjust include path for pthread_barrier_wait.c move.
fc242bef 3954
11bf311e 39552006-12-21 Jakub Jelinek <jakub@redhat.com>
fc242bef 3956
11bf311e
UD
3957 * sysdeps/unix/sysv/linux/pthread_kill.c (pthread_kill): Make sure
3958 tid isn't reread from pd->tid in between ESRCH test and the syscall.
a822d9f4 3959
11bf311e
UD
39602006-12-06 Jakub Jelinek <jakub@redhat.com>
3961
3962 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Handle
3963 6 argument cancellable syscalls.
3964 (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
3965 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO): Handle
3966 6 argument cancellable syscalls.
3967 (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
a822d9f4 3968
66f17705
UD
39692006-12-09 Ulrich Drepper <drepper@redhat.com>
3970
3971 * sysdeps/unix/sysv/linux/rtld-lowlevel.h
3972 (__rtld_mrlock_initialize): Add missing closing parenthesis.
3973
11bf311e
UD
39742006-10-30 Jakub Jelinek <jakub@redhat.com>
3975
3976 * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
3977 __sync_lock_release instead of __sync_lock_release_si.
3978
536e40e2
UD
39792006-10-29 Jakub Jelinek <jakub@redhat.com>
3980
3981 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (RTLD_SINGLE_THREAD_P):
3982 Define.
3983 (SINGLE_THREAD_P): Define to 1 if IS_IN_rtld.
3984 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Likewise.
3985 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
3986 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
3987 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
3988 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
3989 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
3990 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
3991 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
3992 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
3993 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
3994
11bf311e
UD
39952006-10-27 Ulrich Drepper <drepper@redhat.com>
3996
3997 * sysdeps/pthread/pthread_barrier_wait.c: Move to...
3998 * pthread_barrier_wait.c: ...here.
3999 * sysdeps/pthread/pthread_cond_broadcast.c: Move to...
4000 * pthread_cond_broadcast.c: ...here.
4001 * sysdeps/pthread/pthread_cond_signal.c: Move to...
4002 * pthread_cond_signal.c: ...here.
4003 * sysdeps/pthread/pthread_cond_timedwait.c: Move to...
4004 * pthread_cond_timedwait.c: ...here.
4005 * sysdeps/pthread/pthread_cond_wait.c: Move to...
4006 * pthread_cond_wait.c: ...here.
4007 * sysdeps/pthread/pthread_once.c: Move to...
4008 * pthread_once.c: ...here.
4009 * sysdeps/pthread/pthread_rwlock_rdlock.c: Move to...
4010 * pthread_rwlock_rdlock.c: ...here.
4011 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Move to...
4012 * pthread_rwlock_timedrdlock.c: ...here.
4013 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Move to...
4014 * pthread_rwlock_timedwrlock.c: ...here.
4015 * sysdeps/pthread/pthread_rwlock_unlock.c: Move to...
4016 * pthread_rwlock_unlock.c: ...here.
4017 * sysdeps/pthread/pthread_rwlock_wrlock.c: Move to...
4018 * pthread_rwlock_wrlock.c: ...here.
4019 * sysdeps/pthread/pthread_spin_destroy.c: Move to...
4020 * pthread_spin_destroy.c: ...here.
4021 * sysdeps/pthread/pthread_spin_init.c: Move to...
4022 * pthread_spin_init.c: ...here.
4023 * sysdeps/pthread/pthread_spin_unlock.c: Move to...
4024 * pthread_spin_unlock.c: ...here.
4025 * sysdeps/pthread/pthread_getcpuclockid.c: Move to...
4026 * pthread_getcpuclockid.c: ...here.
4027
4028 * init.c: USE_TLS support is now always enabled.
4029 * tst-tls5.h: Likewise.
4030 * sysdeps/alpha/tls.h: Likewise.
4031 * sysdeps/i386/tls.h: Likewise.
4032 * sysdeps/ia64/tls.h: Likewise.
4033 * sysdeps/powerpc/tls.h: Likewise.
4034 * sysdeps/s390/tls.h: Likewise.
4035 * sysdeps/sh/tls.h: Likewise.
4036 * sysdeps/sparc/tls.h: Likewise.
4037 * sysdeps/x86_64/tls.h: Likewise.
4038
006a8f6f 40392006-10-27 Jakub Jelinek <jakub@redhat.com>
c0a777e8
UD
4040
4041 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
4042 __rtld_mrlock_change): Update oldval if atomic compare and exchange
4043 failed.
4044
4045 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
4046 Define to THREAD_SELF->header.multiple_threads.
4047 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
4048 Likewise.
4049 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
4050 Likewise.
4051 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
4052 (SINGLE_THREAD_P): Likewise.
4053 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
4054 (SINGLE_THREAD_P): Likewise.
4055 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
4056 (SINGLE_THREAD_P): Likewise.
4057 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
4058 (SINGLE_THREAD_P): Likewise.
4059 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (SINGLE_THREAD_P):
4060 Likewise.
4061 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
4062 (SINGLE_THREAD_P): Likewise.
4063 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
4064 (SINGLE_THREAD_P): Likewise.
4065 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (SINGLE_THREAD_P):
4066 Likewise.
4067
11bf311e 40682006-10-26 Jakub Jelinek <jakub@redhat.com>
32c075e1 4069
11bf311e
UD
4070 * pthread_attr_setstacksize.c (NEW_VERNUM): Define to GLIBC_2_3_3
4071 by default rather than 2_3_3.
32c075e1 4072
11bf311e 40732006-10-17 Jakub Jelinek <jakub@redhat.com>
32c075e1 4074
11bf311e
UD
4075 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
4076 __rtld_mrlock_unlock, __rtld_mrlock_change, __rtld_mrlock_done): Use
4077 atomic_* instead of catomic_* macros.
4078
40792006-10-12 Ulrich Drepper <drepper@redhat.com>
4080
4081 [BZ #3285]
4082 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add SEM_VALUE_MAX.
4083 * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
4084 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
4085 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
4086 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
4087 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Remove SEM_VALUE_MAX.
4088 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
4089 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
4090 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
4091 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: Likewise.
4092 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
4093 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
4094 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
4095
40962006-10-11 Ulrich Drepper <drepper@redhat.com>
4097
4098 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add support for
4099 cancelable syscalls with six parameters.
4100
4101 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Use catomic_*
4102 operations instead of atomic_*.
32c075e1 4103
11bf311e 41042006-10-09 Ulrich Drepper <drepper@redhat.com>
32c075e1 4105
11bf311e 4106 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: New file..
32c075e1 4107
11bf311e 41082006-10-07 Ulrich Drepper <drepper@redhat.com>
32c075e1 4109
11bf311e
UD
4110 * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: New file.
4111 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstack.c: New file.
4112 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c:
4113 New file.
4114 * pthread_attr_setstack.c: Allow overwriting the version number of the
4115 new symbol.
4116 * pthread_attr_setstacksize.c: Likewise.
4117 (__old_pthread_attr_setstacksize): If STACKSIZE_ADJUST is defined use
4118 it.
4119 * sysdeps/unix/sysv/linux/powerpc/Versions (libpthread): Add
4120 pthread_attr_setstack and pthread_attr_setstacksize to GLIBC_2.6.
fa279678 4121
457b559e
UD
41222006-09-24 Ulrich Drepper <drepper@redhat.com>
4123
4124 [BZ #3251]
4125 * descr.h (ENQUEUE_MUTEX_BOTH): Add cast to avoid warning.
4126 Patch by Petr Baudis.
4127
0466106e
UD
41282006-09-18 Jakub Jelinek <jakub@redhat.com>
4129
4130 * tst-kill4.c (do_test): Explicitly set tf thread's stack size.
4131
4132 * tst-cancel2.c (tf): Loop as long as something was written.
4133
bd6d3b7d
UD
41342006-09-12 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4135
4136 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: For PI
4137 mutexes wake all mutexes.
4138 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Don't increment
4139 WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
4140 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4141
30aa5785
UD
41422006-09-12 Ulrich Drepper <drepper@redhat.com>
4143
4144 * tst-cond22.c (tf): Slight changes to the pthread_cond_wait use
4145 to guarantee the thread is always canceled.
4146
2b6a801e
UD
41472006-09-08 Jakub Jelinek <jakub@redhat.com>
4148
4149 * tst-cond22.c: Include pthread.h instead of pthreadP.h.
4150 Include stdlib.h.
4151 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Only
4152 increase FUTEX if increasing WAKEUP_SEQ. Fix comment typo.
4153 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
4154 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4155 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
bd6d3b7d 4156
346e6ad4
UD
41572006-09-08 Ulrich Drepper <drepper@redhat.com>
4158
4159 [BZ #3123]
4160 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Don't
4161 increment WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
2b6a801e
UD
4162 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
4163 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4164 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
346e6ad4
UD
4165 * Makefile (tests): Add tst-cond22.
4166 * tst-cond22.c: New file.
4167
b051fc44
UD
41682006-09-05 Ulrich Drepper <drepper@redhat.com>
4169
4170 [BZ #3124]
4171 * descr.h (struct pthread): Add parent_cancelhandling.
4172 * sysdeps/pthread/createthread.c (create_thread): Pass parent
4173 cancelhandling value to child.
4174 * pthread_create.c (start_thread): If parent thread was canceled
4175 reset the SIGCANCEL mask.
4176 * Makefile (tests): Add tst-cancel25.
4177 * tst-cancel25.c: New file.
4178
d052233c 41792006-09-05 Jakub Jelinek <jakub@redhat.com>
b42a214c 4180 Ulrich Drepper <drepper@redhat.com>
d052233c
UD
4181
4182 * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY): Don't decrement
4183 counterp if it is already zero.
4184 * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY): Likewise..
4185
cd248c3f 41862006-03-04 Jakub Jelinek <jakub@redhat.com>
b42a214c 4187 Roland McGrath <roland@redhat.com>
cd248c3f
UD
4188
4189 * sysdeps/unix/sysv/linux/i386/lowlevellock.h
4190 (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
4191 LLL_STUB_UNWIND_INFO_3, LLL_STUB_UNWIND_INFO_4): Define.
4192 (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
4193 lll_robust_mutex_cond_lock, lll_mutex_timedlock,
4194 lll_robust_mutex_timedlock, lll_mutex_unlock,
4195 lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
4196 Add _L_*_ symbols around the subsection.
4197 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Add unwind info.
4198 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Likewise.
4199
42002006-03-03 Jakub Jelinek <jakub@redhat.com>
b42a214c 4201 Roland McGrath <roland@redhat.com>
cd248c3f
UD
4202
4203 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
4204 (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
4205 LLL_STUB_UNWIND_INFO_5, LLL_STUB_UNWIND_INFO_6): Define.
4206 (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
4207 lll_robust_mutex_cond_lock, lll_mutex_timedlock,
4208 lll_robust_mutex_timedlock, lll_mutex_unlock,
4209 lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
4210 Add _L_*_ symbols around the subsection.
4211 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Add unwind info.
4212 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
4213
b80770b2
UD
42142006-08-31 Ulrich Drepper <drepper@redhat.com>
4215
4216 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Undo last
4217 change because it can disturb too much existing code. If real hard
4218 reader preference is needed we'll introduce another type.
4219 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
4220 (pthread_rwlock_timedwrlock): Likewise.
4221 * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
4222 Likewise.
4223
bee2df0b
UD
42242006-08-30 Ulrich Drepper <drepper@redhat.com>
4225
4226 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Respect
4227 reader preference.
4228 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
4229 (pthread_rwlock_timedwrlock): Likewise.
4230 * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
4231 Likewise.
4232
d678ebc1
UD
42332006-08-25 Jakub Jelinek <jakub@redhat.com>
4234
4235 * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libpthread):
4236 Only define ifdef SHARED.
4237
ba408f84
UD
42382006-08-23 Ulrich Drepper <drepper@redhat.com>
4239
4240 * allocatestack.c (queue_stack): Move freeing of surplus stacks to...
4241 (free_stacks): ...here.
4242 (__free_stack_cache): New function.
4243 * pthreadP.h: Declare __free_stack_cache.
4244 * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
4245 ptr_freeres.
4246 * init.c (pthread_functions): Initialize ptr_freeres.
4247 * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libptread):
4248 New freeres function.
4249
376e973a
UD
42502006-07-30 Joseph S. Myers <joseph@codesourcery.com>
4251
4252 [BZ #3018]
4253 * Makefile (extra-objs): Add modules to extra-test-objs instead.
4254
2b34af01
UD
42552006-08-20 Ulrich Drepper <drepper@redhat.com>
4256
4257 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
4258 _XOPEN_REALTIME_THREADS.
4259
89c85f87
UD
42602006-08-15 Jakub Jelinek <jakub@redhat.com>
4261
4262 * sysdeps/unix/sysv/linux/clock_settime.c (INTERNAL_VSYSCALL): Use
4263 HAVE_CLOCK_GETRES_VSYSCALL as guard macro rather than
4264 HAVE_CLOCK_GETTIME_VSYSCALL.
4265 (maybe_syscall_settime_cpu): Use plain INTERNAL_VSYSCALL here.
4266
f17efcb4
UD
42672006-08-14 Jakub Jelinek <jakub@redhat.com>
4268
4269 * sysdeps/unix/sysv/linux/bits/posix_opt.h
4270 (_POSIX_THREAD_PRIO_PROTECT): Define to 200112L.
4271 * descr.h (struct priority_protection_data): New type.
4272 (struct pthread): Add tpp field.
4273 * pthreadP.h (PTHREAD_MUTEX_PP_NORMAL_NP,
4274 PTHREAD_MUTEX_PP_RECURSIVE_NP, PTHREAD_MUTEX_PP_ERRORCHECK_NP,
4275 PTHREAD_MUTEX_PP_ADAPTIVE_NP): New enum values.
4276 * pthread_mutex_init.c (__pthread_mutex_init): Handle non-robust
4277 TPP mutexes.
4278 * pthread_mutex_lock.c (__pthread_mutex_lock): Handle TPP mutexes.
4279 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Likewise.
4280 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Likewise.
4281 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Likewise.
4282 * tpp.c: New file.
4283 * pthread_setschedparam.c (__pthread_setschedparam): Handle priority
4284 boosted by TPP.
4285 * pthread_setschedprio.c (pthread_setschedprio): Likewise.
4286 * pthread_mutexattr_getprioceiling.c
4287 (pthread_mutexattr_getprioceiling): If ceiling is 0, ensure it is
4288 in the SCHED_FIFO priority range.
4289 * pthread_mutexattr_setprioceiling.c
4290 (pthread_mutexattr_setprioceiling): Fix prioceiling validation.
4291 * pthread_mutex_getprioceiling.c (pthread_mutex_getprioceiling): Fail
4292 if mutex is not TPP. Ceiling is now in __data.__lock.
4293 * pthread_mutex_setprioceiling.c: Include stdbool.h.
4294 (pthread_mutex_setprioceiling): Fix prioceiling validation. Ceiling
4295 is now in __data.__lock. Add locking.
4296 * pthread_create.c (__free_tcb): Free pd->tpp structure.
4297 * Makefile (libpthread-routines): Add tpp.
4298 (xtests): Add tst-mutexpp1, tst-mutexpp6 and tst-mutexpp10.
4299 * tst-tpp.h: New file.
4300 * tst-mutexpp1.c: New file.
4301 * tst-mutexpp6.c: New file.
4302 * tst-mutexpp10.c: New file.
4303 * tst-mutex1.c (TEST_FUNCTION): Don't redefine if already defined.
4304 * tst-mutex6.c (TEST_FUNCTION): Likewise.
4305
22bb134c
UD
43062006-08-12 Ulrich Drepper <drepper@redhat.com>
4307
4308 [BZ #2843]
4309 * pthread_join.c (pthread_join): Account for self being canceled
4310 when checking for deadlocks.
4311 * tst-join5.c: Cleanups. Allow to be used in tst-join6.
4312 (tf1): Don't print anything after pthread_join returns, this would be
4313 another cancellation point.
4314 (tf2): Likewise.
4315 * tst-join6.c: New file.
4316 * Makefile (tests): Add tst-join6.
4317
f1762c0c
UD
43182006-08-03 Ulrich Drepper <drepper@redhat.com>
4319
9c06eb66
UD
4320 [BZ #2892]
4321 * pthread_setspecific.c (__pthread_setspecific): Check
4322 out-of-range index before checking for unused key.
4323
f1762c0c
UD
4324 * sysdeps/pthread/gai_misc.h: New file.
4325
7bb1b2c9
UD
43262006-08-01 Ulrich Drepper <drepper@redhat.com>
4327
4328 * sysdeps/unix/sysv/linux/i386/smp.h: New file. Old Linux-specific
4329 file. Don't use sysctl.
4330 * sysdeps/unix/sysv/linux/smp.h: Always assume SMP. Archs can
4331 overwrite the file if this is likely not true.
4332
b06e7e9a
UD
43332006-07-31 Daniel Jacobowitz <dan@codesourcery.com>
4334
4335 * allocatestack.c (__reclaim_stacks): Reset the PID on cached stacks.
4336 * Makefile (tests): Add tst-getpid3.
4337 * tst-getpid3.c: New file.
4338
b894c2ea
RM
43392006-07-30 Roland McGrath <roland@redhat.com>
4340
4341 * Makefile (libpthread-routines): Add ptw-sigsuspend.
4342
4343 * sysdeps/unix/sysv/linux/i386/not-cancel.h
4344 (pause_not_cancel): New macro.
4345 (nanosleep_not_cancel): New macro.
4346 (sigsuspend_not_cancel): New macro.
4347 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
4348 nanosleep_not_cancel macro from <not-cancel.h>.
4349 * pthread_mutex_lock.c (__pthread_mutex_lock): Use pause_not_cancel
4350 macro from <not-cancel.h>.
4351
df47504c
UD
43522006-07-28 Ulrich Drepper <drepper@redhat.com>
4353 Jakub Jelinek <jakub@redhat.com>
4354
4355 * descr.h: Change ENQUEUE_MUTEX and DEQUEUE_MUTEX for bit 0
4356 notification of PI mutex. Add ENQUEUE_MUTEX_PI.
4357 * pthreadP.h: Define PTHREAD_MUTEX_PI_* macros for PI mutex types.
4358 * pthread_mutex_setprioceilining.c: Adjust for mutex type name change.
4359 * pthread_mutex_init.c: Add support for priority inheritance mutex.
4360 * pthread_mutex_lock.c: Likewise.
4361 * pthread_mutex_timedlock.c: Likewise.
4362 * pthread_mutex_trylock.c: Likewise.
4363 * pthread_mutex_unlock.c: Likewise.
4364 * sysdeps/pthread/pthread_cond_broadcast.c: For PI mutexes wake
4365 all mutexes.
4366 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.c: Likewise.
4367 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.c: Likewise.
4368 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: New file.
4369 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-header): Add
4370 pthread-pi-defines.sym.
4371 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_LOCK_PI,
4372 FUTEX_UNLOCK_PI, and FUTEX_TRYLOCK_PI.
4373 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
d5ba53f9
UD
4374 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
4375 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
4376 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
4377 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
4378 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
4379 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
df47504c
UD
4380 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
4381 _POSIX_THREAD_PRIO_INHERIT to 200112L.
4382 * tst-mutex1.c: Adjust to allow use in PI mutex test.
4383 * tst-mutex2.c: Likewise.
4384 * tst-mutex3.c: Likewise.
4385 * tst-mutex4.c: Likewise.
4386 * tst-mutex5.c: Likewise.
4387 * tst-mutex6.c: Likewise.
4388 * tst-mutex7.c: Likewise.
4389 * tst-mutex7a.c: Likewise.
4390 * tst-mutex8.c: Likewise.
4391 * tst-mutex9.c: Likewise.
4392 * tst-robust1.c: Likewise.
4393 * tst-robust7.c: Likewise.
4394 * tst-robust8.c: Likewise.
4395 * tst-mutexpi1.c: New file.
4396 * tst-mutexpi2.c: New file.
4397 * tst-mutexpi3.c: New file.
4398 * tst-mutexpi4.c: New file.
4399 * tst-mutexpi5.c: New file.
4400 * tst-mutexpi6.c: New file.
4401 * tst-mutexpi7.c: New file.
4402 * tst-mutexpi7a.c: New file.
4403 * tst-mutexpi8.c: New file.
4404 * tst-mutexpi9.c: New file.
4405 * tst-robust1.c: New file.
4406 * tst-robust2.c: New file.
4407 * tst-robust3.c: New file.
4408 * tst-robust4.c: New file.
4409 * tst-robust5.c: New file.
4410 * tst-robust6.c: New file.
4411 * tst-robust7.c: New file.
4412 * tst-robust8.c: New file.
4413 * Makefile (tests): Add the new tests.
4414
4415 * pthread_create.c (start_thread): Add some casts to avoid warnings.
4416 * pthread_mutex_destroy.c: Remove unneeded label.
4417
f3be81a9
UD
44182006-07-01 Ulrich Drepper <drepper@redhat.com>
4419
4420 * pthread_mutex_init.c (__pthread_mutex_init): Move some
4421 computations to compile time.
4422
c26ca5e1
UD
44232006-06-04 Ulrich Drepper <drepper@redhat.com>
4424
4425 * sysdeps/pthread/pthread.h: Add pthread_equal inline version.
4426
6f8a7dff
UD
44272006-05-15 Ulrich Drepper <drepper@redhat.com>
4428
c26ca5e1 4429 * sysdeps/unix/sysv/linux/fork.h: Mark __fork_handlers as hidden.
6f8a7dff 4430
3d237e42
UD
44312006-05-11 Ulrich Drepper <drepper@redhat.com>
4432
04974d63
UD
4433 * pthread_key_create.c (__pthread_key_create): Do away with
4434 __pthread_keys_lock.
4435
4436 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4437 (__kernel_cpumask_size): Mark as hidden.
4438 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
4439
3d237e42
UD
4440 * sem_open.c (__sem_mappings_lock): Mark as hidden.
4441 * semaphoreP.h (__sem_mappings_lock): Likewise.
4442
790fc6e4
UD
44432006-05-10 Ulrich Drepper <drepper@redhat.com>
4444
4445 * pthread_atfork.c: Mark __dso_handle as hidden.
4446
be434a72
UD
44472006-05-09 Ulrich Drepper <drepper@redhat.com>
4448
4449 [BZ #2644]
4450 * sysdeps/pthread/unwind-forcedunwind.c: Different solution for
4451 the reload problem. Change the one path in pthread_cancel_init
4452 which causes the problem. Force gcc to reload. Simplify callers.
4453 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c
4454 (_Unwind_GetBSP): Undo last patch.
4455
3142b1ac
UD
44562006-05-07 Ulrich Drepper <drepper@redhat.com>
4457
bf3635d3
UD
4458 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: Make sure the
4459 function pointer is reloaded after pthread_cancel_init calls.
3142b1ac
UD
4460
4461 [BZ #2644]
4462 * sysdeps/pthread/unwind-forcedunwind.c: Make sure functions
4463 pointers are reloaded after pthread_cancel_init calls.
4464
27488789
UD
44652006-05-01 Ulrich Drepper <drepper@redhat.com>
4466
4467 * sysdeps/pthread/allocalim.h (__libc_use_alloca): Mark with
4468 __always_inline.
4469
a6375d11
UD
44702006-04-27 Ulrich Drepper <drepper@redhat.com>
4471
4472 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
4473 Allocate new object which is passed to timer_sigev_thread so that
4474 the timer can be deleted before the new thread is scheduled.
4475
16a1d952
RM
44762006-04-26 Roland McGrath <roland@redhat.com>
4477
4478 * sysdeps/x86_64/tls.h: Include <asm/prctl.h> inside [! __ASSEMBLER__].
4479
7960f2a7
UD
44802006-04-08 Ulrich Drepper <drepper@redhat.com>
4481
ab9a9ff8
UD
4482 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove branch predicion
4483 suffix for conditional jumps.
4484 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
4485 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
4486 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
4487 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
4488 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
4489 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
4490
7960f2a7
UD
4491 * init.c (sigcancel_handler): Compare with correct PID even if the
4492 thread is in the middle of a fork call.
4493 (sighandler_setxid): Likewise.
4494 Reported by Suzuki K P <suzuki@in.ibm.com> .
4495
2035d91c
UD
44962006-04-07 Jakub Jelinek <jakub@redhat.com>
4497
4498 * pthreadP.h (FUTEX_TID_MASK): Sync with kernel.
4499
0292b0dd
UD
45002006-04-06 Ulrich Drepper <drepper@redhat.com>
4501
4502 * pthread_getattr_np.c (pthread_getattr_np): Close fp if getrlimit
4503 fails [Coverity CID 105].
4504
6738b3c0
UD
45052006-04-05 Ulrich Drepper <drepper@redhat.com>
4506
4507 * sysdeps/pthread/pthread.h: Add nonnull attributes.
4508
359157a5
RM
45092006-04-03 Steven Munroe <sjmunroe@us.ibm.com>
4510
4511 [BZ #2505]
4512 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h [_ARCH_PWR4]:
4513 Define __lll_rel_instr using lwsync.
4514
cd277b2d
UD
45152006-03-27 Ulrich Drepper <drepper@redhat.com>
4516
4517 * allocatestack.c (allocate_stack): Always initialize robust_head.
4518 * descr.h: Define struct robust_list_head.
4519 (struct pthread): Use robust_list_head in robust mutex list definition.
4520 Adjust ENQUEUE_MUTEX and DEQUEUE_MUTEX.
4521 * init.c [!__ASSUME_SET_ROBUST_LIST] (__set_robust_list_avail): Define.
4522 (__pthread_initialize_minimal_internal): Register robust_list with
4523 the kernel.
4524 * pthreadP.h: Remove PRIVATE_ from PTHREAD_MUTEX_ROBUST_* names.
4525 Declare __set_robust_list_avail.
4526 * pthread_create.c (start_thread): Register robust_list of new thread.
4527 [!__ASSUME_SET_ROBUST_LIST]: If robust_list is not empty wake up
4528 waiters.
4529 * pthread_mutex_destroy.c: For robust mutexes don't look at the
4530 number of users, it's unreliable.
4531 * pthread_mutex_init.c: Allow use of pshared robust mutexes if
4532 set_robust_list syscall is available.
4533 * pthread_mutex_consistent.c: Adjust for PTHREAD_MUTEX_ROBUST_* rename.
4534 * pthread_mutex_lock.c: Simplify robust mutex code a bit.
4535 Set robust_head.list_op_pending before trying to lock a robust mutex.
4536 * pthread_mutex_timedlock.c: Likewise.
4537 * pthread_mutex_trylock.c: Likewise.
4538 * pthread_mutex_unlock.c: Likewise for unlocking.
4539 * Makefile (tests): Add tst-robust8.
4540 * tst-robust8.c: New file.
4541
facac085
UD
45422006-03-08 Andreas Schwab <schwab@suse.de>
4543
4544 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h
4545 (DL_SYSINFO_IMPLEMENTATION): Add missing newline.
4546
7ccbe1a1
RM
45472006-03-05 Roland McGrath <roland@redhat.com>
4548
4549 * configure (libc_add_on): Disable add-on when $add_ons_automatic = yes
4550 and $config_os doesn't match *linux*.
4551
043cee37
RM
45522006-03-05 David S. Miller <davem@sunset.davemloft.net>
4553
4554 * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S:
4555 Use __syscall_error.
4556 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
4557 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: Likewise.
4558 * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: Likewise.
4559 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
4560 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: Likewise.
4561 * sysdeps/unix/sysv/linux/sparc/Makefile: New file.
4562
88bce79e
UD
45632006-03-02 Ulrich Drepper <drepper@redhat.com>
4564
4565 * sysdeps/unix/sysv/linux/aio_misc.h: Various cleanups.
4566
672ec465
UD
45672006-03-01 Ulrich Drepper <drepper@redhat.com>
4568
4569 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
4570 (__lll_robust_lock_wait): Also set FUTEX_WAITERS bit if we got the
4571 mutex.
4572 (__lll_robust_timedlock_wait): Likewise.
4573 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S
4574 (__lll_robust_lock_wait): Likewise.
4575 (__lll_robust_timedlock_wait): Likewise.
4576 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
4577 (__lll_robust_lock_wait): Likewise.
4578 (__lll_robust_timedlock_wait): Likewise.
4579
c4a4875d
RM
45802006-03-01 Jakub Jelinek <jakub@redhat.com>
4581
4582 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_robust_mutex_dead,
4583 lll_robust_mutex_trylock, lll_robust_mutex_lock,
4584 lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
4585 lll_robust_mutex_unlock): Define.
4586 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
4587
3192fd8e
RM
45882006-02-28 H.J. Lu <hongjiu.lu@intel.com>
4589
4590 * sysdeps/unix/sysv/linux/ia64/clone2.S: Include <clone2.S>
4591 instead of <clone.S>.
4592
14d44b19
RM
45932006-02-27 Jakub Jelinek <jakub@redhat.com>
4594
4595 * Makefile (libpthread-routines): Add
4596 pthread_mutexattr_[sg]etprotocol, pthread_mutexattr_[sg]etprioceiling
4597 and pthread_mutex_[sg]etprioceiling.
4598 * Versions (GLIBC_2.4): Export pthread_mutexattr_getprotocol,
4599 pthread_mutexattr_setprotocol, pthread_mutexattr_getprioceiling,
4600 pthread_mutexattr_setprioceiling, pthread_mutex_getprioceiling and
4601 pthread_mutex_setprioceiling.
4602 * sysdeps/pthread/pthread.h (PTHREAD_PRIO_NONE, PTHREAD_PRIO_INHERIT,
4603 PTHREAD_PRIO_PROTECT): New enum values.
4604 (pthread_mutexattr_getprotocol, pthread_mutexattr_setprotocol,
4605 pthread_mutexattr_getprioceiling, pthread_mutexattr_setprioceiling,
4606 pthread_mutex_getprioceiling, pthread_mutex_setprioceiling): New
4607 prototypes.
4608 * pthreadP.h (PTHREAD_MUTEX_PRIO_INHERIT_PRIVATE_NP,
4609 PTHREAD_MUTEX_PRIO_PROTECT_PRIVATE_NP): New enum values.
4610 (PTHREAD_MUTEX_PRIO_CEILING_SHIFT, PTHREAD_MUTEX_PRIO_CEILING_MASK):
4611 Define.
4612 (PTHREAD_MUTEXATTR_PROTOCOL_SHIFT, PTHREAD_MUTEXATTR_PROTOCOL_MASK,
4613 PTHREAD_MUTEXATTR_PRIO_CEILING_SHIFT,
4614 PTHREAD_MUTEXATTR_PRIO_CEILING_MASK): Define.
4615 (PTHREAD_MUTEXATTR_FLAG_BITS): Or in PTHREAD_MUTEXATTR_PROTOCOL_MASK
4616 and PTHREAD_MUTEXATTR_PRIO_CEILING_MASK.
4617 * pthread_mutex_init.c (__pthread_mutex_init): For the time being
4618 return ENOTSUP for PTHREAD_PRIO_INHERIT or PTHREAD_PRIO_PROTECT
4619 protocol mutexes.
4620 * pthread_mutex_getprioceiling.c: New file.
4621 * pthread_mutex_setprioceiling.c: New file.
4622 * pthread_mutexattr_getprioceiling.c: New file.
4623 * pthread_mutexattr_setprioceiling.c: New file.
4624 * pthread_mutexattr_getprotocol.c: New file.
4625 * pthread_mutexattr_setprotocol.c: New file.
4626
62f6b9b2
RM
46272006-02-27 Daniel Jacobowitz <dan@codesourcery.com>
4628
4629 * sysdeps/unix/sysv/linux/aio_misc.h: Include <limits.h>.
4630
e0a3ed4f
RM
46312006-02-27 Roland McGrath <roland@redhat.com>
4632
4633 * sysdeps/pthread/Subdirs: List nptl here too.
4634 * configure (libc_add_on_canonical): New variable.
4635
4636 * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: Use #include_next.
4637
4638 * sysdeps/unix/sysv/linux/sleep.c: Use #include_next after #include of
4639 self to get main source tree's file.
4640 * sysdeps/unix/sysv/linux/alpha/clone.S: Likewise.
4641 * sysdeps/unix/sysv/linux/i386/clone.S: Likewise.
4642 * sysdeps/unix/sysv/linux/i386/vfork.S: Likewise.
4643 * sysdeps/unix/sysv/linux/ia64/clone2.S: Likewise.
4644 * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: Likewise.
4645 * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: Likewise.
4646 * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: Likewise.
4647 * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: Likewise.
4648 * sysdeps/unix/sysv/linux/sh/clone.S: Likewise.
4649 * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: Likewise.
4650 * sysdeps/unix/sysv/linux/sparc/sparc64/clone.S: Likewise.
4651 * sysdeps/unix/sysv/linux/x86_64/clone.S: Likewise.
4652 * sysdeps/unix/sysv/linux/x86_64/vfork.S: Likewise.
4653
4654 * Makefile: Use $(sysdirs) in vpath directive.
4655
4656 * sysdeps/pthread/Makefile (CFLAGS-libc-start.c): Variable removed.
4657 (CPPFLAGS-timer_routines.c): Likewise.
4658
4659 * Makeconfig (includes): Variable removed.
4660
84cfa284
RM
46612006-02-26 Roland McGrath <roland@redhat.com>
4662
4663 * sysdeps/generic/pt-raise.c: Moved to ...
4664 * pt-raise.c: ... here.
4665 * sysdeps/generic/lowlevellock.h: Moved to ...
4666 * lowlevellock.h: ... here.
4667
c5132ca1
RM
46682006-02-23 Roland McGrath <roland@redhat.com>
4669
4670 * descr.h (struct pthread): Add final member `end_padding'.
4671 (PTHREAD_STRUCT_END_PADDING): Use it.
4672
46732006-02-20 Roland McGrath <roland@redhat.com>
4674
4675 * sysdeps/mips: Directory removed, saved in ports repository.
4676 * sysdeps/unix/sysv/linux/mips: Likewise.
4677
a93317a1
UD
46782006-02-18 Ulrich Drepper <drepper@redhat.com>
4679
4680 * tst-robust1.c: Add second mutex to check that the mutex list is
4681 handled correctly.
4682
f1740bc4
UD
46832006-02-17 Jakub Jelinek <jakub@redhat.com>
4684
4685 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_mutex_dead,
4686 lll_robust_mutex_trylock, lll_robust_mutex_lock,
4687 lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
4688 lll_robust_mutex_unlock): New macros.
4689 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
4690 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
4691 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
4692 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
4693 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: New file.
4694
a7245bf5
UD
46952006-02-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4696
4697 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Add lll_robust_mutex_*
4698 definitions.
4699 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: New file.
4700
49bfc1fe
UD
47012006-02-17 Ulrich Drepper <drepper@redhat.com>
4702
4703 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
4704 (lll_robust_mutex_unlock): Avoid unnecessary wakeups.
4705 * sysdeps/unix/sysv/linux/i386/lowlevellock.h
4706 (lll_robust_mutex_unlock): Likewise.
4707
56e987ac
UD
47082006-02-13 Jakub Jelinek <jakub@redhat.com>
4709
4710 * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX):
4711 Set robust_list.__next rather than robust_list.
4712 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
4713 (__pthread_list_t): New typedef.
4714 (pthread_mutex_t): Replace __next and __prev fields with __list.
4715 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
4716 (__pthread_list_t): New typedef.
4717 (pthread_mutex_t): Replace __next and __prev fields with __list.
4718 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
4719 (__pthread_list_t, __pthread_slist_t): New typedefs.
4720 (pthread_mutex_t): Replace __next and __prev fields with __list.
4721 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
4722 (__pthread_list_t, __pthread_slist_t): New typedefs.
4723 (pthread_mutex_t): Replace __next and __prev fields with __list.
4724 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
4725 (__pthread_list_t, __pthread_slist_t): New typedefs.
4726 (pthread_mutex_t): Replace __next and __prev fields with __list.
4727 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h
4728 (__pthread_slist_t): New typedef.
4729 (pthread_mutex_t): Replace __next field with __list.
4730
683040c3
UD
47312006-02-15 Ulrich Drepper <drepper@redhat.com>
4732
25bc77e6 4733 * pthreadP.h: Define PTHREAD_MUTEX_INCONSISTENT instead of
683040c3
UD
4734 PTHREAD_MUTEX_OWNERDEAD.
4735 (PTHREAD_MUTEX_ROBUST_PRIVATE_NP): Define as 16, not 256.
4736 Define FUTEX_WAITERS, FUTEX_OWNER_DIED, FUTEX_TID_MASK.
4737 * Makefile (libpthread-routines): Add lowlevelrobustlock.
4738 * pthread_create.c (start_thread): Very much simplify robust_list loop.
4739 * pthread_mutex_consistent.c: Inconsistent mutex have __owner now set
4740 to PTHREAD_MUTEX_INCONSISTENT.
4741 * pthread_mutex_destroy.c: Allow destroying of inconsistent mutexes.
4742 * pthread_mutex_lock.c: Reimplement robust mutex handling.
4743 * pthread_mutex_trylock.c: Likewise.
4744 * pthread_mutex_timedlock.c: Likewise.
4745 * pthread_mutex_unlock.c: Likewise.
4746 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
4747 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
4748 lowlevelrobustlock.sym.
4749 * sysdeps/unix/sysv/linux/lowlevelrobustlock.sym: New file.
4750 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add lll_robust_mutex_*
4751 definitions.
4752 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
4753 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: New file.
4754 * sysdeps/unix/sysv/linux/i386/i586/lowlevelrobustlock.S: New file.
4755 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrobustlock.S: New file.
4756 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: New file.
4757
bbf209a4
UD
47582006-02-12 Ulrich Drepper <drepper@redhat.com>
4759
b007ce7c
UD
4760 * allocatestack.c (allocate_stack): Initialize robust_list.
4761 * init.c (__pthread_initialize_minimal_internal): Likewise.
4762 * descr.h (struct xid_command): Pretty printing.
4763 (struct pthread): Use __pthread_list_t or __pthread_slist_t for
4764 robust_list. Adjust macros.
4765 * pthread_create.c (start_thread): Adjust robust_list handling.
4766 * phtread_mutex_unlock.c: Don't allow unlocking from any thread
4767 but the owner for all robust mutex types.
4768 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
4769 __pthread_list_t and __pthread_slist_t. Use them in pthread_mutex_t.
0ca3379d 4770 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
b007ce7c
UD
4771 * sysdeps/pthread/pthread.h: Adjust mutex initializers.
4772
bbf209a4 4773 * sysdeps/unix/sysv/linux/i386/not-cancel.h: Define openat_not_cancel,
b42a214c 4774 openat_not_cancel_3, openat64_not_cancel, and openat64_not_cancel_3.
bbf209a4 4775
b576fca1
UD
47762006-02-08 Jakub Jelinek <jakub@redhat.com>
4777
4778 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait,
4779 lll_futex_timedwait, lll_wait_tid): Add "memory" clobber.
4780
a6df7387
UD
47812006-01-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4782
4783 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_futex_wait):
4784 Return status.
4785 (lll_futex_timed_wait): Define.
4786
7c65e900
UD
47872006-01-19 Ulrich Drepper <drepper@redhat.com>
4788
4789 * tst-cancel4.c: Test ppoll.
4790
5f9f21e8
AJ
47912006-01-18 Andreas Jaeger <aj@suse.de>
4792
cf407dfb 4793 [BZ #2167]
5f9f21e8
AJ
4794 * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h
4795 (pthread_mutex_t): Follow changes for other archs. Based on patch
4796 by Jim Gifford <patches@jg555.com>.
4797
251278c6
UD
47982006-01-13 Richard Henderson <rth@redhat.com>
4799
4800 * sysdeps/alpha/tls.h (tcbhead_t): Rename member to __private.
4801
de59a291
RM
48022006-01-10 Roland McGrath <roland@redhat.com>
4803
4804 * sysdeps/alpha/jmpbuf-unwind.h: File moved to main source tree.
4805 * sysdeps/i386/jmpbuf-unwind.h: Likewise.
4806 * sysdeps/mips/jmpbuf-unwind.h: Likewise.
4807 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
4808 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
4809 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
4810 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
4811 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
4812 * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
0ca13e14 4813 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
de59a291 4814
931786ee
RM
48152006-01-09 Roland McGrath <roland@redhat.com>
4816
5d42c8c3
RM
4817 * tst-initializers1-c89.c: New file.
4818 * tst-initializers1-c99.c: New file.
4819 * tst-initializers1-gnu89.c: New file.
4820 * tst-initializers1-gnu99.c: New file.
4821 * Makefile (tests): Add them.
4822 (CFLAGS-tst-initializers1-c89.c): New variable.
4823 (CFLAGS-tst-initializers1-c99.c): New variable.
4824 (CFLAGS-tst-initializers1-gnu89.c): New variable.
4825 (CFLAGS-tst-initializers1-gnu99.c): New variable.
4826
931786ee
RM
4827 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
4828 Use __extension__ on anonymous union definition.
4829 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4830 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4831 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4832 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3c238452 4833 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
931786ee 4834
8dd18431
RM
48352006-01-08 Jakub Jelinek <jakub@redhat.com>
4836
4837 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
4838 Don't give the union a name because it changes the mangled name.
4839 Instead name the struct for __data.
4840 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_mutex_t):
4841 Likewise.
4842 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_mutex_t):
4843 Likewise.
4844
ae11e412
UD
48452006-01-09 Jakub Jelinek <jakub@redhat.com>
4846
4847 * sysdeps/sparc/sparc64/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Add
4848 stack bias to mc_ftp field.
4849
c6885aa1
UD
48502006-01-07 Ulrich Drepper <drepper@redhat.com>
4851
4852 * sysdeps/pthread/aio_misc.h (AIO_MISC_WAIT): Work around gcc
6e741bc3 4853 being too clever and reloading the futex value where it shouldn't.
c6885aa1 4854
ae4ad00a
UD
48552006-01-06 Ulrich Drepper <drepper@redhat.com>
4856
4857 * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX): Use
4858 correct type.
4859
ced368f7
UD
48602006-01-06 Jakub Jelinek <jakub@redhat.com>
4861
4862 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
4863 Add cfi directives.
4864
d804f5df
UD
48652006-01-06 Ulrich Drepper <drepper@redhat.com>
4866
cbbbb188 4867 * sysdeps/ia64/tls.h (tcbhead_t): Rename private member to __private.
719046c1
UD
4868 * sysdeps/ia64/tcb-offsets.sym: Adjust for private->__private
4869 rename in tcbhead_t.
4870
d804f5df
UD
4871 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
4872 Don't give the union a name because it changes the mangled name.
4873 Instead name the struct for __data.
4874 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4875 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4876 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4877 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4878 * pthread_create.c (start_thread): Adjust robust mutex free loop.
4879 * descr.h (ENQUEUE_MUTEX, DEQUEUE_MUTEX): Adjust.
4880
679d83ba
UD
48812006-01-05 Ulrich Drepper <drepper@redhat.com>
4882
4883 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
4884 Return status.
4885 (lll_futex_timed_wait): Define.
4886 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
4887 * sysdeps/pthread/aio_misc.h: New file.
4888
06dc5bf3
RM
48892006-01-03 Joseph S. Myers <joseph@codesourcery.com>
4890
4891 * Makefile ($(objpfx)$(multidir)): Use mkdir -p.
4892
9759bbf1
UD
48932006-01-03 Steven Munroe <sjmunroe@us.ibm.com>
4894
4895 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
4896 (PSEUDO): Remove redundant cfi_startproc and cfi_endproc directives.
4897 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
4898
db59b28b
UD
48992006-01-04 Ulrich Drepper <drepper@redhat.com>
4900
4901 * tst-cancel24.cc: Use C headers instead of C++ headers.
4902
b01fe5f7
UD
49032006-01-03 Jakub Jelinek <jakub@redhat.com>
4904
4905 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Remove #error for
4906 sparc-linux configured glibc.
4907 (lll_futex_wake_unlock): Define to 1 for sparc-linux configured glibc.
4908 (__lll_mutex_trylock, __lll_mutex_cond_trylock, __lll_mutex_lock,
4909 __lll_mutex_cond_lock, __lll_mutex_timedlock): Use
4910 atomic_compare_and_exchange_val_24_acq instead of
4911 atomic_compare_and_exchange_val_acq.
4912 (lll_mutex_unlock, lll_mutex_unlock_force): Use atomic_exchange_24_rel
4913 instead of atomic_exchange_rel.
4914 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: New file.
4915 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c: New
4916 file.
4917 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c: New
4918 file.
4919 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: New file.
4920 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: New file.
4921 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: New file.
4922 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c: New file.
4923 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: New file.
4924 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
4925 New file.
4926 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
4927 New file.
4928 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: New file.
4929 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: New file.
4930 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c: New
4931 file.
4932 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_trywait.c: New
4933 file.
4934 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: New file.
4935
35c2fd59
UD
49362006-01-03 Ulrich Drepper <drepper@redhat.com>
4937
4938 * sysdeps/pthread/pthread.h [__WORDSIZE==64]: Don't use cast in
4939 mutex initializers.
4940
305bb37e
UD
49412006-01-02 Jakub Jelinek <jakub@redhat.com>
4942
4943 * sysdeps/sparc/tls.h (tcbhead_t): Add pointer_guard field.
4944 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
4945 THREAD_COPY_POINTER_GUARD): Define.
4946 * sysdeps/sparc/tcb-offsets.sym (POINTER_GUARD): Define.
4947 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Revert 2005-12-27 changes.
4948
cc792128
UD
49492006-01-01 Ulrich Drepper <drepper@redhat.com>
4950
4951 * version.c: Update copyright year.
4952
db0a00d3
UD
49532005-12-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4954
4955 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Remove explicit
4956 .eh_frame section, use cfi_* directives.
4957 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Add cfi instrumentation.
4958
b36205c4
UD
49592005-12-30 Ulrich Drepper <drepper@redhat.com>
4960
4961 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Undo last change for
4962 now.
4963
8b4f1598
UD
49642005-12-29 Ulrich Drepper <drepper@redhat.com>
4965
4966 * sysdeps/pthread/sigaction.c: Removed.
4967 * sigaction.c: New file.
4968 * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-sigaction.c.
4969
fec5592d
UD
49702005-12-28 Ulrich Drepper <drepper@redhat.com>
4971
4972 * Makefile (tests): Add tst-signal7.
4973 * tst-signal7.c: New file.
4974
db169ed5
RM
49752005-12-27 Roland McGrath <roland@redhat.com>
4976
4977 * sysdeps/x86_64/jmpbuf-unwind.h (_jmpbuf_sp): New inline function.
4978 (_JMPBUF_UNWINDS_ADJ): Use it, to PTR_DEMANGLE before comparison.
4979 * sysdeps/alpha/jmpbuf-unwind.h: Likewise.
4980 * sysdeps/i386/jmpbuf-unwind.h: Likewise.
4981 * sysdeps/mips/jmpbuf-unwind.h: Likewise.
4982 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
4983 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
4984 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
4985 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
4986 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
4987 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
4988
bfffffae
UD
49892005-12-27 Jakub Jelinek <jakub@redhat.com>
4990
4991 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Add __next
4992 and __prev field to pthread_mutex_t.
4993 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4994 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4995 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4996 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4997 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Add __next field
4998 to pthread_mutex_t.
4999
1bcfb5a5
UD
50002005-12-26 Ulrich Drepper <drepper@redhat.com>
5001
5002 * pthreadP.h: Define PTHREAD_MUTEX_ROBUST_PRIVATE_NP,
5003 PTHREAD_MUTEX_ROBUST_PRIVATE_RECURSIVE_NP,
5004 PTHREAD_MUTEX_ROBUST_PRIVATE_ERRORCHECK_NP,
5005 PTHREAD_MUTEX_ROBUST_PRIVATE_ADAPTIVE_NP,
5006 PTHREAD_MUTEXATTR_FLAG_ROBUST, PTHREAD_MUTEXATTR_FLAG_PSHARED,
5007 and PTHREAD_MUTEXATTR_FLAG_BITS.
5008 * descr.h (struct pthread): Add robust_list field and define
5009 ENQUEUE_MUTEX and DEQUEUE_MUTEX macros.
5010 * pthread_mutexattr_getrobust.c: New file.
5011 * pthread_mutexattr_setrobust.c: New file.
5012 * pthread_mutex_consistent.c: New file.
5013 * sysdeps/pthread/pthread.h: Declare pthread_mutexattr_getrobust,
5014 pthread_mutexattr_setrobust, and pthread_mutex_consistent.
5015 Define PTHREAD_MUTEX_STALLED_NP and PTHREAD_MUTEX_ROBUST_NP.
5016 Adjust pthread_mutex_t initializers.
5017 * nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Add __next
5018 field to pthread_mutex_t.
5019 * nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Add __next
5020 and __prev field to pthread_mutex_t.
5021 * Versions [GLIBC_2.4]: Export pthread_mutexattr_getrobust_np,
5022 pthread_mutexattr_setrobust_np, and pthread_mutex_consistent_np.
5023 * pthread_mutexattr_getpshared.c: Use PTHREAD_MUTEXATTR_FLAG_PSHARED
5024 and PTHREAD_MUTEXATTR_FLAG_BITS macros instead of magic numbers.
5025 * pthread_mutexattr_gettype.c: Likewise.
5026 * pthread_mutexattr_setpshared.c: Likewise.
5027 * pthread_mutexattr_settype.c: Likewise.
5028 * pthread_mutex_init.c: Reject robust+pshared attribute for now.
5029 Initialize mutex kind according to robust flag.
5030 * pthread_mutex_lock.c: Implement local robust mutex.
5031 * pthread_mutex_timedlock.c: Likewise.
5032 * pthread_mutex_trylock.c: Likewise.
5033 * pthread_mutex_unlock.c: Likewise.
5034 * pthread_create.c (start_thread): Mark robust mutexes which remained
5035 locked as dead.
5036 * tst-robust1.c: New file.
5037 * tst-robust2.c: New file.
5038 * tst-robust3.c: New file.
5039 * tst-robust4.c: New file.
5040 * tst-robust5.c: New file.
5041 * tst-robust6.c: New file.
5042 * tst-robust7.c: New file.
5043 * Makefile (libpthread-routines): Add pthread_mutexattr_getrobust,
5044 pthread_mutexattr_setrobust, and pthread_mutex_consistent.
5045 (tests): Add tst-robust1, tst-robust2, tst-robust3, tst-robust4,
5046 tst-robust5, tst-robust6, and tst-robust7.
5047
5048 * tst-typesizes.c: New file.
5049 * Makefile (tests): Add tst-typesizes.
5050
5051 * tst-once3.c: More debug output.
5052
9333ed0d
UD
50532005-12-24 Ulrich Drepper <drepper@redhat.com>
5054
d4d138a4
UD
5055 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Add break
5056 missing after last change.
5057
bfffffae 5058 * version.c: Update copyright year.
9333ed0d 5059
dcc73a8d
UD
50602005-12-23 Ulrich Drepper <drepper@redhat.com>
5061
5062 * pthread_mutex_destroy.c: Set mutex type to an invalid value.
5063 * pthread_mutex_lock.c: Return EINVAL for invalid mutex type.
5064 * pthread_mutex_trylock.c: Likewise.
5065 * pthread_mutex_timedlock.c: Likewise.
5066 * pthread_mutex_unlock.c: Likewise.
5067
879f3ca6
RM
50682005-12-22 Roland McGrath <roland@redhat.com>
5069
5070 * sysdeps/pthread/sigaction.c: Use "" instead of <> to include self,
5071 so that #include_next's search location is not reset to the -I..
5072 directory where <nptl/...> can be found.
5073
077a0da7
UD
50742005-12-22 Ulrich Drepper <drepper@redhat.com>
5075
5076 [BZ #1913]
5077 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
5078 Fix unwind info. Remove useless branch prediction prefix.
7735afa2
UD
5079 * tst-cancel24.cc: New file.
5080 * Makefile: Add rules to build and run tst-cancel24.
077a0da7 5081
8dea90aa
RM
50822005-12-21 Roland McGrath <roland@redhat.com>
5083
5084 * libc-cancellation.c: Use <> rather than "" #includes.
5085 * pt-cleanup.c: Likewise.
5086 * pthread_create.c: Likewise.
5087 * pthread_join.c: Likewise.
5088 * pthread_timedjoin.c: Likewise.
5089 * pthread_tryjoin.c: Likewise.
5090 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Likewise.
5091 * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
5092 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
5093 * unwind.c: Likewise.
5094
8da21f96
UD
50952005-12-19 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5096
5097 * sysdeps/sh/tcb-offsets.sym: Add POINTER_GUARD.
5098 * sysdeps/sh/tls.h (tcbhead_t): Remove private and add pointer_guard.
5099 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
5100 THREAD_COPY_POINTER_GUARD): Define.
5101
00c2b3b9
UD
51022005-12-19 Jakub Jelinek <jakub@redhat.com>
5103
5104 * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): Make room for 2 uintptr_t's
5105 rather than one.
5106 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
5107 THREAD_COPY_POINTER_GUARD): Define.
5108 * sysdeps/powerpc/tcb-offsets.sym (POINTER_GUARD): Add.
5109 * sysdeps/powerpc/tls.h (tcbhead_t): Add pointer_guard field.
5110 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
5111 THREAD_COPY_POINTER_GUARD): Define.
5112 * sysdeps/s390/tcb-offsets.sym (STACK_GUARD): Add.
5113 * sysdeps/s390/tls.h (THREAD_GET_POINTER_GUARD,
5114 THREAD_SET_POINTER_GUARD, THREAD_COPY_POINTER_GUARD): Define.
5115 * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S (__ia64_longjmp):
5116 Use PTR_DEMANGLE for B0 if defined.
5117
827b7087
UD
51182005-12-17 Ulrich Drepper <drepper@redhat.com>
5119
5120 * pthread_create.c (__pthread_create_2_1): Use
5121 THREAD_COPY_POINTER_GUARD if available.
5122 * sysdeps/i386/tcb-offsets.sym: Add POINTER_GUARD.
5123 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
5124 * sysdeps/i386/tls.h (tcbhead_t): Add pointer_guard.
5125 Define THREAD_SET_POINTER_GUARD and THREAD_COPY_POINTER_GUARD.
5126 * sysdeps/x86_64/tls.h: Likewise.
5127
2826ac7e
RM
51282005-12-15 Roland McGrath <roland@redhat.com>
5129
5130 * sysdeps/unix/sysv/linux/mq_notify.c: Don't use sysdeps/generic.
5131
b6ab06ce
UD
51322005-12-13 Ulrich Drepper <drepper@redhat.com>
5133
5134 * sysdeps/pthread/sigfillset.c: Adjust for files moved out of
5135 sysdeps/generic.
5136 * errno-loc.c: New file.
5137
f0d1a3b5
RM
51382005-12-12 Roland McGrath <roland@redhat.com>
5139
5140 * init.c (__pthread_initialize_minimal_internal): Do __static_tls_size
5141 adjustments before choosing stack size. Update minimum stack size
5142 calculation to match allocate_stack change.
5143
db13ddbc
UD
51442005-12-12 Ulrich Drepper <drepper@redhat.com>
5145
5146 * allocatestack.c (allocate_stack): Don't demand that there is an
5147 additional full page available on the stack beside guard, TLS, the
5148 minimum stack.
5149
088f460f
UD
51502005-11-24 Ulrich Drepper <drepper@redhat.com>
5151
5152 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
5153 (__cleanup_fct_attribute): Use __regparm__ not regparm.
5154
5155 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: When
5156 compiling 32-bit code we must define __cleanup_fct_attribute.
5157
16feadf2
UD
5158005-11-24 Jakub Jelinek <jakub@redhat.com>
5159
5160 [BZ #1920]
5161 * sysdeps/pthread/pthread.h (__pthread_unwind_next): Use
5162 __attribute__ instead of __attribute.
5163 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
5164 (__cleanup_fct_attribute): Likewise.
5165
e6e493bb
UD
51662005-11-17 Jakub Jelinek <jakub@redhat.com>
5167
5168 * sysdeps/pthread/unwind-forcedunwind.c (pthread_cancel_init): Put
5169 a write barrier before writing libgcc_s_getcfa.
5170
8e635611
UD
51712005-11-06 Ulrich Drepper <drepper@redhat.com>
5172
5173 * sysdeps/unix/sysv/linux/configure: Removed.
5174
ce33ee7c
UD
51752005-11-05 Ulrich Drepper <drepper@redhat.com>
5176
5177 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Remove trace of
5178 optional init_array/fini_array support.
5179
20d511e0
RM
51802005-10-24 Roland McGrath <roland@redhat.com>
5181
5182 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Remove unnecessary
5183 versioned_symbol use.
5184
fe60d146
RM
51852005-10-16 Roland McGrath <roland@redhat.com>
5186
5187 * init.c (__pthread_initialize_minimal_internal): Even when using a
5188 compile-time default stack size, apply the minimum that allocate_stack
5189 will require, and round up to page size.
5190
0faa1cf5
RM
51912005-10-10 Daniel Jacobowitz <dan@codesourcery.com>
5192
5193 * Makefile ($(test-modules)): Remove static pattern rule.
5194
f9126cc2 51952005-10-14 Jakub Jelinek <jakub@redhat.com>
b42a214c 5196 Ulrich Drepper <drepper@redhat.com>
f9126cc2
UD
5197
5198 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix stack
5199 alignment in callback function.
5200 * Makefile: Add rules to build and run tst-align3.
5201 * tst-align3.c: New file.
5202
015a5d22
RM
52032005-10-03 Jakub Jelinek <jakub@redhat.com>
5204
5205 * allocatestack.c (setxid_signal_thread): Add
5206 INTERNAL_SYSCALL_DECL (err).
5207
b71ce910
UD
52082005-10-02 Jakub Jelinek <jakub@redhat.com>
5209
5210 * allocatestack.c (setxid_signal_thread): Need to use
5211 atomic_compare_and_exchange_bool_acq.
5212
dff9a7a1 52132005-10-01 Ulrich Drepper <drepper@redhat.com>
b42a214c 5214 Jakub Jelinek <jakub@redhat.com>
dff9a7a1
UD
5215
5216 * descr.h: Define SETXID_BIT and SETXID_BITMASK. Adjust
5217 CANCEL_RESTMASK.
5218 (struct pthread): Move specific_used field to avoid padding.
5219 Add setxid_futex field.
5220 * init.c (sighandler_setxid): Reset setxid flag and release the
5221 setxid futex.
5222 * allocatestack.c (setxid_signal_thread): New function. Broken
5223 out of the bodies of the two loops in __nptl_setxid. For undetached
5224 threads check whether they are exiting and if yes, don't send a signal.
5225 (__nptl_setxid): Simplify loops by using setxid_signal_thread.
5226 * pthread_create.c (start_thread): For undetached threads, check
5227 whether setxid bit is set. If yes, wait until signal has been
5228 processed.
5229
5230 * allocatestack.c (STACK_VARIABLES): Initialize them.
5231 * pthread_create.c (__pthread_create_2_1): Initialize pd.
5232
560b4709
UD
52332004-09-02 Jakub Jelinek <jakub@redhat.com>
5234
5235 * pthread_cond_destroy.c (__pthread_cond_destroy): If there are
5236 waiters, awake all waiters on the associated mutex.
5237
5eac4760
RM
52382005-09-22 Roland McGrath <roland@redhat.com>
5239
5240 * perf.c [__x86_64__] (HP_TIMING_NOW): New macro (copied from
5241 ../sysdeps/x86_64/hp-timing.h).
5242
a3615024
UD
52432005-08-29 Jakub Jelinek <jakub@redhat.com>
5244
5245 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_WAKE_OP,
5246 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5247 (lll_futex_wake_unlock): Define.
5248 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_WAKE_OP,
5249 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5250 (lll_futex_wake_unlock): Define.
5251 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_WAKE_OP,
5252 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5253 (lll_futex_wake_unlock): Define.
5254 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_WAKE_OP,
5255 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5256 (lll_futex_wake_unlock): Define.
5257 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_WAKE_OP,
5258 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5259 (lll_futex_wake_unlock): Define.
5260 * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal): Use
5261 lll_futex_wake_unlock.
5262 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
5263 (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5264 (__pthread_cond_signal): Use FUTEX_WAKE_OP.
5265 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
5266 (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5267 (__pthread_cond_signal): Use FUTEX_WAKE_OP.
5268
bf017034
UD
52692005-09-05 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5270
5271 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
5272 Fix typo in register name.
5273
fd4af664
UD
52742005-08-23 Ulrich Drepper <drepper@redhat.com>
5275
8558d715
UD
5276 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
5277 Use __sigfillset. Document that sigfillset does the right thing wrt
5278 to SIGSETXID.
fd4af664 5279
3fd1bc67
UD
52802005-07-11 Jakub Jelinek <jakub@redhat.com>
5281
44d75caf 5282 [BZ #1102]
3fd1bc67
UD
5283 * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER,
5284 PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP,
5285 PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP,
5286 PTHREAD_MUTEX_ADAPTIVE_NP, PTHREAD_RWLOCK_INITIALIZER,
5287 PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP,
5288 PTHREAD_COND_INITIALIZER): Supply zeros for all fields
5289 in the structure.
5290 * Makefile (tests): Add tst-initializers1.
5291 (CFLAGS-tst-initializers1.c): Set.
5292 * tst-initializers1.c: New test.
5293
553185e2
UD
52942005-07-11 Jakub Jelinek <jakub@redhat.com>
5295
5296 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_rwlock_t):
5297 Make sure __flags are located at offset 48 from the start of the
5298 structure.
5299
8df08cb2
RM
53002005-07-02 Roland McGrath <roland@redhat.com>
5301
5302 * Makeconfig: Comment fix.
5303
253eb3a0
UD
53042005-07-05 Jakub Jelinek <jakub@redhat.com>
5305
5306 * descr.h (PTHREAD_STRUCT_END_PADDING): Define.
5307 * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): If PTHREAD_STRUCT_END_PADDING
5308 is smaller than 8 bytes, increase TLS_PRE_TCB_SIZE by 16 bytes.
5309 (THREAD_SYSINFO, THREAD_SELF, DB_THREAD_SELF): Don't assume
5310 TLS_PRE_TCB_SIZE is sizeof (struct pthread).
5311 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5312 * sysdeps/ia64/tcb-offsets.sym (PID, TID, MULTIPLE_THREADS_OFFSET):
5313 Use TLS_PRE_TCB_SIZE instead of sizeof (struct pthread).
5314 * sysdeps/unix/sysv/linux/ia64/createthread.c (TLS_VALUE): Don't
5315 assume TLS_PRE_TCB_SIZE is sizeof (struct pthread).
5316
bb6e8ca3
UD
53172005-06-25 Jakub Jelinek <jakub@redhat.com>
5318
5319 * sysdeps/i386/tls.h (tcbhead_t): Add stack_guard field.
5320 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5321 * sysdeps/x86_64/tls.h (tcbhead_t): Add sysinfo and stack_guard
5322 fields.
5323 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5324 * sysdeps/s390/tls.h (tcbhead_t): Add stack_guard
5325 field. Put in sysinfo field unconditionally.
5326 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5327 * sysdeps/powerpc/tls.h (tcbhead_t): Add stack_guard field.
5328 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5329 * sysdeps/sparc/tls.h (tcbhead_t): Add sysinfo and stack_guard
5330 fields.
5331 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5332 * pthread_create.c (__pthread_create_2_1): Use
5333 THREAD_COPY_STACK_GUARD macro.
5334 * Makefile: Add rules to build and run tst-stackguard1{,-static}
5335 tests.
5336 * tst-stackguard1.c: New file.
5337 * tst-stackguard1-static.c: New file.
5338
99c7f870
UD
53392005-06-14 Alan Modra <amodra@bigpond.net.au>
5340
5341 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
5342 Invoke CGOTSETUP and CGOTRESTORE.
5343 (CGOTSETUP, CGOTRESTORE): Define.
5344
8074c5c5
RM
53452005-05-29 Richard Henderson <rth@redhat.com>
5346
5347 * tst-cancel4.c (WRITE_BUFFER_SIZE): New.
5348 (tf_write, tf_writev): Use it.
5349 (do_test): Use socketpair instead of pipe. Set SO_SNDBUF to
5350 the system minimum.
5351
c179df4e
UD
53522005-05-23 Jakub Jelinek <jakub@redhat.com>
5353
5354 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
5355 [IS_IN_librt] (CENABLE, CDISABLE): Use JUMPTARGET instead of
5356 __librt_*_asynccancel@local.
5357
b0e196a4
UD
53582005-05-17 Alan Modra <amodra@bigpond.net.au>
5359
5360 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Delete
5361 all occurrences of JUMPTARGET. Instead append @local to labels.
5362
f7d78e18
UD
53632005-05-20 Jakub Jelinek <jakub@redhat.com>
5364
5365 * sysdeps/i386/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN): Define to
5366 size/alignment of struct pthread rather than tcbhead_t.
5367 * sysdeps/x86_64/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
5368 Likewise.
5369 * sysdeps/s390/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
5370 Likewise.
5371 * sysdeps/sparc/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
5372 Likewise.
5373
363dd976
UD
53742005-05-19 Richard Henderson <rth@redhat.com>
5375
5376 * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use
5377 __sync_val_compare_and_swap, not explicit _si variant.
5378 * sysdeps/ia64/pthread_spin_trylock.c (pthread_spin_trylock): Likewise.
5379
1ad9da69
UD
53802005-05-03 Ulrich Drepper <drepper@redhat.com>
5381
5382 [BZ #915]
5383 * sysdeps/pthread/pthread.h: Avoid empty initializers.
5384
5085cd1f
UD
53852005-05-03 Jakub Jelinek <jakub@redhat.com>
5386
5387 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Remove explicit
5388 .eh_frame section, use cfi_* directives.
5389
ad529081
UD
53902005-04-27 Jakub Jelinek <jakub@redhat.com>
5391
5392 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: Use <> instead
5393 of "" includes.
5394
dea99685
UD
53952005-04-27 Ulrich Drepper <drepper@redhat.com>
5396
c06aad09 5397 [BZ #1075]
dea99685
UD
5398 * tst-cancel17.c (do_test): Add arbitrary factor to make sure
5399 aio_write blocks.
5400
84060bad
RM
54012005-04-27 Roland McGrath <roland@redhat.com>
5402
5e2d8ac8
RM
5403 * Makefile (tests): Remove tst-clock2.
5404
84060bad
RM
5405 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Handle
5406 CLOCK_PROCESS_CPUTIME_ID and CLOCK_PROCESS_THREAD_ID specially,
5407 translating to the kernel clockid_t for our own process/thread clock.
5408
5409 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: New file.
5410
4a035b9d
RM
54112005-04-15 Jakub Jelinek <jakub@redhat.com>
5412
5413 * old_pthread_cond_init.c: Include <errno.h>.
5414 (__pthread_cond_init_2_0): Fail with EINVAL if COND_ATTR is
5415 process shared or uses clock other than CLOCK_REALTIME.
5416 * pthread_cond_init.c (__pthread_cond_init): Remove bogus comment.
5417
edac0e8f
UD
54182005-04-13 David S. Miller <davem@davemloft.net>
5419
5420 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: New file.
5421 * sysdeps/sparc/sparc64/clone.S: New file.
5422
613d8d52
RM
54232005-04-05 Jakub Jelinek <jakub@redhat.com>
5424
44d75caf 5425 [BZ #1102]
613d8d52
RM
5426 * sysdeps/pthread/pthread.h (__pthread_cleanup_routine): Use
5427 __inline instead of inline.
5428 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_routine): Likewise.
5429
ee618985
UD
54302005-03-31 Jakub Jelinek <jakub@redhat.com>
5431
5432 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Use
5433 functionally equivalent, but shorter instructions.
5434 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
5435 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
5436 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
5437 Likewise.
5438 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
5439 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
5440 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
5441 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
5442 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5443 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
5444 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
5445 Likewise.
5446 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
5447 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
5448 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
5449 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
5450 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
5451
f850220b
AJ
54522005-03-28 Daniel Jacobowitz <dan@codesourcery.com>
5453
5454 * sysdeps/mips/Makefile: New file.
5455 * sysdeps/mips/nptl-sysdep.S: New file.
5456 * sysdeps/mips/tcb-offsets.sym: New file.
5457 * sysdeps/mips/pthread_spin_lock.S: New file.
5458 * sysdeps/mips/pthread_spin_trylock.S: New file.
5459 * sysdeps/mips/pthreaddef.h: New file.
5460 * sysdeps/mips/tls.h: New file.
5461 * sysdeps/mips/jmpbuf-unwind.h: New file.
5462 * sysdeps/unix/sysv/linux/mips/lowlevellock.h: New file.
5463 * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h: New file.
5464 * sysdeps/unix/sysv/linux/mips/bits/semaphore.h: New file.
5465 * sysdeps/unix/sysv/linux/mips/pthread_once.c: New file.
5466 * sysdeps/unix/sysv/linux/mips/fork.c: New file.
5467 * sysdeps/unix/sysv/linux/mips/pt-vfork.S: New file.
5468 * sysdeps/unix/sysv/linux/mips/vfork.S: New file.
5469 * sysdeps/unix/sysv/linux/mips/clone.S: New file.
5470 * sysdeps/unix/sysv/linux/mips/createthread.c: New file.
5471 * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: New file.
5472
1e6da2b0
UD
54732005-03-23 Ulrich Drepper <drepper@redhat.com>
5474
c06aad09 5475 [BZ #1112]
1e6da2b0
UD
5476 * pthread_create.c (__pthread_create_2_1): Rename syscall error
5477 variable to scerr.
5478
5233d576
RM
54792005-03-10 Jakub Jelinek <jakub@redhat.com>
5480
5481 * tst-getpid1.c (do_test): Align stack passed to clone{2,}.
5482
3053ff11
RM
54832005-02-25 Roland McGrath <roland@redhat.com>
5484
5485 * alloca_cutoff.c: Correct license text.
5486 * tst-unload.c: Likewise.
5487 * sysdeps/pthread/allocalim.h: Likewise.
5488 * sysdeps/pthread/pt-initfini.c: Likewise.
5489 * sysdeps/pthread/bits/libc-lock.h: Likewise.
5490 * sysdeps/pthread/bits/sigthread.h: Likewise.
5491 * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
5492 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
5493
9cfe5381
RM
54942005-02-16 Roland McGrath <roland@redhat.com>
5495
5496 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
5497 Use unsigned int * for ptr_nthreads.
5498
7de00121
RM
54992005-02-14 Alan Modra <amodra@bigpond.net.au>
5500
20d511e0 5501 [BZ #721]
7de00121
RM
5502 * sysdeps/powerpc/tcb-offsets.sym (thread_offsetof): Redefine to suit
5503 gcc4.
5504
4bae262d
UD
55052005-02-07 Richard Henderson <rth@redhat.com>
5506
613d8d52 5507 [BZ #787]
4bae262d
UD
5508 * sysdeps/pthread/pthread.h (__sigsetjmp): Use pointer as first
5509 argument.
5510
75df54b7
RM
55112004-11-03 Marcus Brinkmann <marcus@gnu.org>
5512
5513 * sysdeps/generic/lowlevellock.h (__generic_mutex_unlock): Fix
5514 order of arguments in invocation of atomic_add_zero.
5515
ea9c93cc
UD
55162005-01-26 Jakub Jelinek <jakub@redhat.com>
5517
9cfe5381 5518 [BZ #737]
ea9c93cc
UD
5519 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S (__new_sem_trywait):
5520 Use direct %gs segment access or, if NO_TLS_DIRECT_SEG_REFS,
5521 at least gotntpoff relocation and addition.
5522 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
5523 Likewise.
5524 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
5525 Likewise.
5526 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
5527 Likewise.
5528
9dcafc55
UD
55292005-01-06 Ulrich Drepper <drepper@redhat.com>
5530
5531 * allocatestack.c (init_one_static_tls): Adjust initialization of DTV
5532 entry for static tls deallocation fix.
5533 * sysdeps/alpha/tls.h (dtv_t): Change pointer type to be struct which
5534 also contains information whether the memory pointed to is static
5535 TLS or not.
5536 * sysdeps/i386/tls.h: Likewise.
5537 * sysdeps/ia64/tls.h: Likewise.
5538 * sysdeps/powerpc/tls.h: Likewise.
5539 * sysdeps/s390/tls.h: Likewise.
5540 * sysdeps/sh/tls.h: Likewise.
5541 * sysdeps/sparc/tls.h: Likewise.
5542 * sysdeps/x86_64/tls.h: Likewise.
5543
a71c152c
UD
55442004-12-27 Ulrich Drepper <drepper@redhat.com>
5545
5546 * init.c (__pthread_initialize_minimal_internal): Use __sigemptyset.
5547
d143c49e
UD
55482004-12-21 Jakub Jelinek <jakub@redhat.com>
5549
5550 * sysdeps/i386/tls.h (CALL_THREAD_FCT): Maintain 16 byte alignment of
5551 %esp.
5552 * Makefile (tests): Add tst-align2.
5553 * tst-align2.c: New test.
5554 * sysdeps/i386/Makefile (CFLAGS-tst-align{,2}.c): Add
5555 -mpreferred-stack-boundary=4.
5556
50130ded
RM
55572004-12-18 Roland McGrath <roland@redhat.com>
5558
5559 * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h:
5560 New file removed withdrawn for the moment.
5561
cbc53df0
RH
55622004-12-17 Richard Henderson <rth@redhat.com>
5563
5564 * sysdeps/unix/sysv/linux/alpha/clone.S: New file.
5565 * sysdeps/alpha/tcb-offsets.sym (TID_OFFSET): New.
50130ded 5566
fb9d5c73
UD
55672004-12-16 Ulrich Drepper <drepper@redhat.com>
5568
03332aa6
UD
5569 * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h: New file.
5570 Increased PTHREAD_STACK_MIN.
5571
fb9d5c73
UD
5572 * tst-context1.c (stacks): Use bigger stack size.
5573
e853ea00
UD
55742004-12-16 Jakub Jelinek <jakub@redhat.com>
5575
5576 * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: New file.
5577 * sysdeps/sparc/tcb-offsets.sym: Add TID.
5578
f23673fc
UD
55792004-12-15 Jakub Jelinek <jakub@redhat.com>
5580
5581 * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: New file.
5582 * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: New file.
5583 * sysdeps/s390/tcb-offsets.sym (TID): Add.
5584
917fbe70
UD
55852004-12-15 Ulrich Drepper <drepper@redhat.com>
5586
5587 * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: New file.
5588
1f9d7c27
UD
55892004-12-14 Ulrich Drepper <drepper@redhat.com>
5590
5591 * sysdeps/powerpc/tcb-offsets.sym: Add TID.
5592 * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: New file.
5593
5594 * tst-getpid1.c: If child crashes, report this first. Print which
5595 signal.
5596
bf7c04cd
UD
55972004-12-09 Ulrich Drepper <drepper@redhat.com>
5598
5599 * init.c (__pthread_initialize_minimal_internal): Also unblock
5600 SIGSETXID.
5601
56022004-12-01 Jakub Jelinek <jakub@redhat.com>
5603
5604 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_CPUTIME,
5605 _POSIX_THREAD_CPUTIME): Define to 0.
5606 * sysdeps/pthread/timer_create.c (timer_create): Remove unused code
5607 handling CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID.
5608 * sysdeps/pthread/timer_routines.c (__timer_signal_thread_pclk,
5609 __timer_signal_thread_tclk): Remove.
5610 (init_module): Remove their initialization.
5611 (thread_cleanup): Remove their cleanup assertions.
5612 * sysdeps/pthread/posix-timer.h (__timer_signal_thread_pclk,
5613 __timer_signal_thread_tclk): Remove.
5614 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Removed.
75df54b7 5615 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Removed.
bf7c04cd
UD
5616 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Removed.
5617
484cc801
UD
56182004-12-07 Jakub Jelinek <jakub@redhat.com>
5619
5620 * sysdeps/ia64/tcb-offsets.sym (TID): Add.
5621 * sysdeps/unix/sysv/linux/ia64/clone2.S: New file.
5622
5623 * Makefile (tests): Add tst-getpid2.
5624 * tst-getpid1.c (TEST_CLONE_FLAGS): Define.
5625 (do_test): Use it. Use __clone2 instead of clone on ia64.
5626 * tst-getpid2.c: New test.
5627
2da9a6a1
UD
56282004-12-07 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5629
5630 * sysdeps/unix/sysv/linux/sh/clone.S: New file.
5631
1ff241b8
UD
56322004-12-04 Ulrich Drepper <drepper@redhat.com>
5633
5634 * Makefile (tests): Add tst-getpid1.
5635 * tst-getpid1.c: New file.
5636 * sysdeps/unix/sysv/linux/i386/clone.S: New file.
5637 * sysdeps/unix/sysv/linux/x86_64/clone.S: New file.
5638
3f488b9c
RM
56392004-12-02 Roland McGrath <roland@redhat.com>
5640
5641 * Makefile (libpthread-nonshared): Variable removed.
5642 ($(objpfx)libpthread_nonshared.a): Target removed.
5643 ($(inst_libdir)/libpthread_nonshared.a): Likewise.
5644 These are now handled by generic magic from
5645 libpthread-static-only-routines being set.
5646
597ce09c
UD
56472004-11-27 Ulrich Drepper <drepper@redhat.com>
5648
5649 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_PRIORITIZED_IO,
5650 _POSIX2_CHAR_TERM, _POSIX_THREAD_PRIO_INHERIT,
5651 _POSIX_THREAD_PRIO_PROTECT): Define.
5652 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
5653 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
5654 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
5655
60e4523a
UD
56562004-11-26 Jakub Jelinek <jakub@redhat.com>
5657
5658 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_ADVISORY_INFO,
5659 _POSIX_SPORADIC_SERVER, _POSIX_THREAD_SPORADIC_SERVER, _POSIX_TRACE,
5660 _POSIX_TRACE_EVENT_FILTER, _POSIX_TRACE_INHERIT, _POSIX_TRACE_LOG,
5661 _POSIX_TYPED_MEMORY_OBJECTS, _POSIX_IPV6, _POSIX_RAW_SOCKETS): Define.
5662 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
5663 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
5664 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
5665
f1f2cafc
UD
56662004-11-24 Ulrich Drepper <drepper@redhat.com>
5667
bca2d208
UD
5668 * sysdeps/x86_64/Makefile [nptl]: Define CFLAGS-pthread_create.c.
5669
f1f2cafc
UD
5670 * Makefile (libpthread-routines): Add pthread_setschedprio.
5671 * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setschedprio.
5672 * sysdeps/pthread/pthread.h: Declare pthread_setschedprio.
5673 * pthread_setschedprio.c: New file.
5674
b639d0c9
UD
56752004-11-20 Jakub Jelinek <jakub@redhat.com>
5676
ef2bb413
UD
5677 * pthread_create.c (pthread_cancel): Add PTHREAD_STATIC_FN_REQUIRE.
5678 * pthread_cancel.c (pthread_create): Likewise.
5679
b639d0c9
UD
5680 * Makefile (libpthread-routines): Add vars.
5681 * sysdeps/pthread/createthread.c (__pthread_multiple_threads): Remove.
5682 * init.c (__default_stacksize, __is_smp): Remove.
5683 * vars.c: New file.
5684 * pthreadP.h (__find_thread_by_id): If !SHARED, add weak_function
5685 and define a wrapper macro.
5686 (PTHREAD_STATIC_FN_REQUIRE): Define.
5687 * allocatestack.c (__find_thread_by_id): Undefine.
5688 * pthread_create (__pthread_keys): Remove.
5689 (pthread_mutex_lock, pthread_mutex_unlock, pthread_once,
5690 pthread_key_create, pthread_setspecific, pthread_getspecific): Add
5691 PTHREAD_STATIC_FN_REQUIRE.
5692
3defcff3
UD
56932004-11-18 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5694
5695 * sysdeps/sh/tls.h (DB_THREAD_SELF): Set the correct bias
5696 parameter to REGISTER macro.
5697
ec188f92
RM
56982004-11-17 Roland McGrath <roland@redhat.com>
5699
5700 * sysdeps/unix/sysv/linux/timer_routines.c (__start_helper_thread):
5701 Make sure SIGCANCEL is blocked as well.
5702
ccd8de9a
UD
57032004-11-10 Jakub Jelinek <jakub@redhat.com>
5704
5705 * sysdeps/pthread/setxid.h: New file.
5706 * sysdeps/pthread/pthread-functions.h (HAVE_PTR__NPTL_SETXID): Remove.
5707 (struct xid_command): Add forward decl.
5708 (struct pthread_functions): Change return type of __nptl_setxid hook
5709 to int.
5710 * pthreadP.h (__nptl_setxid): Change return type to int.
5711 * allocatestack.c (__nptl_setxid): Call INTERNAL_SYSCALL_NCS in the
5712 calling thread, return its return value and set errno on failure.
5713 * descr.h (struct xid_command): Change id type to long array.
5714
5715 * Makefile: Add rules to build and test tst-setuid1 and
5716 tst-setuid1-static.
5717 * tst-setuid1.c: New test.
5718 * tst-setuid1-static.c: New test.
5719
ed2ced8a
UD
57202004-11-10 Jakub Jelinek <jakub@redhat.com>
5721
5722 * Makefile (tests): Add tst-exit3.
5723 * tst-exit3.c: New test.
5724
948603ee
UD
57252004-11-09 Ulrich Drepper <drepper@redhat.com>
5726
5727 * Makefile (tests): Add tst-exit2.
5728 * tst-exit2.c: New file.
5729
ba5ffd2a
RM
57302004-11-09 Roland McGrath <roland@redhat.com>
5731
5732 [BZ #530]
5733 * sysdeps/pthread/createthread.c (do_clone): Increment __nptl_nthreads
5734 here, before calling clone.
5735 * pthread_create.c (start_thread): Don't do it here.
5736
c4d7bd39
RM
57372004-11-02 Jakub Jelinek <jakub@redhat.com>
5738
5739 * sysdeps/unix/sysv/linux/smp.h: Include <errno.h>.
5740
543fb0c8
UD
57412004-10-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5742
5743 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
5744 Set ETIMEDOUT to errno when time is up. Tweak to avoid
5745 assembler warning.
5746
a1fbd858
UD
57472004-10-28 Jakub Jelinek <jakub@redhat.com>
5748
5749 * pthread_create.c (__pthread_create_2_1): Avoid leaking stacks
5750 if sched_priority is not between minprio and maxprio.
5751
c2a4357a
UD
57522004-10-25 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5753
5754 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
5755 (__pthread_cond_timedwait): Use clock_gettime syscall if exists.
5756
5757 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
5758 (__lll_mutex_timedlock_wait): Fix a bad branch condition.
5759
78d8d211
UD
57602004-10-24 Ulrich Drepper <drepper@redhat.com>
5761
5762 * sysdeps/unix/sysv/linux/smp.h (is_smp_system): Use
5763 not-cancelable I/O functions.
5764
dd28590f
UD
57652004-10-21 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5766
5767 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
5768 (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
5769 make sure 2 is stored in the futex and we looked at the old value.
5770 Fix a few other problems to return the correct value.
5771
f8c97af7
RH
57722004-10-14 Richard Henderson <rth@redhat.com>
5773
5774 * sysdeps/alpha/tcb-offsets.sym (thread_offsetof): Redefine to
5775 make gcc4 happy.
5776
3feb8efa
UD
57772004-10-06 Jakub Jelinek <jakub@redhat.com>
5778
5779 * sysdeps/unix/sysv/linux/jmp-unwind.c: Include pthreadP.h instead
5780 of pthread-functions.h and pthreaddef.h.
5781 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Likewise.
5782
5783 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
5784 Change __data.__nwaiters from int to unsigned int.
5785
5786 * tst-clock2.c (do_test): Don't fail if _POSIX_THREAD_CPUTIME == 0 and
5787 sysconf (_SC_THREAD_CPUTIME) returns negative value.
5788
5789 * allocatestack.c (__find_thread_by_id): Move attribute_hidden
5790 before return type.
5791
5792 * sysdeps/s390/jmpbuf-unwind.h: Include bits/wordsize.h.
5793 (JMPBUF_CFA_UNWINDS_ADJ): Subtract 96 resp. 160 bytes from CFA.
5794
67060ef5
UD
57952004-10-06 Ulrich Drepper <drepper@redhat.com>
5796
5797 * tst-cancel4.c (tf_msgrcv): Check for failure in msgget. If the
5798 test fails, remove message queue.
5799 (tf_msgsnd): Likewise.
5800
f38a3086
UD
58012004-10-05 Jakub Jelinek <jakub@redhat.com>
5802
5803 * tst-clock1.c: Change #ifdef to #if defined.
5804 * tst-clock2.c: Likewise.
5805 * tst-cond11.c: Likewise.
5806
2c03b6db
UD
5807 * sysdeps/pthread/timer_create.c (timer_create): Use
5808 defined _POSIX_CPUTIME && _POSIX_CPUTIME >= 0 instead of
5809 defined CLOCK_PROCESS_CPUTIME_ID #ifs and similarly for
5810 THREAD_CPUTIME.
5811
6ab5f50d
UD
58122004-10-05 Jakub Jelinek <jakub@redhat.com>
5813
5814 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h (_POSIX_CPUTIME,
5815 _POSIX_THREAD_CPUTIME): Define to 0.
5816
e4bb4853
UD
58172004-10-04 Ulrich Drepper <drepper@redhat.com>
5818
5819 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Define _POSIX_CPUTIME
5820 and _POSIX_THREAD_CPUTIME to zero.
5821 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
5822 * tst-barrier2.c: Fix testing for POSIX feature.
5823 * tst-clock1.c: Likewise.
5824 * tst-clock2.c: Likewise.
5825 * tst-cond11.c: Likewise.
5826 * tst-cond4.c: Likewise.
5827 * tst-cond6.c: Likewise.
5828 * tst-flock2.c: Likewise.
5829 * tst-mutex4.c: Likewise.
5830 * tst-mutex9.c: Likewise.
5831 * tst-rwlock12.c: Likewise.
5832 * tst-rwlock4.c: Likewise.
5833 * tst-signal1.c: Likewise.
5834 * tst-spin2.c: Likewise.
5835 * sysdeps/pthread/posix-timer.h: Likewise.
5836 * sysdeps/pthread/timer_create.c: Likewise.
5837 * sysdeps/pthread/timer_routines.c: Likewise.
5838
c1b48791
UD
58392004-10-01 Ulrich Drepper <drepper@redhat.com>
5840
927f0673
UD
5841 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
5842 (__lll_mutex_timedlock_wait): Address futex correctly.
5843
c1b48791 5844 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
b610fa2d 5845 (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
c1b48791
UD
5846 make sure 2 is stored in the futex and we looked at the old value.
5847 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
5848 (__lll_mutex_timedlock_wait): Likewise. Fix a few other problems
5849 which might very well made the code not working at all before.
7b87aca6 5850 [BZ #417]
c1b48791 5851
e9f4e844
UD
58522004-09-28 Ulrich Drepper <drepper@redhat.com>
5853
4f21c95d
UD
5854 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
5855 allow SIGSETXID to be sent.
5856 * sysdeps/pthread/sigaction.c (__sigaction): Don't allow action
5857 for SIGSETXID to be defined.
5858 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
5859 SIGSETXID cannot be blocked.
5860
e9f4e844
UD
5861 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
5862 Add __extension__ to long long types.
5863 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5864 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5865 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5866 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5867 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
5868 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
5869 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5870
5f66b766
UD
58712004-09-25 Ulrich Drepper <drepper@redhat.com>
5872
5873 * descr.h (struct pthread): Add stopped_start field.
5874 * sysdeps/pthread/createthread.c (create_thread): Set
5875 start_stopped flag in descriptor for new thread appropriately.
5876 * pthread_create.c (start_thread): Only take lock to be stopped on
5877 startup if stopped_start flag says so.
5878
362038b0
UD
58792004-09-24 Ulrich Drepper <drepper@redhat.com>
5880
3f80a99b
UD
5881 * pthread_create.c (__pthread_create_2_1): Remember whether thread
5882 is created detached and if yes, do not try to free the stack in case
5883 the thread creation failed.
5884 * sysdeps/pthread/createthread.c (do_clone): Free stack here if clone
5885 call fails. Don't depend on INTERNAL_SYSCALL_ERRNO return zero in
5886 case there has been no error. [BZ #405]
5887
362038b0
UD
5888 * pthread_create.c (start_thread): Don't wait for scheduler data
5889 etc to be set at the beginning of the function. The cancellation
5890 infrastructure must have been set up. And enable async
5891 cancellation before potentially going to sleep. [BZ #401]
5892
65f0beb9
UD
58932004-09-20 Ulrich Drepper <drepper@redhat.com>
5894
3c12b91a 5895 * Versions: Remove exports for pthread_set*id_np functions.
65f0beb9
UD
5896 * sysdeps/pthread/pthread.h: Remove pthread_set*id_np prototypes
5897 for now.
5898 * Makefile: Don't build pthread_set*id code for now.
5899
2edb61e3
UD
59002004-09-19 Ulrich Drepper <drepper@redhat.com>
5901
5902 * sysdeps/unix/sysv/linux/allocrtsig.c: Allocate second signal for
5903 internal use.
5904 * allocatestack.c (__nptl_setxid): New function.
5905 * descr.h (struct xid_command): Define type.
5906 * init.c (pthread_functions): Add ptr__nptl_setxid initialization.
5907 (sighandler_setxid): New function.
5908 (__pthread_initialize_minimal): Register sighandler_setxid for
5909 SIGCANCEL.
5910 * pt-allocrtsig.c: Update comment.
5911 * pthreadP.h: Define SIGSETXID. Declare __xidcmd variable.
5912 Declare __nptl_setxid.
5913 * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_setxid.
5914 * sysdeps/pthread/pthread.h: Declare pthread_setgid_np,
5915 pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
5916 pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
5917 and pthread_setresuid_np.
5918 * pthread_setgid_np.c: New file.
5919 * pthread_setuid_np.c: New file.
5920 * pthread_setegid_np.c: New file.
5921 * pthread_seteuid_np.c: New file.
5922 * pthread_setregid_np.c: New file.
5923 * pthread_setreuid_np.c: New file.
5924 * pthread_setresgid_np.c: New file.
5925 * pthread_setresuid_np.c: New file.
5926 * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setgid_np,
5927 pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
5928 pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
5929 and pthread_setresuid_np.
5930 * Makefile (libpthread-routines): Add pthread_setuid, pthread_seteuid,
5931 pthread_setreuid, pthread_setresuid, pthread_setgid, pthread_setegid,
5932 pthread_setregid, and pthread_setresgid.
5933
1ab1fa6f
UD
59342004-09-18 Ulrich Drepper <drepper@redhat.com>
5935
5936 * allocatestack.c (allocate_stack): Return EAGAIN instead of
5937 ENOMEM when out of memory.
5938
ae9e6b36
RM
59392004-09-10 Roland McGrath <roland@redhat.com>
5940
5941 [BZ #379]
5942 * allocatestack.c (allocate_stack): Remove [__ASSUME_CLONE_STOPPED]
5943 code, since we don't try to use the broken CLONE_STOPPED any more.
5944 * pthread_create.c (start_thread): Likewise.
5945
424bd2f8
RH
59462004-09-15 Richard Henderson <rth@redhat.com>
5947
5948 * sysdeps/unix/sysv/linux/alpha/vfork.S: Use libc_hidden_def.
5949
17b8a52d
UD
59502004-09-01 David Mosberger <davidm@hpl.hp.com>
5951
5952 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h
5953 (__libc_unwind_longjmp): Delete macro and declare as function.
5954 * sysdeps/unix/sysv/linux/ia64/Makefile (sysdep_routines): Mention
5955 __ia64_longjmp, sigstack_longjmp, and __sigstack_longjmp for
5956 nptl directory.
5957 * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S: New file.
5958 * sysdeps/unix/sysv/linux/ia64/__sigstack_longjmp.c: New file.
5959 * sysdeps/unix/sysv/linux/ia64/unwind_longjmp.c: New file.
5960
ccc63b07
UD
59612004-09-12 Ulrich Drepper <drepper@redhat.com>
5962
5963 * sysdeps/pthread/pthread.h: Make rwlock prototypes available also
5964 for __USE_XOPEN2K.
5965 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define rwlock
5966 types also for __USE_XOPEN2K.
5967 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
5968 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5969 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5970 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5971 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
5972 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5973 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5974 [BZ #320]
5975
31f93b3b
UD
59762004-09-08 Ulrich Drepper <drepper@redhat.com>
5977
5978 * sysdeps/pthread/pthread.h
5979 (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Make safe for C++.
5980 (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
5981 (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
5982 (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Likewise.
5983 [BZ #375]
5984
e0329987
UD
59852004-09-07 Ulrich Drepper <drepper@redhat.com>
5986
590b40f7
UD
5987 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Allow
5988 PSEUDO to be used with . prefix.
5989
67254a97
UD
5990 * sysdeps/unix/sysv/linux/alpha/pthread_once.c (__pthread_once):
5991 Use atomic_increment instead of atomic_exchange_and_add.
5992 * sysdeps/unix/sysv/linux/sparc/pthread_once.c (__pthread_once):
5993 Likewise.
5994 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
5995 Likewise.
5996 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
5997 Likewise.
5998
5999 * allocatestack.c (allocate_stack): Use atomic_increment_val
6000 instead of atomic_exchange_and_add.
6001 * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Likewise.
6002 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
6003 Likewise.
6004 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
6005 Likewise.
6006
e0329987
UD
6007 * sysdeps/pthread/pthread.h (pthread_once): Remove __THROW since
6008 the initialization function might throw.
6009
42d86dd6 60102005-09-05 Richard Henderson <rth@redhat.com>
e0329987 6011
42d86dd6
RH
6012 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
6013 Move definition inside libpthread, libc, librt check. Provide
6014 definition for rtld.
6015
73f7c32c
UD
60162004-09-02 Ulrich Drepper <drepper@redhat.com>
6017
f76c8499
UD
6018 * sysdeps/alpha/jmpbuf-unwind.h: Define __libc_unwind_longjmp.
6019 * sysdeps/i386/jmpbuf-unwind.h: Likewise
6020 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
6021 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
6022 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
6023 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
6024 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
6025 * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
6026 * unwind.c: Use it.
6027
73f7c32c
UD
6028 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
6029 Rename __data.__clock to __data.__nwaiters, make it unsigned int.
6030 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
6031 Likewise.
6032 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
6033 Decrement __nwaiters. If pthread_cond_destroy has been called and
6034 this is the last waiter, signal pthread_cond_destroy caller and
6035 avoid using the pthread_cond_t structure after unlock.
6036 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6037 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6038 Read clock type from the least significant bits of __nwaiters instead
6039 of __clock.
6040 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6041 * sysdeps/unix/sysv/linux/internaltypes.h: Define COND_CLOCK_BITS.
6042
60432004-08-31 Jakub Jelinek <jakub@redhat.com>
6044
6045 [BZ #342]
6046 * Makefile (tests): Add tst-cond20 and tst-cond21.
6047 * tst-cond20.c: New test.
6048 * tst-cond21.c: New test.
6049 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
6050 (pthread_cond_t): Rename __data.__clock to __data.__nwaiters, make
6051 it unsigned int.
6052 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
6053 Likewise.
6054 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
6055 (pthread_cond_t): Likewise.
6056 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
6057 Likewise.
6058 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
6059 Likewise.
6060 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
6061 Likewise.
6062 * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_clock): Remove.
6063 (cond_nwaiters): New.
6064 (clock_bits): New.
6065 * pthread_cond_destroy.c (__pthread_cond_destroy): Return EBUSY
6066 if there are waiters not signalled yet.
6067 Wait until all already signalled waiters wake up.
6068 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Decrement
6069 __nwaiters. If pthread_cond_destroy has been called and this is the
6070 last waiter, signal pthread_cond_destroy caller and avoid using
6071 the pthread_cond_t structure after unlock.
6072 (__pthread_cond_wait): Increment __nwaiters in the beginning,
6073 decrement it when leaving. If pthread_cond_destroy has been called
6074 and this is the last waiter, signal pthread_cond_destroy caller.
6075 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
6076 Likewise. Read clock type from the least significant bits of
6077 __nwaiters instead of __clock.
6078 * pthread_condattr_setclock.c (pthread_condattr_setclock): Check
6079 whether clock ID can be encoded in COND_CLOCK_BITS bits.
6080 * pthread_condattr_getclock.c (pthread_condattr_getclock): Decode
6081 clock type just from the last COND_CLOCK_BITS bits of value.
6082 * pthread_cond_init.c (__pthread_cond_init): Initialize __nwaiters
6083 instead of __clock, just from second bit of condattr's value.
6084
409f7493
UD
60852004-08-30 Jakub Jelinek <jakub@redhat.com>
6086
6087 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Include
6088 bits/wordsize.h. Make the header match i386 header when __WORDSIZE
6089 != 64.
6090 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
6091
92c6ccd1
RM
60922004-08-15 Roland McGrath <roland@frob.com>
6093
6094 * pthread_atfork.c: Update copyright terms including special exception
6095 for these trivial files, which are statically linked into executables
6096 that use dynamic linking for the significant library code.
6097
4d004cfb
UD
60982004-08-09 Jakub Jelinek <jakub@redhat.com>
6099
6100 * DESIGN-rwlock.txt: Add decreasing of nr_readers_queued to
6101 pthread_rwlock_rdlock.
6102 * sysdeps/pthread/pthread_rwlock_rdlock (__pthread_rwlock_rdlock):
6103 Decrease __nr_readers_queued after reacquiring lock.
6104 * sysdeps/pthread/pthread_rwlock_timedrdlock
6105 (pthread_rwlock_timedrdlock): Likewise.
6106 Reported by Bob Cook <bobcook47@hotmail.com>.
6107
90595fb6
RM
61082004-08-11 Jakub Jelinek <jakub@redhat.com>
6109
6110 * tst-rwlock14.c (tf): Read main thread handle from *ARG
6111 before pthread_barrier_wait.
6112
fa46f7ab
UD
61132004-08-07 Ulrich Drepper <drepper@redhat.com>
6114
6115 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
6116 Remove unnecessary exception handling data.
6117
15ef4b55
UD
61182004-07-23 Jakub Jelinek <jakub@redhat.com>
6119
6120 [BZ #284]
6121 * sysdeps/pthread/pthread.h (pthread_getcpuclockid): Use __clockid_t
6122 instead of clockid_t.
6123
4fb907b7
RM
61242004-07-21 Roland McGrath <roland@redhat.com>
6125
6126 * Makefile ($(objpfx)multidir.mk): Use $(make-target-directory).
6127
61282004-07-19 Roland McGrath <roland@redhat.com>
6129
6130 * tst-cancel4.c (tf_waitid): Use WEXITED flag bit if available.
6131
8f73811b
RM
61322004-07-02 Roland McGrath <roland@redhat.com>
6133
6134 * configure: Don't exit.
6135
290639c3
UD
61362004-07-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6137
6138 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
6139 (__pthread_cond_timedwait): Check for invalid nanosecond in
6140 timeout value.
6141
8e5aaad9
UD
61422004-07-07 Ulrich Drepper <drepper@redhat.com>
6143
6144 * Makefile: Add rules to build and run tst-fini1.
6145 * tst-fini1.c: New file.
6146 * tst-fini1mod.c: New file.
6147
ce6e047f
UD
61482004-07-05 Ulrich Drepper <drepper@redhat.com>
6149
6150 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define NO_CANCELLATION
6151 if no cancellation support is needed.
6152 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
6153 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
6154 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
6155 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
6156 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
6157 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
6158 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
6159 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
6160 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
6161
6162 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define __NR_futex
6163 only if not already defined.
6164
9b9ef823
UD
61652004-07-05 Jakub Jelinek <jakub@redhat.com>
6166
2dd18ce2
UD
6167 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_unlock): Use
6168 constraint "m" instead of "0" for futex.
6169
9b9ef823
UD
6170 * shlib-versions: Add powerpc64-.*-linux.*.
6171
38205402
UD
61722004-07-04 Jakub Jelinek <jakub@redhat.com>
6173
6174 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
6175 (pthread_rwlock_timedrdlock): Use cmpq instead of cmpl to check
6176 for valid tv_nsec.
6177 * tst-rwlock14.c (do_test): Test for invalid tv_nsec equal to
6178 1 billion and 64-bit tv_nsec which is valid when truncated to 32
6179 bits.
6180
78a9c837
RM
61812004-06-29 Roland McGrath <roland@redhat.com>
6182
6183 * Banner: NPTL no longer has its own version number.
6184 * Makefile (nptl-version): Variable removed.
6185 * sysdeps/pthread/Makefile (CFLAGS-confstr.c): Set LIBPTHREAD_VERSION
6186 using $(version), the glibc version number.
6187
d3d35527
UD
61882004-06-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6189
6190 * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
6191 Fix branch offset for a PLT entry.
6192 * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
6193 Likewise.
6194 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
6195 Likewise.
6196 * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
6197 Likewise.
6198 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait):
6199 Likewise.
6200
346f18ae
UD
62012004-06-28 Jakub Jelinek <jakub@redhat.com>
6202
6203 * sysdeps/alpha/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define
6204 unconditionally.
6205
f3a19754
UD
62062004-06-28 Jakub Jelinek <jakub@redhat.com>
6207
6208 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
6209 (pthread_rwlock_timedwrlock): Return EINVAL if tv_nsec is negative,
6210 instead of tv_sec.
6211 * sysdeps/pthread/pthread_rwlock_timedrdlock.c
6212 (pthread_rwlock_timedrdlock): Likewise.
6213
539842a4
UD
62142004-06-22 Jakub Jelinek <jakub@redhat.com>
6215
6216 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
6217 Set __r7 to val, not mutex.
6218
46f4c578
UD
62192004-06-27 Ulrich Drepper <drepper@redhat.com>
6220
6221 * Makefile: Add rules to build tst-rwlock14.
6222 * tst-rwlock14.c: New file.
6223
62242004-06-24 Boris Hu <boris.hu@intel.com>
6225
6226 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Add timeout validation
6227 check.
6228 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
6229
9898e99c
AJ
62302004-06-19 Andreas Jaeger <aj@suse.de>
6231
6232 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix
6233 assembler in last patch.
6234
7c3164bc
UD
62352004-06-17 Ulrich Drepper <drepper@redhat.com>
6236
6237 * sysdeps/pthread/pthread_cond_timedwait.c
6238 (__pthread_cond_timedwait): Also check for negativ nanoseconds.
6239 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6240 (__pthread_cond_timedwait): Check for invalid nanosecond in
6241 timeout value.
6242 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6243 * tst-cond19.c: New file.
6244 * Makefile: Add rules to build and run tst-cond19.
6245
72e61500
UD
62462004-06-15 Steven Munroe <sjmunroe@us.ibm.com>
6247
6248 * tst-context1.c (GUARD_PATTERN): Defined.
6249 (tst_context_t): Define struct containing ucontext_t & guard words.
6250 (ctx): Declare as an array of tst_context_t.
6251 (fct): Verify uc_link & guard words are still valid.
6252 (tf): Initialize guard words in ctx. Adjust ctx refs for new struct.
6253
7c370086
UD
62542004-06-13 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6255
6256 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
6257 Add __data.__futex field, reshuffle __data.__clock.
6258 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
6259 (__pthread_cond_signal): Increment __futex at the same time as
6260 __wakeup_seq or __total_seq. Pass address of __futex instead of
6261 address of low 32-bits of __wakeup_seq to futex syscall.
6262 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
6263 (__pthread_cond_wait): Likewise. Pass __futex value from before
6264 releasing internal lock to FUTEX_WAIT.
6265 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
6266 (__pthread_cond_timedwait): Likewise.
6267 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
6268 (FUTEX_CMP_REQUEUE): Define.
6269 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
6270 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
6271 Pass __futex value from before the unlock and __futex address instead
6272 of address of low 32-bits of __wakeup_seq to futex syscall.
6273 Fallback to FUTEX_WAKE all on any errors.
6274
a9e526e7
RM
62752004-06-08 Jakub Jelinek <jakub@redhat.com>
6276
6277 * pthread_mutexattr_getpshared.c (pthread_mutex_getpshared): Fix
6278 comment typo.
6279 * pthread_mutexattr_gettype.c (pthread_mutexattr_gettype): Likewise.
6280 * pthread_mutexattr_init.c (__pthread_mutexattr_init): Likewise.
6281 * pthread_mutexattr_settype.c (__pthread_mutexattr_settype): Likewise.
6282 * pthread_mutexattr_setpshared.c (pthread_mutexattr_setpshared):
6283 Likewise. Reported by Bob Cook <bobcook47@hotmail.com>.
6284
f1847a84
RM
62852004-06-11 Martin Schwidefsky <schwidefsky@de.ibm.com>
6286
6287 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_compare_and_swap):
6288 Add memory clobber to inline assembly.
6289 (__lll_mutex_trylock): Likewise.
6290 (__lll_mutex_cond_trylock): Likewise.
6291
f7c81e1a
UD
62922004-06-07 Martin Schwidefsky <schwidefsky@de.ibm.com>
6293
6294 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
6295 Pass val argument as 6th system call argument in %r7.
6296
75fccede
UD
62972004-05-21 Jakub Jelinek <jakub@redhat.com>
6298
6299 * Makefile (tests): Add tst-cond16.
6300 * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_futex): Add.
6301 * pthread_cond_init.c (__pthread_cond_init): Clear __data.__futex.
6302 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
6303 Add __data.__futex field, reshuffle __data.__clock.
6304 * sysdeps/unix/sysv/linux/i386/pthread_cond_signal.S
6305 (__pthread_cond_signal): Increment __futex at the same time as
6306 __wakeup_seq or __total_seq. Pass address of __futex instead of
6307 address of low 32-bits of __wakeup_seq to futex syscall.
6308 * sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S
6309 (__pthread_cond_wait): Likewise. Pass __futex value from before
6310 releasing internal lock to FUTEX_WAIT.
6311 * sysdeps/unix/sysv/linux/i386/pthread_cond_timedwait.S
6312 (__pthread_cond_timedwait): Likewise.
6313 * sysdeps/unix/sysv/linux/i386/pthread_cond_broadcast.S
6314 (FUTEX_CMP_REQUEUE): Define.
6315 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
6316 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
6317 Pass __futex value from before the unlock and __futex address instead
6318 of address of low 32-bits of __wakeup_seq to futex syscall.
6319 Fallback to FUTEX_WAKE all on any errors.
6320 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_CMP_REQUEUE):
6321 Define.
6322 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
6323 internally. Return non-zero if error, zero if success.
6324 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
6325 Add __data.__futex field, reshuffle __data.__clock.
6326 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_CMP_REQUEUE):
6327 Define.
6328 (lll_futex_requeue): Add val argument, return 1 unconditionally
6329 for the time being.
6330 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
6331 Add __data.__futex field, reshuffle __data.__clock.
6332 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_CMP_REQUEUE):
6333 Define.
6334 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
6335 internally. Return non-zero if error, zero if success.
6336 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
6337 (pthread_cond_t): Add __data.__futex field, reshuffle __data.__clock.
6338 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_CMP_REQUEUE):
6339 Define.
6340 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
6341 internally. Return non-zero if error, zero if success.
6342 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
6343 Add __data.__futex field, reshuffle __data.__clock.
6344 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_CMP_REQUEUE):
6345 Define.
6346 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
6347 internally. Return non-zero if error, zero if success.
6348 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
6349 Add __data.__futex field, reshuffle __data.__clock.
6350 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
6351 Add __data.__futex field, reshuffle __data.__clock.
6352 * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal):
6353 Increment __futex at the same time as __wakeup_seq or __total_seq.
6354 Pass address of __futex instead of address of low 32-bits of
6355 __wakeup_seq to futex syscall.
6356 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
6357 Pass __futex value from before releasing internal lock
6358 to FUTEX_WAIT.
6359 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
6360 Likewise. Avoid unnecessary shadowing of variables.
6361 * sysdeps/pthread/pthread_cond_broadcast.c (__pthread_cond_broadcast):
6362 Set __futex to 2 * __total_seq. Pass __futex value from before the
6363 unlock and __futex address instead of address of low 32-bits of
6364 __wakeup_seq to futex_requeue macro, adjust for new return value
6365 meaning.
6366 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
6367 (__pthread_cond_signal): Increment __futex at the same time as
6368 __wakeup_seq or __total_seq. Pass address of __futex instead of
6369 address of low 32-bits of __wakeup_seq to futex syscall.
6370 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
6371 (__pthread_cond_wait): Likewise. Pass __futex value from before
6372 releasing internal lock to FUTEX_WAIT.
6373 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
6374 (__pthread_cond_timedwait): Likewise.
6375 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
6376 (FUTEX_CMP_REQUEUE): Define.
6377 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
6378 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
6379 Pass __futex value from before the unlock and __futex address instead
6380 of address of low 32-bits of __wakeup_seq to futex syscall.
6381 Fallback to FUTEX_WAKE all on any errors.
6382
63832004-06-03 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6384
6385 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_mutex_lock):
6386 Add nop to align the end of critical section.
6387 (lll_mutex_cond_lock, lll_mutex_timedlock): Likewise.
6388
fbf86dda
UD
63892004-06-01 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6390
6391 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
6392 Add __broadcast_seq field.
6393 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Mark
6394 all waiters as woken with woken_seq and bump broadcast counter.
6395 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use new
6396 __broadcast_seq. Increment __woken_seq correctly when cleanuped.
6397 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
6398 Comment typo fixes. Avoid returning -ETIMEDOUT.
6399
64002004-06-01 Ulrich Drepper <drepper@redhat.com>
6401
6402 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6403 (__condvar_tw_cleanup): Fix access to saved broadcast_seq value.
6404 Reported by Kaz Kojima.
6405
ffdd5e50
UD
64062004-05-25 Jakub Jelinek <jakub@redhat.com>
6407
6408 * sysdeps/unix/sysv/linux/aio_misc.h: New file.
6409
3abc82c8
UD
64102004-05-21 Jakub Jelinek <jakub@redhat.com>
6411
6412 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Compare
6413 __broadcast_seq with bc_seq after acquiring internal lock instead of
6414 before it.
6415
893a3511
UD
64162004-05-18 Jakub Jelinek <jakub@redhat.com>
6417
6418 * Makefile (.NOTPARALLEL): Only serialize make check/xcheck, not
6419 compilation.
6420 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6421 (__pthread_cond_timedwait): Avoid returning -ETIMEDOUT.
6422 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
6423 (pthread_cond_t): Add __data.__broadcast_seq field.
6424 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
6425 (FRAME_SIZE): Define.
6426 (__pthread_cond_timedwait): Use it. Store/check broadcast_seq.
6427 Comment typo fixes.
6428 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S (FRAME_SIZE):
6429 Define.
6430 (__pthread_cond_wait): Use it. Store/check broadcast_seq. Comment
6431 typo fixes.
6432 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
6433 (__pthread_cond_broadcast): Increment broadcast_seq. Comment typo
6434 fixes.
6435
64362004-05-18 Ulrich Drepper <drepper@redhat.com>
6437
6438 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add broadcast_seq entry.
6439 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
6440 Add __broadcast_seq field.
6441 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6442 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6443 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
6444 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
6445 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6446 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Mark
6447 all waiters as woken with woken_seq and bump broadcast counter.
6448 * sysdeps/pthread/pthread_cond_broadcast.c: Likewise.
6449 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use new
6450 __broadcast_seq field.
6451 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6452 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
6453 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
6454 * pthread_cond_init.c: Initialize __broadcast_seq field.
6455 * Makefile (tests): Add tst-cond17 and tst-cond18.
6456 Add .NOTPARALLEL goal.
6457 * tst-cond16.c: New file. From Jakub.
6458 * tst-cond17.c: New file. From Jakub.
6459 * tst-cond18.c: New file. From Jakub.
6460
4123718e
UD
64612004-05-16 Ulrich Drepper <drepper@redhat.com>
6462
6463 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Correct some
6464 unwind info.
6465
6466 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
6467 Parametrize frame size. Correct some unwind info.
6468 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6469
2d7ae210
UD
64702004-05-04 Jakub Jelinek <jakub@redhat.com>
6471
6472 * tst-stack3.c: Note testing functionality beyond POSIX.
6473
50c2b6d7
UD
64742004-05-04 Jakub Jelinek <jakub@redhat.com>
6475
6476 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (USE___THREAD):
6477 Change conditional from ifdef to if.
6478
27b02589
UD
64792004-04-23 Jakub Jelinek <jakub@redhat.com>
6480
6481 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SYSDEP_CANCEL_ERRNO,
6482 SYSDEP_CANCEL_ERROR): Define.
6483 (PSEUDO): Use it.
6484
4bb8fc33
UD
64852004-05-01 Jakub Jelinek <jakub@redhat.com>
6486
6487 * Versions (libpthread): Remove __pthread_cleanup_upto@@GLIBC_PRIVATE.
6488
f9a06dc1
UD
64892004-04-20 Jakub Jelinek <jakub@redhat.com>
6490
6491 * sem_unlink.c (sem_unlink): Change EPERM into EACCES.
6492
d3b52028
UD
64932004-04-19 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6494
6495 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Add frame info.
6496 Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
6497 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Remove unneeded frame
6498 info. Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
6499
a5dd0a6c
UD
65002004-04-19 Ulrich Drepper <drepper@redhat.com>
6501
6502 * sysdeps/unix/sysv/linux/timer_routines.c: Make sure helper
6503 thread has all signals blocked.
6504
620c3354
AJ
65052004-04-18 Andreas Jaeger <aj@suse.de>
6506
6507 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h
6508 (SEM_VALUE_MAX): Add missing brace.
6509
1683daeb
UD
65102004-04-17 Jakub Jelinek <jakub@redhat.com>
6511
6512 * sysdeps/pthread/Makefile (tests): Add tst-mqueue8x
6513 in rt subdir.
6514 (CFLAGS-tst-mqueue8x.c): Add -fexceptions.
6515 * sysdeps/pthread/tst-mqueue8x.c: New test.
6516 * tst-cancel4.c: Update comment about message queues.
6517
6518 * sysdeps/pthread/timer_gettime.c (timer_gettime): For expired timer
6519 return it_value { 0, 0 }.
6520 * sysdeps/pthread/timer_create.c (timer_create): Handle SIGEV_NONE
6521 like SIGEV_SIGNAL.
6522 * sysdeps/pthread/timer_routines.c (thread_expire_timer): Remove
6523 assertion for SIGEV_NONE.
6524 (thread_attr_compare): Compare all attributes, not just a partial
6525 subset.
6526
65272004-04-17 Jakub Jelinek <jakub@redhat.com>
6528
6529 * sysdeps/unix/sysv/linux/mq_notify.c: Include stdlib.h.
6530
f532641d
UD
65312004-04-17 Ulrich Drepper <drepper@redhat.com>
6532
6533 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h (SEM_VALUE_MAX):
6534 Just use a plain number.
6535 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
6536 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
6537 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
6538 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
6539 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
6540 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
6541 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
6542
7eb7fdda
UD
65432004-04-16 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6544
53392906
UD
6545 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Remove unneeded
6546 frame info.
6547 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7eb7fdda 6548
d7ba1313
UD
65492004-04-15 Jakub Jelinek <jakub@redhat.com>
6550
6551 * sysdeps/unix/sysv/linux/timer_routines.c: Include errno.h.
6552 (timer_helper_thread): Use inline rt_sigtimedwait syscall instead
6553 of calling sigwaitinfo.
6554
5adac0e4
UD
65552004-04-16 Ulrich Drepper <drepper@redhat.com>
6556
6557 * allocatestack.c (allocate_stack): Set reported_guardsize
6558 unconditionally.
6559 * pthread_getattr_np.c (pthread_getattr_np): Use
6560 reported_guardsize instead of guardsize.
6561 * descr.h (struct pthread): Add reported_guardsize field.
6562
f93fa7d4
UD
65632004-04-13 Jakub Jelinek <jakub@redhat.com>
6564
6565 * sysdeps/unix/sysv/linux/mq_notify.c: Shut up GCC warning.
6566
1b82c6c7
UD
65672004-04-12 Ulrich Drepper <drepper@redhat.com>
6568
6569 * sysdeps/unix/sysv/linux/mq-notify.c: New file.
6570
65712004-04-08 Jakub Jelinek <jakub@redhat.com>
6572
6573 * sysdeps/unix/sysv/linux/bits/local_lim.h (MQ_PRIO_MAX): Define.
6574 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h (MQ_PRIO_MAX): Define.
6575 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h (MQ_PRIO_MAX): Define.
6576 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h (MQ_PRIO_MAX): Define.
6577 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
6578 Define.
6579 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
6580 (_POSIX_MESSAGE_PASSING): Define.
6581 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h
6582 (_POSIX_MESSAGE_PASSING): Define.
6583 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h
6584 (_POSIX_MESSAGE_PASSING): Define.
6585
e6eb894e
UD
65862004-04-04 Ulrich Drepper <drepper@redhat.com>
6587
6588 * tst-context1.c (fct): Check whether correct stack is used.
6589
1e084487
UD
65902004-04-03 Ulrich Drepper <drepper@redhat.com>
6591
4e73e115
UD
6592 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Never use
6593 matching constraints for asm mem parameters.
6594
1e084487
UD
6595 * tst-clock2.c (tf): Don't define unless needed.
6596
feca5e0b
UD
65972004-03-30 H.J. Lu <hongjiu.lu@intel.com>
6598
6599 * Makefile (link-libc-static): Use $(static-gnulib) instead of
6600 $(gnulib).
6601
3fa21fd8
UD
66022004-03-30 Ulrich Drepper <drepper@redhat.com>
6603
6604 * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_deallocate_tsd.
6605 * init.c (pthread_functions): Add ptr__nptl_deallocate_tsd.
6606 * pthreadP.h: Declare __nptl_deallocate_tsd.
6607 * pthread_create.c (deallocate_tsd): Remove to __nptl_deallocate_tsd.
6608 Adjust caller.
6609
6610 * Makefile (tests): Add tst-tsd5.
6611 * tst-tsd5.c: New file.
6612
8e32efa6
UD
66132004-03-29 Ulrich Drepper <drepper@redhat.com>
6614
6615 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
6616 (__pthread_attr_setaffinity_old): Prepend GLIBC_ to version names
6617 is SHLIB_COMPAT check.
6618 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
6619 (__pthread_attr_getaffinity_old): Likewise.
6620 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
6621 (__pthread_getaffinity_old): Likewise.
6622 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
6623 (__pthread_setaffinity_old): Likewise.
6624
eec8b6ca
UD
66252004-03-26 Ulrich Drepper <drepper@redhat.com>
6626
6627 * allocatestack.c (_make_stacks_executable): Call
6628 _dl_make_stack_executable first.
6629
db2f05ba
RM
66302004-03-24 Roland McGrath <roland@redhat.com>
6631
6632 * sysdeps/i386/pthread_spin_lock.c (pthread_spin_lock): Use "m"
6633 constraint instead of "0".
6634
6abbc501
UD
66352004-03-24 Ulrich Drepper <drepper@redhat.com>
6636
68dc4dcb
UD
6637 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
6638 (lll_mutex_cond_trylock): Define as wrapper around __lll_cond_trylock.
6639
6abbc501
UD
6640 * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Reorganize
6641 code to avoid warning.
6642
865e14d9
AJ
66432004-03-24 Andreas Jaeger <aj@suse.de>
6644
6645 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
6646 (__pthread_attr_setaffinity_old): Remove const.
6647
16b06b70
UD
66482004-03-23 Ulrich Drepper <drepper@redhat.com>
6649
2c0b891a
UD
6650 * sysdeps/unix/sysv/linux/smp.h: New file.
6651 * sysdeps/unix/sysv/linux/sh/smp.h: New file.
6652 * init.c: Define __is_smp.
6653 (__pthread_initialize_minimal_internal): Call is_smp_system to
6654 initialize __is_smp.
6655 * pthreadP.h: Declare __is_smp.
6656 Define MAX_ADAPTIVE_COUNT is necessary.
6657 * pthread_mutex_init.c: Add comment regarding __spins field.
6658 * pthread_mutex_lock.c: Implement adaptive mutex type.
6659 * pthread_mutex_timedlock.c: Likewise.
6660 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
6661 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
6662 Add __spins field.
6663 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
6664 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6665 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6666 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6667 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6668 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
6669 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6670 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define
6671 lll_mutex_cond_trylock.
6672 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6673 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6674 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6675 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
6676 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
6677 Define BUSY_WAIT_NOP.
6678 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6679 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6680
6681 * tst-mutex5.c: Add support for testing adaptive mutexes.
6682 * tst-mutex7.c: Likewise.
6683 * tst-mutex5a.c: New file.
6684 * tst-mutex7a.c: New file.
6685 * Makefile (tests): Add tst-mutex5a and tst-mutex7a.
6686
565699e4
UD
6687 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
6688 (__lll_mutex_timedlock_wait): Preserve r8 and r9 since the
6abbc501 6689 vgettimeofday call might destroy the content.
565699e4 6690
7fe1586f
UD
6691 * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use hint
6692 @pause in the loop.
6693
e408880b
UD
6694 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
6695 No need to restrict type of ret. Make it int. Add comment.
6696
16b06b70
UD
6697 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
6698 Remove unnecessary setne instruction.
6699
61645263
UD
67002004-03-22 Jakub Jelinek <jakub@redhat.com>
6701
6702 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
6703 (__pthread_getaffinity_new): Use INT_MAX instead of UINT_MAX.
6704 * pthread_getattr_np.c (pthread_getattr_np): Double size every cycle.
6705 If realloc fails, break out of the loop.
6706
e3d4c585
AJ
67072004-03-20 Andreas Jaeger <aj@suse.de>
6708
6709 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
6710 (__pthread_setaffinity_old): Fix interface.
6711 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
6712 (__pthread_getaffinity_old): Likewise.
6713
6714 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
6715 (__pthread_setaffinity_new): Remove duplicate declaration.
6716
3abb1ff7
UD
67172004-03-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6718
6719 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Save
6720 the return value to a safe register.
6721 (CDISABLE): Set the function argument correctly.
6722
07bd2a3f
UD
67232004-03-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6724
6725 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XCHG): Define.
6726 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
6727 Rewrite so that only one locked memory operation per round is needed.
6728 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
6729 (pthread_barrier_wait): After wakeup, release lock only when the
6730 last thread stopped using the barrier object.
6731 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
6732 (__pthread_cond_wait): Don't store mutex address if the current
6733 value is ~0l. Add correct cleanup support and unwind info.
6734 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
6735 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
6736 (__pthread_cond_broadcast): Don't use requeue for pshared condvars.
6737 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Update comment.
6738 * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
6739 Add correct cleanup support and unwind info.
6740 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
6741 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Add unwind
6742 information for syscall wrappers.
6743
14c35863
UD
67442004-03-18 Ulrich Drepper <drepper@redhat.com>
6745
6746 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
6747 cpusetsize field, remove next.
6748 * sysdeps/pthread/pthread.h (pthread_getaffinity_np): Add new second
6749 parameter for size of the CPU set.
6750 (pthread_setaffinity_np): Likewise.
6751 (pthread_attr_getaffinity_np): Likewise.
6752 (pthread_attr_setaffinity_np): Likewise.
6753 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: Implement
6754 interface change, keep compatibility code.
6755 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
6756 * sysdeps/unix/sysv/linux/pthread_getaffinity.c: Likewise.
6757 * sysdeps/unix/sysv/linux/pthread_setaffinity.c: Likewise.
6758 * pthreadP.h: Remove hidden_proto for pthread_getaffinity_np. Declare
6759 __pthread_getaffinity_np.
6760 * Versions: Add version for changed interfaces.
6761 * tst-attr3.c: Adjust test for interface change.
6762 * pthread_getattr_np.c: Query the kernel about the affinity mask with
6763 increasing buffer sizes.
6764 * pthread_attr_destroy.c: Remove unused list handling.
6765 * pthread_attr_init.c: Likewise.
6766
8e115d80
RM
67672004-03-17 Roland McGrath <roland@redhat.com>
6768
6769 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Pass missing
6770 first argument to clock_getres so we ever enable kernel timers.
6771
e3b22ad3
UD
67722004-03-15 Ulrich Weigand <uweigand@de.ibm.com>
6773
6774 * init.c (nptl_version): Add __attribute_used__ to nptl_version.
6775
841153fa
RH
67762004-03-12 Richard Henderson <rth@redhat.com>
6777
e3b22ad3
UD
6778 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Propagate
6779 oldvalue from CENABLE to CDISABLE.
841153fa 6780
932dfea7
UD
67812004-03-12 Ulrich Drepper <drepper@redhat.com>
6782
6783 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define HOST_NAME_MAX.
6784 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
6785 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
6786 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
6787
9852f6dc
RH
67882004-03-11 Richard Henderson <rth@redhat.com>
6789
6790 * sysdeps/alpha/tcb-offsets.sym (PID_OFFSET): New.
6791 * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: Save/restore PID.
6792 * sysdeps/unix/sysv/linux/alpha/vfork.S: New file.
6793
43513fb7
UD
67942004-03-11 Jakub Jelinek <jakub@redhat.com>
6795
6796 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Use jgnl
6797 instead of jnl instruction to jump to SYSCALL_ERROR_LABEL.
6798 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S (__vfork): Likewise.
6799
68002004-03-11 Jakub Jelinek <jakub@redhat.com>
6801
6802 * forward.c (__pthread_cond_broadcast_2_0,
6803 __pthread_cond_destroy_2_0, __pthread_cond_init_2_0,
6804 __pthread_cond_signal_2_0, __pthread_cond_wait_2_0,
6805 __pthread_cond_timedwait_2_0): Use return 0 as defaction instead of 0.
6806
8a3e10e0
UD
68072004-03-11 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6808
6809 * sysdeps/sh/tcb-offsets.sym: Add PID.
6810 * sysdeps/unix/sysv/linux/sh/pt-vfork.S: Properly handle PID cache.
6811 * sysdeps/unix/sysv/linux/sh/vfork.S: New file.
6812
6d3a2bec
UD
68132004-03-10 Ulrich Drepper <drepper@redhat.com>
6814
6815 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: No need to
6816 include <sysdep-cancel.h>, vfork is no cancellation point.
6817 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: Likewise.
6818 * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: Likewise.
6819 * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: Likewise.
6820
d3a4a571
UD
68212004-03-10 Jakub Jelinek <jakub@redhat.com>
6822
73b4ce64
UD
6823 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Add
6824 libc_hidden_def.
6825 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
6826 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
6827 Likewise.
6828 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S (__vfork):
6829 Likewise.
6830 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
6831 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
6832 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Include tcb-offsets.h.
6833 * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Use DO_CALL instead
6834 of DO_CALL_VIA_BREAK. Work around a gas problem.
6835
d682a515
UD
6836 * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: Remove.
6837 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: New file.
6838 * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: New file.
6839 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: New file.
6840 * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: New file.
6841 * sysdeps/powerpc/tcb-offsets.sym: Add PID.
6842
6843 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S (__vfork): Don't use
6844 a local register for saving old PID. Negate PID in parent upon exit.
6845
d3a4a571
UD
6846 * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: Include
6847 tcb-offsets.h.
6848 (__vfork): Negate PID if non-zero and set to INT_MIN if zero
6849 before syscall, set to the old value in the parent afterwards.
6850 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: New file.
6851 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: Include
6852 tcb-offsets.h.
6853 (__vfork): Negate PID if non-zero and set to INT_MIN if zero
6854 before syscall, set to the old value in the parent afterwards.
6855 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: New file.
6856 * sysdeps/s390/tcb-offsets.sym: Add PID.
6857
6858 * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: Remove.
6859 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: New file.
6860 * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S: New file.
6861 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: New file.
6862 * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: New file.
6863 * sysdeps/sparc/tcb-offsets.sym: Add PID.
6864
68652004-03-10 Andreas Schwab <schwab@suse.de>
6866
6867 * sysdeps/ia64/tcb-offsets.sym: Add PID.
6868 * sysdeps/unix/sysv/linux/ia64/vfork.S: New file.
6869 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Properly handle PID cache.
6870
3f2fb223 68712004-03-09 Jakub Jelinek <jakub@redhat.com>
f4c024d1 6872
3f2fb223
UD
6873 * tst-cancel20.c (do_one_test): Clear in_sh_body first.
6874 * tst-cancel21.c (do_one_test): Likewise.
6875 Reported by Gordon Jin <gordon.jin@intel.com>.
f4c024d1 6876
8b9d6054
UD
68772004-02-09 Jakub Jelinek <jakub@redhat.com>
6878
6879 * sysdeps/unix/sysv/linux/i386/vfork.S (SAVE_PID): Negate PID
6880 if non-zero and set to INT_MIN if zero.
6881 * sysdeps/unix/sysv/linux/x86_64/vfork.S (SAVE_PID): Likewise.
6882 * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Include tcb-offsets.h.
6883 (SAVE_PID, RESTORE_PID): Define.
6884 (__vfork): Use it.
6885 * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: Include tcb-offsets.h.
6886 Use relative path to avoid including NPTL i386/vfork.S.
6887 (SAVE_PID, RESTORE_PID): Define.
6888 * sysdeps/unix/sysv/linux/raise.c: Include limits.h.
6889 (raise): Handle THREAD_SELF->pid INT_MIN the same as 0.
6890 * Makefile (tests): Add tst-vfork1, tst-vfork2, tst-vfork1x and
6891 tst-vfork2x.
6892 (tests-reverse): Add tst-vfork1x and tst-vfork2x.
6893 * tst-vfork1.c: New test.
6894 * tst-vfork2.c: New test.
6895 * tst-vfork1x.c: New test.
6896 * tst-vfork2x.c: New test.
6897
02287d05
UD
68982004-03-08 Ulrich Drepper <drepper@redhat.com>
6899
c072ef6d 6900 * sysdeps/i386/tcb-offsets.sym: Add PID.
6fadea9f 6901 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
c072ef6d 6902 * sysdeps/unix/sysv/linux/i386/vfork.S: New file.
6fadea9f 6903 * sysdeps/unix/sysv/linux/x86_64/vfork.S: New file.
02287d05 6904
d4acd24b
UD
69052004-03-08 Steven Munroe <sjmunroe@us.ibm.com>
6906
6907 * sysdeps/unix/sysv/linux/powerpc/Versions: Remove leading tabs.
6908
8acb4b81
UD
69092004-03-08 H.J. Lu <hongjiu.lu@intel.com>
6910
6911 * sysdeps/s390/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
6912 _rtld_global_ro.
6913
4d1a02ef
UD
69142004-03-07 Ulrich Drepper <drepper@redhat.com>
6915
001836c8 6916 * sysdeps/ia64/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
8acb4b81 6917 _rtld_global_ro.
001836c8 6918
4d1a02ef
UD
6919 * tst-once4.c: Remove unnecessary macro definition.
6920
6921 * tst-mutex7.c (do_test): Limit thread stack size.
6922 * tst-once2.c (do_test): Likewise.
6923 * tst-tls3.c (do_test): Likewise.
6924 * tst-tls1.c (do_test): Likewise.
6925 * tst-signal3.c (do_test): Likewise.
6926 * tst-kill6.c (do_test): Likewise.
6927 * tst-key4.c (do_test): Likewise.
6928 * tst-join4.c (do_test): Likewise.
6929 * tst-fork1.c (do_test): Likewise.
6930 * tst-context1.c (do_test): Likewise.
6931 * tst-cond2.c (do_test): Likewise.
6932 * tst-cond10.c (do_test): Likewise.
6933 * tst-clock2.c (do_test): Likewise.
6934 * tst-cancel10.c (do_test): Likewise.
6935 * tst-basic2.c (do_test): Likewise.
6936 * tst-barrier4.c (do_test): Likewise.
6937
aa420660
UD
69382004-03-05 Ulrich Drepper <drepper@redhat.com>
6939
6940 * sysdeps/i386/tls.h: Use GLRO instead of GL where appropriate.
6941
cff08c81
UD
69422004-03-01 Ulrich Drepper <drepper@redhat.com>
6943
6944 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6945 (__pthread_cond_timedwait): Optimize wakeup test.
6946 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
6947 (__pthread_cond_wait): Likewise.
6948 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
6949 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
6950 Likewise.
6951
b7fe377c
UD
69522004-02-29 Ulrich Drepper <drepper@redhat.com>
6953
6954 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
6955 (__lll_mutex_lock_wait): Optimize a bit more. Just one copy of
6956 the atomic instruction needed.
6957 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
6958 (__lll_mutex_lock_wait): Likewise.
6959
4c771a3b
UD
69602004-02-28 Ulrich Drepper <drepper@redhat.com>
6961
6962 * Makefile (tests): Add tst-cond14 and tst-cond15.
6963 * tst-cond14.c: New file.
6964 * tst-cond15.c: New file.
6965
a2c33d5a
UD
69662004-02-27 Ulrich Drepper <drepper@redhat.com>
6967
6968 * sysdeps/pthread/createthread.c (create_thread): Remove use of
6969 CLONE_STOPPED. We cannot use SIGCONT which means CLONE_STOPPED
6970 needs to be implemented differently to be useful.
6971
261eada2
UD
69722004-02-26 Ulrich Drepper <drepper@redhat.com>
6973
14ffbc83
UD
6974 * pthread_attr_setschedparam.c: Don't test priority against limits
6975 here. Set ATTR_FLAG_SCHED_SET flag.
6976 * pthread_attr_setschedpolicy.c: Set ATTR_FLAG_POLICY_SET flag.
6977 * pthread_create.c (__pthread_create_2_1): Copy scheduling attributes
6978 from parent thread to child. If attribute is used and scheduling
6979 parameters are not inherited, copy parameters from attribute or
6980 compute them. Check priority value.
6981 * pthread_getschedparam.c: If the parameters aren't known yet get
6982 them from the kernel.
6983 * pthread_setschedparam.c: Set ATTR_FLAG_SCHED_SET and
6984 ATTR_FLAG_POLICY_SET flag for thread.
6985 * sysdeps/unix/sysv/linux/internaltypes.h: Define ATTR_FLAG_SCHED_SET
6986 and ATTR_FLAG_POLICY_SET.
6987
6988 * sysdeps/pthread/createthread.c: Use tgkill if possible.
6989
261eada2
UD
6990 * pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr): Don't
6991 fail if stack address hasn't been set. Just return 0.
6992
701d185c
UD
69932004-02-25 Ulrich Drepper <drepper@redhat.com>
6994
25b8e63c
UD
6995 * Makefile (tests-nolibpthread): Add tst-unload. Don't link with
6996 libpthread for the files in this list.
6997 (CFLAGS-tst-unload): Removed.
6998 * tst-unload.c (do_test): Don't use complete path for
6999 LIBPHREAD_SO.
7000
701d185c
UD
7001 * Makefile: Define sonames for tst-tls5mod, tst-_res1mod1, and
7002 tst-_res1mod2.
7003
a8fd5a02
UD
70042004-02-22 Ulrich Drepper <drepper@redhat.com>
7005
7006 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
7007 (__lll_mutex_lock_wait): Rewrite so that only one locked memory
7008 operation per round is needed.
7009 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
7010 (__lll_mutex_lock_wait): Likewise.
7011
dd0b7b19
UD
70122004-02-20 Ulrich Drepper <drepper@redhat.com>
7013
7014 * tst-cancel9.c (cleanup): Don't print to stderr.
7015
5990e1fe
UD
70162004-02-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
7017
7018 * sysdeps/sh/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Fix variable name.
7019
33ab3b66
UD
70202004-02-20 Jakub Jelinek <jakub@redhat.com>
7021
1be3130e
UD
7022 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
7023 (__syscall_error_handler2): Call CDISABLE.
7024 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
7025 (__syscall_error_handler2): Call CDISABLE.
7026
8ba5025a
UD
7027 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
7028 Release lock before the loop, don't reacquire it.
8ba5025a 7029
33ab3b66
UD
7030 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h (DL_ARGV_NOT_RELRO): Define.
7031
11986c68
UD
70322004-02-19 Andreas Schwab <schwab@suse.de>
7033
7034 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
7035 Fix last change.
7036
dc391246
UD
70372004-02-18 Ulrich Drepper <drepper@redhat.com>
7038
37c054c7
UD
7039 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
7040 (pthread_barrier_wait): After wakeup, release lock only when the
7041 last thread stopped using the barrier object.
7042 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S
7043 (pthread_barrier_wait): Likewise.
7044 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
7045 Likewise.
7046 * Makefile (tests): Add tst-barrier4.
7047 * tst-barrier4.c: New file.
dc391246
UD
7048
7049 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7050 (__pthread_cond_timedwait): Perform timeout test while holding
7051 internal lock to prevent wakeup race.
7052 Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
7053 * sysdeps/pthread/pthread_cond_timedwait.c
7054 (__pthread_cond_timedwait): Likewise.
7055 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
7056 (__pthread_cond_timedwait): Likewise.
7057
4a08113c
UD
70582004-02-18 Jakub Jelinek <jakub@redhat.com>
7059
7060 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S
7061 (__pthread_rwlock_unlock): Access WRITER as 32-bit value.
7062 * Makefile (tests): Add tst-rwlock13.
7063 * tst-rwlock13.c: New test.
7064
71b1675e
UD
70652004-02-16 Ulrich Drepper <drepper@redhat.com>
7066
7067 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7068 (__condvar_tw_cleanup): Little optimization.
7069 Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
7070
cd9fdc72
UD
70712004-02-16 Steven Munroe <sjmunroe@us.ibm.com>
7072
7073 * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: Replace libc with
7074 libpthread as "lib" parameter to SHLIB_COMPAT.
7075 (__novmx_siglongjmp): Fix typo in function name.
7076 (__novmx_longjmp): Fix typo in function name.
7077
82038750
UD
70782004-02-13 Ulrich Drepper <drepper@redhat.com>
7079
b078c591
UD
7080 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Add a
7081 __builtin_expect.
7082
82038750
UD
7083 * sysdeps/generic/pt-longjmp.c: Moved to...
7084 * sysdeps/pthread/pt-longjmp.c: ...here. New file.
7085
e2982bf0
UD
70862004-01-29 Steven Munroe <sjmunroe@us.ibm.com>
7087
7088 * Makefile (libpthread-routines): Add pt-cleanup.
7089 * pt-longjmp.c: Removed.
7090 * pt-cleanup.c: Copied __pthread_cleanup_upto to here. New file.
7091 * sysdeps/generic/pt-longjmp.c: Copied longjmp to here. New file.
7092 * sysdeps/unix/sysv/linux/powerpc/Versions: New file.
7093 Version longjmp, siglongjmp for GLIBC_2.3.4.
7094 * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: New File.
7095
3730d95c
UD
70962004-02-13 Ulrich Drepper <drepper@redhat.com>
7097
219304ec
UD
7098 * sysdeps/pthread/pthread_cond_timedwait.c
7099 (__pthread_cond_timedwait): Optimize. Drop internal lock earlier.
7100 Reuse code. Add __builtin_expects.
7101
3730d95c
UD
7102 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7103 (__pthread_cond_timedwait): Get internal lock in case timeout has
7104 passed before the futex syscall.
7105 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7106
5673ccc1
UD
71072004-01-20 Ulrich Drepper <drepper@redhat.com>
7108
debddf64
UD
7109 * allocatestack.c: Pretty printing.
7110
5673ccc1
UD
7111 * sysdeps/pthread/createthread.c (create_thread): Don't add
7112 CLONE_DETACHED bit if it is not necessary.
7113
6bae8725
UD
71142004-01-16 Ulrich Drepper <drepper@redhat.com>
7115
7116 * pthread_getattr_np.c: Include ldsodefs.h.
7117
ff151400
RH
71182004-01-16 Richard Henderson <rth@redhat.com>
7119
6bae8725
UD
7120 * allocatestack.c: Don't declare __libc_stack_end.
7121 * init.c (__pthread_initialize_minimal_internal): Likewise.
7122 * pthread_getattr_np.c (pthread_getattr_np): Likewise.
ff151400 7123
ba683832
RH
71242004-01-15 Richard Henderson <rth@redhat.com>
7125
7126 * sysdeps/alpha/tls.h (tcbhead_t): Add private.
7127 (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE,
7128 TLS_PRE_TCB_SIZE, TLS_TCB_ALIGN, INSTALL_DTV, INSTALL_NEW_DTV,
7129 GET_DTV, THREAD_DTV, THREAD_SELF, DB_THREAD_SELF): Match ia64.
7130 (TLS_TCB_OFFSET, THREAD_ID, NO_TLS_OFFSET): Remove.
7131 (THREAD_GETMEM, THREAD_GETMEM_NC): Simplify.
7132 (THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
7133 * sysdeps/unix/sysv/linux/alpha/createthread.c (TLS_VALUE): Match ia64.
7134
630d93a7
UD
71352004-01-14 Ulrich Drepper <drepper@redhat.com>
7136
219304ec 7137 * init.c (pthread_functions): Make array const.
630d93a7 7138
d1fc817e
UD
71392004-01-13 Ulrich Drepper <drepper@redhat.com>
7140
7141 * allocatestack.c (__make_stacks_executable): Change interface.
7142 Check parameters. Pass parameter on to libc counterpart.
7143 * pthreadP.h: Change declaration.
7144
dc927809
RH
71452004-01-13 Richard Henderson <rth@redhat.com>
7146
10677727
UD
7147 * pthread_attr_setstack.c (__old_pthread_attr_setstack): Use
7148 prototype form.
7149 * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize):
7150 Likewise.
7151
d1fc817e
UD
7152 * sysdeps/alpha/Makefile: New file.
7153 * sysdeps/alpha/tcb-offsets.sym: New file.
7154 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
7155 Use MULTIPLE_THREADS_OFFSET to implement !libpthread !libc version.
dc927809 7156
d1fc817e
UD
7157 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Rewrite based
7158 on powerpc version.
dc927809 7159
249a3d0c
UD
71602004-01-08 Jakub Jelinek <jakub@redhat.com>
7161
7162 * Makefile (tests): Add tst-backtrace1.
7163 * tst-backtrace1.c: New test.
7164
763c0490
RM
71652003-12-11 Ulrich Weigand <uweigand@de.ibm.com>
7166
7167 * sysdeps/alpha/tls.h (DB_THREAD_SELF): Pass bit size of thread
7168 register as second parameter to the REGISTER macro.
7169 * sysdeps/ia64/tls.h (DB_THREAD_SELF): Likewise.
7170 * sysdeps/powerpc/tls.h (DB_THREAD_SELF): Likewise.
7171 * sysdeps/sh/tls.h (DB_THREAD_SELF): Likewise.
7172 * sysdeps/sparc/tls.h (DB_THREAD_SELF): Likewise.
7173 * sysdeps/s390/tls.h (DB_THREAD_SELF): Pass __WORDSIZE as bit size
7174 of thread register as second parameter to REGISTER macro in 64 case.
7175
c7baafd5
UD
71762004-01-03 Ulrich Drepper <drepper@redhat.com>
7177
7178 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Removed.
7179 (CFLAGS-getpid.o): Defined.
7180 (CFLAGS-getpid.os): Defined.
7181
25ac0258
UD
71822003-12-31 Ulrich Drepper <drepper@redhat.com>
7183
7184 * pthread_getattr_np.c (pthread_getattr_np): Make sure stack info
7185 returned for main thread does not overlap with any other VMA.
7186 Patch by Jakub Jelinek.
7187
795985e4
UD
71882003-12-29 Jakub Jelinek <jakub@redhat.com>
7189
7190 * tst-raise1.c: Include stdio.h.
7191
cb5b9388
UD
71922003-12-23 Jakub Jelinek <jakub@redhat.com>
7193
7194 * sysdeps/unix/sysv/linux/raise.c (raise): Protect pid = selftid
7195 setting with __ASSUME_TGKILL || defined __NR_tgkill.
7196 If pid is 0, set it to selftid.
7197 * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Make inline.
7198 Don't set self->pid but self->tid. If self->pid == 0 and self->tid
7199 != 0, return self->tid without doing a syscall.
7200 * descr.h (struct pthread): Move pid field after tid.
7201
7202 * Makefile (tests): Add tst-raise1.
7203 * tst-raise1.c: New file.
7204
432aaf5b
RM
72052003-12-23 Roland McGrath <roland@redhat.com>
7206
7207 * tst-oddstacklimit.c: New file.
7208 * Makefile (tests): Add it.
7209 (tst-oddstacklimit-ENV): New variable.
7210
7211 * init.c (__pthread_initialize_minimal_internal): Round stack rlimit
7212 value up to page size for __default_stacksize.
7213
33ebea17
UD
72142003-12-21 Ulrich Drepper <drepper@redhat.com>
7215
7216 * Makefile (tests): Add tst-eintr5.
7217 * tst-eintr5.c: New file.
7218
7219 * eintr.c (eintr_source): Prevent sending signal to self.
7220
7221 * tst-eintr2.c (tf1): Improve error message.
7222
bbe35eb5
UD
72232003-12-20 Ulrich Drepper <drepper@redhat.com>
7224
7225 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Define.
7226 * sysdeps/unix/sysv/linux/getpid.c: New file.
c0ecb80a
UD
7227 * pthread_cancel.c: Add comment explaining use of PID field.
7228 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
7229 * pthread_getattr_np.c: Use abs() when comparing PID and TID fields.
7230 * sysdeps/unix/sysv/linux/fork.c: Negate PID field of parent
7231 temporarily to signal the field must not be relied on and updated
7232 by getpid().
7233 * sysdeps/unix/sysv/linux/pt-raise.c: Handle case where PID is
7234 temporarily negative.
7235 * sysdeps/unix/sysv/linux/raise.c: Likewise.
bbe35eb5 7236
4efdd8d3
UD
72372003-12-19 Ulrich Drepper <drepper@redhat.com>
7238
7239 * eintr.c (setup_eintr): Add new parameter. Pass to thread function.
7240 (eintr_source): If ARG != NULL, use pthread_kill.
7241 * tst-eintr1.c: Adjust for this change.
7242 * tst-eintr2.c: Likewise.
7243 * Makefile (tests): Add tst-eintr3 and tst-eintr4.
7244 * tst-eintr3.c: New file.
7245 * tst-eintr4.c: New file.
7246
72472003-12-19 Jakub Jelinek <jakub@redhat.com>
7248
7249 * libc-cancellation.c (__libc_enable_asynccancel): Don't cancel
7250 if CANCELSTATE_BITMASK is set.
7251 * sysdeps/pthread/librt-cancellation.c (__librt_enable_asynccancel):
7252 Likewise.
7253
7254 * Makefile (tests): Add tst-cancel22 and tst-cancel23.
7255 (tests-reverse): Add tst-cancel23.
7256 * tst-cancel22.c: New test.
7257 * tst-cancel23.c: New test.
7258
675620f7
UD
72592003-12-18 Ulrich Drepper <drepper@redhat.com>
7260
7261 * tst-eintr1.c: Better error messages.
7262
7263 * Makefile (tests): Add tst-eintr2.
7264 * tst-eintr2.c: New file.
7265
72662003-12-18 Jakub Jelinek <jakub@redhat.com>
7267
7268 * Makefile (tests): Add tst-cancel21 and tst-cancelx21.
7269 (CFLAGS-tst-cancelx21.c): Set.
7270 * tst-cancel21.c: New test.
7271 * tst-cancelx21.c: New test.
7272
7273 * unwind.c (FRAME_LEFT): Add adj argument. Subtract it from each
7274 comparison operand.
7275 (unwind_stop): Use _JMPBUF_CFA_UNWINDS_ADJ macro instead of
7276 _JMPBUF_CFA_UNWINDS. Adjust FRAME_LEFT invocations.
7277 * pt-longjmp.c: Include jmpbuf-unwind.h.
7278 (__pthread_cleanup_upto): Use _JMPBUF_UNWINDS_ADJ macro instead of
7279 _JMPBUF_UNWINDS. Adjust compared pointers.
7280 * init.c (__pthread_initialize_minimal_internal): Initialize
7281 pd->stackblock_size.
7282 * sysdeps/pthread/jmpbuf-unwind.h: Removed.
7283 * sysdeps/alpha/jmpbuf-unwind.h: New file.
7284 * sysdeps/i386/jmpbuf-unwind.h: New file.
7285 * sysdeps/powerpc/jmpbuf-unwind.h: New file.
7286 * sysdeps/s390/jmpbuf-unwind.h: New file.
7287 * sysdeps/sh/jmpbuf-unwind.h: New file.
7288 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: New file.
7289 * sysdeps/x86_64/jmpbuf-unwind.h: New file.
2e5e031d 7290 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Include stdint.h.
675620f7
UD
7291 (_JMPBUF_CFA_UNWINDS): Remove.
7292 (_JMPBUF_CFA_UNWINDS_ADJ, _JMPBUF_UNWINDS_ADJ): Define.
7293
72942003-12-12 Jakub Jelinek <jakub@redhat.com>
7295
7296 * Makefile (tests): Add tst-cancel20 and tst-cancelx20.
7297 (CFLAGS-tst-cancelx20.c): Set.
7298 * tst-cancel20.c: New test.
7299 * tst-cancelx20.c: New test.
7300
2d951ab6
UD
73012003-12-17 Ulrich Drepper <drepper@redhat.com>
7302
7303 * init.c (__pthread_initialize_minimal_internal): Don't treat
7304 architectures with separate register stack special here when
7305 computing default stack size.
7306
f8a3a2e7
RM
73072003-12-17 Roland McGrath <roland@redhat.com>
7308
7309 * Makefile (tst-cancelx7-ARGS): New variable.
7310 Reportd by Greg Schafer <gschafer@zip.com.au>.
7311
e796f92f
UD
73122003-12-17 Jakub Jelinek <jakub@redhat.com>
7313
7314 * Makefile (tests): Add tst-stack3. Depend on $(objpfx)tst-stack3-mem.
7315 (generated): Add tst-stack3.mtrace and tst-stack3-mem.
7316 (tst-stack3-ENV): Set.
7317 ($(objpfx)tst-stack3-mem): New.
7318 * tst-stack3.c: New test.
7319
092eb73c
UD
73202003-12-10 David Mosberger <davidm@hpl.hp.com>
7321
7322 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init_EPILOG_BEGINS):
7323 Add unwind directives. Drop unused .regstk directive.
7324 (_fini_EPILOG_BEGINS): Add unwind directives.
7325
ff48874d
UD
73262003-12-11 Ulrich Drepper <drepper@redhat.com>
7327
7328 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
7329 Assume parameter is a pointer.
7330 (lll_futex_wake): Likewise.
20945457
UD
7331 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_wait):
7332 Likewise.
7333 (lll_futex_wake): Likewise.
ff48874d
UD
7334 Reported by Boris Hu.
7335 * sysdeps/unix/sysv/linux/unregister-atfork.c
7336 (__unregister_atfork): Pass pointer to refcntr to lll_futex_wait.
7337
7338 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Simplify a bit.
7339
1d9d0b80
UD
73402003-12-10 Ulrich Drepper <drepper@redhat.com>
7341
7342 * sysdeps/pthread/bits/libc-lock.h (__rtld_lock_initialize): Define.
7343 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Call
7344 __rtld_lock_initialize for ld.so lock.
7345 Patch in part by Adam Li <adam.li@intel.com>.
7346
c776b3d7
UD
73472003-12-02 David Mosberger <davidm@hpl.hp.com>
7348
7349 * Makefile (link-libc-static): Remove -lgcc_eh---it's already mentioned
7350 in $(gnulib). Also, remove stale comment.
7351
73522003-11-12 David Mosberger <davidm@hpl.hp.com>
7353
7354 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Take
7355 advantage of new syscall stub and optimize accordingly.
7356
7357 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__NR_futex): Rename
7358 from SYS_futex, to match expectations of
7359 sysdep.h:DO_INLINE_SYSCALL.
7360 (lll_futex_clobbers): Remove.
7361 (lll_futex_timed_wait): Rewrite in terms of DO_INLINE_SYSCALL.
7362 (lll_futex_wake): Likewise.
7363 (lll_futex_requeue): Likewise.
7364 (__lll_mutex_trylock): Rewrite to a macro, so we can include this
7365 file before DO_INLINE_SYSCALL is defined (proposed by Jakub
7366 Jelinek).
7367 (__lll_mutex_lock): Likewise.
7368 (__lll_mutex_cond_lock): Likewise.
7369 (__lll_mutex_timed_lock): Likewise.
7370 (__lll_mutex_unlock): Likewise.
7371 (__lll_mutex_unlock_force): Likewise.
7372
7373 * sysdeps/ia64/tls.h: Move declaration of __thread_self up so it
7374 comes before the include of <sysdep.h>.
7375 (THREAD_SELF_SYSINFO): New macro.
7376 (THREAD_SYSINFO): Likewise.
7377 (INIT_SYSINFO): New macro.
7378 (TLS_INIT_TP): Call INIT_SYSINFO.
7379
7380 * sysdeps/ia64/tcb-offsets.sym: Add SYSINFO_OFFSET.
7381
7382 * sysdeps/pthread/createthread.c (create_thread): Use
7383 THREAD_SELF_SYSINFO and THREAD_SYSINFO instead of open code.
7384 * allocatestack.c (allocate_stack): Use THREAD_SYSINFO and
7385 THREAD_SELF_SYSINFO instead of open code.
7386 * sysdeps/i386/tls.h (THREAD_SELF_SYSINFO): New macro.
7387 (THREAD_SYSINFO): Likewise.
7388
7389 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: New file.
7390
7391 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Work around gas problem.
7392
57d20ee7
UD
73932003-12-06 Ulrich Drepper <drepper@redhat.com>
7394
7395 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Use .init_array
7396 instead of .init. Patch by David Mosberger.
7397
67aeab2a
AJ
73982003-11-30 Thorsten Kukuk <kukuk@suse.de>
7399
7400 * sysdeps/pthread/configure.in: Remove broken declaration in C
7401 cleanup handling check.
7402
8ca203e6
AJ
74032003-11-30 Andreas Jaeger <aj@suse.de>
7404
7405 * Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time).
7406 * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
7407 Likewise.
7408
46bf9de7
UD
74092003-11-27 Jakub Jelinek <jakub@redhat.com>
7410
7411 * sysdeps/unix/sysv/linux/internaltypes.h (ATTR_FLAG_OLDATTR): Define.
7412 * pthread_attr_destroy.c: Include shlib-compat.h.
7413 (__pthread_attr_destroy): Return immediately if ATTR_FLAG_OLDATTR
7414 is set in iattr->flags.
7415 * pthread_attr_init.c (__pthread_attr_init_2_0): Set ATTR_FLAG_OLDATTR.
7416
1d9b73ab
UD
74172003-11-21 Jakub Jelinek <jakub@redhat.com>
7418
7419 * Makefile (distribute): Add tst-cleanup4aux.c.
7420
7421 * tst-cond12.c (prepare): Add prototype. Move after test-skeleton.c
7422 include.
7423
53f9084e
UD
74242003-11-21 Ulrich Drepper <drepper@redhat.com>
7425
1d9b73ab
UD
7426 * tst-cond12.c (do_test): If USE_COND_SIGNAL is defined, use
7427 pthread_cond_signal.
7428
e42a990e
UD
7429 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Don't
7430 store mutex address if the current value is ~0l.
7431 * sysdeps/pthread/pthread_cond_timedwait.c
7432 (__pthread_cond_timedwait): Likewise.
7433 * sysdeps/pthread/pthread_cond_broadcast.c
7434 (__pthread_cond_broadcast): Don't use requeue for pshared
7435 condvars.
7436
7437 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
7438 (__pthread_cond_wait): Don't store mutex address if the current
7439 value is ~0l.
7440 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
7441 (__pthread_cond_timedwait): Likewise.
7442 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
7443 (__pthread_cond_broadcast): Don't use requeue for pshared
7444 condvars.
7445
7446 * pthread_cond_init.c (__pthread_cond_init): Initialize __mutex
7447 element with ~0l for pshared condvars, with NULL otherwise.
7448
7449 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
7450 (__pthread_cond_wait): Don't store mutex address if the current
7451 value is ~0l.
7452 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7453 (__pthread_cond_timedwait): Likewise.
7454 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
7455 (__pthread_cond_broadcast): Don't use requeue for pshared
7456 condvars.
7457
bf68b236 7458 * Makefile: Add rules to build and run tst-cond12 and tst-cond13.
53f9084e 7459 * tst-cond12.c: New file.
bf68b236 7460 * tst-cond13.c: New file.
53f9084e 7461
9780c971
UD
74622003-11-17 Ulrich Drepper <drepper@redhat.com>
7463
7464 * sysdeps/pthread/configure.in: Make missing forced unwind support
7465 fatal.
7466
74e12fbc
UD
74672003-11-11 Ulrich Drepper <drepper@redhat.com>
7468
7469 * pthreadP.h: Don't declare __pthread_unwind as weak inside libpthread.
7470
c685b2b0
UD
74712003-11-06 Ulrich Drepper <drepper@redhat.com>
7472
7473 * Makefile: Add magic to clean up correctly.
7474
44e94149
UD
74752003-11-05 Jakub Jelinek <jakub@redhat.com>
7476
7477 * unwind.c (FRAME_LEFT): Define.
7478 (unwind_stop): Handle old style cleanups here.
7479 (__pthread_unwind): Handle old style cleanups only if
7480 !HAVE_FORCED_UNWIND.
7481 * Makefile (tests): Add tst-cleanup4 and tst-cleanupx4.
7482 (CFLAGS-tst-cleanupx4.c): Add -fexceptions.
7483 ($(objpfx)tst-cleanup4): Depend on $(objpfx)tst-cleanup4aux.o.
7484 ($(objpfx)tst-cleanupx4): Likewise.
7485 * tst-cleanup4.c: New test.
7486 * tst-cleanup4aux.c: New.
7487 * tst-cleanupx4.c: New test.
7488
c28422b5
UD
74892003-11-04 Ulrich Drepper <drepper@redhat.com>
7490
7491 * sysdeps/pthread/bits/stdio-lock.h: Use lll_*lock instead of
7492 lll_mutex_*lock macros to skip atomic operations on some archs.
7493
27176677
UD
74942003-11-03 Ulrich Drepper <drepper@redhat.com>
7495
7496 * sysdeps/pthread/tst-timer.c (main): Initialize
7497 sigev2.sigev_value as well.
7498
026395a2
RM
74992003-10-15 Roland McGrath <roland@redhat.com>
7500
7501 * sysdeps/pthread/configure.in: Barf if visibility attribute support
7502 is missing.
7503 * sysdeps/pthread/configure: Regenerated.
7504
fa3cbe3d
UD
75052003-10-09 Kaz Kojima <kkojima@rr.iij4u.or.jp>
7506
7507 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Completely revamp the
7508 locking macros. No distinction between normal and mutex locking
7509 anymore.
7510 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Rewrite mutex locking.
7511 Merge bits from lowlevelmutex.S we still need.
7512 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Remove.
7513 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
7514 * sysdeps/unix/sysv/linux/sh/not-cancel.h: New file.
7515 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Adjust for
7516 new mutex implementation.
7517 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Likewise.
7518 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
7519 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7520 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
7521 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
7522 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
7523 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
7524 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
7525 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7526 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO): Also defined
7527 symbol for entry point to avoid cancellation.
7528
e700a908
UD
75292003-10-07 Jakub Jelinek <jakub@redhat.com>
7530
7531 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Backout 2003-10-02
7532 changes.
7533 (SAVE_OLDTYPE_0): Fix a typo.
7534
c70a86b6
UD
75352003-10-03 Ulrich Drepper <drepper@redhat.com>
7536
7537 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
7538 Check __sigsetjmp return value. Reported by Daniel Jacobowitz.
7539
134abcb5
UD
75402003-10-02 Ulrich Drepper <drepper@redhat.com>
7541
7542 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (DOCARGS_1): Use
7543 correct offset.
7544
b77ca0e8
UD
75452003-10-02 Jakub Jelinek <jakub@redhat.com>
7546
7547 * Makefile (tests): Add tst-cancel19.
7548 * tst-cancel19.c: New test.
7549
4d961dc7
UD
75502003-10-02 Ulrich Drepper <drepper@redhat.com>
7551
7552 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix saving and
7553 restoring of the old cancellation type.
7554
1d5b20ad 75552003-09-30 Jakub Jelinek <jakub@redhat.com>
94ae6d75 7556
1d5b20ad
UD
7557 * sysdeps/pthread/malloc-machine.h: Remove misleading comment.
7558
4106a403
RM
75592003-09-27 Wolfram Gloger <wg@malloc.de>
7560
4d961dc7 7561 * sysdeps/pthread/malloc-machine.h: New file
94ae6d75 7562
fca9d8e4
RM
75632003-09-24 Roland McGrath <roland@redhat.com>
7564
7565 * allocatestack.c (__make_stacks_executable): Don't ignore return
7566 value from _dl_make_stack_executable.
7567
c9c60884
UD
75682003-09-24 Ulrich Drepper <drepper@redhat.com>
7569
69c9fa04
UD
7570 * allocatestack.c (__make_stacks_executable): Also change
7571 permission of the currently unused stacks.
7572
279f1143
UD
7573 * allocatestack.c (change_stack_perm): Split out from
7574 __make_stacks_executable.
7575 (allocate_stack): If the required permission changed between the time
7576 we started preparing the stack and queueing it, change the permission.
7577 (__make_stacks_executable): Call change_stack_perm.
7578
c9c60884
UD
7579 * Makefile: Build tst-execstack-mod locally.
7580 * tst-execstack-mod.c: New file.
7581
54ee14b3
UD
75822003-09-23 Jakub Jelinek <jakub@redhat.com>
7583
7584 * Makefile (tests): Only add tst-execstack if have-z-execstack is yes.
7585
75862003-09-23 Roland McGrath <roland@redhat.com>
7587
7588 * tst-execstack.c: New file.
7589 * Makefile (tests): Add it.
7590 ($(objpfx)tst-execstack, $(objpfx)tst-execstack.out): New targets.
7591 (LDFLAGS-tst-execstack): New variable.
7592
7593 * allocatestack.c (allocate_stack): Use GL(dl_stack_flags) to decide
7594 whether to use PROT_EXEC for stack mmap.
7595 (__make_stacks_executable): New function.
7596 * pthreadP.h: Declare it.
7597 * init.c (__pthread_initialize_minimal_internal): Set
7598 GL(dl_make_stack_executable_hook) to that.
7599
365b1602
UD
76002003-09-22 Ulrich Drepper <drepper@redhat.com>
7601
7602 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Adjust for latest
7603 recommendation from AMD re avoidance of lock prefix.
7604
39358e8b
UD
76052003-09-22 Jakub Jelinek <jakub@redhat.com>
7606
7607 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait): Use
7608 lll_futex_timed_wait instead of lll_futex_wait.
7609 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Removed.
7610 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Removed.
7611 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: Removed.
7612 * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: Removed.
7613 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Removed.
7614 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Removed.
7615 * sysdeps/unix/sysv/linux/s390/sem_post.c: Removed.
7616 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Removed.
7617 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Include atomic.h.
7618 Completely revamp the locking macros. No distinction between
7619 normal and mutex locking anymore.
7620 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
7621 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock_wait,
7622 __lll_lock_timedwait): Fix prototypes.
7623 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_lock_wait,
7624 __lll_lock_timedwait): Likewise.
7625 (lll_mutex_lock, lll_mutex_cond_lock): Use _val instead of _bool
7626 macros, add __builtin_expect.
7627 (lll_mutex_timedlock): Likewise. Fix return value.
7628 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Removed.
7629 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: Removed.
7630 * sysdeps/unix/sysv/linux/i386/i586/lowlevelmutex.S: Removed.
7631 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: Removed.
7632 * sysdeps/unix/sysv/linux/i386/i686/lowlevelmutex.S: Removed.
7633 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: Removed.
7634 * sysdeps/unix/sysv/linux/lowlevelmutex.c: Removed.
7635 * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: Removed.
7636
9d08fbbb
UD
76372003-09-22 Ulrich Drepper <drepper@redhat.com>
7638
c0df57e1
UD
7639 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
7640 (__lll_mutex_lock_wait): Minor optimization to avoid one atomic
7641 operation if possible.
7642
9d08fbbb
UD
7643 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Don't play tricks
7644 like jumping over the lock prefix.
7645
71451de2
UD
76462003-09-21 Ulrich Drepper <drepper@redhat.com>
7647
7648 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Completely revamp the
7649 locking macros. No distinction between normal and mutex locking
7650 anymore.
3a226d33 7651 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
bc1989aa
UD
7652 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
7653 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
71451de2
UD
7654 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Rewrite mutex
7655 locking. Merge bits from lowlevelmutex.S we still need.
3a226d33 7656 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
bc1989aa 7657 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
71451de2 7658 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Removed.
3a226d33 7659 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Removed.
71451de2
UD
7660 * Makefile (routines): Remove libc-lowlevelmutex.
7661 (libpthread-rountines): Remove lowlevelmutex.
3a226d33
UD
7662 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Adjust
7663 for new mutex implementation.
7664 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
7665 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7666 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7667 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
7668 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
7669 Likewise.
7670 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
7671 Likewise.
7672 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
7673 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
7674 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise
7675 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
7676 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7677 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7678 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
7679 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
7680 Likewise.
7681 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
7682 Likewise.
7683 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
7684 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
7685 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
7686 Don't use requeue.
7687 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
bc1989aa 7688 * sysdeps/pthread/pthread_cond_signal.c: Don't use requeue.
71451de2 7689
8f31c0ef
UD
76902003-09-20 Ulrich Drepper <drepper@redhat.com>
7691
56a4aa98
UD
7692 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't match memory
7693 in parameters of asm with output parameters.
7694
8f31c0ef
UD
7695 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Change
7696 type of DECR parameter to int.
7697 * pthreadP.h: Adjust prototype of __pthread_mutex_unlock_usercnt.
7698
8b8074da
UD
76992003-09-18 Jakub Jelinek <jakub@redhat.com>
7700
7701 * tst-attr3.c (tf, do_test): Print stack start/end/size and
7702 guardsize for each thread.
7703
65af7e61
UD
77042003-09-17 Jakub Jelinek <jakub@redhat.com>
7705
9ba96eda
UD
7706 * sysdeps/pthread/pthread.h (pthread_getattr_np): Clarify usage.
7707 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
7708 (pthread_attr_setaffinity_np): Handle cpuset == NULL.
7709
06f6ca90
UD
7710 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
7711 (pthread_attr_getaffinity_np): Don't segfault if iattr->cpuset is
7712 NULL.
7713 * pthread_getattr_np.c: Set cpuset using pthread_getaffinity_np.
7714 * pthreadP.h (pthread_getaffinity_np): Add hidden_proto.
7715 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
7716 (pthread_getaffinity_np): Add hidden_def.
7717
7718 * Makefile (tests): Add tst-attr3.
7719 * tst-attr3.c: New test.
7720
65af7e61
UD
7721 * sysdeps/i386/Makefile (CFLAGS-tst-align.c): Remove.
7722
3402852c
UD
77232003-09-15 Jakub Jelinek <jakub@redhat.com>
7724
7725 * sysdeps/i386/Makefile (CFLAGS-pthread_create.c,
7726 CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
7727
a4db3439
UD
77282003-09-17 Jakub Jelinek <jakub@redhat.com>
7729
7730 * Makefile (CFLAGS-tst-align.c): Add $(stack-align-test-flags).
7731 * tst-align.c: Include tst-stack-align.h.
7732 (tf, do_test): Use TEST_STACK_ALIGN macro.
7733
77342003-09-17 Ulrich Drepper <drepper@redhat.com>
7735
7736 * pthread_attr_init.c (__pthread_attr_init_2_0): Remove unused
7737 variable.
7738
92ce4676
UD
77392003-09-16 Ulrich Drepper <drepper@redhat.com>
7740
7741 * pthread_getattr_np.c (pthread_getattr_np): Correctly fill in the
7742 stack-related values for the initial thread.
7743
e07bb02a
UD
77442003-09-15 Jakub Jelinek <jakub@redhat.com>
7745
7746 * Makefile (CFLAGS-pthread_once.c): Add $(uses-callbacks).
7747
d087b5dc
UD
77482003-09-11 Ulrich Drepper <drepper@redhat.com>
7749
7750 * pthread_mutex_lock.c: Minor code rearrangements.
7751
7f08f55a
RM
77522003-09-05 Roland McGrath <roland@redhat.com>
7753
7754 * pthread_create.c (__pthread_pthread_sizeof_descr): Removed.
7755 Instead, include ../nptl_db/db_info.c to do its magic.
7756 * pthread_key_create.c (__pthread_pthread_keys_max): Removed.
7757 (__pthread_pthread_key_2ndlevel_size): Likewise.
7758 * sysdeps/alpha/tls.h (DB_THREAD_SELF): New macro.
7759 * sysdeps/i386/tls.h (DB_THREAD_SELF): New macro.
7760 * sysdeps/ia64/tls.h (DB_THREAD_SELF): New macro.
7761 * sysdeps/powerpc/tls.h (DB_THREAD_SELF): New macro.
7762 * sysdeps/s390/tls.h (DB_THREAD_SELF): New macro.
7763 * sysdeps/sh/tls.h (DB_THREAD_SELF): New macro.
7764 * sysdeps/sparc/tls.h (DB_THREAD_SELF): New macro.
7765 * sysdeps/x86_64/tls.h (DB_THREAD_SELF): New macro.
7766 * sysdeps/alpha/td_ta_map_lwp2thr.c: File removed.
7767 * sysdeps/generic/td_ta_map_lwp2thr.c: File removed.
7768 * sysdeps/i386/td_ta_map_lwp2thr.c: File removed.
7769 * sysdeps/ia64/td_ta_map_lwp2thr.c: File removed.
7770 * sysdeps/powerpc/td_ta_map_lwp2thr.c: File removed.
7771 * sysdeps/s390/td_ta_map_lwp2thr.c: File removed.
7772 * sysdeps/sh/td_ta_map_lwp2thr.c: File removed.
7773 * sysdeps/sparc/td_ta_map_lwp2thr.c: File removed.
7774 * sysdeps/x86_64/td_ta_map_lwp2thr.c: File removed.
7775
806e4a4a
UD
77762003-09-08 Ulrich Drepper <drepper@redhat.com>
7777
7778 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Change type
7779 of pthread_t to be compatible with LT.
7780 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
7781 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
7782 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7783 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7784 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
7785 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7786 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
7787
17f83e56
UD
77882003-09-04 Ulrich Drepper <drepper@redhat.com>
7789
7790 * sysdeps/unix/sysv/linux/i386/not-cancel.h (fcntl_not_cancel): Define.
7791
58e8ec84
UD
77922003-09-04 Jakub Jelinek <jakub@redhat.com>
7793
7794 * unwind-forcedunwind.c: Move to...
7795 * sysdeps/pthread/unwind-forcedunwind.c: ...here.
7796 (pthread_cancel_init): Use ARCH_CANCEL_INIT if defined.
7797 * sysdeps/pthread/jmpbuf-unwind.h: New file.
7798 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: New file.
7799 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: New file.
7800 * unwind.c: Include jmpbuf-unwind.h.
7801 (unwind_stop): Use _JMPBUF_CFA_UNWINDS macro.
7802
abf1cf21
JJ
78032003-09-02 Jakub Jelinek <jakub@redhat.com>
7804
4a244f0d
UD
7805 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: New file.
7806 * sysdeps/unix/sysv/linux/ia64/Versions (libpthread): Export
7807 pthread_attr_setstack and pthread_attr_setstacksize @@GLIBC_2.3.3.
7808 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: New file.
7809 * sysdeps/unix/sysv/linux/alpha/Versions: New file.
7810 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: New file.
7811 * sysdeps/unix/sysv/linux/sparc/Versions: New file.
7812 * pthread_attr_setstack.c (__old_pthread_attr_setstack): New function.
7813 (pthread_attr_setstack): If PTHREAD_STACK_MIN != 16384, export
7814 as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.2.
7815 * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize): New
7816 function.
7817 (pthread_attr_setstacksize): If PTHREAD_STACK_MIN != 16384, export
7818 as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.1.
7819 * Makefile (tests): Add tst-stack2.
7820 * tst-stack2.c: New test.
7821 * tst-stack1.c: Include limits.h and sys/param.h.
7822 (do_test): Set size to MAX (4 * getpagesize (), PTHREAD_STACK_MIN).
7823
e29ef647
UD
7824 * pthread_condattr_setpshared.c: Include errno.h.
7825 (pthread_condattr_setpshared): Return EINVAL if pshared
7826 is neither PTHREAD_PROCESS_PRIVATE nor PTHREAD_PROCESS_SHARED.
7827
5777d565
UD
7828 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Also
7829 defined symbol for entry point to avoid cancellation.
7830 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
7831 Likewise.
7832 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
7833 Likewise.
7834 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
7835 Likewise.
7836 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h (PSEUDO):
7837 Likewise.
7838 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
7839 Likewise.
7840 * sysdeps/unix/sysv/linux/i386/not-cancel.h (__open_nocancel,
7841 __close_nocancel, __read_nocancel, __write_nocancel,
7842 __waitpid_nocancel): Add attribute_hidden. If not in libc.so,
7843 libpthread.so or librt.so, define to corresponding function
7844 without _nocancel suffix.
7845 * sysdeps/unix/sysv/linux/s390/not-cancel.h: New file.
7846 * sysdeps/unix/sysv/linux/powerpc/not-cancel.h: New file.
7847 * sysdeps/unix/sysv/linux/sparc/not-cancel.h: New file.
7848
abf1cf21
JJ
7849 * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: Fix a typo.
7850
8348dcc8
UD
78512003-09-02 Ulrich Drepper <drepper@redhat.com>
7852
7853 * sysdeps/unix/sysv/linux/i386/not-cancel.h: New file.
1e03e0af 7854 * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: New file.
8348dcc8
UD
7855
7856 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Make sure the code
7857 in subsections has a symbol associated with it.
7858
7859 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Also
7860 defined symbol for entry point to avoid cancellation.
7861 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Likewise.
7862
c874a32e
UD
78632003-09-01 Jakub Jelinek <jakub@redhat.com>
7864
7865 * Makefile (tests): Add tst-tls5.
7866 (module-names): Add tst-tls5mod{,a,b,c,d,e,f}.
7867 ($(objpfx)tst-tls5mod{,a,b,c,d,e,f}.so-no-z-defs): Set to yes.
7868 ($(objpfx)tst-tls5): New.
7869 ($(objpfx)tst-tls6.out): Likewise.
7870 (tests): Depend on $(objpfx)tst-tls6.out.
7871 * tst-tls3.c: Include stdint.h and pthreaddef.h.
7872 (do_test): Check pthread_self () return value alignment.
7873 * tst-tls3mod.c: Include stdint.h and pthreaddef.h.
7874 (tf): Check pthread_self () return value alignment.
7875 * tst-tls5.c: New test.
7876 * tst-tls5.h: New.
7877 * tst-tls5mod.c: New.
7878 * tst-tls5moda.c: New.
7879 * tst-tls5modb.c: New.
7880 * tst-tls5modc.c: New.
7881 * tst-tls5modd.c: New.
7882 * tst-tls5mode.c: New.
7883 * tst-tls5modf.c: New.
7884 * tst-tls6.sh: New test.
7885
c503d3dc
UD
7886 * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Add
7887 ptr___pthread_cond_timedwait and ptr___pthread_cond_timedwait_2_0.
7888 * init.c (pthread_functions): Initialize them.
7889 * forward.c (pthread_cond_timedwait@GLIBC_2.0,
7890 pthread_cond_timedwait@@GLIBC_2.3.2): New forwards.
7891 * Versions (libc): Export pthread_cond_timedwait@GLIBC_2.0,
7892 pthread_cond_timedwait@@GLIBC_2.3.2.
7893
48614753
JJ
78942003-09-01 Jakub Jelinek <jakub@redhat.com>
7895
56a1b877
JJ
7896 * sysdeps/unix/sysv/linux/alpha/timer_create.c: New file.
7897 * sysdeps/unix/sysv/linux/alpha/timer_delete.c: New file.
7898 * sysdeps/unix/sysv/linux/alpha/timer_getoverr.c: New file.
7899 * sysdeps/unix/sysv/linux/alpha/timer_gettime.c: New file.
7900 * sysdeps/unix/sysv/linux/alpha/timer_settime.c: New file.
7901 * sysdeps/unix/sysv/linux/alpha/Versions: New file.
7902
7903 * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
7904
48614753
JJ
7905 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Define
7906 _POSIX_THREAD_PRIORITY_SCHEDULING.
7907 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
7908
28c97261
UD
79092003-08-31 Ulrich Drepper <drepper@redhat.com>
7910
eef80cf8
UD
7911 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock): Avoid
7912 nested function, use static inline function from libio.h.
7913 Code by Richard Henderson.
7914
28c97261
UD
7915 * sysdeps/pthread/bits/libc-lock.h: Mark pthread_setcancelstate as
7916 weak.
7917
cd2fbe58
UD
79182003-08-30 Jakub Jelinek <jakub@redhat.com>
7919
7920 * sysdeps/unix/sysv/linux/sparc/sparc64/Versions: New file.
7921 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_create.c: New file.
7922 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_delete.c: New file.
7923 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_getoverr.c: New file.
7924 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_gettime.c: New file.
7925 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_settime.c: New file.
7926 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
7927 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
7928 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: New file.
7929 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: New file.
7930 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: New file.
7931 * sysdeps/unix/sysv/linux/sparc/pthread_once.c: New file.
7932 * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: New file.
7933 * sysdeps/unix/sysv/linux/sparc/fork.c: New file.
7934 * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
7935 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: New file.
7936 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: New file.
7937 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: New file.
7938 * sysdeps/sparc/sparc32/pthread_spin_lock.c: New file.
7939 * sysdeps/sparc/sparc32/pthread_spin_trylock.c: New file.
7940 * sysdeps/sparc/sparc32/pthreaddef.h: New file.
7941 * sysdeps/sparc/sparc64/pthread_spin_lock.c: New file.
7942 * sysdeps/sparc/sparc64/pthread_spin_trylock.c: New file.
7943 * sysdeps/sparc/sparc64/pthread_spin_unlock.c: New file.
7944 * sysdeps/sparc/sparc64/pthreaddef.h: New file.
7945 * sysdeps/sparc/tls.h: New file.
7946 * sysdeps/sparc/tcb-offsets.sym: New file.
7947 * sysdeps/sparc/Makefile: New file.
7948 * sysdeps/sparc/td_ta_map_lwp2thr.c: New file.
7949 * init.c [__sparc__] (__NR_set_tid_address): Define.
7950
feda52c0
UD
79512003-08-29 Jakub Jelinek <jakub@redhat.com>
7952
7953 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock,
7954 _IO_release_lock): Define.
7955
7c868816
JJ
79562003-08-29 Jakub Jelinek <jakuB@redhat.com>
7957
0261d33f 7958 * tst-cancel4.c (tf_sigwait, tf_sigwaitinfo, tf_sigtimedwait): Add
7c868816
JJ
7959 sigemptyset before sigaddset. Reported by jreiser@BitWagon.com.
7960
68b9e1ae
UD
79612003-08-27 Ulrich Drepper <drepper@redhat.com>
7962
7963 * sysdeps/pthread/pthread.h (pthread_exit): Remove __THROW.
7964 (__pthread_cleanup_class): Add missing return types of member
7965 functions.
7966
13b3edfc
UD
79672003-08-26 Steven Munroe <sjmunroe@us.ibm.com>
7968
7969 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
7970 (lll_mutex_unlock_force): Add memory barrier between store and futex
7971 syscall.
7972
bb606fbe
UD
79732003-08-25 Ulrich Drepper <drepper@redhat.com>
7974
7975 * tst-cancel4.c (do_test): Also unlink tempfname and remove
7976 tempmsg in first loop.
7977
ee4e5a3d
UD
79782003-08-18 Ulrich Drepper <drepper@redhat.com>
7979
7980 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
7981 _POSIX_THREAD_PRIORITY_SCHEDULING.
7982 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
7983
334fcf2a
UD
79842003-08-07 Jakub Jelinek <jakub@redhat.com>
7985
7986 * sysdeps/pthread/bits/libc-lock.h [_LIBC && SHARED]
7987 (__rtld_lock_default_lock_recursive,
7988 __rtld_lock_default_unlock_recursive): Define.
7989 [_LIBC && SHARED] (__rtld_lock_lock_recursive,
7990 __rtld_lock_unlock_recursive): Define using
7991 GL(_dl_rtld_*lock_recursive).
7992 * init.c (__pthread_initialize_minimal_internal): Initialize
7993 _dl_rtld_lock_recursive and _dl_rtld_unlock_recursive.
7994 Lock GL(_dl_load_lock) the same number of times as
7995 GL(_dl_load_lock) using non-mt implementation was nested.
7996
7997 * pthreadP.h (__pthread_cleanup_upto): Add hidden_proto.
7998 * pt-longjmp.c (__pthread_cleanup_upto): Add hidden_def.
7999
a30fb2df
UD
80002003-08-06 Jakub Jelinek <jakub@redhat.com>
8001
8002 * tst-cancel17.c (do_test): Make len2 maximum of page size and
8003 PIPE_BUF.
8004
ce0d30a0
JJ
80052003-08-07 Jakub Jelinek <jakub@redhat.com>
8006
8007 * pthread_create.c (__pthread_create_2_0): Clear new_attr.cpuset.
8008
9c988b83
UD
80092003-08-03 Jakub Jelinek <jakub@redhat.com>
8010
8011 * sysdeps/pthread/createthread.c (do_clone): Move error handling
8012 to first syscall error check. Move syscall error check for tkill
8013 into __ASSUME_CLONE_STOPPED #ifdef.
8014
5c5252bd
UD
80152003-08-02 Ulrich Drepper <drepper@redhat.com>
8016
f1205aa7
UD
8017 * sysdeps/pthread/createthread.c (do_clone): If __ASSUME_CLONE_STOPPED
8018 is not defined, do explicit synchronization.
8019 (create_thread): Do not lock pd->lock here. If __ASSUME_CLONE_STOPPED
8020 is not defined also unlock pd->lock for non-debugging case in case
8021 it is necessary.
8022 * pthread_create.c (start_thread): Always get and release pd->lock
8023 if __ASSUME_CLONE_STOPPED is not defined.
8024 (start_thread_debug): Removed. Adjust users.
8025 * allocatestack.c (allocate_stack): Always initialize lock if
8026 __ASSUME_CLONE_STOPPED is not defined.
8027 * Makefile (tests): Add tst-sched1.
8028 * tst-sched1.c: New file.
8029
5c5252bd
UD
8030 * sysdeps/pthread/createthread.c (do_clone): Only use
8031 sched_setschduler and pass correct parameters.
8032
973d66e4
UD
80332003-07-31 Jakub Jelinek <jakub@redhat.com>
8034
8035 * sysdeps/pthread/pthread.h (pthread_attr_setstackaddr,
8036 pthread_attr_setstacksize): Change PTHREAD_STACK_SIZE to
8037 PTHREAD_STACK_MIN in comments.
8038
d347a4ab
UD
80392003-07-31 Jakub Jelinek <jakub@redhat.com>
8040
8041 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
8042 Shut up warnings if INTERNAL_SYSCALL_ERROR_P does not use its first
8043 argument.
8044 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Likewise.
8045 * pthread_condattr_setclock.c (pthread_condattr_setclock): Likewise.
8046 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Include pthreaddef.h.
8047 (__pthread_cleanup_upto): Fix prototype.
8048 (_longjmp_unwind): Adjust caller.
8049 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_timedlock):
8050 Change second argument to const struct pointer.
8051 * tst-sem8.c (main): Remove unused s2 and s3 variables.
8052 * tst-sem9.c (main): Likewise.
8053 * unwind.c: Include string.h for strlen prototype.
8054
1b26e9a5
UD
80552003-07-31 Ulrich Drepper <drepper@redhat.com>
8056
8057 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
8058 (__pthread_cond_timedwait): Don't use cmov unless HAVE_CMOV is defined.
8059 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S:
8060 Define HAVE_CMOV.
8061 Patch by Nicholas Miell <nmiell@attbi.com>.
8062
adc12574
UD
80632003-07-30 Jakub Jelinek <jakub@redhat.com>
8064
8065 * init.c (__pthread_initialize_minimal_internal): Initialize
8066 GL(dl_init_static_tls).
8067 * pthreadP.h (__pthread_init_static_tls): New prototype.
8068 * allocatestack.c (init_one_static_tls, __pthread_init_static_tls):
8069 New functions.
8070 * Makefile (tests): Add tst-tls4.
8071 (modules-names): Add tst-tls4moda and tst-tls4modb.
8072 ($(objpfx)tst-tls4): Link against libdl and libpthread.
8073 ($(objpfx)tst-tls4.out): Depend on tst-tls4moda.so and
8074 tst-tls4modb.so.
8075 * tst-tls4.c: New file.
8076 * tst-tls4moda.c: New file.
8077 * tst-tls4modb.c: New file.
8078
a7f6c66e
RM
80792003-06-19 Daniel Jacobowitz <drow@mvista.com>
8080
8081 * sysdeps/pthread/timer_create.c (timer_create): Call timer_delref
8082 before __timer_dealloc.
8083 * sysdeps/pthread/timer_routines.c (__timer_thread_find_matching):
8084 Don't call list_unlink.
8085
172ce013
RM
80862003-07-29 Roland McGrath <roland@redhat.com>
8087
8088 * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
8089
7b787f85
UD
80902003-07-25 Jakub Jelinek <jakub@redhat.com>
8091
8092 * tst-cancel17.c (do_test): Check if aio_cancel failed.
8093 Don't reuse struct aiocb A if it failed.
8094 Write fpathconf (fds[1], _PC_PIPE_BUF) + 2 bytes using aio_write,
8095 not just one byte, as that does not block.
8096
0e9d6240
UD
80972003-07-22 Jakub Jelinek <jakub@redhat.com>
8098
9d79e037
UD
8099 * sysdeps/pthread/unwind-resume.c: New file.
8100 * sysdeps/pthread/Makefile (routines, shared-only-routines): Add
8101 unwind-resume in csu subdir.
8102 (CFLAGS-unwind-resume.c, CFLAGS-rt-unwind-resume.c): Compile with
8103 exceptions.
8104 (librt-sysdep_routines, librt-shared-only-routines): Add
8105 rt-unwind-resume.
8106 * sysdeps/pthread/rt-unwind-resume.c: New file.
8107 * unwind-forcedunwind.c: New file.
8108 * Makefile (libpthread-routines): Add unwind-forcedunwind.
8109 (libpthread-shared-only-routines): Likewise.
8110 (CFLAGS-unwind-forcedunwind.c): Compile with exceptions.
8111 * pthreadP.h (pthread_cancel_init): New prototype.
8112 * pthread_cancel.c (pthread_cancel): Call pthread_cancel_init.
8113
8114 * sysdeps/pthread/createthread.c (do_thread, create_thread): Make
8115 attr argument const struct pthread_attr *.
8116
0e9d6240
UD
8117 * res.c (__res_state): Return __resp.
8118 * descr.h: Include resolv.h.
8119 (struct pthread): Add res field.
8120 * pthread_create.c: Include resolv.h.
8121 (start_thread): Initialize __resp.
8122 * Makefile (tests): Add tst-_res1.
8123 (module-names): Add tst-_res1mod1, tst-_res1mod2.
8124 ($(objpfx)tst-_res1mod2.so): Depend on $(objpfx)tst-_res1mod1.so.
8125 ($(objpfx)tst-_res1): Depend on $(objpfx)tst-_res1mod2.so and
8126 libpthread.
8127 * tst-_res1.c: New file.
8128 * tst-_res1mod1.c: New file.
8129 * tst-_res1mod2.c: New file.
8130
1a379ea0
UD
81312003-07-21 Ulrich Drepper <drepper@redhat.com>
8132
7e939b21
UD
8133 * sysdeps/pthread/createthread.c: Don't define CLONE_STOPPED.
8134
1a379ea0
UD
8135 * Makefile: Define various *-no-z-defs variables for test DSOs
8136 which has undefined symbols.
8137
ca86a763
UD
81382003-07-21 Steven Munroe <sjmunroe@us.ibm.com>
8139
8140 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
8141 Retry if the stwcx fails to store once_control.
8142
80f536db
UD
81432003-07-20 Ulrich Drepper <drepper@redhat.com>
8144
8145 * Makefile (libpthread-routines): Add pthread_attr_getaffinity and
8146 pthread_attr_setaffinity.
8147 * Versions [libpthread] (GLIBC_2.3.3): Likewise.
8148 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: New file.
8149 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: New file.
8150 * pthread_attr_destroy.c: Free cpuset element if allocated.
8151 * pthread_create.c: Pass iattr as additional parameter to
8152 create_thread.
8153 * sysdeps/pthread/createthread.c: If attribute is provided and
8154 a new thread is created with affinity set or scheduling parameters,
8155 start thread with CLONE_STOPPED.
8156 * sysdeps/pthread/pthread.h: Declare pthread_attr_getaffinity and
8157 pthread_attr_setaffinity.
8158 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
8159 cpuset element.
8160
73299943
UD
81612003-07-15 Ulrich Drepper <drepper@redhat.com>
8162
8163 * tst-tcancel-wrappers.sh: lseek and llseek are not cancelation points.
8164
da35d15e
UD
81652003-07-14 Ulrich Drepper <drepper@redhat.com>
8166
8167 * sysdeps/pthread/configure.in: Require CFI directives also for
8168 ppc and s390.
8169
75540d8a
UD
81702003-07-15 Jakub Jelinek <jakub@redhat.com>
8171
8172 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
8173 Add cfi directives.
8174
4a17085f
UD
81752003-07-12 Kaz Kojima <kkojima@rr.iij4u.or.jp>
8176
8177 * sysdeps/sh/tcb-offsets.sym: Add RESULT, TID, CANCELHANDLING and
8178 CLEANUP_JMP_BUF.
8179 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use more
8180 registers as variables. Call __pthread_mutex_unlock_usercnt.
8181 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
8182 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Store TID
8183 not self pointer in __writer. Compare with TID to determine
8184 deadlocks.
8185 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
8186 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
8187 Likewise.
8188 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
8189 Likewise.
8190 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add cancellation support.
8191 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
8192 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Define all the nice
8193 macros also when compiling librt.
8194
6080ecdf
UD
81952003-07-11 Jakub Jelinek <jakub@redhat.com>
8196
8197 * Makefile (CFLAGS-pthread_once.c): Add -fexceptions
8198 -fasynchronous-unwind-tables.
8199 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
8200 (PSEUDO): Add cfi directives.
8201 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO):
8202 Likewise.
8203 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
8204 Likewise.
8205
da0c02ee
UD
82062003-07-08 Jakub Jelinek <jakub@redhat.com>
8207
8208 * pthreadP.h (__pthread_unwind_next, __pthread_register_cancel,
8209 __pthread_unregister_cancel): Add prototypes and hidden_proto.
8210 * unwind.c (__pthread_unwind_next): Add hidden_def.
8211 * cleanup.c (__pthread_register_cancel, __pthread_unregister_cancel):
8212 Likewise.
8213 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
8214 Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
8215 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
8216 Likewise.
8217 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
8218 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
8219 Likewise.
8220 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once): Use
8221 HIDDEN_JUMPTARGET to call __pthread_register_cancel,
8222 __pthread_unregister_cancel and __pthread_unwind_next.
8223
57a5ea02
UD
82242003-07-04 Jakub Jelinek <jakub@redhat.com>
8225
8226 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Use
8227 different symbol for the cancellation syscall wrapper and
8228 non-cancellation syscall wrapper.
8229 (PSEUDO_END): Define.
8230
d810b358
UD
82312003-07-05 Richard Henderson <rth@redhat.com>
8232
8233 * sysdeps/alpha/elf/pt-initfini.c: Avoid .ent/.end.
8234 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_wait,
42d86dd6
RH
8235 lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
8236 return actual return value from the syscall, not 0.
d810b358 8237
db54f488
UD
82382003-07-07 Ulrich Drepper <drepper@redhat.com>
8239
8240 * descr.h (struct pthread): Add pid field.
8241 * allocatestack.c (allocate_stack): Initialize pid field in descriptor.
8242 (__reclaim_stacks): Likewise.
8243 * init.c (sigcancel_handler): If __ASSUME_CORRECT_SI_PID is defined
8244 also check for PID of the signal source.
8245 (__pthread_initialize_minimal_internal): Also initialize pid field
8246 of initial thread's descriptor.
8247 * pthread_cancel.c: Use tgkill instead of tkill if possible.
8248 * sysdeps/unix/sysv/linux/fork.c: Likewise.
8249 * sysdeps/unix/sysv/linux/pt-raise.c: Likewise.
8250 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
8251 * sysdeps/unix/sysv/linux/raise.c: Likewise.
8252
5e497a41
UD
82532003-07-05 Ulrich Drepper <drepper@redhat.com>
8254
8255 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_push): Renamed.
8256 Fix use of parameter.
8257 (__libc_cleanup_pop): Likewise.
8258
86a0c4fa
UD
82592003-07-04 Ulrich Drepper <drepper@redhat.com>
8260
8261 * init.c (sigcancel_handler): Change parameters to match handler
8262 for SA_SIGACTION. Check signal number and code to recognize
8263 invalid invocations.
8264
bdbecaa3
RM
82652003-07-03 Roland McGrath <roland@redhat.com>
8266
8267 * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr):
8268 Apply sizeof (struct pthread) bias to r13 value.
8269
56421b23
UD
82702003-07-03 Ulrich Drepper <drepper@redhat.com>
8271
fbd90f6c
UD
8272 * sysdeps/pthread/configure.in: Require CFI directives.
8273
56421b23
UD
8274 * sysdeps/pthread/librt-cancellation.c (__pthread_unwind): Remove
8275 definition.
8276 * pthreadP.h (__pthread_unwind): Add hidden_proto if used in
8277 libpthread compilation.
8278 * unwind.c (__pthread_unwind): Add hidden_def.
8279 * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_unwind.
8280
ca2b4cd7
UD
82812003-07-01 Ulrich Drepper <drepper@redhat.com>
8282
8283 * libc-cancellation.c (__libc_cleanup_routine): Define.
8284 * sysdeps/pthread/bits/libc-lock.h (__pthread_cleanup_push): Define.
8285 (__pthread_cleanup_pop): Define.
8286
f036e569
UD
82872003-07-01 Richard Henderson <rth@redhat.com>
8288
8289 * sysdeps/alpha/elf/pt-initfini.c: New file.
8290 * sysdeps/alpha/pthread_spin_lock.S: New file.
8291 * sysdeps/alpha/pthread_spin_trylock.S: New file.
8292 * sysdeps/alpha/pthreaddef.h: New file.
8293 * sysdeps/alpha/td_ta_map_lwp2thr.c: New file.
8294 * sysdeps/alpha/tls.h: New file.
8295 * sysdeps/unix/sysv/linux/alpha/Makefile: New file.
8296 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: New file.
8297 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: New file.
8298 * sysdeps/unix/sysv/linux/alpha/createthread.c: New file.
8299 * sysdeps/unix/sysv/linux/alpha/fork.c: New file.
8300 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: New file.
8301 * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: New file.
8302 * sysdeps/unix/sysv/linux/alpha/pthread_once.c: New file.
8303 * sysdeps/unix/sysv/linux/alpha/sem_post.c: New file.
8304 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
8305
3b985826
UD
83062003-07-01 Ulrich Drepper <drepper@redhat.com>
8307
8308 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Add correct
8309 cleanup support and unwind info.
8310
3a4d1e1e
UD
83112003-06-30 Ulrich Drepper <drepper@redhat.com>
8312
8313 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
8314 Use correct cleanup handler registration. Add unwind info.
96c814d3
UD
8315 * sysdeps/unix/sysv/linux/unwindbuf.sym: New file.
8316 * sysdeps/unix/sysv/linux/Makefile: Add rule to build unwindbuf.h.
3a4d1e1e
UD
8317 * tst-once3.c: Add cleanup handler and check it is called.
8318 * tst-once4.c: Likewise.
8319 * tst-oncex3.c: New file.
8320 * tst-oncex4.c: New file.
8321 * Makefile: Add rules to build and run tst-oncex3 and tst-oncex4.
8322
e479cc8e
UD
83232003-06-29 Ulrich Drepper <drepper@redhat.com>
8324
8325 * sysdeps/pthread/configure.in: Check for C cleanup handling in gcc.
8326
7d7ff54c
UD
83272003-06-27 Ulrich Drepper <drepper@redhat.com>
8328
483e95d0
UD
8329 * tst-cancel4.c (tf_msgrcv): Use IPC_PRIVATE in msgget call.
8330 (tf_msgsnd): Likewise.
8331
7d7ff54c
UD
8332 * tst-cancel4.c (tf_msgrcv): Strengthen test against valid
8333 premature returns a bit more.
8334
7539c7ec
UD
83352003-06-26 Ulrich Drepper <drepper@redhat.com>
8336
8337 * sysdeps/pthread/librt-cancellation.c: Move __pthread_unwind
8338 definition to the front.
8339
8340 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rename
8341 the cleanup functions to make the names unique. Fix dwarf opcode
8342 un unwind table.
8343 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Rename cleanup
8344 functions to make the names unique. Fix CFA offset for two blocks.
8345
0af6a1d9
UD
83462003-06-25 Ulrich Drepper <drepper@redhat.com>
8347
8348 * sysdeps/pthread/pthread.h (class __pthread_cleanup_class): Add
8349 missing closing braces.
8350 Patch by Christophe Saout <christophe@saout.de>.
8351
eef4a9f3
RM
83522003-06-24 Roland McGrath <roland@redhat.com>
8353
8354 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Typo fix.
8355
4165d44d
UD
83562003-06-24 Ulrich Drepper <drepper@redhat.com>
8357
7f8f7b9d
UD
8358 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: New file.
8359 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: New file.
8360
4165d44d
UD
8361 * pthreadP.h: Declare __find_thread_by_id.
8362 * allocatestack.c [HP_TIMING_AVAIL]: Define __find_thread_by_id.
8363 * pthread_clock_gettime.c: Allow using other thread's clock.
8364 * pthread_clock_settime.c: Likewise.
8365 * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
8366 * Makefile: Add rules to build and run tst-clock2.
8367 * tst-clock2.c: New file.
8368
67b78ef9
UD
83692003-06-23 Ulrich Drepper <drepper@redhat.com>
8370
8371 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rewrite
8372 to use exception-based cleanup handler.
8373 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8374
8375 * tst-cond8.c (ch): Announce that we are done.
8376
8377 * pthreadP.h (__pthread_mutex_cond_lock): Mark with internal_function.
8378
8379 * tst-cancel17.c (tf): Retry aio_suspend in case of EINTR.
8380 Also test aio_suspend with timeout value.
8381
61623643
UD
83822003-06-22 Ulrich Drepper <drepper@redhat.com>
8383
3a4f2043
UD
8384 * pthreadP.h: Mark __pthread_mutex_unlock_usercnt also hidden.
8385 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Add
8386 attribute_hidden.
8387
61623643
UD
8388 * pthreadP.h (__pthread_mutex_init_internal): Mark hidden.
8389 (__pthread_mutex_lock_internal): Likewise.
8390 (__pthread_mutex_unlock_internal): Likewise.
8391 (__pthread_mutex_unlock_usercnt): Declare.
8392 * pthread_mutex_destroy.c: Always fail if used in any way.
8393 * pthread_mutex_init.c: Update comment.
8394 * pthread_mutex_lock.c: If NO_INCR is not defined adjust __nusers.
8395 * pthread_mutex_timedlock.c: Adjust __nusers.
8396 * pthread_mutex_trylock.c: Adjust __nusers.
8397 * pthread_mutex_unlock.c: Old code is in __pthread_mutex_unlock_usercnt
8398 and public interfaces are wrapper with pass additional parameter.
8399 __pthread_mutex_unlock_usercnt does not adjust __nusers if second
8400 parameter zero.
8401 * tst-mutex8.c: New file.
8402 * Makefile (tests): Add tst-mutex8.
8403 * sysdeps/pthread/pthread_cond_timedwait.c: Call
8404 __pthread_mutex_unlock_usercnt.
8405 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
8406 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8407 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8408 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8409 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8410 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Define NO_INCR.
8411 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
8412 Add __nusers.
8413 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8414 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
8415 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
8416 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
8417 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
8418
8419 * pthread_mutex_lock.c: Don't store THREAD_ID in __owner, use TID.
8420 * pthread_mutex_timedlock.c: Likewise.
8421 * pthread_mutex_trylock.c: Adjust __nusers.
8422 * pthread_mutex_unlock.c: Compare with TID not THREAD_ID.
8423 * tst-mutex9.c: New file.
8424 * Makefile (tests): Add tst-mutex9.
8425 * sysdeps/i386/tls.h: Remove THREAD_ID definition.
8426 * sysdeps/ia64/tls.h: Likewise.
8427 * sysdeps/powerpc/tls.h: Likewise.
8428 * sysdeps/s390/tls.h: Likewise.
8429 * sysdeps/sh/tls.h: Likewise.
8430 * sysdeps/x86_64/tls.h: Likewise.
8431 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
8432 Change type of __owner.
8433 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8434 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
8435 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
8436 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
8437 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
8438
9bdabb94
UD
84392003-06-19 Jakub Jelinek <jakub@redhat.com>
8440
8441 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Move to...
8442 * sysdeps/unix/sysv/linux/sem_post.c: ...here.
8443
8444 * sysdeps/unix/sysv/linux/sem_post.c: Move to...
8445 * sysdeps/unix/sysv/linux/powerpc/sem_post.c: ... here. Pass nr + 1
8446 instead of nr to lll_futex_wake. Only set errno and return -1
8447 if err < 0.
8448
8449 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_wait,
8450 lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
8451 return actual return value from the syscall, not 0.
8452
f6c93bd9
UD
84532003-06-18 Ulrich Drepper <drepper@redhat.com>
8454
ca343e73
UD
8455 * tst-cancel4.c (tf_msgsnd): Don't always use 100 as the type,
8456 find a random value.
8457 (tf_msgrcv): Likewise. Also don't report msgrcv returns if
8458 errno==EIDRM.
8459
50441a98
UD
8460 * sysdeps/unix/sysv/linux/timer_settime.c: Add prototype for
8461 compat_timer_settime.
8462 * sysdeps/unix/sysv/linux/timer_gettime.c: Add prototype for
8463 compat_timer_gettime.
8464 * sysdeps/unix/sysv/linux/timer_getoverr.c: Add prototype for
9bdabb94 8465 compat_timer_getoverrun.
50441a98
UD
8466 * sysdeps/unix/sysv/linux/timer_delete.c: Add prototype for
8467 compat_timer_delete.
8468
f6c93bd9
UD
8469 * pthread_mutex_destroy.c (__pthread_mutex_destroy): For
8470 error-checking mutex detect busy mutexes.
8471
047aec8f
UD
84722003-06-17 Ulrich Drepper <drepper@redhat.com>
8473
1d53508d
UD
8474 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_mutex_lock):
8475 Add ax to clobber list.
8476 (lll_mutex_cond_lock): Likewise.
8477 (lll_mutex_unlock): Likewise.
8478 (lll_lock): Likewise.
8479 (lll_unlock): Likewise.
8480
f23b30e2
UD
8481 * Makefile: Add rules to build and run tst-cancel18 and tst-cancelx18.
8482 * tst-cancel18.c: New file.
8483 * tst-cancelx18.c: New file.
8484
8485 * tst-cancel4.c: Test connect, creat, msgrcv, msgsnd, sendmsg, sendto,
8486 and tcdrain.
8487
8488 * Makefile: Add rules to build and run tst-cancel17 and tst-cancel17x.
8489 * tst-cancel17.c: New file.
8490 * tst-cancelx17.c: New file.
8491
8492 * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
8493 * sysdeps/unix/sysv/linux/sigwait.c: New file.
8494 * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
8495
047aec8f
UD
8496 * tst-cancel4.c: Test open, close, pread, pwrite, fsync, and msync.
8497
bbde8527
UD
84982003-06-16 Jakub Jelinek <jakub@redhat.com>
8499
8500 * sysdeps/pthread/createthread.c (create_thread): Set
8501 header.multiple_threads unconditionally.
8502 * allocatestack.c (allocate_stack): Likewise.
8503 * descr.h (struct pthread): Add header.multiple_threads
8504 unconditionally.
8505 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (CENABLE, CDISABLE):
8506 Define for librt. #error if neither libpthread, libc nor librt.
8507 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (CENABLE, CDISABLE):
8508 Likewise.
8509 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (CENABLE,
8510 CDISABLE): Likewise.
8511 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (CENABLE,
8512 CDISABLE): Likewise.
8513 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (CENABLE,
8514 CDISABLE): Likewise.
8515 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (CENABLE,
8516 CDISABLE): Likewise. Access header.multiple_threads outside of
8517 libc and libpthread.
8518 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (CENABLE, CDISABLE):
8519 Likewise.
8520 * sysdeps/x86_64/tls.h (tcbhead_t): Add multiple_threads.
8521 * sysdeps/x86_64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define.
8522
26676450
UD
85232003-06-17 Ulrich Drepper <drepper@redhat.com>
8524
8525 * tst-cancel4.c: Add tests for the socket and signal functions, pause.
8526 Also test early cancellation before the thread reaches the cancellation
8527 point.
8528
8529 * Makefile: Compile forward.c with exceptions.
8530
8531 * sysdeps/unix/sysv/linux/sleep.c: New file.
8532
301a6724
UD
85332003-06-16 Ulrich Drepper <drepper@redhat.com>
8534
0e0deb03
UD
8535 * Makefile: Add CFLAGS definition to compile function wrappers
8536 duplicated from libc with exceptions.
8537 * tst-cancel4.c: Also check cancellation handlers.
8538
301a6724
UD
8539 * Makefile: Add rules to build and run tst-cancel16 and
8540 tst-cancelx16. Add missing CFLAGS definitions.
8541 * tst-cancel16.c: New file.
8542 * tst-cancelx16.c: New file.
8543
7a114794
UD
85442003-06-15 Ulrich Drepper <drepper@redhat.com>
8545
452aea84
UD
8546 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
8547 (DL_SYSINFO_IMPLEMENTATION): Use CFI opcodes.
8548 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
8549 (DL_SYSINFO_IMPLEMENTATION): Likewise.
8550
7a114794
UD
8551 * pthreadP.h (LIBC_CANCEL_ASYNC): Also define for librt.
8552 (LIBC_CANCEL_RESET): Likewise.
8553 Declare __librt_enable_asynccancel and __librt_disable_asynccancel.
8554 * sysdeps/pthread/Makefile (librt-sysdep_routines): Add
8555 librt-cancellation.
8556 (CFLAGS-libcrt-cancellation.c): Define.
8557 * sysdeps/pthread/librt-cancellation.c: New file.
8558 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define all the nice
8559 macros also when compiling librt.
8560 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
8561 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
8562 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
8563 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
8564 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
8565 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
8566 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
8567
8568 * sysdeps/unix/sysv/linux/timer_create.c: Add prototype for
8569 compat_timer_create.
8570
8ba1d429
UD
85712003-06-14 Ulrich Drepper <drepper@redhat.com>
8572
cc8fb6f3
UD
8573 * sysdeps/pthread/posix-timer.h (timespec_compare): Always inline.
8574
8ba1d429
UD
8575 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
8576 __register_atfork.
8577 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
8578 Add libc_hidden_def.
8579
d4f100e2
RM
85802003-06-13 Roland McGrath <roland@redhat.com>
8581
8582 * sysdeps/x86_64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Pass FS
8583 constant from <sys/reg.h> to ps_get_thread_area, not register contents.
8584
dd9423a6
UD
85852003-06-11 Ulrich Drepper <drepper@redhat.com>
8586
8587 * allocatestack.c (queue_stack): Always inline.
8588 * ptreadhP.h (__do_cancel): Likewise.
8589
ed24330d
JJ
85902003-06-10 Jakub Jelinek <jakub@redhat.com>
8591
8592 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait): Fix
8593 a typo.
8594
06120d79
UD
85952003-06-10 Ulrich Drepper <drepper@redhat.com>
8596
8597 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
8598 (__pthread_cond_signal): Remove incorrect second addition for
8599 cond_lock!=0.
8600
b1720346
UD
86012003-06-09 Ulrich Drepper <drepper@redhat.com>
8602
5b318f85
UD
8603 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
8604 (__pthread_cond_signal): Use correct futex pointer in
8605 __lll_mutex_lock_wait call.
8606
b1720346
UD
8607 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
8608 (__pthread_cond_signal): Some more tweaks to handle cond_lock!=0.
8609
3e36c37d
UD
86102003-06-08 Ulrich Drepper <drepper@redhat.com>
8611
ecf7955d
UD
8612 * sysdeps/unix/sysv/linux/s390/sem_wait.c (__new_sem_wait): Make
8613 cancelable.
ed24330d 8614 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
ecf7955d
UD
8615 Likewise.
8616
3e36c37d
UD
8617 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Remove
8618 hand-written CFI generation code. Since ENTRY/END also initiated
8619 CFI frames this caused two CFI sets to be generated.
8620
7726edc2
UD
86212003-06-07 Ulrich Drepper <drepper@redhat.com>
8622
8623 * cleanup_routine.c: New file.
8624 * Versions (libpthread) [GLIBC_2.3.3]: Add __pthread_cleanup_routine.
8625 * sysdeps/pthread/pthread.h: Add support for fully exception-based
8626 cleanup handling.
8627 * Makefile (libpthread-routines): Add cleanup_routine.
8628 Add more CFLAGS variables to compile with exceptions. Add comments
8629 why which file needs unwind tables.
8630 (tests) [have-forced-unwind==yes]: Add tst-cancelx* and tst-cleanupx*
8631 tests.
8632 * tst-cancelx1.c: New file.
8633 * tst-cancelx2.c: New file.
8634 * tst-cancelx3.c: New file.
8635 * tst-cancelx4.c: New file.
8636 * tst-cancelx5.c: New file.
8637 * tst-cancelx6.c: New file.
8638 * tst-cancelx7.c: New file.
8639 * tst-cancelx8.c: New file.
8640 * tst-cancelx9.c: New file.
8641 * tst-cancelx10.c: New file.
8642 * tst-cancelx11.c: New file.
8643 * tst-cancelx12.c: New file.
8644 * tst-cancelx13.c: New file.
8645 * tst-cancelx14.c: New file.
8646 * tst-cancelx15.c: New file.
8647 * tst-cleanupx0.c: New file.
8648 * tst-cleanupx0.expect: New file.
8649 * tst-cleanupx1.c: New file.
8650 * tst-cleanupx2.c: New file.
8651 * tst-cleanupx3.c: New file.
8652
8653 * tst-cleanup0.c: Make standard compliant.
8654 * tst-cleanup1.c: Likewise.
8655
8656 * sysdeps/unix/sysv/linux/sem_timedwait.c: Add cancellation support.
8657 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
8658 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
8659 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
8660 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
8661 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
8662 * sysdeps/i386/tcb-offsets.sym: Add RESULT, CANCELHANDLING, and
8663 CLEANUP_JMP_BUF.
8664 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
8665 * tst-cancel12.c: New file.
8666 * tst-cancel13.c: New file.
8667 * tst-cancel14.c: New file.
8668 * tst-cancel15.c: New file.
8669 * Makefile (tests): Add tst-cancel12, tst-cancel13, tst-cancel14,
8670 and tst-cancel15.
8671
8672 * tst-cancel1.c: Add some comments.
8673
8674 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Compute relative
8675 timeout correctly.
8676
7a8a8e21
UD
86772003-06-06 Ulrich Drepper <drepper@redhat.com>
8678
8679 * Makefile (CFLAGS-pthread_cancel.c): Define.
8680
4ad0bbf4
UD
86812003-06-05 Ulrich Drepper <drepper@redhat.com>
8682
8683 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_rwlock_t):
8684 Change type of __writer element to int.
8685 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8686 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
8687 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
8688 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
8689 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
8690 * sysdeps/i386/tcb-offsets.sym: Replace SELF entry with TID entry.
8691 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
8692 * pthread_rwlock_trywrlock.c: Store TID not self pointer in __writer.
8693 Compare with TID to determine deadlocks.
8694 * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
8695 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
8696 * sysdeps/pthread/pthread_rwlock_timedwrlock.: Likewise.
8697 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
8698 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
8699 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8700 Likewise.
8701 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8702 Likewise.
8703 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8704 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
8705 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
8706 Likewise.
8707 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
8708 Likewise.
8709 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
8710 * Makefile (tests): Add tst-rwlock12.
8711 * tst-rwlock12.c: New file.
8712
332faa96
JJ
87132003-06-05 Jakub Jelinek <jakub@redhat.com>
8714
8715 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait,
8716 __lll_timedlock_wait, lll_unlock_wake_cb, __lll_timedwait_tid):
8717 Remove bogus hidden_proto.
8718 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
8719 Likewise.
8720 * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_lock,
8721 lll_unlock_wake_cb, ___lll_timedwait_tid): Likewise.
8722 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (___lll_mutex_lock,
8723 ___lll_mutex_timedlock): Likewise.
8724
29d9e2fd
UD
87252003-06-04 Ulrich Drepper <drepper@redhat.com>
8726
8727 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
8728 (__pthread_cond_signal): Add some code to eventually handle
8729 cond_lock!=0.
8730
6f1acb30
UD
87312003-06-01 Ulrich Drepper <drepper@redhat.com>
8732
8733 * Makefile (tests): Add tst-exec4.
8734 (tst-exec4-ARGS): Define.
8735 * tst-exec4.c: New file.
8736
49b65043
UD
87372003-05-31 Ulrich Drepper <drepper@redhat.com>
8738
31195be2
UD
8739 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
8740 Also fail if tv_nsec < 0.
8741 (__lll_timedwait_tid): Likewise.
8742 * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
8743 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_timedwait_tid):
8744 Likewise.
8745 * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_timedwait_tid):
8746 Likewise.
8747 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (__lll_mutex_timedlock):
8748 Likewise.
8749 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
8750 Likewise.
80b54217
UD
8751 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_timedwait_tid):
8752 Likewise.
8753 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_timedwait_tid):
8754 Likewise.
31195be2 8755
dcfc8224
UD
8756 * Makefile (tests): Add tst-sem8 and tst-sem9.
8757 * tst-sem8.c: New file.
8758 * tst-sem9.c: New file.
8759 * sem_open.c: Fix creation of in_use record if the file exists but
8760 no internal record.
8761
49b65043
UD
8762 * posix-timer.h: Remove old, unused timer_id2ptr and timer_ptr2id
8763 definitions.
8764
8765 * sysdeps/pthread/timer_create.c (timer_create): In case
8766 evp==NULL, assign timer ID to sival_ptr.
8767
8768 * descr.h (struct pthread_unwind_buf): Change type of prev element to
8769 struct pthread_unwind_buf *.
8770 (struct pthread): Likewise for cleanup_jmp_buf element.
8771
8772 * cleanup.c (__pthread_register_cancel): Add cast to avoid warning.
8773 * cleanup_defer.c (__pthread_register_cancel_defer): Likewise.
8774 * unwind.c (__pthread_unwind_next): Likewise.
8775
50794a45
UD
87762003-05-30 Ulrich Drepper <drepper@redhat.com>
8777
5d4f57bd
UD
8778 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
8779 (lll_futex_timed_wait): Use int for futex value parameter.
8780 (lll_futex_wake): Likewise.
8781 (lll_futex_requeue): Likewise.
8782
8783 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
8784 Replace one memory operation with one register operation.
8785
8786 * tst-join4.c (do_test): Fix error message.
8787
7ab7ea33
UD
8788 * tst-rwlock6.c (do_test): Use correct format specifier.
8789
8790 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
8791 (__lll_mutex_lock_wait): Replace one memory operation with one
8792 register operation.
8793 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S
8794 (__lll_mutex_lock_wait): Likewise.
8795
50794a45
UD
8796 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
8797 (__lll_mutex_cond_lock): Add one to value parameter of
8798 __lll_lock_wait to reflect reality in the futex syscall.
8799 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
8800 (lll_mutex_cond_lock): Likewise.
8801
5a70784e
JJ
88022003-05-30 Jakub Jelinek <jakub@redhat.com>
8803
8804 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_cond_lock):
8805 New function.
8806 (lll_mutex_cond_lock): Define.
8807
e7c5ac68
UD
88082003-05-29 Ulrich Drepper <drepper@redhat.com>
8809
586d1748
UD
8810 * Makefile (tests): Add tst-signal6.
8811 * tst-signal6.c: New file.
8812
b8ba4a27
UD
8813 * sysdeps/unix/sysv/linux/s390/lowlevellock.h
8814 (__lll_mutex_unlock_force): New function
8815 (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
8816
65d46efe
UD
8817 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
8818 (__lll_mutex_unlock_force): New function.
8819 (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
8820
8821 * tst-rwlock7.c (do_test): Use correct format specifier.
8822
e7c5ac68
UD
8823 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue):
8824 Find break parameter in correct asm argument.
8825
284bdc42
UD
88262003-05-27 Jakub Jelinek <jakub@redhat.com>
8827
8828 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_clobbers):
8829 Remove out4.
8830 (lll_futex_requeue): Fix __o3 constraint, return negative errno if
8831 error occured.
8832 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
8833 Add __mutex.
8834 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_REQUEUE,
8835 lll_futex_requeue, lll_mutex_unlock_force): Define.
8836
e7c5ac68
UD
88372003-05-30 Jakub Jelinek <jakub@redhat.com>
8838
8839 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
8840 (pthread_cond_t): Add __mutex.
8841 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_REQUEUE,
8842 lll_futex_requeue, lll_mutex_unlock_force): Define.
8843
ea2630c6
UD
88442003-05-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
8845
8846 * sysdeps/sh/tcb-offsets.sym: Define MUTEX_FUTEX.
8847 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
42d86dd6 8848 Add __mutex field.
ea2630c6
UD
8849 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (SYSCALL_WITH_INST_PAD):
8850 Define.
8851 (lll_futex_wait, lll_futex_wake): Define.
8852 * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: New file.
8853 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Try using
8854 FUTEX_REQUEUE instead of FUTEX_WAIT.
8855 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
8856 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Remember
8857 mutex which was used in condvar structure. Call
8858 __pthread_mutex_cond_lock instead of __pthread_mutex_lock_internal.
8859 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
8860
8861 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Don't
8862 include tcb-offsets.h. Read wakeup value in locked region.
8863 Use the value of gbr register as THREAD_ID.
8864 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
8865 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
8866 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
8867
8868 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Remove futex related
8869 macros.
8870
5a77f150
UD
88712003-05-28 Ulrich Drepper <drepper@redhat.com>
8872
8873 * sysdeps/pthread/pthread_cond_broadcast.c
8874 (__pthread_cond_broadcast): Fix typo: MAX_INT -> INT_MAX.
8875
7661d9f7
UD
88762003-05-26 Ulrich Drepper <drepper@redhat.com>
8877
8878 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Fix
8879 typo in register name.
8880 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use parameters
8881 correctly. Actually use requeue. Little optimization.
8882 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Store
8883 mutex address early. Handle cancellation state as 32-bit value.
8884 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8885 Remove unnecessary label.
8886
69431c9a
UD
88872003-05-25 Ulrich Drepper <drepper@redhat.com>
8888
8889 * sysdeps/pthread/pthread_cond_broadcast.c: Try using FUTEX_REQUEUE
8890 instead of FUTEX_WAIT.
8891 * sysdeps/pthread/pthread_cond_signal.c: Likewise.
8892 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
8893 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
8894 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
8895 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
8896 * sysdeps/pthread/pthread_cond_timedwait.c: Remember mutex which was
8897 used in condvar structure. Call __pthread_mutex_cond_lock instead
8898 of __pthread_mutex_lock_internal.
8899 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8900 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8901 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
8902 (__condvar_cleanup): Always call __pthread_mutex_cond_lock.
8903 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8904 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8905 * sysdeps/unix/sysv/linux/Makefile (libpthread-sysdep_routines):
8906 Add pthread_mutex_cond_lock.
8907 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add dep_mutex.
8908 * sysdeps/unix/sysv/linux/pthread_cond_mutex_lock.c: New file.
8909 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define
8910 lll_mutex_cond_lock.
8911 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
8912 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
248a3490 8913 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
69431c9a 8914 Add __mutex field.
248a3490 8915 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
69431c9a
UD
8916 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
8917
8918 * sysdeps/i386/tcb-offsets.sym: Define MUTEX_FUTEX.
8919 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
8920
8921 * pthreadP.h: Declare __pthread_mutex_cond_lock.
8922 * pthread_mutex_lock.c: Define LLL_MUTEX_LOCK if not already defined.
8923 Use it instead of lll_mutex_lock. If __pthread_mutex_lock is a
8924 macro don't define aliases.
8925
8926 * cancellation.c: Remove __pthread_enable_asynccancel_2.
8927 * pthreadP.h: Remove declaration of __pthread_enable_asynccancel_2.
8928 * sysdeps/pthread/pthread_cond_timedwait.c: Use
8929 __pthread_enable_asynccancel instead of __pthread_enable_asynccancel_2.
8930 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8931 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8932 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
8933 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8934 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8935
fddfebbd
UD
89362003-05-17 Ulrich Drepper <drepper@redhat.com>
8937
8938 * sem_open.c: Fix one endless loop. Implement correct semantics
8939 wrt opening the same semaphore more then once.
8940 * sem_close.c: Adjust for sem_open change.
8941 * semaphoreP.h: Include <semaphore.h>. Define struct inuse_sem.
8942 Declare __sem_mappings, __sem_mappings_lock, __sem_search.
8943 * Makefile (tests): Add tst-sem7.
8944 * tst-sem7.c: New file.
8945
1eefffb0
RM
89462003-05-16 Roland McGrath <roland@redhat.com>
8947
8948 * sysdeps/unix/sysv/linux/register-atfork.c (libc_freeres_fn): Fix
8949 uninitialized variable braino.
8950
6e66dc78
UD
89512003-05-16 Ulrich Drepper <drepper@redhat.com>
8952
23ae6451
UD
8953 * sysdeps/unix/sysv/linux/timer_gettime.c (timer_gettime): Correct
8954 test for syscall availability.
8955
8956 * sysdeps/unix/sysv/linux/timer_settime.c (timer_settime): Set
8957 __no_posix_timers to -1 if the syscalls don't exist.
8958
7ac5b8e2
UD
8959 * pthread_join.c (pthread_join): Set tid field of the joined
8960 thread to -1. This isn't necessary but helps to recognize some
8961 error conditions with almost no cost.
8962
8963 * allocatestack.c (FREE_P): Also negative values indicate an
8964 unused stack.
8965
6e66dc78
UD
8966 * unwind.c: Include <unistd.h>.
8967
855dba3c
UD
89682003-05-14 Ulrich Drepper <drepper@redhat.com>
8969
8970 * Makefile ($(objpfx)$(multidir)): Add rule to create the directory.
8971
81f3ac4c
UD
89722003-05-14 Jakub Jelinek <jakub@redhat.com>
8973
8974 * Makefile (crti-objs, crtn-objs): New variables.
8975 (omit-deps, extra-objs): Add crtn.
8976 ($(objpfx)libpthread.so): Depend on both crti and crtn
8977 and links to them in multidir.
8978 ($(objpfx)crtn.S, $(objpfx)crtn.o): New rules.
8979
7158eae4
UD
89802003-05-12 Steven Munroe <sjmunroe@us.ibm.com>
8981
8982 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
8983 (lll_mutex_unlock): Use atomic_exchange_rel.
8984
edf205d5
UD
89852003-05-11 Ulrich Drepper <drepper@redhat.com>
8986
8987 * cond-perf.c (cons): Add missing locking around setting of alldone.
8988
a3f979a7
UD
89892003-05-10 Ulrich Drepper <drepper@redhat.com>
8990
8991 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Remove futex
8992 related macros.
8993 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
8994
880867a4
UD
89952003-05-09 Ulrich Drepper <drepper@redhat.com>
8996
949ec764
UD
8997 * tst-sem6.c: New file.
8998 * Makefile (tests): Add tst-sem6.
8999
9000 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (___lll_mutex_unlock):
9001 Use atomic_exchange_rel instead of atomic_exchange.
9002 * sysdeps/unix/sysv/linux/lowlevellock.c (lll_unlock_wake_cb):
9003 Likewise.
9004
9005 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Improve quality of
9006 code for lll_futex_wait and lll_futex_wake in static apps. Use
9007 vsyscall is possible.
9008
9009 * sysdeps/unix/sysv/linux/pthread_getaffinity.c: New file.
9010 * sysdeps/unix/sysv/linux/pthread_setaffinity.c: New file.
9011 * sysdeps/pthread/pthread.h: Declare pthread_getaffinity_np and
9012 pthread_setaffinity_np.
9013 * Versions [libpthread] (GLIBC_2.3.3): Add pthread_getaffinity_np
9014 and pthread_setaffinity_np.
9015 * Makefile (libpthread-routines): Add pthread_getaffinity and
9016 pthread_setaffinity.
9017
880867a4
UD
9018 * allocatestack.c (allocate_stack): If ARCH_RETRY_MMAP is defined,
9019 use it in case mmap to allocate the stack fails.
9020 * sysdeps/unix/sysv/linux/x86_64/Makefile: Don't define
9021 ARCH_MAP_FLAGS here.
9022 * sysdeps/x86_64/pthreaddef.h: Define ARCH_MAP_FLAGS and
9023 ARCH_RETRY_MMAP.
9024
92d83c72
UD
90252003-05-08 Ulrich Drepper <drepper@redhat.com>
9026
9027 * sysdeps/unix/sysv/linux/fork.c: Complete rewrite of the atfork
9028 handler implementation. It is now lockless in fork().
9029 * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
9030 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
9031 * sysdeps/unix/sysv/linux/fork.h: Don't include <link.h>. Don't
9032 declare the __fork_*_lists.
9033 (struct fork_handler): Include pointers to all three functions.
9034 Add next, refcntr and need_signal elements.
9035 (__fork_handlers): New declaration.
9036 (__register_atfork_malloc): Remove declaration.
9037 (HAVE_register_atfork_malloc): Remove definition.
9038 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove
9039 __pthread_child_handler variable.
9040 (__libc_pthread_init): Use __register_atfork instead of explicitly
9041 adding to the list.
9042 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define lll_futex_wait
9043 and lll_futex_wake.
9044 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
9045
9046 * unwind.c (unwind_cleanup): Print error message and then abort. This
9047 function must never be reached.
9048
9049 * cond-perf.c: New file.
9050
be4d8038
UD
90512003-05-05 Ulrich Drepper <drepper@redhat.com>
9052
9053 * sysdeps/i386/tls.h (TLS_INIT_TP): Include \n in error message.
9054
c6696b79
RM
90552003-05-04 Roland McGrath <roland@redhat.com>
9056
9057 * Makefile ($(objpfx)../libc.so): New target.
9058
7da168bf
UD
90592003-05-02 Ulrich Drepper <drepper@redhat.com>
9060
9061 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
9062 (pthread_condattr_t): Size is only an int, don't use long for
9063 alignment.
9064 (pthread_mutexattr_t): Likewise.
7da168bf
UD
9065 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
9066 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
9067 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
9068
9a7178d6
UD
90692003-05-01 Ulrich Drepper <drepper@redhat.com>
9070
9071 * sysdeps/i386/tls.h: Define THREAD_ID.
9072 * sysdeps/ia64/tls.h: Likewise.
9073 * sysdeps/powerpc/tls.h: Likewise.
9074 * sysdeps/s390/tls.h: Likewise.
9075 * sysdeps/sh/tls.h: Likewise.
9076 * sysdeps/x86_64/tls.h: Likewise.
9077 * pthread_mutex_lock.c: Use THREAD_ID instead of THREAD_SELF to
9078 record ownership.
9079 * pthread_mutex_timedlock.c: Likewise.
9080 * pthread_mutex_trylock.c: Likewise.
9081 * pthread_mutex_unlock.c: Likewise.
9082 * pthread_rwlock_trywrlock.c: Likewise.
9083 * sysdeps/pthread/pthread_rwlocklock_rdlock.c: Likewise.
9084 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
9085 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
9086 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
9087
9088 * sysdeps/pthread/createthread.c (create_thread): Use CLONE_SYSVSEM
9089 flag.
9090
a234e27d
UD
90912003-04-29 Jakub Jelinek <jakub@redhat.com>
9092
9093 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
9094 (__SIZEOF_PTHREAD_COND_T): Define to 48.
9095 (pthread_rwlock_t): Add 16 bytes of pad instead of 8 before __flags.
9096 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
9097 Make __align long long instead of long.
9098 (pthread_rwlock_t): Formatting.
9099 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
9100 (pthread_rwlock_t): Formatting.
9101 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
9102 (pthread_cond_t): Make __align long long instead of long.
9103 (pthread_rwlock_t): Move __flags field to the same position as in
9104 linuxthreads.
9105
f025c136
UD
91062003-04-30 Ulrich Drepper <drepper@redhat.com>
9107
9108 * tst-rwlock6.c (do_test): Use correct printf format specifiers.
9109 * tst-rwlock7.c (do_test): Likewise.
9110
7531ab9e
RM
91112003-04-26 Roland McGrath <roland@redhat.com>
9112
9113 * Makefile ($(test-modules)): Depend on $(common-objpfx)shlib.lds.
9114
299601a1
UD
91152003-04-22 Jakub Jelinek <jakub@redhat.com>
9116
299601a1
UD
9117 * allocatestack.c (TLS_TPADJ): Add TLS_PRE_TCB_SIZE instead of
9118 sizeof (struct pthread).
9119 (allocate_stack): Subtract TLS_PRE_TCB_SIZE bytes instead of
468777e1 9120 1 struct pthread.
299601a1
UD
9121 * sysdeps/powerpc/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Define
9122 to 0.
9123 (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Define to alignment of
9124 struct pthread.
9125 (TLS_PRE_TCB_SIZE): Increase to cover tcbhead_t preceeded by pad
9126 to 32-bit bytes.
9127 (INSTALL_DTV, GET_DTV, THREAD_DTV): tcbhead_t is immediately before
9128 tcbp.
9129 (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Don't add TLS_TCB_SIZE
9130 unneccessarily.
9131 (NO_TLS_OFFSET): Define.
299601a1
UD
9132 * sysdeps/unix/sysv/linux/powerpc/createthread.c (TLS_VALUE): Don't
9133 add TLS_TCB_SIZE unnecessarily.
299601a1 9134
950094f8
RM
91352003-04-22 Roland McGrath <roland@redhat.com>
9136
9137 * Makeconfig (shared-thread-library): Reverse link order to work
9138 around linker bug.
9139
dc2f6455
UD
91402003-04-22 Ulrich Drepper <drepper@redhat.com>
9141
9142 * semaphore.h: Fix typo in comment.
9143
e7608d77
UD
91442003-04-21 Ulrich Drepper <drepper@redhat.com>
9145
6a87ee19
UD
9146 * sysdeps/pthread/sigfillset.c: New file.
9147
e7608d77
UD
9148 * init.c (__pthread_initialize_minimal): Don't block SIGTIMER.
9149 * pthreadP.h: Make SIGTIMER and SIGCANCEL the same.
9150 * sysdeps/pthread/pthread_sigmask.c: Remove handling of SIGTIMER.
9151 * sysdeps/pthread/sigaction.c: Likewise.
9152 * sysdeps/pthread/sigprocmask.c: New file.
9153 * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): Define as
9154 __SIGRTMIN+1.
9155 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
9156 Block SIGTIMER. Also handle SI_TKILL events and terminate thread
9157 in this case.
9158
0b3df49e
UD
91592003-04-19 Ulrich Drepper <drepper@redhat.com>
9160
58a7a325
UD
9161 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
9162 (DL_SYSINFO_IMPLEMENTATION): Add .eh_frame information.
9163
0b3df49e
UD
9164 * sysdeps/unix/sysv/linux/unregister-atfork.c
9165 (__unregister_atfork): Don't free memory not allocated dynamically.
9166
9167 * semaphore.h: Remove __THROW marker from cancellation points.
9168 * nptl/sysdeps/pthread/pthread.h: Likewise.
9169
7d74651e
UD
91702003-04-18 Ulrich Drepper <drepper@redhat.com>
9171
76a67697
UD
9172 * sysdeps/pthread/pthread.h: Don't mark pthread_testcancel,
9173 pthread_cancel, pthread_setcancelstate, and pthread_setcanceltype with
7d74651e
UD
9174 __THROW.
9175
dd9d6538
JJ
91762003-04-16 Jakub Jelinek <jakub@redhat.com>
9177
9178 * tst-cancel4.c (do_test): Use %zd instead of %d when printing cnt.
9179
4ab6f47c
RM
91802003-04-15 Roland McGrath <roland@redhat.com>
9181
9182 * forward.c (__pthread_unwind): Tweak to avoid warning.
9183
162434a6
UD
91842003-04-15 Ulrich Drepper <drepper@redhat.com>
9185
9186 * pthreadP.h: Move THREAD_ATOMIC_* replacements to the top.
9187
35909161
UD
91882003-04-14 Ulrich Drepper <drepper@redhat.com>
9189
18ddd3aa 9190 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Don't
35909161
UD
9191 overflow CFA advance instructions.
9192 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
9193
18a8e730
UD
91942003-04-14 Jakub Jelinek <jakub@redhat.com>
9195
bd4f43b4
UD
9196 * sysdeps/i386/tls.h: Rename LOCK to LOCK_PREFIX.
9197 * sysdeps/i386/pthread_spin_lock.c: Likewise.
9198 * sysdeps/x86_64/tls.h: Likewise. Define LOCK_PREFIX if not already
9199 defined.
9200
18a8e730
UD
9201 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Use
9202 DW_CFA_advance_loc2 for .Laddl-.Lsubl.
9203 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
9204 DW_CFA_advance_loc for .Laddl-.Lsubl.
9205
08c765fa
UD
92062003-04-13 Ulrich Drepper <drepper@redhat.com>
9207
18a8e730
UD
9208 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Don't use
9209 position-independent unwind data for static libraries.
9210 Add missing unwind info. Add comments.
9211
ad2be852
UD
9212 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Add unwind info.
9213 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
9214 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
08c765fa
UD
9215 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9216
177d1ad3
UD
92172003-04-12 Ulrich Drepper <drepper@redhat.com>
9218
08c765fa
UD
9219 * Makefile: Make sure all cancellation points are compiled with
9220 exception and asynchronous unwind tables.
9221
177d1ad3
UD
9222 * sysdeps/x86_64/tls.h (THREAD_SETMEM): Word around compiler bug
9223 which mishandles loading of global object addresses in PIC.
9224 (THREAD_SETMEM_NC): Likewise.
9225
09d65ff3
UD
92262003-04-11 Ulrich Drepper <drepper@redhat.com>
9227
9228 * pthread.h: Define new data structure for cleanup buffer. Declare
9229 new cleanup handler interfaces.
9230 * descr.h: Include <unwind.h> if necessary. Define pthread_unwind_buf.
9231 (struct pthread): Add cleanup_jmp_buf pointer. Define
9232 HAVE_CLEANUP_JMP_BUF and not HAVE_CANCELBUF.
9233 * pthreadP.h: Declare __pthread_unwind. Define __do_cancel to use
9234 it. Declare old cleanup handler installation functions.
9235 * cleanup.c: Rewrite. Install handler for unwind-based cleanup
9236 handling.
9237 * cleanup_defer.c: Likewise.
9238 * cleanup_compat.c: New file. Old cleanup code.
9239 * cleanup_def_compat.c: New file. Old cleanup code.
9240 * pthread_create.c (start_thread): Initialize cleanup_jmp_buf element
9241 if own thread descriptor.
9242 * unwind.c: New file.
9243 * forward.c: Add __pthread_unwind.
9244 * init.c (pthread_functions): Add __pthread_unwind.
9245 * sysdeps/pthread/pthread-functions.s (struct pthread_functions):
9246 Add ptr___pthread_unwind.
9247 * Versions [GLIBC_2.3.3] (libpthread): Export new cleanup handling
9248 and unwind function.
9249 * Makefile (libpthread-routines): Add cleanup_compat,
9250 cleanup_def_compat, and unwind. Define CFLAGS to enable unwind
9251 table generation if necessary.
9252 * version.c: Record whether unwind support is compiled in.
9253 * sysdeps/pthread/configure.in: Add checks for unwind unterfaces.
9254 * sysdeps/pthread/bits/libc-lock.h: Add prototypes of the old cleanup
9255 handler interfaces.
9256 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add quite a bit of
9257 complication to generate unwind information for syscall wrappers.
68107ec0 9258 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
09d65ff3
UD
9259 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
9260 __cleanup_fct_attribute.
9261
9262 * Makefile: Add rules to build and run tst-cleanup0.
9263 * tst-cleanup0.c: New file.
9264 * tst-cleanup0.expect: New file.
9265
9266 * pthread_create.c (deallocate_tsd): Don't take parameter. Adjust
9267 caller. Optimize to avoid often unecessary local variable.
9268
0dc44b51
RM
92692003-04-11 Roland McGrath <roland@redhat.com>
9270
9271 * Makefile ($(objpfx)multidir.mk): New target, generated makefile that
9272 sets variable `multidir'; include that.
9273 (generated): Add it.
9274 ($(objpfx)$(multidir)/crti.o): New target.
9275 [$(multidir) != .] (generated-dirs, extra-objs, omit-deps): Add it.
9276
84a80719
UD
92772003-04-11 Ulrich Drepper <drepper@redhat.com>
9278
9279 * tst-attr2.c (do_test): Add cast to avoid warning.
9280 * tst-mutex4.c (do_test): Likewise.
9281
88ff4759
UD
92822003-04-10 Ulrich Drepper <drepper@redhat.com>
9283
9284 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset CPU clocks
9285 in child.
9286
b2041097
UD
92872003-04-09 Ulrich Drepper <drepper@redhat.com>
9288
9289 * Makefile (tests): Add tst-detach1.
9290 * tst-detach1.c: New file.
9291
f9657e88
UD
92922003-04-08 Ulrich Drepper <drepper@redhat.com>
9293
9afe4964
UD
9294 * sysdeps/pthread/pthread.h: Remove duplicate
9295 pthread_cleanup_{push,pop} definitions.
9296
f9657e88
UD
9297 * tst-barrier2.c: Eliminate warnings.
9298 * tst-cancel4.c: Likewise.
9299 * tst-cond4.c: Likewise.
9300 * tst-cond6.c: Likewise.
9301 * tst-detach1.c: Likewise.
9302 * tst-rwlock4.c: Likewise.
9303 * tst-rwlock6.c: Likewise.
9304 * tst-rwlock7.c: Likewise.
9305 * tst-sem3.c: Likewise.
9306 * tst-spin2.c: Likewise.
9307 * tst-umask1.c: Likewise.
9308
69b35e86
UD
93092003-04-07 Ulrich Drepper <drepper@redhat.com>
9310
9311 * pthread_detach.c (pthread_detach): Fix test for invalid TID.
9312
c70ad7d7
UD
93132003-04-06 Ulrich Drepper <drepper@redhat.com>
9314
9315 * descr.h (struct pthread): Move cancelhandling member to the front.
9316
54e0138f
UD
93172003-04-05 Ulrich Drepper <drepper@redhat.com>
9318
9319 * sysdeps/unix/sysv/linux/register-atfork.c: Define malloc_prepare,
9320 malloc_parent, and malloc_child statically.
9321 (__register_atfork_malloc): New function.
9322 (free_mem): Don't free any of the malloc_* variables on the list.
9323 * sysdeps/unix/sysv/linux/fork.h: Declare __register_atfork_malloc.
9324 Define HAVE_register_atfork_malloc.
9325
b22d701b
UD
93262003-04-04 Ulrich Drepper <drepper@redhat.com>
9327
9328 * sysdeps/pthread/createthread.c (create_thread): Add some more
9329 comments explaining when to set multiple_threads and when not.
9330
9331 * pthreadP.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
9332 THREAD_ATOMIC_BIT_SET if not already defined.
9333 * sysdeps/i386/tls.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
9334 THREAD_ATOMIC_BIT_SET:
9335 * sysdeps/x86_64/tls.h: Likewise.
9336 * cleanup_defer.c (_pthread_cleanup_push_defer): Rewrite to use
9337 THREAD_ATOMIC_CMPXCHG_VAL.
9338 (_pthread_cleanup_pop_restore): Likewise.
9339 * cancellation.c (__pthread_enable_asynccancel): Likewise.
9340 (__pthread_enable_asynccancel_2): Likewise.
9341 (__pthread_disable_asynccancel): Likewise.
9342 * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
9343 (__libc_disable_asynccancel): Likewise.
9344 * init.c (sigcancel_handler): Likewise.
9345 * pthread_setcancelstate.c (__pthread_setcancelstate): Likewise.
9346 * pthread_setcanceltype.c (__pthread_setcanceltype): Likewise.
9347
86246935
UD
93482003-04-03 Ulrich Drepper <drepper@redhat.com>
9349
9350 * init.c (sigcancel_handler): Don't set EXITING_BIT here.
9351 * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
9352 * pthreadP.h (__do_cancel): Set EXITING_BIT here.
9353 * Makefile (tests): Add tst-cancel11.
9354 * tst-cancel11.c: New file.
9355
6b4686a5
UD
93562003-04-01 Ulrich Drepper <drepper@redhat.com>
9357
9358 * pthread_create.c (deallocate_tsd): Clear/free memory after the last
9359 round, not the first. Use specific_used flag instead of local
9360 found_nonzero variable. Use THREAD_[SG]ETMEM where possible.
9361 (__free_tcb): Don't call deallocate_tsd here.
9362 (start_thread): Call deallocate_tsd here.
9363 * pthread_setspecific.c: Set specific_used flag really only when
9364 needed.
0d73a73b 9365 * Makefile (tests): Add tst-tsd3.c and tst-tsd4.
6b4686a5 9366 * tst-tsd3.c: New file.
0d73a73b 9367 * tst-tsd4.c: New file.
6b4686a5 9368
42b2395d
UD
93692003-03-31 Ulrich Drepper <drepper@redhat.com>
9370
211d90c5
UD
9371 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_mutex_lock):
9372 Use atomic_exchange_and_add instead of __lll_add.
9373 (__lll_mutex_timedlock): Likewise.
9374 Patch by Ian Wienand.
9375
93762003-03-24 Steven Munroe <sjmunroe@us.ibm.com>
9377
9378 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
9379 (SINGLE_THREAD_P): Fix typo.
9380 * tst-cancel-wrappers.sh: Handle '.'ed symbols.
9381
93822003-03-31 Ulrich Drepper <drepper@redhat.com>
9383
9384 * Makefile (tests): Add tst-align.
9385 * tst-align.c: New file.
9386 * sysdeps/i386/Makefile: Define CFLAGS-tst-align.
211d90c5 9387
42b2395d
UD
9388 * sysdeps/i386/tls.h (CALL_THREAD_FCT): Align stack of called
9389 function correctly.
9390
211d90c5
UD
9391 * tst-tsd2.c: Add casts to avoid warnings.
9392
163b180f
UD
93932003-03-30 Ulrich Drepper <drepper@redhat.com>
9394
9395 * descr.h (struct pthread): Move most often used elements to the front.
9396
ea473bad
UD
93972003-03-29 Ulrich Drepper <drepper@redhat.com>
9398
9399 * Makefile (libpthread-routines): Add pthread_atfork.
9400 (libpthread-static-only-routines): Add pthread_atfork.
9401
dd731d53
UD
94022003-03-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
9403
9404 * sysdeps/sh/tls.h: Include nptl/descr.h after the definition
9405 of TLS_DTV_AT_TP.
9406 (INSTALL_DTV): Add parens.
9407 (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
9408 Use passed descr instead of THREAD_SELF.
9409 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S
9410 (__lll_mutex_timedlock_wait): Correct expected value after
9411 spurious wakeup.
9412 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S:
9413 Release lock before waking up the waiters.
9414 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Correct exit
9415 criteria. Reorderstruct passed to cleanup handler. Fix
9416 handling of cancellation and failung pthread_mutex_unlock call.
9417 Use __pthread_enable_asynccancel_2 instead of
9418 __pthread_enable_asynccancel.
9419 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
9420 Return result of lock re-get if it fails.
9421 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Fix wrong argument
9422 for __pthread_cleanup_push.
9423 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Fix
9424 completely broken rwlock implementation.
9425 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
9426 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
9427 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
9428 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
9429 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
9430 * sysdeps/unix/sysv/linux/sh/sem_post.S: Fix error value. Use
9431 versioned_symbol macro.
9432 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Use versioned_symbol macro.
9433 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
9434
c75d02f0
UD
94352003-03-27 Ulrich Drepper <drepper@redhat.com>
9436
5f5004df
UD
9437 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Don't declare
9438 __timer_helper_thread. Declare __start_helper_thread, __helper_once,
9439 and __helper_tid.
9440 (struct timer): Remove th and bar field.
9441 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Remove
9442 debugging code. Create only one helper thread.
9443 * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Don't kill
9444 helper thread.
9445 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
9446 Renamed. Define statically. Use thread info from siginfo.
9447 (__helper_once): New variable.
9448 (__helper_tid): New variable.
9449 (__reset_helper_control): New function.
9450 (__start_helper_thread): New function.
9451
18d009ca
UD
9452 * pthread_create.c (start_thread): Don't use setjmp inside
9453 __builtin_expect to work around gcc bug.
9454
c75d02f0
UD
9455 * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Even if
9456 timer_delete syscall fails, but not with ENOSYS, set
9457 __no_posix_timers.
9458
9459 * sysdeps/unix/sysv/linux/timer_settime.c [!__ASSUME_POSIX_TIMERS]
9460 (timer_settime): Fix typo.
28cf3058
UD
9461 * sysdeps/unix/sysv/linux/timer_getoverr.c
9462 [!__ASSUME_POSIX_TIMERS] (timer_getoverrun): Likewise.
c75d02f0 9463
049ac259
JJ
94642003-03-27 Jakub Jelinek <jakub@redhat.com>
9465
9466 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Fix
9467 offset of cleanupbuf.__prev.
9468
f93d39dd
JJ
94692003-03-26 Jakub Jelinek <jakub@redhat.com>
9470
9471 * sysdeps/unix/sysv/linux/timer_getoverr.c: Fix typo in name
9472 of included file.
9473
f064e4c5
UD
94742003-03-26 Ulrich Drepper <drepper@redhat.com>
9475
9476 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): If EVP ==
9477 NULL provide default definition to syscall.
9478
83e886a3
RM
94792003-03-25 Roland McGrath <roland@redhat.com>
9480
9481 * sysdeps/pthread/posix-timer.h (TIMER_MAX): Define if not defined.
9482 (timer_id2ptr): Fix typo.
9483
09402f5b
UD
94842003-03-25 Ulrich Drepper <drepper@redhat.com>
9485
9486 * pthreadP.h: Define SIGCANCEL and SIGTIMER.
9487 * sysdeps/i386/pthreaddef.h: Remove SIGCANCEL definition.
9488 * sysdeps/ia64/pthreaddef.h: Likewise.
9489 * sysdeps/powerpc/pthreaddef.h: Likewise.
9490 * sysdeps/s390/pthreaddef.h: Likewise.
9491 * sysdeps/sh/pthreaddef.h: Likewise.
9492 * sysdeps/x86_64/pthreaddef.h: Likewise.
9493 * init.c (__pthread_initialize_minimal): Block SIGTIMER.
9494 * sysdeps/pthread/sigaction.c: Also prevent SIGTIMER handler from
9495 being changed.
9496 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
9497 SIGTIMER is not unblocked.
9498 * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): One more
9499 RT signal taken.
9500 * sysdeps/unix/sysv/linux/pthread_kill.c: Do not allow SIGTIMER to
9501 be send.
9502 * sysdeps/pthread/posix-timer.h (timer_id2ptr, timer_ptr2id): Just
9503 pass pointer through as ID.
9504 * sysdeps/unix/sysv/linux/bits/local_lim.h (TIMER_MAX): Removed.
9505 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: New file.
9506 * sysdeps/unix/sysv/linux/timer_create.c: New file.
9507 * sysdeps/unix/sysv/linux/timer_delete.c: New file.
9508 * sysdeps/unix/sysv/linux/timer_getoverr.c: New file.
9509 * sysdeps/unix/sysv/linux/timer_gettime.c: New file.
9510 * sysdeps/unix/sysv/linux/timer_routines.c: New file.
9511 * sysdeps/unix/sysv/linux/timer_settime.c: New file.
9512 * sysdeps/unix/sysv/linux/ia64/Versions: New file.
9513 * sysdeps/unix/sysv/linux/ia64/timer_create.c: New file.
9514 * sysdeps/unix/sysv/linux/ia64/timer_delete.c: New file.
9515 * sysdeps/unix/sysv/linux/ia64/timer_getoverr.c: New file.
9516 * sysdeps/unix/sysv/linux/ia64/timer_gettime.c: New file.
9517 * sysdeps/unix/sysv/linux/ia64/timer_settime.c: New file.
9518 * sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions: New file.
9519 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_create.c: New file.
9520 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_delete.c: New file.
9521 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_getoverr.c: New file.
9522 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_gettime.c: New file.
9523 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_settime.c: New file.
9524 * sysdeps/unix/sysv/linux/s390/s390-64/Versions: New file.
9525 * sysdeps/unix/sysv/linux/s390/s390-64/timer_create.c: New file.
9526 * sysdeps/unix/sysv/linux/s390/s390-64/timer_delete.c: New file.
9527 * sysdeps/unix/sysv/linux/s390/s390-64/timer_getoverr.c: New file.
9528 * sysdeps/unix/sysv/linux/s390/s390-64/timer_gettime.c: New file.
9529 * sysdeps/unix/sysv/linux/s390/s390-64/timer_settime.c: New file.
9530 * sysdeps/unix/sysv/linux/x86_64/Versions: New file.
9531 * sysdeps/unix/sysv/linux/x86_64/compat-timer.h: New file.
9532 * sysdeps/unix/sysv/linux/x86_64/timer_create.c: New file.
9533 * sysdeps/unix/sysv/linux/x86_64/timer_delete.c: New file.
9534 * sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c: New file.
9535 * sysdeps/unix/sysv/linux/x86_64/timer_gettime.c: New file.
9536 * sysdeps/unix/sysv/linux/x86_64/timer_settime.c: New file.
9537
9538 * pthreadP.h: Remove FRAME_LEFT definition.
9539 * cleanup.c (_pthread_cleanup_push): Don't check for reference to
9540 already left frame. Programs which have this problem are not POSIX
9541 compliant.
9542 * cleanup_defer.c (_pthread_cleanup_push_defer): Likewise.
9543
5e826ab5
UD
95442003-03-24 Ulrich Drepper <drepper@redhat.com>
9545
9546 * sysdeps/pthread/tst-timer.c: Check return values of the
9547 functions we test.
9548
b910f788
RM
95492003-03-23 Roland McGrath <roland@redhat.com>
9550
3045a1fe
RM
9551 * tst-tls3.c (do_test) [! HAVE___THREAD]: Don't test anything.
9552 * tst-tls3mod.c: Likewise.
9553 * tst-tls1.c: Likewise.
9554 * tst-tls2.c: Likewise.
9555
85047fe3
RM
9556 * tst-mutex5.c (do_test): Unlock before destroy, otherwise we invoke
9557 undefined behavior.
9558
b910f788
RM
9559 * tst-join5.c (tf1, tf2): Add a cast.
9560
9561 * Makeconfig (includes): Append -I$(..)nptl to this variable.
9562
9563 * tst-barrier2.c (do_test) [! _POSIX_THREAD_PROCESS_SHARED]:
9564 Don't test anything.
9565 * tst-cond4.c: Likewise.
9566 * tst-cond6.c: Likewise.
9567 * tst-flock2.c: Likewise.
9568 * tst-mutex4.c: Likewise.
9569 * tst-rwlock4.c: Likewise.
9570 * tst-signal1.c: Likewise.
9571 * tst-spin2.c: Likewise.
9572 * tst-cond11.c [! _POSIX_CLOCK_SELECTION]: Likewise.
9573
9574 * tst-mutex4.c: Use test-skeleton.c.
9575 * tst-spin2.c: Likewise.
9576 * tst-sysconf.c: Likewise.
9577 * tst-barrier2.c: Likewise.
9578 * tst-cond4.c: Likewise.
9579 * tst-cond6.c: Likewise.
9580 * tst-rwlock4.c: Likewise.
9581 * tst-unload.c: Likewise.
9582 * tst-flock2.c (do_test): Use return instead of exit.
9583
4baa087a
RM
95842003-03-22 Jakub Jelinek <jakub@redhat.com>
9585
9586 * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
9587
5a3ab2fc
UD
95882003-03-21 Ulrich Drepper <drepper@redhat.com>
9589
9f07eae2
UD
9590 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
9591 (__lll_mutex_trylock): Use atomic_compare_and_exchange_val_acq
9592 instead of __lll_compare_and_swap.
9593 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
9594 Likewise.
9595 Removed definition if __lll_compare_and_swap.
9596
5a3ab2fc
UD
9597 * cancellation.c: Adjust for new form of compare&exchange macros.
9598 * cleanup_defer.c: Likewise.
9599 * init.c: Likewise.
9600 * libc-cancellation.c: Likewise.
9601 * old_pthread_cond_broadcast.c: Likewise.
9602 * old_pthread_cond_signal.c: Likewise.
9603 * old_pthread_cond_timedwait.c: Likewise.
9604 * old_pthread_cond_wait.c: Likewise.
9605 * pthread_cancel.c: Likewise.
9606 * pthread_create.c: Likewise.
9607 * pthread_detach.c: Likewise.
9608 * pthread_join.c: Likewise.
9609 * pthread_key_delete.c: Likewise.
9610 * pthread_setcancelstate.c: Likewise.
9611 * pthread_setcanceltype.c: Likewise.
9612 * pthread_timedjoin.c: Likewise.
9613 * pthread_tryjoin.c: Likewise.
9614 * sysdeps/pthread/createthread.c: Likewise.
9615
b1aea098
UD
96162003-03-20 Ulrich Drepper <drepper@redhat.com>
9617
9618 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Include <atomic.h>.
4baa087a 9619 Remove __lll_add, __lll_dec_if_positive, and __lll_test_and_set
b1aea098
UD
9620 definitions. Replace uses with calls to atomic_* functions.
9621 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
9622 * sysdeps/unix/sysv/linux/lowlevellock.c: Replace __lll_add and
9623 __lll_test_and_set calls with atomic_exchange_and_add and
9624 atomic_exchange calls respectively.
9625 * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
9626 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
9627 * sysdeps/unix/sysv/linux/sem_trywait.c: Likewise.
9628 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
9629 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Likewise.
9630 * sysdeps/unix/sysv/linux/ia64/sem_port.c: Likewise.
9631 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
9632
9633 * allocatestack.c (allocate_stack): Assume atomic_exchange_and_add
9634 returns the old value.
9635
100a7100
RM
96362003-03-20 Martin Schwidefsky <sky@mschwid3.boeblingen.de.ibm.com>
9637
9638 * sysdeps/s390/pthread_spin_lock.c (pthread_spin_lock): Use type
9639 int for variable OLDVAL and correct inline assembler contraint.
9640 * sysdeps/s390/pthread_spin_trylock.c (pthread_spin_trylock): Use
9641 type int for variable OLD.
9642
9643 * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it
9644 only for s390-32.
9645 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
9646 (SINGLE_THREAD_P): Use global variable __local_multiple_threads
9647 instead of multiple_threads field in the TCB.
9648
95767b36
UD
96492003-03-19 Ulrich Drepper <drepper@redhat.com>
9650
4009bf40
UD
9651 * sysdeps/i386/i686/bits/atomic.h: Removed.
9652 * sysdeps/i386/i586/bits/atomic.h: Removed.
9653 * sysdeps/i386/i486/bits/atomic.h: Removed. Moved to glibc.
9654 * sysdeps/x86_64/bits/atomic.h: Removed. Moved to glibc.
9655 * sysdeps/s390/bits/atomic.h: Removed. Moved to glibc.
9656 * sysdeps/sh/bits/atomic.h: Removed. Moved to glibc.
9657 * sysdeps/ia64/bits/atomic.h: Removed. Moved to glibc.
9658 * sysdeps/powerpc/bits/atomic.h: Removed. Moved to glibc.
9659 * atomic.h: Removed. Moved to glibc.
9660
560a784f
UD
9661 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Add
9662 support for clock selection.
9663
95767b36
UD
9664 * sysdeps/pthread/pthread_cond_broadcast.c: Release lock before
9665 signalling waiters.
9666
043ad426
RM
96672003-03-18 Roland McGrath <roland@redhat.com>
9668
94659495
RM
9669 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
9670 Add __lll_rel_instr first. Add memory clobber.
9671 (lll_mutex_unlock): Use __lll_test_and_set.
9672 From Paul Mackerras <paulus@samba.org>.
9673
9674 * sysdeps/powerpc/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define
9675 unconditionally.
9676 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
9677 (SINGLE_THREAD_P): Add `header.' prefix.
9678 From Paul Mackerras <paulus@samba.org>.
9679
043ad426
RM
9680 * Versions (libpthread: GLIBC_2.3.2): Move pthread_tryjoin_np and
9681 pthread_timedjoin_np to ...
9682 (libpthread: GLIBC_2.3.3): ... here.
9683 (libpthread: GLIBC_2.2): Move pthread_barrierattr_getpshared there too.
9684
9685 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
9686 Avoid shadowing VAL variable.
9687
9688 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
9689 New macro.
9690
86a9ee5e
UD
96912003-03-18 Ulrich Drepper <drepper@redhat.com>
9692
ac9e0aa1
UD
9693 * Makefile (tests): Add tst-cond11.
9694 * tst-cond11.c: New file.
9695
a14b373c
UD
9696 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Reorder
9697 struct passed to cleanup handler to eliminate one more
9698 instruction.
9699 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9700
24a49f38
UD
9701 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
9702 (pthrad_cond_t): Replace __unused field with __clock.
9703
9704 * sysdeps/pthread/pthread_cond_wait.c: Release condvar lock before
9705 waken all waiters in cleanup handler.
9706 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
9707 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
9708
86a9ee5e
UD
9709 * pthread_condattr_getclock.c: New file.
9710 * pthread_condattr_setclock.c: New file.
9711 * sysdeps/pthread/pthread.h: Declare these new functions.
9712 * Versions [GLIBC_2.3.3] (libpthread): Add the new functions.
9713 * Makefile (libpthread-routines): Add the new functions.
9714 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_condattr):
9715 Renamed field to value. Document use of the bits.
9716 * pthread_condattr_getpshared.c: Adjust for struct pthread_condattr
9717 change.
9718 * pthread_condattr_setpshared.c: Likewise.
d5cb8389 9719 * pthread_cond_init.c (__pthread_cond_init): Initialized __clock field.
86a9ee5e
UD
9720 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add cond_clock symbol.
9721 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
9722 Add __clock field.
9723 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
9724 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
9725 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
9726 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
9727 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
9728 Implement clock selection.
9729 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
9730 * pthread-errnos.sym: Add ENOSYS.
9731 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
9732 _POSIX_CLOCK_SELECTION.
9733 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
9734
9735 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Remove
9736 invalid .size directive.
9737
98054a05
RM
97382003-03-17 Roland McGrath <roland@redhat.com>
9739
9740 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
9741 Formatting tweaks.
9742
001bea71
UD
97432003-03-17 Ulrich Drepper <drepper@redhat.com>
9744
4773086e
UD
9745 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Use __builtin_expect.
9746 Use __lll_add instead of spelling it out. Use protected symbol names.
9747 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Use __builtin_expect.
9748 Use __lll_add.
9749 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_compare_and_swap):
9750 Renamed from lll_compare_and_swap. Use new name where necessary.
9751 (__lll_add): Defined.
9752 (__lll_dec_if_positive): Defined.
9753 (__lll_test_and_set): Defined.
9754 * sysdeps/ia64/pthread_spin_init.c: Removed.
9755 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Removed.
9756 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Removed.
9757 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Removed.
9758 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Removed.
9759 * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: Removed.
9760 * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: Removed.
9761 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Removed.
001bea71
UD
9762 * sysdeps/ia64/bits/atomic.h: Add __builtin_expect where appropriate.
9763 * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
9764 __sync_lock_release_si.
9765 Patch by Jakub Jelinek.
9766
9767 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
9768 Fix timeout handling.
9769 (__lll_timedwait_tid): Likewise.
9770 (lll_unlock_wake_cb): Wake up other waiters if necessary.
9771 Patch by Jakub Jelinek.
9772
9773 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Pretty printing.
9774
de4471dd
RM
97752003-03-17 Roland McGrath <roland@redhat.com>
9776
9777 PowerPC port contributed by Paul Mackerras <paulus@samba.org>.
9778 * sysdeps/pthread/pthread_spin_init.c: New file.
9779 * sysdeps/pthread/pthread_spin_unlock.c: New file.
9780 * sysdeps/powerpc/Makefile: New file.
9781 * sysdeps/powerpc/pthread_spin_lock.c: New file.
9782 * sysdeps/powerpc/pthread_spin_trylock.c: New file.
9783 * sysdeps/powerpc/pthreaddef.h: New file.
9784 * sysdeps/powerpc/tcb-offsets.sym: New file.
9785 * sysdeps/powerpc/td_ta_map_lwp2thr.c: New file.
9786 * sysdeps/powerpc/tls.h: New file.
9787 * sysdeps/powerpc/bits/atomic.h: New file.
9788 * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: New file.
9789 * sysdeps/unix/sysv/linux/libc-lowlevellock.c: New file.
9790 * sysdeps/unix/sysv/linux/lowlevellock.c: New file.
98054a05 9791
de4471dd
RM
9792 * sysdeps/unix/sysv/linux/lowlevelmutex.c: New file.
9793 * sysdeps/unix/sysv/linux/sem_post.c: New file.
9794 * sysdeps/unix/sysv/linux/sem_timedwait.c: New file.
9795 * sysdeps/unix/sysv/linux/sem_trywait.c: New file.
9796 * sysdeps/unix/sysv/linux/sem_wait.c: New file.
9797 * sysdeps/unix/sysv/linux/powerpc/Makefile: New file.
9798 * sysdeps/unix/sysv/linux/powerpc/createthread.c: New file.
9799 * sysdeps/unix/sysv/linux/powerpc/fork.c: New file.
9800 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: New file.
9801 * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: New file.
9802 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: New file.
9803 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: New file.
9804 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: New file.
9805 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
9806 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New file.
9807
9808 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Use __gettimeofday,
9809 not gettimeofday.
9810 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Likewise.
9811 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
9812 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Likewise.
9813 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Likewise.
9814 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
9815
5778033f
UD
98162003-03-17 Ulrich Drepper <drepper@redhat.com>
9817
9818 * sysdeps/pthread/pthread_cond_wait.c: Correct exit criteria.
9819 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
9820 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9821 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
9822 Patch by Ewald Snel <ewald@rambo.its.tudelft.nl>.
9823
796038f8
RM
98242003-03-16 Roland McGrath <roland@redhat.com>
9825
9826 * tst-fork4.c: Include <string.h>.
9827 * tst-signal2.c: Likewise.
9828 * tst-mutex5.c (do_test): exit -> return.
9829 * tst-mutex2.c: Include <stdlib.h>.
9830
51d0678c
UD
98312003-03-16 Ulrich Drepper <drepper@redhat.com>
9832
5778033f
UD
9833 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
9834 (__lll_mutex_timedlock_wait): Correct expected value after
9835 spurious wakeup. Otherwise we would never wait again.
9836
b6e2f87a
UD
9837 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Work around red
9838 zone versus inline asm stupidity. Use correct instructions.
9839
51d0678c
UD
9840 * tst-rwlock6.c: Add some more status output.
9841
8112cc70
RM
98422003-03-15 Roland McGrath <roland@redhat.com>
9843
9844 * sysdeps/pthread/configure.in: New file.
9845 * sysdeps/pthread/configure: New file (generated).
9846
49773c19
UD
98472003-03-15 Ulrich Drepper <drepper@redhat.com>
9848
9849 * allocatestack.c (allocate_stack): Store the exact stack size of
9850 user allocated stacks.
9851
eec0ca9f
JJ
98522003-03-15 Jakub Jelinek <jakub@redhat.com>
9853
9854 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
9855 (SINGLE_THREAD): Use `header' prefix instead of `header.data'.
9856 * sysdeps/sh/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
9857 * sysdeps/sh/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define.
9858 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
9859 Use `header.' prefix.
9860 * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
9861
a87731e2
UD
98622003-03-15 Ulrich Drepper <drepper@redhat.com>
9863
9864 * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Don't use
9865 __builtin_frame_address, use stack pointer.
9866
9867 * sysdeps/unix/sysv/linux/jmp-unwind.c: Use CURRENT_STACK_FRAME
9868 instead of __builtin_frame_pointer.
9869
e22a221d
UD
98702003-03-14 Ulrich Drepper <drepper@redhat.com>
9871
92ed3daf
UD
9872 * tst-basic1.c (do_test): Add cast to avoid warning.
9873 * tst-basic2.c (do_test): Likewise.
9874
9b89567d
UD
9875 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use correct
9876 amount of stack correction.
9877
e22a221d
UD
9878 * tst-fork4.c: Use test-skeleton.c.
9879
2e49caba
RM
98802003-03-14 Roland McGrath <roland@redhat.com>
9881
9882 * init.c: Fix typo "#eli" for "#else".
9883
415ef7d8
RM
98842003-03-14 Steven Munroe <sjmunroe@us.ibm.com>
9885
9886 * allocatestack.c (__stack_user): Use hidden_data_def.
9887 * pthread_create.c (__pthread_keys): Likewise.
9888
9889 * init.c [__powerpc__] (__NR_set_tid_address): Define it.
9890
52287505
RM
98912003-03-14 Roland McGrath <roland@redhat.com>
9892
415ef7d8
RM
9893 * tst-fork4.c: New file.
9894 * Makefile (tests): Add it.
9895
52287505
RM
9896 * descr.h (struct pthread): Move the union out of [!TLS_DTV_AT_TP], so
9897 we always define the padding space.
9898 [!TLS_DTV_AT_TP]: Give tcbhead_t field a name, `header', since GCC
9899 stopped supporting its own extensions fully.
9900 [TLS_MULTIPLE_THREADS_IN_TCB]: Put `multiple_threads' inside a wrapper
9901 struct also called `header', so `header.multiple_threads' is the field
9902 name to use on all machines.
9903 * allocatestack.c (allocate_stack): Use `header.' prefix.
9904 * sysdeps/pthread/createthread.c (create_thread): Likewise.
9905 * pthread_create.c (__pthread_create_2_1): Likewise.
9906 * sysdeps/i386/tls.h (INSTALL_NEW_DTV, THREAD_DTV): Likewise.
9907 (THREAD_SELF): Likewise.
9908 * sysdeps/x86_64/tls.h: Likewise.
9909 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
9910 (SINGLE_THREAD_P): Likewise.
9911 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
9912 (SINGLE_THREAD_P): Likewise.
9913 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
9914 (SINGLE_THREAD_P): Likewise.
9915
9916 * sysdeps/s390/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Use REGS[18]
9917 value directly.
9918
c44bf9aa
UD
99192003-03-14 Ulrich Drepper <drepper@redhat.com>
9920
e22a221d
UD
9921 * pthread_create.c (start_thread): Use CALL_THREAD_FCT if defined.
9922 * sysdeps/i386/tls.h: Define CALL_THREAD_FCT.
9923
0eb18281
UD
9924 * pthread_create.c (start_thread): setjmp is expected to return 0.
9925
c44bf9aa
UD
9926 * sysdeps/x86_64/tls.h (THREAD_GETMEM): Mark asms volatile.
9927 (THREAD_GETMEM_NC): Likewise.
9928
564cd8b6
UD
99292003-03-13 Ulrich Drepper <drepper@redhat.com>
9930
9931 * allocatestack.c (allocate_stack): If MULTI_PAGE_ALIASING is defined
9932 and the size of the stack which must be allocated is a multiple,
9933 allocate one more page.
9934 * sysdeps/i386/i686/Makefile: Don't define COLORING_INCREMENT, but
9935 MULTI_PAGE_ALIASING.
9936
6461e577
RM
99372003-03-13 Roland McGrath <roland@redhat.com>
9938
9939 * pthread_create.c (start_thread): Set EXITING_BIT after the
9940 event-reporting (and destructors), not before.
9941
b5ec5617
UD
99422003-03-13 Jakub Jelinek <jakub@redhat.com>
9943
6461e577
RM
9944 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_timed_wait,
9945 lll_futex_wake): Declare register variables as long int instead of
9946 unsigned long int. Patch by Ian Wienand <ianw@gelato.unsw.edu.au>.
9947 Make syscall arguments clobbered by the syscall.
9948 (lll_futex_wait): Define using lll_futex_timed_wait.
9949
9950 * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Cast regs[13]
9951 to void *.
9952
9953 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Only declare and set
9954 PPID if [! NDEBUG].
9955
9956 * allocatestack.c (nptl_ncreated): Only declare if
9957 COLORING_INCREMENT != 0.
9958
9959 * pthreadP.h (__pthread_enable_asynccancel_2): New prototype.
9960 (__libc_enable_asynccancel_2): Remove prototype.
9961
b5ec5617
UD
9962 * sysdeps/unix/sysv/linux/ia64/fork.c (ARCH_FORK): Swap ptid and
9963 ctid to match kernel.
9964
d0369fb8
UD
99652003-03-12 Ulrich Drepper <drepper@redhat.com>
9966
7588880f
UD
9967 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add
9968 libc_multiple_threads.
9969 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Move definition of
9970 __libc_multiple_threads to...
9971 * sysdeps/unix/sysv/linux/libc_multiple_threads.c: ...here. New file.
9972
9973 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Remove unnecessary
9974 versioning.
9975 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
9976 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
9977
9978 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
9979 (__pthread_once_internal): Define.
9980
9981 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Use shlib-compat.h
9982 macros instead of .symver directly.
9983 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
9984 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
9985
d0369fb8
UD
9986 * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Include tcb-offsets.h.
9987 * sysdeps/x86_64/tcb-offsets.sym: New file.
9988 * sysdeps/x86_64/Makefile: New file.
9989
9990 * sysdeps/i386/tcb-offsets.sym: Add SELF.
9991 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use SELF
9992 to access own pthread_t in TCB.
9993 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
9994 Likewise.
9995 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
9996 Likewise.
9997 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
9998
0bb2ac85
RM
99992003-03-12 Roland McGrath <roland@redhat.com>
10000
10001 * pthread-errnos.sym: New file.
10002 * Makefile (gen-as-const-headers): New variable, list that file.
10003 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include generated
10004 header <pthread-errnos.h> instead of defining errno values here.
10005 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
10006 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
10007 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
10008 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
10009 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
10010 Likewise.
10011 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
10012 Likewise.
10013 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
10014 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10015 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
10016 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
10017 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
10018 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
10019 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
10020 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
10021 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
10022 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
10023 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
10024 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
10025 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
10026 * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
10027 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
10028 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
10029 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
10030 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
10031 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
10032 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
10033 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
10034 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
10035 * sysdeps/i386/i486/pthread_spin_trylock.S: Likewise.
10036 * sysdeps/x86_64/pthread_spin_trylock.S: Likewise.
10037 * sysdeps/sh/pthread_spin_trylock.S: Likewise.
10038 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
10039 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
10040
10041 * sysdeps/unix/sysv/linux/fork.c: Add an assert to check that
10042 CLONE_CHILD_SETTID worked.
10043
35e148cb
UD
100442003-03-12 Ulrich Drepper <drepper@redhat.com>
10045
d0369fb8
UD
10046 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: New
10047 file.
10048 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S: New
10049 file.
10050
10051 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
10052 (pthread_cond_t): Add padding.
10053
da49194d
UD
10054 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: New file.
10055 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: New file.
10056 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: New file.
10057
35e148cb
UD
10058 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
10059 (__pthread_rwlock_timedwrlock): Add missing opcode suffix.
10060 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
10061 (__pthread_rwlock_timedrdlock): Likewise.
10062 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
10063 (__pthread_rwlock_wrlock): Likewise.
10064 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
10065 (__pthread_rwlock_rdlock): Likewise.
10066
10067 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: New file.
10068
10069 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Return
10070 result of lock re-get if it fails.
10071
3e976b96
UD
100722003-03-11 Ulrich Drepper <drepper@redhat.com>
10073
5a03acfe
UD
10074 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Fix asm syntax.
10075 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
10076 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
10077 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
10078 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
10079 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
10080 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
10081 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
10082 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
10083 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
10084
10085 * sysdeps/x86_64/tls.h (THREAD_SELF, THREAD_GETMEM, THREAD_GETMEM_NC,
10086 THREAD_SETMEM, THREAD_SETMEM_NC): Correct asm syntax.
10087
10088 * allocatestack.c [! TLS_MULTIPLE_THREADS_IN_TCB] (allocate_stack):
10089 Initialize *__libc_multiple_threads_ptr not __libc_multiple_threads.
10090 * sysdeps/pthread/createthread.c [! TLS_MULTIPLE_THREADS_IN_TCB]
10091 (create_thread): Likewise.
10092 Define __pthread_multiple_threads and __libc_multiple_threads_ptr.
10093 * init.c (__pthread_initialize_minimal_internal): Initialize
10094 __libc_multiple_threads_ptr if necessary.
10095 * pthreadP.h: Adjust prototype for __libc_pthread_init. Declare
10096 __pthread_multiple_threads and __libc_multiple_threads_ptr.
10097 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Define
10098 __libc_multiple_threads.
10099 (__libc_pthread_init): Return pointer to __libc_pthread_init if
10100 necessary.
10101
10102 * sysdeps/i386/tls.h (THREAD_SETMEM): Fix one-byte variant.
10103 (THREAD_SETMEM_NC): Likewise.
10104
10105 * sysdeps/x86_64/pthread_spin_trylock.c: Removed.
10106 * sysdeps/x86_64/pthread_spin_trylock.S: New file.
10107 * sysdeps/x86_64/pthread_spin_unlock.c: Removed.
10108 * sysdeps/x86_64/pthread_spin_unlock.S: New file.
10109
10110 * sysdeps/i386/i486/pthread_spin_trylock.S (pthread_spin_trylock):
10111 Eliminate one entire instruction.
10112
32a589b1
UD
10113 * cancellation.c (__pthread_enable_asynccancel_2): New function.
10114 * pthreadP.h: Declare __pthread_enable_asynccancel_2.
10115 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
10116 (__pthread_cond_timedwait): Use __pthread_enable_asynccancel_2
10117 instead of __pthread_enable_asynccancel.
10118 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
10119 (__pthread_cond_wait): Likewise.
10120 * sysdeps/pthread/pthread_cond_timedwait.c
10121 (__pthread_cond_timedwait): Likewise.
10122 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
10123
3e976b96
UD
10124 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
10125 (__condvar_cleanup): Wake up all waiters in case we got signaled
10126 after being woken up but before disabling asynchronous
10127 cancellation.
10128 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
10129 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
10130 (__condvar_cleanup): Likewise.
10131
10132 * init.c (__NR_set_tid_address): If already defined, don't redefine.
10133 Make it an error if architecture has no #if case. Add x86-64.
10134
10135 * sysdeps/unix/sysv/linux/x86_64/Makefile: Add flags for
10136 pt-initfini.s generation.
10137
10138 * sysdeps/x86_64/tls.h: Include <asm/prctl.h>.
10139 (TLS_INIT_TP): Fix typo.
10140
6c477888
UD
101412003-03-11 Jakub Jelinek <jakub@redhat.com>
10142
10143 * sysdeps/ia64/bits/atomic.h (atomic_exchange_and_add): Swap 2nd and
10144 3rd argument of __arch_compare_and_exchange_{32,64}_val_acq.
10145
10146 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Include semaphore.h.
10147 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
10148 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Likewise.
10149 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Likewise.
10150 * sysdeps/unix/sysv/linux/s390/sem_post.c: Likewise.
10151 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
10152 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
10153 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
10154
ea694823
UD
101552003-03-11 Ulrich Drepper <drepper@redhat.com>
10156
6c477888
UD
10157 * sysdeps/pthread/pthread_cond_timedwait.c
10158 (__pthread_cond_timedwait): Return the result of the final
10159 locking. If it succeeds, the regular function return value.
10160
10161 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait):
10162 Return result of the final locking.
10163 * version.c (__nptl_main): Work around problems with the strange
10164 INTERNAL_SYSCALL macro on ppc32.
10165 * init.c (__pthread_initialize_minimal_internal): Unblock
10166 SIGCANCEL in case the parent blocked it.
10167 Reported by Paul Mackerras <paulus@samba.org>.
10168
ea694823
UD
10169 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: New file.
10170 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: New file.
10171 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: New file.
10172
b33e6163
RM
101732003-03-11 Jakub Jelinek <jakub@redhat.com>
10174
10175 * sysdeps/pthread/pthread_cond_timedwait.c
10176 (__pthread_cond_timedwait): Unlock and fail if
10177 __pthread_mutex_unlock_internal failed.
10178
10179 * sysdeps/pthread/createthread.c (ARCH_CLONE): Define if not defined.
10180 (create_thread): Only assert PD->tcb != NULL under [TLS_TCB_AT_TP].
10181 Use ARCH_CLONE.
10182 * allocatestack.c (ALLOCATE_STACK_PARMS): New macro.
10183 [NEED_SEPARATE_REGISTER_STACK] (STACK_VARIABLES,
10184 STACK_VARIABLES_ARGS, STACK_VARIABLES_PARMS, ALLOCATE_STACK_PARMS,
10185 ALLOCATE_STACK): New macros.
10186 (TLS_TPADJ): New macro.
10187 (get_cached_stack, queue_stack, __deallocate_stack): Use TLS_TPADJ.
10188 (allocate_stack): Handle TLS_DTV_AT_TP and
10189 NEED_SEPARATE_REGISTER_STACK. Use TLS_TPADJ.
10190 * pthread_create.c (__pthread_create_2_1) [! TLS_TCB_AT_TP]:
10191 Don't set PD->self.
10192 * init.c [__ia64__] (__NR_set_tid_address): Define.
10193
10194 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: New file.
10195 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: New file.
10196 * sysdeps/unix/sysv/linux/ia64/fork.c: New file.
10197 * sysdeps/unix/sysv/linux/ia64/createthread.c: New file.
10198 * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: New file.
10199 * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: New file.
10200 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: New file.
10201 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: New file.
10202 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: New file.
10203 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
10204 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: New file.
10205 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: New file.
10206 * sysdeps/unix/sysv/linux/ia64/sem_post.c: New file.
10207 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: New file.
10208 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: New file.
10209 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: New file.
10210 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
10211 * sysdeps/ia64/bits/atomic.h: New file.
10212 * sysdeps/ia64/Makefile: New file.
10213 * sysdeps/ia64/pthread_spin_init.c: New file.
10214 * sysdeps/ia64/pthread_spin_lock.c: New file.
10215 * sysdeps/ia64/pthread_spin_trylock.c: New file.
10216 * sysdeps/ia64/pthread_spin_unlock.c: New file.
10217 * sysdeps/ia64/pthreaddef.h: New file.
10218 * sysdeps/ia64/tcb-offsets.sym: New file.
10219 * sysdeps/ia64/td_ta_map_lwp2thr.c: New file.
10220 * sysdeps/ia64/tls.h: New file.
10221
10222 * sysdeps/s390/pthreaddef.h (__exit_thread_inline): Pass 1 argument
10223 to syscall instead of no arguments.
10224
2b30b2e5
UD
102252003-03-10 Ulrich Drepper <drepper@redhat.com>
10226
db5f2fc9
UD
10227 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: New file.
10228 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: New file.
10229 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: New file.
10230 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: New file.
10231
10232 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Fix error value in
10233 unused code.
10234
6a4263e3
UD
10235 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: New file
10236
3de7c2a9
UD
10237 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
10238 lowlevelbarrier.sym.
10239 * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: New file.
10240 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S:
10241 Include lowlevelbarrier.h and don't define offsets locally.
6a4263e3 10242 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Likewise.
3de7c2a9 10243
2a544d82
UD
10244 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
10245 (__lll_mutex_lock_wait): Reverse order of first two parameters.
10246 (__lll_mutex_timedlock_wait): Likewise.
10247 (lll_mutex_lock): Adjust asm for that.
10248 (lll_mutex_timedlock): Likewise. Mark cx, cc, r10 as clobbered.
10249 (lll_lock): Adjust asm for operand order change.
10250 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: New file.
10251 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: New file.
10252
ec06436c
UD
10253 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_lock_wait):
10254 Reverse order of parameters.
10255 (__lll_timedwait_tid): Remove regparms attribute.
10256 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: New file.
10257 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: New file.
10258
3273832c
UD
10259 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
10260 (__lll_timedwait_tid): Remove one unnecessary instruction.
10261
51f32ab8
UD
10262 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Define
10263 __lll_mutex_timedlock_wait only for NOT_IN_libc.
10264 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Include
10265 lowlevelmutex.S.
10266
10267 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
10268 lll_unlock_wake_cb, __lll_wait_tid, and __lll_timedwait_tid only
10269 for NOT_IN_libc.
10270 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Include
10271 lowlevellock.S.
10272
fad48d9e
UD
10273 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Don't define
10274 LOCK is already defined. Don't define __lll_mutex_timedlock_wait
10275 for libc.so.
10276 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Only
10277 define LOCK here (if UP is not defined). The actual code is in
10278 lowlevelmutex.S.
10279
9356d063
UD
10280 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Don't define
10281 LOCK is already defined. Don't define lll_unlock_wake_cb and
10282 __lll_timedwait_tid for libc.so.
10283 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Only
10284 define LOCK here (if UP is not defined). The actual code is in
10285 lowlevellock.S.
10286
ebf0cbc5 10287 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Not needed anymore.
106f6f9d
UD
10288 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: Likewise.
10289 * sysdeps/unix/sysv/linux/s390/sem_post.c: Include lowlevellock.h
10290 instead of lowlevelsem.h.
10291 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
10292 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
10293 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
0be8ee21 10294
c915e5ad
UD
10295 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
10296 lowlevelrwlock.sym.
10297 * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: New file.
10298 * sysdeps/unix/sysv/linux/i386/lowlevelrwlock.h: Removed.
146fa1ee 10299 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: Removed.
c915e5ad 10300
4c3c2e8a
UD
10301 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_trylock): Fix
10302 register loading.
10303 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_trylock): Undo
10304 last changed. D'oh.
10305
2b30b2e5
UD
10306 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: New file.
10307
10308 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove declaration
10309 of __libc_locking_needed.
10310 (lll_trylock): Initialize %eax to zero.
10311
2b30b2e5
UD
10312 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Update
10313 pthread_cond_t definition.
10314
e48f9638
RM
103152003-03-10 Roland McGrath <roland@redhat.com>
10316
10317 * sysdeps/unix/sysv/linux/lowlevelcond.sym: New file.
10318 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add it.
10319 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: File removed.
10320 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: Likewise.
10321 * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: Likewise.
10322
10323 * allocatestack.c (allocate_stack) [!TLS_MULTIPLE_THREADS_IN_TCB]:
10324 Instead of setting PD->multiple_threads, set globals
10325 __pthread_multiple_threads and __libc_multiple_threads.
10326 * sysdeps/pthread/createthread.c (create_thread): Likewise.
10327 * sysdeps/i386/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it.
10328 * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Likewise.
10329
10330 * descr.h (struct pthread): Conditionalize first member on
10331 [!TLS_DTV_AT_TP]. Replace the `header' member with an anonymous union
10332 containing an anonymous tcbhead_t. Move `list' member out.
10333 [TLS_MULTIPLE_THREADS_IN_TCB]: Define a `multiple_threads' member.
10334 * allocatestack.c: Remove use of `header.data.' prefix.
10335 * pthread_create.c: Likewise.
10336 * init.c (__pthread_initialize_minimal_internal): Likewise.
10337 * sysdeps/pthread/createthread.c (create_thread): Likewise.
10338 * sysdeps/i386/tls.h (INSTALL_DTV): Add parens.
10339 (THREAD_SELF, THREAD_DTV, INSTALL_NEW_DTV): No `header.data.' prefix.
10340 * sysdeps/x86_64/tls.h: Likewise.
10341 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
10342 (SINGLE_THREAD_P): Likewise.
10343 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
10344 (SINGLE_THREAD_P): Likewise.
10345 * sysdeps/i386/tls.h (tcbhead_t): Remove `list' member.
10346 * sysdeps/s390/tls.h (tcbhead_t): Likewise.
10347
c37cae9e
UD
103482003-03-09 Ulrich Drepper <drepper@redhat.com>
10349
d38c777e
RM
10350 * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: New file.
10351
7b44a5e0 10352 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
2b30b2e5 10353 * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
7b44a5e0 10354
c2e5e085
UD
10355 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix many
10356 leftovers from the ia32 code.
10357
10358 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Remove unneccessary
10359 memory load.
10360 (clear_once_control): Don't load %esi.
10361
10362 * sysdeps/x86_64/tls.h: Remove all traces of segment descriptor
10363 handling.
10364
10365 * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
10366
cd4b2a55
UD
10367 * sysdeps/unix/sysv/linux/s390/createthread.c: Moved to...
10368 * sysdeps/unix/sysv/linux/createthread.c: ...here.
10369
c37cae9e
UD
10370 * Makefile (tests): Add tst-cond10.
10371 * tst-cond10.c: New file.
10372
d130a341
UD
103732003-03-08 Ulrich Drepper <drepper@redhat.com>
10374
ccf1d573
UD
10375 * tst-tls2.c (do_test): Add TEMP_FAILURE_RETRY around sem_wait call.
10376 * tst-signal3.c (do_test): Likewise.
10377 * tst-sem5.c (do_test): Likewise.
10378 * tst-kill6.c (do_test): Likewise.
10379 * tst-tls3.c (do_test): Likewise. Include <errno.h>.
10380
10381 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use add/sub instead
10382 of inc/dec.
10383 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
10384 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise
10385 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
10386 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
10387 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
10388 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
10389 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
10390 Likewise.
10391 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
10392 Likewise.
10393 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
10394 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
10395 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10396 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
10397 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
10398 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
10399 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
10400 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
10401
d130a341
UD
10402 * allocatestack.c (allocate_stack): If mprotect() fails free the
10403 TLS memory.
10404
bc6389ad
UD
104052003-03-07 Ulrich Drepper <drepper@redhat.com>
10406
41d4d223
UD
10407 * sysdeps/i386/i486/bits/atomic.h: Fix a few unused definitions.
10408
10409 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove all trace of
10410 lll_wake_tid. This was used only to work around kernel limits in
10411 the early days.
10412 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
10413 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Likewise.
10414 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
10415 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
10416
bc6389ad
UD
10417 * init.c (__static_tls_align_m1): Renamed from __static_tls_align.
10418 (__pthread_initialize_minimal_internal): Change initialization of
10419 __static_tls_align_m1 appropriately.
10420 * pthreadP.h (__static_tls_align_m1): Renamed from
10421 __static_tls_align.
10422 * allocatestack.c (allocate_stack): Use __static_tls_align_m1
10423 instead of __static_tls_align-1.
10424
cc775edf
UD
104252003-03-04 Ulrich Drepper <drepper@redhat.com>
10426
0de28d5c 10427 * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
6245b6ae 10428
518b5308
UD
10429 * pthread_create.c: Define __pthread_keys using nocommon
10430 attribute, not by placing it explicitly in bss.
10431 Remove DEFINE_DEALLOC definition. Not needed anymore.
10432
10433 * allocatestack.c: Define ARCH_MAP_FLAGS if not already defined.
10434 Use it in mmap call to allocate stacks.
10435
10436 * sysdeps/pthread/createthread.c (create_thread): Fix comment.
10437
cc775edf
UD
10438 * pthread_create.c (start_thread): Use THREAD_SETMEM to store
10439 result of the thread function.
10440
4f6f0a8f
UD
104412003-03-03 Ulrich Drepper <drepper@redhat.com>
10442
f04a2721
UD
10443 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: Removed. The generic
10444 version is just fine.
10445
4f6f0a8f
UD
10446 * sysdeps/unix/sysv/linux/libc_pthread_init.c
10447 (__pthread_child_handler): Renamed from pthread_child_handler,
10448 exported, and marked hidden. Change all users.
10449 * sysdeps/unix/sysv/linux/register-atfork.c (free_mem): Do not
10450 free __pthread_child_handler from child list.
10451
7ce5c164
UD
104522003-03-03 Martin Schwidefsky <schwidefsky@de.ibm.com>
10453
10454 * atomic.h (atomic_exchange_and_add): Return newval, not oldval.
10455
10456 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
10457 Fix handling of cancellation and failing pthread_mutex_unlock call.
10458 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
10459 (__pthread_cond_wait): Likewise.
10460
10461 * sysdeps/pthread/pthread_rwlock_timedrdlock.c
10462 (pthread_rwlock_timedrdlock): Fix clobber of result variable by
10463 lll_futex_timed_wait call.
10464 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
10465 (pthread_rwlock_timedwrlock): Likewise.
10466
10467 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
10468 Don't define lll_unlock_wake_cb and ___lll_timedwait_tid in libc.so.
10469 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Remove XXX comments.
10470
10471 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Fix
10472 check of lll_futex_wake return value.
10473
ea6a015b
RM
104742003-03-03 Roland McGrath <roland@redhat.com>
10475
10476 * forward.c: Fix typo in __pthread_attr_init_2_0 compat_symbol decl.
10477
10478 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
10479 Argument to ptr___pthread_cleanup_upto is __jmp_buf, not jmp_buf.
10480 * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
10481
4adacf57
UD
104822003-03-02 Ulrich Drepper <drepper@redhat.com>
10483
1be3d664
UD
10484 * sysdeps/pthread/timer_create.c (timer_create): Return correct
10485 error for CPU clocks.
10486
885bafa1
UD
10487 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
10488 _POSIX_MONOTONIC_CLOCK.
10489 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
10490
4adacf57
UD
10491 * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
10492 recent kernels.
10493
86bfff4d
UD
104942003-03-01 Ulrich Drepper <drepper@redhat.com>
10495
10496 * descr.h (struct pthread): Move cleanup field to the front.
10497
d1149385
RM
104982003-03-01 Roland McGrath <roland@redhat.com>
10499
10500 * sem_open.c (sem_open): Braino fix.
10501
bd8bb78b
UD
105022003-03-01 Ulrich Drepper <drepper@redhat.com>
10503
748bec08
UD
10504 * sysdeps/i386/tcb-offsets.sym: Add CLEANUP and CLEANUP_PREV.
10505 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Inline
10506 __pthread_cleanup_pop functionality.
10507 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10508
bd8bb78b
UD
10509 * descr.h (struct pthread): Move tid field to the front now that
10510 it is often used.
10511
10512 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S
10513 (__lll_mutex_timedlock_wait): Remove.
10514 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
10515 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
10516 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
10517 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
10518 (lll_unlock_wake_cb): Don't save and restore %esi.
10519 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
10520 %esi.
10521 (__lll_timedwait_tid): Add alignment.
10522 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
10523 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
10524 %esi.
10525 (__lll_timedwait_tid): Removed.
10526 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
10527 (__pthread_cond_broadcast): Don't save, load, and restore %esi.
10528 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
10529 (pthread_barrier_wait): Don't save, load, and restore %esi for
10530 last thread.
10531 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
10532 (__pthread_cond_signal): Don't save, load, and restore %esi.
10533 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
10534 (__pthread_rwlock_unlock): Don't save, load, and restore %esi.
10535 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
10536 Don't save, load, and restore %esi.
10537
d2637c70
UD
105382003-02-27 Ulrich Drepper <drepper@redhat.com>
10539
567fb22a
UD
10540 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
10541 Release lock before waking up the waiters.
10542
427f5fa1
UD
10543 * tst-exit1.c (do_test): Don't start more than one thread in parallel.
10544
a2d83cfb
UD
10545 * tst-rwlock9.c (writer_thread): Correct adding TIMEOUT.
10546 (reader_thread): Likewise.
10547
d2637c70
UD
10548 * sysdeps/pthread/pthread_rwlock_unlock.c
10549 (__pthread_rwlock_unlock): Release internal lock early. Don't try
10550 to wake up readers if there are none.
10551
10552 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
10553 Release internal lock before wake threads.
10554
b1531183
UD
105552003-02-26 Ulrich Drepper <drepper@redhat.com>
10556
dbf6131c
UD
10557 * Makefile (tests): Add tst-rwlock10 and tst-rwlock11.
10558 * tst-rwlock8.c: Initialize lock with INIT. Allow INIT to be
10559 predefined.
10560 * tst-rwlock9.c: Likewise.
10561 * tst-rwlock10.c: New file.
10562 * tst-rwlock11.c: New file.
10563
695799fe
UD
10564 * Makefile (tests): Add tst-dlsym1.
10565 * tst-dlsym1.c: New file.
10566
b1531183
UD
10567 * init.c (__pthread_initialize_minimal_internal): Set
10568 GL(dl_error_catch_tsd) to __libc_dl_error_tsd.
10569 * Versions (libc:GLIBC_PRIVATE): Export __libc_dl_error_tsd.
10570
3724f268
UD
105712003-02-24 Ulrich Drepper <drepper@redhat.com>
10572
3857ca78
UD
10573 * sem_open.c (sem_open): Fix handling of O_CREAT without O_EXCL.
10574
80d80779
UD
10575 * tst-cond2.c: Fix sychronization with child.
10576
86371308
UD
10577 * tst-rwlock8.c (reader_thread): Remove unused variable.
10578
ffeb4481
UD
10579 * Makefile: Add rules to build and run tst-tls3.
10580 * tst-tls3.c: New file.
10581 * tst-tls3mod.c: New file.
10582
3724f268
UD
10583 * Makefile (tests): Add tst-rwlock8 and tst-rwlock9.
10584 * tst-rwlock8.c: New file.
10585 * tst-rwlock9.c: New file.
10586 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Fix
10587 complete broken rwlock implementation.
10588 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
10589 Likewise.
10590 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
10591 Likewise.
10592 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
10593 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
18a53579
UD
10594 * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
10595 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
10596 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
10597 * sysdeps/pthread/pthread_rwlock_unlock.c: Likewise.
10598 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
3724f268 10599
8915cc40
RM
106002003-02-23 Roland McGrath <roland@redhat.com>
10601
10602 * Makefile (nptl-version): Change regexp so case sensitivity is ok.
10603
fd1a0d0c
UD
106042003-02-23 Ulrich Drepper <drepper@redhat.com>
10605
ecf28959
UD
10606 * Makefile (tests): Add tst-context1.
10607 * tst-context1.c: New file.
10608
5e47b76b
UD
10609 * Makefile (tests): Add tst-tls1 and tst-tls2.
10610 * tst-tls1.c: New file.
10611 * tst-tls2.c: New file.
10612
5a6bbb41
UD
10613 * libc-cancellation.c (__libc_enable_asynccancel): Correct test
10614 for failed cmpxchg.
10615
fd1a0d0c
UD
10616 * pthread_create.c (start_thread): Set EXITING_BIT early.
10617
10618 * sysdeps/i386/tls.h (THREAD_GETMEM): Mark asm as volatile.
10619 (THREAD_GETMEM_NC): Likewise.
10620
757f9fcb
UD
106212003-02-22 Ulrich Drepper <drepper@redhat.com>
10622
b1b8e747
UD
10623 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Shave
10624 off 3 more bytes by using offset-less instructions when possible.
10625
c780aa21 10626 * Makefile: Add dependency for $(objpfx)version.d.
757f9fcb
UD
10627
10628 * eintr.c (eintr_source): Add unnecessary return but the compiler
10629 insists.
10630
10631 * tst-kill3.c: Include <unistd.h>.
10632
5148559c
RM
106332003-02-21 Roland McGrath <roland@redhat.com>
10634
10635 * pthread_create.c (start_thread): Call __libc_thread_freeres.
10636
ab2d98e3
UD
106372003-02-21 Ulrich Drepper <drepper@redhat.com>
10638
71028edd
UD
10639 * Makefile (tests): Add tst-eintr1.
10640 (distribute): Add eintr.c.
10641 * tst-eintr1.c: New file.
10642 * eintr.c: New file.
10643
e814f748
UD
10644 * pthread_cancel.c (pthread_cancel): Use tkill directly.
10645
10646 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill):
10647 Disallow sending SIGCANCEL.
10648
ab2d98e3 10649 * Makefile (tests): Remove tst-basic7. Add tst-kill1, tst-kill2,
9c03686d 10650 tst-kill3, tst-kill4, tst-kill5, tst-kill6.
e814f748
UD
10651 * tst-kill1.c: New file.
10652 * tst-kill2.c: New file.
10653 * tst-kill3.c: New file.
10654 * tst-kill5.c: New file.
9c03686d 10655 * tst-kill6.c: New file.
e814f748
UD
10656 * tst-basic7.c: Renamed to...
10657 * tst-kill4.c: ...this.
ab2d98e3 10658
59fed0e2
RM
106592003-02-21 Roland McGrath <roland@redhat.com>
10660
10661 * Makefile (install-lib-ldscripts): New variable.
10662
49dc759f
UD
106632003-02-21 Ulrich Drepper <drepper@redhat.com>
10664
8c2e9a29
UD
10665 * pthreadP.h: Define INVALID_TD_P and INVALID_NOT_TERMINATED_TD_P.
10666 * pthread_cancel.c: Use INVALID_TD_P.
10667 * pthread_detach.c: Likewise.
10668 * pthread_getschedparam.c: Likewise.
10669 * pthread_setschedparam.c: Likewise.
10670 * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
10671 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
10672 * pthread_join.c: Use INVALID_NOT_TERMINATED_TD_P.
10673 * pthread_timedjoin.c: Likewise.
10674
10675 * tst-basic7.c: Include <signal.h>.
10676
49dc759f
UD
10677 * pthread_join.c (pthread_join): Limited checking for invalid
10678 descriptors.
10679 * pthread_timedjoin.c (pthread_timedjoin_np): Likewise.
10680
df5803bf
UD
106812003-02-20 Ulrich Drepper <drepper@redhat.com>
10682
c5acd3d7
UD
10683 * pthread_create.c (deallocate_tsd): Reset found_nonzero at the
10684 beginning of the loop. Clear the entire first block of TSD.
df5803bf
UD
10685 * Makefile (tests): Add tst-key4.
10686 * tst-key4.c: New file.
10687
729924a0
UD
106882003-02-18 Ulrich Drepper <drepper@redhat.com>
10689
2f7dc594
UD
10690 * Makefile (tests): Add tst-basic7.
10691 * tst-basic7.c: New file.
10692
ba25bb0f
UD
10693 * pthread_create.c (deallocate_tsd): Mark as internal_function.
10694 Add some more __builtin_expect.
10695
12fd3c5f 10696 * pthreadP.h: Define dummy version of DEBUGGING_P.
729924a0 10697
5430d926
UD
106982003-02-17 Ulrich Drepper <drepper@redhat.com>
10699
b0db7fbe
UD
10700 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remnove
10701 _POSIX_THREAD_PRIORITY_SCHEDULING.
10702 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
10703 _XOPEN_REALTIME_THREADS.
10704 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
10705
10706 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): The
10707 kernel returns EINVAL for PID <= 0, work around it.
10708
ecfda9bd
UD
10709 * Makefile (tests): Add tst-signal5.
10710 * tst-signal5.c: New file.
10711
7d78ab99
UD
10712 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
10713 and LOGIN_NAME_MAX.
10714
371a2972
UD
10715 * tst-cancel1.c (tf): Block all signals.
10716
5430d926
UD
10717 * Makefile (tests): Add tst-basic6.
10718 * tst-basic6.c: New file.
10719
10720 * tst-basic1.c: Add test for process ID.
10721
10722 * Makefile (tests): Add tst-cancel10.
10723 * tst-cancel10.c: New file.
10724
10725 * Makefile (tests): Add tst-signal4.
10726 * tst-signal4.c: New file.
10727
10728 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use
10729 __sigismember instead of sigismember. Add __builtin_expect.
10730
1564916a
UD
107312003-02-16 Ulrich Drepper <drepper@redhat.com>
10732
179ff175
UD
10733 * tst-attr1.c (do_test): Add tests for pthread_setcanceltype,
10734 pthread_setcancelstate, and pthread_rwlock_setpshared.
10735
e4335f9a
UD
10736 * tst-cancel7.c (do_test): Make sure the pid file exists before
10737 canceling the thread.
10738
0a37669a
UD
10739 * tst-rwlock6.c: More pthread_rwlock_timedwrlock and
10740 pthread_rwlock_timedrdlock tests.
10741 * tst-rwlock7.c: More pthread_rwlock_timedwrlock tests.
10742 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
10743 Check for invalid tv_nsec field.
10744 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
10745 Likewise.
10746
10747 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Protect
10748 recursive mutex of overflow.
10749
10750 * tst-attr1.c (do_test): Add test for pthread_mutexattr_setpshared.
10751
e4335f9a 10752 * libc-cancellation.c (__libc_enable_asynccancel): Rewrite to avoid
1564916a
UD
10753 going into an endless loop.
10754 * Makefile (tests): Add tst-cancel9.
10755 * tst-cancel9.c: New file.
10756
10757 * pthread_cancel.c (pthread_cancel): Use the result of __pthread_kill.
10758
b270b548
UD
107592003-02-15 Ulrich Drepper <drepper@redhat.com>
10760
1c82b97f
UD
10761 * tst-mutex5.c (do_test): Add more timedlock tests.
10762
b2f05465 10763 * tst-mutex2.c: Tests of trylock and unlock with ERROR mutexes.
c3bb9ee1
UD
10764 * tst-mutex3.c (do_test): Add tests for trylock with RECURSIVE mutexes.
10765
e798b60f
UD
10766 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
10767 use INLINE_SYSCALL. Error number is returned, not -1.
10768
90491dc4
UD
10769 * pthreadP.h: Mark declarations of __find_in_stack_list, __free_tcb,
10770 and __deallocate_stack with internal_function.
10771 * pthread_create.c: Adjust definitions appropriately.
10772 * allocatestack.c: Likewise.
10773
10774 * pthread_join.c: Add one more __builtin_expect.
10775 * pthread_timedjoin.c: Likewise.
10776
10777 * pthread_getspecific.c (__pthread_getspecific): Clear data->data
10778 not data of sequence number does not match.
10779 Add one __builtin_expect.
10780
c6247c9d
UD
10781 * Makefile (tests): Add tst-clock1.
10782 * tst-clock1.c: New file.
10783
b270b548
UD
10784 * pthread_setconcurrency.c (pthread_setconcurrency): Fail for
10785 negative arguments.
10786 * Makefile (tests): Add tst-basic5.
10787 * tst-basic5.c: New file.
10788
700bf7af
UD
107892003-02-14 Ulrich Drepper <drepper@redhat.com>
10790
757de559
UD
10791 * Makefile (tests): Add tst-basic4.
10792 * tst-basic4.c: New file.
10793
47202270
UD
10794 * pthreadP.h: Add declaraction for __nptl_nthreads.
10795 * pthread_create.c: Define __nptl_nthreads
10796 (start_thread): Increment __nptl_nthreads at beginning. Decrement
b270b548 10797 after thread is done. If then zero, call exit(0).
47202270
UD
10798 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
10799 Add ptr_nthreads. Define HAVE_PTR_NTHREADS.
10800 * init.c (pthread_functions): Initialize ptr_nthreads.
10801 * allocatestack.c (nptl_nthreads): Remove definition and all uses.
10802 (__reclaim_stacks): Decrement __nptl_nthreads.
10803 * sysdeps/pthread/Makefile [$(subdir)==csu] (CFLAGS-libc-start.c):
10804 Define.
10805 * Makefile (tests): Add tst-basic3.
10806 * tst-basic3.c: New file.
10807
e320ef46
UD
10808 * descr.h: Define CANCELING_BIT and CANCELING_BITMASK. Introduce
10809 after CANCELTYPE_BIT, move the other bits up. Update CANCEL_RESTMASK.
10810 * init.c (sigcancel_handler): Also set CANCELING_BITMASK bit in newval.
10811 * pthread_cancel.c (pthread_cancel): Likewise. Also set CANCELING_BIT
10812 if asynchronous canceling is enabled.
10813 * pthread_join.c (pthread_join): When recognizing circular joins,
10814 take into account the other thread might be already canceled.
10815 * Makefile (tests): Add tst-join5.
10816 * tst-join5.c: New file.
10817
700bf7af
UD
10818 * Makefile (tests): Add tst-join4.
10819 * tst-join4.c: New file.
10820
108212003-02-13 Ulrich Drepper <drepper@redhat.com>
10822
10823 * tst-cond4.c (main): Add test of pthread_attr_getpshared.
10824
dac0f772
UD
108252003-02-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
10826
10827 * sysdeps/s390/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM,
10828 THREAD_SETMEM_NC): Use passed descr instead of THREAD_SELF.
10829 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind): Avoid
10830 warning.
10831 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Include <sys/time.h>
10832 to avoid warning.
10833 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Return
10834 error if lll_futex_wake failed.
10835
e8cda341
UD
108362003-02-13 Ulrich Drepper <drepper@redhat.com>
10837
a7720b5e
UD
10838 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Fix
10839 handling of cancellation and failung pthread_mutex_unlock call.
10840 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10841 * Makefile (tests): Add tst-cond8 and tst-cond9.
10842 * tst-cond8.c: New file.
10843 * tst-cond9.c: New file.
10844
a1ea4c06
UD
10845 * tst-cond7.c (do_test): Unlock the mutex before canceling the thread.
10846
10847 * sysdeps/pthread/pthread.h: Add missing initializers. Protect
10848 non-standard initializers with __USE_GNU.
10849
e8cda341
UD
10850 * Makefile (tests): Add tst-cleanup3.
10851 * tst-cleanup3.c: New file.
10852
2067577c
UD
108532003-02-12 Ulrich Drepper <drepper@redhat.com>
10854
89e78a95
UD
10855 * Makefile (tests): Add tst-attr1 and tst-attr2.
10856 * tst-attr1.c: New file.
10857 * tst-attr2.c: New file.
10858
dfdd294a
UD
10859 * Makefile: Add rules to build and run tst-atfork2 test.
10860 * tst-atfork2.c: New file.
10861 * tst-atfork2mod.c: New file.
10862
10863 * sysdeps/unix/sysv/linux/unregister-atfork.c
10864 (__unregister_atfork): Free the memory allocated for the handlers
10865 after removing them from the lists.
10866
10867 * sysdeps/unix/sysv/linux/register-atfork.c: Define memeory
10868 cleanup function.
10869
10870 * tst-atfork1.c (do_test): Wait for the child we forked.
10871 Report error in child.
10872
10873 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Fix comment.
10874
2067577c
UD
10875 * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
10876
2a8a8a84
UD
108772003-02-10 Ulrich Drepper <drepper@redhat.com>
10878
d9dd121e
UD
10879 * Makefile (tests): Add tst-cancel8.
10880 * tst-cancel8.c: New file.
10881
2a8a8a84
UD
10882 * sysdeps/unix/sysv/linux/i386/pthread_once.S (clear_once_control): Fix
10883 clearing of control variable.
defd1870 10884 * Makefile (tests): Add tst-once3 and tst-once4.
2a8a8a84 10885 * tst-once3.c: New file.
defd1870 10886 * tst-once4.c: New file.
2a8a8a84 10887
a54e8d33
UD
108882003-02-08 kaz Kojima <kkojima@rr.iij4u.or.jp>
10889
10890 * sysdeps/sh/Makefile: New file.
10891 * sysdeps/sh/bits/atomic.h: New file.
10892 * sysdeps/sh/pthread_spin_init.c: New file.
10893 * sysdeps/sh/pthread_spin_lock.c: New file.
10894 * sysdeps/sh/pthread_spin_trylock.S: New file.
10895 * sysdeps/sh/pthread_spin_unlock.S: New file.
10896 * sysdeps/sh/pthreaddef.h: New file.
10897 * sysdeps/sh/tcb-offsets.sym: New file.
10898 * sysdeps/sh/td_ta_map_lwp2thr.c: New file.
10899 * sysdeps/sh/tls.h: New file.
10900 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: New file.
10901 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: New file.
10902 * sysdeps/unix/sysv/linux/sh/createthread.c: New file.
10903 * sysdeps/unix/sysv/linux/sh/fork.c: New file.
10904 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: New file.
10905 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: New file.
10906 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h: New file.
10907 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: New file.
10908 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: New file.
10909 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: New file.
10910 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: New file.
10911 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: New file.
10912 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
10913 * sysdeps/unix/sysv/linux/sh/pt-vfork.S: New file.
10914 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: New file.
10915 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: New file.
10916 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: New file.
10917 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: New file.
10918 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: New file.
10919 * sysdeps/unix/sysv/linux/sh/pthread_once.S: New file.
10920 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: New file.
10921 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: New file.
10922 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: New file.
10923 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: New file.
10924 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: New file.
10925 * sysdeps/unix/sysv/linux/sh/sem_post.S: New file.
10926 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: New file.
10927 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: New file.
10928 * sysdeps/unix/sysv/linux/sh/sem_wait.S: New file.
10929 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
10930
696e556e
UD
109312003-02-08 Ulrich Drepper <drepper@redhat.com>
10932
10933 * tst-cond2.c: Rearrange code to not rely on behavior undefined
10934 according to POSIX.
10935
10936 * tst-basic2.c (do_test): Lock mutex before creating the thread.
10937
fef710d6
UD
109382003-02-07 Ulrich Drepper <drepper@redhat.com>
10939
c6180643
UD
10940 * sysdeps/x86_64/tls.h: Remove unnecessary macros, left over from x86.
10941 (TLS_GET_FS): New #define.
10942 (TLS_SET_FS): New #define.
10943 Correct value of __NR_set_thread_area.
10944
fef710d6
UD
10945 * sysdeps/x86_64/td_ta_map_lwp2thr.c: New file.
10946
11090a99
UD
109472003-02-06 Ulrich Drepper <drepper@redhat.com>
10948
65c68990
UD
10949 * Makefile (tests): Add tst-popen1.
10950 * tst-popen1.c: New file.
10951
11090a99
UD
10952 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Remove wrong
10953 but inactive generalization.
10954 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10955 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
10956 Minor optimization, remove one instruction.
10957 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
10958
a88c9263
UD
109592003-02-04 Martin Schwidefsky <schwidefsky@de.ibm.com>
10960
10961 * sysdeps/unix/sysv/linux/s390/fork.c: Correct order of parameters.
10962
109632003-01-31 Martin Schwidefsky <schwidefsky@de.ibm.com>
10964
10965 * init.c (__NR_set_tid_address): Add #ifdef for s390.
10966 * sysdeps/pthread/pthread_barrier_wait.c: New file.
10967 * sysdeps/pthread/pthread_cond_broadcast.c: New file.
10968 * sysdeps/pthread/pthread_cond_signal.c: New file.
10969 * sysdeps/pthread/pthread_cond_timedwait.c: New file.
10970 * sysdeps/pthread/pthread_cond_wait.c: New file.
10971 * sysdeps/pthread/pthread_rwlock_rdlock.c: New file.
10972 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: New file.
10973 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: New file.
10974 * sysdeps/pthread/pthread_rwlock_unlock.c: New file.
10975 * sysdeps/pthread/pthread_rwlock_wrlock.c: New file.
10976 * sysdeps/s390/Makefile: New file.
10977 * sysdeps/s390/bits/atomic.h: New file.
10978 * sysdeps/s390/pthread_spin_init.c: New file.
10979 * sysdeps/s390/pthread_spin_lock.c: New file.
10980 * sysdeps/s390/pthread_spin_trylock.c: New file.
10981 * sysdeps/s390/pthread_spin_unlock.c: New file.
10982 * sysdeps/s390/pthreaddef.h: New file.
10983 * sysdeps/s390/tcb-offsets.sym: New file.
10984 * sysdeps/s390/td_ta_map_lwp2thr.c: New file.
10985 * sysdeps/s390/tls.h: New file.
10986 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: New file.
10987 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: New file.
10988 * sysdeps/unix/sysv/linux/s390/createthread.c: New file.
10989 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: New file.
10990 * sysdeps/unix/sysv/linux/s390/fork.c: New file.
10991 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: New file.
10992 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
10993 * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: New file.
10994 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: New file.
10995 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: New file.
10996 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: New file.
10997 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: New file.
10998 * sysdeps/unix/sysv/linux/s390/pthread_once.c: New file.
10999 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: New file.
11000 * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: New file.
11001 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
11002 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
11003 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: New file.
11004 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
11005 * sysdeps/unix/sysv/linux/s390/sem_post.c: New file.
11006 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: New file.
11007 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
11008 * sysdeps/unix/sysv/linux/s390/sem_wait.c: New file.
11009
6f1cff95
UD
110102003-02-04 Ulrich Drepper <drepper@redhat.com>
11011
ec609a8e
UD
11012 * atomic.h: Add a couple more default implementations.
11013 (atomic_compare_and_exchange_acq): Use
d45e8740
UD
11014 __arch_compare_and_exchange_32_acq in return value definition. It
11015 always exists.
11016 (atomic_bit_set): Renamed from atomic_set_bit.
0289bef9 11017 Add missing atomic_ prefixes.
e3ec8904 11018
6f1cff95
UD
11019 * sysdeps/pthread/bits/libc-lock.h (__libc_once): In case no
11020 thread library is available, use correct value to mark initialized
11021 once variable.
11022
4f088329
UD
110232003-02-03 Ulrich Drepper <drepper@redhat.com>
11024
6f1cff95
UD
11025 * allocatestack.c (allocate_stack): Use __getpagesize instead of
11026 __sysconf to determine pagesize.
11027
3e4fc359 11028 * pthread_create.c: Include <atomic.h>.
4f088329
UD
11029 * allocatestack.c (allocate_stack): Implement coloring of the
11030 allocated stack memory. Rename pagesize to pagesize_m1. It's the
11031 size minus one. Adjust users.
3e4fc359 11032 * sysdeps/i386/i686/Makefile: New file.
4f088329 11033
2f42e8be
UD
110342003-02-02 Ulrich Drepper <drepper@redhat.com>
11035
4301f7e2
UD
11036 * allocatestack.c: Improve comment throughout the file.
11037
2f42e8be 11038 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
a37818b3 11039 (__lll_lock_wait): Add branch prediction.
2f42e8be
UD
11040 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
11041 (__lll_lock_wait): Likewise.
11042 (lll_unlock_wake_cb): Removed.
11043
4a7d6545
UD
110442003-01-31 Ulrich Drepper <drepper@redhat.com>
11045
11046 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Remove
11047 _POSIX_THREAD_PRIORITY_SCHEDULING.
11048
886d5973
UD
110492003-01-30 Jakub Jelinek <jakub@redhat.com>
11050
11051 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
11052 Fix return type of ptr___pthread_getspecific.
11053
e474ca78
UD
110542003-01-29 Ulrich Drepper <drepper@redhat.com>
11055
11056 * Makefile (tests): Add tst-umask1.
11057 (tst-umask1-ARGS): Define.
11058 * tst-umask1.c: New file.
11059
e6ebd2e4
UD
110602003-01-28 Ulrich Drepper <drepper@redhat.com>
11061
6cf26f41
UD
11062 * Makefile (libpthread-routines): Remove lowlevelrwlock. Add
11063 pthread_rwlock_rdlock, pthread_rwlock_timedrdlock,
11064 pthread_rwlock_wrlock, pthread_rwlock_timedwrlock, and
11065 pthread_rwlock_unlock.
11066 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Removed
11067 * sysdeps/unix/sysv/linux/i386/i586/lowlevelrwlock.S: Removed
11068 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Removed
11069 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: New file.
11070 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
11071 New file.
11072 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: New file.
11073 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
11074 New file.
11075 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: New file.
11076 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_rdlock.S: New file.
11077 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedrdlock.S:
11078 New file.
11079 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_wrlock.S: New file.
11080 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedwrlock.S:
11081 New file.
11082 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_unlock.S: New file.
11083 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_rdlock.S: New file.
11084 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedrdlock.S:
11085 New file.
11086 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_wrlock.S: New file.
11087 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedwrlock.S:
11088 New file.
11089 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_unlock.S: New file.
11090
1d087a7e
UD
11091 * Makefile (libpthread-routines): Remove lowlevelcond and
11092 lowlevelsem. Add sem_wait, sem_trywait, sem_timedwait, sem_post,
11093 pthread_cond_wait, pthread_cond_timedwait, pthread_cond_signal,
11094 and pthread_cond_broadcast.
4a99d160
UD
11095 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Removed
11096 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Removed
11097 * sysdeps/unix/sysv/linux/i386/i586/lowlevelsem.S: Removed
11098 * sysdeps/unix/sysv/linux/i386/i586/lowlevelcond.S: Removed
11099 * sysdeps/unix/sysv/linux/i386/i686/lowlevelsem.S: Removed
11100 * sysdeps/unix/sysv/linux/i386/i686/lowlevelcond.S: Removed
11101 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: New file.
11102 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: New file.
11103 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: New file.
11104 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: New file.
11105 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: New file.
11106 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: New file.
11107 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: New file.
11108 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: New file.
11109 * sysdeps/unix/sysv/linux/i386/i586/sem_wait.S: New file.
11110 * sysdeps/unix/sysv/linux/i386/i586/sem_trywait.S: New file.
11111 * sysdeps/unix/sysv/linux/i386/i586/sem_timedwait.S: New file.
11112 * sysdeps/unix/sysv/linux/i386/i586/sem_post.S: New file.
11113 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_wait.S: New file.
11114 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_timedwait.S: New file.
11115 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_signal.S: New file.
11116 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_broadcast.S: New file.
11117 * sysdeps/unix/sysv/linux/i386/i686/sem_wait.S: New file.
11118 * sysdeps/unix/sysv/linux/i386/i686/sem_trywait.S: New file.
11119 * sysdeps/unix/sysv/linux/i386/i686/sem_timedwait.S: New file.
11120 * sysdeps/unix/sysv/linux/i386/i686/sem_post.S: New file.
11121 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_wait.S: New file.
11122 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S: New file.
11123 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_signal.S: New file.
11124 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_broadcast.S: New file.
11125 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: New file.
1d087a7e 11126
e6ebd2e4
UD
11127 * sysdeps/unix/sysv/linux/i386/createthread.c: Define
11128 PREPARE_CREATE and TLS_VALUE with x86-specific bits. All the rest
11129 of the code is moved to ...
11130 * sysdeps/pthread/createthread.c: ...here. New file.
11131
a15698cb
UD
111322003-01-27 Ulrich Drepper <drepper@redhat.com>
11133
0566b130
UD
11134 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S
11135 (__new_sem_post): Clear %eax before returning.
11136 Reported by MAEDA Naoaki <maeda.naoaki@jp.fujitsu.com>.
11137
e6fb8846
UD
11138 * Makefile (tests): Add tst-cleanup2.
11139 * tst-cleanup2.c: New file.
11140
a15698cb
UD
11141 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
11142 Interpret first parameter correctly.
11143
8824b0a1
UD
111442003-01-17 Ulrich Drepper <drepper@redhat.com>
11145
11146 * Makefile (headers): Add bits/semaphore.h.
11147
850dcfca
UD
111482003-01-16 Jakub Jelinek <jakub@redhat.com>
11149
11150 * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize _head->sysinfo even
11151 if not SHARED.
11152
574b892e
UD
111532003-01-14 Ulrich Drepper <drepper@redhat.com>
11154
a8d87c92
UD
11155 * sem_open.c (sem_open): Return SEM_FAILED if existing semaphore
11156 must be used and mapping failed.
11157 Reported by Luke Elliott <luke.elliott@activfinancial.com>.
11158
574b892e
UD
11159 * Makefile (CFLAGS-pthread_self.os): Define this, not
11160 CFLAGS-pthread_self.c.
11161
fb48047a
UD
111622003-01-13 Ulrich Drepper <drepper@redhat.com>
11163
47805511
UD
11164 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Don't export
11165 lll_unlock_wake_cb.
11166
fb48047a
UD
11167 * Makefile (libpthread-routines): Add version. Add rules to build
11168 version.os and banner.h.
11169 * version.c: New file.
11170
115bb61d
UD
111712003-01-13 Jakub Jelinek <jakub@redhat.com>
11172
11173 * pthread_mutex_lock.c (__pthread_mutex_lock_internal): Make
11174 the alias unconditional.
11175 * pthread_mutex_unlock.c (__pthread_mutex_unlock_internal): Likewise.
11176
111772003-01-13 Ulrich Drepper <drepper@redhat.com>
11178
11179 * Makefile (CFLAGS-pthread_self.c): New definition.
11180
6aca81bb
UD
111812003-01-06 Jakub Jelinek <jakub@redhat.com>
11182
11183 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Add
11184 INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
11185 * sysdeps/unix/sysv/linux/raise.c (raise): Likewise.
11186 * init.c (__pthread_initialize_minimal_internal): Likewise.
11187
e9c7764e
UD
111882003-01-07 Jakub Jelinek <jakub@redhat.com>
11189
b5facfda
UD
11190 * pthreadP.h (__pthread_cond_timedwait): Add prototype.
11191
e9c7764e
UD
11192 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
11193 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
11194 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
11195 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
11196 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
11197 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
11198
bef1e42f
UD
111992003-01-06 Jakub Jelinek <jakub@redhat.com>
11200
11201 * pthreadP.h (LIBC_CANCEL_HANDLED): Define.
11202 * pt-system.c (LIBC_CANCEL_HANDLED): Add.
11203 * tst-cancel-wrappers.sh: Remove all exceptions.
11204
bbd17455
UD
112052003-01-05 Ulrich Drepper <drepper@redhat.com>
11206
a73ab6df
UD
11207 * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
11208 features. Reported by Marijn Ros <marijn@mad.scientist.com>.
11209
bbd17455
UD
11210 * sysdeps/unix/sysv/linux/jmp-unwind.c: Include <pthread-functions.h>.
11211 Use __libc_pthread_functions array if SHARED.
11212
11213 * pthreadP.h: Move pthread_cond_2_0_t definition to...
11214 * sysdeps/unix/sysv/linux/internaltypes.h: ...here.
11215
11216 * sysdeps/pthread/bits/libc-lock.h (__libc_ptf_call): New #define.
11217 (__libc_rwlock_rdlock, __libc_rwlock_wrlock, __libc_rwlock_unlock,
11218 __libc_key_create, __libc_getspecific, __libc_setspecific): Use
11219 __libc_ptf_call instead of __libc_maybe_call.
11220 (PTF): New #define.
11221 (__libc_cleanup_region_start): Wrap function name with PTF call.
11222 (__libc_cleanup_region_end): Likewise.
11223 (__libc_cleanup_end): Likewise.
11224
11225 * pthread_getspecific.c: Add __pthread_getspecific_internal alias.
11226 * pthread_setspecific.c: Add __pthread_setspecific_internal alias.
11227 * pthread_key_create.c: Add __pthread_key_create_internal alias.
11228 * pthreadP.h: Add prototypes.
11229
11230 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Add
11231 __pthread_rwlock_rdlock, __pthread_rwlock_wrlock, and
11232 __pthread_rwlock_unlock aliases.
11233 * pthreadP.h: Add prototypes for new aliases.
11234
11235 * pthreadP.h (struct pthead_functions): Moved to...
11236 * sysdeps/pthread/pthread-functions.h: ...here. New file.
11237 * init.c (pthread_functions): Add initializers for new elements.
11238
11239 * cleanup_defer.c: Add __pthread_cleanup_push_defer and
11240 __pthread_cleanup_pop_restore aliases.
11241 * pthreadP.h: Add prototypes.
11242
11243 * cleanup.c: Rename _GI_pthread_cleanup_push to __pthread_cleanup_push
11244 and _GI_pthread_cleanup_pop to __pthread_cleanup_pop.
11245 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Adjust caller.
11246 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
11247 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
11248 * pthreadP.h: Adjust prototypes and callers.
11249
d27a78be
UD
112502003-01-04 Ulrich Drepper <drepper@redhat.com>
11251
b74121ae
UD
11252 * Makefile (tests): Add tst-cancel7.
11253 (tst-cancel7-ARGS): New variable.
bbd17455 11254 * tst-cancel7.c: New file.
b74121ae 11255
29bc410c
UD
11256 * old_pthread_cond_broadcast.c: Optimize initialization a bit to work
11257 around gcc defficiencies.
11258 * old_pthread_cond_signal.c: Likewise.
11259 * old_pthread_cond_timedwait.c: Likewise.
11260 * old_pthread_cond_wait.c: Likewise.
11261
d27a78be
UD
11262 * pthreadP.h (pthread_cond_2_0_t): Remove unneeded lock element.
11263
733f25e6
UD
112642003-01-03 Ulrich Drepper <drepper@redhat.com>
11265
7edb2ae3
UD
11266 * Makefile (tests): Add tst-cond7.
11267 * tst-cond7.c: New file.
11268
b1151300
UD
11269 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
11270 (condvar_cleanup): Get condvar address from the right place.
11271
733f25e6
UD
11272 * atomic.h: Correct definitions of atomic_full_barrier,
11273 atomic_read_barrier, atomic_write_barrier.
11274
11275 * old_pthread_cond_broadcast.c: Make memory allocate and initialization
11276 race-free.
11277 * old_pthread_cond_signal.c: Likewise.
11278 * old_pthread_cond_timedwait.c: Likewise.
11279 * old_pthread_cond_wait.c: Likewise.
11280
686b7223
UD
112812003-01-03 Jakub Jelinek <jakub@redhat.com>
11282
11283 * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
11284
0e07706e
UD
112852003-01-03 Ulrich Drepper <drepper@redhat.com>
11286
997256dd
UD
11287 * pthreadP.h (pthread_cond_2_0_t): New type.
11288 (struct pthread_functions): Use new type for 2.0 condvar callbacks.
11289 Use new type for the 2.0 condvar function prototypes.
11290 * forward.c: Use pthread_cond_2_0_t for 2.0 condvar functions.
11291 * old_pthread_cond_init.c: Use pthread_cond_2_0_t for condvar
11292 parameter.
11293 * old_pthread_cond_destroy.c: Likewise.
11294 * old_pthread_cond_broadcast.c: Likewise. Lock appropriately.
11295 * old_pthread_cond_signal.c: Likewise.
11296 * old_pthread_cond_timedwait.c: Likewise.
11297 * old_pthread_cond_wait.c: Likewise.
11298
842d2817
UD
11299 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
11300 (__pthread_cond_wait): Don't save cancellation mode and seq value
11301 in same location.
11302
0e07706e
UD
11303 * herrno.c (__h_errno_location): Don't define as weak.
11304
bf293afe
UD
113052003-01-02 Jakub Jelinek <jakub@redhat.com>
11306
11307 * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
11308 pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
11309 and pthread_cond_wait.
11310 * old_pthread_cond_broadcast.c (__old_pthread_cond_broadcast):
11311 Renamed to...
11312 (__pthread_cond_broadcast_2_0): ... this.
11313 * old_pthread_cond_destroy.c (__old_pthread_cond_destroy):
11314 Renamed to...
11315 (__pthread_cond_destroy_2_0): ... this.
11316 * old_pthread_cond_init.c (__old_pthread_cond_init):
11317 Renamed to...
11318 (__pthread_cond_init_2_0): ... this.
11319 * old_pthread_cond_signal.c (__old_pthread_cond_signal):
11320 Renamed to...
11321 (__pthread_cond_signal_2_0): ... this.
11322 * old_pthread_cond_wait.c (__old_pthread_cond_wait):
11323 Renamed to...
11324 (__pthread_cond_wait_2_0): ... this.
11325 * pthread_cond_destroy.c: Include shlib-compat.h.
11326 (pthread_cond_destroy): Change strong_alias into versioned_symbol.
11327 * pthread_cond_init.c: Include shlib-compat.h.
11328 (pthread_cond_init): Change strong_alias into versioned_symbol.
11329 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_cond_*
11330 fields to ptr___pthread_cond_* and add ptr___pthread_cond_*_2_0
11331 fields.
11332 (__pthread_cond_broadcast_2_0, __pthread_cond_destroy_2_0,
11333 __pthread_cond_init_2_0, __pthread_cond_signal_2_0,
11334 __pthread_cond_wait_2_0): New prototypes.
11335 (__old_pthread_cond_broadcast, __old_pthread_cond_destroy,
11336 __old_pthread_cond_init, __old_pthread_cond_signal,
11337 __old_pthread_cond_wait): Removed.
11338 * init.c: Include shlib-compat.h.
11339 (pthread_functions): Guard ptr___pthread_attr_init_2_0
11340 initialization with SHLIB_COMPAT (GLIBC_2_0, GLIBC_2_1).
11341 Rename ptr_pthread_cond_* to ptr___pthread_cond_*, initialize
11342 ptr___pthread_cond_*_2_0 fields.
11343 * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
11344 pthread_cond_*@GLIBC_2.0 compatibility symbols.
11345
11346 * sysdeps/pthread/sigaction.c (SIGCANCEL): Only define if
11347 LIBC_SIGACTION was not yet defined.
11348 [!defined LIBC_SIGACTION]: Define LIBC_SIGACTION, #include self.
11349 [!defined LIBC_SIGACTION] (__sigaction): New function and
11350 libc_hidden_weak.
11351 [!defined LIBC_SIGACTION] (sigaction): New weak_alias.
11352 [defined LIBC_SIGACTION]: #include_next <sigaction.c>.
11353
113542003-01-02 Jakub Jelinek <jakub@redhat.com>
11355
11356 * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
11357
05df18c3
UD
113582003-01-02 Ulrich Drepper <drepper@redhat.com>
11359
11360 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
11361 New, larger type definition.
11362 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: New condvar
11363 implementation.
11364 * Versions [libpthread]: Add definitions for new pthread_cond_*
11365 interfaces for version GLIBC_2.3.2.
11366 * pthread_cond_init.c: Update initialization for new type definition.
11367 * Makefile (libpthread-routines): Remove pthread_cond_wait,
11368 pthread_cond_timedwait, pthread_cond_signal, and
11369 pthread_cond_broadcast. Add old_pthread_cond_init,
11370 old_pthread_cond_destroy, old_pthread_cond_wait,
11371 old_pthread_cond_timedwait, old_pthread_cond_signal, and
11372 old_pthread_cond_broadcast.
11373 * old_pthread_cond_broadcast.c: New file.
11374 * old_pthread_cond_destroy.c: New file.
11375 * old_pthread_cond_init.c: New file.
11376 * old_pthread_cond_signal.c: New file.
11377 * old_pthread_cond_timedwait.c: New file.
11378 * old_pthread_cond_wait.c: New file.
11379 * pthreadP.h: Add prototypes for the compatibility interfaces.
11380
11381 * pthread_cond_destroy.c: Don't include <errno.h>.
11382
fd8979e4
UD
113832003-01-01 Ulrich Drepper <drepper@redhat.com>
11384
11385 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Avoid
11386 unnecessary zero offset when addressing MUTEX.
11387
6d6ee629
UD
113882002-12-31 Ulrich Drepper <drepper@redhat.com>
11389
11390 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
11391 __register_atfork.
11392 * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
11393 for __register_atfork.
11394
a4baf360
UD
113952002-12-31 Jakub Jelinek <jakub@redhat.com>
11396
11397 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use __ASSEMBLER__
11398 instead of ASSEMBLER test macro.
11399
11400 * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
11401 __libc_current_sigrtmax): Add libc_hidden_def.
11402
11403 * sysdeps/pthread/list.h: Remove assert.h include.
11404
e9395a94
UD
114052002-12-31 Ulrich Drepper <drepper@redhat.com>
11406
11407 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Use
11408 __pthread_initialize_minimal_internal not
11409 __pthread_initialize_minimal.
11410
89d6e444
UD
114112002-12-30 Ulrich Drepper <drepper@redhat.com>
11412
416d2de6
UD
11413 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Mark
11414 __pthread_initialize_minimal as hidden.
11415
89d6e444
UD
11416 * init.c (__pthread_initialize_minimal_internal): Don't mark as
11417 constructor.
11418
114192002-12-31 Jakub Jelinek <jakub@redhat.com>
11420
11421 * Makefile ($(inst_libdir)/libpthread.so): Depend on
11422 $(common-objpfx)format.lds, include that into the output script.
11423 Fix comment.
11424 (extra-B-pthread.so): Change linuxthreads/ into nptl/.
11425
8cac677c
UD
114262002-12-28 Andreas Jaeger <aj@suse.de>
11427
11428 * sysdeps/unix/sysv/linux/xstatconv.c (xstat_conv): Adjust for
11429 nsec resolution changes.
11430 (xstat64_conv): Likewise.
11431 (xstat32_conv): Likewise.
11432 * sysdeps/unix/sysv/linux/kernel_stat.h: Add nsec resolution for
11433 struct kernel_stat.
11434 * sysdeps/unix/sysv/linux/bits/stat.h: Add nsec resolution for
11435 structs stat and stat64.
11436 * time/time.h (__timespec_defined): Define for __USE_MISC.
89d6e444 11437 * io/sys/stat.h [__USE_MISC]: Define __need_timespec for struct stat.
8cac677c 11438
49e9f864
UD
114392002-12-30 Jakub Jelinek <jakub@redhat.com>
11440
11441 * forward.c (FORWARD2): Renamed from FORWARD3. Remove unused export
11442 argument.
11443 (pthread_attr_init_2_0, pthread_attr_init_2_1): Use FORWARD macro.
11444 (pthread_exit): Use strong_alias to avoid warnings.
11445 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_exit
11446 and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
11447 ptr___pthread_attr_init_2_*.
11448 * init.c (pthread_functions): Adjust.
11449
bab09b26
UD
114502002-12-29 Ulrich Drepper <drepper@redhat.com>
11451
598d7a42
UD
11452 * forward.c: Make all functions available by default again. It
11453 caused too much trouble.
11454
bab09b26
UD
11455 * pt-siglongjmp.c: Removed.
11456
3b7ed871
UD
114572002-12-28 Jakub Jelinek <jakub@redhat.com>
11458
11459 * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
11460 (SYSINFO_OFFSET, MULTIPLE_THREADS_OFFSET): Remove.
11461 * sysdeps/i386/Makefile: New file.
11462 * sysdeps/i386/tcb-offsets.sym: New file.
11463 * sysdeps/pthread/tcb-offsets.h: New file.
11464 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
11465 Remove MULTIPLE_THREADS_OFFSET and SYSINFO_OFFSET checks.
11466
11467 * sysdeps/unix/sysv/linux/Versions [libc] (GLIBC_PRIVATE): Move
11468 __register_atfork...
11469 (GLIBC_2.3.2): ...here.
11470
114712002-12-28 Ulrich Drepper <drepper@redhat.com>
11472
11473 * sysdeps/pthread/pthread.h: Mark pthread_attr_getstackaddr and
11474 pthread_attr_setstackaddr with __attribute_deprecated__.
11475
270d9d47
UD
114762002-12-27 Jakub Jelinek <jakub@redhat.com>
11477
11478 * pt-system.c (system): Remove cancellation handling.
11479 * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
11480 cancellation routines.
11481
131fd126
UD
114822002-12-28 Ulrich Drepper <drepper@redhat.com>
11483
afb2e954
UD
11484 * descr.h: Include <dl-sysdep.h>.
11485 (struct pthread): Move header.data.list to the back of the struct.
131fd126
UD
11486 * sysdeps/i386/tls.h (tcbhead_t): Move list to the back of the struct.
11487 (MULTIPLE_THREADS_OFFSET): Adjust offset.
11488 (SYSINFO_OFFSEET): Likewise.
11489
114902002-12-27 Jakub Jelinek <jakub@redhat.com>
11491
11492 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h (USE_DL_SYSINFO):
11493 Define.
11494 (DL_SYSINFO_DEFAULT): Cast to uintptr_t to avoid warnings.
11495 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h (NEED_DL_SYSINFO,
11496 DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION): Define.
11497 (USE_DL_SYSINFO): Undef.
11498
114992002-12-22 Jakub Jelinek <jakub@redhat.com>
11500
11501 * Makefile (tests-reverse): Use $(objpfx)../libc.so instead of
11502 $(common-objpfx)libc.so.
11503 * tst-cancel4.c (tf_write, tf_writev): Increase buf sizes so that
11504 it is bigger than pipe buffer size even on arches with bigger
11505 page size.
11506 (tf_usleep): Cast usleep argument to useconds_t to avoid warnings.
11507
a218c9cf
UD
115082002-12-25 Ulrich Drepper <drepper@redhat.com>
11509
11510 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Implement
11511 correct errno access for case that USE___THREAD is not defined.
11512
015a2dc9
UD
115132002-12-24 Ulrich Drepper <drepper@redhat.com>
11514
11515 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Add missing #endif.
11516 Patch by Marijn Ros <marijn@mad.scientist.com>.
11517
5220f9ac
RM
115182002-12-22 Roland McGrath <roland@redhat.com>
11519
11520 * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
11521
1561bf63
UD
115222002-12-20 Ulrich Drepper <drepper@redhat.com>
11523
11524 * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_inexpensive): Define.
11525
3325198e
UD
115262002-12-19 Ulrich Drepper <drepper@redhat.com>
11527
057c823f
UD
11528 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Don't define
11529 NEED_DL_SYSINFO since no processor < i686 had the sysenter opcode.
11530 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: New file.
11531
097eca29
UD
11532 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Use ENTER_KERNEL instead
11533 of int $0x80.
11534 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
11535 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Likewise.
11536 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Likewise.
11537 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
11538 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
11539 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Likewise.
11540 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Likewise.
11541 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
11542
11543 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add support for using
11544 sysenter.
11545 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
11546
11547 * sysdeps/i386/tls.h: Unconditionally include <dl-sysdep.h>.
11548
5f5843e3
UD
11549 * allocatestack.c (allocate_stack) [NEED_DL_SYSINFO]: Set sysinfo
11550 in new TCB.
11551 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Check
11552 that sysinfo is properly initialized.
11553 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define RTLD_PRIVATE_ERRNO
11554 to 1 only for ld.so.
11555
3325198e
UD
11556 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
11557 RTLD_CORRECT_DYNAMIC_WEAK.
11558
74e8f2dc
UD
115592002-12-19 Jakub Jelinek <jakub@redhat.com>
11560
11561 * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
11562 Use return 0 as 6th argument to FORWARD4.
11563 * pthread_equal.c: Include pthreadP.h instead of pthread.h.
11564
df45b31e
UD
115652002-12-18 Ulrich Drepper <drepper@redhat.com>
11566
11567 * descr.h (struct pthread) [NEED_DL_SYSINFO]: Add sysinfo member.
11568 * sysdeps/i386/tls.h (tcbhead_t): Add sysinfo member.
11569 Define SYSINFO_OFFSEET if NEED_DL_SYSINFO is defined.
11570 (INIT_SYSINFO): New #define.
11571 (TLS_TP_INIT): Use INIT_SYSINFO.
11572 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
11573 At test to make sure SYSINFO_OFFSET value is correct.
11574 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
11575
3d539579
UD
115762002-12-18 Jakub Jelinek <jakub@redhat.com>
11577
11578 * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
11579 * sysdeps/unix/sysv/linux/raise.c (gsignal): Add weak alias to raise.
11580 * Versions [libc: GLIBC_2.0]: Add pthread_attr_init.
11581 [libpthread: GLIBC_2.1]: Remove __pthread_rwlock_init,
11582 __pthread_rwlock_destroy, __pthread_rwlock_rdlock,
11583 __pthread_rwlock_wrlock, __pthread_rwlock_unlock,
11584 __pthread_rwlock_tryrdlock and __pthread_rwlock_trywrlock.
11585
d7913e0e
UD
115862002-12-18 Ulrich Drepper <drepper@redhat.com>
11587
f051627f
UD
11588 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use ENTER_KERNEL
11589 macro instead of using int $0x80 directly.
11590
d7913e0e
UD
11591 * sysdeps/pthread/bits/stdio-lock.h: New file.
11592 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: New file.
11593 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: New file.
11594 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: New file.
11595 * Makefile (routines): Add libc-lowlevelmutex.
11596
11597 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Remove
11598 __i686.get_pc_thunk.dx.
11599
f077a4a9
UD
116002002-12-17 Jakub Jelinek <jakub@redhat.com>
11601
11602 * Makefile (libpthread-shared-only-routines): Add pt-allocrtsig.
11603 (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
11604 ($(objpfx)tst-cancel-wrappers.out): New rule.
11605 * tst-cancel-wrappers.sh: New test.
11606 * tst-locale1.c: Include signal.h.
11607 (uselocale): Test static linking of __libc_current_sigrt*.
11608
116092002-12-17 Ulrich Drepper <drepper@redhat.com>
11610
11611 * Makefile (tests): Add tst-cancel6.
11612 * tst-cancel6.c: New file
11613
bd499a3b
UD
116142002-12-17 Jakub Jelinek <jakub@redhat.com>
11615
11616 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
11617 Define meaningfully for assembler as well.
11618 * pthreadP.h (struct pthread_functions): Remove
11619 ptr_pthread_attr_init field. Add ptr_pthread_attr_init_2_0
11620 and ptr_pthread_attr_init_2_1 fields.
11621 * init.c (pthread_functions): Initialize ptr_pthread_attr_init_2_0
11622 and ptr_pthread_attr_init_2_1 instead of ptr_pthread_attr_init.
11623 * forward.c (FORWARD4): Renamed from FORWARD3. Add export argument.
11624 (FORWARD3): Define using FORWARD4.
11625 (pthread_attr_init): Provide both @GLIBC_2.0 and @@GLIBC_2.1
11626 versions.
11627 * pt-system.c: Remove duplicate stdlib.h include.
11628
0a1063f4
UD
116292002-12-16 Ulrich Drepper <drepper@redhat.com>
11630
87d60668
UD
11631 * sem_init.c: Define sem_init@GLIBC_2.0.
11632 * sem_destroy.c: Define sem_destroy@GLIBC_2.0.
11633 * sem_getvalue.c: Define sem_getvalue@GLIBC_2.0.
11634
0a1063f4
UD
11635 * flockfile.c: Moved to...
11636 * sysdeps/pthread/flockfile.c: ...here. New file.
11637 * funlockfile.c: Moved to...
11638 * sysdeps/pthread/funlockfile.c: ...here. New file.
11639 * ftrylockfile.c: Moved to...
11640 * sysdeps/pthread/ftrylockfile.c: ...here. New file.
11641
9634cf9d
UD
116422002-12-16 Jakub Jelinek <jakub@redhat.com>
11643
11644 * libc-cancellation.c: Guard both function with
11645 #if !defined NOT_IN_libc.
11646 * Makefile (libpthread-routines): Use ptw-, not pt- prefix for the
11647 automatically provided pthread wrappers.
11648 * pthreadP.h (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define to
11649 CANCEL_* if IS_IN_libpthread and to dummy versions if not in libc
11650 nor in libpthread.
11651 * pt-open.c: Removed.
11652 * pt-fcntl.c: Removed.
11653 * pt-fsync.c: Removed.
11654 * pt-lseek.c: Removed.
11655 * pt-msgrcv.c: Removed.
11656 * pt-msgsnd.c: Removed.
11657 * pt-msync.c: Removed.
11658 * pt-nanosleep.c: Removed.
11659 * pt-open64.c: Removed.
11660 * pt-pause.c: Removed.
11661 * pt-pread.c: Removed.
11662 * pt-pread64.c: Removed.
11663 * pt-pwrite.c: Removed.
11664 * pt-pwrite64.c: Removed.
11665 * pt-read.c: Removed.
11666 * pt-recv.c: Removed.
11667 * pt-recvfrom.c: Removed.
11668 * pt-recvmsg.c: Removed.
11669 * pt-send.c: Removed.
11670 * pt-sendto.c: Removed.
11671 * pt-sigtimedwait.c: Removed.
11672 * pt-sigwait.c: Removed.
11673 * pt-wait.c: Removed.
11674 * pt-waitpid.c: Removed.
11675 * pt-write.c: Removed.
11676 * pt-accept.c: Removed.
11677 * pt-close.c: Removed.
11678 * pt-connect.c: Removed.
11679 * pt-lseek64.c: Removed.
11680 * pt-sendmsg.c: Removed.
11681 * pt-tcdrain.c: Removed.
11682
6ee8d334
UD
116832002-12-15 Ulrich Drepper <drepper@redhat.com>
11684
81fa9371
UD
11685 * init.c (__pthread_initialize_minimal_internal): Renamed from
11686 __pthread_initialize_minimal. Make old name an alias. This
11687 converts a normal relocation into a relative relocation.
11688
f3015aa5
UD
11689 * pt-fcntl.c (__fcntl): Use fcntl64 syscall, not fcntl.
11690
4cbc1950
UD
11691 * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
11692 readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
11693 * Makefile (libpthread-routines): Remove pt-creat, pt-poll,
11694 pt-pselect, pt-readv, pt-select, pt-sigpause, pt-sigsuspend,
11695 pt-sigwaitinfo, pt-waitid, and pt-writev.
11696 * pt-creat.c: Removed.
11697 * pt-poll.c: Removed.
11698 * pt-pselect.c: Removed.
11699 * pt-readv.c: Removed.
11700 * pt-select.c: Removed.
11701 * pt-sigpause.c: Removed.
11702 * pt-sigsuspend.c: Removed.
11703 * pt-sigwaitinfo.c: Removed.
11704 * pt-waitid.c: Removed.
11705 * pt-writev.c: Removed.
11706
8454830b
UD
11707 * init.c (pthread_functions): New variable.
11708 (__pthread_initialize_minimal): Pass pointer to pthread_functions
11709 (or NULL) to __libc_pthread_init.
11710 * forward.c: Rewrite to use __libc:pthread_functions array to get
11711 function addresses.
11712 * sysdeps/unix/sysv/linux/fork.h: Remove __libc_pthread_init
11713 prototype.
11714 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
11715 Take new parameter. Copy content of variable pointed to by it
11716 to __libc_pthread_init.
11717
11718 * pthreadP.h (struct pthread_functions): New type.
11719 (__libc_pthread_init): Declare.
11720
11721 * pthread_attr_destroy.c: Add namespace protected alias.
11722 * pthread_attr_getdetachstate.c: Likewise.
11723 * pthread_attr_getinheritsched.c: Likewise.
11724 * pthread_attr_getschedparam.c: Likewise.
11725 * pthread_attr_getschedpolicy.c: Likewise.
11726 * pthread_attr_getscope.c: Likewise.
11727 * pthread_attr_setdetachstate.c: Likewise.
11728 * pthread_attr_setinheritsched.c: Likewise.
11729 * pthread_attr_setschedparam.c: Likewise.
11730 * pthread_attr_setschedpolicy.c: Likewise.
11731 * pthread_attr_setscope.c: Likewise.
11732 * pthread_cond_broadcast.c: Likewise.
11733 * pthread_cond_destroy.c: Likewise.
11734 * pthread_cond_init.c: Likewise.
11735 * pthread_cond_signal.c: Likewise.
11736 * pthread_cond_wait.c: Likewise.
11737 * pthread_condattr_destroy.c: Likewise.
11738 * pthread_condattr_init.c: Likewise.
11739 * pthread_equal.c: Likewise.
11740 * pthread_exit.c: Likewise.
11741 * pthread_getschedparam.c: Likewise.
11742 * pthread_self.c: Likewise.
11743 * pthread_setcancelstate.c: Likewise.
11744 * pthread_setschedparam.c: Likewise.
11745 * pthread_mutex_destroy.c: Likewise.
11746 * pthread_mutex_init.c: Likewise.
11747 * pthreadP.h: Add prototypes for the aliases.
11748
0d5f4929
UD
11749 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Set
11750 multiple_threads member in correct TCB to 1.
11751
6ee8d334
UD
11752 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define
11753 SINGLE_THREAD_P. If in libc or libpthread examine multiple_thread
11754 member of thread decriptor, otherwise return unconditionally 1.
11755
2fb6444d
UD
117562002-12-14 Ulrich Drepper <drepper@redhat.com>
11757
11758 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Changes folded into the
11759 regular Linux version. Remove file.
11760 * sysdeps/unix/sysv/linux/connect.S: Likewise. Remove file.
11761 * sysdeps/unix/sysv/linux/llseek.c: Likewise. Remove file.
11762 * sysdeps/unix/sysv/linux/msgrcv.c: Likewise. Remove file.
11763 * sysdeps/unix/sysv/linux/msgsnd.c: Likewise. Remove file.
11764 * sysdeps/unix/sysv/linux/open64.c: Likewise. Remove file.
11765 * sysdeps/unix/sysv/linux/poll.c: Likewise. Remove file.
11766 * sysdeps/unix/sysv/linux/pread.c: Likewise. Remove file.
11767 * sysdeps/unix/sysv/linux/pread64.c: Likewise. Remove file.
11768 * sysdeps/unix/sysv/linux/pselect.c: Likewise. Remove file.
11769 * sysdeps/unix/sysv/linux/pwrite.c: Likewise. Remove file.
11770 * sysdeps/unix/sysv/linux/pwrite64.c: Likewise. Remove file.
11771 * sysdeps/unix/sysv/linux/readv.c: Likewise. Remove file.
11772 * sysdeps/unix/sysv/linux/recv.S: Likewise. Remove file.
11773 * sysdeps/unix/sysv/linux/recvfrom.S: Likewise. Remove file.
11774 * sysdeps/unix/sysv/linux/recvmsg.S: Likewise. Remove file.
11775 * sysdeps/unix/sysv/linux/send.S: Likewise. Remove file.
11776 * sysdeps/unix/sysv/linux/sendmsg.S: Likewise. Remove file.
11777 * sysdeps/unix/sysv/linux/sendto.S: Likewise. Remove file.
11778 * sysdeps/unix/sysv/linux/sigpause.c: Likewise. Remove file.
11779 * sysdeps/unix/sysv/linux/sigsuspend.c: Likewise. Remove file.
11780 * sysdeps/unix/sysv/linux/sigtimedwait.c: Likewise. Remove file.
11781 * sysdeps/unix/sysv/linux/sigwait.c: Likewise. Remove file.
11782 * sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise. Remove file.
11783 * sysdeps/unix/sysv/linux/system.c: Likewise. Remove file.
11784 * sysdeps/unix/sysv/linux/tcdrain.c: Likewise. Remove file.
11785 * sysdeps/unix/sysv/linux/wait.c: Likewise. Remove file.
11786 * sysdeps/unix/sysv/linux/waitid.c: Likewise. Remove file.
11787 * sysdeps/unix/sysv/linux/waitpid.c: Likewise. Remove file.
11788 * sysdeps/unix/sysv/linux/writev.c: Likewise. Remove file.
11789 * sysdeps/unix/sysv/linux/i386/fcntl.c: Likewise. Remove file.
11790
86b2dc40
UD
117912002-12-14 Jakub Jelinek <jakub@redhat.com>
11792
11793 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
11794 * sysdeps/unix/sysv/linux/open.c: Removed.
11795 * sysdeps/unix/sysv/linux/fsync.c: Removed.
11796 * sysdeps/unix/sysv/linux/lseek.c: Removed.
11797 * sysdeps/unix/sysv/linux/msync.c: Removed.
11798 * sysdeps/unix/sysv/linux/read.c: Removed.
11799 * sysdeps/unix/sysv/linux/close.c: Removed.
11800 * sysdeps/unix/sysv/linux/creat.c: Removed.
11801 * sysdeps/unix/sysv/linux/nanosleep.c: Removed.
11802 * sysdeps/unix/sysv/linux/pause.c: Removed.
11803 * sysdeps/unix/sysv/linux/select.c: Removed.
11804 * sysdeps/unix/sysv/linux/write.c: Removed.
11805
9d263d72
UD
118062002-12-14 Ulrich Drepper <drepper@redhat.com>
11807
11808 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Check multiple_threads
11809 element in TCB to see whether locking is needed.
11810
11811 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Check that
11812 MULTIPLE_THREADS_OFFSET value is correct.
11813
11814 * sysdeps/unix/sysv/linux/close.c: New file.
11815 * sysdeps/unix/sysv/linux/connect.S: New file.
11816 * sysdeps/unix/sysv/linux/creat.c: New file.
11817 * sysdeps/unix/sysv/linux/fsync.c: New file.
11818 * sysdeps/unix/sysv/linux/llseek.c: New file.
11819 * sysdeps/unix/sysv/linux/lseek.c: New file.
11820 * sysdeps/unix/sysv/linux/msgrcv.c: New file.
11821 * sysdeps/unix/sysv/linux/msgsnd.c: New file.
11822 * sysdeps/unix/sysv/linux/msync.c: New file.
11823 * sysdeps/unix/sysv/linux/nanosleep.c: New file.
11824 * sysdeps/unix/sysv/linux/open.c: New file.
11825 * sysdeps/unix/sysv/linux/open64.c: New file.
11826 * sysdeps/unix/sysv/linux/pause.c: New file.
11827 * sysdeps/unix/sysv/linux/poll.c: New file.
11828 * sysdeps/unix/sysv/linux/pread.c: New file.
11829 * sysdeps/unix/sysv/linux/pread64.c: New file.
11830 * sysdeps/unix/sysv/linux/pselect.c: New file.
11831 * sysdeps/unix/sysv/linux/pwrite.c: New file.
11832 * sysdeps/unix/sysv/linux/pwrite64.c: New file.
11833 * sysdeps/unix/sysv/linux/readv.c: New file.
11834 * sysdeps/unix/sysv/linux/recv.S: New file.
11835 * sysdeps/unix/sysv/linux/recvfrom.S: New file.
11836 * sysdeps/unix/sysv/linux/recvmsg.S: New file.
11837 * sysdeps/unix/sysv/linux/select.c: New file.
11838 * sysdeps/unix/sysv/linux/send.S: New file.
11839 * sysdeps/unix/sysv/linux/sendmsg.S: New file.
11840 * sysdeps/unix/sysv/linux/sendto.S: New file.
11841 * sysdeps/unix/sysv/linux/sigpause.c: New file.
11842 * sysdeps/unix/sysv/linux/sigsuspend.c: New file.
11843 * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
11844 * sysdeps/unix/sysv/linux/sigwait.c: New file.
11845 * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
11846 * sysdeps/unix/sysv/linux/system.c: New file.
11847 * sysdeps/unix/sysv/linux/tcdrain.c: New file.
11848 * sysdeps/unix/sysv/linux/wait.c: New file.
11849 * sysdeps/unix/sysv/linux/waitid.c: New file.
11850 * sysdeps/unix/sysv/linux/waitpid.c: New file.
11851 * sysdeps/unix/sysv/linux/writev.c: New file.
11852 * sysdeps/unix/sysv/linux/i386/fcntl.c: New file.
11853
11854 * pt-readv.c: Fix comment.
11855
118562002-12-14 Jakub Jelinek <jakub@redhat.com>
11857
11858 * tst-cleanup1.c: Include stdlib.h.
11859
11860 * tst-cancel5.c: New test.
11861 * Makefile (tests): Add tst-cancel5.
11862 (tst-cancel5): Link against libc.so libpthread.so in that order.
11863
9ae0909b
UD
118642002-12-13 Ulrich Drepper <drepper@redhat.com>
11865
b7bdd9c4
UD
11866 * forward.c (test_loaded): Prevent recursive calls.
11867
9ae0909b
UD
11868 * Makefile (routines): Add libc-cancellation.
11869 * libc-cancellation.c: New file.
11870 * descr.h (struct pthread): Add multiple_threads field.
11871 * allocatestack.c (allocate_stack): Initialize multiple_header field of
11872 new thread descriptor to 1.
11873 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread):
11874 Initialize multiple_thread field after successful thread creation.
11875 * cancellation.c (__do_cancel): Move to pthreadP.h.
11876 (__pthread_enable_asynccancel): Remove parameter from __do_cancel call.
11877 (__pthread_disable_asynccancel): Add internal_function attribute.
11878 * init.c (sigcancel_handler): Remove parameter from __do_cancel call.
11879 * pthread_setcancelstate.c: Likewise.
11880 * pthread_setcanceltype.c: Likewise.
11881 * pthread_exit.c: Likewise.
11882 * pthreadP.h (CANCELLATION_P): Likewise.
11883 (__do_cancel): Define as static inline.
11884 (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): New #defines.
11885 (__libc_enable_asynccancel, __libc_disable_asynccancel): New
11886 declarations.
11887 * sysdeps/i386/tls.h (tcbhead_t): Add list and multiple_threads
11888 fields. Define MULTIPLE_THREADS_OFFSET.
11889 * sysdeps/pthread/bits/libc-lock.h: Remove __libc_locking_needed
11890 declaration.
11891 * sysdeps/unix/sysv/linux/accept.S: New file.
11892 * sysdeps/unix/sysv/linux/read.c: New file.
11893 * sysdeps/unix/sysv/linux/write.c: New file.
11894 * sysdeps/unix/sysv/linux/i386/pt-socket.S: New file.
11895 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove definition and
11896 initialization of __libc_locking_needed.
11897 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't use
11898 __libc_locking_needed, use multiple_threads field in TCB.
11899 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
11900
22f20674
UD
119012002-12-12 Ulrich Drepper <drepper@redhat.com>
11902
2ad2e1e7
UD
11903 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: Use i486
11904 version.
11905 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: Likewise.
11906
22f20674
UD
11907 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Correct
11908 access to __libc_locking_needed for PIC.
11909
aa80bf86
UD
119102002-12-12 Jakub Jelinek <jakub@redhat.com>
11911
11912 * sysdeps/pthread/bits/libc-lock.h (__libc_locking_needed): Only
11913 declare for libc.so.
11914 (__libc_lock_init, __libc_lock_init_recursive): Change into comma
11915 expression.
11916 (__libc_lock_lock): Put into statement expression.
11917 (__libc_lock_unlock): Remove trailing semicolon.
11918 * sysdeps/unix/sysv/linux/fork.h (__libc_pthread_init): Fix typo.
11919
24021373
RM
119202002-12-12 Roland McGrath <roland@redhat.com>
11921
11922 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use asm operand with
11923 "m" constraint to refer to __libc_locking_needed. Declare it here.
11924
14e7aece
UD
119252002-12-12 Ulrich Drepper <drepper@redhat.com>
11926
11927 * sysdeps/unix/sysv/linux/fork-gen.c: Renamed to...
11928 * sysdeps/unix/sysv/linux/libc_pthread_init.c: ...this.
11929 Initialize __libc_locking_needed.
11930 * init.c (__pthread_initialize_minimal): Call __libc_pthread_init
11931 instead of __register_pthread_fork_handler.
11932 * sysdeps/pthread/bits/libc-lock.h: Declare __libc_locking_needed.
11933 * sysdeps/unix/sysv/linux/Makefile (sysdep_routimes): Replace
11934 fork-gen with libc_pthread_init.
11935 * sysdeps/unix/sysv/linux/Versions: Use __libc_pthread_init instead
11936 of __register_pthread_fork_handler.
11937 * sysdeps/unix/sysv/linux/fork.h: Declare __libc_pthread_init instead
11938 of __register_pthread_fork_handler.
11939 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use
11940 __libc_locking_needed to determine whether lock prefix can be avoided.
11941 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
11942
85631c8e
UD
119432002-12-11 Ulrich Drepper <drepper@redhat.com>
11944
da63009e
UD
11945 * Makefile (tests): Add tst-cleanup1.
11946 * tst-cleanup1.c: New file.
11947 * cancellation.c (__cleanup_thread): Removed.
11948 (__do_cancel): Remove call to __cleanup_thread.
11949 * pthreadP.h: Remove __cleanup_thread prorotype.
11950
000160a2
UD
11951 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
11952 Remember function and argument even if cancellation handler
11953 function is not available.
11954 (__libc_cleanup_region_end): Execute registered function directly if
11955 pthread functions are not available.
11956 (__libc_cleanup_end): Likewise.
11957
85631c8e
UD
11958 * init.c (__pthread_initialize_minimal): Fix initialization in
11959 static lib by preventing gcc from being too clever.
11960
dce8f2b6
UD
119612002-12-10 Ulrich Drepper <drepper@redhat.com>
11962
34a075be
UD
11963 * init.c (__pthread_initialize_minimal): Remove unneccesary
11964 sigaddset call.
11965
dce8f2b6
UD
11966 * Makefile (tests): We can run tst-locale2 now.
11967
e5e45b53
UD
119682002-12-09 Ulrich Drepper <drepper@redhat.com>
11969
11970 * Versions: Remove duplicated sigwait entry.
11971
bdb04f92
UD
119722002-12-08 Ulrich Drepper <drepper@redhat.com>
11973
1e506629
UD
11974 * pthreadP.h: Enable pthread_cleanup_{push,pop} optimizations only
11975 inside libpthread.
11976
a3957dd5
UD
11977 * pt-fcntl.c (__fcntl): Initialize oldtype to avoid warning.
11978
bdb04f92
UD
11979 * pthreadP.h: Declare __pthread_enable_asynccancel and
11980 __pthread_disable_asynccancel.
11981 (CANCEL_ASYNC): Use __pthread_enable_asynccancel.
11982 (CANCEL_RESET): Use __pthread_disable_asynccancel.
11983 * cancellation.c (__pthread_enable_asynccancel): New function.
11984 (__pthread_disable_asynccancel): New function.
11985 * pt-accept.c: Adjust for CANCEL_ASYNC and CANCEL_RESET change.
11986 * pt-close.c: Likewise.
11987 * pt-connect.c: Likewise.
11988 * pt-creat.c: Likewise.
11989 * pt-fcntl.c: Likewise.
11990 * pt-fsync.c: Likewise.
11991 * pt-lseek.c: Likewise.
11992 * pt-lseek64.c: Likewise.
11993 * pt-msgrcv.c: Likewise.
11994 * pt-msgsnd.c: Likewise.
11995 * pt-msync.c: Likewise.
11996 * pt-nanosleep.c: Likewise.
11997 * pt-open.c: Likewise.
11998 * pt-open64.c: Likewise.
11999 * pt-pause.c: Likewise.
12000 * pt-poll.c: Likewise.
12001 * pt-pread.c: Likewise.
12002 * pt-pread64.c: Likewise.
12003 * pt-pselect.c: Likewise.
12004 * pt-pwrite.c: Likewise.
12005 * pt-pwrite64.c: Likewise.
12006 * pt-read.c: Likewise.
12007 * pt-readv.c: Likewise.
12008 * pt-recv.c: Likewise.
12009 * pt-recvfrom.c: Likewise.
12010 * pt-recvmsg.c: Likewise.
12011 * pt-select.c: Likewise.
12012 * pt-send.c: Likewise.
12013 * pt-sendmsg.c: Likewise.
12014 * pt-sendto.c: Likewise.
12015 * pt-sigpause.c: Likewise.
12016 * pt-sigsuspend.c: Likewise.
12017 * pt-sigtimedwait.c: Likewise.
12018 * pt-sigwait.c: Likewise.
12019 * pt-sigwaitinfo.c: Likewise.
12020 * pt-system.c: Likewise.
12021 * pt-tcdrain.c: Likewise.
12022 * pt-wait.c: Likewise.
12023 * pt-waitid.c: Likewise.
12024 * pt-waitpid.c: Likewise.
12025 * pt-write.c: Likewise.
12026 * pt-writev.c: Likewise.
a3957dd5
UD
12027 * pthread_join.c: Likewise.
12028 * pthread_timedjoin.c: Likewise.
bdb04f92
UD
12029
12030 * pt-sigpause.c (sigsuspend): Call __sigsuspend.
12031 (__xpg_sigpause): New function.
12032 * Versions (libpthread:GLIBC_2.3.2): Add __xpg_sigpause.
12033
6ccb3834
UD
120342002-12-07 Ulrich Drepper <drepper@redhat.com>
12035
09efc3ba
UD
12036 * Makefile (CFLAGS-ftrylockfile.c): Add -D_IO_MTSAFE_IO.
12037
12038 * cleanup.c: Move declarations of _GI_pthread_cleanup_push and
12039 _GI_pthread_cleanup_pop to pthreadP.h.
12040
12041 * ftrylockfile.c: Use _IO_lock_trylock instead of
12042 pthread_mutex_trylock.
12043
12044 * pthreadP.h (CANCEL_ASYNC): Use __pthread_setcanceltype.
12045 (CANCEL_RESET): Likewise.
12046 (__pthread_setcanceltype_): Declare.
12047 (__pthread_mutex_lock_internal): Declare.
12048 (__pthread_mutex_unlock_internal): Declare.
12049 (__pthread_once_internal): Declare.
12050 (pthread_cleanup_push): Redefine using _GI_pthread_cleanup_push.
12051 (pthread_cleanup_pop): Redefine using _GI_pthread_cleanup_pop.
12052
12053 * pthread_cond_timedwait.c: Use INTUSE is calls to pthread_mutex_lock
12054 and pthread_mutex_unlock.
12055 * pthread_cond_wait.c: Likewise.
12056 * pthread_mutex_lock.c: Use INTDEF to define alias if needed.
12057 * pthread_mutex_unlock.c: Likewise.
12058
12059 * pthread_setcanceltype.c: Add additional alias
12060 __pthread_setcanceltype.
12061
12062 * sem_unlink.c (sem_unlink): Use __pthread_once with INTDEF.
12063 * sem_open.c (sem_open): Likewise.
12064 Use __libc_open, __libc_write, and __libc_close instead of
12065 open, write, and close respectively.
12066
12067 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_trylock_internal):
12068 Rewrite as statement expression since it must return a value.
12069
12070 * pthread_cancel.c: Use __pthread_kill instead of pthread_kill.
12071 * sysdeps/unix/sysv/linux/pthread_kill.c: Define additional alias
12072 __pthread_kill.
12073
12074 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Define additional
12075 alias __pthread_once_internal.
12076
6ccb3834
UD
12077 * sysdeps/unix/sysv/linux/raise.c: Use libc_hidden_def for raise.
12078
d3c9f895
UD
120792002-12-06 Ulrich Drepper <drepper@redhat.com>
12080
4614167a
UD
12081 * Makefile (tests): Add tst-stdio1 and tst-stdio2.
12082 * tst-stdio1.c: New file.
12083 * tst-stdio2.c: New file.
12084
a4548cea
UD
12085 * init.c (__pthread_initialize_minimal): Correct INIT_LIST_HEAD use.
12086
d3c9f895
UD
12087 * Makefile (tests): Comment out tst-locale2 for now.
12088 (CFLAGS-flockfile.c, CFLAGS-funlockfile.c): Define to -D_IO_MTSAFE_IO.
12089
12090 * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-fork.c to
12091 -D_IO_MTSAFE_IO.
12092 * sysdeps/unix/sysv/linux/fork.c: Include <bits/stdio-lock.h>.
12093 Use _IO_lock_init instead of explicit assignment.
12094
12095 * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
12096 Define __libc_lock_* and __libc_lock_recursive macros with
12097 lowlevellock macros, not pthread mutexes.
12098
12099 * flockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_lock instead
12100 of pthread_mutex_lock.
12101 * funlockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_unlock
12102 instead of pthread_mutex_unlock.
12103
fde89ad0
RM
121042002-12-06 Roland McGrath <roland@redhat.com>
12105
12106 * allocatestack.c (__stack_user): Use uninitialized defn.
12107 * init.c (__pthread_initialize_minimal): Initialize it here.
12108
11767d47
RM
121092002-12-05 Roland McGrath <roland@redhat.com>
12110
fde89ad0
RM
12111 * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
12112 string.
12113 * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
12114
11767d47
RM
12115 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Add
12116 missing & here too.
12117
440d8bc2
UD
121182002-12-05 Ulrich Drepper <drepper@redhat.com>
12119
12120 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
12121 lowlevellock.
12122 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: New file.
12123 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: New file.
12124 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: New file.
12125 * sysdeps/pthread/bits/libc-lock.h: Use lowlevellock implementation
12126 for __libc_lock_* macros.
12127 * Makefile (routines): Add libc-lowlevellock.
12128
121292002-10-09 Roland McGrath <roland@redhat.com>
12130
12131 * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
12132 Under [__PIC__], call the function via the pointer fetched for
12133 comparison rather than a call by name that uses the PLT.
12134 (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
12135 (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
12136 (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
12137 (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
12138 (__libc_key_create, __libc_getspecific, __libc_setspecific): Use it.
12139
d5ed0118
RM
121402002-12-04 Roland McGrath <roland@redhat.com>
12141
12142 * forward.c (pthread_self): Use FORWARD3 macro to correct return type.
12143
12144 * sysdeps/i386/td_ta_map_lwp2thr.c: Moved from ../nptl_db.
12145 * sysdeps/generic/td_ta_map_lwp2thr.c: New file.
12146
12147 * pthread_create.c (start_thread): Add missing & on __nptl_last_event.
12148
eaa4099f
UD
121492002-12-04 Ulrich Drepper <drepper@redhat.com>
12150
12151 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Make pthread_t
12152 a completely opaque, non-integer type.
12153 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
12154
33b5d0cc
UD
121552002-12-05 Jakub Jelinek <jakub@redhat.com>
12156
12157 * sysdeps/i386/tls.h: Include stdlib.h.
12158 * sysdeps/x86_64/tls.h: Likewise.
12159
7a5cdb30
UD
121602002-12-04 Ulrich Drepper <drepper@redhat.com>
12161
c4a6d859
UD
12162 * Makefile (tests): Add tst-locale2.
12163 (tests-static): Likewise.
12164 * tst-locale2.c: New file.
12165
7a5cdb30
UD
12166 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Mark asms as
12167 volatile and add memory clobbers to lock operations.
12168
d82d5d12
UD
121692002-12-03 Ulrich Drepper <drepper@redhat.com>
12170
69cae3cf
UD
12171 * sysdeps/i386/i686/bits/atomic.h: Use i486 version.
12172 * sysdeps/i386/i486/bits/atomic.h: New file.
12173 * sysdeps/i386/i586/bits/atomic.h: New file.
12174 * sysdeps/i386/i686/pthread_spin_trylock.S: Define HAVE_CMOV and
12175 include i486 version.
12176 * sysdeps/i386/i486/pthread_spin_trylock.S: New file.
12177 * sysdeps/i386/i586/pthread_spin_trylock.S: New file.
c97c64de 12178 Patch by Marijn Ros <marijn@mad.scientist.com>.
69cae3cf 12179
e4044c01
UD
12180 * allocatestack.c (get_cached_stack): Don't crash if we first
12181 found a stack with a larger size then needed.
12182 Reported by Hui Huang <hui.huang@sun.com>.
12183
d82d5d12
UD
12184 * Makefile (tests): Add tst-sysconf.
12185 * tst-sysconf.c: New file.
12186
12187 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine
12188 PTHREAD_THREADS_MAX.
12189
fa9a4ff0
RM
121902002-12-02 Roland McGrath <roland@redhat.com>
12191
12192 * pthreadP.h (__stack_user, __nptl_create_event, __nptl_death_event):
12193 Declare using hidden_proto instead of attribute_hidden, so there are
12194 non-.hidden static symbols for gdb to find.
12195 (__pthread_keys): Likewise.
12196 * events.c (__nptl_create_event, __nptl_death_event): Add hidden_def.
12197 * allocatestack.c (__stack_user): Likewise.
12198 * pthread_create.c (__pthread_keys): Likewise.
12199 (__nptl_threads_events, __nptl_last_event): Make these static instead
12200 of hidden.
12201 * pthread_key_create.c (__pthread_pthread_keys_max,
12202 __pthread_pthread_key_2ndlevel_size): Renamed from __linuxthreads_*.
12203
91949a33
UD
122042002-12-02 Ulrich Drepper <drepper@redhat.com>
12205
c22b52fa
UD
12206 * Makefile (tests): Add tst-locale1. If buid-static is yes link
12207 statically.
12208 * tst-locale1.c: New file.
12209
beb6aa41
UD
12210 * pthread_cond_timedwait.c: Include <stdlib.h>.
12211
91949a33
UD
12212 * Makefile (tests): Add tst-fork2 and tst-fork3.
12213 * tst-fork2.c: New file.
12214 * tst-fork3.c: New file.
12215
654dff90
UD
122162002-11-28 Ulrich Drepper <drepper@redhat.com>
12217
cb0e76b4
UD
12218 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
12219
12220 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
12221 require it to 200112L.
12222
12223 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Use cmov
12224 instruction only if HAVE_CMOV is defined.
12225 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Define HAVE_CMOV.
12226
975aa229
UD
12227 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: New file.
12228
654dff90
UD
12229 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: New file.
12230
12231 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: New file.
12232
12233 * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: New file.
12234
a3931336
UD
122352002-11-27 Ulrich Drepper <drepper@redhat.com>
12236
c10c099c
UD
12237 * sysdeps/x86_64/bits/atomic.h: New file.
12238
12239 * sysdeps/i386/i686/bits/atomic.h: Fix asm syntax for 8- and
12240 16-bit operations.
12241
dca99d27
UD
12242 * sysdeps/unix/sysv/linux/raise.c (raise): Use INTERNAL_SYSCALL if
12243 possible since gettid cannot fail.
12244
f78deea6
UD
12245 * sysdeps/x86_64/pthreaddef.h: New file.
12246
12247 * sysdeps/i386/pthreaddef.h (gettid): Removed.
12248
12249 * sysdeps/x86_64/pthread_spin_init.c: New file.
12250 * sysdeps/x86_64/pthread_spin_lock.c: New file.
12251 * sysdeps/x86_64/pthread_spin_trylock.c: New file.
12252 * sysdeps/x86_64/pthread_spin_unlock.c: New file.
12253
12254 * sysdeps/i386/i686/pthread_spin_trylock.S (pthread_spin_trylock):
12255 Add missing lock prefix. Minute optimization.
12256
12257 * tst-spin2.c (main): Also check successful trylock call.
12258
12259 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use correct
12260 syscall. Fix typo in case INTERNAL_SYSCALL is not used.
12261
12262 * sysdeps/i386/pthread_spin_destroy.c: Moved to...
12263 * sysdeps/pthread/pthread_spin_destroy.c: ...here. New file.
12264
12265 * sysdeps/i386/pthread_sigmask.c: Removed. Use the generic code.
12266 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Return correct
12267 value in case of an error. Add support for INTERNAL_SYSCALL.
b54e18eb
UD
12268
12269 * sysdeps/i386/pthread_sigmask.c (pthread_sigmask): Return correct
12270 value in case of an error.
12271
a3931336
UD
12272 * sysdeps/x86_64/tls.h: New file.
12273
76a50749
UD
122742002-11-26 Ulrich Drepper <drepper@redhat.com>
12275
117c452c
UD
12276 * sysdeps/i386/tls.h (THREAD_GETMEM_NC): Change interface. It now
12277 takes the array member name and the index as parameters.
12278 (THREAD_SETMEM_NC): Likewise.
12279 * pthread_getspecific.c: Use new THREAD_GETMEM_NC interface.
12280 * pthread_setspecific.c: Use new THREAD_GETMEM_NC and THREAD_SETMEM_NC
12281 interfaces.
12282
12283 * sysdeps/i386/tls.h (THREAD_SETMEM): Use size of member element
12284 to decide which code to use.
12285 (THREAD_SETMEM_NC): Likewise.
12286
76a50749
UD
12287 * allocatestack.c (queue_stack): Don't remove stack from list here.
12288 Do it in the caller. Correct condition to prematurely terminate
12289 loop to free stacks.
12290 (__deallocate_stack): Remove stack from list here.
12291
122922002-11-26 Ulrich Drepper <drepper@redhat.com>
12293
12294 * Makefile (tests): Add tst-stack1.
12295 * tst-stack1.c: New file.
12296
12297 * allocatestack.c (allocate_stack): Initialize the TCB on a user
12298 provided stack.
12299
12300 * pthread_attr_getstack.c: Return bottom of the thread area.
12301
123022002-11-25 Ulrich Drepper <drepper@redhat.com>
12303
12304 * Makefile (libpthread-routines): Add pt-allocrtsig and
12305 pthread_kill_other_threads.
12306 * pt-allocrtsig.c: New file.
12307 * pthread_kill_other_threads.c: New file.
12308 * sysdeps/unix/sysv/linux/allocrtsig.c: Add additional aliases for
12309 all three functions.
12310 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
12311 allocrtsig.
12312 * sysdeps/unix/sysv/linux/Versions (libc:GLIBC_PRIVATE): Export
12313 __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
12314 and __libc_allocate_rtsig_private.
12315 * Versions (libpthread): Export pthread_kill_other_threads_np,
12316 __libc_current_sigrtmin, and __libc_current_sigrtmax.
12317
123182002-11-24 Ulrich Drepper <drepper@redhat.com>
12319
12320 * allocatestack.c (allocate_stack): stackaddr in attribute points to
12321 the end of the stack. Adjust computations.
12322 When mprotect call fails dequeue stack and free it.
12323 * pthread_attr_setstack.c: Store top of the stack in stackaddr
12324 attribute.
12325 * pthread_getattr_np.c: Likewise.
12326
12327 * descr.h (IS_DETACHED): Add some more parenthesis to prevent
12328 surprises.
12329
123302002-11-23 Ulrich Drepper <drepper@redhat.com>
12331
12332 * sysdeps/pthread/pthread.h (pthread_self): __THROW must come before
12333 attribute definitions. Patch by Luca Barbieri <ldb@ldb.ods.org>.
12334
123352002-11-22 Ulrich Drepper <drepper@redhat.com>
12336
12337 * pthread_getspecific.c: Optimize access to first 2nd-level array.
12338 * pthread_setspecific.c: Likewise.
12339
123402002-11-21 Ulrich Drepper <drepper@redhat.com>
12341
12342 * sysdeps/unix/sysv/linux/i386/createthread.c: Remove CLONE_ flags
12343 definitions. Get them from the official place.
12344 * sysdeps/unix/sysv/linux/i386/fork.c: Likewise.
12345
12346 * sysdeps/unix/sysv/linux/i386/createthread.c: Update CLONE_* flags.
12347 Use new CLONE_ flags in clone() calls.
12348
12349 * sysdeps/unix/sysv/linux/fork.c: Use ARCH_FORK to actually fork.
12350 * sysdeps/unix/sysv/linux/i386/fork.c: New file.
12351
12352 * Versions: Add pthread_* functions for libc.
12353 * forward.c: New file.
12354
12355 * sysdeps/pthread/Makefile (libpthread-sysdeps_routines): Add
12356 errno-loc.
12357 * herrno.c: New file.
12358 * res.c: New file.
12359
12360 * Makefile (libpthread-routines): Remove sem_post, sem_wait,
12361 sem_trywait, and sem_timedwait. Add herrno and res.
12362 * sem_init.c: Don't initialize lock and waiters members.
12363 * sem_open.c: Likewise.
12364 * sem_post.c: Removed.
12365 * sem_wait.c: Removed.
12366 * sem_trywait.c: Removed.
12367 * sem_timedwait.c: Removed.
12368 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Complete rewrite.
12369 Includes full implementations of sem_post, sem_wait, sem_trywait,
12370 and sem_timedwait.
12371 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Adjust
12372 for new implementation.
12373 * sysdeps/unix/sysv/linux/internaltypes.h (struct sem): Remove lock
12374 and waiters fields.
12375
12376 * tst-sem3.c: Improve error message.
12377 * tst-signal3.c: Likewise.
12378
12379 * init.c (__pthread_initialize_minimal): Use set_tid_address syscall
12380 to tell the kernel about the termination futex and to initialize tid
12381 member. Don't initialize main_thread.
12382 * descr.h (struct pthread): Remove main_thread member.
12383 * cancelllation.c (__do_cancel): Remove code handling main thread.
12384 The main thread is not special anymore.
12385
12386 * allocatestack.c (__reclaim_stacks): Mark stacks as unused. Add
12387 size of the stacks to stack_cache_actsize.
12388
12389 * pt-readv.c: Add missing "defined".
12390 * pt-sigwait.c: Likewise.
12391 * pt-writev.c: Likewise.
12392
123932002-11-09 Ulrich Drepper <drepper@redhat.com>
12394
12395 * Versions: Export __connect from libpthread.
12396 Patch by Luca Barbieri <ldb@ldb.ods.org>.
12397
12398 * Makefile (libpthread-routines): Add pt-raise.
12399 * sysdeps/unix/sysv/linux/raise.c: New file.
12400 * sysdeps/unix/sysv/linux/pt-raise.c: New file.
12401 * sysdeps/generic/pt-raise.c: New file.
12402
12403 * pthread_cond_init.c: Initialize all data elements of the condvar
12404 structure. Patch by Luca Barbieri <ldb@ldb.ods.org>.
12405
12406 * pthread_attr_init.c: Actually implement 2.0 compatibility version.
12407 * pthread_create.c: Likewise.
12408
12409 * Makefile (tests): Add tst-key1, tst-key2, tst-key3.
12410 * tst-key1.c: New file.
12411 * tst-key2.c: New file.
12412 * tst-key3.c: New file.
12413
12414 * Versions: Export pthread_detach for version GLIBC_2.0.
12415 Reported by Saurabh Desai <sdesai@austin.ibm.com>.
12416
124172002-11-08 Ulrich Drepper <drepper@redhat.com>
12418
12419 * pthread_key_create.c: Terminate search after an unused key was found.
12420 Patch by Luca Barbieri <ldb@ldb.ods.org>.
12421
12422 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Return zero.
12423 Patch by Luca Barbieri <ldb@ldb.ods.org>.
12424
124252002-10-10 Ulrich Drepper <drepper@redhat.com>
12426
12427 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Use slow generic
12428 dynamic lookup for errno in PIC.
12429
12430 * allocatestack.c (get_cached_stack): Rearrange code slightly to
12431 release the stack lock as soon as possible.
12432 Call _dl_allocate_tls_init for TCB from the cache to re-initialize
12433 the static TLS block.
12434 (allocate_stack): Call _dl_allocate_tls_init for user-provided stack.
12435
12436 * cancellation.c: Renamed from cancelation.c.
12437 * Makefile: Adjust accordingly.
12438 * pthreadP.h (CANCELLATION_P): Renamed from CANCELATION_P.
12439 * cleanup_defer.c: Use CANCELLATION_P.
12440 * pthread_testcancel.c: Likewise.
12441 * descr.h: Fix spelling in comments.
12442 * init.c: Likewise.
12443 * pthread_getattr_np.c: Likewise.
12444 * pthread_getschedparam.c: Likewise.
12445 * pthread_setschedparam.c: Likewise.
12446 * Versions: Likewise.
12447
12448 * pt-pselect.c: New file.
12449 * Makefile (libpthread-routines): Add pt-pselect.
12450 * Versions: Add pselect.
12451
12452 * tst-cancel4.c: New file.
12453 * Makefile (tests): Add tst-cancel4.
12454
124552002-10-09 Ulrich Drepper <drepper@redhat.com>
12456
12457 * pthread_mutex_lock.c: Always record lock ownership.
12458 * pthread_mutex_timedlock.c: Likewise.
12459 * pthread_mutex_trylock.c: Likewise.
12460
12461 * pt-readv.c: New file.
12462 * pt-writev.c: New file.
12463 * pt-creat.c: New file.
12464 * pt-msgrcv.c: New file.
12465 * pt-msgsnd.c: New file.
12466 * pt-poll.c: New file.
12467 * pt-select.c: New file.
12468 * pt-sigpause.c: New file.
12469 * pt-sigsuspend.c: New file.
12470 * pt-sigwait.c: New file.
12471 * pt-sigwaitinfo.c: New file.
12472 * pt-waitid.c: New file.
12473 * Makefile (libpthread-routines): Add pt-readv, pt-writev, pt-creat,
12474 pt-msgrcv, pt-msgsnd, pt-poll, pt-select, pt-sigpause, pt-sigsuspend,
12475 pt-sigwait, pt-sigwaitinfo, and pt-waitid.
12476 * Versions: Add all the new functions.
12477
12478 * tst-exit1.c: New file.
12479 * Makefile (tests): Add tst-exit1.
12480
12481 * sem_timedwait.c: Minor optimization for more optimal fastpath.
12482
124832002-10-08 Ulrich Drepper <drepper@redhat.com>
12484
12485 * pt-fcntl.c: Only enable asynchronous cancellation for F_SETLKW.
12486
12487 * pthread_join.c: Enable asynchronous cancellation around lll_wait_tid
12488 call. pthread_join is an official cancellation point.
12489 * pthread_timedjoin.c: Likewise.
12490
12491 * pthread_cond_wait.c: Revert order in which internal lock are dropped
12492 and the condvar's mutex are retrieved.
12493 * pthread_cond_timedwait.c: Likewise.
12494 Reported by dice@saros.East.Sun.COM.
12495
124962002-10-07 Ulrich Drepper <drepper@redhat.com>
12497
12498 * pthreadP.h: Cut out all type definitions and move them...
12499 * sysdeps/unix/sysv/linux/internaltypes.h: ...here. New file.
12500 * pthreadP.h: Include <internaltypes.h>.
12501
12502 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Little
12503 performance tweaks.
12504
12505 * sem_trywait.c: Shuffle #includes around to get right order.
12506 * sem_timedwait.c: Likewise.
12507 * sem_post.c: Likewise.
12508 * sem_wait.c: Likewise.
12509
12510 * nptl 0.3 released.
12511
12512 * Makefile (tests): Add tst-signal3.
12513 * tst-signal3.c: New file.
12514
125152002-10-05 Ulrich Drepper <drepper@redhat.com>
12516
12517 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Tell the compiler that
12518 the asms modify the sem object.
12519 (__lll_sem_timedwait): Now takes struct sem* as first parameter.
12520
12521 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h (sem_t): Don't expose
12522 the actual members.
12523 * pthreadP.h (struct sem): New type. Actual semaphore type.
12524 * semaphoreP.h: Include pthreadP.h.
12525 * sem_getvalue.c: Adjust to sem_t change.
12526 * sem_init.c: Likewise.
12527 * sem_open.c: Likewise.
12528 * sem_post.c: Likewise.
12529 * sem_timedwait.c: Likewise.
12530 * sem_trywait.c: Likewise.
12531 * sem_wait.c: Likewise.
12532
125332002-10-04 Ulrich Drepper <drepper@redhat.com>
12534
12535 * Makefile (tests): Add tst-basic2, tst-exec1, tst-exec3, tst-exec3.
12536 * tst-basic2.c: New file.
12537 * tst-exec1.c: New file.
12538 * tst-exec2.c: New file.
12539 * tst-exec3.c: New file.
12540
12541 * tst-fork1.c: Remove extra */.
12542
12543 * nptl 0.2 released. The API for IA-32 is complete.