]> git.ipfire.org Git - thirdparty/glibc.git/blame - nptl/ChangeLog
Support cross-testing.
[thirdparty/glibc.git] / nptl / ChangeLog
CommitLineData
cc1290d0
JM
12012-10-24 Joseph Myers <joseph@codesourcery.com>
2 Jim Blandy <jimb@codesourcery.com>
3
4 * Makefile ($(objpfx)tst-tls6.out): Pass $(test-wrapper-env) to
5 tst-tls6.sh.
6 * tst-tls6.sh (test_wrapper_env): New variable. Use it to run
7 programs with LD_PRELOAD set.
8
6e6249d0
RM
92012-10-24 Roland McGrath <roland@hack.frob.com>
10
11 * Makefile ($(objpfx)tst-cond11, $(objpfx)tst-cond19): Targets removed.
12 ($(objpfx)tst-sem5, $(objpfx)tst-cancel18): Likewise.
13 ((objpfx)tst-cancelx18, $(objpfx)tst-clock2): Likewise.
14 ($(objpfx)tst-rwlock14): Likewise.
15
0bf57f87
JM
162012-10-24 Joseph Myers <joseph@codesourcery.com>
17
18 * Makefile (tests): Remove tst-oddstacklimit.
19 (test-srcs): New variable.
20 (tst-oddstacklimit-ENV): Remove.
21 [$(run-built-tests) = yes] (tests): Depend on
22 $(objpfx)tst-oddstacklimit.out.
23 [$(run-built-tests) = yes] ($(objpfx)tst-oddstacklimit.out): New
24 target.
25 * tst-oddstacklimit.c: Do not include "tst-basic1.c". Use
26 setrlimit before executing tst-basic1 test passed to --command.
27
03ac099f
JM
282012-10-23 Joseph Myers <joseph@codesourcery.com>
29
30 * Makefile [$(cross-compiling) = no]: Change condition to
31 [$(run-built-tests) = yes].
32
166bca24
JB
332012-10-23 Jim Blandy <jimb@codesourcery.com>
34 Joseph Myers <joseph@codesourcery.com>
35
36 * Makefile (tst-cancel7-ARGS): Use $(host-built-program-cmd).
37 (tst-exec4-ARGS): Likewise.
38 (tst-stackguard1-ARGS): Likewise.
39
aba75984
JB
402012-10-21 Jim Blandy <jimb@codesourcery.com>
41 Joseph Myers <joseph@codesourcery.com>
42
43 * Makefile ($(objpfx)tst-cancel-wrappers.out): Pass $(NM) to
44 tst-cancel-wrappers.sh.
45 * tst-cancel-wrappers.sh: Use nm program given as first argument,
46 not hardcoded "nm".
47
37785907
SP
482012-10-17 Siddhesh Poyarekar <siddhesh@redhat.com>
49
370539fb 50 * tst-cond25.c (do_test_wait): Don't check for return value from
37785907
SP
51 pthread_cancel.
52
9485a404
SP
532012-10-16 Siddhesh Poyarekar <siddhesh@redhat.com>
54
55 [BZ #14652]
56 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
57 (__condvar_tw_cleanup): Adjust the mutex data structure if it
58 was locked by FUTEX_WAIT_REQUEUE_PI.
59 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait
60 (__condvar_w_cleanup): Likewise.
61 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
62 (__condvar_cleanup2): Likewise.
63 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
64 (__condvar_cleanup1): Likewise.
65
0d522f64
CD
662012-10-10 Carlos O'Donell <carlos@systemhalted.org>
67
54a41734
CD
68 * sysdeps/pthread/pthread.h [!(defined __GNUC__ &&
69 defined __EXCEPTIONS) && defined __USE_GNU]
70 (pthread_cleanup_push_defer_np): Fix formatting.
0d522f64 71
0e3b5d6a
SP
722012-10-10 Siddhesh Poyarekar <siddhesh@redhat.com>
73
74 [BZ #14652]
75 * Makefile (tests): New test case tst-cond25.
76 (LDFLAGS-tst-cond25): Link tst-cond25 against librt.
77 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
78 (__condvar_tw_cleanup): Lock mutex only if we don't already
79 own it.
80 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
81 (__condvar_w_cleanup): Likewise.
82 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: Add TID_MASK.
83 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
84 (__condvar_cleanup2): Lock mutex only if we don't already
85 own it.
86 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
87 (__condvar_cleanup1): Likewise.
88 * tst-cond25.c: New test case.
89
b8493de0
RM
902012-10-09 Roland McGrath <roland@hack.frob.com>
91
92 * sysdeps/pthread/configure: Regenerated.
93 * sysdeps/x86_64/configure: Regenerated.
94
f0762164
DM
952012-10-05 David S. Miller <davem@davemloft.net>
96
97 [BZ #14568]
98 * sysdeps/sparc/tls.h (DB_THREAD_SELF_INCLUDE): Delete.
99 (DB_THREAD_SELF): Use constants for the register offsets. Correct
100 the case of a 64-bit debugger with a 32-bit inferior.
101
1d1b34df
L
1022012-10-05 H.J. Lu <hongjiu.lu@intel.com>
103
104 [BZ #14557]
105 * Makefile (tests-static): Add tst-cancel24-static,
106 tst-cond8-static tst-mutex8-static, tst-mutexpi8-static,
107 tst-sem11-static and tst-sem12-static.
108 (tests): Likewise.
109 (LDLIBS-tst-cancel24-static): New macro.
110 * tst-cancel24-static.cc: New file.
111 * tst-cond8-static.c: Likewise.
112 * tst-mutex8-static.c: Likewise.
113 * tst-mutexpi8-static.c: Likewise.
114 * tst-sem11-static.c: Likewise.
115 * tst-sem12-static.c: Likewise.
116
c30e8edf
SP
1172012-10-05 Siddhesh Poyarekar <siddhesh@redhat.com>
118
119 [BZ #14417]
120 * Makefile (tests): New test case tst-cond24.
121 (LDFLAGS-tst-cond24): Link tst-cond24 against librt.
122 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
123 (__pthread_cond_timedwait): Unlock mutex before going back to
124 wait in PI case.
125 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
126 (__pthread_cond_wait): Likewise. Revert handling of EAGAIN
127 return from futex_wait.
128 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
129 (__pthread_cond_timedwait): Unlock mutex before going back to
130 wait in PI case. Set requeue_pi flag only if wait returned 0.
131 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
132 (__pthread_cond_wait): Likewise. Revert handling of EAGAIN
133 return from futex_wait.
134 * tst-cond24.c: New test case.
135
9043e228
RM
1362012-10-04 Roland McGrath <roland@hack.frob.com>
137
138 * pthread_create.c (start_thread): Use __madvise, not madvise.
139
b2f80a47
L
1402012-10-02 H.J. Lu <hongjiu.lu@intel.com>
141
142 * sysdeps/i386/tls.h: Update copyright years.
143
adcdc775
SP
1442012-10-02 Siddhesh Poyarekar <siddhesh@redhat.com>
145
146 * pthread_create.c (start_thread): Fix clone flag name in
147 comment to CLONE_CHILD_CLEARTID.
148 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
149 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
150 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
151 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
152 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
153 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
154
55a051c9
SP
1552012-10-01 Siddhesh Poyarekar <siddhesh@redhat.com>
156
157 [BZ #14477]
158 * Makefile (tests): Add tst-cond-except.
159 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
160 (__pthread_cond_timedwait): Mark instructions where %ebx is
161 incremented in PI case.
162 (.gcc_except_table): Add entry to jump to __condvar_tw_cleanup2
163 for the marked PI case instructions.
164 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
165 (__pthread_cond_wait): Mark instructions where %ebx is
166 incremented in PI case.
167 (.gcc_except_table): Add entry to jump to __condvar_w_cleanup2
168 for the marked PI case instructions.
169 * tst-cond-except.c: New test case.
170
9a9028b1
DL
1712012-09-24 Dmitry V. Levin <ldv@altlinux.org>
172
57c69bef
DL
173 * tst-tls6.sh: Add "set -e".
174 * Makefile: Do not specify -e option when running testsuite
175 shell scripts.
176
9a9028b1
DL
177 * tst-tls6.sh: Add copyright header.
178
620f3d26
L
1792012-09-24 H.J. Lu <hongjiu.lu@intel.com>
180
181 * sysdeps/x86_64/tls.h (THREAD_SETMEM): Add "()" when casting
182 to uint64_t for 64-bit store.
183 (THREAD_SETMEM_NC): Likewise.
184
ae30640a
L
1852012-09-19 H.J. Lu <hongjiu.lu@intel.com>
186
187 * sysdeps/i386/tls.h (THREAD_SETMEM): Cast to uint64_t for
188 64-bit store.
189 (THREAD_SETMEM_NC): Likewise.
190
97bc38d7
JL
1912012-09-14 Jeff Law <law@redhat.com>
192
193 [BZ #14583]
194 * sysdeps/pthread/pthread.h: Fix prototype of __sigsetjmp.
195
9503345f
L
1962012-09-13 H.J. Lu <hongjiu.lu@intel.com>
197
198 [BZ #14576]
199 * sysdeps/pthread/bits/libc-lockP.h (__rtld_lock_init_recursive):
200 Removed.
201
e9ceaf25
L
2022012-09-07 H.J. Lu <hongjiu.lu@intel.com>
203
70d37fe0 204 * Makefile (LDFLAGS-tst-cancel24): Renamed to ...
e9ceaf25
L
205 (LDLIBS-tst-cancel24): This.
206
f5fce062
L
2072012-09-06 H.J. Lu <hongjiu.lu@intel.com>
208
209 [BZ #14545]
210 * Makefile (tests-static): Add tst-cancel21-static.
211 (tests): Likewise.
212 * tst-cancel21-static.c: New file.
213
26889eac
JM
2142012-09-01 Joseph Myers <joseph@codesourcery.com>
215
216 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c
217 [!__ASSUME_POSIX_CPU_TIMERS]: Remove conditional code.
218 [__NR_clock_getres]: Make code unconditional.
219 (pthread_getcpuclockid): Remove code left unreachable by removal
220 of conditionals.
221
033d54a2 2222012-08-31 Joseph Myers <joseph@codesourcery.com>
b2e1c562 223
033d54a2
JM
224 [BZ #14532]
225 * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Use
226 atomic_compare_and_exchange_bool_rel.
227 * tst-sem14.c: New file.
228 * Makefile (tests): Add tst-sem14.
b2e1c562 229
c75ccd4c
RM
2302012-08-15 Roland McGrath <roland@hack.frob.com>
231
232 * Makefile (CFLAGS-flockfile.c): Use $(libio-mtsafe) instead
233 of -D_IO_MTSAFE_IO.
234 (CFLAGS-ftrylockfile.c, CFLAGS-funlockfile.c): Likewise.
b2e1c562 235 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-fork.c): Likewise.
c75ccd4c 236
93a78ac4
JM
2372012-08-16 Joseph Myers <joseph@codesourcery.com>
238
239 * pthread_cond_timedwait.c (__pthread_cond_timedwait)
240 [!__ASSUME_POSIX_TIMERS]: Remove conditional code.
241 * pthread_condattr_setclock.c (pthread_condattr_setclock)
242 [!__ASSUME_POSIX_TIMERS]: Likewise.
243 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
244 (__pthread_cond_timedwait) [!__ASSUME_POSIX_TIMERS]: Likewise.
245 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c
246 [!__ASSUME_POSIX_TIMERS]: Likewise.
247 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
248 (__pthread_cond_timedwait) [!__ASSUME_POSIX_TIMERS]: Likewise.
249 * sysdeps/unix/sysv/linux/timer_create.c [__NR_timer_create]: Make
250 code unconditional.
251 [!__NR-timer_create]: Remove conditional code.
252 (timer_create) [!__ASSUME_POSIX_TIMERS]: Likewise.
253 * sysdeps/unix/sysv/linux/timer_delete.c [__NR_timer_delete]: Make
254 code unconditional.
255 [!__NR_timer_delete]: Remove conditional code.
256 (timer_delete) [!__ASSUME_POSIX_TIMERS]: Likewise.
257 * sysdeps/unix/sysv/linux/timer_getoverr.c
258 [__NR_timer_getoverrun]: Make code unconditional.
259 [!__NR_timer_getoverrun]: Remove conditional code.
260 (timer_getoverrun) [!__ASSUME_POSIX_TIMERS]: Likewise.
261 * sysdeps/unix/sysv/linux/timer_gettime.c [__NR_timer_gettime]:
262 Make code unconditional.
263 [!__NR_timer_gettime]: Remove conditional code.
264 (timer_gettime) [!__ASSUME_POSIX_TIMERS]: Likewise.
265 * sysdeps/unix/sysv/linux/timer_routines.c [__NR_timer_create]:
266 Make code unconditional.
267 [!__ASSUME_POSIX_TIMERS]: Remove conditional code.
268 * sysdeps/unix/sysv/linux/timer_settime.c [__NR_timer_settime]:
269 Make code unconditional.
270 [!__NR_timer_settime]: Remove conditional code.
271 (timer_settime) [!__ASSUME_POSIX_TIMERS]: Likewise.
272 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
273 (__pthread_cond_timedwait) [!__ASSUME_POSIX_TIMERS]: Remove
274 conditional code.
275
309becf1
MK
2762012-08-15 Tom de Vries <vries@codesourcery.com>
277 Maxim Kuvyrkov <maxim@codesourcery.com>
278
279 * sysdeps/pthread/bits/libc-lockP.h (__libc_lock_lock)
280 (__libc_lock_trylock): Allow pre-existing definitions.
281
ef400973
MK
2822012-08-15 Maxim Kuvyrkov <maxim@codesourcery.com>
283
284 * pthread_spin_lock.c: New file.
285 * pthread_spin_trylock.c: New file.
286
b36137f1
JM
2872012-08-08 Joseph Myers <joseph@codesourcery.com>
288
289 * allocatestack.c (setxid_signal_thread) [__ASSUME_TGKILL]: Make
290 code unconditional.
291 (setxid_signal_thread) [!__ASSUME_TGKILL]: Remove conditional code.
292 * pthread_cancel.c (pthread_cancel) [__ASSUME_TGKILL]: Make code
293 unconditional.
294 (pthread_cancel) [!__ASSUME_TGKILL]: Remove conditional code.
295 * sysdeps/pthread/createthread.c (do_clone) [__ASSUME_TGKILL]:
296 Make code unconditional.
297 (do_clone) [!__ASSUME_TGKILL]: Remove conditional code.
298 * sysdeps/unix/sysv/linux/pt-raise.c (raise) [__ASSUME_TGKILL ||
299 __NR_tgkill]: Make code unconditional.
300 (raise) [__ASSUME_TGKILL]: Likewise.
301 (raise) [!__ASSUME_TGKILL]: Remove conditional code.
302 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill)
303 [__ASSUME_TGKILL]: Make code unconditional.
304 (__pthread_kill) [!__ASSUME_TGKILL]: Remove conditional code.
305 * sysdeps/unix/sysv/linux/raise.c (raise) [__ASSUME_TGKILL ||
306 __NR_tgkill]: Make code unconditional.
307 (raise) [__ASSUME_TGKILL]: Likewise.
308 (raise) [!__ASSUME_TGKILL]: Remove conditional code.
309
93df14ee
JM
3102012-08-07 Joseph Myers <joseph@codesourcery.com>
311
312 * sysdeps/pthread/createthread.c (create_thread)
313 [!__ASSUME_NO_CLONE_DETACHED]: Remove conditional code.
314
85fe1997
JM
3152012-08-03 Joseph Myers <joseph@codesourcery.com>
316
317 * nptl-init.c (sigcancel_handler) [__ASSUME_CORRECT_SI_PID]: Make
318 code unconditional.
319 (sighandler_setxid) [__ASSUME_CORRECT_SI_PID]: Likewise.
320
fc56c5bb
SP
3212012-07-28 Siddhesh Poyarekar <siddhesh@redhat.com>
322
323 * tst-pthread-getattr.c (MAX_STACK_SIZE): New macro.
324 (pagesize): New static variable.
325 (allocate_and_test): Return MEM. Rename parameter to TARGET.
326 (check_stack_top): New local variables MEM and PAGEMASK. Cap
327 stack size to MAX_STACK_SIZE. Call allocate_and_test for
328 halfway up the stack top page. Verify that the top page was
329 written into.
330 (do_test): Get pagesize using sysconf.
331
842a39cd
AS
3322012-07-25 Andreas Schwab <schwab@linux-m68k.org>
333
334 * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Remove pseudo_end
335 label.
336 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Likewise.
337 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO):
338 Likewise.
339
77b32274
SP
3402012-07-25 Siddhesh Poyarekar <siddhesh@redhat.com>
341
342 * tst-pthread-getattr.c: Revert last change.
343
b2ae49da
SP
3442012-07-20 Siddhesh Poyarekar <siddhesh@redhat.com>
345
346 * tst-pthread-getattr.c (MAX_STACK_SIZE): New max cap for stack
347 size.
348 (_MIN): New macro.
349 (allocate_and_test): Return STACKADDR. Access STACKADDR instead
350 of MEM to test.
351 (check_stack_top): Read valued written into STACKADDR in
352 allocate_and_test. Cap stack size to MAX_STACK_SIZE.
353
a9843058
SP
3542012-07-19 Siddhesh Poyarekar <siddhesh@redhat.com>
355
356 * nptl-init.c (sighandler_setxid): Fix the comment that
357 describes it.
358
4b2c8da7
TS
3592012-06-23 Thomas Schwinge <thomas@codesourcery.com>
360
361 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S
362 (__lll_robust_timedlock_wait): Simplify CFI directives.
363
18b5e737
SP
3642012-06-20 Siddhesh Poyarekar <siddhesh@redhat.com>
365
366 [BZ #12416]
367 * Makefile (tests): Add test case.
368 * pthread_getattr_np.c (pthread_getattr_np): Deduct pages below
369 the __libc_stack_end page from stacksize. Truncate stacksize to
370 make it page aligned when it is computed from RLIMIT_STACK.
371 * tst-pthread-getattr.c: New test case. Verify that stackaddr is
372 accessible.
373
24a6dbed
CSLL
3742012-06-07 Carlos Sánchez de La Lama <csanchezdll@gmail.com>
375
376 [BZ #14205]
377 * sysdeps/sparc/sparc32/pthread_spin_lock.S: Do not use v9
378 branches.
379
4af3879c
SP
3802012-06-04 Siddhesh Poyarekar <siddhesh@redhat.com>
381 Jakub Jelinek <jakub@redhat.com>
382
383 [BZ #14188]
384 * sysdeps/pthread/pthread.h
385 [!(defined __GNUC__ && defined __EXCEPTIONS)]
386 (pthread_cleanup_push, pthread_cleanup_push_defer_np): Use
387 __libc_unlikely instead of __builtin_expect.
388
0e20515a
L
3892012-05-30 H.J. Lu <hongjiu.lu@intel.com>
390
391 [BZ #14117]
392 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Removed.
393 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
394 * sysdeps/unix/sysv/linux/i386/Implies: New file.
395 * sysdeps/unix/sysv/linux/x86_64/Implies: Likewise.
396 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Renamed
397 to ...
398 * sysdeps/unix/sysv/linux/x86/bits/pthreadtypes.h: This.
399 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Renamed
400 to ...
401 * sysdeps/unix/sysv/linux/x86/bits/semaphore.h: This.
402
865eac65
AS
4032012-05-30 Andreas Schwab <schwab@linux-m68k.org>
404
405 [BZ #14132]
406 * nptl-init.c (pthread_functions): Remove use of INTUSE and
407 _internal aliases.
408 (__pthread_initialize_minimal_internal): Likewise.
409 * sem_open.c: Likewise.
410 * sem_unlink.c: Likewise.
411 * pthreadP.h: Replace _internal aliases by hidden_proto
412 declarations.
413 * pthread_getspecific.c: Replace _internal alias by hidden_def.
414 * pthread_key_create.c: Likewise.
415 * pthread_mutex_destroy.c: Likewise.
416 * pthread_mutex_init.c: Likewise.
417 * pthread_mutex_lock.c: Likewise.
418 * pthread_mutex_unlock.c: Likewise.
419 * pthread_once.c: Likewise.
420 * pthread_rwlock_rdlock.c: Likewise.
421 * pthread_rwlock_unlock.c: Likewise.
422 * pthread_rwlock_wrlock.c: Likewise.
423 * pthread_setspecific.c: Likewise.
424 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S:
425 Likewise.
426 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
427 Likewise.
428 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
429 Likewise.
430 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
431 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
432 * sysdeps/unix/sysv/linux/s390/pthread_once.c: Likewise.
433 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Likewise.
434 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
435 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
436 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
437 * sysdeps/unix/sysv/linux/sparc/pthread_once.c: Likewise.
438 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
439 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S:
440 Likewise.
441 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S:
442 Likewise.
443 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S:
444 Likewise.
445
65a4de4e
CLT
4462012-05-27 Chung-Lin Tang <cltang@codesourcery.com>
447
d701a1ab
CLT
448 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO, LOAD_ARGS_1)
449 (LOAD_ARGS_2 ,LOAD_ARGS_3 ,LOAD_ARGS_4): Add CFI restores.
450
65a4de4e
CLT
451 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_lock_wait_private)
452 (__lll_lock_wait, __lll_timedlock_wait, __lll_timedwait_tid): Add CFI
453 directives.
454 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S
455 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): Likewise.
456 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
457 (pthread_barrier_wait): Likewise.
458 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
459 (__pthread_cond_broadcast): Likewise.
460 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
461 (__pthread_cond_signal): Likewise.
462 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
463 (__pthread_cond_timedwait): Likewise.
464 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S (__pthread_cond_wait):
465 Likewise.
466 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S
467 (__pthread_rwlock_rdlock): Likewise.
468 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S
469 (pthread_rwlock_timedrdlock): Likewise.
470 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S
471 (pthread_rwlock_timedwrlock): Likewise.
472 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S
473 (__pthread_rwlock_unlock): Likewise.
474 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S
475 (__pthread_rwlock_wrlock): Likewise.
476 * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post): Likewise.
477 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait): Likewise.
478 * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
479 Likewise.
480 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
481
9c6ea9fa
SP
4822012-05-26 Siddhesh Poyarekar <siddhesh@redhat.com>
483
484 [BZ #12416]
485 * nptl/pthread_getattr_np.c (pthread_getattr_np): Use
486 __libc_stack_end rounded to the end of containing page as the
487 real stack end.
488
17557282
RH
4892012-05-25 Rayson Ho <rho@redhat.com>
490
491 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Low-level SystemTap
492 probes for i386.
493 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
494 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
495 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
496 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
497 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
498 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
499 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
500 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
501
5acf7263
RM
5022012-05-25 Rayson Ho <rho@redhat.com>
503 Roland McGrath <roland@hack.frob.com>
504
505 * DESIGN-systemtap-probes.txt: New file.
506 * pthread_cond_broadcast.c: SystemTap probes.
507 * pthread_cond_init.c: Likewise.
508 * pthread_cond_signal.c: Likewise.
509 * pthread_cond_wait.c: Likewise.
510 * pthread_cond_destroy.c: Likewise.
511 * pthread_create.c: Likewise.
512 * pthread_join.c: Likewise.
513 * pthread_mutex_destroy.c: Likewise.
514 * pthread_mutex_init.c: Likewise.
515 * pthread_mutex_lock.c: Likewise.
516 * pthread_mutex_timedlock.c: Likewise.
517 * pthread_mutex_unlock.c: Likewise.
518 * pthread_rwlock_destroy.c: Likewise.
519 * pthread_rwlock_rdlock.c: Likewise.
520 * pthread_rwlock_unlock.c: Likewise.
521 * pthread_rwlock_wrlock.c: Likewise.
522 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
523 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
524 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
525 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
526 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
527 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
528 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
529 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
530
3a097cc7
RM
5312012-05-24 Roland McGrath <roland@hack.frob.com>
532
533 * pthread_create.c (start_thread): Define pthread_start LIBC_PROBE.
534
de7f5ce7
AJ
5352012-05-17 Andreas Jaeger <aj@suse.de>
536
537 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
538 (HAVE_DL_DISCOVER_OSVERSION): Don't declare _dl_discover_osversion
539 only for older kernels.
540
04807399
JM
5412012-05-15 Joseph Myers <joseph@codesourcery.com>
542
543 * pthreadP.h [!__NR_set_robust_list] (__NR_set_robust_list): Do
544 not define.
545
f16af742
L
5462012-05-15 H.J. Lu <hongjiu.lu@intel.com>
547
548 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_lock): Load
549 futex pointer into RDI_LP. Use RSP_LP to operate on stack.
550 (lll_robust_lock): Likewise.
551 (lll_cond_lock): Likewise.
552 (lll_robust_cond_lock): Likewise.
553 (lll_timedlock): Likewise.
554 (lll_robust_timedlock): Likewise.
555 (lll_unlock): Likewise.
556 (lll_robust_unlock): Likewise.
557
d9754f55
L
5582012-05-15 H.J. Lu <hongjiu.lu@intel.com>
559
560 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use
561 LP_OP(cmp) and RCX_LP on dep_mutex pointer.
562
dde05f00
L
5632012-05-15 H.J. Lu <hongjiu.lu@intel.com>
564
565 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Use LP_OP(op)
566 on NWAITERS.
567 (__gcc_personality_v0): Replace 8-byte data alignment with
568 LP_SIZE alignment and .quad with ASM_ADDR.
569
9dba3b5c
L
5702012-05-15 H.J. Lu <hongjiu.lu@intel.com>
571
572 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Use LP_OP(op)
573 on NWAITERS.
574 (__gcc_personality_v0): Replace 8-byte data alignment with
575 LP_SIZE alignment and .quad with ASM_ADDR.
576
5f658cf1
L
5772012-05-15 H.J. Lu <hongjiu.lu@intel.com>
578
579 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Use LP_OP(cmp) on
580 NWAITERS, which is unsigned long int.
581
6cae4b26
L
5822012-05-15 H.J. Lu <hongjiu.lu@intel.com>
583
584 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
585 (__gcc_personality_v0): Replace 8-byte data alignment with
586 LP_SIZE alignment and .quad with ASM_ADDR.
587
592f90e6
L
5882012-05-15 H.J. Lu <hongjiu.lu@intel.com>
589
590 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Use
591 LP_OP(cmp), RSI_LP and R8_LP on dep_mutex pointer. Load
592 __vdso_clock_gettime pointer into RAX_LP.
593 (__gcc_personality_v0): Replace 8-byte data alignment with
594 LP_SIZE alignment and .quad with ASM_ADDR.
595
0e8860ad
L
5962012-05-15 H.J. Lu <hongjiu.lu@intel.com>
597
598 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Use
599 LP_OP(cmp), RSI_LP and R8_LP on dep_mutex pointer. Load
600 __vdso_clock_gettime pointer into RAX_LP.
601 (__gcc_personality_v0): Replace 8-byte data alignment with
602 LP_SIZE alignment and .quad with ASM_ADDR.
603
30996e93
L
6042012-05-15 H.J. Lu <hongjiu.lu@intel.com>
605
606 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Use
607 LP_OP(cmp) and R8_LP on dep_mutex pointer.
608
289ac435
L
6092012-05-15 H.J. Lu <hongjiu.lu@intel.com>
610
611 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Use LP_OP(mov)
612 to update pointer in memory. Load pointer into RDI_LP.
613
10f74fbc
L
6142012-05-15 H.J. Lu <hongjiu.lu@intel.com>
615
616 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
617 (LLL_STUB_UNWIND_INFO_START): Align label to LP_SIZE instead
618 of 8.
619 (LLL_STUB_UNWIND_INFO_END): Likewise.
620 (lll_timedlock): Load timeout pointer into RDX_LP.
621 (lll_robust_timedlock): Likewise.
622
439bf404
SP
6232012-05-15 Siddhesh Poyarekar <siddhesh@redhat.com>
624 Jakub Jelinek <jakub@redhat.com>
625
626 [BZ #13613]
627 * Makefile (tests): Add test cases.
628 * descr.h (struct pthread): Add a comment describing multiple_threads.
629 * pthreadP.h (__pthread_multiple_threads): Expand comment to include
630 single-process case.
631 * pthread_cancel.c (pthread_cancel): Enable multiple_threads
632 before setting cancelstate of the thread.
633 * sysdeps/unix/sysv/linux/libc_multiple_threads.c
634 (__libc_multiple_threads): Add explanatory comment.
635 * tst-cancel-self-cancelstate.c: New test case.
636 * tst-cancel-self-canceltype.c: Likewise.
637 * tst-cancel-self-cleanup.c: Supporting file for test cases.
638 * tst-cancel-self-testcancel.c: New test case.
639 * tst-cancel-self.c: Likewise.
640 * vars.c: Expand comment to include single-process case.
641
2949684c
L
6422012-05-14 H.J. Lu <hongjiu.lu@intel.com>
643
644 * sysdeps/x86_64/tls.h: Don't include <bits/wordsize.h>.
645 (tcbhead_t): Remove __x86_64__ check. Align rtld_savespace_sse
646 to 32 bytes.
647
245a11d7
L
6482012-05-14 H.J. Lu <hongjiu.lu@intel.com>
649
650 * sysdeps/pthread/pthread.h (__PTHREAD_RWLOCK_INT_FLAGS_SHARED):
651 New.
652 (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Check
653 __PTHREAD_RWLOCK_INT_FLAGS_SHARED instead of __WORDSIZE.
654
0b254d8f
L
6552012-05-14 H.J. Lu <hongjiu.lu@intel.com>
656
657 * shlib-versions: Move x86_64-.*-linux.* entry to ...
658 * sysdeps/x86_64/64/shlib-versions: Here. New file.
659 * sysdeps/x86_64/x32/shlib-versions: New file.
660
b8caea2c
L
6612012-05-14 H.J. Lu <hongjiu.lu@intel.com>
662
663 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Define x32
664 __SIZEOF_PTHREAD_XXX_T.
665 (__pthread_internal_list): Check __x86_64__ instead of __WORDSIZE.
666 (pthread_mutex_t): Likewise.
667 (pthread_rwlock_t): Likewise.
668 (__PTHREAD_RWLOCK_INT_FLAGS_SHARED): New. Defined if __x86_64__
669 is defined.
670
60d45b36
L
6712012-05-11 H.J. Lu <hongjiu.lu@intel.com>
672
673 * sysdeps/x86_64/x32/tls.h: New file.
674
a04e06bc
L
6752012-05-11 H.J. Lu <hongjiu.lu@intel.com>
676
677 * sysdeps/x86_64/tls.h (THREAD_SETMEM): Use uint64_t on 64-bit
678 integer.
679 (THREAD_SETMEM_NC): Likewise.
680
512ec530
L
6812012-05-11 H.J. Lu <hongjiu.lu@intel.com>
682
683 * sysdeps/x86_64/tls.h (THREAD_SELF): Replace movq/%q0 with
684 mov/%0.
685
c0d2c853
L
6862012-05-11 H.J. Lu <hongjiu.lu@intel.com>
687
688 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
689 (__cleanup_fct_attribute): Check __x86_64__ instead of
eae2d36a 690 __WORDSIZE.
c0d2c853 691
1f59b0b1
L
6922012-05-11 H.J. Lu <hongjiu.lu@intel.com>
693
694 * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER): Check
695 __PTHREAD_MUTEX_HAVE_PREV instead of __WORDSIZE.
696 (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Likewise.
697 (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
698 (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
699
c252ec15
L
7002012-05-11 H.J. Lu <hongjiu.lu@intel.com>
701
702 * pthread_create.c (start_thread): Check __PTHREAD_MUTEX_HAVE_PREV
703 instead of __WORDSIZE.
704
be971a2b
TS
7052012-05-10 Thomas Schwinge <thomas@schwinge.name>
706
707 [BZ #3748]
708 * sysdeps/pthread/bits/libc-lockP.h (__libc_once_get): New macro.
709
e1b4354e
CLT
7102012-05-09 Chung-Lin Tang <cltang@codesourcery.com>
711
712 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
713 (__pthread_cond_timedwait): Use CFI directives.
714 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
715 (__pthread_cond_wait): Likewise.
716 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait): Likewise.
717 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
718
76e835cf
DM
7192012-05-03 David S. Miller <davem@davemloft.net>
720
721 * sysdeps/sparc/sparc64/pthread_spin_unlock.S: Fix thinko, we
722 always have to return 0, especially for the pthread_spin_init
723 alias.
724 * sysdeps/sparc/sparc32/pthread_spin_lock.S: Add missing trailing
725 newline.
726 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.S: Likewise.
727 * sysdeps/sparc/sparc64/pthread_spin_lock.S: Likewise.
728
e2dbf201
DM
7292012-05-02 David S. Miller <davem@davemloft.net>
730
731 * sysdeps/sparc/sparc64/pthread_spin_lock.S: New.
732 * sysdeps/sparc/sparc64/pthread_spin_lock.c: Delete.
733 * sysdeps/sparc/sparc64/pthread_spin_unlock.S: New.
734 * sysdeps/sparc/sparc64/pthread_spin_unlock.c: Delete.
735 * sysdeps/sparc/sparc64/pthread_spin_trylock.S: New.
736 * sysdeps/sparc/sparc64/pthread_spin_trylock.c: Delete.
737 * sysdeps/sparc/sparc64/pthread_spin_init.c: New.
738 * sysdeps/sparc/sparc32/pthread_spin_lock.S: New.
739 * sysdeps/sparc/sparc32/pthread_spin_lock.c: Delete.
740 * sysdeps/sparc/sparc32/pthread_spin_trylock.S: New.
741 * sysdeps/sparc/sparc32/pthread_spin_trylock.c: Delete.
742 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.S: New.
743 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: Delete.
744 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.S: New.
745 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: Delete.
746 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.S: New.
747 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: Delete.
748 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_init.c: New.
749
d4c2917f
AM
7502012-05-02 Allan McRae <allan@archlinux.org>
751
752 * Makefile: (LDFLAGS-tst-tls5): Use $(no-as-needed).
753 (LDFLAGS-tst-cancel24): Likewise.
754
b93d565a
PP
7552012-05-02 Paul Pluzhnikov <ppluzhnikov@google.com>
756
757 * sysdeps/i386/pthread_spin_lock.S: New.
758 * sysdeps/i386/pthread_spin_lock.c: Delete.
759 * sysdeps/x86_64/pthread_spin_lock.S: New.
760 * sysdeps/x86_64/pthread_spin_lock.c: Delete.
761
6d5c57fa
AS
7622012-04-28 Andreas Schwab <schwab@linux-m68k.org>
763
764 * Makefile ($(objpfx)tst-stack3-mem, $(objpfx)tst-tls6.out): Don't
765 run when cross-compiling.
766
6e236b92
SP
7672012-04-26 Siddhesh Poyarekar <siddhesh@redhat.com>
768
769 * sysdeps/pthread/unwind-forcedunwind.c: Include gnu/lib-names.h
770 instead of libgcc_s.h.
771
0cec7c54
PP
7722012-04-20 Paul Pluzhnikov <ppluzhnikov@google.com>
773
774 * sysdeps/x86_64/tls.h (TLS_GET_FS, TLS_SET_FS): Delete.
775
7ac88e38
DM
7762012-03-27 David S. Miller <davem@davemloft.net>
777
778 * tst-cond16.c (do_test): Use a thread stack size which is either
779 PTHREAD_STACK_MIN or the page size, whichever is larger.
780 * tst-cond18.c (do_test): Likewise.
781
24d8f4b7
L
7822012-03-19 H.J. Lu <hongjiu.lu@intel.com>
783
784 * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Use
785 register char * __asm__("rsp") to get stack frame.
786
4adaaafc
L
7872012-03-19 H.J. Lu <hongjiu.lu@intel.com>
788
789 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (SYS_futex): Use
790 __NR_futex directly.
791
ca7b8af5
L
7922012-03-19 H.J. Lu <hongjiu.lu@intel.com>
793
794 * unwind.c (unwind_stop): Cast _Unwind_GetCFA return to
795 _Unwind_Ptr first.
796
7e7fa5f8
DM
7972012-03-16 David S. Miller <davem@davemloft.net>
798
799 [BZ #13844]
800 * sysdeps/unix/sysv/linux/libc-lowlevellock.c: Include using <..>
801 instead of "...".
802 * sysdeps/unix/sysv/linux/sparc/sparc32/libc-lowlevellock.c:
803 Delete, not needed.
804
c4a7b16e
DM
8052012-03-15 David S. Miller <davem@davemloft.net>
806
807 [BZ #13844]
808 * sysdeps/unix/sysv/linux/sparc/sparc32/libc-lowlevellock.c: New file.
809
c524201a
PE
8102012-03-09 Paul Eggert <eggert@cs.ucla.edu>
811
812 [BZ #13673]
813 * pt-crti.S: Replace FSF snail mail address with URL.
814
90ad551f
JM
8152012-03-09 Joseph Myers <joseph@codesourcery.com>
816
817 * sysdeps/pthread/pthread.h (__need_clockid_t, __need_timespec):
818 Do not define before including <time.h>.
819
c64bf5fe
DM
8202012-03-08 David S. Miller <davem@davemloft.net>
821
822 * sysdeps/unix/sysv/linux/sparc/sem_post.c: Update copyright year.
823
48aff776
TS
8242012-03-08 Thomas Schwinge <thomas@codesourcery.com>
825
2edd9a79
TS
826 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
827 Check for timestamp before the Epoch.
828
c564a812
TS
829 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait): Fix
830 updating nwaiters.
831
48aff776
TS
832 * tst-sem13.c (do_test): Add another test case.
833 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
834 Fix updating nwaiters.
835
e7dbb1be
JM
8362012-03-07 Joseph Myers <joseph@codesourcery.com>
837
838 [BZ #10545]
839 * sysdeps/pthread/configure.in (libc_cv_forced_unwind): Change
840 link test to a compile test.
841 (libc_cv_c_cleanup): Likewise. Declare puts rather than including
842 <stdio.h>.
843 * sysdeps/pthread/configure: Regenerated.
844
a4300c7a
UD
8452012-03-07 Ulrich Drepper <drepper@gmail.com>
846
847 * Makefile (distribute): Remove variable.
848
840df61e
TS
8492012-01-23 Thomas Schwinge <thomas@codesourcery.com>
850
851 * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Get rid of
852 superfluous assignment.
853 * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c (sem_timedwait):
854 Likewise.
855 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c
856 (sem_timedwait): Likewise.
857
9463518d
UD
8582012-03-06 Ulrich Drepper <drepper@gmail.com>
859
abdf2e19
UD
860 * sysdeps/pthread/bits/libc-lock.h: Move information not needed in
861 installed headers to...
9463518d
UD
862 * sysdeps/pthread/bits/libc-lockP.h: ...here. New file.
863
e9258400
DM
8642012-03-06 David S. Miller <davem@davemloft.net>
865
866 * sysdeps/unix/sysv/linux/sparc/sem_post.c (__new_sem_post): Use
867 atomic_increment and remove unused local variable.
868 (__old_sem_post): Likewise.
869
22f9d9df
DM
8702012-02-27 David S. Miller <davem@davemloft.net>
871
9463518d
UD
872 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Don't refer to
873 non-existing __pthread_attr.
22f9d9df
DM
874 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
875 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
876 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
877 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
878 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
879
4efeffc1
UD
8802012-02-26 Ulrich Drepper <drepper@gmail.com>
881
d94a4670
UD
882 * sysdeps/pthread/pthread.h: Define __need_clockid_t for __USE_XOPEN2K.
883
4efeffc1
UD
884 * sysdeps/pthread/pthread.h: Define __need_timespec before including
885 <time.h>.
886 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Name pthread_attr_t
887 union.
888 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
889 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
890 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
891 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
892 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
893
0e7dfaef
JM
8942012-02-21 Joseph Myers <joseph@codesourcery.com>
895
896 [BZ #13695]
897 * Makefile (generated): Remove crti.S, crtn.S, defs.h and
898 pt-initfini.s.
899 [crti.S not in sysdirs] (omit-deps): Do not append.
900 [crti.S not in sysdirs] (CFLAGS-pt-initfini.s): Remove variable.
901 [crti.S not in sysdirs] (pt-initfini.c): Remove vpath directive.
902 [crti.S not in sysdirs] ($(objpfx)crti.S): Remove rule.
903 [crti.S not in sysdirs] ($(objpfx)crtn.S): Likewise.
904 [crti.S not in sysdirs] ($(objpfx)defs.h): Likewise.
905 [crti.S not in sysdirs] ($(objpfx)crti.o): Likewise.
906 [crti.S not in sysdirs] ($(objpfx)crtn.o): Likewise.
907 [crti.S in sysdirs] (extra-objs): Append unconditionally.
908 [crti.S in sysdirs] ($(objpfx)crti.o): Define rule
909 unconditionally.
910 * sysdeps/pthread/pt-initfini.c: Remove file.
911
e3b69ca7
RH
9122012-02-16 Richard Henderson <rth@twiddle.net>
913
959e12e3
UD
914 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: Remove file.
915 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: Remove file.
e3b69ca7 916
df83af67
KK
9172012-02-15 Kaz Kojima <kkojima@rr.iij4u.or.jp>
918
919 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: Remove file.
920
f63f3380
DM
9212012-02-16 David S. Miller <davem@davemloft.net>
922
923 * sysdeps/sparc/Makefile: Add -fPIC when building pt-crti.S and crtn.S
924
d463ab10
MP
9252012-02-15 Marek Polacek <polacek@redhat.com>
926
927 * sysdeps/unix/sysv/linux/x86_64/Makefile: Remove file.
928
59ba27a6
PE
9292012-02-09 Paul Eggert <eggert@cs.ucla.edu>
930
931 Replace FSF snail mail address with URLs, as per GNU coding standards.
932
28328403
AS
9332012-02-08 Andreas Schwab <schwab@linux-m68k.org>
934
935 * Makefile (extra-objs) [crti.S in sysdirs]: Add pt-crti.o.
936
3add8e13
JM
9372012-02-08 Joseph Myers <joseph@codesourcery.com>
938
939 Support crti.S and crtn.S provided directly by architectures.
940 * Makefile [crti.S in sysdirs] (omit-deps): Do not append.
941 [crti.S in sysdirs] (CFLAGS-pt-initfini.s): Do not define variable.
942 [crti.S in sysdirs] ($(objpfx)pt-initfini.s): Disable rule.
943 [crti.S in sysdirs] ($(objpfx)crti.S): Likewise.
944 [crti.S in sysdirs] ($(objpfx)crtn.S): Likewise.
945 [crti.S in sysdirs] ($(objpfx)defs.h): Likewise.
946 [crti.S in sysdirs] ($(objpfx)crti.o): Likewise.
947 [crti.S in sysdirs] ($(objpfx)crtn.o): Likewise.
948 [crti.S in sysdirs] (pt-initfini.c): Remove vpath directive.
949 [crti.S in sysdirs] ($(objpfx)crti.o): New rule.
950 * pt-crti.S: New file.
951 * sysdeps/unix/sysv/linux/i386/Makefile: Remove file.
952
9a1d9254
JM
9532012-02-03 Joseph Myers <joseph@codesourcery.com>
954
955 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
956 macros for PIC register setup.
957 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
958 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
959 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
960 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
961 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
962
5452bffe
UD
9632012-01-11 Marek Polacek <polacek@redhat.com>
964
965 * forward.c (FORWARD_NORETURN): Define macro.
966 (__pthread_unwind): Use FORWARD_NORETURN macro to avoid warning.
967 (__pthread_exit): Likewise.
968
356fa562
UD
9692012-01-10 Ulrich Drepper <drepper@gmail.com>
970
8898f020
UD
971 * sysdeps/pthread/pthread.h: Add const attribute to pthread_equal.
972
356fa562
UD
973 * pthreadP.h: Add noreturn to __pthread_exit.
974 * sysdeps/pthread/pthread-functions.h: Likewise for ptr___pthread_exit.
975
f5420cf0
AZ
9762011-12-30 Adhemerval Zanella <azanella@linux.vnet.ibm.com>
977
978 * sysdeps/unix/sysv/linux/aio_misc.h (__aio_create_helper_thread):
979 Call pthread_attr_setstacksize() with result of
980 __pthread_get_minstack() to account for application TLS usage.
981
c473bd1c
MP
9822012-01-08 Marek Polacek <polacek@redhat.com>
983
984 * sysdeps/unix/sysv/linux/mq_notify.c: Include <nptl/pthreadP.h>.
985
120ced3f
UD
9862012-01-07 Ulrich Drepper <drepper@gmail.com>
987
a784e502
UD
988 [BZ #13553]
989 * pthreadP.h: Use const instead of __const.
990 * semaphore.h: Likewise.
991 * sysdeps/pthread/bits/libc-lock.h: Likewise.
992 * sysdeps/pthread/bits/sigthread.h: Likewise.
993 * sysdeps/pthread/pthread.h: Likewise.
994
0269750c
UD
995 * Makefile: Remove elf=yes test, only ELF is supported.
996
ecb6fb48
UD
997 * shlib-versions: Remove entries for ports architectures.
998
120ced3f
UD
999 In case anyone cares, the IA-64 architecture could move to ports.
1000 * sysdeps/ia64/*: Removed.
1001 * sysdeps/unix/sysv/linux/ia64/*: Removed.
1002
2c1094bd
UD
10032011-12-22 Ulrich Drepper <drepper@gmail.com>
1004
ee9e0640
UD
1005 * sysdeps/pthread/gai_misc.h (__gai_create_helper_thread): Use
1006 __pthread_get_minstack.
1007 * sysdeps/unix/sysv/linux/mq_notify.c (init_mq_netlink): Likewise.
1008
2c1094bd
UD
1009 [BZ #13088]
1010 * sysdeps/unix/sysv/linux/timer_routines.c: Get minimum stack size
1011 through __pthread_get_minstack.
1012 * nptl-init.c (__pthread_initialize_minimal_internal): Get page size
1013 directly from _rtld_global_ro.
1014 (__pthread_get_minstack): New function.
1015 * pthreadP.h: Declare __pthread_get_minstack.
1016 * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_get_minstack.
1017
60e8585f
UD
10182011-12-21 Ulrich Drepper <drepper@gmail.com>
1019
1020 [BZ #13515]
1021 * sysdeps/unix/sysv/linux/pthread_getname.c (pthread_getname_np):
1022 Correct reading name from file.
1023
caafb2b0
CD
10242011-12-14 Carlos O'Donell <carlos@systemhalted.org>
1025
1026 * allocatestack.c (allocate_stack): Return errno on failure.
1027
e988dba9
JL
10282011-12-14 Jeff Law <law@redhat.com>
1029
1030 [BZ #5245]
1031 * pthread_create.c (__pthread_create_2_1): Translate ENOMEM to EAGAIN.
1032
ade60c89
UD
10332011-11-28 Andreas Schwab <schwab@redhat.com>
1034
1035 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Handle
1036 EAGAIN from FUTEX_WAIT_REQUEUE_PI.
1037 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1038
312be3f9
UD
10392011-11-15 Ulrich Drepper <drepper@gmail.com>
1040
1041 * pthread_getattr_np.c (pthread_getattr_np): Set FD_CLOEXEC for
1042 /proc/self/maps.
1043
c2b18f7a
UD
10442011-10-29 Ulrich Drepper <drepper@gmail.com>
1045
1046 [BZ #13358]
1047 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1048 (__pthread_cond_timedwait): Initialize %r15 correctly also for code
1049 path for kernels with FUTEX_CLOCK_REALTIME.
1050 Debugged by H.J. Lu <hjl.tools@gmail.com>.
1051
3871f58f
AS
10522011-10-27 Andreas Schwab <schwab@redhat.com>
1053
1054 [BZ #13344]
1055 * sysdeps/pthread/pthread.h: Use __THREADNL instead of __THREAD
1056 for memory synchronization functions.
1057 * semaphore.h: Likewise.
1058
485683c3
UD
10592011-10-24 Ulrich Drepper <drepper@gmail.com>
1060
1061 * tst-cancel7.c: Avoid warning.
1062 * tst-mutex6.c: Likewise.
1063 * tst-mutex9.c: Likewise.
1064 * tst-mutexpi6.c: Likewise.
1065
10d005f7
UD
10662011-10-23 Ulrich Drepper <drepper@gmail.com>
1067
1068 * sysdeps/i386/tls.h: Remove #include <list.h>.
1069
fd5bdc09
UD
10702011-10-15 Ulrich Drepper <drepper@gmail.com>
1071
10d005f7 1072 * pthread_create.c (start_thread): Call __ctype_init.
fd5bdc09 1073
7a775e6b
AS
10742011-09-15 Andreas Schwab <schwab@redhat.com>
1075
1076 * sysdeps/pthread/list.h: Define only list_t if __need_list_t is
1077 defined.
1078 (list_add): Add atomic_write_barrier.
1079 * descr.h: Define __need_list_t before including <list.h>.
1080 * nptl-init.c: Include <list.h>
1081 * allocatestack.c: Likewise.
1082
83cd1420
UD
10832011-09-11 Ulrich Drepper <drepper@gmail.com>
1084
1085 * sysdeps/i386/tls.h: Remove HAVE_TLS_SUPPORT test.
1086 * sysdeps/ia64/tls.h: Likewise.
1087 * sysdeps/powerpc/tls.h: Likewise.
1088 * sysdeps/s390/tls.h: Likewise.
1089 * sysdeps/sh/tls.h: Likewise.
1090 * sysdeps/sparc/tls.h: Likewise.
1091 * sysdeps/x86_64/tls.h: Likewise.
1092
3ce1f295
UD
10932011-09-10 Ulrich Drepper <drepper@gmail.com>
1094
02d46fc4
UD
1095 * sysdeps/pthread/malloc-machine.h: Define MUTEX_INITIALIZER.
1096
d063d164
UD
1097 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Don't handle
1098 !USE___THREAD.
1099 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
1100 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
1101 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
1102 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
1103 * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
1104 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
1105 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
1106 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
1107 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
1108 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1109 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
1110 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
1111
3ce1f295
UD
1112 * tst-tls1.c: Support for __thread is now mandatory.
1113 * tst-tls2.c: Likewise.
1114 * tst-tls3.c: Likewise.
1115 * tst-tls3mod.c: Likewise.
1116 * tst-tls4.c: Likewise.
1117 * tst-tls4moda.c: Likewise.
1118 * tst-tls4modb.c: Likewise.
1119 * tst-tls5.h: Likewise.
1120
1e4bd093
L
11212011-09-08 Ulrich Drepper <drepper@gmail.com>
1122
1123 [BZ #12403]
1124 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
1125 (pthread_rwlock_timedwrlock): Use correct macro in test.
1126 Patch by H.J. Lu <hongjiu.lu@intel.com>.
1127
a0e1f41b
UD
11282011-09-06 Ulrich Drepper <drepper@gmail.com>
1129
1130 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait): Don't
1131 use gettimeofday vsyscall, just call gettimeofday.
9e5c9dcd
UD
1132 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
1133 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
1134 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
1135 Likewise.
1136 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1137 Likewise.
1138 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1139 Simplify __vdso_clock_gettime use.
a0e1f41b 1140
39c4451c
DM
11412011-09-05 David S. Miller <davem@davemloft.net>
1142
1143 * sysdeps/unix/sysv/linux/sem_timedwait.c (do_futex_timed_wait):
1144 New function.
1145 (sem_timedwait): Call it to force an exception region around
1146 the async cancel enable and the futex operation.
1147 * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c: Likewise.
1148 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: Likewise.
1149 * sysdeps/unix/sysv/linux/sem_wait.c (do_futex_wait): New function.
1150 (__new_sem_wait): Call it to force an exception region around
1151 the async cancel enable and the futex operation.
1152 * sysdeps/unix/sysv/linux/sparc/sem_wait.c: Likewise.
1153 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: Likewise.
1154
523df511
AS
11552011-08-31 Andreas Schwab <schwab@redhat.com>
1156
1157 * allocatestack.c (setxid_mark_thread): Ensure that the exiting
1158 thread is woken up.
1159
e315850c
DM
11602011-08-20 David S. Miller <davem@davemloft.net>
1161
1162 * Makefile (tst-cleanup0.out): Fix typo in output redirection.
1163
5744c68d
RM
11642011-08-14 Roland McGrath <roland@hack.frob.com>
1165
1166 * sysdeps/i386/pthreaddef.h (TCB_ALIGNMENT): Set to 64, optimal on Atom.
1167 * sysdeps/x86_64/pthreaddef.h (TCB_ALIGNMENT): Likewise.
1168
a724d1b9
AS
11692011-08-08 Andreas Schwab <schwab@redhat.com>
1170
1171 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Maintain aligned
1172 stack.
1173 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1174 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1175
7a03a9c8
UD
11762011-07-22 Ulrich Drepper <drepper@gmail.com>
1177
1178 * sysdeps/pthread/unwind-forcedunwind.c (_Unwind_Resume): Add read
1179 barrier.
1180 (__gcc_personality_v0): Likewise.
1181 (_Unwind_ForcedUnwind): Likewise.
1182 (_Unwind_GetCFA): Likewise.
1183
4b3d3e28
RM
11842011-07-14 Roland McGrath <roland@hack.frob.com>
1185
1186 * allocatestack.c (__reclaim_stacks): Use uintptr_t cast rather than
1187 UINTMAX_C.
1188
6f8326ca
UD
11892011-06-30 Ulrich Drepper <drepper@gmail.com>
1190
1191 * nptl-init.c (__nptl_set_robust): New function.
1192 (pthread_functions): Add reference.
1193 * npthreadP.h: Declare __nptl_set_robust.
1194 * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
1195 ptr_set_robust member.
1196 * sysdeps/unix/sysv/linux/fork.c: Call set_robust_list syscall in
1197 child if threads are used.
1198
c71ca1f8
AJ
11992011-06-14 Andreas Jaeger <aj@suse.de>
1200
1201 * pthread_rwlock_init.c: Include <string.h> for memset declaration.
1202
5bdcc103
UD
12032011-05-11 Ulrich Drepper <drepper@gmail.com>
1204
1205 [BZ #386]
1206 * allocatestack.c (allocate_stack): Convert ENOMEM error to EAGAIN.
1207
e6c61494
UD
12082011-04-10 Ulrich Drepper <drepper@gmail.com>
1209
1210 [BZ #12650]
1211 * allocatestack.c (get_cached_stack): Deallocate DTV entries before
1212 clearing memory.
1213 Patch partly by Robert Rex <robert.rex@exasol.com>.
1214
c5be0f71
RM
12152011-01-19 Roland McGrath <roland@redhat.com>
1216
1217 * pthread_cond_wait.c (__pthread_cond_wait): Fix comment typo.
1218 * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
1219 * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Likewise.
1220 * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
1221 * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock): Likewise.
1222 * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock): Likewise.
1223
1f20b93a
AS
12242011-01-16 Andreas Schwab <schwab@linux-m68k.org>
1225
1226 * Makefile (test-extras): Add tst-cleanup4aux.
1227
70181fdd
UD
12282011-01-14 Ulrich Drepper <drepper@gmail.com>
1229
1230 [BZ #10563]
1231 * sysdeps/pthread/setxid.h (__SETXID_1): Add cast to assignment.
1232 (__SETXID_2): Likewise.
1233 (__SETXID_3): Likewise.
1234
451f001b
UD
12352011-01-13 Ulrich Drepper <drepper@gmail.com>
1236
1237 [BZ #10484]
1238 * Versions [libc] (GLIBC_PRIVATE): Export __libc_alloca_cutoff.
a85b5cb4 1239 * alloca_cutoff.c: Add libc_hidden_def.
451f001b 1240
f9068148
L
12412010-10-13 H.J. Lu <hongjiu.lu@intel.com>
1242
1243 [BZ #12113]
1244 * sysdeps/x86_64/pthreaddef.h (TCB_ALIGNMENT): Changed to 32.
1245 * sysdeps/x86_64/tls.h (TLS_TCB_ALIGN): Defined with alignment
1246 of "struct pthread".
1247
c3758fee
AS
12482010-09-21 Andreas Schwab <schwab@redhat.com>
1249
1250 * sysdeps/pthread/pthread.h (pthread_cleanup_push)
1251 [!__EXCEPTIONS]: Mangle local variable not_first_call.
1252 (pthread_cleanup_push_defer_np): Likewise.
1253
4ac42e19
UD
12542010-09-03 Ulrich Drepper <drepper@redhat.com>
1255
1256 * sysdeps/pthread/allocalim.h (__libc_use_alloca): Expect blocks are
1257 small.
1258
022f6b89
DG
12592010-08-10 Dinakar Guniguntala <dino@in.ibm.com>
1260 Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
1261
1262 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: If
1263 FUTEX_WAKE_OP fails make sure to call FUTEX_WAKE instead.
1264
f8392f40
L
12652010-08-12 H.J. Lu <hongjiu.lu@intel.com>
1266
93f17abf 1267 * sysdeps/unix/sysv/linux/i386/Makefile: New file.
f8392f40 1268
bebff237
AM
12692010-05-01 Alan Modra <amodra@gmail.com>
1270
1271 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
1272 (PSEUDO): Use correct cr save. Don't use wrong parm save area
1273 to save temps. Correct cfi for possible later frame manipulation.
1274 (DOCARGS_1, UNDOCARGS_1): Use the correct parm save area.
1275 (DOCARGS_2, UNDOCARGS_2, DOCARGS_3, UNDOCARGS_3): Likewise.
1276 (DOCARGS_4, UNDOCARGS_4, DOCARGS_5, UNDOCARGS_5): Likewise.
1277 (DOCARGS_6, UNDOCARGS_6): Likewise.
1278 (CENABLE, CDISABLE): Add nops for non-shared calls.
1279
e8ee8bdf
AS
12802010-07-06 Andreas Schwab <schwab@redhat.com>
1281
1282 * sysdeps/unix/sysv/linux/pthread_getname.c (pthread_getname_np):
1283 Fix type mismatch.
1284
03e87550
UD
12852010-07-03 Ulrich Drepper <drepper@redhat.com>
1286
1287 * tst-abstime.c (do_test): Some more cleanups
1288
145569dc
UD
12892010-07-02 Ulrich Drepper <drepper@redhat.com>
1290
1291 * tst-abstime.c: Correct testing and add test for sem_timedwait.
1292
2983d85e
AS
12932010-07-01 Andreas Schwab <schwab@redhat.com>
1294 Ulrich Drepper <drepper@redhat.com>
1295
1296 * Makefile (tests): Add tst-abstime.
1297 * tst-abstime.c: New file.
1298 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
1299 (__lll_timedlock_wait): Check for timestamp before the Epoch.
1300 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
1301 (__lll_timedlock_wait): Likewise.
1302 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
1303 (__lll_robust_timedlock_wait): Likewise.
1304 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1305 (__pthread_cond_timedwait): Likewise.
1306 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
1307 (pthread_rwlock_timedrdlock): Likewise.
1308 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
1309 (pthread_rwlock_timedwrlock): Likewise.
1310 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
1311 Likewise.
1312
72b6e8c8
UD
13132010-07-01 Ulrich Drepper <drepper@redhat.com>
1314
1315 * Makefile (tst-_res1): Add tst-_res1mod1 to dependency list.
1316
4bc93b30
TY
13172010-06-01 Takashi Yoshii <takashi.yoshii.zj@renesas.com>
1318
1319 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Fix incorrect
1320 location of ifndef __ASSUME_FUTEX_CLOCK_REALTIME.
1321
86a4c67f
UD
13222010-04-09 Ulrich Drepper <drepper@redhat.com>
1323
1324 [BZ #11390]
1325 * sysdeps/unix/sysv/linux/pthread_getname.c: New file.
1326 * sysdeps/unix/sysv/linux/pthread_setname.c: New file.
1327 * nptl/sysdeps/pthread/pthread.h: Declare pthread_getname and
1328 pthread_setname.
1329 * Makefile (libpthread-routines): Add pthread_getname and
1330 pthread_setname.
1331 * Versions: Export pthread_getname and pthread_setname for GLIBC_2.12.
1332
f571a994
RM
13332010-04-05 Thomas Schwinge <thomas@schwinge.name>
1334
1335 * sysdeps/pthread/unwind-resume.c: Moved to main tree sysdeps/gnu/.
1336 * sysdeps/pthread/rt-unwind-resume.c: Likewise.
1337 * sysdeps/pthread/Makefile: Remove csu section and rt section's
1338 unwind-resume bits, now in main tree sysdeps/gnu/Makefile instead.
1339
7749bf5f
LM
13402010-03-23 Luis Machado <luisgpm@br.ibm.com>
1341
1342 * pthread_cond_timedwait.c: Add check for
1343 HAVE_CLOCK_GETTIME_VSYSCALL to use VDSO whenever possible.
1344 (pthread_cond_timedwait): Use INTERNAL_VSYSCALL instead of
1345 INTERNAL_SYSCALL.
1346
1d78f299
UD
13472010-03-09 Ulrich Drepper <drepper@redhat.com>
1348
1349 * pthread_create.c (__pthread_create_2_1): If priorities are incorrect
1350 and the call fails wake eventually waiting setxid threads. Don't free
1351 stack here if we try starting a thread.
1352 * sysdeps/pthread/createthread.c (do_clone): Only wake setxid waiter
1353 if the clone call failed.
1354
058e9ba9
AS
13552010-03-08 Andreas Schwab <schwab@redhat.com>
1356
1357 * pthread_create.c (__pthread_create_2_1): Don't set setxid_futex.
1358 * allocatestack.c (get_cached_stack): Set setxid_futex.
1359 (allocate_stack): Likewise.
1360
66f1b8ee
UD
13612010-03-05 Andreas Schwab <schwab@redhat.com>
1362 Ulrich Drepper <drepper@redhat.com>
1363
1364 * allocatestack.c (setxid_mark_thread): Delay handling of thread if
1365 it is creating a thread or it is just being created.
1366 * pthread_create.c (start_thread): Wake setxid thread if it is
1367 waiting.
1368 (__pthread_create_2_1): Initialize setxid_futex.
1369 * sysdeps/pthread/createthread.c (do_clone): Wake setxid thread if it
1370 is waiting.
1371
893549c5
MS
13722010-01-15 Ulrich Drepper <drepper@redhat.com>
1373
1374 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
1375 Fix unwind info.
1376 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1377
13782010-01-15 Michal Schmidt <mschmidt@redhat.com>
1379
1380 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
1381 Fix pthread_cond_timedwait with requeue-PI.
1382 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
1383 Fix pthread_cond_wait with requeue-PI.
1384
402cd987
UD
13852010-01-14 Ulrich Drepper <drepper@redhat.com>
1386
78ee2185
UD
1387 * Versions: Add pthread_mutex_consistent, pthread_mutexattr_getrobust,
1388 and pthread_mutexattr_setrobust for GLIBC_2.12.
402cd987 1389 * pthread_mutex_consistent.c: Define alias pthread_mutex_consistent.
78ee2185
UD
1390 * pthread_mutexattr_getrobust.c: Define alias
1391 pthread_mutexattr_getrobust.
1392 * pthread_mutexattr_setrobust.c: Define alias
1393 pthread_mutexattr_setrobust.
402cd987 1394
d3c7e686
UD
13952010-01-12 Ulrich Drepper <drepper@redhat.com>
1396
1397 * sysdeps/pthread/pthread.h: Cleanup. Fix up for XPG7.
1398
f095bb72
UD
13992010-01-08 Ulrich Drepper <drepper@redhat.com>
1400
1401 * sysdeps/pthread/pthread.h: Fix pthread_mutex_consistent declaration.
1402
d34bd80f
TS
14032009-12-18 Thomas Schwinge <thomas@codesourcery.com>
1404
1405 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c (_init): Don't
1406 call __gmon_start__.
1407 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c (_init): Likewise.
1408
f01c2359
UD
14092009-12-17 Ulrich Drepper <drepper@redhat.com>
1410
1411 * pthread_rwlock_init.c (__pthread_rwlock_init): Simplify code by
1412 using memset.
1413
75956694
DG
14142009-12-01 Dinakar Guniguntala <dino@in.ibm.com>
1415
1416 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.h: Define
1417 FUTEX_WAIT_REQUEUE_PI and FUTEX_CMP_REQUEUE_PI.
1418 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: If mutex
1419 is a non robust PI mutex, then use FUTEX_CMP_REQUEUE_PI.
1420 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
1421 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: If mutex
1422 is a non robust PI mutex, then use FUTEX_WAIT_REQUEUE_PI.
1423 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1424
9554ebf2
UD
14252009-12-12 Ulrich Drepper <drepper@redhat.com>
1426
1427 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
1428 Don't update nwaiters after invalid timeout is recognized.
1429
ebb92a49
TS
14302009-11-27 Thomas Schwinge <thomas@codesourcery.com>
1431
1432 * sysdeps/unix/sysv/linux/sh/pt-initfini.c (_init): Don't call
1433 __gmon_start__.
1434
b55ec98c
AS
14352009-11-27 Andreas Schwab <schwab@redhat.com>
1436
1437 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Reload
1438 THREAD_SELF->cancelhandling after returning from futex call.
1439
80b3a4ea
UD
14402009-11-24 Ulrich Drepper <drepper@redhat.com>
1441
1442 * tst-sem13.c: New file.
1443 * Makefile (tests): Add tst-sem13.
1444
57a299fe
RM
14452009-11-22 Roland McGrath <roland@redhat.com>
1446
1447 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: # include "i686/dl-sysdep.h"
1448 instead of recapitulating its contents.
1449
dfedb126
UD
14502009-11-18 Ulrich Drepper <drepper@redhat.com>
1451
1452 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Minor
1453 optimizations and cleanups.
1454
dd7106b3
DG
14552009-11-18 Dinakar Guniguntala <dino@in.ibm.com>
1456
1457 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
1458 Remove redundant code. Fix cfi offsets.
1459 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
1460 Fix cfi offsets.
1461
f8c10bb4
UD
14622009-11-17 Ulrich Drepper <drepper@redhat.com>
1463
62616842
UD
1464 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Minimally
1465 reduce size of unwind info.
1466
f8c10bb4
UD
1467 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Convert to use
1468 cfi directives.
1469 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1470 Based on a patch by Dinakar Guniguntala <dino@in.ibm.com>.
1471
13f6812f
AS
14722009-11-03 Andreas Schwab <schwab@linux-m68k.org>
1473
1474 [BZ #4457]
1475 * sysdeps/pthread/unwind-resume.c: Include <libgcc_s.h> and use
1476 LIBGCC_S_SO.
1477 * sysdeps/pthread/unwind-forcedunwind.c: Likewise.
1478
25db0f6c
DJ
14792009-10-30 Ulrich Drepper <drepper@redhat.com>
1480
9c04f7c1
UD
1481 * tst-sem11.c (main): Rewrite to avoid aliasing problems.
1482
25db0f6c
DJ
1483 [BZ #3270]
1484 * allocatestack.c (__nptl_setxid): Perform the operation in multiple
1485 steps to avoid races with creation and terminations.
1486 * nptl-init.c (sighandler_setxid): Adjust.
1487 Patch by Daniel Jacobowitz.
1488
3d60eb17
AS
14892009-09-07 Andreas Schwab <schwab@redhat.com>
1490
1491 * sysdeps/pthread/bits/libc-lock.h (BP_SYM): Remove space before paren.
1492
38eb6136
SP
14932009-09-02 Suzuki K P <suzuki@in.ibm.com>
1494 Joseph Myers <joseph@codesourcery.com>
1495
1496 [BZ #7094]
1497 * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
1498 Initialize the sigev_notify field for newly created timer to make sure
01034d75 1499 the timer gets deleted from the active timer's list upon timer_delete.
38eb6136 1500
7812c65b
AS
15012009-08-27 Andrew Stubbs <ams@codesourcery.com>
1502
1503 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
1504 Correct a logic error.
1505
84088310
UD
15062009-08-25 Ulrich Drepper <drepper@redhat.com>
1507
1508 * sysdeps/x86_64/tls.h (RTLD_ENABLE_FOREIGN_CALL): Store old value
1509 of the field in local variables.
1510 (RTLD_FINALIZE_FOREIGN_CALL): Restore rtld_must_xmm_save from local
1511 variable and don't unconditionally clear it.
1512
b42a214c
UD
15132009-08-24 Ulrich Drepper <drepper@redhat.com>
1514
1515 * pthread_create.c (start_thread): Hint to the kernel that memory for
1516 the stack can be reused. We do not mark all the memory. The part
1517 still in use and some reserve are kept.
1518
2d094b73
UD
15192009-08-23 Ulrich Drepper <drepper@redhat.com>
1520
1521 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Clean up namespace.
1522
ae0d5450
UD
15232009-08-11 Ulrich Drepper <drepper@redhat.com>
1524
1525 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Add CFI
1526 directives.
1527
1bc2b97e
UD
15282009-08-10 Ulrich Drepper <drepper@redhat.com>
1529
1530 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Add CFI
1531 directives.
1532 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
1533
ec492239
AS
15342009-08-10 Andreas Schwab <schwab@redhat.com>
1535
1536 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
1537 (__pthread_cond_signal): Don't clobber register used for syscall
1538 number.
1539
49eea97b
UD
15402009-08-08 Ulrich Drepper <drepper@redhat.com>
1541
efa0569d
UD
1542 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
1543 Optimize code path used when FUTEX_CLOCK_REALTIME is supported.
1544
49eea97b
UD
1545 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
1546 (__pthread_cond_wait): Optimize by avoiding use of callee-safe
1547 register.
1548
9083bcc5
UD
15492009-08-07 Ulrich Drepper <drepper@redhat.com>
1550
1551 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Little optimizations
1552 enabled by the special *_asynccancel functions.
1553 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1554 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1555
1556 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Include lowlevellock.h.
1557
421665c4
UD
15582009-08-04 Ulrich Drepper <drepper@redhat.com>
1559
1560 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: New file.
1561 * sysdeps/unix/sysv/linux/x86_64/libc-cancellation.S: New file.
1562 * sysdeps/unix/sysv/linux/x86_64/librt-cancellation.S: New file.
1563 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Optimize
1564 since we can assume the special __*_{en,dis}able_asynccancel
1565 functions.
1566 (PUSHARGS_*, POPARGS_*, SAVESTK_*, RESTSTK_*): Removed.
1567 * sysdeps/x86_64/tcb-offsets.sym: Add cancellation-related bits
1568 and PTHREAD_CANCELED.
1569
bd03a1af
UD
15702009-07-31 Ulrich Drepper <drepper@redhat.com>
1571
1572 * descr.h: Better definition of *_BITMASK macros for cancellation.
1573
b48a267b
UD
15742009-07-29 Ulrich Drepper <drepper@redhat.com>
1575
586fa886
UD
1576 * sysdeps/x86_64/tls.h (TLS_TCB_ALIGN): Define explicitly to 32.
1577
b48a267b 1578 * sysdeps/x86_64/tls.h (tcbhead_t): Add room for SSE registers the
586fa886
UD
1579 dynamic linker might have to save.
1580 Define RTLD_CHECK_FOREIGN_CALL, RTLD_ENABLE_FOREIGN_CALL,
1581 RTLD_PREPARE_FOREIGN_CALL, and RTLD_FINALIZE_FOREIGN_CALL. Pretty
1582 printing.
1583
b48a267b
UD
1584 * sysdeps/x86_64/tcb-offsets.sym: Add RTLD_SAVESPACE_SSE.
1585
b0948ffd
UD
15862009-07-28 Ulrich Drepper <drepper@redhat.com>
1587
1588 * pthread_mutex_lock.c [NO_INCR] (__pthread_mutex_cond_lock_adjust):
1589 New function.
1590 * pthreadP.h: Declare __pthread_mutex_cond_lock_adjust.
1591 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: Add ROBUST_BIT.
1592 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Don't use
1593 requeue_pi for robust mutexes.
1594 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
1595 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1596 Don't only skip __pthread_mutex_cond_lock. Call instead
1597 __pthread_mutex_cond_lock_adjust.
1598 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1599
1600 * pthread_mutex_unlock.c (__pthread_mutex_unlock_full): Minor
1601 optimization of PI mutex handling.
1602
e73e694e
UD
16032009-07-27 Ulrich Drepper <drepper@redhat.com>
1604
1605 [BZ #10418]
1606 * pthread_mutex_unlock.c (__pthread_mutex_unlock_full): Use _rel
1607 instead of of _acq variants of cmpxchg.
1608
f1adf1f4
UD
16092009-07-23 Ulrich Drepper <drepper@redhat.com>
1610
01b597da
UD
1611 * sysdeps/x86_64/configure.in: New file.
1612
f1adf1f4
UD
1613 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix error
1614 path when not using absolute timeout futex.
1615
c3db953c
UD
16162009-07-20 Ulrich Drepper <drepper@redhat.com>
1617
1618 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Minor
1619 optimizations of last changes.
1620 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1621
515a8908
UD
16222009-07-19 Ulrich Drepper <drepper@redhat.com>
1623
42e69bcf
UD
1624 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
1625 FUTEX_WAIT_REQUEUE_PI and FUTEX_CMP_REQUEUE_PI.
1626 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: If mutex
1627 is a PI mutex, then use FUTEX_CMP_REQUEUE_PI.
1628 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
1629 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: If mutex
1630 is a PI mutex, then use FUTEX_WAIT_REQUEUE_PI.
1631 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1632
515a8908
UD
1633 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1634 (__pthread_cond_timedwait): Make more robust.
1635
30b1954a
UD
16362009-07-18 Ulrich Drepper <drepper@redhat.com>
1637
e2dca2fe
UD
1638 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
1639 (__lll_robust_timedlock_wait): If possible use FUTEX_WAIT_BITSET to
1640 directly use absolute timeout.
1641
3d77b268
UD
1642 * tst-sem5.c (do_test): Add test for premature timeout.
1643 * Makefile: Linu tst-sem5 with librt.
1644
d979611e
UD
1645 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
1646 (pthread_rwlock_timedwrlock): If possible use FUTEX_WAIT_BITSET to
1647 directly use absolute timeout.
32c6c342
UD
1648 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
1649 (pthread_rwlock_timedrdlock): Likewise.
d979611e 1650
f8b6cd21
UD
1651 * tst-cond11.c (run_test): Add test to check that the timeout is
1652 long enough.
1653
e88726b4
UD
1654 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
1655 (__pthread_cond_timedwait): If possible use FUTEX_WAIT_BITSET to
1656 directly use absolute timeout.
1657
30b1954a
UD
1658 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
1659 (__pthread_cond_wait): Convert to using exception handler instead of
1660 registered unwind buffer.
92618c95
UD
1661 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1662 (__pthread_cond_timedwait): Likewise.
30b1954a 1663
d52c96e7
UD
16642009-07-17 Ulrich Drepper <drepper@redhat.com>
1665
f351f2b7
UD
1666 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
1667 If possible use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME to directly
1668 use absolute timeout.
1669
0adae468
UD
1670 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Optimize
1671 handling of uncontested semaphore.
1672
d52c96e7
UD
1673 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
1674 (__condvar_cleanup): Rewrite to use cfi directives instead of
1675 hand-coded unwind tables.
63601ccd
UD
1676 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S (__pthread_once):
1677 Likewise.
c3c2f3cf 1678 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
aee2665a
UD
1679 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
1680 Likewise.
d52c96e7 1681
bfdb73e1
UD
16822009-06-12 Ulrich Drepper <drepper@redhat.com>
1683
1684 * Makefile (libpthread-routines): Add pthread_sigqueue.
1685 * Versions: Add pthread_sigqueue for GLIBC_2.11.
1686 * sysdeps/pthread/bits/sigthread.h: Declare pthread_sigqueue.
1687 * sysdeps/unix/sysv/linux/pthread_sigqueue.c: New file.
1688
1828530f
BK
16892009-06-11 Ulrich Drepper <drepper@redhat.com>
1690
1691 [BZ #10262]
1692 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
1693 (LOAD_FUTEX_WAIT_ABS): Fix futex parameter in case private futexes
1694 cannot be assumed.
1695 Patch by Bryan Kadzban <bz-glibc@kdzbn.homelinux.net>.
1696
a5b8b56d
UD
16972009-05-16 Ulrich Drepper <drepper@redhat.com>
1698
e20c4ef0
UD
1699 * libc-cancellation.c: Move __libc_cleanup_routine to...
1700 * libc-cleanup.c: ...here. New file.
1701 * Makefile (routines): Add libc-cleanup.
1702
cba0ca79
UD
1703 * cancellation.c (__pthread_disable_asynccancel): Remove unnecessary
1704 test.
1705 * libc-cancellation.c: Use <nptl/cancellation.c: to define the code.
1706 * sysdeps/pthread/librt-cancellation.c: Likewise.
1707
a5b8b56d
UD
1708 [BZ #9924]
1709 * nptl-init.c: Renamed from init.c.
1710 * Makefile: Change all occurences of init.c to nptl-init.c.
1711
1a7f254b
UD
17122009-05-15 Ulrich Drepper <drepper@redhat.com>
1713
9437b427
UD
1714 * cancellation.c (__pthread_disable_asynccancel): Correct the bits
1715 to test when deciding on the delay.
1716 * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
1717 * pthread_cancel.c: Close race between deciding on sending a signal
1718 and setting the CANCELING_BIT bit.
1719
1a7f254b
UD
1720 * cancellation.c (__pthread_disable_asynccancel): Don't return if
1721 thread is canceled.
1722 * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
1723
d5c157a9
UD
17242009-04-27 Ulrich Drepper <drepper@redhat.com>
1725
1726 * cancellation.c (__pthread_disable_asynccancel): Use THREAD_ATOMIC_AND
1727 is available.
1728 * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
1729 * sysdeps/x86_64/tls.h: Define THREAD_ATOMIC_AND.
1730 * sysdeps/i386/tls.h: Likewise.
1731 (tcbhead_t): Add __private_tm member.
1732
f521be31
UD
17332009-04-26 Ulrich Drepper <drepper@redhat.com>
1734
5efe8650
UD
1735 * sem_open.c (sem_open): Rewrite initialization of initsem to
1736 avoid warnings.
1737
f521be31
UD
1738 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
1739 Avoid warning by using may_alias attribute on ptrhack.
1740
d301a6e1
UD
17412009-04-22 Ulrich Drepper <drepper@redhat.com>
1742
5497de87 1743 [BZ #10090]
d301a6e1
UD
1744 * pthread_attr_setschedparam.c (__pthread_attr_setschedparam):
1745 Check policy and priority for validity.
1746 Patch mostly by Zhang Xiliang <zhangxiliang@cn.fujitsu.com>.
1747
71a5bd3e
UD
17482009-03-15 Ulrich Drepper <drepper@redhat.com>
1749
1750 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1751 (__pthread_cond_timedwait): Change to use cfi directives instead of
1752 hand-coded unwind sections.
1753
30991b8b
UD
17542009-03-10 Ulrich Drepper <drepper@redhat.com>
1755
1756 * init.c (nptl_freeres): Compile only for SHARED.
1757
9920a6b8
JJ
17582009-03-09 Jakub Jelinek <jakub@redhat.com>
1759
1760 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Define
1761 FUTEX_WAIT_BITSET, FUTEX_WAKE_BITSET, FUTEX_CLOCK_REALTIME and
1762 FUTEX_BITSET_MATCH_ANY.
1763
e965d514
RM
17642009-02-27 Roland McGrath <roland@redhat.com>
1765
1766 * init.c (__nptl_initial_report_events): Mark __attribute_used__.
1767 * pthread_create.c (__nptl_threads_events, __nptl_last_event): Likewise.
1768
6cbe890a
UD
17692009-02-26 Ulrich Drepper <drepper@redhat.com>
1770
1771 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
1772 _POSIX_THREAD_ROBUST_PRIO_INHERIT and
1773 _POSIX_THREAD_ROBUST_PRIO_PROTECT. Reset value of macros from
1774 200112L to 200809L.
1775
77db439e
UD
17762009-02-25 Ulrich Drepper <drepper@redhat.com>
1777
1778 * sysdeps/pthread/pthread.h: The robust mutex functions are in
1779 POSIX 2008.
1780
5be0a688
UD
17812009-02-24 Ulrich Drepper <drepper@redhat.com>
1782
1783 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_BITS_POSIX_OPT_H):
1784 Unify name of include protector macro.
1785
4c869eb6
UD
17862009-02-14 SUGIOKA Toshinobu <sugioka@itonet.co.jp>
1787
1788 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
1789 LOAD_FUTEX_WAIT_ABS even if (FUTEX_WAIT == 0).
1790
cca50323
UD
17912009-01-29 Ulrich Drepper <drepper@redhat.com>
1792
7f901dd7
UD
1793 * sysdeps/pthread/unwind-forcedunwind.c: Encrypt all function
1794 pointer variables.
1795
cca50323
UD
1796 * allocatestack.c (__free_stacks): Renamed from free_stacks.
1797 (__free_stack_cache): Removed. Change callers to call __free_stacks.
1798 * init.c (nptl_freeres): New function.
1799 (pthread_functions): Initialize ptr_freeres to nptl_freeres.
1800 * pthreadP.h: Don't declare __free_stack_cache. Declare __free_stacks.
1801 * sysdeps/pthread/unwind-forcedunwind.c (libgcc_s_handle): New
1802 variable.
1803 (pthread_cancel_init): Depend in libgcc_s_handle for decision to
1804 load DSO. Assign last.
1805 (__unwind_freeres): New function.
1806
1807 * allocatestack.c (__reclaim_stacks): Reset in_flight_stack later
1808 for better debugging. No need to use stack_list_add here.
1809
a7bd183f
UD
18102009-01-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1811
1812 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
1813 (__lll_timedlock_wait): Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME
1814 instead of computing relative timeout.
1815 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
1816 FUTEX_CLOCK_REALTIME and FUTEX_BITSET_MATCH_ANY.
1817
563ee1cb
UD
18182009-01-25 Ulrich Drepper <drepper@redhat.com>
1819
1820 * pthread_mutex_lock.c (__pthread_mutex_lock): Remove unused label out.
1821
f25c7b08
UD
18222009-01-08 Ulrich Drepper <drepper@redhat.com>
1823
1824 * sysdeps/pthread/list.h (list_add): Initialize new element first.
1825 (list_add_tail): Removed.
1826
40de0fe3
JJ
18272009-01-07 Ulrich Drepper <drepper@redhat.com>
1828
1829 * (in_flight_stack): New variable.
1830 (stack_list_del): New function. Use instead of list_del.
1831 (stack_list_add): New function. Use instead of list_add when adding to
1832 stack_cache and stack_used lists.
1833 (__reclaim_stacks): Complete operations on stack_cache and stack_used lists
1834 when the fork call interrupted another thread.
1835
3c612057
UD
18362009-01-04 Ulrich Drepper <drepper@redhat.com>
1837
1838 * init.c (__pthread_initialize_minimal_internal): Optimize test
1839 FUTEX_CLOCK_REALTIME a bit.
1840
19834b42
UD
18412009-01-03 Ulrich Drepper <drepper@redhat.com>
1842
1843 * init.c (__pthread_initialize_minimal_internal): Cheat a bit by
1844 only passing five parameters to FUTEX_WAIT_BITSET call.
1845
1846 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
a9fa090b 1847 (__lll_timedlock_wait): Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME
19834b42
UD
1848 instead of computing relative timeout.
1849
7dd650d7
UD
18502009-01-02 Ulrich Drepper <drepper@redhat.com>
1851
cbd8aeb8
UD
1852 * init.c (__pthread_initialize_minimal_internal): Check for
1853 FUTEX_CLOCK_REALTIME flag.
1854 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
a9fa090b 1855 Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME instead of computing
cbd8aeb8
UD
1856 relative timeout.
1857
7dd650d7
UD
1858 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
1859 FUTEX_CLOCK_REALTIME and FUTEX_BITSET_MATCH_ANY.
1860 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
1861 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
1862 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
1863 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
1864
217d45cd
UD
18652008-12-09 Ulrich Drepper <drepper@redhat.com>
1866
1867 * sysdeps/pthread/pthread.h (pthread_cleanup_pop): Use { } as empty
1868 loop body instead of ; to avoid gcc warnings.
1869 (pthread_cleanup_pop_restore_np): Likewise.
1870 Patch by Caolán McNamara <caolanm@redhat.com>.
1871
6de79a49
UD
18722008-12-09 Jakub Jelinek <jakub@redhat.com>
1873
1874 * pthread_mutex_lock.c (__pthread_mutex_lock): Handle only the
1875 fast path here, for robust/PI/PP mutexes call
1876 __pthread_mutex_lock_full. Don't use switch, instead use a series
1877 of ifs according to their probability.
1878 (__pthread_mutex_lock_full): New function.
1879 * pthread_mutex_unlock.c: Include assert.h.
1880 (__pthread_mutex_unlock_usercnt): Handle only the
1881 fast path here, for robust/PI/PP mutexes call
1882 __pthread_mutex_unlock_full. Don't use switch, instead use a series
1883 of ifs according to their probability.
1884 (__pthread_mutex_unlock_full): New function.
1885 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c
1886 (__pthread_mutex_lock_full): Define.
1887
71bb2639
UD
18882008-12-08 Ulrich Drepper <drepper@redhat.com>
1889
1890 * sysdeps/x86_64/tls.h (tcbhead_t): Add fields reserved for TM
1891 implementation. Add necessary padding and.
1892 * descr.h (struct pthread): Increase padding for tcbhead_t to 24
1893 words.
1894
247626f3
UD
18952008-12-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1896
1897 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define FUTEX_WAIT_BITSET
1898 and FUTEX_WAKE_BITSET.
1899
da5ac135
UD
19002008-12-02 Ulrich Drepper <drepper@redhat.com>
1901
1902 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_WAIT_BITSET
1903 and FUTEX_WAKE_BITSET.
1904 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
1905 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
1906 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
1907 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
1908
c0439b95
RM
19092008-11-25 Roland McGrath <roland@redhat.com>
1910
1911 * sysdeps/alpha, sysdeps/unix/sysv/linux/alpha:
1912 Subdirectories moved to ports repository as
1913 sysdeps/.../nptl subdirectories.
1914
0e54a725
UD
19152008-11-12 Jakub Jelinek <jakub@redhat.com>
1916
1917 [BZ #7008]
1918 * pthread_condattr_setclock.c (pthread_condattr_setclock): Fix masking
1919 of old value.
1920 * pthread_cond_init.c (__pthread_cond_init): Fix
1921 cond->__data.__nwaiters initialization.
1922 * Makefile (tests): Add tst-cond23.
1923 * tst-cond23.c: New test.
1924
4b23f9bd
JJ
19252008-11-07 Jakub Jelinek <jakub@redhat.com>
1926
1927 * sysdeps/pthread/malloc-machine.h (MALLOC): Adjust __libc_tsd_define
1928 arguments.
1929 (tsd_setspecific, tsd_getspecific): Adjust __libc_tsd_{set,get}
1930 arguments.
1931
efac1fce
UD
19322008-11-01 Ulrich Drepper <drepper@redhat.com>
1933
1934 [BZ #6955]
1935 * pthread_mutex_lock.c: Add support for private PI mutexes.
1936 * pthread_mutex_timedlock.c: Likewise.
1937 * pthread_mutex_trylock.c: Likewise.
1938 * pthread_mutex_unlock.c: Likewise.
1939 Patch mostly by Ben Jackson <ben@ben.com>.
1940
bf837fa3
UD
19412008-10-31 Ulrich Drepper <drepper@redhat.com>
1942
1943 [BZ #6843]
1944 * sysdeps/pthread/gai_misc.h (__gai_create_helper_thread):
1945 Increase stack size for helper thread.
1946
208bc836
UD
19472008-10-06 Martin Schwidefsky <schwidefsky@de.ibm.com>
1948
1949 * sysdeps/s390/tls.h (THREAD_SET_STACK_GUARD): Add empty inline
1950 assembly with a clobber list for access registers a0 and a1.
1951
17f8b4a9
UD
19522008-09-11 Martin Schwidefsky <schwidefsky@de.ibm.com>
1953
1954 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Add memory barrier
1955 to force runp->refcntr to be read from memory.
1956
2458c748
AJ
19572008-09-08 Richard Guenther <rguenther@suse.de>
1958
1959 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_lock,
1960 lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
1961 lll_timedlock, lll_robust_timedlock, lll_unlock,
1962 lll_robust_unlock): Promote private to int.
1963
965805e8
UD
19642008-08-15 Ulrich Drepper <drepper@redhat.com>
1965
1966 * sysdeps/x86_64/pthreaddef.h: Remove ARCH_MAP_FLAGS and
1967 ARCH_RETRY_MMAP definitions.
1968 * allocatestack.c: Remove definition of ARCH_MAP_FLAGS.
1969 Define MAP_STACK when not defined.
1970 (allocate_stack): Use MAP_STACK instead of ARCH_MAP_FLAGS. Remove
1971 handling of ARCH_RETRY_MMAP.
1972
bd7f4857
UD
19732008-07-30 Ulrich Drepper <drepper@redhat.com>
1974
1975 * tst-align2.c (f): Print message that f is reached.
1976
619cc2f6
UD
19772008-04-28 Hiroki Kaminaga <kaminaga@sm.sony.co.jp>
1978
1979 [BZ #6740]
1980 * sysdeps/powerpc/tcb-offsets.sym (PRIVATE_FUTEX_OFFSET): Guard symbol
1981 definition with #ifndef __ASSUME_PRIVATE_FUTEX.
1982
8ccf22f9
UD
19832008-07-25 Ulrich Drepper <drepper@redhat.com>
1984
1985 * sysdeps/unix/sysv/linux/mq_notify.c (init_mq_netlink): Use
1986 SOCK_CLOEXEC if possible.
1987
19882008-05-29 Ulrich Drepper <drepper@redhat.com>
1989
1990 * Makefile (tests): Add tst-rwlock2a.
1991 * tst-rwlock2.c: Use TYPE macro to decide what rwlock type to use.
1992 * tst-rwlock2a.c: New file.
1993
5a337776
UD
19942008-06-12 Ulrich Drepper <drepper@redhat.com>
1995
1996 * sysdeps/pthread/pthread.h: Remove inadvertant checkin.
1997
e4d6e7f5
UD
19982008-05-17 Samuel Thibault <samuel.thibault@ens-lyon.org>
1999
2000 * sysdeps/pthread/pthread.h: Fix typo in comment.
2001
d6296e88
UD
20022008-05-28 Ulrich Drepper <drepper@redhat.com>
2003
2004 * sysdeps/pthread/createthread.c (do_clone): Pass accurate length
2005 of CPU set to the kernel.
2006
62605cbf
UD
20072008-05-23 Paul Pluzhnikov <ppluzhnikov@google.com>
2008
2009 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Add
2010 cfi directives.
2011 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
2012 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
2013 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
2014 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
2015 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
2016 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
2017
20182008-05-22 Paul Pluzhnikov <ppluzhnikov@google.com>
2019
2020 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S: Add
2021 cfi directives.
2022 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2023 Likewise.
2024 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
2025 Likewise.
2026 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
2027 Likewise.
2028
4b2c85c0
UD
20292008-05-26 Ulrich Drepper <drepper@redhat.com>
2030
2031 * tst-typesizes.c: Explicitly check __SIZEOF_PTHREAD_* constants.
2032
b72f5692 20332008-05-20 Jakub Jelinek <jakub@redhat.com>
4b2c85c0
UD
2034
2035 David S. Miller <davem@davemloft.net>
3b15b590 2036
b72f5692 2037 * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: New file.
3b15b590 2038
cdffaaa6
UD
20392008-05-10 Ulrich Drepper <drepper@redhat.com>
2040
2041 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Access
2042 __pshared correctly.
2043 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2044 Likewise.
2045 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2046 Likewise.
2047 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
2048 Likewise.
2049 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
2050 Likewise.
2051 Reported by Clemens Kolbitsch <clemens.kol@gmx.at>.
2052
2313c48f
JJ
20532008-04-14 David S. Miller <davem@davemloft.net>
2054
2055 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
2056 (__old_sem_wait): Fix argument to lll_futex_wait().
2057
2f611ada
UD
20582007-11-26 Daniel Jacobowitz <dan@codesourcery.com>
2059
2060 * pthread_create.c: Require pthread_mutex_trylock and
2061 pthread_key_delete for libgcc.
2062
d24be489
JJ
20632008-04-08 Jakub Jelinek <jakub@redhat.com>
2064
2065 [BZ #6020]
2066 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h
2067 (lll_futex_wake_unlock): Add private argument to the pre-v9 macro.
2068 Patch by Sunil Amitkumar Janki <devel.sjanki@gmail.com>.
2069
f96853be
UD
20702008-03-27 Ulrich Drepper <drepper@redhat.com>
2071
8ccf22f9 2072 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine ARG_MAX if
f96853be
UD
2073 <linux/limits.h> has defined it.
2074 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
2075 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
2076 * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
2077 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
2078
354b7527
JJ
20792008-03-18 Jakub Jelinek <jakub@redhat.com>
2080
2081 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Use __ASSEMBLER__ instead
2082 of ASSEMBLER.
2083 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
2084 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Likewise.
2085
702ae329
UD
20862008-03-14 Ulrich Drepper <drepper@redhat.com>
2087
2088 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
2089 HAVE_DL_DISCOVER_OSVERSION.
2090 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
2091 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Likewise.
2092
443db178
UD
20932008-03-07 Ulrich Drepper <drepper@redhat.com>
2094
2095 [BZ #5778]
2096 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Change
2097 _POSIX_CHOWN_RESTRICTED value to zero.
2098
67fbfa5c
RM
20992008-01-31 Roland McGrath <roland@redhat.com>
2100
2101 * Makefile (omit-deps): Variable removed.
2102
dd3113da
UD
21032008-01-30 Ulrich Drepper <drepper@redhat.com>
2104
2105 * sysdeps/unix/sysv/linux/x86_64/sem_post.S (sem_post): Avoid
2106 unnecessary addr32 prefix.
2107
16cd816f
RM
21082008-01-29 Roland McGrath <roland@redhat.com>
2109
2110 * Makeconfig (ptw-CPPFLAGS, sysd-rules-patterns): New variables.
2111
b4b166af
UD
21122008-01-22 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2113
2114 * sysdeps/unix/sysv/linux/sh/sem_post.S: Don't overflow value field.
2115
21162008-01-21 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2117
2118 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XADD): Use
2119 a scratch register.
2120 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
2121 (__lll_lock_wait_private): Fix typo.
2122 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
2123 (pthread_barrier_wait): Likewise. Adjust XADD use.
2124 * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
2125 Adjust XADD use.
2126 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S
2127 (pthread_rwlock_timedrdlock): Return correct return value.
2128 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S
16cd816f 2129 (pthread_rwlock_timedwrlock): Likewise.
b4b166af 2130
eaf95a26
UD
21312008-01-15 Ulrich Drepper <drepper@redhat.com>
2132
2133 * tst-eintr2.c (do_test): make sure that if mutex_lock in main
2134 thread returns the program exits with an error code.
2135
ab355d9a
UD
21362008-01-10 Ulrich Drepper <drepper@redhat.com>
2137
2138 * pthread-errnos.sym: Add EOVERFLOW.
2139 * sysdeps/unix/sysv/linux/structsem.sym: Add SEM_VALUE_MAX.
2140 * sysdeps/unix/sysv/linux/sem_post.c: Don't overflow value field.
2141 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
2142 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
2143
b8cca206
UD
21442007-12-14 Ulrich Drepper <drepper@redhat.com>
2145
2146 * sysdeps/x86_64/pthreaddef.h (ARCH_RETRY_MMAP): Take additional
2147 parameter. Passed it as permission to mmap.
2148 * allocatestack.c (allocate_stack): Pass prot as second parameter
2149 to ARCH_RETRY_MMAP.
2150
189dce4f
UD
21512007-12-12 Ulrich Drepper <drepper@redhat.com>
2152
3eb0e1c6
UD
2153 * tst-basic7.c: Allocate memory for the stack.
2154
189dce4f
UD
2155 [BZ #5465]
2156 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S [!SHARED]
2157 (__pthread_cond_timedwait): Don't use VDSO.
58d11795 2158 Patch by Michal Januszewski.
189dce4f 2159
26e21e75
UD
21602007-12-07 Ulrich Drepper <drepper@redhat.com>
2161
2162 [BZ #5455]
2163 * sysdeps/pthread/pthread.h [!__EXCEPTIONS] (pthread_cleanup_pop):
2164 Allow label before pthread_cleanup_pop.
2165 (pthread_cleanup_pop_restore_np): Likewise.
2166
191ec77f
UD
21672007-12-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2168
2169 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
2170 Store 2 before returning ETIMEDOUT.
2171
c012be6f
UD
21722007-11-23 Ulrich Drepper <drepper@redhat.com>
2173
2174 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
2175 Store 2 before returning ETIMEDOUT.
2176 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise
2177 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
2178 (__lll_lock_wait_private): Optimize.
2179 (__lll_lock_wait): Likewise.
2180
77f1e09a
UD
21812007-11-20 Jakub Jelinek <jakub@redhat.com>
2182
2183 * sysdeps/pthread/pthread.h (pthread_cleanup_push,
2184 pthread_cleanup_push_defer_np): Add extra (void *) cast to shut up
2185 g++ 4.1 and 4.2 -Wstrict-aliasing warnings.
2186
0f7e0ee5
UD
21872007-11-08 Ulrich Drepper <drepper@redhat.com>
2188
cbed6a60
UD
2189 [BZ #5240]
2190 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
2191 If we time out, try one last time to lock the futex to avoid
2192 losing a wakeup signal.
2193 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
2194 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
2195
0f7e0ee5
UD
2196 [BZ #5245]
2197 * sysdeps/pthread/createthread.c (do_clone): Translate clone error
2198 if necessary.
2199
f6ed654c
UD
22002007-11-07 Ulrich Drepper <drepper@redhat.com>
2201
2202 [BZ #5245]
2203 * allocatestack.c (allocate_stack): Change ENOMEM error in case
2204 mmap failed to EAGAIN.
2205 * Makefile (tests): Add tst-basic7.
2206 * tst-basic7.c: New file.
2207
b92e3780
UD
22082007-11-05 Ulrich Drepper <drepper@redhat.com>
2209
2210 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
2211 Use __linkin_atfork.
2212
94a749f6
UD
22132007-11-03 Mike Frysinger <vapier@gentoo.org>
2214
2215 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (LOAD_FUTEX_WAIT): Add
2216 missing line continuations.
2217 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S (LOAD_FUTEX_WAIT,
2218 LOAD_FUTEX_WAKE): Likewise. Also add missing 3rd parameter.
2219
f160a450
UD
22202007-10-28 Ulrich Drepper <drepper@redhat.com>
2221
2222 [BZ #5220]
2223 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Declare
2224 __active_timer_sigev_thread and __active_timer_sigev_thread_lock.
2225 (struct timer): Add next element.
2226 * sysdeps/unix/sysv/linux/timer_create.c: For SIGEV_THREAD timers,
2227 enqueue timer structure into __active_timer_sigev_thread list.
2228 * sysdeps/unix/sysv/linux/timer_delete.c: For SIGEV_THREAD timers,
2229 remove timer struct from __active_timer_sigev_thread.
2230 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
2231 Before using timer structure make sure it is still on the
2232 __active_timer_sigev_thread list. Keep lock until done.
2233 Define __active_timer_sigev_thread and
2234 __active_timer_sigev_thread_lock.
2235
94833f11
UD
22362007-10-27 Ulrich Drepper <drepper@redhat.com>
2237
2238 * sysdeps/pthread/malloc-machine.h: Define ATFORK_MEM.
2239 Redefine thread_atfork for use of ATFORK_MEM.
2240 * sysdeps/unix/sysv/linux/fork.h: Define __linkin_atfork.
2241 * sysdeps/unix/sysv/linux/register-atfork.c (__linkin_atfork): New
2242 function.
2243 * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
2244 Use atomic operation when removing first element of list.
2245
96c06e08
JJ
22462007-10-17 Jakub Jelinek <jakub@redhat.com>
2247
2248 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__old_sem_post): New
2249 routine instead of an alias to __new_sem_post.
2250
e807818b
JJ
22512007-10-15 Jakub Jelinek <jakub@redhat.com>
2252
2253 * init.c (__pthread_initialize_minimal): Initialize word to appease
2254 valgrind.
2255
59d430c6
UD
22562007-10-10 Jakub Jelinek <jakub@redhat.com>
2257
2258 * sysdeps/pthread/bits/libc-lock.h (__libc_rwlock_init): Inside of
2259 libc.so just clear NAME.
2260 (__libc_rwlock_fini): Nop inside of libc.so.
2261 * tst-initializers1.c (main): Test if PTHREAD_RWLOCK_INITIALIZER is
2262 all zeros.
2263
221d9d8e
UD
22642007-09-02 Ulrich Drepper <drepper@redhat.com>
2265
2266 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
2267 (__pthread_cond_wait): Fix unlocking of internal lock after mutex
2268 unlocking failed.
2269 Patch by Luca Barbieri <luca.barbieri@gmail.com>.
2270
2a01ce56
UD
22712007-08-21 Ulrich Drepper <drepper@redhat.com>
2272
2273 [BZ #4938]
2274 * allocatestack.c (__reclaim_stacks): Clear the TSD in the
2275 reclaimed stack if necessary.
2276 * Makefile (tests): Add tst-tsd6.
2277 * tst-tsd6.c: New file.
2278
c273641b
JJ
22792007-08-21 Jakub Jelinek <jakub@redhat.com>
2280
2281 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_dead):
2282 Add private argument.
2283
fb84593c
UD
22842007-08-20 Ulrich Drepper <drepper@redhat.com>
2285
2286 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
2287 (__pthread_cond_timedwait): Use clock_gettime from VDSO if possible.
2288
3e8d1eab
JJ
22892007-08-16 Jakub Jelinek <jakub@redhat.com>
2290
2291 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h
2292 (__lll_robust_timedlock): Pass private as last argument to
2293 __lll_robust_timedlock_wait.
2294 (__lll_unlock): Fix a pasto.
2295
e4720b0e
JJ
22962007-08-15 Jakub Jelinek <jakub@redhat.com>
2297
2298 * sysdeps/unix/sysv/linux/sparc/internaltypes.h (sparc_new_sem,
2299 sparc_old_sem): New structs.
2300 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
2301 (__sem_wait_cleanup): New function.
2302 (__new_sem_wait): Use sparc_new_sem structure. Bump and afterwards
2303 decrease nwaiters. Register __sem_wait_cleanup as cleanup handler.
2304 Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
2305 lll_futex_wait.
2306 (__old_sem_wait): New function.
2307 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: Include
2308 nptl/sysdeps/unix/sysv/linux/sparc version.
2309 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c:
2310 Likewise.
2311 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: Likewise.
2312 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c
2313 (__new_sem_trywait): Use sparc_old_sem structure.
2314 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c
2315 (sem_timedwait): Use sparc_new_sem structure. Bump and afterwards
2316 decrease nwaiters. Register __sem_wait_cleanup as cleanup handler.
2317 Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
2318 lll_futex_timed_wait.
2319 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c (__new_sem_post):
2320 Use sparc_new_sem structure. Only wake if nwaiters > 0. Pass
2321 isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
2322 lll_futex_wake.
2323 (__old_sem_post): New function.
2324 * sysdeps/unix/sysv/linux/sparc/sem_wait.c: New file.
2325 * sysdeps/unix/sysv/linux/sparc/sem_init.c: New file.
2326 * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c: New file.
2327 * sysdeps/unix/sysv/linux/sparc/sem_post.c: New file.
2328 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: Remove.
2329 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: Remove.
2330
d13f4a43
UD
23312007-08-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2332
2333 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
2334 (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
2335 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2336 Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
2337 * sysdeps/unix/sysv/linux/shpthread_cond_signal.S
2338 (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
2339 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2340 Use FUTEX_WAKE_OP.
2341 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
2342 kernel-features.h and tcb-offsets.h.
2343 (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
2344 lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
2345 process private.
2346 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
2347 tcb-offsets.h.
2348 (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE
2349 to lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
2350 process private.
2351 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use #ifdef
2352 __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
2353 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
2354 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
2355 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
2356 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
2357 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
2358
702a9414
JJ
23592007-08-14 Jakub Jelinek <jakub@redhat.com>
2360
467d1345
JJ
2361 * sysdeps/unix/sysv/linux/lowlevellock.c: Comment fix.
2362 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
2363 (__lll_timedwait_tid): Pass LLL_SHARED as 4th argument to
2364 lll_futex_timed_wait.
2365
702a9414
JJ
2366 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (__lll_unlock,
2367 __lll_robust_unlock): Rewrite as macros instead of inline functions.
2368 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_unlock,
2369 __lll_robust_unlock, __lll_wait_tid): Likewise.
2370
22502ea2
UD
23712007-08-13 Jakub Jelinek <jakub@redhat.com>
2372
2373 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
2374 Fix a pasto.
2375 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
2376 (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
2377 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2378 Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
2379 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
2380 (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
2381 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2382 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Include
2383 kernel-features.h.
2384 (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
2385 lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
2386 process private. Switch DW_CFA_advance_loc1 and some
2387 DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
2388 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
2389 (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE to
2390 lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
2391 process private. Switch DW_CFA_advance_loc{1,2} and some
2392 DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
2393 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use
2394 #ifdef __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
2395 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2396 Likewise.
2397 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
2398 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
2399 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2400 Likewise.
2401 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
2402 (__pthread_cond_broadcast): Compare %r8 instead of
2403 dep_mutex-cond_*(%rdi) with $-1.
2404 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
2405 (__pthread_cond_signal): Xor FUTEX_WAKE_OP with FUTEX_WAKE instead
2406 of oring.
2407
4baf59ad
UD
24082007-08-13 Ulrich Drepper <drepper@redhat.com>
2409
2410 * sysdeps/unix/sysv/linux/i386/i786/Implies: New file.
2411
9c6f6953
UD
24122007-08-13 Jakub Jelinek <jakub@redhat.com>
2413
2414 * allocatestack.c: Include kernel-features.h.
2415 * pthread_create.c: Likewise.
2416 * pthread_mutex_init.c: Likewise.
2417 * init.c: Likewise.
2418 * pthread_cond_timedwait.c: Likewise.
2419 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
2420 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2421 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
2422 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
2423 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
2424 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2425 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2426 Likewise.
2427 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2428 Likewise.
2429 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2430 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2431 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
2432 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
2433
974a1f0f
UD
24342007-08-12 Jakub Jelinek <jakub@redhat.com>
2435
2436 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
2437 [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
2438 byte elements. One of them is the new __shared element.
2439 [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
2440 adjust names of other padding elements.
2441 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
2442 [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
2443 byte elements. One of them is the new __shared element.
2444 [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
2445 adjust names of other padding elements.
2446 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_rwlock_t):
2447 Renamed __pad1 element to __shared, adjust names of other padding
2448 elements.
2449 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
2450 (pthread_rwlock_t): Likewise.
2451 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock): Fix a
2452 typo.
2453
24542007-08-09 Anton Blanchard <anton@samba.org>
2455
2456 * sysdeps/unix/sysv/linux/powerpc/pthread_spin_unlock.c: New file.
2457
f47e2626
UD
24582007-08-12 Ulrich Drepper <drepper@redhat.com>
2459
2460 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Include
2461 <kernel-features.h>.
2462 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
2463
5bd8a249
UD
24642007-08-11 Ulrich Drepper <drepper@redhat.com>
2465
2466 * pthreadP.h (PTHREAD_ROBUST_MUTEX_PSHARED): Define.
2467 * pthread_mutex_lock.c: Use it instead of PTHREAD_MUTEX_PSHARED when
2468 dealing with robust mutexes.
2469 * pthread_mutex_timedlock.c: Likewise.
2470 * pthread_mutex_trylock.c: Likewise.
2471 * pthread_mutex_unlock.c: Likewise.
2472 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
2473
24742007-08-06 Jakub Jelinek <jakub@redhat.com>
2475
2476 * pthreadP.h (PTHREAD_MUTEX_PSHARED_BIT): Define.
2477 (PTHREAD_MUTEX_TYPE): Mask __kind with 127.
2478 (PTHREAD_MUTEX_PSHARED): Define.
2479 * pthread_mutex_init.c (__pthread_mutex_init): Set
2480 PTHREAD_MUTEX_PSHARED_BIT for pshared or robust
2481 mutexes.
2482 * pthread_mutex_lock.c (LLL_MUTEX_LOCK): Take mutex as argument
2483 instead of its __data.__lock field, pass PTHREAD_MUTEX_PSHARED
2484 as second argument to lll_lock.
2485 (LLL_MUTEX_TRYLOCK): Take mutex as argument
2486 instead of its __data.__lock field.
2487 (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
2488 __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
2489 to lll_robust_lock.
2490 (__pthread_mutex_lock): Update LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
2491 LLL_ROBUST_MUTEX_LOCK users, use PTHREAD_MUTEX_TYPE (mutex)
2492 instead of mutex->__data.__kind directly, pass
2493 PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock and lll_futex_wait.
2494 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Use
2495 PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
2496 directly, pass PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock.
2497 (pthread_mutex_timedlock): Pass PTHREAD_MUTEX_PSHARED (mutex)
2498 to lll_timedlock, lll_robust_timedlock, lll_unlock and
2499 lll_futex_timed_wait. Use PTHREAD_MUTEX_TYPE (mutex) instead
2500 of mutex->__data.__kind directly.
2501 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Pass
2502 PTHREAD_MUTEX_PSHARED (mutex) to lll_timedlock,
2503 lll_robust_timedlock, lll_unlock and lll_futex_timed_wait. Use
2504 PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind directly.
2505 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Pass
2506 PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock, lll_robust_unlock
2507 and lll_futex_wake.
2508 * pthread_mutex_setprioceiling.c (pthread_mutex_setprioceiling): Pass
2509 PTHREAD_MUTEX_PSHARED (mutex) to lll_futex_wait and lll_futex_wake.
2510 Use PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
2511 directly.
2512 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK):
2513 Take mutex as argument instead of its __data.__lock field, pass
2514 PTHREAD_MUTEX_PSHARED as second argument to lll_cond_lock.
2515 (LLL_MUTEX_TRYLOCK): Take mutex as argument instead of its
2516 __data.__lock field.
2517 (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
2518 __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
2519 to lll_robust_cond_lock.
2520 * pthread_cond_broadcast.c (__pthread_cond_broadcast): Add pshared
2521 variable, pass it to lll_lock, lll_unlock, lll_futex_requeue and
2522 lll_futex_wake. Don't use lll_futex_requeue if dependent mutex
2523 has PTHREAD_MUTEX_PSHARED_BIT bit set in its __data.__kind.
2524 * pthread_cond_destroy.c (__pthread_cond_destroy): Add pshared
2525 variable, pass it to lll_lock, lll_unlock, lll_futex_wake and
2526 lll_futex_wait.
2527 * pthread_cond_signal.c (__pthread_cond_signal): Add pshared
2528 variable, pass it to lll_lock, lll_unlock, lll_futex_wake_unlock and
2529 lll_futex_wake.
2530 * pthread_cond_timedwait.c (__pthread_cond_wait): Add
2531 pshared variable, pass it to lll_lock, lll_unlock,
2532 lll_futex_timedwait and lll_futex_wake.
2533 * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait): Add
2534 pshared variable, pass it to lll_lock, lll_unlock, lll_futex_wait
2535 and lll_futex_wake.
2536 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_requeue,
2537 lll_futex_wake_unlock): Add private argument, use __lll_private_flag
2538 macro.
2539 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue,
2540 lll_futex_wake_unlock): Likewise.
2541 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_requeue):
2542 Likewise.
2543 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_futex_requeue,
2544 lll_futex_wake_unlock): Likewise.
2545 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_requeue):
2546 Likewise.
2547 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue,
2548 lll_futex_wake_unlock): Likewise.
2549 (lll_futex_wake): Fix a typo.
2550 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym (PS_BIT): Add.
2551 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
2552 (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
2553 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2554 Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
2555 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
2556 (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
2557 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2558 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
2559 (__pthread_cond_timedwait): Likewise.
2560 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
2561 (__condvar_cleanup, __pthread_cond_wait): Likewise.
2562
0470fa46
JJ
25632007-08-05 Jakub Jelinek <jakub@redhat.com>
2564
2565 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
2566 Don't use CGOTSETUP and CGOTRESTORE macros.
2567 (CGOTSETUP, CGOTRESTORE): Remove.
2568 <IS_IN_rtld> (CENABLE, CDISABLE): Don't use JUMPTARGET, branch to
2569 @local symbol.
2570
64f6281c
UD
25712007-08-01 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2572
2573 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Remove
2574 definitions for private futexes.
2575 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Include
2576 kernel-features.h and lowlevellock.h. Use private futexes if
2577 they are available.
2578 (__lll_lock_wait_private, __lll_unlock_wake_private): New.
2579 (__lll_mutex_lock_wait): Rename to
2580 (__lll_lock_wait): ... this. Don't compile in for libc.so.
2581 (__lll_mutex_timedlock_wait): Rename to ...
2582 (__lll_timedlock_wait): ... this. Use __NR_gettimeofday.
2583 Don't compile in for libc.so.
2584 (__lll_mutex_unlock_wake): Rename to ...
2585 (__lll_unlock_wake): ... this. Don't compile in for libc.so.
2586 (__lll_timedwait_tid): Use __NR_gettimeofday.
2587 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Allow including
2588 the header from assembler. Renamed all lll_mutex_* resp.
2589 lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
2590 Renamed all LLL_MUTEX_LOCK_* macros to LLL_LOCK_*.
2591 (FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE):
2592 Define.
2593 (__lll_lock_wait_private): Add prototype.
2594 (__lll_lock_wait, __lll_timedlock_wait, __lll_robust_lock_wait,
2595 __lll_robust_timedlock_wait, __lll_unlock_wake_private,
2596 __lll_unlock_wake): Likewise.
2597 (lll_lock): Add private argument. Call __lll_lock_wait_private
2598 if private is constant LLL_PRIVATE.
2599 (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
2600 lll_timedlock, lll_robust_timedlock): Add private argument.
2601 (lll_unlock): Add private argument. Call __lll_unlock_wake_private
2602 if private is constant LLL_PRIVATE.
2603 (lll_robust_unlock, lll_robust_dead): Add private argument.
2604 (lll_lock_t): Remove.
2605 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
2606 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
2607 lll_cond_wake, lll_cond_broadcast): Remove.
2608 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: Include
2609 kernel-features.h and lowlevellock.h.
2610 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
2611 (LOAD_FUTEX_WAIT): Define.
2612 (__lll_robust_mutex_lock_wait): Rename to ...
2613 (__lll_robust_lock_wait): ... this. Add private argument.
2614 Use LOAD_FUTEX_WAIT macro.
2615 (__lll_robust_mutex_timedlock_wait): Rename to ...
2616 (__lll_robust_timedlock_wait): ... this. Add private argument.
2617 Use __NR_gettimeofday. Use LOAD_FUTEX_WAIT macro.
2618 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Include
2619 lowlevellock.h.
2620 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
2621 (pthread_barrier_wait): Use __lll_{lock,unlock}_* instead of
2622 __lll_mutex_{lock,unlock}_*.
2623 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Include
2624 lowlevellock.h and pthread-errnos.h.
2625 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
2626 FUTEX_CMP_REQUEUE, EINVAL): Remove.
2627 (__pthread_cond_broadcast): Use __lll_{lock,unlock}_* instead of
2628 __lll_mutex_{lock,unlock}_*.
2629 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Include
2630 lowlevellock.h and pthread-errnos.h.
2631 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE, EINVAL): Remove.
2632 (__pthread_cond_signal): Use __lll_{lock,unlock}_* instead of
2633 __lll_mutex_{lock,unlock}_*.
2634 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
2635 lowlevellock.h.
2636 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE): Remove.
2637 (__pthread_cond_timedwait): Use __lll_{lock,unlock}_* instead of
2638 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
2639 (__condvar_tw_cleanup): Likewise.
2640 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
2641 lowlevellock.h.
2642 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
2643 (__pthread_cond_wait): Use __lll_{lock,unlock}_* instead of
2644 __lll_mutex_{lock,unlock}_*.
2645 ( __condvar_w_cleanup): Likewise.
2646 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Include lowlevellock.h.
2647 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
2648 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Include
2649 lowlevellock.h.
2650 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
2651 (__pthread_rwlock_rdlock): Use __lll_{lock,unlock}_* instead of
2652 __lll_mutex_{lock,unlock}_*.
2653 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Include
2654 lowlevellock.h.
2655 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
2656 FUTEX_PRIVATE_FLAG): Remove.
2657 (pthread_rwlock_timedrdlock): Use __lll_{lock,unlock}_* instead of
2658 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
2659 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Include
2660 lowlevellock.h.
2661 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
2662 FUTEX_PRIVATE_FLAG): Remove.
2663 (pthread_rwlock_timedwrlock): Use __lll_{lock,unlock}_* instead of
2664 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
2665 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Include
2666 lowlevellock.h.
2667 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
2668 (__pthread_rwlock_unlock): Use __lll_{lock,unlock}_* instead of
2669 __lll_mutex_{lock,unlock}_*.
2670 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Include
2671 lowlevellock.h.
2672 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
2673 (__pthread_rwlock_wrlock): Use __lll_{lock,unlock}_* instead of
2674 __lll_mutex_{lock,unlock}_*.
2675 * sysdeps/unix/sysv/linux/sh/sem_post.S: Include lowlevellock.h.
2676 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
2677 (__new_sem_post): Use standard initial exec code sequences.
2678 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Include
2679 lowlevellock.h.
2680 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
2681 FUTEX_PRIVATE_FLAG): Remove.
2682 (sem_timedwait): Use __NR_gettimeofday. Use standard initial
2683 exec code sequences.
2684 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Include lowlevellock.h.
2685 (__new_sem_trywait): Use standard initial exec code sequences.
2686 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Include lowlevellock.h.
2687 (__new_sem_wait): Use standard initial exec code sequences.
2688
e51deae7
UD
26892007-07-31 Anton Blanchard <anton@samba.org>
2690
2691 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
2692 Use __asm __volatile (__lll_acq_instr ::: "memory") instead of
2693 atomic_full_barrier.
2694
26952007-07-31 Jakub Jelinek <jakub@redhat.com>
2696
2697 * allocatestack.c (stack_cache_lock): Change type to int.
2698 (get_cached_stack, allocate_stack, __deallocate_stack,
2699 __make_stacks_executable, __find_thread_by_id, __nptl_setxid,
2700 __pthread_init_static_tls, __wait_lookup_done): Add LLL_PRIVATE
2701 as second argument to lll_lock and lll_unlock macros on
2702 stack_cache_lock.
2703 * pthread_create.c (__find_in_stack_list): Likewise.
2704 (start_thread): Similarly with pd->lock. Use lll_robust_dead
2705 macro instead of lll_robust_mutex_dead, pass LLL_SHARED to it
2706 as second argument.
2707 * descr.h (struct pthread): Change lock and setxid_futex field
2708 type to int.
2709 * old_pthread_cond_broadcast.c (__pthread_cond_broadcast_2_0): Use
2710 LLL_LOCK_INITIALIZER instead of LLL_MUTEX_LOCK_INITIALIZER.
2711 * old_pthread_cond_signal.c (__pthread_cond_signal_2_0): Likewise.
2712 * old_pthread_cond_timedwait.c (__pthread_cond_timedwait_2_0):
2713 Likewise.
2714 * old_pthread_cond_wait.c (__pthread_cond_wait_2_0): Likewise.
2715 * pthread_cond_init.c (__pthread_cond_init): Likewise.
2716 * pthreadP.h (__attr_list_lock): Change type to int.
2717 * pthread_attr_init.c (__attr_list_lock): Likewise.
2718 * pthread_barrier_destroy.c (pthread_barrier_destroy): Pass
2719 ibarrier->private ^ FUTEX_PRIVATE_FLAG as second argument to
2720 lll_{,un}lock.
2721 * pthread_barrier_wait.c (pthread_barrier_wait): Likewise and
2722 also for lll_futex_{wake,wait}.
2723 * pthread_barrier_init.c (pthread_barrier_init): Make iattr
2724 a pointer to const.
2725 * pthread_cond_broadcast.c (__pthread_cond_broadcast): Pass
2726 LLL_SHARED as second argument to lll_{,un}lock.
2727 * pthread_cond_destroy.c (__pthread_cond_destroy): Likewise.
2728 * pthread_cond_signal.c (__pthread_cond_singal): Likewise.
2729 * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
2730 * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait):
2731 Likewise.
2732 * pthread_getattr_np.c (pthread_getattr_np): Add LLL_PRIVATE
2733 as second argument to lll_{,un}lock macros on pd->lock.
2734 * pthread_getschedparam.c (__pthread_getschedparam): Likewise.
2735 * pthread_setschedparam.c (__pthread_setschedparam): Likewise.
2736 * pthread_setschedprio.c (pthread_setschedprio): Likewise.
2737 * tpp.c (__pthread_tpp_change_priority, __pthread_current_priority):
2738 Likewise.
2739 * sysdeps/pthread/createthread.c (do_clone, create_thread):
2740 Likewise.
2741 * pthread_once.c (once_lock): Change type to int.
2742 (__pthread_once): Pass LLL_PRIVATE as second argument to
2743 lll_{,un}lock macros on once_lock.
2744 * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Use
2745 lll_{,un}lock macros instead of lll_mutex_{,un}lock, pass
2746 rwlock->__data.__shared as second argument to them and similarly
2747 for lll_futex_w*.
2748 * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock):
2749 Likewise.
2750 * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock):
2751 Likewise.
2752 * pthread_rwlock_tryrdlock.c (__pthread_rwlock_tryrdlock): Likewise.
2753 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Likewise.
2754 * pthread_rwlock_unlock.c (__pthread_rwlock_unlock): Likewise.
2755 * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
2756 * sem_close.c (sem_close): Pass LLL_PRIVATE as second argument
2757 to lll_{,un}lock macros on __sem_mappings_lock.
2758 * sem_open.c (check_add_mapping): Likewise.
2759 (__sem_mappings_lock): Change type to int.
2760 * semaphoreP.h (__sem_mappings_lock): Likewise.
2761 * pthread_mutex_lock.c (LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
2762 LLL_ROBUST_MUTEX_LOCK): Use lll_{,try,robust_}lock macros
2763 instead of lll_*mutex_*, pass LLL_SHARED as last
2764 argument.
2765 (__pthread_mutex_lock): Use lll_unlock instead of lll_mutex_unlock,
2766 pass LLL_SHARED as last argument.
2767 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK,
2768 LLL_MUTEX_TRYLOCK, LLL_ROBUST_MUTEX_LOCK): Use
2769 lll_{cond_,cond_try,robust_cond}lock macros instead of lll_*mutex_*,
2770 pass LLL_SHARED as last argument.
2771 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
2772 lll_{timed,try,robust_timed,un}lock instead of lll_*mutex*, pass
2773 LLL_SHARED as last argument.
2774 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Similarly.
2775 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt):
2776 Similarly.
2777 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_lock,
2778 __libc_lock_lock_recursive, __libc_lock_unlock,
2779 __libc_lock_unlock_recursive): Pass LLL_PRIVATE as second
2780 argument to lll_{,un}lock.
2781 * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_lock,
2782 _IO_lock_unlock): Likewise.
2783 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Don't use
2784 compound literal.
2785 * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
2786 Pass LLL_PRIVATE as second argument to lll_{,un}lock macros on
2787 __fork_lock.
2788 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork,
2789 free_mem): Likewise.
2790 (__fork_lock): Change type to int.
2791 * sysdeps/unix/sysv/linux/fork.h (__fork_lock): Likewise.
2792 * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Pass
2793 isem->private ^ FUTEX_PRIVATE_FLAG as second argument to
2794 lll_futex_wake.
2795 * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
2796 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Likewise.
2797 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait_private):
2798 New function.
2799 (__lll_lock_wait, __lll_timedlock_wait): Add private argument and
2800 pass it through to lll_futex_*wait, only compile in when
2801 IS_IN_libpthread.
2802 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
2803 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): Add private
2804 argument and pass it through to lll_futex_*wait.
2805 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Renamed all
2806 lll_mutex_* resp. lll_robust_mutex_* macros to lll_* resp.
2807 lll_robust_*. Renamed all __lll_mutex_* resp. __lll_robust_mutex_*
2808 inline functions to __lll_* resp. __lll_robust_*.
2809 (LLL_MUTEX_LOCK_INITIALIZER): Remove.
2810 (lll_mutex_dead): Add private argument.
2811 (__lll_lock_wait_private): New prototype.
2812 (__lll_lock_wait, __lll_robust_lock_wait, __lll_lock_timedwait,
2813 __lll_robust_lock_timedwait): Add private argument to prototypes.
2814 (__lll_lock): Add private argument, if it is constant LLL_PRIVATE,
2815 call __lll_lock_wait_private, otherwise pass private to
2816 __lll_lock_wait.
2817 (__lll_robust_lock, __lll_cond_lock, __lll_timedlock,
2818 __lll_robust_timedlock): Add private argument, pass it to
2819 __lll_*wait functions.
2820 (__lll_unlock): Add private argument, if it is constant LLL_PRIVATE,
2821 call __lll_unlock_wake_private, otherwise pass private to
2822 __lll_unlock_wake.
2823 (__lll_robust_unlock): Add private argument, pass it to
2824 __lll_robust_unlock_wake.
2825 (lll_lock, lll_robust_lock, lll_cond_lock, lll_timedlock,
2826 lll_robust_timedlock, lll_unlock, lll_robust_unlock): Add private
2827 argument, pass it through to __lll_* inline function.
2828 (__lll_mutex_unlock_force, lll_mutex_unlock_force): Remove.
2829 (lll_lock_t): Remove.
2830 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
2831 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
2832 lll_cond_wake, lll_cond_broadcast): Remove.
2833 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2834 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2835 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2836 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
2837 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Allow including
2838 the header from assembler. Renamed all lll_mutex_* resp.
2839 lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
2840 (LOCK, FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP,
2841 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
2842 (LLL_MUTEX_LOCK_INITIALIZER, LLL_MUTEX_LOCK_INITIALIZER_LOCKED,
2843 LLL_MUTEX_LOCK_INITIALIZER_WAITERS): Remove.
2844 (__lll_mutex_lock_wait, __lll_mutex_timedlock_wait,
2845 __lll_mutex_unlock_wake, __lll_lock_wait, __lll_unlock_wake):
2846 Remove prototype.
2847 (__lll_trylock_asm, __lll_lock_asm_start, __lll_unlock_asm): Define.
2848 (lll_robust_trylock, lll_cond_trylock): Use LLL_LOCK_INITIALIZER*
2849 rather than LLL_MUTEX_LOCK_INITIALIZER* macros.
2850 (lll_trylock): Likewise, use __lll_trylock_asm, pass
2851 MULTIPLE_THREADS_OFFSET as another asm operand.
2852 (lll_lock): Add private argument, use __lll_lock_asm_start, pass
2853 MULTIPLE_THREADS_OFFSET as last asm operand, call
2854 __lll_lock_wait_private if private is constant LLL_PRIVATE,
2855 otherwise pass private as another argument to __lll_lock_wait.
2856 (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
2857 lll_timedlock, lll_robust_timedlock): Add private argument, pass
2858 private as another argument to __lll_*lock_wait call.
2859 (lll_unlock): Add private argument, use __lll_unlock_asm, pass
2860 MULTIPLE_THREADS_OFFSET as another asm operand, call
2861 __lll_unlock_wake_private if private is constant LLL_PRIVATE,
2862 otherwise pass private as another argument to __lll_unlock_wake.
2863 (lll_robust_unlock): Add private argument, pass private as another
2864 argument to __lll_unlock_wake.
2865 (lll_robust_dead): Add private argument, use __lll_private_flag
2866 macro.
2867 (lll_islocked): Use LLL_LOCK_INITIALIZER instead of
2868 LLL_MUTEX_LOCK_INITIALIZER.
2869 (lll_lock_t): Remove.
2870 (LLL_LOCK_INITIALIZER_WAITERS): Define.
2871 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
2872 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
2873 lll_cond_wake, lll_cond_broadcast): Remove.
2874 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2875 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Revert
2876 2007-05-2{3,9} changes.
2877 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Include
2878 kernel-features.h and lowlevellock.h.
2879 (LOAD_PRIVATE_FUTEX_WAIT): Define.
2880 (LOAD_FUTEX_WAIT): Rewritten.
2881 (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
2882 define.
2883 (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
2884 (__lll_mutex_lock_wait): Rename to ...
2885 (__lll_lock_wait): ... this. Take futex addr from %edx instead of
2886 %ecx, %ecx is now private argument. Don't compile in for libc.so.
2887 (__lll_mutex_timedlock_wait): Rename to ...
2888 (__lll_timedlock_wait): ... this. Use __NR_gettimeofday. %esi
2889 contains private argument. Don't compile in for libc.so.
2890 (__lll_mutex_unlock_wake): Rename to ...
2891 (__lll_unlock_wake): ... this. %ecx contains private argument.
2892 Don't compile in for libc.so.
2893 (__lll_timedwait_tid): Use __NR_gettimeofday.
2894 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Include
2895 kernel-features.h and lowlevellock.h.
2896 (LOAD_FUTEX_WAIT): Define.
2897 (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
2898 define.
2899 (__lll_robust_mutex_lock_wait): Rename to ...
2900 (__lll_robust_lock_wait): ... this. Futex addr is now in %edx
2901 argument, %ecx argument contains private. Use LOAD_FUTEX_WAIT
2902 macro.
2903 (__lll_robust_mutex_timedlock_wait): Rename to ...
2904 (__lll_robust_timedlock_wait): ... this. Use __NR_gettimeofday.
2905 %esi argument contains private, use LOAD_FUTEX_WAIT macro.
2906 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Include
2907 lowlevellock.h.
2908 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2909 (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
2910 PRIVATE(%ebx) ^ LLL_SHARED as private argument in %ecx to
2911 __lll_lock_wait and __lll_unlock_wake, pass MUTEX(%ebx) address
2912 to __lll_lock_wait in %edx.
2913 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
2914 Include lowlevellock.h and pthread-errnos.h.
2915 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
2916 FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
2917 (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*, pass
2918 cond_lock address in %edx rather than %ecx to __lll_lock_wait,
2919 pass LLL_SHARED in %ecx to both __lll_lock_wait and
2920 __lll_unlock_wake.
2921 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
2922 Include lowlevellock.h and pthread-errnos.h.
2923 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
2924 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
2925 (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*, pass
2926 cond_lock address in %edx rather than %ecx to __lll_lock_wait,
2927 pass LLL_SHARED in %ecx to both __lll_lock_wait and
2928 __lll_unlock_wake.
2929 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
2930 Include lowlevellock.h.
2931 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
2932 Don't define.
2933 (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*, pass
2934 cond_lock address in %edx rather than %ecx to __lll_lock_wait,
2935 pass LLL_SHARED in %ecx to both __lll_lock_wait and
2936 __lll_unlock_wake. Use __NR_gettimeofday.
2937 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
2938 Include lowlevellock.h.
2939 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2940 (__pthread_cond_wait, __condvar_w_cleanup): Rename __lll_mutex_*
2941 to __lll_*, pass cond_lock address in %edx rather than %ecx to
2942 __lll_lock_wait, pass LLL_SHARED in %ecx to both __lll_lock_wait
2943 and __lll_unlock_wake.
2944 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S:
2945 Include lowlevellock.h.
2946 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2947 (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*, pass
2948 MUTEX(%ebx) address in %edx rather than %ecx to
2949 __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
2950 and __lll_unlock_wake. Move return value from %ecx to %edx
2951 register.
2952 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2953 Include lowlevellock.h.
2954 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
2955 Don't define.
2956 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
2957 MUTEX(%ebp) address in %edx rather than %ecx to
2958 __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
2959 and __lll_unlock_wake. Move return value from %ecx to %edx
2960 register. Use __NR_gettimeofday.
2961 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2962 Include lowlevellock.h.
2963 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
2964 Don't define.
2965 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
2966 MUTEX(%ebp) address in %edx rather than %ecx to
2967 __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
2968 and __lll_unlock_wake. Move return value from %ecx to %edx
2969 register. Use __NR_gettimeofday.
2970 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
2971 Include lowlevellock.h.
2972 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2973 (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*, pass
2974 MUTEX(%edi) address in %edx rather than %ecx to
2975 __lll_lock_wait, pass PSHARED(%edi) in %ecx to both __lll_lock_wait
2976 and __lll_unlock_wake.
2977 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
2978 Include lowlevellock.h.
2979 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2980 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
2981 MUTEX(%ebx) address in %edx rather than %ecx to
2982 __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
2983 and __lll_unlock_wake. Move return value from %ecx to %edx
2984 register.
2985 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Include
2986 lowlevellock.h.
2987 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
2988 define.
2989 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Include lowlevellock.h.
2990 (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
2991 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Include
2992 lowlevellock.h.
2993 (LOCK, SYS_futex, SYS_gettimeofday, FUTEX_WAIT): Don't define.
2994 (sem_timedwait): Use __NR_gettimeofday.
2995 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Include
2996 lowlevellock.h.
2997 (LOCK): Don't define.
2998 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include
2999 lowlevellock.h.
3000 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
3001 * sysdeps/unix/sysv/linux/powerpc/sem_post.c: Wake only when there
3002 are waiters.
3003 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Revert
3004 2007-05-2{3,9} changes.
3005 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Include
3006 kernel-features.h and lowlevellock.h.
3007 (LOAD_PRIVATE_FUTEX_WAIT): Define.
3008 (LOAD_FUTEX_WAIT): Rewritten.
3009 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
3010 (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
3011 (__lll_mutex_lock_wait): Rename to ...
3012 (__lll_lock_wait): ... this. %esi is now private argument.
3013 Don't compile in for libc.so.
3014 (__lll_mutex_timedlock_wait): Rename to ...
3015 (__lll_timedlock_wait): ... this. %esi contains private argument.
3016 Don't compile in for libc.so.
3017 (__lll_mutex_unlock_wake): Rename to ...
3018 (__lll_unlock_wake): ... this. %esi contains private argument.
3019 Don't compile in for libc.so.
3020 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Include
3021 kernel-features.h and lowlevellock.h.
3022 (LOAD_FUTEX_WAIT): Define.
3023 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
3024 (__lll_robust_mutex_lock_wait): Rename to ...
3025 (__lll_robust_lock_wait): ... this. %esi argument contains private.
3026 Use LOAD_FUTEX_WAIT macro.
3027 (__lll_robust_mutex_timedlock_wait): Rename to ...
3028 (__lll_robust_timedlock_wait): ... this. %esi argument contains
3029 private, use LOAD_FUTEX_WAIT macro.
3030 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Include
3031 lowlevellock.h.
3032 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3033 (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
3034 PRIVATE(%rdi) ^ LLL_SHARED as private argument in %esi to
3035 __lll_lock_wait and __lll_unlock_wake.
3036 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S:
3037 Include lowlevellock.h and pthread-errnos.h.
3038 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
3039 FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
3040 (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*,
3041 pass LLL_SHARED in %esi to both __lll_lock_wait and
3042 __lll_unlock_wake.
3043 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S:
3044 Include lowlevellock.h and pthread-errnos.h.
3045 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
3046 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
3047 (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*,
3048 pass LLL_SHARED in %esi to both __lll_lock_wait and
3049 __lll_unlock_wake.
3050 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:
3051 Include lowlevellock.h.
3052 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3053 (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*,
3054 pass LLL_SHARED in %esi to both __lll_lock_wait and
3055 __lll_unlock_wake.
3056 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
3057 Include lowlevellock.h.
3058 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3059 (__pthread_cond_wait, __condvar_cleanup): Rename __lll_mutex_*
3060 to __lll_*, pass LLL_SHARED in %esi to both __lll_lock_wait
3061 and __lll_unlock_wake.
3062 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S:
3063 Include lowlevellock.h.
3064 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
3065 Don't define.
3066 (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*,
3067 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
3068 and __lll_unlock_wake.
3069 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
3070 Include lowlevellock.h.
3071 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
3072 Don't define.
3073 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
3074 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
3075 and __lll_unlock_wake.
3076 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3077 Include lowlevellock.h.
3078 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
3079 Don't define.
3080 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
3081 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
3082 and __lll_unlock_wake.
3083 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S:
3084 Include lowlevellock.h.
3085 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
3086 Don't define.
3087 (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*,
3088 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
3089 and __lll_unlock_wake.
3090 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S:
3091 Include lowlevellock.h.
3092 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
3093 Don't define.
3094 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
3095 pass PSHARED(%rdi) in %ecx to both __lll_lock_wait
3096 and __lll_unlock_wake.
3097 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Include
3098 lowlevellock.h.
3099 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
3100 define.
3101 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Include lowlevellock.h.
3102 (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
3103 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Include
3104 lowlevellock.h.
3105 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
3106 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Include
3107 lowlevellock.h.
3108 (LOCK): Don't define.
3109 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Include
3110 lowlevellock.h.
3111 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
3112 * sysdeps/unix/sysv/linux/sparc/internaltypes.h: New file.
3113 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_destroy.c: New file.
3114 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_init.c: New file.
3115 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_wait.c: New file.
3116 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
3117 (__lll_lock_wait_private): New function.
3118 (__lll_lock_wait, __lll_timedlock_wait): Add private argument, pass
3119 it to lll_futex_*wait. Don't compile in for libc.so.
3120 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c:
3121 Remove.
3122 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c
3123 (struct sparc_pthread_barrier): Remove.
3124 (pthread_barrier_wait): Use union sparc_pthread_barrier instead of
3125 struct sparc_pthread_barrier. Pass
3126 ibarrier->s.pshared ? LLL_SHARED : LLL_PRIVATE to lll_{,un}lock
3127 and lll_futex_wait macros.
3128 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
3129 Remove.
3130 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
3131 Include sparc pthread_barrier_wait.c instead of generic one.
3132
6f59d56e
UD
31332007-07-30 Jakub Jelinek <jakub@redhat.com>
3134
1475e201
UD
3135 * tst-rwlock14.c (do_test): Avoid warnings on 32-bit arches.
3136
6f59d56e
UD
3137 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
3138 (pthread_rwlock_timedrdlock): Copy futex retval to %esi rather than
3139 %ecx.
3140 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
3141 (pthread_rwlock_timedwrlock): Likewise.
3142 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
3143 (__pthread_rwlock_unlock): Fix MUTEX != 0 args to __lll_*.
3144
558f0300
JJ
31452007-07-31 Jakub Jelinek <jakub@redhat.com>
3146
3147 * sysdeps/sparc/tls.h (tcbhead_t): Add private_futex field.
3148
cedb4109
UD
31492007-07-26 Jakub Jelinek <jakub@redhat.com>
3150
3151 * tst-locale2.c (useless): Add return statement.
3152
085a4412
UD
31532007-07-24 Jakub Jelinek <jakub@redhat.com>
3154
3155 * allocatestack.c (__nptl_setxid, __wait_lookup_done): Replace
3156 lll_private_futex_* (*) with lll_futex_* (*, LLL_PRIVATE).
3157 * pthread_create.c (start_thread): Likewise.
3158 * init.c (sighandler_setxid): Likewise.
3159 * sysdeps/alpha/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3160 * sysdeps/ia64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3161 * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3162 * sysdeps/s390/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3163 * sysdeps/powerpc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3164 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3165 * sysdeps/sparc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3166 * sysdeps/sh/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3167 * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY, AIO_MISC_WAIT):
3168 Likewise.
3169 * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY, GAI_MISC_WAIT):
3170 Likewise.
3171 * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
3172 Likewise.
3173 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_waitzero,
3174 __rtld_notify): Likewise.
3175 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Likewise.
3176 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (clear_once_control,
3177 __pthread_once): Likewise.
3178 * sysdeps/unix/sysv/linux/alpha/pthread_once.c (clear_once_control,
3179 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
3180 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_PRIVATE_FLAG,
3181 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
3182 (lll_futex_wait): Add private argument, define as wrapper around
3183 lll_futex_timed_wait.
3184 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
3185 use __lll_private_flag macro.
3186 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
3187 __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
3188 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (clear_once_control,
3189 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
3190 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_PRIVATE_FLAG,
3191 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
3192 (lll_futex_wait): Add private argument, define as wrapper around
3193 lll_futex_timed_wait.
3194 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
3195 use __lll_private_flag macro.
3196 (__lll_mutex_unlock, __lll_robust_mutex_unlock, lll_wait_tid,
3197 __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
3198 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
3199 Define.
3200 (lll_futex_timed_wait, lll_futex_wake): Use it.
3201 (lll_private_futex_wait, lll_private_futex_timed_wait,
3202 lll_private_futex_wake): Removed.
3203 * sysdeps/unix/sysv/linux/s390/pthread_once.c (clear_once_control,
3204 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
3205 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_PRIVATE_FLAG,
3206 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
3207 (lll_futex_wait): Add private argument, define as wrapper around
3208 lll_futex_timed_wait.
3209 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
3210 use __lll_private_flag macro.
3211 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
3212 lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
3213 to lll_futex_*.
3214 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
3215 (lll_private_futex_wait, lll_private_futex_timed_wait,
3216 lll_private_futex_wake): Removed.
3217 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_private_flag):
3218 Fix !__ASSUME_PRIVATE_FUTEX non-constant private case.
3219 (lll_private_futex_wait, lll_private_futex_timed_wait,
3220 lll_private_futex_wake): Removed.
3221 * sysdeps/unix/sysv/linux/sparc/pthread_once.c (clear_once_control,
3222 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
3223 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_PRIVATE_FLAG,
3224 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
3225 (lll_futex_wait): Add private argument, define as wrapper around
3226 lll_futex_timed_wait.
3227 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
3228 use __lll_private_flag macro.
3229 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
3230 lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
3231 to lll_futex_*.
3232 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (__lll_private_flag):
3233 Define.
3234 (lll_futex_timed_wait, lll_futex_wake): Use it.
3235 (lll_private_futex_wait, lll_private_futex_timed_wait,
3236 lll_private_futex_wake): Removed.
3237
ef0af159
JJ
32382007-07-27 Jakub Jelinek <jakub@redhat.com>
3239
3240 * sysdeps/sparc/tls.h (tcbhead_t): Move gscope_flag to the end
3241 of the structure for sparc32.
3242
32432007-07-26 Aurelien Jarno <aurelien@aurel32.net>
3244
3245 * sysdeps/sparc/tls.h (tcbhead_t): Add gscope_flag.
3246
eb4f5909
UD
32472007-07-23 Ulrich Drepper <drepper@redhat.com>
3248
3249 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
3250 code used when private futexes are assumed.
3251 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3252 Likewise.
3253
b5f13526
UD
32542007-07-23 Jakub Jelinek <jakub@redhat.com>
3255
3256 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
3257 (__lll_private_flag): Define.
3258 (lll_futex_wait): Define as a wrapper around lll_futex_timed_wait.
3259 (lll_futex_timed_wait, lll_futex_wake, lll_futex_wake_unlock): Use
3260 __lll_private_flag.
3261 (lll_private_futex_wait, lll_private_futex_timedwait,
3262 lll_private_futex_wake): Define as wrapper around non-_private
3263 macros.
3264 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
3265 (__lll_private_flag): Define.
3266 (lll_futex_timed_wait, lll_futex_wake): Use __lll_private_flag.
3267 (lll_private_futex_wait, lll_private_futex_timedwait,
3268 lll_private_futex_wake): Define as wrapper around non-_private
3269 macros.
3270
eb7721f2
UD
32712007-07-10 Steven Munroe <sjmunroe@us.ibm.com>
3272
3273 * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Add LLL_SHARED
3274 parameter to lll_futex_wait call.
3275 * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
3276
3277 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
3278 Replace lll_futex_wait with lll_private_futex_wait.
3279 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
3280 Add LLL_SHARED parameter to lll_futex_wake().
3281
3282 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define LLL_PRIVATE
3283 LLL_SHARED, lll_private_futex_wait, lll_private_futex_timed_wait and
3284 lll_private_futex_wake.
3285 (lll_futex_wait): Add private parameter. Adjust FUTEX_PRIVATE_FLAG
3286 bit from private parm before syscall.
3287 (lll_futex_timed_wait): Likewise.
3288 (lll_futex_wake): Likewise.
3289 (lll_futex_wake_unlock): Likewise.
3290 (lll_mutex_unlock): Add LLL_SHARED parm to lll_futex_wake call.
3291 (lll_robust_mutex_unlock): Likewise.
3292 (lll_mutex_unlock_force): Likewise.
3293 (lll_wait_tid): Add LLL_SHARED parm to lll_futex_wait call.
3294
defc45f2
UD
32952007-07-23 Ulrich Drepper <drepper@redhat.com>
3296
3297 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
3298 compilation when unconditionally using private futexes.
3299 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
3300 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3301 Likewise.
3302 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
3303 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
3304
087722b8
UD
33052007-07-17 Jakub Jelinek <jakub@redhat.com>
3306
3307 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock_clear_flags2):
3308 Define.
3309
765c6b0c
UD
33102007-07-06 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3311
3312 * sysdeps/sh/tls.h: Include stdlib.h, list.h, sysdep.h and
3313 kernel-features.h.
3314
7d9d8bd1
RM
33152007-05-16 Roland McGrath <roland@redhat.com>
3316
3317 * init.c (__nptl_initial_report_events): New variable.
3318 (__pthread_initialize_minimal_internal): Initialize pd->report_events
3319 to that.
3320
a4915df2
UD
33212007-06-22 Jakub Jelinek <jakub@redhat.com>
3322
3323 * pthread_getattr_np.c (pthread_getattr_np): Clear cpuset and
3324 cpusetsize if pthread_getaffinity_np failed with ENOSYS.
3325
e4eb675d
UD
33262007-06-19 Ulrich Drepper <drepper@redhat.com>
3327
3328 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Remove mrlock
3329 implementation.
3330
ae1ad3ae
UD
33312007-06-18 Ulrich Drepper <drepper@redhat.com>
3332
3333 * pthreadP.h: Define PTHREAD_MUTEX_TYPE.
3334 * phtread_mutex_lock.c: Use PTHREAD_MUTEX_TYPE.
3335 * pthread_mutex_timedlock.c: Likewise.
3336 * pthread_mutex_trylock.c: Likewise.
3337 * pthread_mutex_unlock.c: Likewise.
3338
89074592
UD
33392007-06-17 Andreas Schwab <schwab@suse.de>
3340
3341 * sysdeps/pthread/pt-initfini.c: Tell gcc about the nonstandard
3342 sections.
3343
d4201cc4
UD
33442007-06-17 Ulrich Drepper <drepper@redhat.com>
3345
3346 * allocatestack.c (allocate_stack): Make code compile if
3347 __ASSUME_PRIVATE_FUTEX is set.
3348
339dbf0e
UD
33492007-06-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3350
3351 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S:
3352 (__pthread_rwlock_rdlock): Don't use non SH-3/4 instruction.
3353 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S:
3354 (__pthread_rwlock_wrlock): Likewise.
3355 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
3356 (pthread_rwlock_timedrdlock): Likewise.
3357 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
3358 (pthread_rwlock_timedwrlock): Likewise.
3359 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S:
3360 (__pthread_rwlock_unlock): Likewise.
3361
33622007-06-10 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3363
3364 * sysdeps/sh/tcb-offsets.sym: Add PRIVATE_FUTEX.
3365 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Include endian.h.
3366 Split __flags into __flags, __shared, __pad1 and __pad2.
3367 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Use private
b42a214c 3368 futexes if they are available.
339dbf0e 3369 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Adjust so that change
b42a214c 3370 in libc-lowlevellock.S allow using private futexes.
339dbf0e
UD
3371 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
3372 FUTEX_PRIVATE_FLAG. Add additional parameter to lll_futex_wait,
3373 lll_futex_timed_wait and lll_futex_wake. Change lll_futex_wait
3374 to call lll_futex_timed_wait. Add lll_private_futex_wait,
3375 lll_private_futex_timed_wait and lll_private_futex_wake.
3376 (lll_robust_mutex_unlock): Fix typo.
3377 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Use private
b42a214c 3378 field in futex command setup.
339dbf0e
UD
3379 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Use
3380 COND_NWAITERS_SHIFT instead of COND_CLOCK_BITS.
3381 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
3382 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use private futexes
b42a214c 3383 if they are available. Remove clear_once_control.
339dbf0e
UD
3384 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Use private
3385 futexes if they are available.
3386 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
3387 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
3388 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
3389 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
3390 * sysdeps/unix/sysv/linux/sh/sem_post.S: Add private futex support.
3391 Wake only when there are waiters.
3392 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add private futex
3393 support. Indicate that there are waiters. Remove unnecessary
b42a214c 3394 extra cancellation test.
339dbf0e
UD
3395 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise. Removed
3396 left-over duplication of __sem_wait_cleanup.
3397
26f56c1c
UD
33982007-06-07 Ulrich Drepper <drepper@redhat.com>
3399
3400 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Add additional
3401 parameter to lll_futex_wait, lll_futex_timed_wait, and
3402 lll_futex_wake. Change lll_futex_wait to call lll_futex_timed_wait.
3403 Add lll_private_futex_wait, lll_private_futex_timed_wait, and
3404 lll_private_futex_wake.
3405 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
3406 * allocatestack.c: Adjust use of lll_futex_* macros.
3407 * init.c: Likewise.
3408 * lowlevellock.h: Likewise.
3409 * pthread_barrier_wait.c: Likewise.
3410 * pthread_cond_broadcast.c: Likewise.
3411 * pthread_cond_destroy.c: Likewise.
3412 * pthread_cond_signal.c: Likewise.
3413 * pthread_cond_timedwait.c: Likewise.
3414 * pthread_cond_wait.c: Likewise.
3415 * pthread_create.c: Likewise.
3416 * pthread_mutex_lock.c: Likewise.
3417 * pthread_mutex_setprioceiling.c: Likewise.
3418 * pthread_mutex_timedlock.c: Likewise.
3419 * pthread_mutex_unlock.c: Likewise.
3420 * pthread_rwlock_timedrdlock.c: Likewise.
3421 * pthread_rwlock_timedwrlock.c: Likewise.
3422 * pthread_rwlock_unlock.c: Likewise.
3423 * sysdeps/alpha/tls.h: Likewise.
3424 * sysdeps/i386/tls.h: Likewise.
3425 * sysdeps/ia64/tls.h: Likewise.
3426 * sysdeps/powerpc/tls.h: Likewise.
3427 * sysdeps/pthread/aio_misc.h: Likewise.
3428 * sysdeps/pthread/gai_misc.h: Likewise.
3429 * sysdeps/s390/tls.h: Likewise.
3430 * sysdeps/sh/tls.h: Likewise.
3431 * sysdeps/sparc/tls.h: Likewise.
3432 * sysdeps/unix/sysv/linux/fork.c: Likewise.
3433 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
3434 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: Likewise.
3435 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Likewise.
3436 * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
3437 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
3438 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
3439 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
3440 * sysdeps/unix/sysv/linux/sparc/pthread_once.c: Likewise.
3441 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c:
3442 Likewise.
3443 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: Likewise.
3444 * sysdeps/x86_64/tls.h: Likewise.
3445
ee5d5755
UD
34462007-05-29 Ulrich Drepper <drepper@redhat.com>
3447
b03b0c29
UD
3448 * pthread_getattr_np.c: No need to install a cancellation handler,
3449 this is no cancellation point.
3450 * pthread_getschedparam.c: Likewise.
3451 * pthread_setschedparam.c: Likewise.
3452 * pthread_setschedprio.c: Likewise.
3453 * sysdeps/unix/sysv/linux/lowlevellock.c: Remove all traces of
3454 lll_unlock_wake_cb.
3455 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
3456 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
3457 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
3458 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
3459 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
3460 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
3461 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
3462 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
3463 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
3464 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: Likewise.
3465 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
3466 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
fc3f0ccb 3467
0154658d
UD
3468 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Checking
3469 whether there are more than one thread makes no sense here since
3470 we only call the slow path if the locks are taken.
3471 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Likewise.
3472
ee5d5755
UD
3473 * sysdeps/unix/sysv/linux/internaltypes.h: Introduce
3474 COND_NWAITERS_SHIFT.
3475 * pthread_cond_destroy.c: Use COND_NWAITERS_SHIFT instead of
3476 COND_CLOCK_BITS.
3477 * pthread_cond_init.c: Likewise.
3478 * pthread_cond_timedwait.c: Likewise.
3479 * pthread_cond_wait.c: Likewise.
3480 * pthread_condattr_getclock.c: Likewise.
3481 * pthread_condattr_setclock.c: Likewise.
3482 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Likewise.
3483 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3484 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
3485 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3486 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3487
991fa82b
UD
34882007-05-28 Jakub Jelinek <jakub@redhat.com>
3489
40f57573
UD
3490 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c: Include
3491 unistd.h.
3492
991fa82b
UD
3493 * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Use explicit
3494 insn suffix.
3495 (THREAD_GSCOPE_GET_FLAG): Remove.
3496 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Remove.
3497 * allocatestack.c (__wait_lookup_done): Revert 2007-05-24
3498 changes.
3499 * sysdeps/powerpc/tls.h (tcbhead_t): Remove gscope_flag.
3500 (THREAD_GSCOPE_GET_FLAG): Remove.
3501 (THREAD_GSCOPE_RESET_FLAG): Use THREAD_SELF->header.gscope_flag
3502 instead of THREAD_GSCOPE_GET_FLAG.
3503 (THREAD_GSCOPE_SET_FLAG): Likewise. Add atomic_write_barrier after
3504 it.
3505 * sysdeps/s390/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
3506 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
3507 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
3508 THREAD_GSCOPE_WAIT): Define.
3509 * sysdeps/sparc/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
3510 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
3511 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
3512 THREAD_GSCOPE_WAIT): Define.
3513 * sysdeps/sh/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
3514 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
3515 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
3516 THREAD_GSCOPE_WAIT): Define.
3517 * sysdeps/ia64/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
3518 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
3519 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
3520 THREAD_GSCOPE_WAIT): Define.
3521
35222007-05-24 Richard Henderson <rth@redhat.com>
3523
3524 * descr.h (struct pthread): Add header.gscope_flag.
3525 * sysdeps/alpha/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
3526 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
3527 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
3528 THREAD_GSCOPE_WAIT): Define.
3529
e59660bc
UD
35302007-05-27 Ulrich Drepper <drepper@redhat.com>
3531
3532 * init.c: Make it compile with older kernel headers.
3533
3534 * tst-initializers1.c: Show through exit code which test failed.
3535
3536 * pthread_rwlock_init.c: Also initialize __shared field.
3537 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Split __flags
3538 element in rwlock structure into four byte elements. One of them is
3539 the new __shared element.
3540 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h [__WORDSIZE=32]:
3541 Likewise.
cd0dbd89 3542 [__WORDSIZE=64]: Renamed __pad1 element int rwlock structure to
e59660bc
UD
3543 __shared, adjust names of other padding elements.
3544 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3545 * sysdeps/pthread/pthread.h: Adjust rwlock initializers.
3546 * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: Add PSHARED.
3547 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define
3548 FUTEX_PRIVATE_FLAG.
3549 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Change main
3550 futex to use private operations if possible.
3551 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
3552 Likewise.
3553 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3554 Likewise.
3555 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
3556 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
50f1dec5
UD
3557 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
3558 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
3559 Likewise.
3560 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
3561 Likewise.
3562 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
3563 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
e59660bc 3564
d8ff3792
UD
35652007-05-26 Ulrich Drepper <drepper@redhat.com>
3566
546346b6
UD
3567 * pthreadP.h (PTHREAD_RWLOCK_PREFER_READER_P): Define.
3568 * pthread_rwlock_rdlock.c: Use PTHREAD_RWLOCK_PREFER_READER_P.
3569 * pthread_rwlock_timedrdlock.c: Likewise.
3570 * pthread_rwlock_tryrdlock.c: Likewise.
3571
a2dd3360
UD
3572 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S (sem_trywait): Tiny
3573 optimization.
3574
6df7ffad
UD
3575 * sysdeps/unix/sysv/linux/sem_wait.c: Add missing break.
3576 * sysdeps/unix/sysv/linux/sem_timedwait.c: Removed left-over
3577 duplication of __sem_wait_cleanup.
3578
3579 * allocatestack.c: Revert last change.
3580 * init.c: Likewise.
3581 * sysdeps/i386/tls.h: Likewise.
3582 * sysdeps/x86_64/tls.h: Likewise.
3583 * descr.h [TLS_DTV_AT_TP] (struct pthread): Add private_futex field to
3584 header structure.
3585 * sysdeps/powerpc/tcb-offsets.sym: Add PRIVATE_FUTEX_OFFSET.
3586
d8ff3792
UD
3587 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_barrier):
3588 Add private field.
3589 * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: Add PRIVATE definition.
3590 * pthread_barrier_init.c: Set private flag if pshared and private
3591 futexes are supported.
3592 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Use
3593 private field in futex command setup.
3594 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
3595
3d2dd6ca
UD
35962007-05-25 Ulrich Drepper <drepper@redhat.com>
3597
42e6c665
UD
3598 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Add private futex
3599 support.
3600 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
3601 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
3602 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
3603 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
3604 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
3605
3d2dd6ca
UD
3606 * semaphoreP.h: Declare __old_sem_init and __old_sem_wait.
3607 * sem_init.c (__new_sem_init): Rewrite to initialize all three
3608 fields in the structure.
3609 (__old_sem_init): New function.
3610 * sem_open.c: Initialize all fields of the structure.
3611 * sem_getvalue.c: Adjust for renamed element.
3612 * sysdeps/unix/sysv/linux/Makefile [subdir=nptl]
3613 (gen-as-const-headers): Add structsem.sym.
3614 * sysdeps/unix/sysv/linux/structsem.sym: New file.
3615 * sysdeps/unix/sysv/linux/internaltypes.h: Rename struct sem to
3616 struct new_sem. Add struct old_sem.
3617 * sysdeps/unix/sysv/linux/sem_post.c: Wake only when there are waiters.
3618 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
3619 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
3620 * sysdeps/unix/sysv/linux/sem_wait.c: Indicate that there are waiters.
3621 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
3622 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
3623 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
3624 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
3625 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
3626 * Makefile (tests): Add tst-sem10, tst-sem11, tst-sem12.
3627 * tst-sem10.c: New file.
3628 * tst-sem11.c: New file.
3629 * tst-sem12.c: New file.
3630 * tst-typesizes.c: Test struct new_sem and struct old_sem instead
3631 of struct sem.
3632
20a4d722
JJ
36332007-05-25 Ulrich Drepper <drepper@redhat.com>
3634 Jakub Jelinek <jakub@redhat.com>
3635
3636 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
3637 Move __pthread_enable_asynccancel right before futex syscall.
3638 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
3639 Likewise.
3640
36412007-05-24 Jakub Jelinek <jakub@redhat.com>
86acd596
UD
3642
3643 * sysdeps/i386/tls.h (THREAD_SET_PRIVATE_FUTEX,
3644 THREAD_COPY_PRIVATE_FUTEX): Define.
3645 * sysdeps/x86_64/tls.h (THREAD_SET_PRIVATE_FUTEX,
3646 THREAD_COPY_PRIVATE_FUTEX): Define.
3647 * allocatestack.c (allocate_stack): Use THREAD_COPY_PRIVATE_FUTEX.
3648 * init.c (__pthread_initialize_minimal_internal): Use
3649 THREAD_SET_PRIVATE_FUTEX.
0a54ab53
UD
3650
3651 * sysdeps/powerpc/tls.h (tcbhead_t): Add gscope_flag.
3652 (THREAD_GSCOPE_FLAG_UNUSED, THREAD_GSCOPE_FLAG_USED,
3653 THREAD_GSCOPE_FLAG_WAIT): Define.
3654 (THREAD_GSCOPE_GET_FLAG, THREAD_GSCOPE_SET_FLAG,
3655 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_WAIT): Define.
3656 * sysdeps/i386/tls.h (THREAD_GSCOPE_WAIT): Don't use
3657 PTR_DEMANGLE.
3658 (THREAD_GSCOPE_GET_FLAG): Define.
3659 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Define.
3660 * allocatestack.c (__wait_lookup_done): Use THREAD_GSCOPE_GET_FLAG
3661 instead of ->header.gscope_flag directly.
3662
5a8075b1
UD
36632007-05-23 Ulrich Drepper <drepper@redhat.com>
3664
3665 * init.c (__pthread_initialize_minimal_internal): Check whether
3666 private futexes are available.
3667 * allocatestack.c (allocate_stack): Copy private_futex field from
3668 current thread into the new stack.
3669 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Use private
3670 futexes if they are available.
3671 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise
3672 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Adjust so that change
3673 in libc-lowlevellock.S allow using private futexes.
3674 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
3675 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
3676 FUTEX_PRIVATE_FLAG.
3677 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
3678 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use private futexes
3679 if they are available.
3680 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
3681 * sysdeps/x86_64/tcb-offsets.sym: Add PRIVATE_FUTEX.
3682 * sysdeps/i386/tcb-offsets.sym: Likewise.
3683 * sysdeps/x86_64/tls.h (tcbhead_t): Add private_futex field.
3684 * sysdeps/i386/tls.h (tcbhead_t): Likewise.
3685
6d59823c
UD
36862007-05-21 Ulrich Drepper <drepper@redhat.com>
3687
3688 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
3689 Remove ptr_wait_lookup_done again.
3690 * init.c (pthread_functions): Don't add .ptr_wait_lookup_done here.
3691 (__pthread_initialize_minimal_internal): Initialize
3692 _dl_wait_lookup_done pointer in _rtld_global directly.
3693 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
3694 Remove code to code _dl_wait_lookup_done.
3695 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_WAIT): The pointer is not
3696 encrypted for now.
3697
2c9718f3
JJ
36982007-05-21 Jakub Jelinek <jakub@redhat.com>
3699
3700 * tst-robust9.c (do_test): Don't fail if ENABLE_PI and
3701 pthread_mutex_init failed with ENOTSUP.
3702
df94b641
UD
37032007-05-19 Ulrich Drepper <drepper@redhat.com>
3704
3705 * allocatestack.c (__wait_lookup_done): New function.
3706 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
3707 Add ptr_wait_lookup_done.
3708 * init.c (pthread_functions): Initialize .ptr_wait_lookup_done.
3709 * pthreadP.h: Declare __wait_lookup_done.
3710 * sysdeps/i386/tls.h (tcbhead_t): Add gscope_flag.
3711 Define macros to implement reference handling of global scope.
3712 * sysdeps/x86_64/tls.h: Likewise.
3713 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
3714 Initialize GL(dl_wait_lookup_done).
3715
bec51a30
UD
37162007-05-17 Ulrich Drepper <drepper@redhat.com>
3717
113ad5fc
UD
3718 [BZ #4512]
3719 * pthread_mutex_lock.c: Preserve FUTEX_WAITERS bit when dead owner
3720 is detected.
3721 * pthread_mutex_timedlock.c: Likewise.
3722 * pthread_mutex_trylock.c: Likewise.
3723 Patch in part by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
3724
3725 * Makefile (tests): Add tst-robust9 and tst-robustpi9.
3726 * tst-robust9.c: New file.
3727 * tst-robustpi9.c: New file.
3728
bec51a30
UD
3729 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Remove
3730 unnecessary extra cancellation test.
3731
83d87915
UD
37322007-05-14 Ulrich Drepper <drepper@redhat.com>
3733
83d87915
UD
3734 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Remove unnecessary
3735 extra cancellation test.
3736 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
3737
3771196d
UD
37382007-05-10 Ulrich Drepper <drepper@redhat.com>
3739
341c566f
UD
3740 * descr.h (struct pthread): Rearrange members to fill hole in
3741 64-bit layout.
3742
3771196d
UD
3743 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
3744 (__pthread_setaffinity_new): If syscall was successful and
3745 RESET_VGETCPU_CACHE is defined, use it before returning.
3746 * sysdeps/unix/sysv/linux/x86_64/pthread_setaffinity.c: New file.
3747
7d29b542
JJ
37482007-05-10 Jakub Jelinek <jakub@redhat.com>
3749
3750 [BZ #4455]
3751 * tst-align2.c: Include stackinfo.h.
3752 * tst-getpid1.c: Likewise.
3753
16105fe0
UD
37542007-05-02 Carlos O'Donell <carlos@systemhalted.org>
3755
29c113f0
UD
3756 [BZ #4455]
3757 * tst-align2.c (do_test): Add _STACK_GROWS_UP case.
3758 * tst-getpid1.c (do_test): Likewise.
3759
16105fe0
UD
3760 [BZ #4456]
3761 * allocatestack.c (change_stack_perm): Add _STACK_GROWS_UP case.
3762 (allocate_stack): Likewise.
3763
6780bc44
UD
37642007-05-07 Ulrich Drepper <drepper@redhat.com>
3765
3766 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
3767 (__lll_robust_lock_wait): Fix race caused by reloading of futex value.
3768 (__lll_robust_timedlock_wait): Likewise.
3769 Reported by Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>.
3770
aa75f64c
UD
37712007-05-06 Mike Frysinger <vapier@gentoo.org>
3772
15eca720 3773 [BZ #4465]
aa75f64c
UD
3774 * tst-cancel-wrappers.sh: Set C["fdatasync"] to 1.
3775 * tst-cancel4.c (tf_fdatasync): New test.
3776
f672076e
UD
37772007-04-27 Ulrich Drepper <drepper@redhat.com>
3778
1bb5f5a1
UD
3779 [BZ #4392]
3780 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Treat error
3781 check mutexes like normal mutexes.
3782
f672076e
UD
3783 [BZ #4306]
3784 * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
3785 Initialize the whole sigevent structure to appease valgrind.
3786
bce20b9a
UD
37872007-04-25 Ulrich Drepper <drepper@redhat.com>
3788
3789 * sysdeps/x86_64/tls.h (tcbhead_t): Add vgetcpu_cache.
3790 * sysdeps/x86_64/tcb-offsets.sym: Add VGETCPU_CACHE_OFFSET.
3791
0c786eac
UD
37922007-04-06 Ulrich Drepper <drepper@redhat.com>
3793
3794 * tst-locale1.c: Avoid warnings.
3795 * tst-locale2.c: Likewise.
3796
e1f0c5bc
UD
37972007-03-19 Steven Munroe <sjmunroe@us.ibm.com>
3798
3799 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
3800 (__lll_robust_trylock): Add MUTEX_HINT_ACQ to lwarx instruction.
3801
965cba04
UD
38022007-03-16 Jakub Jelinek <jakub@redhat.com>
3803
3804 * sysdeps/pthread/bits/libc-lock.h: Use __extern_inline and
3805 __extern_always_inline where appropriate.
3806 * sysdeps/pthread/pthread.h: Likewise.
3807
a5ea509b
RH
38082007-03-13 Richard Henderson <rth@redhat.com>
3809
3810 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Use two
3811 separate cfi regions for the two subsections.
3812
00a1430e
UD
38132007-02-25 Ulrich Drepper <drepper@redhat.com>
3814
3815 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset refcntr in
3816 new thread, don't just decrement it.
3817 Patch by Suzuki K P <suzuki@in.ibm.com>.
3818
63a2f305
UD
38192007-02-21 Ulrich Drepper <drepper@redhat.com>
3820
3821 * sysdeps/pthread/pthread-functions.h: Correct last patch, correct
3822 PTHFCT_CALL definition.
3823
2484468b
UD
38242007-02-18 Ulrich Drepper <drepper@redhat.com>
3825
3826 * sysdeps/pthread/pthread-functions.h: If PTR_DEMANGLE is not
3827 available, don't use it.
3828
5ed61e0f
UD
38292007-02-09 Jakub Jelinek <jakub@redhat.com>
3830
3831 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
3832 (__lll_mutex_timedlock_wait): Use correct pointer when we don't
3833 call into the kernel to delay.
3834
10ccaa5c
UD
38352007-01-18 Ulrich Drepper <drepper@redhat.com>
3836
f8a17855
UD
3837 * tst-initializers1.c: We want to test the initializers as seen
3838 outside of libc, so undefined _LIBC.
3839
10ccaa5c
UD
3840 * pthread_join.c (cleanup): Avoid warning.
3841
ea1533e0
UD
38422007-01-17 Ulrich Drepper <drepper@redhat.com>
3843
1476bce6
UD
3844 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
3845 (__lll_timedwait_tid): Add unwind info.
3846
ea1533e0
UD
3847 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Don't just copy the
3848 function table, mangle the pointers.
3849 * sysdeps/pthread/pthread-functions.h: Define PTHFCT_CALL.
3850 * forward.c: Use PTHFCT_CALL and __libc_pthread_functions_init.
3851 * sysdeps/pthread/bits/libc-lock.h: When using __libc_pthread_functions
3852 demangle pointers before use.
3853 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Use PTHFCT_CALL to
3854 demangle pointer.
3855 * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
3856 * sysdeps/pthread/setxid.h: Likewise.
3857
8980796b
UD
38582007-01-12 Ulrich Drepper <drepper@redhat.com>
3859
3860 * tst-rwlock7.c: Show some more information in case of correct
3861 behavior.
3862
a1d87b5d
UD
38632007-01-11 Ulrich Drepper <drepper@redhat.com>
3864
3865 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
3866 (lll_futex_timed_wait): Undo part of last change, don't negate
3867 return value.
3868
11bf311e 38692007-01-10 Ulrich Drepper <drepper@redhat.com>
66193697 3870
11bf311e
UD
3871 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Cleanups. Define
3872 FUTEX_CMP_REQUEUE and lll_futex_requeue.
66193697 3873
11bf311e 38742006-12-28 David S. Miller <davem@davemloft.net>
14a31e35 3875
11bf311e 3876 * shlib-versions: Fix sparc64 linux target specification.
a744da90 3877
11bf311e 38782007-01-10 Jakub Jelinek <jakub@redhat.com>
a744da90 3879
11bf311e
UD
3880 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
3881 Adjust include path for pthread_barrier_wait.c move.
fc242bef 3882
11bf311e 38832006-12-21 Jakub Jelinek <jakub@redhat.com>
fc242bef 3884
11bf311e
UD
3885 * sysdeps/unix/sysv/linux/pthread_kill.c (pthread_kill): Make sure
3886 tid isn't reread from pd->tid in between ESRCH test and the syscall.
a822d9f4 3887
11bf311e
UD
38882006-12-06 Jakub Jelinek <jakub@redhat.com>
3889
3890 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Handle
3891 6 argument cancellable syscalls.
3892 (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
3893 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO): Handle
3894 6 argument cancellable syscalls.
3895 (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
a822d9f4 3896
66f17705
UD
38972006-12-09 Ulrich Drepper <drepper@redhat.com>
3898
3899 * sysdeps/unix/sysv/linux/rtld-lowlevel.h
3900 (__rtld_mrlock_initialize): Add missing closing parenthesis.
3901
11bf311e
UD
39022006-10-30 Jakub Jelinek <jakub@redhat.com>
3903
3904 * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
3905 __sync_lock_release instead of __sync_lock_release_si.
3906
536e40e2
UD
39072006-10-29 Jakub Jelinek <jakub@redhat.com>
3908
3909 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (RTLD_SINGLE_THREAD_P):
3910 Define.
3911 (SINGLE_THREAD_P): Define to 1 if IS_IN_rtld.
3912 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Likewise.
3913 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
3914 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
3915 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
3916 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
3917 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
3918 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
3919 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
3920 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
3921 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
3922
11bf311e
UD
39232006-10-27 Ulrich Drepper <drepper@redhat.com>
3924
3925 * sysdeps/pthread/pthread_barrier_wait.c: Move to...
3926 * pthread_barrier_wait.c: ...here.
3927 * sysdeps/pthread/pthread_cond_broadcast.c: Move to...
3928 * pthread_cond_broadcast.c: ...here.
3929 * sysdeps/pthread/pthread_cond_signal.c: Move to...
3930 * pthread_cond_signal.c: ...here.
3931 * sysdeps/pthread/pthread_cond_timedwait.c: Move to...
3932 * pthread_cond_timedwait.c: ...here.
3933 * sysdeps/pthread/pthread_cond_wait.c: Move to...
3934 * pthread_cond_wait.c: ...here.
3935 * sysdeps/pthread/pthread_once.c: Move to...
3936 * pthread_once.c: ...here.
3937 * sysdeps/pthread/pthread_rwlock_rdlock.c: Move to...
3938 * pthread_rwlock_rdlock.c: ...here.
3939 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Move to...
3940 * pthread_rwlock_timedrdlock.c: ...here.
3941 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Move to...
3942 * pthread_rwlock_timedwrlock.c: ...here.
3943 * sysdeps/pthread/pthread_rwlock_unlock.c: Move to...
3944 * pthread_rwlock_unlock.c: ...here.
3945 * sysdeps/pthread/pthread_rwlock_wrlock.c: Move to...
3946 * pthread_rwlock_wrlock.c: ...here.
3947 * sysdeps/pthread/pthread_spin_destroy.c: Move to...
3948 * pthread_spin_destroy.c: ...here.
3949 * sysdeps/pthread/pthread_spin_init.c: Move to...
3950 * pthread_spin_init.c: ...here.
3951 * sysdeps/pthread/pthread_spin_unlock.c: Move to...
3952 * pthread_spin_unlock.c: ...here.
3953 * sysdeps/pthread/pthread_getcpuclockid.c: Move to...
3954 * pthread_getcpuclockid.c: ...here.
3955
3956 * init.c: USE_TLS support is now always enabled.
3957 * tst-tls5.h: Likewise.
3958 * sysdeps/alpha/tls.h: Likewise.
3959 * sysdeps/i386/tls.h: Likewise.
3960 * sysdeps/ia64/tls.h: Likewise.
3961 * sysdeps/powerpc/tls.h: Likewise.
3962 * sysdeps/s390/tls.h: Likewise.
3963 * sysdeps/sh/tls.h: Likewise.
3964 * sysdeps/sparc/tls.h: Likewise.
3965 * sysdeps/x86_64/tls.h: Likewise.
3966
006a8f6f 39672006-10-27 Jakub Jelinek <jakub@redhat.com>
c0a777e8
UD
3968
3969 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
3970 __rtld_mrlock_change): Update oldval if atomic compare and exchange
3971 failed.
3972
3973 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
3974 Define to THREAD_SELF->header.multiple_threads.
3975 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
3976 Likewise.
3977 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
3978 Likewise.
3979 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
3980 (SINGLE_THREAD_P): Likewise.
3981 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
3982 (SINGLE_THREAD_P): Likewise.
3983 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
3984 (SINGLE_THREAD_P): Likewise.
3985 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
3986 (SINGLE_THREAD_P): Likewise.
3987 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (SINGLE_THREAD_P):
3988 Likewise.
3989 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
3990 (SINGLE_THREAD_P): Likewise.
3991 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
3992 (SINGLE_THREAD_P): Likewise.
3993 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (SINGLE_THREAD_P):
3994 Likewise.
3995
11bf311e 39962006-10-26 Jakub Jelinek <jakub@redhat.com>
32c075e1 3997
11bf311e
UD
3998 * pthread_attr_setstacksize.c (NEW_VERNUM): Define to GLIBC_2_3_3
3999 by default rather than 2_3_3.
32c075e1 4000
11bf311e 40012006-10-17 Jakub Jelinek <jakub@redhat.com>
32c075e1 4002
11bf311e
UD
4003 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
4004 __rtld_mrlock_unlock, __rtld_mrlock_change, __rtld_mrlock_done): Use
4005 atomic_* instead of catomic_* macros.
4006
40072006-10-12 Ulrich Drepper <drepper@redhat.com>
4008
4009 [BZ #3285]
4010 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add SEM_VALUE_MAX.
4011 * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
4012 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
4013 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
4014 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
4015 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Remove SEM_VALUE_MAX.
4016 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
4017 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
4018 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
4019 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: Likewise.
4020 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
4021 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
4022 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
4023
40242006-10-11 Ulrich Drepper <drepper@redhat.com>
4025
4026 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add support for
4027 cancelable syscalls with six parameters.
4028
4029 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Use catomic_*
4030 operations instead of atomic_*.
32c075e1 4031
11bf311e 40322006-10-09 Ulrich Drepper <drepper@redhat.com>
32c075e1 4033
11bf311e 4034 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: New file..
32c075e1 4035
11bf311e 40362006-10-07 Ulrich Drepper <drepper@redhat.com>
32c075e1 4037
11bf311e
UD
4038 * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: New file.
4039 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstack.c: New file.
4040 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c:
4041 New file.
4042 * pthread_attr_setstack.c: Allow overwriting the version number of the
4043 new symbol.
4044 * pthread_attr_setstacksize.c: Likewise.
4045 (__old_pthread_attr_setstacksize): If STACKSIZE_ADJUST is defined use
4046 it.
4047 * sysdeps/unix/sysv/linux/powerpc/Versions (libpthread): Add
4048 pthread_attr_setstack and pthread_attr_setstacksize to GLIBC_2.6.
fa279678 4049
457b559e
UD
40502006-09-24 Ulrich Drepper <drepper@redhat.com>
4051
4052 [BZ #3251]
4053 * descr.h (ENQUEUE_MUTEX_BOTH): Add cast to avoid warning.
4054 Patch by Petr Baudis.
4055
0466106e
UD
40562006-09-18 Jakub Jelinek <jakub@redhat.com>
4057
4058 * tst-kill4.c (do_test): Explicitly set tf thread's stack size.
4059
4060 * tst-cancel2.c (tf): Loop as long as something was written.
4061
bd6d3b7d
UD
40622006-09-12 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4063
4064 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: For PI
4065 mutexes wake all mutexes.
4066 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Don't increment
4067 WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
4068 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4069
30aa5785
UD
40702006-09-12 Ulrich Drepper <drepper@redhat.com>
4071
4072 * tst-cond22.c (tf): Slight changes to the pthread_cond_wait use
4073 to guarantee the thread is always canceled.
4074
2b6a801e
UD
40752006-09-08 Jakub Jelinek <jakub@redhat.com>
4076
4077 * tst-cond22.c: Include pthread.h instead of pthreadP.h.
4078 Include stdlib.h.
4079 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Only
4080 increase FUTEX if increasing WAKEUP_SEQ. Fix comment typo.
4081 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
4082 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4083 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
bd6d3b7d 4084
346e6ad4
UD
40852006-09-08 Ulrich Drepper <drepper@redhat.com>
4086
4087 [BZ #3123]
4088 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Don't
4089 increment WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
2b6a801e
UD
4090 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
4091 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4092 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
346e6ad4
UD
4093 * Makefile (tests): Add tst-cond22.
4094 * tst-cond22.c: New file.
4095
b051fc44
UD
40962006-09-05 Ulrich Drepper <drepper@redhat.com>
4097
4098 [BZ #3124]
4099 * descr.h (struct pthread): Add parent_cancelhandling.
4100 * sysdeps/pthread/createthread.c (create_thread): Pass parent
4101 cancelhandling value to child.
4102 * pthread_create.c (start_thread): If parent thread was canceled
4103 reset the SIGCANCEL mask.
4104 * Makefile (tests): Add tst-cancel25.
4105 * tst-cancel25.c: New file.
4106
d052233c 41072006-09-05 Jakub Jelinek <jakub@redhat.com>
b42a214c 4108 Ulrich Drepper <drepper@redhat.com>
d052233c
UD
4109
4110 * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY): Don't decrement
4111 counterp if it is already zero.
4112 * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY): Likewise..
4113
cd248c3f 41142006-03-04 Jakub Jelinek <jakub@redhat.com>
b42a214c 4115 Roland McGrath <roland@redhat.com>
cd248c3f
UD
4116
4117 * sysdeps/unix/sysv/linux/i386/lowlevellock.h
4118 (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
4119 LLL_STUB_UNWIND_INFO_3, LLL_STUB_UNWIND_INFO_4): Define.
4120 (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
4121 lll_robust_mutex_cond_lock, lll_mutex_timedlock,
4122 lll_robust_mutex_timedlock, lll_mutex_unlock,
4123 lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
4124 Add _L_*_ symbols around the subsection.
4125 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Add unwind info.
4126 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Likewise.
4127
41282006-03-03 Jakub Jelinek <jakub@redhat.com>
b42a214c 4129 Roland McGrath <roland@redhat.com>
cd248c3f
UD
4130
4131 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
4132 (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
4133 LLL_STUB_UNWIND_INFO_5, LLL_STUB_UNWIND_INFO_6): Define.
4134 (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
4135 lll_robust_mutex_cond_lock, lll_mutex_timedlock,
4136 lll_robust_mutex_timedlock, lll_mutex_unlock,
4137 lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
4138 Add _L_*_ symbols around the subsection.
4139 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Add unwind info.
4140 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
4141
b80770b2
UD
41422006-08-31 Ulrich Drepper <drepper@redhat.com>
4143
4144 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Undo last
4145 change because it can disturb too much existing code. If real hard
4146 reader preference is needed we'll introduce another type.
4147 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
4148 (pthread_rwlock_timedwrlock): Likewise.
4149 * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
4150 Likewise.
4151
bee2df0b
UD
41522006-08-30 Ulrich Drepper <drepper@redhat.com>
4153
4154 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Respect
4155 reader preference.
4156 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
4157 (pthread_rwlock_timedwrlock): Likewise.
4158 * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
4159 Likewise.
4160
d678ebc1
UD
41612006-08-25 Jakub Jelinek <jakub@redhat.com>
4162
4163 * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libpthread):
4164 Only define ifdef SHARED.
4165
ba408f84
UD
41662006-08-23 Ulrich Drepper <drepper@redhat.com>
4167
4168 * allocatestack.c (queue_stack): Move freeing of surplus stacks to...
4169 (free_stacks): ...here.
4170 (__free_stack_cache): New function.
4171 * pthreadP.h: Declare __free_stack_cache.
4172 * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
4173 ptr_freeres.
4174 * init.c (pthread_functions): Initialize ptr_freeres.
4175 * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libptread):
4176 New freeres function.
4177
376e973a
UD
41782006-07-30 Joseph S. Myers <joseph@codesourcery.com>
4179
4180 [BZ #3018]
4181 * Makefile (extra-objs): Add modules to extra-test-objs instead.
4182
2b34af01
UD
41832006-08-20 Ulrich Drepper <drepper@redhat.com>
4184
4185 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
4186 _XOPEN_REALTIME_THREADS.
4187
89c85f87
UD
41882006-08-15 Jakub Jelinek <jakub@redhat.com>
4189
4190 * sysdeps/unix/sysv/linux/clock_settime.c (INTERNAL_VSYSCALL): Use
4191 HAVE_CLOCK_GETRES_VSYSCALL as guard macro rather than
4192 HAVE_CLOCK_GETTIME_VSYSCALL.
4193 (maybe_syscall_settime_cpu): Use plain INTERNAL_VSYSCALL here.
4194
f17efcb4
UD
41952006-08-14 Jakub Jelinek <jakub@redhat.com>
4196
4197 * sysdeps/unix/sysv/linux/bits/posix_opt.h
4198 (_POSIX_THREAD_PRIO_PROTECT): Define to 200112L.
4199 * descr.h (struct priority_protection_data): New type.
4200 (struct pthread): Add tpp field.
4201 * pthreadP.h (PTHREAD_MUTEX_PP_NORMAL_NP,
4202 PTHREAD_MUTEX_PP_RECURSIVE_NP, PTHREAD_MUTEX_PP_ERRORCHECK_NP,
4203 PTHREAD_MUTEX_PP_ADAPTIVE_NP): New enum values.
4204 * pthread_mutex_init.c (__pthread_mutex_init): Handle non-robust
4205 TPP mutexes.
4206 * pthread_mutex_lock.c (__pthread_mutex_lock): Handle TPP mutexes.
4207 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Likewise.
4208 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Likewise.
4209 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Likewise.
4210 * tpp.c: New file.
4211 * pthread_setschedparam.c (__pthread_setschedparam): Handle priority
4212 boosted by TPP.
4213 * pthread_setschedprio.c (pthread_setschedprio): Likewise.
4214 * pthread_mutexattr_getprioceiling.c
4215 (pthread_mutexattr_getprioceiling): If ceiling is 0, ensure it is
4216 in the SCHED_FIFO priority range.
4217 * pthread_mutexattr_setprioceiling.c
4218 (pthread_mutexattr_setprioceiling): Fix prioceiling validation.
4219 * pthread_mutex_getprioceiling.c (pthread_mutex_getprioceiling): Fail
4220 if mutex is not TPP. Ceiling is now in __data.__lock.
4221 * pthread_mutex_setprioceiling.c: Include stdbool.h.
4222 (pthread_mutex_setprioceiling): Fix prioceiling validation. Ceiling
4223 is now in __data.__lock. Add locking.
4224 * pthread_create.c (__free_tcb): Free pd->tpp structure.
4225 * Makefile (libpthread-routines): Add tpp.
4226 (xtests): Add tst-mutexpp1, tst-mutexpp6 and tst-mutexpp10.
4227 * tst-tpp.h: New file.
4228 * tst-mutexpp1.c: New file.
4229 * tst-mutexpp6.c: New file.
4230 * tst-mutexpp10.c: New file.
4231 * tst-mutex1.c (TEST_FUNCTION): Don't redefine if already defined.
4232 * tst-mutex6.c (TEST_FUNCTION): Likewise.
4233
22bb134c
UD
42342006-08-12 Ulrich Drepper <drepper@redhat.com>
4235
4236 [BZ #2843]
4237 * pthread_join.c (pthread_join): Account for self being canceled
4238 when checking for deadlocks.
4239 * tst-join5.c: Cleanups. Allow to be used in tst-join6.
4240 (tf1): Don't print anything after pthread_join returns, this would be
4241 another cancellation point.
4242 (tf2): Likewise.
4243 * tst-join6.c: New file.
4244 * Makefile (tests): Add tst-join6.
4245
f1762c0c
UD
42462006-08-03 Ulrich Drepper <drepper@redhat.com>
4247
9c06eb66
UD
4248 [BZ #2892]
4249 * pthread_setspecific.c (__pthread_setspecific): Check
4250 out-of-range index before checking for unused key.
4251
f1762c0c
UD
4252 * sysdeps/pthread/gai_misc.h: New file.
4253
7bb1b2c9
UD
42542006-08-01 Ulrich Drepper <drepper@redhat.com>
4255
4256 * sysdeps/unix/sysv/linux/i386/smp.h: New file. Old Linux-specific
4257 file. Don't use sysctl.
4258 * sysdeps/unix/sysv/linux/smp.h: Always assume SMP. Archs can
4259 overwrite the file if this is likely not true.
4260
b06e7e9a
UD
42612006-07-31 Daniel Jacobowitz <dan@codesourcery.com>
4262
4263 * allocatestack.c (__reclaim_stacks): Reset the PID on cached stacks.
4264 * Makefile (tests): Add tst-getpid3.
4265 * tst-getpid3.c: New file.
4266
b894c2ea
RM
42672006-07-30 Roland McGrath <roland@redhat.com>
4268
4269 * Makefile (libpthread-routines): Add ptw-sigsuspend.
4270
4271 * sysdeps/unix/sysv/linux/i386/not-cancel.h
4272 (pause_not_cancel): New macro.
4273 (nanosleep_not_cancel): New macro.
4274 (sigsuspend_not_cancel): New macro.
4275 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
4276 nanosleep_not_cancel macro from <not-cancel.h>.
4277 * pthread_mutex_lock.c (__pthread_mutex_lock): Use pause_not_cancel
4278 macro from <not-cancel.h>.
4279
df47504c
UD
42802006-07-28 Ulrich Drepper <drepper@redhat.com>
4281 Jakub Jelinek <jakub@redhat.com>
4282
4283 * descr.h: Change ENQUEUE_MUTEX and DEQUEUE_MUTEX for bit 0
4284 notification of PI mutex. Add ENQUEUE_MUTEX_PI.
4285 * pthreadP.h: Define PTHREAD_MUTEX_PI_* macros for PI mutex types.
4286 * pthread_mutex_setprioceilining.c: Adjust for mutex type name change.
4287 * pthread_mutex_init.c: Add support for priority inheritance mutex.
4288 * pthread_mutex_lock.c: Likewise.
4289 * pthread_mutex_timedlock.c: Likewise.
4290 * pthread_mutex_trylock.c: Likewise.
4291 * pthread_mutex_unlock.c: Likewise.
4292 * sysdeps/pthread/pthread_cond_broadcast.c: For PI mutexes wake
4293 all mutexes.
4294 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.c: Likewise.
4295 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.c: Likewise.
4296 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: New file.
4297 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-header): Add
4298 pthread-pi-defines.sym.
4299 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_LOCK_PI,
4300 FUTEX_UNLOCK_PI, and FUTEX_TRYLOCK_PI.
4301 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
d5ba53f9
UD
4302 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
4303 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
4304 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
4305 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
4306 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
4307 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
df47504c
UD
4308 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
4309 _POSIX_THREAD_PRIO_INHERIT to 200112L.
4310 * tst-mutex1.c: Adjust to allow use in PI mutex test.
4311 * tst-mutex2.c: Likewise.
4312 * tst-mutex3.c: Likewise.
4313 * tst-mutex4.c: Likewise.
4314 * tst-mutex5.c: Likewise.
4315 * tst-mutex6.c: Likewise.
4316 * tst-mutex7.c: Likewise.
4317 * tst-mutex7a.c: Likewise.
4318 * tst-mutex8.c: Likewise.
4319 * tst-mutex9.c: Likewise.
4320 * tst-robust1.c: Likewise.
4321 * tst-robust7.c: Likewise.
4322 * tst-robust8.c: Likewise.
4323 * tst-mutexpi1.c: New file.
4324 * tst-mutexpi2.c: New file.
4325 * tst-mutexpi3.c: New file.
4326 * tst-mutexpi4.c: New file.
4327 * tst-mutexpi5.c: New file.
4328 * tst-mutexpi6.c: New file.
4329 * tst-mutexpi7.c: New file.
4330 * tst-mutexpi7a.c: New file.
4331 * tst-mutexpi8.c: New file.
4332 * tst-mutexpi9.c: New file.
4333 * tst-robust1.c: New file.
4334 * tst-robust2.c: New file.
4335 * tst-robust3.c: New file.
4336 * tst-robust4.c: New file.
4337 * tst-robust5.c: New file.
4338 * tst-robust6.c: New file.
4339 * tst-robust7.c: New file.
4340 * tst-robust8.c: New file.
4341 * Makefile (tests): Add the new tests.
4342
4343 * pthread_create.c (start_thread): Add some casts to avoid warnings.
4344 * pthread_mutex_destroy.c: Remove unneeded label.
4345
f3be81a9
UD
43462006-07-01 Ulrich Drepper <drepper@redhat.com>
4347
4348 * pthread_mutex_init.c (__pthread_mutex_init): Move some
4349 computations to compile time.
4350
c26ca5e1
UD
43512006-06-04 Ulrich Drepper <drepper@redhat.com>
4352
4353 * sysdeps/pthread/pthread.h: Add pthread_equal inline version.
4354
6f8a7dff
UD
43552006-05-15 Ulrich Drepper <drepper@redhat.com>
4356
c26ca5e1 4357 * sysdeps/unix/sysv/linux/fork.h: Mark __fork_handlers as hidden.
6f8a7dff 4358
3d237e42
UD
43592006-05-11 Ulrich Drepper <drepper@redhat.com>
4360
04974d63
UD
4361 * pthread_key_create.c (__pthread_key_create): Do away with
4362 __pthread_keys_lock.
4363
4364 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4365 (__kernel_cpumask_size): Mark as hidden.
4366 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
4367
3d237e42
UD
4368 * sem_open.c (__sem_mappings_lock): Mark as hidden.
4369 * semaphoreP.h (__sem_mappings_lock): Likewise.
4370
790fc6e4
UD
43712006-05-10 Ulrich Drepper <drepper@redhat.com>
4372
4373 * pthread_atfork.c: Mark __dso_handle as hidden.
4374
be434a72
UD
43752006-05-09 Ulrich Drepper <drepper@redhat.com>
4376
4377 [BZ #2644]
4378 * sysdeps/pthread/unwind-forcedunwind.c: Different solution for
4379 the reload problem. Change the one path in pthread_cancel_init
4380 which causes the problem. Force gcc to reload. Simplify callers.
4381 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c
4382 (_Unwind_GetBSP): Undo last patch.
4383
3142b1ac
UD
43842006-05-07 Ulrich Drepper <drepper@redhat.com>
4385
bf3635d3
UD
4386 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: Make sure the
4387 function pointer is reloaded after pthread_cancel_init calls.
3142b1ac
UD
4388
4389 [BZ #2644]
4390 * sysdeps/pthread/unwind-forcedunwind.c: Make sure functions
4391 pointers are reloaded after pthread_cancel_init calls.
4392
27488789
UD
43932006-05-01 Ulrich Drepper <drepper@redhat.com>
4394
4395 * sysdeps/pthread/allocalim.h (__libc_use_alloca): Mark with
4396 __always_inline.
4397
a6375d11
UD
43982006-04-27 Ulrich Drepper <drepper@redhat.com>
4399
4400 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
4401 Allocate new object which is passed to timer_sigev_thread so that
4402 the timer can be deleted before the new thread is scheduled.
4403
16a1d952
RM
44042006-04-26 Roland McGrath <roland@redhat.com>
4405
4406 * sysdeps/x86_64/tls.h: Include <asm/prctl.h> inside [! __ASSEMBLER__].
4407
7960f2a7
UD
44082006-04-08 Ulrich Drepper <drepper@redhat.com>
4409
ab9a9ff8
UD
4410 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove branch predicion
4411 suffix for conditional jumps.
4412 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
4413 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
4414 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
4415 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
4416 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
4417 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
4418
7960f2a7
UD
4419 * init.c (sigcancel_handler): Compare with correct PID even if the
4420 thread is in the middle of a fork call.
4421 (sighandler_setxid): Likewise.
4422 Reported by Suzuki K P <suzuki@in.ibm.com> .
4423
2035d91c
UD
44242006-04-07 Jakub Jelinek <jakub@redhat.com>
4425
4426 * pthreadP.h (FUTEX_TID_MASK): Sync with kernel.
4427
0292b0dd
UD
44282006-04-06 Ulrich Drepper <drepper@redhat.com>
4429
4430 * pthread_getattr_np.c (pthread_getattr_np): Close fp if getrlimit
4431 fails [Coverity CID 105].
4432
6738b3c0
UD
44332006-04-05 Ulrich Drepper <drepper@redhat.com>
4434
4435 * sysdeps/pthread/pthread.h: Add nonnull attributes.
4436
359157a5
RM
44372006-04-03 Steven Munroe <sjmunroe@us.ibm.com>
4438
4439 [BZ #2505]
4440 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h [_ARCH_PWR4]:
4441 Define __lll_rel_instr using lwsync.
4442
cd277b2d
UD
44432006-03-27 Ulrich Drepper <drepper@redhat.com>
4444
4445 * allocatestack.c (allocate_stack): Always initialize robust_head.
4446 * descr.h: Define struct robust_list_head.
4447 (struct pthread): Use robust_list_head in robust mutex list definition.
4448 Adjust ENQUEUE_MUTEX and DEQUEUE_MUTEX.
4449 * init.c [!__ASSUME_SET_ROBUST_LIST] (__set_robust_list_avail): Define.
4450 (__pthread_initialize_minimal_internal): Register robust_list with
4451 the kernel.
4452 * pthreadP.h: Remove PRIVATE_ from PTHREAD_MUTEX_ROBUST_* names.
4453 Declare __set_robust_list_avail.
4454 * pthread_create.c (start_thread): Register robust_list of new thread.
4455 [!__ASSUME_SET_ROBUST_LIST]: If robust_list is not empty wake up
4456 waiters.
4457 * pthread_mutex_destroy.c: For robust mutexes don't look at the
4458 number of users, it's unreliable.
4459 * pthread_mutex_init.c: Allow use of pshared robust mutexes if
4460 set_robust_list syscall is available.
4461 * pthread_mutex_consistent.c: Adjust for PTHREAD_MUTEX_ROBUST_* rename.
4462 * pthread_mutex_lock.c: Simplify robust mutex code a bit.
4463 Set robust_head.list_op_pending before trying to lock a robust mutex.
4464 * pthread_mutex_timedlock.c: Likewise.
4465 * pthread_mutex_trylock.c: Likewise.
4466 * pthread_mutex_unlock.c: Likewise for unlocking.
4467 * Makefile (tests): Add tst-robust8.
4468 * tst-robust8.c: New file.
4469
facac085
UD
44702006-03-08 Andreas Schwab <schwab@suse.de>
4471
4472 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h
4473 (DL_SYSINFO_IMPLEMENTATION): Add missing newline.
4474
7ccbe1a1
RM
44752006-03-05 Roland McGrath <roland@redhat.com>
4476
4477 * configure (libc_add_on): Disable add-on when $add_ons_automatic = yes
4478 and $config_os doesn't match *linux*.
4479
043cee37
RM
44802006-03-05 David S. Miller <davem@sunset.davemloft.net>
4481
4482 * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S:
4483 Use __syscall_error.
4484 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
4485 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: Likewise.
4486 * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: Likewise.
4487 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
4488 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: Likewise.
4489 * sysdeps/unix/sysv/linux/sparc/Makefile: New file.
4490
88bce79e
UD
44912006-03-02 Ulrich Drepper <drepper@redhat.com>
4492
4493 * sysdeps/unix/sysv/linux/aio_misc.h: Various cleanups.
4494
672ec465
UD
44952006-03-01 Ulrich Drepper <drepper@redhat.com>
4496
4497 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
4498 (__lll_robust_lock_wait): Also set FUTEX_WAITERS bit if we got the
4499 mutex.
4500 (__lll_robust_timedlock_wait): Likewise.
4501 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S
4502 (__lll_robust_lock_wait): Likewise.
4503 (__lll_robust_timedlock_wait): Likewise.
4504 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
4505 (__lll_robust_lock_wait): Likewise.
4506 (__lll_robust_timedlock_wait): Likewise.
4507
c4a4875d
RM
45082006-03-01 Jakub Jelinek <jakub@redhat.com>
4509
4510 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_robust_mutex_dead,
4511 lll_robust_mutex_trylock, lll_robust_mutex_lock,
4512 lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
4513 lll_robust_mutex_unlock): Define.
4514 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
4515
3192fd8e
RM
45162006-02-28 H.J. Lu <hongjiu.lu@intel.com>
4517
4518 * sysdeps/unix/sysv/linux/ia64/clone2.S: Include <clone2.S>
4519 instead of <clone.S>.
4520
14d44b19
RM
45212006-02-27 Jakub Jelinek <jakub@redhat.com>
4522
4523 * Makefile (libpthread-routines): Add
4524 pthread_mutexattr_[sg]etprotocol, pthread_mutexattr_[sg]etprioceiling
4525 and pthread_mutex_[sg]etprioceiling.
4526 * Versions (GLIBC_2.4): Export pthread_mutexattr_getprotocol,
4527 pthread_mutexattr_setprotocol, pthread_mutexattr_getprioceiling,
4528 pthread_mutexattr_setprioceiling, pthread_mutex_getprioceiling and
4529 pthread_mutex_setprioceiling.
4530 * sysdeps/pthread/pthread.h (PTHREAD_PRIO_NONE, PTHREAD_PRIO_INHERIT,
4531 PTHREAD_PRIO_PROTECT): New enum values.
4532 (pthread_mutexattr_getprotocol, pthread_mutexattr_setprotocol,
4533 pthread_mutexattr_getprioceiling, pthread_mutexattr_setprioceiling,
4534 pthread_mutex_getprioceiling, pthread_mutex_setprioceiling): New
4535 prototypes.
4536 * pthreadP.h (PTHREAD_MUTEX_PRIO_INHERIT_PRIVATE_NP,
4537 PTHREAD_MUTEX_PRIO_PROTECT_PRIVATE_NP): New enum values.
4538 (PTHREAD_MUTEX_PRIO_CEILING_SHIFT, PTHREAD_MUTEX_PRIO_CEILING_MASK):
4539 Define.
4540 (PTHREAD_MUTEXATTR_PROTOCOL_SHIFT, PTHREAD_MUTEXATTR_PROTOCOL_MASK,
4541 PTHREAD_MUTEXATTR_PRIO_CEILING_SHIFT,
4542 PTHREAD_MUTEXATTR_PRIO_CEILING_MASK): Define.
4543 (PTHREAD_MUTEXATTR_FLAG_BITS): Or in PTHREAD_MUTEXATTR_PROTOCOL_MASK
4544 and PTHREAD_MUTEXATTR_PRIO_CEILING_MASK.
4545 * pthread_mutex_init.c (__pthread_mutex_init): For the time being
4546 return ENOTSUP for PTHREAD_PRIO_INHERIT or PTHREAD_PRIO_PROTECT
4547 protocol mutexes.
4548 * pthread_mutex_getprioceiling.c: New file.
4549 * pthread_mutex_setprioceiling.c: New file.
4550 * pthread_mutexattr_getprioceiling.c: New file.
4551 * pthread_mutexattr_setprioceiling.c: New file.
4552 * pthread_mutexattr_getprotocol.c: New file.
4553 * pthread_mutexattr_setprotocol.c: New file.
4554
62f6b9b2
RM
45552006-02-27 Daniel Jacobowitz <dan@codesourcery.com>
4556
4557 * sysdeps/unix/sysv/linux/aio_misc.h: Include <limits.h>.
4558
e0a3ed4f
RM
45592006-02-27 Roland McGrath <roland@redhat.com>
4560
4561 * sysdeps/pthread/Subdirs: List nptl here too.
4562 * configure (libc_add_on_canonical): New variable.
4563
4564 * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: Use #include_next.
4565
4566 * sysdeps/unix/sysv/linux/sleep.c: Use #include_next after #include of
4567 self to get main source tree's file.
4568 * sysdeps/unix/sysv/linux/alpha/clone.S: Likewise.
4569 * sysdeps/unix/sysv/linux/i386/clone.S: Likewise.
4570 * sysdeps/unix/sysv/linux/i386/vfork.S: Likewise.
4571 * sysdeps/unix/sysv/linux/ia64/clone2.S: Likewise.
4572 * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: Likewise.
4573 * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: Likewise.
4574 * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: Likewise.
4575 * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: Likewise.
4576 * sysdeps/unix/sysv/linux/sh/clone.S: Likewise.
4577 * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: Likewise.
4578 * sysdeps/unix/sysv/linux/sparc/sparc64/clone.S: Likewise.
4579 * sysdeps/unix/sysv/linux/x86_64/clone.S: Likewise.
4580 * sysdeps/unix/sysv/linux/x86_64/vfork.S: Likewise.
4581
4582 * Makefile: Use $(sysdirs) in vpath directive.
4583
4584 * sysdeps/pthread/Makefile (CFLAGS-libc-start.c): Variable removed.
4585 (CPPFLAGS-timer_routines.c): Likewise.
4586
4587 * Makeconfig (includes): Variable removed.
4588
84cfa284
RM
45892006-02-26 Roland McGrath <roland@redhat.com>
4590
4591 * sysdeps/generic/pt-raise.c: Moved to ...
4592 * pt-raise.c: ... here.
4593 * sysdeps/generic/lowlevellock.h: Moved to ...
4594 * lowlevellock.h: ... here.
4595
c5132ca1
RM
45962006-02-23 Roland McGrath <roland@redhat.com>
4597
4598 * descr.h (struct pthread): Add final member `end_padding'.
4599 (PTHREAD_STRUCT_END_PADDING): Use it.
4600
46012006-02-20 Roland McGrath <roland@redhat.com>
4602
4603 * sysdeps/mips: Directory removed, saved in ports repository.
4604 * sysdeps/unix/sysv/linux/mips: Likewise.
4605
a93317a1
UD
46062006-02-18 Ulrich Drepper <drepper@redhat.com>
4607
4608 * tst-robust1.c: Add second mutex to check that the mutex list is
4609 handled correctly.
4610
f1740bc4
UD
46112006-02-17 Jakub Jelinek <jakub@redhat.com>
4612
4613 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_mutex_dead,
4614 lll_robust_mutex_trylock, lll_robust_mutex_lock,
4615 lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
4616 lll_robust_mutex_unlock): New macros.
4617 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
4618 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
4619 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
4620 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
4621 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: New file.
4622
a7245bf5
UD
46232006-02-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4624
4625 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Add lll_robust_mutex_*
4626 definitions.
4627 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: New file.
4628
49bfc1fe
UD
46292006-02-17 Ulrich Drepper <drepper@redhat.com>
4630
4631 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
4632 (lll_robust_mutex_unlock): Avoid unnecessary wakeups.
4633 * sysdeps/unix/sysv/linux/i386/lowlevellock.h
4634 (lll_robust_mutex_unlock): Likewise.
4635
56e987ac
UD
46362006-02-13 Jakub Jelinek <jakub@redhat.com>
4637
4638 * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX):
4639 Set robust_list.__next rather than robust_list.
4640 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
4641 (__pthread_list_t): New typedef.
4642 (pthread_mutex_t): Replace __next and __prev fields with __list.
4643 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
4644 (__pthread_list_t): New typedef.
4645 (pthread_mutex_t): Replace __next and __prev fields with __list.
4646 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
4647 (__pthread_list_t, __pthread_slist_t): New typedefs.
4648 (pthread_mutex_t): Replace __next and __prev fields with __list.
4649 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
4650 (__pthread_list_t, __pthread_slist_t): New typedefs.
4651 (pthread_mutex_t): Replace __next and __prev fields with __list.
4652 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
4653 (__pthread_list_t, __pthread_slist_t): New typedefs.
4654 (pthread_mutex_t): Replace __next and __prev fields with __list.
4655 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h
4656 (__pthread_slist_t): New typedef.
4657 (pthread_mutex_t): Replace __next field with __list.
4658
683040c3
UD
46592006-02-15 Ulrich Drepper <drepper@redhat.com>
4660
25bc77e6 4661 * pthreadP.h: Define PTHREAD_MUTEX_INCONSISTENT instead of
683040c3
UD
4662 PTHREAD_MUTEX_OWNERDEAD.
4663 (PTHREAD_MUTEX_ROBUST_PRIVATE_NP): Define as 16, not 256.
4664 Define FUTEX_WAITERS, FUTEX_OWNER_DIED, FUTEX_TID_MASK.
4665 * Makefile (libpthread-routines): Add lowlevelrobustlock.
4666 * pthread_create.c (start_thread): Very much simplify robust_list loop.
4667 * pthread_mutex_consistent.c: Inconsistent mutex have __owner now set
4668 to PTHREAD_MUTEX_INCONSISTENT.
4669 * pthread_mutex_destroy.c: Allow destroying of inconsistent mutexes.
4670 * pthread_mutex_lock.c: Reimplement robust mutex handling.
4671 * pthread_mutex_trylock.c: Likewise.
4672 * pthread_mutex_timedlock.c: Likewise.
4673 * pthread_mutex_unlock.c: Likewise.
4674 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
4675 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
4676 lowlevelrobustlock.sym.
4677 * sysdeps/unix/sysv/linux/lowlevelrobustlock.sym: New file.
4678 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add lll_robust_mutex_*
4679 definitions.
4680 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
4681 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: New file.
4682 * sysdeps/unix/sysv/linux/i386/i586/lowlevelrobustlock.S: New file.
4683 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrobustlock.S: New file.
4684 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: New file.
4685
bbf209a4
UD
46862006-02-12 Ulrich Drepper <drepper@redhat.com>
4687
b007ce7c
UD
4688 * allocatestack.c (allocate_stack): Initialize robust_list.
4689 * init.c (__pthread_initialize_minimal_internal): Likewise.
4690 * descr.h (struct xid_command): Pretty printing.
4691 (struct pthread): Use __pthread_list_t or __pthread_slist_t for
4692 robust_list. Adjust macros.
4693 * pthread_create.c (start_thread): Adjust robust_list handling.
4694 * phtread_mutex_unlock.c: Don't allow unlocking from any thread
4695 but the owner for all robust mutex types.
4696 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
4697 __pthread_list_t and __pthread_slist_t. Use them in pthread_mutex_t.
0ca3379d 4698 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
b007ce7c
UD
4699 * sysdeps/pthread/pthread.h: Adjust mutex initializers.
4700
bbf209a4 4701 * sysdeps/unix/sysv/linux/i386/not-cancel.h: Define openat_not_cancel,
b42a214c 4702 openat_not_cancel_3, openat64_not_cancel, and openat64_not_cancel_3.
bbf209a4 4703
b576fca1
UD
47042006-02-08 Jakub Jelinek <jakub@redhat.com>
4705
4706 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait,
4707 lll_futex_timedwait, lll_wait_tid): Add "memory" clobber.
4708
a6df7387
UD
47092006-01-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4710
4711 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_futex_wait):
4712 Return status.
4713 (lll_futex_timed_wait): Define.
4714
7c65e900
UD
47152006-01-19 Ulrich Drepper <drepper@redhat.com>
4716
4717 * tst-cancel4.c: Test ppoll.
4718
5f9f21e8
AJ
47192006-01-18 Andreas Jaeger <aj@suse.de>
4720
cf407dfb 4721 [BZ #2167]
5f9f21e8
AJ
4722 * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h
4723 (pthread_mutex_t): Follow changes for other archs. Based on patch
4724 by Jim Gifford <patches@jg555.com>.
4725
251278c6
UD
47262006-01-13 Richard Henderson <rth@redhat.com>
4727
4728 * sysdeps/alpha/tls.h (tcbhead_t): Rename member to __private.
4729
de59a291
RM
47302006-01-10 Roland McGrath <roland@redhat.com>
4731
4732 * sysdeps/alpha/jmpbuf-unwind.h: File moved to main source tree.
4733 * sysdeps/i386/jmpbuf-unwind.h: Likewise.
4734 * sysdeps/mips/jmpbuf-unwind.h: Likewise.
4735 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
4736 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
4737 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
4738 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
4739 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
4740 * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
0ca13e14 4741 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
de59a291 4742
931786ee
RM
47432006-01-09 Roland McGrath <roland@redhat.com>
4744
5d42c8c3
RM
4745 * tst-initializers1-c89.c: New file.
4746 * tst-initializers1-c99.c: New file.
4747 * tst-initializers1-gnu89.c: New file.
4748 * tst-initializers1-gnu99.c: New file.
4749 * Makefile (tests): Add them.
4750 (CFLAGS-tst-initializers1-c89.c): New variable.
4751 (CFLAGS-tst-initializers1-c99.c): New variable.
4752 (CFLAGS-tst-initializers1-gnu89.c): New variable.
4753 (CFLAGS-tst-initializers1-gnu99.c): New variable.
4754
931786ee
RM
4755 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
4756 Use __extension__ on anonymous union definition.
4757 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4758 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4759 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4760 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3c238452 4761 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
931786ee 4762
8dd18431
RM
47632006-01-08 Jakub Jelinek <jakub@redhat.com>
4764
4765 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
4766 Don't give the union a name because it changes the mangled name.
4767 Instead name the struct for __data.
4768 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_mutex_t):
4769 Likewise.
4770 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_mutex_t):
4771 Likewise.
4772
ae11e412
UD
47732006-01-09 Jakub Jelinek <jakub@redhat.com>
4774
4775 * sysdeps/sparc/sparc64/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Add
4776 stack bias to mc_ftp field.
4777
c6885aa1
UD
47782006-01-07 Ulrich Drepper <drepper@redhat.com>
4779
4780 * sysdeps/pthread/aio_misc.h (AIO_MISC_WAIT): Work around gcc
6e741bc3 4781 being too clever and reloading the futex value where it shouldn't.
c6885aa1 4782
ae4ad00a
UD
47832006-01-06 Ulrich Drepper <drepper@redhat.com>
4784
4785 * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX): Use
4786 correct type.
4787
ced368f7
UD
47882006-01-06 Jakub Jelinek <jakub@redhat.com>
4789
4790 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
4791 Add cfi directives.
4792
d804f5df
UD
47932006-01-06 Ulrich Drepper <drepper@redhat.com>
4794
cbbbb188 4795 * sysdeps/ia64/tls.h (tcbhead_t): Rename private member to __private.
719046c1
UD
4796 * sysdeps/ia64/tcb-offsets.sym: Adjust for private->__private
4797 rename in tcbhead_t.
4798
d804f5df
UD
4799 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
4800 Don't give the union a name because it changes the mangled name.
4801 Instead name the struct for __data.
4802 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4803 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4804 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4805 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4806 * pthread_create.c (start_thread): Adjust robust mutex free loop.
4807 * descr.h (ENQUEUE_MUTEX, DEQUEUE_MUTEX): Adjust.
4808
679d83ba
UD
48092006-01-05 Ulrich Drepper <drepper@redhat.com>
4810
4811 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
4812 Return status.
4813 (lll_futex_timed_wait): Define.
4814 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
4815 * sysdeps/pthread/aio_misc.h: New file.
4816
06dc5bf3
RM
48172006-01-03 Joseph S. Myers <joseph@codesourcery.com>
4818
4819 * Makefile ($(objpfx)$(multidir)): Use mkdir -p.
4820
9759bbf1
UD
48212006-01-03 Steven Munroe <sjmunroe@us.ibm.com>
4822
4823 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
4824 (PSEUDO): Remove redundant cfi_startproc and cfi_endproc directives.
4825 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
4826
db59b28b
UD
48272006-01-04 Ulrich Drepper <drepper@redhat.com>
4828
4829 * tst-cancel24.cc: Use C headers instead of C++ headers.
4830
b01fe5f7
UD
48312006-01-03 Jakub Jelinek <jakub@redhat.com>
4832
4833 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Remove #error for
4834 sparc-linux configured glibc.
4835 (lll_futex_wake_unlock): Define to 1 for sparc-linux configured glibc.
4836 (__lll_mutex_trylock, __lll_mutex_cond_trylock, __lll_mutex_lock,
4837 __lll_mutex_cond_lock, __lll_mutex_timedlock): Use
4838 atomic_compare_and_exchange_val_24_acq instead of
4839 atomic_compare_and_exchange_val_acq.
4840 (lll_mutex_unlock, lll_mutex_unlock_force): Use atomic_exchange_24_rel
4841 instead of atomic_exchange_rel.
4842 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: New file.
4843 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c: New
4844 file.
4845 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c: New
4846 file.
4847 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: New file.
4848 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: New file.
4849 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: New file.
4850 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c: New file.
4851 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: New file.
4852 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
4853 New file.
4854 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
4855 New file.
4856 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: New file.
4857 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: New file.
4858 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c: New
4859 file.
4860 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_trywait.c: New
4861 file.
4862 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: New file.
4863
35c2fd59
UD
48642006-01-03 Ulrich Drepper <drepper@redhat.com>
4865
4866 * sysdeps/pthread/pthread.h [__WORDSIZE==64]: Don't use cast in
4867 mutex initializers.
4868
305bb37e
UD
48692006-01-02 Jakub Jelinek <jakub@redhat.com>
4870
4871 * sysdeps/sparc/tls.h (tcbhead_t): Add pointer_guard field.
4872 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
4873 THREAD_COPY_POINTER_GUARD): Define.
4874 * sysdeps/sparc/tcb-offsets.sym (POINTER_GUARD): Define.
4875 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Revert 2005-12-27 changes.
4876
cc792128
UD
48772006-01-01 Ulrich Drepper <drepper@redhat.com>
4878
4879 * version.c: Update copyright year.
4880
db0a00d3
UD
48812005-12-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4882
4883 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Remove explicit
4884 .eh_frame section, use cfi_* directives.
4885 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Add cfi instrumentation.
4886
b36205c4
UD
48872005-12-30 Ulrich Drepper <drepper@redhat.com>
4888
4889 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Undo last change for
4890 now.
4891
8b4f1598
UD
48922005-12-29 Ulrich Drepper <drepper@redhat.com>
4893
4894 * sysdeps/pthread/sigaction.c: Removed.
4895 * sigaction.c: New file.
4896 * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-sigaction.c.
4897
fec5592d
UD
48982005-12-28 Ulrich Drepper <drepper@redhat.com>
4899
4900 * Makefile (tests): Add tst-signal7.
4901 * tst-signal7.c: New file.
4902
db169ed5
RM
49032005-12-27 Roland McGrath <roland@redhat.com>
4904
4905 * sysdeps/x86_64/jmpbuf-unwind.h (_jmpbuf_sp): New inline function.
4906 (_JMPBUF_UNWINDS_ADJ): Use it, to PTR_DEMANGLE before comparison.
4907 * sysdeps/alpha/jmpbuf-unwind.h: Likewise.
4908 * sysdeps/i386/jmpbuf-unwind.h: Likewise.
4909 * sysdeps/mips/jmpbuf-unwind.h: Likewise.
4910 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
4911 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
4912 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
4913 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
4914 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
4915 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
4916
bfffffae
UD
49172005-12-27 Jakub Jelinek <jakub@redhat.com>
4918
4919 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Add __next
4920 and __prev field to pthread_mutex_t.
4921 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4922 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4923 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4924 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4925 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Add __next field
4926 to pthread_mutex_t.
4927
1bcfb5a5
UD
49282005-12-26 Ulrich Drepper <drepper@redhat.com>
4929
4930 * pthreadP.h: Define PTHREAD_MUTEX_ROBUST_PRIVATE_NP,
4931 PTHREAD_MUTEX_ROBUST_PRIVATE_RECURSIVE_NP,
4932 PTHREAD_MUTEX_ROBUST_PRIVATE_ERRORCHECK_NP,
4933 PTHREAD_MUTEX_ROBUST_PRIVATE_ADAPTIVE_NP,
4934 PTHREAD_MUTEXATTR_FLAG_ROBUST, PTHREAD_MUTEXATTR_FLAG_PSHARED,
4935 and PTHREAD_MUTEXATTR_FLAG_BITS.
4936 * descr.h (struct pthread): Add robust_list field and define
4937 ENQUEUE_MUTEX and DEQUEUE_MUTEX macros.
4938 * pthread_mutexattr_getrobust.c: New file.
4939 * pthread_mutexattr_setrobust.c: New file.
4940 * pthread_mutex_consistent.c: New file.
4941 * sysdeps/pthread/pthread.h: Declare pthread_mutexattr_getrobust,
4942 pthread_mutexattr_setrobust, and pthread_mutex_consistent.
4943 Define PTHREAD_MUTEX_STALLED_NP and PTHREAD_MUTEX_ROBUST_NP.
4944 Adjust pthread_mutex_t initializers.
4945 * nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Add __next
4946 field to pthread_mutex_t.
4947 * nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Add __next
4948 and __prev field to pthread_mutex_t.
4949 * Versions [GLIBC_2.4]: Export pthread_mutexattr_getrobust_np,
4950 pthread_mutexattr_setrobust_np, and pthread_mutex_consistent_np.
4951 * pthread_mutexattr_getpshared.c: Use PTHREAD_MUTEXATTR_FLAG_PSHARED
4952 and PTHREAD_MUTEXATTR_FLAG_BITS macros instead of magic numbers.
4953 * pthread_mutexattr_gettype.c: Likewise.
4954 * pthread_mutexattr_setpshared.c: Likewise.
4955 * pthread_mutexattr_settype.c: Likewise.
4956 * pthread_mutex_init.c: Reject robust+pshared attribute for now.
4957 Initialize mutex kind according to robust flag.
4958 * pthread_mutex_lock.c: Implement local robust mutex.
4959 * pthread_mutex_timedlock.c: Likewise.
4960 * pthread_mutex_trylock.c: Likewise.
4961 * pthread_mutex_unlock.c: Likewise.
4962 * pthread_create.c (start_thread): Mark robust mutexes which remained
4963 locked as dead.
4964 * tst-robust1.c: New file.
4965 * tst-robust2.c: New file.
4966 * tst-robust3.c: New file.
4967 * tst-robust4.c: New file.
4968 * tst-robust5.c: New file.
4969 * tst-robust6.c: New file.
4970 * tst-robust7.c: New file.
4971 * Makefile (libpthread-routines): Add pthread_mutexattr_getrobust,
4972 pthread_mutexattr_setrobust, and pthread_mutex_consistent.
4973 (tests): Add tst-robust1, tst-robust2, tst-robust3, tst-robust4,
4974 tst-robust5, tst-robust6, and tst-robust7.
4975
4976 * tst-typesizes.c: New file.
4977 * Makefile (tests): Add tst-typesizes.
4978
4979 * tst-once3.c: More debug output.
4980
9333ed0d
UD
49812005-12-24 Ulrich Drepper <drepper@redhat.com>
4982
d4d138a4
UD
4983 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Add break
4984 missing after last change.
4985
bfffffae 4986 * version.c: Update copyright year.
9333ed0d 4987
dcc73a8d
UD
49882005-12-23 Ulrich Drepper <drepper@redhat.com>
4989
4990 * pthread_mutex_destroy.c: Set mutex type to an invalid value.
4991 * pthread_mutex_lock.c: Return EINVAL for invalid mutex type.
4992 * pthread_mutex_trylock.c: Likewise.
4993 * pthread_mutex_timedlock.c: Likewise.
4994 * pthread_mutex_unlock.c: Likewise.
4995
879f3ca6
RM
49962005-12-22 Roland McGrath <roland@redhat.com>
4997
4998 * sysdeps/pthread/sigaction.c: Use "" instead of <> to include self,
4999 so that #include_next's search location is not reset to the -I..
5000 directory where <nptl/...> can be found.
5001
077a0da7
UD
50022005-12-22 Ulrich Drepper <drepper@redhat.com>
5003
5004 [BZ #1913]
5005 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
5006 Fix unwind info. Remove useless branch prediction prefix.
7735afa2
UD
5007 * tst-cancel24.cc: New file.
5008 * Makefile: Add rules to build and run tst-cancel24.
077a0da7 5009
8dea90aa
RM
50102005-12-21 Roland McGrath <roland@redhat.com>
5011
5012 * libc-cancellation.c: Use <> rather than "" #includes.
5013 * pt-cleanup.c: Likewise.
5014 * pthread_create.c: Likewise.
5015 * pthread_join.c: Likewise.
5016 * pthread_timedjoin.c: Likewise.
5017 * pthread_tryjoin.c: Likewise.
5018 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Likewise.
5019 * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
5020 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
5021 * unwind.c: Likewise.
5022
8da21f96
UD
50232005-12-19 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5024
5025 * sysdeps/sh/tcb-offsets.sym: Add POINTER_GUARD.
5026 * sysdeps/sh/tls.h (tcbhead_t): Remove private and add pointer_guard.
5027 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
5028 THREAD_COPY_POINTER_GUARD): Define.
5029
00c2b3b9
UD
50302005-12-19 Jakub Jelinek <jakub@redhat.com>
5031
5032 * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): Make room for 2 uintptr_t's
5033 rather than one.
5034 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
5035 THREAD_COPY_POINTER_GUARD): Define.
5036 * sysdeps/powerpc/tcb-offsets.sym (POINTER_GUARD): Add.
5037 * sysdeps/powerpc/tls.h (tcbhead_t): Add pointer_guard field.
5038 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
5039 THREAD_COPY_POINTER_GUARD): Define.
5040 * sysdeps/s390/tcb-offsets.sym (STACK_GUARD): Add.
5041 * sysdeps/s390/tls.h (THREAD_GET_POINTER_GUARD,
5042 THREAD_SET_POINTER_GUARD, THREAD_COPY_POINTER_GUARD): Define.
5043 * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S (__ia64_longjmp):
5044 Use PTR_DEMANGLE for B0 if defined.
5045
827b7087
UD
50462005-12-17 Ulrich Drepper <drepper@redhat.com>
5047
5048 * pthread_create.c (__pthread_create_2_1): Use
5049 THREAD_COPY_POINTER_GUARD if available.
5050 * sysdeps/i386/tcb-offsets.sym: Add POINTER_GUARD.
5051 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
5052 * sysdeps/i386/tls.h (tcbhead_t): Add pointer_guard.
5053 Define THREAD_SET_POINTER_GUARD and THREAD_COPY_POINTER_GUARD.
5054 * sysdeps/x86_64/tls.h: Likewise.
5055
2826ac7e
RM
50562005-12-15 Roland McGrath <roland@redhat.com>
5057
5058 * sysdeps/unix/sysv/linux/mq_notify.c: Don't use sysdeps/generic.
5059
b6ab06ce
UD
50602005-12-13 Ulrich Drepper <drepper@redhat.com>
5061
5062 * sysdeps/pthread/sigfillset.c: Adjust for files moved out of
5063 sysdeps/generic.
5064 * errno-loc.c: New file.
5065
f0d1a3b5
RM
50662005-12-12 Roland McGrath <roland@redhat.com>
5067
5068 * init.c (__pthread_initialize_minimal_internal): Do __static_tls_size
5069 adjustments before choosing stack size. Update minimum stack size
5070 calculation to match allocate_stack change.
5071
db13ddbc
UD
50722005-12-12 Ulrich Drepper <drepper@redhat.com>
5073
5074 * allocatestack.c (allocate_stack): Don't demand that there is an
5075 additional full page available on the stack beside guard, TLS, the
5076 minimum stack.
5077
088f460f
UD
50782005-11-24 Ulrich Drepper <drepper@redhat.com>
5079
5080 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
5081 (__cleanup_fct_attribute): Use __regparm__ not regparm.
5082
5083 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: When
5084 compiling 32-bit code we must define __cleanup_fct_attribute.
5085
16feadf2
UD
5086005-11-24 Jakub Jelinek <jakub@redhat.com>
5087
5088 [BZ #1920]
5089 * sysdeps/pthread/pthread.h (__pthread_unwind_next): Use
5090 __attribute__ instead of __attribute.
5091 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
5092 (__cleanup_fct_attribute): Likewise.
5093
e6e493bb
UD
50942005-11-17 Jakub Jelinek <jakub@redhat.com>
5095
5096 * sysdeps/pthread/unwind-forcedunwind.c (pthread_cancel_init): Put
5097 a write barrier before writing libgcc_s_getcfa.
5098
8e635611
UD
50992005-11-06 Ulrich Drepper <drepper@redhat.com>
5100
5101 * sysdeps/unix/sysv/linux/configure: Removed.
5102
ce33ee7c
UD
51032005-11-05 Ulrich Drepper <drepper@redhat.com>
5104
5105 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Remove trace of
5106 optional init_array/fini_array support.
5107
20d511e0
RM
51082005-10-24 Roland McGrath <roland@redhat.com>
5109
5110 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Remove unnecessary
5111 versioned_symbol use.
5112
fe60d146
RM
51132005-10-16 Roland McGrath <roland@redhat.com>
5114
5115 * init.c (__pthread_initialize_minimal_internal): Even when using a
5116 compile-time default stack size, apply the minimum that allocate_stack
5117 will require, and round up to page size.
5118
0faa1cf5
RM
51192005-10-10 Daniel Jacobowitz <dan@codesourcery.com>
5120
5121 * Makefile ($(test-modules)): Remove static pattern rule.
5122
f9126cc2 51232005-10-14 Jakub Jelinek <jakub@redhat.com>
b42a214c 5124 Ulrich Drepper <drepper@redhat.com>
f9126cc2
UD
5125
5126 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix stack
5127 alignment in callback function.
5128 * Makefile: Add rules to build and run tst-align3.
5129 * tst-align3.c: New file.
5130
015a5d22
RM
51312005-10-03 Jakub Jelinek <jakub@redhat.com>
5132
5133 * allocatestack.c (setxid_signal_thread): Add
5134 INTERNAL_SYSCALL_DECL (err).
5135
b71ce910
UD
51362005-10-02 Jakub Jelinek <jakub@redhat.com>
5137
5138 * allocatestack.c (setxid_signal_thread): Need to use
5139 atomic_compare_and_exchange_bool_acq.
5140
dff9a7a1 51412005-10-01 Ulrich Drepper <drepper@redhat.com>
b42a214c 5142 Jakub Jelinek <jakub@redhat.com>
dff9a7a1
UD
5143
5144 * descr.h: Define SETXID_BIT and SETXID_BITMASK. Adjust
5145 CANCEL_RESTMASK.
5146 (struct pthread): Move specific_used field to avoid padding.
5147 Add setxid_futex field.
5148 * init.c (sighandler_setxid): Reset setxid flag and release the
5149 setxid futex.
5150 * allocatestack.c (setxid_signal_thread): New function. Broken
5151 out of the bodies of the two loops in __nptl_setxid. For undetached
5152 threads check whether they are exiting and if yes, don't send a signal.
5153 (__nptl_setxid): Simplify loops by using setxid_signal_thread.
5154 * pthread_create.c (start_thread): For undetached threads, check
5155 whether setxid bit is set. If yes, wait until signal has been
5156 processed.
5157
5158 * allocatestack.c (STACK_VARIABLES): Initialize them.
5159 * pthread_create.c (__pthread_create_2_1): Initialize pd.
5160
560b4709
UD
51612004-09-02 Jakub Jelinek <jakub@redhat.com>
5162
5163 * pthread_cond_destroy.c (__pthread_cond_destroy): If there are
5164 waiters, awake all waiters on the associated mutex.
5165
5eac4760
RM
51662005-09-22 Roland McGrath <roland@redhat.com>
5167
5168 * perf.c [__x86_64__] (HP_TIMING_NOW): New macro (copied from
5169 ../sysdeps/x86_64/hp-timing.h).
5170
a3615024
UD
51712005-08-29 Jakub Jelinek <jakub@redhat.com>
5172
5173 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_WAKE_OP,
5174 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5175 (lll_futex_wake_unlock): Define.
5176 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_WAKE_OP,
5177 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5178 (lll_futex_wake_unlock): Define.
5179 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_WAKE_OP,
5180 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5181 (lll_futex_wake_unlock): Define.
5182 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_WAKE_OP,
5183 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5184 (lll_futex_wake_unlock): Define.
5185 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_WAKE_OP,
5186 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5187 (lll_futex_wake_unlock): Define.
5188 * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal): Use
5189 lll_futex_wake_unlock.
5190 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
5191 (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5192 (__pthread_cond_signal): Use FUTEX_WAKE_OP.
5193 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
5194 (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5195 (__pthread_cond_signal): Use FUTEX_WAKE_OP.
5196
bf017034
UD
51972005-09-05 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5198
5199 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
5200 Fix typo in register name.
5201
fd4af664
UD
52022005-08-23 Ulrich Drepper <drepper@redhat.com>
5203
8558d715
UD
5204 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
5205 Use __sigfillset. Document that sigfillset does the right thing wrt
5206 to SIGSETXID.
fd4af664 5207
3fd1bc67
UD
52082005-07-11 Jakub Jelinek <jakub@redhat.com>
5209
44d75caf 5210 [BZ #1102]
3fd1bc67
UD
5211 * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER,
5212 PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP,
5213 PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP,
5214 PTHREAD_MUTEX_ADAPTIVE_NP, PTHREAD_RWLOCK_INITIALIZER,
5215 PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP,
5216 PTHREAD_COND_INITIALIZER): Supply zeros for all fields
5217 in the structure.
5218 * Makefile (tests): Add tst-initializers1.
5219 (CFLAGS-tst-initializers1.c): Set.
5220 * tst-initializers1.c: New test.
5221
553185e2
UD
52222005-07-11 Jakub Jelinek <jakub@redhat.com>
5223
5224 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_rwlock_t):
5225 Make sure __flags are located at offset 48 from the start of the
5226 structure.
5227
8df08cb2
RM
52282005-07-02 Roland McGrath <roland@redhat.com>
5229
5230 * Makeconfig: Comment fix.
5231
253eb3a0
UD
52322005-07-05 Jakub Jelinek <jakub@redhat.com>
5233
5234 * descr.h (PTHREAD_STRUCT_END_PADDING): Define.
5235 * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): If PTHREAD_STRUCT_END_PADDING
5236 is smaller than 8 bytes, increase TLS_PRE_TCB_SIZE by 16 bytes.
5237 (THREAD_SYSINFO, THREAD_SELF, DB_THREAD_SELF): Don't assume
5238 TLS_PRE_TCB_SIZE is sizeof (struct pthread).
5239 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5240 * sysdeps/ia64/tcb-offsets.sym (PID, TID, MULTIPLE_THREADS_OFFSET):
5241 Use TLS_PRE_TCB_SIZE instead of sizeof (struct pthread).
5242 * sysdeps/unix/sysv/linux/ia64/createthread.c (TLS_VALUE): Don't
5243 assume TLS_PRE_TCB_SIZE is sizeof (struct pthread).
5244
bb6e8ca3
UD
52452005-06-25 Jakub Jelinek <jakub@redhat.com>
5246
5247 * sysdeps/i386/tls.h (tcbhead_t): Add stack_guard field.
5248 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5249 * sysdeps/x86_64/tls.h (tcbhead_t): Add sysinfo and stack_guard
5250 fields.
5251 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5252 * sysdeps/s390/tls.h (tcbhead_t): Add stack_guard
5253 field. Put in sysinfo field unconditionally.
5254 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5255 * sysdeps/powerpc/tls.h (tcbhead_t): Add stack_guard field.
5256 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5257 * sysdeps/sparc/tls.h (tcbhead_t): Add sysinfo and stack_guard
5258 fields.
5259 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5260 * pthread_create.c (__pthread_create_2_1): Use
5261 THREAD_COPY_STACK_GUARD macro.
5262 * Makefile: Add rules to build and run tst-stackguard1{,-static}
5263 tests.
5264 * tst-stackguard1.c: New file.
5265 * tst-stackguard1-static.c: New file.
5266
99c7f870
UD
52672005-06-14 Alan Modra <amodra@bigpond.net.au>
5268
5269 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
5270 Invoke CGOTSETUP and CGOTRESTORE.
5271 (CGOTSETUP, CGOTRESTORE): Define.
5272
8074c5c5
RM
52732005-05-29 Richard Henderson <rth@redhat.com>
5274
5275 * tst-cancel4.c (WRITE_BUFFER_SIZE): New.
5276 (tf_write, tf_writev): Use it.
5277 (do_test): Use socketpair instead of pipe. Set SO_SNDBUF to
5278 the system minimum.
5279
c179df4e
UD
52802005-05-23 Jakub Jelinek <jakub@redhat.com>
5281
5282 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
5283 [IS_IN_librt] (CENABLE, CDISABLE): Use JUMPTARGET instead of
5284 __librt_*_asynccancel@local.
5285
b0e196a4
UD
52862005-05-17 Alan Modra <amodra@bigpond.net.au>
5287
5288 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Delete
5289 all occurrences of JUMPTARGET. Instead append @local to labels.
5290
f7d78e18
UD
52912005-05-20 Jakub Jelinek <jakub@redhat.com>
5292
5293 * sysdeps/i386/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN): Define to
5294 size/alignment of struct pthread rather than tcbhead_t.
5295 * sysdeps/x86_64/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
5296 Likewise.
5297 * sysdeps/s390/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
5298 Likewise.
5299 * sysdeps/sparc/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
5300 Likewise.
5301
363dd976
UD
53022005-05-19 Richard Henderson <rth@redhat.com>
5303
5304 * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use
5305 __sync_val_compare_and_swap, not explicit _si variant.
5306 * sysdeps/ia64/pthread_spin_trylock.c (pthread_spin_trylock): Likewise.
5307
1ad9da69
UD
53082005-05-03 Ulrich Drepper <drepper@redhat.com>
5309
5310 [BZ #915]
5311 * sysdeps/pthread/pthread.h: Avoid empty initializers.
5312
5085cd1f
UD
53132005-05-03 Jakub Jelinek <jakub@redhat.com>
5314
5315 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Remove explicit
5316 .eh_frame section, use cfi_* directives.
5317
ad529081
UD
53182005-04-27 Jakub Jelinek <jakub@redhat.com>
5319
5320 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: Use <> instead
5321 of "" includes.
5322
dea99685
UD
53232005-04-27 Ulrich Drepper <drepper@redhat.com>
5324
c06aad09 5325 [BZ #1075]
dea99685
UD
5326 * tst-cancel17.c (do_test): Add arbitrary factor to make sure
5327 aio_write blocks.
5328
84060bad
RM
53292005-04-27 Roland McGrath <roland@redhat.com>
5330
5e2d8ac8
RM
5331 * Makefile (tests): Remove tst-clock2.
5332
84060bad
RM
5333 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Handle
5334 CLOCK_PROCESS_CPUTIME_ID and CLOCK_PROCESS_THREAD_ID specially,
5335 translating to the kernel clockid_t for our own process/thread clock.
5336
5337 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: New file.
5338
4a035b9d
RM
53392005-04-15 Jakub Jelinek <jakub@redhat.com>
5340
5341 * old_pthread_cond_init.c: Include <errno.h>.
5342 (__pthread_cond_init_2_0): Fail with EINVAL if COND_ATTR is
5343 process shared or uses clock other than CLOCK_REALTIME.
5344 * pthread_cond_init.c (__pthread_cond_init): Remove bogus comment.
5345
edac0e8f
UD
53462005-04-13 David S. Miller <davem@davemloft.net>
5347
5348 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: New file.
5349 * sysdeps/sparc/sparc64/clone.S: New file.
5350
613d8d52
RM
53512005-04-05 Jakub Jelinek <jakub@redhat.com>
5352
44d75caf 5353 [BZ #1102]
613d8d52
RM
5354 * sysdeps/pthread/pthread.h (__pthread_cleanup_routine): Use
5355 __inline instead of inline.
5356 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_routine): Likewise.
5357
ee618985
UD
53582005-03-31 Jakub Jelinek <jakub@redhat.com>
5359
5360 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Use
5361 functionally equivalent, but shorter instructions.
5362 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
5363 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
5364 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
5365 Likewise.
5366 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
5367 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
5368 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
5369 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
5370 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5371 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
5372 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
5373 Likewise.
5374 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
5375 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
5376 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
5377 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
5378 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
5379
f850220b
AJ
53802005-03-28 Daniel Jacobowitz <dan@codesourcery.com>
5381
5382 * sysdeps/mips/Makefile: New file.
5383 * sysdeps/mips/nptl-sysdep.S: New file.
5384 * sysdeps/mips/tcb-offsets.sym: New file.
5385 * sysdeps/mips/pthread_spin_lock.S: New file.
5386 * sysdeps/mips/pthread_spin_trylock.S: New file.
5387 * sysdeps/mips/pthreaddef.h: New file.
5388 * sysdeps/mips/tls.h: New file.
5389 * sysdeps/mips/jmpbuf-unwind.h: New file.
5390 * sysdeps/unix/sysv/linux/mips/lowlevellock.h: New file.
5391 * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h: New file.
5392 * sysdeps/unix/sysv/linux/mips/bits/semaphore.h: New file.
5393 * sysdeps/unix/sysv/linux/mips/pthread_once.c: New file.
5394 * sysdeps/unix/sysv/linux/mips/fork.c: New file.
5395 * sysdeps/unix/sysv/linux/mips/pt-vfork.S: New file.
5396 * sysdeps/unix/sysv/linux/mips/vfork.S: New file.
5397 * sysdeps/unix/sysv/linux/mips/clone.S: New file.
5398 * sysdeps/unix/sysv/linux/mips/createthread.c: New file.
5399 * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: New file.
5400
1e6da2b0
UD
54012005-03-23 Ulrich Drepper <drepper@redhat.com>
5402
c06aad09 5403 [BZ #1112]
1e6da2b0
UD
5404 * pthread_create.c (__pthread_create_2_1): Rename syscall error
5405 variable to scerr.
5406
5233d576
RM
54072005-03-10 Jakub Jelinek <jakub@redhat.com>
5408
5409 * tst-getpid1.c (do_test): Align stack passed to clone{2,}.
5410
3053ff11
RM
54112005-02-25 Roland McGrath <roland@redhat.com>
5412
5413 * alloca_cutoff.c: Correct license text.
5414 * tst-unload.c: Likewise.
5415 * sysdeps/pthread/allocalim.h: Likewise.
5416 * sysdeps/pthread/pt-initfini.c: Likewise.
5417 * sysdeps/pthread/bits/libc-lock.h: Likewise.
5418 * sysdeps/pthread/bits/sigthread.h: Likewise.
5419 * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
5420 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
5421
9cfe5381
RM
54222005-02-16 Roland McGrath <roland@redhat.com>
5423
5424 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
5425 Use unsigned int * for ptr_nthreads.
5426
7de00121
RM
54272005-02-14 Alan Modra <amodra@bigpond.net.au>
5428
20d511e0 5429 [BZ #721]
7de00121
RM
5430 * sysdeps/powerpc/tcb-offsets.sym (thread_offsetof): Redefine to suit
5431 gcc4.
5432
4bae262d
UD
54332005-02-07 Richard Henderson <rth@redhat.com>
5434
613d8d52 5435 [BZ #787]
4bae262d
UD
5436 * sysdeps/pthread/pthread.h (__sigsetjmp): Use pointer as first
5437 argument.
5438
75df54b7
RM
54392004-11-03 Marcus Brinkmann <marcus@gnu.org>
5440
5441 * sysdeps/generic/lowlevellock.h (__generic_mutex_unlock): Fix
5442 order of arguments in invocation of atomic_add_zero.
5443
ea9c93cc
UD
54442005-01-26 Jakub Jelinek <jakub@redhat.com>
5445
9cfe5381 5446 [BZ #737]
ea9c93cc
UD
5447 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S (__new_sem_trywait):
5448 Use direct %gs segment access or, if NO_TLS_DIRECT_SEG_REFS,
5449 at least gotntpoff relocation and addition.
5450 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
5451 Likewise.
5452 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
5453 Likewise.
5454 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
5455 Likewise.
5456
9dcafc55
UD
54572005-01-06 Ulrich Drepper <drepper@redhat.com>
5458
5459 * allocatestack.c (init_one_static_tls): Adjust initialization of DTV
5460 entry for static tls deallocation fix.
5461 * sysdeps/alpha/tls.h (dtv_t): Change pointer type to be struct which
5462 also contains information whether the memory pointed to is static
5463 TLS or not.
5464 * sysdeps/i386/tls.h: Likewise.
5465 * sysdeps/ia64/tls.h: Likewise.
5466 * sysdeps/powerpc/tls.h: Likewise.
5467 * sysdeps/s390/tls.h: Likewise.
5468 * sysdeps/sh/tls.h: Likewise.
5469 * sysdeps/sparc/tls.h: Likewise.
5470 * sysdeps/x86_64/tls.h: Likewise.
5471
a71c152c
UD
54722004-12-27 Ulrich Drepper <drepper@redhat.com>
5473
5474 * init.c (__pthread_initialize_minimal_internal): Use __sigemptyset.
5475
d143c49e
UD
54762004-12-21 Jakub Jelinek <jakub@redhat.com>
5477
5478 * sysdeps/i386/tls.h (CALL_THREAD_FCT): Maintain 16 byte alignment of
5479 %esp.
5480 * Makefile (tests): Add tst-align2.
5481 * tst-align2.c: New test.
5482 * sysdeps/i386/Makefile (CFLAGS-tst-align{,2}.c): Add
5483 -mpreferred-stack-boundary=4.
5484
50130ded
RM
54852004-12-18 Roland McGrath <roland@redhat.com>
5486
5487 * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h:
5488 New file removed withdrawn for the moment.
5489
cbc53df0
RH
54902004-12-17 Richard Henderson <rth@redhat.com>
5491
5492 * sysdeps/unix/sysv/linux/alpha/clone.S: New file.
5493 * sysdeps/alpha/tcb-offsets.sym (TID_OFFSET): New.
50130ded 5494
fb9d5c73
UD
54952004-12-16 Ulrich Drepper <drepper@redhat.com>
5496
03332aa6
UD
5497 * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h: New file.
5498 Increased PTHREAD_STACK_MIN.
5499
fb9d5c73
UD
5500 * tst-context1.c (stacks): Use bigger stack size.
5501
e853ea00
UD
55022004-12-16 Jakub Jelinek <jakub@redhat.com>
5503
5504 * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: New file.
5505 * sysdeps/sparc/tcb-offsets.sym: Add TID.
5506
f23673fc
UD
55072004-12-15 Jakub Jelinek <jakub@redhat.com>
5508
5509 * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: New file.
5510 * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: New file.
5511 * sysdeps/s390/tcb-offsets.sym (TID): Add.
5512
917fbe70
UD
55132004-12-15 Ulrich Drepper <drepper@redhat.com>
5514
5515 * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: New file.
5516
1f9d7c27
UD
55172004-12-14 Ulrich Drepper <drepper@redhat.com>
5518
5519 * sysdeps/powerpc/tcb-offsets.sym: Add TID.
5520 * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: New file.
5521
5522 * tst-getpid1.c: If child crashes, report this first. Print which
5523 signal.
5524
bf7c04cd
UD
55252004-12-09 Ulrich Drepper <drepper@redhat.com>
5526
5527 * init.c (__pthread_initialize_minimal_internal): Also unblock
5528 SIGSETXID.
5529
55302004-12-01 Jakub Jelinek <jakub@redhat.com>
5531
5532 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_CPUTIME,
5533 _POSIX_THREAD_CPUTIME): Define to 0.
5534 * sysdeps/pthread/timer_create.c (timer_create): Remove unused code
5535 handling CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID.
5536 * sysdeps/pthread/timer_routines.c (__timer_signal_thread_pclk,
5537 __timer_signal_thread_tclk): Remove.
5538 (init_module): Remove their initialization.
5539 (thread_cleanup): Remove their cleanup assertions.
5540 * sysdeps/pthread/posix-timer.h (__timer_signal_thread_pclk,
5541 __timer_signal_thread_tclk): Remove.
5542 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Removed.
75df54b7 5543 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Removed.
bf7c04cd
UD
5544 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Removed.
5545
484cc801
UD
55462004-12-07 Jakub Jelinek <jakub@redhat.com>
5547
5548 * sysdeps/ia64/tcb-offsets.sym (TID): Add.
5549 * sysdeps/unix/sysv/linux/ia64/clone2.S: New file.
5550
5551 * Makefile (tests): Add tst-getpid2.
5552 * tst-getpid1.c (TEST_CLONE_FLAGS): Define.
5553 (do_test): Use it. Use __clone2 instead of clone on ia64.
5554 * tst-getpid2.c: New test.
5555
2da9a6a1
UD
55562004-12-07 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5557
5558 * sysdeps/unix/sysv/linux/sh/clone.S: New file.
5559
1ff241b8
UD
55602004-12-04 Ulrich Drepper <drepper@redhat.com>
5561
5562 * Makefile (tests): Add tst-getpid1.
5563 * tst-getpid1.c: New file.
5564 * sysdeps/unix/sysv/linux/i386/clone.S: New file.
5565 * sysdeps/unix/sysv/linux/x86_64/clone.S: New file.
5566
3f488b9c
RM
55672004-12-02 Roland McGrath <roland@redhat.com>
5568
5569 * Makefile (libpthread-nonshared): Variable removed.
5570 ($(objpfx)libpthread_nonshared.a): Target removed.
5571 ($(inst_libdir)/libpthread_nonshared.a): Likewise.
5572 These are now handled by generic magic from
5573 libpthread-static-only-routines being set.
5574
597ce09c
UD
55752004-11-27 Ulrich Drepper <drepper@redhat.com>
5576
5577 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_PRIORITIZED_IO,
5578 _POSIX2_CHAR_TERM, _POSIX_THREAD_PRIO_INHERIT,
5579 _POSIX_THREAD_PRIO_PROTECT): Define.
5580 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
5581 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
5582 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
5583
60e4523a
UD
55842004-11-26 Jakub Jelinek <jakub@redhat.com>
5585
5586 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_ADVISORY_INFO,
5587 _POSIX_SPORADIC_SERVER, _POSIX_THREAD_SPORADIC_SERVER, _POSIX_TRACE,
5588 _POSIX_TRACE_EVENT_FILTER, _POSIX_TRACE_INHERIT, _POSIX_TRACE_LOG,
5589 _POSIX_TYPED_MEMORY_OBJECTS, _POSIX_IPV6, _POSIX_RAW_SOCKETS): Define.
5590 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
5591 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
5592 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
5593
f1f2cafc
UD
55942004-11-24 Ulrich Drepper <drepper@redhat.com>
5595
bca2d208
UD
5596 * sysdeps/x86_64/Makefile [nptl]: Define CFLAGS-pthread_create.c.
5597
f1f2cafc
UD
5598 * Makefile (libpthread-routines): Add pthread_setschedprio.
5599 * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setschedprio.
5600 * sysdeps/pthread/pthread.h: Declare pthread_setschedprio.
5601 * pthread_setschedprio.c: New file.
5602
b639d0c9
UD
56032004-11-20 Jakub Jelinek <jakub@redhat.com>
5604
ef2bb413
UD
5605 * pthread_create.c (pthread_cancel): Add PTHREAD_STATIC_FN_REQUIRE.
5606 * pthread_cancel.c (pthread_create): Likewise.
5607
b639d0c9
UD
5608 * Makefile (libpthread-routines): Add vars.
5609 * sysdeps/pthread/createthread.c (__pthread_multiple_threads): Remove.
5610 * init.c (__default_stacksize, __is_smp): Remove.
5611 * vars.c: New file.
5612 * pthreadP.h (__find_thread_by_id): If !SHARED, add weak_function
5613 and define a wrapper macro.
5614 (PTHREAD_STATIC_FN_REQUIRE): Define.
5615 * allocatestack.c (__find_thread_by_id): Undefine.
5616 * pthread_create (__pthread_keys): Remove.
5617 (pthread_mutex_lock, pthread_mutex_unlock, pthread_once,
5618 pthread_key_create, pthread_setspecific, pthread_getspecific): Add
5619 PTHREAD_STATIC_FN_REQUIRE.
5620
3defcff3
UD
56212004-11-18 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5622
5623 * sysdeps/sh/tls.h (DB_THREAD_SELF): Set the correct bias
5624 parameter to REGISTER macro.
5625
ec188f92
RM
56262004-11-17 Roland McGrath <roland@redhat.com>
5627
5628 * sysdeps/unix/sysv/linux/timer_routines.c (__start_helper_thread):
5629 Make sure SIGCANCEL is blocked as well.
5630
ccd8de9a
UD
56312004-11-10 Jakub Jelinek <jakub@redhat.com>
5632
5633 * sysdeps/pthread/setxid.h: New file.
5634 * sysdeps/pthread/pthread-functions.h (HAVE_PTR__NPTL_SETXID): Remove.
5635 (struct xid_command): Add forward decl.
5636 (struct pthread_functions): Change return type of __nptl_setxid hook
5637 to int.
5638 * pthreadP.h (__nptl_setxid): Change return type to int.
5639 * allocatestack.c (__nptl_setxid): Call INTERNAL_SYSCALL_NCS in the
5640 calling thread, return its return value and set errno on failure.
5641 * descr.h (struct xid_command): Change id type to long array.
5642
5643 * Makefile: Add rules to build and test tst-setuid1 and
5644 tst-setuid1-static.
5645 * tst-setuid1.c: New test.
5646 * tst-setuid1-static.c: New test.
5647
ed2ced8a
UD
56482004-11-10 Jakub Jelinek <jakub@redhat.com>
5649
5650 * Makefile (tests): Add tst-exit3.
5651 * tst-exit3.c: New test.
5652
948603ee
UD
56532004-11-09 Ulrich Drepper <drepper@redhat.com>
5654
5655 * Makefile (tests): Add tst-exit2.
5656 * tst-exit2.c: New file.
5657
ba5ffd2a
RM
56582004-11-09 Roland McGrath <roland@redhat.com>
5659
5660 [BZ #530]
5661 * sysdeps/pthread/createthread.c (do_clone): Increment __nptl_nthreads
5662 here, before calling clone.
5663 * pthread_create.c (start_thread): Don't do it here.
5664
c4d7bd39
RM
56652004-11-02 Jakub Jelinek <jakub@redhat.com>
5666
5667 * sysdeps/unix/sysv/linux/smp.h: Include <errno.h>.
5668
543fb0c8
UD
56692004-10-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5670
5671 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
5672 Set ETIMEDOUT to errno when time is up. Tweak to avoid
5673 assembler warning.
5674
a1fbd858
UD
56752004-10-28 Jakub Jelinek <jakub@redhat.com>
5676
5677 * pthread_create.c (__pthread_create_2_1): Avoid leaking stacks
5678 if sched_priority is not between minprio and maxprio.
5679
c2a4357a
UD
56802004-10-25 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5681
5682 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
5683 (__pthread_cond_timedwait): Use clock_gettime syscall if exists.
5684
5685 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
5686 (__lll_mutex_timedlock_wait): Fix a bad branch condition.
5687
78d8d211
UD
56882004-10-24 Ulrich Drepper <drepper@redhat.com>
5689
5690 * sysdeps/unix/sysv/linux/smp.h (is_smp_system): Use
5691 not-cancelable I/O functions.
5692
dd28590f
UD
56932004-10-21 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5694
5695 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
5696 (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
5697 make sure 2 is stored in the futex and we looked at the old value.
5698 Fix a few other problems to return the correct value.
5699
f8c97af7
RH
57002004-10-14 Richard Henderson <rth@redhat.com>
5701
5702 * sysdeps/alpha/tcb-offsets.sym (thread_offsetof): Redefine to
5703 make gcc4 happy.
5704
3feb8efa
UD
57052004-10-06 Jakub Jelinek <jakub@redhat.com>
5706
5707 * sysdeps/unix/sysv/linux/jmp-unwind.c: Include pthreadP.h instead
5708 of pthread-functions.h and pthreaddef.h.
5709 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Likewise.
5710
5711 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
5712 Change __data.__nwaiters from int to unsigned int.
5713
5714 * tst-clock2.c (do_test): Don't fail if _POSIX_THREAD_CPUTIME == 0 and
5715 sysconf (_SC_THREAD_CPUTIME) returns negative value.
5716
5717 * allocatestack.c (__find_thread_by_id): Move attribute_hidden
5718 before return type.
5719
5720 * sysdeps/s390/jmpbuf-unwind.h: Include bits/wordsize.h.
5721 (JMPBUF_CFA_UNWINDS_ADJ): Subtract 96 resp. 160 bytes from CFA.
5722
67060ef5
UD
57232004-10-06 Ulrich Drepper <drepper@redhat.com>
5724
5725 * tst-cancel4.c (tf_msgrcv): Check for failure in msgget. If the
5726 test fails, remove message queue.
5727 (tf_msgsnd): Likewise.
5728
f38a3086
UD
57292004-10-05 Jakub Jelinek <jakub@redhat.com>
5730
5731 * tst-clock1.c: Change #ifdef to #if defined.
5732 * tst-clock2.c: Likewise.
5733 * tst-cond11.c: Likewise.
5734
2c03b6db
UD
5735 * sysdeps/pthread/timer_create.c (timer_create): Use
5736 defined _POSIX_CPUTIME && _POSIX_CPUTIME >= 0 instead of
5737 defined CLOCK_PROCESS_CPUTIME_ID #ifs and similarly for
5738 THREAD_CPUTIME.
5739
6ab5f50d
UD
57402004-10-05 Jakub Jelinek <jakub@redhat.com>
5741
5742 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h (_POSIX_CPUTIME,
5743 _POSIX_THREAD_CPUTIME): Define to 0.
5744
e4bb4853
UD
57452004-10-04 Ulrich Drepper <drepper@redhat.com>
5746
5747 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Define _POSIX_CPUTIME
5748 and _POSIX_THREAD_CPUTIME to zero.
5749 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
5750 * tst-barrier2.c: Fix testing for POSIX feature.
5751 * tst-clock1.c: Likewise.
5752 * tst-clock2.c: Likewise.
5753 * tst-cond11.c: Likewise.
5754 * tst-cond4.c: Likewise.
5755 * tst-cond6.c: Likewise.
5756 * tst-flock2.c: Likewise.
5757 * tst-mutex4.c: Likewise.
5758 * tst-mutex9.c: Likewise.
5759 * tst-rwlock12.c: Likewise.
5760 * tst-rwlock4.c: Likewise.
5761 * tst-signal1.c: Likewise.
5762 * tst-spin2.c: Likewise.
5763 * sysdeps/pthread/posix-timer.h: Likewise.
5764 * sysdeps/pthread/timer_create.c: Likewise.
5765 * sysdeps/pthread/timer_routines.c: Likewise.
5766
c1b48791
UD
57672004-10-01 Ulrich Drepper <drepper@redhat.com>
5768
927f0673
UD
5769 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
5770 (__lll_mutex_timedlock_wait): Address futex correctly.
5771
c1b48791 5772 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
b610fa2d 5773 (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
c1b48791
UD
5774 make sure 2 is stored in the futex and we looked at the old value.
5775 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
5776 (__lll_mutex_timedlock_wait): Likewise. Fix a few other problems
5777 which might very well made the code not working at all before.
7b87aca6 5778 [BZ #417]
c1b48791 5779
e9f4e844
UD
57802004-09-28 Ulrich Drepper <drepper@redhat.com>
5781
4f21c95d
UD
5782 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
5783 allow SIGSETXID to be sent.
5784 * sysdeps/pthread/sigaction.c (__sigaction): Don't allow action
5785 for SIGSETXID to be defined.
5786 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
5787 SIGSETXID cannot be blocked.
5788
e9f4e844
UD
5789 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
5790 Add __extension__ to long long types.
5791 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5792 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5793 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5794 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5795 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
5796 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
5797 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5798
5f66b766
UD
57992004-09-25 Ulrich Drepper <drepper@redhat.com>
5800
5801 * descr.h (struct pthread): Add stopped_start field.
5802 * sysdeps/pthread/createthread.c (create_thread): Set
5803 start_stopped flag in descriptor for new thread appropriately.
5804 * pthread_create.c (start_thread): Only take lock to be stopped on
5805 startup if stopped_start flag says so.
5806
362038b0
UD
58072004-09-24 Ulrich Drepper <drepper@redhat.com>
5808
3f80a99b
UD
5809 * pthread_create.c (__pthread_create_2_1): Remember whether thread
5810 is created detached and if yes, do not try to free the stack in case
5811 the thread creation failed.
5812 * sysdeps/pthread/createthread.c (do_clone): Free stack here if clone
5813 call fails. Don't depend on INTERNAL_SYSCALL_ERRNO return zero in
5814 case there has been no error. [BZ #405]
5815
362038b0
UD
5816 * pthread_create.c (start_thread): Don't wait for scheduler data
5817 etc to be set at the beginning of the function. The cancellation
5818 infrastructure must have been set up. And enable async
5819 cancellation before potentially going to sleep. [BZ #401]
5820
65f0beb9
UD
58212004-09-20 Ulrich Drepper <drepper@redhat.com>
5822
3c12b91a 5823 * Versions: Remove exports for pthread_set*id_np functions.
65f0beb9
UD
5824 * sysdeps/pthread/pthread.h: Remove pthread_set*id_np prototypes
5825 for now.
5826 * Makefile: Don't build pthread_set*id code for now.
5827
2edb61e3
UD
58282004-09-19 Ulrich Drepper <drepper@redhat.com>
5829
5830 * sysdeps/unix/sysv/linux/allocrtsig.c: Allocate second signal for
5831 internal use.
5832 * allocatestack.c (__nptl_setxid): New function.
5833 * descr.h (struct xid_command): Define type.
5834 * init.c (pthread_functions): Add ptr__nptl_setxid initialization.
5835 (sighandler_setxid): New function.
5836 (__pthread_initialize_minimal): Register sighandler_setxid for
5837 SIGCANCEL.
5838 * pt-allocrtsig.c: Update comment.
5839 * pthreadP.h: Define SIGSETXID. Declare __xidcmd variable.
5840 Declare __nptl_setxid.
5841 * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_setxid.
5842 * sysdeps/pthread/pthread.h: Declare pthread_setgid_np,
5843 pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
5844 pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
5845 and pthread_setresuid_np.
5846 * pthread_setgid_np.c: New file.
5847 * pthread_setuid_np.c: New file.
5848 * pthread_setegid_np.c: New file.
5849 * pthread_seteuid_np.c: New file.
5850 * pthread_setregid_np.c: New file.
5851 * pthread_setreuid_np.c: New file.
5852 * pthread_setresgid_np.c: New file.
5853 * pthread_setresuid_np.c: New file.
5854 * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setgid_np,
5855 pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
5856 pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
5857 and pthread_setresuid_np.
5858 * Makefile (libpthread-routines): Add pthread_setuid, pthread_seteuid,
5859 pthread_setreuid, pthread_setresuid, pthread_setgid, pthread_setegid,
5860 pthread_setregid, and pthread_setresgid.
5861
1ab1fa6f
UD
58622004-09-18 Ulrich Drepper <drepper@redhat.com>
5863
5864 * allocatestack.c (allocate_stack): Return EAGAIN instead of
5865 ENOMEM when out of memory.
5866
ae9e6b36
RM
58672004-09-10 Roland McGrath <roland@redhat.com>
5868
5869 [BZ #379]
5870 * allocatestack.c (allocate_stack): Remove [__ASSUME_CLONE_STOPPED]
5871 code, since we don't try to use the broken CLONE_STOPPED any more.
5872 * pthread_create.c (start_thread): Likewise.
5873
424bd2f8
RH
58742004-09-15 Richard Henderson <rth@redhat.com>
5875
5876 * sysdeps/unix/sysv/linux/alpha/vfork.S: Use libc_hidden_def.
5877
17b8a52d
UD
58782004-09-01 David Mosberger <davidm@hpl.hp.com>
5879
5880 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h
5881 (__libc_unwind_longjmp): Delete macro and declare as function.
5882 * sysdeps/unix/sysv/linux/ia64/Makefile (sysdep_routines): Mention
5883 __ia64_longjmp, sigstack_longjmp, and __sigstack_longjmp for
5884 nptl directory.
5885 * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S: New file.
5886 * sysdeps/unix/sysv/linux/ia64/__sigstack_longjmp.c: New file.
5887 * sysdeps/unix/sysv/linux/ia64/unwind_longjmp.c: New file.
5888
ccc63b07
UD
58892004-09-12 Ulrich Drepper <drepper@redhat.com>
5890
5891 * sysdeps/pthread/pthread.h: Make rwlock prototypes available also
5892 for __USE_XOPEN2K.
5893 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define rwlock
5894 types also for __USE_XOPEN2K.
5895 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
5896 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5897 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5898 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5899 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
5900 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5901 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5902 [BZ #320]
5903
31f93b3b
UD
59042004-09-08 Ulrich Drepper <drepper@redhat.com>
5905
5906 * sysdeps/pthread/pthread.h
5907 (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Make safe for C++.
5908 (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
5909 (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
5910 (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Likewise.
5911 [BZ #375]
5912
e0329987
UD
59132004-09-07 Ulrich Drepper <drepper@redhat.com>
5914
590b40f7
UD
5915 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Allow
5916 PSEUDO to be used with . prefix.
5917
67254a97
UD
5918 * sysdeps/unix/sysv/linux/alpha/pthread_once.c (__pthread_once):
5919 Use atomic_increment instead of atomic_exchange_and_add.
5920 * sysdeps/unix/sysv/linux/sparc/pthread_once.c (__pthread_once):
5921 Likewise.
5922 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
5923 Likewise.
5924 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
5925 Likewise.
5926
5927 * allocatestack.c (allocate_stack): Use atomic_increment_val
5928 instead of atomic_exchange_and_add.
5929 * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Likewise.
5930 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
5931 Likewise.
5932 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
5933 Likewise.
5934
e0329987
UD
5935 * sysdeps/pthread/pthread.h (pthread_once): Remove __THROW since
5936 the initialization function might throw.
5937
42d86dd6 59382005-09-05 Richard Henderson <rth@redhat.com>
e0329987 5939
42d86dd6
RH
5940 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
5941 Move definition inside libpthread, libc, librt check. Provide
5942 definition for rtld.
5943
73f7c32c
UD
59442004-09-02 Ulrich Drepper <drepper@redhat.com>
5945
f76c8499
UD
5946 * sysdeps/alpha/jmpbuf-unwind.h: Define __libc_unwind_longjmp.
5947 * sysdeps/i386/jmpbuf-unwind.h: Likewise
5948 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
5949 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
5950 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
5951 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
5952 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
5953 * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
5954 * unwind.c: Use it.
5955
73f7c32c
UD
5956 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
5957 Rename __data.__clock to __data.__nwaiters, make it unsigned int.
5958 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
5959 Likewise.
5960 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
5961 Decrement __nwaiters. If pthread_cond_destroy has been called and
5962 this is the last waiter, signal pthread_cond_destroy caller and
5963 avoid using the pthread_cond_t structure after unlock.
5964 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
5965 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5966 Read clock type from the least significant bits of __nwaiters instead
5967 of __clock.
5968 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5969 * sysdeps/unix/sysv/linux/internaltypes.h: Define COND_CLOCK_BITS.
5970
59712004-08-31 Jakub Jelinek <jakub@redhat.com>
5972
5973 [BZ #342]
5974 * Makefile (tests): Add tst-cond20 and tst-cond21.
5975 * tst-cond20.c: New test.
5976 * tst-cond21.c: New test.
5977 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
5978 (pthread_cond_t): Rename __data.__clock to __data.__nwaiters, make
5979 it unsigned int.
5980 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
5981 Likewise.
5982 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
5983 (pthread_cond_t): Likewise.
5984 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
5985 Likewise.
5986 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
5987 Likewise.
5988 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
5989 Likewise.
5990 * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_clock): Remove.
5991 (cond_nwaiters): New.
5992 (clock_bits): New.
5993 * pthread_cond_destroy.c (__pthread_cond_destroy): Return EBUSY
5994 if there are waiters not signalled yet.
5995 Wait until all already signalled waiters wake up.
5996 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Decrement
5997 __nwaiters. If pthread_cond_destroy has been called and this is the
5998 last waiter, signal pthread_cond_destroy caller and avoid using
5999 the pthread_cond_t structure after unlock.
6000 (__pthread_cond_wait): Increment __nwaiters in the beginning,
6001 decrement it when leaving. If pthread_cond_destroy has been called
6002 and this is the last waiter, signal pthread_cond_destroy caller.
6003 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
6004 Likewise. Read clock type from the least significant bits of
6005 __nwaiters instead of __clock.
6006 * pthread_condattr_setclock.c (pthread_condattr_setclock): Check
6007 whether clock ID can be encoded in COND_CLOCK_BITS bits.
6008 * pthread_condattr_getclock.c (pthread_condattr_getclock): Decode
6009 clock type just from the last COND_CLOCK_BITS bits of value.
6010 * pthread_cond_init.c (__pthread_cond_init): Initialize __nwaiters
6011 instead of __clock, just from second bit of condattr's value.
6012
409f7493
UD
60132004-08-30 Jakub Jelinek <jakub@redhat.com>
6014
6015 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Include
6016 bits/wordsize.h. Make the header match i386 header when __WORDSIZE
6017 != 64.
6018 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
6019
92c6ccd1
RM
60202004-08-15 Roland McGrath <roland@frob.com>
6021
6022 * pthread_atfork.c: Update copyright terms including special exception
6023 for these trivial files, which are statically linked into executables
6024 that use dynamic linking for the significant library code.
6025
4d004cfb
UD
60262004-08-09 Jakub Jelinek <jakub@redhat.com>
6027
6028 * DESIGN-rwlock.txt: Add decreasing of nr_readers_queued to
6029 pthread_rwlock_rdlock.
6030 * sysdeps/pthread/pthread_rwlock_rdlock (__pthread_rwlock_rdlock):
6031 Decrease __nr_readers_queued after reacquiring lock.
6032 * sysdeps/pthread/pthread_rwlock_timedrdlock
6033 (pthread_rwlock_timedrdlock): Likewise.
6034 Reported by Bob Cook <bobcook47@hotmail.com>.
6035
90595fb6
RM
60362004-08-11 Jakub Jelinek <jakub@redhat.com>
6037
6038 * tst-rwlock14.c (tf): Read main thread handle from *ARG
6039 before pthread_barrier_wait.
6040
fa46f7ab
UD
60412004-08-07 Ulrich Drepper <drepper@redhat.com>
6042
6043 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
6044 Remove unnecessary exception handling data.
6045
15ef4b55
UD
60462004-07-23 Jakub Jelinek <jakub@redhat.com>
6047
6048 [BZ #284]
6049 * sysdeps/pthread/pthread.h (pthread_getcpuclockid): Use __clockid_t
6050 instead of clockid_t.
6051
4fb907b7
RM
60522004-07-21 Roland McGrath <roland@redhat.com>
6053
6054 * Makefile ($(objpfx)multidir.mk): Use $(make-target-directory).
6055
60562004-07-19 Roland McGrath <roland@redhat.com>
6057
6058 * tst-cancel4.c (tf_waitid): Use WEXITED flag bit if available.
6059
8f73811b
RM
60602004-07-02 Roland McGrath <roland@redhat.com>
6061
6062 * configure: Don't exit.
6063
290639c3
UD
60642004-07-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6065
6066 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
6067 (__pthread_cond_timedwait): Check for invalid nanosecond in
6068 timeout value.
6069
8e5aaad9
UD
60702004-07-07 Ulrich Drepper <drepper@redhat.com>
6071
6072 * Makefile: Add rules to build and run tst-fini1.
6073 * tst-fini1.c: New file.
6074 * tst-fini1mod.c: New file.
6075
ce6e047f
UD
60762004-07-05 Ulrich Drepper <drepper@redhat.com>
6077
6078 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define NO_CANCELLATION
6079 if no cancellation support is needed.
6080 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
6081 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
6082 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
6083 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
6084 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
6085 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
6086 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
6087 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
6088 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
6089
6090 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define __NR_futex
6091 only if not already defined.
6092
9b9ef823
UD
60932004-07-05 Jakub Jelinek <jakub@redhat.com>
6094
2dd18ce2
UD
6095 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_unlock): Use
6096 constraint "m" instead of "0" for futex.
6097
9b9ef823
UD
6098 * shlib-versions: Add powerpc64-.*-linux.*.
6099
38205402
UD
61002004-07-04 Jakub Jelinek <jakub@redhat.com>
6101
6102 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
6103 (pthread_rwlock_timedrdlock): Use cmpq instead of cmpl to check
6104 for valid tv_nsec.
6105 * tst-rwlock14.c (do_test): Test for invalid tv_nsec equal to
6106 1 billion and 64-bit tv_nsec which is valid when truncated to 32
6107 bits.
6108
78a9c837
RM
61092004-06-29 Roland McGrath <roland@redhat.com>
6110
6111 * Banner: NPTL no longer has its own version number.
6112 * Makefile (nptl-version): Variable removed.
6113 * sysdeps/pthread/Makefile (CFLAGS-confstr.c): Set LIBPTHREAD_VERSION
6114 using $(version), the glibc version number.
6115
d3d35527
UD
61162004-06-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6117
6118 * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
6119 Fix branch offset for a PLT entry.
6120 * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
6121 Likewise.
6122 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
6123 Likewise.
6124 * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
6125 Likewise.
6126 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait):
6127 Likewise.
6128
346f18ae
UD
61292004-06-28 Jakub Jelinek <jakub@redhat.com>
6130
6131 * sysdeps/alpha/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define
6132 unconditionally.
6133
f3a19754
UD
61342004-06-28 Jakub Jelinek <jakub@redhat.com>
6135
6136 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
6137 (pthread_rwlock_timedwrlock): Return EINVAL if tv_nsec is negative,
6138 instead of tv_sec.
6139 * sysdeps/pthread/pthread_rwlock_timedrdlock.c
6140 (pthread_rwlock_timedrdlock): Likewise.
6141
539842a4
UD
61422004-06-22 Jakub Jelinek <jakub@redhat.com>
6143
6144 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
6145 Set __r7 to val, not mutex.
6146
46f4c578
UD
61472004-06-27 Ulrich Drepper <drepper@redhat.com>
6148
6149 * Makefile: Add rules to build tst-rwlock14.
6150 * tst-rwlock14.c: New file.
6151
61522004-06-24 Boris Hu <boris.hu@intel.com>
6153
6154 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Add timeout validation
6155 check.
6156 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
6157
9898e99c
AJ
61582004-06-19 Andreas Jaeger <aj@suse.de>
6159
6160 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix
6161 assembler in last patch.
6162
7c3164bc
UD
61632004-06-17 Ulrich Drepper <drepper@redhat.com>
6164
6165 * sysdeps/pthread/pthread_cond_timedwait.c
6166 (__pthread_cond_timedwait): Also check for negativ nanoseconds.
6167 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6168 (__pthread_cond_timedwait): Check for invalid nanosecond in
6169 timeout value.
6170 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6171 * tst-cond19.c: New file.
6172 * Makefile: Add rules to build and run tst-cond19.
6173
72e61500
UD
61742004-06-15 Steven Munroe <sjmunroe@us.ibm.com>
6175
6176 * tst-context1.c (GUARD_PATTERN): Defined.
6177 (tst_context_t): Define struct containing ucontext_t & guard words.
6178 (ctx): Declare as an array of tst_context_t.
6179 (fct): Verify uc_link & guard words are still valid.
6180 (tf): Initialize guard words in ctx. Adjust ctx refs for new struct.
6181
7c370086
UD
61822004-06-13 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6183
6184 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
6185 Add __data.__futex field, reshuffle __data.__clock.
6186 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
6187 (__pthread_cond_signal): Increment __futex at the same time as
6188 __wakeup_seq or __total_seq. Pass address of __futex instead of
6189 address of low 32-bits of __wakeup_seq to futex syscall.
6190 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
6191 (__pthread_cond_wait): Likewise. Pass __futex value from before
6192 releasing internal lock to FUTEX_WAIT.
6193 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
6194 (__pthread_cond_timedwait): Likewise.
6195 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
6196 (FUTEX_CMP_REQUEUE): Define.
6197 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
6198 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
6199 Pass __futex value from before the unlock and __futex address instead
6200 of address of low 32-bits of __wakeup_seq to futex syscall.
6201 Fallback to FUTEX_WAKE all on any errors.
6202
a9e526e7
RM
62032004-06-08 Jakub Jelinek <jakub@redhat.com>
6204
6205 * pthread_mutexattr_getpshared.c (pthread_mutex_getpshared): Fix
6206 comment typo.
6207 * pthread_mutexattr_gettype.c (pthread_mutexattr_gettype): Likewise.
6208 * pthread_mutexattr_init.c (__pthread_mutexattr_init): Likewise.
6209 * pthread_mutexattr_settype.c (__pthread_mutexattr_settype): Likewise.
6210 * pthread_mutexattr_setpshared.c (pthread_mutexattr_setpshared):
6211 Likewise. Reported by Bob Cook <bobcook47@hotmail.com>.
6212
f1847a84
RM
62132004-06-11 Martin Schwidefsky <schwidefsky@de.ibm.com>
6214
6215 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_compare_and_swap):
6216 Add memory clobber to inline assembly.
6217 (__lll_mutex_trylock): Likewise.
6218 (__lll_mutex_cond_trylock): Likewise.
6219
f7c81e1a
UD
62202004-06-07 Martin Schwidefsky <schwidefsky@de.ibm.com>
6221
6222 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
6223 Pass val argument as 6th system call argument in %r7.
6224
75fccede
UD
62252004-05-21 Jakub Jelinek <jakub@redhat.com>
6226
6227 * Makefile (tests): Add tst-cond16.
6228 * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_futex): Add.
6229 * pthread_cond_init.c (__pthread_cond_init): Clear __data.__futex.
6230 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
6231 Add __data.__futex field, reshuffle __data.__clock.
6232 * sysdeps/unix/sysv/linux/i386/pthread_cond_signal.S
6233 (__pthread_cond_signal): Increment __futex at the same time as
6234 __wakeup_seq or __total_seq. Pass address of __futex instead of
6235 address of low 32-bits of __wakeup_seq to futex syscall.
6236 * sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S
6237 (__pthread_cond_wait): Likewise. Pass __futex value from before
6238 releasing internal lock to FUTEX_WAIT.
6239 * sysdeps/unix/sysv/linux/i386/pthread_cond_timedwait.S
6240 (__pthread_cond_timedwait): Likewise.
6241 * sysdeps/unix/sysv/linux/i386/pthread_cond_broadcast.S
6242 (FUTEX_CMP_REQUEUE): Define.
6243 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
6244 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
6245 Pass __futex value from before the unlock and __futex address instead
6246 of address of low 32-bits of __wakeup_seq to futex syscall.
6247 Fallback to FUTEX_WAKE all on any errors.
6248 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_CMP_REQUEUE):
6249 Define.
6250 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
6251 internally. Return non-zero if error, zero if success.
6252 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
6253 Add __data.__futex field, reshuffle __data.__clock.
6254 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_CMP_REQUEUE):
6255 Define.
6256 (lll_futex_requeue): Add val argument, return 1 unconditionally
6257 for the time being.
6258 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
6259 Add __data.__futex field, reshuffle __data.__clock.
6260 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_CMP_REQUEUE):
6261 Define.
6262 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
6263 internally. Return non-zero if error, zero if success.
6264 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
6265 (pthread_cond_t): Add __data.__futex field, reshuffle __data.__clock.
6266 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_CMP_REQUEUE):
6267 Define.
6268 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
6269 internally. Return non-zero if error, zero if success.
6270 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
6271 Add __data.__futex field, reshuffle __data.__clock.
6272 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_CMP_REQUEUE):
6273 Define.
6274 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
6275 internally. Return non-zero if error, zero if success.
6276 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
6277 Add __data.__futex field, reshuffle __data.__clock.
6278 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
6279 Add __data.__futex field, reshuffle __data.__clock.
6280 * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal):
6281 Increment __futex at the same time as __wakeup_seq or __total_seq.
6282 Pass address of __futex instead of address of low 32-bits of
6283 __wakeup_seq to futex syscall.
6284 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
6285 Pass __futex value from before releasing internal lock
6286 to FUTEX_WAIT.
6287 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
6288 Likewise. Avoid unnecessary shadowing of variables.
6289 * sysdeps/pthread/pthread_cond_broadcast.c (__pthread_cond_broadcast):
6290 Set __futex to 2 * __total_seq. Pass __futex value from before the
6291 unlock and __futex address instead of address of low 32-bits of
6292 __wakeup_seq to futex_requeue macro, adjust for new return value
6293 meaning.
6294 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
6295 (__pthread_cond_signal): Increment __futex at the same time as
6296 __wakeup_seq or __total_seq. Pass address of __futex instead of
6297 address of low 32-bits of __wakeup_seq to futex syscall.
6298 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
6299 (__pthread_cond_wait): Likewise. Pass __futex value from before
6300 releasing internal lock to FUTEX_WAIT.
6301 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
6302 (__pthread_cond_timedwait): Likewise.
6303 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
6304 (FUTEX_CMP_REQUEUE): Define.
6305 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
6306 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
6307 Pass __futex value from before the unlock and __futex address instead
6308 of address of low 32-bits of __wakeup_seq to futex syscall.
6309 Fallback to FUTEX_WAKE all on any errors.
6310
63112004-06-03 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6312
6313 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_mutex_lock):
6314 Add nop to align the end of critical section.
6315 (lll_mutex_cond_lock, lll_mutex_timedlock): Likewise.
6316
fbf86dda
UD
63172004-06-01 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6318
6319 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
6320 Add __broadcast_seq field.
6321 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Mark
6322 all waiters as woken with woken_seq and bump broadcast counter.
6323 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use new
6324 __broadcast_seq. Increment __woken_seq correctly when cleanuped.
6325 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
6326 Comment typo fixes. Avoid returning -ETIMEDOUT.
6327
63282004-06-01 Ulrich Drepper <drepper@redhat.com>
6329
6330 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6331 (__condvar_tw_cleanup): Fix access to saved broadcast_seq value.
6332 Reported by Kaz Kojima.
6333
ffdd5e50
UD
63342004-05-25 Jakub Jelinek <jakub@redhat.com>
6335
6336 * sysdeps/unix/sysv/linux/aio_misc.h: New file.
6337
3abc82c8
UD
63382004-05-21 Jakub Jelinek <jakub@redhat.com>
6339
6340 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Compare
6341 __broadcast_seq with bc_seq after acquiring internal lock instead of
6342 before it.
6343
893a3511
UD
63442004-05-18 Jakub Jelinek <jakub@redhat.com>
6345
6346 * Makefile (.NOTPARALLEL): Only serialize make check/xcheck, not
6347 compilation.
6348 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6349 (__pthread_cond_timedwait): Avoid returning -ETIMEDOUT.
6350 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
6351 (pthread_cond_t): Add __data.__broadcast_seq field.
6352 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
6353 (FRAME_SIZE): Define.
6354 (__pthread_cond_timedwait): Use it. Store/check broadcast_seq.
6355 Comment typo fixes.
6356 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S (FRAME_SIZE):
6357 Define.
6358 (__pthread_cond_wait): Use it. Store/check broadcast_seq. Comment
6359 typo fixes.
6360 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
6361 (__pthread_cond_broadcast): Increment broadcast_seq. Comment typo
6362 fixes.
6363
63642004-05-18 Ulrich Drepper <drepper@redhat.com>
6365
6366 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add broadcast_seq entry.
6367 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
6368 Add __broadcast_seq field.
6369 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6370 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6371 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
6372 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
6373 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6374 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Mark
6375 all waiters as woken with woken_seq and bump broadcast counter.
6376 * sysdeps/pthread/pthread_cond_broadcast.c: Likewise.
6377 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use new
6378 __broadcast_seq field.
6379 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6380 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
6381 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
6382 * pthread_cond_init.c: Initialize __broadcast_seq field.
6383 * Makefile (tests): Add tst-cond17 and tst-cond18.
6384 Add .NOTPARALLEL goal.
6385 * tst-cond16.c: New file. From Jakub.
6386 * tst-cond17.c: New file. From Jakub.
6387 * tst-cond18.c: New file. From Jakub.
6388
4123718e
UD
63892004-05-16 Ulrich Drepper <drepper@redhat.com>
6390
6391 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Correct some
6392 unwind info.
6393
6394 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
6395 Parametrize frame size. Correct some unwind info.
6396 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6397
2d7ae210
UD
63982004-05-04 Jakub Jelinek <jakub@redhat.com>
6399
6400 * tst-stack3.c: Note testing functionality beyond POSIX.
6401
50c2b6d7
UD
64022004-05-04 Jakub Jelinek <jakub@redhat.com>
6403
6404 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (USE___THREAD):
6405 Change conditional from ifdef to if.
6406
27b02589
UD
64072004-04-23 Jakub Jelinek <jakub@redhat.com>
6408
6409 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SYSDEP_CANCEL_ERRNO,
6410 SYSDEP_CANCEL_ERROR): Define.
6411 (PSEUDO): Use it.
6412
4bb8fc33
UD
64132004-05-01 Jakub Jelinek <jakub@redhat.com>
6414
6415 * Versions (libpthread): Remove __pthread_cleanup_upto@@GLIBC_PRIVATE.
6416
f9a06dc1
UD
64172004-04-20 Jakub Jelinek <jakub@redhat.com>
6418
6419 * sem_unlink.c (sem_unlink): Change EPERM into EACCES.
6420
d3b52028
UD
64212004-04-19 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6422
6423 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Add frame info.
6424 Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
6425 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Remove unneeded frame
6426 info. Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
6427
a5dd0a6c
UD
64282004-04-19 Ulrich Drepper <drepper@redhat.com>
6429
6430 * sysdeps/unix/sysv/linux/timer_routines.c: Make sure helper
6431 thread has all signals blocked.
6432
620c3354
AJ
64332004-04-18 Andreas Jaeger <aj@suse.de>
6434
6435 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h
6436 (SEM_VALUE_MAX): Add missing brace.
6437
1683daeb
UD
64382004-04-17 Jakub Jelinek <jakub@redhat.com>
6439
6440 * sysdeps/pthread/Makefile (tests): Add tst-mqueue8x
6441 in rt subdir.
6442 (CFLAGS-tst-mqueue8x.c): Add -fexceptions.
6443 * sysdeps/pthread/tst-mqueue8x.c: New test.
6444 * tst-cancel4.c: Update comment about message queues.
6445
6446 * sysdeps/pthread/timer_gettime.c (timer_gettime): For expired timer
6447 return it_value { 0, 0 }.
6448 * sysdeps/pthread/timer_create.c (timer_create): Handle SIGEV_NONE
6449 like SIGEV_SIGNAL.
6450 * sysdeps/pthread/timer_routines.c (thread_expire_timer): Remove
6451 assertion for SIGEV_NONE.
6452 (thread_attr_compare): Compare all attributes, not just a partial
6453 subset.
6454
64552004-04-17 Jakub Jelinek <jakub@redhat.com>
6456
6457 * sysdeps/unix/sysv/linux/mq_notify.c: Include stdlib.h.
6458
f532641d
UD
64592004-04-17 Ulrich Drepper <drepper@redhat.com>
6460
6461 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h (SEM_VALUE_MAX):
6462 Just use a plain number.
6463 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
6464 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
6465 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
6466 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
6467 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
6468 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
6469 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
6470
7eb7fdda
UD
64712004-04-16 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6472
53392906
UD
6473 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Remove unneeded
6474 frame info.
6475 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7eb7fdda 6476
d7ba1313
UD
64772004-04-15 Jakub Jelinek <jakub@redhat.com>
6478
6479 * sysdeps/unix/sysv/linux/timer_routines.c: Include errno.h.
6480 (timer_helper_thread): Use inline rt_sigtimedwait syscall instead
6481 of calling sigwaitinfo.
6482
5adac0e4
UD
64832004-04-16 Ulrich Drepper <drepper@redhat.com>
6484
6485 * allocatestack.c (allocate_stack): Set reported_guardsize
6486 unconditionally.
6487 * pthread_getattr_np.c (pthread_getattr_np): Use
6488 reported_guardsize instead of guardsize.
6489 * descr.h (struct pthread): Add reported_guardsize field.
6490
f93fa7d4
UD
64912004-04-13 Jakub Jelinek <jakub@redhat.com>
6492
6493 * sysdeps/unix/sysv/linux/mq_notify.c: Shut up GCC warning.
6494
1b82c6c7
UD
64952004-04-12 Ulrich Drepper <drepper@redhat.com>
6496
6497 * sysdeps/unix/sysv/linux/mq-notify.c: New file.
6498
64992004-04-08 Jakub Jelinek <jakub@redhat.com>
6500
6501 * sysdeps/unix/sysv/linux/bits/local_lim.h (MQ_PRIO_MAX): Define.
6502 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h (MQ_PRIO_MAX): Define.
6503 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h (MQ_PRIO_MAX): Define.
6504 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h (MQ_PRIO_MAX): Define.
6505 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
6506 Define.
6507 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
6508 (_POSIX_MESSAGE_PASSING): Define.
6509 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h
6510 (_POSIX_MESSAGE_PASSING): Define.
6511 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h
6512 (_POSIX_MESSAGE_PASSING): Define.
6513
e6eb894e
UD
65142004-04-04 Ulrich Drepper <drepper@redhat.com>
6515
6516 * tst-context1.c (fct): Check whether correct stack is used.
6517
1e084487
UD
65182004-04-03 Ulrich Drepper <drepper@redhat.com>
6519
4e73e115
UD
6520 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Never use
6521 matching constraints for asm mem parameters.
6522
1e084487
UD
6523 * tst-clock2.c (tf): Don't define unless needed.
6524
feca5e0b
UD
65252004-03-30 H.J. Lu <hongjiu.lu@intel.com>
6526
6527 * Makefile (link-libc-static): Use $(static-gnulib) instead of
6528 $(gnulib).
6529
3fa21fd8
UD
65302004-03-30 Ulrich Drepper <drepper@redhat.com>
6531
6532 * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_deallocate_tsd.
6533 * init.c (pthread_functions): Add ptr__nptl_deallocate_tsd.
6534 * pthreadP.h: Declare __nptl_deallocate_tsd.
6535 * pthread_create.c (deallocate_tsd): Remove to __nptl_deallocate_tsd.
6536 Adjust caller.
6537
6538 * Makefile (tests): Add tst-tsd5.
6539 * tst-tsd5.c: New file.
6540
8e32efa6
UD
65412004-03-29 Ulrich Drepper <drepper@redhat.com>
6542
6543 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
6544 (__pthread_attr_setaffinity_old): Prepend GLIBC_ to version names
6545 is SHLIB_COMPAT check.
6546 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
6547 (__pthread_attr_getaffinity_old): Likewise.
6548 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
6549 (__pthread_getaffinity_old): Likewise.
6550 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
6551 (__pthread_setaffinity_old): Likewise.
6552
eec8b6ca
UD
65532004-03-26 Ulrich Drepper <drepper@redhat.com>
6554
6555 * allocatestack.c (_make_stacks_executable): Call
6556 _dl_make_stack_executable first.
6557
db2f05ba
RM
65582004-03-24 Roland McGrath <roland@redhat.com>
6559
6560 * sysdeps/i386/pthread_spin_lock.c (pthread_spin_lock): Use "m"
6561 constraint instead of "0".
6562
6abbc501
UD
65632004-03-24 Ulrich Drepper <drepper@redhat.com>
6564
68dc4dcb
UD
6565 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
6566 (lll_mutex_cond_trylock): Define as wrapper around __lll_cond_trylock.
6567
6abbc501
UD
6568 * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Reorganize
6569 code to avoid warning.
6570
865e14d9
AJ
65712004-03-24 Andreas Jaeger <aj@suse.de>
6572
6573 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
6574 (__pthread_attr_setaffinity_old): Remove const.
6575
16b06b70
UD
65762004-03-23 Ulrich Drepper <drepper@redhat.com>
6577
2c0b891a
UD
6578 * sysdeps/unix/sysv/linux/smp.h: New file.
6579 * sysdeps/unix/sysv/linux/sh/smp.h: New file.
6580 * init.c: Define __is_smp.
6581 (__pthread_initialize_minimal_internal): Call is_smp_system to
6582 initialize __is_smp.
6583 * pthreadP.h: Declare __is_smp.
6584 Define MAX_ADAPTIVE_COUNT is necessary.
6585 * pthread_mutex_init.c: Add comment regarding __spins field.
6586 * pthread_mutex_lock.c: Implement adaptive mutex type.
6587 * pthread_mutex_timedlock.c: Likewise.
6588 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
6589 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
6590 Add __spins field.
6591 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
6592 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6593 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6594 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6595 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6596 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
6597 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6598 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define
6599 lll_mutex_cond_trylock.
6600 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6601 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6602 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6603 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
6604 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
6605 Define BUSY_WAIT_NOP.
6606 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6607 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6608
6609 * tst-mutex5.c: Add support for testing adaptive mutexes.
6610 * tst-mutex7.c: Likewise.
6611 * tst-mutex5a.c: New file.
6612 * tst-mutex7a.c: New file.
6613 * Makefile (tests): Add tst-mutex5a and tst-mutex7a.
6614
565699e4
UD
6615 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
6616 (__lll_mutex_timedlock_wait): Preserve r8 and r9 since the
6abbc501 6617 vgettimeofday call might destroy the content.
565699e4 6618
7fe1586f
UD
6619 * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use hint
6620 @pause in the loop.
6621
e408880b
UD
6622 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
6623 No need to restrict type of ret. Make it int. Add comment.
6624
16b06b70
UD
6625 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
6626 Remove unnecessary setne instruction.
6627
61645263
UD
66282004-03-22 Jakub Jelinek <jakub@redhat.com>
6629
6630 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
6631 (__pthread_getaffinity_new): Use INT_MAX instead of UINT_MAX.
6632 * pthread_getattr_np.c (pthread_getattr_np): Double size every cycle.
6633 If realloc fails, break out of the loop.
6634
e3d4c585
AJ
66352004-03-20 Andreas Jaeger <aj@suse.de>
6636
6637 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
6638 (__pthread_setaffinity_old): Fix interface.
6639 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
6640 (__pthread_getaffinity_old): Likewise.
6641
6642 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
6643 (__pthread_setaffinity_new): Remove duplicate declaration.
6644
3abb1ff7
UD
66452004-03-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6646
6647 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Save
6648 the return value to a safe register.
6649 (CDISABLE): Set the function argument correctly.
6650
07bd2a3f
UD
66512004-03-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6652
6653 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XCHG): Define.
6654 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
6655 Rewrite so that only one locked memory operation per round is needed.
6656 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
6657 (pthread_barrier_wait): After wakeup, release lock only when the
6658 last thread stopped using the barrier object.
6659 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
6660 (__pthread_cond_wait): Don't store mutex address if the current
6661 value is ~0l. Add correct cleanup support and unwind info.
6662 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
6663 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
6664 (__pthread_cond_broadcast): Don't use requeue for pshared condvars.
6665 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Update comment.
6666 * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
6667 Add correct cleanup support and unwind info.
6668 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
6669 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Add unwind
6670 information for syscall wrappers.
6671
14c35863
UD
66722004-03-18 Ulrich Drepper <drepper@redhat.com>
6673
6674 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
6675 cpusetsize field, remove next.
6676 * sysdeps/pthread/pthread.h (pthread_getaffinity_np): Add new second
6677 parameter for size of the CPU set.
6678 (pthread_setaffinity_np): Likewise.
6679 (pthread_attr_getaffinity_np): Likewise.
6680 (pthread_attr_setaffinity_np): Likewise.
6681 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: Implement
6682 interface change, keep compatibility code.
6683 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
6684 * sysdeps/unix/sysv/linux/pthread_getaffinity.c: Likewise.
6685 * sysdeps/unix/sysv/linux/pthread_setaffinity.c: Likewise.
6686 * pthreadP.h: Remove hidden_proto for pthread_getaffinity_np. Declare
6687 __pthread_getaffinity_np.
6688 * Versions: Add version for changed interfaces.
6689 * tst-attr3.c: Adjust test for interface change.
6690 * pthread_getattr_np.c: Query the kernel about the affinity mask with
6691 increasing buffer sizes.
6692 * pthread_attr_destroy.c: Remove unused list handling.
6693 * pthread_attr_init.c: Likewise.
6694
8e115d80
RM
66952004-03-17 Roland McGrath <roland@redhat.com>
6696
6697 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Pass missing
6698 first argument to clock_getres so we ever enable kernel timers.
6699
e3b22ad3
UD
67002004-03-15 Ulrich Weigand <uweigand@de.ibm.com>
6701
6702 * init.c (nptl_version): Add __attribute_used__ to nptl_version.
6703
841153fa
RH
67042004-03-12 Richard Henderson <rth@redhat.com>
6705
e3b22ad3
UD
6706 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Propagate
6707 oldvalue from CENABLE to CDISABLE.
841153fa 6708
932dfea7
UD
67092004-03-12 Ulrich Drepper <drepper@redhat.com>
6710
6711 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define HOST_NAME_MAX.
6712 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
6713 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
6714 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
6715
9852f6dc
RH
67162004-03-11 Richard Henderson <rth@redhat.com>
6717
6718 * sysdeps/alpha/tcb-offsets.sym (PID_OFFSET): New.
6719 * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: Save/restore PID.
6720 * sysdeps/unix/sysv/linux/alpha/vfork.S: New file.
6721
43513fb7
UD
67222004-03-11 Jakub Jelinek <jakub@redhat.com>
6723
6724 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Use jgnl
6725 instead of jnl instruction to jump to SYSCALL_ERROR_LABEL.
6726 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S (__vfork): Likewise.
6727
67282004-03-11 Jakub Jelinek <jakub@redhat.com>
6729
6730 * forward.c (__pthread_cond_broadcast_2_0,
6731 __pthread_cond_destroy_2_0, __pthread_cond_init_2_0,
6732 __pthread_cond_signal_2_0, __pthread_cond_wait_2_0,
6733 __pthread_cond_timedwait_2_0): Use return 0 as defaction instead of 0.
6734
8a3e10e0
UD
67352004-03-11 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6736
6737 * sysdeps/sh/tcb-offsets.sym: Add PID.
6738 * sysdeps/unix/sysv/linux/sh/pt-vfork.S: Properly handle PID cache.
6739 * sysdeps/unix/sysv/linux/sh/vfork.S: New file.
6740
6d3a2bec
UD
67412004-03-10 Ulrich Drepper <drepper@redhat.com>
6742
6743 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: No need to
6744 include <sysdep-cancel.h>, vfork is no cancellation point.
6745 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: Likewise.
6746 * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: Likewise.
6747 * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: Likewise.
6748
d3a4a571
UD
67492004-03-10 Jakub Jelinek <jakub@redhat.com>
6750
73b4ce64
UD
6751 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Add
6752 libc_hidden_def.
6753 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
6754 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
6755 Likewise.
6756 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S (__vfork):
6757 Likewise.
6758 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
6759 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
6760 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Include tcb-offsets.h.
6761 * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Use DO_CALL instead
6762 of DO_CALL_VIA_BREAK. Work around a gas problem.
6763
d682a515
UD
6764 * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: Remove.
6765 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: New file.
6766 * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: New file.
6767 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: New file.
6768 * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: New file.
6769 * sysdeps/powerpc/tcb-offsets.sym: Add PID.
6770
6771 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S (__vfork): Don't use
6772 a local register for saving old PID. Negate PID in parent upon exit.
6773
d3a4a571
UD
6774 * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: Include
6775 tcb-offsets.h.
6776 (__vfork): Negate PID if non-zero and set to INT_MIN if zero
6777 before syscall, set to the old value in the parent afterwards.
6778 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: New file.
6779 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: Include
6780 tcb-offsets.h.
6781 (__vfork): Negate PID if non-zero and set to INT_MIN if zero
6782 before syscall, set to the old value in the parent afterwards.
6783 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: New file.
6784 * sysdeps/s390/tcb-offsets.sym: Add PID.
6785
6786 * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: Remove.
6787 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: New file.
6788 * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S: New file.
6789 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: New file.
6790 * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: New file.
6791 * sysdeps/sparc/tcb-offsets.sym: Add PID.
6792
67932004-03-10 Andreas Schwab <schwab@suse.de>
6794
6795 * sysdeps/ia64/tcb-offsets.sym: Add PID.
6796 * sysdeps/unix/sysv/linux/ia64/vfork.S: New file.
6797 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Properly handle PID cache.
6798
3f2fb223 67992004-03-09 Jakub Jelinek <jakub@redhat.com>
f4c024d1 6800
3f2fb223
UD
6801 * tst-cancel20.c (do_one_test): Clear in_sh_body first.
6802 * tst-cancel21.c (do_one_test): Likewise.
6803 Reported by Gordon Jin <gordon.jin@intel.com>.
f4c024d1 6804
8b9d6054
UD
68052004-02-09 Jakub Jelinek <jakub@redhat.com>
6806
6807 * sysdeps/unix/sysv/linux/i386/vfork.S (SAVE_PID): Negate PID
6808 if non-zero and set to INT_MIN if zero.
6809 * sysdeps/unix/sysv/linux/x86_64/vfork.S (SAVE_PID): Likewise.
6810 * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Include tcb-offsets.h.
6811 (SAVE_PID, RESTORE_PID): Define.
6812 (__vfork): Use it.
6813 * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: Include tcb-offsets.h.
6814 Use relative path to avoid including NPTL i386/vfork.S.
6815 (SAVE_PID, RESTORE_PID): Define.
6816 * sysdeps/unix/sysv/linux/raise.c: Include limits.h.
6817 (raise): Handle THREAD_SELF->pid INT_MIN the same as 0.
6818 * Makefile (tests): Add tst-vfork1, tst-vfork2, tst-vfork1x and
6819 tst-vfork2x.
6820 (tests-reverse): Add tst-vfork1x and tst-vfork2x.
6821 * tst-vfork1.c: New test.
6822 * tst-vfork2.c: New test.
6823 * tst-vfork1x.c: New test.
6824 * tst-vfork2x.c: New test.
6825
02287d05
UD
68262004-03-08 Ulrich Drepper <drepper@redhat.com>
6827
c072ef6d 6828 * sysdeps/i386/tcb-offsets.sym: Add PID.
6fadea9f 6829 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
c072ef6d 6830 * sysdeps/unix/sysv/linux/i386/vfork.S: New file.
6fadea9f 6831 * sysdeps/unix/sysv/linux/x86_64/vfork.S: New file.
02287d05 6832
d4acd24b
UD
68332004-03-08 Steven Munroe <sjmunroe@us.ibm.com>
6834
6835 * sysdeps/unix/sysv/linux/powerpc/Versions: Remove leading tabs.
6836
8acb4b81
UD
68372004-03-08 H.J. Lu <hongjiu.lu@intel.com>
6838
6839 * sysdeps/s390/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
6840 _rtld_global_ro.
6841
4d1a02ef
UD
68422004-03-07 Ulrich Drepper <drepper@redhat.com>
6843
001836c8 6844 * sysdeps/ia64/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
8acb4b81 6845 _rtld_global_ro.
001836c8 6846
4d1a02ef
UD
6847 * tst-once4.c: Remove unnecessary macro definition.
6848
6849 * tst-mutex7.c (do_test): Limit thread stack size.
6850 * tst-once2.c (do_test): Likewise.
6851 * tst-tls3.c (do_test): Likewise.
6852 * tst-tls1.c (do_test): Likewise.
6853 * tst-signal3.c (do_test): Likewise.
6854 * tst-kill6.c (do_test): Likewise.
6855 * tst-key4.c (do_test): Likewise.
6856 * tst-join4.c (do_test): Likewise.
6857 * tst-fork1.c (do_test): Likewise.
6858 * tst-context1.c (do_test): Likewise.
6859 * tst-cond2.c (do_test): Likewise.
6860 * tst-cond10.c (do_test): Likewise.
6861 * tst-clock2.c (do_test): Likewise.
6862 * tst-cancel10.c (do_test): Likewise.
6863 * tst-basic2.c (do_test): Likewise.
6864 * tst-barrier4.c (do_test): Likewise.
6865
aa420660
UD
68662004-03-05 Ulrich Drepper <drepper@redhat.com>
6867
6868 * sysdeps/i386/tls.h: Use GLRO instead of GL where appropriate.
6869
cff08c81
UD
68702004-03-01 Ulrich Drepper <drepper@redhat.com>
6871
6872 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6873 (__pthread_cond_timedwait): Optimize wakeup test.
6874 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
6875 (__pthread_cond_wait): Likewise.
6876 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
6877 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
6878 Likewise.
6879
b7fe377c
UD
68802004-02-29 Ulrich Drepper <drepper@redhat.com>
6881
6882 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
6883 (__lll_mutex_lock_wait): Optimize a bit more. Just one copy of
6884 the atomic instruction needed.
6885 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
6886 (__lll_mutex_lock_wait): Likewise.
6887
4c771a3b
UD
68882004-02-28 Ulrich Drepper <drepper@redhat.com>
6889
6890 * Makefile (tests): Add tst-cond14 and tst-cond15.
6891 * tst-cond14.c: New file.
6892 * tst-cond15.c: New file.
6893
a2c33d5a
UD
68942004-02-27 Ulrich Drepper <drepper@redhat.com>
6895
6896 * sysdeps/pthread/createthread.c (create_thread): Remove use of
6897 CLONE_STOPPED. We cannot use SIGCONT which means CLONE_STOPPED
6898 needs to be implemented differently to be useful.
6899
261eada2
UD
69002004-02-26 Ulrich Drepper <drepper@redhat.com>
6901
14ffbc83
UD
6902 * pthread_attr_setschedparam.c: Don't test priority against limits
6903 here. Set ATTR_FLAG_SCHED_SET flag.
6904 * pthread_attr_setschedpolicy.c: Set ATTR_FLAG_POLICY_SET flag.
6905 * pthread_create.c (__pthread_create_2_1): Copy scheduling attributes
6906 from parent thread to child. If attribute is used and scheduling
6907 parameters are not inherited, copy parameters from attribute or
6908 compute them. Check priority value.
6909 * pthread_getschedparam.c: If the parameters aren't known yet get
6910 them from the kernel.
6911 * pthread_setschedparam.c: Set ATTR_FLAG_SCHED_SET and
6912 ATTR_FLAG_POLICY_SET flag for thread.
6913 * sysdeps/unix/sysv/linux/internaltypes.h: Define ATTR_FLAG_SCHED_SET
6914 and ATTR_FLAG_POLICY_SET.
6915
6916 * sysdeps/pthread/createthread.c: Use tgkill if possible.
6917
261eada2
UD
6918 * pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr): Don't
6919 fail if stack address hasn't been set. Just return 0.
6920
701d185c
UD
69212004-02-25 Ulrich Drepper <drepper@redhat.com>
6922
25b8e63c
UD
6923 * Makefile (tests-nolibpthread): Add tst-unload. Don't link with
6924 libpthread for the files in this list.
6925 (CFLAGS-tst-unload): Removed.
6926 * tst-unload.c (do_test): Don't use complete path for
6927 LIBPHREAD_SO.
6928
701d185c
UD
6929 * Makefile: Define sonames for tst-tls5mod, tst-_res1mod1, and
6930 tst-_res1mod2.
6931
a8fd5a02
UD
69322004-02-22 Ulrich Drepper <drepper@redhat.com>
6933
6934 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
6935 (__lll_mutex_lock_wait): Rewrite so that only one locked memory
6936 operation per round is needed.
6937 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
6938 (__lll_mutex_lock_wait): Likewise.
6939
dd0b7b19
UD
69402004-02-20 Ulrich Drepper <drepper@redhat.com>
6941
6942 * tst-cancel9.c (cleanup): Don't print to stderr.
6943
5990e1fe
UD
69442004-02-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6945
6946 * sysdeps/sh/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Fix variable name.
6947
33ab3b66
UD
69482004-02-20 Jakub Jelinek <jakub@redhat.com>
6949
1be3130e
UD
6950 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
6951 (__syscall_error_handler2): Call CDISABLE.
6952 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
6953 (__syscall_error_handler2): Call CDISABLE.
6954
8ba5025a
UD
6955 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
6956 Release lock before the loop, don't reacquire it.
8ba5025a 6957
33ab3b66
UD
6958 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h (DL_ARGV_NOT_RELRO): Define.
6959
11986c68
UD
69602004-02-19 Andreas Schwab <schwab@suse.de>
6961
6962 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
6963 Fix last change.
6964
dc391246
UD
69652004-02-18 Ulrich Drepper <drepper@redhat.com>
6966
37c054c7
UD
6967 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
6968 (pthread_barrier_wait): After wakeup, release lock only when the
6969 last thread stopped using the barrier object.
6970 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S
6971 (pthread_barrier_wait): Likewise.
6972 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
6973 Likewise.
6974 * Makefile (tests): Add tst-barrier4.
6975 * tst-barrier4.c: New file.
dc391246
UD
6976
6977 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6978 (__pthread_cond_timedwait): Perform timeout test while holding
6979 internal lock to prevent wakeup race.
6980 Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
6981 * sysdeps/pthread/pthread_cond_timedwait.c
6982 (__pthread_cond_timedwait): Likewise.
6983 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
6984 (__pthread_cond_timedwait): Likewise.
6985
4a08113c
UD
69862004-02-18 Jakub Jelinek <jakub@redhat.com>
6987
6988 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S
6989 (__pthread_rwlock_unlock): Access WRITER as 32-bit value.
6990 * Makefile (tests): Add tst-rwlock13.
6991 * tst-rwlock13.c: New test.
6992
71b1675e
UD
69932004-02-16 Ulrich Drepper <drepper@redhat.com>
6994
6995 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6996 (__condvar_tw_cleanup): Little optimization.
6997 Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
6998
cd9fdc72
UD
69992004-02-16 Steven Munroe <sjmunroe@us.ibm.com>
7000
7001 * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: Replace libc with
7002 libpthread as "lib" parameter to SHLIB_COMPAT.
7003 (__novmx_siglongjmp): Fix typo in function name.
7004 (__novmx_longjmp): Fix typo in function name.
7005
82038750
UD
70062004-02-13 Ulrich Drepper <drepper@redhat.com>
7007
b078c591
UD
7008 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Add a
7009 __builtin_expect.
7010
82038750
UD
7011 * sysdeps/generic/pt-longjmp.c: Moved to...
7012 * sysdeps/pthread/pt-longjmp.c: ...here. New file.
7013
e2982bf0
UD
70142004-01-29 Steven Munroe <sjmunroe@us.ibm.com>
7015
7016 * Makefile (libpthread-routines): Add pt-cleanup.
7017 * pt-longjmp.c: Removed.
7018 * pt-cleanup.c: Copied __pthread_cleanup_upto to here. New file.
7019 * sysdeps/generic/pt-longjmp.c: Copied longjmp to here. New file.
7020 * sysdeps/unix/sysv/linux/powerpc/Versions: New file.
7021 Version longjmp, siglongjmp for GLIBC_2.3.4.
7022 * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: New File.
7023
3730d95c
UD
70242004-02-13 Ulrich Drepper <drepper@redhat.com>
7025
219304ec
UD
7026 * sysdeps/pthread/pthread_cond_timedwait.c
7027 (__pthread_cond_timedwait): Optimize. Drop internal lock earlier.
7028 Reuse code. Add __builtin_expects.
7029
3730d95c
UD
7030 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7031 (__pthread_cond_timedwait): Get internal lock in case timeout has
7032 passed before the futex syscall.
7033 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7034
5673ccc1
UD
70352004-01-20 Ulrich Drepper <drepper@redhat.com>
7036
debddf64
UD
7037 * allocatestack.c: Pretty printing.
7038
5673ccc1
UD
7039 * sysdeps/pthread/createthread.c (create_thread): Don't add
7040 CLONE_DETACHED bit if it is not necessary.
7041
6bae8725
UD
70422004-01-16 Ulrich Drepper <drepper@redhat.com>
7043
7044 * pthread_getattr_np.c: Include ldsodefs.h.
7045
ff151400
RH
70462004-01-16 Richard Henderson <rth@redhat.com>
7047
6bae8725
UD
7048 * allocatestack.c: Don't declare __libc_stack_end.
7049 * init.c (__pthread_initialize_minimal_internal): Likewise.
7050 * pthread_getattr_np.c (pthread_getattr_np): Likewise.
ff151400 7051
ba683832
RH
70522004-01-15 Richard Henderson <rth@redhat.com>
7053
7054 * sysdeps/alpha/tls.h (tcbhead_t): Add private.
7055 (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE,
7056 TLS_PRE_TCB_SIZE, TLS_TCB_ALIGN, INSTALL_DTV, INSTALL_NEW_DTV,
7057 GET_DTV, THREAD_DTV, THREAD_SELF, DB_THREAD_SELF): Match ia64.
7058 (TLS_TCB_OFFSET, THREAD_ID, NO_TLS_OFFSET): Remove.
7059 (THREAD_GETMEM, THREAD_GETMEM_NC): Simplify.
7060 (THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
7061 * sysdeps/unix/sysv/linux/alpha/createthread.c (TLS_VALUE): Match ia64.
7062
630d93a7
UD
70632004-01-14 Ulrich Drepper <drepper@redhat.com>
7064
219304ec 7065 * init.c (pthread_functions): Make array const.
630d93a7 7066
d1fc817e
UD
70672004-01-13 Ulrich Drepper <drepper@redhat.com>
7068
7069 * allocatestack.c (__make_stacks_executable): Change interface.
7070 Check parameters. Pass parameter on to libc counterpart.
7071 * pthreadP.h: Change declaration.
7072
dc927809
RH
70732004-01-13 Richard Henderson <rth@redhat.com>
7074
10677727
UD
7075 * pthread_attr_setstack.c (__old_pthread_attr_setstack): Use
7076 prototype form.
7077 * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize):
7078 Likewise.
7079
d1fc817e
UD
7080 * sysdeps/alpha/Makefile: New file.
7081 * sysdeps/alpha/tcb-offsets.sym: New file.
7082 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
7083 Use MULTIPLE_THREADS_OFFSET to implement !libpthread !libc version.
dc927809 7084
d1fc817e
UD
7085 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Rewrite based
7086 on powerpc version.
dc927809 7087
249a3d0c
UD
70882004-01-08 Jakub Jelinek <jakub@redhat.com>
7089
7090 * Makefile (tests): Add tst-backtrace1.
7091 * tst-backtrace1.c: New test.
7092
763c0490
RM
70932003-12-11 Ulrich Weigand <uweigand@de.ibm.com>
7094
7095 * sysdeps/alpha/tls.h (DB_THREAD_SELF): Pass bit size of thread
7096 register as second parameter to the REGISTER macro.
7097 * sysdeps/ia64/tls.h (DB_THREAD_SELF): Likewise.
7098 * sysdeps/powerpc/tls.h (DB_THREAD_SELF): Likewise.
7099 * sysdeps/sh/tls.h (DB_THREAD_SELF): Likewise.
7100 * sysdeps/sparc/tls.h (DB_THREAD_SELF): Likewise.
7101 * sysdeps/s390/tls.h (DB_THREAD_SELF): Pass __WORDSIZE as bit size
7102 of thread register as second parameter to REGISTER macro in 64 case.
7103
c7baafd5
UD
71042004-01-03 Ulrich Drepper <drepper@redhat.com>
7105
7106 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Removed.
7107 (CFLAGS-getpid.o): Defined.
7108 (CFLAGS-getpid.os): Defined.
7109
25ac0258
UD
71102003-12-31 Ulrich Drepper <drepper@redhat.com>
7111
7112 * pthread_getattr_np.c (pthread_getattr_np): Make sure stack info
7113 returned for main thread does not overlap with any other VMA.
7114 Patch by Jakub Jelinek.
7115
795985e4
UD
71162003-12-29 Jakub Jelinek <jakub@redhat.com>
7117
7118 * tst-raise1.c: Include stdio.h.
7119
cb5b9388
UD
71202003-12-23 Jakub Jelinek <jakub@redhat.com>
7121
7122 * sysdeps/unix/sysv/linux/raise.c (raise): Protect pid = selftid
7123 setting with __ASSUME_TGKILL || defined __NR_tgkill.
7124 If pid is 0, set it to selftid.
7125 * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Make inline.
7126 Don't set self->pid but self->tid. If self->pid == 0 and self->tid
7127 != 0, return self->tid without doing a syscall.
7128 * descr.h (struct pthread): Move pid field after tid.
7129
7130 * Makefile (tests): Add tst-raise1.
7131 * tst-raise1.c: New file.
7132
432aaf5b
RM
71332003-12-23 Roland McGrath <roland@redhat.com>
7134
7135 * tst-oddstacklimit.c: New file.
7136 * Makefile (tests): Add it.
7137 (tst-oddstacklimit-ENV): New variable.
7138
7139 * init.c (__pthread_initialize_minimal_internal): Round stack rlimit
7140 value up to page size for __default_stacksize.
7141
33ebea17
UD
71422003-12-21 Ulrich Drepper <drepper@redhat.com>
7143
7144 * Makefile (tests): Add tst-eintr5.
7145 * tst-eintr5.c: New file.
7146
7147 * eintr.c (eintr_source): Prevent sending signal to self.
7148
7149 * tst-eintr2.c (tf1): Improve error message.
7150
bbe35eb5
UD
71512003-12-20 Ulrich Drepper <drepper@redhat.com>
7152
7153 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Define.
7154 * sysdeps/unix/sysv/linux/getpid.c: New file.
c0ecb80a
UD
7155 * pthread_cancel.c: Add comment explaining use of PID field.
7156 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
7157 * pthread_getattr_np.c: Use abs() when comparing PID and TID fields.
7158 * sysdeps/unix/sysv/linux/fork.c: Negate PID field of parent
7159 temporarily to signal the field must not be relied on and updated
7160 by getpid().
7161 * sysdeps/unix/sysv/linux/pt-raise.c: Handle case where PID is
7162 temporarily negative.
7163 * sysdeps/unix/sysv/linux/raise.c: Likewise.
bbe35eb5 7164
4efdd8d3
UD
71652003-12-19 Ulrich Drepper <drepper@redhat.com>
7166
7167 * eintr.c (setup_eintr): Add new parameter. Pass to thread function.
7168 (eintr_source): If ARG != NULL, use pthread_kill.
7169 * tst-eintr1.c: Adjust for this change.
7170 * tst-eintr2.c: Likewise.
7171 * Makefile (tests): Add tst-eintr3 and tst-eintr4.
7172 * tst-eintr3.c: New file.
7173 * tst-eintr4.c: New file.
7174
71752003-12-19 Jakub Jelinek <jakub@redhat.com>
7176
7177 * libc-cancellation.c (__libc_enable_asynccancel): Don't cancel
7178 if CANCELSTATE_BITMASK is set.
7179 * sysdeps/pthread/librt-cancellation.c (__librt_enable_asynccancel):
7180 Likewise.
7181
7182 * Makefile (tests): Add tst-cancel22 and tst-cancel23.
7183 (tests-reverse): Add tst-cancel23.
7184 * tst-cancel22.c: New test.
7185 * tst-cancel23.c: New test.
7186
675620f7
UD
71872003-12-18 Ulrich Drepper <drepper@redhat.com>
7188
7189 * tst-eintr1.c: Better error messages.
7190
7191 * Makefile (tests): Add tst-eintr2.
7192 * tst-eintr2.c: New file.
7193
71942003-12-18 Jakub Jelinek <jakub@redhat.com>
7195
7196 * Makefile (tests): Add tst-cancel21 and tst-cancelx21.
7197 (CFLAGS-tst-cancelx21.c): Set.
7198 * tst-cancel21.c: New test.
7199 * tst-cancelx21.c: New test.
7200
7201 * unwind.c (FRAME_LEFT): Add adj argument. Subtract it from each
7202 comparison operand.
7203 (unwind_stop): Use _JMPBUF_CFA_UNWINDS_ADJ macro instead of
7204 _JMPBUF_CFA_UNWINDS. Adjust FRAME_LEFT invocations.
7205 * pt-longjmp.c: Include jmpbuf-unwind.h.
7206 (__pthread_cleanup_upto): Use _JMPBUF_UNWINDS_ADJ macro instead of
7207 _JMPBUF_UNWINDS. Adjust compared pointers.
7208 * init.c (__pthread_initialize_minimal_internal): Initialize
7209 pd->stackblock_size.
7210 * sysdeps/pthread/jmpbuf-unwind.h: Removed.
7211 * sysdeps/alpha/jmpbuf-unwind.h: New file.
7212 * sysdeps/i386/jmpbuf-unwind.h: New file.
7213 * sysdeps/powerpc/jmpbuf-unwind.h: New file.
7214 * sysdeps/s390/jmpbuf-unwind.h: New file.
7215 * sysdeps/sh/jmpbuf-unwind.h: New file.
7216 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: New file.
7217 * sysdeps/x86_64/jmpbuf-unwind.h: New file.
2e5e031d 7218 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Include stdint.h.
675620f7
UD
7219 (_JMPBUF_CFA_UNWINDS): Remove.
7220 (_JMPBUF_CFA_UNWINDS_ADJ, _JMPBUF_UNWINDS_ADJ): Define.
7221
72222003-12-12 Jakub Jelinek <jakub@redhat.com>
7223
7224 * Makefile (tests): Add tst-cancel20 and tst-cancelx20.
7225 (CFLAGS-tst-cancelx20.c): Set.
7226 * tst-cancel20.c: New test.
7227 * tst-cancelx20.c: New test.
7228
2d951ab6
UD
72292003-12-17 Ulrich Drepper <drepper@redhat.com>
7230
7231 * init.c (__pthread_initialize_minimal_internal): Don't treat
7232 architectures with separate register stack special here when
7233 computing default stack size.
7234
f8a3a2e7
RM
72352003-12-17 Roland McGrath <roland@redhat.com>
7236
7237 * Makefile (tst-cancelx7-ARGS): New variable.
7238 Reportd by Greg Schafer <gschafer@zip.com.au>.
7239
e796f92f
UD
72402003-12-17 Jakub Jelinek <jakub@redhat.com>
7241
7242 * Makefile (tests): Add tst-stack3. Depend on $(objpfx)tst-stack3-mem.
7243 (generated): Add tst-stack3.mtrace and tst-stack3-mem.
7244 (tst-stack3-ENV): Set.
7245 ($(objpfx)tst-stack3-mem): New.
7246 * tst-stack3.c: New test.
7247
092eb73c
UD
72482003-12-10 David Mosberger <davidm@hpl.hp.com>
7249
7250 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init_EPILOG_BEGINS):
7251 Add unwind directives. Drop unused .regstk directive.
7252 (_fini_EPILOG_BEGINS): Add unwind directives.
7253
ff48874d
UD
72542003-12-11 Ulrich Drepper <drepper@redhat.com>
7255
7256 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
7257 Assume parameter is a pointer.
7258 (lll_futex_wake): Likewise.
20945457
UD
7259 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_wait):
7260 Likewise.
7261 (lll_futex_wake): Likewise.
ff48874d
UD
7262 Reported by Boris Hu.
7263 * sysdeps/unix/sysv/linux/unregister-atfork.c
7264 (__unregister_atfork): Pass pointer to refcntr to lll_futex_wait.
7265
7266 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Simplify a bit.
7267
1d9d0b80
UD
72682003-12-10 Ulrich Drepper <drepper@redhat.com>
7269
7270 * sysdeps/pthread/bits/libc-lock.h (__rtld_lock_initialize): Define.
7271 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Call
7272 __rtld_lock_initialize for ld.so lock.
7273 Patch in part by Adam Li <adam.li@intel.com>.
7274
c776b3d7
UD
72752003-12-02 David Mosberger <davidm@hpl.hp.com>
7276
7277 * Makefile (link-libc-static): Remove -lgcc_eh---it's already mentioned
7278 in $(gnulib). Also, remove stale comment.
7279
72802003-11-12 David Mosberger <davidm@hpl.hp.com>
7281
7282 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Take
7283 advantage of new syscall stub and optimize accordingly.
7284
7285 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__NR_futex): Rename
7286 from SYS_futex, to match expectations of
7287 sysdep.h:DO_INLINE_SYSCALL.
7288 (lll_futex_clobbers): Remove.
7289 (lll_futex_timed_wait): Rewrite in terms of DO_INLINE_SYSCALL.
7290 (lll_futex_wake): Likewise.
7291 (lll_futex_requeue): Likewise.
7292 (__lll_mutex_trylock): Rewrite to a macro, so we can include this
7293 file before DO_INLINE_SYSCALL is defined (proposed by Jakub
7294 Jelinek).
7295 (__lll_mutex_lock): Likewise.
7296 (__lll_mutex_cond_lock): Likewise.
7297 (__lll_mutex_timed_lock): Likewise.
7298 (__lll_mutex_unlock): Likewise.
7299 (__lll_mutex_unlock_force): Likewise.
7300
7301 * sysdeps/ia64/tls.h: Move declaration of __thread_self up so it
7302 comes before the include of <sysdep.h>.
7303 (THREAD_SELF_SYSINFO): New macro.
7304 (THREAD_SYSINFO): Likewise.
7305 (INIT_SYSINFO): New macro.
7306 (TLS_INIT_TP): Call INIT_SYSINFO.
7307
7308 * sysdeps/ia64/tcb-offsets.sym: Add SYSINFO_OFFSET.
7309
7310 * sysdeps/pthread/createthread.c (create_thread): Use
7311 THREAD_SELF_SYSINFO and THREAD_SYSINFO instead of open code.
7312 * allocatestack.c (allocate_stack): Use THREAD_SYSINFO and
7313 THREAD_SELF_SYSINFO instead of open code.
7314 * sysdeps/i386/tls.h (THREAD_SELF_SYSINFO): New macro.
7315 (THREAD_SYSINFO): Likewise.
7316
7317 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: New file.
7318
7319 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Work around gas problem.
7320
57d20ee7
UD
73212003-12-06 Ulrich Drepper <drepper@redhat.com>
7322
7323 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Use .init_array
7324 instead of .init. Patch by David Mosberger.
7325
67aeab2a
AJ
73262003-11-30 Thorsten Kukuk <kukuk@suse.de>
7327
7328 * sysdeps/pthread/configure.in: Remove broken declaration in C
7329 cleanup handling check.
7330
8ca203e6
AJ
73312003-11-30 Andreas Jaeger <aj@suse.de>
7332
7333 * Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time).
7334 * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
7335 Likewise.
7336
46bf9de7
UD
73372003-11-27 Jakub Jelinek <jakub@redhat.com>
7338
7339 * sysdeps/unix/sysv/linux/internaltypes.h (ATTR_FLAG_OLDATTR): Define.
7340 * pthread_attr_destroy.c: Include shlib-compat.h.
7341 (__pthread_attr_destroy): Return immediately if ATTR_FLAG_OLDATTR
7342 is set in iattr->flags.
7343 * pthread_attr_init.c (__pthread_attr_init_2_0): Set ATTR_FLAG_OLDATTR.
7344
1d9b73ab
UD
73452003-11-21 Jakub Jelinek <jakub@redhat.com>
7346
7347 * Makefile (distribute): Add tst-cleanup4aux.c.
7348
7349 * tst-cond12.c (prepare): Add prototype. Move after test-skeleton.c
7350 include.
7351
53f9084e
UD
73522003-11-21 Ulrich Drepper <drepper@redhat.com>
7353
1d9b73ab
UD
7354 * tst-cond12.c (do_test): If USE_COND_SIGNAL is defined, use
7355 pthread_cond_signal.
7356
e42a990e
UD
7357 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Don't
7358 store mutex address if the current value is ~0l.
7359 * sysdeps/pthread/pthread_cond_timedwait.c
7360 (__pthread_cond_timedwait): Likewise.
7361 * sysdeps/pthread/pthread_cond_broadcast.c
7362 (__pthread_cond_broadcast): Don't use requeue for pshared
7363 condvars.
7364
7365 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
7366 (__pthread_cond_wait): Don't store mutex address if the current
7367 value is ~0l.
7368 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
7369 (__pthread_cond_timedwait): Likewise.
7370 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
7371 (__pthread_cond_broadcast): Don't use requeue for pshared
7372 condvars.
7373
7374 * pthread_cond_init.c (__pthread_cond_init): Initialize __mutex
7375 element with ~0l for pshared condvars, with NULL otherwise.
7376
7377 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
7378 (__pthread_cond_wait): Don't store mutex address if the current
7379 value is ~0l.
7380 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7381 (__pthread_cond_timedwait): Likewise.
7382 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
7383 (__pthread_cond_broadcast): Don't use requeue for pshared
7384 condvars.
7385
bf68b236 7386 * Makefile: Add rules to build and run tst-cond12 and tst-cond13.
53f9084e 7387 * tst-cond12.c: New file.
bf68b236 7388 * tst-cond13.c: New file.
53f9084e 7389
9780c971
UD
73902003-11-17 Ulrich Drepper <drepper@redhat.com>
7391
7392 * sysdeps/pthread/configure.in: Make missing forced unwind support
7393 fatal.
7394
74e12fbc
UD
73952003-11-11 Ulrich Drepper <drepper@redhat.com>
7396
7397 * pthreadP.h: Don't declare __pthread_unwind as weak inside libpthread.
7398
c685b2b0
UD
73992003-11-06 Ulrich Drepper <drepper@redhat.com>
7400
7401 * Makefile: Add magic to clean up correctly.
7402
44e94149
UD
74032003-11-05 Jakub Jelinek <jakub@redhat.com>
7404
7405 * unwind.c (FRAME_LEFT): Define.
7406 (unwind_stop): Handle old style cleanups here.
7407 (__pthread_unwind): Handle old style cleanups only if
7408 !HAVE_FORCED_UNWIND.
7409 * Makefile (tests): Add tst-cleanup4 and tst-cleanupx4.
7410 (CFLAGS-tst-cleanupx4.c): Add -fexceptions.
7411 ($(objpfx)tst-cleanup4): Depend on $(objpfx)tst-cleanup4aux.o.
7412 ($(objpfx)tst-cleanupx4): Likewise.
7413 * tst-cleanup4.c: New test.
7414 * tst-cleanup4aux.c: New.
7415 * tst-cleanupx4.c: New test.
7416
c28422b5
UD
74172003-11-04 Ulrich Drepper <drepper@redhat.com>
7418
7419 * sysdeps/pthread/bits/stdio-lock.h: Use lll_*lock instead of
7420 lll_mutex_*lock macros to skip atomic operations on some archs.
7421
27176677
UD
74222003-11-03 Ulrich Drepper <drepper@redhat.com>
7423
7424 * sysdeps/pthread/tst-timer.c (main): Initialize
7425 sigev2.sigev_value as well.
7426
026395a2
RM
74272003-10-15 Roland McGrath <roland@redhat.com>
7428
7429 * sysdeps/pthread/configure.in: Barf if visibility attribute support
7430 is missing.
7431 * sysdeps/pthread/configure: Regenerated.
7432
fa3cbe3d
UD
74332003-10-09 Kaz Kojima <kkojima@rr.iij4u.or.jp>
7434
7435 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Completely revamp the
7436 locking macros. No distinction between normal and mutex locking
7437 anymore.
7438 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Rewrite mutex locking.
7439 Merge bits from lowlevelmutex.S we still need.
7440 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Remove.
7441 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
7442 * sysdeps/unix/sysv/linux/sh/not-cancel.h: New file.
7443 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Adjust for
7444 new mutex implementation.
7445 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Likewise.
7446 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
7447 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7448 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
7449 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
7450 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
7451 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
7452 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
7453 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7454 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO): Also defined
7455 symbol for entry point to avoid cancellation.
7456
e700a908
UD
74572003-10-07 Jakub Jelinek <jakub@redhat.com>
7458
7459 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Backout 2003-10-02
7460 changes.
7461 (SAVE_OLDTYPE_0): Fix a typo.
7462
c70a86b6
UD
74632003-10-03 Ulrich Drepper <drepper@redhat.com>
7464
7465 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
7466 Check __sigsetjmp return value. Reported by Daniel Jacobowitz.
7467
134abcb5
UD
74682003-10-02 Ulrich Drepper <drepper@redhat.com>
7469
7470 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (DOCARGS_1): Use
7471 correct offset.
7472
b77ca0e8
UD
74732003-10-02 Jakub Jelinek <jakub@redhat.com>
7474
7475 * Makefile (tests): Add tst-cancel19.
7476 * tst-cancel19.c: New test.
7477
4d961dc7
UD
74782003-10-02 Ulrich Drepper <drepper@redhat.com>
7479
7480 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix saving and
7481 restoring of the old cancellation type.
7482
1d5b20ad 74832003-09-30 Jakub Jelinek <jakub@redhat.com>
94ae6d75 7484
1d5b20ad
UD
7485 * sysdeps/pthread/malloc-machine.h: Remove misleading comment.
7486
4106a403
RM
74872003-09-27 Wolfram Gloger <wg@malloc.de>
7488
4d961dc7 7489 * sysdeps/pthread/malloc-machine.h: New file
94ae6d75 7490
fca9d8e4
RM
74912003-09-24 Roland McGrath <roland@redhat.com>
7492
7493 * allocatestack.c (__make_stacks_executable): Don't ignore return
7494 value from _dl_make_stack_executable.
7495
c9c60884
UD
74962003-09-24 Ulrich Drepper <drepper@redhat.com>
7497
69c9fa04
UD
7498 * allocatestack.c (__make_stacks_executable): Also change
7499 permission of the currently unused stacks.
7500
279f1143
UD
7501 * allocatestack.c (change_stack_perm): Split out from
7502 __make_stacks_executable.
7503 (allocate_stack): If the required permission changed between the time
7504 we started preparing the stack and queueing it, change the permission.
7505 (__make_stacks_executable): Call change_stack_perm.
7506
c9c60884
UD
7507 * Makefile: Build tst-execstack-mod locally.
7508 * tst-execstack-mod.c: New file.
7509
54ee14b3
UD
75102003-09-23 Jakub Jelinek <jakub@redhat.com>
7511
7512 * Makefile (tests): Only add tst-execstack if have-z-execstack is yes.
7513
75142003-09-23 Roland McGrath <roland@redhat.com>
7515
7516 * tst-execstack.c: New file.
7517 * Makefile (tests): Add it.
7518 ($(objpfx)tst-execstack, $(objpfx)tst-execstack.out): New targets.
7519 (LDFLAGS-tst-execstack): New variable.
7520
7521 * allocatestack.c (allocate_stack): Use GL(dl_stack_flags) to decide
7522 whether to use PROT_EXEC for stack mmap.
7523 (__make_stacks_executable): New function.
7524 * pthreadP.h: Declare it.
7525 * init.c (__pthread_initialize_minimal_internal): Set
7526 GL(dl_make_stack_executable_hook) to that.
7527
365b1602
UD
75282003-09-22 Ulrich Drepper <drepper@redhat.com>
7529
7530 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Adjust for latest
7531 recommendation from AMD re avoidance of lock prefix.
7532
39358e8b
UD
75332003-09-22 Jakub Jelinek <jakub@redhat.com>
7534
7535 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait): Use
7536 lll_futex_timed_wait instead of lll_futex_wait.
7537 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Removed.
7538 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Removed.
7539 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: Removed.
7540 * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: Removed.
7541 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Removed.
7542 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Removed.
7543 * sysdeps/unix/sysv/linux/s390/sem_post.c: Removed.
7544 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Removed.
7545 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Include atomic.h.
7546 Completely revamp the locking macros. No distinction between
7547 normal and mutex locking anymore.
7548 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
7549 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock_wait,
7550 __lll_lock_timedwait): Fix prototypes.
7551 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_lock_wait,
7552 __lll_lock_timedwait): Likewise.
7553 (lll_mutex_lock, lll_mutex_cond_lock): Use _val instead of _bool
7554 macros, add __builtin_expect.
7555 (lll_mutex_timedlock): Likewise. Fix return value.
7556 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Removed.
7557 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: Removed.
7558 * sysdeps/unix/sysv/linux/i386/i586/lowlevelmutex.S: Removed.
7559 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: Removed.
7560 * sysdeps/unix/sysv/linux/i386/i686/lowlevelmutex.S: Removed.
7561 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: Removed.
7562 * sysdeps/unix/sysv/linux/lowlevelmutex.c: Removed.
7563 * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: Removed.
7564
9d08fbbb
UD
75652003-09-22 Ulrich Drepper <drepper@redhat.com>
7566
c0df57e1
UD
7567 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
7568 (__lll_mutex_lock_wait): Minor optimization to avoid one atomic
7569 operation if possible.
7570
9d08fbbb
UD
7571 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Don't play tricks
7572 like jumping over the lock prefix.
7573
71451de2
UD
75742003-09-21 Ulrich Drepper <drepper@redhat.com>
7575
7576 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Completely revamp the
7577 locking macros. No distinction between normal and mutex locking
7578 anymore.
3a226d33 7579 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
bc1989aa
UD
7580 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
7581 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
71451de2
UD
7582 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Rewrite mutex
7583 locking. Merge bits from lowlevelmutex.S we still need.
3a226d33 7584 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
bc1989aa 7585 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
71451de2 7586 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Removed.
3a226d33 7587 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Removed.
71451de2
UD
7588 * Makefile (routines): Remove libc-lowlevelmutex.
7589 (libpthread-rountines): Remove lowlevelmutex.
3a226d33
UD
7590 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Adjust
7591 for new mutex implementation.
7592 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
7593 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7594 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7595 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
7596 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
7597 Likewise.
7598 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
7599 Likewise.
7600 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
7601 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
7602 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise
7603 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
7604 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7605 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7606 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
7607 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
7608 Likewise.
7609 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
7610 Likewise.
7611 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
7612 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
7613 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
7614 Don't use requeue.
7615 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
bc1989aa 7616 * sysdeps/pthread/pthread_cond_signal.c: Don't use requeue.
71451de2 7617
8f31c0ef
UD
76182003-09-20 Ulrich Drepper <drepper@redhat.com>
7619
56a4aa98
UD
7620 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't match memory
7621 in parameters of asm with output parameters.
7622
8f31c0ef
UD
7623 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Change
7624 type of DECR parameter to int.
7625 * pthreadP.h: Adjust prototype of __pthread_mutex_unlock_usercnt.
7626
8b8074da
UD
76272003-09-18 Jakub Jelinek <jakub@redhat.com>
7628
7629 * tst-attr3.c (tf, do_test): Print stack start/end/size and
7630 guardsize for each thread.
7631
65af7e61
UD
76322003-09-17 Jakub Jelinek <jakub@redhat.com>
7633
9ba96eda
UD
7634 * sysdeps/pthread/pthread.h (pthread_getattr_np): Clarify usage.
7635 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
7636 (pthread_attr_setaffinity_np): Handle cpuset == NULL.
7637
06f6ca90
UD
7638 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
7639 (pthread_attr_getaffinity_np): Don't segfault if iattr->cpuset is
7640 NULL.
7641 * pthread_getattr_np.c: Set cpuset using pthread_getaffinity_np.
7642 * pthreadP.h (pthread_getaffinity_np): Add hidden_proto.
7643 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
7644 (pthread_getaffinity_np): Add hidden_def.
7645
7646 * Makefile (tests): Add tst-attr3.
7647 * tst-attr3.c: New test.
7648
65af7e61
UD
7649 * sysdeps/i386/Makefile (CFLAGS-tst-align.c): Remove.
7650
3402852c
UD
76512003-09-15 Jakub Jelinek <jakub@redhat.com>
7652
7653 * sysdeps/i386/Makefile (CFLAGS-pthread_create.c,
7654 CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
7655
a4db3439
UD
76562003-09-17 Jakub Jelinek <jakub@redhat.com>
7657
7658 * Makefile (CFLAGS-tst-align.c): Add $(stack-align-test-flags).
7659 * tst-align.c: Include tst-stack-align.h.
7660 (tf, do_test): Use TEST_STACK_ALIGN macro.
7661
76622003-09-17 Ulrich Drepper <drepper@redhat.com>
7663
7664 * pthread_attr_init.c (__pthread_attr_init_2_0): Remove unused
7665 variable.
7666
92ce4676
UD
76672003-09-16 Ulrich Drepper <drepper@redhat.com>
7668
7669 * pthread_getattr_np.c (pthread_getattr_np): Correctly fill in the
7670 stack-related values for the initial thread.
7671
e07bb02a
UD
76722003-09-15 Jakub Jelinek <jakub@redhat.com>
7673
7674 * Makefile (CFLAGS-pthread_once.c): Add $(uses-callbacks).
7675
d087b5dc
UD
76762003-09-11 Ulrich Drepper <drepper@redhat.com>
7677
7678 * pthread_mutex_lock.c: Minor code rearrangements.
7679
7f08f55a
RM
76802003-09-05 Roland McGrath <roland@redhat.com>
7681
7682 * pthread_create.c (__pthread_pthread_sizeof_descr): Removed.
7683 Instead, include ../nptl_db/db_info.c to do its magic.
7684 * pthread_key_create.c (__pthread_pthread_keys_max): Removed.
7685 (__pthread_pthread_key_2ndlevel_size): Likewise.
7686 * sysdeps/alpha/tls.h (DB_THREAD_SELF): New macro.
7687 * sysdeps/i386/tls.h (DB_THREAD_SELF): New macro.
7688 * sysdeps/ia64/tls.h (DB_THREAD_SELF): New macro.
7689 * sysdeps/powerpc/tls.h (DB_THREAD_SELF): New macro.
7690 * sysdeps/s390/tls.h (DB_THREAD_SELF): New macro.
7691 * sysdeps/sh/tls.h (DB_THREAD_SELF): New macro.
7692 * sysdeps/sparc/tls.h (DB_THREAD_SELF): New macro.
7693 * sysdeps/x86_64/tls.h (DB_THREAD_SELF): New macro.
7694 * sysdeps/alpha/td_ta_map_lwp2thr.c: File removed.
7695 * sysdeps/generic/td_ta_map_lwp2thr.c: File removed.
7696 * sysdeps/i386/td_ta_map_lwp2thr.c: File removed.
7697 * sysdeps/ia64/td_ta_map_lwp2thr.c: File removed.
7698 * sysdeps/powerpc/td_ta_map_lwp2thr.c: File removed.
7699 * sysdeps/s390/td_ta_map_lwp2thr.c: File removed.
7700 * sysdeps/sh/td_ta_map_lwp2thr.c: File removed.
7701 * sysdeps/sparc/td_ta_map_lwp2thr.c: File removed.
7702 * sysdeps/x86_64/td_ta_map_lwp2thr.c: File removed.
7703
806e4a4a
UD
77042003-09-08 Ulrich Drepper <drepper@redhat.com>
7705
7706 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Change type
7707 of pthread_t to be compatible with LT.
7708 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
7709 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
7710 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7711 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7712 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
7713 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7714 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
7715
17f83e56
UD
77162003-09-04 Ulrich Drepper <drepper@redhat.com>
7717
7718 * sysdeps/unix/sysv/linux/i386/not-cancel.h (fcntl_not_cancel): Define.
7719
58e8ec84
UD
77202003-09-04 Jakub Jelinek <jakub@redhat.com>
7721
7722 * unwind-forcedunwind.c: Move to...
7723 * sysdeps/pthread/unwind-forcedunwind.c: ...here.
7724 (pthread_cancel_init): Use ARCH_CANCEL_INIT if defined.
7725 * sysdeps/pthread/jmpbuf-unwind.h: New file.
7726 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: New file.
7727 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: New file.
7728 * unwind.c: Include jmpbuf-unwind.h.
7729 (unwind_stop): Use _JMPBUF_CFA_UNWINDS macro.
7730
abf1cf21
JJ
77312003-09-02 Jakub Jelinek <jakub@redhat.com>
7732
4a244f0d
UD
7733 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: New file.
7734 * sysdeps/unix/sysv/linux/ia64/Versions (libpthread): Export
7735 pthread_attr_setstack and pthread_attr_setstacksize @@GLIBC_2.3.3.
7736 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: New file.
7737 * sysdeps/unix/sysv/linux/alpha/Versions: New file.
7738 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: New file.
7739 * sysdeps/unix/sysv/linux/sparc/Versions: New file.
7740 * pthread_attr_setstack.c (__old_pthread_attr_setstack): New function.
7741 (pthread_attr_setstack): If PTHREAD_STACK_MIN != 16384, export
7742 as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.2.
7743 * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize): New
7744 function.
7745 (pthread_attr_setstacksize): If PTHREAD_STACK_MIN != 16384, export
7746 as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.1.
7747 * Makefile (tests): Add tst-stack2.
7748 * tst-stack2.c: New test.
7749 * tst-stack1.c: Include limits.h and sys/param.h.
7750 (do_test): Set size to MAX (4 * getpagesize (), PTHREAD_STACK_MIN).
7751
e29ef647
UD
7752 * pthread_condattr_setpshared.c: Include errno.h.
7753 (pthread_condattr_setpshared): Return EINVAL if pshared
7754 is neither PTHREAD_PROCESS_PRIVATE nor PTHREAD_PROCESS_SHARED.
7755
5777d565
UD
7756 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Also
7757 defined symbol for entry point to avoid cancellation.
7758 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
7759 Likewise.
7760 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
7761 Likewise.
7762 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
7763 Likewise.
7764 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h (PSEUDO):
7765 Likewise.
7766 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
7767 Likewise.
7768 * sysdeps/unix/sysv/linux/i386/not-cancel.h (__open_nocancel,
7769 __close_nocancel, __read_nocancel, __write_nocancel,
7770 __waitpid_nocancel): Add attribute_hidden. If not in libc.so,
7771 libpthread.so or librt.so, define to corresponding function
7772 without _nocancel suffix.
7773 * sysdeps/unix/sysv/linux/s390/not-cancel.h: New file.
7774 * sysdeps/unix/sysv/linux/powerpc/not-cancel.h: New file.
7775 * sysdeps/unix/sysv/linux/sparc/not-cancel.h: New file.
7776
abf1cf21
JJ
7777 * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: Fix a typo.
7778
8348dcc8
UD
77792003-09-02 Ulrich Drepper <drepper@redhat.com>
7780
7781 * sysdeps/unix/sysv/linux/i386/not-cancel.h: New file.
1e03e0af 7782 * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: New file.
8348dcc8
UD
7783
7784 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Make sure the code
7785 in subsections has a symbol associated with it.
7786
7787 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Also
7788 defined symbol for entry point to avoid cancellation.
7789 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Likewise.
7790
c874a32e
UD
77912003-09-01 Jakub Jelinek <jakub@redhat.com>
7792
7793 * Makefile (tests): Add tst-tls5.
7794 (module-names): Add tst-tls5mod{,a,b,c,d,e,f}.
7795 ($(objpfx)tst-tls5mod{,a,b,c,d,e,f}.so-no-z-defs): Set to yes.
7796 ($(objpfx)tst-tls5): New.
7797 ($(objpfx)tst-tls6.out): Likewise.
7798 (tests): Depend on $(objpfx)tst-tls6.out.
7799 * tst-tls3.c: Include stdint.h and pthreaddef.h.
7800 (do_test): Check pthread_self () return value alignment.
7801 * tst-tls3mod.c: Include stdint.h and pthreaddef.h.
7802 (tf): Check pthread_self () return value alignment.
7803 * tst-tls5.c: New test.
7804 * tst-tls5.h: New.
7805 * tst-tls5mod.c: New.
7806 * tst-tls5moda.c: New.
7807 * tst-tls5modb.c: New.
7808 * tst-tls5modc.c: New.
7809 * tst-tls5modd.c: New.
7810 * tst-tls5mode.c: New.
7811 * tst-tls5modf.c: New.
7812 * tst-tls6.sh: New test.
7813
c503d3dc
UD
7814 * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Add
7815 ptr___pthread_cond_timedwait and ptr___pthread_cond_timedwait_2_0.
7816 * init.c (pthread_functions): Initialize them.
7817 * forward.c (pthread_cond_timedwait@GLIBC_2.0,
7818 pthread_cond_timedwait@@GLIBC_2.3.2): New forwards.
7819 * Versions (libc): Export pthread_cond_timedwait@GLIBC_2.0,
7820 pthread_cond_timedwait@@GLIBC_2.3.2.
7821
48614753
JJ
78222003-09-01 Jakub Jelinek <jakub@redhat.com>
7823
56a1b877
JJ
7824 * sysdeps/unix/sysv/linux/alpha/timer_create.c: New file.
7825 * sysdeps/unix/sysv/linux/alpha/timer_delete.c: New file.
7826 * sysdeps/unix/sysv/linux/alpha/timer_getoverr.c: New file.
7827 * sysdeps/unix/sysv/linux/alpha/timer_gettime.c: New file.
7828 * sysdeps/unix/sysv/linux/alpha/timer_settime.c: New file.
7829 * sysdeps/unix/sysv/linux/alpha/Versions: New file.
7830
7831 * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
7832
48614753
JJ
7833 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Define
7834 _POSIX_THREAD_PRIORITY_SCHEDULING.
7835 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
7836
28c97261
UD
78372003-08-31 Ulrich Drepper <drepper@redhat.com>
7838
eef80cf8
UD
7839 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock): Avoid
7840 nested function, use static inline function from libio.h.
7841 Code by Richard Henderson.
7842
28c97261
UD
7843 * sysdeps/pthread/bits/libc-lock.h: Mark pthread_setcancelstate as
7844 weak.
7845
cd2fbe58
UD
78462003-08-30 Jakub Jelinek <jakub@redhat.com>
7847
7848 * sysdeps/unix/sysv/linux/sparc/sparc64/Versions: New file.
7849 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_create.c: New file.
7850 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_delete.c: New file.
7851 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_getoverr.c: New file.
7852 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_gettime.c: New file.
7853 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_settime.c: New file.
7854 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
7855 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
7856 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: New file.
7857 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: New file.
7858 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: New file.
7859 * sysdeps/unix/sysv/linux/sparc/pthread_once.c: New file.
7860 * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: New file.
7861 * sysdeps/unix/sysv/linux/sparc/fork.c: New file.
7862 * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
7863 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: New file.
7864 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: New file.
7865 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: New file.
7866 * sysdeps/sparc/sparc32/pthread_spin_lock.c: New file.
7867 * sysdeps/sparc/sparc32/pthread_spin_trylock.c: New file.
7868 * sysdeps/sparc/sparc32/pthreaddef.h: New file.
7869 * sysdeps/sparc/sparc64/pthread_spin_lock.c: New file.
7870 * sysdeps/sparc/sparc64/pthread_spin_trylock.c: New file.
7871 * sysdeps/sparc/sparc64/pthread_spin_unlock.c: New file.
7872 * sysdeps/sparc/sparc64/pthreaddef.h: New file.
7873 * sysdeps/sparc/tls.h: New file.
7874 * sysdeps/sparc/tcb-offsets.sym: New file.
7875 * sysdeps/sparc/Makefile: New file.
7876 * sysdeps/sparc/td_ta_map_lwp2thr.c: New file.
7877 * init.c [__sparc__] (__NR_set_tid_address): Define.
7878
feda52c0
UD
78792003-08-29 Jakub Jelinek <jakub@redhat.com>
7880
7881 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock,
7882 _IO_release_lock): Define.
7883
7c868816
JJ
78842003-08-29 Jakub Jelinek <jakuB@redhat.com>
7885
0261d33f 7886 * tst-cancel4.c (tf_sigwait, tf_sigwaitinfo, tf_sigtimedwait): Add
7c868816
JJ
7887 sigemptyset before sigaddset. Reported by jreiser@BitWagon.com.
7888
68b9e1ae
UD
78892003-08-27 Ulrich Drepper <drepper@redhat.com>
7890
7891 * sysdeps/pthread/pthread.h (pthread_exit): Remove __THROW.
7892 (__pthread_cleanup_class): Add missing return types of member
7893 functions.
7894
13b3edfc
UD
78952003-08-26 Steven Munroe <sjmunroe@us.ibm.com>
7896
7897 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
7898 (lll_mutex_unlock_force): Add memory barrier between store and futex
7899 syscall.
7900
bb606fbe
UD
79012003-08-25 Ulrich Drepper <drepper@redhat.com>
7902
7903 * tst-cancel4.c (do_test): Also unlink tempfname and remove
7904 tempmsg in first loop.
7905
ee4e5a3d
UD
79062003-08-18 Ulrich Drepper <drepper@redhat.com>
7907
7908 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
7909 _POSIX_THREAD_PRIORITY_SCHEDULING.
7910 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
7911
334fcf2a
UD
79122003-08-07 Jakub Jelinek <jakub@redhat.com>
7913
7914 * sysdeps/pthread/bits/libc-lock.h [_LIBC && SHARED]
7915 (__rtld_lock_default_lock_recursive,
7916 __rtld_lock_default_unlock_recursive): Define.
7917 [_LIBC && SHARED] (__rtld_lock_lock_recursive,
7918 __rtld_lock_unlock_recursive): Define using
7919 GL(_dl_rtld_*lock_recursive).
7920 * init.c (__pthread_initialize_minimal_internal): Initialize
7921 _dl_rtld_lock_recursive and _dl_rtld_unlock_recursive.
7922 Lock GL(_dl_load_lock) the same number of times as
7923 GL(_dl_load_lock) using non-mt implementation was nested.
7924
7925 * pthreadP.h (__pthread_cleanup_upto): Add hidden_proto.
7926 * pt-longjmp.c (__pthread_cleanup_upto): Add hidden_def.
7927
a30fb2df
UD
79282003-08-06 Jakub Jelinek <jakub@redhat.com>
7929
7930 * tst-cancel17.c (do_test): Make len2 maximum of page size and
7931 PIPE_BUF.
7932
ce0d30a0
JJ
79332003-08-07 Jakub Jelinek <jakub@redhat.com>
7934
7935 * pthread_create.c (__pthread_create_2_0): Clear new_attr.cpuset.
7936
9c988b83
UD
79372003-08-03 Jakub Jelinek <jakub@redhat.com>
7938
7939 * sysdeps/pthread/createthread.c (do_clone): Move error handling
7940 to first syscall error check. Move syscall error check for tkill
7941 into __ASSUME_CLONE_STOPPED #ifdef.
7942
5c5252bd
UD
79432003-08-02 Ulrich Drepper <drepper@redhat.com>
7944
f1205aa7
UD
7945 * sysdeps/pthread/createthread.c (do_clone): If __ASSUME_CLONE_STOPPED
7946 is not defined, do explicit synchronization.
7947 (create_thread): Do not lock pd->lock here. If __ASSUME_CLONE_STOPPED
7948 is not defined also unlock pd->lock for non-debugging case in case
7949 it is necessary.
7950 * pthread_create.c (start_thread): Always get and release pd->lock
7951 if __ASSUME_CLONE_STOPPED is not defined.
7952 (start_thread_debug): Removed. Adjust users.
7953 * allocatestack.c (allocate_stack): Always initialize lock if
7954 __ASSUME_CLONE_STOPPED is not defined.
7955 * Makefile (tests): Add tst-sched1.
7956 * tst-sched1.c: New file.
7957
5c5252bd
UD
7958 * sysdeps/pthread/createthread.c (do_clone): Only use
7959 sched_setschduler and pass correct parameters.
7960
973d66e4
UD
79612003-07-31 Jakub Jelinek <jakub@redhat.com>
7962
7963 * sysdeps/pthread/pthread.h (pthread_attr_setstackaddr,
7964 pthread_attr_setstacksize): Change PTHREAD_STACK_SIZE to
7965 PTHREAD_STACK_MIN in comments.
7966
d347a4ab
UD
79672003-07-31 Jakub Jelinek <jakub@redhat.com>
7968
7969 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
7970 Shut up warnings if INTERNAL_SYSCALL_ERROR_P does not use its first
7971 argument.
7972 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Likewise.
7973 * pthread_condattr_setclock.c (pthread_condattr_setclock): Likewise.
7974 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Include pthreaddef.h.
7975 (__pthread_cleanup_upto): Fix prototype.
7976 (_longjmp_unwind): Adjust caller.
7977 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_timedlock):
7978 Change second argument to const struct pointer.
7979 * tst-sem8.c (main): Remove unused s2 and s3 variables.
7980 * tst-sem9.c (main): Likewise.
7981 * unwind.c: Include string.h for strlen prototype.
7982
1b26e9a5
UD
79832003-07-31 Ulrich Drepper <drepper@redhat.com>
7984
7985 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7986 (__pthread_cond_timedwait): Don't use cmov unless HAVE_CMOV is defined.
7987 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S:
7988 Define HAVE_CMOV.
7989 Patch by Nicholas Miell <nmiell@attbi.com>.
7990
adc12574
UD
79912003-07-30 Jakub Jelinek <jakub@redhat.com>
7992
7993 * init.c (__pthread_initialize_minimal_internal): Initialize
7994 GL(dl_init_static_tls).
7995 * pthreadP.h (__pthread_init_static_tls): New prototype.
7996 * allocatestack.c (init_one_static_tls, __pthread_init_static_tls):
7997 New functions.
7998 * Makefile (tests): Add tst-tls4.
7999 (modules-names): Add tst-tls4moda and tst-tls4modb.
8000 ($(objpfx)tst-tls4): Link against libdl and libpthread.
8001 ($(objpfx)tst-tls4.out): Depend on tst-tls4moda.so and
8002 tst-tls4modb.so.
8003 * tst-tls4.c: New file.
8004 * tst-tls4moda.c: New file.
8005 * tst-tls4modb.c: New file.
8006
a7f6c66e
RM
80072003-06-19 Daniel Jacobowitz <drow@mvista.com>
8008
8009 * sysdeps/pthread/timer_create.c (timer_create): Call timer_delref
8010 before __timer_dealloc.
8011 * sysdeps/pthread/timer_routines.c (__timer_thread_find_matching):
8012 Don't call list_unlink.
8013
172ce013
RM
80142003-07-29 Roland McGrath <roland@redhat.com>
8015
8016 * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
8017
7b787f85
UD
80182003-07-25 Jakub Jelinek <jakub@redhat.com>
8019
8020 * tst-cancel17.c (do_test): Check if aio_cancel failed.
8021 Don't reuse struct aiocb A if it failed.
8022 Write fpathconf (fds[1], _PC_PIPE_BUF) + 2 bytes using aio_write,
8023 not just one byte, as that does not block.
8024
0e9d6240
UD
80252003-07-22 Jakub Jelinek <jakub@redhat.com>
8026
9d79e037
UD
8027 * sysdeps/pthread/unwind-resume.c: New file.
8028 * sysdeps/pthread/Makefile (routines, shared-only-routines): Add
8029 unwind-resume in csu subdir.
8030 (CFLAGS-unwind-resume.c, CFLAGS-rt-unwind-resume.c): Compile with
8031 exceptions.
8032 (librt-sysdep_routines, librt-shared-only-routines): Add
8033 rt-unwind-resume.
8034 * sysdeps/pthread/rt-unwind-resume.c: New file.
8035 * unwind-forcedunwind.c: New file.
8036 * Makefile (libpthread-routines): Add unwind-forcedunwind.
8037 (libpthread-shared-only-routines): Likewise.
8038 (CFLAGS-unwind-forcedunwind.c): Compile with exceptions.
8039 * pthreadP.h (pthread_cancel_init): New prototype.
8040 * pthread_cancel.c (pthread_cancel): Call pthread_cancel_init.
8041
8042 * sysdeps/pthread/createthread.c (do_thread, create_thread): Make
8043 attr argument const struct pthread_attr *.
8044
0e9d6240
UD
8045 * res.c (__res_state): Return __resp.
8046 * descr.h: Include resolv.h.
8047 (struct pthread): Add res field.
8048 * pthread_create.c: Include resolv.h.
8049 (start_thread): Initialize __resp.
8050 * Makefile (tests): Add tst-_res1.
8051 (module-names): Add tst-_res1mod1, tst-_res1mod2.
8052 ($(objpfx)tst-_res1mod2.so): Depend on $(objpfx)tst-_res1mod1.so.
8053 ($(objpfx)tst-_res1): Depend on $(objpfx)tst-_res1mod2.so and
8054 libpthread.
8055 * tst-_res1.c: New file.
8056 * tst-_res1mod1.c: New file.
8057 * tst-_res1mod2.c: New file.
8058
1a379ea0
UD
80592003-07-21 Ulrich Drepper <drepper@redhat.com>
8060
7e939b21
UD
8061 * sysdeps/pthread/createthread.c: Don't define CLONE_STOPPED.
8062
1a379ea0
UD
8063 * Makefile: Define various *-no-z-defs variables for test DSOs
8064 which has undefined symbols.
8065
ca86a763
UD
80662003-07-21 Steven Munroe <sjmunroe@us.ibm.com>
8067
8068 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
8069 Retry if the stwcx fails to store once_control.
8070
80f536db
UD
80712003-07-20 Ulrich Drepper <drepper@redhat.com>
8072
8073 * Makefile (libpthread-routines): Add pthread_attr_getaffinity and
8074 pthread_attr_setaffinity.
8075 * Versions [libpthread] (GLIBC_2.3.3): Likewise.
8076 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: New file.
8077 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: New file.
8078 * pthread_attr_destroy.c: Free cpuset element if allocated.
8079 * pthread_create.c: Pass iattr as additional parameter to
8080 create_thread.
8081 * sysdeps/pthread/createthread.c: If attribute is provided and
8082 a new thread is created with affinity set or scheduling parameters,
8083 start thread with CLONE_STOPPED.
8084 * sysdeps/pthread/pthread.h: Declare pthread_attr_getaffinity and
8085 pthread_attr_setaffinity.
8086 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
8087 cpuset element.
8088
73299943
UD
80892003-07-15 Ulrich Drepper <drepper@redhat.com>
8090
8091 * tst-tcancel-wrappers.sh: lseek and llseek are not cancelation points.
8092
da35d15e
UD
80932003-07-14 Ulrich Drepper <drepper@redhat.com>
8094
8095 * sysdeps/pthread/configure.in: Require CFI directives also for
8096 ppc and s390.
8097
75540d8a
UD
80982003-07-15 Jakub Jelinek <jakub@redhat.com>
8099
8100 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
8101 Add cfi directives.
8102
4a17085f
UD
81032003-07-12 Kaz Kojima <kkojima@rr.iij4u.or.jp>
8104
8105 * sysdeps/sh/tcb-offsets.sym: Add RESULT, TID, CANCELHANDLING and
8106 CLEANUP_JMP_BUF.
8107 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use more
8108 registers as variables. Call __pthread_mutex_unlock_usercnt.
8109 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
8110 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Store TID
8111 not self pointer in __writer. Compare with TID to determine
8112 deadlocks.
8113 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
8114 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
8115 Likewise.
8116 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
8117 Likewise.
8118 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add cancellation support.
8119 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
8120 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Define all the nice
8121 macros also when compiling librt.
8122
6080ecdf
UD
81232003-07-11 Jakub Jelinek <jakub@redhat.com>
8124
8125 * Makefile (CFLAGS-pthread_once.c): Add -fexceptions
8126 -fasynchronous-unwind-tables.
8127 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
8128 (PSEUDO): Add cfi directives.
8129 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO):
8130 Likewise.
8131 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
8132 Likewise.
8133
da0c02ee
UD
81342003-07-08 Jakub Jelinek <jakub@redhat.com>
8135
8136 * pthreadP.h (__pthread_unwind_next, __pthread_register_cancel,
8137 __pthread_unregister_cancel): Add prototypes and hidden_proto.
8138 * unwind.c (__pthread_unwind_next): Add hidden_def.
8139 * cleanup.c (__pthread_register_cancel, __pthread_unregister_cancel):
8140 Likewise.
8141 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
8142 Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
8143 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
8144 Likewise.
8145 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
8146 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
8147 Likewise.
8148 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once): Use
8149 HIDDEN_JUMPTARGET to call __pthread_register_cancel,
8150 __pthread_unregister_cancel and __pthread_unwind_next.
8151
57a5ea02
UD
81522003-07-04 Jakub Jelinek <jakub@redhat.com>
8153
8154 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Use
8155 different symbol for the cancellation syscall wrapper and
8156 non-cancellation syscall wrapper.
8157 (PSEUDO_END): Define.
8158
d810b358
UD
81592003-07-05 Richard Henderson <rth@redhat.com>
8160
8161 * sysdeps/alpha/elf/pt-initfini.c: Avoid .ent/.end.
8162 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_wait,
42d86dd6
RH
8163 lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
8164 return actual return value from the syscall, not 0.
d810b358 8165
db54f488
UD
81662003-07-07 Ulrich Drepper <drepper@redhat.com>
8167
8168 * descr.h (struct pthread): Add pid field.
8169 * allocatestack.c (allocate_stack): Initialize pid field in descriptor.
8170 (__reclaim_stacks): Likewise.
8171 * init.c (sigcancel_handler): If __ASSUME_CORRECT_SI_PID is defined
8172 also check for PID of the signal source.
8173 (__pthread_initialize_minimal_internal): Also initialize pid field
8174 of initial thread's descriptor.
8175 * pthread_cancel.c: Use tgkill instead of tkill if possible.
8176 * sysdeps/unix/sysv/linux/fork.c: Likewise.
8177 * sysdeps/unix/sysv/linux/pt-raise.c: Likewise.
8178 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
8179 * sysdeps/unix/sysv/linux/raise.c: Likewise.
8180
5e497a41
UD
81812003-07-05 Ulrich Drepper <drepper@redhat.com>
8182
8183 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_push): Renamed.
8184 Fix use of parameter.
8185 (__libc_cleanup_pop): Likewise.
8186
86a0c4fa
UD
81872003-07-04 Ulrich Drepper <drepper@redhat.com>
8188
8189 * init.c (sigcancel_handler): Change parameters to match handler
8190 for SA_SIGACTION. Check signal number and code to recognize
8191 invalid invocations.
8192
bdbecaa3
RM
81932003-07-03 Roland McGrath <roland@redhat.com>
8194
8195 * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr):
8196 Apply sizeof (struct pthread) bias to r13 value.
8197
56421b23
UD
81982003-07-03 Ulrich Drepper <drepper@redhat.com>
8199
fbd90f6c
UD
8200 * sysdeps/pthread/configure.in: Require CFI directives.
8201
56421b23
UD
8202 * sysdeps/pthread/librt-cancellation.c (__pthread_unwind): Remove
8203 definition.
8204 * pthreadP.h (__pthread_unwind): Add hidden_proto if used in
8205 libpthread compilation.
8206 * unwind.c (__pthread_unwind): Add hidden_def.
8207 * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_unwind.
8208
ca2b4cd7
UD
82092003-07-01 Ulrich Drepper <drepper@redhat.com>
8210
8211 * libc-cancellation.c (__libc_cleanup_routine): Define.
8212 * sysdeps/pthread/bits/libc-lock.h (__pthread_cleanup_push): Define.
8213 (__pthread_cleanup_pop): Define.
8214
f036e569
UD
82152003-07-01 Richard Henderson <rth@redhat.com>
8216
8217 * sysdeps/alpha/elf/pt-initfini.c: New file.
8218 * sysdeps/alpha/pthread_spin_lock.S: New file.
8219 * sysdeps/alpha/pthread_spin_trylock.S: New file.
8220 * sysdeps/alpha/pthreaddef.h: New file.
8221 * sysdeps/alpha/td_ta_map_lwp2thr.c: New file.
8222 * sysdeps/alpha/tls.h: New file.
8223 * sysdeps/unix/sysv/linux/alpha/Makefile: New file.
8224 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: New file.
8225 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: New file.
8226 * sysdeps/unix/sysv/linux/alpha/createthread.c: New file.
8227 * sysdeps/unix/sysv/linux/alpha/fork.c: New file.
8228 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: New file.
8229 * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: New file.
8230 * sysdeps/unix/sysv/linux/alpha/pthread_once.c: New file.
8231 * sysdeps/unix/sysv/linux/alpha/sem_post.c: New file.
8232 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
8233
3b985826
UD
82342003-07-01 Ulrich Drepper <drepper@redhat.com>
8235
8236 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Add correct
8237 cleanup support and unwind info.
8238
3a4d1e1e
UD
82392003-06-30 Ulrich Drepper <drepper@redhat.com>
8240
8241 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
8242 Use correct cleanup handler registration. Add unwind info.
96c814d3
UD
8243 * sysdeps/unix/sysv/linux/unwindbuf.sym: New file.
8244 * sysdeps/unix/sysv/linux/Makefile: Add rule to build unwindbuf.h.
3a4d1e1e
UD
8245 * tst-once3.c: Add cleanup handler and check it is called.
8246 * tst-once4.c: Likewise.
8247 * tst-oncex3.c: New file.
8248 * tst-oncex4.c: New file.
8249 * Makefile: Add rules to build and run tst-oncex3 and tst-oncex4.
8250
e479cc8e
UD
82512003-06-29 Ulrich Drepper <drepper@redhat.com>
8252
8253 * sysdeps/pthread/configure.in: Check for C cleanup handling in gcc.
8254
7d7ff54c
UD
82552003-06-27 Ulrich Drepper <drepper@redhat.com>
8256
483e95d0
UD
8257 * tst-cancel4.c (tf_msgrcv): Use IPC_PRIVATE in msgget call.
8258 (tf_msgsnd): Likewise.
8259
7d7ff54c
UD
8260 * tst-cancel4.c (tf_msgrcv): Strengthen test against valid
8261 premature returns a bit more.
8262
7539c7ec
UD
82632003-06-26 Ulrich Drepper <drepper@redhat.com>
8264
8265 * sysdeps/pthread/librt-cancellation.c: Move __pthread_unwind
8266 definition to the front.
8267
8268 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rename
8269 the cleanup functions to make the names unique. Fix dwarf opcode
8270 un unwind table.
8271 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Rename cleanup
8272 functions to make the names unique. Fix CFA offset for two blocks.
8273
0af6a1d9
UD
82742003-06-25 Ulrich Drepper <drepper@redhat.com>
8275
8276 * sysdeps/pthread/pthread.h (class __pthread_cleanup_class): Add
8277 missing closing braces.
8278 Patch by Christophe Saout <christophe@saout.de>.
8279
eef4a9f3
RM
82802003-06-24 Roland McGrath <roland@redhat.com>
8281
8282 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Typo fix.
8283
4165d44d
UD
82842003-06-24 Ulrich Drepper <drepper@redhat.com>
8285
7f8f7b9d
UD
8286 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: New file.
8287 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: New file.
8288
4165d44d
UD
8289 * pthreadP.h: Declare __find_thread_by_id.
8290 * allocatestack.c [HP_TIMING_AVAIL]: Define __find_thread_by_id.
8291 * pthread_clock_gettime.c: Allow using other thread's clock.
8292 * pthread_clock_settime.c: Likewise.
8293 * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
8294 * Makefile: Add rules to build and run tst-clock2.
8295 * tst-clock2.c: New file.
8296
67b78ef9
UD
82972003-06-23 Ulrich Drepper <drepper@redhat.com>
8298
8299 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rewrite
8300 to use exception-based cleanup handler.
8301 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8302
8303 * tst-cond8.c (ch): Announce that we are done.
8304
8305 * pthreadP.h (__pthread_mutex_cond_lock): Mark with internal_function.
8306
8307 * tst-cancel17.c (tf): Retry aio_suspend in case of EINTR.
8308 Also test aio_suspend with timeout value.
8309
61623643
UD
83102003-06-22 Ulrich Drepper <drepper@redhat.com>
8311
3a4f2043
UD
8312 * pthreadP.h: Mark __pthread_mutex_unlock_usercnt also hidden.
8313 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Add
8314 attribute_hidden.
8315
61623643
UD
8316 * pthreadP.h (__pthread_mutex_init_internal): Mark hidden.
8317 (__pthread_mutex_lock_internal): Likewise.
8318 (__pthread_mutex_unlock_internal): Likewise.
8319 (__pthread_mutex_unlock_usercnt): Declare.
8320 * pthread_mutex_destroy.c: Always fail if used in any way.
8321 * pthread_mutex_init.c: Update comment.
8322 * pthread_mutex_lock.c: If NO_INCR is not defined adjust __nusers.
8323 * pthread_mutex_timedlock.c: Adjust __nusers.
8324 * pthread_mutex_trylock.c: Adjust __nusers.
8325 * pthread_mutex_unlock.c: Old code is in __pthread_mutex_unlock_usercnt
8326 and public interfaces are wrapper with pass additional parameter.
8327 __pthread_mutex_unlock_usercnt does not adjust __nusers if second
8328 parameter zero.
8329 * tst-mutex8.c: New file.
8330 * Makefile (tests): Add tst-mutex8.
8331 * sysdeps/pthread/pthread_cond_timedwait.c: Call
8332 __pthread_mutex_unlock_usercnt.
8333 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
8334 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8335 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8336 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8337 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8338 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Define NO_INCR.
8339 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
8340 Add __nusers.
8341 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8342 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
8343 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
8344 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
8345 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
8346
8347 * pthread_mutex_lock.c: Don't store THREAD_ID in __owner, use TID.
8348 * pthread_mutex_timedlock.c: Likewise.
8349 * pthread_mutex_trylock.c: Adjust __nusers.
8350 * pthread_mutex_unlock.c: Compare with TID not THREAD_ID.
8351 * tst-mutex9.c: New file.
8352 * Makefile (tests): Add tst-mutex9.
8353 * sysdeps/i386/tls.h: Remove THREAD_ID definition.
8354 * sysdeps/ia64/tls.h: Likewise.
8355 * sysdeps/powerpc/tls.h: Likewise.
8356 * sysdeps/s390/tls.h: Likewise.
8357 * sysdeps/sh/tls.h: Likewise.
8358 * sysdeps/x86_64/tls.h: Likewise.
8359 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
8360 Change type of __owner.
8361 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8362 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
8363 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
8364 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
8365 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
8366
9bdabb94
UD
83672003-06-19 Jakub Jelinek <jakub@redhat.com>
8368
8369 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Move to...
8370 * sysdeps/unix/sysv/linux/sem_post.c: ...here.
8371
8372 * sysdeps/unix/sysv/linux/sem_post.c: Move to...
8373 * sysdeps/unix/sysv/linux/powerpc/sem_post.c: ... here. Pass nr + 1
8374 instead of nr to lll_futex_wake. Only set errno and return -1
8375 if err < 0.
8376
8377 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_wait,
8378 lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
8379 return actual return value from the syscall, not 0.
8380
f6c93bd9
UD
83812003-06-18 Ulrich Drepper <drepper@redhat.com>
8382
ca343e73
UD
8383 * tst-cancel4.c (tf_msgsnd): Don't always use 100 as the type,
8384 find a random value.
8385 (tf_msgrcv): Likewise. Also don't report msgrcv returns if
8386 errno==EIDRM.
8387
50441a98
UD
8388 * sysdeps/unix/sysv/linux/timer_settime.c: Add prototype for
8389 compat_timer_settime.
8390 * sysdeps/unix/sysv/linux/timer_gettime.c: Add prototype for
8391 compat_timer_gettime.
8392 * sysdeps/unix/sysv/linux/timer_getoverr.c: Add prototype for
9bdabb94 8393 compat_timer_getoverrun.
50441a98
UD
8394 * sysdeps/unix/sysv/linux/timer_delete.c: Add prototype for
8395 compat_timer_delete.
8396
f6c93bd9
UD
8397 * pthread_mutex_destroy.c (__pthread_mutex_destroy): For
8398 error-checking mutex detect busy mutexes.
8399
047aec8f
UD
84002003-06-17 Ulrich Drepper <drepper@redhat.com>
8401
1d53508d
UD
8402 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_mutex_lock):
8403 Add ax to clobber list.
8404 (lll_mutex_cond_lock): Likewise.
8405 (lll_mutex_unlock): Likewise.
8406 (lll_lock): Likewise.
8407 (lll_unlock): Likewise.
8408
f23b30e2
UD
8409 * Makefile: Add rules to build and run tst-cancel18 and tst-cancelx18.
8410 * tst-cancel18.c: New file.
8411 * tst-cancelx18.c: New file.
8412
8413 * tst-cancel4.c: Test connect, creat, msgrcv, msgsnd, sendmsg, sendto,
8414 and tcdrain.
8415
8416 * Makefile: Add rules to build and run tst-cancel17 and tst-cancel17x.
8417 * tst-cancel17.c: New file.
8418 * tst-cancelx17.c: New file.
8419
8420 * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
8421 * sysdeps/unix/sysv/linux/sigwait.c: New file.
8422 * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
8423
047aec8f
UD
8424 * tst-cancel4.c: Test open, close, pread, pwrite, fsync, and msync.
8425
bbde8527
UD
84262003-06-16 Jakub Jelinek <jakub@redhat.com>
8427
8428 * sysdeps/pthread/createthread.c (create_thread): Set
8429 header.multiple_threads unconditionally.
8430 * allocatestack.c (allocate_stack): Likewise.
8431 * descr.h (struct pthread): Add header.multiple_threads
8432 unconditionally.
8433 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (CENABLE, CDISABLE):
8434 Define for librt. #error if neither libpthread, libc nor librt.
8435 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (CENABLE, CDISABLE):
8436 Likewise.
8437 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (CENABLE,
8438 CDISABLE): Likewise.
8439 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (CENABLE,
8440 CDISABLE): Likewise.
8441 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (CENABLE,
8442 CDISABLE): Likewise.
8443 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (CENABLE,
8444 CDISABLE): Likewise. Access header.multiple_threads outside of
8445 libc and libpthread.
8446 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (CENABLE, CDISABLE):
8447 Likewise.
8448 * sysdeps/x86_64/tls.h (tcbhead_t): Add multiple_threads.
8449 * sysdeps/x86_64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define.
8450
26676450
UD
84512003-06-17 Ulrich Drepper <drepper@redhat.com>
8452
8453 * tst-cancel4.c: Add tests for the socket and signal functions, pause.
8454 Also test early cancellation before the thread reaches the cancellation
8455 point.
8456
8457 * Makefile: Compile forward.c with exceptions.
8458
8459 * sysdeps/unix/sysv/linux/sleep.c: New file.
8460
301a6724
UD
84612003-06-16 Ulrich Drepper <drepper@redhat.com>
8462
0e0deb03
UD
8463 * Makefile: Add CFLAGS definition to compile function wrappers
8464 duplicated from libc with exceptions.
8465 * tst-cancel4.c: Also check cancellation handlers.
8466
301a6724
UD
8467 * Makefile: Add rules to build and run tst-cancel16 and
8468 tst-cancelx16. Add missing CFLAGS definitions.
8469 * tst-cancel16.c: New file.
8470 * tst-cancelx16.c: New file.
8471
7a114794
UD
84722003-06-15 Ulrich Drepper <drepper@redhat.com>
8473
452aea84
UD
8474 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
8475 (DL_SYSINFO_IMPLEMENTATION): Use CFI opcodes.
8476 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
8477 (DL_SYSINFO_IMPLEMENTATION): Likewise.
8478
7a114794
UD
8479 * pthreadP.h (LIBC_CANCEL_ASYNC): Also define for librt.
8480 (LIBC_CANCEL_RESET): Likewise.
8481 Declare __librt_enable_asynccancel and __librt_disable_asynccancel.
8482 * sysdeps/pthread/Makefile (librt-sysdep_routines): Add
8483 librt-cancellation.
8484 (CFLAGS-libcrt-cancellation.c): Define.
8485 * sysdeps/pthread/librt-cancellation.c: New file.
8486 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define all the nice
8487 macros also when compiling librt.
8488 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
8489 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
8490 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
8491 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
8492 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
8493 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
8494 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
8495
8496 * sysdeps/unix/sysv/linux/timer_create.c: Add prototype for
8497 compat_timer_create.
8498
8ba1d429
UD
84992003-06-14 Ulrich Drepper <drepper@redhat.com>
8500
cc8fb6f3
UD
8501 * sysdeps/pthread/posix-timer.h (timespec_compare): Always inline.
8502
8ba1d429
UD
8503 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
8504 __register_atfork.
8505 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
8506 Add libc_hidden_def.
8507
d4f100e2
RM
85082003-06-13 Roland McGrath <roland@redhat.com>
8509
8510 * sysdeps/x86_64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Pass FS
8511 constant from <sys/reg.h> to ps_get_thread_area, not register contents.
8512
dd9423a6
UD
85132003-06-11 Ulrich Drepper <drepper@redhat.com>
8514
8515 * allocatestack.c (queue_stack): Always inline.
8516 * ptreadhP.h (__do_cancel): Likewise.
8517
ed24330d
JJ
85182003-06-10 Jakub Jelinek <jakub@redhat.com>
8519
8520 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait): Fix
8521 a typo.
8522
06120d79
UD
85232003-06-10 Ulrich Drepper <drepper@redhat.com>
8524
8525 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
8526 (__pthread_cond_signal): Remove incorrect second addition for
8527 cond_lock!=0.
8528
b1720346
UD
85292003-06-09 Ulrich Drepper <drepper@redhat.com>
8530
5b318f85
UD
8531 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
8532 (__pthread_cond_signal): Use correct futex pointer in
8533 __lll_mutex_lock_wait call.
8534
b1720346
UD
8535 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
8536 (__pthread_cond_signal): Some more tweaks to handle cond_lock!=0.
8537
3e36c37d
UD
85382003-06-08 Ulrich Drepper <drepper@redhat.com>
8539
ecf7955d
UD
8540 * sysdeps/unix/sysv/linux/s390/sem_wait.c (__new_sem_wait): Make
8541 cancelable.
ed24330d 8542 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
ecf7955d
UD
8543 Likewise.
8544
3e36c37d
UD
8545 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Remove
8546 hand-written CFI generation code. Since ENTRY/END also initiated
8547 CFI frames this caused two CFI sets to be generated.
8548
7726edc2
UD
85492003-06-07 Ulrich Drepper <drepper@redhat.com>
8550
8551 * cleanup_routine.c: New file.
8552 * Versions (libpthread) [GLIBC_2.3.3]: Add __pthread_cleanup_routine.
8553 * sysdeps/pthread/pthread.h: Add support for fully exception-based
8554 cleanup handling.
8555 * Makefile (libpthread-routines): Add cleanup_routine.
8556 Add more CFLAGS variables to compile with exceptions. Add comments
8557 why which file needs unwind tables.
8558 (tests) [have-forced-unwind==yes]: Add tst-cancelx* and tst-cleanupx*
8559 tests.
8560 * tst-cancelx1.c: New file.
8561 * tst-cancelx2.c: New file.
8562 * tst-cancelx3.c: New file.
8563 * tst-cancelx4.c: New file.
8564 * tst-cancelx5.c: New file.
8565 * tst-cancelx6.c: New file.
8566 * tst-cancelx7.c: New file.
8567 * tst-cancelx8.c: New file.
8568 * tst-cancelx9.c: New file.
8569 * tst-cancelx10.c: New file.
8570 * tst-cancelx11.c: New file.
8571 * tst-cancelx12.c: New file.
8572 * tst-cancelx13.c: New file.
8573 * tst-cancelx14.c: New file.
8574 * tst-cancelx15.c: New file.
8575 * tst-cleanupx0.c: New file.
8576 * tst-cleanupx0.expect: New file.
8577 * tst-cleanupx1.c: New file.
8578 * tst-cleanupx2.c: New file.
8579 * tst-cleanupx3.c: New file.
8580
8581 * tst-cleanup0.c: Make standard compliant.
8582 * tst-cleanup1.c: Likewise.
8583
8584 * sysdeps/unix/sysv/linux/sem_timedwait.c: Add cancellation support.
8585 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
8586 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
8587 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
8588 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
8589 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
8590 * sysdeps/i386/tcb-offsets.sym: Add RESULT, CANCELHANDLING, and
8591 CLEANUP_JMP_BUF.
8592 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
8593 * tst-cancel12.c: New file.
8594 * tst-cancel13.c: New file.
8595 * tst-cancel14.c: New file.
8596 * tst-cancel15.c: New file.
8597 * Makefile (tests): Add tst-cancel12, tst-cancel13, tst-cancel14,
8598 and tst-cancel15.
8599
8600 * tst-cancel1.c: Add some comments.
8601
8602 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Compute relative
8603 timeout correctly.
8604
7a8a8e21
UD
86052003-06-06 Ulrich Drepper <drepper@redhat.com>
8606
8607 * Makefile (CFLAGS-pthread_cancel.c): Define.
8608
4ad0bbf4
UD
86092003-06-05 Ulrich Drepper <drepper@redhat.com>
8610
8611 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_rwlock_t):
8612 Change type of __writer element to int.
8613 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8614 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
8615 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
8616 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
8617 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
8618 * sysdeps/i386/tcb-offsets.sym: Replace SELF entry with TID entry.
8619 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
8620 * pthread_rwlock_trywrlock.c: Store TID not self pointer in __writer.
8621 Compare with TID to determine deadlocks.
8622 * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
8623 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
8624 * sysdeps/pthread/pthread_rwlock_timedwrlock.: Likewise.
8625 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
8626 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
8627 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8628 Likewise.
8629 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8630 Likewise.
8631 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8632 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
8633 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
8634 Likewise.
8635 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
8636 Likewise.
8637 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
8638 * Makefile (tests): Add tst-rwlock12.
8639 * tst-rwlock12.c: New file.
8640
332faa96
JJ
86412003-06-05 Jakub Jelinek <jakub@redhat.com>
8642
8643 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait,
8644 __lll_timedlock_wait, lll_unlock_wake_cb, __lll_timedwait_tid):
8645 Remove bogus hidden_proto.
8646 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
8647 Likewise.
8648 * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_lock,
8649 lll_unlock_wake_cb, ___lll_timedwait_tid): Likewise.
8650 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (___lll_mutex_lock,
8651 ___lll_mutex_timedlock): Likewise.
8652
29d9e2fd
UD
86532003-06-04 Ulrich Drepper <drepper@redhat.com>
8654
8655 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
8656 (__pthread_cond_signal): Add some code to eventually handle
8657 cond_lock!=0.
8658
6f1acb30
UD
86592003-06-01 Ulrich Drepper <drepper@redhat.com>
8660
8661 * Makefile (tests): Add tst-exec4.
8662 (tst-exec4-ARGS): Define.
8663 * tst-exec4.c: New file.
8664
49b65043
UD
86652003-05-31 Ulrich Drepper <drepper@redhat.com>
8666
31195be2
UD
8667 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
8668 Also fail if tv_nsec < 0.
8669 (__lll_timedwait_tid): Likewise.
8670 * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
8671 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_timedwait_tid):
8672 Likewise.
8673 * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_timedwait_tid):
8674 Likewise.
8675 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (__lll_mutex_timedlock):
8676 Likewise.
8677 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
8678 Likewise.
80b54217
UD
8679 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_timedwait_tid):
8680 Likewise.
8681 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_timedwait_tid):
8682 Likewise.
31195be2 8683
dcfc8224
UD
8684 * Makefile (tests): Add tst-sem8 and tst-sem9.
8685 * tst-sem8.c: New file.
8686 * tst-sem9.c: New file.
8687 * sem_open.c: Fix creation of in_use record if the file exists but
8688 no internal record.
8689
49b65043
UD
8690 * posix-timer.h: Remove old, unused timer_id2ptr and timer_ptr2id
8691 definitions.
8692
8693 * sysdeps/pthread/timer_create.c (timer_create): In case
8694 evp==NULL, assign timer ID to sival_ptr.
8695
8696 * descr.h (struct pthread_unwind_buf): Change type of prev element to
8697 struct pthread_unwind_buf *.
8698 (struct pthread): Likewise for cleanup_jmp_buf element.
8699
8700 * cleanup.c (__pthread_register_cancel): Add cast to avoid warning.
8701 * cleanup_defer.c (__pthread_register_cancel_defer): Likewise.
8702 * unwind.c (__pthread_unwind_next): Likewise.
8703
50794a45
UD
87042003-05-30 Ulrich Drepper <drepper@redhat.com>
8705
5d4f57bd
UD
8706 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
8707 (lll_futex_timed_wait): Use int for futex value parameter.
8708 (lll_futex_wake): Likewise.
8709 (lll_futex_requeue): Likewise.
8710
8711 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
8712 Replace one memory operation with one register operation.
8713
8714 * tst-join4.c (do_test): Fix error message.
8715
7ab7ea33
UD
8716 * tst-rwlock6.c (do_test): Use correct format specifier.
8717
8718 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
8719 (__lll_mutex_lock_wait): Replace one memory operation with one
8720 register operation.
8721 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S
8722 (__lll_mutex_lock_wait): Likewise.
8723
50794a45
UD
8724 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
8725 (__lll_mutex_cond_lock): Add one to value parameter of
8726 __lll_lock_wait to reflect reality in the futex syscall.
8727 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
8728 (lll_mutex_cond_lock): Likewise.
8729
5a70784e
JJ
87302003-05-30 Jakub Jelinek <jakub@redhat.com>
8731
8732 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_cond_lock):
8733 New function.
8734 (lll_mutex_cond_lock): Define.
8735
e7c5ac68
UD
87362003-05-29 Ulrich Drepper <drepper@redhat.com>
8737
586d1748
UD
8738 * Makefile (tests): Add tst-signal6.
8739 * tst-signal6.c: New file.
8740
b8ba4a27
UD
8741 * sysdeps/unix/sysv/linux/s390/lowlevellock.h
8742 (__lll_mutex_unlock_force): New function
8743 (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
8744
65d46efe
UD
8745 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
8746 (__lll_mutex_unlock_force): New function.
8747 (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
8748
8749 * tst-rwlock7.c (do_test): Use correct format specifier.
8750
e7c5ac68
UD
8751 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue):
8752 Find break parameter in correct asm argument.
8753
284bdc42
UD
87542003-05-27 Jakub Jelinek <jakub@redhat.com>
8755
8756 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_clobbers):
8757 Remove out4.
8758 (lll_futex_requeue): Fix __o3 constraint, return negative errno if
8759 error occured.
8760 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
8761 Add __mutex.
8762 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_REQUEUE,
8763 lll_futex_requeue, lll_mutex_unlock_force): Define.
8764
e7c5ac68
UD
87652003-05-30 Jakub Jelinek <jakub@redhat.com>
8766
8767 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
8768 (pthread_cond_t): Add __mutex.
8769 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_REQUEUE,
8770 lll_futex_requeue, lll_mutex_unlock_force): Define.
8771
ea2630c6
UD
87722003-05-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
8773
8774 * sysdeps/sh/tcb-offsets.sym: Define MUTEX_FUTEX.
8775 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
42d86dd6 8776 Add __mutex field.
ea2630c6
UD
8777 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (SYSCALL_WITH_INST_PAD):
8778 Define.
8779 (lll_futex_wait, lll_futex_wake): Define.
8780 * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: New file.
8781 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Try using
8782 FUTEX_REQUEUE instead of FUTEX_WAIT.
8783 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
8784 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Remember
8785 mutex which was used in condvar structure. Call
8786 __pthread_mutex_cond_lock instead of __pthread_mutex_lock_internal.
8787 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
8788
8789 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Don't
8790 include tcb-offsets.h. Read wakeup value in locked region.
8791 Use the value of gbr register as THREAD_ID.
8792 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
8793 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
8794 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
8795
8796 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Remove futex related
8797 macros.
8798
5a77f150
UD
87992003-05-28 Ulrich Drepper <drepper@redhat.com>
8800
8801 * sysdeps/pthread/pthread_cond_broadcast.c
8802 (__pthread_cond_broadcast): Fix typo: MAX_INT -> INT_MAX.
8803
7661d9f7
UD
88042003-05-26 Ulrich Drepper <drepper@redhat.com>
8805
8806 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Fix
8807 typo in register name.
8808 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use parameters
8809 correctly. Actually use requeue. Little optimization.
8810 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Store
8811 mutex address early. Handle cancellation state as 32-bit value.
8812 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8813 Remove unnecessary label.
8814
69431c9a
UD
88152003-05-25 Ulrich Drepper <drepper@redhat.com>
8816
8817 * sysdeps/pthread/pthread_cond_broadcast.c: Try using FUTEX_REQUEUE
8818 instead of FUTEX_WAIT.
8819 * sysdeps/pthread/pthread_cond_signal.c: Likewise.
8820 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
8821 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
8822 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
8823 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
8824 * sysdeps/pthread/pthread_cond_timedwait.c: Remember mutex which was
8825 used in condvar structure. Call __pthread_mutex_cond_lock instead
8826 of __pthread_mutex_lock_internal.
8827 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8828 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8829 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
8830 (__condvar_cleanup): Always call __pthread_mutex_cond_lock.
8831 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8832 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8833 * sysdeps/unix/sysv/linux/Makefile (libpthread-sysdep_routines):
8834 Add pthread_mutex_cond_lock.
8835 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add dep_mutex.
8836 * sysdeps/unix/sysv/linux/pthread_cond_mutex_lock.c: New file.
8837 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define
8838 lll_mutex_cond_lock.
8839 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
8840 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
248a3490 8841 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
69431c9a 8842 Add __mutex field.
248a3490 8843 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
69431c9a
UD
8844 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
8845
8846 * sysdeps/i386/tcb-offsets.sym: Define MUTEX_FUTEX.
8847 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
8848
8849 * pthreadP.h: Declare __pthread_mutex_cond_lock.
8850 * pthread_mutex_lock.c: Define LLL_MUTEX_LOCK if not already defined.
8851 Use it instead of lll_mutex_lock. If __pthread_mutex_lock is a
8852 macro don't define aliases.
8853
8854 * cancellation.c: Remove __pthread_enable_asynccancel_2.
8855 * pthreadP.h: Remove declaration of __pthread_enable_asynccancel_2.
8856 * sysdeps/pthread/pthread_cond_timedwait.c: Use
8857 __pthread_enable_asynccancel instead of __pthread_enable_asynccancel_2.
8858 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8859 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8860 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
8861 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8862 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8863
fddfebbd
UD
88642003-05-17 Ulrich Drepper <drepper@redhat.com>
8865
8866 * sem_open.c: Fix one endless loop. Implement correct semantics
8867 wrt opening the same semaphore more then once.
8868 * sem_close.c: Adjust for sem_open change.
8869 * semaphoreP.h: Include <semaphore.h>. Define struct inuse_sem.
8870 Declare __sem_mappings, __sem_mappings_lock, __sem_search.
8871 * Makefile (tests): Add tst-sem7.
8872 * tst-sem7.c: New file.
8873
1eefffb0
RM
88742003-05-16 Roland McGrath <roland@redhat.com>
8875
8876 * sysdeps/unix/sysv/linux/register-atfork.c (libc_freeres_fn): Fix
8877 uninitialized variable braino.
8878
6e66dc78
UD
88792003-05-16 Ulrich Drepper <drepper@redhat.com>
8880
23ae6451
UD
8881 * sysdeps/unix/sysv/linux/timer_gettime.c (timer_gettime): Correct
8882 test for syscall availability.
8883
8884 * sysdeps/unix/sysv/linux/timer_settime.c (timer_settime): Set
8885 __no_posix_timers to -1 if the syscalls don't exist.
8886
7ac5b8e2
UD
8887 * pthread_join.c (pthread_join): Set tid field of the joined
8888 thread to -1. This isn't necessary but helps to recognize some
8889 error conditions with almost no cost.
8890
8891 * allocatestack.c (FREE_P): Also negative values indicate an
8892 unused stack.
8893
6e66dc78
UD
8894 * unwind.c: Include <unistd.h>.
8895
855dba3c
UD
88962003-05-14 Ulrich Drepper <drepper@redhat.com>
8897
8898 * Makefile ($(objpfx)$(multidir)): Add rule to create the directory.
8899
81f3ac4c
UD
89002003-05-14 Jakub Jelinek <jakub@redhat.com>
8901
8902 * Makefile (crti-objs, crtn-objs): New variables.
8903 (omit-deps, extra-objs): Add crtn.
8904 ($(objpfx)libpthread.so): Depend on both crti and crtn
8905 and links to them in multidir.
8906 ($(objpfx)crtn.S, $(objpfx)crtn.o): New rules.
8907
7158eae4
UD
89082003-05-12 Steven Munroe <sjmunroe@us.ibm.com>
8909
8910 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
8911 (lll_mutex_unlock): Use atomic_exchange_rel.
8912
edf205d5
UD
89132003-05-11 Ulrich Drepper <drepper@redhat.com>
8914
8915 * cond-perf.c (cons): Add missing locking around setting of alldone.
8916
a3f979a7
UD
89172003-05-10 Ulrich Drepper <drepper@redhat.com>
8918
8919 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Remove futex
8920 related macros.
8921 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
8922
880867a4
UD
89232003-05-09 Ulrich Drepper <drepper@redhat.com>
8924
949ec764
UD
8925 * tst-sem6.c: New file.
8926 * Makefile (tests): Add tst-sem6.
8927
8928 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (___lll_mutex_unlock):
8929 Use atomic_exchange_rel instead of atomic_exchange.
8930 * sysdeps/unix/sysv/linux/lowlevellock.c (lll_unlock_wake_cb):
8931 Likewise.
8932
8933 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Improve quality of
8934 code for lll_futex_wait and lll_futex_wake in static apps. Use
8935 vsyscall is possible.
8936
8937 * sysdeps/unix/sysv/linux/pthread_getaffinity.c: New file.
8938 * sysdeps/unix/sysv/linux/pthread_setaffinity.c: New file.
8939 * sysdeps/pthread/pthread.h: Declare pthread_getaffinity_np and
8940 pthread_setaffinity_np.
8941 * Versions [libpthread] (GLIBC_2.3.3): Add pthread_getaffinity_np
8942 and pthread_setaffinity_np.
8943 * Makefile (libpthread-routines): Add pthread_getaffinity and
8944 pthread_setaffinity.
8945
880867a4
UD
8946 * allocatestack.c (allocate_stack): If ARCH_RETRY_MMAP is defined,
8947 use it in case mmap to allocate the stack fails.
8948 * sysdeps/unix/sysv/linux/x86_64/Makefile: Don't define
8949 ARCH_MAP_FLAGS here.
8950 * sysdeps/x86_64/pthreaddef.h: Define ARCH_MAP_FLAGS and
8951 ARCH_RETRY_MMAP.
8952
92d83c72
UD
89532003-05-08 Ulrich Drepper <drepper@redhat.com>
8954
8955 * sysdeps/unix/sysv/linux/fork.c: Complete rewrite of the atfork
8956 handler implementation. It is now lockless in fork().
8957 * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
8958 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
8959 * sysdeps/unix/sysv/linux/fork.h: Don't include <link.h>. Don't
8960 declare the __fork_*_lists.
8961 (struct fork_handler): Include pointers to all three functions.
8962 Add next, refcntr and need_signal elements.
8963 (__fork_handlers): New declaration.
8964 (__register_atfork_malloc): Remove declaration.
8965 (HAVE_register_atfork_malloc): Remove definition.
8966 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove
8967 __pthread_child_handler variable.
8968 (__libc_pthread_init): Use __register_atfork instead of explicitly
8969 adding to the list.
8970 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define lll_futex_wait
8971 and lll_futex_wake.
8972 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
8973
8974 * unwind.c (unwind_cleanup): Print error message and then abort. This
8975 function must never be reached.
8976
8977 * cond-perf.c: New file.
8978
be4d8038
UD
89792003-05-05 Ulrich Drepper <drepper@redhat.com>
8980
8981 * sysdeps/i386/tls.h (TLS_INIT_TP): Include \n in error message.
8982
c6696b79
RM
89832003-05-04 Roland McGrath <roland@redhat.com>
8984
8985 * Makefile ($(objpfx)../libc.so): New target.
8986
7da168bf
UD
89872003-05-02 Ulrich Drepper <drepper@redhat.com>
8988
8989 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
8990 (pthread_condattr_t): Size is only an int, don't use long for
8991 alignment.
8992 (pthread_mutexattr_t): Likewise.
7da168bf
UD
8993 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8994 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
8995 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
8996
9a7178d6
UD
89972003-05-01 Ulrich Drepper <drepper@redhat.com>
8998
8999 * sysdeps/i386/tls.h: Define THREAD_ID.
9000 * sysdeps/ia64/tls.h: Likewise.
9001 * sysdeps/powerpc/tls.h: Likewise.
9002 * sysdeps/s390/tls.h: Likewise.
9003 * sysdeps/sh/tls.h: Likewise.
9004 * sysdeps/x86_64/tls.h: Likewise.
9005 * pthread_mutex_lock.c: Use THREAD_ID instead of THREAD_SELF to
9006 record ownership.
9007 * pthread_mutex_timedlock.c: Likewise.
9008 * pthread_mutex_trylock.c: Likewise.
9009 * pthread_mutex_unlock.c: Likewise.
9010 * pthread_rwlock_trywrlock.c: Likewise.
9011 * sysdeps/pthread/pthread_rwlocklock_rdlock.c: Likewise.
9012 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
9013 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
9014 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
9015
9016 * sysdeps/pthread/createthread.c (create_thread): Use CLONE_SYSVSEM
9017 flag.
9018
a234e27d
UD
90192003-04-29 Jakub Jelinek <jakub@redhat.com>
9020
9021 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
9022 (__SIZEOF_PTHREAD_COND_T): Define to 48.
9023 (pthread_rwlock_t): Add 16 bytes of pad instead of 8 before __flags.
9024 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
9025 Make __align long long instead of long.
9026 (pthread_rwlock_t): Formatting.
9027 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
9028 (pthread_rwlock_t): Formatting.
9029 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
9030 (pthread_cond_t): Make __align long long instead of long.
9031 (pthread_rwlock_t): Move __flags field to the same position as in
9032 linuxthreads.
9033
f025c136
UD
90342003-04-30 Ulrich Drepper <drepper@redhat.com>
9035
9036 * tst-rwlock6.c (do_test): Use correct printf format specifiers.
9037 * tst-rwlock7.c (do_test): Likewise.
9038
7531ab9e
RM
90392003-04-26 Roland McGrath <roland@redhat.com>
9040
9041 * Makefile ($(test-modules)): Depend on $(common-objpfx)shlib.lds.
9042
299601a1
UD
90432003-04-22 Jakub Jelinek <jakub@redhat.com>
9044
299601a1
UD
9045 * allocatestack.c (TLS_TPADJ): Add TLS_PRE_TCB_SIZE instead of
9046 sizeof (struct pthread).
9047 (allocate_stack): Subtract TLS_PRE_TCB_SIZE bytes instead of
468777e1 9048 1 struct pthread.
299601a1
UD
9049 * sysdeps/powerpc/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Define
9050 to 0.
9051 (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Define to alignment of
9052 struct pthread.
9053 (TLS_PRE_TCB_SIZE): Increase to cover tcbhead_t preceeded by pad
9054 to 32-bit bytes.
9055 (INSTALL_DTV, GET_DTV, THREAD_DTV): tcbhead_t is immediately before
9056 tcbp.
9057 (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Don't add TLS_TCB_SIZE
9058 unneccessarily.
9059 (NO_TLS_OFFSET): Define.
299601a1
UD
9060 * sysdeps/unix/sysv/linux/powerpc/createthread.c (TLS_VALUE): Don't
9061 add TLS_TCB_SIZE unnecessarily.
299601a1 9062
950094f8
RM
90632003-04-22 Roland McGrath <roland@redhat.com>
9064
9065 * Makeconfig (shared-thread-library): Reverse link order to work
9066 around linker bug.
9067
dc2f6455
UD
90682003-04-22 Ulrich Drepper <drepper@redhat.com>
9069
9070 * semaphore.h: Fix typo in comment.
9071
e7608d77
UD
90722003-04-21 Ulrich Drepper <drepper@redhat.com>
9073
6a87ee19
UD
9074 * sysdeps/pthread/sigfillset.c: New file.
9075
e7608d77
UD
9076 * init.c (__pthread_initialize_minimal): Don't block SIGTIMER.
9077 * pthreadP.h: Make SIGTIMER and SIGCANCEL the same.
9078 * sysdeps/pthread/pthread_sigmask.c: Remove handling of SIGTIMER.
9079 * sysdeps/pthread/sigaction.c: Likewise.
9080 * sysdeps/pthread/sigprocmask.c: New file.
9081 * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): Define as
9082 __SIGRTMIN+1.
9083 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
9084 Block SIGTIMER. Also handle SI_TKILL events and terminate thread
9085 in this case.
9086
0b3df49e
UD
90872003-04-19 Ulrich Drepper <drepper@redhat.com>
9088
58a7a325
UD
9089 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
9090 (DL_SYSINFO_IMPLEMENTATION): Add .eh_frame information.
9091
0b3df49e
UD
9092 * sysdeps/unix/sysv/linux/unregister-atfork.c
9093 (__unregister_atfork): Don't free memory not allocated dynamically.
9094
9095 * semaphore.h: Remove __THROW marker from cancellation points.
9096 * nptl/sysdeps/pthread/pthread.h: Likewise.
9097
7d74651e
UD
90982003-04-18 Ulrich Drepper <drepper@redhat.com>
9099
76a67697
UD
9100 * sysdeps/pthread/pthread.h: Don't mark pthread_testcancel,
9101 pthread_cancel, pthread_setcancelstate, and pthread_setcanceltype with
7d74651e
UD
9102 __THROW.
9103
dd9d6538
JJ
91042003-04-16 Jakub Jelinek <jakub@redhat.com>
9105
9106 * tst-cancel4.c (do_test): Use %zd instead of %d when printing cnt.
9107
4ab6f47c
RM
91082003-04-15 Roland McGrath <roland@redhat.com>
9109
9110 * forward.c (__pthread_unwind): Tweak to avoid warning.
9111
162434a6
UD
91122003-04-15 Ulrich Drepper <drepper@redhat.com>
9113
9114 * pthreadP.h: Move THREAD_ATOMIC_* replacements to the top.
9115
35909161
UD
91162003-04-14 Ulrich Drepper <drepper@redhat.com>
9117
18ddd3aa 9118 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Don't
35909161
UD
9119 overflow CFA advance instructions.
9120 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
9121
18a8e730
UD
91222003-04-14 Jakub Jelinek <jakub@redhat.com>
9123
bd4f43b4
UD
9124 * sysdeps/i386/tls.h: Rename LOCK to LOCK_PREFIX.
9125 * sysdeps/i386/pthread_spin_lock.c: Likewise.
9126 * sysdeps/x86_64/tls.h: Likewise. Define LOCK_PREFIX if not already
9127 defined.
9128
18a8e730
UD
9129 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Use
9130 DW_CFA_advance_loc2 for .Laddl-.Lsubl.
9131 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
9132 DW_CFA_advance_loc for .Laddl-.Lsubl.
9133
08c765fa
UD
91342003-04-13 Ulrich Drepper <drepper@redhat.com>
9135
18a8e730
UD
9136 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Don't use
9137 position-independent unwind data for static libraries.
9138 Add missing unwind info. Add comments.
9139
ad2be852
UD
9140 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Add unwind info.
9141 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
9142 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
08c765fa
UD
9143 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9144
177d1ad3
UD
91452003-04-12 Ulrich Drepper <drepper@redhat.com>
9146
08c765fa
UD
9147 * Makefile: Make sure all cancellation points are compiled with
9148 exception and asynchronous unwind tables.
9149
177d1ad3
UD
9150 * sysdeps/x86_64/tls.h (THREAD_SETMEM): Word around compiler bug
9151 which mishandles loading of global object addresses in PIC.
9152 (THREAD_SETMEM_NC): Likewise.
9153
09d65ff3
UD
91542003-04-11 Ulrich Drepper <drepper@redhat.com>
9155
9156 * pthread.h: Define new data structure for cleanup buffer. Declare
9157 new cleanup handler interfaces.
9158 * descr.h: Include <unwind.h> if necessary. Define pthread_unwind_buf.
9159 (struct pthread): Add cleanup_jmp_buf pointer. Define
9160 HAVE_CLEANUP_JMP_BUF and not HAVE_CANCELBUF.
9161 * pthreadP.h: Declare __pthread_unwind. Define __do_cancel to use
9162 it. Declare old cleanup handler installation functions.
9163 * cleanup.c: Rewrite. Install handler for unwind-based cleanup
9164 handling.
9165 * cleanup_defer.c: Likewise.
9166 * cleanup_compat.c: New file. Old cleanup code.
9167 * cleanup_def_compat.c: New file. Old cleanup code.
9168 * pthread_create.c (start_thread): Initialize cleanup_jmp_buf element
9169 if own thread descriptor.
9170 * unwind.c: New file.
9171 * forward.c: Add __pthread_unwind.
9172 * init.c (pthread_functions): Add __pthread_unwind.
9173 * sysdeps/pthread/pthread-functions.s (struct pthread_functions):
9174 Add ptr___pthread_unwind.
9175 * Versions [GLIBC_2.3.3] (libpthread): Export new cleanup handling
9176 and unwind function.
9177 * Makefile (libpthread-routines): Add cleanup_compat,
9178 cleanup_def_compat, and unwind. Define CFLAGS to enable unwind
9179 table generation if necessary.
9180 * version.c: Record whether unwind support is compiled in.
9181 * sysdeps/pthread/configure.in: Add checks for unwind unterfaces.
9182 * sysdeps/pthread/bits/libc-lock.h: Add prototypes of the old cleanup
9183 handler interfaces.
9184 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add quite a bit of
9185 complication to generate unwind information for syscall wrappers.
68107ec0 9186 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
09d65ff3
UD
9187 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
9188 __cleanup_fct_attribute.
9189
9190 * Makefile: Add rules to build and run tst-cleanup0.
9191 * tst-cleanup0.c: New file.
9192 * tst-cleanup0.expect: New file.
9193
9194 * pthread_create.c (deallocate_tsd): Don't take parameter. Adjust
9195 caller. Optimize to avoid often unecessary local variable.
9196
0dc44b51
RM
91972003-04-11 Roland McGrath <roland@redhat.com>
9198
9199 * Makefile ($(objpfx)multidir.mk): New target, generated makefile that
9200 sets variable `multidir'; include that.
9201 (generated): Add it.
9202 ($(objpfx)$(multidir)/crti.o): New target.
9203 [$(multidir) != .] (generated-dirs, extra-objs, omit-deps): Add it.
9204
84a80719
UD
92052003-04-11 Ulrich Drepper <drepper@redhat.com>
9206
9207 * tst-attr2.c (do_test): Add cast to avoid warning.
9208 * tst-mutex4.c (do_test): Likewise.
9209
88ff4759
UD
92102003-04-10 Ulrich Drepper <drepper@redhat.com>
9211
9212 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset CPU clocks
9213 in child.
9214
b2041097
UD
92152003-04-09 Ulrich Drepper <drepper@redhat.com>
9216
9217 * Makefile (tests): Add tst-detach1.
9218 * tst-detach1.c: New file.
9219
f9657e88
UD
92202003-04-08 Ulrich Drepper <drepper@redhat.com>
9221
9afe4964
UD
9222 * sysdeps/pthread/pthread.h: Remove duplicate
9223 pthread_cleanup_{push,pop} definitions.
9224
f9657e88
UD
9225 * tst-barrier2.c: Eliminate warnings.
9226 * tst-cancel4.c: Likewise.
9227 * tst-cond4.c: Likewise.
9228 * tst-cond6.c: Likewise.
9229 * tst-detach1.c: Likewise.
9230 * tst-rwlock4.c: Likewise.
9231 * tst-rwlock6.c: Likewise.
9232 * tst-rwlock7.c: Likewise.
9233 * tst-sem3.c: Likewise.
9234 * tst-spin2.c: Likewise.
9235 * tst-umask1.c: Likewise.
9236
69b35e86
UD
92372003-04-07 Ulrich Drepper <drepper@redhat.com>
9238
9239 * pthread_detach.c (pthread_detach): Fix test for invalid TID.
9240
c70ad7d7
UD
92412003-04-06 Ulrich Drepper <drepper@redhat.com>
9242
9243 * descr.h (struct pthread): Move cancelhandling member to the front.
9244
54e0138f
UD
92452003-04-05 Ulrich Drepper <drepper@redhat.com>
9246
9247 * sysdeps/unix/sysv/linux/register-atfork.c: Define malloc_prepare,
9248 malloc_parent, and malloc_child statically.
9249 (__register_atfork_malloc): New function.
9250 (free_mem): Don't free any of the malloc_* variables on the list.
9251 * sysdeps/unix/sysv/linux/fork.h: Declare __register_atfork_malloc.
9252 Define HAVE_register_atfork_malloc.
9253
b22d701b
UD
92542003-04-04 Ulrich Drepper <drepper@redhat.com>
9255
9256 * sysdeps/pthread/createthread.c (create_thread): Add some more
9257 comments explaining when to set multiple_threads and when not.
9258
9259 * pthreadP.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
9260 THREAD_ATOMIC_BIT_SET if not already defined.
9261 * sysdeps/i386/tls.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
9262 THREAD_ATOMIC_BIT_SET:
9263 * sysdeps/x86_64/tls.h: Likewise.
9264 * cleanup_defer.c (_pthread_cleanup_push_defer): Rewrite to use
9265 THREAD_ATOMIC_CMPXCHG_VAL.
9266 (_pthread_cleanup_pop_restore): Likewise.
9267 * cancellation.c (__pthread_enable_asynccancel): Likewise.
9268 (__pthread_enable_asynccancel_2): Likewise.
9269 (__pthread_disable_asynccancel): Likewise.
9270 * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
9271 (__libc_disable_asynccancel): Likewise.
9272 * init.c (sigcancel_handler): Likewise.
9273 * pthread_setcancelstate.c (__pthread_setcancelstate): Likewise.
9274 * pthread_setcanceltype.c (__pthread_setcanceltype): Likewise.
9275
86246935
UD
92762003-04-03 Ulrich Drepper <drepper@redhat.com>
9277
9278 * init.c (sigcancel_handler): Don't set EXITING_BIT here.
9279 * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
9280 * pthreadP.h (__do_cancel): Set EXITING_BIT here.
9281 * Makefile (tests): Add tst-cancel11.
9282 * tst-cancel11.c: New file.
9283
6b4686a5
UD
92842003-04-01 Ulrich Drepper <drepper@redhat.com>
9285
9286 * pthread_create.c (deallocate_tsd): Clear/free memory after the last
9287 round, not the first. Use specific_used flag instead of local
9288 found_nonzero variable. Use THREAD_[SG]ETMEM where possible.
9289 (__free_tcb): Don't call deallocate_tsd here.
9290 (start_thread): Call deallocate_tsd here.
9291 * pthread_setspecific.c: Set specific_used flag really only when
9292 needed.
0d73a73b 9293 * Makefile (tests): Add tst-tsd3.c and tst-tsd4.
6b4686a5 9294 * tst-tsd3.c: New file.
0d73a73b 9295 * tst-tsd4.c: New file.
6b4686a5 9296
42b2395d
UD
92972003-03-31 Ulrich Drepper <drepper@redhat.com>
9298
211d90c5
UD
9299 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_mutex_lock):
9300 Use atomic_exchange_and_add instead of __lll_add.
9301 (__lll_mutex_timedlock): Likewise.
9302 Patch by Ian Wienand.
9303
93042003-03-24 Steven Munroe <sjmunroe@us.ibm.com>
9305
9306 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
9307 (SINGLE_THREAD_P): Fix typo.
9308 * tst-cancel-wrappers.sh: Handle '.'ed symbols.
9309
93102003-03-31 Ulrich Drepper <drepper@redhat.com>
9311
9312 * Makefile (tests): Add tst-align.
9313 * tst-align.c: New file.
9314 * sysdeps/i386/Makefile: Define CFLAGS-tst-align.
211d90c5 9315
42b2395d
UD
9316 * sysdeps/i386/tls.h (CALL_THREAD_FCT): Align stack of called
9317 function correctly.
9318
211d90c5
UD
9319 * tst-tsd2.c: Add casts to avoid warnings.
9320
163b180f
UD
93212003-03-30 Ulrich Drepper <drepper@redhat.com>
9322
9323 * descr.h (struct pthread): Move most often used elements to the front.
9324
ea473bad
UD
93252003-03-29 Ulrich Drepper <drepper@redhat.com>
9326
9327 * Makefile (libpthread-routines): Add pthread_atfork.
9328 (libpthread-static-only-routines): Add pthread_atfork.
9329
dd731d53
UD
93302003-03-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
9331
9332 * sysdeps/sh/tls.h: Include nptl/descr.h after the definition
9333 of TLS_DTV_AT_TP.
9334 (INSTALL_DTV): Add parens.
9335 (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
9336 Use passed descr instead of THREAD_SELF.
9337 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S
9338 (__lll_mutex_timedlock_wait): Correct expected value after
9339 spurious wakeup.
9340 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S:
9341 Release lock before waking up the waiters.
9342 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Correct exit
9343 criteria. Reorderstruct passed to cleanup handler. Fix
9344 handling of cancellation and failung pthread_mutex_unlock call.
9345 Use __pthread_enable_asynccancel_2 instead of
9346 __pthread_enable_asynccancel.
9347 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
9348 Return result of lock re-get if it fails.
9349 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Fix wrong argument
9350 for __pthread_cleanup_push.
9351 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Fix
9352 completely broken rwlock implementation.
9353 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
9354 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
9355 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
9356 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
9357 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
9358 * sysdeps/unix/sysv/linux/sh/sem_post.S: Fix error value. Use
9359 versioned_symbol macro.
9360 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Use versioned_symbol macro.
9361 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
9362
c75d02f0
UD
93632003-03-27 Ulrich Drepper <drepper@redhat.com>
9364
5f5004df
UD
9365 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Don't declare
9366 __timer_helper_thread. Declare __start_helper_thread, __helper_once,
9367 and __helper_tid.
9368 (struct timer): Remove th and bar field.
9369 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Remove
9370 debugging code. Create only one helper thread.
9371 * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Don't kill
9372 helper thread.
9373 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
9374 Renamed. Define statically. Use thread info from siginfo.
9375 (__helper_once): New variable.
9376 (__helper_tid): New variable.
9377 (__reset_helper_control): New function.
9378 (__start_helper_thread): New function.
9379
18d009ca
UD
9380 * pthread_create.c (start_thread): Don't use setjmp inside
9381 __builtin_expect to work around gcc bug.
9382
c75d02f0
UD
9383 * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Even if
9384 timer_delete syscall fails, but not with ENOSYS, set
9385 __no_posix_timers.
9386
9387 * sysdeps/unix/sysv/linux/timer_settime.c [!__ASSUME_POSIX_TIMERS]
9388 (timer_settime): Fix typo.
28cf3058
UD
9389 * sysdeps/unix/sysv/linux/timer_getoverr.c
9390 [!__ASSUME_POSIX_TIMERS] (timer_getoverrun): Likewise.
c75d02f0 9391
049ac259
JJ
93922003-03-27 Jakub Jelinek <jakub@redhat.com>
9393
9394 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Fix
9395 offset of cleanupbuf.__prev.
9396
f93d39dd
JJ
93972003-03-26 Jakub Jelinek <jakub@redhat.com>
9398
9399 * sysdeps/unix/sysv/linux/timer_getoverr.c: Fix typo in name
9400 of included file.
9401
f064e4c5
UD
94022003-03-26 Ulrich Drepper <drepper@redhat.com>
9403
9404 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): If EVP ==
9405 NULL provide default definition to syscall.
9406
83e886a3
RM
94072003-03-25 Roland McGrath <roland@redhat.com>
9408
9409 * sysdeps/pthread/posix-timer.h (TIMER_MAX): Define if not defined.
9410 (timer_id2ptr): Fix typo.
9411
09402f5b
UD
94122003-03-25 Ulrich Drepper <drepper@redhat.com>
9413
9414 * pthreadP.h: Define SIGCANCEL and SIGTIMER.
9415 * sysdeps/i386/pthreaddef.h: Remove SIGCANCEL definition.
9416 * sysdeps/ia64/pthreaddef.h: Likewise.
9417 * sysdeps/powerpc/pthreaddef.h: Likewise.
9418 * sysdeps/s390/pthreaddef.h: Likewise.
9419 * sysdeps/sh/pthreaddef.h: Likewise.
9420 * sysdeps/x86_64/pthreaddef.h: Likewise.
9421 * init.c (__pthread_initialize_minimal): Block SIGTIMER.
9422 * sysdeps/pthread/sigaction.c: Also prevent SIGTIMER handler from
9423 being changed.
9424 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
9425 SIGTIMER is not unblocked.
9426 * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): One more
9427 RT signal taken.
9428 * sysdeps/unix/sysv/linux/pthread_kill.c: Do not allow SIGTIMER to
9429 be send.
9430 * sysdeps/pthread/posix-timer.h (timer_id2ptr, timer_ptr2id): Just
9431 pass pointer through as ID.
9432 * sysdeps/unix/sysv/linux/bits/local_lim.h (TIMER_MAX): Removed.
9433 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: New file.
9434 * sysdeps/unix/sysv/linux/timer_create.c: New file.
9435 * sysdeps/unix/sysv/linux/timer_delete.c: New file.
9436 * sysdeps/unix/sysv/linux/timer_getoverr.c: New file.
9437 * sysdeps/unix/sysv/linux/timer_gettime.c: New file.
9438 * sysdeps/unix/sysv/linux/timer_routines.c: New file.
9439 * sysdeps/unix/sysv/linux/timer_settime.c: New file.
9440 * sysdeps/unix/sysv/linux/ia64/Versions: New file.
9441 * sysdeps/unix/sysv/linux/ia64/timer_create.c: New file.
9442 * sysdeps/unix/sysv/linux/ia64/timer_delete.c: New file.
9443 * sysdeps/unix/sysv/linux/ia64/timer_getoverr.c: New file.
9444 * sysdeps/unix/sysv/linux/ia64/timer_gettime.c: New file.
9445 * sysdeps/unix/sysv/linux/ia64/timer_settime.c: New file.
9446 * sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions: New file.
9447 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_create.c: New file.
9448 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_delete.c: New file.
9449 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_getoverr.c: New file.
9450 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_gettime.c: New file.
9451 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_settime.c: New file.
9452 * sysdeps/unix/sysv/linux/s390/s390-64/Versions: New file.
9453 * sysdeps/unix/sysv/linux/s390/s390-64/timer_create.c: New file.
9454 * sysdeps/unix/sysv/linux/s390/s390-64/timer_delete.c: New file.
9455 * sysdeps/unix/sysv/linux/s390/s390-64/timer_getoverr.c: New file.
9456 * sysdeps/unix/sysv/linux/s390/s390-64/timer_gettime.c: New file.
9457 * sysdeps/unix/sysv/linux/s390/s390-64/timer_settime.c: New file.
9458 * sysdeps/unix/sysv/linux/x86_64/Versions: New file.
9459 * sysdeps/unix/sysv/linux/x86_64/compat-timer.h: New file.
9460 * sysdeps/unix/sysv/linux/x86_64/timer_create.c: New file.
9461 * sysdeps/unix/sysv/linux/x86_64/timer_delete.c: New file.
9462 * sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c: New file.
9463 * sysdeps/unix/sysv/linux/x86_64/timer_gettime.c: New file.
9464 * sysdeps/unix/sysv/linux/x86_64/timer_settime.c: New file.
9465
9466 * pthreadP.h: Remove FRAME_LEFT definition.
9467 * cleanup.c (_pthread_cleanup_push): Don't check for reference to
9468 already left frame. Programs which have this problem are not POSIX
9469 compliant.
9470 * cleanup_defer.c (_pthread_cleanup_push_defer): Likewise.
9471
5e826ab5
UD
94722003-03-24 Ulrich Drepper <drepper@redhat.com>
9473
9474 * sysdeps/pthread/tst-timer.c: Check return values of the
9475 functions we test.
9476
b910f788
RM
94772003-03-23 Roland McGrath <roland@redhat.com>
9478
3045a1fe
RM
9479 * tst-tls3.c (do_test) [! HAVE___THREAD]: Don't test anything.
9480 * tst-tls3mod.c: Likewise.
9481 * tst-tls1.c: Likewise.
9482 * tst-tls2.c: Likewise.
9483
85047fe3
RM
9484 * tst-mutex5.c (do_test): Unlock before destroy, otherwise we invoke
9485 undefined behavior.
9486
b910f788
RM
9487 * tst-join5.c (tf1, tf2): Add a cast.
9488
9489 * Makeconfig (includes): Append -I$(..)nptl to this variable.
9490
9491 * tst-barrier2.c (do_test) [! _POSIX_THREAD_PROCESS_SHARED]:
9492 Don't test anything.
9493 * tst-cond4.c: Likewise.
9494 * tst-cond6.c: Likewise.
9495 * tst-flock2.c: Likewise.
9496 * tst-mutex4.c: Likewise.
9497 * tst-rwlock4.c: Likewise.
9498 * tst-signal1.c: Likewise.
9499 * tst-spin2.c: Likewise.
9500 * tst-cond11.c [! _POSIX_CLOCK_SELECTION]: Likewise.
9501
9502 * tst-mutex4.c: Use test-skeleton.c.
9503 * tst-spin2.c: Likewise.
9504 * tst-sysconf.c: Likewise.
9505 * tst-barrier2.c: Likewise.
9506 * tst-cond4.c: Likewise.
9507 * tst-cond6.c: Likewise.
9508 * tst-rwlock4.c: Likewise.
9509 * tst-unload.c: Likewise.
9510 * tst-flock2.c (do_test): Use return instead of exit.
9511
4baa087a
RM
95122003-03-22 Jakub Jelinek <jakub@redhat.com>
9513
9514 * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
9515
5a3ab2fc
UD
95162003-03-21 Ulrich Drepper <drepper@redhat.com>
9517
9f07eae2
UD
9518 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
9519 (__lll_mutex_trylock): Use atomic_compare_and_exchange_val_acq
9520 instead of __lll_compare_and_swap.
9521 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
9522 Likewise.
9523 Removed definition if __lll_compare_and_swap.
9524
5a3ab2fc
UD
9525 * cancellation.c: Adjust for new form of compare&exchange macros.
9526 * cleanup_defer.c: Likewise.
9527 * init.c: Likewise.
9528 * libc-cancellation.c: Likewise.
9529 * old_pthread_cond_broadcast.c: Likewise.
9530 * old_pthread_cond_signal.c: Likewise.
9531 * old_pthread_cond_timedwait.c: Likewise.
9532 * old_pthread_cond_wait.c: Likewise.
9533 * pthread_cancel.c: Likewise.
9534 * pthread_create.c: Likewise.
9535 * pthread_detach.c: Likewise.
9536 * pthread_join.c: Likewise.
9537 * pthread_key_delete.c: Likewise.
9538 * pthread_setcancelstate.c: Likewise.
9539 * pthread_setcanceltype.c: Likewise.
9540 * pthread_timedjoin.c: Likewise.
9541 * pthread_tryjoin.c: Likewise.
9542 * sysdeps/pthread/createthread.c: Likewise.
9543
b1aea098
UD
95442003-03-20 Ulrich Drepper <drepper@redhat.com>
9545
9546 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Include <atomic.h>.
4baa087a 9547 Remove __lll_add, __lll_dec_if_positive, and __lll_test_and_set
b1aea098
UD
9548 definitions. Replace uses with calls to atomic_* functions.
9549 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
9550 * sysdeps/unix/sysv/linux/lowlevellock.c: Replace __lll_add and
9551 __lll_test_and_set calls with atomic_exchange_and_add and
9552 atomic_exchange calls respectively.
9553 * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
9554 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
9555 * sysdeps/unix/sysv/linux/sem_trywait.c: Likewise.
9556 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
9557 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Likewise.
9558 * sysdeps/unix/sysv/linux/ia64/sem_port.c: Likewise.
9559 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
9560
9561 * allocatestack.c (allocate_stack): Assume atomic_exchange_and_add
9562 returns the old value.
9563
100a7100
RM
95642003-03-20 Martin Schwidefsky <sky@mschwid3.boeblingen.de.ibm.com>
9565
9566 * sysdeps/s390/pthread_spin_lock.c (pthread_spin_lock): Use type
9567 int for variable OLDVAL and correct inline assembler contraint.
9568 * sysdeps/s390/pthread_spin_trylock.c (pthread_spin_trylock): Use
9569 type int for variable OLD.
9570
9571 * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it
9572 only for s390-32.
9573 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
9574 (SINGLE_THREAD_P): Use global variable __local_multiple_threads
9575 instead of multiple_threads field in the TCB.
9576
95767b36
UD
95772003-03-19 Ulrich Drepper <drepper@redhat.com>
9578
4009bf40
UD
9579 * sysdeps/i386/i686/bits/atomic.h: Removed.
9580 * sysdeps/i386/i586/bits/atomic.h: Removed.
9581 * sysdeps/i386/i486/bits/atomic.h: Removed. Moved to glibc.
9582 * sysdeps/x86_64/bits/atomic.h: Removed. Moved to glibc.
9583 * sysdeps/s390/bits/atomic.h: Removed. Moved to glibc.
9584 * sysdeps/sh/bits/atomic.h: Removed. Moved to glibc.
9585 * sysdeps/ia64/bits/atomic.h: Removed. Moved to glibc.
9586 * sysdeps/powerpc/bits/atomic.h: Removed. Moved to glibc.
9587 * atomic.h: Removed. Moved to glibc.
9588
560a784f
UD
9589 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Add
9590 support for clock selection.
9591
95767b36
UD
9592 * sysdeps/pthread/pthread_cond_broadcast.c: Release lock before
9593 signalling waiters.
9594
043ad426
RM
95952003-03-18 Roland McGrath <roland@redhat.com>
9596
94659495
RM
9597 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
9598 Add __lll_rel_instr first. Add memory clobber.
9599 (lll_mutex_unlock): Use __lll_test_and_set.
9600 From Paul Mackerras <paulus@samba.org>.
9601
9602 * sysdeps/powerpc/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define
9603 unconditionally.
9604 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
9605 (SINGLE_THREAD_P): Add `header.' prefix.
9606 From Paul Mackerras <paulus@samba.org>.
9607
043ad426
RM
9608 * Versions (libpthread: GLIBC_2.3.2): Move pthread_tryjoin_np and
9609 pthread_timedjoin_np to ...
9610 (libpthread: GLIBC_2.3.3): ... here.
9611 (libpthread: GLIBC_2.2): Move pthread_barrierattr_getpshared there too.
9612
9613 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
9614 Avoid shadowing VAL variable.
9615
9616 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
9617 New macro.
9618
86a9ee5e
UD
96192003-03-18 Ulrich Drepper <drepper@redhat.com>
9620
ac9e0aa1
UD
9621 * Makefile (tests): Add tst-cond11.
9622 * tst-cond11.c: New file.
9623
a14b373c
UD
9624 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Reorder
9625 struct passed to cleanup handler to eliminate one more
9626 instruction.
9627 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9628
24a49f38
UD
9629 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
9630 (pthrad_cond_t): Replace __unused field with __clock.
9631
9632 * sysdeps/pthread/pthread_cond_wait.c: Release condvar lock before
9633 waken all waiters in cleanup handler.
9634 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
9635 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
9636
86a9ee5e
UD
9637 * pthread_condattr_getclock.c: New file.
9638 * pthread_condattr_setclock.c: New file.
9639 * sysdeps/pthread/pthread.h: Declare these new functions.
9640 * Versions [GLIBC_2.3.3] (libpthread): Add the new functions.
9641 * Makefile (libpthread-routines): Add the new functions.
9642 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_condattr):
9643 Renamed field to value. Document use of the bits.
9644 * pthread_condattr_getpshared.c: Adjust for struct pthread_condattr
9645 change.
9646 * pthread_condattr_setpshared.c: Likewise.
d5cb8389 9647 * pthread_cond_init.c (__pthread_cond_init): Initialized __clock field.
86a9ee5e
UD
9648 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add cond_clock symbol.
9649 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
9650 Add __clock field.
9651 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
9652 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
9653 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
9654 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
9655 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
9656 Implement clock selection.
9657 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
9658 * pthread-errnos.sym: Add ENOSYS.
9659 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
9660 _POSIX_CLOCK_SELECTION.
9661 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
9662
9663 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Remove
9664 invalid .size directive.
9665
98054a05
RM
96662003-03-17 Roland McGrath <roland@redhat.com>
9667
9668 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
9669 Formatting tweaks.
9670
001bea71
UD
96712003-03-17 Ulrich Drepper <drepper@redhat.com>
9672
4773086e
UD
9673 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Use __builtin_expect.
9674 Use __lll_add instead of spelling it out. Use protected symbol names.
9675 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Use __builtin_expect.
9676 Use __lll_add.
9677 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_compare_and_swap):
9678 Renamed from lll_compare_and_swap. Use new name where necessary.
9679 (__lll_add): Defined.
9680 (__lll_dec_if_positive): Defined.
9681 (__lll_test_and_set): Defined.
9682 * sysdeps/ia64/pthread_spin_init.c: Removed.
9683 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Removed.
9684 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Removed.
9685 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Removed.
9686 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Removed.
9687 * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: Removed.
9688 * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: Removed.
9689 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Removed.
001bea71
UD
9690 * sysdeps/ia64/bits/atomic.h: Add __builtin_expect where appropriate.
9691 * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
9692 __sync_lock_release_si.
9693 Patch by Jakub Jelinek.
9694
9695 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
9696 Fix timeout handling.
9697 (__lll_timedwait_tid): Likewise.
9698 (lll_unlock_wake_cb): Wake up other waiters if necessary.
9699 Patch by Jakub Jelinek.
9700
9701 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Pretty printing.
9702
de4471dd
RM
97032003-03-17 Roland McGrath <roland@redhat.com>
9704
9705 PowerPC port contributed by Paul Mackerras <paulus@samba.org>.
9706 * sysdeps/pthread/pthread_spin_init.c: New file.
9707 * sysdeps/pthread/pthread_spin_unlock.c: New file.
9708 * sysdeps/powerpc/Makefile: New file.
9709 * sysdeps/powerpc/pthread_spin_lock.c: New file.
9710 * sysdeps/powerpc/pthread_spin_trylock.c: New file.
9711 * sysdeps/powerpc/pthreaddef.h: New file.
9712 * sysdeps/powerpc/tcb-offsets.sym: New file.
9713 * sysdeps/powerpc/td_ta_map_lwp2thr.c: New file.
9714 * sysdeps/powerpc/tls.h: New file.
9715 * sysdeps/powerpc/bits/atomic.h: New file.
9716 * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: New file.
9717 * sysdeps/unix/sysv/linux/libc-lowlevellock.c: New file.
9718 * sysdeps/unix/sysv/linux/lowlevellock.c: New file.
98054a05 9719
de4471dd
RM
9720 * sysdeps/unix/sysv/linux/lowlevelmutex.c: New file.
9721 * sysdeps/unix/sysv/linux/sem_post.c: New file.
9722 * sysdeps/unix/sysv/linux/sem_timedwait.c: New file.
9723 * sysdeps/unix/sysv/linux/sem_trywait.c: New file.
9724 * sysdeps/unix/sysv/linux/sem_wait.c: New file.
9725 * sysdeps/unix/sysv/linux/powerpc/Makefile: New file.
9726 * sysdeps/unix/sysv/linux/powerpc/createthread.c: New file.
9727 * sysdeps/unix/sysv/linux/powerpc/fork.c: New file.
9728 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: New file.
9729 * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: New file.
9730 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: New file.
9731 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: New file.
9732 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: New file.
9733 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
9734 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New file.
9735
9736 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Use __gettimeofday,
9737 not gettimeofday.
9738 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Likewise.
9739 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
9740 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Likewise.
9741 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Likewise.
9742 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
9743
5778033f
UD
97442003-03-17 Ulrich Drepper <drepper@redhat.com>
9745
9746 * sysdeps/pthread/pthread_cond_wait.c: Correct exit criteria.
9747 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
9748 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9749 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
9750 Patch by Ewald Snel <ewald@rambo.its.tudelft.nl>.
9751
796038f8
RM
97522003-03-16 Roland McGrath <roland@redhat.com>
9753
9754 * tst-fork4.c: Include <string.h>.
9755 * tst-signal2.c: Likewise.
9756 * tst-mutex5.c (do_test): exit -> return.
9757 * tst-mutex2.c: Include <stdlib.h>.
9758
51d0678c
UD
97592003-03-16 Ulrich Drepper <drepper@redhat.com>
9760
5778033f
UD
9761 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
9762 (__lll_mutex_timedlock_wait): Correct expected value after
9763 spurious wakeup. Otherwise we would never wait again.
9764
b6e2f87a
UD
9765 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Work around red
9766 zone versus inline asm stupidity. Use correct instructions.
9767
51d0678c
UD
9768 * tst-rwlock6.c: Add some more status output.
9769
8112cc70
RM
97702003-03-15 Roland McGrath <roland@redhat.com>
9771
9772 * sysdeps/pthread/configure.in: New file.
9773 * sysdeps/pthread/configure: New file (generated).
9774
49773c19
UD
97752003-03-15 Ulrich Drepper <drepper@redhat.com>
9776
9777 * allocatestack.c (allocate_stack): Store the exact stack size of
9778 user allocated stacks.
9779
eec0ca9f
JJ
97802003-03-15 Jakub Jelinek <jakub@redhat.com>
9781
9782 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
9783 (SINGLE_THREAD): Use `header' prefix instead of `header.data'.
9784 * sysdeps/sh/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
9785 * sysdeps/sh/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define.
9786 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
9787 Use `header.' prefix.
9788 * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
9789
a87731e2
UD
97902003-03-15 Ulrich Drepper <drepper@redhat.com>
9791
9792 * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Don't use
9793 __builtin_frame_address, use stack pointer.
9794
9795 * sysdeps/unix/sysv/linux/jmp-unwind.c: Use CURRENT_STACK_FRAME
9796 instead of __builtin_frame_pointer.
9797
e22a221d
UD
97982003-03-14 Ulrich Drepper <drepper@redhat.com>
9799
92ed3daf
UD
9800 * tst-basic1.c (do_test): Add cast to avoid warning.
9801 * tst-basic2.c (do_test): Likewise.
9802
9b89567d
UD
9803 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use correct
9804 amount of stack correction.
9805
e22a221d
UD
9806 * tst-fork4.c: Use test-skeleton.c.
9807
2e49caba
RM
98082003-03-14 Roland McGrath <roland@redhat.com>
9809
9810 * init.c: Fix typo "#eli" for "#else".
9811
415ef7d8
RM
98122003-03-14 Steven Munroe <sjmunroe@us.ibm.com>
9813
9814 * allocatestack.c (__stack_user): Use hidden_data_def.
9815 * pthread_create.c (__pthread_keys): Likewise.
9816
9817 * init.c [__powerpc__] (__NR_set_tid_address): Define it.
9818
52287505
RM
98192003-03-14 Roland McGrath <roland@redhat.com>
9820
415ef7d8
RM
9821 * tst-fork4.c: New file.
9822 * Makefile (tests): Add it.
9823
52287505
RM
9824 * descr.h (struct pthread): Move the union out of [!TLS_DTV_AT_TP], so
9825 we always define the padding space.
9826 [!TLS_DTV_AT_TP]: Give tcbhead_t field a name, `header', since GCC
9827 stopped supporting its own extensions fully.
9828 [TLS_MULTIPLE_THREADS_IN_TCB]: Put `multiple_threads' inside a wrapper
9829 struct also called `header', so `header.multiple_threads' is the field
9830 name to use on all machines.
9831 * allocatestack.c (allocate_stack): Use `header.' prefix.
9832 * sysdeps/pthread/createthread.c (create_thread): Likewise.
9833 * pthread_create.c (__pthread_create_2_1): Likewise.
9834 * sysdeps/i386/tls.h (INSTALL_NEW_DTV, THREAD_DTV): Likewise.
9835 (THREAD_SELF): Likewise.
9836 * sysdeps/x86_64/tls.h: Likewise.
9837 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
9838 (SINGLE_THREAD_P): Likewise.
9839 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
9840 (SINGLE_THREAD_P): Likewise.
9841 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
9842 (SINGLE_THREAD_P): Likewise.
9843
9844 * sysdeps/s390/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Use REGS[18]
9845 value directly.
9846
c44bf9aa
UD
98472003-03-14 Ulrich Drepper <drepper@redhat.com>
9848
e22a221d
UD
9849 * pthread_create.c (start_thread): Use CALL_THREAD_FCT if defined.
9850 * sysdeps/i386/tls.h: Define CALL_THREAD_FCT.
9851
0eb18281
UD
9852 * pthread_create.c (start_thread): setjmp is expected to return 0.
9853
c44bf9aa
UD
9854 * sysdeps/x86_64/tls.h (THREAD_GETMEM): Mark asms volatile.
9855 (THREAD_GETMEM_NC): Likewise.
9856
564cd8b6
UD
98572003-03-13 Ulrich Drepper <drepper@redhat.com>
9858
9859 * allocatestack.c (allocate_stack): If MULTI_PAGE_ALIASING is defined
9860 and the size of the stack which must be allocated is a multiple,
9861 allocate one more page.
9862 * sysdeps/i386/i686/Makefile: Don't define COLORING_INCREMENT, but
9863 MULTI_PAGE_ALIASING.
9864
6461e577
RM
98652003-03-13 Roland McGrath <roland@redhat.com>
9866
9867 * pthread_create.c (start_thread): Set EXITING_BIT after the
9868 event-reporting (and destructors), not before.
9869
b5ec5617
UD
98702003-03-13 Jakub Jelinek <jakub@redhat.com>
9871
6461e577
RM
9872 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_timed_wait,
9873 lll_futex_wake): Declare register variables as long int instead of
9874 unsigned long int. Patch by Ian Wienand <ianw@gelato.unsw.edu.au>.
9875 Make syscall arguments clobbered by the syscall.
9876 (lll_futex_wait): Define using lll_futex_timed_wait.
9877
9878 * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Cast regs[13]
9879 to void *.
9880
9881 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Only declare and set
9882 PPID if [! NDEBUG].
9883
9884 * allocatestack.c (nptl_ncreated): Only declare if
9885 COLORING_INCREMENT != 0.
9886
9887 * pthreadP.h (__pthread_enable_asynccancel_2): New prototype.
9888 (__libc_enable_asynccancel_2): Remove prototype.
9889
b5ec5617
UD
9890 * sysdeps/unix/sysv/linux/ia64/fork.c (ARCH_FORK): Swap ptid and
9891 ctid to match kernel.
9892
d0369fb8
UD
98932003-03-12 Ulrich Drepper <drepper@redhat.com>
9894
7588880f
UD
9895 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add
9896 libc_multiple_threads.
9897 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Move definition of
9898 __libc_multiple_threads to...
9899 * sysdeps/unix/sysv/linux/libc_multiple_threads.c: ...here. New file.
9900
9901 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Remove unnecessary
9902 versioning.
9903 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
9904 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
9905
9906 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
9907 (__pthread_once_internal): Define.
9908
9909 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Use shlib-compat.h
9910 macros instead of .symver directly.
9911 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
9912 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
9913
d0369fb8
UD
9914 * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Include tcb-offsets.h.
9915 * sysdeps/x86_64/tcb-offsets.sym: New file.
9916 * sysdeps/x86_64/Makefile: New file.
9917
9918 * sysdeps/i386/tcb-offsets.sym: Add SELF.
9919 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use SELF
9920 to access own pthread_t in TCB.
9921 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
9922 Likewise.
9923 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
9924 Likewise.
9925 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
9926
0bb2ac85
RM
99272003-03-12 Roland McGrath <roland@redhat.com>
9928
9929 * pthread-errnos.sym: New file.
9930 * Makefile (gen-as-const-headers): New variable, list that file.
9931 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include generated
9932 header <pthread-errnos.h> instead of defining errno values here.
9933 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
9934 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
9935 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
9936 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
9937 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
9938 Likewise.
9939 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
9940 Likewise.
9941 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
9942 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9943 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
9944 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
9945 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
9946 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
9947 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
9948 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
9949 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
9950 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
9951 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
9952 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
9953 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
9954 * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
9955 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
9956 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
9957 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
9958 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
9959 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
9960 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
9961 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
9962 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
9963 * sysdeps/i386/i486/pthread_spin_trylock.S: Likewise.
9964 * sysdeps/x86_64/pthread_spin_trylock.S: Likewise.
9965 * sysdeps/sh/pthread_spin_trylock.S: Likewise.
9966 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
9967 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
9968
9969 * sysdeps/unix/sysv/linux/fork.c: Add an assert to check that
9970 CLONE_CHILD_SETTID worked.
9971
35e148cb
UD
99722003-03-12 Ulrich Drepper <drepper@redhat.com>
9973
d0369fb8
UD
9974 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: New
9975 file.
9976 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S: New
9977 file.
9978
9979 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
9980 (pthread_cond_t): Add padding.
9981
da49194d
UD
9982 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: New file.
9983 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: New file.
9984 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: New file.
9985
35e148cb
UD
9986 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
9987 (__pthread_rwlock_timedwrlock): Add missing opcode suffix.
9988 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
9989 (__pthread_rwlock_timedrdlock): Likewise.
9990 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
9991 (__pthread_rwlock_wrlock): Likewise.
9992 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
9993 (__pthread_rwlock_rdlock): Likewise.
9994
9995 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: New file.
9996
9997 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Return
9998 result of lock re-get if it fails.
9999
3e976b96
UD
100002003-03-11 Ulrich Drepper <drepper@redhat.com>
10001
5a03acfe
UD
10002 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Fix asm syntax.
10003 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
10004 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
10005 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
10006 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
10007 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
10008 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
10009 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
10010 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
10011 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
10012
10013 * sysdeps/x86_64/tls.h (THREAD_SELF, THREAD_GETMEM, THREAD_GETMEM_NC,
10014 THREAD_SETMEM, THREAD_SETMEM_NC): Correct asm syntax.
10015
10016 * allocatestack.c [! TLS_MULTIPLE_THREADS_IN_TCB] (allocate_stack):
10017 Initialize *__libc_multiple_threads_ptr not __libc_multiple_threads.
10018 * sysdeps/pthread/createthread.c [! TLS_MULTIPLE_THREADS_IN_TCB]
10019 (create_thread): Likewise.
10020 Define __pthread_multiple_threads and __libc_multiple_threads_ptr.
10021 * init.c (__pthread_initialize_minimal_internal): Initialize
10022 __libc_multiple_threads_ptr if necessary.
10023 * pthreadP.h: Adjust prototype for __libc_pthread_init. Declare
10024 __pthread_multiple_threads and __libc_multiple_threads_ptr.
10025 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Define
10026 __libc_multiple_threads.
10027 (__libc_pthread_init): Return pointer to __libc_pthread_init if
10028 necessary.
10029
10030 * sysdeps/i386/tls.h (THREAD_SETMEM): Fix one-byte variant.
10031 (THREAD_SETMEM_NC): Likewise.
10032
10033 * sysdeps/x86_64/pthread_spin_trylock.c: Removed.
10034 * sysdeps/x86_64/pthread_spin_trylock.S: New file.
10035 * sysdeps/x86_64/pthread_spin_unlock.c: Removed.
10036 * sysdeps/x86_64/pthread_spin_unlock.S: New file.
10037
10038 * sysdeps/i386/i486/pthread_spin_trylock.S (pthread_spin_trylock):
10039 Eliminate one entire instruction.
10040
32a589b1
UD
10041 * cancellation.c (__pthread_enable_asynccancel_2): New function.
10042 * pthreadP.h: Declare __pthread_enable_asynccancel_2.
10043 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
10044 (__pthread_cond_timedwait): Use __pthread_enable_asynccancel_2
10045 instead of __pthread_enable_asynccancel.
10046 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
10047 (__pthread_cond_wait): Likewise.
10048 * sysdeps/pthread/pthread_cond_timedwait.c
10049 (__pthread_cond_timedwait): Likewise.
10050 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
10051
3e976b96
UD
10052 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
10053 (__condvar_cleanup): Wake up all waiters in case we got signaled
10054 after being woken up but before disabling asynchronous
10055 cancellation.
10056 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
10057 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
10058 (__condvar_cleanup): Likewise.
10059
10060 * init.c (__NR_set_tid_address): If already defined, don't redefine.
10061 Make it an error if architecture has no #if case. Add x86-64.
10062
10063 * sysdeps/unix/sysv/linux/x86_64/Makefile: Add flags for
10064 pt-initfini.s generation.
10065
10066 * sysdeps/x86_64/tls.h: Include <asm/prctl.h>.
10067 (TLS_INIT_TP): Fix typo.
10068
6c477888
UD
100692003-03-11 Jakub Jelinek <jakub@redhat.com>
10070
10071 * sysdeps/ia64/bits/atomic.h (atomic_exchange_and_add): Swap 2nd and
10072 3rd argument of __arch_compare_and_exchange_{32,64}_val_acq.
10073
10074 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Include semaphore.h.
10075 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
10076 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Likewise.
10077 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Likewise.
10078 * sysdeps/unix/sysv/linux/s390/sem_post.c: Likewise.
10079 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
10080 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
10081 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
10082
ea694823
UD
100832003-03-11 Ulrich Drepper <drepper@redhat.com>
10084
6c477888
UD
10085 * sysdeps/pthread/pthread_cond_timedwait.c
10086 (__pthread_cond_timedwait): Return the result of the final
10087 locking. If it succeeds, the regular function return value.
10088
10089 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait):
10090 Return result of the final locking.
10091 * version.c (__nptl_main): Work around problems with the strange
10092 INTERNAL_SYSCALL macro on ppc32.
10093 * init.c (__pthread_initialize_minimal_internal): Unblock
10094 SIGCANCEL in case the parent blocked it.
10095 Reported by Paul Mackerras <paulus@samba.org>.
10096
ea694823
UD
10097 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: New file.
10098 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: New file.
10099 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: New file.
10100
b33e6163
RM
101012003-03-11 Jakub Jelinek <jakub@redhat.com>
10102
10103 * sysdeps/pthread/pthread_cond_timedwait.c
10104 (__pthread_cond_timedwait): Unlock and fail if
10105 __pthread_mutex_unlock_internal failed.
10106
10107 * sysdeps/pthread/createthread.c (ARCH_CLONE): Define if not defined.
10108 (create_thread): Only assert PD->tcb != NULL under [TLS_TCB_AT_TP].
10109 Use ARCH_CLONE.
10110 * allocatestack.c (ALLOCATE_STACK_PARMS): New macro.
10111 [NEED_SEPARATE_REGISTER_STACK] (STACK_VARIABLES,
10112 STACK_VARIABLES_ARGS, STACK_VARIABLES_PARMS, ALLOCATE_STACK_PARMS,
10113 ALLOCATE_STACK): New macros.
10114 (TLS_TPADJ): New macro.
10115 (get_cached_stack, queue_stack, __deallocate_stack): Use TLS_TPADJ.
10116 (allocate_stack): Handle TLS_DTV_AT_TP and
10117 NEED_SEPARATE_REGISTER_STACK. Use TLS_TPADJ.
10118 * pthread_create.c (__pthread_create_2_1) [! TLS_TCB_AT_TP]:
10119 Don't set PD->self.
10120 * init.c [__ia64__] (__NR_set_tid_address): Define.
10121
10122 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: New file.
10123 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: New file.
10124 * sysdeps/unix/sysv/linux/ia64/fork.c: New file.
10125 * sysdeps/unix/sysv/linux/ia64/createthread.c: New file.
10126 * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: New file.
10127 * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: New file.
10128 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: New file.
10129 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: New file.
10130 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: New file.
10131 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
10132 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: New file.
10133 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: New file.
10134 * sysdeps/unix/sysv/linux/ia64/sem_post.c: New file.
10135 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: New file.
10136 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: New file.
10137 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: New file.
10138 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
10139 * sysdeps/ia64/bits/atomic.h: New file.
10140 * sysdeps/ia64/Makefile: New file.
10141 * sysdeps/ia64/pthread_spin_init.c: New file.
10142 * sysdeps/ia64/pthread_spin_lock.c: New file.
10143 * sysdeps/ia64/pthread_spin_trylock.c: New file.
10144 * sysdeps/ia64/pthread_spin_unlock.c: New file.
10145 * sysdeps/ia64/pthreaddef.h: New file.
10146 * sysdeps/ia64/tcb-offsets.sym: New file.
10147 * sysdeps/ia64/td_ta_map_lwp2thr.c: New file.
10148 * sysdeps/ia64/tls.h: New file.
10149
10150 * sysdeps/s390/pthreaddef.h (__exit_thread_inline): Pass 1 argument
10151 to syscall instead of no arguments.
10152
2b30b2e5
UD
101532003-03-10 Ulrich Drepper <drepper@redhat.com>
10154
db5f2fc9
UD
10155 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: New file.
10156 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: New file.
10157 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: New file.
10158 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: New file.
10159
10160 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Fix error value in
10161 unused code.
10162
6a4263e3
UD
10163 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: New file
10164
3de7c2a9
UD
10165 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
10166 lowlevelbarrier.sym.
10167 * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: New file.
10168 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S:
10169 Include lowlevelbarrier.h and don't define offsets locally.
6a4263e3 10170 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Likewise.
3de7c2a9 10171
2a544d82
UD
10172 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
10173 (__lll_mutex_lock_wait): Reverse order of first two parameters.
10174 (__lll_mutex_timedlock_wait): Likewise.
10175 (lll_mutex_lock): Adjust asm for that.
10176 (lll_mutex_timedlock): Likewise. Mark cx, cc, r10 as clobbered.
10177 (lll_lock): Adjust asm for operand order change.
10178 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: New file.
10179 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: New file.
10180
ec06436c
UD
10181 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_lock_wait):
10182 Reverse order of parameters.
10183 (__lll_timedwait_tid): Remove regparms attribute.
10184 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: New file.
10185 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: New file.
10186
3273832c
UD
10187 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
10188 (__lll_timedwait_tid): Remove one unnecessary instruction.
10189
51f32ab8
UD
10190 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Define
10191 __lll_mutex_timedlock_wait only for NOT_IN_libc.
10192 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Include
10193 lowlevelmutex.S.
10194
10195 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
10196 lll_unlock_wake_cb, __lll_wait_tid, and __lll_timedwait_tid only
10197 for NOT_IN_libc.
10198 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Include
10199 lowlevellock.S.
10200
fad48d9e
UD
10201 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Don't define
10202 LOCK is already defined. Don't define __lll_mutex_timedlock_wait
10203 for libc.so.
10204 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Only
10205 define LOCK here (if UP is not defined). The actual code is in
10206 lowlevelmutex.S.
10207
9356d063
UD
10208 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Don't define
10209 LOCK is already defined. Don't define lll_unlock_wake_cb and
10210 __lll_timedwait_tid for libc.so.
10211 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Only
10212 define LOCK here (if UP is not defined). The actual code is in
10213 lowlevellock.S.
10214
ebf0cbc5 10215 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Not needed anymore.
106f6f9d
UD
10216 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: Likewise.
10217 * sysdeps/unix/sysv/linux/s390/sem_post.c: Include lowlevellock.h
10218 instead of lowlevelsem.h.
10219 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
10220 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
10221 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
0be8ee21 10222
c915e5ad
UD
10223 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
10224 lowlevelrwlock.sym.
10225 * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: New file.
10226 * sysdeps/unix/sysv/linux/i386/lowlevelrwlock.h: Removed.
146fa1ee 10227 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: Removed.
c915e5ad 10228
4c3c2e8a
UD
10229 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_trylock): Fix
10230 register loading.
10231 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_trylock): Undo
10232 last changed. D'oh.
10233
2b30b2e5
UD
10234 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: New file.
10235
10236 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove declaration
10237 of __libc_locking_needed.
10238 (lll_trylock): Initialize %eax to zero.
10239
2b30b2e5
UD
10240 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Update
10241 pthread_cond_t definition.
10242
e48f9638
RM
102432003-03-10 Roland McGrath <roland@redhat.com>
10244
10245 * sysdeps/unix/sysv/linux/lowlevelcond.sym: New file.
10246 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add it.
10247 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: File removed.
10248 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: Likewise.
10249 * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: Likewise.
10250
10251 * allocatestack.c (allocate_stack) [!TLS_MULTIPLE_THREADS_IN_TCB]:
10252 Instead of setting PD->multiple_threads, set globals
10253 __pthread_multiple_threads and __libc_multiple_threads.
10254 * sysdeps/pthread/createthread.c (create_thread): Likewise.
10255 * sysdeps/i386/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it.
10256 * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Likewise.
10257
10258 * descr.h (struct pthread): Conditionalize first member on
10259 [!TLS_DTV_AT_TP]. Replace the `header' member with an anonymous union
10260 containing an anonymous tcbhead_t. Move `list' member out.
10261 [TLS_MULTIPLE_THREADS_IN_TCB]: Define a `multiple_threads' member.
10262 * allocatestack.c: Remove use of `header.data.' prefix.
10263 * pthread_create.c: Likewise.
10264 * init.c (__pthread_initialize_minimal_internal): Likewise.
10265 * sysdeps/pthread/createthread.c (create_thread): Likewise.
10266 * sysdeps/i386/tls.h (INSTALL_DTV): Add parens.
10267 (THREAD_SELF, THREAD_DTV, INSTALL_NEW_DTV): No `header.data.' prefix.
10268 * sysdeps/x86_64/tls.h: Likewise.
10269 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
10270 (SINGLE_THREAD_P): Likewise.
10271 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
10272 (SINGLE_THREAD_P): Likewise.
10273 * sysdeps/i386/tls.h (tcbhead_t): Remove `list' member.
10274 * sysdeps/s390/tls.h (tcbhead_t): Likewise.
10275
c37cae9e
UD
102762003-03-09 Ulrich Drepper <drepper@redhat.com>
10277
d38c777e
RM
10278 * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: New file.
10279
7b44a5e0 10280 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
2b30b2e5 10281 * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
7b44a5e0 10282
c2e5e085
UD
10283 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix many
10284 leftovers from the ia32 code.
10285
10286 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Remove unneccessary
10287 memory load.
10288 (clear_once_control): Don't load %esi.
10289
10290 * sysdeps/x86_64/tls.h: Remove all traces of segment descriptor
10291 handling.
10292
10293 * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
10294
cd4b2a55
UD
10295 * sysdeps/unix/sysv/linux/s390/createthread.c: Moved to...
10296 * sysdeps/unix/sysv/linux/createthread.c: ...here.
10297
c37cae9e
UD
10298 * Makefile (tests): Add tst-cond10.
10299 * tst-cond10.c: New file.
10300
d130a341
UD
103012003-03-08 Ulrich Drepper <drepper@redhat.com>
10302
ccf1d573
UD
10303 * tst-tls2.c (do_test): Add TEMP_FAILURE_RETRY around sem_wait call.
10304 * tst-signal3.c (do_test): Likewise.
10305 * tst-sem5.c (do_test): Likewise.
10306 * tst-kill6.c (do_test): Likewise.
10307 * tst-tls3.c (do_test): Likewise. Include <errno.h>.
10308
10309 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use add/sub instead
10310 of inc/dec.
10311 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
10312 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise
10313 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
10314 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
10315 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
10316 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
10317 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
10318 Likewise.
10319 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
10320 Likewise.
10321 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
10322 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
10323 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10324 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
10325 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
10326 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
10327 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
10328 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
10329
d130a341
UD
10330 * allocatestack.c (allocate_stack): If mprotect() fails free the
10331 TLS memory.
10332
bc6389ad
UD
103332003-03-07 Ulrich Drepper <drepper@redhat.com>
10334
41d4d223
UD
10335 * sysdeps/i386/i486/bits/atomic.h: Fix a few unused definitions.
10336
10337 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove all trace of
10338 lll_wake_tid. This was used only to work around kernel limits in
10339 the early days.
10340 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
10341 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Likewise.
10342 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
10343 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
10344
bc6389ad
UD
10345 * init.c (__static_tls_align_m1): Renamed from __static_tls_align.
10346 (__pthread_initialize_minimal_internal): Change initialization of
10347 __static_tls_align_m1 appropriately.
10348 * pthreadP.h (__static_tls_align_m1): Renamed from
10349 __static_tls_align.
10350 * allocatestack.c (allocate_stack): Use __static_tls_align_m1
10351 instead of __static_tls_align-1.
10352
cc775edf
UD
103532003-03-04 Ulrich Drepper <drepper@redhat.com>
10354
0de28d5c 10355 * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
6245b6ae 10356
518b5308
UD
10357 * pthread_create.c: Define __pthread_keys using nocommon
10358 attribute, not by placing it explicitly in bss.
10359 Remove DEFINE_DEALLOC definition. Not needed anymore.
10360
10361 * allocatestack.c: Define ARCH_MAP_FLAGS if not already defined.
10362 Use it in mmap call to allocate stacks.
10363
10364 * sysdeps/pthread/createthread.c (create_thread): Fix comment.
10365
cc775edf
UD
10366 * pthread_create.c (start_thread): Use THREAD_SETMEM to store
10367 result of the thread function.
10368
4f6f0a8f
UD
103692003-03-03 Ulrich Drepper <drepper@redhat.com>
10370
f04a2721
UD
10371 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: Removed. The generic
10372 version is just fine.
10373
4f6f0a8f
UD
10374 * sysdeps/unix/sysv/linux/libc_pthread_init.c
10375 (__pthread_child_handler): Renamed from pthread_child_handler,
10376 exported, and marked hidden. Change all users.
10377 * sysdeps/unix/sysv/linux/register-atfork.c (free_mem): Do not
10378 free __pthread_child_handler from child list.
10379
7ce5c164
UD
103802003-03-03 Martin Schwidefsky <schwidefsky@de.ibm.com>
10381
10382 * atomic.h (atomic_exchange_and_add): Return newval, not oldval.
10383
10384 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
10385 Fix handling of cancellation and failing pthread_mutex_unlock call.
10386 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
10387 (__pthread_cond_wait): Likewise.
10388
10389 * sysdeps/pthread/pthread_rwlock_timedrdlock.c
10390 (pthread_rwlock_timedrdlock): Fix clobber of result variable by
10391 lll_futex_timed_wait call.
10392 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
10393 (pthread_rwlock_timedwrlock): Likewise.
10394
10395 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
10396 Don't define lll_unlock_wake_cb and ___lll_timedwait_tid in libc.so.
10397 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Remove XXX comments.
10398
10399 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Fix
10400 check of lll_futex_wake return value.
10401
ea6a015b
RM
104022003-03-03 Roland McGrath <roland@redhat.com>
10403
10404 * forward.c: Fix typo in __pthread_attr_init_2_0 compat_symbol decl.
10405
10406 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
10407 Argument to ptr___pthread_cleanup_upto is __jmp_buf, not jmp_buf.
10408 * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
10409
4adacf57
UD
104102003-03-02 Ulrich Drepper <drepper@redhat.com>
10411
1be3d664
UD
10412 * sysdeps/pthread/timer_create.c (timer_create): Return correct
10413 error for CPU clocks.
10414
885bafa1
UD
10415 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
10416 _POSIX_MONOTONIC_CLOCK.
10417 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
10418
4adacf57
UD
10419 * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
10420 recent kernels.
10421
86bfff4d
UD
104222003-03-01 Ulrich Drepper <drepper@redhat.com>
10423
10424 * descr.h (struct pthread): Move cleanup field to the front.
10425
d1149385
RM
104262003-03-01 Roland McGrath <roland@redhat.com>
10427
10428 * sem_open.c (sem_open): Braino fix.
10429
bd8bb78b
UD
104302003-03-01 Ulrich Drepper <drepper@redhat.com>
10431
748bec08
UD
10432 * sysdeps/i386/tcb-offsets.sym: Add CLEANUP and CLEANUP_PREV.
10433 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Inline
10434 __pthread_cleanup_pop functionality.
10435 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10436
bd8bb78b
UD
10437 * descr.h (struct pthread): Move tid field to the front now that
10438 it is often used.
10439
10440 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S
10441 (__lll_mutex_timedlock_wait): Remove.
10442 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
10443 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
10444 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
10445 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
10446 (lll_unlock_wake_cb): Don't save and restore %esi.
10447 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
10448 %esi.
10449 (__lll_timedwait_tid): Add alignment.
10450 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
10451 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
10452 %esi.
10453 (__lll_timedwait_tid): Removed.
10454 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
10455 (__pthread_cond_broadcast): Don't save, load, and restore %esi.
10456 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
10457 (pthread_barrier_wait): Don't save, load, and restore %esi for
10458 last thread.
10459 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
10460 (__pthread_cond_signal): Don't save, load, and restore %esi.
10461 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
10462 (__pthread_rwlock_unlock): Don't save, load, and restore %esi.
10463 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
10464 Don't save, load, and restore %esi.
10465
d2637c70
UD
104662003-02-27 Ulrich Drepper <drepper@redhat.com>
10467
567fb22a
UD
10468 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
10469 Release lock before waking up the waiters.
10470
427f5fa1
UD
10471 * tst-exit1.c (do_test): Don't start more than one thread in parallel.
10472
a2d83cfb
UD
10473 * tst-rwlock9.c (writer_thread): Correct adding TIMEOUT.
10474 (reader_thread): Likewise.
10475
d2637c70
UD
10476 * sysdeps/pthread/pthread_rwlock_unlock.c
10477 (__pthread_rwlock_unlock): Release internal lock early. Don't try
10478 to wake up readers if there are none.
10479
10480 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
10481 Release internal lock before wake threads.
10482
b1531183
UD
104832003-02-26 Ulrich Drepper <drepper@redhat.com>
10484
dbf6131c
UD
10485 * Makefile (tests): Add tst-rwlock10 and tst-rwlock11.
10486 * tst-rwlock8.c: Initialize lock with INIT. Allow INIT to be
10487 predefined.
10488 * tst-rwlock9.c: Likewise.
10489 * tst-rwlock10.c: New file.
10490 * tst-rwlock11.c: New file.
10491
695799fe
UD
10492 * Makefile (tests): Add tst-dlsym1.
10493 * tst-dlsym1.c: New file.
10494
b1531183
UD
10495 * init.c (__pthread_initialize_minimal_internal): Set
10496 GL(dl_error_catch_tsd) to __libc_dl_error_tsd.
10497 * Versions (libc:GLIBC_PRIVATE): Export __libc_dl_error_tsd.
10498
3724f268
UD
104992003-02-24 Ulrich Drepper <drepper@redhat.com>
10500
3857ca78
UD
10501 * sem_open.c (sem_open): Fix handling of O_CREAT without O_EXCL.
10502
80d80779
UD
10503 * tst-cond2.c: Fix sychronization with child.
10504
86371308
UD
10505 * tst-rwlock8.c (reader_thread): Remove unused variable.
10506
ffeb4481
UD
10507 * Makefile: Add rules to build and run tst-tls3.
10508 * tst-tls3.c: New file.
10509 * tst-tls3mod.c: New file.
10510
3724f268
UD
10511 * Makefile (tests): Add tst-rwlock8 and tst-rwlock9.
10512 * tst-rwlock8.c: New file.
10513 * tst-rwlock9.c: New file.
10514 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Fix
10515 complete broken rwlock implementation.
10516 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
10517 Likewise.
10518 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
10519 Likewise.
10520 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
10521 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
18a53579
UD
10522 * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
10523 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
10524 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
10525 * sysdeps/pthread/pthread_rwlock_unlock.c: Likewise.
10526 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
3724f268 10527
8915cc40
RM
105282003-02-23 Roland McGrath <roland@redhat.com>
10529
10530 * Makefile (nptl-version): Change regexp so case sensitivity is ok.
10531
fd1a0d0c
UD
105322003-02-23 Ulrich Drepper <drepper@redhat.com>
10533
ecf28959
UD
10534 * Makefile (tests): Add tst-context1.
10535 * tst-context1.c: New file.
10536
5e47b76b
UD
10537 * Makefile (tests): Add tst-tls1 and tst-tls2.
10538 * tst-tls1.c: New file.
10539 * tst-tls2.c: New file.
10540
5a6bbb41
UD
10541 * libc-cancellation.c (__libc_enable_asynccancel): Correct test
10542 for failed cmpxchg.
10543
fd1a0d0c
UD
10544 * pthread_create.c (start_thread): Set EXITING_BIT early.
10545
10546 * sysdeps/i386/tls.h (THREAD_GETMEM): Mark asm as volatile.
10547 (THREAD_GETMEM_NC): Likewise.
10548
757f9fcb
UD
105492003-02-22 Ulrich Drepper <drepper@redhat.com>
10550
b1b8e747
UD
10551 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Shave
10552 off 3 more bytes by using offset-less instructions when possible.
10553
c780aa21 10554 * Makefile: Add dependency for $(objpfx)version.d.
757f9fcb
UD
10555
10556 * eintr.c (eintr_source): Add unnecessary return but the compiler
10557 insists.
10558
10559 * tst-kill3.c: Include <unistd.h>.
10560
5148559c
RM
105612003-02-21 Roland McGrath <roland@redhat.com>
10562
10563 * pthread_create.c (start_thread): Call __libc_thread_freeres.
10564
ab2d98e3
UD
105652003-02-21 Ulrich Drepper <drepper@redhat.com>
10566
71028edd
UD
10567 * Makefile (tests): Add tst-eintr1.
10568 (distribute): Add eintr.c.
10569 * tst-eintr1.c: New file.
10570 * eintr.c: New file.
10571
e814f748
UD
10572 * pthread_cancel.c (pthread_cancel): Use tkill directly.
10573
10574 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill):
10575 Disallow sending SIGCANCEL.
10576
ab2d98e3 10577 * Makefile (tests): Remove tst-basic7. Add tst-kill1, tst-kill2,
9c03686d 10578 tst-kill3, tst-kill4, tst-kill5, tst-kill6.
e814f748
UD
10579 * tst-kill1.c: New file.
10580 * tst-kill2.c: New file.
10581 * tst-kill3.c: New file.
10582 * tst-kill5.c: New file.
9c03686d 10583 * tst-kill6.c: New file.
e814f748
UD
10584 * tst-basic7.c: Renamed to...
10585 * tst-kill4.c: ...this.
ab2d98e3 10586
59fed0e2
RM
105872003-02-21 Roland McGrath <roland@redhat.com>
10588
10589 * Makefile (install-lib-ldscripts): New variable.
10590
49dc759f
UD
105912003-02-21 Ulrich Drepper <drepper@redhat.com>
10592
8c2e9a29
UD
10593 * pthreadP.h: Define INVALID_TD_P and INVALID_NOT_TERMINATED_TD_P.
10594 * pthread_cancel.c: Use INVALID_TD_P.
10595 * pthread_detach.c: Likewise.
10596 * pthread_getschedparam.c: Likewise.
10597 * pthread_setschedparam.c: Likewise.
10598 * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
10599 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
10600 * pthread_join.c: Use INVALID_NOT_TERMINATED_TD_P.
10601 * pthread_timedjoin.c: Likewise.
10602
10603 * tst-basic7.c: Include <signal.h>.
10604
49dc759f
UD
10605 * pthread_join.c (pthread_join): Limited checking for invalid
10606 descriptors.
10607 * pthread_timedjoin.c (pthread_timedjoin_np): Likewise.
10608
df5803bf
UD
106092003-02-20 Ulrich Drepper <drepper@redhat.com>
10610
c5acd3d7
UD
10611 * pthread_create.c (deallocate_tsd): Reset found_nonzero at the
10612 beginning of the loop. Clear the entire first block of TSD.
df5803bf
UD
10613 * Makefile (tests): Add tst-key4.
10614 * tst-key4.c: New file.
10615
729924a0
UD
106162003-02-18 Ulrich Drepper <drepper@redhat.com>
10617
2f7dc594
UD
10618 * Makefile (tests): Add tst-basic7.
10619 * tst-basic7.c: New file.
10620
ba25bb0f
UD
10621 * pthread_create.c (deallocate_tsd): Mark as internal_function.
10622 Add some more __builtin_expect.
10623
12fd3c5f 10624 * pthreadP.h: Define dummy version of DEBUGGING_P.
729924a0 10625
5430d926
UD
106262003-02-17 Ulrich Drepper <drepper@redhat.com>
10627
b0db7fbe
UD
10628 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remnove
10629 _POSIX_THREAD_PRIORITY_SCHEDULING.
10630 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
10631 _XOPEN_REALTIME_THREADS.
10632 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
10633
10634 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): The
10635 kernel returns EINVAL for PID <= 0, work around it.
10636
ecfda9bd
UD
10637 * Makefile (tests): Add tst-signal5.
10638 * tst-signal5.c: New file.
10639
7d78ab99
UD
10640 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
10641 and LOGIN_NAME_MAX.
10642
371a2972
UD
10643 * tst-cancel1.c (tf): Block all signals.
10644
5430d926
UD
10645 * Makefile (tests): Add tst-basic6.
10646 * tst-basic6.c: New file.
10647
10648 * tst-basic1.c: Add test for process ID.
10649
10650 * Makefile (tests): Add tst-cancel10.
10651 * tst-cancel10.c: New file.
10652
10653 * Makefile (tests): Add tst-signal4.
10654 * tst-signal4.c: New file.
10655
10656 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use
10657 __sigismember instead of sigismember. Add __builtin_expect.
10658
1564916a
UD
106592003-02-16 Ulrich Drepper <drepper@redhat.com>
10660
179ff175
UD
10661 * tst-attr1.c (do_test): Add tests for pthread_setcanceltype,
10662 pthread_setcancelstate, and pthread_rwlock_setpshared.
10663
e4335f9a
UD
10664 * tst-cancel7.c (do_test): Make sure the pid file exists before
10665 canceling the thread.
10666
0a37669a
UD
10667 * tst-rwlock6.c: More pthread_rwlock_timedwrlock and
10668 pthread_rwlock_timedrdlock tests.
10669 * tst-rwlock7.c: More pthread_rwlock_timedwrlock tests.
10670 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
10671 Check for invalid tv_nsec field.
10672 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
10673 Likewise.
10674
10675 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Protect
10676 recursive mutex of overflow.
10677
10678 * tst-attr1.c (do_test): Add test for pthread_mutexattr_setpshared.
10679
e4335f9a 10680 * libc-cancellation.c (__libc_enable_asynccancel): Rewrite to avoid
1564916a
UD
10681 going into an endless loop.
10682 * Makefile (tests): Add tst-cancel9.
10683 * tst-cancel9.c: New file.
10684
10685 * pthread_cancel.c (pthread_cancel): Use the result of __pthread_kill.
10686
b270b548
UD
106872003-02-15 Ulrich Drepper <drepper@redhat.com>
10688
1c82b97f
UD
10689 * tst-mutex5.c (do_test): Add more timedlock tests.
10690
b2f05465 10691 * tst-mutex2.c: Tests of trylock and unlock with ERROR mutexes.
c3bb9ee1
UD
10692 * tst-mutex3.c (do_test): Add tests for trylock with RECURSIVE mutexes.
10693
e798b60f
UD
10694 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
10695 use INLINE_SYSCALL. Error number is returned, not -1.
10696
90491dc4
UD
10697 * pthreadP.h: Mark declarations of __find_in_stack_list, __free_tcb,
10698 and __deallocate_stack with internal_function.
10699 * pthread_create.c: Adjust definitions appropriately.
10700 * allocatestack.c: Likewise.
10701
10702 * pthread_join.c: Add one more __builtin_expect.
10703 * pthread_timedjoin.c: Likewise.
10704
10705 * pthread_getspecific.c (__pthread_getspecific): Clear data->data
10706 not data of sequence number does not match.
10707 Add one __builtin_expect.
10708
c6247c9d
UD
10709 * Makefile (tests): Add tst-clock1.
10710 * tst-clock1.c: New file.
10711
b270b548
UD
10712 * pthread_setconcurrency.c (pthread_setconcurrency): Fail for
10713 negative arguments.
10714 * Makefile (tests): Add tst-basic5.
10715 * tst-basic5.c: New file.
10716
700bf7af
UD
107172003-02-14 Ulrich Drepper <drepper@redhat.com>
10718
757de559
UD
10719 * Makefile (tests): Add tst-basic4.
10720 * tst-basic4.c: New file.
10721
47202270
UD
10722 * pthreadP.h: Add declaraction for __nptl_nthreads.
10723 * pthread_create.c: Define __nptl_nthreads
10724 (start_thread): Increment __nptl_nthreads at beginning. Decrement
b270b548 10725 after thread is done. If then zero, call exit(0).
47202270
UD
10726 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
10727 Add ptr_nthreads. Define HAVE_PTR_NTHREADS.
10728 * init.c (pthread_functions): Initialize ptr_nthreads.
10729 * allocatestack.c (nptl_nthreads): Remove definition and all uses.
10730 (__reclaim_stacks): Decrement __nptl_nthreads.
10731 * sysdeps/pthread/Makefile [$(subdir)==csu] (CFLAGS-libc-start.c):
10732 Define.
10733 * Makefile (tests): Add tst-basic3.
10734 * tst-basic3.c: New file.
10735
e320ef46
UD
10736 * descr.h: Define CANCELING_BIT and CANCELING_BITMASK. Introduce
10737 after CANCELTYPE_BIT, move the other bits up. Update CANCEL_RESTMASK.
10738 * init.c (sigcancel_handler): Also set CANCELING_BITMASK bit in newval.
10739 * pthread_cancel.c (pthread_cancel): Likewise. Also set CANCELING_BIT
10740 if asynchronous canceling is enabled.
10741 * pthread_join.c (pthread_join): When recognizing circular joins,
10742 take into account the other thread might be already canceled.
10743 * Makefile (tests): Add tst-join5.
10744 * tst-join5.c: New file.
10745
700bf7af
UD
10746 * Makefile (tests): Add tst-join4.
10747 * tst-join4.c: New file.
10748
107492003-02-13 Ulrich Drepper <drepper@redhat.com>
10750
10751 * tst-cond4.c (main): Add test of pthread_attr_getpshared.
10752
dac0f772
UD
107532003-02-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
10754
10755 * sysdeps/s390/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM,
10756 THREAD_SETMEM_NC): Use passed descr instead of THREAD_SELF.
10757 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind): Avoid
10758 warning.
10759 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Include <sys/time.h>
10760 to avoid warning.
10761 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Return
10762 error if lll_futex_wake failed.
10763
e8cda341
UD
107642003-02-13 Ulrich Drepper <drepper@redhat.com>
10765
a7720b5e
UD
10766 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Fix
10767 handling of cancellation and failung pthread_mutex_unlock call.
10768 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10769 * Makefile (tests): Add tst-cond8 and tst-cond9.
10770 * tst-cond8.c: New file.
10771 * tst-cond9.c: New file.
10772
a1ea4c06
UD
10773 * tst-cond7.c (do_test): Unlock the mutex before canceling the thread.
10774
10775 * sysdeps/pthread/pthread.h: Add missing initializers. Protect
10776 non-standard initializers with __USE_GNU.
10777
e8cda341
UD
10778 * Makefile (tests): Add tst-cleanup3.
10779 * tst-cleanup3.c: New file.
10780
2067577c
UD
107812003-02-12 Ulrich Drepper <drepper@redhat.com>
10782
89e78a95
UD
10783 * Makefile (tests): Add tst-attr1 and tst-attr2.
10784 * tst-attr1.c: New file.
10785 * tst-attr2.c: New file.
10786
dfdd294a
UD
10787 * Makefile: Add rules to build and run tst-atfork2 test.
10788 * tst-atfork2.c: New file.
10789 * tst-atfork2mod.c: New file.
10790
10791 * sysdeps/unix/sysv/linux/unregister-atfork.c
10792 (__unregister_atfork): Free the memory allocated for the handlers
10793 after removing them from the lists.
10794
10795 * sysdeps/unix/sysv/linux/register-atfork.c: Define memeory
10796 cleanup function.
10797
10798 * tst-atfork1.c (do_test): Wait for the child we forked.
10799 Report error in child.
10800
10801 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Fix comment.
10802
2067577c
UD
10803 * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
10804
2a8a8a84
UD
108052003-02-10 Ulrich Drepper <drepper@redhat.com>
10806
d9dd121e
UD
10807 * Makefile (tests): Add tst-cancel8.
10808 * tst-cancel8.c: New file.
10809
2a8a8a84
UD
10810 * sysdeps/unix/sysv/linux/i386/pthread_once.S (clear_once_control): Fix
10811 clearing of control variable.
defd1870 10812 * Makefile (tests): Add tst-once3 and tst-once4.
2a8a8a84 10813 * tst-once3.c: New file.
defd1870 10814 * tst-once4.c: New file.
2a8a8a84 10815
a54e8d33
UD
108162003-02-08 kaz Kojima <kkojima@rr.iij4u.or.jp>
10817
10818 * sysdeps/sh/Makefile: New file.
10819 * sysdeps/sh/bits/atomic.h: New file.
10820 * sysdeps/sh/pthread_spin_init.c: New file.
10821 * sysdeps/sh/pthread_spin_lock.c: New file.
10822 * sysdeps/sh/pthread_spin_trylock.S: New file.
10823 * sysdeps/sh/pthread_spin_unlock.S: New file.
10824 * sysdeps/sh/pthreaddef.h: New file.
10825 * sysdeps/sh/tcb-offsets.sym: New file.
10826 * sysdeps/sh/td_ta_map_lwp2thr.c: New file.
10827 * sysdeps/sh/tls.h: New file.
10828 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: New file.
10829 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: New file.
10830 * sysdeps/unix/sysv/linux/sh/createthread.c: New file.
10831 * sysdeps/unix/sysv/linux/sh/fork.c: New file.
10832 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: New file.
10833 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: New file.
10834 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h: New file.
10835 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: New file.
10836 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: New file.
10837 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: New file.
10838 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: New file.
10839 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: New file.
10840 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
10841 * sysdeps/unix/sysv/linux/sh/pt-vfork.S: New file.
10842 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: New file.
10843 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: New file.
10844 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: New file.
10845 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: New file.
10846 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: New file.
10847 * sysdeps/unix/sysv/linux/sh/pthread_once.S: New file.
10848 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: New file.
10849 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: New file.
10850 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: New file.
10851 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: New file.
10852 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: New file.
10853 * sysdeps/unix/sysv/linux/sh/sem_post.S: New file.
10854 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: New file.
10855 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: New file.
10856 * sysdeps/unix/sysv/linux/sh/sem_wait.S: New file.
10857 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
10858
696e556e
UD
108592003-02-08 Ulrich Drepper <drepper@redhat.com>
10860
10861 * tst-cond2.c: Rearrange code to not rely on behavior undefined
10862 according to POSIX.
10863
10864 * tst-basic2.c (do_test): Lock mutex before creating the thread.
10865
fef710d6
UD
108662003-02-07 Ulrich Drepper <drepper@redhat.com>
10867
c6180643
UD
10868 * sysdeps/x86_64/tls.h: Remove unnecessary macros, left over from x86.
10869 (TLS_GET_FS): New #define.
10870 (TLS_SET_FS): New #define.
10871 Correct value of __NR_set_thread_area.
10872
fef710d6
UD
10873 * sysdeps/x86_64/td_ta_map_lwp2thr.c: New file.
10874
11090a99
UD
108752003-02-06 Ulrich Drepper <drepper@redhat.com>
10876
65c68990
UD
10877 * Makefile (tests): Add tst-popen1.
10878 * tst-popen1.c: New file.
10879
11090a99
UD
10880 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Remove wrong
10881 but inactive generalization.
10882 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10883 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
10884 Minor optimization, remove one instruction.
10885 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
10886
a88c9263
UD
108872003-02-04 Martin Schwidefsky <schwidefsky@de.ibm.com>
10888
10889 * sysdeps/unix/sysv/linux/s390/fork.c: Correct order of parameters.
10890
108912003-01-31 Martin Schwidefsky <schwidefsky@de.ibm.com>
10892
10893 * init.c (__NR_set_tid_address): Add #ifdef for s390.
10894 * sysdeps/pthread/pthread_barrier_wait.c: New file.
10895 * sysdeps/pthread/pthread_cond_broadcast.c: New file.
10896 * sysdeps/pthread/pthread_cond_signal.c: New file.
10897 * sysdeps/pthread/pthread_cond_timedwait.c: New file.
10898 * sysdeps/pthread/pthread_cond_wait.c: New file.
10899 * sysdeps/pthread/pthread_rwlock_rdlock.c: New file.
10900 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: New file.
10901 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: New file.
10902 * sysdeps/pthread/pthread_rwlock_unlock.c: New file.
10903 * sysdeps/pthread/pthread_rwlock_wrlock.c: New file.
10904 * sysdeps/s390/Makefile: New file.
10905 * sysdeps/s390/bits/atomic.h: New file.
10906 * sysdeps/s390/pthread_spin_init.c: New file.
10907 * sysdeps/s390/pthread_spin_lock.c: New file.
10908 * sysdeps/s390/pthread_spin_trylock.c: New file.
10909 * sysdeps/s390/pthread_spin_unlock.c: New file.
10910 * sysdeps/s390/pthreaddef.h: New file.
10911 * sysdeps/s390/tcb-offsets.sym: New file.
10912 * sysdeps/s390/td_ta_map_lwp2thr.c: New file.
10913 * sysdeps/s390/tls.h: New file.
10914 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: New file.
10915 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: New file.
10916 * sysdeps/unix/sysv/linux/s390/createthread.c: New file.
10917 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: New file.
10918 * sysdeps/unix/sysv/linux/s390/fork.c: New file.
10919 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: New file.
10920 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
10921 * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: New file.
10922 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: New file.
10923 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: New file.
10924 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: New file.
10925 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: New file.
10926 * sysdeps/unix/sysv/linux/s390/pthread_once.c: New file.
10927 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: New file.
10928 * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: New file.
10929 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
10930 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
10931 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: New file.
10932 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
10933 * sysdeps/unix/sysv/linux/s390/sem_post.c: New file.
10934 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: New file.
10935 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
10936 * sysdeps/unix/sysv/linux/s390/sem_wait.c: New file.
10937
6f1cff95
UD
109382003-02-04 Ulrich Drepper <drepper@redhat.com>
10939
ec609a8e
UD
10940 * atomic.h: Add a couple more default implementations.
10941 (atomic_compare_and_exchange_acq): Use
d45e8740
UD
10942 __arch_compare_and_exchange_32_acq in return value definition. It
10943 always exists.
10944 (atomic_bit_set): Renamed from atomic_set_bit.
0289bef9 10945 Add missing atomic_ prefixes.
e3ec8904 10946
6f1cff95
UD
10947 * sysdeps/pthread/bits/libc-lock.h (__libc_once): In case no
10948 thread library is available, use correct value to mark initialized
10949 once variable.
10950
4f088329
UD
109512003-02-03 Ulrich Drepper <drepper@redhat.com>
10952
6f1cff95
UD
10953 * allocatestack.c (allocate_stack): Use __getpagesize instead of
10954 __sysconf to determine pagesize.
10955
3e4fc359 10956 * pthread_create.c: Include <atomic.h>.
4f088329
UD
10957 * allocatestack.c (allocate_stack): Implement coloring of the
10958 allocated stack memory. Rename pagesize to pagesize_m1. It's the
10959 size minus one. Adjust users.
3e4fc359 10960 * sysdeps/i386/i686/Makefile: New file.
4f088329 10961
2f42e8be
UD
109622003-02-02 Ulrich Drepper <drepper@redhat.com>
10963
4301f7e2
UD
10964 * allocatestack.c: Improve comment throughout the file.
10965
2f42e8be 10966 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
a37818b3 10967 (__lll_lock_wait): Add branch prediction.
2f42e8be
UD
10968 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
10969 (__lll_lock_wait): Likewise.
10970 (lll_unlock_wake_cb): Removed.
10971
4a7d6545
UD
109722003-01-31 Ulrich Drepper <drepper@redhat.com>
10973
10974 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Remove
10975 _POSIX_THREAD_PRIORITY_SCHEDULING.
10976
886d5973
UD
109772003-01-30 Jakub Jelinek <jakub@redhat.com>
10978
10979 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
10980 Fix return type of ptr___pthread_getspecific.
10981
e474ca78
UD
109822003-01-29 Ulrich Drepper <drepper@redhat.com>
10983
10984 * Makefile (tests): Add tst-umask1.
10985 (tst-umask1-ARGS): Define.
10986 * tst-umask1.c: New file.
10987
e6ebd2e4
UD
109882003-01-28 Ulrich Drepper <drepper@redhat.com>
10989
6cf26f41
UD
10990 * Makefile (libpthread-routines): Remove lowlevelrwlock. Add
10991 pthread_rwlock_rdlock, pthread_rwlock_timedrdlock,
10992 pthread_rwlock_wrlock, pthread_rwlock_timedwrlock, and
10993 pthread_rwlock_unlock.
10994 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Removed
10995 * sysdeps/unix/sysv/linux/i386/i586/lowlevelrwlock.S: Removed
10996 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Removed
10997 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: New file.
10998 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
10999 New file.
11000 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: New file.
11001 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
11002 New file.
11003 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: New file.
11004 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_rdlock.S: New file.
11005 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedrdlock.S:
11006 New file.
11007 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_wrlock.S: New file.
11008 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedwrlock.S:
11009 New file.
11010 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_unlock.S: New file.
11011 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_rdlock.S: New file.
11012 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedrdlock.S:
11013 New file.
11014 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_wrlock.S: New file.
11015 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedwrlock.S:
11016 New file.
11017 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_unlock.S: New file.
11018
1d087a7e
UD
11019 * Makefile (libpthread-routines): Remove lowlevelcond and
11020 lowlevelsem. Add sem_wait, sem_trywait, sem_timedwait, sem_post,
11021 pthread_cond_wait, pthread_cond_timedwait, pthread_cond_signal,
11022 and pthread_cond_broadcast.
4a99d160
UD
11023 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Removed
11024 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Removed
11025 * sysdeps/unix/sysv/linux/i386/i586/lowlevelsem.S: Removed
11026 * sysdeps/unix/sysv/linux/i386/i586/lowlevelcond.S: Removed
11027 * sysdeps/unix/sysv/linux/i386/i686/lowlevelsem.S: Removed
11028 * sysdeps/unix/sysv/linux/i386/i686/lowlevelcond.S: Removed
11029 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: New file.
11030 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: New file.
11031 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: New file.
11032 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: New file.
11033 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: New file.
11034 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: New file.
11035 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: New file.
11036 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: New file.
11037 * sysdeps/unix/sysv/linux/i386/i586/sem_wait.S: New file.
11038 * sysdeps/unix/sysv/linux/i386/i586/sem_trywait.S: New file.
11039 * sysdeps/unix/sysv/linux/i386/i586/sem_timedwait.S: New file.
11040 * sysdeps/unix/sysv/linux/i386/i586/sem_post.S: New file.
11041 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_wait.S: New file.
11042 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_timedwait.S: New file.
11043 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_signal.S: New file.
11044 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_broadcast.S: New file.
11045 * sysdeps/unix/sysv/linux/i386/i686/sem_wait.S: New file.
11046 * sysdeps/unix/sysv/linux/i386/i686/sem_trywait.S: New file.
11047 * sysdeps/unix/sysv/linux/i386/i686/sem_timedwait.S: New file.
11048 * sysdeps/unix/sysv/linux/i386/i686/sem_post.S: New file.
11049 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_wait.S: New file.
11050 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S: New file.
11051 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_signal.S: New file.
11052 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_broadcast.S: New file.
11053 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: New file.
1d087a7e 11054
e6ebd2e4
UD
11055 * sysdeps/unix/sysv/linux/i386/createthread.c: Define
11056 PREPARE_CREATE and TLS_VALUE with x86-specific bits. All the rest
11057 of the code is moved to ...
11058 * sysdeps/pthread/createthread.c: ...here. New file.
11059
a15698cb
UD
110602003-01-27 Ulrich Drepper <drepper@redhat.com>
11061
0566b130
UD
11062 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S
11063 (__new_sem_post): Clear %eax before returning.
11064 Reported by MAEDA Naoaki <maeda.naoaki@jp.fujitsu.com>.
11065
e6fb8846
UD
11066 * Makefile (tests): Add tst-cleanup2.
11067 * tst-cleanup2.c: New file.
11068
a15698cb
UD
11069 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
11070 Interpret first parameter correctly.
11071
8824b0a1
UD
110722003-01-17 Ulrich Drepper <drepper@redhat.com>
11073
11074 * Makefile (headers): Add bits/semaphore.h.
11075
850dcfca
UD
110762003-01-16 Jakub Jelinek <jakub@redhat.com>
11077
11078 * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize _head->sysinfo even
11079 if not SHARED.
11080
574b892e
UD
110812003-01-14 Ulrich Drepper <drepper@redhat.com>
11082
a8d87c92
UD
11083 * sem_open.c (sem_open): Return SEM_FAILED if existing semaphore
11084 must be used and mapping failed.
11085 Reported by Luke Elliott <luke.elliott@activfinancial.com>.
11086
574b892e
UD
11087 * Makefile (CFLAGS-pthread_self.os): Define this, not
11088 CFLAGS-pthread_self.c.
11089
fb48047a
UD
110902003-01-13 Ulrich Drepper <drepper@redhat.com>
11091
47805511
UD
11092 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Don't export
11093 lll_unlock_wake_cb.
11094
fb48047a
UD
11095 * Makefile (libpthread-routines): Add version. Add rules to build
11096 version.os and banner.h.
11097 * version.c: New file.
11098
115bb61d
UD
110992003-01-13 Jakub Jelinek <jakub@redhat.com>
11100
11101 * pthread_mutex_lock.c (__pthread_mutex_lock_internal): Make
11102 the alias unconditional.
11103 * pthread_mutex_unlock.c (__pthread_mutex_unlock_internal): Likewise.
11104
111052003-01-13 Ulrich Drepper <drepper@redhat.com>
11106
11107 * Makefile (CFLAGS-pthread_self.c): New definition.
11108
6aca81bb
UD
111092003-01-06 Jakub Jelinek <jakub@redhat.com>
11110
11111 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Add
11112 INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
11113 * sysdeps/unix/sysv/linux/raise.c (raise): Likewise.
11114 * init.c (__pthread_initialize_minimal_internal): Likewise.
11115
e9c7764e
UD
111162003-01-07 Jakub Jelinek <jakub@redhat.com>
11117
b5facfda
UD
11118 * pthreadP.h (__pthread_cond_timedwait): Add prototype.
11119
e9c7764e
UD
11120 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
11121 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
11122 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
11123 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
11124 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
11125 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
11126
bef1e42f
UD
111272003-01-06 Jakub Jelinek <jakub@redhat.com>
11128
11129 * pthreadP.h (LIBC_CANCEL_HANDLED): Define.
11130 * pt-system.c (LIBC_CANCEL_HANDLED): Add.
11131 * tst-cancel-wrappers.sh: Remove all exceptions.
11132
bbd17455
UD
111332003-01-05 Ulrich Drepper <drepper@redhat.com>
11134
a73ab6df
UD
11135 * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
11136 features. Reported by Marijn Ros <marijn@mad.scientist.com>.
11137
bbd17455
UD
11138 * sysdeps/unix/sysv/linux/jmp-unwind.c: Include <pthread-functions.h>.
11139 Use __libc_pthread_functions array if SHARED.
11140
11141 * pthreadP.h: Move pthread_cond_2_0_t definition to...
11142 * sysdeps/unix/sysv/linux/internaltypes.h: ...here.
11143
11144 * sysdeps/pthread/bits/libc-lock.h (__libc_ptf_call): New #define.
11145 (__libc_rwlock_rdlock, __libc_rwlock_wrlock, __libc_rwlock_unlock,
11146 __libc_key_create, __libc_getspecific, __libc_setspecific): Use
11147 __libc_ptf_call instead of __libc_maybe_call.
11148 (PTF): New #define.
11149 (__libc_cleanup_region_start): Wrap function name with PTF call.
11150 (__libc_cleanup_region_end): Likewise.
11151 (__libc_cleanup_end): Likewise.
11152
11153 * pthread_getspecific.c: Add __pthread_getspecific_internal alias.
11154 * pthread_setspecific.c: Add __pthread_setspecific_internal alias.
11155 * pthread_key_create.c: Add __pthread_key_create_internal alias.
11156 * pthreadP.h: Add prototypes.
11157
11158 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Add
11159 __pthread_rwlock_rdlock, __pthread_rwlock_wrlock, and
11160 __pthread_rwlock_unlock aliases.
11161 * pthreadP.h: Add prototypes for new aliases.
11162
11163 * pthreadP.h (struct pthead_functions): Moved to...
11164 * sysdeps/pthread/pthread-functions.h: ...here. New file.
11165 * init.c (pthread_functions): Add initializers for new elements.
11166
11167 * cleanup_defer.c: Add __pthread_cleanup_push_defer and
11168 __pthread_cleanup_pop_restore aliases.
11169 * pthreadP.h: Add prototypes.
11170
11171 * cleanup.c: Rename _GI_pthread_cleanup_push to __pthread_cleanup_push
11172 and _GI_pthread_cleanup_pop to __pthread_cleanup_pop.
11173 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Adjust caller.
11174 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
11175 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
11176 * pthreadP.h: Adjust prototypes and callers.
11177
d27a78be
UD
111782003-01-04 Ulrich Drepper <drepper@redhat.com>
11179
b74121ae
UD
11180 * Makefile (tests): Add tst-cancel7.
11181 (tst-cancel7-ARGS): New variable.
bbd17455 11182 * tst-cancel7.c: New file.
b74121ae 11183
29bc410c
UD
11184 * old_pthread_cond_broadcast.c: Optimize initialization a bit to work
11185 around gcc defficiencies.
11186 * old_pthread_cond_signal.c: Likewise.
11187 * old_pthread_cond_timedwait.c: Likewise.
11188 * old_pthread_cond_wait.c: Likewise.
11189
d27a78be
UD
11190 * pthreadP.h (pthread_cond_2_0_t): Remove unneeded lock element.
11191
733f25e6
UD
111922003-01-03 Ulrich Drepper <drepper@redhat.com>
11193
7edb2ae3
UD
11194 * Makefile (tests): Add tst-cond7.
11195 * tst-cond7.c: New file.
11196
b1151300
UD
11197 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
11198 (condvar_cleanup): Get condvar address from the right place.
11199
733f25e6
UD
11200 * atomic.h: Correct definitions of atomic_full_barrier,
11201 atomic_read_barrier, atomic_write_barrier.
11202
11203 * old_pthread_cond_broadcast.c: Make memory allocate and initialization
11204 race-free.
11205 * old_pthread_cond_signal.c: Likewise.
11206 * old_pthread_cond_timedwait.c: Likewise.
11207 * old_pthread_cond_wait.c: Likewise.
11208
686b7223
UD
112092003-01-03 Jakub Jelinek <jakub@redhat.com>
11210
11211 * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
11212
0e07706e
UD
112132003-01-03 Ulrich Drepper <drepper@redhat.com>
11214
997256dd
UD
11215 * pthreadP.h (pthread_cond_2_0_t): New type.
11216 (struct pthread_functions): Use new type for 2.0 condvar callbacks.
11217 Use new type for the 2.0 condvar function prototypes.
11218 * forward.c: Use pthread_cond_2_0_t for 2.0 condvar functions.
11219 * old_pthread_cond_init.c: Use pthread_cond_2_0_t for condvar
11220 parameter.
11221 * old_pthread_cond_destroy.c: Likewise.
11222 * old_pthread_cond_broadcast.c: Likewise. Lock appropriately.
11223 * old_pthread_cond_signal.c: Likewise.
11224 * old_pthread_cond_timedwait.c: Likewise.
11225 * old_pthread_cond_wait.c: Likewise.
11226
842d2817
UD
11227 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
11228 (__pthread_cond_wait): Don't save cancellation mode and seq value
11229 in same location.
11230
0e07706e
UD
11231 * herrno.c (__h_errno_location): Don't define as weak.
11232
bf293afe
UD
112332003-01-02 Jakub Jelinek <jakub@redhat.com>
11234
11235 * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
11236 pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
11237 and pthread_cond_wait.
11238 * old_pthread_cond_broadcast.c (__old_pthread_cond_broadcast):
11239 Renamed to...
11240 (__pthread_cond_broadcast_2_0): ... this.
11241 * old_pthread_cond_destroy.c (__old_pthread_cond_destroy):
11242 Renamed to...
11243 (__pthread_cond_destroy_2_0): ... this.
11244 * old_pthread_cond_init.c (__old_pthread_cond_init):
11245 Renamed to...
11246 (__pthread_cond_init_2_0): ... this.
11247 * old_pthread_cond_signal.c (__old_pthread_cond_signal):
11248 Renamed to...
11249 (__pthread_cond_signal_2_0): ... this.
11250 * old_pthread_cond_wait.c (__old_pthread_cond_wait):
11251 Renamed to...
11252 (__pthread_cond_wait_2_0): ... this.
11253 * pthread_cond_destroy.c: Include shlib-compat.h.
11254 (pthread_cond_destroy): Change strong_alias into versioned_symbol.
11255 * pthread_cond_init.c: Include shlib-compat.h.
11256 (pthread_cond_init): Change strong_alias into versioned_symbol.
11257 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_cond_*
11258 fields to ptr___pthread_cond_* and add ptr___pthread_cond_*_2_0
11259 fields.
11260 (__pthread_cond_broadcast_2_0, __pthread_cond_destroy_2_0,
11261 __pthread_cond_init_2_0, __pthread_cond_signal_2_0,
11262 __pthread_cond_wait_2_0): New prototypes.
11263 (__old_pthread_cond_broadcast, __old_pthread_cond_destroy,
11264 __old_pthread_cond_init, __old_pthread_cond_signal,
11265 __old_pthread_cond_wait): Removed.
11266 * init.c: Include shlib-compat.h.
11267 (pthread_functions): Guard ptr___pthread_attr_init_2_0
11268 initialization with SHLIB_COMPAT (GLIBC_2_0, GLIBC_2_1).
11269 Rename ptr_pthread_cond_* to ptr___pthread_cond_*, initialize
11270 ptr___pthread_cond_*_2_0 fields.
11271 * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
11272 pthread_cond_*@GLIBC_2.0 compatibility symbols.
11273
11274 * sysdeps/pthread/sigaction.c (SIGCANCEL): Only define if
11275 LIBC_SIGACTION was not yet defined.
11276 [!defined LIBC_SIGACTION]: Define LIBC_SIGACTION, #include self.
11277 [!defined LIBC_SIGACTION] (__sigaction): New function and
11278 libc_hidden_weak.
11279 [!defined LIBC_SIGACTION] (sigaction): New weak_alias.
11280 [defined LIBC_SIGACTION]: #include_next <sigaction.c>.
11281
112822003-01-02 Jakub Jelinek <jakub@redhat.com>
11283
11284 * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
11285
05df18c3
UD
112862003-01-02 Ulrich Drepper <drepper@redhat.com>
11287
11288 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
11289 New, larger type definition.
11290 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: New condvar
11291 implementation.
11292 * Versions [libpthread]: Add definitions for new pthread_cond_*
11293 interfaces for version GLIBC_2.3.2.
11294 * pthread_cond_init.c: Update initialization for new type definition.
11295 * Makefile (libpthread-routines): Remove pthread_cond_wait,
11296 pthread_cond_timedwait, pthread_cond_signal, and
11297 pthread_cond_broadcast. Add old_pthread_cond_init,
11298 old_pthread_cond_destroy, old_pthread_cond_wait,
11299 old_pthread_cond_timedwait, old_pthread_cond_signal, and
11300 old_pthread_cond_broadcast.
11301 * old_pthread_cond_broadcast.c: New file.
11302 * old_pthread_cond_destroy.c: New file.
11303 * old_pthread_cond_init.c: New file.
11304 * old_pthread_cond_signal.c: New file.
11305 * old_pthread_cond_timedwait.c: New file.
11306 * old_pthread_cond_wait.c: New file.
11307 * pthreadP.h: Add prototypes for the compatibility interfaces.
11308
11309 * pthread_cond_destroy.c: Don't include <errno.h>.
11310
fd8979e4
UD
113112003-01-01 Ulrich Drepper <drepper@redhat.com>
11312
11313 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Avoid
11314 unnecessary zero offset when addressing MUTEX.
11315
6d6ee629
UD
113162002-12-31 Ulrich Drepper <drepper@redhat.com>
11317
11318 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
11319 __register_atfork.
11320 * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
11321 for __register_atfork.
11322
a4baf360
UD
113232002-12-31 Jakub Jelinek <jakub@redhat.com>
11324
11325 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use __ASSEMBLER__
11326 instead of ASSEMBLER test macro.
11327
11328 * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
11329 __libc_current_sigrtmax): Add libc_hidden_def.
11330
11331 * sysdeps/pthread/list.h: Remove assert.h include.
11332
e9395a94
UD
113332002-12-31 Ulrich Drepper <drepper@redhat.com>
11334
11335 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Use
11336 __pthread_initialize_minimal_internal not
11337 __pthread_initialize_minimal.
11338
89d6e444
UD
113392002-12-30 Ulrich Drepper <drepper@redhat.com>
11340
416d2de6
UD
11341 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Mark
11342 __pthread_initialize_minimal as hidden.
11343
89d6e444
UD
11344 * init.c (__pthread_initialize_minimal_internal): Don't mark as
11345 constructor.
11346
113472002-12-31 Jakub Jelinek <jakub@redhat.com>
11348
11349 * Makefile ($(inst_libdir)/libpthread.so): Depend on
11350 $(common-objpfx)format.lds, include that into the output script.
11351 Fix comment.
11352 (extra-B-pthread.so): Change linuxthreads/ into nptl/.
11353
8cac677c
UD
113542002-12-28 Andreas Jaeger <aj@suse.de>
11355
11356 * sysdeps/unix/sysv/linux/xstatconv.c (xstat_conv): Adjust for
11357 nsec resolution changes.
11358 (xstat64_conv): Likewise.
11359 (xstat32_conv): Likewise.
11360 * sysdeps/unix/sysv/linux/kernel_stat.h: Add nsec resolution for
11361 struct kernel_stat.
11362 * sysdeps/unix/sysv/linux/bits/stat.h: Add nsec resolution for
11363 structs stat and stat64.
11364 * time/time.h (__timespec_defined): Define for __USE_MISC.
89d6e444 11365 * io/sys/stat.h [__USE_MISC]: Define __need_timespec for struct stat.
8cac677c 11366
49e9f864
UD
113672002-12-30 Jakub Jelinek <jakub@redhat.com>
11368
11369 * forward.c (FORWARD2): Renamed from FORWARD3. Remove unused export
11370 argument.
11371 (pthread_attr_init_2_0, pthread_attr_init_2_1): Use FORWARD macro.
11372 (pthread_exit): Use strong_alias to avoid warnings.
11373 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_exit
11374 and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
11375 ptr___pthread_attr_init_2_*.
11376 * init.c (pthread_functions): Adjust.
11377
bab09b26
UD
113782002-12-29 Ulrich Drepper <drepper@redhat.com>
11379
598d7a42
UD
11380 * forward.c: Make all functions available by default again. It
11381 caused too much trouble.
11382
bab09b26
UD
11383 * pt-siglongjmp.c: Removed.
11384
3b7ed871
UD
113852002-12-28 Jakub Jelinek <jakub@redhat.com>
11386
11387 * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
11388 (SYSINFO_OFFSET, MULTIPLE_THREADS_OFFSET): Remove.
11389 * sysdeps/i386/Makefile: New file.
11390 * sysdeps/i386/tcb-offsets.sym: New file.
11391 * sysdeps/pthread/tcb-offsets.h: New file.
11392 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
11393 Remove MULTIPLE_THREADS_OFFSET and SYSINFO_OFFSET checks.
11394
11395 * sysdeps/unix/sysv/linux/Versions [libc] (GLIBC_PRIVATE): Move
11396 __register_atfork...
11397 (GLIBC_2.3.2): ...here.
11398
113992002-12-28 Ulrich Drepper <drepper@redhat.com>
11400
11401 * sysdeps/pthread/pthread.h: Mark pthread_attr_getstackaddr and
11402 pthread_attr_setstackaddr with __attribute_deprecated__.
11403
270d9d47
UD
114042002-12-27 Jakub Jelinek <jakub@redhat.com>
11405
11406 * pt-system.c (system): Remove cancellation handling.
11407 * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
11408 cancellation routines.
11409
131fd126
UD
114102002-12-28 Ulrich Drepper <drepper@redhat.com>
11411
afb2e954
UD
11412 * descr.h: Include <dl-sysdep.h>.
11413 (struct pthread): Move header.data.list to the back of the struct.
131fd126
UD
11414 * sysdeps/i386/tls.h (tcbhead_t): Move list to the back of the struct.
11415 (MULTIPLE_THREADS_OFFSET): Adjust offset.
11416 (SYSINFO_OFFSEET): Likewise.
11417
114182002-12-27 Jakub Jelinek <jakub@redhat.com>
11419
11420 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h (USE_DL_SYSINFO):
11421 Define.
11422 (DL_SYSINFO_DEFAULT): Cast to uintptr_t to avoid warnings.
11423 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h (NEED_DL_SYSINFO,
11424 DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION): Define.
11425 (USE_DL_SYSINFO): Undef.
11426
114272002-12-22 Jakub Jelinek <jakub@redhat.com>
11428
11429 * Makefile (tests-reverse): Use $(objpfx)../libc.so instead of
11430 $(common-objpfx)libc.so.
11431 * tst-cancel4.c (tf_write, tf_writev): Increase buf sizes so that
11432 it is bigger than pipe buffer size even on arches with bigger
11433 page size.
11434 (tf_usleep): Cast usleep argument to useconds_t to avoid warnings.
11435
a218c9cf
UD
114362002-12-25 Ulrich Drepper <drepper@redhat.com>
11437
11438 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Implement
11439 correct errno access for case that USE___THREAD is not defined.
11440
015a2dc9
UD
114412002-12-24 Ulrich Drepper <drepper@redhat.com>
11442
11443 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Add missing #endif.
11444 Patch by Marijn Ros <marijn@mad.scientist.com>.
11445
5220f9ac
RM
114462002-12-22 Roland McGrath <roland@redhat.com>
11447
11448 * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
11449
1561bf63
UD
114502002-12-20 Ulrich Drepper <drepper@redhat.com>
11451
11452 * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_inexpensive): Define.
11453
3325198e
UD
114542002-12-19 Ulrich Drepper <drepper@redhat.com>
11455
057c823f
UD
11456 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Don't define
11457 NEED_DL_SYSINFO since no processor < i686 had the sysenter opcode.
11458 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: New file.
11459
097eca29
UD
11460 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Use ENTER_KERNEL instead
11461 of int $0x80.
11462 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
11463 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Likewise.
11464 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Likewise.
11465 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
11466 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
11467 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Likewise.
11468 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Likewise.
11469 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
11470
11471 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add support for using
11472 sysenter.
11473 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
11474
11475 * sysdeps/i386/tls.h: Unconditionally include <dl-sysdep.h>.
11476
5f5843e3
UD
11477 * allocatestack.c (allocate_stack) [NEED_DL_SYSINFO]: Set sysinfo
11478 in new TCB.
11479 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Check
11480 that sysinfo is properly initialized.
11481 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define RTLD_PRIVATE_ERRNO
11482 to 1 only for ld.so.
11483
3325198e
UD
11484 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
11485 RTLD_CORRECT_DYNAMIC_WEAK.
11486
74e8f2dc
UD
114872002-12-19 Jakub Jelinek <jakub@redhat.com>
11488
11489 * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
11490 Use return 0 as 6th argument to FORWARD4.
11491 * pthread_equal.c: Include pthreadP.h instead of pthread.h.
11492
df45b31e
UD
114932002-12-18 Ulrich Drepper <drepper@redhat.com>
11494
11495 * descr.h (struct pthread) [NEED_DL_SYSINFO]: Add sysinfo member.
11496 * sysdeps/i386/tls.h (tcbhead_t): Add sysinfo member.
11497 Define SYSINFO_OFFSEET if NEED_DL_SYSINFO is defined.
11498 (INIT_SYSINFO): New #define.
11499 (TLS_TP_INIT): Use INIT_SYSINFO.
11500 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
11501 At test to make sure SYSINFO_OFFSET value is correct.
11502 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
11503
3d539579
UD
115042002-12-18 Jakub Jelinek <jakub@redhat.com>
11505
11506 * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
11507 * sysdeps/unix/sysv/linux/raise.c (gsignal): Add weak alias to raise.
11508 * Versions [libc: GLIBC_2.0]: Add pthread_attr_init.
11509 [libpthread: GLIBC_2.1]: Remove __pthread_rwlock_init,
11510 __pthread_rwlock_destroy, __pthread_rwlock_rdlock,
11511 __pthread_rwlock_wrlock, __pthread_rwlock_unlock,
11512 __pthread_rwlock_tryrdlock and __pthread_rwlock_trywrlock.
11513
d7913e0e
UD
115142002-12-18 Ulrich Drepper <drepper@redhat.com>
11515
f051627f
UD
11516 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use ENTER_KERNEL
11517 macro instead of using int $0x80 directly.
11518
d7913e0e
UD
11519 * sysdeps/pthread/bits/stdio-lock.h: New file.
11520 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: New file.
11521 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: New file.
11522 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: New file.
11523 * Makefile (routines): Add libc-lowlevelmutex.
11524
11525 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Remove
11526 __i686.get_pc_thunk.dx.
11527
f077a4a9
UD
115282002-12-17 Jakub Jelinek <jakub@redhat.com>
11529
11530 * Makefile (libpthread-shared-only-routines): Add pt-allocrtsig.
11531 (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
11532 ($(objpfx)tst-cancel-wrappers.out): New rule.
11533 * tst-cancel-wrappers.sh: New test.
11534 * tst-locale1.c: Include signal.h.
11535 (uselocale): Test static linking of __libc_current_sigrt*.
11536
115372002-12-17 Ulrich Drepper <drepper@redhat.com>
11538
11539 * Makefile (tests): Add tst-cancel6.
11540 * tst-cancel6.c: New file
11541
bd499a3b
UD
115422002-12-17 Jakub Jelinek <jakub@redhat.com>
11543
11544 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
11545 Define meaningfully for assembler as well.
11546 * pthreadP.h (struct pthread_functions): Remove
11547 ptr_pthread_attr_init field. Add ptr_pthread_attr_init_2_0
11548 and ptr_pthread_attr_init_2_1 fields.
11549 * init.c (pthread_functions): Initialize ptr_pthread_attr_init_2_0
11550 and ptr_pthread_attr_init_2_1 instead of ptr_pthread_attr_init.
11551 * forward.c (FORWARD4): Renamed from FORWARD3. Add export argument.
11552 (FORWARD3): Define using FORWARD4.
11553 (pthread_attr_init): Provide both @GLIBC_2.0 and @@GLIBC_2.1
11554 versions.
11555 * pt-system.c: Remove duplicate stdlib.h include.
11556
0a1063f4
UD
115572002-12-16 Ulrich Drepper <drepper@redhat.com>
11558
87d60668
UD
11559 * sem_init.c: Define sem_init@GLIBC_2.0.
11560 * sem_destroy.c: Define sem_destroy@GLIBC_2.0.
11561 * sem_getvalue.c: Define sem_getvalue@GLIBC_2.0.
11562
0a1063f4
UD
11563 * flockfile.c: Moved to...
11564 * sysdeps/pthread/flockfile.c: ...here. New file.
11565 * funlockfile.c: Moved to...
11566 * sysdeps/pthread/funlockfile.c: ...here. New file.
11567 * ftrylockfile.c: Moved to...
11568 * sysdeps/pthread/ftrylockfile.c: ...here. New file.
11569
9634cf9d
UD
115702002-12-16 Jakub Jelinek <jakub@redhat.com>
11571
11572 * libc-cancellation.c: Guard both function with
11573 #if !defined NOT_IN_libc.
11574 * Makefile (libpthread-routines): Use ptw-, not pt- prefix for the
11575 automatically provided pthread wrappers.
11576 * pthreadP.h (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define to
11577 CANCEL_* if IS_IN_libpthread and to dummy versions if not in libc
11578 nor in libpthread.
11579 * pt-open.c: Removed.
11580 * pt-fcntl.c: Removed.
11581 * pt-fsync.c: Removed.
11582 * pt-lseek.c: Removed.
11583 * pt-msgrcv.c: Removed.
11584 * pt-msgsnd.c: Removed.
11585 * pt-msync.c: Removed.
11586 * pt-nanosleep.c: Removed.
11587 * pt-open64.c: Removed.
11588 * pt-pause.c: Removed.
11589 * pt-pread.c: Removed.
11590 * pt-pread64.c: Removed.
11591 * pt-pwrite.c: Removed.
11592 * pt-pwrite64.c: Removed.
11593 * pt-read.c: Removed.
11594 * pt-recv.c: Removed.
11595 * pt-recvfrom.c: Removed.
11596 * pt-recvmsg.c: Removed.
11597 * pt-send.c: Removed.
11598 * pt-sendto.c: Removed.
11599 * pt-sigtimedwait.c: Removed.
11600 * pt-sigwait.c: Removed.
11601 * pt-wait.c: Removed.
11602 * pt-waitpid.c: Removed.
11603 * pt-write.c: Removed.
11604 * pt-accept.c: Removed.
11605 * pt-close.c: Removed.
11606 * pt-connect.c: Removed.
11607 * pt-lseek64.c: Removed.
11608 * pt-sendmsg.c: Removed.
11609 * pt-tcdrain.c: Removed.
11610
6ee8d334
UD
116112002-12-15 Ulrich Drepper <drepper@redhat.com>
11612
81fa9371
UD
11613 * init.c (__pthread_initialize_minimal_internal): Renamed from
11614 __pthread_initialize_minimal. Make old name an alias. This
11615 converts a normal relocation into a relative relocation.
11616
f3015aa5
UD
11617 * pt-fcntl.c (__fcntl): Use fcntl64 syscall, not fcntl.
11618
4cbc1950
UD
11619 * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
11620 readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
11621 * Makefile (libpthread-routines): Remove pt-creat, pt-poll,
11622 pt-pselect, pt-readv, pt-select, pt-sigpause, pt-sigsuspend,
11623 pt-sigwaitinfo, pt-waitid, and pt-writev.
11624 * pt-creat.c: Removed.
11625 * pt-poll.c: Removed.
11626 * pt-pselect.c: Removed.
11627 * pt-readv.c: Removed.
11628 * pt-select.c: Removed.
11629 * pt-sigpause.c: Removed.
11630 * pt-sigsuspend.c: Removed.
11631 * pt-sigwaitinfo.c: Removed.
11632 * pt-waitid.c: Removed.
11633 * pt-writev.c: Removed.
11634
8454830b
UD
11635 * init.c (pthread_functions): New variable.
11636 (__pthread_initialize_minimal): Pass pointer to pthread_functions
11637 (or NULL) to __libc_pthread_init.
11638 * forward.c: Rewrite to use __libc:pthread_functions array to get
11639 function addresses.
11640 * sysdeps/unix/sysv/linux/fork.h: Remove __libc_pthread_init
11641 prototype.
11642 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
11643 Take new parameter. Copy content of variable pointed to by it
11644 to __libc_pthread_init.
11645
11646 * pthreadP.h (struct pthread_functions): New type.
11647 (__libc_pthread_init): Declare.
11648
11649 * pthread_attr_destroy.c: Add namespace protected alias.
11650 * pthread_attr_getdetachstate.c: Likewise.
11651 * pthread_attr_getinheritsched.c: Likewise.
11652 * pthread_attr_getschedparam.c: Likewise.
11653 * pthread_attr_getschedpolicy.c: Likewise.
11654 * pthread_attr_getscope.c: Likewise.
11655 * pthread_attr_setdetachstate.c: Likewise.
11656 * pthread_attr_setinheritsched.c: Likewise.
11657 * pthread_attr_setschedparam.c: Likewise.
11658 * pthread_attr_setschedpolicy.c: Likewise.
11659 * pthread_attr_setscope.c: Likewise.
11660 * pthread_cond_broadcast.c: Likewise.
11661 * pthread_cond_destroy.c: Likewise.
11662 * pthread_cond_init.c: Likewise.
11663 * pthread_cond_signal.c: Likewise.
11664 * pthread_cond_wait.c: Likewise.
11665 * pthread_condattr_destroy.c: Likewise.
11666 * pthread_condattr_init.c: Likewise.
11667 * pthread_equal.c: Likewise.
11668 * pthread_exit.c: Likewise.
11669 * pthread_getschedparam.c: Likewise.
11670 * pthread_self.c: Likewise.
11671 * pthread_setcancelstate.c: Likewise.
11672 * pthread_setschedparam.c: Likewise.
11673 * pthread_mutex_destroy.c: Likewise.
11674 * pthread_mutex_init.c: Likewise.
11675 * pthreadP.h: Add prototypes for the aliases.
11676
0d5f4929
UD
11677 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Set
11678 multiple_threads member in correct TCB to 1.
11679
6ee8d334
UD
11680 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define
11681 SINGLE_THREAD_P. If in libc or libpthread examine multiple_thread
11682 member of thread decriptor, otherwise return unconditionally 1.
11683
2fb6444d
UD
116842002-12-14 Ulrich Drepper <drepper@redhat.com>
11685
11686 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Changes folded into the
11687 regular Linux version. Remove file.
11688 * sysdeps/unix/sysv/linux/connect.S: Likewise. Remove file.
11689 * sysdeps/unix/sysv/linux/llseek.c: Likewise. Remove file.
11690 * sysdeps/unix/sysv/linux/msgrcv.c: Likewise. Remove file.
11691 * sysdeps/unix/sysv/linux/msgsnd.c: Likewise. Remove file.
11692 * sysdeps/unix/sysv/linux/open64.c: Likewise. Remove file.
11693 * sysdeps/unix/sysv/linux/poll.c: Likewise. Remove file.
11694 * sysdeps/unix/sysv/linux/pread.c: Likewise. Remove file.
11695 * sysdeps/unix/sysv/linux/pread64.c: Likewise. Remove file.
11696 * sysdeps/unix/sysv/linux/pselect.c: Likewise. Remove file.
11697 * sysdeps/unix/sysv/linux/pwrite.c: Likewise. Remove file.
11698 * sysdeps/unix/sysv/linux/pwrite64.c: Likewise. Remove file.
11699 * sysdeps/unix/sysv/linux/readv.c: Likewise. Remove file.
11700 * sysdeps/unix/sysv/linux/recv.S: Likewise. Remove file.
11701 * sysdeps/unix/sysv/linux/recvfrom.S: Likewise. Remove file.
11702 * sysdeps/unix/sysv/linux/recvmsg.S: Likewise. Remove file.
11703 * sysdeps/unix/sysv/linux/send.S: Likewise. Remove file.
11704 * sysdeps/unix/sysv/linux/sendmsg.S: Likewise. Remove file.
11705 * sysdeps/unix/sysv/linux/sendto.S: Likewise. Remove file.
11706 * sysdeps/unix/sysv/linux/sigpause.c: Likewise. Remove file.
11707 * sysdeps/unix/sysv/linux/sigsuspend.c: Likewise. Remove file.
11708 * sysdeps/unix/sysv/linux/sigtimedwait.c: Likewise. Remove file.
11709 * sysdeps/unix/sysv/linux/sigwait.c: Likewise. Remove file.
11710 * sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise. Remove file.
11711 * sysdeps/unix/sysv/linux/system.c: Likewise. Remove file.
11712 * sysdeps/unix/sysv/linux/tcdrain.c: Likewise. Remove file.
11713 * sysdeps/unix/sysv/linux/wait.c: Likewise. Remove file.
11714 * sysdeps/unix/sysv/linux/waitid.c: Likewise. Remove file.
11715 * sysdeps/unix/sysv/linux/waitpid.c: Likewise. Remove file.
11716 * sysdeps/unix/sysv/linux/writev.c: Likewise. Remove file.
11717 * sysdeps/unix/sysv/linux/i386/fcntl.c: Likewise. Remove file.
11718
86b2dc40
UD
117192002-12-14 Jakub Jelinek <jakub@redhat.com>
11720
11721 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
11722 * sysdeps/unix/sysv/linux/open.c: Removed.
11723 * sysdeps/unix/sysv/linux/fsync.c: Removed.
11724 * sysdeps/unix/sysv/linux/lseek.c: Removed.
11725 * sysdeps/unix/sysv/linux/msync.c: Removed.
11726 * sysdeps/unix/sysv/linux/read.c: Removed.
11727 * sysdeps/unix/sysv/linux/close.c: Removed.
11728 * sysdeps/unix/sysv/linux/creat.c: Removed.
11729 * sysdeps/unix/sysv/linux/nanosleep.c: Removed.
11730 * sysdeps/unix/sysv/linux/pause.c: Removed.
11731 * sysdeps/unix/sysv/linux/select.c: Removed.
11732 * sysdeps/unix/sysv/linux/write.c: Removed.
11733
9d263d72
UD
117342002-12-14 Ulrich Drepper <drepper@redhat.com>
11735
11736 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Check multiple_threads
11737 element in TCB to see whether locking is needed.
11738
11739 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Check that
11740 MULTIPLE_THREADS_OFFSET value is correct.
11741
11742 * sysdeps/unix/sysv/linux/close.c: New file.
11743 * sysdeps/unix/sysv/linux/connect.S: New file.
11744 * sysdeps/unix/sysv/linux/creat.c: New file.
11745 * sysdeps/unix/sysv/linux/fsync.c: New file.
11746 * sysdeps/unix/sysv/linux/llseek.c: New file.
11747 * sysdeps/unix/sysv/linux/lseek.c: New file.
11748 * sysdeps/unix/sysv/linux/msgrcv.c: New file.
11749 * sysdeps/unix/sysv/linux/msgsnd.c: New file.
11750 * sysdeps/unix/sysv/linux/msync.c: New file.
11751 * sysdeps/unix/sysv/linux/nanosleep.c: New file.
11752 * sysdeps/unix/sysv/linux/open.c: New file.
11753 * sysdeps/unix/sysv/linux/open64.c: New file.
11754 * sysdeps/unix/sysv/linux/pause.c: New file.
11755 * sysdeps/unix/sysv/linux/poll.c: New file.
11756 * sysdeps/unix/sysv/linux/pread.c: New file.
11757 * sysdeps/unix/sysv/linux/pread64.c: New file.
11758 * sysdeps/unix/sysv/linux/pselect.c: New file.
11759 * sysdeps/unix/sysv/linux/pwrite.c: New file.
11760 * sysdeps/unix/sysv/linux/pwrite64.c: New file.
11761 * sysdeps/unix/sysv/linux/readv.c: New file.
11762 * sysdeps/unix/sysv/linux/recv.S: New file.
11763 * sysdeps/unix/sysv/linux/recvfrom.S: New file.
11764 * sysdeps/unix/sysv/linux/recvmsg.S: New file.
11765 * sysdeps/unix/sysv/linux/select.c: New file.
11766 * sysdeps/unix/sysv/linux/send.S: New file.
11767 * sysdeps/unix/sysv/linux/sendmsg.S: New file.
11768 * sysdeps/unix/sysv/linux/sendto.S: New file.
11769 * sysdeps/unix/sysv/linux/sigpause.c: New file.
11770 * sysdeps/unix/sysv/linux/sigsuspend.c: New file.
11771 * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
11772 * sysdeps/unix/sysv/linux/sigwait.c: New file.
11773 * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
11774 * sysdeps/unix/sysv/linux/system.c: New file.
11775 * sysdeps/unix/sysv/linux/tcdrain.c: New file.
11776 * sysdeps/unix/sysv/linux/wait.c: New file.
11777 * sysdeps/unix/sysv/linux/waitid.c: New file.
11778 * sysdeps/unix/sysv/linux/waitpid.c: New file.
11779 * sysdeps/unix/sysv/linux/writev.c: New file.
11780 * sysdeps/unix/sysv/linux/i386/fcntl.c: New file.
11781
11782 * pt-readv.c: Fix comment.
11783
117842002-12-14 Jakub Jelinek <jakub@redhat.com>
11785
11786 * tst-cleanup1.c: Include stdlib.h.
11787
11788 * tst-cancel5.c: New test.
11789 * Makefile (tests): Add tst-cancel5.
11790 (tst-cancel5): Link against libc.so libpthread.so in that order.
11791
9ae0909b
UD
117922002-12-13 Ulrich Drepper <drepper@redhat.com>
11793
b7bdd9c4
UD
11794 * forward.c (test_loaded): Prevent recursive calls.
11795
9ae0909b
UD
11796 * Makefile (routines): Add libc-cancellation.
11797 * libc-cancellation.c: New file.
11798 * descr.h (struct pthread): Add multiple_threads field.
11799 * allocatestack.c (allocate_stack): Initialize multiple_header field of
11800 new thread descriptor to 1.
11801 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread):
11802 Initialize multiple_thread field after successful thread creation.
11803 * cancellation.c (__do_cancel): Move to pthreadP.h.
11804 (__pthread_enable_asynccancel): Remove parameter from __do_cancel call.
11805 (__pthread_disable_asynccancel): Add internal_function attribute.
11806 * init.c (sigcancel_handler): Remove parameter from __do_cancel call.
11807 * pthread_setcancelstate.c: Likewise.
11808 * pthread_setcanceltype.c: Likewise.
11809 * pthread_exit.c: Likewise.
11810 * pthreadP.h (CANCELLATION_P): Likewise.
11811 (__do_cancel): Define as static inline.
11812 (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): New #defines.
11813 (__libc_enable_asynccancel, __libc_disable_asynccancel): New
11814 declarations.
11815 * sysdeps/i386/tls.h (tcbhead_t): Add list and multiple_threads
11816 fields. Define MULTIPLE_THREADS_OFFSET.
11817 * sysdeps/pthread/bits/libc-lock.h: Remove __libc_locking_needed
11818 declaration.
11819 * sysdeps/unix/sysv/linux/accept.S: New file.
11820 * sysdeps/unix/sysv/linux/read.c: New file.
11821 * sysdeps/unix/sysv/linux/write.c: New file.
11822 * sysdeps/unix/sysv/linux/i386/pt-socket.S: New file.
11823 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove definition and
11824 initialization of __libc_locking_needed.
11825 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't use
11826 __libc_locking_needed, use multiple_threads field in TCB.
11827 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
11828
22f20674
UD
118292002-12-12 Ulrich Drepper <drepper@redhat.com>
11830
2ad2e1e7
UD
11831 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: Use i486
11832 version.
11833 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: Likewise.
11834
22f20674
UD
11835 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Correct
11836 access to __libc_locking_needed for PIC.
11837
aa80bf86
UD
118382002-12-12 Jakub Jelinek <jakub@redhat.com>
11839
11840 * sysdeps/pthread/bits/libc-lock.h (__libc_locking_needed): Only
11841 declare for libc.so.
11842 (__libc_lock_init, __libc_lock_init_recursive): Change into comma
11843 expression.
11844 (__libc_lock_lock): Put into statement expression.
11845 (__libc_lock_unlock): Remove trailing semicolon.
11846 * sysdeps/unix/sysv/linux/fork.h (__libc_pthread_init): Fix typo.
11847
24021373
RM
118482002-12-12 Roland McGrath <roland@redhat.com>
11849
11850 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use asm operand with
11851 "m" constraint to refer to __libc_locking_needed. Declare it here.
11852
14e7aece
UD
118532002-12-12 Ulrich Drepper <drepper@redhat.com>
11854
11855 * sysdeps/unix/sysv/linux/fork-gen.c: Renamed to...
11856 * sysdeps/unix/sysv/linux/libc_pthread_init.c: ...this.
11857 Initialize __libc_locking_needed.
11858 * init.c (__pthread_initialize_minimal): Call __libc_pthread_init
11859 instead of __register_pthread_fork_handler.
11860 * sysdeps/pthread/bits/libc-lock.h: Declare __libc_locking_needed.
11861 * sysdeps/unix/sysv/linux/Makefile (sysdep_routimes): Replace
11862 fork-gen with libc_pthread_init.
11863 * sysdeps/unix/sysv/linux/Versions: Use __libc_pthread_init instead
11864 of __register_pthread_fork_handler.
11865 * sysdeps/unix/sysv/linux/fork.h: Declare __libc_pthread_init instead
11866 of __register_pthread_fork_handler.
11867 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use
11868 __libc_locking_needed to determine whether lock prefix can be avoided.
11869 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
11870
85631c8e
UD
118712002-12-11 Ulrich Drepper <drepper@redhat.com>
11872
da63009e
UD
11873 * Makefile (tests): Add tst-cleanup1.
11874 * tst-cleanup1.c: New file.
11875 * cancellation.c (__cleanup_thread): Removed.
11876 (__do_cancel): Remove call to __cleanup_thread.
11877 * pthreadP.h: Remove __cleanup_thread prorotype.
11878
000160a2
UD
11879 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
11880 Remember function and argument even if cancellation handler
11881 function is not available.
11882 (__libc_cleanup_region_end): Execute registered function directly if
11883 pthread functions are not available.
11884 (__libc_cleanup_end): Likewise.
11885
85631c8e
UD
11886 * init.c (__pthread_initialize_minimal): Fix initialization in
11887 static lib by preventing gcc from being too clever.
11888
dce8f2b6
UD
118892002-12-10 Ulrich Drepper <drepper@redhat.com>
11890
34a075be
UD
11891 * init.c (__pthread_initialize_minimal): Remove unneccesary
11892 sigaddset call.
11893
dce8f2b6
UD
11894 * Makefile (tests): We can run tst-locale2 now.
11895
e5e45b53
UD
118962002-12-09 Ulrich Drepper <drepper@redhat.com>
11897
11898 * Versions: Remove duplicated sigwait entry.
11899
bdb04f92
UD
119002002-12-08 Ulrich Drepper <drepper@redhat.com>
11901
1e506629
UD
11902 * pthreadP.h: Enable pthread_cleanup_{push,pop} optimizations only
11903 inside libpthread.
11904
a3957dd5
UD
11905 * pt-fcntl.c (__fcntl): Initialize oldtype to avoid warning.
11906
bdb04f92
UD
11907 * pthreadP.h: Declare __pthread_enable_asynccancel and
11908 __pthread_disable_asynccancel.
11909 (CANCEL_ASYNC): Use __pthread_enable_asynccancel.
11910 (CANCEL_RESET): Use __pthread_disable_asynccancel.
11911 * cancellation.c (__pthread_enable_asynccancel): New function.
11912 (__pthread_disable_asynccancel): New function.
11913 * pt-accept.c: Adjust for CANCEL_ASYNC and CANCEL_RESET change.
11914 * pt-close.c: Likewise.
11915 * pt-connect.c: Likewise.
11916 * pt-creat.c: Likewise.
11917 * pt-fcntl.c: Likewise.
11918 * pt-fsync.c: Likewise.
11919 * pt-lseek.c: Likewise.
11920 * pt-lseek64.c: Likewise.
11921 * pt-msgrcv.c: Likewise.
11922 * pt-msgsnd.c: Likewise.
11923 * pt-msync.c: Likewise.
11924 * pt-nanosleep.c: Likewise.
11925 * pt-open.c: Likewise.
11926 * pt-open64.c: Likewise.
11927 * pt-pause.c: Likewise.
11928 * pt-poll.c: Likewise.
11929 * pt-pread.c: Likewise.
11930 * pt-pread64.c: Likewise.
11931 * pt-pselect.c: Likewise.
11932 * pt-pwrite.c: Likewise.
11933 * pt-pwrite64.c: Likewise.
11934 * pt-read.c: Likewise.
11935 * pt-readv.c: Likewise.
11936 * pt-recv.c: Likewise.
11937 * pt-recvfrom.c: Likewise.
11938 * pt-recvmsg.c: Likewise.
11939 * pt-select.c: Likewise.
11940 * pt-send.c: Likewise.
11941 * pt-sendmsg.c: Likewise.
11942 * pt-sendto.c: Likewise.
11943 * pt-sigpause.c: Likewise.
11944 * pt-sigsuspend.c: Likewise.
11945 * pt-sigtimedwait.c: Likewise.
11946 * pt-sigwait.c: Likewise.
11947 * pt-sigwaitinfo.c: Likewise.
11948 * pt-system.c: Likewise.
11949 * pt-tcdrain.c: Likewise.
11950 * pt-wait.c: Likewise.
11951 * pt-waitid.c: Likewise.
11952 * pt-waitpid.c: Likewise.
11953 * pt-write.c: Likewise.
11954 * pt-writev.c: Likewise.
a3957dd5
UD
11955 * pthread_join.c: Likewise.
11956 * pthread_timedjoin.c: Likewise.
bdb04f92
UD
11957
11958 * pt-sigpause.c (sigsuspend): Call __sigsuspend.
11959 (__xpg_sigpause): New function.
11960 * Versions (libpthread:GLIBC_2.3.2): Add __xpg_sigpause.
11961
6ccb3834
UD
119622002-12-07 Ulrich Drepper <drepper@redhat.com>
11963
09efc3ba
UD
11964 * Makefile (CFLAGS-ftrylockfile.c): Add -D_IO_MTSAFE_IO.
11965
11966 * cleanup.c: Move declarations of _GI_pthread_cleanup_push and
11967 _GI_pthread_cleanup_pop to pthreadP.h.
11968
11969 * ftrylockfile.c: Use _IO_lock_trylock instead of
11970 pthread_mutex_trylock.
11971
11972 * pthreadP.h (CANCEL_ASYNC): Use __pthread_setcanceltype.
11973 (CANCEL_RESET): Likewise.
11974 (__pthread_setcanceltype_): Declare.
11975 (__pthread_mutex_lock_internal): Declare.
11976 (__pthread_mutex_unlock_internal): Declare.
11977 (__pthread_once_internal): Declare.
11978 (pthread_cleanup_push): Redefine using _GI_pthread_cleanup_push.
11979 (pthread_cleanup_pop): Redefine using _GI_pthread_cleanup_pop.
11980
11981 * pthread_cond_timedwait.c: Use INTUSE is calls to pthread_mutex_lock
11982 and pthread_mutex_unlock.
11983 * pthread_cond_wait.c: Likewise.
11984 * pthread_mutex_lock.c: Use INTDEF to define alias if needed.
11985 * pthread_mutex_unlock.c: Likewise.
11986
11987 * pthread_setcanceltype.c: Add additional alias
11988 __pthread_setcanceltype.
11989
11990 * sem_unlink.c (sem_unlink): Use __pthread_once with INTDEF.
11991 * sem_open.c (sem_open): Likewise.
11992 Use __libc_open, __libc_write, and __libc_close instead of
11993 open, write, and close respectively.
11994
11995 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_trylock_internal):
11996 Rewrite as statement expression since it must return a value.
11997
11998 * pthread_cancel.c: Use __pthread_kill instead of pthread_kill.
11999 * sysdeps/unix/sysv/linux/pthread_kill.c: Define additional alias
12000 __pthread_kill.
12001
12002 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Define additional
12003 alias __pthread_once_internal.
12004
6ccb3834
UD
12005 * sysdeps/unix/sysv/linux/raise.c: Use libc_hidden_def for raise.
12006
d3c9f895
UD
120072002-12-06 Ulrich Drepper <drepper@redhat.com>
12008
4614167a
UD
12009 * Makefile (tests): Add tst-stdio1 and tst-stdio2.
12010 * tst-stdio1.c: New file.
12011 * tst-stdio2.c: New file.
12012
a4548cea
UD
12013 * init.c (__pthread_initialize_minimal): Correct INIT_LIST_HEAD use.
12014
d3c9f895
UD
12015 * Makefile (tests): Comment out tst-locale2 for now.
12016 (CFLAGS-flockfile.c, CFLAGS-funlockfile.c): Define to -D_IO_MTSAFE_IO.
12017
12018 * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-fork.c to
12019 -D_IO_MTSAFE_IO.
12020 * sysdeps/unix/sysv/linux/fork.c: Include <bits/stdio-lock.h>.
12021 Use _IO_lock_init instead of explicit assignment.
12022
12023 * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
12024 Define __libc_lock_* and __libc_lock_recursive macros with
12025 lowlevellock macros, not pthread mutexes.
12026
12027 * flockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_lock instead
12028 of pthread_mutex_lock.
12029 * funlockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_unlock
12030 instead of pthread_mutex_unlock.
12031
fde89ad0
RM
120322002-12-06 Roland McGrath <roland@redhat.com>
12033
12034 * allocatestack.c (__stack_user): Use uninitialized defn.
12035 * init.c (__pthread_initialize_minimal): Initialize it here.
12036
11767d47
RM
120372002-12-05 Roland McGrath <roland@redhat.com>
12038
fde89ad0
RM
12039 * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
12040 string.
12041 * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
12042
11767d47
RM
12043 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Add
12044 missing & here too.
12045
440d8bc2
UD
120462002-12-05 Ulrich Drepper <drepper@redhat.com>
12047
12048 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
12049 lowlevellock.
12050 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: New file.
12051 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: New file.
12052 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: New file.
12053 * sysdeps/pthread/bits/libc-lock.h: Use lowlevellock implementation
12054 for __libc_lock_* macros.
12055 * Makefile (routines): Add libc-lowlevellock.
12056
120572002-10-09 Roland McGrath <roland@redhat.com>
12058
12059 * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
12060 Under [__PIC__], call the function via the pointer fetched for
12061 comparison rather than a call by name that uses the PLT.
12062 (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
12063 (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
12064 (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
12065 (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
12066 (__libc_key_create, __libc_getspecific, __libc_setspecific): Use it.
12067
d5ed0118
RM
120682002-12-04 Roland McGrath <roland@redhat.com>
12069
12070 * forward.c (pthread_self): Use FORWARD3 macro to correct return type.
12071
12072 * sysdeps/i386/td_ta_map_lwp2thr.c: Moved from ../nptl_db.
12073 * sysdeps/generic/td_ta_map_lwp2thr.c: New file.
12074
12075 * pthread_create.c (start_thread): Add missing & on __nptl_last_event.
12076
eaa4099f
UD
120772002-12-04 Ulrich Drepper <drepper@redhat.com>
12078
12079 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Make pthread_t
12080 a completely opaque, non-integer type.
12081 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
12082
33b5d0cc
UD
120832002-12-05 Jakub Jelinek <jakub@redhat.com>
12084
12085 * sysdeps/i386/tls.h: Include stdlib.h.
12086 * sysdeps/x86_64/tls.h: Likewise.
12087
7a5cdb30
UD
120882002-12-04 Ulrich Drepper <drepper@redhat.com>
12089
c4a6d859
UD
12090 * Makefile (tests): Add tst-locale2.
12091 (tests-static): Likewise.
12092 * tst-locale2.c: New file.
12093
7a5cdb30
UD
12094 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Mark asms as
12095 volatile and add memory clobbers to lock operations.
12096
d82d5d12
UD
120972002-12-03 Ulrich Drepper <drepper@redhat.com>
12098
69cae3cf
UD
12099 * sysdeps/i386/i686/bits/atomic.h: Use i486 version.
12100 * sysdeps/i386/i486/bits/atomic.h: New file.
12101 * sysdeps/i386/i586/bits/atomic.h: New file.
12102 * sysdeps/i386/i686/pthread_spin_trylock.S: Define HAVE_CMOV and
12103 include i486 version.
12104 * sysdeps/i386/i486/pthread_spin_trylock.S: New file.
12105 * sysdeps/i386/i586/pthread_spin_trylock.S: New file.
c97c64de 12106 Patch by Marijn Ros <marijn@mad.scientist.com>.
69cae3cf 12107
e4044c01
UD
12108 * allocatestack.c (get_cached_stack): Don't crash if we first
12109 found a stack with a larger size then needed.
12110 Reported by Hui Huang <hui.huang@sun.com>.
12111
d82d5d12
UD
12112 * Makefile (tests): Add tst-sysconf.
12113 * tst-sysconf.c: New file.
12114
12115 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine
12116 PTHREAD_THREADS_MAX.
12117
fa9a4ff0
RM
121182002-12-02 Roland McGrath <roland@redhat.com>
12119
12120 * pthreadP.h (__stack_user, __nptl_create_event, __nptl_death_event):
12121 Declare using hidden_proto instead of attribute_hidden, so there are
12122 non-.hidden static symbols for gdb to find.
12123 (__pthread_keys): Likewise.
12124 * events.c (__nptl_create_event, __nptl_death_event): Add hidden_def.
12125 * allocatestack.c (__stack_user): Likewise.
12126 * pthread_create.c (__pthread_keys): Likewise.
12127 (__nptl_threads_events, __nptl_last_event): Make these static instead
12128 of hidden.
12129 * pthread_key_create.c (__pthread_pthread_keys_max,
12130 __pthread_pthread_key_2ndlevel_size): Renamed from __linuxthreads_*.
12131
91949a33
UD
121322002-12-02 Ulrich Drepper <drepper@redhat.com>
12133
c22b52fa
UD
12134 * Makefile (tests): Add tst-locale1. If buid-static is yes link
12135 statically.
12136 * tst-locale1.c: New file.
12137
beb6aa41
UD
12138 * pthread_cond_timedwait.c: Include <stdlib.h>.
12139
91949a33
UD
12140 * Makefile (tests): Add tst-fork2 and tst-fork3.
12141 * tst-fork2.c: New file.
12142 * tst-fork3.c: New file.
12143
654dff90
UD
121442002-11-28 Ulrich Drepper <drepper@redhat.com>
12145
cb0e76b4
UD
12146 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
12147
12148 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
12149 require it to 200112L.
12150
12151 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Use cmov
12152 instruction only if HAVE_CMOV is defined.
12153 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Define HAVE_CMOV.
12154
975aa229
UD
12155 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: New file.
12156
654dff90
UD
12157 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: New file.
12158
12159 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: New file.
12160
12161 * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: New file.
12162
a3931336
UD
121632002-11-27 Ulrich Drepper <drepper@redhat.com>
12164
c10c099c
UD
12165 * sysdeps/x86_64/bits/atomic.h: New file.
12166
12167 * sysdeps/i386/i686/bits/atomic.h: Fix asm syntax for 8- and
12168 16-bit operations.
12169
dca99d27
UD
12170 * sysdeps/unix/sysv/linux/raise.c (raise): Use INTERNAL_SYSCALL if
12171 possible since gettid cannot fail.
12172
f78deea6
UD
12173 * sysdeps/x86_64/pthreaddef.h: New file.
12174
12175 * sysdeps/i386/pthreaddef.h (gettid): Removed.
12176
12177 * sysdeps/x86_64/pthread_spin_init.c: New file.
12178 * sysdeps/x86_64/pthread_spin_lock.c: New file.
12179 * sysdeps/x86_64/pthread_spin_trylock.c: New file.
12180 * sysdeps/x86_64/pthread_spin_unlock.c: New file.
12181
12182 * sysdeps/i386/i686/pthread_spin_trylock.S (pthread_spin_trylock):
12183 Add missing lock prefix. Minute optimization.
12184
12185 * tst-spin2.c (main): Also check successful trylock call.
12186
12187 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use correct
12188 syscall. Fix typo in case INTERNAL_SYSCALL is not used.
12189
12190 * sysdeps/i386/pthread_spin_destroy.c: Moved to...
12191 * sysdeps/pthread/pthread_spin_destroy.c: ...here. New file.
12192
12193 * sysdeps/i386/pthread_sigmask.c: Removed. Use the generic code.
12194 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Return correct
12195 value in case of an error. Add support for INTERNAL_SYSCALL.
b54e18eb
UD
12196
12197 * sysdeps/i386/pthread_sigmask.c (pthread_sigmask): Return correct
12198 value in case of an error.
12199
a3931336
UD
12200 * sysdeps/x86_64/tls.h: New file.
12201
76a50749
UD
122022002-11-26 Ulrich Drepper <drepper@redhat.com>
12203
117c452c
UD
12204 * sysdeps/i386/tls.h (THREAD_GETMEM_NC): Change interface. It now
12205 takes the array member name and the index as parameters.
12206 (THREAD_SETMEM_NC): Likewise.
12207 * pthread_getspecific.c: Use new THREAD_GETMEM_NC interface.
12208 * pthread_setspecific.c: Use new THREAD_GETMEM_NC and THREAD_SETMEM_NC
12209 interfaces.
12210
12211 * sysdeps/i386/tls.h (THREAD_SETMEM): Use size of member element
12212 to decide which code to use.
12213 (THREAD_SETMEM_NC): Likewise.
12214
76a50749
UD
12215 * allocatestack.c (queue_stack): Don't remove stack from list here.
12216 Do it in the caller. Correct condition to prematurely terminate
12217 loop to free stacks.
12218 (__deallocate_stack): Remove stack from list here.
12219
122202002-11-26 Ulrich Drepper <drepper@redhat.com>
12221
12222 * Makefile (tests): Add tst-stack1.
12223 * tst-stack1.c: New file.
12224
12225 * allocatestack.c (allocate_stack): Initialize the TCB on a user
12226 provided stack.
12227
12228 * pthread_attr_getstack.c: Return bottom of the thread area.
12229
122302002-11-25 Ulrich Drepper <drepper@redhat.com>
12231
12232 * Makefile (libpthread-routines): Add pt-allocrtsig and
12233 pthread_kill_other_threads.
12234 * pt-allocrtsig.c: New file.
12235 * pthread_kill_other_threads.c: New file.
12236 * sysdeps/unix/sysv/linux/allocrtsig.c: Add additional aliases for
12237 all three functions.
12238 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
12239 allocrtsig.
12240 * sysdeps/unix/sysv/linux/Versions (libc:GLIBC_PRIVATE): Export
12241 __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
12242 and __libc_allocate_rtsig_private.
12243 * Versions (libpthread): Export pthread_kill_other_threads_np,
12244 __libc_current_sigrtmin, and __libc_current_sigrtmax.
12245
122462002-11-24 Ulrich Drepper <drepper@redhat.com>
12247
12248 * allocatestack.c (allocate_stack): stackaddr in attribute points to
12249 the end of the stack. Adjust computations.
12250 When mprotect call fails dequeue stack and free it.
12251 * pthread_attr_setstack.c: Store top of the stack in stackaddr
12252 attribute.
12253 * pthread_getattr_np.c: Likewise.
12254
12255 * descr.h (IS_DETACHED): Add some more parenthesis to prevent
12256 surprises.
12257
122582002-11-23 Ulrich Drepper <drepper@redhat.com>
12259
12260 * sysdeps/pthread/pthread.h (pthread_self): __THROW must come before
12261 attribute definitions. Patch by Luca Barbieri <ldb@ldb.ods.org>.
12262
122632002-11-22 Ulrich Drepper <drepper@redhat.com>
12264
12265 * pthread_getspecific.c: Optimize access to first 2nd-level array.
12266 * pthread_setspecific.c: Likewise.
12267
122682002-11-21 Ulrich Drepper <drepper@redhat.com>
12269
12270 * sysdeps/unix/sysv/linux/i386/createthread.c: Remove CLONE_ flags
12271 definitions. Get them from the official place.
12272 * sysdeps/unix/sysv/linux/i386/fork.c: Likewise.
12273
12274 * sysdeps/unix/sysv/linux/i386/createthread.c: Update CLONE_* flags.
12275 Use new CLONE_ flags in clone() calls.
12276
12277 * sysdeps/unix/sysv/linux/fork.c: Use ARCH_FORK to actually fork.
12278 * sysdeps/unix/sysv/linux/i386/fork.c: New file.
12279
12280 * Versions: Add pthread_* functions for libc.
12281 * forward.c: New file.
12282
12283 * sysdeps/pthread/Makefile (libpthread-sysdeps_routines): Add
12284 errno-loc.
12285 * herrno.c: New file.
12286 * res.c: New file.
12287
12288 * Makefile (libpthread-routines): Remove sem_post, sem_wait,
12289 sem_trywait, and sem_timedwait. Add herrno and res.
12290 * sem_init.c: Don't initialize lock and waiters members.
12291 * sem_open.c: Likewise.
12292 * sem_post.c: Removed.
12293 * sem_wait.c: Removed.
12294 * sem_trywait.c: Removed.
12295 * sem_timedwait.c: Removed.
12296 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Complete rewrite.
12297 Includes full implementations of sem_post, sem_wait, sem_trywait,
12298 and sem_timedwait.
12299 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Adjust
12300 for new implementation.
12301 * sysdeps/unix/sysv/linux/internaltypes.h (struct sem): Remove lock
12302 and waiters fields.
12303
12304 * tst-sem3.c: Improve error message.
12305 * tst-signal3.c: Likewise.
12306
12307 * init.c (__pthread_initialize_minimal): Use set_tid_address syscall
12308 to tell the kernel about the termination futex and to initialize tid
12309 member. Don't initialize main_thread.
12310 * descr.h (struct pthread): Remove main_thread member.
12311 * cancelllation.c (__do_cancel): Remove code handling main thread.
12312 The main thread is not special anymore.
12313
12314 * allocatestack.c (__reclaim_stacks): Mark stacks as unused. Add
12315 size of the stacks to stack_cache_actsize.
12316
12317 * pt-readv.c: Add missing "defined".
12318 * pt-sigwait.c: Likewise.
12319 * pt-writev.c: Likewise.
12320
123212002-11-09 Ulrich Drepper <drepper@redhat.com>
12322
12323 * Versions: Export __connect from libpthread.
12324 Patch by Luca Barbieri <ldb@ldb.ods.org>.
12325
12326 * Makefile (libpthread-routines): Add pt-raise.
12327 * sysdeps/unix/sysv/linux/raise.c: New file.
12328 * sysdeps/unix/sysv/linux/pt-raise.c: New file.
12329 * sysdeps/generic/pt-raise.c: New file.
12330
12331 * pthread_cond_init.c: Initialize all data elements of the condvar
12332 structure. Patch by Luca Barbieri <ldb@ldb.ods.org>.
12333
12334 * pthread_attr_init.c: Actually implement 2.0 compatibility version.
12335 * pthread_create.c: Likewise.
12336
12337 * Makefile (tests): Add tst-key1, tst-key2, tst-key3.
12338 * tst-key1.c: New file.
12339 * tst-key2.c: New file.
12340 * tst-key3.c: New file.
12341
12342 * Versions: Export pthread_detach for version GLIBC_2.0.
12343 Reported by Saurabh Desai <sdesai@austin.ibm.com>.
12344
123452002-11-08 Ulrich Drepper <drepper@redhat.com>
12346
12347 * pthread_key_create.c: Terminate search after an unused key was found.
12348 Patch by Luca Barbieri <ldb@ldb.ods.org>.
12349
12350 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Return zero.
12351 Patch by Luca Barbieri <ldb@ldb.ods.org>.
12352
123532002-10-10 Ulrich Drepper <drepper@redhat.com>
12354
12355 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Use slow generic
12356 dynamic lookup for errno in PIC.
12357
12358 * allocatestack.c (get_cached_stack): Rearrange code slightly to
12359 release the stack lock as soon as possible.
12360 Call _dl_allocate_tls_init for TCB from the cache to re-initialize
12361 the static TLS block.
12362 (allocate_stack): Call _dl_allocate_tls_init for user-provided stack.
12363
12364 * cancellation.c: Renamed from cancelation.c.
12365 * Makefile: Adjust accordingly.
12366 * pthreadP.h (CANCELLATION_P): Renamed from CANCELATION_P.
12367 * cleanup_defer.c: Use CANCELLATION_P.
12368 * pthread_testcancel.c: Likewise.
12369 * descr.h: Fix spelling in comments.
12370 * init.c: Likewise.
12371 * pthread_getattr_np.c: Likewise.
12372 * pthread_getschedparam.c: Likewise.
12373 * pthread_setschedparam.c: Likewise.
12374 * Versions: Likewise.
12375
12376 * pt-pselect.c: New file.
12377 * Makefile (libpthread-routines): Add pt-pselect.
12378 * Versions: Add pselect.
12379
12380 * tst-cancel4.c: New file.
12381 * Makefile (tests): Add tst-cancel4.
12382
123832002-10-09 Ulrich Drepper <drepper@redhat.com>
12384
12385 * pthread_mutex_lock.c: Always record lock ownership.
12386 * pthread_mutex_timedlock.c: Likewise.
12387 * pthread_mutex_trylock.c: Likewise.
12388
12389 * pt-readv.c: New file.
12390 * pt-writev.c: New file.
12391 * pt-creat.c: New file.
12392 * pt-msgrcv.c: New file.
12393 * pt-msgsnd.c: New file.
12394 * pt-poll.c: New file.
12395 * pt-select.c: New file.
12396 * pt-sigpause.c: New file.
12397 * pt-sigsuspend.c: New file.
12398 * pt-sigwait.c: New file.
12399 * pt-sigwaitinfo.c: New file.
12400 * pt-waitid.c: New file.
12401 * Makefile (libpthread-routines): Add pt-readv, pt-writev, pt-creat,
12402 pt-msgrcv, pt-msgsnd, pt-poll, pt-select, pt-sigpause, pt-sigsuspend,
12403 pt-sigwait, pt-sigwaitinfo, and pt-waitid.
12404 * Versions: Add all the new functions.
12405
12406 * tst-exit1.c: New file.
12407 * Makefile (tests): Add tst-exit1.
12408
12409 * sem_timedwait.c: Minor optimization for more optimal fastpath.
12410
124112002-10-08 Ulrich Drepper <drepper@redhat.com>
12412
12413 * pt-fcntl.c: Only enable asynchronous cancellation for F_SETLKW.
12414
12415 * pthread_join.c: Enable asynchronous cancellation around lll_wait_tid
12416 call. pthread_join is an official cancellation point.
12417 * pthread_timedjoin.c: Likewise.
12418
12419 * pthread_cond_wait.c: Revert order in which internal lock are dropped
12420 and the condvar's mutex are retrieved.
12421 * pthread_cond_timedwait.c: Likewise.
12422 Reported by dice@saros.East.Sun.COM.
12423
124242002-10-07 Ulrich Drepper <drepper@redhat.com>
12425
12426 * pthreadP.h: Cut out all type definitions and move them...
12427 * sysdeps/unix/sysv/linux/internaltypes.h: ...here. New file.
12428 * pthreadP.h: Include <internaltypes.h>.
12429
12430 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Little
12431 performance tweaks.
12432
12433 * sem_trywait.c: Shuffle #includes around to get right order.
12434 * sem_timedwait.c: Likewise.
12435 * sem_post.c: Likewise.
12436 * sem_wait.c: Likewise.
12437
12438 * nptl 0.3 released.
12439
12440 * Makefile (tests): Add tst-signal3.
12441 * tst-signal3.c: New file.
12442
124432002-10-05 Ulrich Drepper <drepper@redhat.com>
12444
12445 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Tell the compiler that
12446 the asms modify the sem object.
12447 (__lll_sem_timedwait): Now takes struct sem* as first parameter.
12448
12449 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h (sem_t): Don't expose
12450 the actual members.
12451 * pthreadP.h (struct sem): New type. Actual semaphore type.
12452 * semaphoreP.h: Include pthreadP.h.
12453 * sem_getvalue.c: Adjust to sem_t change.
12454 * sem_init.c: Likewise.
12455 * sem_open.c: Likewise.
12456 * sem_post.c: Likewise.
12457 * sem_timedwait.c: Likewise.
12458 * sem_trywait.c: Likewise.
12459 * sem_wait.c: Likewise.
12460
124612002-10-04 Ulrich Drepper <drepper@redhat.com>
12462
12463 * Makefile (tests): Add tst-basic2, tst-exec1, tst-exec3, tst-exec3.
12464 * tst-basic2.c: New file.
12465 * tst-exec1.c: New file.
12466 * tst-exec2.c: New file.
12467 * tst-exec3.c: New file.
12468
12469 * tst-fork1.c: Remove extra */.
12470
12471 * nptl 0.2 released. The API for IA-32 is complete.