]> git.ipfire.org Git - thirdparty/glibc.git/blame - nptl/ChangeLog
tile: use atomic op to unlock pthread_spinlock_t
[thirdparty/glibc.git] / nptl / ChangeLog
CommitLineData
8f861542
SP
12012-11-05 Siddhesh Poyarekar <siddhesh@redhat.com>
2
3 * pthread_cond_timedwait.c (__pthread_cond_timedwait): Time out
4 if absolute timeout is negative.
5 [__ASSUME_FUTEX_CLOCK_REALTIME &&
6 lll_futex_timed_wait_bitset]: Use lll_futex_timed_wait_bitset.
7 * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock):
8 Likewise.
9 * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock):
10 Likewise.
11 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
12 (__lll_robust_timedlock_wait): Likewise.
13 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
14 (lll_futex_timed_wait_bitset): New macro.
15 * sysdeps/unix/sysv/linux/s390/lowlevellock.h
16 (lll_futex_timed_wait_bitset): Likewise.
17
d3bd58cf
DM
182012-11-03 David S. Miller <davem@davemloft.net>
19
20 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (BUSY_WAIT_NOP):
21 Add missing spaces.
22 (__cpu_relax): Likewise.
23
f62c8abc
L
242012-11-02 H.J. Lu <hongjiu.lu@intel.com>
25
26 * sysdeps/x86_64/tls.h: Don't include <xmmintrin.h>.
27 (__128bits): New struct typedef.
28 (tcbhead_t): Replace __m128 with __128bits.
29
a9879fee
AJ
302012-10-30 Aurelien Jarno <aurelien@aurel32.net>
31 Joseph Myers <joseph@codesourcery.com>
32
33 * Makefile (tst-cancel7-ARGS): Use exec in --command argument.
34
19f1dd5f
DM
352012-10-28 David S. Miller <davem@davemloft.net>
36
37 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (BUSY_WAIT_NOP):
38 Define when we have v9 instructions available.
39 * sysdeps/unix/sysv/linux/sparc/sparc64/cpu_relax.S: New file.
40 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/cpu_relax.S: New
41 file.
42 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/Makefile: New
43 file.
44 * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: Add cpu_relax
45 to libpthread-routines.
46
b9473651
RM
472012-10-25 Roland McGrath <roland@hack.frob.com>
48
49 * tst-cond-except.c (TEST_FUNCTION): New macro.
50
6a345e42
JM
512012-10-25 Joseph Myers <joseph@codesourcery.com>
52
53 * Makefile ($(objpfx)tst-tls6.out): Use $(BASH) not $(SHELL) to
54 run tst-tls6.sh.
55 * tst-tls6.sh: Use /bin/bash not /bin/sh.
56
c0a1472e
RM
572012-10-25 Roland McGrath <roland@hack.frob.com>
58
59 * tst-basic2.c (do_test): Return RESULT, not always zero.
60
61 * tst-cond25.c: Include <stdint.h>
62 (waiter): Add casts to uintptr_t between casting integer<->pointer.
63 (timed_waiter): Likewise.
64 (do_test_wait): Likewise.
65 * tst-cond-except.c (thr): Likewise.
66 (do_test): Use prototype definition.
67
cc1290d0
JM
682012-10-24 Joseph Myers <joseph@codesourcery.com>
69 Jim Blandy <jimb@codesourcery.com>
70
71 * Makefile ($(objpfx)tst-tls6.out): Pass $(test-wrapper-env) to
72 tst-tls6.sh.
73 * tst-tls6.sh (test_wrapper_env): New variable. Use it to run
74 programs with LD_PRELOAD set.
75
6e6249d0
RM
762012-10-24 Roland McGrath <roland@hack.frob.com>
77
78 * Makefile ($(objpfx)tst-cond11, $(objpfx)tst-cond19): Targets removed.
79 ($(objpfx)tst-sem5, $(objpfx)tst-cancel18): Likewise.
80 ((objpfx)tst-cancelx18, $(objpfx)tst-clock2): Likewise.
81 ($(objpfx)tst-rwlock14): Likewise.
82
0bf57f87
JM
832012-10-24 Joseph Myers <joseph@codesourcery.com>
84
85 * Makefile (tests): Remove tst-oddstacklimit.
86 (test-srcs): New variable.
87 (tst-oddstacklimit-ENV): Remove.
88 [$(run-built-tests) = yes] (tests): Depend on
89 $(objpfx)tst-oddstacklimit.out.
90 [$(run-built-tests) = yes] ($(objpfx)tst-oddstacklimit.out): New
91 target.
92 * tst-oddstacklimit.c: Do not include "tst-basic1.c". Use
93 setrlimit before executing tst-basic1 test passed to --command.
94
03ac099f
JM
952012-10-23 Joseph Myers <joseph@codesourcery.com>
96
97 * Makefile [$(cross-compiling) = no]: Change condition to
98 [$(run-built-tests) = yes].
99
166bca24
JB
1002012-10-23 Jim Blandy <jimb@codesourcery.com>
101 Joseph Myers <joseph@codesourcery.com>
102
103 * Makefile (tst-cancel7-ARGS): Use $(host-built-program-cmd).
104 (tst-exec4-ARGS): Likewise.
105 (tst-stackguard1-ARGS): Likewise.
106
aba75984
JB
1072012-10-21 Jim Blandy <jimb@codesourcery.com>
108 Joseph Myers <joseph@codesourcery.com>
109
110 * Makefile ($(objpfx)tst-cancel-wrappers.out): Pass $(NM) to
111 tst-cancel-wrappers.sh.
112 * tst-cancel-wrappers.sh: Use nm program given as first argument,
113 not hardcoded "nm".
114
37785907
SP
1152012-10-17 Siddhesh Poyarekar <siddhesh@redhat.com>
116
370539fb 117 * tst-cond25.c (do_test_wait): Don't check for return value from
37785907
SP
118 pthread_cancel.
119
9485a404
SP
1202012-10-16 Siddhesh Poyarekar <siddhesh@redhat.com>
121
122 [BZ #14652]
123 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
124 (__condvar_tw_cleanup): Adjust the mutex data structure if it
125 was locked by FUTEX_WAIT_REQUEUE_PI.
126 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait
127 (__condvar_w_cleanup): Likewise.
128 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
129 (__condvar_cleanup2): Likewise.
130 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
131 (__condvar_cleanup1): Likewise.
132
0d522f64
CD
1332012-10-10 Carlos O'Donell <carlos@systemhalted.org>
134
54a41734
CD
135 * sysdeps/pthread/pthread.h [!(defined __GNUC__ &&
136 defined __EXCEPTIONS) && defined __USE_GNU]
137 (pthread_cleanup_push_defer_np): Fix formatting.
0d522f64 138
0e3b5d6a
SP
1392012-10-10 Siddhesh Poyarekar <siddhesh@redhat.com>
140
141 [BZ #14652]
142 * Makefile (tests): New test case tst-cond25.
143 (LDFLAGS-tst-cond25): Link tst-cond25 against librt.
144 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
145 (__condvar_tw_cleanup): Lock mutex only if we don't already
146 own it.
147 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
148 (__condvar_w_cleanup): Likewise.
149 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: Add TID_MASK.
150 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
151 (__condvar_cleanup2): Lock mutex only if we don't already
152 own it.
153 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
154 (__condvar_cleanup1): Likewise.
155 * tst-cond25.c: New test case.
156
b8493de0
RM
1572012-10-09 Roland McGrath <roland@hack.frob.com>
158
159 * sysdeps/pthread/configure: Regenerated.
160 * sysdeps/x86_64/configure: Regenerated.
161
f0762164
DM
1622012-10-05 David S. Miller <davem@davemloft.net>
163
164 [BZ #14568]
165 * sysdeps/sparc/tls.h (DB_THREAD_SELF_INCLUDE): Delete.
166 (DB_THREAD_SELF): Use constants for the register offsets. Correct
167 the case of a 64-bit debugger with a 32-bit inferior.
168
1d1b34df
L
1692012-10-05 H.J. Lu <hongjiu.lu@intel.com>
170
171 [BZ #14557]
172 * Makefile (tests-static): Add tst-cancel24-static,
173 tst-cond8-static tst-mutex8-static, tst-mutexpi8-static,
174 tst-sem11-static and tst-sem12-static.
175 (tests): Likewise.
176 (LDLIBS-tst-cancel24-static): New macro.
177 * tst-cancel24-static.cc: New file.
178 * tst-cond8-static.c: Likewise.
179 * tst-mutex8-static.c: Likewise.
180 * tst-mutexpi8-static.c: Likewise.
181 * tst-sem11-static.c: Likewise.
182 * tst-sem12-static.c: Likewise.
183
c30e8edf
SP
1842012-10-05 Siddhesh Poyarekar <siddhesh@redhat.com>
185
186 [BZ #14417]
187 * Makefile (tests): New test case tst-cond24.
188 (LDFLAGS-tst-cond24): Link tst-cond24 against librt.
189 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
190 (__pthread_cond_timedwait): Unlock mutex before going back to
191 wait in PI case.
192 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
193 (__pthread_cond_wait): Likewise. Revert handling of EAGAIN
194 return from futex_wait.
195 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
196 (__pthread_cond_timedwait): Unlock mutex before going back to
197 wait in PI case. Set requeue_pi flag only if wait returned 0.
198 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
199 (__pthread_cond_wait): Likewise. Revert handling of EAGAIN
200 return from futex_wait.
201 * tst-cond24.c: New test case.
202
9043e228
RM
2032012-10-04 Roland McGrath <roland@hack.frob.com>
204
205 * pthread_create.c (start_thread): Use __madvise, not madvise.
206
b2f80a47
L
2072012-10-02 H.J. Lu <hongjiu.lu@intel.com>
208
209 * sysdeps/i386/tls.h: Update copyright years.
210
adcdc775
SP
2112012-10-02 Siddhesh Poyarekar <siddhesh@redhat.com>
212
213 * pthread_create.c (start_thread): Fix clone flag name in
214 comment to CLONE_CHILD_CLEARTID.
215 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
216 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
217 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
218 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
219 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
220 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
221
55a051c9
SP
2222012-10-01 Siddhesh Poyarekar <siddhesh@redhat.com>
223
224 [BZ #14477]
225 * Makefile (tests): Add tst-cond-except.
226 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
227 (__pthread_cond_timedwait): Mark instructions where %ebx is
228 incremented in PI case.
229 (.gcc_except_table): Add entry to jump to __condvar_tw_cleanup2
230 for the marked PI case instructions.
231 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
232 (__pthread_cond_wait): Mark instructions where %ebx is
233 incremented in PI case.
234 (.gcc_except_table): Add entry to jump to __condvar_w_cleanup2
235 for the marked PI case instructions.
236 * tst-cond-except.c: New test case.
237
9a9028b1
DL
2382012-09-24 Dmitry V. Levin <ldv@altlinux.org>
239
57c69bef
DL
240 * tst-tls6.sh: Add "set -e".
241 * Makefile: Do not specify -e option when running testsuite
242 shell scripts.
243
9a9028b1
DL
244 * tst-tls6.sh: Add copyright header.
245
620f3d26
L
2462012-09-24 H.J. Lu <hongjiu.lu@intel.com>
247
248 * sysdeps/x86_64/tls.h (THREAD_SETMEM): Add "()" when casting
249 to uint64_t for 64-bit store.
250 (THREAD_SETMEM_NC): Likewise.
251
ae30640a
L
2522012-09-19 H.J. Lu <hongjiu.lu@intel.com>
253
254 * sysdeps/i386/tls.h (THREAD_SETMEM): Cast to uint64_t for
255 64-bit store.
256 (THREAD_SETMEM_NC): Likewise.
257
97bc38d7
JL
2582012-09-14 Jeff Law <law@redhat.com>
259
260 [BZ #14583]
261 * sysdeps/pthread/pthread.h: Fix prototype of __sigsetjmp.
262
9503345f
L
2632012-09-13 H.J. Lu <hongjiu.lu@intel.com>
264
265 [BZ #14576]
266 * sysdeps/pthread/bits/libc-lockP.h (__rtld_lock_init_recursive):
267 Removed.
268
e9ceaf25
L
2692012-09-07 H.J. Lu <hongjiu.lu@intel.com>
270
70d37fe0 271 * Makefile (LDFLAGS-tst-cancel24): Renamed to ...
e9ceaf25
L
272 (LDLIBS-tst-cancel24): This.
273
f5fce062
L
2742012-09-06 H.J. Lu <hongjiu.lu@intel.com>
275
276 [BZ #14545]
277 * Makefile (tests-static): Add tst-cancel21-static.
278 (tests): Likewise.
279 * tst-cancel21-static.c: New file.
280
26889eac
JM
2812012-09-01 Joseph Myers <joseph@codesourcery.com>
282
283 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c
284 [!__ASSUME_POSIX_CPU_TIMERS]: Remove conditional code.
285 [__NR_clock_getres]: Make code unconditional.
286 (pthread_getcpuclockid): Remove code left unreachable by removal
287 of conditionals.
288
033d54a2 2892012-08-31 Joseph Myers <joseph@codesourcery.com>
b2e1c562 290
033d54a2
JM
291 [BZ #14532]
292 * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Use
293 atomic_compare_and_exchange_bool_rel.
294 * tst-sem14.c: New file.
295 * Makefile (tests): Add tst-sem14.
b2e1c562 296
c75ccd4c
RM
2972012-08-15 Roland McGrath <roland@hack.frob.com>
298
299 * Makefile (CFLAGS-flockfile.c): Use $(libio-mtsafe) instead
300 of -D_IO_MTSAFE_IO.
301 (CFLAGS-ftrylockfile.c, CFLAGS-funlockfile.c): Likewise.
b2e1c562 302 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-fork.c): Likewise.
c75ccd4c 303
93a78ac4
JM
3042012-08-16 Joseph Myers <joseph@codesourcery.com>
305
306 * pthread_cond_timedwait.c (__pthread_cond_timedwait)
307 [!__ASSUME_POSIX_TIMERS]: Remove conditional code.
308 * pthread_condattr_setclock.c (pthread_condattr_setclock)
309 [!__ASSUME_POSIX_TIMERS]: Likewise.
310 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
311 (__pthread_cond_timedwait) [!__ASSUME_POSIX_TIMERS]: Likewise.
312 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c
313 [!__ASSUME_POSIX_TIMERS]: Likewise.
314 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
315 (__pthread_cond_timedwait) [!__ASSUME_POSIX_TIMERS]: Likewise.
316 * sysdeps/unix/sysv/linux/timer_create.c [__NR_timer_create]: Make
317 code unconditional.
318 [!__NR-timer_create]: Remove conditional code.
319 (timer_create) [!__ASSUME_POSIX_TIMERS]: Likewise.
320 * sysdeps/unix/sysv/linux/timer_delete.c [__NR_timer_delete]: Make
321 code unconditional.
322 [!__NR_timer_delete]: Remove conditional code.
323 (timer_delete) [!__ASSUME_POSIX_TIMERS]: Likewise.
324 * sysdeps/unix/sysv/linux/timer_getoverr.c
325 [__NR_timer_getoverrun]: Make code unconditional.
326 [!__NR_timer_getoverrun]: Remove conditional code.
327 (timer_getoverrun) [!__ASSUME_POSIX_TIMERS]: Likewise.
328 * sysdeps/unix/sysv/linux/timer_gettime.c [__NR_timer_gettime]:
329 Make code unconditional.
330 [!__NR_timer_gettime]: Remove conditional code.
331 (timer_gettime) [!__ASSUME_POSIX_TIMERS]: Likewise.
332 * sysdeps/unix/sysv/linux/timer_routines.c [__NR_timer_create]:
333 Make code unconditional.
334 [!__ASSUME_POSIX_TIMERS]: Remove conditional code.
335 * sysdeps/unix/sysv/linux/timer_settime.c [__NR_timer_settime]:
336 Make code unconditional.
337 [!__NR_timer_settime]: Remove conditional code.
338 (timer_settime) [!__ASSUME_POSIX_TIMERS]: Likewise.
339 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
340 (__pthread_cond_timedwait) [!__ASSUME_POSIX_TIMERS]: Remove
341 conditional code.
342
309becf1
MK
3432012-08-15 Tom de Vries <vries@codesourcery.com>
344 Maxim Kuvyrkov <maxim@codesourcery.com>
345
346 * sysdeps/pthread/bits/libc-lockP.h (__libc_lock_lock)
347 (__libc_lock_trylock): Allow pre-existing definitions.
348
ef400973
MK
3492012-08-15 Maxim Kuvyrkov <maxim@codesourcery.com>
350
351 * pthread_spin_lock.c: New file.
352 * pthread_spin_trylock.c: New file.
353
b36137f1
JM
3542012-08-08 Joseph Myers <joseph@codesourcery.com>
355
356 * allocatestack.c (setxid_signal_thread) [__ASSUME_TGKILL]: Make
357 code unconditional.
358 (setxid_signal_thread) [!__ASSUME_TGKILL]: Remove conditional code.
359 * pthread_cancel.c (pthread_cancel) [__ASSUME_TGKILL]: Make code
360 unconditional.
361 (pthread_cancel) [!__ASSUME_TGKILL]: Remove conditional code.
362 * sysdeps/pthread/createthread.c (do_clone) [__ASSUME_TGKILL]:
363 Make code unconditional.
364 (do_clone) [!__ASSUME_TGKILL]: Remove conditional code.
365 * sysdeps/unix/sysv/linux/pt-raise.c (raise) [__ASSUME_TGKILL ||
366 __NR_tgkill]: Make code unconditional.
367 (raise) [__ASSUME_TGKILL]: Likewise.
368 (raise) [!__ASSUME_TGKILL]: Remove conditional code.
369 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill)
370 [__ASSUME_TGKILL]: Make code unconditional.
371 (__pthread_kill) [!__ASSUME_TGKILL]: Remove conditional code.
372 * sysdeps/unix/sysv/linux/raise.c (raise) [__ASSUME_TGKILL ||
373 __NR_tgkill]: Make code unconditional.
374 (raise) [__ASSUME_TGKILL]: Likewise.
375 (raise) [!__ASSUME_TGKILL]: Remove conditional code.
376
93df14ee
JM
3772012-08-07 Joseph Myers <joseph@codesourcery.com>
378
379 * sysdeps/pthread/createthread.c (create_thread)
380 [!__ASSUME_NO_CLONE_DETACHED]: Remove conditional code.
381
85fe1997
JM
3822012-08-03 Joseph Myers <joseph@codesourcery.com>
383
384 * nptl-init.c (sigcancel_handler) [__ASSUME_CORRECT_SI_PID]: Make
385 code unconditional.
386 (sighandler_setxid) [__ASSUME_CORRECT_SI_PID]: Likewise.
387
fc56c5bb
SP
3882012-07-28 Siddhesh Poyarekar <siddhesh@redhat.com>
389
390 * tst-pthread-getattr.c (MAX_STACK_SIZE): New macro.
391 (pagesize): New static variable.
392 (allocate_and_test): Return MEM. Rename parameter to TARGET.
393 (check_stack_top): New local variables MEM and PAGEMASK. Cap
394 stack size to MAX_STACK_SIZE. Call allocate_and_test for
395 halfway up the stack top page. Verify that the top page was
396 written into.
397 (do_test): Get pagesize using sysconf.
398
842a39cd
AS
3992012-07-25 Andreas Schwab <schwab@linux-m68k.org>
400
401 * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Remove pseudo_end
402 label.
403 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Likewise.
404 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO):
405 Likewise.
406
77b32274
SP
4072012-07-25 Siddhesh Poyarekar <siddhesh@redhat.com>
408
409 * tst-pthread-getattr.c: Revert last change.
410
b2ae49da
SP
4112012-07-20 Siddhesh Poyarekar <siddhesh@redhat.com>
412
413 * tst-pthread-getattr.c (MAX_STACK_SIZE): New max cap for stack
414 size.
415 (_MIN): New macro.
416 (allocate_and_test): Return STACKADDR. Access STACKADDR instead
417 of MEM to test.
418 (check_stack_top): Read valued written into STACKADDR in
419 allocate_and_test. Cap stack size to MAX_STACK_SIZE.
420
a9843058
SP
4212012-07-19 Siddhesh Poyarekar <siddhesh@redhat.com>
422
423 * nptl-init.c (sighandler_setxid): Fix the comment that
424 describes it.
425
4b2c8da7
TS
4262012-06-23 Thomas Schwinge <thomas@codesourcery.com>
427
428 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S
429 (__lll_robust_timedlock_wait): Simplify CFI directives.
430
18b5e737
SP
4312012-06-20 Siddhesh Poyarekar <siddhesh@redhat.com>
432
433 [BZ #12416]
434 * Makefile (tests): Add test case.
435 * pthread_getattr_np.c (pthread_getattr_np): Deduct pages below
436 the __libc_stack_end page from stacksize. Truncate stacksize to
437 make it page aligned when it is computed from RLIMIT_STACK.
438 * tst-pthread-getattr.c: New test case. Verify that stackaddr is
439 accessible.
440
24a6dbed
CSLL
4412012-06-07 Carlos Sánchez de La Lama <csanchezdll@gmail.com>
442
443 [BZ #14205]
444 * sysdeps/sparc/sparc32/pthread_spin_lock.S: Do not use v9
445 branches.
446
4af3879c
SP
4472012-06-04 Siddhesh Poyarekar <siddhesh@redhat.com>
448 Jakub Jelinek <jakub@redhat.com>
449
450 [BZ #14188]
451 * sysdeps/pthread/pthread.h
452 [!(defined __GNUC__ && defined __EXCEPTIONS)]
453 (pthread_cleanup_push, pthread_cleanup_push_defer_np): Use
454 __libc_unlikely instead of __builtin_expect.
455
0e20515a
L
4562012-05-30 H.J. Lu <hongjiu.lu@intel.com>
457
458 [BZ #14117]
459 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Removed.
460 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
461 * sysdeps/unix/sysv/linux/i386/Implies: New file.
462 * sysdeps/unix/sysv/linux/x86_64/Implies: Likewise.
463 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Renamed
464 to ...
465 * sysdeps/unix/sysv/linux/x86/bits/pthreadtypes.h: This.
466 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Renamed
467 to ...
468 * sysdeps/unix/sysv/linux/x86/bits/semaphore.h: This.
469
865eac65
AS
4702012-05-30 Andreas Schwab <schwab@linux-m68k.org>
471
472 [BZ #14132]
473 * nptl-init.c (pthread_functions): Remove use of INTUSE and
474 _internal aliases.
475 (__pthread_initialize_minimal_internal): Likewise.
476 * sem_open.c: Likewise.
477 * sem_unlink.c: Likewise.
478 * pthreadP.h: Replace _internal aliases by hidden_proto
479 declarations.
480 * pthread_getspecific.c: Replace _internal alias by hidden_def.
481 * pthread_key_create.c: Likewise.
482 * pthread_mutex_destroy.c: Likewise.
483 * pthread_mutex_init.c: Likewise.
484 * pthread_mutex_lock.c: Likewise.
485 * pthread_mutex_unlock.c: Likewise.
486 * pthread_once.c: Likewise.
487 * pthread_rwlock_rdlock.c: Likewise.
488 * pthread_rwlock_unlock.c: Likewise.
489 * pthread_rwlock_wrlock.c: Likewise.
490 * pthread_setspecific.c: Likewise.
491 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S:
492 Likewise.
493 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
494 Likewise.
495 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
496 Likewise.
497 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
498 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
499 * sysdeps/unix/sysv/linux/s390/pthread_once.c: Likewise.
500 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Likewise.
501 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
502 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
503 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
504 * sysdeps/unix/sysv/linux/sparc/pthread_once.c: Likewise.
505 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
506 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S:
507 Likewise.
508 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S:
509 Likewise.
510 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S:
511 Likewise.
512
65a4de4e
CLT
5132012-05-27 Chung-Lin Tang <cltang@codesourcery.com>
514
d701a1ab
CLT
515 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO, LOAD_ARGS_1)
516 (LOAD_ARGS_2 ,LOAD_ARGS_3 ,LOAD_ARGS_4): Add CFI restores.
517
65a4de4e
CLT
518 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_lock_wait_private)
519 (__lll_lock_wait, __lll_timedlock_wait, __lll_timedwait_tid): Add CFI
520 directives.
521 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S
522 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): Likewise.
523 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
524 (pthread_barrier_wait): Likewise.
525 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
526 (__pthread_cond_broadcast): Likewise.
527 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
528 (__pthread_cond_signal): Likewise.
529 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
530 (__pthread_cond_timedwait): Likewise.
531 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S (__pthread_cond_wait):
532 Likewise.
533 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S
534 (__pthread_rwlock_rdlock): Likewise.
535 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S
536 (pthread_rwlock_timedrdlock): Likewise.
537 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S
538 (pthread_rwlock_timedwrlock): Likewise.
539 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S
540 (__pthread_rwlock_unlock): Likewise.
541 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S
542 (__pthread_rwlock_wrlock): Likewise.
543 * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post): Likewise.
544 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait): Likewise.
545 * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
546 Likewise.
547 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
548
9c6ea9fa
SP
5492012-05-26 Siddhesh Poyarekar <siddhesh@redhat.com>
550
551 [BZ #12416]
552 * nptl/pthread_getattr_np.c (pthread_getattr_np): Use
553 __libc_stack_end rounded to the end of containing page as the
554 real stack end.
555
17557282
RH
5562012-05-25 Rayson Ho <rho@redhat.com>
557
558 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Low-level SystemTap
559 probes for i386.
560 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
561 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
562 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
563 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
564 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
565 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
566 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
567 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
568
5acf7263
RM
5692012-05-25 Rayson Ho <rho@redhat.com>
570 Roland McGrath <roland@hack.frob.com>
571
572 * DESIGN-systemtap-probes.txt: New file.
573 * pthread_cond_broadcast.c: SystemTap probes.
574 * pthread_cond_init.c: Likewise.
575 * pthread_cond_signal.c: Likewise.
576 * pthread_cond_wait.c: Likewise.
577 * pthread_cond_destroy.c: Likewise.
578 * pthread_create.c: Likewise.
579 * pthread_join.c: Likewise.
580 * pthread_mutex_destroy.c: Likewise.
581 * pthread_mutex_init.c: Likewise.
582 * pthread_mutex_lock.c: Likewise.
583 * pthread_mutex_timedlock.c: Likewise.
584 * pthread_mutex_unlock.c: Likewise.
585 * pthread_rwlock_destroy.c: Likewise.
586 * pthread_rwlock_rdlock.c: Likewise.
587 * pthread_rwlock_unlock.c: Likewise.
588 * pthread_rwlock_wrlock.c: Likewise.
589 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
590 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
591 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
592 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
593 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
594 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
595 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
596 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
597
3a097cc7
RM
5982012-05-24 Roland McGrath <roland@hack.frob.com>
599
600 * pthread_create.c (start_thread): Define pthread_start LIBC_PROBE.
601
de7f5ce7
AJ
6022012-05-17 Andreas Jaeger <aj@suse.de>
603
604 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
605 (HAVE_DL_DISCOVER_OSVERSION): Don't declare _dl_discover_osversion
606 only for older kernels.
607
04807399
JM
6082012-05-15 Joseph Myers <joseph@codesourcery.com>
609
610 * pthreadP.h [!__NR_set_robust_list] (__NR_set_robust_list): Do
611 not define.
612
f16af742
L
6132012-05-15 H.J. Lu <hongjiu.lu@intel.com>
614
615 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_lock): Load
616 futex pointer into RDI_LP. Use RSP_LP to operate on stack.
617 (lll_robust_lock): Likewise.
618 (lll_cond_lock): Likewise.
619 (lll_robust_cond_lock): Likewise.
620 (lll_timedlock): Likewise.
621 (lll_robust_timedlock): Likewise.
622 (lll_unlock): Likewise.
623 (lll_robust_unlock): Likewise.
624
d9754f55
L
6252012-05-15 H.J. Lu <hongjiu.lu@intel.com>
626
627 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use
628 LP_OP(cmp) and RCX_LP on dep_mutex pointer.
629
dde05f00
L
6302012-05-15 H.J. Lu <hongjiu.lu@intel.com>
631
632 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Use LP_OP(op)
633 on NWAITERS.
634 (__gcc_personality_v0): Replace 8-byte data alignment with
635 LP_SIZE alignment and .quad with ASM_ADDR.
636
9dba3b5c
L
6372012-05-15 H.J. Lu <hongjiu.lu@intel.com>
638
639 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Use LP_OP(op)
640 on NWAITERS.
641 (__gcc_personality_v0): Replace 8-byte data alignment with
642 LP_SIZE alignment and .quad with ASM_ADDR.
643
5f658cf1
L
6442012-05-15 H.J. Lu <hongjiu.lu@intel.com>
645
646 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Use LP_OP(cmp) on
647 NWAITERS, which is unsigned long int.
648
6cae4b26
L
6492012-05-15 H.J. Lu <hongjiu.lu@intel.com>
650
651 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
652 (__gcc_personality_v0): Replace 8-byte data alignment with
653 LP_SIZE alignment and .quad with ASM_ADDR.
654
592f90e6
L
6552012-05-15 H.J. Lu <hongjiu.lu@intel.com>
656
657 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Use
658 LP_OP(cmp), RSI_LP and R8_LP on dep_mutex pointer. Load
659 __vdso_clock_gettime pointer into RAX_LP.
660 (__gcc_personality_v0): Replace 8-byte data alignment with
661 LP_SIZE alignment and .quad with ASM_ADDR.
662
0e8860ad
L
6632012-05-15 H.J. Lu <hongjiu.lu@intel.com>
664
665 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Use
666 LP_OP(cmp), RSI_LP and R8_LP on dep_mutex pointer. Load
667 __vdso_clock_gettime pointer into RAX_LP.
668 (__gcc_personality_v0): Replace 8-byte data alignment with
669 LP_SIZE alignment and .quad with ASM_ADDR.
670
30996e93
L
6712012-05-15 H.J. Lu <hongjiu.lu@intel.com>
672
673 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Use
674 LP_OP(cmp) and R8_LP on dep_mutex pointer.
675
289ac435
L
6762012-05-15 H.J. Lu <hongjiu.lu@intel.com>
677
678 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Use LP_OP(mov)
679 to update pointer in memory. Load pointer into RDI_LP.
680
10f74fbc
L
6812012-05-15 H.J. Lu <hongjiu.lu@intel.com>
682
683 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
684 (LLL_STUB_UNWIND_INFO_START): Align label to LP_SIZE instead
685 of 8.
686 (LLL_STUB_UNWIND_INFO_END): Likewise.
687 (lll_timedlock): Load timeout pointer into RDX_LP.
688 (lll_robust_timedlock): Likewise.
689
439bf404
SP
6902012-05-15 Siddhesh Poyarekar <siddhesh@redhat.com>
691 Jakub Jelinek <jakub@redhat.com>
692
693 [BZ #13613]
694 * Makefile (tests): Add test cases.
695 * descr.h (struct pthread): Add a comment describing multiple_threads.
696 * pthreadP.h (__pthread_multiple_threads): Expand comment to include
697 single-process case.
698 * pthread_cancel.c (pthread_cancel): Enable multiple_threads
699 before setting cancelstate of the thread.
700 * sysdeps/unix/sysv/linux/libc_multiple_threads.c
701 (__libc_multiple_threads): Add explanatory comment.
702 * tst-cancel-self-cancelstate.c: New test case.
703 * tst-cancel-self-canceltype.c: Likewise.
704 * tst-cancel-self-cleanup.c: Supporting file for test cases.
705 * tst-cancel-self-testcancel.c: New test case.
706 * tst-cancel-self.c: Likewise.
707 * vars.c: Expand comment to include single-process case.
708
2949684c
L
7092012-05-14 H.J. Lu <hongjiu.lu@intel.com>
710
711 * sysdeps/x86_64/tls.h: Don't include <bits/wordsize.h>.
712 (tcbhead_t): Remove __x86_64__ check. Align rtld_savespace_sse
713 to 32 bytes.
714
245a11d7
L
7152012-05-14 H.J. Lu <hongjiu.lu@intel.com>
716
717 * sysdeps/pthread/pthread.h (__PTHREAD_RWLOCK_INT_FLAGS_SHARED):
718 New.
719 (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Check
720 __PTHREAD_RWLOCK_INT_FLAGS_SHARED instead of __WORDSIZE.
721
0b254d8f
L
7222012-05-14 H.J. Lu <hongjiu.lu@intel.com>
723
724 * shlib-versions: Move x86_64-.*-linux.* entry to ...
725 * sysdeps/x86_64/64/shlib-versions: Here. New file.
726 * sysdeps/x86_64/x32/shlib-versions: New file.
727
b8caea2c
L
7282012-05-14 H.J. Lu <hongjiu.lu@intel.com>
729
730 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Define x32
731 __SIZEOF_PTHREAD_XXX_T.
732 (__pthread_internal_list): Check __x86_64__ instead of __WORDSIZE.
733 (pthread_mutex_t): Likewise.
734 (pthread_rwlock_t): Likewise.
735 (__PTHREAD_RWLOCK_INT_FLAGS_SHARED): New. Defined if __x86_64__
736 is defined.
737
60d45b36
L
7382012-05-11 H.J. Lu <hongjiu.lu@intel.com>
739
740 * sysdeps/x86_64/x32/tls.h: New file.
741
a04e06bc
L
7422012-05-11 H.J. Lu <hongjiu.lu@intel.com>
743
744 * sysdeps/x86_64/tls.h (THREAD_SETMEM): Use uint64_t on 64-bit
745 integer.
746 (THREAD_SETMEM_NC): Likewise.
747
512ec530
L
7482012-05-11 H.J. Lu <hongjiu.lu@intel.com>
749
750 * sysdeps/x86_64/tls.h (THREAD_SELF): Replace movq/%q0 with
751 mov/%0.
752
c0d2c853
L
7532012-05-11 H.J. Lu <hongjiu.lu@intel.com>
754
755 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
756 (__cleanup_fct_attribute): Check __x86_64__ instead of
eae2d36a 757 __WORDSIZE.
c0d2c853 758
1f59b0b1
L
7592012-05-11 H.J. Lu <hongjiu.lu@intel.com>
760
761 * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER): Check
762 __PTHREAD_MUTEX_HAVE_PREV instead of __WORDSIZE.
763 (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Likewise.
764 (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
765 (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
766
c252ec15
L
7672012-05-11 H.J. Lu <hongjiu.lu@intel.com>
768
769 * pthread_create.c (start_thread): Check __PTHREAD_MUTEX_HAVE_PREV
770 instead of __WORDSIZE.
771
be971a2b
TS
7722012-05-10 Thomas Schwinge <thomas@schwinge.name>
773
774 [BZ #3748]
775 * sysdeps/pthread/bits/libc-lockP.h (__libc_once_get): New macro.
776
e1b4354e
CLT
7772012-05-09 Chung-Lin Tang <cltang@codesourcery.com>
778
779 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
780 (__pthread_cond_timedwait): Use CFI directives.
781 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
782 (__pthread_cond_wait): Likewise.
783 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait): Likewise.
784 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
785
76e835cf
DM
7862012-05-03 David S. Miller <davem@davemloft.net>
787
788 * sysdeps/sparc/sparc64/pthread_spin_unlock.S: Fix thinko, we
789 always have to return 0, especially for the pthread_spin_init
790 alias.
791 * sysdeps/sparc/sparc32/pthread_spin_lock.S: Add missing trailing
792 newline.
793 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.S: Likewise.
794 * sysdeps/sparc/sparc64/pthread_spin_lock.S: Likewise.
795
e2dbf201
DM
7962012-05-02 David S. Miller <davem@davemloft.net>
797
798 * sysdeps/sparc/sparc64/pthread_spin_lock.S: New.
799 * sysdeps/sparc/sparc64/pthread_spin_lock.c: Delete.
800 * sysdeps/sparc/sparc64/pthread_spin_unlock.S: New.
801 * sysdeps/sparc/sparc64/pthread_spin_unlock.c: Delete.
802 * sysdeps/sparc/sparc64/pthread_spin_trylock.S: New.
803 * sysdeps/sparc/sparc64/pthread_spin_trylock.c: Delete.
804 * sysdeps/sparc/sparc64/pthread_spin_init.c: New.
805 * sysdeps/sparc/sparc32/pthread_spin_lock.S: New.
806 * sysdeps/sparc/sparc32/pthread_spin_lock.c: Delete.
807 * sysdeps/sparc/sparc32/pthread_spin_trylock.S: New.
808 * sysdeps/sparc/sparc32/pthread_spin_trylock.c: Delete.
809 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.S: New.
810 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: Delete.
811 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.S: New.
812 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: Delete.
813 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.S: New.
814 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: Delete.
815 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_init.c: New.
816
d4c2917f
AM
8172012-05-02 Allan McRae <allan@archlinux.org>
818
819 * Makefile: (LDFLAGS-tst-tls5): Use $(no-as-needed).
820 (LDFLAGS-tst-cancel24): Likewise.
821
b93d565a
PP
8222012-05-02 Paul Pluzhnikov <ppluzhnikov@google.com>
823
824 * sysdeps/i386/pthread_spin_lock.S: New.
825 * sysdeps/i386/pthread_spin_lock.c: Delete.
826 * sysdeps/x86_64/pthread_spin_lock.S: New.
827 * sysdeps/x86_64/pthread_spin_lock.c: Delete.
828
6d5c57fa
AS
8292012-04-28 Andreas Schwab <schwab@linux-m68k.org>
830
831 * Makefile ($(objpfx)tst-stack3-mem, $(objpfx)tst-tls6.out): Don't
832 run when cross-compiling.
833
6e236b92
SP
8342012-04-26 Siddhesh Poyarekar <siddhesh@redhat.com>
835
836 * sysdeps/pthread/unwind-forcedunwind.c: Include gnu/lib-names.h
837 instead of libgcc_s.h.
838
0cec7c54
PP
8392012-04-20 Paul Pluzhnikov <ppluzhnikov@google.com>
840
841 * sysdeps/x86_64/tls.h (TLS_GET_FS, TLS_SET_FS): Delete.
842
7ac88e38
DM
8432012-03-27 David S. Miller <davem@davemloft.net>
844
845 * tst-cond16.c (do_test): Use a thread stack size which is either
846 PTHREAD_STACK_MIN or the page size, whichever is larger.
847 * tst-cond18.c (do_test): Likewise.
848
24d8f4b7
L
8492012-03-19 H.J. Lu <hongjiu.lu@intel.com>
850
851 * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Use
852 register char * __asm__("rsp") to get stack frame.
853
4adaaafc
L
8542012-03-19 H.J. Lu <hongjiu.lu@intel.com>
855
856 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (SYS_futex): Use
857 __NR_futex directly.
858
ca7b8af5
L
8592012-03-19 H.J. Lu <hongjiu.lu@intel.com>
860
861 * unwind.c (unwind_stop): Cast _Unwind_GetCFA return to
862 _Unwind_Ptr first.
863
7e7fa5f8
DM
8642012-03-16 David S. Miller <davem@davemloft.net>
865
866 [BZ #13844]
867 * sysdeps/unix/sysv/linux/libc-lowlevellock.c: Include using <..>
868 instead of "...".
869 * sysdeps/unix/sysv/linux/sparc/sparc32/libc-lowlevellock.c:
870 Delete, not needed.
871
c4a7b16e
DM
8722012-03-15 David S. Miller <davem@davemloft.net>
873
874 [BZ #13844]
875 * sysdeps/unix/sysv/linux/sparc/sparc32/libc-lowlevellock.c: New file.
876
c524201a
PE
8772012-03-09 Paul Eggert <eggert@cs.ucla.edu>
878
879 [BZ #13673]
880 * pt-crti.S: Replace FSF snail mail address with URL.
881
90ad551f
JM
8822012-03-09 Joseph Myers <joseph@codesourcery.com>
883
884 * sysdeps/pthread/pthread.h (__need_clockid_t, __need_timespec):
885 Do not define before including <time.h>.
886
c64bf5fe
DM
8872012-03-08 David S. Miller <davem@davemloft.net>
888
889 * sysdeps/unix/sysv/linux/sparc/sem_post.c: Update copyright year.
890
48aff776
TS
8912012-03-08 Thomas Schwinge <thomas@codesourcery.com>
892
2edd9a79
TS
893 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
894 Check for timestamp before the Epoch.
895
c564a812
TS
896 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait): Fix
897 updating nwaiters.
898
48aff776
TS
899 * tst-sem13.c (do_test): Add another test case.
900 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
901 Fix updating nwaiters.
902
e7dbb1be
JM
9032012-03-07 Joseph Myers <joseph@codesourcery.com>
904
905 [BZ #10545]
906 * sysdeps/pthread/configure.in (libc_cv_forced_unwind): Change
907 link test to a compile test.
908 (libc_cv_c_cleanup): Likewise. Declare puts rather than including
909 <stdio.h>.
910 * sysdeps/pthread/configure: Regenerated.
911
a4300c7a
UD
9122012-03-07 Ulrich Drepper <drepper@gmail.com>
913
914 * Makefile (distribute): Remove variable.
915
840df61e
TS
9162012-01-23 Thomas Schwinge <thomas@codesourcery.com>
917
918 * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Get rid of
919 superfluous assignment.
920 * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c (sem_timedwait):
921 Likewise.
922 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c
923 (sem_timedwait): Likewise.
924
9463518d
UD
9252012-03-06 Ulrich Drepper <drepper@gmail.com>
926
abdf2e19
UD
927 * sysdeps/pthread/bits/libc-lock.h: Move information not needed in
928 installed headers to...
9463518d
UD
929 * sysdeps/pthread/bits/libc-lockP.h: ...here. New file.
930
e9258400
DM
9312012-03-06 David S. Miller <davem@davemloft.net>
932
933 * sysdeps/unix/sysv/linux/sparc/sem_post.c (__new_sem_post): Use
934 atomic_increment and remove unused local variable.
935 (__old_sem_post): Likewise.
936
22f9d9df
DM
9372012-02-27 David S. Miller <davem@davemloft.net>
938
9463518d
UD
939 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Don't refer to
940 non-existing __pthread_attr.
22f9d9df
DM
941 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
942 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
943 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
944 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
945 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
946
4efeffc1
UD
9472012-02-26 Ulrich Drepper <drepper@gmail.com>
948
d94a4670
UD
949 * sysdeps/pthread/pthread.h: Define __need_clockid_t for __USE_XOPEN2K.
950
4efeffc1
UD
951 * sysdeps/pthread/pthread.h: Define __need_timespec before including
952 <time.h>.
953 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Name pthread_attr_t
954 union.
955 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
956 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
957 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
958 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
959 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
960
0e7dfaef
JM
9612012-02-21 Joseph Myers <joseph@codesourcery.com>
962
963 [BZ #13695]
964 * Makefile (generated): Remove crti.S, crtn.S, defs.h and
965 pt-initfini.s.
966 [crti.S not in sysdirs] (omit-deps): Do not append.
967 [crti.S not in sysdirs] (CFLAGS-pt-initfini.s): Remove variable.
968 [crti.S not in sysdirs] (pt-initfini.c): Remove vpath directive.
969 [crti.S not in sysdirs] ($(objpfx)crti.S): Remove rule.
970 [crti.S not in sysdirs] ($(objpfx)crtn.S): Likewise.
971 [crti.S not in sysdirs] ($(objpfx)defs.h): Likewise.
972 [crti.S not in sysdirs] ($(objpfx)crti.o): Likewise.
973 [crti.S not in sysdirs] ($(objpfx)crtn.o): Likewise.
974 [crti.S in sysdirs] (extra-objs): Append unconditionally.
975 [crti.S in sysdirs] ($(objpfx)crti.o): Define rule
976 unconditionally.
977 * sysdeps/pthread/pt-initfini.c: Remove file.
978
e3b69ca7
RH
9792012-02-16 Richard Henderson <rth@twiddle.net>
980
959e12e3
UD
981 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: Remove file.
982 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: Remove file.
e3b69ca7 983
df83af67
KK
9842012-02-15 Kaz Kojima <kkojima@rr.iij4u.or.jp>
985
986 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: Remove file.
987
f63f3380
DM
9882012-02-16 David S. Miller <davem@davemloft.net>
989
990 * sysdeps/sparc/Makefile: Add -fPIC when building pt-crti.S and crtn.S
991
d463ab10
MP
9922012-02-15 Marek Polacek <polacek@redhat.com>
993
994 * sysdeps/unix/sysv/linux/x86_64/Makefile: Remove file.
995
59ba27a6
PE
9962012-02-09 Paul Eggert <eggert@cs.ucla.edu>
997
998 Replace FSF snail mail address with URLs, as per GNU coding standards.
999
28328403
AS
10002012-02-08 Andreas Schwab <schwab@linux-m68k.org>
1001
1002 * Makefile (extra-objs) [crti.S in sysdirs]: Add pt-crti.o.
1003
3add8e13
JM
10042012-02-08 Joseph Myers <joseph@codesourcery.com>
1005
1006 Support crti.S and crtn.S provided directly by architectures.
1007 * Makefile [crti.S in sysdirs] (omit-deps): Do not append.
1008 [crti.S in sysdirs] (CFLAGS-pt-initfini.s): Do not define variable.
1009 [crti.S in sysdirs] ($(objpfx)pt-initfini.s): Disable rule.
1010 [crti.S in sysdirs] ($(objpfx)crti.S): Likewise.
1011 [crti.S in sysdirs] ($(objpfx)crtn.S): Likewise.
1012 [crti.S in sysdirs] ($(objpfx)defs.h): Likewise.
1013 [crti.S in sysdirs] ($(objpfx)crti.o): Likewise.
1014 [crti.S in sysdirs] ($(objpfx)crtn.o): Likewise.
1015 [crti.S in sysdirs] (pt-initfini.c): Remove vpath directive.
1016 [crti.S in sysdirs] ($(objpfx)crti.o): New rule.
1017 * pt-crti.S: New file.
1018 * sysdeps/unix/sysv/linux/i386/Makefile: Remove file.
1019
9a1d9254
JM
10202012-02-03 Joseph Myers <joseph@codesourcery.com>
1021
1022 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
1023 macros for PIC register setup.
1024 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
1025 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
1026 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
1027 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
1028 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
1029
5452bffe
UD
10302012-01-11 Marek Polacek <polacek@redhat.com>
1031
1032 * forward.c (FORWARD_NORETURN): Define macro.
1033 (__pthread_unwind): Use FORWARD_NORETURN macro to avoid warning.
1034 (__pthread_exit): Likewise.
1035
356fa562
UD
10362012-01-10 Ulrich Drepper <drepper@gmail.com>
1037
8898f020
UD
1038 * sysdeps/pthread/pthread.h: Add const attribute to pthread_equal.
1039
356fa562
UD
1040 * pthreadP.h: Add noreturn to __pthread_exit.
1041 * sysdeps/pthread/pthread-functions.h: Likewise for ptr___pthread_exit.
1042
f5420cf0
AZ
10432011-12-30 Adhemerval Zanella <azanella@linux.vnet.ibm.com>
1044
1045 * sysdeps/unix/sysv/linux/aio_misc.h (__aio_create_helper_thread):
1046 Call pthread_attr_setstacksize() with result of
1047 __pthread_get_minstack() to account for application TLS usage.
1048
c473bd1c
MP
10492012-01-08 Marek Polacek <polacek@redhat.com>
1050
1051 * sysdeps/unix/sysv/linux/mq_notify.c: Include <nptl/pthreadP.h>.
1052
120ced3f
UD
10532012-01-07 Ulrich Drepper <drepper@gmail.com>
1054
a784e502
UD
1055 [BZ #13553]
1056 * pthreadP.h: Use const instead of __const.
1057 * semaphore.h: Likewise.
1058 * sysdeps/pthread/bits/libc-lock.h: Likewise.
1059 * sysdeps/pthread/bits/sigthread.h: Likewise.
1060 * sysdeps/pthread/pthread.h: Likewise.
1061
0269750c
UD
1062 * Makefile: Remove elf=yes test, only ELF is supported.
1063
ecb6fb48
UD
1064 * shlib-versions: Remove entries for ports architectures.
1065
120ced3f
UD
1066 In case anyone cares, the IA-64 architecture could move to ports.
1067 * sysdeps/ia64/*: Removed.
1068 * sysdeps/unix/sysv/linux/ia64/*: Removed.
1069
2c1094bd
UD
10702011-12-22 Ulrich Drepper <drepper@gmail.com>
1071
ee9e0640
UD
1072 * sysdeps/pthread/gai_misc.h (__gai_create_helper_thread): Use
1073 __pthread_get_minstack.
1074 * sysdeps/unix/sysv/linux/mq_notify.c (init_mq_netlink): Likewise.
1075
2c1094bd
UD
1076 [BZ #13088]
1077 * sysdeps/unix/sysv/linux/timer_routines.c: Get minimum stack size
1078 through __pthread_get_minstack.
1079 * nptl-init.c (__pthread_initialize_minimal_internal): Get page size
1080 directly from _rtld_global_ro.
1081 (__pthread_get_minstack): New function.
1082 * pthreadP.h: Declare __pthread_get_minstack.
1083 * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_get_minstack.
1084
60e8585f
UD
10852011-12-21 Ulrich Drepper <drepper@gmail.com>
1086
1087 [BZ #13515]
1088 * sysdeps/unix/sysv/linux/pthread_getname.c (pthread_getname_np):
1089 Correct reading name from file.
1090
caafb2b0
CD
10912011-12-14 Carlos O'Donell <carlos@systemhalted.org>
1092
1093 * allocatestack.c (allocate_stack): Return errno on failure.
1094
e988dba9
JL
10952011-12-14 Jeff Law <law@redhat.com>
1096
1097 [BZ #5245]
1098 * pthread_create.c (__pthread_create_2_1): Translate ENOMEM to EAGAIN.
1099
ade60c89
UD
11002011-11-28 Andreas Schwab <schwab@redhat.com>
1101
1102 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Handle
1103 EAGAIN from FUTEX_WAIT_REQUEUE_PI.
1104 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1105
312be3f9
UD
11062011-11-15 Ulrich Drepper <drepper@gmail.com>
1107
1108 * pthread_getattr_np.c (pthread_getattr_np): Set FD_CLOEXEC for
1109 /proc/self/maps.
1110
c2b18f7a
UD
11112011-10-29 Ulrich Drepper <drepper@gmail.com>
1112
1113 [BZ #13358]
1114 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1115 (__pthread_cond_timedwait): Initialize %r15 correctly also for code
1116 path for kernels with FUTEX_CLOCK_REALTIME.
1117 Debugged by H.J. Lu <hjl.tools@gmail.com>.
1118
3871f58f
AS
11192011-10-27 Andreas Schwab <schwab@redhat.com>
1120
1121 [BZ #13344]
1122 * sysdeps/pthread/pthread.h: Use __THREADNL instead of __THREAD
1123 for memory synchronization functions.
1124 * semaphore.h: Likewise.
1125
485683c3
UD
11262011-10-24 Ulrich Drepper <drepper@gmail.com>
1127
1128 * tst-cancel7.c: Avoid warning.
1129 * tst-mutex6.c: Likewise.
1130 * tst-mutex9.c: Likewise.
1131 * tst-mutexpi6.c: Likewise.
1132
10d005f7
UD
11332011-10-23 Ulrich Drepper <drepper@gmail.com>
1134
1135 * sysdeps/i386/tls.h: Remove #include <list.h>.
1136
fd5bdc09
UD
11372011-10-15 Ulrich Drepper <drepper@gmail.com>
1138
10d005f7 1139 * pthread_create.c (start_thread): Call __ctype_init.
fd5bdc09 1140
7a775e6b
AS
11412011-09-15 Andreas Schwab <schwab@redhat.com>
1142
1143 * sysdeps/pthread/list.h: Define only list_t if __need_list_t is
1144 defined.
1145 (list_add): Add atomic_write_barrier.
1146 * descr.h: Define __need_list_t before including <list.h>.
1147 * nptl-init.c: Include <list.h>
1148 * allocatestack.c: Likewise.
1149
83cd1420
UD
11502011-09-11 Ulrich Drepper <drepper@gmail.com>
1151
1152 * sysdeps/i386/tls.h: Remove HAVE_TLS_SUPPORT test.
1153 * sysdeps/ia64/tls.h: Likewise.
1154 * sysdeps/powerpc/tls.h: Likewise.
1155 * sysdeps/s390/tls.h: Likewise.
1156 * sysdeps/sh/tls.h: Likewise.
1157 * sysdeps/sparc/tls.h: Likewise.
1158 * sysdeps/x86_64/tls.h: Likewise.
1159
3ce1f295
UD
11602011-09-10 Ulrich Drepper <drepper@gmail.com>
1161
02d46fc4
UD
1162 * sysdeps/pthread/malloc-machine.h: Define MUTEX_INITIALIZER.
1163
d063d164
UD
1164 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Don't handle
1165 !USE___THREAD.
1166 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
1167 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
1168 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
1169 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
1170 * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
1171 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
1172 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
1173 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
1174 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
1175 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1176 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
1177 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
1178
3ce1f295
UD
1179 * tst-tls1.c: Support for __thread is now mandatory.
1180 * tst-tls2.c: Likewise.
1181 * tst-tls3.c: Likewise.
1182 * tst-tls3mod.c: Likewise.
1183 * tst-tls4.c: Likewise.
1184 * tst-tls4moda.c: Likewise.
1185 * tst-tls4modb.c: Likewise.
1186 * tst-tls5.h: Likewise.
1187
1e4bd093
L
11882011-09-08 Ulrich Drepper <drepper@gmail.com>
1189
1190 [BZ #12403]
1191 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
1192 (pthread_rwlock_timedwrlock): Use correct macro in test.
1193 Patch by H.J. Lu <hongjiu.lu@intel.com>.
1194
a0e1f41b
UD
11952011-09-06 Ulrich Drepper <drepper@gmail.com>
1196
1197 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait): Don't
1198 use gettimeofday vsyscall, just call gettimeofday.
9e5c9dcd
UD
1199 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
1200 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
1201 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
1202 Likewise.
1203 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1204 Likewise.
1205 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1206 Simplify __vdso_clock_gettime use.
a0e1f41b 1207
39c4451c
DM
12082011-09-05 David S. Miller <davem@davemloft.net>
1209
1210 * sysdeps/unix/sysv/linux/sem_timedwait.c (do_futex_timed_wait):
1211 New function.
1212 (sem_timedwait): Call it to force an exception region around
1213 the async cancel enable and the futex operation.
1214 * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c: Likewise.
1215 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: Likewise.
1216 * sysdeps/unix/sysv/linux/sem_wait.c (do_futex_wait): New function.
1217 (__new_sem_wait): Call it to force an exception region around
1218 the async cancel enable and the futex operation.
1219 * sysdeps/unix/sysv/linux/sparc/sem_wait.c: Likewise.
1220 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: Likewise.
1221
523df511
AS
12222011-08-31 Andreas Schwab <schwab@redhat.com>
1223
1224 * allocatestack.c (setxid_mark_thread): Ensure that the exiting
1225 thread is woken up.
1226
e315850c
DM
12272011-08-20 David S. Miller <davem@davemloft.net>
1228
1229 * Makefile (tst-cleanup0.out): Fix typo in output redirection.
1230
5744c68d
RM
12312011-08-14 Roland McGrath <roland@hack.frob.com>
1232
1233 * sysdeps/i386/pthreaddef.h (TCB_ALIGNMENT): Set to 64, optimal on Atom.
1234 * sysdeps/x86_64/pthreaddef.h (TCB_ALIGNMENT): Likewise.
1235
a724d1b9
AS
12362011-08-08 Andreas Schwab <schwab@redhat.com>
1237
1238 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Maintain aligned
1239 stack.
1240 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1241 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1242
7a03a9c8
UD
12432011-07-22 Ulrich Drepper <drepper@gmail.com>
1244
1245 * sysdeps/pthread/unwind-forcedunwind.c (_Unwind_Resume): Add read
1246 barrier.
1247 (__gcc_personality_v0): Likewise.
1248 (_Unwind_ForcedUnwind): Likewise.
1249 (_Unwind_GetCFA): Likewise.
1250
4b3d3e28
RM
12512011-07-14 Roland McGrath <roland@hack.frob.com>
1252
1253 * allocatestack.c (__reclaim_stacks): Use uintptr_t cast rather than
1254 UINTMAX_C.
1255
6f8326ca
UD
12562011-06-30 Ulrich Drepper <drepper@gmail.com>
1257
1258 * nptl-init.c (__nptl_set_robust): New function.
1259 (pthread_functions): Add reference.
1260 * npthreadP.h: Declare __nptl_set_robust.
1261 * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
1262 ptr_set_robust member.
1263 * sysdeps/unix/sysv/linux/fork.c: Call set_robust_list syscall in
1264 child if threads are used.
1265
c71ca1f8
AJ
12662011-06-14 Andreas Jaeger <aj@suse.de>
1267
1268 * pthread_rwlock_init.c: Include <string.h> for memset declaration.
1269
5bdcc103
UD
12702011-05-11 Ulrich Drepper <drepper@gmail.com>
1271
1272 [BZ #386]
1273 * allocatestack.c (allocate_stack): Convert ENOMEM error to EAGAIN.
1274
e6c61494
UD
12752011-04-10 Ulrich Drepper <drepper@gmail.com>
1276
1277 [BZ #12650]
1278 * allocatestack.c (get_cached_stack): Deallocate DTV entries before
1279 clearing memory.
1280 Patch partly by Robert Rex <robert.rex@exasol.com>.
1281
c5be0f71
RM
12822011-01-19 Roland McGrath <roland@redhat.com>
1283
1284 * pthread_cond_wait.c (__pthread_cond_wait): Fix comment typo.
1285 * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
1286 * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Likewise.
1287 * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
1288 * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock): Likewise.
1289 * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock): Likewise.
1290
1f20b93a
AS
12912011-01-16 Andreas Schwab <schwab@linux-m68k.org>
1292
1293 * Makefile (test-extras): Add tst-cleanup4aux.
1294
70181fdd
UD
12952011-01-14 Ulrich Drepper <drepper@gmail.com>
1296
1297 [BZ #10563]
1298 * sysdeps/pthread/setxid.h (__SETXID_1): Add cast to assignment.
1299 (__SETXID_2): Likewise.
1300 (__SETXID_3): Likewise.
1301
451f001b
UD
13022011-01-13 Ulrich Drepper <drepper@gmail.com>
1303
1304 [BZ #10484]
1305 * Versions [libc] (GLIBC_PRIVATE): Export __libc_alloca_cutoff.
a85b5cb4 1306 * alloca_cutoff.c: Add libc_hidden_def.
451f001b 1307
f9068148
L
13082010-10-13 H.J. Lu <hongjiu.lu@intel.com>
1309
1310 [BZ #12113]
1311 * sysdeps/x86_64/pthreaddef.h (TCB_ALIGNMENT): Changed to 32.
1312 * sysdeps/x86_64/tls.h (TLS_TCB_ALIGN): Defined with alignment
1313 of "struct pthread".
1314
c3758fee
AS
13152010-09-21 Andreas Schwab <schwab@redhat.com>
1316
1317 * sysdeps/pthread/pthread.h (pthread_cleanup_push)
1318 [!__EXCEPTIONS]: Mangle local variable not_first_call.
1319 (pthread_cleanup_push_defer_np): Likewise.
1320
4ac42e19
UD
13212010-09-03 Ulrich Drepper <drepper@redhat.com>
1322
1323 * sysdeps/pthread/allocalim.h (__libc_use_alloca): Expect blocks are
1324 small.
1325
022f6b89
DG
13262010-08-10 Dinakar Guniguntala <dino@in.ibm.com>
1327 Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
1328
1329 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: If
1330 FUTEX_WAKE_OP fails make sure to call FUTEX_WAKE instead.
1331
f8392f40
L
13322010-08-12 H.J. Lu <hongjiu.lu@intel.com>
1333
93f17abf 1334 * sysdeps/unix/sysv/linux/i386/Makefile: New file.
f8392f40 1335
bebff237
AM
13362010-05-01 Alan Modra <amodra@gmail.com>
1337
1338 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
1339 (PSEUDO): Use correct cr save. Don't use wrong parm save area
1340 to save temps. Correct cfi for possible later frame manipulation.
1341 (DOCARGS_1, UNDOCARGS_1): Use the correct parm save area.
1342 (DOCARGS_2, UNDOCARGS_2, DOCARGS_3, UNDOCARGS_3): Likewise.
1343 (DOCARGS_4, UNDOCARGS_4, DOCARGS_5, UNDOCARGS_5): Likewise.
1344 (DOCARGS_6, UNDOCARGS_6): Likewise.
1345 (CENABLE, CDISABLE): Add nops for non-shared calls.
1346
e8ee8bdf
AS
13472010-07-06 Andreas Schwab <schwab@redhat.com>
1348
1349 * sysdeps/unix/sysv/linux/pthread_getname.c (pthread_getname_np):
1350 Fix type mismatch.
1351
03e87550
UD
13522010-07-03 Ulrich Drepper <drepper@redhat.com>
1353
1354 * tst-abstime.c (do_test): Some more cleanups
1355
145569dc
UD
13562010-07-02 Ulrich Drepper <drepper@redhat.com>
1357
1358 * tst-abstime.c: Correct testing and add test for sem_timedwait.
1359
2983d85e
AS
13602010-07-01 Andreas Schwab <schwab@redhat.com>
1361 Ulrich Drepper <drepper@redhat.com>
1362
1363 * Makefile (tests): Add tst-abstime.
1364 * tst-abstime.c: New file.
1365 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
1366 (__lll_timedlock_wait): Check for timestamp before the Epoch.
1367 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
1368 (__lll_timedlock_wait): Likewise.
1369 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
1370 (__lll_robust_timedlock_wait): Likewise.
1371 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1372 (__pthread_cond_timedwait): Likewise.
1373 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
1374 (pthread_rwlock_timedrdlock): Likewise.
1375 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
1376 (pthread_rwlock_timedwrlock): Likewise.
1377 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
1378 Likewise.
1379
72b6e8c8
UD
13802010-07-01 Ulrich Drepper <drepper@redhat.com>
1381
1382 * Makefile (tst-_res1): Add tst-_res1mod1 to dependency list.
1383
4bc93b30
TY
13842010-06-01 Takashi Yoshii <takashi.yoshii.zj@renesas.com>
1385
1386 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Fix incorrect
1387 location of ifndef __ASSUME_FUTEX_CLOCK_REALTIME.
1388
86a4c67f
UD
13892010-04-09 Ulrich Drepper <drepper@redhat.com>
1390
1391 [BZ #11390]
1392 * sysdeps/unix/sysv/linux/pthread_getname.c: New file.
1393 * sysdeps/unix/sysv/linux/pthread_setname.c: New file.
1394 * nptl/sysdeps/pthread/pthread.h: Declare pthread_getname and
1395 pthread_setname.
1396 * Makefile (libpthread-routines): Add pthread_getname and
1397 pthread_setname.
1398 * Versions: Export pthread_getname and pthread_setname for GLIBC_2.12.
1399
f571a994
RM
14002010-04-05 Thomas Schwinge <thomas@schwinge.name>
1401
1402 * sysdeps/pthread/unwind-resume.c: Moved to main tree sysdeps/gnu/.
1403 * sysdeps/pthread/rt-unwind-resume.c: Likewise.
1404 * sysdeps/pthread/Makefile: Remove csu section and rt section's
1405 unwind-resume bits, now in main tree sysdeps/gnu/Makefile instead.
1406
7749bf5f
LM
14072010-03-23 Luis Machado <luisgpm@br.ibm.com>
1408
1409 * pthread_cond_timedwait.c: Add check for
1410 HAVE_CLOCK_GETTIME_VSYSCALL to use VDSO whenever possible.
1411 (pthread_cond_timedwait): Use INTERNAL_VSYSCALL instead of
1412 INTERNAL_SYSCALL.
1413
1d78f299
UD
14142010-03-09 Ulrich Drepper <drepper@redhat.com>
1415
1416 * pthread_create.c (__pthread_create_2_1): If priorities are incorrect
1417 and the call fails wake eventually waiting setxid threads. Don't free
1418 stack here if we try starting a thread.
1419 * sysdeps/pthread/createthread.c (do_clone): Only wake setxid waiter
1420 if the clone call failed.
1421
058e9ba9
AS
14222010-03-08 Andreas Schwab <schwab@redhat.com>
1423
1424 * pthread_create.c (__pthread_create_2_1): Don't set setxid_futex.
1425 * allocatestack.c (get_cached_stack): Set setxid_futex.
1426 (allocate_stack): Likewise.
1427
66f1b8ee
UD
14282010-03-05 Andreas Schwab <schwab@redhat.com>
1429 Ulrich Drepper <drepper@redhat.com>
1430
1431 * allocatestack.c (setxid_mark_thread): Delay handling of thread if
1432 it is creating a thread or it is just being created.
1433 * pthread_create.c (start_thread): Wake setxid thread if it is
1434 waiting.
1435 (__pthread_create_2_1): Initialize setxid_futex.
1436 * sysdeps/pthread/createthread.c (do_clone): Wake setxid thread if it
1437 is waiting.
1438
893549c5
MS
14392010-01-15 Ulrich Drepper <drepper@redhat.com>
1440
1441 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
1442 Fix unwind info.
1443 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1444
14452010-01-15 Michal Schmidt <mschmidt@redhat.com>
1446
1447 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
1448 Fix pthread_cond_timedwait with requeue-PI.
1449 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
1450 Fix pthread_cond_wait with requeue-PI.
1451
402cd987
UD
14522010-01-14 Ulrich Drepper <drepper@redhat.com>
1453
78ee2185
UD
1454 * Versions: Add pthread_mutex_consistent, pthread_mutexattr_getrobust,
1455 and pthread_mutexattr_setrobust for GLIBC_2.12.
402cd987 1456 * pthread_mutex_consistent.c: Define alias pthread_mutex_consistent.
78ee2185
UD
1457 * pthread_mutexattr_getrobust.c: Define alias
1458 pthread_mutexattr_getrobust.
1459 * pthread_mutexattr_setrobust.c: Define alias
1460 pthread_mutexattr_setrobust.
402cd987 1461
d3c7e686
UD
14622010-01-12 Ulrich Drepper <drepper@redhat.com>
1463
1464 * sysdeps/pthread/pthread.h: Cleanup. Fix up for XPG7.
1465
f095bb72
UD
14662010-01-08 Ulrich Drepper <drepper@redhat.com>
1467
1468 * sysdeps/pthread/pthread.h: Fix pthread_mutex_consistent declaration.
1469
d34bd80f
TS
14702009-12-18 Thomas Schwinge <thomas@codesourcery.com>
1471
1472 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c (_init): Don't
1473 call __gmon_start__.
1474 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c (_init): Likewise.
1475
f01c2359
UD
14762009-12-17 Ulrich Drepper <drepper@redhat.com>
1477
1478 * pthread_rwlock_init.c (__pthread_rwlock_init): Simplify code by
1479 using memset.
1480
75956694
DG
14812009-12-01 Dinakar Guniguntala <dino@in.ibm.com>
1482
1483 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.h: Define
1484 FUTEX_WAIT_REQUEUE_PI and FUTEX_CMP_REQUEUE_PI.
1485 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: If mutex
1486 is a non robust PI mutex, then use FUTEX_CMP_REQUEUE_PI.
1487 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
1488 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: If mutex
1489 is a non robust PI mutex, then use FUTEX_WAIT_REQUEUE_PI.
1490 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1491
9554ebf2
UD
14922009-12-12 Ulrich Drepper <drepper@redhat.com>
1493
1494 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
1495 Don't update nwaiters after invalid timeout is recognized.
1496
ebb92a49
TS
14972009-11-27 Thomas Schwinge <thomas@codesourcery.com>
1498
1499 * sysdeps/unix/sysv/linux/sh/pt-initfini.c (_init): Don't call
1500 __gmon_start__.
1501
b55ec98c
AS
15022009-11-27 Andreas Schwab <schwab@redhat.com>
1503
1504 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Reload
1505 THREAD_SELF->cancelhandling after returning from futex call.
1506
80b3a4ea
UD
15072009-11-24 Ulrich Drepper <drepper@redhat.com>
1508
1509 * tst-sem13.c: New file.
1510 * Makefile (tests): Add tst-sem13.
1511
57a299fe
RM
15122009-11-22 Roland McGrath <roland@redhat.com>
1513
1514 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: # include "i686/dl-sysdep.h"
1515 instead of recapitulating its contents.
1516
dfedb126
UD
15172009-11-18 Ulrich Drepper <drepper@redhat.com>
1518
1519 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Minor
1520 optimizations and cleanups.
1521
dd7106b3
DG
15222009-11-18 Dinakar Guniguntala <dino@in.ibm.com>
1523
1524 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
1525 Remove redundant code. Fix cfi offsets.
1526 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
1527 Fix cfi offsets.
1528
f8c10bb4
UD
15292009-11-17 Ulrich Drepper <drepper@redhat.com>
1530
62616842
UD
1531 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Minimally
1532 reduce size of unwind info.
1533
f8c10bb4
UD
1534 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Convert to use
1535 cfi directives.
1536 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1537 Based on a patch by Dinakar Guniguntala <dino@in.ibm.com>.
1538
13f6812f
AS
15392009-11-03 Andreas Schwab <schwab@linux-m68k.org>
1540
1541 [BZ #4457]
1542 * sysdeps/pthread/unwind-resume.c: Include <libgcc_s.h> and use
1543 LIBGCC_S_SO.
1544 * sysdeps/pthread/unwind-forcedunwind.c: Likewise.
1545
25db0f6c
DJ
15462009-10-30 Ulrich Drepper <drepper@redhat.com>
1547
9c04f7c1
UD
1548 * tst-sem11.c (main): Rewrite to avoid aliasing problems.
1549
25db0f6c
DJ
1550 [BZ #3270]
1551 * allocatestack.c (__nptl_setxid): Perform the operation in multiple
1552 steps to avoid races with creation and terminations.
1553 * nptl-init.c (sighandler_setxid): Adjust.
1554 Patch by Daniel Jacobowitz.
1555
3d60eb17
AS
15562009-09-07 Andreas Schwab <schwab@redhat.com>
1557
1558 * sysdeps/pthread/bits/libc-lock.h (BP_SYM): Remove space before paren.
1559
38eb6136
SP
15602009-09-02 Suzuki K P <suzuki@in.ibm.com>
1561 Joseph Myers <joseph@codesourcery.com>
1562
1563 [BZ #7094]
1564 * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
1565 Initialize the sigev_notify field for newly created timer to make sure
01034d75 1566 the timer gets deleted from the active timer's list upon timer_delete.
38eb6136 1567
7812c65b
AS
15682009-08-27 Andrew Stubbs <ams@codesourcery.com>
1569
1570 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
1571 Correct a logic error.
1572
84088310
UD
15732009-08-25 Ulrich Drepper <drepper@redhat.com>
1574
1575 * sysdeps/x86_64/tls.h (RTLD_ENABLE_FOREIGN_CALL): Store old value
1576 of the field in local variables.
1577 (RTLD_FINALIZE_FOREIGN_CALL): Restore rtld_must_xmm_save from local
1578 variable and don't unconditionally clear it.
1579
b42a214c
UD
15802009-08-24 Ulrich Drepper <drepper@redhat.com>
1581
1582 * pthread_create.c (start_thread): Hint to the kernel that memory for
1583 the stack can be reused. We do not mark all the memory. The part
1584 still in use and some reserve are kept.
1585
2d094b73
UD
15862009-08-23 Ulrich Drepper <drepper@redhat.com>
1587
1588 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Clean up namespace.
1589
ae0d5450
UD
15902009-08-11 Ulrich Drepper <drepper@redhat.com>
1591
1592 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Add CFI
1593 directives.
1594
1bc2b97e
UD
15952009-08-10 Ulrich Drepper <drepper@redhat.com>
1596
1597 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Add CFI
1598 directives.
1599 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
1600
ec492239
AS
16012009-08-10 Andreas Schwab <schwab@redhat.com>
1602
1603 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
1604 (__pthread_cond_signal): Don't clobber register used for syscall
1605 number.
1606
49eea97b
UD
16072009-08-08 Ulrich Drepper <drepper@redhat.com>
1608
efa0569d
UD
1609 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
1610 Optimize code path used when FUTEX_CLOCK_REALTIME is supported.
1611
49eea97b
UD
1612 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
1613 (__pthread_cond_wait): Optimize by avoiding use of callee-safe
1614 register.
1615
9083bcc5
UD
16162009-08-07 Ulrich Drepper <drepper@redhat.com>
1617
1618 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Little optimizations
1619 enabled by the special *_asynccancel functions.
1620 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1621 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1622
1623 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Include lowlevellock.h.
1624
421665c4
UD
16252009-08-04 Ulrich Drepper <drepper@redhat.com>
1626
1627 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: New file.
1628 * sysdeps/unix/sysv/linux/x86_64/libc-cancellation.S: New file.
1629 * sysdeps/unix/sysv/linux/x86_64/librt-cancellation.S: New file.
1630 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Optimize
1631 since we can assume the special __*_{en,dis}able_asynccancel
1632 functions.
1633 (PUSHARGS_*, POPARGS_*, SAVESTK_*, RESTSTK_*): Removed.
1634 * sysdeps/x86_64/tcb-offsets.sym: Add cancellation-related bits
1635 and PTHREAD_CANCELED.
1636
bd03a1af
UD
16372009-07-31 Ulrich Drepper <drepper@redhat.com>
1638
1639 * descr.h: Better definition of *_BITMASK macros for cancellation.
1640
b48a267b
UD
16412009-07-29 Ulrich Drepper <drepper@redhat.com>
1642
586fa886
UD
1643 * sysdeps/x86_64/tls.h (TLS_TCB_ALIGN): Define explicitly to 32.
1644
b48a267b 1645 * sysdeps/x86_64/tls.h (tcbhead_t): Add room for SSE registers the
586fa886
UD
1646 dynamic linker might have to save.
1647 Define RTLD_CHECK_FOREIGN_CALL, RTLD_ENABLE_FOREIGN_CALL,
1648 RTLD_PREPARE_FOREIGN_CALL, and RTLD_FINALIZE_FOREIGN_CALL. Pretty
1649 printing.
1650
b48a267b
UD
1651 * sysdeps/x86_64/tcb-offsets.sym: Add RTLD_SAVESPACE_SSE.
1652
b0948ffd
UD
16532009-07-28 Ulrich Drepper <drepper@redhat.com>
1654
1655 * pthread_mutex_lock.c [NO_INCR] (__pthread_mutex_cond_lock_adjust):
1656 New function.
1657 * pthreadP.h: Declare __pthread_mutex_cond_lock_adjust.
1658 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: Add ROBUST_BIT.
1659 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Don't use
1660 requeue_pi for robust mutexes.
1661 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
1662 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1663 Don't only skip __pthread_mutex_cond_lock. Call instead
1664 __pthread_mutex_cond_lock_adjust.
1665 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1666
1667 * pthread_mutex_unlock.c (__pthread_mutex_unlock_full): Minor
1668 optimization of PI mutex handling.
1669
e73e694e
UD
16702009-07-27 Ulrich Drepper <drepper@redhat.com>
1671
1672 [BZ #10418]
1673 * pthread_mutex_unlock.c (__pthread_mutex_unlock_full): Use _rel
1674 instead of of _acq variants of cmpxchg.
1675
f1adf1f4
UD
16762009-07-23 Ulrich Drepper <drepper@redhat.com>
1677
01b597da
UD
1678 * sysdeps/x86_64/configure.in: New file.
1679
f1adf1f4
UD
1680 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix error
1681 path when not using absolute timeout futex.
1682
c3db953c
UD
16832009-07-20 Ulrich Drepper <drepper@redhat.com>
1684
1685 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Minor
1686 optimizations of last changes.
1687 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1688
515a8908
UD
16892009-07-19 Ulrich Drepper <drepper@redhat.com>
1690
42e69bcf
UD
1691 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
1692 FUTEX_WAIT_REQUEUE_PI and FUTEX_CMP_REQUEUE_PI.
1693 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: If mutex
1694 is a PI mutex, then use FUTEX_CMP_REQUEUE_PI.
1695 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
1696 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: If mutex
1697 is a PI mutex, then use FUTEX_WAIT_REQUEUE_PI.
1698 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1699
515a8908
UD
1700 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1701 (__pthread_cond_timedwait): Make more robust.
1702
30b1954a
UD
17032009-07-18 Ulrich Drepper <drepper@redhat.com>
1704
e2dca2fe
UD
1705 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
1706 (__lll_robust_timedlock_wait): If possible use FUTEX_WAIT_BITSET to
1707 directly use absolute timeout.
1708
3d77b268
UD
1709 * tst-sem5.c (do_test): Add test for premature timeout.
1710 * Makefile: Linu tst-sem5 with librt.
1711
d979611e
UD
1712 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
1713 (pthread_rwlock_timedwrlock): If possible use FUTEX_WAIT_BITSET to
1714 directly use absolute timeout.
32c6c342
UD
1715 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
1716 (pthread_rwlock_timedrdlock): Likewise.
d979611e 1717
f8b6cd21
UD
1718 * tst-cond11.c (run_test): Add test to check that the timeout is
1719 long enough.
1720
e88726b4
UD
1721 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
1722 (__pthread_cond_timedwait): If possible use FUTEX_WAIT_BITSET to
1723 directly use absolute timeout.
1724
30b1954a
UD
1725 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
1726 (__pthread_cond_wait): Convert to using exception handler instead of
1727 registered unwind buffer.
92618c95
UD
1728 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1729 (__pthread_cond_timedwait): Likewise.
30b1954a 1730
d52c96e7
UD
17312009-07-17 Ulrich Drepper <drepper@redhat.com>
1732
f351f2b7
UD
1733 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
1734 If possible use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME to directly
1735 use absolute timeout.
1736
0adae468
UD
1737 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Optimize
1738 handling of uncontested semaphore.
1739
d52c96e7
UD
1740 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
1741 (__condvar_cleanup): Rewrite to use cfi directives instead of
1742 hand-coded unwind tables.
63601ccd
UD
1743 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S (__pthread_once):
1744 Likewise.
c3c2f3cf 1745 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
aee2665a
UD
1746 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
1747 Likewise.
d52c96e7 1748
bfdb73e1
UD
17492009-06-12 Ulrich Drepper <drepper@redhat.com>
1750
1751 * Makefile (libpthread-routines): Add pthread_sigqueue.
1752 * Versions: Add pthread_sigqueue for GLIBC_2.11.
1753 * sysdeps/pthread/bits/sigthread.h: Declare pthread_sigqueue.
1754 * sysdeps/unix/sysv/linux/pthread_sigqueue.c: New file.
1755
1828530f
BK
17562009-06-11 Ulrich Drepper <drepper@redhat.com>
1757
1758 [BZ #10262]
1759 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
1760 (LOAD_FUTEX_WAIT_ABS): Fix futex parameter in case private futexes
1761 cannot be assumed.
1762 Patch by Bryan Kadzban <bz-glibc@kdzbn.homelinux.net>.
1763
a5b8b56d
UD
17642009-05-16 Ulrich Drepper <drepper@redhat.com>
1765
e20c4ef0
UD
1766 * libc-cancellation.c: Move __libc_cleanup_routine to...
1767 * libc-cleanup.c: ...here. New file.
1768 * Makefile (routines): Add libc-cleanup.
1769
cba0ca79
UD
1770 * cancellation.c (__pthread_disable_asynccancel): Remove unnecessary
1771 test.
1772 * libc-cancellation.c: Use <nptl/cancellation.c: to define the code.
1773 * sysdeps/pthread/librt-cancellation.c: Likewise.
1774
a5b8b56d
UD
1775 [BZ #9924]
1776 * nptl-init.c: Renamed from init.c.
1777 * Makefile: Change all occurences of init.c to nptl-init.c.
1778
1a7f254b
UD
17792009-05-15 Ulrich Drepper <drepper@redhat.com>
1780
9437b427
UD
1781 * cancellation.c (__pthread_disable_asynccancel): Correct the bits
1782 to test when deciding on the delay.
1783 * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
1784 * pthread_cancel.c: Close race between deciding on sending a signal
1785 and setting the CANCELING_BIT bit.
1786
1a7f254b
UD
1787 * cancellation.c (__pthread_disable_asynccancel): Don't return if
1788 thread is canceled.
1789 * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
1790
d5c157a9
UD
17912009-04-27 Ulrich Drepper <drepper@redhat.com>
1792
1793 * cancellation.c (__pthread_disable_asynccancel): Use THREAD_ATOMIC_AND
1794 is available.
1795 * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
1796 * sysdeps/x86_64/tls.h: Define THREAD_ATOMIC_AND.
1797 * sysdeps/i386/tls.h: Likewise.
1798 (tcbhead_t): Add __private_tm member.
1799
f521be31
UD
18002009-04-26 Ulrich Drepper <drepper@redhat.com>
1801
5efe8650
UD
1802 * sem_open.c (sem_open): Rewrite initialization of initsem to
1803 avoid warnings.
1804
f521be31
UD
1805 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
1806 Avoid warning by using may_alias attribute on ptrhack.
1807
d301a6e1
UD
18082009-04-22 Ulrich Drepper <drepper@redhat.com>
1809
5497de87 1810 [BZ #10090]
d301a6e1
UD
1811 * pthread_attr_setschedparam.c (__pthread_attr_setschedparam):
1812 Check policy and priority for validity.
1813 Patch mostly by Zhang Xiliang <zhangxiliang@cn.fujitsu.com>.
1814
71a5bd3e
UD
18152009-03-15 Ulrich Drepper <drepper@redhat.com>
1816
1817 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1818 (__pthread_cond_timedwait): Change to use cfi directives instead of
1819 hand-coded unwind sections.
1820
30991b8b
UD
18212009-03-10 Ulrich Drepper <drepper@redhat.com>
1822
1823 * init.c (nptl_freeres): Compile only for SHARED.
1824
9920a6b8
JJ
18252009-03-09 Jakub Jelinek <jakub@redhat.com>
1826
1827 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Define
1828 FUTEX_WAIT_BITSET, FUTEX_WAKE_BITSET, FUTEX_CLOCK_REALTIME and
1829 FUTEX_BITSET_MATCH_ANY.
1830
e965d514
RM
18312009-02-27 Roland McGrath <roland@redhat.com>
1832
1833 * init.c (__nptl_initial_report_events): Mark __attribute_used__.
1834 * pthread_create.c (__nptl_threads_events, __nptl_last_event): Likewise.
1835
6cbe890a
UD
18362009-02-26 Ulrich Drepper <drepper@redhat.com>
1837
1838 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
1839 _POSIX_THREAD_ROBUST_PRIO_INHERIT and
1840 _POSIX_THREAD_ROBUST_PRIO_PROTECT. Reset value of macros from
1841 200112L to 200809L.
1842
77db439e
UD
18432009-02-25 Ulrich Drepper <drepper@redhat.com>
1844
1845 * sysdeps/pthread/pthread.h: The robust mutex functions are in
1846 POSIX 2008.
1847
5be0a688
UD
18482009-02-24 Ulrich Drepper <drepper@redhat.com>
1849
1850 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_BITS_POSIX_OPT_H):
1851 Unify name of include protector macro.
1852
4c869eb6
UD
18532009-02-14 SUGIOKA Toshinobu <sugioka@itonet.co.jp>
1854
1855 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
1856 LOAD_FUTEX_WAIT_ABS even if (FUTEX_WAIT == 0).
1857
cca50323
UD
18582009-01-29 Ulrich Drepper <drepper@redhat.com>
1859
7f901dd7
UD
1860 * sysdeps/pthread/unwind-forcedunwind.c: Encrypt all function
1861 pointer variables.
1862
cca50323
UD
1863 * allocatestack.c (__free_stacks): Renamed from free_stacks.
1864 (__free_stack_cache): Removed. Change callers to call __free_stacks.
1865 * init.c (nptl_freeres): New function.
1866 (pthread_functions): Initialize ptr_freeres to nptl_freeres.
1867 * pthreadP.h: Don't declare __free_stack_cache. Declare __free_stacks.
1868 * sysdeps/pthread/unwind-forcedunwind.c (libgcc_s_handle): New
1869 variable.
1870 (pthread_cancel_init): Depend in libgcc_s_handle for decision to
1871 load DSO. Assign last.
1872 (__unwind_freeres): New function.
1873
1874 * allocatestack.c (__reclaim_stacks): Reset in_flight_stack later
1875 for better debugging. No need to use stack_list_add here.
1876
a7bd183f
UD
18772009-01-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1878
1879 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
1880 (__lll_timedlock_wait): Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME
1881 instead of computing relative timeout.
1882 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
1883 FUTEX_CLOCK_REALTIME and FUTEX_BITSET_MATCH_ANY.
1884
563ee1cb
UD
18852009-01-25 Ulrich Drepper <drepper@redhat.com>
1886
1887 * pthread_mutex_lock.c (__pthread_mutex_lock): Remove unused label out.
1888
f25c7b08
UD
18892009-01-08 Ulrich Drepper <drepper@redhat.com>
1890
1891 * sysdeps/pthread/list.h (list_add): Initialize new element first.
1892 (list_add_tail): Removed.
1893
40de0fe3
JJ
18942009-01-07 Ulrich Drepper <drepper@redhat.com>
1895
1896 * (in_flight_stack): New variable.
1897 (stack_list_del): New function. Use instead of list_del.
1898 (stack_list_add): New function. Use instead of list_add when adding to
1899 stack_cache and stack_used lists.
1900 (__reclaim_stacks): Complete operations on stack_cache and stack_used lists
1901 when the fork call interrupted another thread.
1902
3c612057
UD
19032009-01-04 Ulrich Drepper <drepper@redhat.com>
1904
1905 * init.c (__pthread_initialize_minimal_internal): Optimize test
1906 FUTEX_CLOCK_REALTIME a bit.
1907
19834b42
UD
19082009-01-03 Ulrich Drepper <drepper@redhat.com>
1909
1910 * init.c (__pthread_initialize_minimal_internal): Cheat a bit by
1911 only passing five parameters to FUTEX_WAIT_BITSET call.
1912
1913 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
a9fa090b 1914 (__lll_timedlock_wait): Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME
19834b42
UD
1915 instead of computing relative timeout.
1916
7dd650d7
UD
19172009-01-02 Ulrich Drepper <drepper@redhat.com>
1918
cbd8aeb8
UD
1919 * init.c (__pthread_initialize_minimal_internal): Check for
1920 FUTEX_CLOCK_REALTIME flag.
1921 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
a9fa090b 1922 Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME instead of computing
cbd8aeb8
UD
1923 relative timeout.
1924
7dd650d7
UD
1925 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
1926 FUTEX_CLOCK_REALTIME and FUTEX_BITSET_MATCH_ANY.
1927 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
1928 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
1929 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
1930 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
1931
217d45cd
UD
19322008-12-09 Ulrich Drepper <drepper@redhat.com>
1933
1934 * sysdeps/pthread/pthread.h (pthread_cleanup_pop): Use { } as empty
1935 loop body instead of ; to avoid gcc warnings.
1936 (pthread_cleanup_pop_restore_np): Likewise.
1937 Patch by Caolán McNamara <caolanm@redhat.com>.
1938
6de79a49
UD
19392008-12-09 Jakub Jelinek <jakub@redhat.com>
1940
1941 * pthread_mutex_lock.c (__pthread_mutex_lock): Handle only the
1942 fast path here, for robust/PI/PP mutexes call
1943 __pthread_mutex_lock_full. Don't use switch, instead use a series
1944 of ifs according to their probability.
1945 (__pthread_mutex_lock_full): New function.
1946 * pthread_mutex_unlock.c: Include assert.h.
1947 (__pthread_mutex_unlock_usercnt): Handle only the
1948 fast path here, for robust/PI/PP mutexes call
1949 __pthread_mutex_unlock_full. Don't use switch, instead use a series
1950 of ifs according to their probability.
1951 (__pthread_mutex_unlock_full): New function.
1952 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c
1953 (__pthread_mutex_lock_full): Define.
1954
71bb2639
UD
19552008-12-08 Ulrich Drepper <drepper@redhat.com>
1956
1957 * sysdeps/x86_64/tls.h (tcbhead_t): Add fields reserved for TM
1958 implementation. Add necessary padding and.
1959 * descr.h (struct pthread): Increase padding for tcbhead_t to 24
1960 words.
1961
247626f3
UD
19622008-12-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1963
1964 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define FUTEX_WAIT_BITSET
1965 and FUTEX_WAKE_BITSET.
1966
da5ac135
UD
19672008-12-02 Ulrich Drepper <drepper@redhat.com>
1968
1969 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_WAIT_BITSET
1970 and FUTEX_WAKE_BITSET.
1971 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
1972 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
1973 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
1974 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
1975
c0439b95
RM
19762008-11-25 Roland McGrath <roland@redhat.com>
1977
1978 * sysdeps/alpha, sysdeps/unix/sysv/linux/alpha:
1979 Subdirectories moved to ports repository as
1980 sysdeps/.../nptl subdirectories.
1981
0e54a725
UD
19822008-11-12 Jakub Jelinek <jakub@redhat.com>
1983
1984 [BZ #7008]
1985 * pthread_condattr_setclock.c (pthread_condattr_setclock): Fix masking
1986 of old value.
1987 * pthread_cond_init.c (__pthread_cond_init): Fix
1988 cond->__data.__nwaiters initialization.
1989 * Makefile (tests): Add tst-cond23.
1990 * tst-cond23.c: New test.
1991
4b23f9bd
JJ
19922008-11-07 Jakub Jelinek <jakub@redhat.com>
1993
1994 * sysdeps/pthread/malloc-machine.h (MALLOC): Adjust __libc_tsd_define
1995 arguments.
1996 (tsd_setspecific, tsd_getspecific): Adjust __libc_tsd_{set,get}
1997 arguments.
1998
efac1fce
UD
19992008-11-01 Ulrich Drepper <drepper@redhat.com>
2000
2001 [BZ #6955]
2002 * pthread_mutex_lock.c: Add support for private PI mutexes.
2003 * pthread_mutex_timedlock.c: Likewise.
2004 * pthread_mutex_trylock.c: Likewise.
2005 * pthread_mutex_unlock.c: Likewise.
2006 Patch mostly by Ben Jackson <ben@ben.com>.
2007
bf837fa3
UD
20082008-10-31 Ulrich Drepper <drepper@redhat.com>
2009
2010 [BZ #6843]
2011 * sysdeps/pthread/gai_misc.h (__gai_create_helper_thread):
2012 Increase stack size for helper thread.
2013
208bc836
UD
20142008-10-06 Martin Schwidefsky <schwidefsky@de.ibm.com>
2015
2016 * sysdeps/s390/tls.h (THREAD_SET_STACK_GUARD): Add empty inline
2017 assembly with a clobber list for access registers a0 and a1.
2018
17f8b4a9
UD
20192008-09-11 Martin Schwidefsky <schwidefsky@de.ibm.com>
2020
2021 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Add memory barrier
2022 to force runp->refcntr to be read from memory.
2023
2458c748
AJ
20242008-09-08 Richard Guenther <rguenther@suse.de>
2025
2026 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_lock,
2027 lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
2028 lll_timedlock, lll_robust_timedlock, lll_unlock,
2029 lll_robust_unlock): Promote private to int.
2030
965805e8
UD
20312008-08-15 Ulrich Drepper <drepper@redhat.com>
2032
2033 * sysdeps/x86_64/pthreaddef.h: Remove ARCH_MAP_FLAGS and
2034 ARCH_RETRY_MMAP definitions.
2035 * allocatestack.c: Remove definition of ARCH_MAP_FLAGS.
2036 Define MAP_STACK when not defined.
2037 (allocate_stack): Use MAP_STACK instead of ARCH_MAP_FLAGS. Remove
2038 handling of ARCH_RETRY_MMAP.
2039
bd7f4857
UD
20402008-07-30 Ulrich Drepper <drepper@redhat.com>
2041
2042 * tst-align2.c (f): Print message that f is reached.
2043
619cc2f6
UD
20442008-04-28 Hiroki Kaminaga <kaminaga@sm.sony.co.jp>
2045
2046 [BZ #6740]
2047 * sysdeps/powerpc/tcb-offsets.sym (PRIVATE_FUTEX_OFFSET): Guard symbol
2048 definition with #ifndef __ASSUME_PRIVATE_FUTEX.
2049
8ccf22f9
UD
20502008-07-25 Ulrich Drepper <drepper@redhat.com>
2051
2052 * sysdeps/unix/sysv/linux/mq_notify.c (init_mq_netlink): Use
2053 SOCK_CLOEXEC if possible.
2054
20552008-05-29 Ulrich Drepper <drepper@redhat.com>
2056
2057 * Makefile (tests): Add tst-rwlock2a.
2058 * tst-rwlock2.c: Use TYPE macro to decide what rwlock type to use.
2059 * tst-rwlock2a.c: New file.
2060
5a337776
UD
20612008-06-12 Ulrich Drepper <drepper@redhat.com>
2062
2063 * sysdeps/pthread/pthread.h: Remove inadvertant checkin.
2064
e4d6e7f5
UD
20652008-05-17 Samuel Thibault <samuel.thibault@ens-lyon.org>
2066
2067 * sysdeps/pthread/pthread.h: Fix typo in comment.
2068
d6296e88
UD
20692008-05-28 Ulrich Drepper <drepper@redhat.com>
2070
2071 * sysdeps/pthread/createthread.c (do_clone): Pass accurate length
2072 of CPU set to the kernel.
2073
62605cbf
UD
20742008-05-23 Paul Pluzhnikov <ppluzhnikov@google.com>
2075
2076 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Add
2077 cfi directives.
2078 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
2079 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
2080 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
2081 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
2082 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
2083 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
2084
20852008-05-22 Paul Pluzhnikov <ppluzhnikov@google.com>
2086
2087 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S: Add
2088 cfi directives.
2089 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2090 Likewise.
2091 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
2092 Likewise.
2093 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
2094 Likewise.
2095
4b2c85c0
UD
20962008-05-26 Ulrich Drepper <drepper@redhat.com>
2097
2098 * tst-typesizes.c: Explicitly check __SIZEOF_PTHREAD_* constants.
2099
b72f5692 21002008-05-20 Jakub Jelinek <jakub@redhat.com>
4b2c85c0
UD
2101
2102 David S. Miller <davem@davemloft.net>
3b15b590 2103
b72f5692 2104 * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: New file.
3b15b590 2105
cdffaaa6
UD
21062008-05-10 Ulrich Drepper <drepper@redhat.com>
2107
2108 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Access
2109 __pshared correctly.
2110 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2111 Likewise.
2112 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2113 Likewise.
2114 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
2115 Likewise.
2116 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
2117 Likewise.
2118 Reported by Clemens Kolbitsch <clemens.kol@gmx.at>.
2119
2313c48f
JJ
21202008-04-14 David S. Miller <davem@davemloft.net>
2121
2122 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
2123 (__old_sem_wait): Fix argument to lll_futex_wait().
2124
2f611ada
UD
21252007-11-26 Daniel Jacobowitz <dan@codesourcery.com>
2126
2127 * pthread_create.c: Require pthread_mutex_trylock and
2128 pthread_key_delete for libgcc.
2129
d24be489
JJ
21302008-04-08 Jakub Jelinek <jakub@redhat.com>
2131
2132 [BZ #6020]
2133 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h
2134 (lll_futex_wake_unlock): Add private argument to the pre-v9 macro.
2135 Patch by Sunil Amitkumar Janki <devel.sjanki@gmail.com>.
2136
f96853be
UD
21372008-03-27 Ulrich Drepper <drepper@redhat.com>
2138
8ccf22f9 2139 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine ARG_MAX if
f96853be
UD
2140 <linux/limits.h> has defined it.
2141 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
2142 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
2143 * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
2144 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
2145
354b7527
JJ
21462008-03-18 Jakub Jelinek <jakub@redhat.com>
2147
2148 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Use __ASSEMBLER__ instead
2149 of ASSEMBLER.
2150 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
2151 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Likewise.
2152
702ae329
UD
21532008-03-14 Ulrich Drepper <drepper@redhat.com>
2154
2155 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
2156 HAVE_DL_DISCOVER_OSVERSION.
2157 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
2158 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Likewise.
2159
443db178
UD
21602008-03-07 Ulrich Drepper <drepper@redhat.com>
2161
2162 [BZ #5778]
2163 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Change
2164 _POSIX_CHOWN_RESTRICTED value to zero.
2165
67fbfa5c
RM
21662008-01-31 Roland McGrath <roland@redhat.com>
2167
2168 * Makefile (omit-deps): Variable removed.
2169
dd3113da
UD
21702008-01-30 Ulrich Drepper <drepper@redhat.com>
2171
2172 * sysdeps/unix/sysv/linux/x86_64/sem_post.S (sem_post): Avoid
2173 unnecessary addr32 prefix.
2174
16cd816f
RM
21752008-01-29 Roland McGrath <roland@redhat.com>
2176
2177 * Makeconfig (ptw-CPPFLAGS, sysd-rules-patterns): New variables.
2178
b4b166af
UD
21792008-01-22 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2180
2181 * sysdeps/unix/sysv/linux/sh/sem_post.S: Don't overflow value field.
2182
21832008-01-21 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2184
2185 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XADD): Use
2186 a scratch register.
2187 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
2188 (__lll_lock_wait_private): Fix typo.
2189 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
2190 (pthread_barrier_wait): Likewise. Adjust XADD use.
2191 * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
2192 Adjust XADD use.
2193 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S
2194 (pthread_rwlock_timedrdlock): Return correct return value.
2195 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S
16cd816f 2196 (pthread_rwlock_timedwrlock): Likewise.
b4b166af 2197
eaf95a26
UD
21982008-01-15 Ulrich Drepper <drepper@redhat.com>
2199
2200 * tst-eintr2.c (do_test): make sure that if mutex_lock in main
2201 thread returns the program exits with an error code.
2202
ab355d9a
UD
22032008-01-10 Ulrich Drepper <drepper@redhat.com>
2204
2205 * pthread-errnos.sym: Add EOVERFLOW.
2206 * sysdeps/unix/sysv/linux/structsem.sym: Add SEM_VALUE_MAX.
2207 * sysdeps/unix/sysv/linux/sem_post.c: Don't overflow value field.
2208 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
2209 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
2210
b8cca206
UD
22112007-12-14 Ulrich Drepper <drepper@redhat.com>
2212
2213 * sysdeps/x86_64/pthreaddef.h (ARCH_RETRY_MMAP): Take additional
2214 parameter. Passed it as permission to mmap.
2215 * allocatestack.c (allocate_stack): Pass prot as second parameter
2216 to ARCH_RETRY_MMAP.
2217
189dce4f
UD
22182007-12-12 Ulrich Drepper <drepper@redhat.com>
2219
3eb0e1c6
UD
2220 * tst-basic7.c: Allocate memory for the stack.
2221
189dce4f
UD
2222 [BZ #5465]
2223 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S [!SHARED]
2224 (__pthread_cond_timedwait): Don't use VDSO.
58d11795 2225 Patch by Michal Januszewski.
189dce4f 2226
26e21e75
UD
22272007-12-07 Ulrich Drepper <drepper@redhat.com>
2228
2229 [BZ #5455]
2230 * sysdeps/pthread/pthread.h [!__EXCEPTIONS] (pthread_cleanup_pop):
2231 Allow label before pthread_cleanup_pop.
2232 (pthread_cleanup_pop_restore_np): Likewise.
2233
191ec77f
UD
22342007-12-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2235
2236 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
2237 Store 2 before returning ETIMEDOUT.
2238
c012be6f
UD
22392007-11-23 Ulrich Drepper <drepper@redhat.com>
2240
2241 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
2242 Store 2 before returning ETIMEDOUT.
2243 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise
2244 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
2245 (__lll_lock_wait_private): Optimize.
2246 (__lll_lock_wait): Likewise.
2247
77f1e09a
UD
22482007-11-20 Jakub Jelinek <jakub@redhat.com>
2249
2250 * sysdeps/pthread/pthread.h (pthread_cleanup_push,
2251 pthread_cleanup_push_defer_np): Add extra (void *) cast to shut up
2252 g++ 4.1 and 4.2 -Wstrict-aliasing warnings.
2253
0f7e0ee5
UD
22542007-11-08 Ulrich Drepper <drepper@redhat.com>
2255
cbed6a60
UD
2256 [BZ #5240]
2257 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
2258 If we time out, try one last time to lock the futex to avoid
2259 losing a wakeup signal.
2260 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
2261 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
2262
0f7e0ee5
UD
2263 [BZ #5245]
2264 * sysdeps/pthread/createthread.c (do_clone): Translate clone error
2265 if necessary.
2266
f6ed654c
UD
22672007-11-07 Ulrich Drepper <drepper@redhat.com>
2268
2269 [BZ #5245]
2270 * allocatestack.c (allocate_stack): Change ENOMEM error in case
2271 mmap failed to EAGAIN.
2272 * Makefile (tests): Add tst-basic7.
2273 * tst-basic7.c: New file.
2274
b92e3780
UD
22752007-11-05 Ulrich Drepper <drepper@redhat.com>
2276
2277 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
2278 Use __linkin_atfork.
2279
94a749f6
UD
22802007-11-03 Mike Frysinger <vapier@gentoo.org>
2281
2282 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (LOAD_FUTEX_WAIT): Add
2283 missing line continuations.
2284 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S (LOAD_FUTEX_WAIT,
2285 LOAD_FUTEX_WAKE): Likewise. Also add missing 3rd parameter.
2286
f160a450
UD
22872007-10-28 Ulrich Drepper <drepper@redhat.com>
2288
2289 [BZ #5220]
2290 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Declare
2291 __active_timer_sigev_thread and __active_timer_sigev_thread_lock.
2292 (struct timer): Add next element.
2293 * sysdeps/unix/sysv/linux/timer_create.c: For SIGEV_THREAD timers,
2294 enqueue timer structure into __active_timer_sigev_thread list.
2295 * sysdeps/unix/sysv/linux/timer_delete.c: For SIGEV_THREAD timers,
2296 remove timer struct from __active_timer_sigev_thread.
2297 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
2298 Before using timer structure make sure it is still on the
2299 __active_timer_sigev_thread list. Keep lock until done.
2300 Define __active_timer_sigev_thread and
2301 __active_timer_sigev_thread_lock.
2302
94833f11
UD
23032007-10-27 Ulrich Drepper <drepper@redhat.com>
2304
2305 * sysdeps/pthread/malloc-machine.h: Define ATFORK_MEM.
2306 Redefine thread_atfork for use of ATFORK_MEM.
2307 * sysdeps/unix/sysv/linux/fork.h: Define __linkin_atfork.
2308 * sysdeps/unix/sysv/linux/register-atfork.c (__linkin_atfork): New
2309 function.
2310 * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
2311 Use atomic operation when removing first element of list.
2312
96c06e08
JJ
23132007-10-17 Jakub Jelinek <jakub@redhat.com>
2314
2315 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__old_sem_post): New
2316 routine instead of an alias to __new_sem_post.
2317
e807818b
JJ
23182007-10-15 Jakub Jelinek <jakub@redhat.com>
2319
2320 * init.c (__pthread_initialize_minimal): Initialize word to appease
2321 valgrind.
2322
59d430c6
UD
23232007-10-10 Jakub Jelinek <jakub@redhat.com>
2324
2325 * sysdeps/pthread/bits/libc-lock.h (__libc_rwlock_init): Inside of
2326 libc.so just clear NAME.
2327 (__libc_rwlock_fini): Nop inside of libc.so.
2328 * tst-initializers1.c (main): Test if PTHREAD_RWLOCK_INITIALIZER is
2329 all zeros.
2330
221d9d8e
UD
23312007-09-02 Ulrich Drepper <drepper@redhat.com>
2332
2333 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
2334 (__pthread_cond_wait): Fix unlocking of internal lock after mutex
2335 unlocking failed.
2336 Patch by Luca Barbieri <luca.barbieri@gmail.com>.
2337
2a01ce56
UD
23382007-08-21 Ulrich Drepper <drepper@redhat.com>
2339
2340 [BZ #4938]
2341 * allocatestack.c (__reclaim_stacks): Clear the TSD in the
2342 reclaimed stack if necessary.
2343 * Makefile (tests): Add tst-tsd6.
2344 * tst-tsd6.c: New file.
2345
c273641b
JJ
23462007-08-21 Jakub Jelinek <jakub@redhat.com>
2347
2348 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_dead):
2349 Add private argument.
2350
fb84593c
UD
23512007-08-20 Ulrich Drepper <drepper@redhat.com>
2352
2353 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
2354 (__pthread_cond_timedwait): Use clock_gettime from VDSO if possible.
2355
3e8d1eab
JJ
23562007-08-16 Jakub Jelinek <jakub@redhat.com>
2357
2358 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h
2359 (__lll_robust_timedlock): Pass private as last argument to
2360 __lll_robust_timedlock_wait.
2361 (__lll_unlock): Fix a pasto.
2362
e4720b0e
JJ
23632007-08-15 Jakub Jelinek <jakub@redhat.com>
2364
2365 * sysdeps/unix/sysv/linux/sparc/internaltypes.h (sparc_new_sem,
2366 sparc_old_sem): New structs.
2367 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
2368 (__sem_wait_cleanup): New function.
2369 (__new_sem_wait): Use sparc_new_sem structure. Bump and afterwards
2370 decrease nwaiters. Register __sem_wait_cleanup as cleanup handler.
2371 Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
2372 lll_futex_wait.
2373 (__old_sem_wait): New function.
2374 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: Include
2375 nptl/sysdeps/unix/sysv/linux/sparc version.
2376 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c:
2377 Likewise.
2378 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: Likewise.
2379 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c
2380 (__new_sem_trywait): Use sparc_old_sem structure.
2381 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c
2382 (sem_timedwait): Use sparc_new_sem structure. Bump and afterwards
2383 decrease nwaiters. Register __sem_wait_cleanup as cleanup handler.
2384 Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
2385 lll_futex_timed_wait.
2386 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c (__new_sem_post):
2387 Use sparc_new_sem structure. Only wake if nwaiters > 0. Pass
2388 isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
2389 lll_futex_wake.
2390 (__old_sem_post): New function.
2391 * sysdeps/unix/sysv/linux/sparc/sem_wait.c: New file.
2392 * sysdeps/unix/sysv/linux/sparc/sem_init.c: New file.
2393 * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c: New file.
2394 * sysdeps/unix/sysv/linux/sparc/sem_post.c: New file.
2395 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: Remove.
2396 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: Remove.
2397
d13f4a43
UD
23982007-08-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2399
2400 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
2401 (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
2402 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2403 Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
2404 * sysdeps/unix/sysv/linux/shpthread_cond_signal.S
2405 (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
2406 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2407 Use FUTEX_WAKE_OP.
2408 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
2409 kernel-features.h and tcb-offsets.h.
2410 (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
2411 lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
2412 process private.
2413 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
2414 tcb-offsets.h.
2415 (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE
2416 to lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
2417 process private.
2418 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use #ifdef
2419 __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
2420 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
2421 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
2422 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
2423 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
2424 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
2425
702a9414
JJ
24262007-08-14 Jakub Jelinek <jakub@redhat.com>
2427
467d1345
JJ
2428 * sysdeps/unix/sysv/linux/lowlevellock.c: Comment fix.
2429 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
2430 (__lll_timedwait_tid): Pass LLL_SHARED as 4th argument to
2431 lll_futex_timed_wait.
2432
702a9414
JJ
2433 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (__lll_unlock,
2434 __lll_robust_unlock): Rewrite as macros instead of inline functions.
2435 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_unlock,
2436 __lll_robust_unlock, __lll_wait_tid): Likewise.
2437
22502ea2
UD
24382007-08-13 Jakub Jelinek <jakub@redhat.com>
2439
2440 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
2441 Fix a pasto.
2442 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
2443 (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
2444 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2445 Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
2446 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
2447 (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
2448 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2449 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Include
2450 kernel-features.h.
2451 (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
2452 lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
2453 process private. Switch DW_CFA_advance_loc1 and some
2454 DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
2455 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
2456 (__pthread_cond_timedwait, __condvar_tw_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_loc{1,2} and some
2459 DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
2460 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use
2461 #ifdef __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
2462 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2463 Likewise.
2464 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
2465 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
2466 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2467 Likewise.
2468 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
2469 (__pthread_cond_broadcast): Compare %r8 instead of
2470 dep_mutex-cond_*(%rdi) with $-1.
2471 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
2472 (__pthread_cond_signal): Xor FUTEX_WAKE_OP with FUTEX_WAKE instead
2473 of oring.
2474
4baf59ad
UD
24752007-08-13 Ulrich Drepper <drepper@redhat.com>
2476
2477 * sysdeps/unix/sysv/linux/i386/i786/Implies: New file.
2478
9c6f6953
UD
24792007-08-13 Jakub Jelinek <jakub@redhat.com>
2480
2481 * allocatestack.c: Include kernel-features.h.
2482 * pthread_create.c: Likewise.
2483 * pthread_mutex_init.c: Likewise.
2484 * init.c: Likewise.
2485 * pthread_cond_timedwait.c: Likewise.
2486 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
2487 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2488 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
2489 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
2490 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
2491 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2492 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2493 Likewise.
2494 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2495 Likewise.
2496 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2497 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2498 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
2499 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
2500
974a1f0f
UD
25012007-08-12 Jakub Jelinek <jakub@redhat.com>
2502
2503 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
2504 [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
2505 byte elements. One of them is the new __shared element.
2506 [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
2507 adjust names of other padding elements.
2508 * sysdeps/unix/sysv/linux/s390/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/ia64/bits/pthreadtypes.h (pthread_rwlock_t):
2514 Renamed __pad1 element to __shared, adjust names of other padding
2515 elements.
2516 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
2517 (pthread_rwlock_t): Likewise.
2518 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock): Fix a
2519 typo.
2520
25212007-08-09 Anton Blanchard <anton@samba.org>
2522
2523 * sysdeps/unix/sysv/linux/powerpc/pthread_spin_unlock.c: New file.
2524
f47e2626
UD
25252007-08-12 Ulrich Drepper <drepper@redhat.com>
2526
2527 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Include
2528 <kernel-features.h>.
2529 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
2530
5bd8a249
UD
25312007-08-11 Ulrich Drepper <drepper@redhat.com>
2532
2533 * pthreadP.h (PTHREAD_ROBUST_MUTEX_PSHARED): Define.
2534 * pthread_mutex_lock.c: Use it instead of PTHREAD_MUTEX_PSHARED when
2535 dealing with robust mutexes.
2536 * pthread_mutex_timedlock.c: Likewise.
2537 * pthread_mutex_trylock.c: Likewise.
2538 * pthread_mutex_unlock.c: Likewise.
2539 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
2540
25412007-08-06 Jakub Jelinek <jakub@redhat.com>
2542
2543 * pthreadP.h (PTHREAD_MUTEX_PSHARED_BIT): Define.
2544 (PTHREAD_MUTEX_TYPE): Mask __kind with 127.
2545 (PTHREAD_MUTEX_PSHARED): Define.
2546 * pthread_mutex_init.c (__pthread_mutex_init): Set
2547 PTHREAD_MUTEX_PSHARED_BIT for pshared or robust
2548 mutexes.
2549 * pthread_mutex_lock.c (LLL_MUTEX_LOCK): Take mutex as argument
2550 instead of its __data.__lock field, pass PTHREAD_MUTEX_PSHARED
2551 as second argument to lll_lock.
2552 (LLL_MUTEX_TRYLOCK): Take mutex as argument
2553 instead of its __data.__lock field.
2554 (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
2555 __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
2556 to lll_robust_lock.
2557 (__pthread_mutex_lock): Update LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
2558 LLL_ROBUST_MUTEX_LOCK users, use PTHREAD_MUTEX_TYPE (mutex)
2559 instead of mutex->__data.__kind directly, pass
2560 PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock and lll_futex_wait.
2561 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Use
2562 PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
2563 directly, pass PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock.
2564 (pthread_mutex_timedlock): Pass PTHREAD_MUTEX_PSHARED (mutex)
2565 to lll_timedlock, lll_robust_timedlock, lll_unlock and
2566 lll_futex_timed_wait. Use PTHREAD_MUTEX_TYPE (mutex) instead
2567 of mutex->__data.__kind directly.
2568 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Pass
2569 PTHREAD_MUTEX_PSHARED (mutex) to lll_timedlock,
2570 lll_robust_timedlock, lll_unlock and lll_futex_timed_wait. Use
2571 PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind directly.
2572 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Pass
2573 PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock, lll_robust_unlock
2574 and lll_futex_wake.
2575 * pthread_mutex_setprioceiling.c (pthread_mutex_setprioceiling): Pass
2576 PTHREAD_MUTEX_PSHARED (mutex) to lll_futex_wait and lll_futex_wake.
2577 Use PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
2578 directly.
2579 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK):
2580 Take mutex as argument instead of its __data.__lock field, pass
2581 PTHREAD_MUTEX_PSHARED as second argument to lll_cond_lock.
2582 (LLL_MUTEX_TRYLOCK): Take mutex as argument instead of its
2583 __data.__lock field.
2584 (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
2585 __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
2586 to lll_robust_cond_lock.
2587 * pthread_cond_broadcast.c (__pthread_cond_broadcast): Add pshared
2588 variable, pass it to lll_lock, lll_unlock, lll_futex_requeue and
2589 lll_futex_wake. Don't use lll_futex_requeue if dependent mutex
2590 has PTHREAD_MUTEX_PSHARED_BIT bit set in its __data.__kind.
2591 * pthread_cond_destroy.c (__pthread_cond_destroy): Add pshared
2592 variable, pass it to lll_lock, lll_unlock, lll_futex_wake and
2593 lll_futex_wait.
2594 * pthread_cond_signal.c (__pthread_cond_signal): Add pshared
2595 variable, pass it to lll_lock, lll_unlock, lll_futex_wake_unlock and
2596 lll_futex_wake.
2597 * pthread_cond_timedwait.c (__pthread_cond_wait): Add
2598 pshared variable, pass it to lll_lock, lll_unlock,
2599 lll_futex_timedwait and lll_futex_wake.
2600 * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait): Add
2601 pshared variable, pass it to lll_lock, lll_unlock, lll_futex_wait
2602 and lll_futex_wake.
2603 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_requeue,
2604 lll_futex_wake_unlock): Add private argument, use __lll_private_flag
2605 macro.
2606 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue,
2607 lll_futex_wake_unlock): Likewise.
2608 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_requeue):
2609 Likewise.
2610 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_futex_requeue,
2611 lll_futex_wake_unlock): Likewise.
2612 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_requeue):
2613 Likewise.
2614 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue,
2615 lll_futex_wake_unlock): Likewise.
2616 (lll_futex_wake): Fix a typo.
2617 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym (PS_BIT): Add.
2618 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
2619 (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
2620 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2621 Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
2622 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
2623 (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
2624 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2625 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
2626 (__pthread_cond_timedwait): Likewise.
2627 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
2628 (__condvar_cleanup, __pthread_cond_wait): Likewise.
2629
0470fa46
JJ
26302007-08-05 Jakub Jelinek <jakub@redhat.com>
2631
2632 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
2633 Don't use CGOTSETUP and CGOTRESTORE macros.
2634 (CGOTSETUP, CGOTRESTORE): Remove.
2635 <IS_IN_rtld> (CENABLE, CDISABLE): Don't use JUMPTARGET, branch to
2636 @local symbol.
2637
64f6281c
UD
26382007-08-01 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2639
2640 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Remove
2641 definitions for private futexes.
2642 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Include
2643 kernel-features.h and lowlevellock.h. Use private futexes if
2644 they are available.
2645 (__lll_lock_wait_private, __lll_unlock_wake_private): New.
2646 (__lll_mutex_lock_wait): Rename to
2647 (__lll_lock_wait): ... this. Don't compile in for libc.so.
2648 (__lll_mutex_timedlock_wait): Rename to ...
2649 (__lll_timedlock_wait): ... this. Use __NR_gettimeofday.
2650 Don't compile in for libc.so.
2651 (__lll_mutex_unlock_wake): Rename to ...
2652 (__lll_unlock_wake): ... this. Don't compile in for libc.so.
2653 (__lll_timedwait_tid): Use __NR_gettimeofday.
2654 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Allow including
2655 the header from assembler. Renamed all lll_mutex_* resp.
2656 lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
2657 Renamed all LLL_MUTEX_LOCK_* macros to LLL_LOCK_*.
2658 (FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE):
2659 Define.
2660 (__lll_lock_wait_private): Add prototype.
2661 (__lll_lock_wait, __lll_timedlock_wait, __lll_robust_lock_wait,
2662 __lll_robust_timedlock_wait, __lll_unlock_wake_private,
2663 __lll_unlock_wake): Likewise.
2664 (lll_lock): Add private argument. Call __lll_lock_wait_private
2665 if private is constant LLL_PRIVATE.
2666 (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
2667 lll_timedlock, lll_robust_timedlock): Add private argument.
2668 (lll_unlock): Add private argument. Call __lll_unlock_wake_private
2669 if private is constant LLL_PRIVATE.
2670 (lll_robust_unlock, lll_robust_dead): Add private argument.
2671 (lll_lock_t): Remove.
2672 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
2673 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
2674 lll_cond_wake, lll_cond_broadcast): Remove.
2675 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: Include
2676 kernel-features.h and lowlevellock.h.
2677 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
2678 (LOAD_FUTEX_WAIT): Define.
2679 (__lll_robust_mutex_lock_wait): Rename to ...
2680 (__lll_robust_lock_wait): ... this. Add private argument.
2681 Use LOAD_FUTEX_WAIT macro.
2682 (__lll_robust_mutex_timedlock_wait): Rename to ...
2683 (__lll_robust_timedlock_wait): ... this. Add private argument.
2684 Use __NR_gettimeofday. Use LOAD_FUTEX_WAIT macro.
2685 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Include
2686 lowlevellock.h.
2687 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
2688 (pthread_barrier_wait): Use __lll_{lock,unlock}_* instead of
2689 __lll_mutex_{lock,unlock}_*.
2690 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Include
2691 lowlevellock.h and pthread-errnos.h.
2692 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
2693 FUTEX_CMP_REQUEUE, EINVAL): Remove.
2694 (__pthread_cond_broadcast): Use __lll_{lock,unlock}_* instead of
2695 __lll_mutex_{lock,unlock}_*.
2696 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Include
2697 lowlevellock.h and pthread-errnos.h.
2698 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE, EINVAL): Remove.
2699 (__pthread_cond_signal): Use __lll_{lock,unlock}_* instead of
2700 __lll_mutex_{lock,unlock}_*.
2701 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
2702 lowlevellock.h.
2703 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE): Remove.
2704 (__pthread_cond_timedwait): Use __lll_{lock,unlock}_* instead of
2705 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
2706 (__condvar_tw_cleanup): Likewise.
2707 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
2708 lowlevellock.h.
2709 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
2710 (__pthread_cond_wait): Use __lll_{lock,unlock}_* instead of
2711 __lll_mutex_{lock,unlock}_*.
2712 ( __condvar_w_cleanup): Likewise.
2713 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Include lowlevellock.h.
2714 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
2715 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Include
2716 lowlevellock.h.
2717 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
2718 (__pthread_rwlock_rdlock): Use __lll_{lock,unlock}_* instead of
2719 __lll_mutex_{lock,unlock}_*.
2720 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Include
2721 lowlevellock.h.
2722 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
2723 FUTEX_PRIVATE_FLAG): Remove.
2724 (pthread_rwlock_timedrdlock): Use __lll_{lock,unlock}_* instead of
2725 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
2726 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Include
2727 lowlevellock.h.
2728 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
2729 FUTEX_PRIVATE_FLAG): Remove.
2730 (pthread_rwlock_timedwrlock): Use __lll_{lock,unlock}_* instead of
2731 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
2732 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Include
2733 lowlevellock.h.
2734 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
2735 (__pthread_rwlock_unlock): Use __lll_{lock,unlock}_* instead of
2736 __lll_mutex_{lock,unlock}_*.
2737 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Include
2738 lowlevellock.h.
2739 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
2740 (__pthread_rwlock_wrlock): Use __lll_{lock,unlock}_* instead of
2741 __lll_mutex_{lock,unlock}_*.
2742 * sysdeps/unix/sysv/linux/sh/sem_post.S: Include lowlevellock.h.
2743 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
2744 (__new_sem_post): Use standard initial exec code sequences.
2745 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Include
2746 lowlevellock.h.
2747 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
2748 FUTEX_PRIVATE_FLAG): Remove.
2749 (sem_timedwait): Use __NR_gettimeofday. Use standard initial
2750 exec code sequences.
2751 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Include lowlevellock.h.
2752 (__new_sem_trywait): Use standard initial exec code sequences.
2753 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Include lowlevellock.h.
2754 (__new_sem_wait): Use standard initial exec code sequences.
2755
e51deae7
UD
27562007-07-31 Anton Blanchard <anton@samba.org>
2757
2758 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
2759 Use __asm __volatile (__lll_acq_instr ::: "memory") instead of
2760 atomic_full_barrier.
2761
27622007-07-31 Jakub Jelinek <jakub@redhat.com>
2763
2764 * allocatestack.c (stack_cache_lock): Change type to int.
2765 (get_cached_stack, allocate_stack, __deallocate_stack,
2766 __make_stacks_executable, __find_thread_by_id, __nptl_setxid,
2767 __pthread_init_static_tls, __wait_lookup_done): Add LLL_PRIVATE
2768 as second argument to lll_lock and lll_unlock macros on
2769 stack_cache_lock.
2770 * pthread_create.c (__find_in_stack_list): Likewise.
2771 (start_thread): Similarly with pd->lock. Use lll_robust_dead
2772 macro instead of lll_robust_mutex_dead, pass LLL_SHARED to it
2773 as second argument.
2774 * descr.h (struct pthread): Change lock and setxid_futex field
2775 type to int.
2776 * old_pthread_cond_broadcast.c (__pthread_cond_broadcast_2_0): Use
2777 LLL_LOCK_INITIALIZER instead of LLL_MUTEX_LOCK_INITIALIZER.
2778 * old_pthread_cond_signal.c (__pthread_cond_signal_2_0): Likewise.
2779 * old_pthread_cond_timedwait.c (__pthread_cond_timedwait_2_0):
2780 Likewise.
2781 * old_pthread_cond_wait.c (__pthread_cond_wait_2_0): Likewise.
2782 * pthread_cond_init.c (__pthread_cond_init): Likewise.
2783 * pthreadP.h (__attr_list_lock): Change type to int.
2784 * pthread_attr_init.c (__attr_list_lock): Likewise.
2785 * pthread_barrier_destroy.c (pthread_barrier_destroy): Pass
2786 ibarrier->private ^ FUTEX_PRIVATE_FLAG as second argument to
2787 lll_{,un}lock.
2788 * pthread_barrier_wait.c (pthread_barrier_wait): Likewise and
2789 also for lll_futex_{wake,wait}.
2790 * pthread_barrier_init.c (pthread_barrier_init): Make iattr
2791 a pointer to const.
2792 * pthread_cond_broadcast.c (__pthread_cond_broadcast): Pass
2793 LLL_SHARED as second argument to lll_{,un}lock.
2794 * pthread_cond_destroy.c (__pthread_cond_destroy): Likewise.
2795 * pthread_cond_signal.c (__pthread_cond_singal): Likewise.
2796 * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
2797 * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait):
2798 Likewise.
2799 * pthread_getattr_np.c (pthread_getattr_np): Add LLL_PRIVATE
2800 as second argument to lll_{,un}lock macros on pd->lock.
2801 * pthread_getschedparam.c (__pthread_getschedparam): Likewise.
2802 * pthread_setschedparam.c (__pthread_setschedparam): Likewise.
2803 * pthread_setschedprio.c (pthread_setschedprio): Likewise.
2804 * tpp.c (__pthread_tpp_change_priority, __pthread_current_priority):
2805 Likewise.
2806 * sysdeps/pthread/createthread.c (do_clone, create_thread):
2807 Likewise.
2808 * pthread_once.c (once_lock): Change type to int.
2809 (__pthread_once): Pass LLL_PRIVATE as second argument to
2810 lll_{,un}lock macros on once_lock.
2811 * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Use
2812 lll_{,un}lock macros instead of lll_mutex_{,un}lock, pass
2813 rwlock->__data.__shared as second argument to them and similarly
2814 for lll_futex_w*.
2815 * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock):
2816 Likewise.
2817 * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock):
2818 Likewise.
2819 * pthread_rwlock_tryrdlock.c (__pthread_rwlock_tryrdlock): Likewise.
2820 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Likewise.
2821 * pthread_rwlock_unlock.c (__pthread_rwlock_unlock): Likewise.
2822 * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
2823 * sem_close.c (sem_close): Pass LLL_PRIVATE as second argument
2824 to lll_{,un}lock macros on __sem_mappings_lock.
2825 * sem_open.c (check_add_mapping): Likewise.
2826 (__sem_mappings_lock): Change type to int.
2827 * semaphoreP.h (__sem_mappings_lock): Likewise.
2828 * pthread_mutex_lock.c (LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
2829 LLL_ROBUST_MUTEX_LOCK): Use lll_{,try,robust_}lock macros
2830 instead of lll_*mutex_*, pass LLL_SHARED as last
2831 argument.
2832 (__pthread_mutex_lock): Use lll_unlock instead of lll_mutex_unlock,
2833 pass LLL_SHARED as last argument.
2834 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK,
2835 LLL_MUTEX_TRYLOCK, LLL_ROBUST_MUTEX_LOCK): Use
2836 lll_{cond_,cond_try,robust_cond}lock macros instead of lll_*mutex_*,
2837 pass LLL_SHARED as last argument.
2838 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
2839 lll_{timed,try,robust_timed,un}lock instead of lll_*mutex*, pass
2840 LLL_SHARED as last argument.
2841 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Similarly.
2842 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt):
2843 Similarly.
2844 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_lock,
2845 __libc_lock_lock_recursive, __libc_lock_unlock,
2846 __libc_lock_unlock_recursive): Pass LLL_PRIVATE as second
2847 argument to lll_{,un}lock.
2848 * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_lock,
2849 _IO_lock_unlock): Likewise.
2850 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Don't use
2851 compound literal.
2852 * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
2853 Pass LLL_PRIVATE as second argument to lll_{,un}lock macros on
2854 __fork_lock.
2855 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork,
2856 free_mem): Likewise.
2857 (__fork_lock): Change type to int.
2858 * sysdeps/unix/sysv/linux/fork.h (__fork_lock): Likewise.
2859 * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Pass
2860 isem->private ^ FUTEX_PRIVATE_FLAG as second argument to
2861 lll_futex_wake.
2862 * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
2863 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Likewise.
2864 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait_private):
2865 New function.
2866 (__lll_lock_wait, __lll_timedlock_wait): Add private argument and
2867 pass it through to lll_futex_*wait, only compile in when
2868 IS_IN_libpthread.
2869 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
2870 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): Add private
2871 argument and pass it through to lll_futex_*wait.
2872 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Renamed all
2873 lll_mutex_* resp. lll_robust_mutex_* macros to lll_* resp.
2874 lll_robust_*. Renamed all __lll_mutex_* resp. __lll_robust_mutex_*
2875 inline functions to __lll_* resp. __lll_robust_*.
2876 (LLL_MUTEX_LOCK_INITIALIZER): Remove.
2877 (lll_mutex_dead): Add private argument.
2878 (__lll_lock_wait_private): New prototype.
2879 (__lll_lock_wait, __lll_robust_lock_wait, __lll_lock_timedwait,
2880 __lll_robust_lock_timedwait): Add private argument to prototypes.
2881 (__lll_lock): Add private argument, if it is constant LLL_PRIVATE,
2882 call __lll_lock_wait_private, otherwise pass private to
2883 __lll_lock_wait.
2884 (__lll_robust_lock, __lll_cond_lock, __lll_timedlock,
2885 __lll_robust_timedlock): Add private argument, pass it to
2886 __lll_*wait functions.
2887 (__lll_unlock): Add private argument, if it is constant LLL_PRIVATE,
2888 call __lll_unlock_wake_private, otherwise pass private to
2889 __lll_unlock_wake.
2890 (__lll_robust_unlock): Add private argument, pass it to
2891 __lll_robust_unlock_wake.
2892 (lll_lock, lll_robust_lock, lll_cond_lock, lll_timedlock,
2893 lll_robust_timedlock, lll_unlock, lll_robust_unlock): Add private
2894 argument, pass it through to __lll_* inline function.
2895 (__lll_mutex_unlock_force, lll_mutex_unlock_force): Remove.
2896 (lll_lock_t): Remove.
2897 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
2898 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
2899 lll_cond_wake, lll_cond_broadcast): Remove.
2900 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2901 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2902 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2903 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
2904 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Allow including
2905 the header from assembler. Renamed all lll_mutex_* resp.
2906 lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
2907 (LOCK, FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP,
2908 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
2909 (LLL_MUTEX_LOCK_INITIALIZER, LLL_MUTEX_LOCK_INITIALIZER_LOCKED,
2910 LLL_MUTEX_LOCK_INITIALIZER_WAITERS): Remove.
2911 (__lll_mutex_lock_wait, __lll_mutex_timedlock_wait,
2912 __lll_mutex_unlock_wake, __lll_lock_wait, __lll_unlock_wake):
2913 Remove prototype.
2914 (__lll_trylock_asm, __lll_lock_asm_start, __lll_unlock_asm): Define.
2915 (lll_robust_trylock, lll_cond_trylock): Use LLL_LOCK_INITIALIZER*
2916 rather than LLL_MUTEX_LOCK_INITIALIZER* macros.
2917 (lll_trylock): Likewise, use __lll_trylock_asm, pass
2918 MULTIPLE_THREADS_OFFSET as another asm operand.
2919 (lll_lock): Add private argument, use __lll_lock_asm_start, pass
2920 MULTIPLE_THREADS_OFFSET as last asm operand, call
2921 __lll_lock_wait_private if private is constant LLL_PRIVATE,
2922 otherwise pass private as another argument to __lll_lock_wait.
2923 (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
2924 lll_timedlock, lll_robust_timedlock): Add private argument, pass
2925 private as another argument to __lll_*lock_wait call.
2926 (lll_unlock): Add private argument, use __lll_unlock_asm, pass
2927 MULTIPLE_THREADS_OFFSET as another asm operand, call
2928 __lll_unlock_wake_private if private is constant LLL_PRIVATE,
2929 otherwise pass private as another argument to __lll_unlock_wake.
2930 (lll_robust_unlock): Add private argument, pass private as another
2931 argument to __lll_unlock_wake.
2932 (lll_robust_dead): Add private argument, use __lll_private_flag
2933 macro.
2934 (lll_islocked): Use LLL_LOCK_INITIALIZER instead of
2935 LLL_MUTEX_LOCK_INITIALIZER.
2936 (lll_lock_t): Remove.
2937 (LLL_LOCK_INITIALIZER_WAITERS): Define.
2938 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
2939 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
2940 lll_cond_wake, lll_cond_broadcast): Remove.
2941 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2942 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Revert
2943 2007-05-2{3,9} changes.
2944 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Include
2945 kernel-features.h and lowlevellock.h.
2946 (LOAD_PRIVATE_FUTEX_WAIT): Define.
2947 (LOAD_FUTEX_WAIT): Rewritten.
2948 (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
2949 define.
2950 (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
2951 (__lll_mutex_lock_wait): Rename to ...
2952 (__lll_lock_wait): ... this. Take futex addr from %edx instead of
2953 %ecx, %ecx is now private argument. Don't compile in for libc.so.
2954 (__lll_mutex_timedlock_wait): Rename to ...
2955 (__lll_timedlock_wait): ... this. Use __NR_gettimeofday. %esi
2956 contains private argument. Don't compile in for libc.so.
2957 (__lll_mutex_unlock_wake): Rename to ...
2958 (__lll_unlock_wake): ... this. %ecx contains private argument.
2959 Don't compile in for libc.so.
2960 (__lll_timedwait_tid): Use __NR_gettimeofday.
2961 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Include
2962 kernel-features.h and lowlevellock.h.
2963 (LOAD_FUTEX_WAIT): Define.
2964 (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
2965 define.
2966 (__lll_robust_mutex_lock_wait): Rename to ...
2967 (__lll_robust_lock_wait): ... this. Futex addr is now in %edx
2968 argument, %ecx argument contains private. Use LOAD_FUTEX_WAIT
2969 macro.
2970 (__lll_robust_mutex_timedlock_wait): Rename to ...
2971 (__lll_robust_timedlock_wait): ... this. Use __NR_gettimeofday.
2972 %esi argument contains private, use LOAD_FUTEX_WAIT macro.
2973 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Include
2974 lowlevellock.h.
2975 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2976 (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
2977 PRIVATE(%ebx) ^ LLL_SHARED as private argument in %ecx to
2978 __lll_lock_wait and __lll_unlock_wake, pass MUTEX(%ebx) address
2979 to __lll_lock_wait in %edx.
2980 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
2981 Include lowlevellock.h and pthread-errnos.h.
2982 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
2983 FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
2984 (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*, pass
2985 cond_lock address in %edx rather than %ecx to __lll_lock_wait,
2986 pass LLL_SHARED in %ecx to both __lll_lock_wait and
2987 __lll_unlock_wake.
2988 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
2989 Include lowlevellock.h and pthread-errnos.h.
2990 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
2991 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
2992 (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*, pass
2993 cond_lock address in %edx rather than %ecx to __lll_lock_wait,
2994 pass LLL_SHARED in %ecx to both __lll_lock_wait and
2995 __lll_unlock_wake.
2996 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
2997 Include lowlevellock.h.
2998 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
2999 Don't define.
3000 (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*, pass
3001 cond_lock address in %edx rather than %ecx to __lll_lock_wait,
3002 pass LLL_SHARED in %ecx to both __lll_lock_wait and
3003 __lll_unlock_wake. Use __NR_gettimeofday.
3004 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
3005 Include lowlevellock.h.
3006 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3007 (__pthread_cond_wait, __condvar_w_cleanup): Rename __lll_mutex_*
3008 to __lll_*, pass cond_lock address in %edx rather than %ecx to
3009 __lll_lock_wait, pass LLL_SHARED in %ecx to both __lll_lock_wait
3010 and __lll_unlock_wake.
3011 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S:
3012 Include lowlevellock.h.
3013 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3014 (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*, pass
3015 MUTEX(%ebx) address in %edx rather than %ecx to
3016 __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
3017 and __lll_unlock_wake. Move return value from %ecx to %edx
3018 register.
3019 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
3020 Include lowlevellock.h.
3021 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
3022 Don't define.
3023 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
3024 MUTEX(%ebp) address in %edx rather than %ecx to
3025 __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
3026 and __lll_unlock_wake. Move return value from %ecx to %edx
3027 register. Use __NR_gettimeofday.
3028 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
3029 Include lowlevellock.h.
3030 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
3031 Don't define.
3032 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
3033 MUTEX(%ebp) address in %edx rather than %ecx to
3034 __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
3035 and __lll_unlock_wake. Move return value from %ecx to %edx
3036 register. Use __NR_gettimeofday.
3037 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
3038 Include lowlevellock.h.
3039 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3040 (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*, pass
3041 MUTEX(%edi) address in %edx rather than %ecx to
3042 __lll_lock_wait, pass PSHARED(%edi) in %ecx to both __lll_lock_wait
3043 and __lll_unlock_wake.
3044 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
3045 Include lowlevellock.h.
3046 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3047 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
3048 MUTEX(%ebx) address in %edx rather than %ecx to
3049 __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
3050 and __lll_unlock_wake. Move return value from %ecx to %edx
3051 register.
3052 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Include
3053 lowlevellock.h.
3054 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
3055 define.
3056 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Include lowlevellock.h.
3057 (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
3058 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Include
3059 lowlevellock.h.
3060 (LOCK, SYS_futex, SYS_gettimeofday, FUTEX_WAIT): Don't define.
3061 (sem_timedwait): Use __NR_gettimeofday.
3062 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Include
3063 lowlevellock.h.
3064 (LOCK): Don't define.
3065 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include
3066 lowlevellock.h.
3067 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
3068 * sysdeps/unix/sysv/linux/powerpc/sem_post.c: Wake only when there
3069 are waiters.
3070 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Revert
3071 2007-05-2{3,9} changes.
3072 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Include
3073 kernel-features.h and lowlevellock.h.
3074 (LOAD_PRIVATE_FUTEX_WAIT): Define.
3075 (LOAD_FUTEX_WAIT): Rewritten.
3076 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
3077 (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
3078 (__lll_mutex_lock_wait): Rename to ...
3079 (__lll_lock_wait): ... this. %esi is now private argument.
3080 Don't compile in for libc.so.
3081 (__lll_mutex_timedlock_wait): Rename to ...
3082 (__lll_timedlock_wait): ... this. %esi contains private argument.
3083 Don't compile in for libc.so.
3084 (__lll_mutex_unlock_wake): Rename to ...
3085 (__lll_unlock_wake): ... this. %esi contains private argument.
3086 Don't compile in for libc.so.
3087 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Include
3088 kernel-features.h and lowlevellock.h.
3089 (LOAD_FUTEX_WAIT): Define.
3090 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
3091 (__lll_robust_mutex_lock_wait): Rename to ...
3092 (__lll_robust_lock_wait): ... this. %esi argument contains private.
3093 Use LOAD_FUTEX_WAIT macro.
3094 (__lll_robust_mutex_timedlock_wait): Rename to ...
3095 (__lll_robust_timedlock_wait): ... this. %esi argument contains
3096 private, use LOAD_FUTEX_WAIT macro.
3097 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Include
3098 lowlevellock.h.
3099 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3100 (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
3101 PRIVATE(%rdi) ^ LLL_SHARED as private argument in %esi to
3102 __lll_lock_wait and __lll_unlock_wake.
3103 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S:
3104 Include lowlevellock.h and pthread-errnos.h.
3105 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
3106 FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
3107 (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*,
3108 pass LLL_SHARED in %esi to both __lll_lock_wait and
3109 __lll_unlock_wake.
3110 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S:
3111 Include lowlevellock.h and pthread-errnos.h.
3112 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
3113 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
3114 (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*,
3115 pass LLL_SHARED in %esi to both __lll_lock_wait and
3116 __lll_unlock_wake.
3117 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:
3118 Include lowlevellock.h.
3119 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3120 (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*,
3121 pass LLL_SHARED in %esi to both __lll_lock_wait and
3122 __lll_unlock_wake.
3123 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
3124 Include lowlevellock.h.
3125 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3126 (__pthread_cond_wait, __condvar_cleanup): Rename __lll_mutex_*
3127 to __lll_*, pass LLL_SHARED in %esi to both __lll_lock_wait
3128 and __lll_unlock_wake.
3129 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S:
3130 Include lowlevellock.h.
3131 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
3132 Don't define.
3133 (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*,
3134 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
3135 and __lll_unlock_wake.
3136 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
3137 Include lowlevellock.h.
3138 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
3139 Don't define.
3140 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
3141 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
3142 and __lll_unlock_wake.
3143 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3144 Include lowlevellock.h.
3145 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
3146 Don't define.
3147 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
3148 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
3149 and __lll_unlock_wake.
3150 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S:
3151 Include lowlevellock.h.
3152 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
3153 Don't define.
3154 (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*,
3155 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
3156 and __lll_unlock_wake.
3157 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S:
3158 Include lowlevellock.h.
3159 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
3160 Don't define.
3161 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
3162 pass PSHARED(%rdi) in %ecx to both __lll_lock_wait
3163 and __lll_unlock_wake.
3164 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Include
3165 lowlevellock.h.
3166 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
3167 define.
3168 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Include lowlevellock.h.
3169 (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
3170 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Include
3171 lowlevellock.h.
3172 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
3173 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Include
3174 lowlevellock.h.
3175 (LOCK): Don't define.
3176 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Include
3177 lowlevellock.h.
3178 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
3179 * sysdeps/unix/sysv/linux/sparc/internaltypes.h: New file.
3180 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_destroy.c: New file.
3181 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_init.c: New file.
3182 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_wait.c: New file.
3183 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
3184 (__lll_lock_wait_private): New function.
3185 (__lll_lock_wait, __lll_timedlock_wait): Add private argument, pass
3186 it to lll_futex_*wait. Don't compile in for libc.so.
3187 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c:
3188 Remove.
3189 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c
3190 (struct sparc_pthread_barrier): Remove.
3191 (pthread_barrier_wait): Use union sparc_pthread_barrier instead of
3192 struct sparc_pthread_barrier. Pass
3193 ibarrier->s.pshared ? LLL_SHARED : LLL_PRIVATE to lll_{,un}lock
3194 and lll_futex_wait macros.
3195 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
3196 Remove.
3197 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
3198 Include sparc pthread_barrier_wait.c instead of generic one.
3199
6f59d56e
UD
32002007-07-30 Jakub Jelinek <jakub@redhat.com>
3201
1475e201
UD
3202 * tst-rwlock14.c (do_test): Avoid warnings on 32-bit arches.
3203
6f59d56e
UD
3204 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
3205 (pthread_rwlock_timedrdlock): Copy futex retval to %esi rather than
3206 %ecx.
3207 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
3208 (pthread_rwlock_timedwrlock): Likewise.
3209 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
3210 (__pthread_rwlock_unlock): Fix MUTEX != 0 args to __lll_*.
3211
558f0300
JJ
32122007-07-31 Jakub Jelinek <jakub@redhat.com>
3213
3214 * sysdeps/sparc/tls.h (tcbhead_t): Add private_futex field.
3215
cedb4109
UD
32162007-07-26 Jakub Jelinek <jakub@redhat.com>
3217
3218 * tst-locale2.c (useless): Add return statement.
3219
085a4412
UD
32202007-07-24 Jakub Jelinek <jakub@redhat.com>
3221
3222 * allocatestack.c (__nptl_setxid, __wait_lookup_done): Replace
3223 lll_private_futex_* (*) with lll_futex_* (*, LLL_PRIVATE).
3224 * pthread_create.c (start_thread): Likewise.
3225 * init.c (sighandler_setxid): Likewise.
3226 * sysdeps/alpha/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3227 * sysdeps/ia64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3228 * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3229 * sysdeps/s390/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3230 * sysdeps/powerpc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3231 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3232 * sysdeps/sparc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3233 * sysdeps/sh/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3234 * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY, AIO_MISC_WAIT):
3235 Likewise.
3236 * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY, GAI_MISC_WAIT):
3237 Likewise.
3238 * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
3239 Likewise.
3240 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_waitzero,
3241 __rtld_notify): Likewise.
3242 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Likewise.
3243 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (clear_once_control,
3244 __pthread_once): Likewise.
3245 * sysdeps/unix/sysv/linux/alpha/pthread_once.c (clear_once_control,
3246 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
3247 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_PRIVATE_FLAG,
3248 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
3249 (lll_futex_wait): Add private argument, define as wrapper around
3250 lll_futex_timed_wait.
3251 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
3252 use __lll_private_flag macro.
3253 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
3254 __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
3255 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (clear_once_control,
3256 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
3257 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_PRIVATE_FLAG,
3258 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
3259 (lll_futex_wait): Add private argument, define as wrapper around
3260 lll_futex_timed_wait.
3261 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
3262 use __lll_private_flag macro.
3263 (__lll_mutex_unlock, __lll_robust_mutex_unlock, lll_wait_tid,
3264 __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
3265 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
3266 Define.
3267 (lll_futex_timed_wait, lll_futex_wake): Use it.
3268 (lll_private_futex_wait, lll_private_futex_timed_wait,
3269 lll_private_futex_wake): Removed.
3270 * sysdeps/unix/sysv/linux/s390/pthread_once.c (clear_once_control,
3271 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
3272 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_PRIVATE_FLAG,
3273 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
3274 (lll_futex_wait): Add private argument, define as wrapper around
3275 lll_futex_timed_wait.
3276 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
3277 use __lll_private_flag macro.
3278 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
3279 lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
3280 to lll_futex_*.
3281 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
3282 (lll_private_futex_wait, lll_private_futex_timed_wait,
3283 lll_private_futex_wake): Removed.
3284 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_private_flag):
3285 Fix !__ASSUME_PRIVATE_FUTEX non-constant private case.
3286 (lll_private_futex_wait, lll_private_futex_timed_wait,
3287 lll_private_futex_wake): Removed.
3288 * sysdeps/unix/sysv/linux/sparc/pthread_once.c (clear_once_control,
3289 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
3290 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_PRIVATE_FLAG,
3291 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
3292 (lll_futex_wait): Add private argument, define as wrapper around
3293 lll_futex_timed_wait.
3294 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
3295 use __lll_private_flag macro.
3296 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
3297 lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
3298 to lll_futex_*.
3299 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (__lll_private_flag):
3300 Define.
3301 (lll_futex_timed_wait, lll_futex_wake): Use it.
3302 (lll_private_futex_wait, lll_private_futex_timed_wait,
3303 lll_private_futex_wake): Removed.
3304
ef0af159
JJ
33052007-07-27 Jakub Jelinek <jakub@redhat.com>
3306
3307 * sysdeps/sparc/tls.h (tcbhead_t): Move gscope_flag to the end
3308 of the structure for sparc32.
3309
33102007-07-26 Aurelien Jarno <aurelien@aurel32.net>
3311
3312 * sysdeps/sparc/tls.h (tcbhead_t): Add gscope_flag.
3313
eb4f5909
UD
33142007-07-23 Ulrich Drepper <drepper@redhat.com>
3315
3316 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
3317 code used when private futexes are assumed.
3318 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3319 Likewise.
3320
b5f13526
UD
33212007-07-23 Jakub Jelinek <jakub@redhat.com>
3322
3323 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
3324 (__lll_private_flag): Define.
3325 (lll_futex_wait): Define as a wrapper around lll_futex_timed_wait.
3326 (lll_futex_timed_wait, lll_futex_wake, lll_futex_wake_unlock): Use
3327 __lll_private_flag.
3328 (lll_private_futex_wait, lll_private_futex_timedwait,
3329 lll_private_futex_wake): Define as wrapper around non-_private
3330 macros.
3331 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
3332 (__lll_private_flag): Define.
3333 (lll_futex_timed_wait, lll_futex_wake): Use __lll_private_flag.
3334 (lll_private_futex_wait, lll_private_futex_timedwait,
3335 lll_private_futex_wake): Define as wrapper around non-_private
3336 macros.
3337
eb7721f2
UD
33382007-07-10 Steven Munroe <sjmunroe@us.ibm.com>
3339
3340 * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Add LLL_SHARED
3341 parameter to lll_futex_wait call.
3342 * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
3343
3344 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
3345 Replace lll_futex_wait with lll_private_futex_wait.
3346 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
3347 Add LLL_SHARED parameter to lll_futex_wake().
3348
3349 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define LLL_PRIVATE
3350 LLL_SHARED, lll_private_futex_wait, lll_private_futex_timed_wait and
3351 lll_private_futex_wake.
3352 (lll_futex_wait): Add private parameter. Adjust FUTEX_PRIVATE_FLAG
3353 bit from private parm before syscall.
3354 (lll_futex_timed_wait): Likewise.
3355 (lll_futex_wake): Likewise.
3356 (lll_futex_wake_unlock): Likewise.
3357 (lll_mutex_unlock): Add LLL_SHARED parm to lll_futex_wake call.
3358 (lll_robust_mutex_unlock): Likewise.
3359 (lll_mutex_unlock_force): Likewise.
3360 (lll_wait_tid): Add LLL_SHARED parm to lll_futex_wait call.
3361
defc45f2
UD
33622007-07-23 Ulrich Drepper <drepper@redhat.com>
3363
3364 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
3365 compilation when unconditionally using private futexes.
3366 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
3367 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3368 Likewise.
3369 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
3370 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
3371
087722b8
UD
33722007-07-17 Jakub Jelinek <jakub@redhat.com>
3373
3374 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock_clear_flags2):
3375 Define.
3376
765c6b0c
UD
33772007-07-06 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3378
3379 * sysdeps/sh/tls.h: Include stdlib.h, list.h, sysdep.h and
3380 kernel-features.h.
3381
7d9d8bd1
RM
33822007-05-16 Roland McGrath <roland@redhat.com>
3383
3384 * init.c (__nptl_initial_report_events): New variable.
3385 (__pthread_initialize_minimal_internal): Initialize pd->report_events
3386 to that.
3387
a4915df2
UD
33882007-06-22 Jakub Jelinek <jakub@redhat.com>
3389
3390 * pthread_getattr_np.c (pthread_getattr_np): Clear cpuset and
3391 cpusetsize if pthread_getaffinity_np failed with ENOSYS.
3392
e4eb675d
UD
33932007-06-19 Ulrich Drepper <drepper@redhat.com>
3394
3395 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Remove mrlock
3396 implementation.
3397
ae1ad3ae
UD
33982007-06-18 Ulrich Drepper <drepper@redhat.com>
3399
3400 * pthreadP.h: Define PTHREAD_MUTEX_TYPE.
3401 * phtread_mutex_lock.c: Use PTHREAD_MUTEX_TYPE.
3402 * pthread_mutex_timedlock.c: Likewise.
3403 * pthread_mutex_trylock.c: Likewise.
3404 * pthread_mutex_unlock.c: Likewise.
3405
89074592
UD
34062007-06-17 Andreas Schwab <schwab@suse.de>
3407
3408 * sysdeps/pthread/pt-initfini.c: Tell gcc about the nonstandard
3409 sections.
3410
d4201cc4
UD
34112007-06-17 Ulrich Drepper <drepper@redhat.com>
3412
3413 * allocatestack.c (allocate_stack): Make code compile if
3414 __ASSUME_PRIVATE_FUTEX is set.
3415
339dbf0e
UD
34162007-06-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3417
3418 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S:
3419 (__pthread_rwlock_rdlock): Don't use non SH-3/4 instruction.
3420 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S:
3421 (__pthread_rwlock_wrlock): Likewise.
3422 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
3423 (pthread_rwlock_timedrdlock): Likewise.
3424 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
3425 (pthread_rwlock_timedwrlock): Likewise.
3426 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S:
3427 (__pthread_rwlock_unlock): Likewise.
3428
34292007-06-10 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3430
3431 * sysdeps/sh/tcb-offsets.sym: Add PRIVATE_FUTEX.
3432 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Include endian.h.
3433 Split __flags into __flags, __shared, __pad1 and __pad2.
3434 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Use private
b42a214c 3435 futexes if they are available.
339dbf0e 3436 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Adjust so that change
b42a214c 3437 in libc-lowlevellock.S allow using private futexes.
339dbf0e
UD
3438 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
3439 FUTEX_PRIVATE_FLAG. Add additional parameter to lll_futex_wait,
3440 lll_futex_timed_wait and lll_futex_wake. Change lll_futex_wait
3441 to call lll_futex_timed_wait. Add lll_private_futex_wait,
3442 lll_private_futex_timed_wait and lll_private_futex_wake.
3443 (lll_robust_mutex_unlock): Fix typo.
3444 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Use private
b42a214c 3445 field in futex command setup.
339dbf0e
UD
3446 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Use
3447 COND_NWAITERS_SHIFT instead of COND_CLOCK_BITS.
3448 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
3449 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use private futexes
b42a214c 3450 if they are available. Remove clear_once_control.
339dbf0e
UD
3451 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Use private
3452 futexes if they are available.
3453 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
3454 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
3455 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
3456 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
3457 * sysdeps/unix/sysv/linux/sh/sem_post.S: Add private futex support.
3458 Wake only when there are waiters.
3459 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add private futex
3460 support. Indicate that there are waiters. Remove unnecessary
b42a214c 3461 extra cancellation test.
339dbf0e
UD
3462 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise. Removed
3463 left-over duplication of __sem_wait_cleanup.
3464
26f56c1c
UD
34652007-06-07 Ulrich Drepper <drepper@redhat.com>
3466
3467 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Add additional
3468 parameter to lll_futex_wait, lll_futex_timed_wait, and
3469 lll_futex_wake. Change lll_futex_wait to call lll_futex_timed_wait.
3470 Add lll_private_futex_wait, lll_private_futex_timed_wait, and
3471 lll_private_futex_wake.
3472 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
3473 * allocatestack.c: Adjust use of lll_futex_* macros.
3474 * init.c: Likewise.
3475 * lowlevellock.h: Likewise.
3476 * pthread_barrier_wait.c: Likewise.
3477 * pthread_cond_broadcast.c: Likewise.
3478 * pthread_cond_destroy.c: Likewise.
3479 * pthread_cond_signal.c: Likewise.
3480 * pthread_cond_timedwait.c: Likewise.
3481 * pthread_cond_wait.c: Likewise.
3482 * pthread_create.c: Likewise.
3483 * pthread_mutex_lock.c: Likewise.
3484 * pthread_mutex_setprioceiling.c: Likewise.
3485 * pthread_mutex_timedlock.c: Likewise.
3486 * pthread_mutex_unlock.c: Likewise.
3487 * pthread_rwlock_timedrdlock.c: Likewise.
3488 * pthread_rwlock_timedwrlock.c: Likewise.
3489 * pthread_rwlock_unlock.c: Likewise.
3490 * sysdeps/alpha/tls.h: Likewise.
3491 * sysdeps/i386/tls.h: Likewise.
3492 * sysdeps/ia64/tls.h: Likewise.
3493 * sysdeps/powerpc/tls.h: Likewise.
3494 * sysdeps/pthread/aio_misc.h: Likewise.
3495 * sysdeps/pthread/gai_misc.h: Likewise.
3496 * sysdeps/s390/tls.h: Likewise.
3497 * sysdeps/sh/tls.h: Likewise.
3498 * sysdeps/sparc/tls.h: Likewise.
3499 * sysdeps/unix/sysv/linux/fork.c: Likewise.
3500 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
3501 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: Likewise.
3502 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Likewise.
3503 * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
3504 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
3505 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
3506 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
3507 * sysdeps/unix/sysv/linux/sparc/pthread_once.c: Likewise.
3508 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c:
3509 Likewise.
3510 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: Likewise.
3511 * sysdeps/x86_64/tls.h: Likewise.
3512
ee5d5755
UD
35132007-05-29 Ulrich Drepper <drepper@redhat.com>
3514
b03b0c29
UD
3515 * pthread_getattr_np.c: No need to install a cancellation handler,
3516 this is no cancellation point.
3517 * pthread_getschedparam.c: Likewise.
3518 * pthread_setschedparam.c: Likewise.
3519 * pthread_setschedprio.c: Likewise.
3520 * sysdeps/unix/sysv/linux/lowlevellock.c: Remove all traces of
3521 lll_unlock_wake_cb.
3522 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
3523 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
3524 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
3525 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
3526 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
3527 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
3528 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
3529 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
3530 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
3531 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: Likewise.
3532 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
3533 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
fc3f0ccb 3534
0154658d
UD
3535 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Checking
3536 whether there are more than one thread makes no sense here since
3537 we only call the slow path if the locks are taken.
3538 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Likewise.
3539
ee5d5755
UD
3540 * sysdeps/unix/sysv/linux/internaltypes.h: Introduce
3541 COND_NWAITERS_SHIFT.
3542 * pthread_cond_destroy.c: Use COND_NWAITERS_SHIFT instead of
3543 COND_CLOCK_BITS.
3544 * pthread_cond_init.c: Likewise.
3545 * pthread_cond_timedwait.c: Likewise.
3546 * pthread_cond_wait.c: Likewise.
3547 * pthread_condattr_getclock.c: Likewise.
3548 * pthread_condattr_setclock.c: Likewise.
3549 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Likewise.
3550 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3551 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
3552 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3553 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3554
991fa82b
UD
35552007-05-28 Jakub Jelinek <jakub@redhat.com>
3556
40f57573
UD
3557 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c: Include
3558 unistd.h.
3559
991fa82b
UD
3560 * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Use explicit
3561 insn suffix.
3562 (THREAD_GSCOPE_GET_FLAG): Remove.
3563 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Remove.
3564 * allocatestack.c (__wait_lookup_done): Revert 2007-05-24
3565 changes.
3566 * sysdeps/powerpc/tls.h (tcbhead_t): Remove gscope_flag.
3567 (THREAD_GSCOPE_GET_FLAG): Remove.
3568 (THREAD_GSCOPE_RESET_FLAG): Use THREAD_SELF->header.gscope_flag
3569 instead of THREAD_GSCOPE_GET_FLAG.
3570 (THREAD_GSCOPE_SET_FLAG): Likewise. Add atomic_write_barrier after
3571 it.
3572 * sysdeps/s390/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
3573 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
3574 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
3575 THREAD_GSCOPE_WAIT): Define.
3576 * sysdeps/sparc/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
3577 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
3578 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
3579 THREAD_GSCOPE_WAIT): Define.
3580 * sysdeps/sh/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
3581 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
3582 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
3583 THREAD_GSCOPE_WAIT): Define.
3584 * sysdeps/ia64/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
3585 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
3586 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
3587 THREAD_GSCOPE_WAIT): Define.
3588
35892007-05-24 Richard Henderson <rth@redhat.com>
3590
3591 * descr.h (struct pthread): Add header.gscope_flag.
3592 * sysdeps/alpha/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
3593 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
3594 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
3595 THREAD_GSCOPE_WAIT): Define.
3596
e59660bc
UD
35972007-05-27 Ulrich Drepper <drepper@redhat.com>
3598
3599 * init.c: Make it compile with older kernel headers.
3600
3601 * tst-initializers1.c: Show through exit code which test failed.
3602
3603 * pthread_rwlock_init.c: Also initialize __shared field.
3604 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Split __flags
3605 element in rwlock structure into four byte elements. One of them is
3606 the new __shared element.
3607 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h [__WORDSIZE=32]:
3608 Likewise.
cd0dbd89 3609 [__WORDSIZE=64]: Renamed __pad1 element int rwlock structure to
e59660bc
UD
3610 __shared, adjust names of other padding elements.
3611 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3612 * sysdeps/pthread/pthread.h: Adjust rwlock initializers.
3613 * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: Add PSHARED.
3614 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define
3615 FUTEX_PRIVATE_FLAG.
3616 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Change main
3617 futex to use private operations if possible.
3618 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
3619 Likewise.
3620 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3621 Likewise.
3622 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
3623 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
50f1dec5
UD
3624 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
3625 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
3626 Likewise.
3627 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
3628 Likewise.
3629 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
3630 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
e59660bc 3631
d8ff3792
UD
36322007-05-26 Ulrich Drepper <drepper@redhat.com>
3633
546346b6
UD
3634 * pthreadP.h (PTHREAD_RWLOCK_PREFER_READER_P): Define.
3635 * pthread_rwlock_rdlock.c: Use PTHREAD_RWLOCK_PREFER_READER_P.
3636 * pthread_rwlock_timedrdlock.c: Likewise.
3637 * pthread_rwlock_tryrdlock.c: Likewise.
3638
a2dd3360
UD
3639 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S (sem_trywait): Tiny
3640 optimization.
3641
6df7ffad
UD
3642 * sysdeps/unix/sysv/linux/sem_wait.c: Add missing break.
3643 * sysdeps/unix/sysv/linux/sem_timedwait.c: Removed left-over
3644 duplication of __sem_wait_cleanup.
3645
3646 * allocatestack.c: Revert last change.
3647 * init.c: Likewise.
3648 * sysdeps/i386/tls.h: Likewise.
3649 * sysdeps/x86_64/tls.h: Likewise.
3650 * descr.h [TLS_DTV_AT_TP] (struct pthread): Add private_futex field to
3651 header structure.
3652 * sysdeps/powerpc/tcb-offsets.sym: Add PRIVATE_FUTEX_OFFSET.
3653
d8ff3792
UD
3654 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_barrier):
3655 Add private field.
3656 * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: Add PRIVATE definition.
3657 * pthread_barrier_init.c: Set private flag if pshared and private
3658 futexes are supported.
3659 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Use
3660 private field in futex command setup.
3661 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
3662
3d2dd6ca
UD
36632007-05-25 Ulrich Drepper <drepper@redhat.com>
3664
42e6c665
UD
3665 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Add private futex
3666 support.
3667 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
3668 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
3669 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
3670 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
3671 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
3672
3d2dd6ca
UD
3673 * semaphoreP.h: Declare __old_sem_init and __old_sem_wait.
3674 * sem_init.c (__new_sem_init): Rewrite to initialize all three
3675 fields in the structure.
3676 (__old_sem_init): New function.
3677 * sem_open.c: Initialize all fields of the structure.
3678 * sem_getvalue.c: Adjust for renamed element.
3679 * sysdeps/unix/sysv/linux/Makefile [subdir=nptl]
3680 (gen-as-const-headers): Add structsem.sym.
3681 * sysdeps/unix/sysv/linux/structsem.sym: New file.
3682 * sysdeps/unix/sysv/linux/internaltypes.h: Rename struct sem to
3683 struct new_sem. Add struct old_sem.
3684 * sysdeps/unix/sysv/linux/sem_post.c: Wake only when there are waiters.
3685 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
3686 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
3687 * sysdeps/unix/sysv/linux/sem_wait.c: Indicate that there are waiters.
3688 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
3689 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
3690 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
3691 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
3692 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
3693 * Makefile (tests): Add tst-sem10, tst-sem11, tst-sem12.
3694 * tst-sem10.c: New file.
3695 * tst-sem11.c: New file.
3696 * tst-sem12.c: New file.
3697 * tst-typesizes.c: Test struct new_sem and struct old_sem instead
3698 of struct sem.
3699
20a4d722
JJ
37002007-05-25 Ulrich Drepper <drepper@redhat.com>
3701 Jakub Jelinek <jakub@redhat.com>
3702
3703 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
3704 Move __pthread_enable_asynccancel right before futex syscall.
3705 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
3706 Likewise.
3707
37082007-05-24 Jakub Jelinek <jakub@redhat.com>
86acd596
UD
3709
3710 * sysdeps/i386/tls.h (THREAD_SET_PRIVATE_FUTEX,
3711 THREAD_COPY_PRIVATE_FUTEX): Define.
3712 * sysdeps/x86_64/tls.h (THREAD_SET_PRIVATE_FUTEX,
3713 THREAD_COPY_PRIVATE_FUTEX): Define.
3714 * allocatestack.c (allocate_stack): Use THREAD_COPY_PRIVATE_FUTEX.
3715 * init.c (__pthread_initialize_minimal_internal): Use
3716 THREAD_SET_PRIVATE_FUTEX.
0a54ab53
UD
3717
3718 * sysdeps/powerpc/tls.h (tcbhead_t): Add gscope_flag.
3719 (THREAD_GSCOPE_FLAG_UNUSED, THREAD_GSCOPE_FLAG_USED,
3720 THREAD_GSCOPE_FLAG_WAIT): Define.
3721 (THREAD_GSCOPE_GET_FLAG, THREAD_GSCOPE_SET_FLAG,
3722 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_WAIT): Define.
3723 * sysdeps/i386/tls.h (THREAD_GSCOPE_WAIT): Don't use
3724 PTR_DEMANGLE.
3725 (THREAD_GSCOPE_GET_FLAG): Define.
3726 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Define.
3727 * allocatestack.c (__wait_lookup_done): Use THREAD_GSCOPE_GET_FLAG
3728 instead of ->header.gscope_flag directly.
3729
5a8075b1
UD
37302007-05-23 Ulrich Drepper <drepper@redhat.com>
3731
3732 * init.c (__pthread_initialize_minimal_internal): Check whether
3733 private futexes are available.
3734 * allocatestack.c (allocate_stack): Copy private_futex field from
3735 current thread into the new stack.
3736 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Use private
3737 futexes if they are available.
3738 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise
3739 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Adjust so that change
3740 in libc-lowlevellock.S allow using private futexes.
3741 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
3742 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
3743 FUTEX_PRIVATE_FLAG.
3744 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
3745 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use private futexes
3746 if they are available.
3747 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
3748 * sysdeps/x86_64/tcb-offsets.sym: Add PRIVATE_FUTEX.
3749 * sysdeps/i386/tcb-offsets.sym: Likewise.
3750 * sysdeps/x86_64/tls.h (tcbhead_t): Add private_futex field.
3751 * sysdeps/i386/tls.h (tcbhead_t): Likewise.
3752
6d59823c
UD
37532007-05-21 Ulrich Drepper <drepper@redhat.com>
3754
3755 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
3756 Remove ptr_wait_lookup_done again.
3757 * init.c (pthread_functions): Don't add .ptr_wait_lookup_done here.
3758 (__pthread_initialize_minimal_internal): Initialize
3759 _dl_wait_lookup_done pointer in _rtld_global directly.
3760 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
3761 Remove code to code _dl_wait_lookup_done.
3762 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_WAIT): The pointer is not
3763 encrypted for now.
3764
2c9718f3
JJ
37652007-05-21 Jakub Jelinek <jakub@redhat.com>
3766
3767 * tst-robust9.c (do_test): Don't fail if ENABLE_PI and
3768 pthread_mutex_init failed with ENOTSUP.
3769
df94b641
UD
37702007-05-19 Ulrich Drepper <drepper@redhat.com>
3771
3772 * allocatestack.c (__wait_lookup_done): New function.
3773 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
3774 Add ptr_wait_lookup_done.
3775 * init.c (pthread_functions): Initialize .ptr_wait_lookup_done.
3776 * pthreadP.h: Declare __wait_lookup_done.
3777 * sysdeps/i386/tls.h (tcbhead_t): Add gscope_flag.
3778 Define macros to implement reference handling of global scope.
3779 * sysdeps/x86_64/tls.h: Likewise.
3780 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
3781 Initialize GL(dl_wait_lookup_done).
3782
bec51a30
UD
37832007-05-17 Ulrich Drepper <drepper@redhat.com>
3784
113ad5fc
UD
3785 [BZ #4512]
3786 * pthread_mutex_lock.c: Preserve FUTEX_WAITERS bit when dead owner
3787 is detected.
3788 * pthread_mutex_timedlock.c: Likewise.
3789 * pthread_mutex_trylock.c: Likewise.
3790 Patch in part by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
3791
3792 * Makefile (tests): Add tst-robust9 and tst-robustpi9.
3793 * tst-robust9.c: New file.
3794 * tst-robustpi9.c: New file.
3795
bec51a30
UD
3796 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Remove
3797 unnecessary extra cancellation test.
3798
83d87915
UD
37992007-05-14 Ulrich Drepper <drepper@redhat.com>
3800
83d87915
UD
3801 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Remove unnecessary
3802 extra cancellation test.
3803 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
3804
3771196d
UD
38052007-05-10 Ulrich Drepper <drepper@redhat.com>
3806
341c566f
UD
3807 * descr.h (struct pthread): Rearrange members to fill hole in
3808 64-bit layout.
3809
3771196d
UD
3810 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
3811 (__pthread_setaffinity_new): If syscall was successful and
3812 RESET_VGETCPU_CACHE is defined, use it before returning.
3813 * sysdeps/unix/sysv/linux/x86_64/pthread_setaffinity.c: New file.
3814
7d29b542
JJ
38152007-05-10 Jakub Jelinek <jakub@redhat.com>
3816
3817 [BZ #4455]
3818 * tst-align2.c: Include stackinfo.h.
3819 * tst-getpid1.c: Likewise.
3820
16105fe0
UD
38212007-05-02 Carlos O'Donell <carlos@systemhalted.org>
3822
29c113f0
UD
3823 [BZ #4455]
3824 * tst-align2.c (do_test): Add _STACK_GROWS_UP case.
3825 * tst-getpid1.c (do_test): Likewise.
3826
16105fe0
UD
3827 [BZ #4456]
3828 * allocatestack.c (change_stack_perm): Add _STACK_GROWS_UP case.
3829 (allocate_stack): Likewise.
3830
6780bc44
UD
38312007-05-07 Ulrich Drepper <drepper@redhat.com>
3832
3833 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
3834 (__lll_robust_lock_wait): Fix race caused by reloading of futex value.
3835 (__lll_robust_timedlock_wait): Likewise.
3836 Reported by Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>.
3837
aa75f64c
UD
38382007-05-06 Mike Frysinger <vapier@gentoo.org>
3839
15eca720 3840 [BZ #4465]
aa75f64c
UD
3841 * tst-cancel-wrappers.sh: Set C["fdatasync"] to 1.
3842 * tst-cancel4.c (tf_fdatasync): New test.
3843
f672076e
UD
38442007-04-27 Ulrich Drepper <drepper@redhat.com>
3845
1bb5f5a1
UD
3846 [BZ #4392]
3847 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Treat error
3848 check mutexes like normal mutexes.
3849
f672076e
UD
3850 [BZ #4306]
3851 * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
3852 Initialize the whole sigevent structure to appease valgrind.
3853
bce20b9a
UD
38542007-04-25 Ulrich Drepper <drepper@redhat.com>
3855
3856 * sysdeps/x86_64/tls.h (tcbhead_t): Add vgetcpu_cache.
3857 * sysdeps/x86_64/tcb-offsets.sym: Add VGETCPU_CACHE_OFFSET.
3858
0c786eac
UD
38592007-04-06 Ulrich Drepper <drepper@redhat.com>
3860
3861 * tst-locale1.c: Avoid warnings.
3862 * tst-locale2.c: Likewise.
3863
e1f0c5bc
UD
38642007-03-19 Steven Munroe <sjmunroe@us.ibm.com>
3865
3866 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
3867 (__lll_robust_trylock): Add MUTEX_HINT_ACQ to lwarx instruction.
3868
965cba04
UD
38692007-03-16 Jakub Jelinek <jakub@redhat.com>
3870
3871 * sysdeps/pthread/bits/libc-lock.h: Use __extern_inline and
3872 __extern_always_inline where appropriate.
3873 * sysdeps/pthread/pthread.h: Likewise.
3874
a5ea509b
RH
38752007-03-13 Richard Henderson <rth@redhat.com>
3876
3877 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Use two
3878 separate cfi regions for the two subsections.
3879
00a1430e
UD
38802007-02-25 Ulrich Drepper <drepper@redhat.com>
3881
3882 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset refcntr in
3883 new thread, don't just decrement it.
3884 Patch by Suzuki K P <suzuki@in.ibm.com>.
3885
63a2f305
UD
38862007-02-21 Ulrich Drepper <drepper@redhat.com>
3887
3888 * sysdeps/pthread/pthread-functions.h: Correct last patch, correct
3889 PTHFCT_CALL definition.
3890
2484468b
UD
38912007-02-18 Ulrich Drepper <drepper@redhat.com>
3892
3893 * sysdeps/pthread/pthread-functions.h: If PTR_DEMANGLE is not
3894 available, don't use it.
3895
5ed61e0f
UD
38962007-02-09 Jakub Jelinek <jakub@redhat.com>
3897
3898 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
3899 (__lll_mutex_timedlock_wait): Use correct pointer when we don't
3900 call into the kernel to delay.
3901
10ccaa5c
UD
39022007-01-18 Ulrich Drepper <drepper@redhat.com>
3903
f8a17855
UD
3904 * tst-initializers1.c: We want to test the initializers as seen
3905 outside of libc, so undefined _LIBC.
3906
10ccaa5c
UD
3907 * pthread_join.c (cleanup): Avoid warning.
3908
ea1533e0
UD
39092007-01-17 Ulrich Drepper <drepper@redhat.com>
3910
1476bce6
UD
3911 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
3912 (__lll_timedwait_tid): Add unwind info.
3913
ea1533e0
UD
3914 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Don't just copy the
3915 function table, mangle the pointers.
3916 * sysdeps/pthread/pthread-functions.h: Define PTHFCT_CALL.
3917 * forward.c: Use PTHFCT_CALL and __libc_pthread_functions_init.
3918 * sysdeps/pthread/bits/libc-lock.h: When using __libc_pthread_functions
3919 demangle pointers before use.
3920 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Use PTHFCT_CALL to
3921 demangle pointer.
3922 * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
3923 * sysdeps/pthread/setxid.h: Likewise.
3924
8980796b
UD
39252007-01-12 Ulrich Drepper <drepper@redhat.com>
3926
3927 * tst-rwlock7.c: Show some more information in case of correct
3928 behavior.
3929
a1d87b5d
UD
39302007-01-11 Ulrich Drepper <drepper@redhat.com>
3931
3932 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
3933 (lll_futex_timed_wait): Undo part of last change, don't negate
3934 return value.
3935
11bf311e 39362007-01-10 Ulrich Drepper <drepper@redhat.com>
66193697 3937
11bf311e
UD
3938 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Cleanups. Define
3939 FUTEX_CMP_REQUEUE and lll_futex_requeue.
66193697 3940
11bf311e 39412006-12-28 David S. Miller <davem@davemloft.net>
14a31e35 3942
11bf311e 3943 * shlib-versions: Fix sparc64 linux target specification.
a744da90 3944
11bf311e 39452007-01-10 Jakub Jelinek <jakub@redhat.com>
a744da90 3946
11bf311e
UD
3947 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
3948 Adjust include path for pthread_barrier_wait.c move.
fc242bef 3949
11bf311e 39502006-12-21 Jakub Jelinek <jakub@redhat.com>
fc242bef 3951
11bf311e
UD
3952 * sysdeps/unix/sysv/linux/pthread_kill.c (pthread_kill): Make sure
3953 tid isn't reread from pd->tid in between ESRCH test and the syscall.
a822d9f4 3954
11bf311e
UD
39552006-12-06 Jakub Jelinek <jakub@redhat.com>
3956
3957 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Handle
3958 6 argument cancellable syscalls.
3959 (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
3960 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO): Handle
3961 6 argument cancellable syscalls.
3962 (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
a822d9f4 3963
66f17705
UD
39642006-12-09 Ulrich Drepper <drepper@redhat.com>
3965
3966 * sysdeps/unix/sysv/linux/rtld-lowlevel.h
3967 (__rtld_mrlock_initialize): Add missing closing parenthesis.
3968
11bf311e
UD
39692006-10-30 Jakub Jelinek <jakub@redhat.com>
3970
3971 * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
3972 __sync_lock_release instead of __sync_lock_release_si.
3973
536e40e2
UD
39742006-10-29 Jakub Jelinek <jakub@redhat.com>
3975
3976 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (RTLD_SINGLE_THREAD_P):
3977 Define.
3978 (SINGLE_THREAD_P): Define to 1 if IS_IN_rtld.
3979 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Likewise.
3980 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
3981 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
3982 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
3983 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
3984 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
3985 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
3986 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
3987 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
3988 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
3989
11bf311e
UD
39902006-10-27 Ulrich Drepper <drepper@redhat.com>
3991
3992 * sysdeps/pthread/pthread_barrier_wait.c: Move to...
3993 * pthread_barrier_wait.c: ...here.
3994 * sysdeps/pthread/pthread_cond_broadcast.c: Move to...
3995 * pthread_cond_broadcast.c: ...here.
3996 * sysdeps/pthread/pthread_cond_signal.c: Move to...
3997 * pthread_cond_signal.c: ...here.
3998 * sysdeps/pthread/pthread_cond_timedwait.c: Move to...
3999 * pthread_cond_timedwait.c: ...here.
4000 * sysdeps/pthread/pthread_cond_wait.c: Move to...
4001 * pthread_cond_wait.c: ...here.
4002 * sysdeps/pthread/pthread_once.c: Move to...
4003 * pthread_once.c: ...here.
4004 * sysdeps/pthread/pthread_rwlock_rdlock.c: Move to...
4005 * pthread_rwlock_rdlock.c: ...here.
4006 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Move to...
4007 * pthread_rwlock_timedrdlock.c: ...here.
4008 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Move to...
4009 * pthread_rwlock_timedwrlock.c: ...here.
4010 * sysdeps/pthread/pthread_rwlock_unlock.c: Move to...
4011 * pthread_rwlock_unlock.c: ...here.
4012 * sysdeps/pthread/pthread_rwlock_wrlock.c: Move to...
4013 * pthread_rwlock_wrlock.c: ...here.
4014 * sysdeps/pthread/pthread_spin_destroy.c: Move to...
4015 * pthread_spin_destroy.c: ...here.
4016 * sysdeps/pthread/pthread_spin_init.c: Move to...
4017 * pthread_spin_init.c: ...here.
4018 * sysdeps/pthread/pthread_spin_unlock.c: Move to...
4019 * pthread_spin_unlock.c: ...here.
4020 * sysdeps/pthread/pthread_getcpuclockid.c: Move to...
4021 * pthread_getcpuclockid.c: ...here.
4022
4023 * init.c: USE_TLS support is now always enabled.
4024 * tst-tls5.h: Likewise.
4025 * sysdeps/alpha/tls.h: Likewise.
4026 * sysdeps/i386/tls.h: Likewise.
4027 * sysdeps/ia64/tls.h: Likewise.
4028 * sysdeps/powerpc/tls.h: Likewise.
4029 * sysdeps/s390/tls.h: Likewise.
4030 * sysdeps/sh/tls.h: Likewise.
4031 * sysdeps/sparc/tls.h: Likewise.
4032 * sysdeps/x86_64/tls.h: Likewise.
4033
006a8f6f 40342006-10-27 Jakub Jelinek <jakub@redhat.com>
c0a777e8
UD
4035
4036 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
4037 __rtld_mrlock_change): Update oldval if atomic compare and exchange
4038 failed.
4039
4040 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
4041 Define to THREAD_SELF->header.multiple_threads.
4042 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
4043 Likewise.
4044 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
4045 Likewise.
4046 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
4047 (SINGLE_THREAD_P): Likewise.
4048 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
4049 (SINGLE_THREAD_P): Likewise.
4050 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
4051 (SINGLE_THREAD_P): Likewise.
4052 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
4053 (SINGLE_THREAD_P): Likewise.
4054 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (SINGLE_THREAD_P):
4055 Likewise.
4056 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
4057 (SINGLE_THREAD_P): Likewise.
4058 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
4059 (SINGLE_THREAD_P): Likewise.
4060 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (SINGLE_THREAD_P):
4061 Likewise.
4062
11bf311e 40632006-10-26 Jakub Jelinek <jakub@redhat.com>
32c075e1 4064
11bf311e
UD
4065 * pthread_attr_setstacksize.c (NEW_VERNUM): Define to GLIBC_2_3_3
4066 by default rather than 2_3_3.
32c075e1 4067
11bf311e 40682006-10-17 Jakub Jelinek <jakub@redhat.com>
32c075e1 4069
11bf311e
UD
4070 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
4071 __rtld_mrlock_unlock, __rtld_mrlock_change, __rtld_mrlock_done): Use
4072 atomic_* instead of catomic_* macros.
4073
40742006-10-12 Ulrich Drepper <drepper@redhat.com>
4075
4076 [BZ #3285]
4077 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add SEM_VALUE_MAX.
4078 * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
4079 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
4080 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
4081 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
4082 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Remove SEM_VALUE_MAX.
4083 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
4084 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
4085 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
4086 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: Likewise.
4087 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
4088 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
4089 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
4090
40912006-10-11 Ulrich Drepper <drepper@redhat.com>
4092
4093 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add support for
4094 cancelable syscalls with six parameters.
4095
4096 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Use catomic_*
4097 operations instead of atomic_*.
32c075e1 4098
11bf311e 40992006-10-09 Ulrich Drepper <drepper@redhat.com>
32c075e1 4100
11bf311e 4101 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: New file..
32c075e1 4102
11bf311e 41032006-10-07 Ulrich Drepper <drepper@redhat.com>
32c075e1 4104
11bf311e
UD
4105 * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: New file.
4106 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstack.c: New file.
4107 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c:
4108 New file.
4109 * pthread_attr_setstack.c: Allow overwriting the version number of the
4110 new symbol.
4111 * pthread_attr_setstacksize.c: Likewise.
4112 (__old_pthread_attr_setstacksize): If STACKSIZE_ADJUST is defined use
4113 it.
4114 * sysdeps/unix/sysv/linux/powerpc/Versions (libpthread): Add
4115 pthread_attr_setstack and pthread_attr_setstacksize to GLIBC_2.6.
fa279678 4116
457b559e
UD
41172006-09-24 Ulrich Drepper <drepper@redhat.com>
4118
4119 [BZ #3251]
4120 * descr.h (ENQUEUE_MUTEX_BOTH): Add cast to avoid warning.
4121 Patch by Petr Baudis.
4122
0466106e
UD
41232006-09-18 Jakub Jelinek <jakub@redhat.com>
4124
4125 * tst-kill4.c (do_test): Explicitly set tf thread's stack size.
4126
4127 * tst-cancel2.c (tf): Loop as long as something was written.
4128
bd6d3b7d
UD
41292006-09-12 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4130
4131 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: For PI
4132 mutexes wake all mutexes.
4133 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Don't increment
4134 WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
4135 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4136
30aa5785
UD
41372006-09-12 Ulrich Drepper <drepper@redhat.com>
4138
4139 * tst-cond22.c (tf): Slight changes to the pthread_cond_wait use
4140 to guarantee the thread is always canceled.
4141
2b6a801e
UD
41422006-09-08 Jakub Jelinek <jakub@redhat.com>
4143
4144 * tst-cond22.c: Include pthread.h instead of pthreadP.h.
4145 Include stdlib.h.
4146 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Only
4147 increase FUTEX if increasing WAKEUP_SEQ. Fix comment typo.
4148 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
4149 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4150 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
bd6d3b7d 4151
346e6ad4
UD
41522006-09-08 Ulrich Drepper <drepper@redhat.com>
4153
4154 [BZ #3123]
4155 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Don't
4156 increment WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
2b6a801e
UD
4157 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
4158 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4159 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
346e6ad4
UD
4160 * Makefile (tests): Add tst-cond22.
4161 * tst-cond22.c: New file.
4162
b051fc44
UD
41632006-09-05 Ulrich Drepper <drepper@redhat.com>
4164
4165 [BZ #3124]
4166 * descr.h (struct pthread): Add parent_cancelhandling.
4167 * sysdeps/pthread/createthread.c (create_thread): Pass parent
4168 cancelhandling value to child.
4169 * pthread_create.c (start_thread): If parent thread was canceled
4170 reset the SIGCANCEL mask.
4171 * Makefile (tests): Add tst-cancel25.
4172 * tst-cancel25.c: New file.
4173
d052233c 41742006-09-05 Jakub Jelinek <jakub@redhat.com>
b42a214c 4175 Ulrich Drepper <drepper@redhat.com>
d052233c
UD
4176
4177 * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY): Don't decrement
4178 counterp if it is already zero.
4179 * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY): Likewise..
4180
cd248c3f 41812006-03-04 Jakub Jelinek <jakub@redhat.com>
b42a214c 4182 Roland McGrath <roland@redhat.com>
cd248c3f
UD
4183
4184 * sysdeps/unix/sysv/linux/i386/lowlevellock.h
4185 (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
4186 LLL_STUB_UNWIND_INFO_3, LLL_STUB_UNWIND_INFO_4): Define.
4187 (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
4188 lll_robust_mutex_cond_lock, lll_mutex_timedlock,
4189 lll_robust_mutex_timedlock, lll_mutex_unlock,
4190 lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
4191 Add _L_*_ symbols around the subsection.
4192 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Add unwind info.
4193 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Likewise.
4194
41952006-03-03 Jakub Jelinek <jakub@redhat.com>
b42a214c 4196 Roland McGrath <roland@redhat.com>
cd248c3f
UD
4197
4198 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
4199 (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
4200 LLL_STUB_UNWIND_INFO_5, LLL_STUB_UNWIND_INFO_6): Define.
4201 (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
4202 lll_robust_mutex_cond_lock, lll_mutex_timedlock,
4203 lll_robust_mutex_timedlock, lll_mutex_unlock,
4204 lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
4205 Add _L_*_ symbols around the subsection.
4206 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Add unwind info.
4207 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
4208
b80770b2
UD
42092006-08-31 Ulrich Drepper <drepper@redhat.com>
4210
4211 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Undo last
4212 change because it can disturb too much existing code. If real hard
4213 reader preference is needed we'll introduce another type.
4214 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
4215 (pthread_rwlock_timedwrlock): Likewise.
4216 * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
4217 Likewise.
4218
bee2df0b
UD
42192006-08-30 Ulrich Drepper <drepper@redhat.com>
4220
4221 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Respect
4222 reader preference.
4223 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
4224 (pthread_rwlock_timedwrlock): Likewise.
4225 * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
4226 Likewise.
4227
d678ebc1
UD
42282006-08-25 Jakub Jelinek <jakub@redhat.com>
4229
4230 * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libpthread):
4231 Only define ifdef SHARED.
4232
ba408f84
UD
42332006-08-23 Ulrich Drepper <drepper@redhat.com>
4234
4235 * allocatestack.c (queue_stack): Move freeing of surplus stacks to...
4236 (free_stacks): ...here.
4237 (__free_stack_cache): New function.
4238 * pthreadP.h: Declare __free_stack_cache.
4239 * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
4240 ptr_freeres.
4241 * init.c (pthread_functions): Initialize ptr_freeres.
4242 * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libptread):
4243 New freeres function.
4244
376e973a
UD
42452006-07-30 Joseph S. Myers <joseph@codesourcery.com>
4246
4247 [BZ #3018]
4248 * Makefile (extra-objs): Add modules to extra-test-objs instead.
4249
2b34af01
UD
42502006-08-20 Ulrich Drepper <drepper@redhat.com>
4251
4252 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
4253 _XOPEN_REALTIME_THREADS.
4254
89c85f87
UD
42552006-08-15 Jakub Jelinek <jakub@redhat.com>
4256
4257 * sysdeps/unix/sysv/linux/clock_settime.c (INTERNAL_VSYSCALL): Use
4258 HAVE_CLOCK_GETRES_VSYSCALL as guard macro rather than
4259 HAVE_CLOCK_GETTIME_VSYSCALL.
4260 (maybe_syscall_settime_cpu): Use plain INTERNAL_VSYSCALL here.
4261
f17efcb4
UD
42622006-08-14 Jakub Jelinek <jakub@redhat.com>
4263
4264 * sysdeps/unix/sysv/linux/bits/posix_opt.h
4265 (_POSIX_THREAD_PRIO_PROTECT): Define to 200112L.
4266 * descr.h (struct priority_protection_data): New type.
4267 (struct pthread): Add tpp field.
4268 * pthreadP.h (PTHREAD_MUTEX_PP_NORMAL_NP,
4269 PTHREAD_MUTEX_PP_RECURSIVE_NP, PTHREAD_MUTEX_PP_ERRORCHECK_NP,
4270 PTHREAD_MUTEX_PP_ADAPTIVE_NP): New enum values.
4271 * pthread_mutex_init.c (__pthread_mutex_init): Handle non-robust
4272 TPP mutexes.
4273 * pthread_mutex_lock.c (__pthread_mutex_lock): Handle TPP mutexes.
4274 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Likewise.
4275 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Likewise.
4276 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Likewise.
4277 * tpp.c: New file.
4278 * pthread_setschedparam.c (__pthread_setschedparam): Handle priority
4279 boosted by TPP.
4280 * pthread_setschedprio.c (pthread_setschedprio): Likewise.
4281 * pthread_mutexattr_getprioceiling.c
4282 (pthread_mutexattr_getprioceiling): If ceiling is 0, ensure it is
4283 in the SCHED_FIFO priority range.
4284 * pthread_mutexattr_setprioceiling.c
4285 (pthread_mutexattr_setprioceiling): Fix prioceiling validation.
4286 * pthread_mutex_getprioceiling.c (pthread_mutex_getprioceiling): Fail
4287 if mutex is not TPP. Ceiling is now in __data.__lock.
4288 * pthread_mutex_setprioceiling.c: Include stdbool.h.
4289 (pthread_mutex_setprioceiling): Fix prioceiling validation. Ceiling
4290 is now in __data.__lock. Add locking.
4291 * pthread_create.c (__free_tcb): Free pd->tpp structure.
4292 * Makefile (libpthread-routines): Add tpp.
4293 (xtests): Add tst-mutexpp1, tst-mutexpp6 and tst-mutexpp10.
4294 * tst-tpp.h: New file.
4295 * tst-mutexpp1.c: New file.
4296 * tst-mutexpp6.c: New file.
4297 * tst-mutexpp10.c: New file.
4298 * tst-mutex1.c (TEST_FUNCTION): Don't redefine if already defined.
4299 * tst-mutex6.c (TEST_FUNCTION): Likewise.
4300
22bb134c
UD
43012006-08-12 Ulrich Drepper <drepper@redhat.com>
4302
4303 [BZ #2843]
4304 * pthread_join.c (pthread_join): Account for self being canceled
4305 when checking for deadlocks.
4306 * tst-join5.c: Cleanups. Allow to be used in tst-join6.
4307 (tf1): Don't print anything after pthread_join returns, this would be
4308 another cancellation point.
4309 (tf2): Likewise.
4310 * tst-join6.c: New file.
4311 * Makefile (tests): Add tst-join6.
4312
f1762c0c
UD
43132006-08-03 Ulrich Drepper <drepper@redhat.com>
4314
9c06eb66
UD
4315 [BZ #2892]
4316 * pthread_setspecific.c (__pthread_setspecific): Check
4317 out-of-range index before checking for unused key.
4318
f1762c0c
UD
4319 * sysdeps/pthread/gai_misc.h: New file.
4320
7bb1b2c9
UD
43212006-08-01 Ulrich Drepper <drepper@redhat.com>
4322
4323 * sysdeps/unix/sysv/linux/i386/smp.h: New file. Old Linux-specific
4324 file. Don't use sysctl.
4325 * sysdeps/unix/sysv/linux/smp.h: Always assume SMP. Archs can
4326 overwrite the file if this is likely not true.
4327
b06e7e9a
UD
43282006-07-31 Daniel Jacobowitz <dan@codesourcery.com>
4329
4330 * allocatestack.c (__reclaim_stacks): Reset the PID on cached stacks.
4331 * Makefile (tests): Add tst-getpid3.
4332 * tst-getpid3.c: New file.
4333
b894c2ea
RM
43342006-07-30 Roland McGrath <roland@redhat.com>
4335
4336 * Makefile (libpthread-routines): Add ptw-sigsuspend.
4337
4338 * sysdeps/unix/sysv/linux/i386/not-cancel.h
4339 (pause_not_cancel): New macro.
4340 (nanosleep_not_cancel): New macro.
4341 (sigsuspend_not_cancel): New macro.
4342 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
4343 nanosleep_not_cancel macro from <not-cancel.h>.
4344 * pthread_mutex_lock.c (__pthread_mutex_lock): Use pause_not_cancel
4345 macro from <not-cancel.h>.
4346
df47504c
UD
43472006-07-28 Ulrich Drepper <drepper@redhat.com>
4348 Jakub Jelinek <jakub@redhat.com>
4349
4350 * descr.h: Change ENQUEUE_MUTEX and DEQUEUE_MUTEX for bit 0
4351 notification of PI mutex. Add ENQUEUE_MUTEX_PI.
4352 * pthreadP.h: Define PTHREAD_MUTEX_PI_* macros for PI mutex types.
4353 * pthread_mutex_setprioceilining.c: Adjust for mutex type name change.
4354 * pthread_mutex_init.c: Add support for priority inheritance mutex.
4355 * pthread_mutex_lock.c: Likewise.
4356 * pthread_mutex_timedlock.c: Likewise.
4357 * pthread_mutex_trylock.c: Likewise.
4358 * pthread_mutex_unlock.c: Likewise.
4359 * sysdeps/pthread/pthread_cond_broadcast.c: For PI mutexes wake
4360 all mutexes.
4361 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.c: Likewise.
4362 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.c: Likewise.
4363 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: New file.
4364 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-header): Add
4365 pthread-pi-defines.sym.
4366 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_LOCK_PI,
4367 FUTEX_UNLOCK_PI, and FUTEX_TRYLOCK_PI.
4368 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
d5ba53f9
UD
4369 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
4370 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
4371 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
4372 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
4373 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
4374 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
df47504c
UD
4375 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
4376 _POSIX_THREAD_PRIO_INHERIT to 200112L.
4377 * tst-mutex1.c: Adjust to allow use in PI mutex test.
4378 * tst-mutex2.c: Likewise.
4379 * tst-mutex3.c: Likewise.
4380 * tst-mutex4.c: Likewise.
4381 * tst-mutex5.c: Likewise.
4382 * tst-mutex6.c: Likewise.
4383 * tst-mutex7.c: Likewise.
4384 * tst-mutex7a.c: Likewise.
4385 * tst-mutex8.c: Likewise.
4386 * tst-mutex9.c: Likewise.
4387 * tst-robust1.c: Likewise.
4388 * tst-robust7.c: Likewise.
4389 * tst-robust8.c: Likewise.
4390 * tst-mutexpi1.c: New file.
4391 * tst-mutexpi2.c: New file.
4392 * tst-mutexpi3.c: New file.
4393 * tst-mutexpi4.c: New file.
4394 * tst-mutexpi5.c: New file.
4395 * tst-mutexpi6.c: New file.
4396 * tst-mutexpi7.c: New file.
4397 * tst-mutexpi7a.c: New file.
4398 * tst-mutexpi8.c: New file.
4399 * tst-mutexpi9.c: New file.
4400 * tst-robust1.c: New file.
4401 * tst-robust2.c: New file.
4402 * tst-robust3.c: New file.
4403 * tst-robust4.c: New file.
4404 * tst-robust5.c: New file.
4405 * tst-robust6.c: New file.
4406 * tst-robust7.c: New file.
4407 * tst-robust8.c: New file.
4408 * Makefile (tests): Add the new tests.
4409
4410 * pthread_create.c (start_thread): Add some casts to avoid warnings.
4411 * pthread_mutex_destroy.c: Remove unneeded label.
4412
f3be81a9
UD
44132006-07-01 Ulrich Drepper <drepper@redhat.com>
4414
4415 * pthread_mutex_init.c (__pthread_mutex_init): Move some
4416 computations to compile time.
4417
c26ca5e1
UD
44182006-06-04 Ulrich Drepper <drepper@redhat.com>
4419
4420 * sysdeps/pthread/pthread.h: Add pthread_equal inline version.
4421
6f8a7dff
UD
44222006-05-15 Ulrich Drepper <drepper@redhat.com>
4423
c26ca5e1 4424 * sysdeps/unix/sysv/linux/fork.h: Mark __fork_handlers as hidden.
6f8a7dff 4425
3d237e42
UD
44262006-05-11 Ulrich Drepper <drepper@redhat.com>
4427
04974d63
UD
4428 * pthread_key_create.c (__pthread_key_create): Do away with
4429 __pthread_keys_lock.
4430
4431 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4432 (__kernel_cpumask_size): Mark as hidden.
4433 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
4434
3d237e42
UD
4435 * sem_open.c (__sem_mappings_lock): Mark as hidden.
4436 * semaphoreP.h (__sem_mappings_lock): Likewise.
4437
790fc6e4
UD
44382006-05-10 Ulrich Drepper <drepper@redhat.com>
4439
4440 * pthread_atfork.c: Mark __dso_handle as hidden.
4441
be434a72
UD
44422006-05-09 Ulrich Drepper <drepper@redhat.com>
4443
4444 [BZ #2644]
4445 * sysdeps/pthread/unwind-forcedunwind.c: Different solution for
4446 the reload problem. Change the one path in pthread_cancel_init
4447 which causes the problem. Force gcc to reload. Simplify callers.
4448 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c
4449 (_Unwind_GetBSP): Undo last patch.
4450
3142b1ac
UD
44512006-05-07 Ulrich Drepper <drepper@redhat.com>
4452
bf3635d3
UD
4453 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: Make sure the
4454 function pointer is reloaded after pthread_cancel_init calls.
3142b1ac
UD
4455
4456 [BZ #2644]
4457 * sysdeps/pthread/unwind-forcedunwind.c: Make sure functions
4458 pointers are reloaded after pthread_cancel_init calls.
4459
27488789
UD
44602006-05-01 Ulrich Drepper <drepper@redhat.com>
4461
4462 * sysdeps/pthread/allocalim.h (__libc_use_alloca): Mark with
4463 __always_inline.
4464
a6375d11
UD
44652006-04-27 Ulrich Drepper <drepper@redhat.com>
4466
4467 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
4468 Allocate new object which is passed to timer_sigev_thread so that
4469 the timer can be deleted before the new thread is scheduled.
4470
16a1d952
RM
44712006-04-26 Roland McGrath <roland@redhat.com>
4472
4473 * sysdeps/x86_64/tls.h: Include <asm/prctl.h> inside [! __ASSEMBLER__].
4474
7960f2a7
UD
44752006-04-08 Ulrich Drepper <drepper@redhat.com>
4476
ab9a9ff8
UD
4477 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove branch predicion
4478 suffix for conditional jumps.
4479 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
4480 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
4481 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
4482 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
4483 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
4484 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
4485
7960f2a7
UD
4486 * init.c (sigcancel_handler): Compare with correct PID even if the
4487 thread is in the middle of a fork call.
4488 (sighandler_setxid): Likewise.
4489 Reported by Suzuki K P <suzuki@in.ibm.com> .
4490
2035d91c
UD
44912006-04-07 Jakub Jelinek <jakub@redhat.com>
4492
4493 * pthreadP.h (FUTEX_TID_MASK): Sync with kernel.
4494
0292b0dd
UD
44952006-04-06 Ulrich Drepper <drepper@redhat.com>
4496
4497 * pthread_getattr_np.c (pthread_getattr_np): Close fp if getrlimit
4498 fails [Coverity CID 105].
4499
6738b3c0
UD
45002006-04-05 Ulrich Drepper <drepper@redhat.com>
4501
4502 * sysdeps/pthread/pthread.h: Add nonnull attributes.
4503
359157a5
RM
45042006-04-03 Steven Munroe <sjmunroe@us.ibm.com>
4505
4506 [BZ #2505]
4507 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h [_ARCH_PWR4]:
4508 Define __lll_rel_instr using lwsync.
4509
cd277b2d
UD
45102006-03-27 Ulrich Drepper <drepper@redhat.com>
4511
4512 * allocatestack.c (allocate_stack): Always initialize robust_head.
4513 * descr.h: Define struct robust_list_head.
4514 (struct pthread): Use robust_list_head in robust mutex list definition.
4515 Adjust ENQUEUE_MUTEX and DEQUEUE_MUTEX.
4516 * init.c [!__ASSUME_SET_ROBUST_LIST] (__set_robust_list_avail): Define.
4517 (__pthread_initialize_minimal_internal): Register robust_list with
4518 the kernel.
4519 * pthreadP.h: Remove PRIVATE_ from PTHREAD_MUTEX_ROBUST_* names.
4520 Declare __set_robust_list_avail.
4521 * pthread_create.c (start_thread): Register robust_list of new thread.
4522 [!__ASSUME_SET_ROBUST_LIST]: If robust_list is not empty wake up
4523 waiters.
4524 * pthread_mutex_destroy.c: For robust mutexes don't look at the
4525 number of users, it's unreliable.
4526 * pthread_mutex_init.c: Allow use of pshared robust mutexes if
4527 set_robust_list syscall is available.
4528 * pthread_mutex_consistent.c: Adjust for PTHREAD_MUTEX_ROBUST_* rename.
4529 * pthread_mutex_lock.c: Simplify robust mutex code a bit.
4530 Set robust_head.list_op_pending before trying to lock a robust mutex.
4531 * pthread_mutex_timedlock.c: Likewise.
4532 * pthread_mutex_trylock.c: Likewise.
4533 * pthread_mutex_unlock.c: Likewise for unlocking.
4534 * Makefile (tests): Add tst-robust8.
4535 * tst-robust8.c: New file.
4536
facac085
UD
45372006-03-08 Andreas Schwab <schwab@suse.de>
4538
4539 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h
4540 (DL_SYSINFO_IMPLEMENTATION): Add missing newline.
4541
7ccbe1a1
RM
45422006-03-05 Roland McGrath <roland@redhat.com>
4543
4544 * configure (libc_add_on): Disable add-on when $add_ons_automatic = yes
4545 and $config_os doesn't match *linux*.
4546
043cee37
RM
45472006-03-05 David S. Miller <davem@sunset.davemloft.net>
4548
4549 * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S:
4550 Use __syscall_error.
4551 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
4552 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: Likewise.
4553 * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: Likewise.
4554 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
4555 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: Likewise.
4556 * sysdeps/unix/sysv/linux/sparc/Makefile: New file.
4557
88bce79e
UD
45582006-03-02 Ulrich Drepper <drepper@redhat.com>
4559
4560 * sysdeps/unix/sysv/linux/aio_misc.h: Various cleanups.
4561
672ec465
UD
45622006-03-01 Ulrich Drepper <drepper@redhat.com>
4563
4564 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
4565 (__lll_robust_lock_wait): Also set FUTEX_WAITERS bit if we got the
4566 mutex.
4567 (__lll_robust_timedlock_wait): Likewise.
4568 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S
4569 (__lll_robust_lock_wait): Likewise.
4570 (__lll_robust_timedlock_wait): Likewise.
4571 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
4572 (__lll_robust_lock_wait): Likewise.
4573 (__lll_robust_timedlock_wait): Likewise.
4574
c4a4875d
RM
45752006-03-01 Jakub Jelinek <jakub@redhat.com>
4576
4577 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_robust_mutex_dead,
4578 lll_robust_mutex_trylock, lll_robust_mutex_lock,
4579 lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
4580 lll_robust_mutex_unlock): Define.
4581 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
4582
3192fd8e
RM
45832006-02-28 H.J. Lu <hongjiu.lu@intel.com>
4584
4585 * sysdeps/unix/sysv/linux/ia64/clone2.S: Include <clone2.S>
4586 instead of <clone.S>.
4587
14d44b19
RM
45882006-02-27 Jakub Jelinek <jakub@redhat.com>
4589
4590 * Makefile (libpthread-routines): Add
4591 pthread_mutexattr_[sg]etprotocol, pthread_mutexattr_[sg]etprioceiling
4592 and pthread_mutex_[sg]etprioceiling.
4593 * Versions (GLIBC_2.4): Export pthread_mutexattr_getprotocol,
4594 pthread_mutexattr_setprotocol, pthread_mutexattr_getprioceiling,
4595 pthread_mutexattr_setprioceiling, pthread_mutex_getprioceiling and
4596 pthread_mutex_setprioceiling.
4597 * sysdeps/pthread/pthread.h (PTHREAD_PRIO_NONE, PTHREAD_PRIO_INHERIT,
4598 PTHREAD_PRIO_PROTECT): New enum values.
4599 (pthread_mutexattr_getprotocol, pthread_mutexattr_setprotocol,
4600 pthread_mutexattr_getprioceiling, pthread_mutexattr_setprioceiling,
4601 pthread_mutex_getprioceiling, pthread_mutex_setprioceiling): New
4602 prototypes.
4603 * pthreadP.h (PTHREAD_MUTEX_PRIO_INHERIT_PRIVATE_NP,
4604 PTHREAD_MUTEX_PRIO_PROTECT_PRIVATE_NP): New enum values.
4605 (PTHREAD_MUTEX_PRIO_CEILING_SHIFT, PTHREAD_MUTEX_PRIO_CEILING_MASK):
4606 Define.
4607 (PTHREAD_MUTEXATTR_PROTOCOL_SHIFT, PTHREAD_MUTEXATTR_PROTOCOL_MASK,
4608 PTHREAD_MUTEXATTR_PRIO_CEILING_SHIFT,
4609 PTHREAD_MUTEXATTR_PRIO_CEILING_MASK): Define.
4610 (PTHREAD_MUTEXATTR_FLAG_BITS): Or in PTHREAD_MUTEXATTR_PROTOCOL_MASK
4611 and PTHREAD_MUTEXATTR_PRIO_CEILING_MASK.
4612 * pthread_mutex_init.c (__pthread_mutex_init): For the time being
4613 return ENOTSUP for PTHREAD_PRIO_INHERIT or PTHREAD_PRIO_PROTECT
4614 protocol mutexes.
4615 * pthread_mutex_getprioceiling.c: New file.
4616 * pthread_mutex_setprioceiling.c: New file.
4617 * pthread_mutexattr_getprioceiling.c: New file.
4618 * pthread_mutexattr_setprioceiling.c: New file.
4619 * pthread_mutexattr_getprotocol.c: New file.
4620 * pthread_mutexattr_setprotocol.c: New file.
4621
62f6b9b2
RM
46222006-02-27 Daniel Jacobowitz <dan@codesourcery.com>
4623
4624 * sysdeps/unix/sysv/linux/aio_misc.h: Include <limits.h>.
4625
e0a3ed4f
RM
46262006-02-27 Roland McGrath <roland@redhat.com>
4627
4628 * sysdeps/pthread/Subdirs: List nptl here too.
4629 * configure (libc_add_on_canonical): New variable.
4630
4631 * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: Use #include_next.
4632
4633 * sysdeps/unix/sysv/linux/sleep.c: Use #include_next after #include of
4634 self to get main source tree's file.
4635 * sysdeps/unix/sysv/linux/alpha/clone.S: Likewise.
4636 * sysdeps/unix/sysv/linux/i386/clone.S: Likewise.
4637 * sysdeps/unix/sysv/linux/i386/vfork.S: Likewise.
4638 * sysdeps/unix/sysv/linux/ia64/clone2.S: Likewise.
4639 * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: Likewise.
4640 * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: Likewise.
4641 * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: Likewise.
4642 * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: Likewise.
4643 * sysdeps/unix/sysv/linux/sh/clone.S: Likewise.
4644 * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: Likewise.
4645 * sysdeps/unix/sysv/linux/sparc/sparc64/clone.S: Likewise.
4646 * sysdeps/unix/sysv/linux/x86_64/clone.S: Likewise.
4647 * sysdeps/unix/sysv/linux/x86_64/vfork.S: Likewise.
4648
4649 * Makefile: Use $(sysdirs) in vpath directive.
4650
4651 * sysdeps/pthread/Makefile (CFLAGS-libc-start.c): Variable removed.
4652 (CPPFLAGS-timer_routines.c): Likewise.
4653
4654 * Makeconfig (includes): Variable removed.
4655
84cfa284
RM
46562006-02-26 Roland McGrath <roland@redhat.com>
4657
4658 * sysdeps/generic/pt-raise.c: Moved to ...
4659 * pt-raise.c: ... here.
4660 * sysdeps/generic/lowlevellock.h: Moved to ...
4661 * lowlevellock.h: ... here.
4662
c5132ca1
RM
46632006-02-23 Roland McGrath <roland@redhat.com>
4664
4665 * descr.h (struct pthread): Add final member `end_padding'.
4666 (PTHREAD_STRUCT_END_PADDING): Use it.
4667
46682006-02-20 Roland McGrath <roland@redhat.com>
4669
4670 * sysdeps/mips: Directory removed, saved in ports repository.
4671 * sysdeps/unix/sysv/linux/mips: Likewise.
4672
a93317a1
UD
46732006-02-18 Ulrich Drepper <drepper@redhat.com>
4674
4675 * tst-robust1.c: Add second mutex to check that the mutex list is
4676 handled correctly.
4677
f1740bc4
UD
46782006-02-17 Jakub Jelinek <jakub@redhat.com>
4679
4680 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_mutex_dead,
4681 lll_robust_mutex_trylock, lll_robust_mutex_lock,
4682 lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
4683 lll_robust_mutex_unlock): New macros.
4684 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
4685 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
4686 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
4687 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
4688 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: New file.
4689
a7245bf5
UD
46902006-02-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4691
4692 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Add lll_robust_mutex_*
4693 definitions.
4694 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: New file.
4695
49bfc1fe
UD
46962006-02-17 Ulrich Drepper <drepper@redhat.com>
4697
4698 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
4699 (lll_robust_mutex_unlock): Avoid unnecessary wakeups.
4700 * sysdeps/unix/sysv/linux/i386/lowlevellock.h
4701 (lll_robust_mutex_unlock): Likewise.
4702
56e987ac
UD
47032006-02-13 Jakub Jelinek <jakub@redhat.com>
4704
4705 * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX):
4706 Set robust_list.__next rather than robust_list.
4707 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
4708 (__pthread_list_t): New typedef.
4709 (pthread_mutex_t): Replace __next and __prev fields with __list.
4710 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
4711 (__pthread_list_t): New typedef.
4712 (pthread_mutex_t): Replace __next and __prev fields with __list.
4713 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
4714 (__pthread_list_t, __pthread_slist_t): New typedefs.
4715 (pthread_mutex_t): Replace __next and __prev fields with __list.
4716 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
4717 (__pthread_list_t, __pthread_slist_t): New typedefs.
4718 (pthread_mutex_t): Replace __next and __prev fields with __list.
4719 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
4720 (__pthread_list_t, __pthread_slist_t): New typedefs.
4721 (pthread_mutex_t): Replace __next and __prev fields with __list.
4722 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h
4723 (__pthread_slist_t): New typedef.
4724 (pthread_mutex_t): Replace __next field with __list.
4725
683040c3
UD
47262006-02-15 Ulrich Drepper <drepper@redhat.com>
4727
25bc77e6 4728 * pthreadP.h: Define PTHREAD_MUTEX_INCONSISTENT instead of
683040c3
UD
4729 PTHREAD_MUTEX_OWNERDEAD.
4730 (PTHREAD_MUTEX_ROBUST_PRIVATE_NP): Define as 16, not 256.
4731 Define FUTEX_WAITERS, FUTEX_OWNER_DIED, FUTEX_TID_MASK.
4732 * Makefile (libpthread-routines): Add lowlevelrobustlock.
4733 * pthread_create.c (start_thread): Very much simplify robust_list loop.
4734 * pthread_mutex_consistent.c: Inconsistent mutex have __owner now set
4735 to PTHREAD_MUTEX_INCONSISTENT.
4736 * pthread_mutex_destroy.c: Allow destroying of inconsistent mutexes.
4737 * pthread_mutex_lock.c: Reimplement robust mutex handling.
4738 * pthread_mutex_trylock.c: Likewise.
4739 * pthread_mutex_timedlock.c: Likewise.
4740 * pthread_mutex_unlock.c: Likewise.
4741 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
4742 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
4743 lowlevelrobustlock.sym.
4744 * sysdeps/unix/sysv/linux/lowlevelrobustlock.sym: New file.
4745 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add lll_robust_mutex_*
4746 definitions.
4747 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
4748 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: New file.
4749 * sysdeps/unix/sysv/linux/i386/i586/lowlevelrobustlock.S: New file.
4750 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrobustlock.S: New file.
4751 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: New file.
4752
bbf209a4
UD
47532006-02-12 Ulrich Drepper <drepper@redhat.com>
4754
b007ce7c
UD
4755 * allocatestack.c (allocate_stack): Initialize robust_list.
4756 * init.c (__pthread_initialize_minimal_internal): Likewise.
4757 * descr.h (struct xid_command): Pretty printing.
4758 (struct pthread): Use __pthread_list_t or __pthread_slist_t for
4759 robust_list. Adjust macros.
4760 * pthread_create.c (start_thread): Adjust robust_list handling.
4761 * phtread_mutex_unlock.c: Don't allow unlocking from any thread
4762 but the owner for all robust mutex types.
4763 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
4764 __pthread_list_t and __pthread_slist_t. Use them in pthread_mutex_t.
0ca3379d 4765 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
b007ce7c
UD
4766 * sysdeps/pthread/pthread.h: Adjust mutex initializers.
4767
bbf209a4 4768 * sysdeps/unix/sysv/linux/i386/not-cancel.h: Define openat_not_cancel,
b42a214c 4769 openat_not_cancel_3, openat64_not_cancel, and openat64_not_cancel_3.
bbf209a4 4770
b576fca1
UD
47712006-02-08 Jakub Jelinek <jakub@redhat.com>
4772
4773 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait,
4774 lll_futex_timedwait, lll_wait_tid): Add "memory" clobber.
4775
a6df7387
UD
47762006-01-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4777
4778 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_futex_wait):
4779 Return status.
4780 (lll_futex_timed_wait): Define.
4781
7c65e900
UD
47822006-01-19 Ulrich Drepper <drepper@redhat.com>
4783
4784 * tst-cancel4.c: Test ppoll.
4785
5f9f21e8
AJ
47862006-01-18 Andreas Jaeger <aj@suse.de>
4787
cf407dfb 4788 [BZ #2167]
5f9f21e8
AJ
4789 * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h
4790 (pthread_mutex_t): Follow changes for other archs. Based on patch
4791 by Jim Gifford <patches@jg555.com>.
4792
251278c6
UD
47932006-01-13 Richard Henderson <rth@redhat.com>
4794
4795 * sysdeps/alpha/tls.h (tcbhead_t): Rename member to __private.
4796
de59a291
RM
47972006-01-10 Roland McGrath <roland@redhat.com>
4798
4799 * sysdeps/alpha/jmpbuf-unwind.h: File moved to main source tree.
4800 * sysdeps/i386/jmpbuf-unwind.h: Likewise.
4801 * sysdeps/mips/jmpbuf-unwind.h: Likewise.
4802 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
4803 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
4804 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
4805 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
4806 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
4807 * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
0ca13e14 4808 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
de59a291 4809
931786ee
RM
48102006-01-09 Roland McGrath <roland@redhat.com>
4811
5d42c8c3
RM
4812 * tst-initializers1-c89.c: New file.
4813 * tst-initializers1-c99.c: New file.
4814 * tst-initializers1-gnu89.c: New file.
4815 * tst-initializers1-gnu99.c: New file.
4816 * Makefile (tests): Add them.
4817 (CFLAGS-tst-initializers1-c89.c): New variable.
4818 (CFLAGS-tst-initializers1-c99.c): New variable.
4819 (CFLAGS-tst-initializers1-gnu89.c): New variable.
4820 (CFLAGS-tst-initializers1-gnu99.c): New variable.
4821
931786ee
RM
4822 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
4823 Use __extension__ on anonymous union definition.
4824 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4825 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4826 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4827 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3c238452 4828 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
931786ee 4829
8dd18431
RM
48302006-01-08 Jakub Jelinek <jakub@redhat.com>
4831
4832 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
4833 Don't give the union a name because it changes the mangled name.
4834 Instead name the struct for __data.
4835 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_mutex_t):
4836 Likewise.
4837 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_mutex_t):
4838 Likewise.
4839
ae11e412
UD
48402006-01-09 Jakub Jelinek <jakub@redhat.com>
4841
4842 * sysdeps/sparc/sparc64/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Add
4843 stack bias to mc_ftp field.
4844
c6885aa1
UD
48452006-01-07 Ulrich Drepper <drepper@redhat.com>
4846
4847 * sysdeps/pthread/aio_misc.h (AIO_MISC_WAIT): Work around gcc
6e741bc3 4848 being too clever and reloading the futex value where it shouldn't.
c6885aa1 4849
ae4ad00a
UD
48502006-01-06 Ulrich Drepper <drepper@redhat.com>
4851
4852 * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX): Use
4853 correct type.
4854
ced368f7
UD
48552006-01-06 Jakub Jelinek <jakub@redhat.com>
4856
4857 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
4858 Add cfi directives.
4859
d804f5df
UD
48602006-01-06 Ulrich Drepper <drepper@redhat.com>
4861
cbbbb188 4862 * sysdeps/ia64/tls.h (tcbhead_t): Rename private member to __private.
719046c1
UD
4863 * sysdeps/ia64/tcb-offsets.sym: Adjust for private->__private
4864 rename in tcbhead_t.
4865
d804f5df
UD
4866 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
4867 Don't give the union a name because it changes the mangled name.
4868 Instead name the struct for __data.
4869 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4870 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4871 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4872 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4873 * pthread_create.c (start_thread): Adjust robust mutex free loop.
4874 * descr.h (ENQUEUE_MUTEX, DEQUEUE_MUTEX): Adjust.
4875
679d83ba
UD
48762006-01-05 Ulrich Drepper <drepper@redhat.com>
4877
4878 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
4879 Return status.
4880 (lll_futex_timed_wait): Define.
4881 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
4882 * sysdeps/pthread/aio_misc.h: New file.
4883
06dc5bf3
RM
48842006-01-03 Joseph S. Myers <joseph@codesourcery.com>
4885
4886 * Makefile ($(objpfx)$(multidir)): Use mkdir -p.
4887
9759bbf1
UD
48882006-01-03 Steven Munroe <sjmunroe@us.ibm.com>
4889
4890 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
4891 (PSEUDO): Remove redundant cfi_startproc and cfi_endproc directives.
4892 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
4893
db59b28b
UD
48942006-01-04 Ulrich Drepper <drepper@redhat.com>
4895
4896 * tst-cancel24.cc: Use C headers instead of C++ headers.
4897
b01fe5f7
UD
48982006-01-03 Jakub Jelinek <jakub@redhat.com>
4899
4900 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Remove #error for
4901 sparc-linux configured glibc.
4902 (lll_futex_wake_unlock): Define to 1 for sparc-linux configured glibc.
4903 (__lll_mutex_trylock, __lll_mutex_cond_trylock, __lll_mutex_lock,
4904 __lll_mutex_cond_lock, __lll_mutex_timedlock): Use
4905 atomic_compare_and_exchange_val_24_acq instead of
4906 atomic_compare_and_exchange_val_acq.
4907 (lll_mutex_unlock, lll_mutex_unlock_force): Use atomic_exchange_24_rel
4908 instead of atomic_exchange_rel.
4909 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: New file.
4910 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c: New
4911 file.
4912 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c: New
4913 file.
4914 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: New file.
4915 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: New file.
4916 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: New file.
4917 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c: New file.
4918 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: New file.
4919 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
4920 New file.
4921 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
4922 New file.
4923 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: New file.
4924 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: New file.
4925 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c: New
4926 file.
4927 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_trywait.c: New
4928 file.
4929 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: New file.
4930
35c2fd59
UD
49312006-01-03 Ulrich Drepper <drepper@redhat.com>
4932
4933 * sysdeps/pthread/pthread.h [__WORDSIZE==64]: Don't use cast in
4934 mutex initializers.
4935
305bb37e
UD
49362006-01-02 Jakub Jelinek <jakub@redhat.com>
4937
4938 * sysdeps/sparc/tls.h (tcbhead_t): Add pointer_guard field.
4939 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
4940 THREAD_COPY_POINTER_GUARD): Define.
4941 * sysdeps/sparc/tcb-offsets.sym (POINTER_GUARD): Define.
4942 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Revert 2005-12-27 changes.
4943
cc792128
UD
49442006-01-01 Ulrich Drepper <drepper@redhat.com>
4945
4946 * version.c: Update copyright year.
4947
db0a00d3
UD
49482005-12-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4949
4950 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Remove explicit
4951 .eh_frame section, use cfi_* directives.
4952 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Add cfi instrumentation.
4953
b36205c4
UD
49542005-12-30 Ulrich Drepper <drepper@redhat.com>
4955
4956 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Undo last change for
4957 now.
4958
8b4f1598
UD
49592005-12-29 Ulrich Drepper <drepper@redhat.com>
4960
4961 * sysdeps/pthread/sigaction.c: Removed.
4962 * sigaction.c: New file.
4963 * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-sigaction.c.
4964
fec5592d
UD
49652005-12-28 Ulrich Drepper <drepper@redhat.com>
4966
4967 * Makefile (tests): Add tst-signal7.
4968 * tst-signal7.c: New file.
4969
db169ed5
RM
49702005-12-27 Roland McGrath <roland@redhat.com>
4971
4972 * sysdeps/x86_64/jmpbuf-unwind.h (_jmpbuf_sp): New inline function.
4973 (_JMPBUF_UNWINDS_ADJ): Use it, to PTR_DEMANGLE before comparison.
4974 * sysdeps/alpha/jmpbuf-unwind.h: Likewise.
4975 * sysdeps/i386/jmpbuf-unwind.h: Likewise.
4976 * sysdeps/mips/jmpbuf-unwind.h: Likewise.
4977 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
4978 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
4979 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
4980 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
4981 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
4982 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
4983
bfffffae
UD
49842005-12-27 Jakub Jelinek <jakub@redhat.com>
4985
4986 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Add __next
4987 and __prev field to pthread_mutex_t.
4988 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4989 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4990 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4991 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4992 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Add __next field
4993 to pthread_mutex_t.
4994
1bcfb5a5
UD
49952005-12-26 Ulrich Drepper <drepper@redhat.com>
4996
4997 * pthreadP.h: Define PTHREAD_MUTEX_ROBUST_PRIVATE_NP,
4998 PTHREAD_MUTEX_ROBUST_PRIVATE_RECURSIVE_NP,
4999 PTHREAD_MUTEX_ROBUST_PRIVATE_ERRORCHECK_NP,
5000 PTHREAD_MUTEX_ROBUST_PRIVATE_ADAPTIVE_NP,
5001 PTHREAD_MUTEXATTR_FLAG_ROBUST, PTHREAD_MUTEXATTR_FLAG_PSHARED,
5002 and PTHREAD_MUTEXATTR_FLAG_BITS.
5003 * descr.h (struct pthread): Add robust_list field and define
5004 ENQUEUE_MUTEX and DEQUEUE_MUTEX macros.
5005 * pthread_mutexattr_getrobust.c: New file.
5006 * pthread_mutexattr_setrobust.c: New file.
5007 * pthread_mutex_consistent.c: New file.
5008 * sysdeps/pthread/pthread.h: Declare pthread_mutexattr_getrobust,
5009 pthread_mutexattr_setrobust, and pthread_mutex_consistent.
5010 Define PTHREAD_MUTEX_STALLED_NP and PTHREAD_MUTEX_ROBUST_NP.
5011 Adjust pthread_mutex_t initializers.
5012 * nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Add __next
5013 field to pthread_mutex_t.
5014 * nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Add __next
5015 and __prev field to pthread_mutex_t.
5016 * Versions [GLIBC_2.4]: Export pthread_mutexattr_getrobust_np,
5017 pthread_mutexattr_setrobust_np, and pthread_mutex_consistent_np.
5018 * pthread_mutexattr_getpshared.c: Use PTHREAD_MUTEXATTR_FLAG_PSHARED
5019 and PTHREAD_MUTEXATTR_FLAG_BITS macros instead of magic numbers.
5020 * pthread_mutexattr_gettype.c: Likewise.
5021 * pthread_mutexattr_setpshared.c: Likewise.
5022 * pthread_mutexattr_settype.c: Likewise.
5023 * pthread_mutex_init.c: Reject robust+pshared attribute for now.
5024 Initialize mutex kind according to robust flag.
5025 * pthread_mutex_lock.c: Implement local robust mutex.
5026 * pthread_mutex_timedlock.c: Likewise.
5027 * pthread_mutex_trylock.c: Likewise.
5028 * pthread_mutex_unlock.c: Likewise.
5029 * pthread_create.c (start_thread): Mark robust mutexes which remained
5030 locked as dead.
5031 * tst-robust1.c: New file.
5032 * tst-robust2.c: New file.
5033 * tst-robust3.c: New file.
5034 * tst-robust4.c: New file.
5035 * tst-robust5.c: New file.
5036 * tst-robust6.c: New file.
5037 * tst-robust7.c: New file.
5038 * Makefile (libpthread-routines): Add pthread_mutexattr_getrobust,
5039 pthread_mutexattr_setrobust, and pthread_mutex_consistent.
5040 (tests): Add tst-robust1, tst-robust2, tst-robust3, tst-robust4,
5041 tst-robust5, tst-robust6, and tst-robust7.
5042
5043 * tst-typesizes.c: New file.
5044 * Makefile (tests): Add tst-typesizes.
5045
5046 * tst-once3.c: More debug output.
5047
9333ed0d
UD
50482005-12-24 Ulrich Drepper <drepper@redhat.com>
5049
d4d138a4
UD
5050 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Add break
5051 missing after last change.
5052
bfffffae 5053 * version.c: Update copyright year.
9333ed0d 5054
dcc73a8d
UD
50552005-12-23 Ulrich Drepper <drepper@redhat.com>
5056
5057 * pthread_mutex_destroy.c: Set mutex type to an invalid value.
5058 * pthread_mutex_lock.c: Return EINVAL for invalid mutex type.
5059 * pthread_mutex_trylock.c: Likewise.
5060 * pthread_mutex_timedlock.c: Likewise.
5061 * pthread_mutex_unlock.c: Likewise.
5062
879f3ca6
RM
50632005-12-22 Roland McGrath <roland@redhat.com>
5064
5065 * sysdeps/pthread/sigaction.c: Use "" instead of <> to include self,
5066 so that #include_next's search location is not reset to the -I..
5067 directory where <nptl/...> can be found.
5068
077a0da7
UD
50692005-12-22 Ulrich Drepper <drepper@redhat.com>
5070
5071 [BZ #1913]
5072 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
5073 Fix unwind info. Remove useless branch prediction prefix.
7735afa2
UD
5074 * tst-cancel24.cc: New file.
5075 * Makefile: Add rules to build and run tst-cancel24.
077a0da7 5076
8dea90aa
RM
50772005-12-21 Roland McGrath <roland@redhat.com>
5078
5079 * libc-cancellation.c: Use <> rather than "" #includes.
5080 * pt-cleanup.c: Likewise.
5081 * pthread_create.c: Likewise.
5082 * pthread_join.c: Likewise.
5083 * pthread_timedjoin.c: Likewise.
5084 * pthread_tryjoin.c: Likewise.
5085 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Likewise.
5086 * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
5087 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
5088 * unwind.c: Likewise.
5089
8da21f96
UD
50902005-12-19 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5091
5092 * sysdeps/sh/tcb-offsets.sym: Add POINTER_GUARD.
5093 * sysdeps/sh/tls.h (tcbhead_t): Remove private and add pointer_guard.
5094 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
5095 THREAD_COPY_POINTER_GUARD): Define.
5096
00c2b3b9
UD
50972005-12-19 Jakub Jelinek <jakub@redhat.com>
5098
5099 * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): Make room for 2 uintptr_t's
5100 rather than one.
5101 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
5102 THREAD_COPY_POINTER_GUARD): Define.
5103 * sysdeps/powerpc/tcb-offsets.sym (POINTER_GUARD): Add.
5104 * sysdeps/powerpc/tls.h (tcbhead_t): Add pointer_guard field.
5105 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
5106 THREAD_COPY_POINTER_GUARD): Define.
5107 * sysdeps/s390/tcb-offsets.sym (STACK_GUARD): Add.
5108 * sysdeps/s390/tls.h (THREAD_GET_POINTER_GUARD,
5109 THREAD_SET_POINTER_GUARD, THREAD_COPY_POINTER_GUARD): Define.
5110 * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S (__ia64_longjmp):
5111 Use PTR_DEMANGLE for B0 if defined.
5112
827b7087
UD
51132005-12-17 Ulrich Drepper <drepper@redhat.com>
5114
5115 * pthread_create.c (__pthread_create_2_1): Use
5116 THREAD_COPY_POINTER_GUARD if available.
5117 * sysdeps/i386/tcb-offsets.sym: Add POINTER_GUARD.
5118 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
5119 * sysdeps/i386/tls.h (tcbhead_t): Add pointer_guard.
5120 Define THREAD_SET_POINTER_GUARD and THREAD_COPY_POINTER_GUARD.
5121 * sysdeps/x86_64/tls.h: Likewise.
5122
2826ac7e
RM
51232005-12-15 Roland McGrath <roland@redhat.com>
5124
5125 * sysdeps/unix/sysv/linux/mq_notify.c: Don't use sysdeps/generic.
5126
b6ab06ce
UD
51272005-12-13 Ulrich Drepper <drepper@redhat.com>
5128
5129 * sysdeps/pthread/sigfillset.c: Adjust for files moved out of
5130 sysdeps/generic.
5131 * errno-loc.c: New file.
5132
f0d1a3b5
RM
51332005-12-12 Roland McGrath <roland@redhat.com>
5134
5135 * init.c (__pthread_initialize_minimal_internal): Do __static_tls_size
5136 adjustments before choosing stack size. Update minimum stack size
5137 calculation to match allocate_stack change.
5138
db13ddbc
UD
51392005-12-12 Ulrich Drepper <drepper@redhat.com>
5140
5141 * allocatestack.c (allocate_stack): Don't demand that there is an
5142 additional full page available on the stack beside guard, TLS, the
5143 minimum stack.
5144
088f460f
UD
51452005-11-24 Ulrich Drepper <drepper@redhat.com>
5146
5147 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
5148 (__cleanup_fct_attribute): Use __regparm__ not regparm.
5149
5150 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: When
5151 compiling 32-bit code we must define __cleanup_fct_attribute.
5152
16feadf2
UD
5153005-11-24 Jakub Jelinek <jakub@redhat.com>
5154
5155 [BZ #1920]
5156 * sysdeps/pthread/pthread.h (__pthread_unwind_next): Use
5157 __attribute__ instead of __attribute.
5158 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
5159 (__cleanup_fct_attribute): Likewise.
5160
e6e493bb
UD
51612005-11-17 Jakub Jelinek <jakub@redhat.com>
5162
5163 * sysdeps/pthread/unwind-forcedunwind.c (pthread_cancel_init): Put
5164 a write barrier before writing libgcc_s_getcfa.
5165
8e635611
UD
51662005-11-06 Ulrich Drepper <drepper@redhat.com>
5167
5168 * sysdeps/unix/sysv/linux/configure: Removed.
5169
ce33ee7c
UD
51702005-11-05 Ulrich Drepper <drepper@redhat.com>
5171
5172 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Remove trace of
5173 optional init_array/fini_array support.
5174
20d511e0
RM
51752005-10-24 Roland McGrath <roland@redhat.com>
5176
5177 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Remove unnecessary
5178 versioned_symbol use.
5179
fe60d146
RM
51802005-10-16 Roland McGrath <roland@redhat.com>
5181
5182 * init.c (__pthread_initialize_minimal_internal): Even when using a
5183 compile-time default stack size, apply the minimum that allocate_stack
5184 will require, and round up to page size.
5185
0faa1cf5
RM
51862005-10-10 Daniel Jacobowitz <dan@codesourcery.com>
5187
5188 * Makefile ($(test-modules)): Remove static pattern rule.
5189
f9126cc2 51902005-10-14 Jakub Jelinek <jakub@redhat.com>
b42a214c 5191 Ulrich Drepper <drepper@redhat.com>
f9126cc2
UD
5192
5193 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix stack
5194 alignment in callback function.
5195 * Makefile: Add rules to build and run tst-align3.
5196 * tst-align3.c: New file.
5197
015a5d22
RM
51982005-10-03 Jakub Jelinek <jakub@redhat.com>
5199
5200 * allocatestack.c (setxid_signal_thread): Add
5201 INTERNAL_SYSCALL_DECL (err).
5202
b71ce910
UD
52032005-10-02 Jakub Jelinek <jakub@redhat.com>
5204
5205 * allocatestack.c (setxid_signal_thread): Need to use
5206 atomic_compare_and_exchange_bool_acq.
5207
dff9a7a1 52082005-10-01 Ulrich Drepper <drepper@redhat.com>
b42a214c 5209 Jakub Jelinek <jakub@redhat.com>
dff9a7a1
UD
5210
5211 * descr.h: Define SETXID_BIT and SETXID_BITMASK. Adjust
5212 CANCEL_RESTMASK.
5213 (struct pthread): Move specific_used field to avoid padding.
5214 Add setxid_futex field.
5215 * init.c (sighandler_setxid): Reset setxid flag and release the
5216 setxid futex.
5217 * allocatestack.c (setxid_signal_thread): New function. Broken
5218 out of the bodies of the two loops in __nptl_setxid. For undetached
5219 threads check whether they are exiting and if yes, don't send a signal.
5220 (__nptl_setxid): Simplify loops by using setxid_signal_thread.
5221 * pthread_create.c (start_thread): For undetached threads, check
5222 whether setxid bit is set. If yes, wait until signal has been
5223 processed.
5224
5225 * allocatestack.c (STACK_VARIABLES): Initialize them.
5226 * pthread_create.c (__pthread_create_2_1): Initialize pd.
5227
560b4709
UD
52282004-09-02 Jakub Jelinek <jakub@redhat.com>
5229
5230 * pthread_cond_destroy.c (__pthread_cond_destroy): If there are
5231 waiters, awake all waiters on the associated mutex.
5232
5eac4760
RM
52332005-09-22 Roland McGrath <roland@redhat.com>
5234
5235 * perf.c [__x86_64__] (HP_TIMING_NOW): New macro (copied from
5236 ../sysdeps/x86_64/hp-timing.h).
5237
a3615024
UD
52382005-08-29 Jakub Jelinek <jakub@redhat.com>
5239
5240 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_WAKE_OP,
5241 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5242 (lll_futex_wake_unlock): Define.
5243 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_WAKE_OP,
5244 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5245 (lll_futex_wake_unlock): Define.
5246 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_WAKE_OP,
5247 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5248 (lll_futex_wake_unlock): Define.
5249 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_WAKE_OP,
5250 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5251 (lll_futex_wake_unlock): Define.
5252 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_WAKE_OP,
5253 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5254 (lll_futex_wake_unlock): Define.
5255 * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal): Use
5256 lll_futex_wake_unlock.
5257 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
5258 (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5259 (__pthread_cond_signal): Use FUTEX_WAKE_OP.
5260 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
5261 (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5262 (__pthread_cond_signal): Use FUTEX_WAKE_OP.
5263
bf017034
UD
52642005-09-05 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5265
5266 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
5267 Fix typo in register name.
5268
fd4af664
UD
52692005-08-23 Ulrich Drepper <drepper@redhat.com>
5270
8558d715
UD
5271 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
5272 Use __sigfillset. Document that sigfillset does the right thing wrt
5273 to SIGSETXID.
fd4af664 5274
3fd1bc67
UD
52752005-07-11 Jakub Jelinek <jakub@redhat.com>
5276
44d75caf 5277 [BZ #1102]
3fd1bc67
UD
5278 * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER,
5279 PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP,
5280 PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP,
5281 PTHREAD_MUTEX_ADAPTIVE_NP, PTHREAD_RWLOCK_INITIALIZER,
5282 PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP,
5283 PTHREAD_COND_INITIALIZER): Supply zeros for all fields
5284 in the structure.
5285 * Makefile (tests): Add tst-initializers1.
5286 (CFLAGS-tst-initializers1.c): Set.
5287 * tst-initializers1.c: New test.
5288
553185e2
UD
52892005-07-11 Jakub Jelinek <jakub@redhat.com>
5290
5291 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_rwlock_t):
5292 Make sure __flags are located at offset 48 from the start of the
5293 structure.
5294
8df08cb2
RM
52952005-07-02 Roland McGrath <roland@redhat.com>
5296
5297 * Makeconfig: Comment fix.
5298
253eb3a0
UD
52992005-07-05 Jakub Jelinek <jakub@redhat.com>
5300
5301 * descr.h (PTHREAD_STRUCT_END_PADDING): Define.
5302 * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): If PTHREAD_STRUCT_END_PADDING
5303 is smaller than 8 bytes, increase TLS_PRE_TCB_SIZE by 16 bytes.
5304 (THREAD_SYSINFO, THREAD_SELF, DB_THREAD_SELF): Don't assume
5305 TLS_PRE_TCB_SIZE is sizeof (struct pthread).
5306 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5307 * sysdeps/ia64/tcb-offsets.sym (PID, TID, MULTIPLE_THREADS_OFFSET):
5308 Use TLS_PRE_TCB_SIZE instead of sizeof (struct pthread).
5309 * sysdeps/unix/sysv/linux/ia64/createthread.c (TLS_VALUE): Don't
5310 assume TLS_PRE_TCB_SIZE is sizeof (struct pthread).
5311
bb6e8ca3
UD
53122005-06-25 Jakub Jelinek <jakub@redhat.com>
5313
5314 * sysdeps/i386/tls.h (tcbhead_t): Add stack_guard field.
5315 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5316 * sysdeps/x86_64/tls.h (tcbhead_t): Add sysinfo and stack_guard
5317 fields.
5318 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5319 * sysdeps/s390/tls.h (tcbhead_t): Add stack_guard
5320 field. Put in sysinfo field unconditionally.
5321 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5322 * sysdeps/powerpc/tls.h (tcbhead_t): Add stack_guard field.
5323 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5324 * sysdeps/sparc/tls.h (tcbhead_t): Add sysinfo and stack_guard
5325 fields.
5326 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5327 * pthread_create.c (__pthread_create_2_1): Use
5328 THREAD_COPY_STACK_GUARD macro.
5329 * Makefile: Add rules to build and run tst-stackguard1{,-static}
5330 tests.
5331 * tst-stackguard1.c: New file.
5332 * tst-stackguard1-static.c: New file.
5333
99c7f870
UD
53342005-06-14 Alan Modra <amodra@bigpond.net.au>
5335
5336 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
5337 Invoke CGOTSETUP and CGOTRESTORE.
5338 (CGOTSETUP, CGOTRESTORE): Define.
5339
8074c5c5
RM
53402005-05-29 Richard Henderson <rth@redhat.com>
5341
5342 * tst-cancel4.c (WRITE_BUFFER_SIZE): New.
5343 (tf_write, tf_writev): Use it.
5344 (do_test): Use socketpair instead of pipe. Set SO_SNDBUF to
5345 the system minimum.
5346
c179df4e
UD
53472005-05-23 Jakub Jelinek <jakub@redhat.com>
5348
5349 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
5350 [IS_IN_librt] (CENABLE, CDISABLE): Use JUMPTARGET instead of
5351 __librt_*_asynccancel@local.
5352
b0e196a4
UD
53532005-05-17 Alan Modra <amodra@bigpond.net.au>
5354
5355 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Delete
5356 all occurrences of JUMPTARGET. Instead append @local to labels.
5357
f7d78e18
UD
53582005-05-20 Jakub Jelinek <jakub@redhat.com>
5359
5360 * sysdeps/i386/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN): Define to
5361 size/alignment of struct pthread rather than tcbhead_t.
5362 * sysdeps/x86_64/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
5363 Likewise.
5364 * sysdeps/s390/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
5365 Likewise.
5366 * sysdeps/sparc/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
5367 Likewise.
5368
363dd976
UD
53692005-05-19 Richard Henderson <rth@redhat.com>
5370
5371 * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use
5372 __sync_val_compare_and_swap, not explicit _si variant.
5373 * sysdeps/ia64/pthread_spin_trylock.c (pthread_spin_trylock): Likewise.
5374
1ad9da69
UD
53752005-05-03 Ulrich Drepper <drepper@redhat.com>
5376
5377 [BZ #915]
5378 * sysdeps/pthread/pthread.h: Avoid empty initializers.
5379
5085cd1f
UD
53802005-05-03 Jakub Jelinek <jakub@redhat.com>
5381
5382 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Remove explicit
5383 .eh_frame section, use cfi_* directives.
5384
ad529081
UD
53852005-04-27 Jakub Jelinek <jakub@redhat.com>
5386
5387 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: Use <> instead
5388 of "" includes.
5389
dea99685
UD
53902005-04-27 Ulrich Drepper <drepper@redhat.com>
5391
c06aad09 5392 [BZ #1075]
dea99685
UD
5393 * tst-cancel17.c (do_test): Add arbitrary factor to make sure
5394 aio_write blocks.
5395
84060bad
RM
53962005-04-27 Roland McGrath <roland@redhat.com>
5397
5e2d8ac8
RM
5398 * Makefile (tests): Remove tst-clock2.
5399
84060bad
RM
5400 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Handle
5401 CLOCK_PROCESS_CPUTIME_ID and CLOCK_PROCESS_THREAD_ID specially,
5402 translating to the kernel clockid_t for our own process/thread clock.
5403
5404 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: New file.
5405
4a035b9d
RM
54062005-04-15 Jakub Jelinek <jakub@redhat.com>
5407
5408 * old_pthread_cond_init.c: Include <errno.h>.
5409 (__pthread_cond_init_2_0): Fail with EINVAL if COND_ATTR is
5410 process shared or uses clock other than CLOCK_REALTIME.
5411 * pthread_cond_init.c (__pthread_cond_init): Remove bogus comment.
5412
edac0e8f
UD
54132005-04-13 David S. Miller <davem@davemloft.net>
5414
5415 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: New file.
5416 * sysdeps/sparc/sparc64/clone.S: New file.
5417
613d8d52
RM
54182005-04-05 Jakub Jelinek <jakub@redhat.com>
5419
44d75caf 5420 [BZ #1102]
613d8d52
RM
5421 * sysdeps/pthread/pthread.h (__pthread_cleanup_routine): Use
5422 __inline instead of inline.
5423 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_routine): Likewise.
5424
ee618985
UD
54252005-03-31 Jakub Jelinek <jakub@redhat.com>
5426
5427 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Use
5428 functionally equivalent, but shorter instructions.
5429 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
5430 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
5431 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
5432 Likewise.
5433 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
5434 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
5435 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
5436 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
5437 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5438 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
5439 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
5440 Likewise.
5441 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
5442 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
5443 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
5444 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
5445 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
5446
f850220b
AJ
54472005-03-28 Daniel Jacobowitz <dan@codesourcery.com>
5448
5449 * sysdeps/mips/Makefile: New file.
5450 * sysdeps/mips/nptl-sysdep.S: New file.
5451 * sysdeps/mips/tcb-offsets.sym: New file.
5452 * sysdeps/mips/pthread_spin_lock.S: New file.
5453 * sysdeps/mips/pthread_spin_trylock.S: New file.
5454 * sysdeps/mips/pthreaddef.h: New file.
5455 * sysdeps/mips/tls.h: New file.
5456 * sysdeps/mips/jmpbuf-unwind.h: New file.
5457 * sysdeps/unix/sysv/linux/mips/lowlevellock.h: New file.
5458 * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h: New file.
5459 * sysdeps/unix/sysv/linux/mips/bits/semaphore.h: New file.
5460 * sysdeps/unix/sysv/linux/mips/pthread_once.c: New file.
5461 * sysdeps/unix/sysv/linux/mips/fork.c: New file.
5462 * sysdeps/unix/sysv/linux/mips/pt-vfork.S: New file.
5463 * sysdeps/unix/sysv/linux/mips/vfork.S: New file.
5464 * sysdeps/unix/sysv/linux/mips/clone.S: New file.
5465 * sysdeps/unix/sysv/linux/mips/createthread.c: New file.
5466 * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: New file.
5467
1e6da2b0
UD
54682005-03-23 Ulrich Drepper <drepper@redhat.com>
5469
c06aad09 5470 [BZ #1112]
1e6da2b0
UD
5471 * pthread_create.c (__pthread_create_2_1): Rename syscall error
5472 variable to scerr.
5473
5233d576
RM
54742005-03-10 Jakub Jelinek <jakub@redhat.com>
5475
5476 * tst-getpid1.c (do_test): Align stack passed to clone{2,}.
5477
3053ff11
RM
54782005-02-25 Roland McGrath <roland@redhat.com>
5479
5480 * alloca_cutoff.c: Correct license text.
5481 * tst-unload.c: Likewise.
5482 * sysdeps/pthread/allocalim.h: Likewise.
5483 * sysdeps/pthread/pt-initfini.c: Likewise.
5484 * sysdeps/pthread/bits/libc-lock.h: Likewise.
5485 * sysdeps/pthread/bits/sigthread.h: Likewise.
5486 * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
5487 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
5488
9cfe5381
RM
54892005-02-16 Roland McGrath <roland@redhat.com>
5490
5491 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
5492 Use unsigned int * for ptr_nthreads.
5493
7de00121
RM
54942005-02-14 Alan Modra <amodra@bigpond.net.au>
5495
20d511e0 5496 [BZ #721]
7de00121
RM
5497 * sysdeps/powerpc/tcb-offsets.sym (thread_offsetof): Redefine to suit
5498 gcc4.
5499
4bae262d
UD
55002005-02-07 Richard Henderson <rth@redhat.com>
5501
613d8d52 5502 [BZ #787]
4bae262d
UD
5503 * sysdeps/pthread/pthread.h (__sigsetjmp): Use pointer as first
5504 argument.
5505
75df54b7
RM
55062004-11-03 Marcus Brinkmann <marcus@gnu.org>
5507
5508 * sysdeps/generic/lowlevellock.h (__generic_mutex_unlock): Fix
5509 order of arguments in invocation of atomic_add_zero.
5510
ea9c93cc
UD
55112005-01-26 Jakub Jelinek <jakub@redhat.com>
5512
9cfe5381 5513 [BZ #737]
ea9c93cc
UD
5514 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S (__new_sem_trywait):
5515 Use direct %gs segment access or, if NO_TLS_DIRECT_SEG_REFS,
5516 at least gotntpoff relocation and addition.
5517 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
5518 Likewise.
5519 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
5520 Likewise.
5521 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
5522 Likewise.
5523
9dcafc55
UD
55242005-01-06 Ulrich Drepper <drepper@redhat.com>
5525
5526 * allocatestack.c (init_one_static_tls): Adjust initialization of DTV
5527 entry for static tls deallocation fix.
5528 * sysdeps/alpha/tls.h (dtv_t): Change pointer type to be struct which
5529 also contains information whether the memory pointed to is static
5530 TLS or not.
5531 * sysdeps/i386/tls.h: Likewise.
5532 * sysdeps/ia64/tls.h: Likewise.
5533 * sysdeps/powerpc/tls.h: Likewise.
5534 * sysdeps/s390/tls.h: Likewise.
5535 * sysdeps/sh/tls.h: Likewise.
5536 * sysdeps/sparc/tls.h: Likewise.
5537 * sysdeps/x86_64/tls.h: Likewise.
5538
a71c152c
UD
55392004-12-27 Ulrich Drepper <drepper@redhat.com>
5540
5541 * init.c (__pthread_initialize_minimal_internal): Use __sigemptyset.
5542
d143c49e
UD
55432004-12-21 Jakub Jelinek <jakub@redhat.com>
5544
5545 * sysdeps/i386/tls.h (CALL_THREAD_FCT): Maintain 16 byte alignment of
5546 %esp.
5547 * Makefile (tests): Add tst-align2.
5548 * tst-align2.c: New test.
5549 * sysdeps/i386/Makefile (CFLAGS-tst-align{,2}.c): Add
5550 -mpreferred-stack-boundary=4.
5551
50130ded
RM
55522004-12-18 Roland McGrath <roland@redhat.com>
5553
5554 * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h:
5555 New file removed withdrawn for the moment.
5556
cbc53df0
RH
55572004-12-17 Richard Henderson <rth@redhat.com>
5558
5559 * sysdeps/unix/sysv/linux/alpha/clone.S: New file.
5560 * sysdeps/alpha/tcb-offsets.sym (TID_OFFSET): New.
50130ded 5561
fb9d5c73
UD
55622004-12-16 Ulrich Drepper <drepper@redhat.com>
5563
03332aa6
UD
5564 * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h: New file.
5565 Increased PTHREAD_STACK_MIN.
5566
fb9d5c73
UD
5567 * tst-context1.c (stacks): Use bigger stack size.
5568
e853ea00
UD
55692004-12-16 Jakub Jelinek <jakub@redhat.com>
5570
5571 * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: New file.
5572 * sysdeps/sparc/tcb-offsets.sym: Add TID.
5573
f23673fc
UD
55742004-12-15 Jakub Jelinek <jakub@redhat.com>
5575
5576 * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: New file.
5577 * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: New file.
5578 * sysdeps/s390/tcb-offsets.sym (TID): Add.
5579
917fbe70
UD
55802004-12-15 Ulrich Drepper <drepper@redhat.com>
5581
5582 * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: New file.
5583
1f9d7c27
UD
55842004-12-14 Ulrich Drepper <drepper@redhat.com>
5585
5586 * sysdeps/powerpc/tcb-offsets.sym: Add TID.
5587 * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: New file.
5588
5589 * tst-getpid1.c: If child crashes, report this first. Print which
5590 signal.
5591
bf7c04cd
UD
55922004-12-09 Ulrich Drepper <drepper@redhat.com>
5593
5594 * init.c (__pthread_initialize_minimal_internal): Also unblock
5595 SIGSETXID.
5596
55972004-12-01 Jakub Jelinek <jakub@redhat.com>
5598
5599 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_CPUTIME,
5600 _POSIX_THREAD_CPUTIME): Define to 0.
5601 * sysdeps/pthread/timer_create.c (timer_create): Remove unused code
5602 handling CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID.
5603 * sysdeps/pthread/timer_routines.c (__timer_signal_thread_pclk,
5604 __timer_signal_thread_tclk): Remove.
5605 (init_module): Remove their initialization.
5606 (thread_cleanup): Remove their cleanup assertions.
5607 * sysdeps/pthread/posix-timer.h (__timer_signal_thread_pclk,
5608 __timer_signal_thread_tclk): Remove.
5609 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Removed.
75df54b7 5610 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Removed.
bf7c04cd
UD
5611 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Removed.
5612
484cc801
UD
56132004-12-07 Jakub Jelinek <jakub@redhat.com>
5614
5615 * sysdeps/ia64/tcb-offsets.sym (TID): Add.
5616 * sysdeps/unix/sysv/linux/ia64/clone2.S: New file.
5617
5618 * Makefile (tests): Add tst-getpid2.
5619 * tst-getpid1.c (TEST_CLONE_FLAGS): Define.
5620 (do_test): Use it. Use __clone2 instead of clone on ia64.
5621 * tst-getpid2.c: New test.
5622
2da9a6a1
UD
56232004-12-07 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5624
5625 * sysdeps/unix/sysv/linux/sh/clone.S: New file.
5626
1ff241b8
UD
56272004-12-04 Ulrich Drepper <drepper@redhat.com>
5628
5629 * Makefile (tests): Add tst-getpid1.
5630 * tst-getpid1.c: New file.
5631 * sysdeps/unix/sysv/linux/i386/clone.S: New file.
5632 * sysdeps/unix/sysv/linux/x86_64/clone.S: New file.
5633
3f488b9c
RM
56342004-12-02 Roland McGrath <roland@redhat.com>
5635
5636 * Makefile (libpthread-nonshared): Variable removed.
5637 ($(objpfx)libpthread_nonshared.a): Target removed.
5638 ($(inst_libdir)/libpthread_nonshared.a): Likewise.
5639 These are now handled by generic magic from
5640 libpthread-static-only-routines being set.
5641
597ce09c
UD
56422004-11-27 Ulrich Drepper <drepper@redhat.com>
5643
5644 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_PRIORITIZED_IO,
5645 _POSIX2_CHAR_TERM, _POSIX_THREAD_PRIO_INHERIT,
5646 _POSIX_THREAD_PRIO_PROTECT): Define.
5647 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
5648 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
5649 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
5650
60e4523a
UD
56512004-11-26 Jakub Jelinek <jakub@redhat.com>
5652
5653 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_ADVISORY_INFO,
5654 _POSIX_SPORADIC_SERVER, _POSIX_THREAD_SPORADIC_SERVER, _POSIX_TRACE,
5655 _POSIX_TRACE_EVENT_FILTER, _POSIX_TRACE_INHERIT, _POSIX_TRACE_LOG,
5656 _POSIX_TYPED_MEMORY_OBJECTS, _POSIX_IPV6, _POSIX_RAW_SOCKETS): Define.
5657 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
5658 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
5659 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
5660
f1f2cafc
UD
56612004-11-24 Ulrich Drepper <drepper@redhat.com>
5662
bca2d208
UD
5663 * sysdeps/x86_64/Makefile [nptl]: Define CFLAGS-pthread_create.c.
5664
f1f2cafc
UD
5665 * Makefile (libpthread-routines): Add pthread_setschedprio.
5666 * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setschedprio.
5667 * sysdeps/pthread/pthread.h: Declare pthread_setschedprio.
5668 * pthread_setschedprio.c: New file.
5669
b639d0c9
UD
56702004-11-20 Jakub Jelinek <jakub@redhat.com>
5671
ef2bb413
UD
5672 * pthread_create.c (pthread_cancel): Add PTHREAD_STATIC_FN_REQUIRE.
5673 * pthread_cancel.c (pthread_create): Likewise.
5674
b639d0c9
UD
5675 * Makefile (libpthread-routines): Add vars.
5676 * sysdeps/pthread/createthread.c (__pthread_multiple_threads): Remove.
5677 * init.c (__default_stacksize, __is_smp): Remove.
5678 * vars.c: New file.
5679 * pthreadP.h (__find_thread_by_id): If !SHARED, add weak_function
5680 and define a wrapper macro.
5681 (PTHREAD_STATIC_FN_REQUIRE): Define.
5682 * allocatestack.c (__find_thread_by_id): Undefine.
5683 * pthread_create (__pthread_keys): Remove.
5684 (pthread_mutex_lock, pthread_mutex_unlock, pthread_once,
5685 pthread_key_create, pthread_setspecific, pthread_getspecific): Add
5686 PTHREAD_STATIC_FN_REQUIRE.
5687
3defcff3
UD
56882004-11-18 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5689
5690 * sysdeps/sh/tls.h (DB_THREAD_SELF): Set the correct bias
5691 parameter to REGISTER macro.
5692
ec188f92
RM
56932004-11-17 Roland McGrath <roland@redhat.com>
5694
5695 * sysdeps/unix/sysv/linux/timer_routines.c (__start_helper_thread):
5696 Make sure SIGCANCEL is blocked as well.
5697
ccd8de9a
UD
56982004-11-10 Jakub Jelinek <jakub@redhat.com>
5699
5700 * sysdeps/pthread/setxid.h: New file.
5701 * sysdeps/pthread/pthread-functions.h (HAVE_PTR__NPTL_SETXID): Remove.
5702 (struct xid_command): Add forward decl.
5703 (struct pthread_functions): Change return type of __nptl_setxid hook
5704 to int.
5705 * pthreadP.h (__nptl_setxid): Change return type to int.
5706 * allocatestack.c (__nptl_setxid): Call INTERNAL_SYSCALL_NCS in the
5707 calling thread, return its return value and set errno on failure.
5708 * descr.h (struct xid_command): Change id type to long array.
5709
5710 * Makefile: Add rules to build and test tst-setuid1 and
5711 tst-setuid1-static.
5712 * tst-setuid1.c: New test.
5713 * tst-setuid1-static.c: New test.
5714
ed2ced8a
UD
57152004-11-10 Jakub Jelinek <jakub@redhat.com>
5716
5717 * Makefile (tests): Add tst-exit3.
5718 * tst-exit3.c: New test.
5719
948603ee
UD
57202004-11-09 Ulrich Drepper <drepper@redhat.com>
5721
5722 * Makefile (tests): Add tst-exit2.
5723 * tst-exit2.c: New file.
5724
ba5ffd2a
RM
57252004-11-09 Roland McGrath <roland@redhat.com>
5726
5727 [BZ #530]
5728 * sysdeps/pthread/createthread.c (do_clone): Increment __nptl_nthreads
5729 here, before calling clone.
5730 * pthread_create.c (start_thread): Don't do it here.
5731
c4d7bd39
RM
57322004-11-02 Jakub Jelinek <jakub@redhat.com>
5733
5734 * sysdeps/unix/sysv/linux/smp.h: Include <errno.h>.
5735
543fb0c8
UD
57362004-10-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5737
5738 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
5739 Set ETIMEDOUT to errno when time is up. Tweak to avoid
5740 assembler warning.
5741
a1fbd858
UD
57422004-10-28 Jakub Jelinek <jakub@redhat.com>
5743
5744 * pthread_create.c (__pthread_create_2_1): Avoid leaking stacks
5745 if sched_priority is not between minprio and maxprio.
5746
c2a4357a
UD
57472004-10-25 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5748
5749 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
5750 (__pthread_cond_timedwait): Use clock_gettime syscall if exists.
5751
5752 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
5753 (__lll_mutex_timedlock_wait): Fix a bad branch condition.
5754
78d8d211
UD
57552004-10-24 Ulrich Drepper <drepper@redhat.com>
5756
5757 * sysdeps/unix/sysv/linux/smp.h (is_smp_system): Use
5758 not-cancelable I/O functions.
5759
dd28590f
UD
57602004-10-21 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5761
5762 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
5763 (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
5764 make sure 2 is stored in the futex and we looked at the old value.
5765 Fix a few other problems to return the correct value.
5766
f8c97af7
RH
57672004-10-14 Richard Henderson <rth@redhat.com>
5768
5769 * sysdeps/alpha/tcb-offsets.sym (thread_offsetof): Redefine to
5770 make gcc4 happy.
5771
3feb8efa
UD
57722004-10-06 Jakub Jelinek <jakub@redhat.com>
5773
5774 * sysdeps/unix/sysv/linux/jmp-unwind.c: Include pthreadP.h instead
5775 of pthread-functions.h and pthreaddef.h.
5776 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Likewise.
5777
5778 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
5779 Change __data.__nwaiters from int to unsigned int.
5780
5781 * tst-clock2.c (do_test): Don't fail if _POSIX_THREAD_CPUTIME == 0 and
5782 sysconf (_SC_THREAD_CPUTIME) returns negative value.
5783
5784 * allocatestack.c (__find_thread_by_id): Move attribute_hidden
5785 before return type.
5786
5787 * sysdeps/s390/jmpbuf-unwind.h: Include bits/wordsize.h.
5788 (JMPBUF_CFA_UNWINDS_ADJ): Subtract 96 resp. 160 bytes from CFA.
5789
67060ef5
UD
57902004-10-06 Ulrich Drepper <drepper@redhat.com>
5791
5792 * tst-cancel4.c (tf_msgrcv): Check for failure in msgget. If the
5793 test fails, remove message queue.
5794 (tf_msgsnd): Likewise.
5795
f38a3086
UD
57962004-10-05 Jakub Jelinek <jakub@redhat.com>
5797
5798 * tst-clock1.c: Change #ifdef to #if defined.
5799 * tst-clock2.c: Likewise.
5800 * tst-cond11.c: Likewise.
5801
2c03b6db
UD
5802 * sysdeps/pthread/timer_create.c (timer_create): Use
5803 defined _POSIX_CPUTIME && _POSIX_CPUTIME >= 0 instead of
5804 defined CLOCK_PROCESS_CPUTIME_ID #ifs and similarly for
5805 THREAD_CPUTIME.
5806
6ab5f50d
UD
58072004-10-05 Jakub Jelinek <jakub@redhat.com>
5808
5809 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h (_POSIX_CPUTIME,
5810 _POSIX_THREAD_CPUTIME): Define to 0.
5811
e4bb4853
UD
58122004-10-04 Ulrich Drepper <drepper@redhat.com>
5813
5814 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Define _POSIX_CPUTIME
5815 and _POSIX_THREAD_CPUTIME to zero.
5816 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
5817 * tst-barrier2.c: Fix testing for POSIX feature.
5818 * tst-clock1.c: Likewise.
5819 * tst-clock2.c: Likewise.
5820 * tst-cond11.c: Likewise.
5821 * tst-cond4.c: Likewise.
5822 * tst-cond6.c: Likewise.
5823 * tst-flock2.c: Likewise.
5824 * tst-mutex4.c: Likewise.
5825 * tst-mutex9.c: Likewise.
5826 * tst-rwlock12.c: Likewise.
5827 * tst-rwlock4.c: Likewise.
5828 * tst-signal1.c: Likewise.
5829 * tst-spin2.c: Likewise.
5830 * sysdeps/pthread/posix-timer.h: Likewise.
5831 * sysdeps/pthread/timer_create.c: Likewise.
5832 * sysdeps/pthread/timer_routines.c: Likewise.
5833
c1b48791
UD
58342004-10-01 Ulrich Drepper <drepper@redhat.com>
5835
927f0673
UD
5836 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
5837 (__lll_mutex_timedlock_wait): Address futex correctly.
5838
c1b48791 5839 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
b610fa2d 5840 (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
c1b48791
UD
5841 make sure 2 is stored in the futex and we looked at the old value.
5842 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
5843 (__lll_mutex_timedlock_wait): Likewise. Fix a few other problems
5844 which might very well made the code not working at all before.
7b87aca6 5845 [BZ #417]
c1b48791 5846
e9f4e844
UD
58472004-09-28 Ulrich Drepper <drepper@redhat.com>
5848
4f21c95d
UD
5849 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
5850 allow SIGSETXID to be sent.
5851 * sysdeps/pthread/sigaction.c (__sigaction): Don't allow action
5852 for SIGSETXID to be defined.
5853 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
5854 SIGSETXID cannot be blocked.
5855
e9f4e844
UD
5856 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
5857 Add __extension__ to long long types.
5858 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5859 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5860 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5861 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5862 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
5863 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
5864 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5865
5f66b766
UD
58662004-09-25 Ulrich Drepper <drepper@redhat.com>
5867
5868 * descr.h (struct pthread): Add stopped_start field.
5869 * sysdeps/pthread/createthread.c (create_thread): Set
5870 start_stopped flag in descriptor for new thread appropriately.
5871 * pthread_create.c (start_thread): Only take lock to be stopped on
5872 startup if stopped_start flag says so.
5873
362038b0
UD
58742004-09-24 Ulrich Drepper <drepper@redhat.com>
5875
3f80a99b
UD
5876 * pthread_create.c (__pthread_create_2_1): Remember whether thread
5877 is created detached and if yes, do not try to free the stack in case
5878 the thread creation failed.
5879 * sysdeps/pthread/createthread.c (do_clone): Free stack here if clone
5880 call fails. Don't depend on INTERNAL_SYSCALL_ERRNO return zero in
5881 case there has been no error. [BZ #405]
5882
362038b0
UD
5883 * pthread_create.c (start_thread): Don't wait for scheduler data
5884 etc to be set at the beginning of the function. The cancellation
5885 infrastructure must have been set up. And enable async
5886 cancellation before potentially going to sleep. [BZ #401]
5887
65f0beb9
UD
58882004-09-20 Ulrich Drepper <drepper@redhat.com>
5889
3c12b91a 5890 * Versions: Remove exports for pthread_set*id_np functions.
65f0beb9
UD
5891 * sysdeps/pthread/pthread.h: Remove pthread_set*id_np prototypes
5892 for now.
5893 * Makefile: Don't build pthread_set*id code for now.
5894
2edb61e3
UD
58952004-09-19 Ulrich Drepper <drepper@redhat.com>
5896
5897 * sysdeps/unix/sysv/linux/allocrtsig.c: Allocate second signal for
5898 internal use.
5899 * allocatestack.c (__nptl_setxid): New function.
5900 * descr.h (struct xid_command): Define type.
5901 * init.c (pthread_functions): Add ptr__nptl_setxid initialization.
5902 (sighandler_setxid): New function.
5903 (__pthread_initialize_minimal): Register sighandler_setxid for
5904 SIGCANCEL.
5905 * pt-allocrtsig.c: Update comment.
5906 * pthreadP.h: Define SIGSETXID. Declare __xidcmd variable.
5907 Declare __nptl_setxid.
5908 * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_setxid.
5909 * sysdeps/pthread/pthread.h: Declare pthread_setgid_np,
5910 pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
5911 pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
5912 and pthread_setresuid_np.
5913 * pthread_setgid_np.c: New file.
5914 * pthread_setuid_np.c: New file.
5915 * pthread_setegid_np.c: New file.
5916 * pthread_seteuid_np.c: New file.
5917 * pthread_setregid_np.c: New file.
5918 * pthread_setreuid_np.c: New file.
5919 * pthread_setresgid_np.c: New file.
5920 * pthread_setresuid_np.c: New file.
5921 * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setgid_np,
5922 pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
5923 pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
5924 and pthread_setresuid_np.
5925 * Makefile (libpthread-routines): Add pthread_setuid, pthread_seteuid,
5926 pthread_setreuid, pthread_setresuid, pthread_setgid, pthread_setegid,
5927 pthread_setregid, and pthread_setresgid.
5928
1ab1fa6f
UD
59292004-09-18 Ulrich Drepper <drepper@redhat.com>
5930
5931 * allocatestack.c (allocate_stack): Return EAGAIN instead of
5932 ENOMEM when out of memory.
5933
ae9e6b36
RM
59342004-09-10 Roland McGrath <roland@redhat.com>
5935
5936 [BZ #379]
5937 * allocatestack.c (allocate_stack): Remove [__ASSUME_CLONE_STOPPED]
5938 code, since we don't try to use the broken CLONE_STOPPED any more.
5939 * pthread_create.c (start_thread): Likewise.
5940
424bd2f8
RH
59412004-09-15 Richard Henderson <rth@redhat.com>
5942
5943 * sysdeps/unix/sysv/linux/alpha/vfork.S: Use libc_hidden_def.
5944
17b8a52d
UD
59452004-09-01 David Mosberger <davidm@hpl.hp.com>
5946
5947 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h
5948 (__libc_unwind_longjmp): Delete macro and declare as function.
5949 * sysdeps/unix/sysv/linux/ia64/Makefile (sysdep_routines): Mention
5950 __ia64_longjmp, sigstack_longjmp, and __sigstack_longjmp for
5951 nptl directory.
5952 * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S: New file.
5953 * sysdeps/unix/sysv/linux/ia64/__sigstack_longjmp.c: New file.
5954 * sysdeps/unix/sysv/linux/ia64/unwind_longjmp.c: New file.
5955
ccc63b07
UD
59562004-09-12 Ulrich Drepper <drepper@redhat.com>
5957
5958 * sysdeps/pthread/pthread.h: Make rwlock prototypes available also
5959 for __USE_XOPEN2K.
5960 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define rwlock
5961 types also for __USE_XOPEN2K.
5962 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
5963 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5964 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5965 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5966 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
5967 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5968 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5969 [BZ #320]
5970
31f93b3b
UD
59712004-09-08 Ulrich Drepper <drepper@redhat.com>
5972
5973 * sysdeps/pthread/pthread.h
5974 (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Make safe for C++.
5975 (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
5976 (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
5977 (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Likewise.
5978 [BZ #375]
5979
e0329987
UD
59802004-09-07 Ulrich Drepper <drepper@redhat.com>
5981
590b40f7
UD
5982 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Allow
5983 PSEUDO to be used with . prefix.
5984
67254a97
UD
5985 * sysdeps/unix/sysv/linux/alpha/pthread_once.c (__pthread_once):
5986 Use atomic_increment instead of atomic_exchange_and_add.
5987 * sysdeps/unix/sysv/linux/sparc/pthread_once.c (__pthread_once):
5988 Likewise.
5989 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
5990 Likewise.
5991 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
5992 Likewise.
5993
5994 * allocatestack.c (allocate_stack): Use atomic_increment_val
5995 instead of atomic_exchange_and_add.
5996 * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Likewise.
5997 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
5998 Likewise.
5999 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
6000 Likewise.
6001
e0329987
UD
6002 * sysdeps/pthread/pthread.h (pthread_once): Remove __THROW since
6003 the initialization function might throw.
6004
42d86dd6 60052005-09-05 Richard Henderson <rth@redhat.com>
e0329987 6006
42d86dd6
RH
6007 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
6008 Move definition inside libpthread, libc, librt check. Provide
6009 definition for rtld.
6010
73f7c32c
UD
60112004-09-02 Ulrich Drepper <drepper@redhat.com>
6012
f76c8499
UD
6013 * sysdeps/alpha/jmpbuf-unwind.h: Define __libc_unwind_longjmp.
6014 * sysdeps/i386/jmpbuf-unwind.h: Likewise
6015 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
6016 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
6017 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
6018 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
6019 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
6020 * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
6021 * unwind.c: Use it.
6022
73f7c32c
UD
6023 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
6024 Rename __data.__clock to __data.__nwaiters, make it unsigned int.
6025 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
6026 Likewise.
6027 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
6028 Decrement __nwaiters. If pthread_cond_destroy has been called and
6029 this is the last waiter, signal pthread_cond_destroy caller and
6030 avoid using the pthread_cond_t structure after unlock.
6031 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6032 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6033 Read clock type from the least significant bits of __nwaiters instead
6034 of __clock.
6035 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6036 * sysdeps/unix/sysv/linux/internaltypes.h: Define COND_CLOCK_BITS.
6037
60382004-08-31 Jakub Jelinek <jakub@redhat.com>
6039
6040 [BZ #342]
6041 * Makefile (tests): Add tst-cond20 and tst-cond21.
6042 * tst-cond20.c: New test.
6043 * tst-cond21.c: New test.
6044 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
6045 (pthread_cond_t): Rename __data.__clock to __data.__nwaiters, make
6046 it unsigned int.
6047 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
6048 Likewise.
6049 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
6050 (pthread_cond_t): Likewise.
6051 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
6052 Likewise.
6053 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
6054 Likewise.
6055 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
6056 Likewise.
6057 * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_clock): Remove.
6058 (cond_nwaiters): New.
6059 (clock_bits): New.
6060 * pthread_cond_destroy.c (__pthread_cond_destroy): Return EBUSY
6061 if there are waiters not signalled yet.
6062 Wait until all already signalled waiters wake up.
6063 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Decrement
6064 __nwaiters. If pthread_cond_destroy has been called and this is the
6065 last waiter, signal pthread_cond_destroy caller and avoid using
6066 the pthread_cond_t structure after unlock.
6067 (__pthread_cond_wait): Increment __nwaiters in the beginning,
6068 decrement it when leaving. If pthread_cond_destroy has been called
6069 and this is the last waiter, signal pthread_cond_destroy caller.
6070 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
6071 Likewise. Read clock type from the least significant bits of
6072 __nwaiters instead of __clock.
6073 * pthread_condattr_setclock.c (pthread_condattr_setclock): Check
6074 whether clock ID can be encoded in COND_CLOCK_BITS bits.
6075 * pthread_condattr_getclock.c (pthread_condattr_getclock): Decode
6076 clock type just from the last COND_CLOCK_BITS bits of value.
6077 * pthread_cond_init.c (__pthread_cond_init): Initialize __nwaiters
6078 instead of __clock, just from second bit of condattr's value.
6079
409f7493
UD
60802004-08-30 Jakub Jelinek <jakub@redhat.com>
6081
6082 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Include
6083 bits/wordsize.h. Make the header match i386 header when __WORDSIZE
6084 != 64.
6085 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
6086
92c6ccd1
RM
60872004-08-15 Roland McGrath <roland@frob.com>
6088
6089 * pthread_atfork.c: Update copyright terms including special exception
6090 for these trivial files, which are statically linked into executables
6091 that use dynamic linking for the significant library code.
6092
4d004cfb
UD
60932004-08-09 Jakub Jelinek <jakub@redhat.com>
6094
6095 * DESIGN-rwlock.txt: Add decreasing of nr_readers_queued to
6096 pthread_rwlock_rdlock.
6097 * sysdeps/pthread/pthread_rwlock_rdlock (__pthread_rwlock_rdlock):
6098 Decrease __nr_readers_queued after reacquiring lock.
6099 * sysdeps/pthread/pthread_rwlock_timedrdlock
6100 (pthread_rwlock_timedrdlock): Likewise.
6101 Reported by Bob Cook <bobcook47@hotmail.com>.
6102
90595fb6
RM
61032004-08-11 Jakub Jelinek <jakub@redhat.com>
6104
6105 * tst-rwlock14.c (tf): Read main thread handle from *ARG
6106 before pthread_barrier_wait.
6107
fa46f7ab
UD
61082004-08-07 Ulrich Drepper <drepper@redhat.com>
6109
6110 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
6111 Remove unnecessary exception handling data.
6112
15ef4b55
UD
61132004-07-23 Jakub Jelinek <jakub@redhat.com>
6114
6115 [BZ #284]
6116 * sysdeps/pthread/pthread.h (pthread_getcpuclockid): Use __clockid_t
6117 instead of clockid_t.
6118
4fb907b7
RM
61192004-07-21 Roland McGrath <roland@redhat.com>
6120
6121 * Makefile ($(objpfx)multidir.mk): Use $(make-target-directory).
6122
61232004-07-19 Roland McGrath <roland@redhat.com>
6124
6125 * tst-cancel4.c (tf_waitid): Use WEXITED flag bit if available.
6126
8f73811b
RM
61272004-07-02 Roland McGrath <roland@redhat.com>
6128
6129 * configure: Don't exit.
6130
290639c3
UD
61312004-07-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6132
6133 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
6134 (__pthread_cond_timedwait): Check for invalid nanosecond in
6135 timeout value.
6136
8e5aaad9
UD
61372004-07-07 Ulrich Drepper <drepper@redhat.com>
6138
6139 * Makefile: Add rules to build and run tst-fini1.
6140 * tst-fini1.c: New file.
6141 * tst-fini1mod.c: New file.
6142
ce6e047f
UD
61432004-07-05 Ulrich Drepper <drepper@redhat.com>
6144
6145 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define NO_CANCELLATION
6146 if no cancellation support is needed.
6147 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
6148 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
6149 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
6150 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
6151 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
6152 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
6153 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
6154 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
6155 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
6156
6157 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define __NR_futex
6158 only if not already defined.
6159
9b9ef823
UD
61602004-07-05 Jakub Jelinek <jakub@redhat.com>
6161
2dd18ce2
UD
6162 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_unlock): Use
6163 constraint "m" instead of "0" for futex.
6164
9b9ef823
UD
6165 * shlib-versions: Add powerpc64-.*-linux.*.
6166
38205402
UD
61672004-07-04 Jakub Jelinek <jakub@redhat.com>
6168
6169 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
6170 (pthread_rwlock_timedrdlock): Use cmpq instead of cmpl to check
6171 for valid tv_nsec.
6172 * tst-rwlock14.c (do_test): Test for invalid tv_nsec equal to
6173 1 billion and 64-bit tv_nsec which is valid when truncated to 32
6174 bits.
6175
78a9c837
RM
61762004-06-29 Roland McGrath <roland@redhat.com>
6177
6178 * Banner: NPTL no longer has its own version number.
6179 * Makefile (nptl-version): Variable removed.
6180 * sysdeps/pthread/Makefile (CFLAGS-confstr.c): Set LIBPTHREAD_VERSION
6181 using $(version), the glibc version number.
6182
d3d35527
UD
61832004-06-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6184
6185 * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
6186 Fix branch offset for a PLT entry.
6187 * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
6188 Likewise.
6189 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
6190 Likewise.
6191 * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
6192 Likewise.
6193 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait):
6194 Likewise.
6195
346f18ae
UD
61962004-06-28 Jakub Jelinek <jakub@redhat.com>
6197
6198 * sysdeps/alpha/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define
6199 unconditionally.
6200
f3a19754
UD
62012004-06-28 Jakub Jelinek <jakub@redhat.com>
6202
6203 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
6204 (pthread_rwlock_timedwrlock): Return EINVAL if tv_nsec is negative,
6205 instead of tv_sec.
6206 * sysdeps/pthread/pthread_rwlock_timedrdlock.c
6207 (pthread_rwlock_timedrdlock): Likewise.
6208
539842a4
UD
62092004-06-22 Jakub Jelinek <jakub@redhat.com>
6210
6211 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
6212 Set __r7 to val, not mutex.
6213
46f4c578
UD
62142004-06-27 Ulrich Drepper <drepper@redhat.com>
6215
6216 * Makefile: Add rules to build tst-rwlock14.
6217 * tst-rwlock14.c: New file.
6218
62192004-06-24 Boris Hu <boris.hu@intel.com>
6220
6221 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Add timeout validation
6222 check.
6223 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
6224
9898e99c
AJ
62252004-06-19 Andreas Jaeger <aj@suse.de>
6226
6227 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix
6228 assembler in last patch.
6229
7c3164bc
UD
62302004-06-17 Ulrich Drepper <drepper@redhat.com>
6231
6232 * sysdeps/pthread/pthread_cond_timedwait.c
6233 (__pthread_cond_timedwait): Also check for negativ nanoseconds.
6234 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6235 (__pthread_cond_timedwait): Check for invalid nanosecond in
6236 timeout value.
6237 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6238 * tst-cond19.c: New file.
6239 * Makefile: Add rules to build and run tst-cond19.
6240
72e61500
UD
62412004-06-15 Steven Munroe <sjmunroe@us.ibm.com>
6242
6243 * tst-context1.c (GUARD_PATTERN): Defined.
6244 (tst_context_t): Define struct containing ucontext_t & guard words.
6245 (ctx): Declare as an array of tst_context_t.
6246 (fct): Verify uc_link & guard words are still valid.
6247 (tf): Initialize guard words in ctx. Adjust ctx refs for new struct.
6248
7c370086
UD
62492004-06-13 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6250
6251 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
6252 Add __data.__futex field, reshuffle __data.__clock.
6253 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
6254 (__pthread_cond_signal): Increment __futex at the same time as
6255 __wakeup_seq or __total_seq. Pass address of __futex instead of
6256 address of low 32-bits of __wakeup_seq to futex syscall.
6257 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
6258 (__pthread_cond_wait): Likewise. Pass __futex value from before
6259 releasing internal lock to FUTEX_WAIT.
6260 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
6261 (__pthread_cond_timedwait): Likewise.
6262 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
6263 (FUTEX_CMP_REQUEUE): Define.
6264 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
6265 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
6266 Pass __futex value from before the unlock and __futex address instead
6267 of address of low 32-bits of __wakeup_seq to futex syscall.
6268 Fallback to FUTEX_WAKE all on any errors.
6269
a9e526e7
RM
62702004-06-08 Jakub Jelinek <jakub@redhat.com>
6271
6272 * pthread_mutexattr_getpshared.c (pthread_mutex_getpshared): Fix
6273 comment typo.
6274 * pthread_mutexattr_gettype.c (pthread_mutexattr_gettype): Likewise.
6275 * pthread_mutexattr_init.c (__pthread_mutexattr_init): Likewise.
6276 * pthread_mutexattr_settype.c (__pthread_mutexattr_settype): Likewise.
6277 * pthread_mutexattr_setpshared.c (pthread_mutexattr_setpshared):
6278 Likewise. Reported by Bob Cook <bobcook47@hotmail.com>.
6279
f1847a84
RM
62802004-06-11 Martin Schwidefsky <schwidefsky@de.ibm.com>
6281
6282 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_compare_and_swap):
6283 Add memory clobber to inline assembly.
6284 (__lll_mutex_trylock): Likewise.
6285 (__lll_mutex_cond_trylock): Likewise.
6286
f7c81e1a
UD
62872004-06-07 Martin Schwidefsky <schwidefsky@de.ibm.com>
6288
6289 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
6290 Pass val argument as 6th system call argument in %r7.
6291
75fccede
UD
62922004-05-21 Jakub Jelinek <jakub@redhat.com>
6293
6294 * Makefile (tests): Add tst-cond16.
6295 * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_futex): Add.
6296 * pthread_cond_init.c (__pthread_cond_init): Clear __data.__futex.
6297 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
6298 Add __data.__futex field, reshuffle __data.__clock.
6299 * sysdeps/unix/sysv/linux/i386/pthread_cond_signal.S
6300 (__pthread_cond_signal): Increment __futex at the same time as
6301 __wakeup_seq or __total_seq. Pass address of __futex instead of
6302 address of low 32-bits of __wakeup_seq to futex syscall.
6303 * sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S
6304 (__pthread_cond_wait): Likewise. Pass __futex value from before
6305 releasing internal lock to FUTEX_WAIT.
6306 * sysdeps/unix/sysv/linux/i386/pthread_cond_timedwait.S
6307 (__pthread_cond_timedwait): Likewise.
6308 * sysdeps/unix/sysv/linux/i386/pthread_cond_broadcast.S
6309 (FUTEX_CMP_REQUEUE): Define.
6310 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
6311 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
6312 Pass __futex value from before the unlock and __futex address instead
6313 of address of low 32-bits of __wakeup_seq to futex syscall.
6314 Fallback to FUTEX_WAKE all on any errors.
6315 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_CMP_REQUEUE):
6316 Define.
6317 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
6318 internally. Return non-zero if error, zero if success.
6319 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
6320 Add __data.__futex field, reshuffle __data.__clock.
6321 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_CMP_REQUEUE):
6322 Define.
6323 (lll_futex_requeue): Add val argument, return 1 unconditionally
6324 for the time being.
6325 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
6326 Add __data.__futex field, reshuffle __data.__clock.
6327 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_CMP_REQUEUE):
6328 Define.
6329 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
6330 internally. Return non-zero if error, zero if success.
6331 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
6332 (pthread_cond_t): Add __data.__futex field, reshuffle __data.__clock.
6333 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_CMP_REQUEUE):
6334 Define.
6335 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
6336 internally. Return non-zero if error, zero if success.
6337 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
6338 Add __data.__futex field, reshuffle __data.__clock.
6339 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_CMP_REQUEUE):
6340 Define.
6341 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
6342 internally. Return non-zero if error, zero if success.
6343 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
6344 Add __data.__futex field, reshuffle __data.__clock.
6345 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
6346 Add __data.__futex field, reshuffle __data.__clock.
6347 * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal):
6348 Increment __futex at the same time as __wakeup_seq or __total_seq.
6349 Pass address of __futex instead of address of low 32-bits of
6350 __wakeup_seq to futex syscall.
6351 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
6352 Pass __futex value from before releasing internal lock
6353 to FUTEX_WAIT.
6354 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
6355 Likewise. Avoid unnecessary shadowing of variables.
6356 * sysdeps/pthread/pthread_cond_broadcast.c (__pthread_cond_broadcast):
6357 Set __futex to 2 * __total_seq. Pass __futex value from before the
6358 unlock and __futex address instead of address of low 32-bits of
6359 __wakeup_seq to futex_requeue macro, adjust for new return value
6360 meaning.
6361 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
6362 (__pthread_cond_signal): Increment __futex at the same time as
6363 __wakeup_seq or __total_seq. Pass address of __futex instead of
6364 address of low 32-bits of __wakeup_seq to futex syscall.
6365 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
6366 (__pthread_cond_wait): Likewise. Pass __futex value from before
6367 releasing internal lock to FUTEX_WAIT.
6368 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
6369 (__pthread_cond_timedwait): Likewise.
6370 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
6371 (FUTEX_CMP_REQUEUE): Define.
6372 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
6373 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
6374 Pass __futex value from before the unlock and __futex address instead
6375 of address of low 32-bits of __wakeup_seq to futex syscall.
6376 Fallback to FUTEX_WAKE all on any errors.
6377
63782004-06-03 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6379
6380 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_mutex_lock):
6381 Add nop to align the end of critical section.
6382 (lll_mutex_cond_lock, lll_mutex_timedlock): Likewise.
6383
fbf86dda
UD
63842004-06-01 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6385
6386 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
6387 Add __broadcast_seq field.
6388 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Mark
6389 all waiters as woken with woken_seq and bump broadcast counter.
6390 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use new
6391 __broadcast_seq. Increment __woken_seq correctly when cleanuped.
6392 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
6393 Comment typo fixes. Avoid returning -ETIMEDOUT.
6394
63952004-06-01 Ulrich Drepper <drepper@redhat.com>
6396
6397 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6398 (__condvar_tw_cleanup): Fix access to saved broadcast_seq value.
6399 Reported by Kaz Kojima.
6400
ffdd5e50
UD
64012004-05-25 Jakub Jelinek <jakub@redhat.com>
6402
6403 * sysdeps/unix/sysv/linux/aio_misc.h: New file.
6404
3abc82c8
UD
64052004-05-21 Jakub Jelinek <jakub@redhat.com>
6406
6407 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Compare
6408 __broadcast_seq with bc_seq after acquiring internal lock instead of
6409 before it.
6410
893a3511
UD
64112004-05-18 Jakub Jelinek <jakub@redhat.com>
6412
6413 * Makefile (.NOTPARALLEL): Only serialize make check/xcheck, not
6414 compilation.
6415 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6416 (__pthread_cond_timedwait): Avoid returning -ETIMEDOUT.
6417 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
6418 (pthread_cond_t): Add __data.__broadcast_seq field.
6419 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
6420 (FRAME_SIZE): Define.
6421 (__pthread_cond_timedwait): Use it. Store/check broadcast_seq.
6422 Comment typo fixes.
6423 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S (FRAME_SIZE):
6424 Define.
6425 (__pthread_cond_wait): Use it. Store/check broadcast_seq. Comment
6426 typo fixes.
6427 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
6428 (__pthread_cond_broadcast): Increment broadcast_seq. Comment typo
6429 fixes.
6430
64312004-05-18 Ulrich Drepper <drepper@redhat.com>
6432
6433 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add broadcast_seq entry.
6434 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
6435 Add __broadcast_seq field.
6436 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6437 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6438 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
6439 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
6440 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6441 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Mark
6442 all waiters as woken with woken_seq and bump broadcast counter.
6443 * sysdeps/pthread/pthread_cond_broadcast.c: Likewise.
6444 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use new
6445 __broadcast_seq field.
6446 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6447 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
6448 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
6449 * pthread_cond_init.c: Initialize __broadcast_seq field.
6450 * Makefile (tests): Add tst-cond17 and tst-cond18.
6451 Add .NOTPARALLEL goal.
6452 * tst-cond16.c: New file. From Jakub.
6453 * tst-cond17.c: New file. From Jakub.
6454 * tst-cond18.c: New file. From Jakub.
6455
4123718e
UD
64562004-05-16 Ulrich Drepper <drepper@redhat.com>
6457
6458 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Correct some
6459 unwind info.
6460
6461 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
6462 Parametrize frame size. Correct some unwind info.
6463 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6464
2d7ae210
UD
64652004-05-04 Jakub Jelinek <jakub@redhat.com>
6466
6467 * tst-stack3.c: Note testing functionality beyond POSIX.
6468
50c2b6d7
UD
64692004-05-04 Jakub Jelinek <jakub@redhat.com>
6470
6471 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (USE___THREAD):
6472 Change conditional from ifdef to if.
6473
27b02589
UD
64742004-04-23 Jakub Jelinek <jakub@redhat.com>
6475
6476 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SYSDEP_CANCEL_ERRNO,
6477 SYSDEP_CANCEL_ERROR): Define.
6478 (PSEUDO): Use it.
6479
4bb8fc33
UD
64802004-05-01 Jakub Jelinek <jakub@redhat.com>
6481
6482 * Versions (libpthread): Remove __pthread_cleanup_upto@@GLIBC_PRIVATE.
6483
f9a06dc1
UD
64842004-04-20 Jakub Jelinek <jakub@redhat.com>
6485
6486 * sem_unlink.c (sem_unlink): Change EPERM into EACCES.
6487
d3b52028
UD
64882004-04-19 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6489
6490 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Add frame info.
6491 Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
6492 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Remove unneeded frame
6493 info. Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
6494
a5dd0a6c
UD
64952004-04-19 Ulrich Drepper <drepper@redhat.com>
6496
6497 * sysdeps/unix/sysv/linux/timer_routines.c: Make sure helper
6498 thread has all signals blocked.
6499
620c3354
AJ
65002004-04-18 Andreas Jaeger <aj@suse.de>
6501
6502 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h
6503 (SEM_VALUE_MAX): Add missing brace.
6504
1683daeb
UD
65052004-04-17 Jakub Jelinek <jakub@redhat.com>
6506
6507 * sysdeps/pthread/Makefile (tests): Add tst-mqueue8x
6508 in rt subdir.
6509 (CFLAGS-tst-mqueue8x.c): Add -fexceptions.
6510 * sysdeps/pthread/tst-mqueue8x.c: New test.
6511 * tst-cancel4.c: Update comment about message queues.
6512
6513 * sysdeps/pthread/timer_gettime.c (timer_gettime): For expired timer
6514 return it_value { 0, 0 }.
6515 * sysdeps/pthread/timer_create.c (timer_create): Handle SIGEV_NONE
6516 like SIGEV_SIGNAL.
6517 * sysdeps/pthread/timer_routines.c (thread_expire_timer): Remove
6518 assertion for SIGEV_NONE.
6519 (thread_attr_compare): Compare all attributes, not just a partial
6520 subset.
6521
65222004-04-17 Jakub Jelinek <jakub@redhat.com>
6523
6524 * sysdeps/unix/sysv/linux/mq_notify.c: Include stdlib.h.
6525
f532641d
UD
65262004-04-17 Ulrich Drepper <drepper@redhat.com>
6527
6528 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h (SEM_VALUE_MAX):
6529 Just use a plain number.
6530 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
6531 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
6532 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
6533 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
6534 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
6535 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
6536 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
6537
7eb7fdda
UD
65382004-04-16 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6539
53392906
UD
6540 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Remove unneeded
6541 frame info.
6542 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7eb7fdda 6543
d7ba1313
UD
65442004-04-15 Jakub Jelinek <jakub@redhat.com>
6545
6546 * sysdeps/unix/sysv/linux/timer_routines.c: Include errno.h.
6547 (timer_helper_thread): Use inline rt_sigtimedwait syscall instead
6548 of calling sigwaitinfo.
6549
5adac0e4
UD
65502004-04-16 Ulrich Drepper <drepper@redhat.com>
6551
6552 * allocatestack.c (allocate_stack): Set reported_guardsize
6553 unconditionally.
6554 * pthread_getattr_np.c (pthread_getattr_np): Use
6555 reported_guardsize instead of guardsize.
6556 * descr.h (struct pthread): Add reported_guardsize field.
6557
f93fa7d4
UD
65582004-04-13 Jakub Jelinek <jakub@redhat.com>
6559
6560 * sysdeps/unix/sysv/linux/mq_notify.c: Shut up GCC warning.
6561
1b82c6c7
UD
65622004-04-12 Ulrich Drepper <drepper@redhat.com>
6563
6564 * sysdeps/unix/sysv/linux/mq-notify.c: New file.
6565
65662004-04-08 Jakub Jelinek <jakub@redhat.com>
6567
6568 * sysdeps/unix/sysv/linux/bits/local_lim.h (MQ_PRIO_MAX): Define.
6569 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h (MQ_PRIO_MAX): Define.
6570 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h (MQ_PRIO_MAX): Define.
6571 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h (MQ_PRIO_MAX): Define.
6572 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
6573 Define.
6574 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
6575 (_POSIX_MESSAGE_PASSING): Define.
6576 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h
6577 (_POSIX_MESSAGE_PASSING): Define.
6578 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h
6579 (_POSIX_MESSAGE_PASSING): Define.
6580
e6eb894e
UD
65812004-04-04 Ulrich Drepper <drepper@redhat.com>
6582
6583 * tst-context1.c (fct): Check whether correct stack is used.
6584
1e084487
UD
65852004-04-03 Ulrich Drepper <drepper@redhat.com>
6586
4e73e115
UD
6587 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Never use
6588 matching constraints for asm mem parameters.
6589
1e084487
UD
6590 * tst-clock2.c (tf): Don't define unless needed.
6591
feca5e0b
UD
65922004-03-30 H.J. Lu <hongjiu.lu@intel.com>
6593
6594 * Makefile (link-libc-static): Use $(static-gnulib) instead of
6595 $(gnulib).
6596
3fa21fd8
UD
65972004-03-30 Ulrich Drepper <drepper@redhat.com>
6598
6599 * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_deallocate_tsd.
6600 * init.c (pthread_functions): Add ptr__nptl_deallocate_tsd.
6601 * pthreadP.h: Declare __nptl_deallocate_tsd.
6602 * pthread_create.c (deallocate_tsd): Remove to __nptl_deallocate_tsd.
6603 Adjust caller.
6604
6605 * Makefile (tests): Add tst-tsd5.
6606 * tst-tsd5.c: New file.
6607
8e32efa6
UD
66082004-03-29 Ulrich Drepper <drepper@redhat.com>
6609
6610 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
6611 (__pthread_attr_setaffinity_old): Prepend GLIBC_ to version names
6612 is SHLIB_COMPAT check.
6613 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
6614 (__pthread_attr_getaffinity_old): Likewise.
6615 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
6616 (__pthread_getaffinity_old): Likewise.
6617 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
6618 (__pthread_setaffinity_old): Likewise.
6619
eec8b6ca
UD
66202004-03-26 Ulrich Drepper <drepper@redhat.com>
6621
6622 * allocatestack.c (_make_stacks_executable): Call
6623 _dl_make_stack_executable first.
6624
db2f05ba
RM
66252004-03-24 Roland McGrath <roland@redhat.com>
6626
6627 * sysdeps/i386/pthread_spin_lock.c (pthread_spin_lock): Use "m"
6628 constraint instead of "0".
6629
6abbc501
UD
66302004-03-24 Ulrich Drepper <drepper@redhat.com>
6631
68dc4dcb
UD
6632 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
6633 (lll_mutex_cond_trylock): Define as wrapper around __lll_cond_trylock.
6634
6abbc501
UD
6635 * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Reorganize
6636 code to avoid warning.
6637
865e14d9
AJ
66382004-03-24 Andreas Jaeger <aj@suse.de>
6639
6640 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
6641 (__pthread_attr_setaffinity_old): Remove const.
6642
16b06b70
UD
66432004-03-23 Ulrich Drepper <drepper@redhat.com>
6644
2c0b891a
UD
6645 * sysdeps/unix/sysv/linux/smp.h: New file.
6646 * sysdeps/unix/sysv/linux/sh/smp.h: New file.
6647 * init.c: Define __is_smp.
6648 (__pthread_initialize_minimal_internal): Call is_smp_system to
6649 initialize __is_smp.
6650 * pthreadP.h: Declare __is_smp.
6651 Define MAX_ADAPTIVE_COUNT is necessary.
6652 * pthread_mutex_init.c: Add comment regarding __spins field.
6653 * pthread_mutex_lock.c: Implement adaptive mutex type.
6654 * pthread_mutex_timedlock.c: Likewise.
6655 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
6656 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
6657 Add __spins field.
6658 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
6659 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6660 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6661 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6662 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6663 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
6664 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6665 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define
6666 lll_mutex_cond_trylock.
6667 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6668 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6669 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6670 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
6671 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
6672 Define BUSY_WAIT_NOP.
6673 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6674 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6675
6676 * tst-mutex5.c: Add support for testing adaptive mutexes.
6677 * tst-mutex7.c: Likewise.
6678 * tst-mutex5a.c: New file.
6679 * tst-mutex7a.c: New file.
6680 * Makefile (tests): Add tst-mutex5a and tst-mutex7a.
6681
565699e4
UD
6682 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
6683 (__lll_mutex_timedlock_wait): Preserve r8 and r9 since the
6abbc501 6684 vgettimeofday call might destroy the content.
565699e4 6685
7fe1586f
UD
6686 * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use hint
6687 @pause in the loop.
6688
e408880b
UD
6689 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
6690 No need to restrict type of ret. Make it int. Add comment.
6691
16b06b70
UD
6692 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
6693 Remove unnecessary setne instruction.
6694
61645263
UD
66952004-03-22 Jakub Jelinek <jakub@redhat.com>
6696
6697 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
6698 (__pthread_getaffinity_new): Use INT_MAX instead of UINT_MAX.
6699 * pthread_getattr_np.c (pthread_getattr_np): Double size every cycle.
6700 If realloc fails, break out of the loop.
6701
e3d4c585
AJ
67022004-03-20 Andreas Jaeger <aj@suse.de>
6703
6704 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
6705 (__pthread_setaffinity_old): Fix interface.
6706 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
6707 (__pthread_getaffinity_old): Likewise.
6708
6709 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
6710 (__pthread_setaffinity_new): Remove duplicate declaration.
6711
3abb1ff7
UD
67122004-03-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6713
6714 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Save
6715 the return value to a safe register.
6716 (CDISABLE): Set the function argument correctly.
6717
07bd2a3f
UD
67182004-03-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6719
6720 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XCHG): Define.
6721 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
6722 Rewrite so that only one locked memory operation per round is needed.
6723 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
6724 (pthread_barrier_wait): After wakeup, release lock only when the
6725 last thread stopped using the barrier object.
6726 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
6727 (__pthread_cond_wait): Don't store mutex address if the current
6728 value is ~0l. Add correct cleanup support and unwind info.
6729 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
6730 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
6731 (__pthread_cond_broadcast): Don't use requeue for pshared condvars.
6732 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Update comment.
6733 * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
6734 Add correct cleanup support and unwind info.
6735 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
6736 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Add unwind
6737 information for syscall wrappers.
6738
14c35863
UD
67392004-03-18 Ulrich Drepper <drepper@redhat.com>
6740
6741 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
6742 cpusetsize field, remove next.
6743 * sysdeps/pthread/pthread.h (pthread_getaffinity_np): Add new second
6744 parameter for size of the CPU set.
6745 (pthread_setaffinity_np): Likewise.
6746 (pthread_attr_getaffinity_np): Likewise.
6747 (pthread_attr_setaffinity_np): Likewise.
6748 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: Implement
6749 interface change, keep compatibility code.
6750 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
6751 * sysdeps/unix/sysv/linux/pthread_getaffinity.c: Likewise.
6752 * sysdeps/unix/sysv/linux/pthread_setaffinity.c: Likewise.
6753 * pthreadP.h: Remove hidden_proto for pthread_getaffinity_np. Declare
6754 __pthread_getaffinity_np.
6755 * Versions: Add version for changed interfaces.
6756 * tst-attr3.c: Adjust test for interface change.
6757 * pthread_getattr_np.c: Query the kernel about the affinity mask with
6758 increasing buffer sizes.
6759 * pthread_attr_destroy.c: Remove unused list handling.
6760 * pthread_attr_init.c: Likewise.
6761
8e115d80
RM
67622004-03-17 Roland McGrath <roland@redhat.com>
6763
6764 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Pass missing
6765 first argument to clock_getres so we ever enable kernel timers.
6766
e3b22ad3
UD
67672004-03-15 Ulrich Weigand <uweigand@de.ibm.com>
6768
6769 * init.c (nptl_version): Add __attribute_used__ to nptl_version.
6770
841153fa
RH
67712004-03-12 Richard Henderson <rth@redhat.com>
6772
e3b22ad3
UD
6773 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Propagate
6774 oldvalue from CENABLE to CDISABLE.
841153fa 6775
932dfea7
UD
67762004-03-12 Ulrich Drepper <drepper@redhat.com>
6777
6778 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define HOST_NAME_MAX.
6779 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
6780 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
6781 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
6782
9852f6dc
RH
67832004-03-11 Richard Henderson <rth@redhat.com>
6784
6785 * sysdeps/alpha/tcb-offsets.sym (PID_OFFSET): New.
6786 * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: Save/restore PID.
6787 * sysdeps/unix/sysv/linux/alpha/vfork.S: New file.
6788
43513fb7
UD
67892004-03-11 Jakub Jelinek <jakub@redhat.com>
6790
6791 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Use jgnl
6792 instead of jnl instruction to jump to SYSCALL_ERROR_LABEL.
6793 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S (__vfork): Likewise.
6794
67952004-03-11 Jakub Jelinek <jakub@redhat.com>
6796
6797 * forward.c (__pthread_cond_broadcast_2_0,
6798 __pthread_cond_destroy_2_0, __pthread_cond_init_2_0,
6799 __pthread_cond_signal_2_0, __pthread_cond_wait_2_0,
6800 __pthread_cond_timedwait_2_0): Use return 0 as defaction instead of 0.
6801
8a3e10e0
UD
68022004-03-11 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6803
6804 * sysdeps/sh/tcb-offsets.sym: Add PID.
6805 * sysdeps/unix/sysv/linux/sh/pt-vfork.S: Properly handle PID cache.
6806 * sysdeps/unix/sysv/linux/sh/vfork.S: New file.
6807
6d3a2bec
UD
68082004-03-10 Ulrich Drepper <drepper@redhat.com>
6809
6810 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: No need to
6811 include <sysdep-cancel.h>, vfork is no cancellation point.
6812 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: Likewise.
6813 * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: Likewise.
6814 * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: Likewise.
6815
d3a4a571
UD
68162004-03-10 Jakub Jelinek <jakub@redhat.com>
6817
73b4ce64
UD
6818 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Add
6819 libc_hidden_def.
6820 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
6821 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
6822 Likewise.
6823 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S (__vfork):
6824 Likewise.
6825 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
6826 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
6827 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Include tcb-offsets.h.
6828 * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Use DO_CALL instead
6829 of DO_CALL_VIA_BREAK. Work around a gas problem.
6830
d682a515
UD
6831 * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: Remove.
6832 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: New file.
6833 * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: New file.
6834 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: New file.
6835 * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: New file.
6836 * sysdeps/powerpc/tcb-offsets.sym: Add PID.
6837
6838 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S (__vfork): Don't use
6839 a local register for saving old PID. Negate PID in parent upon exit.
6840
d3a4a571
UD
6841 * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: Include
6842 tcb-offsets.h.
6843 (__vfork): Negate PID if non-zero and set to INT_MIN if zero
6844 before syscall, set to the old value in the parent afterwards.
6845 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: New file.
6846 * sysdeps/unix/sysv/linux/s390/s390-64/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-64/vfork.S: New file.
6851 * sysdeps/s390/tcb-offsets.sym: Add PID.
6852
6853 * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: Remove.
6854 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: New file.
6855 * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S: New file.
6856 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: New file.
6857 * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: New file.
6858 * sysdeps/sparc/tcb-offsets.sym: Add PID.
6859
68602004-03-10 Andreas Schwab <schwab@suse.de>
6861
6862 * sysdeps/ia64/tcb-offsets.sym: Add PID.
6863 * sysdeps/unix/sysv/linux/ia64/vfork.S: New file.
6864 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Properly handle PID cache.
6865
3f2fb223 68662004-03-09 Jakub Jelinek <jakub@redhat.com>
f4c024d1 6867
3f2fb223
UD
6868 * tst-cancel20.c (do_one_test): Clear in_sh_body first.
6869 * tst-cancel21.c (do_one_test): Likewise.
6870 Reported by Gordon Jin <gordon.jin@intel.com>.
f4c024d1 6871
8b9d6054
UD
68722004-02-09 Jakub Jelinek <jakub@redhat.com>
6873
6874 * sysdeps/unix/sysv/linux/i386/vfork.S (SAVE_PID): Negate PID
6875 if non-zero and set to INT_MIN if zero.
6876 * sysdeps/unix/sysv/linux/x86_64/vfork.S (SAVE_PID): Likewise.
6877 * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Include tcb-offsets.h.
6878 (SAVE_PID, RESTORE_PID): Define.
6879 (__vfork): Use it.
6880 * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: Include tcb-offsets.h.
6881 Use relative path to avoid including NPTL i386/vfork.S.
6882 (SAVE_PID, RESTORE_PID): Define.
6883 * sysdeps/unix/sysv/linux/raise.c: Include limits.h.
6884 (raise): Handle THREAD_SELF->pid INT_MIN the same as 0.
6885 * Makefile (tests): Add tst-vfork1, tst-vfork2, tst-vfork1x and
6886 tst-vfork2x.
6887 (tests-reverse): Add tst-vfork1x and tst-vfork2x.
6888 * tst-vfork1.c: New test.
6889 * tst-vfork2.c: New test.
6890 * tst-vfork1x.c: New test.
6891 * tst-vfork2x.c: New test.
6892
02287d05
UD
68932004-03-08 Ulrich Drepper <drepper@redhat.com>
6894
c072ef6d 6895 * sysdeps/i386/tcb-offsets.sym: Add PID.
6fadea9f 6896 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
c072ef6d 6897 * sysdeps/unix/sysv/linux/i386/vfork.S: New file.
6fadea9f 6898 * sysdeps/unix/sysv/linux/x86_64/vfork.S: New file.
02287d05 6899
d4acd24b
UD
69002004-03-08 Steven Munroe <sjmunroe@us.ibm.com>
6901
6902 * sysdeps/unix/sysv/linux/powerpc/Versions: Remove leading tabs.
6903
8acb4b81
UD
69042004-03-08 H.J. Lu <hongjiu.lu@intel.com>
6905
6906 * sysdeps/s390/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
6907 _rtld_global_ro.
6908
4d1a02ef
UD
69092004-03-07 Ulrich Drepper <drepper@redhat.com>
6910
001836c8 6911 * sysdeps/ia64/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
8acb4b81 6912 _rtld_global_ro.
001836c8 6913
4d1a02ef
UD
6914 * tst-once4.c: Remove unnecessary macro definition.
6915
6916 * tst-mutex7.c (do_test): Limit thread stack size.
6917 * tst-once2.c (do_test): Likewise.
6918 * tst-tls3.c (do_test): Likewise.
6919 * tst-tls1.c (do_test): Likewise.
6920 * tst-signal3.c (do_test): Likewise.
6921 * tst-kill6.c (do_test): Likewise.
6922 * tst-key4.c (do_test): Likewise.
6923 * tst-join4.c (do_test): Likewise.
6924 * tst-fork1.c (do_test): Likewise.
6925 * tst-context1.c (do_test): Likewise.
6926 * tst-cond2.c (do_test): Likewise.
6927 * tst-cond10.c (do_test): Likewise.
6928 * tst-clock2.c (do_test): Likewise.
6929 * tst-cancel10.c (do_test): Likewise.
6930 * tst-basic2.c (do_test): Likewise.
6931 * tst-barrier4.c (do_test): Likewise.
6932
aa420660
UD
69332004-03-05 Ulrich Drepper <drepper@redhat.com>
6934
6935 * sysdeps/i386/tls.h: Use GLRO instead of GL where appropriate.
6936
cff08c81
UD
69372004-03-01 Ulrich Drepper <drepper@redhat.com>
6938
6939 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6940 (__pthread_cond_timedwait): Optimize wakeup test.
6941 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
6942 (__pthread_cond_wait): Likewise.
6943 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
6944 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
6945 Likewise.
6946
b7fe377c
UD
69472004-02-29 Ulrich Drepper <drepper@redhat.com>
6948
6949 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
6950 (__lll_mutex_lock_wait): Optimize a bit more. Just one copy of
6951 the atomic instruction needed.
6952 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
6953 (__lll_mutex_lock_wait): Likewise.
6954
4c771a3b
UD
69552004-02-28 Ulrich Drepper <drepper@redhat.com>
6956
6957 * Makefile (tests): Add tst-cond14 and tst-cond15.
6958 * tst-cond14.c: New file.
6959 * tst-cond15.c: New file.
6960
a2c33d5a
UD
69612004-02-27 Ulrich Drepper <drepper@redhat.com>
6962
6963 * sysdeps/pthread/createthread.c (create_thread): Remove use of
6964 CLONE_STOPPED. We cannot use SIGCONT which means CLONE_STOPPED
6965 needs to be implemented differently to be useful.
6966
261eada2
UD
69672004-02-26 Ulrich Drepper <drepper@redhat.com>
6968
14ffbc83
UD
6969 * pthread_attr_setschedparam.c: Don't test priority against limits
6970 here. Set ATTR_FLAG_SCHED_SET flag.
6971 * pthread_attr_setschedpolicy.c: Set ATTR_FLAG_POLICY_SET flag.
6972 * pthread_create.c (__pthread_create_2_1): Copy scheduling attributes
6973 from parent thread to child. If attribute is used and scheduling
6974 parameters are not inherited, copy parameters from attribute or
6975 compute them. Check priority value.
6976 * pthread_getschedparam.c: If the parameters aren't known yet get
6977 them from the kernel.
6978 * pthread_setschedparam.c: Set ATTR_FLAG_SCHED_SET and
6979 ATTR_FLAG_POLICY_SET flag for thread.
6980 * sysdeps/unix/sysv/linux/internaltypes.h: Define ATTR_FLAG_SCHED_SET
6981 and ATTR_FLAG_POLICY_SET.
6982
6983 * sysdeps/pthread/createthread.c: Use tgkill if possible.
6984
261eada2
UD
6985 * pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr): Don't
6986 fail if stack address hasn't been set. Just return 0.
6987
701d185c
UD
69882004-02-25 Ulrich Drepper <drepper@redhat.com>
6989
25b8e63c
UD
6990 * Makefile (tests-nolibpthread): Add tst-unload. Don't link with
6991 libpthread for the files in this list.
6992 (CFLAGS-tst-unload): Removed.
6993 * tst-unload.c (do_test): Don't use complete path for
6994 LIBPHREAD_SO.
6995
701d185c
UD
6996 * Makefile: Define sonames for tst-tls5mod, tst-_res1mod1, and
6997 tst-_res1mod2.
6998
a8fd5a02
UD
69992004-02-22 Ulrich Drepper <drepper@redhat.com>
7000
7001 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
7002 (__lll_mutex_lock_wait): Rewrite so that only one locked memory
7003 operation per round is needed.
7004 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
7005 (__lll_mutex_lock_wait): Likewise.
7006
dd0b7b19
UD
70072004-02-20 Ulrich Drepper <drepper@redhat.com>
7008
7009 * tst-cancel9.c (cleanup): Don't print to stderr.
7010
5990e1fe
UD
70112004-02-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
7012
7013 * sysdeps/sh/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Fix variable name.
7014
33ab3b66
UD
70152004-02-20 Jakub Jelinek <jakub@redhat.com>
7016
1be3130e
UD
7017 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
7018 (__syscall_error_handler2): Call CDISABLE.
7019 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
7020 (__syscall_error_handler2): Call CDISABLE.
7021
8ba5025a
UD
7022 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
7023 Release lock before the loop, don't reacquire it.
8ba5025a 7024
33ab3b66
UD
7025 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h (DL_ARGV_NOT_RELRO): Define.
7026
11986c68
UD
70272004-02-19 Andreas Schwab <schwab@suse.de>
7028
7029 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
7030 Fix last change.
7031
dc391246
UD
70322004-02-18 Ulrich Drepper <drepper@redhat.com>
7033
37c054c7
UD
7034 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
7035 (pthread_barrier_wait): After wakeup, release lock only when the
7036 last thread stopped using the barrier object.
7037 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S
7038 (pthread_barrier_wait): Likewise.
7039 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
7040 Likewise.
7041 * Makefile (tests): Add tst-barrier4.
7042 * tst-barrier4.c: New file.
dc391246
UD
7043
7044 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7045 (__pthread_cond_timedwait): Perform timeout test while holding
7046 internal lock to prevent wakeup race.
7047 Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
7048 * sysdeps/pthread/pthread_cond_timedwait.c
7049 (__pthread_cond_timedwait): Likewise.
7050 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
7051 (__pthread_cond_timedwait): Likewise.
7052
4a08113c
UD
70532004-02-18 Jakub Jelinek <jakub@redhat.com>
7054
7055 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S
7056 (__pthread_rwlock_unlock): Access WRITER as 32-bit value.
7057 * Makefile (tests): Add tst-rwlock13.
7058 * tst-rwlock13.c: New test.
7059
71b1675e
UD
70602004-02-16 Ulrich Drepper <drepper@redhat.com>
7061
7062 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7063 (__condvar_tw_cleanup): Little optimization.
7064 Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
7065
cd9fdc72
UD
70662004-02-16 Steven Munroe <sjmunroe@us.ibm.com>
7067
7068 * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: Replace libc with
7069 libpthread as "lib" parameter to SHLIB_COMPAT.
7070 (__novmx_siglongjmp): Fix typo in function name.
7071 (__novmx_longjmp): Fix typo in function name.
7072
82038750
UD
70732004-02-13 Ulrich Drepper <drepper@redhat.com>
7074
b078c591
UD
7075 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Add a
7076 __builtin_expect.
7077
82038750
UD
7078 * sysdeps/generic/pt-longjmp.c: Moved to...
7079 * sysdeps/pthread/pt-longjmp.c: ...here. New file.
7080
e2982bf0
UD
70812004-01-29 Steven Munroe <sjmunroe@us.ibm.com>
7082
7083 * Makefile (libpthread-routines): Add pt-cleanup.
7084 * pt-longjmp.c: Removed.
7085 * pt-cleanup.c: Copied __pthread_cleanup_upto to here. New file.
7086 * sysdeps/generic/pt-longjmp.c: Copied longjmp to here. New file.
7087 * sysdeps/unix/sysv/linux/powerpc/Versions: New file.
7088 Version longjmp, siglongjmp for GLIBC_2.3.4.
7089 * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: New File.
7090
3730d95c
UD
70912004-02-13 Ulrich Drepper <drepper@redhat.com>
7092
219304ec
UD
7093 * sysdeps/pthread/pthread_cond_timedwait.c
7094 (__pthread_cond_timedwait): Optimize. Drop internal lock earlier.
7095 Reuse code. Add __builtin_expects.
7096
3730d95c
UD
7097 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7098 (__pthread_cond_timedwait): Get internal lock in case timeout has
7099 passed before the futex syscall.
7100 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7101
5673ccc1
UD
71022004-01-20 Ulrich Drepper <drepper@redhat.com>
7103
debddf64
UD
7104 * allocatestack.c: Pretty printing.
7105
5673ccc1
UD
7106 * sysdeps/pthread/createthread.c (create_thread): Don't add
7107 CLONE_DETACHED bit if it is not necessary.
7108
6bae8725
UD
71092004-01-16 Ulrich Drepper <drepper@redhat.com>
7110
7111 * pthread_getattr_np.c: Include ldsodefs.h.
7112
ff151400
RH
71132004-01-16 Richard Henderson <rth@redhat.com>
7114
6bae8725
UD
7115 * allocatestack.c: Don't declare __libc_stack_end.
7116 * init.c (__pthread_initialize_minimal_internal): Likewise.
7117 * pthread_getattr_np.c (pthread_getattr_np): Likewise.
ff151400 7118
ba683832
RH
71192004-01-15 Richard Henderson <rth@redhat.com>
7120
7121 * sysdeps/alpha/tls.h (tcbhead_t): Add private.
7122 (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE,
7123 TLS_PRE_TCB_SIZE, TLS_TCB_ALIGN, INSTALL_DTV, INSTALL_NEW_DTV,
7124 GET_DTV, THREAD_DTV, THREAD_SELF, DB_THREAD_SELF): Match ia64.
7125 (TLS_TCB_OFFSET, THREAD_ID, NO_TLS_OFFSET): Remove.
7126 (THREAD_GETMEM, THREAD_GETMEM_NC): Simplify.
7127 (THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
7128 * sysdeps/unix/sysv/linux/alpha/createthread.c (TLS_VALUE): Match ia64.
7129
630d93a7
UD
71302004-01-14 Ulrich Drepper <drepper@redhat.com>
7131
219304ec 7132 * init.c (pthread_functions): Make array const.
630d93a7 7133
d1fc817e
UD
71342004-01-13 Ulrich Drepper <drepper@redhat.com>
7135
7136 * allocatestack.c (__make_stacks_executable): Change interface.
7137 Check parameters. Pass parameter on to libc counterpart.
7138 * pthreadP.h: Change declaration.
7139
dc927809
RH
71402004-01-13 Richard Henderson <rth@redhat.com>
7141
10677727
UD
7142 * pthread_attr_setstack.c (__old_pthread_attr_setstack): Use
7143 prototype form.
7144 * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize):
7145 Likewise.
7146
d1fc817e
UD
7147 * sysdeps/alpha/Makefile: New file.
7148 * sysdeps/alpha/tcb-offsets.sym: New file.
7149 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
7150 Use MULTIPLE_THREADS_OFFSET to implement !libpthread !libc version.
dc927809 7151
d1fc817e
UD
7152 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Rewrite based
7153 on powerpc version.
dc927809 7154
249a3d0c
UD
71552004-01-08 Jakub Jelinek <jakub@redhat.com>
7156
7157 * Makefile (tests): Add tst-backtrace1.
7158 * tst-backtrace1.c: New test.
7159
763c0490
RM
71602003-12-11 Ulrich Weigand <uweigand@de.ibm.com>
7161
7162 * sysdeps/alpha/tls.h (DB_THREAD_SELF): Pass bit size of thread
7163 register as second parameter to the REGISTER macro.
7164 * sysdeps/ia64/tls.h (DB_THREAD_SELF): Likewise.
7165 * sysdeps/powerpc/tls.h (DB_THREAD_SELF): Likewise.
7166 * sysdeps/sh/tls.h (DB_THREAD_SELF): Likewise.
7167 * sysdeps/sparc/tls.h (DB_THREAD_SELF): Likewise.
7168 * sysdeps/s390/tls.h (DB_THREAD_SELF): Pass __WORDSIZE as bit size
7169 of thread register as second parameter to REGISTER macro in 64 case.
7170
c7baafd5
UD
71712004-01-03 Ulrich Drepper <drepper@redhat.com>
7172
7173 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Removed.
7174 (CFLAGS-getpid.o): Defined.
7175 (CFLAGS-getpid.os): Defined.
7176
25ac0258
UD
71772003-12-31 Ulrich Drepper <drepper@redhat.com>
7178
7179 * pthread_getattr_np.c (pthread_getattr_np): Make sure stack info
7180 returned for main thread does not overlap with any other VMA.
7181 Patch by Jakub Jelinek.
7182
795985e4
UD
71832003-12-29 Jakub Jelinek <jakub@redhat.com>
7184
7185 * tst-raise1.c: Include stdio.h.
7186
cb5b9388
UD
71872003-12-23 Jakub Jelinek <jakub@redhat.com>
7188
7189 * sysdeps/unix/sysv/linux/raise.c (raise): Protect pid = selftid
7190 setting with __ASSUME_TGKILL || defined __NR_tgkill.
7191 If pid is 0, set it to selftid.
7192 * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Make inline.
7193 Don't set self->pid but self->tid. If self->pid == 0 and self->tid
7194 != 0, return self->tid without doing a syscall.
7195 * descr.h (struct pthread): Move pid field after tid.
7196
7197 * Makefile (tests): Add tst-raise1.
7198 * tst-raise1.c: New file.
7199
432aaf5b
RM
72002003-12-23 Roland McGrath <roland@redhat.com>
7201
7202 * tst-oddstacklimit.c: New file.
7203 * Makefile (tests): Add it.
7204 (tst-oddstacklimit-ENV): New variable.
7205
7206 * init.c (__pthread_initialize_minimal_internal): Round stack rlimit
7207 value up to page size for __default_stacksize.
7208
33ebea17
UD
72092003-12-21 Ulrich Drepper <drepper@redhat.com>
7210
7211 * Makefile (tests): Add tst-eintr5.
7212 * tst-eintr5.c: New file.
7213
7214 * eintr.c (eintr_source): Prevent sending signal to self.
7215
7216 * tst-eintr2.c (tf1): Improve error message.
7217
bbe35eb5
UD
72182003-12-20 Ulrich Drepper <drepper@redhat.com>
7219
7220 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Define.
7221 * sysdeps/unix/sysv/linux/getpid.c: New file.
c0ecb80a
UD
7222 * pthread_cancel.c: Add comment explaining use of PID field.
7223 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
7224 * pthread_getattr_np.c: Use abs() when comparing PID and TID fields.
7225 * sysdeps/unix/sysv/linux/fork.c: Negate PID field of parent
7226 temporarily to signal the field must not be relied on and updated
7227 by getpid().
7228 * sysdeps/unix/sysv/linux/pt-raise.c: Handle case where PID is
7229 temporarily negative.
7230 * sysdeps/unix/sysv/linux/raise.c: Likewise.
bbe35eb5 7231
4efdd8d3
UD
72322003-12-19 Ulrich Drepper <drepper@redhat.com>
7233
7234 * eintr.c (setup_eintr): Add new parameter. Pass to thread function.
7235 (eintr_source): If ARG != NULL, use pthread_kill.
7236 * tst-eintr1.c: Adjust for this change.
7237 * tst-eintr2.c: Likewise.
7238 * Makefile (tests): Add tst-eintr3 and tst-eintr4.
7239 * tst-eintr3.c: New file.
7240 * tst-eintr4.c: New file.
7241
72422003-12-19 Jakub Jelinek <jakub@redhat.com>
7243
7244 * libc-cancellation.c (__libc_enable_asynccancel): Don't cancel
7245 if CANCELSTATE_BITMASK is set.
7246 * sysdeps/pthread/librt-cancellation.c (__librt_enable_asynccancel):
7247 Likewise.
7248
7249 * Makefile (tests): Add tst-cancel22 and tst-cancel23.
7250 (tests-reverse): Add tst-cancel23.
7251 * tst-cancel22.c: New test.
7252 * tst-cancel23.c: New test.
7253
675620f7
UD
72542003-12-18 Ulrich Drepper <drepper@redhat.com>
7255
7256 * tst-eintr1.c: Better error messages.
7257
7258 * Makefile (tests): Add tst-eintr2.
7259 * tst-eintr2.c: New file.
7260
72612003-12-18 Jakub Jelinek <jakub@redhat.com>
7262
7263 * Makefile (tests): Add tst-cancel21 and tst-cancelx21.
7264 (CFLAGS-tst-cancelx21.c): Set.
7265 * tst-cancel21.c: New test.
7266 * tst-cancelx21.c: New test.
7267
7268 * unwind.c (FRAME_LEFT): Add adj argument. Subtract it from each
7269 comparison operand.
7270 (unwind_stop): Use _JMPBUF_CFA_UNWINDS_ADJ macro instead of
7271 _JMPBUF_CFA_UNWINDS. Adjust FRAME_LEFT invocations.
7272 * pt-longjmp.c: Include jmpbuf-unwind.h.
7273 (__pthread_cleanup_upto): Use _JMPBUF_UNWINDS_ADJ macro instead of
7274 _JMPBUF_UNWINDS. Adjust compared pointers.
7275 * init.c (__pthread_initialize_minimal_internal): Initialize
7276 pd->stackblock_size.
7277 * sysdeps/pthread/jmpbuf-unwind.h: Removed.
7278 * sysdeps/alpha/jmpbuf-unwind.h: New file.
7279 * sysdeps/i386/jmpbuf-unwind.h: New file.
7280 * sysdeps/powerpc/jmpbuf-unwind.h: New file.
7281 * sysdeps/s390/jmpbuf-unwind.h: New file.
7282 * sysdeps/sh/jmpbuf-unwind.h: New file.
7283 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: New file.
7284 * sysdeps/x86_64/jmpbuf-unwind.h: New file.
2e5e031d 7285 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Include stdint.h.
675620f7
UD
7286 (_JMPBUF_CFA_UNWINDS): Remove.
7287 (_JMPBUF_CFA_UNWINDS_ADJ, _JMPBUF_UNWINDS_ADJ): Define.
7288
72892003-12-12 Jakub Jelinek <jakub@redhat.com>
7290
7291 * Makefile (tests): Add tst-cancel20 and tst-cancelx20.
7292 (CFLAGS-tst-cancelx20.c): Set.
7293 * tst-cancel20.c: New test.
7294 * tst-cancelx20.c: New test.
7295
2d951ab6
UD
72962003-12-17 Ulrich Drepper <drepper@redhat.com>
7297
7298 * init.c (__pthread_initialize_minimal_internal): Don't treat
7299 architectures with separate register stack special here when
7300 computing default stack size.
7301
f8a3a2e7
RM
73022003-12-17 Roland McGrath <roland@redhat.com>
7303
7304 * Makefile (tst-cancelx7-ARGS): New variable.
7305 Reportd by Greg Schafer <gschafer@zip.com.au>.
7306
e796f92f
UD
73072003-12-17 Jakub Jelinek <jakub@redhat.com>
7308
7309 * Makefile (tests): Add tst-stack3. Depend on $(objpfx)tst-stack3-mem.
7310 (generated): Add tst-stack3.mtrace and tst-stack3-mem.
7311 (tst-stack3-ENV): Set.
7312 ($(objpfx)tst-stack3-mem): New.
7313 * tst-stack3.c: New test.
7314
092eb73c
UD
73152003-12-10 David Mosberger <davidm@hpl.hp.com>
7316
7317 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init_EPILOG_BEGINS):
7318 Add unwind directives. Drop unused .regstk directive.
7319 (_fini_EPILOG_BEGINS): Add unwind directives.
7320
ff48874d
UD
73212003-12-11 Ulrich Drepper <drepper@redhat.com>
7322
7323 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
7324 Assume parameter is a pointer.
7325 (lll_futex_wake): Likewise.
20945457
UD
7326 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_wait):
7327 Likewise.
7328 (lll_futex_wake): Likewise.
ff48874d
UD
7329 Reported by Boris Hu.
7330 * sysdeps/unix/sysv/linux/unregister-atfork.c
7331 (__unregister_atfork): Pass pointer to refcntr to lll_futex_wait.
7332
7333 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Simplify a bit.
7334
1d9d0b80
UD
73352003-12-10 Ulrich Drepper <drepper@redhat.com>
7336
7337 * sysdeps/pthread/bits/libc-lock.h (__rtld_lock_initialize): Define.
7338 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Call
7339 __rtld_lock_initialize for ld.so lock.
7340 Patch in part by Adam Li <adam.li@intel.com>.
7341
c776b3d7
UD
73422003-12-02 David Mosberger <davidm@hpl.hp.com>
7343
7344 * Makefile (link-libc-static): Remove -lgcc_eh---it's already mentioned
7345 in $(gnulib). Also, remove stale comment.
7346
73472003-11-12 David Mosberger <davidm@hpl.hp.com>
7348
7349 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Take
7350 advantage of new syscall stub and optimize accordingly.
7351
7352 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__NR_futex): Rename
7353 from SYS_futex, to match expectations of
7354 sysdep.h:DO_INLINE_SYSCALL.
7355 (lll_futex_clobbers): Remove.
7356 (lll_futex_timed_wait): Rewrite in terms of DO_INLINE_SYSCALL.
7357 (lll_futex_wake): Likewise.
7358 (lll_futex_requeue): Likewise.
7359 (__lll_mutex_trylock): Rewrite to a macro, so we can include this
7360 file before DO_INLINE_SYSCALL is defined (proposed by Jakub
7361 Jelinek).
7362 (__lll_mutex_lock): Likewise.
7363 (__lll_mutex_cond_lock): Likewise.
7364 (__lll_mutex_timed_lock): Likewise.
7365 (__lll_mutex_unlock): Likewise.
7366 (__lll_mutex_unlock_force): Likewise.
7367
7368 * sysdeps/ia64/tls.h: Move declaration of __thread_self up so it
7369 comes before the include of <sysdep.h>.
7370 (THREAD_SELF_SYSINFO): New macro.
7371 (THREAD_SYSINFO): Likewise.
7372 (INIT_SYSINFO): New macro.
7373 (TLS_INIT_TP): Call INIT_SYSINFO.
7374
7375 * sysdeps/ia64/tcb-offsets.sym: Add SYSINFO_OFFSET.
7376
7377 * sysdeps/pthread/createthread.c (create_thread): Use
7378 THREAD_SELF_SYSINFO and THREAD_SYSINFO instead of open code.
7379 * allocatestack.c (allocate_stack): Use THREAD_SYSINFO and
7380 THREAD_SELF_SYSINFO instead of open code.
7381 * sysdeps/i386/tls.h (THREAD_SELF_SYSINFO): New macro.
7382 (THREAD_SYSINFO): Likewise.
7383
7384 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: New file.
7385
7386 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Work around gas problem.
7387
57d20ee7
UD
73882003-12-06 Ulrich Drepper <drepper@redhat.com>
7389
7390 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Use .init_array
7391 instead of .init. Patch by David Mosberger.
7392
67aeab2a
AJ
73932003-11-30 Thorsten Kukuk <kukuk@suse.de>
7394
7395 * sysdeps/pthread/configure.in: Remove broken declaration in C
7396 cleanup handling check.
7397
8ca203e6
AJ
73982003-11-30 Andreas Jaeger <aj@suse.de>
7399
7400 * Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time).
7401 * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
7402 Likewise.
7403
46bf9de7
UD
74042003-11-27 Jakub Jelinek <jakub@redhat.com>
7405
7406 * sysdeps/unix/sysv/linux/internaltypes.h (ATTR_FLAG_OLDATTR): Define.
7407 * pthread_attr_destroy.c: Include shlib-compat.h.
7408 (__pthread_attr_destroy): Return immediately if ATTR_FLAG_OLDATTR
7409 is set in iattr->flags.
7410 * pthread_attr_init.c (__pthread_attr_init_2_0): Set ATTR_FLAG_OLDATTR.
7411
1d9b73ab
UD
74122003-11-21 Jakub Jelinek <jakub@redhat.com>
7413
7414 * Makefile (distribute): Add tst-cleanup4aux.c.
7415
7416 * tst-cond12.c (prepare): Add prototype. Move after test-skeleton.c
7417 include.
7418
53f9084e
UD
74192003-11-21 Ulrich Drepper <drepper@redhat.com>
7420
1d9b73ab
UD
7421 * tst-cond12.c (do_test): If USE_COND_SIGNAL is defined, use
7422 pthread_cond_signal.
7423
e42a990e
UD
7424 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Don't
7425 store mutex address if the current value is ~0l.
7426 * sysdeps/pthread/pthread_cond_timedwait.c
7427 (__pthread_cond_timedwait): Likewise.
7428 * sysdeps/pthread/pthread_cond_broadcast.c
7429 (__pthread_cond_broadcast): Don't use requeue for pshared
7430 condvars.
7431
7432 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
7433 (__pthread_cond_wait): Don't store mutex address if the current
7434 value is ~0l.
7435 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
7436 (__pthread_cond_timedwait): Likewise.
7437 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
7438 (__pthread_cond_broadcast): Don't use requeue for pshared
7439 condvars.
7440
7441 * pthread_cond_init.c (__pthread_cond_init): Initialize __mutex
7442 element with ~0l for pshared condvars, with NULL otherwise.
7443
7444 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
7445 (__pthread_cond_wait): Don't store mutex address if the current
7446 value is ~0l.
7447 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7448 (__pthread_cond_timedwait): Likewise.
7449 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
7450 (__pthread_cond_broadcast): Don't use requeue for pshared
7451 condvars.
7452
bf68b236 7453 * Makefile: Add rules to build and run tst-cond12 and tst-cond13.
53f9084e 7454 * tst-cond12.c: New file.
bf68b236 7455 * tst-cond13.c: New file.
53f9084e 7456
9780c971
UD
74572003-11-17 Ulrich Drepper <drepper@redhat.com>
7458
7459 * sysdeps/pthread/configure.in: Make missing forced unwind support
7460 fatal.
7461
74e12fbc
UD
74622003-11-11 Ulrich Drepper <drepper@redhat.com>
7463
7464 * pthreadP.h: Don't declare __pthread_unwind as weak inside libpthread.
7465
c685b2b0
UD
74662003-11-06 Ulrich Drepper <drepper@redhat.com>
7467
7468 * Makefile: Add magic to clean up correctly.
7469
44e94149
UD
74702003-11-05 Jakub Jelinek <jakub@redhat.com>
7471
7472 * unwind.c (FRAME_LEFT): Define.
7473 (unwind_stop): Handle old style cleanups here.
7474 (__pthread_unwind): Handle old style cleanups only if
7475 !HAVE_FORCED_UNWIND.
7476 * Makefile (tests): Add tst-cleanup4 and tst-cleanupx4.
7477 (CFLAGS-tst-cleanupx4.c): Add -fexceptions.
7478 ($(objpfx)tst-cleanup4): Depend on $(objpfx)tst-cleanup4aux.o.
7479 ($(objpfx)tst-cleanupx4): Likewise.
7480 * tst-cleanup4.c: New test.
7481 * tst-cleanup4aux.c: New.
7482 * tst-cleanupx4.c: New test.
7483
c28422b5
UD
74842003-11-04 Ulrich Drepper <drepper@redhat.com>
7485
7486 * sysdeps/pthread/bits/stdio-lock.h: Use lll_*lock instead of
7487 lll_mutex_*lock macros to skip atomic operations on some archs.
7488
27176677
UD
74892003-11-03 Ulrich Drepper <drepper@redhat.com>
7490
7491 * sysdeps/pthread/tst-timer.c (main): Initialize
7492 sigev2.sigev_value as well.
7493
026395a2
RM
74942003-10-15 Roland McGrath <roland@redhat.com>
7495
7496 * sysdeps/pthread/configure.in: Barf if visibility attribute support
7497 is missing.
7498 * sysdeps/pthread/configure: Regenerated.
7499
fa3cbe3d
UD
75002003-10-09 Kaz Kojima <kkojima@rr.iij4u.or.jp>
7501
7502 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Completely revamp the
7503 locking macros. No distinction between normal and mutex locking
7504 anymore.
7505 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Rewrite mutex locking.
7506 Merge bits from lowlevelmutex.S we still need.
7507 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Remove.
7508 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
7509 * sysdeps/unix/sysv/linux/sh/not-cancel.h: New file.
7510 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Adjust for
7511 new mutex implementation.
7512 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Likewise.
7513 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
7514 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7515 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
7516 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
7517 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
7518 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
7519 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
7520 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7521 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO): Also defined
7522 symbol for entry point to avoid cancellation.
7523
e700a908
UD
75242003-10-07 Jakub Jelinek <jakub@redhat.com>
7525
7526 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Backout 2003-10-02
7527 changes.
7528 (SAVE_OLDTYPE_0): Fix a typo.
7529
c70a86b6
UD
75302003-10-03 Ulrich Drepper <drepper@redhat.com>
7531
7532 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
7533 Check __sigsetjmp return value. Reported by Daniel Jacobowitz.
7534
134abcb5
UD
75352003-10-02 Ulrich Drepper <drepper@redhat.com>
7536
7537 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (DOCARGS_1): Use
7538 correct offset.
7539
b77ca0e8
UD
75402003-10-02 Jakub Jelinek <jakub@redhat.com>
7541
7542 * Makefile (tests): Add tst-cancel19.
7543 * tst-cancel19.c: New test.
7544
4d961dc7
UD
75452003-10-02 Ulrich Drepper <drepper@redhat.com>
7546
7547 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix saving and
7548 restoring of the old cancellation type.
7549
1d5b20ad 75502003-09-30 Jakub Jelinek <jakub@redhat.com>
94ae6d75 7551
1d5b20ad
UD
7552 * sysdeps/pthread/malloc-machine.h: Remove misleading comment.
7553
4106a403
RM
75542003-09-27 Wolfram Gloger <wg@malloc.de>
7555
4d961dc7 7556 * sysdeps/pthread/malloc-machine.h: New file
94ae6d75 7557
fca9d8e4
RM
75582003-09-24 Roland McGrath <roland@redhat.com>
7559
7560 * allocatestack.c (__make_stacks_executable): Don't ignore return
7561 value from _dl_make_stack_executable.
7562
c9c60884
UD
75632003-09-24 Ulrich Drepper <drepper@redhat.com>
7564
69c9fa04
UD
7565 * allocatestack.c (__make_stacks_executable): Also change
7566 permission of the currently unused stacks.
7567
279f1143
UD
7568 * allocatestack.c (change_stack_perm): Split out from
7569 __make_stacks_executable.
7570 (allocate_stack): If the required permission changed between the time
7571 we started preparing the stack and queueing it, change the permission.
7572 (__make_stacks_executable): Call change_stack_perm.
7573
c9c60884
UD
7574 * Makefile: Build tst-execstack-mod locally.
7575 * tst-execstack-mod.c: New file.
7576
54ee14b3
UD
75772003-09-23 Jakub Jelinek <jakub@redhat.com>
7578
7579 * Makefile (tests): Only add tst-execstack if have-z-execstack is yes.
7580
75812003-09-23 Roland McGrath <roland@redhat.com>
7582
7583 * tst-execstack.c: New file.
7584 * Makefile (tests): Add it.
7585 ($(objpfx)tst-execstack, $(objpfx)tst-execstack.out): New targets.
7586 (LDFLAGS-tst-execstack): New variable.
7587
7588 * allocatestack.c (allocate_stack): Use GL(dl_stack_flags) to decide
7589 whether to use PROT_EXEC for stack mmap.
7590 (__make_stacks_executable): New function.
7591 * pthreadP.h: Declare it.
7592 * init.c (__pthread_initialize_minimal_internal): Set
7593 GL(dl_make_stack_executable_hook) to that.
7594
365b1602
UD
75952003-09-22 Ulrich Drepper <drepper@redhat.com>
7596
7597 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Adjust for latest
7598 recommendation from AMD re avoidance of lock prefix.
7599
39358e8b
UD
76002003-09-22 Jakub Jelinek <jakub@redhat.com>
7601
7602 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait): Use
7603 lll_futex_timed_wait instead of lll_futex_wait.
7604 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Removed.
7605 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Removed.
7606 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: Removed.
7607 * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: Removed.
7608 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Removed.
7609 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Removed.
7610 * sysdeps/unix/sysv/linux/s390/sem_post.c: Removed.
7611 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Removed.
7612 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Include atomic.h.
7613 Completely revamp the locking macros. No distinction between
7614 normal and mutex locking anymore.
7615 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
7616 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock_wait,
7617 __lll_lock_timedwait): Fix prototypes.
7618 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_lock_wait,
7619 __lll_lock_timedwait): Likewise.
7620 (lll_mutex_lock, lll_mutex_cond_lock): Use _val instead of _bool
7621 macros, add __builtin_expect.
7622 (lll_mutex_timedlock): Likewise. Fix return value.
7623 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Removed.
7624 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: Removed.
7625 * sysdeps/unix/sysv/linux/i386/i586/lowlevelmutex.S: Removed.
7626 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: Removed.
7627 * sysdeps/unix/sysv/linux/i386/i686/lowlevelmutex.S: Removed.
7628 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: Removed.
7629 * sysdeps/unix/sysv/linux/lowlevelmutex.c: Removed.
7630 * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: Removed.
7631
9d08fbbb
UD
76322003-09-22 Ulrich Drepper <drepper@redhat.com>
7633
c0df57e1
UD
7634 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
7635 (__lll_mutex_lock_wait): Minor optimization to avoid one atomic
7636 operation if possible.
7637
9d08fbbb
UD
7638 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Don't play tricks
7639 like jumping over the lock prefix.
7640
71451de2
UD
76412003-09-21 Ulrich Drepper <drepper@redhat.com>
7642
7643 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Completely revamp the
7644 locking macros. No distinction between normal and mutex locking
7645 anymore.
3a226d33 7646 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
bc1989aa
UD
7647 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
7648 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
71451de2
UD
7649 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Rewrite mutex
7650 locking. Merge bits from lowlevelmutex.S we still need.
3a226d33 7651 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
bc1989aa 7652 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
71451de2 7653 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Removed.
3a226d33 7654 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Removed.
71451de2
UD
7655 * Makefile (routines): Remove libc-lowlevelmutex.
7656 (libpthread-rountines): Remove lowlevelmutex.
3a226d33
UD
7657 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Adjust
7658 for new mutex implementation.
7659 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
7660 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7661 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7662 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
7663 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
7664 Likewise.
7665 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
7666 Likewise.
7667 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
7668 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
7669 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise
7670 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
7671 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7672 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7673 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
7674 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
7675 Likewise.
7676 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
7677 Likewise.
7678 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
7679 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
7680 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
7681 Don't use requeue.
7682 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
bc1989aa 7683 * sysdeps/pthread/pthread_cond_signal.c: Don't use requeue.
71451de2 7684
8f31c0ef
UD
76852003-09-20 Ulrich Drepper <drepper@redhat.com>
7686
56a4aa98
UD
7687 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't match memory
7688 in parameters of asm with output parameters.
7689
8f31c0ef
UD
7690 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Change
7691 type of DECR parameter to int.
7692 * pthreadP.h: Adjust prototype of __pthread_mutex_unlock_usercnt.
7693
8b8074da
UD
76942003-09-18 Jakub Jelinek <jakub@redhat.com>
7695
7696 * tst-attr3.c (tf, do_test): Print stack start/end/size and
7697 guardsize for each thread.
7698
65af7e61
UD
76992003-09-17 Jakub Jelinek <jakub@redhat.com>
7700
9ba96eda
UD
7701 * sysdeps/pthread/pthread.h (pthread_getattr_np): Clarify usage.
7702 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
7703 (pthread_attr_setaffinity_np): Handle cpuset == NULL.
7704
06f6ca90
UD
7705 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
7706 (pthread_attr_getaffinity_np): Don't segfault if iattr->cpuset is
7707 NULL.
7708 * pthread_getattr_np.c: Set cpuset using pthread_getaffinity_np.
7709 * pthreadP.h (pthread_getaffinity_np): Add hidden_proto.
7710 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
7711 (pthread_getaffinity_np): Add hidden_def.
7712
7713 * Makefile (tests): Add tst-attr3.
7714 * tst-attr3.c: New test.
7715
65af7e61
UD
7716 * sysdeps/i386/Makefile (CFLAGS-tst-align.c): Remove.
7717
3402852c
UD
77182003-09-15 Jakub Jelinek <jakub@redhat.com>
7719
7720 * sysdeps/i386/Makefile (CFLAGS-pthread_create.c,
7721 CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
7722
a4db3439
UD
77232003-09-17 Jakub Jelinek <jakub@redhat.com>
7724
7725 * Makefile (CFLAGS-tst-align.c): Add $(stack-align-test-flags).
7726 * tst-align.c: Include tst-stack-align.h.
7727 (tf, do_test): Use TEST_STACK_ALIGN macro.
7728
77292003-09-17 Ulrich Drepper <drepper@redhat.com>
7730
7731 * pthread_attr_init.c (__pthread_attr_init_2_0): Remove unused
7732 variable.
7733
92ce4676
UD
77342003-09-16 Ulrich Drepper <drepper@redhat.com>
7735
7736 * pthread_getattr_np.c (pthread_getattr_np): Correctly fill in the
7737 stack-related values for the initial thread.
7738
e07bb02a
UD
77392003-09-15 Jakub Jelinek <jakub@redhat.com>
7740
7741 * Makefile (CFLAGS-pthread_once.c): Add $(uses-callbacks).
7742
d087b5dc
UD
77432003-09-11 Ulrich Drepper <drepper@redhat.com>
7744
7745 * pthread_mutex_lock.c: Minor code rearrangements.
7746
7f08f55a
RM
77472003-09-05 Roland McGrath <roland@redhat.com>
7748
7749 * pthread_create.c (__pthread_pthread_sizeof_descr): Removed.
7750 Instead, include ../nptl_db/db_info.c to do its magic.
7751 * pthread_key_create.c (__pthread_pthread_keys_max): Removed.
7752 (__pthread_pthread_key_2ndlevel_size): Likewise.
7753 * sysdeps/alpha/tls.h (DB_THREAD_SELF): New macro.
7754 * sysdeps/i386/tls.h (DB_THREAD_SELF): New macro.
7755 * sysdeps/ia64/tls.h (DB_THREAD_SELF): New macro.
7756 * sysdeps/powerpc/tls.h (DB_THREAD_SELF): New macro.
7757 * sysdeps/s390/tls.h (DB_THREAD_SELF): New macro.
7758 * sysdeps/sh/tls.h (DB_THREAD_SELF): New macro.
7759 * sysdeps/sparc/tls.h (DB_THREAD_SELF): New macro.
7760 * sysdeps/x86_64/tls.h (DB_THREAD_SELF): New macro.
7761 * sysdeps/alpha/td_ta_map_lwp2thr.c: File removed.
7762 * sysdeps/generic/td_ta_map_lwp2thr.c: File removed.
7763 * sysdeps/i386/td_ta_map_lwp2thr.c: File removed.
7764 * sysdeps/ia64/td_ta_map_lwp2thr.c: File removed.
7765 * sysdeps/powerpc/td_ta_map_lwp2thr.c: File removed.
7766 * sysdeps/s390/td_ta_map_lwp2thr.c: File removed.
7767 * sysdeps/sh/td_ta_map_lwp2thr.c: File removed.
7768 * sysdeps/sparc/td_ta_map_lwp2thr.c: File removed.
7769 * sysdeps/x86_64/td_ta_map_lwp2thr.c: File removed.
7770
806e4a4a
UD
77712003-09-08 Ulrich Drepper <drepper@redhat.com>
7772
7773 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Change type
7774 of pthread_t to be compatible with LT.
7775 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
7776 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
7777 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7778 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7779 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
7780 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7781 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
7782
17f83e56
UD
77832003-09-04 Ulrich Drepper <drepper@redhat.com>
7784
7785 * sysdeps/unix/sysv/linux/i386/not-cancel.h (fcntl_not_cancel): Define.
7786
58e8ec84
UD
77872003-09-04 Jakub Jelinek <jakub@redhat.com>
7788
7789 * unwind-forcedunwind.c: Move to...
7790 * sysdeps/pthread/unwind-forcedunwind.c: ...here.
7791 (pthread_cancel_init): Use ARCH_CANCEL_INIT if defined.
7792 * sysdeps/pthread/jmpbuf-unwind.h: New file.
7793 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: New file.
7794 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: New file.
7795 * unwind.c: Include jmpbuf-unwind.h.
7796 (unwind_stop): Use _JMPBUF_CFA_UNWINDS macro.
7797
abf1cf21
JJ
77982003-09-02 Jakub Jelinek <jakub@redhat.com>
7799
4a244f0d
UD
7800 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: New file.
7801 * sysdeps/unix/sysv/linux/ia64/Versions (libpthread): Export
7802 pthread_attr_setstack and pthread_attr_setstacksize @@GLIBC_2.3.3.
7803 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: New file.
7804 * sysdeps/unix/sysv/linux/alpha/Versions: New file.
7805 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: New file.
7806 * sysdeps/unix/sysv/linux/sparc/Versions: New file.
7807 * pthread_attr_setstack.c (__old_pthread_attr_setstack): New function.
7808 (pthread_attr_setstack): If PTHREAD_STACK_MIN != 16384, export
7809 as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.2.
7810 * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize): New
7811 function.
7812 (pthread_attr_setstacksize): If PTHREAD_STACK_MIN != 16384, export
7813 as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.1.
7814 * Makefile (tests): Add tst-stack2.
7815 * tst-stack2.c: New test.
7816 * tst-stack1.c: Include limits.h and sys/param.h.
7817 (do_test): Set size to MAX (4 * getpagesize (), PTHREAD_STACK_MIN).
7818
e29ef647
UD
7819 * pthread_condattr_setpshared.c: Include errno.h.
7820 (pthread_condattr_setpshared): Return EINVAL if pshared
7821 is neither PTHREAD_PROCESS_PRIVATE nor PTHREAD_PROCESS_SHARED.
7822
5777d565
UD
7823 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Also
7824 defined symbol for entry point to avoid cancellation.
7825 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
7826 Likewise.
7827 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
7828 Likewise.
7829 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
7830 Likewise.
7831 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h (PSEUDO):
7832 Likewise.
7833 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
7834 Likewise.
7835 * sysdeps/unix/sysv/linux/i386/not-cancel.h (__open_nocancel,
7836 __close_nocancel, __read_nocancel, __write_nocancel,
7837 __waitpid_nocancel): Add attribute_hidden. If not in libc.so,
7838 libpthread.so or librt.so, define to corresponding function
7839 without _nocancel suffix.
7840 * sysdeps/unix/sysv/linux/s390/not-cancel.h: New file.
7841 * sysdeps/unix/sysv/linux/powerpc/not-cancel.h: New file.
7842 * sysdeps/unix/sysv/linux/sparc/not-cancel.h: New file.
7843
abf1cf21
JJ
7844 * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: Fix a typo.
7845
8348dcc8
UD
78462003-09-02 Ulrich Drepper <drepper@redhat.com>
7847
7848 * sysdeps/unix/sysv/linux/i386/not-cancel.h: New file.
1e03e0af 7849 * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: New file.
8348dcc8
UD
7850
7851 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Make sure the code
7852 in subsections has a symbol associated with it.
7853
7854 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Also
7855 defined symbol for entry point to avoid cancellation.
7856 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Likewise.
7857
c874a32e
UD
78582003-09-01 Jakub Jelinek <jakub@redhat.com>
7859
7860 * Makefile (tests): Add tst-tls5.
7861 (module-names): Add tst-tls5mod{,a,b,c,d,e,f}.
7862 ($(objpfx)tst-tls5mod{,a,b,c,d,e,f}.so-no-z-defs): Set to yes.
7863 ($(objpfx)tst-tls5): New.
7864 ($(objpfx)tst-tls6.out): Likewise.
7865 (tests): Depend on $(objpfx)tst-tls6.out.
7866 * tst-tls3.c: Include stdint.h and pthreaddef.h.
7867 (do_test): Check pthread_self () return value alignment.
7868 * tst-tls3mod.c: Include stdint.h and pthreaddef.h.
7869 (tf): Check pthread_self () return value alignment.
7870 * tst-tls5.c: New test.
7871 * tst-tls5.h: New.
7872 * tst-tls5mod.c: New.
7873 * tst-tls5moda.c: New.
7874 * tst-tls5modb.c: New.
7875 * tst-tls5modc.c: New.
7876 * tst-tls5modd.c: New.
7877 * tst-tls5mode.c: New.
7878 * tst-tls5modf.c: New.
7879 * tst-tls6.sh: New test.
7880
c503d3dc
UD
7881 * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Add
7882 ptr___pthread_cond_timedwait and ptr___pthread_cond_timedwait_2_0.
7883 * init.c (pthread_functions): Initialize them.
7884 * forward.c (pthread_cond_timedwait@GLIBC_2.0,
7885 pthread_cond_timedwait@@GLIBC_2.3.2): New forwards.
7886 * Versions (libc): Export pthread_cond_timedwait@GLIBC_2.0,
7887 pthread_cond_timedwait@@GLIBC_2.3.2.
7888
48614753
JJ
78892003-09-01 Jakub Jelinek <jakub@redhat.com>
7890
56a1b877
JJ
7891 * sysdeps/unix/sysv/linux/alpha/timer_create.c: New file.
7892 * sysdeps/unix/sysv/linux/alpha/timer_delete.c: New file.
7893 * sysdeps/unix/sysv/linux/alpha/timer_getoverr.c: New file.
7894 * sysdeps/unix/sysv/linux/alpha/timer_gettime.c: New file.
7895 * sysdeps/unix/sysv/linux/alpha/timer_settime.c: New file.
7896 * sysdeps/unix/sysv/linux/alpha/Versions: New file.
7897
7898 * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
7899
48614753
JJ
7900 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Define
7901 _POSIX_THREAD_PRIORITY_SCHEDULING.
7902 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
7903
28c97261
UD
79042003-08-31 Ulrich Drepper <drepper@redhat.com>
7905
eef80cf8
UD
7906 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock): Avoid
7907 nested function, use static inline function from libio.h.
7908 Code by Richard Henderson.
7909
28c97261
UD
7910 * sysdeps/pthread/bits/libc-lock.h: Mark pthread_setcancelstate as
7911 weak.
7912
cd2fbe58
UD
79132003-08-30 Jakub Jelinek <jakub@redhat.com>
7914
7915 * sysdeps/unix/sysv/linux/sparc/sparc64/Versions: New file.
7916 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_create.c: New file.
7917 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_delete.c: New file.
7918 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_getoverr.c: New file.
7919 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_gettime.c: New file.
7920 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_settime.c: New file.
7921 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
7922 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
7923 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: New file.
7924 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: New file.
7925 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: New file.
7926 * sysdeps/unix/sysv/linux/sparc/pthread_once.c: New file.
7927 * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: New file.
7928 * sysdeps/unix/sysv/linux/sparc/fork.c: New file.
7929 * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
7930 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: New file.
7931 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: New file.
7932 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: New file.
7933 * sysdeps/sparc/sparc32/pthread_spin_lock.c: New file.
7934 * sysdeps/sparc/sparc32/pthread_spin_trylock.c: New file.
7935 * sysdeps/sparc/sparc32/pthreaddef.h: New file.
7936 * sysdeps/sparc/sparc64/pthread_spin_lock.c: New file.
7937 * sysdeps/sparc/sparc64/pthread_spin_trylock.c: New file.
7938 * sysdeps/sparc/sparc64/pthread_spin_unlock.c: New file.
7939 * sysdeps/sparc/sparc64/pthreaddef.h: New file.
7940 * sysdeps/sparc/tls.h: New file.
7941 * sysdeps/sparc/tcb-offsets.sym: New file.
7942 * sysdeps/sparc/Makefile: New file.
7943 * sysdeps/sparc/td_ta_map_lwp2thr.c: New file.
7944 * init.c [__sparc__] (__NR_set_tid_address): Define.
7945
feda52c0
UD
79462003-08-29 Jakub Jelinek <jakub@redhat.com>
7947
7948 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock,
7949 _IO_release_lock): Define.
7950
7c868816
JJ
79512003-08-29 Jakub Jelinek <jakuB@redhat.com>
7952
0261d33f 7953 * tst-cancel4.c (tf_sigwait, tf_sigwaitinfo, tf_sigtimedwait): Add
7c868816
JJ
7954 sigemptyset before sigaddset. Reported by jreiser@BitWagon.com.
7955
68b9e1ae
UD
79562003-08-27 Ulrich Drepper <drepper@redhat.com>
7957
7958 * sysdeps/pthread/pthread.h (pthread_exit): Remove __THROW.
7959 (__pthread_cleanup_class): Add missing return types of member
7960 functions.
7961
13b3edfc
UD
79622003-08-26 Steven Munroe <sjmunroe@us.ibm.com>
7963
7964 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
7965 (lll_mutex_unlock_force): Add memory barrier between store and futex
7966 syscall.
7967
bb606fbe
UD
79682003-08-25 Ulrich Drepper <drepper@redhat.com>
7969
7970 * tst-cancel4.c (do_test): Also unlink tempfname and remove
7971 tempmsg in first loop.
7972
ee4e5a3d
UD
79732003-08-18 Ulrich Drepper <drepper@redhat.com>
7974
7975 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
7976 _POSIX_THREAD_PRIORITY_SCHEDULING.
7977 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
7978
334fcf2a
UD
79792003-08-07 Jakub Jelinek <jakub@redhat.com>
7980
7981 * sysdeps/pthread/bits/libc-lock.h [_LIBC && SHARED]
7982 (__rtld_lock_default_lock_recursive,
7983 __rtld_lock_default_unlock_recursive): Define.
7984 [_LIBC && SHARED] (__rtld_lock_lock_recursive,
7985 __rtld_lock_unlock_recursive): Define using
7986 GL(_dl_rtld_*lock_recursive).
7987 * init.c (__pthread_initialize_minimal_internal): Initialize
7988 _dl_rtld_lock_recursive and _dl_rtld_unlock_recursive.
7989 Lock GL(_dl_load_lock) the same number of times as
7990 GL(_dl_load_lock) using non-mt implementation was nested.
7991
7992 * pthreadP.h (__pthread_cleanup_upto): Add hidden_proto.
7993 * pt-longjmp.c (__pthread_cleanup_upto): Add hidden_def.
7994
a30fb2df
UD
79952003-08-06 Jakub Jelinek <jakub@redhat.com>
7996
7997 * tst-cancel17.c (do_test): Make len2 maximum of page size and
7998 PIPE_BUF.
7999
ce0d30a0
JJ
80002003-08-07 Jakub Jelinek <jakub@redhat.com>
8001
8002 * pthread_create.c (__pthread_create_2_0): Clear new_attr.cpuset.
8003
9c988b83
UD
80042003-08-03 Jakub Jelinek <jakub@redhat.com>
8005
8006 * sysdeps/pthread/createthread.c (do_clone): Move error handling
8007 to first syscall error check. Move syscall error check for tkill
8008 into __ASSUME_CLONE_STOPPED #ifdef.
8009
5c5252bd
UD
80102003-08-02 Ulrich Drepper <drepper@redhat.com>
8011
f1205aa7
UD
8012 * sysdeps/pthread/createthread.c (do_clone): If __ASSUME_CLONE_STOPPED
8013 is not defined, do explicit synchronization.
8014 (create_thread): Do not lock pd->lock here. If __ASSUME_CLONE_STOPPED
8015 is not defined also unlock pd->lock for non-debugging case in case
8016 it is necessary.
8017 * pthread_create.c (start_thread): Always get and release pd->lock
8018 if __ASSUME_CLONE_STOPPED is not defined.
8019 (start_thread_debug): Removed. Adjust users.
8020 * allocatestack.c (allocate_stack): Always initialize lock if
8021 __ASSUME_CLONE_STOPPED is not defined.
8022 * Makefile (tests): Add tst-sched1.
8023 * tst-sched1.c: New file.
8024
5c5252bd
UD
8025 * sysdeps/pthread/createthread.c (do_clone): Only use
8026 sched_setschduler and pass correct parameters.
8027
973d66e4
UD
80282003-07-31 Jakub Jelinek <jakub@redhat.com>
8029
8030 * sysdeps/pthread/pthread.h (pthread_attr_setstackaddr,
8031 pthread_attr_setstacksize): Change PTHREAD_STACK_SIZE to
8032 PTHREAD_STACK_MIN in comments.
8033
d347a4ab
UD
80342003-07-31 Jakub Jelinek <jakub@redhat.com>
8035
8036 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
8037 Shut up warnings if INTERNAL_SYSCALL_ERROR_P does not use its first
8038 argument.
8039 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Likewise.
8040 * pthread_condattr_setclock.c (pthread_condattr_setclock): Likewise.
8041 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Include pthreaddef.h.
8042 (__pthread_cleanup_upto): Fix prototype.
8043 (_longjmp_unwind): Adjust caller.
8044 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_timedlock):
8045 Change second argument to const struct pointer.
8046 * tst-sem8.c (main): Remove unused s2 and s3 variables.
8047 * tst-sem9.c (main): Likewise.
8048 * unwind.c: Include string.h for strlen prototype.
8049
1b26e9a5
UD
80502003-07-31 Ulrich Drepper <drepper@redhat.com>
8051
8052 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
8053 (__pthread_cond_timedwait): Don't use cmov unless HAVE_CMOV is defined.
8054 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S:
8055 Define HAVE_CMOV.
8056 Patch by Nicholas Miell <nmiell@attbi.com>.
8057
adc12574
UD
80582003-07-30 Jakub Jelinek <jakub@redhat.com>
8059
8060 * init.c (__pthread_initialize_minimal_internal): Initialize
8061 GL(dl_init_static_tls).
8062 * pthreadP.h (__pthread_init_static_tls): New prototype.
8063 * allocatestack.c (init_one_static_tls, __pthread_init_static_tls):
8064 New functions.
8065 * Makefile (tests): Add tst-tls4.
8066 (modules-names): Add tst-tls4moda and tst-tls4modb.
8067 ($(objpfx)tst-tls4): Link against libdl and libpthread.
8068 ($(objpfx)tst-tls4.out): Depend on tst-tls4moda.so and
8069 tst-tls4modb.so.
8070 * tst-tls4.c: New file.
8071 * tst-tls4moda.c: New file.
8072 * tst-tls4modb.c: New file.
8073
a7f6c66e
RM
80742003-06-19 Daniel Jacobowitz <drow@mvista.com>
8075
8076 * sysdeps/pthread/timer_create.c (timer_create): Call timer_delref
8077 before __timer_dealloc.
8078 * sysdeps/pthread/timer_routines.c (__timer_thread_find_matching):
8079 Don't call list_unlink.
8080
172ce013
RM
80812003-07-29 Roland McGrath <roland@redhat.com>
8082
8083 * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
8084
7b787f85
UD
80852003-07-25 Jakub Jelinek <jakub@redhat.com>
8086
8087 * tst-cancel17.c (do_test): Check if aio_cancel failed.
8088 Don't reuse struct aiocb A if it failed.
8089 Write fpathconf (fds[1], _PC_PIPE_BUF) + 2 bytes using aio_write,
8090 not just one byte, as that does not block.
8091
0e9d6240
UD
80922003-07-22 Jakub Jelinek <jakub@redhat.com>
8093
9d79e037
UD
8094 * sysdeps/pthread/unwind-resume.c: New file.
8095 * sysdeps/pthread/Makefile (routines, shared-only-routines): Add
8096 unwind-resume in csu subdir.
8097 (CFLAGS-unwind-resume.c, CFLAGS-rt-unwind-resume.c): Compile with
8098 exceptions.
8099 (librt-sysdep_routines, librt-shared-only-routines): Add
8100 rt-unwind-resume.
8101 * sysdeps/pthread/rt-unwind-resume.c: New file.
8102 * unwind-forcedunwind.c: New file.
8103 * Makefile (libpthread-routines): Add unwind-forcedunwind.
8104 (libpthread-shared-only-routines): Likewise.
8105 (CFLAGS-unwind-forcedunwind.c): Compile with exceptions.
8106 * pthreadP.h (pthread_cancel_init): New prototype.
8107 * pthread_cancel.c (pthread_cancel): Call pthread_cancel_init.
8108
8109 * sysdeps/pthread/createthread.c (do_thread, create_thread): Make
8110 attr argument const struct pthread_attr *.
8111
0e9d6240
UD
8112 * res.c (__res_state): Return __resp.
8113 * descr.h: Include resolv.h.
8114 (struct pthread): Add res field.
8115 * pthread_create.c: Include resolv.h.
8116 (start_thread): Initialize __resp.
8117 * Makefile (tests): Add tst-_res1.
8118 (module-names): Add tst-_res1mod1, tst-_res1mod2.
8119 ($(objpfx)tst-_res1mod2.so): Depend on $(objpfx)tst-_res1mod1.so.
8120 ($(objpfx)tst-_res1): Depend on $(objpfx)tst-_res1mod2.so and
8121 libpthread.
8122 * tst-_res1.c: New file.
8123 * tst-_res1mod1.c: New file.
8124 * tst-_res1mod2.c: New file.
8125
1a379ea0
UD
81262003-07-21 Ulrich Drepper <drepper@redhat.com>
8127
7e939b21
UD
8128 * sysdeps/pthread/createthread.c: Don't define CLONE_STOPPED.
8129
1a379ea0
UD
8130 * Makefile: Define various *-no-z-defs variables for test DSOs
8131 which has undefined symbols.
8132
ca86a763
UD
81332003-07-21 Steven Munroe <sjmunroe@us.ibm.com>
8134
8135 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
8136 Retry if the stwcx fails to store once_control.
8137
80f536db
UD
81382003-07-20 Ulrich Drepper <drepper@redhat.com>
8139
8140 * Makefile (libpthread-routines): Add pthread_attr_getaffinity and
8141 pthread_attr_setaffinity.
8142 * Versions [libpthread] (GLIBC_2.3.3): Likewise.
8143 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: New file.
8144 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: New file.
8145 * pthread_attr_destroy.c: Free cpuset element if allocated.
8146 * pthread_create.c: Pass iattr as additional parameter to
8147 create_thread.
8148 * sysdeps/pthread/createthread.c: If attribute is provided and
8149 a new thread is created with affinity set or scheduling parameters,
8150 start thread with CLONE_STOPPED.
8151 * sysdeps/pthread/pthread.h: Declare pthread_attr_getaffinity and
8152 pthread_attr_setaffinity.
8153 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
8154 cpuset element.
8155
73299943
UD
81562003-07-15 Ulrich Drepper <drepper@redhat.com>
8157
8158 * tst-tcancel-wrappers.sh: lseek and llseek are not cancelation points.
8159
da35d15e
UD
81602003-07-14 Ulrich Drepper <drepper@redhat.com>
8161
8162 * sysdeps/pthread/configure.in: Require CFI directives also for
8163 ppc and s390.
8164
75540d8a
UD
81652003-07-15 Jakub Jelinek <jakub@redhat.com>
8166
8167 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
8168 Add cfi directives.
8169
4a17085f
UD
81702003-07-12 Kaz Kojima <kkojima@rr.iij4u.or.jp>
8171
8172 * sysdeps/sh/tcb-offsets.sym: Add RESULT, TID, CANCELHANDLING and
8173 CLEANUP_JMP_BUF.
8174 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use more
8175 registers as variables. Call __pthread_mutex_unlock_usercnt.
8176 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
8177 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Store TID
8178 not self pointer in __writer. Compare with TID to determine
8179 deadlocks.
8180 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
8181 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
8182 Likewise.
8183 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
8184 Likewise.
8185 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add cancellation support.
8186 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
8187 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Define all the nice
8188 macros also when compiling librt.
8189
6080ecdf
UD
81902003-07-11 Jakub Jelinek <jakub@redhat.com>
8191
8192 * Makefile (CFLAGS-pthread_once.c): Add -fexceptions
8193 -fasynchronous-unwind-tables.
8194 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
8195 (PSEUDO): Add cfi directives.
8196 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO):
8197 Likewise.
8198 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
8199 Likewise.
8200
da0c02ee
UD
82012003-07-08 Jakub Jelinek <jakub@redhat.com>
8202
8203 * pthreadP.h (__pthread_unwind_next, __pthread_register_cancel,
8204 __pthread_unregister_cancel): Add prototypes and hidden_proto.
8205 * unwind.c (__pthread_unwind_next): Add hidden_def.
8206 * cleanup.c (__pthread_register_cancel, __pthread_unregister_cancel):
8207 Likewise.
8208 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
8209 Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
8210 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
8211 Likewise.
8212 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
8213 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
8214 Likewise.
8215 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once): Use
8216 HIDDEN_JUMPTARGET to call __pthread_register_cancel,
8217 __pthread_unregister_cancel and __pthread_unwind_next.
8218
57a5ea02
UD
82192003-07-04 Jakub Jelinek <jakub@redhat.com>
8220
8221 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Use
8222 different symbol for the cancellation syscall wrapper and
8223 non-cancellation syscall wrapper.
8224 (PSEUDO_END): Define.
8225
d810b358
UD
82262003-07-05 Richard Henderson <rth@redhat.com>
8227
8228 * sysdeps/alpha/elf/pt-initfini.c: Avoid .ent/.end.
8229 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_wait,
42d86dd6
RH
8230 lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
8231 return actual return value from the syscall, not 0.
d810b358 8232
db54f488
UD
82332003-07-07 Ulrich Drepper <drepper@redhat.com>
8234
8235 * descr.h (struct pthread): Add pid field.
8236 * allocatestack.c (allocate_stack): Initialize pid field in descriptor.
8237 (__reclaim_stacks): Likewise.
8238 * init.c (sigcancel_handler): If __ASSUME_CORRECT_SI_PID is defined
8239 also check for PID of the signal source.
8240 (__pthread_initialize_minimal_internal): Also initialize pid field
8241 of initial thread's descriptor.
8242 * pthread_cancel.c: Use tgkill instead of tkill if possible.
8243 * sysdeps/unix/sysv/linux/fork.c: Likewise.
8244 * sysdeps/unix/sysv/linux/pt-raise.c: Likewise.
8245 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
8246 * sysdeps/unix/sysv/linux/raise.c: Likewise.
8247
5e497a41
UD
82482003-07-05 Ulrich Drepper <drepper@redhat.com>
8249
8250 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_push): Renamed.
8251 Fix use of parameter.
8252 (__libc_cleanup_pop): Likewise.
8253
86a0c4fa
UD
82542003-07-04 Ulrich Drepper <drepper@redhat.com>
8255
8256 * init.c (sigcancel_handler): Change parameters to match handler
8257 for SA_SIGACTION. Check signal number and code to recognize
8258 invalid invocations.
8259
bdbecaa3
RM
82602003-07-03 Roland McGrath <roland@redhat.com>
8261
8262 * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr):
8263 Apply sizeof (struct pthread) bias to r13 value.
8264
56421b23
UD
82652003-07-03 Ulrich Drepper <drepper@redhat.com>
8266
fbd90f6c
UD
8267 * sysdeps/pthread/configure.in: Require CFI directives.
8268
56421b23
UD
8269 * sysdeps/pthread/librt-cancellation.c (__pthread_unwind): Remove
8270 definition.
8271 * pthreadP.h (__pthread_unwind): Add hidden_proto if used in
8272 libpthread compilation.
8273 * unwind.c (__pthread_unwind): Add hidden_def.
8274 * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_unwind.
8275
ca2b4cd7
UD
82762003-07-01 Ulrich Drepper <drepper@redhat.com>
8277
8278 * libc-cancellation.c (__libc_cleanup_routine): Define.
8279 * sysdeps/pthread/bits/libc-lock.h (__pthread_cleanup_push): Define.
8280 (__pthread_cleanup_pop): Define.
8281
f036e569
UD
82822003-07-01 Richard Henderson <rth@redhat.com>
8283
8284 * sysdeps/alpha/elf/pt-initfini.c: New file.
8285 * sysdeps/alpha/pthread_spin_lock.S: New file.
8286 * sysdeps/alpha/pthread_spin_trylock.S: New file.
8287 * sysdeps/alpha/pthreaddef.h: New file.
8288 * sysdeps/alpha/td_ta_map_lwp2thr.c: New file.
8289 * sysdeps/alpha/tls.h: New file.
8290 * sysdeps/unix/sysv/linux/alpha/Makefile: New file.
8291 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: New file.
8292 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: New file.
8293 * sysdeps/unix/sysv/linux/alpha/createthread.c: New file.
8294 * sysdeps/unix/sysv/linux/alpha/fork.c: New file.
8295 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: New file.
8296 * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: New file.
8297 * sysdeps/unix/sysv/linux/alpha/pthread_once.c: New file.
8298 * sysdeps/unix/sysv/linux/alpha/sem_post.c: New file.
8299 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
8300
3b985826
UD
83012003-07-01 Ulrich Drepper <drepper@redhat.com>
8302
8303 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Add correct
8304 cleanup support and unwind info.
8305
3a4d1e1e
UD
83062003-06-30 Ulrich Drepper <drepper@redhat.com>
8307
8308 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
8309 Use correct cleanup handler registration. Add unwind info.
96c814d3
UD
8310 * sysdeps/unix/sysv/linux/unwindbuf.sym: New file.
8311 * sysdeps/unix/sysv/linux/Makefile: Add rule to build unwindbuf.h.
3a4d1e1e
UD
8312 * tst-once3.c: Add cleanup handler and check it is called.
8313 * tst-once4.c: Likewise.
8314 * tst-oncex3.c: New file.
8315 * tst-oncex4.c: New file.
8316 * Makefile: Add rules to build and run tst-oncex3 and tst-oncex4.
8317
e479cc8e
UD
83182003-06-29 Ulrich Drepper <drepper@redhat.com>
8319
8320 * sysdeps/pthread/configure.in: Check for C cleanup handling in gcc.
8321
7d7ff54c
UD
83222003-06-27 Ulrich Drepper <drepper@redhat.com>
8323
483e95d0
UD
8324 * tst-cancel4.c (tf_msgrcv): Use IPC_PRIVATE in msgget call.
8325 (tf_msgsnd): Likewise.
8326
7d7ff54c
UD
8327 * tst-cancel4.c (tf_msgrcv): Strengthen test against valid
8328 premature returns a bit more.
8329
7539c7ec
UD
83302003-06-26 Ulrich Drepper <drepper@redhat.com>
8331
8332 * sysdeps/pthread/librt-cancellation.c: Move __pthread_unwind
8333 definition to the front.
8334
8335 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rename
8336 the cleanup functions to make the names unique. Fix dwarf opcode
8337 un unwind table.
8338 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Rename cleanup
8339 functions to make the names unique. Fix CFA offset for two blocks.
8340
0af6a1d9
UD
83412003-06-25 Ulrich Drepper <drepper@redhat.com>
8342
8343 * sysdeps/pthread/pthread.h (class __pthread_cleanup_class): Add
8344 missing closing braces.
8345 Patch by Christophe Saout <christophe@saout.de>.
8346
eef4a9f3
RM
83472003-06-24 Roland McGrath <roland@redhat.com>
8348
8349 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Typo fix.
8350
4165d44d
UD
83512003-06-24 Ulrich Drepper <drepper@redhat.com>
8352
7f8f7b9d
UD
8353 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: New file.
8354 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: New file.
8355
4165d44d
UD
8356 * pthreadP.h: Declare __find_thread_by_id.
8357 * allocatestack.c [HP_TIMING_AVAIL]: Define __find_thread_by_id.
8358 * pthread_clock_gettime.c: Allow using other thread's clock.
8359 * pthread_clock_settime.c: Likewise.
8360 * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
8361 * Makefile: Add rules to build and run tst-clock2.
8362 * tst-clock2.c: New file.
8363
67b78ef9
UD
83642003-06-23 Ulrich Drepper <drepper@redhat.com>
8365
8366 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rewrite
8367 to use exception-based cleanup handler.
8368 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8369
8370 * tst-cond8.c (ch): Announce that we are done.
8371
8372 * pthreadP.h (__pthread_mutex_cond_lock): Mark with internal_function.
8373
8374 * tst-cancel17.c (tf): Retry aio_suspend in case of EINTR.
8375 Also test aio_suspend with timeout value.
8376
61623643
UD
83772003-06-22 Ulrich Drepper <drepper@redhat.com>
8378
3a4f2043
UD
8379 * pthreadP.h: Mark __pthread_mutex_unlock_usercnt also hidden.
8380 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Add
8381 attribute_hidden.
8382
61623643
UD
8383 * pthreadP.h (__pthread_mutex_init_internal): Mark hidden.
8384 (__pthread_mutex_lock_internal): Likewise.
8385 (__pthread_mutex_unlock_internal): Likewise.
8386 (__pthread_mutex_unlock_usercnt): Declare.
8387 * pthread_mutex_destroy.c: Always fail if used in any way.
8388 * pthread_mutex_init.c: Update comment.
8389 * pthread_mutex_lock.c: If NO_INCR is not defined adjust __nusers.
8390 * pthread_mutex_timedlock.c: Adjust __nusers.
8391 * pthread_mutex_trylock.c: Adjust __nusers.
8392 * pthread_mutex_unlock.c: Old code is in __pthread_mutex_unlock_usercnt
8393 and public interfaces are wrapper with pass additional parameter.
8394 __pthread_mutex_unlock_usercnt does not adjust __nusers if second
8395 parameter zero.
8396 * tst-mutex8.c: New file.
8397 * Makefile (tests): Add tst-mutex8.
8398 * sysdeps/pthread/pthread_cond_timedwait.c: Call
8399 __pthread_mutex_unlock_usercnt.
8400 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
8401 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8402 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8403 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8404 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8405 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Define NO_INCR.
8406 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
8407 Add __nusers.
8408 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8409 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
8410 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
8411 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
8412 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
8413
8414 * pthread_mutex_lock.c: Don't store THREAD_ID in __owner, use TID.
8415 * pthread_mutex_timedlock.c: Likewise.
8416 * pthread_mutex_trylock.c: Adjust __nusers.
8417 * pthread_mutex_unlock.c: Compare with TID not THREAD_ID.
8418 * tst-mutex9.c: New file.
8419 * Makefile (tests): Add tst-mutex9.
8420 * sysdeps/i386/tls.h: Remove THREAD_ID definition.
8421 * sysdeps/ia64/tls.h: Likewise.
8422 * sysdeps/powerpc/tls.h: Likewise.
8423 * sysdeps/s390/tls.h: Likewise.
8424 * sysdeps/sh/tls.h: Likewise.
8425 * sysdeps/x86_64/tls.h: Likewise.
8426 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
8427 Change type of __owner.
8428 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8429 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
8430 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
8431 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
8432 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
8433
9bdabb94
UD
84342003-06-19 Jakub Jelinek <jakub@redhat.com>
8435
8436 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Move to...
8437 * sysdeps/unix/sysv/linux/sem_post.c: ...here.
8438
8439 * sysdeps/unix/sysv/linux/sem_post.c: Move to...
8440 * sysdeps/unix/sysv/linux/powerpc/sem_post.c: ... here. Pass nr + 1
8441 instead of nr to lll_futex_wake. Only set errno and return -1
8442 if err < 0.
8443
8444 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_wait,
8445 lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
8446 return actual return value from the syscall, not 0.
8447
f6c93bd9
UD
84482003-06-18 Ulrich Drepper <drepper@redhat.com>
8449
ca343e73
UD
8450 * tst-cancel4.c (tf_msgsnd): Don't always use 100 as the type,
8451 find a random value.
8452 (tf_msgrcv): Likewise. Also don't report msgrcv returns if
8453 errno==EIDRM.
8454
50441a98
UD
8455 * sysdeps/unix/sysv/linux/timer_settime.c: Add prototype for
8456 compat_timer_settime.
8457 * sysdeps/unix/sysv/linux/timer_gettime.c: Add prototype for
8458 compat_timer_gettime.
8459 * sysdeps/unix/sysv/linux/timer_getoverr.c: Add prototype for
9bdabb94 8460 compat_timer_getoverrun.
50441a98
UD
8461 * sysdeps/unix/sysv/linux/timer_delete.c: Add prototype for
8462 compat_timer_delete.
8463
f6c93bd9
UD
8464 * pthread_mutex_destroy.c (__pthread_mutex_destroy): For
8465 error-checking mutex detect busy mutexes.
8466
047aec8f
UD
84672003-06-17 Ulrich Drepper <drepper@redhat.com>
8468
1d53508d
UD
8469 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_mutex_lock):
8470 Add ax to clobber list.
8471 (lll_mutex_cond_lock): Likewise.
8472 (lll_mutex_unlock): Likewise.
8473 (lll_lock): Likewise.
8474 (lll_unlock): Likewise.
8475
f23b30e2
UD
8476 * Makefile: Add rules to build and run tst-cancel18 and tst-cancelx18.
8477 * tst-cancel18.c: New file.
8478 * tst-cancelx18.c: New file.
8479
8480 * tst-cancel4.c: Test connect, creat, msgrcv, msgsnd, sendmsg, sendto,
8481 and tcdrain.
8482
8483 * Makefile: Add rules to build and run tst-cancel17 and tst-cancel17x.
8484 * tst-cancel17.c: New file.
8485 * tst-cancelx17.c: New file.
8486
8487 * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
8488 * sysdeps/unix/sysv/linux/sigwait.c: New file.
8489 * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
8490
047aec8f
UD
8491 * tst-cancel4.c: Test open, close, pread, pwrite, fsync, and msync.
8492
bbde8527
UD
84932003-06-16 Jakub Jelinek <jakub@redhat.com>
8494
8495 * sysdeps/pthread/createthread.c (create_thread): Set
8496 header.multiple_threads unconditionally.
8497 * allocatestack.c (allocate_stack): Likewise.
8498 * descr.h (struct pthread): Add header.multiple_threads
8499 unconditionally.
8500 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (CENABLE, CDISABLE):
8501 Define for librt. #error if neither libpthread, libc nor librt.
8502 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (CENABLE, CDISABLE):
8503 Likewise.
8504 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (CENABLE,
8505 CDISABLE): Likewise.
8506 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (CENABLE,
8507 CDISABLE): Likewise.
8508 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (CENABLE,
8509 CDISABLE): Likewise.
8510 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (CENABLE,
8511 CDISABLE): Likewise. Access header.multiple_threads outside of
8512 libc and libpthread.
8513 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (CENABLE, CDISABLE):
8514 Likewise.
8515 * sysdeps/x86_64/tls.h (tcbhead_t): Add multiple_threads.
8516 * sysdeps/x86_64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define.
8517
26676450
UD
85182003-06-17 Ulrich Drepper <drepper@redhat.com>
8519
8520 * tst-cancel4.c: Add tests for the socket and signal functions, pause.
8521 Also test early cancellation before the thread reaches the cancellation
8522 point.
8523
8524 * Makefile: Compile forward.c with exceptions.
8525
8526 * sysdeps/unix/sysv/linux/sleep.c: New file.
8527
301a6724
UD
85282003-06-16 Ulrich Drepper <drepper@redhat.com>
8529
0e0deb03
UD
8530 * Makefile: Add CFLAGS definition to compile function wrappers
8531 duplicated from libc with exceptions.
8532 * tst-cancel4.c: Also check cancellation handlers.
8533
301a6724
UD
8534 * Makefile: Add rules to build and run tst-cancel16 and
8535 tst-cancelx16. Add missing CFLAGS definitions.
8536 * tst-cancel16.c: New file.
8537 * tst-cancelx16.c: New file.
8538
7a114794
UD
85392003-06-15 Ulrich Drepper <drepper@redhat.com>
8540
452aea84
UD
8541 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
8542 (DL_SYSINFO_IMPLEMENTATION): Use CFI opcodes.
8543 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
8544 (DL_SYSINFO_IMPLEMENTATION): Likewise.
8545
7a114794
UD
8546 * pthreadP.h (LIBC_CANCEL_ASYNC): Also define for librt.
8547 (LIBC_CANCEL_RESET): Likewise.
8548 Declare __librt_enable_asynccancel and __librt_disable_asynccancel.
8549 * sysdeps/pthread/Makefile (librt-sysdep_routines): Add
8550 librt-cancellation.
8551 (CFLAGS-libcrt-cancellation.c): Define.
8552 * sysdeps/pthread/librt-cancellation.c: New file.
8553 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define all the nice
8554 macros also when compiling librt.
8555 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
8556 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
8557 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
8558 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
8559 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
8560 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
8561 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
8562
8563 * sysdeps/unix/sysv/linux/timer_create.c: Add prototype for
8564 compat_timer_create.
8565
8ba1d429
UD
85662003-06-14 Ulrich Drepper <drepper@redhat.com>
8567
cc8fb6f3
UD
8568 * sysdeps/pthread/posix-timer.h (timespec_compare): Always inline.
8569
8ba1d429
UD
8570 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
8571 __register_atfork.
8572 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
8573 Add libc_hidden_def.
8574
d4f100e2
RM
85752003-06-13 Roland McGrath <roland@redhat.com>
8576
8577 * sysdeps/x86_64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Pass FS
8578 constant from <sys/reg.h> to ps_get_thread_area, not register contents.
8579
dd9423a6
UD
85802003-06-11 Ulrich Drepper <drepper@redhat.com>
8581
8582 * allocatestack.c (queue_stack): Always inline.
8583 * ptreadhP.h (__do_cancel): Likewise.
8584
ed24330d
JJ
85852003-06-10 Jakub Jelinek <jakub@redhat.com>
8586
8587 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait): Fix
8588 a typo.
8589
06120d79
UD
85902003-06-10 Ulrich Drepper <drepper@redhat.com>
8591
8592 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
8593 (__pthread_cond_signal): Remove incorrect second addition for
8594 cond_lock!=0.
8595
b1720346
UD
85962003-06-09 Ulrich Drepper <drepper@redhat.com>
8597
5b318f85
UD
8598 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
8599 (__pthread_cond_signal): Use correct futex pointer in
8600 __lll_mutex_lock_wait call.
8601
b1720346
UD
8602 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
8603 (__pthread_cond_signal): Some more tweaks to handle cond_lock!=0.
8604
3e36c37d
UD
86052003-06-08 Ulrich Drepper <drepper@redhat.com>
8606
ecf7955d
UD
8607 * sysdeps/unix/sysv/linux/s390/sem_wait.c (__new_sem_wait): Make
8608 cancelable.
ed24330d 8609 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
ecf7955d
UD
8610 Likewise.
8611
3e36c37d
UD
8612 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Remove
8613 hand-written CFI generation code. Since ENTRY/END also initiated
8614 CFI frames this caused two CFI sets to be generated.
8615
7726edc2
UD
86162003-06-07 Ulrich Drepper <drepper@redhat.com>
8617
8618 * cleanup_routine.c: New file.
8619 * Versions (libpthread) [GLIBC_2.3.3]: Add __pthread_cleanup_routine.
8620 * sysdeps/pthread/pthread.h: Add support for fully exception-based
8621 cleanup handling.
8622 * Makefile (libpthread-routines): Add cleanup_routine.
8623 Add more CFLAGS variables to compile with exceptions. Add comments
8624 why which file needs unwind tables.
8625 (tests) [have-forced-unwind==yes]: Add tst-cancelx* and tst-cleanupx*
8626 tests.
8627 * tst-cancelx1.c: New file.
8628 * tst-cancelx2.c: New file.
8629 * tst-cancelx3.c: New file.
8630 * tst-cancelx4.c: New file.
8631 * tst-cancelx5.c: New file.
8632 * tst-cancelx6.c: New file.
8633 * tst-cancelx7.c: New file.
8634 * tst-cancelx8.c: New file.
8635 * tst-cancelx9.c: New file.
8636 * tst-cancelx10.c: New file.
8637 * tst-cancelx11.c: New file.
8638 * tst-cancelx12.c: New file.
8639 * tst-cancelx13.c: New file.
8640 * tst-cancelx14.c: New file.
8641 * tst-cancelx15.c: New file.
8642 * tst-cleanupx0.c: New file.
8643 * tst-cleanupx0.expect: New file.
8644 * tst-cleanupx1.c: New file.
8645 * tst-cleanupx2.c: New file.
8646 * tst-cleanupx3.c: New file.
8647
8648 * tst-cleanup0.c: Make standard compliant.
8649 * tst-cleanup1.c: Likewise.
8650
8651 * sysdeps/unix/sysv/linux/sem_timedwait.c: Add cancellation support.
8652 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
8653 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
8654 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
8655 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
8656 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
8657 * sysdeps/i386/tcb-offsets.sym: Add RESULT, CANCELHANDLING, and
8658 CLEANUP_JMP_BUF.
8659 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
8660 * tst-cancel12.c: New file.
8661 * tst-cancel13.c: New file.
8662 * tst-cancel14.c: New file.
8663 * tst-cancel15.c: New file.
8664 * Makefile (tests): Add tst-cancel12, tst-cancel13, tst-cancel14,
8665 and tst-cancel15.
8666
8667 * tst-cancel1.c: Add some comments.
8668
8669 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Compute relative
8670 timeout correctly.
8671
7a8a8e21
UD
86722003-06-06 Ulrich Drepper <drepper@redhat.com>
8673
8674 * Makefile (CFLAGS-pthread_cancel.c): Define.
8675
4ad0bbf4
UD
86762003-06-05 Ulrich Drepper <drepper@redhat.com>
8677
8678 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_rwlock_t):
8679 Change type of __writer element to int.
8680 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8681 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
8682 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
8683 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
8684 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
8685 * sysdeps/i386/tcb-offsets.sym: Replace SELF entry with TID entry.
8686 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
8687 * pthread_rwlock_trywrlock.c: Store TID not self pointer in __writer.
8688 Compare with TID to determine deadlocks.
8689 * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
8690 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
8691 * sysdeps/pthread/pthread_rwlock_timedwrlock.: Likewise.
8692 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
8693 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
8694 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8695 Likewise.
8696 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8697 Likewise.
8698 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8699 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
8700 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
8701 Likewise.
8702 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
8703 Likewise.
8704 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
8705 * Makefile (tests): Add tst-rwlock12.
8706 * tst-rwlock12.c: New file.
8707
332faa96
JJ
87082003-06-05 Jakub Jelinek <jakub@redhat.com>
8709
8710 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait,
8711 __lll_timedlock_wait, lll_unlock_wake_cb, __lll_timedwait_tid):
8712 Remove bogus hidden_proto.
8713 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
8714 Likewise.
8715 * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_lock,
8716 lll_unlock_wake_cb, ___lll_timedwait_tid): Likewise.
8717 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (___lll_mutex_lock,
8718 ___lll_mutex_timedlock): Likewise.
8719
29d9e2fd
UD
87202003-06-04 Ulrich Drepper <drepper@redhat.com>
8721
8722 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
8723 (__pthread_cond_signal): Add some code to eventually handle
8724 cond_lock!=0.
8725
6f1acb30
UD
87262003-06-01 Ulrich Drepper <drepper@redhat.com>
8727
8728 * Makefile (tests): Add tst-exec4.
8729 (tst-exec4-ARGS): Define.
8730 * tst-exec4.c: New file.
8731
49b65043
UD
87322003-05-31 Ulrich Drepper <drepper@redhat.com>
8733
31195be2
UD
8734 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
8735 Also fail if tv_nsec < 0.
8736 (__lll_timedwait_tid): Likewise.
8737 * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
8738 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_timedwait_tid):
8739 Likewise.
8740 * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_timedwait_tid):
8741 Likewise.
8742 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (__lll_mutex_timedlock):
8743 Likewise.
8744 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
8745 Likewise.
80b54217
UD
8746 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_timedwait_tid):
8747 Likewise.
8748 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_timedwait_tid):
8749 Likewise.
31195be2 8750
dcfc8224
UD
8751 * Makefile (tests): Add tst-sem8 and tst-sem9.
8752 * tst-sem8.c: New file.
8753 * tst-sem9.c: New file.
8754 * sem_open.c: Fix creation of in_use record if the file exists but
8755 no internal record.
8756
49b65043
UD
8757 * posix-timer.h: Remove old, unused timer_id2ptr and timer_ptr2id
8758 definitions.
8759
8760 * sysdeps/pthread/timer_create.c (timer_create): In case
8761 evp==NULL, assign timer ID to sival_ptr.
8762
8763 * descr.h (struct pthread_unwind_buf): Change type of prev element to
8764 struct pthread_unwind_buf *.
8765 (struct pthread): Likewise for cleanup_jmp_buf element.
8766
8767 * cleanup.c (__pthread_register_cancel): Add cast to avoid warning.
8768 * cleanup_defer.c (__pthread_register_cancel_defer): Likewise.
8769 * unwind.c (__pthread_unwind_next): Likewise.
8770
50794a45
UD
87712003-05-30 Ulrich Drepper <drepper@redhat.com>
8772
5d4f57bd
UD
8773 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
8774 (lll_futex_timed_wait): Use int for futex value parameter.
8775 (lll_futex_wake): Likewise.
8776 (lll_futex_requeue): Likewise.
8777
8778 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
8779 Replace one memory operation with one register operation.
8780
8781 * tst-join4.c (do_test): Fix error message.
8782
7ab7ea33
UD
8783 * tst-rwlock6.c (do_test): Use correct format specifier.
8784
8785 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
8786 (__lll_mutex_lock_wait): Replace one memory operation with one
8787 register operation.
8788 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S
8789 (__lll_mutex_lock_wait): Likewise.
8790
50794a45
UD
8791 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
8792 (__lll_mutex_cond_lock): Add one to value parameter of
8793 __lll_lock_wait to reflect reality in the futex syscall.
8794 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
8795 (lll_mutex_cond_lock): Likewise.
8796
5a70784e
JJ
87972003-05-30 Jakub Jelinek <jakub@redhat.com>
8798
8799 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_cond_lock):
8800 New function.
8801 (lll_mutex_cond_lock): Define.
8802
e7c5ac68
UD
88032003-05-29 Ulrich Drepper <drepper@redhat.com>
8804
586d1748
UD
8805 * Makefile (tests): Add tst-signal6.
8806 * tst-signal6.c: New file.
8807
b8ba4a27
UD
8808 * sysdeps/unix/sysv/linux/s390/lowlevellock.h
8809 (__lll_mutex_unlock_force): New function
8810 (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
8811
65d46efe
UD
8812 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
8813 (__lll_mutex_unlock_force): New function.
8814 (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
8815
8816 * tst-rwlock7.c (do_test): Use correct format specifier.
8817
e7c5ac68
UD
8818 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue):
8819 Find break parameter in correct asm argument.
8820
284bdc42
UD
88212003-05-27 Jakub Jelinek <jakub@redhat.com>
8822
8823 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_clobbers):
8824 Remove out4.
8825 (lll_futex_requeue): Fix __o3 constraint, return negative errno if
8826 error occured.
8827 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
8828 Add __mutex.
8829 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_REQUEUE,
8830 lll_futex_requeue, lll_mutex_unlock_force): Define.
8831
e7c5ac68
UD
88322003-05-30 Jakub Jelinek <jakub@redhat.com>
8833
8834 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
8835 (pthread_cond_t): Add __mutex.
8836 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_REQUEUE,
8837 lll_futex_requeue, lll_mutex_unlock_force): Define.
8838
ea2630c6
UD
88392003-05-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
8840
8841 * sysdeps/sh/tcb-offsets.sym: Define MUTEX_FUTEX.
8842 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
42d86dd6 8843 Add __mutex field.
ea2630c6
UD
8844 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (SYSCALL_WITH_INST_PAD):
8845 Define.
8846 (lll_futex_wait, lll_futex_wake): Define.
8847 * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: New file.
8848 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Try using
8849 FUTEX_REQUEUE instead of FUTEX_WAIT.
8850 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
8851 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Remember
8852 mutex which was used in condvar structure. Call
8853 __pthread_mutex_cond_lock instead of __pthread_mutex_lock_internal.
8854 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
8855
8856 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Don't
8857 include tcb-offsets.h. Read wakeup value in locked region.
8858 Use the value of gbr register as THREAD_ID.
8859 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
8860 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
8861 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
8862
8863 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Remove futex related
8864 macros.
8865
5a77f150
UD
88662003-05-28 Ulrich Drepper <drepper@redhat.com>
8867
8868 * sysdeps/pthread/pthread_cond_broadcast.c
8869 (__pthread_cond_broadcast): Fix typo: MAX_INT -> INT_MAX.
8870
7661d9f7
UD
88712003-05-26 Ulrich Drepper <drepper@redhat.com>
8872
8873 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Fix
8874 typo in register name.
8875 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use parameters
8876 correctly. Actually use requeue. Little optimization.
8877 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Store
8878 mutex address early. Handle cancellation state as 32-bit value.
8879 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8880 Remove unnecessary label.
8881
69431c9a
UD
88822003-05-25 Ulrich Drepper <drepper@redhat.com>
8883
8884 * sysdeps/pthread/pthread_cond_broadcast.c: Try using FUTEX_REQUEUE
8885 instead of FUTEX_WAIT.
8886 * sysdeps/pthread/pthread_cond_signal.c: Likewise.
8887 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
8888 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
8889 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
8890 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
8891 * sysdeps/pthread/pthread_cond_timedwait.c: Remember mutex which was
8892 used in condvar structure. Call __pthread_mutex_cond_lock instead
8893 of __pthread_mutex_lock_internal.
8894 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8895 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8896 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
8897 (__condvar_cleanup): Always call __pthread_mutex_cond_lock.
8898 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8899 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8900 * sysdeps/unix/sysv/linux/Makefile (libpthread-sysdep_routines):
8901 Add pthread_mutex_cond_lock.
8902 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add dep_mutex.
8903 * sysdeps/unix/sysv/linux/pthread_cond_mutex_lock.c: New file.
8904 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define
8905 lll_mutex_cond_lock.
8906 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
8907 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
248a3490 8908 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
69431c9a 8909 Add __mutex field.
248a3490 8910 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
69431c9a
UD
8911 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
8912
8913 * sysdeps/i386/tcb-offsets.sym: Define MUTEX_FUTEX.
8914 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
8915
8916 * pthreadP.h: Declare __pthread_mutex_cond_lock.
8917 * pthread_mutex_lock.c: Define LLL_MUTEX_LOCK if not already defined.
8918 Use it instead of lll_mutex_lock. If __pthread_mutex_lock is a
8919 macro don't define aliases.
8920
8921 * cancellation.c: Remove __pthread_enable_asynccancel_2.
8922 * pthreadP.h: Remove declaration of __pthread_enable_asynccancel_2.
8923 * sysdeps/pthread/pthread_cond_timedwait.c: Use
8924 __pthread_enable_asynccancel instead of __pthread_enable_asynccancel_2.
8925 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8926 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8927 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
8928 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8929 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8930
fddfebbd
UD
89312003-05-17 Ulrich Drepper <drepper@redhat.com>
8932
8933 * sem_open.c: Fix one endless loop. Implement correct semantics
8934 wrt opening the same semaphore more then once.
8935 * sem_close.c: Adjust for sem_open change.
8936 * semaphoreP.h: Include <semaphore.h>. Define struct inuse_sem.
8937 Declare __sem_mappings, __sem_mappings_lock, __sem_search.
8938 * Makefile (tests): Add tst-sem7.
8939 * tst-sem7.c: New file.
8940
1eefffb0
RM
89412003-05-16 Roland McGrath <roland@redhat.com>
8942
8943 * sysdeps/unix/sysv/linux/register-atfork.c (libc_freeres_fn): Fix
8944 uninitialized variable braino.
8945
6e66dc78
UD
89462003-05-16 Ulrich Drepper <drepper@redhat.com>
8947
23ae6451
UD
8948 * sysdeps/unix/sysv/linux/timer_gettime.c (timer_gettime): Correct
8949 test for syscall availability.
8950
8951 * sysdeps/unix/sysv/linux/timer_settime.c (timer_settime): Set
8952 __no_posix_timers to -1 if the syscalls don't exist.
8953
7ac5b8e2
UD
8954 * pthread_join.c (pthread_join): Set tid field of the joined
8955 thread to -1. This isn't necessary but helps to recognize some
8956 error conditions with almost no cost.
8957
8958 * allocatestack.c (FREE_P): Also negative values indicate an
8959 unused stack.
8960
6e66dc78
UD
8961 * unwind.c: Include <unistd.h>.
8962
855dba3c
UD
89632003-05-14 Ulrich Drepper <drepper@redhat.com>
8964
8965 * Makefile ($(objpfx)$(multidir)): Add rule to create the directory.
8966
81f3ac4c
UD
89672003-05-14 Jakub Jelinek <jakub@redhat.com>
8968
8969 * Makefile (crti-objs, crtn-objs): New variables.
8970 (omit-deps, extra-objs): Add crtn.
8971 ($(objpfx)libpthread.so): Depend on both crti and crtn
8972 and links to them in multidir.
8973 ($(objpfx)crtn.S, $(objpfx)crtn.o): New rules.
8974
7158eae4
UD
89752003-05-12 Steven Munroe <sjmunroe@us.ibm.com>
8976
8977 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
8978 (lll_mutex_unlock): Use atomic_exchange_rel.
8979
edf205d5
UD
89802003-05-11 Ulrich Drepper <drepper@redhat.com>
8981
8982 * cond-perf.c (cons): Add missing locking around setting of alldone.
8983
a3f979a7
UD
89842003-05-10 Ulrich Drepper <drepper@redhat.com>
8985
8986 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Remove futex
8987 related macros.
8988 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
8989
880867a4
UD
89902003-05-09 Ulrich Drepper <drepper@redhat.com>
8991
949ec764
UD
8992 * tst-sem6.c: New file.
8993 * Makefile (tests): Add tst-sem6.
8994
8995 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (___lll_mutex_unlock):
8996 Use atomic_exchange_rel instead of atomic_exchange.
8997 * sysdeps/unix/sysv/linux/lowlevellock.c (lll_unlock_wake_cb):
8998 Likewise.
8999
9000 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Improve quality of
9001 code for lll_futex_wait and lll_futex_wake in static apps. Use
9002 vsyscall is possible.
9003
9004 * sysdeps/unix/sysv/linux/pthread_getaffinity.c: New file.
9005 * sysdeps/unix/sysv/linux/pthread_setaffinity.c: New file.
9006 * sysdeps/pthread/pthread.h: Declare pthread_getaffinity_np and
9007 pthread_setaffinity_np.
9008 * Versions [libpthread] (GLIBC_2.3.3): Add pthread_getaffinity_np
9009 and pthread_setaffinity_np.
9010 * Makefile (libpthread-routines): Add pthread_getaffinity and
9011 pthread_setaffinity.
9012
880867a4
UD
9013 * allocatestack.c (allocate_stack): If ARCH_RETRY_MMAP is defined,
9014 use it in case mmap to allocate the stack fails.
9015 * sysdeps/unix/sysv/linux/x86_64/Makefile: Don't define
9016 ARCH_MAP_FLAGS here.
9017 * sysdeps/x86_64/pthreaddef.h: Define ARCH_MAP_FLAGS and
9018 ARCH_RETRY_MMAP.
9019
92d83c72
UD
90202003-05-08 Ulrich Drepper <drepper@redhat.com>
9021
9022 * sysdeps/unix/sysv/linux/fork.c: Complete rewrite of the atfork
9023 handler implementation. It is now lockless in fork().
9024 * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
9025 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
9026 * sysdeps/unix/sysv/linux/fork.h: Don't include <link.h>. Don't
9027 declare the __fork_*_lists.
9028 (struct fork_handler): Include pointers to all three functions.
9029 Add next, refcntr and need_signal elements.
9030 (__fork_handlers): New declaration.
9031 (__register_atfork_malloc): Remove declaration.
9032 (HAVE_register_atfork_malloc): Remove definition.
9033 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove
9034 __pthread_child_handler variable.
9035 (__libc_pthread_init): Use __register_atfork instead of explicitly
9036 adding to the list.
9037 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define lll_futex_wait
9038 and lll_futex_wake.
9039 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
9040
9041 * unwind.c (unwind_cleanup): Print error message and then abort. This
9042 function must never be reached.
9043
9044 * cond-perf.c: New file.
9045
be4d8038
UD
90462003-05-05 Ulrich Drepper <drepper@redhat.com>
9047
9048 * sysdeps/i386/tls.h (TLS_INIT_TP): Include \n in error message.
9049
c6696b79
RM
90502003-05-04 Roland McGrath <roland@redhat.com>
9051
9052 * Makefile ($(objpfx)../libc.so): New target.
9053
7da168bf
UD
90542003-05-02 Ulrich Drepper <drepper@redhat.com>
9055
9056 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
9057 (pthread_condattr_t): Size is only an int, don't use long for
9058 alignment.
9059 (pthread_mutexattr_t): Likewise.
7da168bf
UD
9060 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
9061 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
9062 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
9063
9a7178d6
UD
90642003-05-01 Ulrich Drepper <drepper@redhat.com>
9065
9066 * sysdeps/i386/tls.h: Define THREAD_ID.
9067 * sysdeps/ia64/tls.h: Likewise.
9068 * sysdeps/powerpc/tls.h: Likewise.
9069 * sysdeps/s390/tls.h: Likewise.
9070 * sysdeps/sh/tls.h: Likewise.
9071 * sysdeps/x86_64/tls.h: Likewise.
9072 * pthread_mutex_lock.c: Use THREAD_ID instead of THREAD_SELF to
9073 record ownership.
9074 * pthread_mutex_timedlock.c: Likewise.
9075 * pthread_mutex_trylock.c: Likewise.
9076 * pthread_mutex_unlock.c: Likewise.
9077 * pthread_rwlock_trywrlock.c: Likewise.
9078 * sysdeps/pthread/pthread_rwlocklock_rdlock.c: Likewise.
9079 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
9080 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
9081 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
9082
9083 * sysdeps/pthread/createthread.c (create_thread): Use CLONE_SYSVSEM
9084 flag.
9085
a234e27d
UD
90862003-04-29 Jakub Jelinek <jakub@redhat.com>
9087
9088 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
9089 (__SIZEOF_PTHREAD_COND_T): Define to 48.
9090 (pthread_rwlock_t): Add 16 bytes of pad instead of 8 before __flags.
9091 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
9092 Make __align long long instead of long.
9093 (pthread_rwlock_t): Formatting.
9094 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
9095 (pthread_rwlock_t): Formatting.
9096 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
9097 (pthread_cond_t): Make __align long long instead of long.
9098 (pthread_rwlock_t): Move __flags field to the same position as in
9099 linuxthreads.
9100
f025c136
UD
91012003-04-30 Ulrich Drepper <drepper@redhat.com>
9102
9103 * tst-rwlock6.c (do_test): Use correct printf format specifiers.
9104 * tst-rwlock7.c (do_test): Likewise.
9105
7531ab9e
RM
91062003-04-26 Roland McGrath <roland@redhat.com>
9107
9108 * Makefile ($(test-modules)): Depend on $(common-objpfx)shlib.lds.
9109
299601a1
UD
91102003-04-22 Jakub Jelinek <jakub@redhat.com>
9111
299601a1
UD
9112 * allocatestack.c (TLS_TPADJ): Add TLS_PRE_TCB_SIZE instead of
9113 sizeof (struct pthread).
9114 (allocate_stack): Subtract TLS_PRE_TCB_SIZE bytes instead of
468777e1 9115 1 struct pthread.
299601a1
UD
9116 * sysdeps/powerpc/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Define
9117 to 0.
9118 (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Define to alignment of
9119 struct pthread.
9120 (TLS_PRE_TCB_SIZE): Increase to cover tcbhead_t preceeded by pad
9121 to 32-bit bytes.
9122 (INSTALL_DTV, GET_DTV, THREAD_DTV): tcbhead_t is immediately before
9123 tcbp.
9124 (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Don't add TLS_TCB_SIZE
9125 unneccessarily.
9126 (NO_TLS_OFFSET): Define.
299601a1
UD
9127 * sysdeps/unix/sysv/linux/powerpc/createthread.c (TLS_VALUE): Don't
9128 add TLS_TCB_SIZE unnecessarily.
299601a1 9129
950094f8
RM
91302003-04-22 Roland McGrath <roland@redhat.com>
9131
9132 * Makeconfig (shared-thread-library): Reverse link order to work
9133 around linker bug.
9134
dc2f6455
UD
91352003-04-22 Ulrich Drepper <drepper@redhat.com>
9136
9137 * semaphore.h: Fix typo in comment.
9138
e7608d77
UD
91392003-04-21 Ulrich Drepper <drepper@redhat.com>
9140
6a87ee19
UD
9141 * sysdeps/pthread/sigfillset.c: New file.
9142
e7608d77
UD
9143 * init.c (__pthread_initialize_minimal): Don't block SIGTIMER.
9144 * pthreadP.h: Make SIGTIMER and SIGCANCEL the same.
9145 * sysdeps/pthread/pthread_sigmask.c: Remove handling of SIGTIMER.
9146 * sysdeps/pthread/sigaction.c: Likewise.
9147 * sysdeps/pthread/sigprocmask.c: New file.
9148 * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): Define as
9149 __SIGRTMIN+1.
9150 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
9151 Block SIGTIMER. Also handle SI_TKILL events and terminate thread
9152 in this case.
9153
0b3df49e
UD
91542003-04-19 Ulrich Drepper <drepper@redhat.com>
9155
58a7a325
UD
9156 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
9157 (DL_SYSINFO_IMPLEMENTATION): Add .eh_frame information.
9158
0b3df49e
UD
9159 * sysdeps/unix/sysv/linux/unregister-atfork.c
9160 (__unregister_atfork): Don't free memory not allocated dynamically.
9161
9162 * semaphore.h: Remove __THROW marker from cancellation points.
9163 * nptl/sysdeps/pthread/pthread.h: Likewise.
9164
7d74651e
UD
91652003-04-18 Ulrich Drepper <drepper@redhat.com>
9166
76a67697
UD
9167 * sysdeps/pthread/pthread.h: Don't mark pthread_testcancel,
9168 pthread_cancel, pthread_setcancelstate, and pthread_setcanceltype with
7d74651e
UD
9169 __THROW.
9170
dd9d6538
JJ
91712003-04-16 Jakub Jelinek <jakub@redhat.com>
9172
9173 * tst-cancel4.c (do_test): Use %zd instead of %d when printing cnt.
9174
4ab6f47c
RM
91752003-04-15 Roland McGrath <roland@redhat.com>
9176
9177 * forward.c (__pthread_unwind): Tweak to avoid warning.
9178
162434a6
UD
91792003-04-15 Ulrich Drepper <drepper@redhat.com>
9180
9181 * pthreadP.h: Move THREAD_ATOMIC_* replacements to the top.
9182
35909161
UD
91832003-04-14 Ulrich Drepper <drepper@redhat.com>
9184
18ddd3aa 9185 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Don't
35909161
UD
9186 overflow CFA advance instructions.
9187 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
9188
18a8e730
UD
91892003-04-14 Jakub Jelinek <jakub@redhat.com>
9190
bd4f43b4
UD
9191 * sysdeps/i386/tls.h: Rename LOCK to LOCK_PREFIX.
9192 * sysdeps/i386/pthread_spin_lock.c: Likewise.
9193 * sysdeps/x86_64/tls.h: Likewise. Define LOCK_PREFIX if not already
9194 defined.
9195
18a8e730
UD
9196 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Use
9197 DW_CFA_advance_loc2 for .Laddl-.Lsubl.
9198 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
9199 DW_CFA_advance_loc for .Laddl-.Lsubl.
9200
08c765fa
UD
92012003-04-13 Ulrich Drepper <drepper@redhat.com>
9202
18a8e730
UD
9203 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Don't use
9204 position-independent unwind data for static libraries.
9205 Add missing unwind info. Add comments.
9206
ad2be852
UD
9207 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Add unwind info.
9208 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
9209 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
08c765fa
UD
9210 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9211
177d1ad3
UD
92122003-04-12 Ulrich Drepper <drepper@redhat.com>
9213
08c765fa
UD
9214 * Makefile: Make sure all cancellation points are compiled with
9215 exception and asynchronous unwind tables.
9216
177d1ad3
UD
9217 * sysdeps/x86_64/tls.h (THREAD_SETMEM): Word around compiler bug
9218 which mishandles loading of global object addresses in PIC.
9219 (THREAD_SETMEM_NC): Likewise.
9220
09d65ff3
UD
92212003-04-11 Ulrich Drepper <drepper@redhat.com>
9222
9223 * pthread.h: Define new data structure for cleanup buffer. Declare
9224 new cleanup handler interfaces.
9225 * descr.h: Include <unwind.h> if necessary. Define pthread_unwind_buf.
9226 (struct pthread): Add cleanup_jmp_buf pointer. Define
9227 HAVE_CLEANUP_JMP_BUF and not HAVE_CANCELBUF.
9228 * pthreadP.h: Declare __pthread_unwind. Define __do_cancel to use
9229 it. Declare old cleanup handler installation functions.
9230 * cleanup.c: Rewrite. Install handler for unwind-based cleanup
9231 handling.
9232 * cleanup_defer.c: Likewise.
9233 * cleanup_compat.c: New file. Old cleanup code.
9234 * cleanup_def_compat.c: New file. Old cleanup code.
9235 * pthread_create.c (start_thread): Initialize cleanup_jmp_buf element
9236 if own thread descriptor.
9237 * unwind.c: New file.
9238 * forward.c: Add __pthread_unwind.
9239 * init.c (pthread_functions): Add __pthread_unwind.
9240 * sysdeps/pthread/pthread-functions.s (struct pthread_functions):
9241 Add ptr___pthread_unwind.
9242 * Versions [GLIBC_2.3.3] (libpthread): Export new cleanup handling
9243 and unwind function.
9244 * Makefile (libpthread-routines): Add cleanup_compat,
9245 cleanup_def_compat, and unwind. Define CFLAGS to enable unwind
9246 table generation if necessary.
9247 * version.c: Record whether unwind support is compiled in.
9248 * sysdeps/pthread/configure.in: Add checks for unwind unterfaces.
9249 * sysdeps/pthread/bits/libc-lock.h: Add prototypes of the old cleanup
9250 handler interfaces.
9251 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add quite a bit of
9252 complication to generate unwind information for syscall wrappers.
68107ec0 9253 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
09d65ff3
UD
9254 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
9255 __cleanup_fct_attribute.
9256
9257 * Makefile: Add rules to build and run tst-cleanup0.
9258 * tst-cleanup0.c: New file.
9259 * tst-cleanup0.expect: New file.
9260
9261 * pthread_create.c (deallocate_tsd): Don't take parameter. Adjust
9262 caller. Optimize to avoid often unecessary local variable.
9263
0dc44b51
RM
92642003-04-11 Roland McGrath <roland@redhat.com>
9265
9266 * Makefile ($(objpfx)multidir.mk): New target, generated makefile that
9267 sets variable `multidir'; include that.
9268 (generated): Add it.
9269 ($(objpfx)$(multidir)/crti.o): New target.
9270 [$(multidir) != .] (generated-dirs, extra-objs, omit-deps): Add it.
9271
84a80719
UD
92722003-04-11 Ulrich Drepper <drepper@redhat.com>
9273
9274 * tst-attr2.c (do_test): Add cast to avoid warning.
9275 * tst-mutex4.c (do_test): Likewise.
9276
88ff4759
UD
92772003-04-10 Ulrich Drepper <drepper@redhat.com>
9278
9279 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset CPU clocks
9280 in child.
9281
b2041097
UD
92822003-04-09 Ulrich Drepper <drepper@redhat.com>
9283
9284 * Makefile (tests): Add tst-detach1.
9285 * tst-detach1.c: New file.
9286
f9657e88
UD
92872003-04-08 Ulrich Drepper <drepper@redhat.com>
9288
9afe4964
UD
9289 * sysdeps/pthread/pthread.h: Remove duplicate
9290 pthread_cleanup_{push,pop} definitions.
9291
f9657e88
UD
9292 * tst-barrier2.c: Eliminate warnings.
9293 * tst-cancel4.c: Likewise.
9294 * tst-cond4.c: Likewise.
9295 * tst-cond6.c: Likewise.
9296 * tst-detach1.c: Likewise.
9297 * tst-rwlock4.c: Likewise.
9298 * tst-rwlock6.c: Likewise.
9299 * tst-rwlock7.c: Likewise.
9300 * tst-sem3.c: Likewise.
9301 * tst-spin2.c: Likewise.
9302 * tst-umask1.c: Likewise.
9303
69b35e86
UD
93042003-04-07 Ulrich Drepper <drepper@redhat.com>
9305
9306 * pthread_detach.c (pthread_detach): Fix test for invalid TID.
9307
c70ad7d7
UD
93082003-04-06 Ulrich Drepper <drepper@redhat.com>
9309
9310 * descr.h (struct pthread): Move cancelhandling member to the front.
9311
54e0138f
UD
93122003-04-05 Ulrich Drepper <drepper@redhat.com>
9313
9314 * sysdeps/unix/sysv/linux/register-atfork.c: Define malloc_prepare,
9315 malloc_parent, and malloc_child statically.
9316 (__register_atfork_malloc): New function.
9317 (free_mem): Don't free any of the malloc_* variables on the list.
9318 * sysdeps/unix/sysv/linux/fork.h: Declare __register_atfork_malloc.
9319 Define HAVE_register_atfork_malloc.
9320
b22d701b
UD
93212003-04-04 Ulrich Drepper <drepper@redhat.com>
9322
9323 * sysdeps/pthread/createthread.c (create_thread): Add some more
9324 comments explaining when to set multiple_threads and when not.
9325
9326 * pthreadP.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
9327 THREAD_ATOMIC_BIT_SET if not already defined.
9328 * sysdeps/i386/tls.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
9329 THREAD_ATOMIC_BIT_SET:
9330 * sysdeps/x86_64/tls.h: Likewise.
9331 * cleanup_defer.c (_pthread_cleanup_push_defer): Rewrite to use
9332 THREAD_ATOMIC_CMPXCHG_VAL.
9333 (_pthread_cleanup_pop_restore): Likewise.
9334 * cancellation.c (__pthread_enable_asynccancel): Likewise.
9335 (__pthread_enable_asynccancel_2): Likewise.
9336 (__pthread_disable_asynccancel): Likewise.
9337 * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
9338 (__libc_disable_asynccancel): Likewise.
9339 * init.c (sigcancel_handler): Likewise.
9340 * pthread_setcancelstate.c (__pthread_setcancelstate): Likewise.
9341 * pthread_setcanceltype.c (__pthread_setcanceltype): Likewise.
9342
86246935
UD
93432003-04-03 Ulrich Drepper <drepper@redhat.com>
9344
9345 * init.c (sigcancel_handler): Don't set EXITING_BIT here.
9346 * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
9347 * pthreadP.h (__do_cancel): Set EXITING_BIT here.
9348 * Makefile (tests): Add tst-cancel11.
9349 * tst-cancel11.c: New file.
9350
6b4686a5
UD
93512003-04-01 Ulrich Drepper <drepper@redhat.com>
9352
9353 * pthread_create.c (deallocate_tsd): Clear/free memory after the last
9354 round, not the first. Use specific_used flag instead of local
9355 found_nonzero variable. Use THREAD_[SG]ETMEM where possible.
9356 (__free_tcb): Don't call deallocate_tsd here.
9357 (start_thread): Call deallocate_tsd here.
9358 * pthread_setspecific.c: Set specific_used flag really only when
9359 needed.
0d73a73b 9360 * Makefile (tests): Add tst-tsd3.c and tst-tsd4.
6b4686a5 9361 * tst-tsd3.c: New file.
0d73a73b 9362 * tst-tsd4.c: New file.
6b4686a5 9363
42b2395d
UD
93642003-03-31 Ulrich Drepper <drepper@redhat.com>
9365
211d90c5
UD
9366 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_mutex_lock):
9367 Use atomic_exchange_and_add instead of __lll_add.
9368 (__lll_mutex_timedlock): Likewise.
9369 Patch by Ian Wienand.
9370
93712003-03-24 Steven Munroe <sjmunroe@us.ibm.com>
9372
9373 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
9374 (SINGLE_THREAD_P): Fix typo.
9375 * tst-cancel-wrappers.sh: Handle '.'ed symbols.
9376
93772003-03-31 Ulrich Drepper <drepper@redhat.com>
9378
9379 * Makefile (tests): Add tst-align.
9380 * tst-align.c: New file.
9381 * sysdeps/i386/Makefile: Define CFLAGS-tst-align.
211d90c5 9382
42b2395d
UD
9383 * sysdeps/i386/tls.h (CALL_THREAD_FCT): Align stack of called
9384 function correctly.
9385
211d90c5
UD
9386 * tst-tsd2.c: Add casts to avoid warnings.
9387
163b180f
UD
93882003-03-30 Ulrich Drepper <drepper@redhat.com>
9389
9390 * descr.h (struct pthread): Move most often used elements to the front.
9391
ea473bad
UD
93922003-03-29 Ulrich Drepper <drepper@redhat.com>
9393
9394 * Makefile (libpthread-routines): Add pthread_atfork.
9395 (libpthread-static-only-routines): Add pthread_atfork.
9396
dd731d53
UD
93972003-03-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
9398
9399 * sysdeps/sh/tls.h: Include nptl/descr.h after the definition
9400 of TLS_DTV_AT_TP.
9401 (INSTALL_DTV): Add parens.
9402 (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
9403 Use passed descr instead of THREAD_SELF.
9404 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S
9405 (__lll_mutex_timedlock_wait): Correct expected value after
9406 spurious wakeup.
9407 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S:
9408 Release lock before waking up the waiters.
9409 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Correct exit
9410 criteria. Reorderstruct passed to cleanup handler. Fix
9411 handling of cancellation and failung pthread_mutex_unlock call.
9412 Use __pthread_enable_asynccancel_2 instead of
9413 __pthread_enable_asynccancel.
9414 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
9415 Return result of lock re-get if it fails.
9416 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Fix wrong argument
9417 for __pthread_cleanup_push.
9418 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Fix
9419 completely broken rwlock implementation.
9420 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
9421 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
9422 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
9423 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
9424 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
9425 * sysdeps/unix/sysv/linux/sh/sem_post.S: Fix error value. Use
9426 versioned_symbol macro.
9427 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Use versioned_symbol macro.
9428 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
9429
c75d02f0
UD
94302003-03-27 Ulrich Drepper <drepper@redhat.com>
9431
5f5004df
UD
9432 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Don't declare
9433 __timer_helper_thread. Declare __start_helper_thread, __helper_once,
9434 and __helper_tid.
9435 (struct timer): Remove th and bar field.
9436 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Remove
9437 debugging code. Create only one helper thread.
9438 * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Don't kill
9439 helper thread.
9440 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
9441 Renamed. Define statically. Use thread info from siginfo.
9442 (__helper_once): New variable.
9443 (__helper_tid): New variable.
9444 (__reset_helper_control): New function.
9445 (__start_helper_thread): New function.
9446
18d009ca
UD
9447 * pthread_create.c (start_thread): Don't use setjmp inside
9448 __builtin_expect to work around gcc bug.
9449
c75d02f0
UD
9450 * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Even if
9451 timer_delete syscall fails, but not with ENOSYS, set
9452 __no_posix_timers.
9453
9454 * sysdeps/unix/sysv/linux/timer_settime.c [!__ASSUME_POSIX_TIMERS]
9455 (timer_settime): Fix typo.
28cf3058
UD
9456 * sysdeps/unix/sysv/linux/timer_getoverr.c
9457 [!__ASSUME_POSIX_TIMERS] (timer_getoverrun): Likewise.
c75d02f0 9458
049ac259
JJ
94592003-03-27 Jakub Jelinek <jakub@redhat.com>
9460
9461 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Fix
9462 offset of cleanupbuf.__prev.
9463
f93d39dd
JJ
94642003-03-26 Jakub Jelinek <jakub@redhat.com>
9465
9466 * sysdeps/unix/sysv/linux/timer_getoverr.c: Fix typo in name
9467 of included file.
9468
f064e4c5
UD
94692003-03-26 Ulrich Drepper <drepper@redhat.com>
9470
9471 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): If EVP ==
9472 NULL provide default definition to syscall.
9473
83e886a3
RM
94742003-03-25 Roland McGrath <roland@redhat.com>
9475
9476 * sysdeps/pthread/posix-timer.h (TIMER_MAX): Define if not defined.
9477 (timer_id2ptr): Fix typo.
9478
09402f5b
UD
94792003-03-25 Ulrich Drepper <drepper@redhat.com>
9480
9481 * pthreadP.h: Define SIGCANCEL and SIGTIMER.
9482 * sysdeps/i386/pthreaddef.h: Remove SIGCANCEL definition.
9483 * sysdeps/ia64/pthreaddef.h: Likewise.
9484 * sysdeps/powerpc/pthreaddef.h: Likewise.
9485 * sysdeps/s390/pthreaddef.h: Likewise.
9486 * sysdeps/sh/pthreaddef.h: Likewise.
9487 * sysdeps/x86_64/pthreaddef.h: Likewise.
9488 * init.c (__pthread_initialize_minimal): Block SIGTIMER.
9489 * sysdeps/pthread/sigaction.c: Also prevent SIGTIMER handler from
9490 being changed.
9491 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
9492 SIGTIMER is not unblocked.
9493 * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): One more
9494 RT signal taken.
9495 * sysdeps/unix/sysv/linux/pthread_kill.c: Do not allow SIGTIMER to
9496 be send.
9497 * sysdeps/pthread/posix-timer.h (timer_id2ptr, timer_ptr2id): Just
9498 pass pointer through as ID.
9499 * sysdeps/unix/sysv/linux/bits/local_lim.h (TIMER_MAX): Removed.
9500 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: New file.
9501 * sysdeps/unix/sysv/linux/timer_create.c: New file.
9502 * sysdeps/unix/sysv/linux/timer_delete.c: New file.
9503 * sysdeps/unix/sysv/linux/timer_getoverr.c: New file.
9504 * sysdeps/unix/sysv/linux/timer_gettime.c: New file.
9505 * sysdeps/unix/sysv/linux/timer_routines.c: New file.
9506 * sysdeps/unix/sysv/linux/timer_settime.c: New file.
9507 * sysdeps/unix/sysv/linux/ia64/Versions: New file.
9508 * sysdeps/unix/sysv/linux/ia64/timer_create.c: New file.
9509 * sysdeps/unix/sysv/linux/ia64/timer_delete.c: New file.
9510 * sysdeps/unix/sysv/linux/ia64/timer_getoverr.c: New file.
9511 * sysdeps/unix/sysv/linux/ia64/timer_gettime.c: New file.
9512 * sysdeps/unix/sysv/linux/ia64/timer_settime.c: New file.
9513 * sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions: New file.
9514 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_create.c: New file.
9515 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_delete.c: New file.
9516 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_getoverr.c: New file.
9517 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_gettime.c: New file.
9518 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_settime.c: New file.
9519 * sysdeps/unix/sysv/linux/s390/s390-64/Versions: New file.
9520 * sysdeps/unix/sysv/linux/s390/s390-64/timer_create.c: New file.
9521 * sysdeps/unix/sysv/linux/s390/s390-64/timer_delete.c: New file.
9522 * sysdeps/unix/sysv/linux/s390/s390-64/timer_getoverr.c: New file.
9523 * sysdeps/unix/sysv/linux/s390/s390-64/timer_gettime.c: New file.
9524 * sysdeps/unix/sysv/linux/s390/s390-64/timer_settime.c: New file.
9525 * sysdeps/unix/sysv/linux/x86_64/Versions: New file.
9526 * sysdeps/unix/sysv/linux/x86_64/compat-timer.h: New file.
9527 * sysdeps/unix/sysv/linux/x86_64/timer_create.c: New file.
9528 * sysdeps/unix/sysv/linux/x86_64/timer_delete.c: New file.
9529 * sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c: New file.
9530 * sysdeps/unix/sysv/linux/x86_64/timer_gettime.c: New file.
9531 * sysdeps/unix/sysv/linux/x86_64/timer_settime.c: New file.
9532
9533 * pthreadP.h: Remove FRAME_LEFT definition.
9534 * cleanup.c (_pthread_cleanup_push): Don't check for reference to
9535 already left frame. Programs which have this problem are not POSIX
9536 compliant.
9537 * cleanup_defer.c (_pthread_cleanup_push_defer): Likewise.
9538
5e826ab5
UD
95392003-03-24 Ulrich Drepper <drepper@redhat.com>
9540
9541 * sysdeps/pthread/tst-timer.c: Check return values of the
9542 functions we test.
9543
b910f788
RM
95442003-03-23 Roland McGrath <roland@redhat.com>
9545
3045a1fe
RM
9546 * tst-tls3.c (do_test) [! HAVE___THREAD]: Don't test anything.
9547 * tst-tls3mod.c: Likewise.
9548 * tst-tls1.c: Likewise.
9549 * tst-tls2.c: Likewise.
9550
85047fe3
RM
9551 * tst-mutex5.c (do_test): Unlock before destroy, otherwise we invoke
9552 undefined behavior.
9553
b910f788
RM
9554 * tst-join5.c (tf1, tf2): Add a cast.
9555
9556 * Makeconfig (includes): Append -I$(..)nptl to this variable.
9557
9558 * tst-barrier2.c (do_test) [! _POSIX_THREAD_PROCESS_SHARED]:
9559 Don't test anything.
9560 * tst-cond4.c: Likewise.
9561 * tst-cond6.c: Likewise.
9562 * tst-flock2.c: Likewise.
9563 * tst-mutex4.c: Likewise.
9564 * tst-rwlock4.c: Likewise.
9565 * tst-signal1.c: Likewise.
9566 * tst-spin2.c: Likewise.
9567 * tst-cond11.c [! _POSIX_CLOCK_SELECTION]: Likewise.
9568
9569 * tst-mutex4.c: Use test-skeleton.c.
9570 * tst-spin2.c: Likewise.
9571 * tst-sysconf.c: Likewise.
9572 * tst-barrier2.c: Likewise.
9573 * tst-cond4.c: Likewise.
9574 * tst-cond6.c: Likewise.
9575 * tst-rwlock4.c: Likewise.
9576 * tst-unload.c: Likewise.
9577 * tst-flock2.c (do_test): Use return instead of exit.
9578
4baa087a
RM
95792003-03-22 Jakub Jelinek <jakub@redhat.com>
9580
9581 * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
9582
5a3ab2fc
UD
95832003-03-21 Ulrich Drepper <drepper@redhat.com>
9584
9f07eae2
UD
9585 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
9586 (__lll_mutex_trylock): Use atomic_compare_and_exchange_val_acq
9587 instead of __lll_compare_and_swap.
9588 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
9589 Likewise.
9590 Removed definition if __lll_compare_and_swap.
9591
5a3ab2fc
UD
9592 * cancellation.c: Adjust for new form of compare&exchange macros.
9593 * cleanup_defer.c: Likewise.
9594 * init.c: Likewise.
9595 * libc-cancellation.c: Likewise.
9596 * old_pthread_cond_broadcast.c: Likewise.
9597 * old_pthread_cond_signal.c: Likewise.
9598 * old_pthread_cond_timedwait.c: Likewise.
9599 * old_pthread_cond_wait.c: Likewise.
9600 * pthread_cancel.c: Likewise.
9601 * pthread_create.c: Likewise.
9602 * pthread_detach.c: Likewise.
9603 * pthread_join.c: Likewise.
9604 * pthread_key_delete.c: Likewise.
9605 * pthread_setcancelstate.c: Likewise.
9606 * pthread_setcanceltype.c: Likewise.
9607 * pthread_timedjoin.c: Likewise.
9608 * pthread_tryjoin.c: Likewise.
9609 * sysdeps/pthread/createthread.c: Likewise.
9610
b1aea098
UD
96112003-03-20 Ulrich Drepper <drepper@redhat.com>
9612
9613 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Include <atomic.h>.
4baa087a 9614 Remove __lll_add, __lll_dec_if_positive, and __lll_test_and_set
b1aea098
UD
9615 definitions. Replace uses with calls to atomic_* functions.
9616 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
9617 * sysdeps/unix/sysv/linux/lowlevellock.c: Replace __lll_add and
9618 __lll_test_and_set calls with atomic_exchange_and_add and
9619 atomic_exchange calls respectively.
9620 * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
9621 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
9622 * sysdeps/unix/sysv/linux/sem_trywait.c: Likewise.
9623 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
9624 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Likewise.
9625 * sysdeps/unix/sysv/linux/ia64/sem_port.c: Likewise.
9626 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
9627
9628 * allocatestack.c (allocate_stack): Assume atomic_exchange_and_add
9629 returns the old value.
9630
100a7100
RM
96312003-03-20 Martin Schwidefsky <sky@mschwid3.boeblingen.de.ibm.com>
9632
9633 * sysdeps/s390/pthread_spin_lock.c (pthread_spin_lock): Use type
9634 int for variable OLDVAL and correct inline assembler contraint.
9635 * sysdeps/s390/pthread_spin_trylock.c (pthread_spin_trylock): Use
9636 type int for variable OLD.
9637
9638 * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it
9639 only for s390-32.
9640 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
9641 (SINGLE_THREAD_P): Use global variable __local_multiple_threads
9642 instead of multiple_threads field in the TCB.
9643
95767b36
UD
96442003-03-19 Ulrich Drepper <drepper@redhat.com>
9645
4009bf40
UD
9646 * sysdeps/i386/i686/bits/atomic.h: Removed.
9647 * sysdeps/i386/i586/bits/atomic.h: Removed.
9648 * sysdeps/i386/i486/bits/atomic.h: Removed. Moved to glibc.
9649 * sysdeps/x86_64/bits/atomic.h: Removed. Moved to glibc.
9650 * sysdeps/s390/bits/atomic.h: Removed. Moved to glibc.
9651 * sysdeps/sh/bits/atomic.h: Removed. Moved to glibc.
9652 * sysdeps/ia64/bits/atomic.h: Removed. Moved to glibc.
9653 * sysdeps/powerpc/bits/atomic.h: Removed. Moved to glibc.
9654 * atomic.h: Removed. Moved to glibc.
9655
560a784f
UD
9656 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Add
9657 support for clock selection.
9658
95767b36
UD
9659 * sysdeps/pthread/pthread_cond_broadcast.c: Release lock before
9660 signalling waiters.
9661
043ad426
RM
96622003-03-18 Roland McGrath <roland@redhat.com>
9663
94659495
RM
9664 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
9665 Add __lll_rel_instr first. Add memory clobber.
9666 (lll_mutex_unlock): Use __lll_test_and_set.
9667 From Paul Mackerras <paulus@samba.org>.
9668
9669 * sysdeps/powerpc/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define
9670 unconditionally.
9671 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
9672 (SINGLE_THREAD_P): Add `header.' prefix.
9673 From Paul Mackerras <paulus@samba.org>.
9674
043ad426
RM
9675 * Versions (libpthread: GLIBC_2.3.2): Move pthread_tryjoin_np and
9676 pthread_timedjoin_np to ...
9677 (libpthread: GLIBC_2.3.3): ... here.
9678 (libpthread: GLIBC_2.2): Move pthread_barrierattr_getpshared there too.
9679
9680 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
9681 Avoid shadowing VAL variable.
9682
9683 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
9684 New macro.
9685
86a9ee5e
UD
96862003-03-18 Ulrich Drepper <drepper@redhat.com>
9687
ac9e0aa1
UD
9688 * Makefile (tests): Add tst-cond11.
9689 * tst-cond11.c: New file.
9690
a14b373c
UD
9691 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Reorder
9692 struct passed to cleanup handler to eliminate one more
9693 instruction.
9694 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9695
24a49f38
UD
9696 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
9697 (pthrad_cond_t): Replace __unused field with __clock.
9698
9699 * sysdeps/pthread/pthread_cond_wait.c: Release condvar lock before
9700 waken all waiters in cleanup handler.
9701 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
9702 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
9703
86a9ee5e
UD
9704 * pthread_condattr_getclock.c: New file.
9705 * pthread_condattr_setclock.c: New file.
9706 * sysdeps/pthread/pthread.h: Declare these new functions.
9707 * Versions [GLIBC_2.3.3] (libpthread): Add the new functions.
9708 * Makefile (libpthread-routines): Add the new functions.
9709 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_condattr):
9710 Renamed field to value. Document use of the bits.
9711 * pthread_condattr_getpshared.c: Adjust for struct pthread_condattr
9712 change.
9713 * pthread_condattr_setpshared.c: Likewise.
d5cb8389 9714 * pthread_cond_init.c (__pthread_cond_init): Initialized __clock field.
86a9ee5e
UD
9715 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add cond_clock symbol.
9716 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
9717 Add __clock field.
9718 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
9719 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
9720 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
9721 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
9722 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
9723 Implement clock selection.
9724 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
9725 * pthread-errnos.sym: Add ENOSYS.
9726 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
9727 _POSIX_CLOCK_SELECTION.
9728 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
9729
9730 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Remove
9731 invalid .size directive.
9732
98054a05
RM
97332003-03-17 Roland McGrath <roland@redhat.com>
9734
9735 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
9736 Formatting tweaks.
9737
001bea71
UD
97382003-03-17 Ulrich Drepper <drepper@redhat.com>
9739
4773086e
UD
9740 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Use __builtin_expect.
9741 Use __lll_add instead of spelling it out. Use protected symbol names.
9742 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Use __builtin_expect.
9743 Use __lll_add.
9744 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_compare_and_swap):
9745 Renamed from lll_compare_and_swap. Use new name where necessary.
9746 (__lll_add): Defined.
9747 (__lll_dec_if_positive): Defined.
9748 (__lll_test_and_set): Defined.
9749 * sysdeps/ia64/pthread_spin_init.c: Removed.
9750 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Removed.
9751 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Removed.
9752 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Removed.
9753 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Removed.
9754 * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: Removed.
9755 * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: Removed.
9756 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Removed.
001bea71
UD
9757 * sysdeps/ia64/bits/atomic.h: Add __builtin_expect where appropriate.
9758 * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
9759 __sync_lock_release_si.
9760 Patch by Jakub Jelinek.
9761
9762 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
9763 Fix timeout handling.
9764 (__lll_timedwait_tid): Likewise.
9765 (lll_unlock_wake_cb): Wake up other waiters if necessary.
9766 Patch by Jakub Jelinek.
9767
9768 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Pretty printing.
9769
de4471dd
RM
97702003-03-17 Roland McGrath <roland@redhat.com>
9771
9772 PowerPC port contributed by Paul Mackerras <paulus@samba.org>.
9773 * sysdeps/pthread/pthread_spin_init.c: New file.
9774 * sysdeps/pthread/pthread_spin_unlock.c: New file.
9775 * sysdeps/powerpc/Makefile: New file.
9776 * sysdeps/powerpc/pthread_spin_lock.c: New file.
9777 * sysdeps/powerpc/pthread_spin_trylock.c: New file.
9778 * sysdeps/powerpc/pthreaddef.h: New file.
9779 * sysdeps/powerpc/tcb-offsets.sym: New file.
9780 * sysdeps/powerpc/td_ta_map_lwp2thr.c: New file.
9781 * sysdeps/powerpc/tls.h: New file.
9782 * sysdeps/powerpc/bits/atomic.h: New file.
9783 * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: New file.
9784 * sysdeps/unix/sysv/linux/libc-lowlevellock.c: New file.
9785 * sysdeps/unix/sysv/linux/lowlevellock.c: New file.
98054a05 9786
de4471dd
RM
9787 * sysdeps/unix/sysv/linux/lowlevelmutex.c: New file.
9788 * sysdeps/unix/sysv/linux/sem_post.c: New file.
9789 * sysdeps/unix/sysv/linux/sem_timedwait.c: New file.
9790 * sysdeps/unix/sysv/linux/sem_trywait.c: New file.
9791 * sysdeps/unix/sysv/linux/sem_wait.c: New file.
9792 * sysdeps/unix/sysv/linux/powerpc/Makefile: New file.
9793 * sysdeps/unix/sysv/linux/powerpc/createthread.c: New file.
9794 * sysdeps/unix/sysv/linux/powerpc/fork.c: New file.
9795 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: New file.
9796 * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: New file.
9797 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: New file.
9798 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: New file.
9799 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: New file.
9800 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
9801 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New file.
9802
9803 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Use __gettimeofday,
9804 not gettimeofday.
9805 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Likewise.
9806 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
9807 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Likewise.
9808 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Likewise.
9809 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
9810
5778033f
UD
98112003-03-17 Ulrich Drepper <drepper@redhat.com>
9812
9813 * sysdeps/pthread/pthread_cond_wait.c: Correct exit criteria.
9814 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
9815 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9816 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
9817 Patch by Ewald Snel <ewald@rambo.its.tudelft.nl>.
9818
796038f8
RM
98192003-03-16 Roland McGrath <roland@redhat.com>
9820
9821 * tst-fork4.c: Include <string.h>.
9822 * tst-signal2.c: Likewise.
9823 * tst-mutex5.c (do_test): exit -> return.
9824 * tst-mutex2.c: Include <stdlib.h>.
9825
51d0678c
UD
98262003-03-16 Ulrich Drepper <drepper@redhat.com>
9827
5778033f
UD
9828 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
9829 (__lll_mutex_timedlock_wait): Correct expected value after
9830 spurious wakeup. Otherwise we would never wait again.
9831
b6e2f87a
UD
9832 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Work around red
9833 zone versus inline asm stupidity. Use correct instructions.
9834
51d0678c
UD
9835 * tst-rwlock6.c: Add some more status output.
9836
8112cc70
RM
98372003-03-15 Roland McGrath <roland@redhat.com>
9838
9839 * sysdeps/pthread/configure.in: New file.
9840 * sysdeps/pthread/configure: New file (generated).
9841
49773c19
UD
98422003-03-15 Ulrich Drepper <drepper@redhat.com>
9843
9844 * allocatestack.c (allocate_stack): Store the exact stack size of
9845 user allocated stacks.
9846
eec0ca9f
JJ
98472003-03-15 Jakub Jelinek <jakub@redhat.com>
9848
9849 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
9850 (SINGLE_THREAD): Use `header' prefix instead of `header.data'.
9851 * sysdeps/sh/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
9852 * sysdeps/sh/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define.
9853 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
9854 Use `header.' prefix.
9855 * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
9856
a87731e2
UD
98572003-03-15 Ulrich Drepper <drepper@redhat.com>
9858
9859 * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Don't use
9860 __builtin_frame_address, use stack pointer.
9861
9862 * sysdeps/unix/sysv/linux/jmp-unwind.c: Use CURRENT_STACK_FRAME
9863 instead of __builtin_frame_pointer.
9864
e22a221d
UD
98652003-03-14 Ulrich Drepper <drepper@redhat.com>
9866
92ed3daf
UD
9867 * tst-basic1.c (do_test): Add cast to avoid warning.
9868 * tst-basic2.c (do_test): Likewise.
9869
9b89567d
UD
9870 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use correct
9871 amount of stack correction.
9872
e22a221d
UD
9873 * tst-fork4.c: Use test-skeleton.c.
9874
2e49caba
RM
98752003-03-14 Roland McGrath <roland@redhat.com>
9876
9877 * init.c: Fix typo "#eli" for "#else".
9878
415ef7d8
RM
98792003-03-14 Steven Munroe <sjmunroe@us.ibm.com>
9880
9881 * allocatestack.c (__stack_user): Use hidden_data_def.
9882 * pthread_create.c (__pthread_keys): Likewise.
9883
9884 * init.c [__powerpc__] (__NR_set_tid_address): Define it.
9885
52287505
RM
98862003-03-14 Roland McGrath <roland@redhat.com>
9887
415ef7d8
RM
9888 * tst-fork4.c: New file.
9889 * Makefile (tests): Add it.
9890
52287505
RM
9891 * descr.h (struct pthread): Move the union out of [!TLS_DTV_AT_TP], so
9892 we always define the padding space.
9893 [!TLS_DTV_AT_TP]: Give tcbhead_t field a name, `header', since GCC
9894 stopped supporting its own extensions fully.
9895 [TLS_MULTIPLE_THREADS_IN_TCB]: Put `multiple_threads' inside a wrapper
9896 struct also called `header', so `header.multiple_threads' is the field
9897 name to use on all machines.
9898 * allocatestack.c (allocate_stack): Use `header.' prefix.
9899 * sysdeps/pthread/createthread.c (create_thread): Likewise.
9900 * pthread_create.c (__pthread_create_2_1): Likewise.
9901 * sysdeps/i386/tls.h (INSTALL_NEW_DTV, THREAD_DTV): Likewise.
9902 (THREAD_SELF): Likewise.
9903 * sysdeps/x86_64/tls.h: Likewise.
9904 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
9905 (SINGLE_THREAD_P): Likewise.
9906 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
9907 (SINGLE_THREAD_P): Likewise.
9908 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
9909 (SINGLE_THREAD_P): Likewise.
9910
9911 * sysdeps/s390/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Use REGS[18]
9912 value directly.
9913
c44bf9aa
UD
99142003-03-14 Ulrich Drepper <drepper@redhat.com>
9915
e22a221d
UD
9916 * pthread_create.c (start_thread): Use CALL_THREAD_FCT if defined.
9917 * sysdeps/i386/tls.h: Define CALL_THREAD_FCT.
9918
0eb18281
UD
9919 * pthread_create.c (start_thread): setjmp is expected to return 0.
9920
c44bf9aa
UD
9921 * sysdeps/x86_64/tls.h (THREAD_GETMEM): Mark asms volatile.
9922 (THREAD_GETMEM_NC): Likewise.
9923
564cd8b6
UD
99242003-03-13 Ulrich Drepper <drepper@redhat.com>
9925
9926 * allocatestack.c (allocate_stack): If MULTI_PAGE_ALIASING is defined
9927 and the size of the stack which must be allocated is a multiple,
9928 allocate one more page.
9929 * sysdeps/i386/i686/Makefile: Don't define COLORING_INCREMENT, but
9930 MULTI_PAGE_ALIASING.
9931
6461e577
RM
99322003-03-13 Roland McGrath <roland@redhat.com>
9933
9934 * pthread_create.c (start_thread): Set EXITING_BIT after the
9935 event-reporting (and destructors), not before.
9936
b5ec5617
UD
99372003-03-13 Jakub Jelinek <jakub@redhat.com>
9938
6461e577
RM
9939 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_timed_wait,
9940 lll_futex_wake): Declare register variables as long int instead of
9941 unsigned long int. Patch by Ian Wienand <ianw@gelato.unsw.edu.au>.
9942 Make syscall arguments clobbered by the syscall.
9943 (lll_futex_wait): Define using lll_futex_timed_wait.
9944
9945 * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Cast regs[13]
9946 to void *.
9947
9948 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Only declare and set
9949 PPID if [! NDEBUG].
9950
9951 * allocatestack.c (nptl_ncreated): Only declare if
9952 COLORING_INCREMENT != 0.
9953
9954 * pthreadP.h (__pthread_enable_asynccancel_2): New prototype.
9955 (__libc_enable_asynccancel_2): Remove prototype.
9956
b5ec5617
UD
9957 * sysdeps/unix/sysv/linux/ia64/fork.c (ARCH_FORK): Swap ptid and
9958 ctid to match kernel.
9959
d0369fb8
UD
99602003-03-12 Ulrich Drepper <drepper@redhat.com>
9961
7588880f
UD
9962 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add
9963 libc_multiple_threads.
9964 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Move definition of
9965 __libc_multiple_threads to...
9966 * sysdeps/unix/sysv/linux/libc_multiple_threads.c: ...here. New file.
9967
9968 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Remove unnecessary
9969 versioning.
9970 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
9971 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
9972
9973 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
9974 (__pthread_once_internal): Define.
9975
9976 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Use shlib-compat.h
9977 macros instead of .symver directly.
9978 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
9979 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
9980
d0369fb8
UD
9981 * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Include tcb-offsets.h.
9982 * sysdeps/x86_64/tcb-offsets.sym: New file.
9983 * sysdeps/x86_64/Makefile: New file.
9984
9985 * sysdeps/i386/tcb-offsets.sym: Add SELF.
9986 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use SELF
9987 to access own pthread_t in TCB.
9988 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
9989 Likewise.
9990 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
9991 Likewise.
9992 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
9993
0bb2ac85
RM
99942003-03-12 Roland McGrath <roland@redhat.com>
9995
9996 * pthread-errnos.sym: New file.
9997 * Makefile (gen-as-const-headers): New variable, list that file.
9998 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include generated
9999 header <pthread-errnos.h> instead of defining errno values here.
10000 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
10001 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
10002 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
10003 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
10004 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
10005 Likewise.
10006 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
10007 Likewise.
10008 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
10009 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10010 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
10011 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
10012 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
10013 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
10014 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
10015 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
10016 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
10017 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
10018 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
10019 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
10020 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
10021 * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
10022 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
10023 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
10024 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
10025 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
10026 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
10027 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
10028 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
10029 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
10030 * sysdeps/i386/i486/pthread_spin_trylock.S: Likewise.
10031 * sysdeps/x86_64/pthread_spin_trylock.S: Likewise.
10032 * sysdeps/sh/pthread_spin_trylock.S: Likewise.
10033 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
10034 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
10035
10036 * sysdeps/unix/sysv/linux/fork.c: Add an assert to check that
10037 CLONE_CHILD_SETTID worked.
10038
35e148cb
UD
100392003-03-12 Ulrich Drepper <drepper@redhat.com>
10040
d0369fb8
UD
10041 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: New
10042 file.
10043 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S: New
10044 file.
10045
10046 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
10047 (pthread_cond_t): Add padding.
10048
da49194d
UD
10049 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: New file.
10050 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: New file.
10051 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: New file.
10052
35e148cb
UD
10053 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
10054 (__pthread_rwlock_timedwrlock): Add missing opcode suffix.
10055 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
10056 (__pthread_rwlock_timedrdlock): Likewise.
10057 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
10058 (__pthread_rwlock_wrlock): Likewise.
10059 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
10060 (__pthread_rwlock_rdlock): Likewise.
10061
10062 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: New file.
10063
10064 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Return
10065 result of lock re-get if it fails.
10066
3e976b96
UD
100672003-03-11 Ulrich Drepper <drepper@redhat.com>
10068
5a03acfe
UD
10069 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Fix asm syntax.
10070 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
10071 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
10072 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
10073 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
10074 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
10075 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
10076 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
10077 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
10078 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
10079
10080 * sysdeps/x86_64/tls.h (THREAD_SELF, THREAD_GETMEM, THREAD_GETMEM_NC,
10081 THREAD_SETMEM, THREAD_SETMEM_NC): Correct asm syntax.
10082
10083 * allocatestack.c [! TLS_MULTIPLE_THREADS_IN_TCB] (allocate_stack):
10084 Initialize *__libc_multiple_threads_ptr not __libc_multiple_threads.
10085 * sysdeps/pthread/createthread.c [! TLS_MULTIPLE_THREADS_IN_TCB]
10086 (create_thread): Likewise.
10087 Define __pthread_multiple_threads and __libc_multiple_threads_ptr.
10088 * init.c (__pthread_initialize_minimal_internal): Initialize
10089 __libc_multiple_threads_ptr if necessary.
10090 * pthreadP.h: Adjust prototype for __libc_pthread_init. Declare
10091 __pthread_multiple_threads and __libc_multiple_threads_ptr.
10092 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Define
10093 __libc_multiple_threads.
10094 (__libc_pthread_init): Return pointer to __libc_pthread_init if
10095 necessary.
10096
10097 * sysdeps/i386/tls.h (THREAD_SETMEM): Fix one-byte variant.
10098 (THREAD_SETMEM_NC): Likewise.
10099
10100 * sysdeps/x86_64/pthread_spin_trylock.c: Removed.
10101 * sysdeps/x86_64/pthread_spin_trylock.S: New file.
10102 * sysdeps/x86_64/pthread_spin_unlock.c: Removed.
10103 * sysdeps/x86_64/pthread_spin_unlock.S: New file.
10104
10105 * sysdeps/i386/i486/pthread_spin_trylock.S (pthread_spin_trylock):
10106 Eliminate one entire instruction.
10107
32a589b1
UD
10108 * cancellation.c (__pthread_enable_asynccancel_2): New function.
10109 * pthreadP.h: Declare __pthread_enable_asynccancel_2.
10110 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
10111 (__pthread_cond_timedwait): Use __pthread_enable_asynccancel_2
10112 instead of __pthread_enable_asynccancel.
10113 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
10114 (__pthread_cond_wait): Likewise.
10115 * sysdeps/pthread/pthread_cond_timedwait.c
10116 (__pthread_cond_timedwait): Likewise.
10117 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
10118
3e976b96
UD
10119 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
10120 (__condvar_cleanup): Wake up all waiters in case we got signaled
10121 after being woken up but before disabling asynchronous
10122 cancellation.
10123 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
10124 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
10125 (__condvar_cleanup): Likewise.
10126
10127 * init.c (__NR_set_tid_address): If already defined, don't redefine.
10128 Make it an error if architecture has no #if case. Add x86-64.
10129
10130 * sysdeps/unix/sysv/linux/x86_64/Makefile: Add flags for
10131 pt-initfini.s generation.
10132
10133 * sysdeps/x86_64/tls.h: Include <asm/prctl.h>.
10134 (TLS_INIT_TP): Fix typo.
10135
6c477888
UD
101362003-03-11 Jakub Jelinek <jakub@redhat.com>
10137
10138 * sysdeps/ia64/bits/atomic.h (atomic_exchange_and_add): Swap 2nd and
10139 3rd argument of __arch_compare_and_exchange_{32,64}_val_acq.
10140
10141 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Include semaphore.h.
10142 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
10143 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Likewise.
10144 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Likewise.
10145 * sysdeps/unix/sysv/linux/s390/sem_post.c: Likewise.
10146 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
10147 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
10148 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
10149
ea694823
UD
101502003-03-11 Ulrich Drepper <drepper@redhat.com>
10151
6c477888
UD
10152 * sysdeps/pthread/pthread_cond_timedwait.c
10153 (__pthread_cond_timedwait): Return the result of the final
10154 locking. If it succeeds, the regular function return value.
10155
10156 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait):
10157 Return result of the final locking.
10158 * version.c (__nptl_main): Work around problems with the strange
10159 INTERNAL_SYSCALL macro on ppc32.
10160 * init.c (__pthread_initialize_minimal_internal): Unblock
10161 SIGCANCEL in case the parent blocked it.
10162 Reported by Paul Mackerras <paulus@samba.org>.
10163
ea694823
UD
10164 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: New file.
10165 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: New file.
10166 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: New file.
10167
b33e6163
RM
101682003-03-11 Jakub Jelinek <jakub@redhat.com>
10169
10170 * sysdeps/pthread/pthread_cond_timedwait.c
10171 (__pthread_cond_timedwait): Unlock and fail if
10172 __pthread_mutex_unlock_internal failed.
10173
10174 * sysdeps/pthread/createthread.c (ARCH_CLONE): Define if not defined.
10175 (create_thread): Only assert PD->tcb != NULL under [TLS_TCB_AT_TP].
10176 Use ARCH_CLONE.
10177 * allocatestack.c (ALLOCATE_STACK_PARMS): New macro.
10178 [NEED_SEPARATE_REGISTER_STACK] (STACK_VARIABLES,
10179 STACK_VARIABLES_ARGS, STACK_VARIABLES_PARMS, ALLOCATE_STACK_PARMS,
10180 ALLOCATE_STACK): New macros.
10181 (TLS_TPADJ): New macro.
10182 (get_cached_stack, queue_stack, __deallocate_stack): Use TLS_TPADJ.
10183 (allocate_stack): Handle TLS_DTV_AT_TP and
10184 NEED_SEPARATE_REGISTER_STACK. Use TLS_TPADJ.
10185 * pthread_create.c (__pthread_create_2_1) [! TLS_TCB_AT_TP]:
10186 Don't set PD->self.
10187 * init.c [__ia64__] (__NR_set_tid_address): Define.
10188
10189 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: New file.
10190 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: New file.
10191 * sysdeps/unix/sysv/linux/ia64/fork.c: New file.
10192 * sysdeps/unix/sysv/linux/ia64/createthread.c: New file.
10193 * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: New file.
10194 * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: New file.
10195 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: New file.
10196 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: New file.
10197 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: New file.
10198 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
10199 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: New file.
10200 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: New file.
10201 * sysdeps/unix/sysv/linux/ia64/sem_post.c: New file.
10202 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: New file.
10203 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: New file.
10204 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: New file.
10205 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
10206 * sysdeps/ia64/bits/atomic.h: New file.
10207 * sysdeps/ia64/Makefile: New file.
10208 * sysdeps/ia64/pthread_spin_init.c: New file.
10209 * sysdeps/ia64/pthread_spin_lock.c: New file.
10210 * sysdeps/ia64/pthread_spin_trylock.c: New file.
10211 * sysdeps/ia64/pthread_spin_unlock.c: New file.
10212 * sysdeps/ia64/pthreaddef.h: New file.
10213 * sysdeps/ia64/tcb-offsets.sym: New file.
10214 * sysdeps/ia64/td_ta_map_lwp2thr.c: New file.
10215 * sysdeps/ia64/tls.h: New file.
10216
10217 * sysdeps/s390/pthreaddef.h (__exit_thread_inline): Pass 1 argument
10218 to syscall instead of no arguments.
10219
2b30b2e5
UD
102202003-03-10 Ulrich Drepper <drepper@redhat.com>
10221
db5f2fc9
UD
10222 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: New file.
10223 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: New file.
10224 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: New file.
10225 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: New file.
10226
10227 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Fix error value in
10228 unused code.
10229
6a4263e3
UD
10230 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: New file
10231
3de7c2a9
UD
10232 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
10233 lowlevelbarrier.sym.
10234 * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: New file.
10235 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S:
10236 Include lowlevelbarrier.h and don't define offsets locally.
6a4263e3 10237 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Likewise.
3de7c2a9 10238
2a544d82
UD
10239 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
10240 (__lll_mutex_lock_wait): Reverse order of first two parameters.
10241 (__lll_mutex_timedlock_wait): Likewise.
10242 (lll_mutex_lock): Adjust asm for that.
10243 (lll_mutex_timedlock): Likewise. Mark cx, cc, r10 as clobbered.
10244 (lll_lock): Adjust asm for operand order change.
10245 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: New file.
10246 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: New file.
10247
ec06436c
UD
10248 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_lock_wait):
10249 Reverse order of parameters.
10250 (__lll_timedwait_tid): Remove regparms attribute.
10251 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: New file.
10252 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: New file.
10253
3273832c
UD
10254 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
10255 (__lll_timedwait_tid): Remove one unnecessary instruction.
10256
51f32ab8
UD
10257 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Define
10258 __lll_mutex_timedlock_wait only for NOT_IN_libc.
10259 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Include
10260 lowlevelmutex.S.
10261
10262 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
10263 lll_unlock_wake_cb, __lll_wait_tid, and __lll_timedwait_tid only
10264 for NOT_IN_libc.
10265 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Include
10266 lowlevellock.S.
10267
fad48d9e
UD
10268 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Don't define
10269 LOCK is already defined. Don't define __lll_mutex_timedlock_wait
10270 for libc.so.
10271 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Only
10272 define LOCK here (if UP is not defined). The actual code is in
10273 lowlevelmutex.S.
10274
9356d063
UD
10275 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Don't define
10276 LOCK is already defined. Don't define lll_unlock_wake_cb and
10277 __lll_timedwait_tid for libc.so.
10278 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Only
10279 define LOCK here (if UP is not defined). The actual code is in
10280 lowlevellock.S.
10281
ebf0cbc5 10282 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Not needed anymore.
106f6f9d
UD
10283 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: Likewise.
10284 * sysdeps/unix/sysv/linux/s390/sem_post.c: Include lowlevellock.h
10285 instead of lowlevelsem.h.
10286 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
10287 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
10288 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
0be8ee21 10289
c915e5ad
UD
10290 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
10291 lowlevelrwlock.sym.
10292 * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: New file.
10293 * sysdeps/unix/sysv/linux/i386/lowlevelrwlock.h: Removed.
146fa1ee 10294 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: Removed.
c915e5ad 10295
4c3c2e8a
UD
10296 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_trylock): Fix
10297 register loading.
10298 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_trylock): Undo
10299 last changed. D'oh.
10300
2b30b2e5
UD
10301 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: New file.
10302
10303 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove declaration
10304 of __libc_locking_needed.
10305 (lll_trylock): Initialize %eax to zero.
10306
2b30b2e5
UD
10307 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Update
10308 pthread_cond_t definition.
10309
e48f9638
RM
103102003-03-10 Roland McGrath <roland@redhat.com>
10311
10312 * sysdeps/unix/sysv/linux/lowlevelcond.sym: New file.
10313 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add it.
10314 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: File removed.
10315 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: Likewise.
10316 * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: Likewise.
10317
10318 * allocatestack.c (allocate_stack) [!TLS_MULTIPLE_THREADS_IN_TCB]:
10319 Instead of setting PD->multiple_threads, set globals
10320 __pthread_multiple_threads and __libc_multiple_threads.
10321 * sysdeps/pthread/createthread.c (create_thread): Likewise.
10322 * sysdeps/i386/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it.
10323 * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Likewise.
10324
10325 * descr.h (struct pthread): Conditionalize first member on
10326 [!TLS_DTV_AT_TP]. Replace the `header' member with an anonymous union
10327 containing an anonymous tcbhead_t. Move `list' member out.
10328 [TLS_MULTIPLE_THREADS_IN_TCB]: Define a `multiple_threads' member.
10329 * allocatestack.c: Remove use of `header.data.' prefix.
10330 * pthread_create.c: Likewise.
10331 * init.c (__pthread_initialize_minimal_internal): Likewise.
10332 * sysdeps/pthread/createthread.c (create_thread): Likewise.
10333 * sysdeps/i386/tls.h (INSTALL_DTV): Add parens.
10334 (THREAD_SELF, THREAD_DTV, INSTALL_NEW_DTV): No `header.data.' prefix.
10335 * sysdeps/x86_64/tls.h: Likewise.
10336 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
10337 (SINGLE_THREAD_P): Likewise.
10338 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
10339 (SINGLE_THREAD_P): Likewise.
10340 * sysdeps/i386/tls.h (tcbhead_t): Remove `list' member.
10341 * sysdeps/s390/tls.h (tcbhead_t): Likewise.
10342
c37cae9e
UD
103432003-03-09 Ulrich Drepper <drepper@redhat.com>
10344
d38c777e
RM
10345 * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: New file.
10346
7b44a5e0 10347 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
2b30b2e5 10348 * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
7b44a5e0 10349
c2e5e085
UD
10350 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix many
10351 leftovers from the ia32 code.
10352
10353 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Remove unneccessary
10354 memory load.
10355 (clear_once_control): Don't load %esi.
10356
10357 * sysdeps/x86_64/tls.h: Remove all traces of segment descriptor
10358 handling.
10359
10360 * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
10361
cd4b2a55
UD
10362 * sysdeps/unix/sysv/linux/s390/createthread.c: Moved to...
10363 * sysdeps/unix/sysv/linux/createthread.c: ...here.
10364
c37cae9e
UD
10365 * Makefile (tests): Add tst-cond10.
10366 * tst-cond10.c: New file.
10367
d130a341
UD
103682003-03-08 Ulrich Drepper <drepper@redhat.com>
10369
ccf1d573
UD
10370 * tst-tls2.c (do_test): Add TEMP_FAILURE_RETRY around sem_wait call.
10371 * tst-signal3.c (do_test): Likewise.
10372 * tst-sem5.c (do_test): Likewise.
10373 * tst-kill6.c (do_test): Likewise.
10374 * tst-tls3.c (do_test): Likewise. Include <errno.h>.
10375
10376 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use add/sub instead
10377 of inc/dec.
10378 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
10379 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise
10380 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
10381 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
10382 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
10383 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
10384 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
10385 Likewise.
10386 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
10387 Likewise.
10388 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
10389 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
10390 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10391 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
10392 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
10393 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
10394 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
10395 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
10396
d130a341
UD
10397 * allocatestack.c (allocate_stack): If mprotect() fails free the
10398 TLS memory.
10399
bc6389ad
UD
104002003-03-07 Ulrich Drepper <drepper@redhat.com>
10401
41d4d223
UD
10402 * sysdeps/i386/i486/bits/atomic.h: Fix a few unused definitions.
10403
10404 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove all trace of
10405 lll_wake_tid. This was used only to work around kernel limits in
10406 the early days.
10407 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
10408 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Likewise.
10409 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
10410 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
10411
bc6389ad
UD
10412 * init.c (__static_tls_align_m1): Renamed from __static_tls_align.
10413 (__pthread_initialize_minimal_internal): Change initialization of
10414 __static_tls_align_m1 appropriately.
10415 * pthreadP.h (__static_tls_align_m1): Renamed from
10416 __static_tls_align.
10417 * allocatestack.c (allocate_stack): Use __static_tls_align_m1
10418 instead of __static_tls_align-1.
10419
cc775edf
UD
104202003-03-04 Ulrich Drepper <drepper@redhat.com>
10421
0de28d5c 10422 * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
6245b6ae 10423
518b5308
UD
10424 * pthread_create.c: Define __pthread_keys using nocommon
10425 attribute, not by placing it explicitly in bss.
10426 Remove DEFINE_DEALLOC definition. Not needed anymore.
10427
10428 * allocatestack.c: Define ARCH_MAP_FLAGS if not already defined.
10429 Use it in mmap call to allocate stacks.
10430
10431 * sysdeps/pthread/createthread.c (create_thread): Fix comment.
10432
cc775edf
UD
10433 * pthread_create.c (start_thread): Use THREAD_SETMEM to store
10434 result of the thread function.
10435
4f6f0a8f
UD
104362003-03-03 Ulrich Drepper <drepper@redhat.com>
10437
f04a2721
UD
10438 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: Removed. The generic
10439 version is just fine.
10440
4f6f0a8f
UD
10441 * sysdeps/unix/sysv/linux/libc_pthread_init.c
10442 (__pthread_child_handler): Renamed from pthread_child_handler,
10443 exported, and marked hidden. Change all users.
10444 * sysdeps/unix/sysv/linux/register-atfork.c (free_mem): Do not
10445 free __pthread_child_handler from child list.
10446
7ce5c164
UD
104472003-03-03 Martin Schwidefsky <schwidefsky@de.ibm.com>
10448
10449 * atomic.h (atomic_exchange_and_add): Return newval, not oldval.
10450
10451 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
10452 Fix handling of cancellation and failing pthread_mutex_unlock call.
10453 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
10454 (__pthread_cond_wait): Likewise.
10455
10456 * sysdeps/pthread/pthread_rwlock_timedrdlock.c
10457 (pthread_rwlock_timedrdlock): Fix clobber of result variable by
10458 lll_futex_timed_wait call.
10459 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
10460 (pthread_rwlock_timedwrlock): Likewise.
10461
10462 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
10463 Don't define lll_unlock_wake_cb and ___lll_timedwait_tid in libc.so.
10464 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Remove XXX comments.
10465
10466 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Fix
10467 check of lll_futex_wake return value.
10468
ea6a015b
RM
104692003-03-03 Roland McGrath <roland@redhat.com>
10470
10471 * forward.c: Fix typo in __pthread_attr_init_2_0 compat_symbol decl.
10472
10473 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
10474 Argument to ptr___pthread_cleanup_upto is __jmp_buf, not jmp_buf.
10475 * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
10476
4adacf57
UD
104772003-03-02 Ulrich Drepper <drepper@redhat.com>
10478
1be3d664
UD
10479 * sysdeps/pthread/timer_create.c (timer_create): Return correct
10480 error for CPU clocks.
10481
885bafa1
UD
10482 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
10483 _POSIX_MONOTONIC_CLOCK.
10484 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
10485
4adacf57
UD
10486 * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
10487 recent kernels.
10488
86bfff4d
UD
104892003-03-01 Ulrich Drepper <drepper@redhat.com>
10490
10491 * descr.h (struct pthread): Move cleanup field to the front.
10492
d1149385
RM
104932003-03-01 Roland McGrath <roland@redhat.com>
10494
10495 * sem_open.c (sem_open): Braino fix.
10496
bd8bb78b
UD
104972003-03-01 Ulrich Drepper <drepper@redhat.com>
10498
748bec08
UD
10499 * sysdeps/i386/tcb-offsets.sym: Add CLEANUP and CLEANUP_PREV.
10500 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Inline
10501 __pthread_cleanup_pop functionality.
10502 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10503
bd8bb78b
UD
10504 * descr.h (struct pthread): Move tid field to the front now that
10505 it is often used.
10506
10507 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S
10508 (__lll_mutex_timedlock_wait): Remove.
10509 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
10510 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
10511 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
10512 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
10513 (lll_unlock_wake_cb): Don't save and restore %esi.
10514 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
10515 %esi.
10516 (__lll_timedwait_tid): Add alignment.
10517 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
10518 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
10519 %esi.
10520 (__lll_timedwait_tid): Removed.
10521 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
10522 (__pthread_cond_broadcast): Don't save, load, and restore %esi.
10523 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
10524 (pthread_barrier_wait): Don't save, load, and restore %esi for
10525 last thread.
10526 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
10527 (__pthread_cond_signal): Don't save, load, and restore %esi.
10528 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
10529 (__pthread_rwlock_unlock): Don't save, load, and restore %esi.
10530 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
10531 Don't save, load, and restore %esi.
10532
d2637c70
UD
105332003-02-27 Ulrich Drepper <drepper@redhat.com>
10534
567fb22a
UD
10535 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
10536 Release lock before waking up the waiters.
10537
427f5fa1
UD
10538 * tst-exit1.c (do_test): Don't start more than one thread in parallel.
10539
a2d83cfb
UD
10540 * tst-rwlock9.c (writer_thread): Correct adding TIMEOUT.
10541 (reader_thread): Likewise.
10542
d2637c70
UD
10543 * sysdeps/pthread/pthread_rwlock_unlock.c
10544 (__pthread_rwlock_unlock): Release internal lock early. Don't try
10545 to wake up readers if there are none.
10546
10547 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
10548 Release internal lock before wake threads.
10549
b1531183
UD
105502003-02-26 Ulrich Drepper <drepper@redhat.com>
10551
dbf6131c
UD
10552 * Makefile (tests): Add tst-rwlock10 and tst-rwlock11.
10553 * tst-rwlock8.c: Initialize lock with INIT. Allow INIT to be
10554 predefined.
10555 * tst-rwlock9.c: Likewise.
10556 * tst-rwlock10.c: New file.
10557 * tst-rwlock11.c: New file.
10558
695799fe
UD
10559 * Makefile (tests): Add tst-dlsym1.
10560 * tst-dlsym1.c: New file.
10561
b1531183
UD
10562 * init.c (__pthread_initialize_minimal_internal): Set
10563 GL(dl_error_catch_tsd) to __libc_dl_error_tsd.
10564 * Versions (libc:GLIBC_PRIVATE): Export __libc_dl_error_tsd.
10565
3724f268
UD
105662003-02-24 Ulrich Drepper <drepper@redhat.com>
10567
3857ca78
UD
10568 * sem_open.c (sem_open): Fix handling of O_CREAT without O_EXCL.
10569
80d80779
UD
10570 * tst-cond2.c: Fix sychronization with child.
10571
86371308
UD
10572 * tst-rwlock8.c (reader_thread): Remove unused variable.
10573
ffeb4481
UD
10574 * Makefile: Add rules to build and run tst-tls3.
10575 * tst-tls3.c: New file.
10576 * tst-tls3mod.c: New file.
10577
3724f268
UD
10578 * Makefile (tests): Add tst-rwlock8 and tst-rwlock9.
10579 * tst-rwlock8.c: New file.
10580 * tst-rwlock9.c: New file.
10581 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Fix
10582 complete broken rwlock implementation.
10583 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
10584 Likewise.
10585 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
10586 Likewise.
10587 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
10588 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
18a53579
UD
10589 * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
10590 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
10591 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
10592 * sysdeps/pthread/pthread_rwlock_unlock.c: Likewise.
10593 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
3724f268 10594
8915cc40
RM
105952003-02-23 Roland McGrath <roland@redhat.com>
10596
10597 * Makefile (nptl-version): Change regexp so case sensitivity is ok.
10598
fd1a0d0c
UD
105992003-02-23 Ulrich Drepper <drepper@redhat.com>
10600
ecf28959
UD
10601 * Makefile (tests): Add tst-context1.
10602 * tst-context1.c: New file.
10603
5e47b76b
UD
10604 * Makefile (tests): Add tst-tls1 and tst-tls2.
10605 * tst-tls1.c: New file.
10606 * tst-tls2.c: New file.
10607
5a6bbb41
UD
10608 * libc-cancellation.c (__libc_enable_asynccancel): Correct test
10609 for failed cmpxchg.
10610
fd1a0d0c
UD
10611 * pthread_create.c (start_thread): Set EXITING_BIT early.
10612
10613 * sysdeps/i386/tls.h (THREAD_GETMEM): Mark asm as volatile.
10614 (THREAD_GETMEM_NC): Likewise.
10615
757f9fcb
UD
106162003-02-22 Ulrich Drepper <drepper@redhat.com>
10617
b1b8e747
UD
10618 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Shave
10619 off 3 more bytes by using offset-less instructions when possible.
10620
c780aa21 10621 * Makefile: Add dependency for $(objpfx)version.d.
757f9fcb
UD
10622
10623 * eintr.c (eintr_source): Add unnecessary return but the compiler
10624 insists.
10625
10626 * tst-kill3.c: Include <unistd.h>.
10627
5148559c
RM
106282003-02-21 Roland McGrath <roland@redhat.com>
10629
10630 * pthread_create.c (start_thread): Call __libc_thread_freeres.
10631
ab2d98e3
UD
106322003-02-21 Ulrich Drepper <drepper@redhat.com>
10633
71028edd
UD
10634 * Makefile (tests): Add tst-eintr1.
10635 (distribute): Add eintr.c.
10636 * tst-eintr1.c: New file.
10637 * eintr.c: New file.
10638
e814f748
UD
10639 * pthread_cancel.c (pthread_cancel): Use tkill directly.
10640
10641 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill):
10642 Disallow sending SIGCANCEL.
10643
ab2d98e3 10644 * Makefile (tests): Remove tst-basic7. Add tst-kill1, tst-kill2,
9c03686d 10645 tst-kill3, tst-kill4, tst-kill5, tst-kill6.
e814f748
UD
10646 * tst-kill1.c: New file.
10647 * tst-kill2.c: New file.
10648 * tst-kill3.c: New file.
10649 * tst-kill5.c: New file.
9c03686d 10650 * tst-kill6.c: New file.
e814f748
UD
10651 * tst-basic7.c: Renamed to...
10652 * tst-kill4.c: ...this.
ab2d98e3 10653
59fed0e2
RM
106542003-02-21 Roland McGrath <roland@redhat.com>
10655
10656 * Makefile (install-lib-ldscripts): New variable.
10657
49dc759f
UD
106582003-02-21 Ulrich Drepper <drepper@redhat.com>
10659
8c2e9a29
UD
10660 * pthreadP.h: Define INVALID_TD_P and INVALID_NOT_TERMINATED_TD_P.
10661 * pthread_cancel.c: Use INVALID_TD_P.
10662 * pthread_detach.c: Likewise.
10663 * pthread_getschedparam.c: Likewise.
10664 * pthread_setschedparam.c: Likewise.
10665 * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
10666 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
10667 * pthread_join.c: Use INVALID_NOT_TERMINATED_TD_P.
10668 * pthread_timedjoin.c: Likewise.
10669
10670 * tst-basic7.c: Include <signal.h>.
10671
49dc759f
UD
10672 * pthread_join.c (pthread_join): Limited checking for invalid
10673 descriptors.
10674 * pthread_timedjoin.c (pthread_timedjoin_np): Likewise.
10675
df5803bf
UD
106762003-02-20 Ulrich Drepper <drepper@redhat.com>
10677
c5acd3d7
UD
10678 * pthread_create.c (deallocate_tsd): Reset found_nonzero at the
10679 beginning of the loop. Clear the entire first block of TSD.
df5803bf
UD
10680 * Makefile (tests): Add tst-key4.
10681 * tst-key4.c: New file.
10682
729924a0
UD
106832003-02-18 Ulrich Drepper <drepper@redhat.com>
10684
2f7dc594
UD
10685 * Makefile (tests): Add tst-basic7.
10686 * tst-basic7.c: New file.
10687
ba25bb0f
UD
10688 * pthread_create.c (deallocate_tsd): Mark as internal_function.
10689 Add some more __builtin_expect.
10690
12fd3c5f 10691 * pthreadP.h: Define dummy version of DEBUGGING_P.
729924a0 10692
5430d926
UD
106932003-02-17 Ulrich Drepper <drepper@redhat.com>
10694
b0db7fbe
UD
10695 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remnove
10696 _POSIX_THREAD_PRIORITY_SCHEDULING.
10697 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
10698 _XOPEN_REALTIME_THREADS.
10699 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
10700
10701 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): The
10702 kernel returns EINVAL for PID <= 0, work around it.
10703
ecfda9bd
UD
10704 * Makefile (tests): Add tst-signal5.
10705 * tst-signal5.c: New file.
10706
7d78ab99
UD
10707 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
10708 and LOGIN_NAME_MAX.
10709
371a2972
UD
10710 * tst-cancel1.c (tf): Block all signals.
10711
5430d926
UD
10712 * Makefile (tests): Add tst-basic6.
10713 * tst-basic6.c: New file.
10714
10715 * tst-basic1.c: Add test for process ID.
10716
10717 * Makefile (tests): Add tst-cancel10.
10718 * tst-cancel10.c: New file.
10719
10720 * Makefile (tests): Add tst-signal4.
10721 * tst-signal4.c: New file.
10722
10723 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use
10724 __sigismember instead of sigismember. Add __builtin_expect.
10725
1564916a
UD
107262003-02-16 Ulrich Drepper <drepper@redhat.com>
10727
179ff175
UD
10728 * tst-attr1.c (do_test): Add tests for pthread_setcanceltype,
10729 pthread_setcancelstate, and pthread_rwlock_setpshared.
10730
e4335f9a
UD
10731 * tst-cancel7.c (do_test): Make sure the pid file exists before
10732 canceling the thread.
10733
0a37669a
UD
10734 * tst-rwlock6.c: More pthread_rwlock_timedwrlock and
10735 pthread_rwlock_timedrdlock tests.
10736 * tst-rwlock7.c: More pthread_rwlock_timedwrlock tests.
10737 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
10738 Check for invalid tv_nsec field.
10739 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
10740 Likewise.
10741
10742 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Protect
10743 recursive mutex of overflow.
10744
10745 * tst-attr1.c (do_test): Add test for pthread_mutexattr_setpshared.
10746
e4335f9a 10747 * libc-cancellation.c (__libc_enable_asynccancel): Rewrite to avoid
1564916a
UD
10748 going into an endless loop.
10749 * Makefile (tests): Add tst-cancel9.
10750 * tst-cancel9.c: New file.
10751
10752 * pthread_cancel.c (pthread_cancel): Use the result of __pthread_kill.
10753
b270b548
UD
107542003-02-15 Ulrich Drepper <drepper@redhat.com>
10755
1c82b97f
UD
10756 * tst-mutex5.c (do_test): Add more timedlock tests.
10757
b2f05465 10758 * tst-mutex2.c: Tests of trylock and unlock with ERROR mutexes.
c3bb9ee1
UD
10759 * tst-mutex3.c (do_test): Add tests for trylock with RECURSIVE mutexes.
10760
e798b60f
UD
10761 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
10762 use INLINE_SYSCALL. Error number is returned, not -1.
10763
90491dc4
UD
10764 * pthreadP.h: Mark declarations of __find_in_stack_list, __free_tcb,
10765 and __deallocate_stack with internal_function.
10766 * pthread_create.c: Adjust definitions appropriately.
10767 * allocatestack.c: Likewise.
10768
10769 * pthread_join.c: Add one more __builtin_expect.
10770 * pthread_timedjoin.c: Likewise.
10771
10772 * pthread_getspecific.c (__pthread_getspecific): Clear data->data
10773 not data of sequence number does not match.
10774 Add one __builtin_expect.
10775
c6247c9d
UD
10776 * Makefile (tests): Add tst-clock1.
10777 * tst-clock1.c: New file.
10778
b270b548
UD
10779 * pthread_setconcurrency.c (pthread_setconcurrency): Fail for
10780 negative arguments.
10781 * Makefile (tests): Add tst-basic5.
10782 * tst-basic5.c: New file.
10783
700bf7af
UD
107842003-02-14 Ulrich Drepper <drepper@redhat.com>
10785
757de559
UD
10786 * Makefile (tests): Add tst-basic4.
10787 * tst-basic4.c: New file.
10788
47202270
UD
10789 * pthreadP.h: Add declaraction for __nptl_nthreads.
10790 * pthread_create.c: Define __nptl_nthreads
10791 (start_thread): Increment __nptl_nthreads at beginning. Decrement
b270b548 10792 after thread is done. If then zero, call exit(0).
47202270
UD
10793 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
10794 Add ptr_nthreads. Define HAVE_PTR_NTHREADS.
10795 * init.c (pthread_functions): Initialize ptr_nthreads.
10796 * allocatestack.c (nptl_nthreads): Remove definition and all uses.
10797 (__reclaim_stacks): Decrement __nptl_nthreads.
10798 * sysdeps/pthread/Makefile [$(subdir)==csu] (CFLAGS-libc-start.c):
10799 Define.
10800 * Makefile (tests): Add tst-basic3.
10801 * tst-basic3.c: New file.
10802
e320ef46
UD
10803 * descr.h: Define CANCELING_BIT and CANCELING_BITMASK. Introduce
10804 after CANCELTYPE_BIT, move the other bits up. Update CANCEL_RESTMASK.
10805 * init.c (sigcancel_handler): Also set CANCELING_BITMASK bit in newval.
10806 * pthread_cancel.c (pthread_cancel): Likewise. Also set CANCELING_BIT
10807 if asynchronous canceling is enabled.
10808 * pthread_join.c (pthread_join): When recognizing circular joins,
10809 take into account the other thread might be already canceled.
10810 * Makefile (tests): Add tst-join5.
10811 * tst-join5.c: New file.
10812
700bf7af
UD
10813 * Makefile (tests): Add tst-join4.
10814 * tst-join4.c: New file.
10815
108162003-02-13 Ulrich Drepper <drepper@redhat.com>
10817
10818 * tst-cond4.c (main): Add test of pthread_attr_getpshared.
10819
dac0f772
UD
108202003-02-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
10821
10822 * sysdeps/s390/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM,
10823 THREAD_SETMEM_NC): Use passed descr instead of THREAD_SELF.
10824 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind): Avoid
10825 warning.
10826 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Include <sys/time.h>
10827 to avoid warning.
10828 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Return
10829 error if lll_futex_wake failed.
10830
e8cda341
UD
108312003-02-13 Ulrich Drepper <drepper@redhat.com>
10832
a7720b5e
UD
10833 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Fix
10834 handling of cancellation and failung pthread_mutex_unlock call.
10835 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10836 * Makefile (tests): Add tst-cond8 and tst-cond9.
10837 * tst-cond8.c: New file.
10838 * tst-cond9.c: New file.
10839
a1ea4c06
UD
10840 * tst-cond7.c (do_test): Unlock the mutex before canceling the thread.
10841
10842 * sysdeps/pthread/pthread.h: Add missing initializers. Protect
10843 non-standard initializers with __USE_GNU.
10844
e8cda341
UD
10845 * Makefile (tests): Add tst-cleanup3.
10846 * tst-cleanup3.c: New file.
10847
2067577c
UD
108482003-02-12 Ulrich Drepper <drepper@redhat.com>
10849
89e78a95
UD
10850 * Makefile (tests): Add tst-attr1 and tst-attr2.
10851 * tst-attr1.c: New file.
10852 * tst-attr2.c: New file.
10853
dfdd294a
UD
10854 * Makefile: Add rules to build and run tst-atfork2 test.
10855 * tst-atfork2.c: New file.
10856 * tst-atfork2mod.c: New file.
10857
10858 * sysdeps/unix/sysv/linux/unregister-atfork.c
10859 (__unregister_atfork): Free the memory allocated for the handlers
10860 after removing them from the lists.
10861
10862 * sysdeps/unix/sysv/linux/register-atfork.c: Define memeory
10863 cleanup function.
10864
10865 * tst-atfork1.c (do_test): Wait for the child we forked.
10866 Report error in child.
10867
10868 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Fix comment.
10869
2067577c
UD
10870 * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
10871
2a8a8a84
UD
108722003-02-10 Ulrich Drepper <drepper@redhat.com>
10873
d9dd121e
UD
10874 * Makefile (tests): Add tst-cancel8.
10875 * tst-cancel8.c: New file.
10876
2a8a8a84
UD
10877 * sysdeps/unix/sysv/linux/i386/pthread_once.S (clear_once_control): Fix
10878 clearing of control variable.
defd1870 10879 * Makefile (tests): Add tst-once3 and tst-once4.
2a8a8a84 10880 * tst-once3.c: New file.
defd1870 10881 * tst-once4.c: New file.
2a8a8a84 10882
a54e8d33
UD
108832003-02-08 kaz Kojima <kkojima@rr.iij4u.or.jp>
10884
10885 * sysdeps/sh/Makefile: New file.
10886 * sysdeps/sh/bits/atomic.h: New file.
10887 * sysdeps/sh/pthread_spin_init.c: New file.
10888 * sysdeps/sh/pthread_spin_lock.c: New file.
10889 * sysdeps/sh/pthread_spin_trylock.S: New file.
10890 * sysdeps/sh/pthread_spin_unlock.S: New file.
10891 * sysdeps/sh/pthreaddef.h: New file.
10892 * sysdeps/sh/tcb-offsets.sym: New file.
10893 * sysdeps/sh/td_ta_map_lwp2thr.c: New file.
10894 * sysdeps/sh/tls.h: New file.
10895 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: New file.
10896 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: New file.
10897 * sysdeps/unix/sysv/linux/sh/createthread.c: New file.
10898 * sysdeps/unix/sysv/linux/sh/fork.c: New file.
10899 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: New file.
10900 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: New file.
10901 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h: New file.
10902 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: New file.
10903 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: New file.
10904 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: New file.
10905 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: New file.
10906 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: New file.
10907 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
10908 * sysdeps/unix/sysv/linux/sh/pt-vfork.S: New file.
10909 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: New file.
10910 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: New file.
10911 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: New file.
10912 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: New file.
10913 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: New file.
10914 * sysdeps/unix/sysv/linux/sh/pthread_once.S: New file.
10915 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: New file.
10916 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: New file.
10917 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: New file.
10918 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: New file.
10919 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: New file.
10920 * sysdeps/unix/sysv/linux/sh/sem_post.S: New file.
10921 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: New file.
10922 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: New file.
10923 * sysdeps/unix/sysv/linux/sh/sem_wait.S: New file.
10924 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
10925
696e556e
UD
109262003-02-08 Ulrich Drepper <drepper@redhat.com>
10927
10928 * tst-cond2.c: Rearrange code to not rely on behavior undefined
10929 according to POSIX.
10930
10931 * tst-basic2.c (do_test): Lock mutex before creating the thread.
10932
fef710d6
UD
109332003-02-07 Ulrich Drepper <drepper@redhat.com>
10934
c6180643
UD
10935 * sysdeps/x86_64/tls.h: Remove unnecessary macros, left over from x86.
10936 (TLS_GET_FS): New #define.
10937 (TLS_SET_FS): New #define.
10938 Correct value of __NR_set_thread_area.
10939
fef710d6
UD
10940 * sysdeps/x86_64/td_ta_map_lwp2thr.c: New file.
10941
11090a99
UD
109422003-02-06 Ulrich Drepper <drepper@redhat.com>
10943
65c68990
UD
10944 * Makefile (tests): Add tst-popen1.
10945 * tst-popen1.c: New file.
10946
11090a99
UD
10947 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Remove wrong
10948 but inactive generalization.
10949 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10950 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
10951 Minor optimization, remove one instruction.
10952 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
10953
a88c9263
UD
109542003-02-04 Martin Schwidefsky <schwidefsky@de.ibm.com>
10955
10956 * sysdeps/unix/sysv/linux/s390/fork.c: Correct order of parameters.
10957
109582003-01-31 Martin Schwidefsky <schwidefsky@de.ibm.com>
10959
10960 * init.c (__NR_set_tid_address): Add #ifdef for s390.
10961 * sysdeps/pthread/pthread_barrier_wait.c: New file.
10962 * sysdeps/pthread/pthread_cond_broadcast.c: New file.
10963 * sysdeps/pthread/pthread_cond_signal.c: New file.
10964 * sysdeps/pthread/pthread_cond_timedwait.c: New file.
10965 * sysdeps/pthread/pthread_cond_wait.c: New file.
10966 * sysdeps/pthread/pthread_rwlock_rdlock.c: New file.
10967 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: New file.
10968 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: New file.
10969 * sysdeps/pthread/pthread_rwlock_unlock.c: New file.
10970 * sysdeps/pthread/pthread_rwlock_wrlock.c: New file.
10971 * sysdeps/s390/Makefile: New file.
10972 * sysdeps/s390/bits/atomic.h: New file.
10973 * sysdeps/s390/pthread_spin_init.c: New file.
10974 * sysdeps/s390/pthread_spin_lock.c: New file.
10975 * sysdeps/s390/pthread_spin_trylock.c: New file.
10976 * sysdeps/s390/pthread_spin_unlock.c: New file.
10977 * sysdeps/s390/pthreaddef.h: New file.
10978 * sysdeps/s390/tcb-offsets.sym: New file.
10979 * sysdeps/s390/td_ta_map_lwp2thr.c: New file.
10980 * sysdeps/s390/tls.h: New file.
10981 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: New file.
10982 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: New file.
10983 * sysdeps/unix/sysv/linux/s390/createthread.c: New file.
10984 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: New file.
10985 * sysdeps/unix/sysv/linux/s390/fork.c: New file.
10986 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: New file.
10987 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
10988 * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: New file.
10989 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: New file.
10990 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: New file.
10991 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: New file.
10992 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: New file.
10993 * sysdeps/unix/sysv/linux/s390/pthread_once.c: New file.
10994 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: New file.
10995 * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: New file.
10996 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
10997 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
10998 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: New file.
10999 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
11000 * sysdeps/unix/sysv/linux/s390/sem_post.c: New file.
11001 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: New file.
11002 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
11003 * sysdeps/unix/sysv/linux/s390/sem_wait.c: New file.
11004
6f1cff95
UD
110052003-02-04 Ulrich Drepper <drepper@redhat.com>
11006
ec609a8e
UD
11007 * atomic.h: Add a couple more default implementations.
11008 (atomic_compare_and_exchange_acq): Use
d45e8740
UD
11009 __arch_compare_and_exchange_32_acq in return value definition. It
11010 always exists.
11011 (atomic_bit_set): Renamed from atomic_set_bit.
0289bef9 11012 Add missing atomic_ prefixes.
e3ec8904 11013
6f1cff95
UD
11014 * sysdeps/pthread/bits/libc-lock.h (__libc_once): In case no
11015 thread library is available, use correct value to mark initialized
11016 once variable.
11017
4f088329
UD
110182003-02-03 Ulrich Drepper <drepper@redhat.com>
11019
6f1cff95
UD
11020 * allocatestack.c (allocate_stack): Use __getpagesize instead of
11021 __sysconf to determine pagesize.
11022
3e4fc359 11023 * pthread_create.c: Include <atomic.h>.
4f088329
UD
11024 * allocatestack.c (allocate_stack): Implement coloring of the
11025 allocated stack memory. Rename pagesize to pagesize_m1. It's the
11026 size minus one. Adjust users.
3e4fc359 11027 * sysdeps/i386/i686/Makefile: New file.
4f088329 11028
2f42e8be
UD
110292003-02-02 Ulrich Drepper <drepper@redhat.com>
11030
4301f7e2
UD
11031 * allocatestack.c: Improve comment throughout the file.
11032
2f42e8be 11033 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
a37818b3 11034 (__lll_lock_wait): Add branch prediction.
2f42e8be
UD
11035 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
11036 (__lll_lock_wait): Likewise.
11037 (lll_unlock_wake_cb): Removed.
11038
4a7d6545
UD
110392003-01-31 Ulrich Drepper <drepper@redhat.com>
11040
11041 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Remove
11042 _POSIX_THREAD_PRIORITY_SCHEDULING.
11043
886d5973
UD
110442003-01-30 Jakub Jelinek <jakub@redhat.com>
11045
11046 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
11047 Fix return type of ptr___pthread_getspecific.
11048
e474ca78
UD
110492003-01-29 Ulrich Drepper <drepper@redhat.com>
11050
11051 * Makefile (tests): Add tst-umask1.
11052 (tst-umask1-ARGS): Define.
11053 * tst-umask1.c: New file.
11054
e6ebd2e4
UD
110552003-01-28 Ulrich Drepper <drepper@redhat.com>
11056
6cf26f41
UD
11057 * Makefile (libpthread-routines): Remove lowlevelrwlock. Add
11058 pthread_rwlock_rdlock, pthread_rwlock_timedrdlock,
11059 pthread_rwlock_wrlock, pthread_rwlock_timedwrlock, and
11060 pthread_rwlock_unlock.
11061 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Removed
11062 * sysdeps/unix/sysv/linux/i386/i586/lowlevelrwlock.S: Removed
11063 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Removed
11064 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: New file.
11065 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
11066 New file.
11067 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: New file.
11068 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
11069 New file.
11070 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: New file.
11071 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_rdlock.S: New file.
11072 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedrdlock.S:
11073 New file.
11074 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_wrlock.S: New file.
11075 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedwrlock.S:
11076 New file.
11077 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_unlock.S: New file.
11078 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_rdlock.S: New file.
11079 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedrdlock.S:
11080 New file.
11081 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_wrlock.S: New file.
11082 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedwrlock.S:
11083 New file.
11084 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_unlock.S: New file.
11085
1d087a7e
UD
11086 * Makefile (libpthread-routines): Remove lowlevelcond and
11087 lowlevelsem. Add sem_wait, sem_trywait, sem_timedwait, sem_post,
11088 pthread_cond_wait, pthread_cond_timedwait, pthread_cond_signal,
11089 and pthread_cond_broadcast.
4a99d160
UD
11090 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Removed
11091 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Removed
11092 * sysdeps/unix/sysv/linux/i386/i586/lowlevelsem.S: Removed
11093 * sysdeps/unix/sysv/linux/i386/i586/lowlevelcond.S: Removed
11094 * sysdeps/unix/sysv/linux/i386/i686/lowlevelsem.S: Removed
11095 * sysdeps/unix/sysv/linux/i386/i686/lowlevelcond.S: Removed
11096 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: New file.
11097 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: New file.
11098 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: New file.
11099 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: New file.
11100 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: New file.
11101 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: New file.
11102 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: New file.
11103 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: New file.
11104 * sysdeps/unix/sysv/linux/i386/i586/sem_wait.S: New file.
11105 * sysdeps/unix/sysv/linux/i386/i586/sem_trywait.S: New file.
11106 * sysdeps/unix/sysv/linux/i386/i586/sem_timedwait.S: New file.
11107 * sysdeps/unix/sysv/linux/i386/i586/sem_post.S: New file.
11108 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_wait.S: New file.
11109 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_timedwait.S: New file.
11110 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_signal.S: New file.
11111 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_broadcast.S: New file.
11112 * sysdeps/unix/sysv/linux/i386/i686/sem_wait.S: New file.
11113 * sysdeps/unix/sysv/linux/i386/i686/sem_trywait.S: New file.
11114 * sysdeps/unix/sysv/linux/i386/i686/sem_timedwait.S: New file.
11115 * sysdeps/unix/sysv/linux/i386/i686/sem_post.S: New file.
11116 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_wait.S: New file.
11117 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S: New file.
11118 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_signal.S: New file.
11119 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_broadcast.S: New file.
11120 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: New file.
1d087a7e 11121
e6ebd2e4
UD
11122 * sysdeps/unix/sysv/linux/i386/createthread.c: Define
11123 PREPARE_CREATE and TLS_VALUE with x86-specific bits. All the rest
11124 of the code is moved to ...
11125 * sysdeps/pthread/createthread.c: ...here. New file.
11126
a15698cb
UD
111272003-01-27 Ulrich Drepper <drepper@redhat.com>
11128
0566b130
UD
11129 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S
11130 (__new_sem_post): Clear %eax before returning.
11131 Reported by MAEDA Naoaki <maeda.naoaki@jp.fujitsu.com>.
11132
e6fb8846
UD
11133 * Makefile (tests): Add tst-cleanup2.
11134 * tst-cleanup2.c: New file.
11135
a15698cb
UD
11136 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
11137 Interpret first parameter correctly.
11138
8824b0a1
UD
111392003-01-17 Ulrich Drepper <drepper@redhat.com>
11140
11141 * Makefile (headers): Add bits/semaphore.h.
11142
850dcfca
UD
111432003-01-16 Jakub Jelinek <jakub@redhat.com>
11144
11145 * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize _head->sysinfo even
11146 if not SHARED.
11147
574b892e
UD
111482003-01-14 Ulrich Drepper <drepper@redhat.com>
11149
a8d87c92
UD
11150 * sem_open.c (sem_open): Return SEM_FAILED if existing semaphore
11151 must be used and mapping failed.
11152 Reported by Luke Elliott <luke.elliott@activfinancial.com>.
11153
574b892e
UD
11154 * Makefile (CFLAGS-pthread_self.os): Define this, not
11155 CFLAGS-pthread_self.c.
11156
fb48047a
UD
111572003-01-13 Ulrich Drepper <drepper@redhat.com>
11158
47805511
UD
11159 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Don't export
11160 lll_unlock_wake_cb.
11161
fb48047a
UD
11162 * Makefile (libpthread-routines): Add version. Add rules to build
11163 version.os and banner.h.
11164 * version.c: New file.
11165
115bb61d
UD
111662003-01-13 Jakub Jelinek <jakub@redhat.com>
11167
11168 * pthread_mutex_lock.c (__pthread_mutex_lock_internal): Make
11169 the alias unconditional.
11170 * pthread_mutex_unlock.c (__pthread_mutex_unlock_internal): Likewise.
11171
111722003-01-13 Ulrich Drepper <drepper@redhat.com>
11173
11174 * Makefile (CFLAGS-pthread_self.c): New definition.
11175
6aca81bb
UD
111762003-01-06 Jakub Jelinek <jakub@redhat.com>
11177
11178 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Add
11179 INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
11180 * sysdeps/unix/sysv/linux/raise.c (raise): Likewise.
11181 * init.c (__pthread_initialize_minimal_internal): Likewise.
11182
e9c7764e
UD
111832003-01-07 Jakub Jelinek <jakub@redhat.com>
11184
b5facfda
UD
11185 * pthreadP.h (__pthread_cond_timedwait): Add prototype.
11186
e9c7764e
UD
11187 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
11188 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
11189 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
11190 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
11191 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
11192 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
11193
bef1e42f
UD
111942003-01-06 Jakub Jelinek <jakub@redhat.com>
11195
11196 * pthreadP.h (LIBC_CANCEL_HANDLED): Define.
11197 * pt-system.c (LIBC_CANCEL_HANDLED): Add.
11198 * tst-cancel-wrappers.sh: Remove all exceptions.
11199
bbd17455
UD
112002003-01-05 Ulrich Drepper <drepper@redhat.com>
11201
a73ab6df
UD
11202 * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
11203 features. Reported by Marijn Ros <marijn@mad.scientist.com>.
11204
bbd17455
UD
11205 * sysdeps/unix/sysv/linux/jmp-unwind.c: Include <pthread-functions.h>.
11206 Use __libc_pthread_functions array if SHARED.
11207
11208 * pthreadP.h: Move pthread_cond_2_0_t definition to...
11209 * sysdeps/unix/sysv/linux/internaltypes.h: ...here.
11210
11211 * sysdeps/pthread/bits/libc-lock.h (__libc_ptf_call): New #define.
11212 (__libc_rwlock_rdlock, __libc_rwlock_wrlock, __libc_rwlock_unlock,
11213 __libc_key_create, __libc_getspecific, __libc_setspecific): Use
11214 __libc_ptf_call instead of __libc_maybe_call.
11215 (PTF): New #define.
11216 (__libc_cleanup_region_start): Wrap function name with PTF call.
11217 (__libc_cleanup_region_end): Likewise.
11218 (__libc_cleanup_end): Likewise.
11219
11220 * pthread_getspecific.c: Add __pthread_getspecific_internal alias.
11221 * pthread_setspecific.c: Add __pthread_setspecific_internal alias.
11222 * pthread_key_create.c: Add __pthread_key_create_internal alias.
11223 * pthreadP.h: Add prototypes.
11224
11225 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Add
11226 __pthread_rwlock_rdlock, __pthread_rwlock_wrlock, and
11227 __pthread_rwlock_unlock aliases.
11228 * pthreadP.h: Add prototypes for new aliases.
11229
11230 * pthreadP.h (struct pthead_functions): Moved to...
11231 * sysdeps/pthread/pthread-functions.h: ...here. New file.
11232 * init.c (pthread_functions): Add initializers for new elements.
11233
11234 * cleanup_defer.c: Add __pthread_cleanup_push_defer and
11235 __pthread_cleanup_pop_restore aliases.
11236 * pthreadP.h: Add prototypes.
11237
11238 * cleanup.c: Rename _GI_pthread_cleanup_push to __pthread_cleanup_push
11239 and _GI_pthread_cleanup_pop to __pthread_cleanup_pop.
11240 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Adjust caller.
11241 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
11242 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
11243 * pthreadP.h: Adjust prototypes and callers.
11244
d27a78be
UD
112452003-01-04 Ulrich Drepper <drepper@redhat.com>
11246
b74121ae
UD
11247 * Makefile (tests): Add tst-cancel7.
11248 (tst-cancel7-ARGS): New variable.
bbd17455 11249 * tst-cancel7.c: New file.
b74121ae 11250
29bc410c
UD
11251 * old_pthread_cond_broadcast.c: Optimize initialization a bit to work
11252 around gcc defficiencies.
11253 * old_pthread_cond_signal.c: Likewise.
11254 * old_pthread_cond_timedwait.c: Likewise.
11255 * old_pthread_cond_wait.c: Likewise.
11256
d27a78be
UD
11257 * pthreadP.h (pthread_cond_2_0_t): Remove unneeded lock element.
11258
733f25e6
UD
112592003-01-03 Ulrich Drepper <drepper@redhat.com>
11260
7edb2ae3
UD
11261 * Makefile (tests): Add tst-cond7.
11262 * tst-cond7.c: New file.
11263
b1151300
UD
11264 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
11265 (condvar_cleanup): Get condvar address from the right place.
11266
733f25e6
UD
11267 * atomic.h: Correct definitions of atomic_full_barrier,
11268 atomic_read_barrier, atomic_write_barrier.
11269
11270 * old_pthread_cond_broadcast.c: Make memory allocate and initialization
11271 race-free.
11272 * old_pthread_cond_signal.c: Likewise.
11273 * old_pthread_cond_timedwait.c: Likewise.
11274 * old_pthread_cond_wait.c: Likewise.
11275
686b7223
UD
112762003-01-03 Jakub Jelinek <jakub@redhat.com>
11277
11278 * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
11279
0e07706e
UD
112802003-01-03 Ulrich Drepper <drepper@redhat.com>
11281
997256dd
UD
11282 * pthreadP.h (pthread_cond_2_0_t): New type.
11283 (struct pthread_functions): Use new type for 2.0 condvar callbacks.
11284 Use new type for the 2.0 condvar function prototypes.
11285 * forward.c: Use pthread_cond_2_0_t for 2.0 condvar functions.
11286 * old_pthread_cond_init.c: Use pthread_cond_2_0_t for condvar
11287 parameter.
11288 * old_pthread_cond_destroy.c: Likewise.
11289 * old_pthread_cond_broadcast.c: Likewise. Lock appropriately.
11290 * old_pthread_cond_signal.c: Likewise.
11291 * old_pthread_cond_timedwait.c: Likewise.
11292 * old_pthread_cond_wait.c: Likewise.
11293
842d2817
UD
11294 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
11295 (__pthread_cond_wait): Don't save cancellation mode and seq value
11296 in same location.
11297
0e07706e
UD
11298 * herrno.c (__h_errno_location): Don't define as weak.
11299
bf293afe
UD
113002003-01-02 Jakub Jelinek <jakub@redhat.com>
11301
11302 * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
11303 pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
11304 and pthread_cond_wait.
11305 * old_pthread_cond_broadcast.c (__old_pthread_cond_broadcast):
11306 Renamed to...
11307 (__pthread_cond_broadcast_2_0): ... this.
11308 * old_pthread_cond_destroy.c (__old_pthread_cond_destroy):
11309 Renamed to...
11310 (__pthread_cond_destroy_2_0): ... this.
11311 * old_pthread_cond_init.c (__old_pthread_cond_init):
11312 Renamed to...
11313 (__pthread_cond_init_2_0): ... this.
11314 * old_pthread_cond_signal.c (__old_pthread_cond_signal):
11315 Renamed to...
11316 (__pthread_cond_signal_2_0): ... this.
11317 * old_pthread_cond_wait.c (__old_pthread_cond_wait):
11318 Renamed to...
11319 (__pthread_cond_wait_2_0): ... this.
11320 * pthread_cond_destroy.c: Include shlib-compat.h.
11321 (pthread_cond_destroy): Change strong_alias into versioned_symbol.
11322 * pthread_cond_init.c: Include shlib-compat.h.
11323 (pthread_cond_init): Change strong_alias into versioned_symbol.
11324 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_cond_*
11325 fields to ptr___pthread_cond_* and add ptr___pthread_cond_*_2_0
11326 fields.
11327 (__pthread_cond_broadcast_2_0, __pthread_cond_destroy_2_0,
11328 __pthread_cond_init_2_0, __pthread_cond_signal_2_0,
11329 __pthread_cond_wait_2_0): New prototypes.
11330 (__old_pthread_cond_broadcast, __old_pthread_cond_destroy,
11331 __old_pthread_cond_init, __old_pthread_cond_signal,
11332 __old_pthread_cond_wait): Removed.
11333 * init.c: Include shlib-compat.h.
11334 (pthread_functions): Guard ptr___pthread_attr_init_2_0
11335 initialization with SHLIB_COMPAT (GLIBC_2_0, GLIBC_2_1).
11336 Rename ptr_pthread_cond_* to ptr___pthread_cond_*, initialize
11337 ptr___pthread_cond_*_2_0 fields.
11338 * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
11339 pthread_cond_*@GLIBC_2.0 compatibility symbols.
11340
11341 * sysdeps/pthread/sigaction.c (SIGCANCEL): Only define if
11342 LIBC_SIGACTION was not yet defined.
11343 [!defined LIBC_SIGACTION]: Define LIBC_SIGACTION, #include self.
11344 [!defined LIBC_SIGACTION] (__sigaction): New function and
11345 libc_hidden_weak.
11346 [!defined LIBC_SIGACTION] (sigaction): New weak_alias.
11347 [defined LIBC_SIGACTION]: #include_next <sigaction.c>.
11348
113492003-01-02 Jakub Jelinek <jakub@redhat.com>
11350
11351 * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
11352
05df18c3
UD
113532003-01-02 Ulrich Drepper <drepper@redhat.com>
11354
11355 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
11356 New, larger type definition.
11357 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: New condvar
11358 implementation.
11359 * Versions [libpthread]: Add definitions for new pthread_cond_*
11360 interfaces for version GLIBC_2.3.2.
11361 * pthread_cond_init.c: Update initialization for new type definition.
11362 * Makefile (libpthread-routines): Remove pthread_cond_wait,
11363 pthread_cond_timedwait, pthread_cond_signal, and
11364 pthread_cond_broadcast. Add old_pthread_cond_init,
11365 old_pthread_cond_destroy, old_pthread_cond_wait,
11366 old_pthread_cond_timedwait, old_pthread_cond_signal, and
11367 old_pthread_cond_broadcast.
11368 * old_pthread_cond_broadcast.c: New file.
11369 * old_pthread_cond_destroy.c: New file.
11370 * old_pthread_cond_init.c: New file.
11371 * old_pthread_cond_signal.c: New file.
11372 * old_pthread_cond_timedwait.c: New file.
11373 * old_pthread_cond_wait.c: New file.
11374 * pthreadP.h: Add prototypes for the compatibility interfaces.
11375
11376 * pthread_cond_destroy.c: Don't include <errno.h>.
11377
fd8979e4
UD
113782003-01-01 Ulrich Drepper <drepper@redhat.com>
11379
11380 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Avoid
11381 unnecessary zero offset when addressing MUTEX.
11382
6d6ee629
UD
113832002-12-31 Ulrich Drepper <drepper@redhat.com>
11384
11385 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
11386 __register_atfork.
11387 * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
11388 for __register_atfork.
11389
a4baf360
UD
113902002-12-31 Jakub Jelinek <jakub@redhat.com>
11391
11392 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use __ASSEMBLER__
11393 instead of ASSEMBLER test macro.
11394
11395 * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
11396 __libc_current_sigrtmax): Add libc_hidden_def.
11397
11398 * sysdeps/pthread/list.h: Remove assert.h include.
11399
e9395a94
UD
114002002-12-31 Ulrich Drepper <drepper@redhat.com>
11401
11402 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Use
11403 __pthread_initialize_minimal_internal not
11404 __pthread_initialize_minimal.
11405
89d6e444
UD
114062002-12-30 Ulrich Drepper <drepper@redhat.com>
11407
416d2de6
UD
11408 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Mark
11409 __pthread_initialize_minimal as hidden.
11410
89d6e444
UD
11411 * init.c (__pthread_initialize_minimal_internal): Don't mark as
11412 constructor.
11413
114142002-12-31 Jakub Jelinek <jakub@redhat.com>
11415
11416 * Makefile ($(inst_libdir)/libpthread.so): Depend on
11417 $(common-objpfx)format.lds, include that into the output script.
11418 Fix comment.
11419 (extra-B-pthread.so): Change linuxthreads/ into nptl/.
11420
8cac677c
UD
114212002-12-28 Andreas Jaeger <aj@suse.de>
11422
11423 * sysdeps/unix/sysv/linux/xstatconv.c (xstat_conv): Adjust for
11424 nsec resolution changes.
11425 (xstat64_conv): Likewise.
11426 (xstat32_conv): Likewise.
11427 * sysdeps/unix/sysv/linux/kernel_stat.h: Add nsec resolution for
11428 struct kernel_stat.
11429 * sysdeps/unix/sysv/linux/bits/stat.h: Add nsec resolution for
11430 structs stat and stat64.
11431 * time/time.h (__timespec_defined): Define for __USE_MISC.
89d6e444 11432 * io/sys/stat.h [__USE_MISC]: Define __need_timespec for struct stat.
8cac677c 11433
49e9f864
UD
114342002-12-30 Jakub Jelinek <jakub@redhat.com>
11435
11436 * forward.c (FORWARD2): Renamed from FORWARD3. Remove unused export
11437 argument.
11438 (pthread_attr_init_2_0, pthread_attr_init_2_1): Use FORWARD macro.
11439 (pthread_exit): Use strong_alias to avoid warnings.
11440 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_exit
11441 and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
11442 ptr___pthread_attr_init_2_*.
11443 * init.c (pthread_functions): Adjust.
11444
bab09b26
UD
114452002-12-29 Ulrich Drepper <drepper@redhat.com>
11446
598d7a42
UD
11447 * forward.c: Make all functions available by default again. It
11448 caused too much trouble.
11449
bab09b26
UD
11450 * pt-siglongjmp.c: Removed.
11451
3b7ed871
UD
114522002-12-28 Jakub Jelinek <jakub@redhat.com>
11453
11454 * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
11455 (SYSINFO_OFFSET, MULTIPLE_THREADS_OFFSET): Remove.
11456 * sysdeps/i386/Makefile: New file.
11457 * sysdeps/i386/tcb-offsets.sym: New file.
11458 * sysdeps/pthread/tcb-offsets.h: New file.
11459 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
11460 Remove MULTIPLE_THREADS_OFFSET and SYSINFO_OFFSET checks.
11461
11462 * sysdeps/unix/sysv/linux/Versions [libc] (GLIBC_PRIVATE): Move
11463 __register_atfork...
11464 (GLIBC_2.3.2): ...here.
11465
114662002-12-28 Ulrich Drepper <drepper@redhat.com>
11467
11468 * sysdeps/pthread/pthread.h: Mark pthread_attr_getstackaddr and
11469 pthread_attr_setstackaddr with __attribute_deprecated__.
11470
270d9d47
UD
114712002-12-27 Jakub Jelinek <jakub@redhat.com>
11472
11473 * pt-system.c (system): Remove cancellation handling.
11474 * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
11475 cancellation routines.
11476
131fd126
UD
114772002-12-28 Ulrich Drepper <drepper@redhat.com>
11478
afb2e954
UD
11479 * descr.h: Include <dl-sysdep.h>.
11480 (struct pthread): Move header.data.list to the back of the struct.
131fd126
UD
11481 * sysdeps/i386/tls.h (tcbhead_t): Move list to the back of the struct.
11482 (MULTIPLE_THREADS_OFFSET): Adjust offset.
11483 (SYSINFO_OFFSEET): Likewise.
11484
114852002-12-27 Jakub Jelinek <jakub@redhat.com>
11486
11487 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h (USE_DL_SYSINFO):
11488 Define.
11489 (DL_SYSINFO_DEFAULT): Cast to uintptr_t to avoid warnings.
11490 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h (NEED_DL_SYSINFO,
11491 DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION): Define.
11492 (USE_DL_SYSINFO): Undef.
11493
114942002-12-22 Jakub Jelinek <jakub@redhat.com>
11495
11496 * Makefile (tests-reverse): Use $(objpfx)../libc.so instead of
11497 $(common-objpfx)libc.so.
11498 * tst-cancel4.c (tf_write, tf_writev): Increase buf sizes so that
11499 it is bigger than pipe buffer size even on arches with bigger
11500 page size.
11501 (tf_usleep): Cast usleep argument to useconds_t to avoid warnings.
11502
a218c9cf
UD
115032002-12-25 Ulrich Drepper <drepper@redhat.com>
11504
11505 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Implement
11506 correct errno access for case that USE___THREAD is not defined.
11507
015a2dc9
UD
115082002-12-24 Ulrich Drepper <drepper@redhat.com>
11509
11510 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Add missing #endif.
11511 Patch by Marijn Ros <marijn@mad.scientist.com>.
11512
5220f9ac
RM
115132002-12-22 Roland McGrath <roland@redhat.com>
11514
11515 * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
11516
1561bf63
UD
115172002-12-20 Ulrich Drepper <drepper@redhat.com>
11518
11519 * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_inexpensive): Define.
11520
3325198e
UD
115212002-12-19 Ulrich Drepper <drepper@redhat.com>
11522
057c823f
UD
11523 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Don't define
11524 NEED_DL_SYSINFO since no processor < i686 had the sysenter opcode.
11525 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: New file.
11526
097eca29
UD
11527 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Use ENTER_KERNEL instead
11528 of int $0x80.
11529 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
11530 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Likewise.
11531 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Likewise.
11532 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
11533 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
11534 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Likewise.
11535 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Likewise.
11536 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
11537
11538 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add support for using
11539 sysenter.
11540 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
11541
11542 * sysdeps/i386/tls.h: Unconditionally include <dl-sysdep.h>.
11543
5f5843e3
UD
11544 * allocatestack.c (allocate_stack) [NEED_DL_SYSINFO]: Set sysinfo
11545 in new TCB.
11546 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Check
11547 that sysinfo is properly initialized.
11548 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define RTLD_PRIVATE_ERRNO
11549 to 1 only for ld.so.
11550
3325198e
UD
11551 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
11552 RTLD_CORRECT_DYNAMIC_WEAK.
11553
74e8f2dc
UD
115542002-12-19 Jakub Jelinek <jakub@redhat.com>
11555
11556 * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
11557 Use return 0 as 6th argument to FORWARD4.
11558 * pthread_equal.c: Include pthreadP.h instead of pthread.h.
11559
df45b31e
UD
115602002-12-18 Ulrich Drepper <drepper@redhat.com>
11561
11562 * descr.h (struct pthread) [NEED_DL_SYSINFO]: Add sysinfo member.
11563 * sysdeps/i386/tls.h (tcbhead_t): Add sysinfo member.
11564 Define SYSINFO_OFFSEET if NEED_DL_SYSINFO is defined.
11565 (INIT_SYSINFO): New #define.
11566 (TLS_TP_INIT): Use INIT_SYSINFO.
11567 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
11568 At test to make sure SYSINFO_OFFSET value is correct.
11569 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
11570
3d539579
UD
115712002-12-18 Jakub Jelinek <jakub@redhat.com>
11572
11573 * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
11574 * sysdeps/unix/sysv/linux/raise.c (gsignal): Add weak alias to raise.
11575 * Versions [libc: GLIBC_2.0]: Add pthread_attr_init.
11576 [libpthread: GLIBC_2.1]: Remove __pthread_rwlock_init,
11577 __pthread_rwlock_destroy, __pthread_rwlock_rdlock,
11578 __pthread_rwlock_wrlock, __pthread_rwlock_unlock,
11579 __pthread_rwlock_tryrdlock and __pthread_rwlock_trywrlock.
11580
d7913e0e
UD
115812002-12-18 Ulrich Drepper <drepper@redhat.com>
11582
f051627f
UD
11583 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use ENTER_KERNEL
11584 macro instead of using int $0x80 directly.
11585
d7913e0e
UD
11586 * sysdeps/pthread/bits/stdio-lock.h: New file.
11587 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: New file.
11588 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: New file.
11589 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: New file.
11590 * Makefile (routines): Add libc-lowlevelmutex.
11591
11592 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Remove
11593 __i686.get_pc_thunk.dx.
11594
f077a4a9
UD
115952002-12-17 Jakub Jelinek <jakub@redhat.com>
11596
11597 * Makefile (libpthread-shared-only-routines): Add pt-allocrtsig.
11598 (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
11599 ($(objpfx)tst-cancel-wrappers.out): New rule.
11600 * tst-cancel-wrappers.sh: New test.
11601 * tst-locale1.c: Include signal.h.
11602 (uselocale): Test static linking of __libc_current_sigrt*.
11603
116042002-12-17 Ulrich Drepper <drepper@redhat.com>
11605
11606 * Makefile (tests): Add tst-cancel6.
11607 * tst-cancel6.c: New file
11608
bd499a3b
UD
116092002-12-17 Jakub Jelinek <jakub@redhat.com>
11610
11611 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
11612 Define meaningfully for assembler as well.
11613 * pthreadP.h (struct pthread_functions): Remove
11614 ptr_pthread_attr_init field. Add ptr_pthread_attr_init_2_0
11615 and ptr_pthread_attr_init_2_1 fields.
11616 * init.c (pthread_functions): Initialize ptr_pthread_attr_init_2_0
11617 and ptr_pthread_attr_init_2_1 instead of ptr_pthread_attr_init.
11618 * forward.c (FORWARD4): Renamed from FORWARD3. Add export argument.
11619 (FORWARD3): Define using FORWARD4.
11620 (pthread_attr_init): Provide both @GLIBC_2.0 and @@GLIBC_2.1
11621 versions.
11622 * pt-system.c: Remove duplicate stdlib.h include.
11623
0a1063f4
UD
116242002-12-16 Ulrich Drepper <drepper@redhat.com>
11625
87d60668
UD
11626 * sem_init.c: Define sem_init@GLIBC_2.0.
11627 * sem_destroy.c: Define sem_destroy@GLIBC_2.0.
11628 * sem_getvalue.c: Define sem_getvalue@GLIBC_2.0.
11629
0a1063f4
UD
11630 * flockfile.c: Moved to...
11631 * sysdeps/pthread/flockfile.c: ...here. New file.
11632 * funlockfile.c: Moved to...
11633 * sysdeps/pthread/funlockfile.c: ...here. New file.
11634 * ftrylockfile.c: Moved to...
11635 * sysdeps/pthread/ftrylockfile.c: ...here. New file.
11636
9634cf9d
UD
116372002-12-16 Jakub Jelinek <jakub@redhat.com>
11638
11639 * libc-cancellation.c: Guard both function with
11640 #if !defined NOT_IN_libc.
11641 * Makefile (libpthread-routines): Use ptw-, not pt- prefix for the
11642 automatically provided pthread wrappers.
11643 * pthreadP.h (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define to
11644 CANCEL_* if IS_IN_libpthread and to dummy versions if not in libc
11645 nor in libpthread.
11646 * pt-open.c: Removed.
11647 * pt-fcntl.c: Removed.
11648 * pt-fsync.c: Removed.
11649 * pt-lseek.c: Removed.
11650 * pt-msgrcv.c: Removed.
11651 * pt-msgsnd.c: Removed.
11652 * pt-msync.c: Removed.
11653 * pt-nanosleep.c: Removed.
11654 * pt-open64.c: Removed.
11655 * pt-pause.c: Removed.
11656 * pt-pread.c: Removed.
11657 * pt-pread64.c: Removed.
11658 * pt-pwrite.c: Removed.
11659 * pt-pwrite64.c: Removed.
11660 * pt-read.c: Removed.
11661 * pt-recv.c: Removed.
11662 * pt-recvfrom.c: Removed.
11663 * pt-recvmsg.c: Removed.
11664 * pt-send.c: Removed.
11665 * pt-sendto.c: Removed.
11666 * pt-sigtimedwait.c: Removed.
11667 * pt-sigwait.c: Removed.
11668 * pt-wait.c: Removed.
11669 * pt-waitpid.c: Removed.
11670 * pt-write.c: Removed.
11671 * pt-accept.c: Removed.
11672 * pt-close.c: Removed.
11673 * pt-connect.c: Removed.
11674 * pt-lseek64.c: Removed.
11675 * pt-sendmsg.c: Removed.
11676 * pt-tcdrain.c: Removed.
11677
6ee8d334
UD
116782002-12-15 Ulrich Drepper <drepper@redhat.com>
11679
81fa9371
UD
11680 * init.c (__pthread_initialize_minimal_internal): Renamed from
11681 __pthread_initialize_minimal. Make old name an alias. This
11682 converts a normal relocation into a relative relocation.
11683
f3015aa5
UD
11684 * pt-fcntl.c (__fcntl): Use fcntl64 syscall, not fcntl.
11685
4cbc1950
UD
11686 * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
11687 readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
11688 * Makefile (libpthread-routines): Remove pt-creat, pt-poll,
11689 pt-pselect, pt-readv, pt-select, pt-sigpause, pt-sigsuspend,
11690 pt-sigwaitinfo, pt-waitid, and pt-writev.
11691 * pt-creat.c: Removed.
11692 * pt-poll.c: Removed.
11693 * pt-pselect.c: Removed.
11694 * pt-readv.c: Removed.
11695 * pt-select.c: Removed.
11696 * pt-sigpause.c: Removed.
11697 * pt-sigsuspend.c: Removed.
11698 * pt-sigwaitinfo.c: Removed.
11699 * pt-waitid.c: Removed.
11700 * pt-writev.c: Removed.
11701
8454830b
UD
11702 * init.c (pthread_functions): New variable.
11703 (__pthread_initialize_minimal): Pass pointer to pthread_functions
11704 (or NULL) to __libc_pthread_init.
11705 * forward.c: Rewrite to use __libc:pthread_functions array to get
11706 function addresses.
11707 * sysdeps/unix/sysv/linux/fork.h: Remove __libc_pthread_init
11708 prototype.
11709 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
11710 Take new parameter. Copy content of variable pointed to by it
11711 to __libc_pthread_init.
11712
11713 * pthreadP.h (struct pthread_functions): New type.
11714 (__libc_pthread_init): Declare.
11715
11716 * pthread_attr_destroy.c: Add namespace protected alias.
11717 * pthread_attr_getdetachstate.c: Likewise.
11718 * pthread_attr_getinheritsched.c: Likewise.
11719 * pthread_attr_getschedparam.c: Likewise.
11720 * pthread_attr_getschedpolicy.c: Likewise.
11721 * pthread_attr_getscope.c: Likewise.
11722 * pthread_attr_setdetachstate.c: Likewise.
11723 * pthread_attr_setinheritsched.c: Likewise.
11724 * pthread_attr_setschedparam.c: Likewise.
11725 * pthread_attr_setschedpolicy.c: Likewise.
11726 * pthread_attr_setscope.c: Likewise.
11727 * pthread_cond_broadcast.c: Likewise.
11728 * pthread_cond_destroy.c: Likewise.
11729 * pthread_cond_init.c: Likewise.
11730 * pthread_cond_signal.c: Likewise.
11731 * pthread_cond_wait.c: Likewise.
11732 * pthread_condattr_destroy.c: Likewise.
11733 * pthread_condattr_init.c: Likewise.
11734 * pthread_equal.c: Likewise.
11735 * pthread_exit.c: Likewise.
11736 * pthread_getschedparam.c: Likewise.
11737 * pthread_self.c: Likewise.
11738 * pthread_setcancelstate.c: Likewise.
11739 * pthread_setschedparam.c: Likewise.
11740 * pthread_mutex_destroy.c: Likewise.
11741 * pthread_mutex_init.c: Likewise.
11742 * pthreadP.h: Add prototypes for the aliases.
11743
0d5f4929
UD
11744 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Set
11745 multiple_threads member in correct TCB to 1.
11746
6ee8d334
UD
11747 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define
11748 SINGLE_THREAD_P. If in libc or libpthread examine multiple_thread
11749 member of thread decriptor, otherwise return unconditionally 1.
11750
2fb6444d
UD
117512002-12-14 Ulrich Drepper <drepper@redhat.com>
11752
11753 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Changes folded into the
11754 regular Linux version. Remove file.
11755 * sysdeps/unix/sysv/linux/connect.S: Likewise. Remove file.
11756 * sysdeps/unix/sysv/linux/llseek.c: Likewise. Remove file.
11757 * sysdeps/unix/sysv/linux/msgrcv.c: Likewise. Remove file.
11758 * sysdeps/unix/sysv/linux/msgsnd.c: Likewise. Remove file.
11759 * sysdeps/unix/sysv/linux/open64.c: Likewise. Remove file.
11760 * sysdeps/unix/sysv/linux/poll.c: Likewise. Remove file.
11761 * sysdeps/unix/sysv/linux/pread.c: Likewise. Remove file.
11762 * sysdeps/unix/sysv/linux/pread64.c: Likewise. Remove file.
11763 * sysdeps/unix/sysv/linux/pselect.c: Likewise. Remove file.
11764 * sysdeps/unix/sysv/linux/pwrite.c: Likewise. Remove file.
11765 * sysdeps/unix/sysv/linux/pwrite64.c: Likewise. Remove file.
11766 * sysdeps/unix/sysv/linux/readv.c: Likewise. Remove file.
11767 * sysdeps/unix/sysv/linux/recv.S: Likewise. Remove file.
11768 * sysdeps/unix/sysv/linux/recvfrom.S: Likewise. Remove file.
11769 * sysdeps/unix/sysv/linux/recvmsg.S: Likewise. Remove file.
11770 * sysdeps/unix/sysv/linux/send.S: Likewise. Remove file.
11771 * sysdeps/unix/sysv/linux/sendmsg.S: Likewise. Remove file.
11772 * sysdeps/unix/sysv/linux/sendto.S: Likewise. Remove file.
11773 * sysdeps/unix/sysv/linux/sigpause.c: Likewise. Remove file.
11774 * sysdeps/unix/sysv/linux/sigsuspend.c: Likewise. Remove file.
11775 * sysdeps/unix/sysv/linux/sigtimedwait.c: Likewise. Remove file.
11776 * sysdeps/unix/sysv/linux/sigwait.c: Likewise. Remove file.
11777 * sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise. Remove file.
11778 * sysdeps/unix/sysv/linux/system.c: Likewise. Remove file.
11779 * sysdeps/unix/sysv/linux/tcdrain.c: Likewise. Remove file.
11780 * sysdeps/unix/sysv/linux/wait.c: Likewise. Remove file.
11781 * sysdeps/unix/sysv/linux/waitid.c: Likewise. Remove file.
11782 * sysdeps/unix/sysv/linux/waitpid.c: Likewise. Remove file.
11783 * sysdeps/unix/sysv/linux/writev.c: Likewise. Remove file.
11784 * sysdeps/unix/sysv/linux/i386/fcntl.c: Likewise. Remove file.
11785
86b2dc40
UD
117862002-12-14 Jakub Jelinek <jakub@redhat.com>
11787
11788 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
11789 * sysdeps/unix/sysv/linux/open.c: Removed.
11790 * sysdeps/unix/sysv/linux/fsync.c: Removed.
11791 * sysdeps/unix/sysv/linux/lseek.c: Removed.
11792 * sysdeps/unix/sysv/linux/msync.c: Removed.
11793 * sysdeps/unix/sysv/linux/read.c: Removed.
11794 * sysdeps/unix/sysv/linux/close.c: Removed.
11795 * sysdeps/unix/sysv/linux/creat.c: Removed.
11796 * sysdeps/unix/sysv/linux/nanosleep.c: Removed.
11797 * sysdeps/unix/sysv/linux/pause.c: Removed.
11798 * sysdeps/unix/sysv/linux/select.c: Removed.
11799 * sysdeps/unix/sysv/linux/write.c: Removed.
11800
9d263d72
UD
118012002-12-14 Ulrich Drepper <drepper@redhat.com>
11802
11803 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Check multiple_threads
11804 element in TCB to see whether locking is needed.
11805
11806 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Check that
11807 MULTIPLE_THREADS_OFFSET value is correct.
11808
11809 * sysdeps/unix/sysv/linux/close.c: New file.
11810 * sysdeps/unix/sysv/linux/connect.S: New file.
11811 * sysdeps/unix/sysv/linux/creat.c: New file.
11812 * sysdeps/unix/sysv/linux/fsync.c: New file.
11813 * sysdeps/unix/sysv/linux/llseek.c: New file.
11814 * sysdeps/unix/sysv/linux/lseek.c: New file.
11815 * sysdeps/unix/sysv/linux/msgrcv.c: New file.
11816 * sysdeps/unix/sysv/linux/msgsnd.c: New file.
11817 * sysdeps/unix/sysv/linux/msync.c: New file.
11818 * sysdeps/unix/sysv/linux/nanosleep.c: New file.
11819 * sysdeps/unix/sysv/linux/open.c: New file.
11820 * sysdeps/unix/sysv/linux/open64.c: New file.
11821 * sysdeps/unix/sysv/linux/pause.c: New file.
11822 * sysdeps/unix/sysv/linux/poll.c: New file.
11823 * sysdeps/unix/sysv/linux/pread.c: New file.
11824 * sysdeps/unix/sysv/linux/pread64.c: New file.
11825 * sysdeps/unix/sysv/linux/pselect.c: New file.
11826 * sysdeps/unix/sysv/linux/pwrite.c: New file.
11827 * sysdeps/unix/sysv/linux/pwrite64.c: New file.
11828 * sysdeps/unix/sysv/linux/readv.c: New file.
11829 * sysdeps/unix/sysv/linux/recv.S: New file.
11830 * sysdeps/unix/sysv/linux/recvfrom.S: New file.
11831 * sysdeps/unix/sysv/linux/recvmsg.S: New file.
11832 * sysdeps/unix/sysv/linux/select.c: New file.
11833 * sysdeps/unix/sysv/linux/send.S: New file.
11834 * sysdeps/unix/sysv/linux/sendmsg.S: New file.
11835 * sysdeps/unix/sysv/linux/sendto.S: New file.
11836 * sysdeps/unix/sysv/linux/sigpause.c: New file.
11837 * sysdeps/unix/sysv/linux/sigsuspend.c: New file.
11838 * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
11839 * sysdeps/unix/sysv/linux/sigwait.c: New file.
11840 * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
11841 * sysdeps/unix/sysv/linux/system.c: New file.
11842 * sysdeps/unix/sysv/linux/tcdrain.c: New file.
11843 * sysdeps/unix/sysv/linux/wait.c: New file.
11844 * sysdeps/unix/sysv/linux/waitid.c: New file.
11845 * sysdeps/unix/sysv/linux/waitpid.c: New file.
11846 * sysdeps/unix/sysv/linux/writev.c: New file.
11847 * sysdeps/unix/sysv/linux/i386/fcntl.c: New file.
11848
11849 * pt-readv.c: Fix comment.
11850
118512002-12-14 Jakub Jelinek <jakub@redhat.com>
11852
11853 * tst-cleanup1.c: Include stdlib.h.
11854
11855 * tst-cancel5.c: New test.
11856 * Makefile (tests): Add tst-cancel5.
11857 (tst-cancel5): Link against libc.so libpthread.so in that order.
11858
9ae0909b
UD
118592002-12-13 Ulrich Drepper <drepper@redhat.com>
11860
b7bdd9c4
UD
11861 * forward.c (test_loaded): Prevent recursive calls.
11862
9ae0909b
UD
11863 * Makefile (routines): Add libc-cancellation.
11864 * libc-cancellation.c: New file.
11865 * descr.h (struct pthread): Add multiple_threads field.
11866 * allocatestack.c (allocate_stack): Initialize multiple_header field of
11867 new thread descriptor to 1.
11868 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread):
11869 Initialize multiple_thread field after successful thread creation.
11870 * cancellation.c (__do_cancel): Move to pthreadP.h.
11871 (__pthread_enable_asynccancel): Remove parameter from __do_cancel call.
11872 (__pthread_disable_asynccancel): Add internal_function attribute.
11873 * init.c (sigcancel_handler): Remove parameter from __do_cancel call.
11874 * pthread_setcancelstate.c: Likewise.
11875 * pthread_setcanceltype.c: Likewise.
11876 * pthread_exit.c: Likewise.
11877 * pthreadP.h (CANCELLATION_P): Likewise.
11878 (__do_cancel): Define as static inline.
11879 (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): New #defines.
11880 (__libc_enable_asynccancel, __libc_disable_asynccancel): New
11881 declarations.
11882 * sysdeps/i386/tls.h (tcbhead_t): Add list and multiple_threads
11883 fields. Define MULTIPLE_THREADS_OFFSET.
11884 * sysdeps/pthread/bits/libc-lock.h: Remove __libc_locking_needed
11885 declaration.
11886 * sysdeps/unix/sysv/linux/accept.S: New file.
11887 * sysdeps/unix/sysv/linux/read.c: New file.
11888 * sysdeps/unix/sysv/linux/write.c: New file.
11889 * sysdeps/unix/sysv/linux/i386/pt-socket.S: New file.
11890 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove definition and
11891 initialization of __libc_locking_needed.
11892 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't use
11893 __libc_locking_needed, use multiple_threads field in TCB.
11894 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
11895
22f20674
UD
118962002-12-12 Ulrich Drepper <drepper@redhat.com>
11897
2ad2e1e7
UD
11898 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: Use i486
11899 version.
11900 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: Likewise.
11901
22f20674
UD
11902 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Correct
11903 access to __libc_locking_needed for PIC.
11904
aa80bf86
UD
119052002-12-12 Jakub Jelinek <jakub@redhat.com>
11906
11907 * sysdeps/pthread/bits/libc-lock.h (__libc_locking_needed): Only
11908 declare for libc.so.
11909 (__libc_lock_init, __libc_lock_init_recursive): Change into comma
11910 expression.
11911 (__libc_lock_lock): Put into statement expression.
11912 (__libc_lock_unlock): Remove trailing semicolon.
11913 * sysdeps/unix/sysv/linux/fork.h (__libc_pthread_init): Fix typo.
11914
24021373
RM
119152002-12-12 Roland McGrath <roland@redhat.com>
11916
11917 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use asm operand with
11918 "m" constraint to refer to __libc_locking_needed. Declare it here.
11919
14e7aece
UD
119202002-12-12 Ulrich Drepper <drepper@redhat.com>
11921
11922 * sysdeps/unix/sysv/linux/fork-gen.c: Renamed to...
11923 * sysdeps/unix/sysv/linux/libc_pthread_init.c: ...this.
11924 Initialize __libc_locking_needed.
11925 * init.c (__pthread_initialize_minimal): Call __libc_pthread_init
11926 instead of __register_pthread_fork_handler.
11927 * sysdeps/pthread/bits/libc-lock.h: Declare __libc_locking_needed.
11928 * sysdeps/unix/sysv/linux/Makefile (sysdep_routimes): Replace
11929 fork-gen with libc_pthread_init.
11930 * sysdeps/unix/sysv/linux/Versions: Use __libc_pthread_init instead
11931 of __register_pthread_fork_handler.
11932 * sysdeps/unix/sysv/linux/fork.h: Declare __libc_pthread_init instead
11933 of __register_pthread_fork_handler.
11934 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use
11935 __libc_locking_needed to determine whether lock prefix can be avoided.
11936 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
11937
85631c8e
UD
119382002-12-11 Ulrich Drepper <drepper@redhat.com>
11939
da63009e
UD
11940 * Makefile (tests): Add tst-cleanup1.
11941 * tst-cleanup1.c: New file.
11942 * cancellation.c (__cleanup_thread): Removed.
11943 (__do_cancel): Remove call to __cleanup_thread.
11944 * pthreadP.h: Remove __cleanup_thread prorotype.
11945
000160a2
UD
11946 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
11947 Remember function and argument even if cancellation handler
11948 function is not available.
11949 (__libc_cleanup_region_end): Execute registered function directly if
11950 pthread functions are not available.
11951 (__libc_cleanup_end): Likewise.
11952
85631c8e
UD
11953 * init.c (__pthread_initialize_minimal): Fix initialization in
11954 static lib by preventing gcc from being too clever.
11955
dce8f2b6
UD
119562002-12-10 Ulrich Drepper <drepper@redhat.com>
11957
34a075be
UD
11958 * init.c (__pthread_initialize_minimal): Remove unneccesary
11959 sigaddset call.
11960
dce8f2b6
UD
11961 * Makefile (tests): We can run tst-locale2 now.
11962
e5e45b53
UD
119632002-12-09 Ulrich Drepper <drepper@redhat.com>
11964
11965 * Versions: Remove duplicated sigwait entry.
11966
bdb04f92
UD
119672002-12-08 Ulrich Drepper <drepper@redhat.com>
11968
1e506629
UD
11969 * pthreadP.h: Enable pthread_cleanup_{push,pop} optimizations only
11970 inside libpthread.
11971
a3957dd5
UD
11972 * pt-fcntl.c (__fcntl): Initialize oldtype to avoid warning.
11973
bdb04f92
UD
11974 * pthreadP.h: Declare __pthread_enable_asynccancel and
11975 __pthread_disable_asynccancel.
11976 (CANCEL_ASYNC): Use __pthread_enable_asynccancel.
11977 (CANCEL_RESET): Use __pthread_disable_asynccancel.
11978 * cancellation.c (__pthread_enable_asynccancel): New function.
11979 (__pthread_disable_asynccancel): New function.
11980 * pt-accept.c: Adjust for CANCEL_ASYNC and CANCEL_RESET change.
11981 * pt-close.c: Likewise.
11982 * pt-connect.c: Likewise.
11983 * pt-creat.c: Likewise.
11984 * pt-fcntl.c: Likewise.
11985 * pt-fsync.c: Likewise.
11986 * pt-lseek.c: Likewise.
11987 * pt-lseek64.c: Likewise.
11988 * pt-msgrcv.c: Likewise.
11989 * pt-msgsnd.c: Likewise.
11990 * pt-msync.c: Likewise.
11991 * pt-nanosleep.c: Likewise.
11992 * pt-open.c: Likewise.
11993 * pt-open64.c: Likewise.
11994 * pt-pause.c: Likewise.
11995 * pt-poll.c: Likewise.
11996 * pt-pread.c: Likewise.
11997 * pt-pread64.c: Likewise.
11998 * pt-pselect.c: Likewise.
11999 * pt-pwrite.c: Likewise.
12000 * pt-pwrite64.c: Likewise.
12001 * pt-read.c: Likewise.
12002 * pt-readv.c: Likewise.
12003 * pt-recv.c: Likewise.
12004 * pt-recvfrom.c: Likewise.
12005 * pt-recvmsg.c: Likewise.
12006 * pt-select.c: Likewise.
12007 * pt-send.c: Likewise.
12008 * pt-sendmsg.c: Likewise.
12009 * pt-sendto.c: Likewise.
12010 * pt-sigpause.c: Likewise.
12011 * pt-sigsuspend.c: Likewise.
12012 * pt-sigtimedwait.c: Likewise.
12013 * pt-sigwait.c: Likewise.
12014 * pt-sigwaitinfo.c: Likewise.
12015 * pt-system.c: Likewise.
12016 * pt-tcdrain.c: Likewise.
12017 * pt-wait.c: Likewise.
12018 * pt-waitid.c: Likewise.
12019 * pt-waitpid.c: Likewise.
12020 * pt-write.c: Likewise.
12021 * pt-writev.c: Likewise.
a3957dd5
UD
12022 * pthread_join.c: Likewise.
12023 * pthread_timedjoin.c: Likewise.
bdb04f92
UD
12024
12025 * pt-sigpause.c (sigsuspend): Call __sigsuspend.
12026 (__xpg_sigpause): New function.
12027 * Versions (libpthread:GLIBC_2.3.2): Add __xpg_sigpause.
12028
6ccb3834
UD
120292002-12-07 Ulrich Drepper <drepper@redhat.com>
12030
09efc3ba
UD
12031 * Makefile (CFLAGS-ftrylockfile.c): Add -D_IO_MTSAFE_IO.
12032
12033 * cleanup.c: Move declarations of _GI_pthread_cleanup_push and
12034 _GI_pthread_cleanup_pop to pthreadP.h.
12035
12036 * ftrylockfile.c: Use _IO_lock_trylock instead of
12037 pthread_mutex_trylock.
12038
12039 * pthreadP.h (CANCEL_ASYNC): Use __pthread_setcanceltype.
12040 (CANCEL_RESET): Likewise.
12041 (__pthread_setcanceltype_): Declare.
12042 (__pthread_mutex_lock_internal): Declare.
12043 (__pthread_mutex_unlock_internal): Declare.
12044 (__pthread_once_internal): Declare.
12045 (pthread_cleanup_push): Redefine using _GI_pthread_cleanup_push.
12046 (pthread_cleanup_pop): Redefine using _GI_pthread_cleanup_pop.
12047
12048 * pthread_cond_timedwait.c: Use INTUSE is calls to pthread_mutex_lock
12049 and pthread_mutex_unlock.
12050 * pthread_cond_wait.c: Likewise.
12051 * pthread_mutex_lock.c: Use INTDEF to define alias if needed.
12052 * pthread_mutex_unlock.c: Likewise.
12053
12054 * pthread_setcanceltype.c: Add additional alias
12055 __pthread_setcanceltype.
12056
12057 * sem_unlink.c (sem_unlink): Use __pthread_once with INTDEF.
12058 * sem_open.c (sem_open): Likewise.
12059 Use __libc_open, __libc_write, and __libc_close instead of
12060 open, write, and close respectively.
12061
12062 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_trylock_internal):
12063 Rewrite as statement expression since it must return a value.
12064
12065 * pthread_cancel.c: Use __pthread_kill instead of pthread_kill.
12066 * sysdeps/unix/sysv/linux/pthread_kill.c: Define additional alias
12067 __pthread_kill.
12068
12069 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Define additional
12070 alias __pthread_once_internal.
12071
6ccb3834
UD
12072 * sysdeps/unix/sysv/linux/raise.c: Use libc_hidden_def for raise.
12073
d3c9f895
UD
120742002-12-06 Ulrich Drepper <drepper@redhat.com>
12075
4614167a
UD
12076 * Makefile (tests): Add tst-stdio1 and tst-stdio2.
12077 * tst-stdio1.c: New file.
12078 * tst-stdio2.c: New file.
12079
a4548cea
UD
12080 * init.c (__pthread_initialize_minimal): Correct INIT_LIST_HEAD use.
12081
d3c9f895
UD
12082 * Makefile (tests): Comment out tst-locale2 for now.
12083 (CFLAGS-flockfile.c, CFLAGS-funlockfile.c): Define to -D_IO_MTSAFE_IO.
12084
12085 * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-fork.c to
12086 -D_IO_MTSAFE_IO.
12087 * sysdeps/unix/sysv/linux/fork.c: Include <bits/stdio-lock.h>.
12088 Use _IO_lock_init instead of explicit assignment.
12089
12090 * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
12091 Define __libc_lock_* and __libc_lock_recursive macros with
12092 lowlevellock macros, not pthread mutexes.
12093
12094 * flockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_lock instead
12095 of pthread_mutex_lock.
12096 * funlockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_unlock
12097 instead of pthread_mutex_unlock.
12098
fde89ad0
RM
120992002-12-06 Roland McGrath <roland@redhat.com>
12100
12101 * allocatestack.c (__stack_user): Use uninitialized defn.
12102 * init.c (__pthread_initialize_minimal): Initialize it here.
12103
11767d47
RM
121042002-12-05 Roland McGrath <roland@redhat.com>
12105
fde89ad0
RM
12106 * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
12107 string.
12108 * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
12109
11767d47
RM
12110 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Add
12111 missing & here too.
12112
440d8bc2
UD
121132002-12-05 Ulrich Drepper <drepper@redhat.com>
12114
12115 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
12116 lowlevellock.
12117 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: New file.
12118 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: New file.
12119 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: New file.
12120 * sysdeps/pthread/bits/libc-lock.h: Use lowlevellock implementation
12121 for __libc_lock_* macros.
12122 * Makefile (routines): Add libc-lowlevellock.
12123
121242002-10-09 Roland McGrath <roland@redhat.com>
12125
12126 * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
12127 Under [__PIC__], call the function via the pointer fetched for
12128 comparison rather than a call by name that uses the PLT.
12129 (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
12130 (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
12131 (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
12132 (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
12133 (__libc_key_create, __libc_getspecific, __libc_setspecific): Use it.
12134
d5ed0118
RM
121352002-12-04 Roland McGrath <roland@redhat.com>
12136
12137 * forward.c (pthread_self): Use FORWARD3 macro to correct return type.
12138
12139 * sysdeps/i386/td_ta_map_lwp2thr.c: Moved from ../nptl_db.
12140 * sysdeps/generic/td_ta_map_lwp2thr.c: New file.
12141
12142 * pthread_create.c (start_thread): Add missing & on __nptl_last_event.
12143
eaa4099f
UD
121442002-12-04 Ulrich Drepper <drepper@redhat.com>
12145
12146 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Make pthread_t
12147 a completely opaque, non-integer type.
12148 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
12149
33b5d0cc
UD
121502002-12-05 Jakub Jelinek <jakub@redhat.com>
12151
12152 * sysdeps/i386/tls.h: Include stdlib.h.
12153 * sysdeps/x86_64/tls.h: Likewise.
12154
7a5cdb30
UD
121552002-12-04 Ulrich Drepper <drepper@redhat.com>
12156
c4a6d859
UD
12157 * Makefile (tests): Add tst-locale2.
12158 (tests-static): Likewise.
12159 * tst-locale2.c: New file.
12160
7a5cdb30
UD
12161 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Mark asms as
12162 volatile and add memory clobbers to lock operations.
12163
d82d5d12
UD
121642002-12-03 Ulrich Drepper <drepper@redhat.com>
12165
69cae3cf
UD
12166 * sysdeps/i386/i686/bits/atomic.h: Use i486 version.
12167 * sysdeps/i386/i486/bits/atomic.h: New file.
12168 * sysdeps/i386/i586/bits/atomic.h: New file.
12169 * sysdeps/i386/i686/pthread_spin_trylock.S: Define HAVE_CMOV and
12170 include i486 version.
12171 * sysdeps/i386/i486/pthread_spin_trylock.S: New file.
12172 * sysdeps/i386/i586/pthread_spin_trylock.S: New file.
c97c64de 12173 Patch by Marijn Ros <marijn@mad.scientist.com>.
69cae3cf 12174
e4044c01
UD
12175 * allocatestack.c (get_cached_stack): Don't crash if we first
12176 found a stack with a larger size then needed.
12177 Reported by Hui Huang <hui.huang@sun.com>.
12178
d82d5d12
UD
12179 * Makefile (tests): Add tst-sysconf.
12180 * tst-sysconf.c: New file.
12181
12182 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine
12183 PTHREAD_THREADS_MAX.
12184
fa9a4ff0
RM
121852002-12-02 Roland McGrath <roland@redhat.com>
12186
12187 * pthreadP.h (__stack_user, __nptl_create_event, __nptl_death_event):
12188 Declare using hidden_proto instead of attribute_hidden, so there are
12189 non-.hidden static symbols for gdb to find.
12190 (__pthread_keys): Likewise.
12191 * events.c (__nptl_create_event, __nptl_death_event): Add hidden_def.
12192 * allocatestack.c (__stack_user): Likewise.
12193 * pthread_create.c (__pthread_keys): Likewise.
12194 (__nptl_threads_events, __nptl_last_event): Make these static instead
12195 of hidden.
12196 * pthread_key_create.c (__pthread_pthread_keys_max,
12197 __pthread_pthread_key_2ndlevel_size): Renamed from __linuxthreads_*.
12198
91949a33
UD
121992002-12-02 Ulrich Drepper <drepper@redhat.com>
12200
c22b52fa
UD
12201 * Makefile (tests): Add tst-locale1. If buid-static is yes link
12202 statically.
12203 * tst-locale1.c: New file.
12204
beb6aa41
UD
12205 * pthread_cond_timedwait.c: Include <stdlib.h>.
12206
91949a33
UD
12207 * Makefile (tests): Add tst-fork2 and tst-fork3.
12208 * tst-fork2.c: New file.
12209 * tst-fork3.c: New file.
12210
654dff90
UD
122112002-11-28 Ulrich Drepper <drepper@redhat.com>
12212
cb0e76b4
UD
12213 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
12214
12215 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
12216 require it to 200112L.
12217
12218 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Use cmov
12219 instruction only if HAVE_CMOV is defined.
12220 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Define HAVE_CMOV.
12221
975aa229
UD
12222 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: New file.
12223
654dff90
UD
12224 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: New file.
12225
12226 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: New file.
12227
12228 * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: New file.
12229
a3931336
UD
122302002-11-27 Ulrich Drepper <drepper@redhat.com>
12231
c10c099c
UD
12232 * sysdeps/x86_64/bits/atomic.h: New file.
12233
12234 * sysdeps/i386/i686/bits/atomic.h: Fix asm syntax for 8- and
12235 16-bit operations.
12236
dca99d27
UD
12237 * sysdeps/unix/sysv/linux/raise.c (raise): Use INTERNAL_SYSCALL if
12238 possible since gettid cannot fail.
12239
f78deea6
UD
12240 * sysdeps/x86_64/pthreaddef.h: New file.
12241
12242 * sysdeps/i386/pthreaddef.h (gettid): Removed.
12243
12244 * sysdeps/x86_64/pthread_spin_init.c: New file.
12245 * sysdeps/x86_64/pthread_spin_lock.c: New file.
12246 * sysdeps/x86_64/pthread_spin_trylock.c: New file.
12247 * sysdeps/x86_64/pthread_spin_unlock.c: New file.
12248
12249 * sysdeps/i386/i686/pthread_spin_trylock.S (pthread_spin_trylock):
12250 Add missing lock prefix. Minute optimization.
12251
12252 * tst-spin2.c (main): Also check successful trylock call.
12253
12254 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use correct
12255 syscall. Fix typo in case INTERNAL_SYSCALL is not used.
12256
12257 * sysdeps/i386/pthread_spin_destroy.c: Moved to...
12258 * sysdeps/pthread/pthread_spin_destroy.c: ...here. New file.
12259
12260 * sysdeps/i386/pthread_sigmask.c: Removed. Use the generic code.
12261 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Return correct
12262 value in case of an error. Add support for INTERNAL_SYSCALL.
b54e18eb
UD
12263
12264 * sysdeps/i386/pthread_sigmask.c (pthread_sigmask): Return correct
12265 value in case of an error.
12266
a3931336
UD
12267 * sysdeps/x86_64/tls.h: New file.
12268
76a50749
UD
122692002-11-26 Ulrich Drepper <drepper@redhat.com>
12270
117c452c
UD
12271 * sysdeps/i386/tls.h (THREAD_GETMEM_NC): Change interface. It now
12272 takes the array member name and the index as parameters.
12273 (THREAD_SETMEM_NC): Likewise.
12274 * pthread_getspecific.c: Use new THREAD_GETMEM_NC interface.
12275 * pthread_setspecific.c: Use new THREAD_GETMEM_NC and THREAD_SETMEM_NC
12276 interfaces.
12277
12278 * sysdeps/i386/tls.h (THREAD_SETMEM): Use size of member element
12279 to decide which code to use.
12280 (THREAD_SETMEM_NC): Likewise.
12281
76a50749
UD
12282 * allocatestack.c (queue_stack): Don't remove stack from list here.
12283 Do it in the caller. Correct condition to prematurely terminate
12284 loop to free stacks.
12285 (__deallocate_stack): Remove stack from list here.
12286
122872002-11-26 Ulrich Drepper <drepper@redhat.com>
12288
12289 * Makefile (tests): Add tst-stack1.
12290 * tst-stack1.c: New file.
12291
12292 * allocatestack.c (allocate_stack): Initialize the TCB on a user
12293 provided stack.
12294
12295 * pthread_attr_getstack.c: Return bottom of the thread area.
12296
122972002-11-25 Ulrich Drepper <drepper@redhat.com>
12298
12299 * Makefile (libpthread-routines): Add pt-allocrtsig and
12300 pthread_kill_other_threads.
12301 * pt-allocrtsig.c: New file.
12302 * pthread_kill_other_threads.c: New file.
12303 * sysdeps/unix/sysv/linux/allocrtsig.c: Add additional aliases for
12304 all three functions.
12305 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
12306 allocrtsig.
12307 * sysdeps/unix/sysv/linux/Versions (libc:GLIBC_PRIVATE): Export
12308 __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
12309 and __libc_allocate_rtsig_private.
12310 * Versions (libpthread): Export pthread_kill_other_threads_np,
12311 __libc_current_sigrtmin, and __libc_current_sigrtmax.
12312
123132002-11-24 Ulrich Drepper <drepper@redhat.com>
12314
12315 * allocatestack.c (allocate_stack): stackaddr in attribute points to
12316 the end of the stack. Adjust computations.
12317 When mprotect call fails dequeue stack and free it.
12318 * pthread_attr_setstack.c: Store top of the stack in stackaddr
12319 attribute.
12320 * pthread_getattr_np.c: Likewise.
12321
12322 * descr.h (IS_DETACHED): Add some more parenthesis to prevent
12323 surprises.
12324
123252002-11-23 Ulrich Drepper <drepper@redhat.com>
12326
12327 * sysdeps/pthread/pthread.h (pthread_self): __THROW must come before
12328 attribute definitions. Patch by Luca Barbieri <ldb@ldb.ods.org>.
12329
123302002-11-22 Ulrich Drepper <drepper@redhat.com>
12331
12332 * pthread_getspecific.c: Optimize access to first 2nd-level array.
12333 * pthread_setspecific.c: Likewise.
12334
123352002-11-21 Ulrich Drepper <drepper@redhat.com>
12336
12337 * sysdeps/unix/sysv/linux/i386/createthread.c: Remove CLONE_ flags
12338 definitions. Get them from the official place.
12339 * sysdeps/unix/sysv/linux/i386/fork.c: Likewise.
12340
12341 * sysdeps/unix/sysv/linux/i386/createthread.c: Update CLONE_* flags.
12342 Use new CLONE_ flags in clone() calls.
12343
12344 * sysdeps/unix/sysv/linux/fork.c: Use ARCH_FORK to actually fork.
12345 * sysdeps/unix/sysv/linux/i386/fork.c: New file.
12346
12347 * Versions: Add pthread_* functions for libc.
12348 * forward.c: New file.
12349
12350 * sysdeps/pthread/Makefile (libpthread-sysdeps_routines): Add
12351 errno-loc.
12352 * herrno.c: New file.
12353 * res.c: New file.
12354
12355 * Makefile (libpthread-routines): Remove sem_post, sem_wait,
12356 sem_trywait, and sem_timedwait. Add herrno and res.
12357 * sem_init.c: Don't initialize lock and waiters members.
12358 * sem_open.c: Likewise.
12359 * sem_post.c: Removed.
12360 * sem_wait.c: Removed.
12361 * sem_trywait.c: Removed.
12362 * sem_timedwait.c: Removed.
12363 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Complete rewrite.
12364 Includes full implementations of sem_post, sem_wait, sem_trywait,
12365 and sem_timedwait.
12366 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Adjust
12367 for new implementation.
12368 * sysdeps/unix/sysv/linux/internaltypes.h (struct sem): Remove lock
12369 and waiters fields.
12370
12371 * tst-sem3.c: Improve error message.
12372 * tst-signal3.c: Likewise.
12373
12374 * init.c (__pthread_initialize_minimal): Use set_tid_address syscall
12375 to tell the kernel about the termination futex and to initialize tid
12376 member. Don't initialize main_thread.
12377 * descr.h (struct pthread): Remove main_thread member.
12378 * cancelllation.c (__do_cancel): Remove code handling main thread.
12379 The main thread is not special anymore.
12380
12381 * allocatestack.c (__reclaim_stacks): Mark stacks as unused. Add
12382 size of the stacks to stack_cache_actsize.
12383
12384 * pt-readv.c: Add missing "defined".
12385 * pt-sigwait.c: Likewise.
12386 * pt-writev.c: Likewise.
12387
123882002-11-09 Ulrich Drepper <drepper@redhat.com>
12389
12390 * Versions: Export __connect from libpthread.
12391 Patch by Luca Barbieri <ldb@ldb.ods.org>.
12392
12393 * Makefile (libpthread-routines): Add pt-raise.
12394 * sysdeps/unix/sysv/linux/raise.c: New file.
12395 * sysdeps/unix/sysv/linux/pt-raise.c: New file.
12396 * sysdeps/generic/pt-raise.c: New file.
12397
12398 * pthread_cond_init.c: Initialize all data elements of the condvar
12399 structure. Patch by Luca Barbieri <ldb@ldb.ods.org>.
12400
12401 * pthread_attr_init.c: Actually implement 2.0 compatibility version.
12402 * pthread_create.c: Likewise.
12403
12404 * Makefile (tests): Add tst-key1, tst-key2, tst-key3.
12405 * tst-key1.c: New file.
12406 * tst-key2.c: New file.
12407 * tst-key3.c: New file.
12408
12409 * Versions: Export pthread_detach for version GLIBC_2.0.
12410 Reported by Saurabh Desai <sdesai@austin.ibm.com>.
12411
124122002-11-08 Ulrich Drepper <drepper@redhat.com>
12413
12414 * pthread_key_create.c: Terminate search after an unused key was found.
12415 Patch by Luca Barbieri <ldb@ldb.ods.org>.
12416
12417 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Return zero.
12418 Patch by Luca Barbieri <ldb@ldb.ods.org>.
12419
124202002-10-10 Ulrich Drepper <drepper@redhat.com>
12421
12422 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Use slow generic
12423 dynamic lookup for errno in PIC.
12424
12425 * allocatestack.c (get_cached_stack): Rearrange code slightly to
12426 release the stack lock as soon as possible.
12427 Call _dl_allocate_tls_init for TCB from the cache to re-initialize
12428 the static TLS block.
12429 (allocate_stack): Call _dl_allocate_tls_init for user-provided stack.
12430
12431 * cancellation.c: Renamed from cancelation.c.
12432 * Makefile: Adjust accordingly.
12433 * pthreadP.h (CANCELLATION_P): Renamed from CANCELATION_P.
12434 * cleanup_defer.c: Use CANCELLATION_P.
12435 * pthread_testcancel.c: Likewise.
12436 * descr.h: Fix spelling in comments.
12437 * init.c: Likewise.
12438 * pthread_getattr_np.c: Likewise.
12439 * pthread_getschedparam.c: Likewise.
12440 * pthread_setschedparam.c: Likewise.
12441 * Versions: Likewise.
12442
12443 * pt-pselect.c: New file.
12444 * Makefile (libpthread-routines): Add pt-pselect.
12445 * Versions: Add pselect.
12446
12447 * tst-cancel4.c: New file.
12448 * Makefile (tests): Add tst-cancel4.
12449
124502002-10-09 Ulrich Drepper <drepper@redhat.com>
12451
12452 * pthread_mutex_lock.c: Always record lock ownership.
12453 * pthread_mutex_timedlock.c: Likewise.
12454 * pthread_mutex_trylock.c: Likewise.
12455
12456 * pt-readv.c: New file.
12457 * pt-writev.c: New file.
12458 * pt-creat.c: New file.
12459 * pt-msgrcv.c: New file.
12460 * pt-msgsnd.c: New file.
12461 * pt-poll.c: New file.
12462 * pt-select.c: New file.
12463 * pt-sigpause.c: New file.
12464 * pt-sigsuspend.c: New file.
12465 * pt-sigwait.c: New file.
12466 * pt-sigwaitinfo.c: New file.
12467 * pt-waitid.c: New file.
12468 * Makefile (libpthread-routines): Add pt-readv, pt-writev, pt-creat,
12469 pt-msgrcv, pt-msgsnd, pt-poll, pt-select, pt-sigpause, pt-sigsuspend,
12470 pt-sigwait, pt-sigwaitinfo, and pt-waitid.
12471 * Versions: Add all the new functions.
12472
12473 * tst-exit1.c: New file.
12474 * Makefile (tests): Add tst-exit1.
12475
12476 * sem_timedwait.c: Minor optimization for more optimal fastpath.
12477
124782002-10-08 Ulrich Drepper <drepper@redhat.com>
12479
12480 * pt-fcntl.c: Only enable asynchronous cancellation for F_SETLKW.
12481
12482 * pthread_join.c: Enable asynchronous cancellation around lll_wait_tid
12483 call. pthread_join is an official cancellation point.
12484 * pthread_timedjoin.c: Likewise.
12485
12486 * pthread_cond_wait.c: Revert order in which internal lock are dropped
12487 and the condvar's mutex are retrieved.
12488 * pthread_cond_timedwait.c: Likewise.
12489 Reported by dice@saros.East.Sun.COM.
12490
124912002-10-07 Ulrich Drepper <drepper@redhat.com>
12492
12493 * pthreadP.h: Cut out all type definitions and move them...
12494 * sysdeps/unix/sysv/linux/internaltypes.h: ...here. New file.
12495 * pthreadP.h: Include <internaltypes.h>.
12496
12497 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Little
12498 performance tweaks.
12499
12500 * sem_trywait.c: Shuffle #includes around to get right order.
12501 * sem_timedwait.c: Likewise.
12502 * sem_post.c: Likewise.
12503 * sem_wait.c: Likewise.
12504
12505 * nptl 0.3 released.
12506
12507 * Makefile (tests): Add tst-signal3.
12508 * tst-signal3.c: New file.
12509
125102002-10-05 Ulrich Drepper <drepper@redhat.com>
12511
12512 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Tell the compiler that
12513 the asms modify the sem object.
12514 (__lll_sem_timedwait): Now takes struct sem* as first parameter.
12515
12516 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h (sem_t): Don't expose
12517 the actual members.
12518 * pthreadP.h (struct sem): New type. Actual semaphore type.
12519 * semaphoreP.h: Include pthreadP.h.
12520 * sem_getvalue.c: Adjust to sem_t change.
12521 * sem_init.c: Likewise.
12522 * sem_open.c: Likewise.
12523 * sem_post.c: Likewise.
12524 * sem_timedwait.c: Likewise.
12525 * sem_trywait.c: Likewise.
12526 * sem_wait.c: Likewise.
12527
125282002-10-04 Ulrich Drepper <drepper@redhat.com>
12529
12530 * Makefile (tests): Add tst-basic2, tst-exec1, tst-exec3, tst-exec3.
12531 * tst-basic2.c: New file.
12532 * tst-exec1.c: New file.
12533 * tst-exec2.c: New file.
12534 * tst-exec3.c: New file.
12535
12536 * tst-fork1.c: Remove extra */.
12537
12538 * nptl 0.2 released. The API for IA-32 is complete.