]> git.ipfire.org Git - thirdparty/glibc.git/blob - nptl/ChangeLog
d0b5d6c7b8b1cf74b9ad8b4f61f435a8d9c1949a
[thirdparty/glibc.git] / nptl / ChangeLog
1 2012-10-24 Roland McGrath <roland@hack.frob.com>
2
3 * Makefile ($(objpfx)tst-cond11, $(objpfx)tst-cond19): Targets removed.
4 ($(objpfx)tst-sem5, $(objpfx)tst-cancel18): Likewise.
5 ((objpfx)tst-cancelx18, $(objpfx)tst-clock2): Likewise.
6 ($(objpfx)tst-rwlock14): Likewise.
7
8 2012-10-24 Joseph Myers <joseph@codesourcery.com>
9
10 * Makefile (tests): Remove tst-oddstacklimit.
11 (test-srcs): New variable.
12 (tst-oddstacklimit-ENV): Remove.
13 [$(run-built-tests) = yes] (tests): Depend on
14 $(objpfx)tst-oddstacklimit.out.
15 [$(run-built-tests) = yes] ($(objpfx)tst-oddstacklimit.out): New
16 target.
17 * tst-oddstacklimit.c: Do not include "tst-basic1.c". Use
18 setrlimit before executing tst-basic1 test passed to --command.
19
20 2012-10-23 Joseph Myers <joseph@codesourcery.com>
21
22 * Makefile [$(cross-compiling) = no]: Change condition to
23 [$(run-built-tests) = yes].
24
25 2012-10-23 Jim Blandy <jimb@codesourcery.com>
26 Joseph Myers <joseph@codesourcery.com>
27
28 * Makefile (tst-cancel7-ARGS): Use $(host-built-program-cmd).
29 (tst-exec4-ARGS): Likewise.
30 (tst-stackguard1-ARGS): Likewise.
31
32 2012-10-21 Jim Blandy <jimb@codesourcery.com>
33 Joseph Myers <joseph@codesourcery.com>
34
35 * Makefile ($(objpfx)tst-cancel-wrappers.out): Pass $(NM) to
36 tst-cancel-wrappers.sh.
37 * tst-cancel-wrappers.sh: Use nm program given as first argument,
38 not hardcoded "nm".
39
40 2012-10-17 Siddhesh Poyarekar <siddhesh@redhat.com>
41
42 * tst-cond25.c (do_test_wait): Don't check for return value from
43 pthread_cancel.
44
45 2012-10-16 Siddhesh Poyarekar <siddhesh@redhat.com>
46
47 [BZ #14652]
48 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
49 (__condvar_tw_cleanup): Adjust the mutex data structure if it
50 was locked by FUTEX_WAIT_REQUEUE_PI.
51 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait
52 (__condvar_w_cleanup): Likewise.
53 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
54 (__condvar_cleanup2): Likewise.
55 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
56 (__condvar_cleanup1): Likewise.
57
58 2012-10-10 Carlos O'Donell <carlos@systemhalted.org>
59
60 * sysdeps/pthread/pthread.h [!(defined __GNUC__ &&
61 defined __EXCEPTIONS) && defined __USE_GNU]
62 (pthread_cleanup_push_defer_np): Fix formatting.
63
64 2012-10-10 Siddhesh Poyarekar <siddhesh@redhat.com>
65
66 [BZ #14652]
67 * Makefile (tests): New test case tst-cond25.
68 (LDFLAGS-tst-cond25): Link tst-cond25 against librt.
69 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
70 (__condvar_tw_cleanup): Lock mutex only if we don't already
71 own it.
72 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
73 (__condvar_w_cleanup): Likewise.
74 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: Add TID_MASK.
75 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
76 (__condvar_cleanup2): Lock mutex only if we don't already
77 own it.
78 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
79 (__condvar_cleanup1): Likewise.
80 * tst-cond25.c: New test case.
81
82 2012-10-09 Roland McGrath <roland@hack.frob.com>
83
84 * sysdeps/pthread/configure: Regenerated.
85 * sysdeps/x86_64/configure: Regenerated.
86
87 2012-10-05 David S. Miller <davem@davemloft.net>
88
89 [BZ #14568]
90 * sysdeps/sparc/tls.h (DB_THREAD_SELF_INCLUDE): Delete.
91 (DB_THREAD_SELF): Use constants for the register offsets. Correct
92 the case of a 64-bit debugger with a 32-bit inferior.
93
94 2012-10-05 H.J. Lu <hongjiu.lu@intel.com>
95
96 [BZ #14557]
97 * Makefile (tests-static): Add tst-cancel24-static,
98 tst-cond8-static tst-mutex8-static, tst-mutexpi8-static,
99 tst-sem11-static and tst-sem12-static.
100 (tests): Likewise.
101 (LDLIBS-tst-cancel24-static): New macro.
102 * tst-cancel24-static.cc: New file.
103 * tst-cond8-static.c: Likewise.
104 * tst-mutex8-static.c: Likewise.
105 * tst-mutexpi8-static.c: Likewise.
106 * tst-sem11-static.c: Likewise.
107 * tst-sem12-static.c: Likewise.
108
109 2012-10-05 Siddhesh Poyarekar <siddhesh@redhat.com>
110
111 [BZ #14417]
112 * Makefile (tests): New test case tst-cond24.
113 (LDFLAGS-tst-cond24): Link tst-cond24 against librt.
114 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
115 (__pthread_cond_timedwait): Unlock mutex before going back to
116 wait in PI case.
117 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
118 (__pthread_cond_wait): Likewise. Revert handling of EAGAIN
119 return from futex_wait.
120 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
121 (__pthread_cond_timedwait): Unlock mutex before going back to
122 wait in PI case. Set requeue_pi flag only if wait returned 0.
123 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
124 (__pthread_cond_wait): Likewise. Revert handling of EAGAIN
125 return from futex_wait.
126 * tst-cond24.c: New test case.
127
128 2012-10-04 Roland McGrath <roland@hack.frob.com>
129
130 * pthread_create.c (start_thread): Use __madvise, not madvise.
131
132 2012-10-02 H.J. Lu <hongjiu.lu@intel.com>
133
134 * sysdeps/i386/tls.h: Update copyright years.
135
136 2012-10-02 Siddhesh Poyarekar <siddhesh@redhat.com>
137
138 * pthread_create.c (start_thread): Fix clone flag name in
139 comment to CLONE_CHILD_CLEARTID.
140 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
141 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
142 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
143 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
144 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
145 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
146
147 2012-10-01 Siddhesh Poyarekar <siddhesh@redhat.com>
148
149 [BZ #14477]
150 * Makefile (tests): Add tst-cond-except.
151 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
152 (__pthread_cond_timedwait): Mark instructions where %ebx is
153 incremented in PI case.
154 (.gcc_except_table): Add entry to jump to __condvar_tw_cleanup2
155 for the marked PI case instructions.
156 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
157 (__pthread_cond_wait): Mark instructions where %ebx is
158 incremented in PI case.
159 (.gcc_except_table): Add entry to jump to __condvar_w_cleanup2
160 for the marked PI case instructions.
161 * tst-cond-except.c: New test case.
162
163 2012-09-24 Dmitry V. Levin <ldv@altlinux.org>
164
165 * tst-tls6.sh: Add "set -e".
166 * Makefile: Do not specify -e option when running testsuite
167 shell scripts.
168
169 * tst-tls6.sh: Add copyright header.
170
171 2012-09-24 H.J. Lu <hongjiu.lu@intel.com>
172
173 * sysdeps/x86_64/tls.h (THREAD_SETMEM): Add "()" when casting
174 to uint64_t for 64-bit store.
175 (THREAD_SETMEM_NC): Likewise.
176
177 2012-09-19 H.J. Lu <hongjiu.lu@intel.com>
178
179 * sysdeps/i386/tls.h (THREAD_SETMEM): Cast to uint64_t for
180 64-bit store.
181 (THREAD_SETMEM_NC): Likewise.
182
183 2012-09-14 Jeff Law <law@redhat.com>
184
185 [BZ #14583]
186 * sysdeps/pthread/pthread.h: Fix prototype of __sigsetjmp.
187
188 2012-09-13 H.J. Lu <hongjiu.lu@intel.com>
189
190 [BZ #14576]
191 * sysdeps/pthread/bits/libc-lockP.h (__rtld_lock_init_recursive):
192 Removed.
193
194 2012-09-07 H.J. Lu <hongjiu.lu@intel.com>
195
196 * Makefile (LDFLAGS-tst-cancel24): Renamed to ...
197 (LDLIBS-tst-cancel24): This.
198
199 2012-09-06 H.J. Lu <hongjiu.lu@intel.com>
200
201 [BZ #14545]
202 * Makefile (tests-static): Add tst-cancel21-static.
203 (tests): Likewise.
204 * tst-cancel21-static.c: New file.
205
206 2012-09-01 Joseph Myers <joseph@codesourcery.com>
207
208 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c
209 [!__ASSUME_POSIX_CPU_TIMERS]: Remove conditional code.
210 [__NR_clock_getres]: Make code unconditional.
211 (pthread_getcpuclockid): Remove code left unreachable by removal
212 of conditionals.
213
214 2012-08-31 Joseph Myers <joseph@codesourcery.com>
215
216 [BZ #14532]
217 * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Use
218 atomic_compare_and_exchange_bool_rel.
219 * tst-sem14.c: New file.
220 * Makefile (tests): Add tst-sem14.
221
222 2012-08-15 Roland McGrath <roland@hack.frob.com>
223
224 * Makefile (CFLAGS-flockfile.c): Use $(libio-mtsafe) instead
225 of -D_IO_MTSAFE_IO.
226 (CFLAGS-ftrylockfile.c, CFLAGS-funlockfile.c): Likewise.
227 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-fork.c): Likewise.
228
229 2012-08-16 Joseph Myers <joseph@codesourcery.com>
230
231 * pthread_cond_timedwait.c (__pthread_cond_timedwait)
232 [!__ASSUME_POSIX_TIMERS]: Remove conditional code.
233 * pthread_condattr_setclock.c (pthread_condattr_setclock)
234 [!__ASSUME_POSIX_TIMERS]: Likewise.
235 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
236 (__pthread_cond_timedwait) [!__ASSUME_POSIX_TIMERS]: Likewise.
237 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c
238 [!__ASSUME_POSIX_TIMERS]: Likewise.
239 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
240 (__pthread_cond_timedwait) [!__ASSUME_POSIX_TIMERS]: Likewise.
241 * sysdeps/unix/sysv/linux/timer_create.c [__NR_timer_create]: Make
242 code unconditional.
243 [!__NR-timer_create]: Remove conditional code.
244 (timer_create) [!__ASSUME_POSIX_TIMERS]: Likewise.
245 * sysdeps/unix/sysv/linux/timer_delete.c [__NR_timer_delete]: Make
246 code unconditional.
247 [!__NR_timer_delete]: Remove conditional code.
248 (timer_delete) [!__ASSUME_POSIX_TIMERS]: Likewise.
249 * sysdeps/unix/sysv/linux/timer_getoverr.c
250 [__NR_timer_getoverrun]: Make code unconditional.
251 [!__NR_timer_getoverrun]: Remove conditional code.
252 (timer_getoverrun) [!__ASSUME_POSIX_TIMERS]: Likewise.
253 * sysdeps/unix/sysv/linux/timer_gettime.c [__NR_timer_gettime]:
254 Make code unconditional.
255 [!__NR_timer_gettime]: Remove conditional code.
256 (timer_gettime) [!__ASSUME_POSIX_TIMERS]: Likewise.
257 * sysdeps/unix/sysv/linux/timer_routines.c [__NR_timer_create]:
258 Make code unconditional.
259 [!__ASSUME_POSIX_TIMERS]: Remove conditional code.
260 * sysdeps/unix/sysv/linux/timer_settime.c [__NR_timer_settime]:
261 Make code unconditional.
262 [!__NR_timer_settime]: Remove conditional code.
263 (timer_settime) [!__ASSUME_POSIX_TIMERS]: Likewise.
264 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
265 (__pthread_cond_timedwait) [!__ASSUME_POSIX_TIMERS]: Remove
266 conditional code.
267
268 2012-08-15 Tom de Vries <vries@codesourcery.com>
269 Maxim Kuvyrkov <maxim@codesourcery.com>
270
271 * sysdeps/pthread/bits/libc-lockP.h (__libc_lock_lock)
272 (__libc_lock_trylock): Allow pre-existing definitions.
273
274 2012-08-15 Maxim Kuvyrkov <maxim@codesourcery.com>
275
276 * pthread_spin_lock.c: New file.
277 * pthread_spin_trylock.c: New file.
278
279 2012-08-08 Joseph Myers <joseph@codesourcery.com>
280
281 * allocatestack.c (setxid_signal_thread) [__ASSUME_TGKILL]: Make
282 code unconditional.
283 (setxid_signal_thread) [!__ASSUME_TGKILL]: Remove conditional code.
284 * pthread_cancel.c (pthread_cancel) [__ASSUME_TGKILL]: Make code
285 unconditional.
286 (pthread_cancel) [!__ASSUME_TGKILL]: Remove conditional code.
287 * sysdeps/pthread/createthread.c (do_clone) [__ASSUME_TGKILL]:
288 Make code unconditional.
289 (do_clone) [!__ASSUME_TGKILL]: Remove conditional code.
290 * sysdeps/unix/sysv/linux/pt-raise.c (raise) [__ASSUME_TGKILL ||
291 __NR_tgkill]: Make code unconditional.
292 (raise) [__ASSUME_TGKILL]: Likewise.
293 (raise) [!__ASSUME_TGKILL]: Remove conditional code.
294 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill)
295 [__ASSUME_TGKILL]: Make code unconditional.
296 (__pthread_kill) [!__ASSUME_TGKILL]: Remove conditional code.
297 * sysdeps/unix/sysv/linux/raise.c (raise) [__ASSUME_TGKILL ||
298 __NR_tgkill]: Make code unconditional.
299 (raise) [__ASSUME_TGKILL]: Likewise.
300 (raise) [!__ASSUME_TGKILL]: Remove conditional code.
301
302 2012-08-07 Joseph Myers <joseph@codesourcery.com>
303
304 * sysdeps/pthread/createthread.c (create_thread)
305 [!__ASSUME_NO_CLONE_DETACHED]: Remove conditional code.
306
307 2012-08-03 Joseph Myers <joseph@codesourcery.com>
308
309 * nptl-init.c (sigcancel_handler) [__ASSUME_CORRECT_SI_PID]: Make
310 code unconditional.
311 (sighandler_setxid) [__ASSUME_CORRECT_SI_PID]: Likewise.
312
313 2012-07-28 Siddhesh Poyarekar <siddhesh@redhat.com>
314
315 * tst-pthread-getattr.c (MAX_STACK_SIZE): New macro.
316 (pagesize): New static variable.
317 (allocate_and_test): Return MEM. Rename parameter to TARGET.
318 (check_stack_top): New local variables MEM and PAGEMASK. Cap
319 stack size to MAX_STACK_SIZE. Call allocate_and_test for
320 halfway up the stack top page. Verify that the top page was
321 written into.
322 (do_test): Get pagesize using sysconf.
323
324 2012-07-25 Andreas Schwab <schwab@linux-m68k.org>
325
326 * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Remove pseudo_end
327 label.
328 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Likewise.
329 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO):
330 Likewise.
331
332 2012-07-25 Siddhesh Poyarekar <siddhesh@redhat.com>
333
334 * tst-pthread-getattr.c: Revert last change.
335
336 2012-07-20 Siddhesh Poyarekar <siddhesh@redhat.com>
337
338 * tst-pthread-getattr.c (MAX_STACK_SIZE): New max cap for stack
339 size.
340 (_MIN): New macro.
341 (allocate_and_test): Return STACKADDR. Access STACKADDR instead
342 of MEM to test.
343 (check_stack_top): Read valued written into STACKADDR in
344 allocate_and_test. Cap stack size to MAX_STACK_SIZE.
345
346 2012-07-19 Siddhesh Poyarekar <siddhesh@redhat.com>
347
348 * nptl-init.c (sighandler_setxid): Fix the comment that
349 describes it.
350
351 2012-06-23 Thomas Schwinge <thomas@codesourcery.com>
352
353 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S
354 (__lll_robust_timedlock_wait): Simplify CFI directives.
355
356 2012-06-20 Siddhesh Poyarekar <siddhesh@redhat.com>
357
358 [BZ #12416]
359 * Makefile (tests): Add test case.
360 * pthread_getattr_np.c (pthread_getattr_np): Deduct pages below
361 the __libc_stack_end page from stacksize. Truncate stacksize to
362 make it page aligned when it is computed from RLIMIT_STACK.
363 * tst-pthread-getattr.c: New test case. Verify that stackaddr is
364 accessible.
365
366 2012-06-07 Carlos Sánchez de La Lama <csanchezdll@gmail.com>
367
368 [BZ #14205]
369 * sysdeps/sparc/sparc32/pthread_spin_lock.S: Do not use v9
370 branches.
371
372 2012-06-04 Siddhesh Poyarekar <siddhesh@redhat.com>
373 Jakub Jelinek <jakub@redhat.com>
374
375 [BZ #14188]
376 * sysdeps/pthread/pthread.h
377 [!(defined __GNUC__ && defined __EXCEPTIONS)]
378 (pthread_cleanup_push, pthread_cleanup_push_defer_np): Use
379 __libc_unlikely instead of __builtin_expect.
380
381 2012-05-30 H.J. Lu <hongjiu.lu@intel.com>
382
383 [BZ #14117]
384 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Removed.
385 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
386 * sysdeps/unix/sysv/linux/i386/Implies: New file.
387 * sysdeps/unix/sysv/linux/x86_64/Implies: Likewise.
388 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Renamed
389 to ...
390 * sysdeps/unix/sysv/linux/x86/bits/pthreadtypes.h: This.
391 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Renamed
392 to ...
393 * sysdeps/unix/sysv/linux/x86/bits/semaphore.h: This.
394
395 2012-05-30 Andreas Schwab <schwab@linux-m68k.org>
396
397 [BZ #14132]
398 * nptl-init.c (pthread_functions): Remove use of INTUSE and
399 _internal aliases.
400 (__pthread_initialize_minimal_internal): Likewise.
401 * sem_open.c: Likewise.
402 * sem_unlink.c: Likewise.
403 * pthreadP.h: Replace _internal aliases by hidden_proto
404 declarations.
405 * pthread_getspecific.c: Replace _internal alias by hidden_def.
406 * pthread_key_create.c: Likewise.
407 * pthread_mutex_destroy.c: Likewise.
408 * pthread_mutex_init.c: Likewise.
409 * pthread_mutex_lock.c: Likewise.
410 * pthread_mutex_unlock.c: Likewise.
411 * pthread_once.c: Likewise.
412 * pthread_rwlock_rdlock.c: Likewise.
413 * pthread_rwlock_unlock.c: Likewise.
414 * pthread_rwlock_wrlock.c: Likewise.
415 * pthread_setspecific.c: Likewise.
416 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S:
417 Likewise.
418 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
419 Likewise.
420 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
421 Likewise.
422 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
423 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
424 * sysdeps/unix/sysv/linux/s390/pthread_once.c: Likewise.
425 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Likewise.
426 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
427 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
428 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
429 * sysdeps/unix/sysv/linux/sparc/pthread_once.c: Likewise.
430 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
431 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S:
432 Likewise.
433 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S:
434 Likewise.
435 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S:
436 Likewise.
437
438 2012-05-27 Chung-Lin Tang <cltang@codesourcery.com>
439
440 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO, LOAD_ARGS_1)
441 (LOAD_ARGS_2 ,LOAD_ARGS_3 ,LOAD_ARGS_4): Add CFI restores.
442
443 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_lock_wait_private)
444 (__lll_lock_wait, __lll_timedlock_wait, __lll_timedwait_tid): Add CFI
445 directives.
446 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S
447 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): Likewise.
448 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
449 (pthread_barrier_wait): Likewise.
450 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
451 (__pthread_cond_broadcast): Likewise.
452 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
453 (__pthread_cond_signal): Likewise.
454 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
455 (__pthread_cond_timedwait): Likewise.
456 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S (__pthread_cond_wait):
457 Likewise.
458 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S
459 (__pthread_rwlock_rdlock): Likewise.
460 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S
461 (pthread_rwlock_timedrdlock): Likewise.
462 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S
463 (pthread_rwlock_timedwrlock): Likewise.
464 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S
465 (__pthread_rwlock_unlock): Likewise.
466 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S
467 (__pthread_rwlock_wrlock): Likewise.
468 * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post): Likewise.
469 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait): Likewise.
470 * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
471 Likewise.
472 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
473
474 2012-05-26 Siddhesh Poyarekar <siddhesh@redhat.com>
475
476 [BZ #12416]
477 * nptl/pthread_getattr_np.c (pthread_getattr_np): Use
478 __libc_stack_end rounded to the end of containing page as the
479 real stack end.
480
481 2012-05-25 Rayson Ho <rho@redhat.com>
482
483 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Low-level SystemTap
484 probes for i386.
485 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
486 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
487 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
488 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
489 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
490 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
491 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
492 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
493
494 2012-05-25 Rayson Ho <rho@redhat.com>
495 Roland McGrath <roland@hack.frob.com>
496
497 * DESIGN-systemtap-probes.txt: New file.
498 * pthread_cond_broadcast.c: SystemTap probes.
499 * pthread_cond_init.c: Likewise.
500 * pthread_cond_signal.c: Likewise.
501 * pthread_cond_wait.c: Likewise.
502 * pthread_cond_destroy.c: Likewise.
503 * pthread_create.c: Likewise.
504 * pthread_join.c: Likewise.
505 * pthread_mutex_destroy.c: Likewise.
506 * pthread_mutex_init.c: Likewise.
507 * pthread_mutex_lock.c: Likewise.
508 * pthread_mutex_timedlock.c: Likewise.
509 * pthread_mutex_unlock.c: Likewise.
510 * pthread_rwlock_destroy.c: Likewise.
511 * pthread_rwlock_rdlock.c: Likewise.
512 * pthread_rwlock_unlock.c: Likewise.
513 * pthread_rwlock_wrlock.c: Likewise.
514 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
515 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
516 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
517 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
518 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
519 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
520 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
521 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
522
523 2012-05-24 Roland McGrath <roland@hack.frob.com>
524
525 * pthread_create.c (start_thread): Define pthread_start LIBC_PROBE.
526
527 2012-05-17 Andreas Jaeger <aj@suse.de>
528
529 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
530 (HAVE_DL_DISCOVER_OSVERSION): Don't declare _dl_discover_osversion
531 only for older kernels.
532
533 2012-05-15 Joseph Myers <joseph@codesourcery.com>
534
535 * pthreadP.h [!__NR_set_robust_list] (__NR_set_robust_list): Do
536 not define.
537
538 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
539
540 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_lock): Load
541 futex pointer into RDI_LP. Use RSP_LP to operate on stack.
542 (lll_robust_lock): Likewise.
543 (lll_cond_lock): Likewise.
544 (lll_robust_cond_lock): Likewise.
545 (lll_timedlock): Likewise.
546 (lll_robust_timedlock): Likewise.
547 (lll_unlock): Likewise.
548 (lll_robust_unlock): Likewise.
549
550 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
551
552 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use
553 LP_OP(cmp) and RCX_LP on dep_mutex pointer.
554
555 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
556
557 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Use LP_OP(op)
558 on NWAITERS.
559 (__gcc_personality_v0): Replace 8-byte data alignment with
560 LP_SIZE alignment and .quad with ASM_ADDR.
561
562 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
563
564 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Use LP_OP(op)
565 on NWAITERS.
566 (__gcc_personality_v0): Replace 8-byte data alignment with
567 LP_SIZE alignment and .quad with ASM_ADDR.
568
569 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
570
571 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Use LP_OP(cmp) on
572 NWAITERS, which is unsigned long int.
573
574 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
575
576 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
577 (__gcc_personality_v0): Replace 8-byte data alignment with
578 LP_SIZE alignment and .quad with ASM_ADDR.
579
580 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
581
582 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Use
583 LP_OP(cmp), RSI_LP and R8_LP on dep_mutex pointer. Load
584 __vdso_clock_gettime pointer into RAX_LP.
585 (__gcc_personality_v0): Replace 8-byte data alignment with
586 LP_SIZE alignment and .quad with ASM_ADDR.
587
588 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
589
590 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.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
596 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
597
598 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Use
599 LP_OP(cmp) and R8_LP on dep_mutex pointer.
600
601 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
602
603 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Use LP_OP(mov)
604 to update pointer in memory. Load pointer into RDI_LP.
605
606 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
607
608 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
609 (LLL_STUB_UNWIND_INFO_START): Align label to LP_SIZE instead
610 of 8.
611 (LLL_STUB_UNWIND_INFO_END): Likewise.
612 (lll_timedlock): Load timeout pointer into RDX_LP.
613 (lll_robust_timedlock): Likewise.
614
615 2012-05-15 Siddhesh Poyarekar <siddhesh@redhat.com>
616 Jakub Jelinek <jakub@redhat.com>
617
618 [BZ #13613]
619 * Makefile (tests): Add test cases.
620 * descr.h (struct pthread): Add a comment describing multiple_threads.
621 * pthreadP.h (__pthread_multiple_threads): Expand comment to include
622 single-process case.
623 * pthread_cancel.c (pthread_cancel): Enable multiple_threads
624 before setting cancelstate of the thread.
625 * sysdeps/unix/sysv/linux/libc_multiple_threads.c
626 (__libc_multiple_threads): Add explanatory comment.
627 * tst-cancel-self-cancelstate.c: New test case.
628 * tst-cancel-self-canceltype.c: Likewise.
629 * tst-cancel-self-cleanup.c: Supporting file for test cases.
630 * tst-cancel-self-testcancel.c: New test case.
631 * tst-cancel-self.c: Likewise.
632 * vars.c: Expand comment to include single-process case.
633
634 2012-05-14 H.J. Lu <hongjiu.lu@intel.com>
635
636 * sysdeps/x86_64/tls.h: Don't include <bits/wordsize.h>.
637 (tcbhead_t): Remove __x86_64__ check. Align rtld_savespace_sse
638 to 32 bytes.
639
640 2012-05-14 H.J. Lu <hongjiu.lu@intel.com>
641
642 * sysdeps/pthread/pthread.h (__PTHREAD_RWLOCK_INT_FLAGS_SHARED):
643 New.
644 (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Check
645 __PTHREAD_RWLOCK_INT_FLAGS_SHARED instead of __WORDSIZE.
646
647 2012-05-14 H.J. Lu <hongjiu.lu@intel.com>
648
649 * shlib-versions: Move x86_64-.*-linux.* entry to ...
650 * sysdeps/x86_64/64/shlib-versions: Here. New file.
651 * sysdeps/x86_64/x32/shlib-versions: New file.
652
653 2012-05-14 H.J. Lu <hongjiu.lu@intel.com>
654
655 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Define x32
656 __SIZEOF_PTHREAD_XXX_T.
657 (__pthread_internal_list): Check __x86_64__ instead of __WORDSIZE.
658 (pthread_mutex_t): Likewise.
659 (pthread_rwlock_t): Likewise.
660 (__PTHREAD_RWLOCK_INT_FLAGS_SHARED): New. Defined if __x86_64__
661 is defined.
662
663 2012-05-11 H.J. Lu <hongjiu.lu@intel.com>
664
665 * sysdeps/x86_64/x32/tls.h: New file.
666
667 2012-05-11 H.J. Lu <hongjiu.lu@intel.com>
668
669 * sysdeps/x86_64/tls.h (THREAD_SETMEM): Use uint64_t on 64-bit
670 integer.
671 (THREAD_SETMEM_NC): Likewise.
672
673 2012-05-11 H.J. Lu <hongjiu.lu@intel.com>
674
675 * sysdeps/x86_64/tls.h (THREAD_SELF): Replace movq/%q0 with
676 mov/%0.
677
678 2012-05-11 H.J. Lu <hongjiu.lu@intel.com>
679
680 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
681 (__cleanup_fct_attribute): Check __x86_64__ instead of
682 __WORDSIZE.
683
684 2012-05-11 H.J. Lu <hongjiu.lu@intel.com>
685
686 * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER): Check
687 __PTHREAD_MUTEX_HAVE_PREV instead of __WORDSIZE.
688 (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Likewise.
689 (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
690 (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
691
692 2012-05-11 H.J. Lu <hongjiu.lu@intel.com>
693
694 * pthread_create.c (start_thread): Check __PTHREAD_MUTEX_HAVE_PREV
695 instead of __WORDSIZE.
696
697 2012-05-10 Thomas Schwinge <thomas@schwinge.name>
698
699 [BZ #3748]
700 * sysdeps/pthread/bits/libc-lockP.h (__libc_once_get): New macro.
701
702 2012-05-09 Chung-Lin Tang <cltang@codesourcery.com>
703
704 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
705 (__pthread_cond_timedwait): Use CFI directives.
706 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
707 (__pthread_cond_wait): Likewise.
708 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait): Likewise.
709 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
710
711 2012-05-03 David S. Miller <davem@davemloft.net>
712
713 * sysdeps/sparc/sparc64/pthread_spin_unlock.S: Fix thinko, we
714 always have to return 0, especially for the pthread_spin_init
715 alias.
716 * sysdeps/sparc/sparc32/pthread_spin_lock.S: Add missing trailing
717 newline.
718 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.S: Likewise.
719 * sysdeps/sparc/sparc64/pthread_spin_lock.S: Likewise.
720
721 2012-05-02 David S. Miller <davem@davemloft.net>
722
723 * sysdeps/sparc/sparc64/pthread_spin_lock.S: New.
724 * sysdeps/sparc/sparc64/pthread_spin_lock.c: Delete.
725 * sysdeps/sparc/sparc64/pthread_spin_unlock.S: New.
726 * sysdeps/sparc/sparc64/pthread_spin_unlock.c: Delete.
727 * sysdeps/sparc/sparc64/pthread_spin_trylock.S: New.
728 * sysdeps/sparc/sparc64/pthread_spin_trylock.c: Delete.
729 * sysdeps/sparc/sparc64/pthread_spin_init.c: New.
730 * sysdeps/sparc/sparc32/pthread_spin_lock.S: New.
731 * sysdeps/sparc/sparc32/pthread_spin_lock.c: Delete.
732 * sysdeps/sparc/sparc32/pthread_spin_trylock.S: New.
733 * sysdeps/sparc/sparc32/pthread_spin_trylock.c: Delete.
734 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.S: New.
735 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: Delete.
736 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.S: New.
737 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: Delete.
738 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.S: New.
739 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: Delete.
740 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_init.c: New.
741
742 2012-05-02 Allan McRae <allan@archlinux.org>
743
744 * Makefile: (LDFLAGS-tst-tls5): Use $(no-as-needed).
745 (LDFLAGS-tst-cancel24): Likewise.
746
747 2012-05-02 Paul Pluzhnikov <ppluzhnikov@google.com>
748
749 * sysdeps/i386/pthread_spin_lock.S: New.
750 * sysdeps/i386/pthread_spin_lock.c: Delete.
751 * sysdeps/x86_64/pthread_spin_lock.S: New.
752 * sysdeps/x86_64/pthread_spin_lock.c: Delete.
753
754 2012-04-28 Andreas Schwab <schwab@linux-m68k.org>
755
756 * Makefile ($(objpfx)tst-stack3-mem, $(objpfx)tst-tls6.out): Don't
757 run when cross-compiling.
758
759 2012-04-26 Siddhesh Poyarekar <siddhesh@redhat.com>
760
761 * sysdeps/pthread/unwind-forcedunwind.c: Include gnu/lib-names.h
762 instead of libgcc_s.h.
763
764 2012-04-20 Paul Pluzhnikov <ppluzhnikov@google.com>
765
766 * sysdeps/x86_64/tls.h (TLS_GET_FS, TLS_SET_FS): Delete.
767
768 2012-03-27 David S. Miller <davem@davemloft.net>
769
770 * tst-cond16.c (do_test): Use a thread stack size which is either
771 PTHREAD_STACK_MIN or the page size, whichever is larger.
772 * tst-cond18.c (do_test): Likewise.
773
774 2012-03-19 H.J. Lu <hongjiu.lu@intel.com>
775
776 * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Use
777 register char * __asm__("rsp") to get stack frame.
778
779 2012-03-19 H.J. Lu <hongjiu.lu@intel.com>
780
781 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (SYS_futex): Use
782 __NR_futex directly.
783
784 2012-03-19 H.J. Lu <hongjiu.lu@intel.com>
785
786 * unwind.c (unwind_stop): Cast _Unwind_GetCFA return to
787 _Unwind_Ptr first.
788
789 2012-03-16 David S. Miller <davem@davemloft.net>
790
791 [BZ #13844]
792 * sysdeps/unix/sysv/linux/libc-lowlevellock.c: Include using <..>
793 instead of "...".
794 * sysdeps/unix/sysv/linux/sparc/sparc32/libc-lowlevellock.c:
795 Delete, not needed.
796
797 2012-03-15 David S. Miller <davem@davemloft.net>
798
799 [BZ #13844]
800 * sysdeps/unix/sysv/linux/sparc/sparc32/libc-lowlevellock.c: New file.
801
802 2012-03-09 Paul Eggert <eggert@cs.ucla.edu>
803
804 [BZ #13673]
805 * pt-crti.S: Replace FSF snail mail address with URL.
806
807 2012-03-09 Joseph Myers <joseph@codesourcery.com>
808
809 * sysdeps/pthread/pthread.h (__need_clockid_t, __need_timespec):
810 Do not define before including <time.h>.
811
812 2012-03-08 David S. Miller <davem@davemloft.net>
813
814 * sysdeps/unix/sysv/linux/sparc/sem_post.c: Update copyright year.
815
816 2012-03-08 Thomas Schwinge <thomas@codesourcery.com>
817
818 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
819 Check for timestamp before the Epoch.
820
821 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait): Fix
822 updating nwaiters.
823
824 * tst-sem13.c (do_test): Add another test case.
825 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
826 Fix updating nwaiters.
827
828 2012-03-07 Joseph Myers <joseph@codesourcery.com>
829
830 [BZ #10545]
831 * sysdeps/pthread/configure.in (libc_cv_forced_unwind): Change
832 link test to a compile test.
833 (libc_cv_c_cleanup): Likewise. Declare puts rather than including
834 <stdio.h>.
835 * sysdeps/pthread/configure: Regenerated.
836
837 2012-03-07 Ulrich Drepper <drepper@gmail.com>
838
839 * Makefile (distribute): Remove variable.
840
841 2012-01-23 Thomas Schwinge <thomas@codesourcery.com>
842
843 * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Get rid of
844 superfluous assignment.
845 * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c (sem_timedwait):
846 Likewise.
847 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c
848 (sem_timedwait): Likewise.
849
850 2012-03-06 Ulrich Drepper <drepper@gmail.com>
851
852 * sysdeps/pthread/bits/libc-lock.h: Move information not needed in
853 installed headers to...
854 * sysdeps/pthread/bits/libc-lockP.h: ...here. New file.
855
856 2012-03-06 David S. Miller <davem@davemloft.net>
857
858 * sysdeps/unix/sysv/linux/sparc/sem_post.c (__new_sem_post): Use
859 atomic_increment and remove unused local variable.
860 (__old_sem_post): Likewise.
861
862 2012-02-27 David S. Miller <davem@davemloft.net>
863
864 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Don't refer to
865 non-existing __pthread_attr.
866 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
867 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
868 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
869 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
870 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
871
872 2012-02-26 Ulrich Drepper <drepper@gmail.com>
873
874 * sysdeps/pthread/pthread.h: Define __need_clockid_t for __USE_XOPEN2K.
875
876 * sysdeps/pthread/pthread.h: Define __need_timespec before including
877 <time.h>.
878 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Name pthread_attr_t
879 union.
880 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
881 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
882 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
883 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
884 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
885
886 2012-02-21 Joseph Myers <joseph@codesourcery.com>
887
888 [BZ #13695]
889 * Makefile (generated): Remove crti.S, crtn.S, defs.h and
890 pt-initfini.s.
891 [crti.S not in sysdirs] (omit-deps): Do not append.
892 [crti.S not in sysdirs] (CFLAGS-pt-initfini.s): Remove variable.
893 [crti.S not in sysdirs] (pt-initfini.c): Remove vpath directive.
894 [crti.S not in sysdirs] ($(objpfx)crti.S): Remove rule.
895 [crti.S not in sysdirs] ($(objpfx)crtn.S): Likewise.
896 [crti.S not in sysdirs] ($(objpfx)defs.h): Likewise.
897 [crti.S not in sysdirs] ($(objpfx)crti.o): Likewise.
898 [crti.S not in sysdirs] ($(objpfx)crtn.o): Likewise.
899 [crti.S in sysdirs] (extra-objs): Append unconditionally.
900 [crti.S in sysdirs] ($(objpfx)crti.o): Define rule
901 unconditionally.
902 * sysdeps/pthread/pt-initfini.c: Remove file.
903
904 2012-02-16 Richard Henderson <rth@twiddle.net>
905
906 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: Remove file.
907 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: Remove file.
908
909 2012-02-15 Kaz Kojima <kkojima@rr.iij4u.or.jp>
910
911 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: Remove file.
912
913 2012-02-16 David S. Miller <davem@davemloft.net>
914
915 * sysdeps/sparc/Makefile: Add -fPIC when building pt-crti.S and crtn.S
916
917 2012-02-15 Marek Polacek <polacek@redhat.com>
918
919 * sysdeps/unix/sysv/linux/x86_64/Makefile: Remove file.
920
921 2012-02-09 Paul Eggert <eggert@cs.ucla.edu>
922
923 Replace FSF snail mail address with URLs, as per GNU coding standards.
924
925 2012-02-08 Andreas Schwab <schwab@linux-m68k.org>
926
927 * Makefile (extra-objs) [crti.S in sysdirs]: Add pt-crti.o.
928
929 2012-02-08 Joseph Myers <joseph@codesourcery.com>
930
931 Support crti.S and crtn.S provided directly by architectures.
932 * Makefile [crti.S in sysdirs] (omit-deps): Do not append.
933 [crti.S in sysdirs] (CFLAGS-pt-initfini.s): Do not define variable.
934 [crti.S in sysdirs] ($(objpfx)pt-initfini.s): Disable rule.
935 [crti.S in sysdirs] ($(objpfx)crti.S): Likewise.
936 [crti.S in sysdirs] ($(objpfx)crtn.S): Likewise.
937 [crti.S in sysdirs] ($(objpfx)defs.h): Likewise.
938 [crti.S in sysdirs] ($(objpfx)crti.o): Likewise.
939 [crti.S in sysdirs] ($(objpfx)crtn.o): Likewise.
940 [crti.S in sysdirs] (pt-initfini.c): Remove vpath directive.
941 [crti.S in sysdirs] ($(objpfx)crti.o): New rule.
942 * pt-crti.S: New file.
943 * sysdeps/unix/sysv/linux/i386/Makefile: Remove file.
944
945 2012-02-03 Joseph Myers <joseph@codesourcery.com>
946
947 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
948 macros for PIC register setup.
949 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
950 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
951 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
952 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
953 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
954
955 2012-01-11 Marek Polacek <polacek@redhat.com>
956
957 * forward.c (FORWARD_NORETURN): Define macro.
958 (__pthread_unwind): Use FORWARD_NORETURN macro to avoid warning.
959 (__pthread_exit): Likewise.
960
961 2012-01-10 Ulrich Drepper <drepper@gmail.com>
962
963 * sysdeps/pthread/pthread.h: Add const attribute to pthread_equal.
964
965 * pthreadP.h: Add noreturn to __pthread_exit.
966 * sysdeps/pthread/pthread-functions.h: Likewise for ptr___pthread_exit.
967
968 2011-12-30 Adhemerval Zanella <azanella@linux.vnet.ibm.com>
969
970 * sysdeps/unix/sysv/linux/aio_misc.h (__aio_create_helper_thread):
971 Call pthread_attr_setstacksize() with result of
972 __pthread_get_minstack() to account for application TLS usage.
973
974 2012-01-08 Marek Polacek <polacek@redhat.com>
975
976 * sysdeps/unix/sysv/linux/mq_notify.c: Include <nptl/pthreadP.h>.
977
978 2012-01-07 Ulrich Drepper <drepper@gmail.com>
979
980 [BZ #13553]
981 * pthreadP.h: Use const instead of __const.
982 * semaphore.h: Likewise.
983 * sysdeps/pthread/bits/libc-lock.h: Likewise.
984 * sysdeps/pthread/bits/sigthread.h: Likewise.
985 * sysdeps/pthread/pthread.h: Likewise.
986
987 * Makefile: Remove elf=yes test, only ELF is supported.
988
989 * shlib-versions: Remove entries for ports architectures.
990
991 In case anyone cares, the IA-64 architecture could move to ports.
992 * sysdeps/ia64/*: Removed.
993 * sysdeps/unix/sysv/linux/ia64/*: Removed.
994
995 2011-12-22 Ulrich Drepper <drepper@gmail.com>
996
997 * sysdeps/pthread/gai_misc.h (__gai_create_helper_thread): Use
998 __pthread_get_minstack.
999 * sysdeps/unix/sysv/linux/mq_notify.c (init_mq_netlink): Likewise.
1000
1001 [BZ #13088]
1002 * sysdeps/unix/sysv/linux/timer_routines.c: Get minimum stack size
1003 through __pthread_get_minstack.
1004 * nptl-init.c (__pthread_initialize_minimal_internal): Get page size
1005 directly from _rtld_global_ro.
1006 (__pthread_get_minstack): New function.
1007 * pthreadP.h: Declare __pthread_get_minstack.
1008 * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_get_minstack.
1009
1010 2011-12-21 Ulrich Drepper <drepper@gmail.com>
1011
1012 [BZ #13515]
1013 * sysdeps/unix/sysv/linux/pthread_getname.c (pthread_getname_np):
1014 Correct reading name from file.
1015
1016 2011-12-14 Carlos O'Donell <carlos@systemhalted.org>
1017
1018 * allocatestack.c (allocate_stack): Return errno on failure.
1019
1020 2011-12-14 Jeff Law <law@redhat.com>
1021
1022 [BZ #5245]
1023 * pthread_create.c (__pthread_create_2_1): Translate ENOMEM to EAGAIN.
1024
1025 2011-11-28 Andreas Schwab <schwab@redhat.com>
1026
1027 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Handle
1028 EAGAIN from FUTEX_WAIT_REQUEUE_PI.
1029 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1030
1031 2011-11-15 Ulrich Drepper <drepper@gmail.com>
1032
1033 * pthread_getattr_np.c (pthread_getattr_np): Set FD_CLOEXEC for
1034 /proc/self/maps.
1035
1036 2011-10-29 Ulrich Drepper <drepper@gmail.com>
1037
1038 [BZ #13358]
1039 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1040 (__pthread_cond_timedwait): Initialize %r15 correctly also for code
1041 path for kernels with FUTEX_CLOCK_REALTIME.
1042 Debugged by H.J. Lu <hjl.tools@gmail.com>.
1043
1044 2011-10-27 Andreas Schwab <schwab@redhat.com>
1045
1046 [BZ #13344]
1047 * sysdeps/pthread/pthread.h: Use __THREADNL instead of __THREAD
1048 for memory synchronization functions.
1049 * semaphore.h: Likewise.
1050
1051 2011-10-24 Ulrich Drepper <drepper@gmail.com>
1052
1053 * tst-cancel7.c: Avoid warning.
1054 * tst-mutex6.c: Likewise.
1055 * tst-mutex9.c: Likewise.
1056 * tst-mutexpi6.c: Likewise.
1057
1058 2011-10-23 Ulrich Drepper <drepper@gmail.com>
1059
1060 * sysdeps/i386/tls.h: Remove #include <list.h>.
1061
1062 2011-10-15 Ulrich Drepper <drepper@gmail.com>
1063
1064 * pthread_create.c (start_thread): Call __ctype_init.
1065
1066 2011-09-15 Andreas Schwab <schwab@redhat.com>
1067
1068 * sysdeps/pthread/list.h: Define only list_t if __need_list_t is
1069 defined.
1070 (list_add): Add atomic_write_barrier.
1071 * descr.h: Define __need_list_t before including <list.h>.
1072 * nptl-init.c: Include <list.h>
1073 * allocatestack.c: Likewise.
1074
1075 2011-09-11 Ulrich Drepper <drepper@gmail.com>
1076
1077 * sysdeps/i386/tls.h: Remove HAVE_TLS_SUPPORT test.
1078 * sysdeps/ia64/tls.h: Likewise.
1079 * sysdeps/powerpc/tls.h: Likewise.
1080 * sysdeps/s390/tls.h: Likewise.
1081 * sysdeps/sh/tls.h: Likewise.
1082 * sysdeps/sparc/tls.h: Likewise.
1083 * sysdeps/x86_64/tls.h: Likewise.
1084
1085 2011-09-10 Ulrich Drepper <drepper@gmail.com>
1086
1087 * sysdeps/pthread/malloc-machine.h: Define MUTEX_INITIALIZER.
1088
1089 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Don't handle
1090 !USE___THREAD.
1091 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
1092 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
1093 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
1094 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
1095 * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
1096 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
1097 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
1098 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
1099 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
1100 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1101 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
1102 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
1103
1104 * tst-tls1.c: Support for __thread is now mandatory.
1105 * tst-tls2.c: Likewise.
1106 * tst-tls3.c: Likewise.
1107 * tst-tls3mod.c: Likewise.
1108 * tst-tls4.c: Likewise.
1109 * tst-tls4moda.c: Likewise.
1110 * tst-tls4modb.c: Likewise.
1111 * tst-tls5.h: Likewise.
1112
1113 2011-09-08 Ulrich Drepper <drepper@gmail.com>
1114
1115 [BZ #12403]
1116 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
1117 (pthread_rwlock_timedwrlock): Use correct macro in test.
1118 Patch by H.J. Lu <hongjiu.lu@intel.com>.
1119
1120 2011-09-06 Ulrich Drepper <drepper@gmail.com>
1121
1122 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait): Don't
1123 use gettimeofday vsyscall, just call gettimeofday.
1124 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
1125 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
1126 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
1127 Likewise.
1128 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1129 Likewise.
1130 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1131 Simplify __vdso_clock_gettime use.
1132
1133 2011-09-05 David S. Miller <davem@davemloft.net>
1134
1135 * sysdeps/unix/sysv/linux/sem_timedwait.c (do_futex_timed_wait):
1136 New function.
1137 (sem_timedwait): Call it to force an exception region around
1138 the async cancel enable and the futex operation.
1139 * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c: Likewise.
1140 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: Likewise.
1141 * sysdeps/unix/sysv/linux/sem_wait.c (do_futex_wait): New function.
1142 (__new_sem_wait): Call it to force an exception region around
1143 the async cancel enable and the futex operation.
1144 * sysdeps/unix/sysv/linux/sparc/sem_wait.c: Likewise.
1145 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: Likewise.
1146
1147 2011-08-31 Andreas Schwab <schwab@redhat.com>
1148
1149 * allocatestack.c (setxid_mark_thread): Ensure that the exiting
1150 thread is woken up.
1151
1152 2011-08-20 David S. Miller <davem@davemloft.net>
1153
1154 * Makefile (tst-cleanup0.out): Fix typo in output redirection.
1155
1156 2011-08-14 Roland McGrath <roland@hack.frob.com>
1157
1158 * sysdeps/i386/pthreaddef.h (TCB_ALIGNMENT): Set to 64, optimal on Atom.
1159 * sysdeps/x86_64/pthreaddef.h (TCB_ALIGNMENT): Likewise.
1160
1161 2011-08-08 Andreas Schwab <schwab@redhat.com>
1162
1163 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Maintain aligned
1164 stack.
1165 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1166 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1167
1168 2011-07-22 Ulrich Drepper <drepper@gmail.com>
1169
1170 * sysdeps/pthread/unwind-forcedunwind.c (_Unwind_Resume): Add read
1171 barrier.
1172 (__gcc_personality_v0): Likewise.
1173 (_Unwind_ForcedUnwind): Likewise.
1174 (_Unwind_GetCFA): Likewise.
1175
1176 2011-07-14 Roland McGrath <roland@hack.frob.com>
1177
1178 * allocatestack.c (__reclaim_stacks): Use uintptr_t cast rather than
1179 UINTMAX_C.
1180
1181 2011-06-30 Ulrich Drepper <drepper@gmail.com>
1182
1183 * nptl-init.c (__nptl_set_robust): New function.
1184 (pthread_functions): Add reference.
1185 * npthreadP.h: Declare __nptl_set_robust.
1186 * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
1187 ptr_set_robust member.
1188 * sysdeps/unix/sysv/linux/fork.c: Call set_robust_list syscall in
1189 child if threads are used.
1190
1191 2011-06-14 Andreas Jaeger <aj@suse.de>
1192
1193 * pthread_rwlock_init.c: Include <string.h> for memset declaration.
1194
1195 2011-05-11 Ulrich Drepper <drepper@gmail.com>
1196
1197 [BZ #386]
1198 * allocatestack.c (allocate_stack): Convert ENOMEM error to EAGAIN.
1199
1200 2011-04-10 Ulrich Drepper <drepper@gmail.com>
1201
1202 [BZ #12650]
1203 * allocatestack.c (get_cached_stack): Deallocate DTV entries before
1204 clearing memory.
1205 Patch partly by Robert Rex <robert.rex@exasol.com>.
1206
1207 2011-01-19 Roland McGrath <roland@redhat.com>
1208
1209 * pthread_cond_wait.c (__pthread_cond_wait): Fix comment typo.
1210 * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
1211 * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Likewise.
1212 * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
1213 * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock): Likewise.
1214 * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock): Likewise.
1215
1216 2011-01-16 Andreas Schwab <schwab@linux-m68k.org>
1217
1218 * Makefile (test-extras): Add tst-cleanup4aux.
1219
1220 2011-01-14 Ulrich Drepper <drepper@gmail.com>
1221
1222 [BZ #10563]
1223 * sysdeps/pthread/setxid.h (__SETXID_1): Add cast to assignment.
1224 (__SETXID_2): Likewise.
1225 (__SETXID_3): Likewise.
1226
1227 2011-01-13 Ulrich Drepper <drepper@gmail.com>
1228
1229 [BZ #10484]
1230 * Versions [libc] (GLIBC_PRIVATE): Export __libc_alloca_cutoff.
1231 * alloca_cutoff.c: Add libc_hidden_def.
1232
1233 2010-10-13 H.J. Lu <hongjiu.lu@intel.com>
1234
1235 [BZ #12113]
1236 * sysdeps/x86_64/pthreaddef.h (TCB_ALIGNMENT): Changed to 32.
1237 * sysdeps/x86_64/tls.h (TLS_TCB_ALIGN): Defined with alignment
1238 of "struct pthread".
1239
1240 2010-09-21 Andreas Schwab <schwab@redhat.com>
1241
1242 * sysdeps/pthread/pthread.h (pthread_cleanup_push)
1243 [!__EXCEPTIONS]: Mangle local variable not_first_call.
1244 (pthread_cleanup_push_defer_np): Likewise.
1245
1246 2010-09-03 Ulrich Drepper <drepper@redhat.com>
1247
1248 * sysdeps/pthread/allocalim.h (__libc_use_alloca): Expect blocks are
1249 small.
1250
1251 2010-08-10 Dinakar Guniguntala <dino@in.ibm.com>
1252 Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
1253
1254 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: If
1255 FUTEX_WAKE_OP fails make sure to call FUTEX_WAKE instead.
1256
1257 2010-08-12 H.J. Lu <hongjiu.lu@intel.com>
1258
1259 * sysdeps/unix/sysv/linux/i386/Makefile: New file.
1260
1261 2010-05-01 Alan Modra <amodra@gmail.com>
1262
1263 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
1264 (PSEUDO): Use correct cr save. Don't use wrong parm save area
1265 to save temps. Correct cfi for possible later frame manipulation.
1266 (DOCARGS_1, UNDOCARGS_1): Use the correct parm save area.
1267 (DOCARGS_2, UNDOCARGS_2, DOCARGS_3, UNDOCARGS_3): Likewise.
1268 (DOCARGS_4, UNDOCARGS_4, DOCARGS_5, UNDOCARGS_5): Likewise.
1269 (DOCARGS_6, UNDOCARGS_6): Likewise.
1270 (CENABLE, CDISABLE): Add nops for non-shared calls.
1271
1272 2010-07-06 Andreas Schwab <schwab@redhat.com>
1273
1274 * sysdeps/unix/sysv/linux/pthread_getname.c (pthread_getname_np):
1275 Fix type mismatch.
1276
1277 2010-07-03 Ulrich Drepper <drepper@redhat.com>
1278
1279 * tst-abstime.c (do_test): Some more cleanups
1280
1281 2010-07-02 Ulrich Drepper <drepper@redhat.com>
1282
1283 * tst-abstime.c: Correct testing and add test for sem_timedwait.
1284
1285 2010-07-01 Andreas Schwab <schwab@redhat.com>
1286 Ulrich Drepper <drepper@redhat.com>
1287
1288 * Makefile (tests): Add tst-abstime.
1289 * tst-abstime.c: New file.
1290 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
1291 (__lll_timedlock_wait): Check for timestamp before the Epoch.
1292 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
1293 (__lll_timedlock_wait): Likewise.
1294 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
1295 (__lll_robust_timedlock_wait): Likewise.
1296 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1297 (__pthread_cond_timedwait): Likewise.
1298 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
1299 (pthread_rwlock_timedrdlock): Likewise.
1300 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
1301 (pthread_rwlock_timedwrlock): Likewise.
1302 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
1303 Likewise.
1304
1305 2010-07-01 Ulrich Drepper <drepper@redhat.com>
1306
1307 * Makefile (tst-_res1): Add tst-_res1mod1 to dependency list.
1308
1309 2010-06-01 Takashi Yoshii <takashi.yoshii.zj@renesas.com>
1310
1311 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Fix incorrect
1312 location of ifndef __ASSUME_FUTEX_CLOCK_REALTIME.
1313
1314 2010-04-09 Ulrich Drepper <drepper@redhat.com>
1315
1316 [BZ #11390]
1317 * sysdeps/unix/sysv/linux/pthread_getname.c: New file.
1318 * sysdeps/unix/sysv/linux/pthread_setname.c: New file.
1319 * nptl/sysdeps/pthread/pthread.h: Declare pthread_getname and
1320 pthread_setname.
1321 * Makefile (libpthread-routines): Add pthread_getname and
1322 pthread_setname.
1323 * Versions: Export pthread_getname and pthread_setname for GLIBC_2.12.
1324
1325 2010-04-05 Thomas Schwinge <thomas@schwinge.name>
1326
1327 * sysdeps/pthread/unwind-resume.c: Moved to main tree sysdeps/gnu/.
1328 * sysdeps/pthread/rt-unwind-resume.c: Likewise.
1329 * sysdeps/pthread/Makefile: Remove csu section and rt section's
1330 unwind-resume bits, now in main tree sysdeps/gnu/Makefile instead.
1331
1332 2010-03-23 Luis Machado <luisgpm@br.ibm.com>
1333
1334 * pthread_cond_timedwait.c: Add check for
1335 HAVE_CLOCK_GETTIME_VSYSCALL to use VDSO whenever possible.
1336 (pthread_cond_timedwait): Use INTERNAL_VSYSCALL instead of
1337 INTERNAL_SYSCALL.
1338
1339 2010-03-09 Ulrich Drepper <drepper@redhat.com>
1340
1341 * pthread_create.c (__pthread_create_2_1): If priorities are incorrect
1342 and the call fails wake eventually waiting setxid threads. Don't free
1343 stack here if we try starting a thread.
1344 * sysdeps/pthread/createthread.c (do_clone): Only wake setxid waiter
1345 if the clone call failed.
1346
1347 2010-03-08 Andreas Schwab <schwab@redhat.com>
1348
1349 * pthread_create.c (__pthread_create_2_1): Don't set setxid_futex.
1350 * allocatestack.c (get_cached_stack): Set setxid_futex.
1351 (allocate_stack): Likewise.
1352
1353 2010-03-05 Andreas Schwab <schwab@redhat.com>
1354 Ulrich Drepper <drepper@redhat.com>
1355
1356 * allocatestack.c (setxid_mark_thread): Delay handling of thread if
1357 it is creating a thread or it is just being created.
1358 * pthread_create.c (start_thread): Wake setxid thread if it is
1359 waiting.
1360 (__pthread_create_2_1): Initialize setxid_futex.
1361 * sysdeps/pthread/createthread.c (do_clone): Wake setxid thread if it
1362 is waiting.
1363
1364 2010-01-15 Ulrich Drepper <drepper@redhat.com>
1365
1366 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
1367 Fix unwind info.
1368 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1369
1370 2010-01-15 Michal Schmidt <mschmidt@redhat.com>
1371
1372 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
1373 Fix pthread_cond_timedwait with requeue-PI.
1374 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
1375 Fix pthread_cond_wait with requeue-PI.
1376
1377 2010-01-14 Ulrich Drepper <drepper@redhat.com>
1378
1379 * Versions: Add pthread_mutex_consistent, pthread_mutexattr_getrobust,
1380 and pthread_mutexattr_setrobust for GLIBC_2.12.
1381 * pthread_mutex_consistent.c: Define alias pthread_mutex_consistent.
1382 * pthread_mutexattr_getrobust.c: Define alias
1383 pthread_mutexattr_getrobust.
1384 * pthread_mutexattr_setrobust.c: Define alias
1385 pthread_mutexattr_setrobust.
1386
1387 2010-01-12 Ulrich Drepper <drepper@redhat.com>
1388
1389 * sysdeps/pthread/pthread.h: Cleanup. Fix up for XPG7.
1390
1391 2010-01-08 Ulrich Drepper <drepper@redhat.com>
1392
1393 * sysdeps/pthread/pthread.h: Fix pthread_mutex_consistent declaration.
1394
1395 2009-12-18 Thomas Schwinge <thomas@codesourcery.com>
1396
1397 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c (_init): Don't
1398 call __gmon_start__.
1399 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c (_init): Likewise.
1400
1401 2009-12-17 Ulrich Drepper <drepper@redhat.com>
1402
1403 * pthread_rwlock_init.c (__pthread_rwlock_init): Simplify code by
1404 using memset.
1405
1406 2009-12-01 Dinakar Guniguntala <dino@in.ibm.com>
1407
1408 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.h: Define
1409 FUTEX_WAIT_REQUEUE_PI and FUTEX_CMP_REQUEUE_PI.
1410 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: If mutex
1411 is a non robust PI mutex, then use FUTEX_CMP_REQUEUE_PI.
1412 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
1413 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: If mutex
1414 is a non robust PI mutex, then use FUTEX_WAIT_REQUEUE_PI.
1415 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1416
1417 2009-12-12 Ulrich Drepper <drepper@redhat.com>
1418
1419 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
1420 Don't update nwaiters after invalid timeout is recognized.
1421
1422 2009-11-27 Thomas Schwinge <thomas@codesourcery.com>
1423
1424 * sysdeps/unix/sysv/linux/sh/pt-initfini.c (_init): Don't call
1425 __gmon_start__.
1426
1427 2009-11-27 Andreas Schwab <schwab@redhat.com>
1428
1429 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Reload
1430 THREAD_SELF->cancelhandling after returning from futex call.
1431
1432 2009-11-24 Ulrich Drepper <drepper@redhat.com>
1433
1434 * tst-sem13.c: New file.
1435 * Makefile (tests): Add tst-sem13.
1436
1437 2009-11-22 Roland McGrath <roland@redhat.com>
1438
1439 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: # include "i686/dl-sysdep.h"
1440 instead of recapitulating its contents.
1441
1442 2009-11-18 Ulrich Drepper <drepper@redhat.com>
1443
1444 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Minor
1445 optimizations and cleanups.
1446
1447 2009-11-18 Dinakar Guniguntala <dino@in.ibm.com>
1448
1449 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
1450 Remove redundant code. Fix cfi offsets.
1451 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
1452 Fix cfi offsets.
1453
1454 2009-11-17 Ulrich Drepper <drepper@redhat.com>
1455
1456 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Minimally
1457 reduce size of unwind info.
1458
1459 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Convert to use
1460 cfi directives.
1461 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1462 Based on a patch by Dinakar Guniguntala <dino@in.ibm.com>.
1463
1464 2009-11-03 Andreas Schwab <schwab@linux-m68k.org>
1465
1466 [BZ #4457]
1467 * sysdeps/pthread/unwind-resume.c: Include <libgcc_s.h> and use
1468 LIBGCC_S_SO.
1469 * sysdeps/pthread/unwind-forcedunwind.c: Likewise.
1470
1471 2009-10-30 Ulrich Drepper <drepper@redhat.com>
1472
1473 * tst-sem11.c (main): Rewrite to avoid aliasing problems.
1474
1475 [BZ #3270]
1476 * allocatestack.c (__nptl_setxid): Perform the operation in multiple
1477 steps to avoid races with creation and terminations.
1478 * nptl-init.c (sighandler_setxid): Adjust.
1479 Patch by Daniel Jacobowitz.
1480
1481 2009-09-07 Andreas Schwab <schwab@redhat.com>
1482
1483 * sysdeps/pthread/bits/libc-lock.h (BP_SYM): Remove space before paren.
1484
1485 2009-09-02 Suzuki K P <suzuki@in.ibm.com>
1486 Joseph Myers <joseph@codesourcery.com>
1487
1488 [BZ #7094]
1489 * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
1490 Initialize the sigev_notify field for newly created timer to make sure
1491 the timer gets deleted from the active timer's list upon timer_delete.
1492
1493 2009-08-27 Andrew Stubbs <ams@codesourcery.com>
1494
1495 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
1496 Correct a logic error.
1497
1498 2009-08-25 Ulrich Drepper <drepper@redhat.com>
1499
1500 * sysdeps/x86_64/tls.h (RTLD_ENABLE_FOREIGN_CALL): Store old value
1501 of the field in local variables.
1502 (RTLD_FINALIZE_FOREIGN_CALL): Restore rtld_must_xmm_save from local
1503 variable and don't unconditionally clear it.
1504
1505 2009-08-24 Ulrich Drepper <drepper@redhat.com>
1506
1507 * pthread_create.c (start_thread): Hint to the kernel that memory for
1508 the stack can be reused. We do not mark all the memory. The part
1509 still in use and some reserve are kept.
1510
1511 2009-08-23 Ulrich Drepper <drepper@redhat.com>
1512
1513 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Clean up namespace.
1514
1515 2009-08-11 Ulrich Drepper <drepper@redhat.com>
1516
1517 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Add CFI
1518 directives.
1519
1520 2009-08-10 Ulrich Drepper <drepper@redhat.com>
1521
1522 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Add CFI
1523 directives.
1524 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
1525
1526 2009-08-10 Andreas Schwab <schwab@redhat.com>
1527
1528 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
1529 (__pthread_cond_signal): Don't clobber register used for syscall
1530 number.
1531
1532 2009-08-08 Ulrich Drepper <drepper@redhat.com>
1533
1534 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
1535 Optimize code path used when FUTEX_CLOCK_REALTIME is supported.
1536
1537 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
1538 (__pthread_cond_wait): Optimize by avoiding use of callee-safe
1539 register.
1540
1541 2009-08-07 Ulrich Drepper <drepper@redhat.com>
1542
1543 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Little optimizations
1544 enabled by the special *_asynccancel functions.
1545 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1546 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1547
1548 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Include lowlevellock.h.
1549
1550 2009-08-04 Ulrich Drepper <drepper@redhat.com>
1551
1552 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: New file.
1553 * sysdeps/unix/sysv/linux/x86_64/libc-cancellation.S: New file.
1554 * sysdeps/unix/sysv/linux/x86_64/librt-cancellation.S: New file.
1555 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Optimize
1556 since we can assume the special __*_{en,dis}able_asynccancel
1557 functions.
1558 (PUSHARGS_*, POPARGS_*, SAVESTK_*, RESTSTK_*): Removed.
1559 * sysdeps/x86_64/tcb-offsets.sym: Add cancellation-related bits
1560 and PTHREAD_CANCELED.
1561
1562 2009-07-31 Ulrich Drepper <drepper@redhat.com>
1563
1564 * descr.h: Better definition of *_BITMASK macros for cancellation.
1565
1566 2009-07-29 Ulrich Drepper <drepper@redhat.com>
1567
1568 * sysdeps/x86_64/tls.h (TLS_TCB_ALIGN): Define explicitly to 32.
1569
1570 * sysdeps/x86_64/tls.h (tcbhead_t): Add room for SSE registers the
1571 dynamic linker might have to save.
1572 Define RTLD_CHECK_FOREIGN_CALL, RTLD_ENABLE_FOREIGN_CALL,
1573 RTLD_PREPARE_FOREIGN_CALL, and RTLD_FINALIZE_FOREIGN_CALL. Pretty
1574 printing.
1575
1576 * sysdeps/x86_64/tcb-offsets.sym: Add RTLD_SAVESPACE_SSE.
1577
1578 2009-07-28 Ulrich Drepper <drepper@redhat.com>
1579
1580 * pthread_mutex_lock.c [NO_INCR] (__pthread_mutex_cond_lock_adjust):
1581 New function.
1582 * pthreadP.h: Declare __pthread_mutex_cond_lock_adjust.
1583 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: Add ROBUST_BIT.
1584 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Don't use
1585 requeue_pi for robust mutexes.
1586 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
1587 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1588 Don't only skip __pthread_mutex_cond_lock. Call instead
1589 __pthread_mutex_cond_lock_adjust.
1590 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1591
1592 * pthread_mutex_unlock.c (__pthread_mutex_unlock_full): Minor
1593 optimization of PI mutex handling.
1594
1595 2009-07-27 Ulrich Drepper <drepper@redhat.com>
1596
1597 [BZ #10418]
1598 * pthread_mutex_unlock.c (__pthread_mutex_unlock_full): Use _rel
1599 instead of of _acq variants of cmpxchg.
1600
1601 2009-07-23 Ulrich Drepper <drepper@redhat.com>
1602
1603 * sysdeps/x86_64/configure.in: New file.
1604
1605 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix error
1606 path when not using absolute timeout futex.
1607
1608 2009-07-20 Ulrich Drepper <drepper@redhat.com>
1609
1610 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Minor
1611 optimizations of last changes.
1612 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1613
1614 2009-07-19 Ulrich Drepper <drepper@redhat.com>
1615
1616 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
1617 FUTEX_WAIT_REQUEUE_PI and FUTEX_CMP_REQUEUE_PI.
1618 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: If mutex
1619 is a PI mutex, then use FUTEX_CMP_REQUEUE_PI.
1620 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
1621 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: If mutex
1622 is a PI mutex, then use FUTEX_WAIT_REQUEUE_PI.
1623 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1624
1625 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1626 (__pthread_cond_timedwait): Make more robust.
1627
1628 2009-07-18 Ulrich Drepper <drepper@redhat.com>
1629
1630 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
1631 (__lll_robust_timedlock_wait): If possible use FUTEX_WAIT_BITSET to
1632 directly use absolute timeout.
1633
1634 * tst-sem5.c (do_test): Add test for premature timeout.
1635 * Makefile: Linu tst-sem5 with librt.
1636
1637 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
1638 (pthread_rwlock_timedwrlock): If possible use FUTEX_WAIT_BITSET to
1639 directly use absolute timeout.
1640 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
1641 (pthread_rwlock_timedrdlock): Likewise.
1642
1643 * tst-cond11.c (run_test): Add test to check that the timeout is
1644 long enough.
1645
1646 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
1647 (__pthread_cond_timedwait): If possible use FUTEX_WAIT_BITSET to
1648 directly use absolute timeout.
1649
1650 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
1651 (__pthread_cond_wait): Convert to using exception handler instead of
1652 registered unwind buffer.
1653 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1654 (__pthread_cond_timedwait): Likewise.
1655
1656 2009-07-17 Ulrich Drepper <drepper@redhat.com>
1657
1658 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
1659 If possible use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME to directly
1660 use absolute timeout.
1661
1662 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Optimize
1663 handling of uncontested semaphore.
1664
1665 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
1666 (__condvar_cleanup): Rewrite to use cfi directives instead of
1667 hand-coded unwind tables.
1668 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S (__pthread_once):
1669 Likewise.
1670 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
1671 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
1672 Likewise.
1673
1674 2009-06-12 Ulrich Drepper <drepper@redhat.com>
1675
1676 * Makefile (libpthread-routines): Add pthread_sigqueue.
1677 * Versions: Add pthread_sigqueue for GLIBC_2.11.
1678 * sysdeps/pthread/bits/sigthread.h: Declare pthread_sigqueue.
1679 * sysdeps/unix/sysv/linux/pthread_sigqueue.c: New file.
1680
1681 2009-06-11 Ulrich Drepper <drepper@redhat.com>
1682
1683 [BZ #10262]
1684 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
1685 (LOAD_FUTEX_WAIT_ABS): Fix futex parameter in case private futexes
1686 cannot be assumed.
1687 Patch by Bryan Kadzban <bz-glibc@kdzbn.homelinux.net>.
1688
1689 2009-05-16 Ulrich Drepper <drepper@redhat.com>
1690
1691 * libc-cancellation.c: Move __libc_cleanup_routine to...
1692 * libc-cleanup.c: ...here. New file.
1693 * Makefile (routines): Add libc-cleanup.
1694
1695 * cancellation.c (__pthread_disable_asynccancel): Remove unnecessary
1696 test.
1697 * libc-cancellation.c: Use <nptl/cancellation.c: to define the code.
1698 * sysdeps/pthread/librt-cancellation.c: Likewise.
1699
1700 [BZ #9924]
1701 * nptl-init.c: Renamed from init.c.
1702 * Makefile: Change all occurences of init.c to nptl-init.c.
1703
1704 2009-05-15 Ulrich Drepper <drepper@redhat.com>
1705
1706 * cancellation.c (__pthread_disable_asynccancel): Correct the bits
1707 to test when deciding on the delay.
1708 * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
1709 * pthread_cancel.c: Close race between deciding on sending a signal
1710 and setting the CANCELING_BIT bit.
1711
1712 * cancellation.c (__pthread_disable_asynccancel): Don't return if
1713 thread is canceled.
1714 * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
1715
1716 2009-04-27 Ulrich Drepper <drepper@redhat.com>
1717
1718 * cancellation.c (__pthread_disable_asynccancel): Use THREAD_ATOMIC_AND
1719 is available.
1720 * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
1721 * sysdeps/x86_64/tls.h: Define THREAD_ATOMIC_AND.
1722 * sysdeps/i386/tls.h: Likewise.
1723 (tcbhead_t): Add __private_tm member.
1724
1725 2009-04-26 Ulrich Drepper <drepper@redhat.com>
1726
1727 * sem_open.c (sem_open): Rewrite initialization of initsem to
1728 avoid warnings.
1729
1730 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
1731 Avoid warning by using may_alias attribute on ptrhack.
1732
1733 2009-04-22 Ulrich Drepper <drepper@redhat.com>
1734
1735 [BZ #10090]
1736 * pthread_attr_setschedparam.c (__pthread_attr_setschedparam):
1737 Check policy and priority for validity.
1738 Patch mostly by Zhang Xiliang <zhangxiliang@cn.fujitsu.com>.
1739
1740 2009-03-15 Ulrich Drepper <drepper@redhat.com>
1741
1742 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1743 (__pthread_cond_timedwait): Change to use cfi directives instead of
1744 hand-coded unwind sections.
1745
1746 2009-03-10 Ulrich Drepper <drepper@redhat.com>
1747
1748 * init.c (nptl_freeres): Compile only for SHARED.
1749
1750 2009-03-09 Jakub Jelinek <jakub@redhat.com>
1751
1752 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Define
1753 FUTEX_WAIT_BITSET, FUTEX_WAKE_BITSET, FUTEX_CLOCK_REALTIME and
1754 FUTEX_BITSET_MATCH_ANY.
1755
1756 2009-02-27 Roland McGrath <roland@redhat.com>
1757
1758 * init.c (__nptl_initial_report_events): Mark __attribute_used__.
1759 * pthread_create.c (__nptl_threads_events, __nptl_last_event): Likewise.
1760
1761 2009-02-26 Ulrich Drepper <drepper@redhat.com>
1762
1763 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
1764 _POSIX_THREAD_ROBUST_PRIO_INHERIT and
1765 _POSIX_THREAD_ROBUST_PRIO_PROTECT. Reset value of macros from
1766 200112L to 200809L.
1767
1768 2009-02-25 Ulrich Drepper <drepper@redhat.com>
1769
1770 * sysdeps/pthread/pthread.h: The robust mutex functions are in
1771 POSIX 2008.
1772
1773 2009-02-24 Ulrich Drepper <drepper@redhat.com>
1774
1775 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_BITS_POSIX_OPT_H):
1776 Unify name of include protector macro.
1777
1778 2009-02-14 SUGIOKA Toshinobu <sugioka@itonet.co.jp>
1779
1780 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
1781 LOAD_FUTEX_WAIT_ABS even if (FUTEX_WAIT == 0).
1782
1783 2009-01-29 Ulrich Drepper <drepper@redhat.com>
1784
1785 * sysdeps/pthread/unwind-forcedunwind.c: Encrypt all function
1786 pointer variables.
1787
1788 * allocatestack.c (__free_stacks): Renamed from free_stacks.
1789 (__free_stack_cache): Removed. Change callers to call __free_stacks.
1790 * init.c (nptl_freeres): New function.
1791 (pthread_functions): Initialize ptr_freeres to nptl_freeres.
1792 * pthreadP.h: Don't declare __free_stack_cache. Declare __free_stacks.
1793 * sysdeps/pthread/unwind-forcedunwind.c (libgcc_s_handle): New
1794 variable.
1795 (pthread_cancel_init): Depend in libgcc_s_handle for decision to
1796 load DSO. Assign last.
1797 (__unwind_freeres): New function.
1798
1799 * allocatestack.c (__reclaim_stacks): Reset in_flight_stack later
1800 for better debugging. No need to use stack_list_add here.
1801
1802 2009-01-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1803
1804 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
1805 (__lll_timedlock_wait): Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME
1806 instead of computing relative timeout.
1807 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
1808 FUTEX_CLOCK_REALTIME and FUTEX_BITSET_MATCH_ANY.
1809
1810 2009-01-25 Ulrich Drepper <drepper@redhat.com>
1811
1812 * pthread_mutex_lock.c (__pthread_mutex_lock): Remove unused label out.
1813
1814 2009-01-08 Ulrich Drepper <drepper@redhat.com>
1815
1816 * sysdeps/pthread/list.h (list_add): Initialize new element first.
1817 (list_add_tail): Removed.
1818
1819 2009-01-07 Ulrich Drepper <drepper@redhat.com>
1820
1821 * (in_flight_stack): New variable.
1822 (stack_list_del): New function. Use instead of list_del.
1823 (stack_list_add): New function. Use instead of list_add when adding to
1824 stack_cache and stack_used lists.
1825 (__reclaim_stacks): Complete operations on stack_cache and stack_used lists
1826 when the fork call interrupted another thread.
1827
1828 2009-01-04 Ulrich Drepper <drepper@redhat.com>
1829
1830 * init.c (__pthread_initialize_minimal_internal): Optimize test
1831 FUTEX_CLOCK_REALTIME a bit.
1832
1833 2009-01-03 Ulrich Drepper <drepper@redhat.com>
1834
1835 * init.c (__pthread_initialize_minimal_internal): Cheat a bit by
1836 only passing five parameters to FUTEX_WAIT_BITSET call.
1837
1838 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
1839 (__lll_timedlock_wait): Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME
1840 instead of computing relative timeout.
1841
1842 2009-01-02 Ulrich Drepper <drepper@redhat.com>
1843
1844 * init.c (__pthread_initialize_minimal_internal): Check for
1845 FUTEX_CLOCK_REALTIME flag.
1846 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
1847 Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME instead of computing
1848 relative timeout.
1849
1850 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
1851 FUTEX_CLOCK_REALTIME and FUTEX_BITSET_MATCH_ANY.
1852 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
1853 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
1854 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
1855 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
1856
1857 2008-12-09 Ulrich Drepper <drepper@redhat.com>
1858
1859 * sysdeps/pthread/pthread.h (pthread_cleanup_pop): Use { } as empty
1860 loop body instead of ; to avoid gcc warnings.
1861 (pthread_cleanup_pop_restore_np): Likewise.
1862 Patch by Caolán McNamara <caolanm@redhat.com>.
1863
1864 2008-12-09 Jakub Jelinek <jakub@redhat.com>
1865
1866 * pthread_mutex_lock.c (__pthread_mutex_lock): Handle only the
1867 fast path here, for robust/PI/PP mutexes call
1868 __pthread_mutex_lock_full. Don't use switch, instead use a series
1869 of ifs according to their probability.
1870 (__pthread_mutex_lock_full): New function.
1871 * pthread_mutex_unlock.c: Include assert.h.
1872 (__pthread_mutex_unlock_usercnt): Handle only the
1873 fast path here, for robust/PI/PP mutexes call
1874 __pthread_mutex_unlock_full. Don't use switch, instead use a series
1875 of ifs according to their probability.
1876 (__pthread_mutex_unlock_full): New function.
1877 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c
1878 (__pthread_mutex_lock_full): Define.
1879
1880 2008-12-08 Ulrich Drepper <drepper@redhat.com>
1881
1882 * sysdeps/x86_64/tls.h (tcbhead_t): Add fields reserved for TM
1883 implementation. Add necessary padding and.
1884 * descr.h (struct pthread): Increase padding for tcbhead_t to 24
1885 words.
1886
1887 2008-12-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1888
1889 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define FUTEX_WAIT_BITSET
1890 and FUTEX_WAKE_BITSET.
1891
1892 2008-12-02 Ulrich Drepper <drepper@redhat.com>
1893
1894 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_WAIT_BITSET
1895 and FUTEX_WAKE_BITSET.
1896 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
1897 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
1898 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
1899 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
1900
1901 2008-11-25 Roland McGrath <roland@redhat.com>
1902
1903 * sysdeps/alpha, sysdeps/unix/sysv/linux/alpha:
1904 Subdirectories moved to ports repository as
1905 sysdeps/.../nptl subdirectories.
1906
1907 2008-11-12 Jakub Jelinek <jakub@redhat.com>
1908
1909 [BZ #7008]
1910 * pthread_condattr_setclock.c (pthread_condattr_setclock): Fix masking
1911 of old value.
1912 * pthread_cond_init.c (__pthread_cond_init): Fix
1913 cond->__data.__nwaiters initialization.
1914 * Makefile (tests): Add tst-cond23.
1915 * tst-cond23.c: New test.
1916
1917 2008-11-07 Jakub Jelinek <jakub@redhat.com>
1918
1919 * sysdeps/pthread/malloc-machine.h (MALLOC): Adjust __libc_tsd_define
1920 arguments.
1921 (tsd_setspecific, tsd_getspecific): Adjust __libc_tsd_{set,get}
1922 arguments.
1923
1924 2008-11-01 Ulrich Drepper <drepper@redhat.com>
1925
1926 [BZ #6955]
1927 * pthread_mutex_lock.c: Add support for private PI mutexes.
1928 * pthread_mutex_timedlock.c: Likewise.
1929 * pthread_mutex_trylock.c: Likewise.
1930 * pthread_mutex_unlock.c: Likewise.
1931 Patch mostly by Ben Jackson <ben@ben.com>.
1932
1933 2008-10-31 Ulrich Drepper <drepper@redhat.com>
1934
1935 [BZ #6843]
1936 * sysdeps/pthread/gai_misc.h (__gai_create_helper_thread):
1937 Increase stack size for helper thread.
1938
1939 2008-10-06 Martin Schwidefsky <schwidefsky@de.ibm.com>
1940
1941 * sysdeps/s390/tls.h (THREAD_SET_STACK_GUARD): Add empty inline
1942 assembly with a clobber list for access registers a0 and a1.
1943
1944 2008-09-11 Martin Schwidefsky <schwidefsky@de.ibm.com>
1945
1946 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Add memory barrier
1947 to force runp->refcntr to be read from memory.
1948
1949 2008-09-08 Richard Guenther <rguenther@suse.de>
1950
1951 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_lock,
1952 lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
1953 lll_timedlock, lll_robust_timedlock, lll_unlock,
1954 lll_robust_unlock): Promote private to int.
1955
1956 2008-08-15 Ulrich Drepper <drepper@redhat.com>
1957
1958 * sysdeps/x86_64/pthreaddef.h: Remove ARCH_MAP_FLAGS and
1959 ARCH_RETRY_MMAP definitions.
1960 * allocatestack.c: Remove definition of ARCH_MAP_FLAGS.
1961 Define MAP_STACK when not defined.
1962 (allocate_stack): Use MAP_STACK instead of ARCH_MAP_FLAGS. Remove
1963 handling of ARCH_RETRY_MMAP.
1964
1965 2008-07-30 Ulrich Drepper <drepper@redhat.com>
1966
1967 * tst-align2.c (f): Print message that f is reached.
1968
1969 2008-04-28 Hiroki Kaminaga <kaminaga@sm.sony.co.jp>
1970
1971 [BZ #6740]
1972 * sysdeps/powerpc/tcb-offsets.sym (PRIVATE_FUTEX_OFFSET): Guard symbol
1973 definition with #ifndef __ASSUME_PRIVATE_FUTEX.
1974
1975 2008-07-25 Ulrich Drepper <drepper@redhat.com>
1976
1977 * sysdeps/unix/sysv/linux/mq_notify.c (init_mq_netlink): Use
1978 SOCK_CLOEXEC if possible.
1979
1980 2008-05-29 Ulrich Drepper <drepper@redhat.com>
1981
1982 * Makefile (tests): Add tst-rwlock2a.
1983 * tst-rwlock2.c: Use TYPE macro to decide what rwlock type to use.
1984 * tst-rwlock2a.c: New file.
1985
1986 2008-06-12 Ulrich Drepper <drepper@redhat.com>
1987
1988 * sysdeps/pthread/pthread.h: Remove inadvertant checkin.
1989
1990 2008-05-17 Samuel Thibault <samuel.thibault@ens-lyon.org>
1991
1992 * sysdeps/pthread/pthread.h: Fix typo in comment.
1993
1994 2008-05-28 Ulrich Drepper <drepper@redhat.com>
1995
1996 * sysdeps/pthread/createthread.c (do_clone): Pass accurate length
1997 of CPU set to the kernel.
1998
1999 2008-05-23 Paul Pluzhnikov <ppluzhnikov@google.com>
2000
2001 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Add
2002 cfi directives.
2003 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
2004 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
2005 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
2006 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
2007 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
2008 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
2009
2010 2008-05-22 Paul Pluzhnikov <ppluzhnikov@google.com>
2011
2012 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S: Add
2013 cfi directives.
2014 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2015 Likewise.
2016 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
2017 Likewise.
2018 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
2019 Likewise.
2020
2021 2008-05-26 Ulrich Drepper <drepper@redhat.com>
2022
2023 * tst-typesizes.c: Explicitly check __SIZEOF_PTHREAD_* constants.
2024
2025 2008-05-20 Jakub Jelinek <jakub@redhat.com>
2026
2027 David S. Miller <davem@davemloft.net>
2028
2029 * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: New file.
2030
2031 2008-05-10 Ulrich Drepper <drepper@redhat.com>
2032
2033 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Access
2034 __pshared correctly.
2035 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2036 Likewise.
2037 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2038 Likewise.
2039 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
2040 Likewise.
2041 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
2042 Likewise.
2043 Reported by Clemens Kolbitsch <clemens.kol@gmx.at>.
2044
2045 2008-04-14 David S. Miller <davem@davemloft.net>
2046
2047 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
2048 (__old_sem_wait): Fix argument to lll_futex_wait().
2049
2050 2007-11-26 Daniel Jacobowitz <dan@codesourcery.com>
2051
2052 * pthread_create.c: Require pthread_mutex_trylock and
2053 pthread_key_delete for libgcc.
2054
2055 2008-04-08 Jakub Jelinek <jakub@redhat.com>
2056
2057 [BZ #6020]
2058 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h
2059 (lll_futex_wake_unlock): Add private argument to the pre-v9 macro.
2060 Patch by Sunil Amitkumar Janki <devel.sjanki@gmail.com>.
2061
2062 2008-03-27 Ulrich Drepper <drepper@redhat.com>
2063
2064 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine ARG_MAX if
2065 <linux/limits.h> has defined it.
2066 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
2067 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
2068 * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
2069 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
2070
2071 2008-03-18 Jakub Jelinek <jakub@redhat.com>
2072
2073 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Use __ASSEMBLER__ instead
2074 of ASSEMBLER.
2075 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
2076 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Likewise.
2077
2078 2008-03-14 Ulrich Drepper <drepper@redhat.com>
2079
2080 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
2081 HAVE_DL_DISCOVER_OSVERSION.
2082 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
2083 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Likewise.
2084
2085 2008-03-07 Ulrich Drepper <drepper@redhat.com>
2086
2087 [BZ #5778]
2088 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Change
2089 _POSIX_CHOWN_RESTRICTED value to zero.
2090
2091 2008-01-31 Roland McGrath <roland@redhat.com>
2092
2093 * Makefile (omit-deps): Variable removed.
2094
2095 2008-01-30 Ulrich Drepper <drepper@redhat.com>
2096
2097 * sysdeps/unix/sysv/linux/x86_64/sem_post.S (sem_post): Avoid
2098 unnecessary addr32 prefix.
2099
2100 2008-01-29 Roland McGrath <roland@redhat.com>
2101
2102 * Makeconfig (ptw-CPPFLAGS, sysd-rules-patterns): New variables.
2103
2104 2008-01-22 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2105
2106 * sysdeps/unix/sysv/linux/sh/sem_post.S: Don't overflow value field.
2107
2108 2008-01-21 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2109
2110 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XADD): Use
2111 a scratch register.
2112 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
2113 (__lll_lock_wait_private): Fix typo.
2114 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
2115 (pthread_barrier_wait): Likewise. Adjust XADD use.
2116 * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
2117 Adjust XADD use.
2118 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S
2119 (pthread_rwlock_timedrdlock): Return correct return value.
2120 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S
2121 (pthread_rwlock_timedwrlock): Likewise.
2122
2123 2008-01-15 Ulrich Drepper <drepper@redhat.com>
2124
2125 * tst-eintr2.c (do_test): make sure that if mutex_lock in main
2126 thread returns the program exits with an error code.
2127
2128 2008-01-10 Ulrich Drepper <drepper@redhat.com>
2129
2130 * pthread-errnos.sym: Add EOVERFLOW.
2131 * sysdeps/unix/sysv/linux/structsem.sym: Add SEM_VALUE_MAX.
2132 * sysdeps/unix/sysv/linux/sem_post.c: Don't overflow value field.
2133 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
2134 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
2135
2136 2007-12-14 Ulrich Drepper <drepper@redhat.com>
2137
2138 * sysdeps/x86_64/pthreaddef.h (ARCH_RETRY_MMAP): Take additional
2139 parameter. Passed it as permission to mmap.
2140 * allocatestack.c (allocate_stack): Pass prot as second parameter
2141 to ARCH_RETRY_MMAP.
2142
2143 2007-12-12 Ulrich Drepper <drepper@redhat.com>
2144
2145 * tst-basic7.c: Allocate memory for the stack.
2146
2147 [BZ #5465]
2148 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S [!SHARED]
2149 (__pthread_cond_timedwait): Don't use VDSO.
2150 Patch by Michal Januszewski.
2151
2152 2007-12-07 Ulrich Drepper <drepper@redhat.com>
2153
2154 [BZ #5455]
2155 * sysdeps/pthread/pthread.h [!__EXCEPTIONS] (pthread_cleanup_pop):
2156 Allow label before pthread_cleanup_pop.
2157 (pthread_cleanup_pop_restore_np): Likewise.
2158
2159 2007-12-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2160
2161 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
2162 Store 2 before returning ETIMEDOUT.
2163
2164 2007-11-23 Ulrich Drepper <drepper@redhat.com>
2165
2166 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
2167 Store 2 before returning ETIMEDOUT.
2168 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise
2169 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
2170 (__lll_lock_wait_private): Optimize.
2171 (__lll_lock_wait): Likewise.
2172
2173 2007-11-20 Jakub Jelinek <jakub@redhat.com>
2174
2175 * sysdeps/pthread/pthread.h (pthread_cleanup_push,
2176 pthread_cleanup_push_defer_np): Add extra (void *) cast to shut up
2177 g++ 4.1 and 4.2 -Wstrict-aliasing warnings.
2178
2179 2007-11-08 Ulrich Drepper <drepper@redhat.com>
2180
2181 [BZ #5240]
2182 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
2183 If we time out, try one last time to lock the futex to avoid
2184 losing a wakeup signal.
2185 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
2186 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
2187
2188 [BZ #5245]
2189 * sysdeps/pthread/createthread.c (do_clone): Translate clone error
2190 if necessary.
2191
2192 2007-11-07 Ulrich Drepper <drepper@redhat.com>
2193
2194 [BZ #5245]
2195 * allocatestack.c (allocate_stack): Change ENOMEM error in case
2196 mmap failed to EAGAIN.
2197 * Makefile (tests): Add tst-basic7.
2198 * tst-basic7.c: New file.
2199
2200 2007-11-05 Ulrich Drepper <drepper@redhat.com>
2201
2202 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
2203 Use __linkin_atfork.
2204
2205 2007-11-03 Mike Frysinger <vapier@gentoo.org>
2206
2207 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (LOAD_FUTEX_WAIT): Add
2208 missing line continuations.
2209 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S (LOAD_FUTEX_WAIT,
2210 LOAD_FUTEX_WAKE): Likewise. Also add missing 3rd parameter.
2211
2212 2007-10-28 Ulrich Drepper <drepper@redhat.com>
2213
2214 [BZ #5220]
2215 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Declare
2216 __active_timer_sigev_thread and __active_timer_sigev_thread_lock.
2217 (struct timer): Add next element.
2218 * sysdeps/unix/sysv/linux/timer_create.c: For SIGEV_THREAD timers,
2219 enqueue timer structure into __active_timer_sigev_thread list.
2220 * sysdeps/unix/sysv/linux/timer_delete.c: For SIGEV_THREAD timers,
2221 remove timer struct from __active_timer_sigev_thread.
2222 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
2223 Before using timer structure make sure it is still on the
2224 __active_timer_sigev_thread list. Keep lock until done.
2225 Define __active_timer_sigev_thread and
2226 __active_timer_sigev_thread_lock.
2227
2228 2007-10-27 Ulrich Drepper <drepper@redhat.com>
2229
2230 * sysdeps/pthread/malloc-machine.h: Define ATFORK_MEM.
2231 Redefine thread_atfork for use of ATFORK_MEM.
2232 * sysdeps/unix/sysv/linux/fork.h: Define __linkin_atfork.
2233 * sysdeps/unix/sysv/linux/register-atfork.c (__linkin_atfork): New
2234 function.
2235 * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
2236 Use atomic operation when removing first element of list.
2237
2238 2007-10-17 Jakub Jelinek <jakub@redhat.com>
2239
2240 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__old_sem_post): New
2241 routine instead of an alias to __new_sem_post.
2242
2243 2007-10-15 Jakub Jelinek <jakub@redhat.com>
2244
2245 * init.c (__pthread_initialize_minimal): Initialize word to appease
2246 valgrind.
2247
2248 2007-10-10 Jakub Jelinek <jakub@redhat.com>
2249
2250 * sysdeps/pthread/bits/libc-lock.h (__libc_rwlock_init): Inside of
2251 libc.so just clear NAME.
2252 (__libc_rwlock_fini): Nop inside of libc.so.
2253 * tst-initializers1.c (main): Test if PTHREAD_RWLOCK_INITIALIZER is
2254 all zeros.
2255
2256 2007-09-02 Ulrich Drepper <drepper@redhat.com>
2257
2258 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
2259 (__pthread_cond_wait): Fix unlocking of internal lock after mutex
2260 unlocking failed.
2261 Patch by Luca Barbieri <luca.barbieri@gmail.com>.
2262
2263 2007-08-21 Ulrich Drepper <drepper@redhat.com>
2264
2265 [BZ #4938]
2266 * allocatestack.c (__reclaim_stacks): Clear the TSD in the
2267 reclaimed stack if necessary.
2268 * Makefile (tests): Add tst-tsd6.
2269 * tst-tsd6.c: New file.
2270
2271 2007-08-21 Jakub Jelinek <jakub@redhat.com>
2272
2273 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_dead):
2274 Add private argument.
2275
2276 2007-08-20 Ulrich Drepper <drepper@redhat.com>
2277
2278 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
2279 (__pthread_cond_timedwait): Use clock_gettime from VDSO if possible.
2280
2281 2007-08-16 Jakub Jelinek <jakub@redhat.com>
2282
2283 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h
2284 (__lll_robust_timedlock): Pass private as last argument to
2285 __lll_robust_timedlock_wait.
2286 (__lll_unlock): Fix a pasto.
2287
2288 2007-08-15 Jakub Jelinek <jakub@redhat.com>
2289
2290 * sysdeps/unix/sysv/linux/sparc/internaltypes.h (sparc_new_sem,
2291 sparc_old_sem): New structs.
2292 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
2293 (__sem_wait_cleanup): New function.
2294 (__new_sem_wait): Use sparc_new_sem structure. Bump and afterwards
2295 decrease nwaiters. Register __sem_wait_cleanup as cleanup handler.
2296 Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
2297 lll_futex_wait.
2298 (__old_sem_wait): New function.
2299 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: Include
2300 nptl/sysdeps/unix/sysv/linux/sparc version.
2301 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c:
2302 Likewise.
2303 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: Likewise.
2304 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c
2305 (__new_sem_trywait): Use sparc_old_sem structure.
2306 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c
2307 (sem_timedwait): Use sparc_new_sem structure. Bump and afterwards
2308 decrease nwaiters. Register __sem_wait_cleanup as cleanup handler.
2309 Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
2310 lll_futex_timed_wait.
2311 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c (__new_sem_post):
2312 Use sparc_new_sem structure. Only wake if nwaiters > 0. Pass
2313 isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
2314 lll_futex_wake.
2315 (__old_sem_post): New function.
2316 * sysdeps/unix/sysv/linux/sparc/sem_wait.c: New file.
2317 * sysdeps/unix/sysv/linux/sparc/sem_init.c: New file.
2318 * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c: New file.
2319 * sysdeps/unix/sysv/linux/sparc/sem_post.c: New file.
2320 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: Remove.
2321 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: Remove.
2322
2323 2007-08-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2324
2325 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
2326 (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
2327 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2328 Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
2329 * sysdeps/unix/sysv/linux/shpthread_cond_signal.S
2330 (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
2331 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2332 Use FUTEX_WAKE_OP.
2333 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
2334 kernel-features.h and tcb-offsets.h.
2335 (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
2336 lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
2337 process private.
2338 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
2339 tcb-offsets.h.
2340 (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE
2341 to lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
2342 process private.
2343 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use #ifdef
2344 __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
2345 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
2346 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
2347 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
2348 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
2349 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
2350
2351 2007-08-14 Jakub Jelinek <jakub@redhat.com>
2352
2353 * sysdeps/unix/sysv/linux/lowlevellock.c: Comment fix.
2354 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
2355 (__lll_timedwait_tid): Pass LLL_SHARED as 4th argument to
2356 lll_futex_timed_wait.
2357
2358 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (__lll_unlock,
2359 __lll_robust_unlock): Rewrite as macros instead of inline functions.
2360 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_unlock,
2361 __lll_robust_unlock, __lll_wait_tid): Likewise.
2362
2363 2007-08-13 Jakub Jelinek <jakub@redhat.com>
2364
2365 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
2366 Fix a pasto.
2367 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
2368 (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
2369 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2370 Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
2371 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
2372 (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
2373 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2374 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Include
2375 kernel-features.h.
2376 (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
2377 lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
2378 process private. Switch DW_CFA_advance_loc1 and some
2379 DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
2380 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
2381 (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE to
2382 lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
2383 process private. Switch DW_CFA_advance_loc{1,2} and some
2384 DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
2385 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use
2386 #ifdef __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
2387 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2388 Likewise.
2389 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
2390 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
2391 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2392 Likewise.
2393 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
2394 (__pthread_cond_broadcast): Compare %r8 instead of
2395 dep_mutex-cond_*(%rdi) with $-1.
2396 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
2397 (__pthread_cond_signal): Xor FUTEX_WAKE_OP with FUTEX_WAKE instead
2398 of oring.
2399
2400 2007-08-13 Ulrich Drepper <drepper@redhat.com>
2401
2402 * sysdeps/unix/sysv/linux/i386/i786/Implies: New file.
2403
2404 2007-08-13 Jakub Jelinek <jakub@redhat.com>
2405
2406 * allocatestack.c: Include kernel-features.h.
2407 * pthread_create.c: Likewise.
2408 * pthread_mutex_init.c: Likewise.
2409 * init.c: Likewise.
2410 * pthread_cond_timedwait.c: Likewise.
2411 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
2412 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2413 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
2414 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
2415 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
2416 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2417 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2418 Likewise.
2419 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2420 Likewise.
2421 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2422 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2423 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
2424 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
2425
2426 2007-08-12 Jakub Jelinek <jakub@redhat.com>
2427
2428 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
2429 [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
2430 byte elements. One of them is the new __shared element.
2431 [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
2432 adjust names of other padding elements.
2433 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
2434 [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
2435 byte elements. One of them is the new __shared element.
2436 [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
2437 adjust names of other padding elements.
2438 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_rwlock_t):
2439 Renamed __pad1 element to __shared, adjust names of other padding
2440 elements.
2441 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
2442 (pthread_rwlock_t): Likewise.
2443 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock): Fix a
2444 typo.
2445
2446 2007-08-09 Anton Blanchard <anton@samba.org>
2447
2448 * sysdeps/unix/sysv/linux/powerpc/pthread_spin_unlock.c: New file.
2449
2450 2007-08-12 Ulrich Drepper <drepper@redhat.com>
2451
2452 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Include
2453 <kernel-features.h>.
2454 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
2455
2456 2007-08-11 Ulrich Drepper <drepper@redhat.com>
2457
2458 * pthreadP.h (PTHREAD_ROBUST_MUTEX_PSHARED): Define.
2459 * pthread_mutex_lock.c: Use it instead of PTHREAD_MUTEX_PSHARED when
2460 dealing with robust mutexes.
2461 * pthread_mutex_timedlock.c: Likewise.
2462 * pthread_mutex_trylock.c: Likewise.
2463 * pthread_mutex_unlock.c: Likewise.
2464 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
2465
2466 2007-08-06 Jakub Jelinek <jakub@redhat.com>
2467
2468 * pthreadP.h (PTHREAD_MUTEX_PSHARED_BIT): Define.
2469 (PTHREAD_MUTEX_TYPE): Mask __kind with 127.
2470 (PTHREAD_MUTEX_PSHARED): Define.
2471 * pthread_mutex_init.c (__pthread_mutex_init): Set
2472 PTHREAD_MUTEX_PSHARED_BIT for pshared or robust
2473 mutexes.
2474 * pthread_mutex_lock.c (LLL_MUTEX_LOCK): Take mutex as argument
2475 instead of its __data.__lock field, pass PTHREAD_MUTEX_PSHARED
2476 as second argument to lll_lock.
2477 (LLL_MUTEX_TRYLOCK): Take mutex as argument
2478 instead of its __data.__lock field.
2479 (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
2480 __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
2481 to lll_robust_lock.
2482 (__pthread_mutex_lock): Update LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
2483 LLL_ROBUST_MUTEX_LOCK users, use PTHREAD_MUTEX_TYPE (mutex)
2484 instead of mutex->__data.__kind directly, pass
2485 PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock and lll_futex_wait.
2486 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Use
2487 PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
2488 directly, pass PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock.
2489 (pthread_mutex_timedlock): Pass PTHREAD_MUTEX_PSHARED (mutex)
2490 to lll_timedlock, lll_robust_timedlock, lll_unlock and
2491 lll_futex_timed_wait. Use PTHREAD_MUTEX_TYPE (mutex) instead
2492 of mutex->__data.__kind directly.
2493 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Pass
2494 PTHREAD_MUTEX_PSHARED (mutex) to lll_timedlock,
2495 lll_robust_timedlock, lll_unlock and lll_futex_timed_wait. Use
2496 PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind directly.
2497 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Pass
2498 PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock, lll_robust_unlock
2499 and lll_futex_wake.
2500 * pthread_mutex_setprioceiling.c (pthread_mutex_setprioceiling): Pass
2501 PTHREAD_MUTEX_PSHARED (mutex) to lll_futex_wait and lll_futex_wake.
2502 Use PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
2503 directly.
2504 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK):
2505 Take mutex as argument instead of its __data.__lock field, pass
2506 PTHREAD_MUTEX_PSHARED as second argument to lll_cond_lock.
2507 (LLL_MUTEX_TRYLOCK): Take mutex as argument instead of its
2508 __data.__lock field.
2509 (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
2510 __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
2511 to lll_robust_cond_lock.
2512 * pthread_cond_broadcast.c (__pthread_cond_broadcast): Add pshared
2513 variable, pass it to lll_lock, lll_unlock, lll_futex_requeue and
2514 lll_futex_wake. Don't use lll_futex_requeue if dependent mutex
2515 has PTHREAD_MUTEX_PSHARED_BIT bit set in its __data.__kind.
2516 * pthread_cond_destroy.c (__pthread_cond_destroy): Add pshared
2517 variable, pass it to lll_lock, lll_unlock, lll_futex_wake and
2518 lll_futex_wait.
2519 * pthread_cond_signal.c (__pthread_cond_signal): Add pshared
2520 variable, pass it to lll_lock, lll_unlock, lll_futex_wake_unlock and
2521 lll_futex_wake.
2522 * pthread_cond_timedwait.c (__pthread_cond_wait): Add
2523 pshared variable, pass it to lll_lock, lll_unlock,
2524 lll_futex_timedwait and lll_futex_wake.
2525 * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait): Add
2526 pshared variable, pass it to lll_lock, lll_unlock, lll_futex_wait
2527 and lll_futex_wake.
2528 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_requeue,
2529 lll_futex_wake_unlock): Add private argument, use __lll_private_flag
2530 macro.
2531 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue,
2532 lll_futex_wake_unlock): Likewise.
2533 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_requeue):
2534 Likewise.
2535 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_futex_requeue,
2536 lll_futex_wake_unlock): Likewise.
2537 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_requeue):
2538 Likewise.
2539 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue,
2540 lll_futex_wake_unlock): Likewise.
2541 (lll_futex_wake): Fix a typo.
2542 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym (PS_BIT): Add.
2543 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
2544 (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
2545 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2546 Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
2547 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
2548 (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
2549 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2550 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
2551 (__pthread_cond_timedwait): Likewise.
2552 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
2553 (__condvar_cleanup, __pthread_cond_wait): Likewise.
2554
2555 2007-08-05 Jakub Jelinek <jakub@redhat.com>
2556
2557 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
2558 Don't use CGOTSETUP and CGOTRESTORE macros.
2559 (CGOTSETUP, CGOTRESTORE): Remove.
2560 <IS_IN_rtld> (CENABLE, CDISABLE): Don't use JUMPTARGET, branch to
2561 @local symbol.
2562
2563 2007-08-01 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2564
2565 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Remove
2566 definitions for private futexes.
2567 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Include
2568 kernel-features.h and lowlevellock.h. Use private futexes if
2569 they are available.
2570 (__lll_lock_wait_private, __lll_unlock_wake_private): New.
2571 (__lll_mutex_lock_wait): Rename to
2572 (__lll_lock_wait): ... this. Don't compile in for libc.so.
2573 (__lll_mutex_timedlock_wait): Rename to ...
2574 (__lll_timedlock_wait): ... this. Use __NR_gettimeofday.
2575 Don't compile in for libc.so.
2576 (__lll_mutex_unlock_wake): Rename to ...
2577 (__lll_unlock_wake): ... this. Don't compile in for libc.so.
2578 (__lll_timedwait_tid): Use __NR_gettimeofday.
2579 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Allow including
2580 the header from assembler. Renamed all lll_mutex_* resp.
2581 lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
2582 Renamed all LLL_MUTEX_LOCK_* macros to LLL_LOCK_*.
2583 (FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE):
2584 Define.
2585 (__lll_lock_wait_private): Add prototype.
2586 (__lll_lock_wait, __lll_timedlock_wait, __lll_robust_lock_wait,
2587 __lll_robust_timedlock_wait, __lll_unlock_wake_private,
2588 __lll_unlock_wake): Likewise.
2589 (lll_lock): Add private argument. Call __lll_lock_wait_private
2590 if private is constant LLL_PRIVATE.
2591 (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
2592 lll_timedlock, lll_robust_timedlock): Add private argument.
2593 (lll_unlock): Add private argument. Call __lll_unlock_wake_private
2594 if private is constant LLL_PRIVATE.
2595 (lll_robust_unlock, lll_robust_dead): Add private argument.
2596 (lll_lock_t): Remove.
2597 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
2598 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
2599 lll_cond_wake, lll_cond_broadcast): Remove.
2600 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: Include
2601 kernel-features.h and lowlevellock.h.
2602 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
2603 (LOAD_FUTEX_WAIT): Define.
2604 (__lll_robust_mutex_lock_wait): Rename to ...
2605 (__lll_robust_lock_wait): ... this. Add private argument.
2606 Use LOAD_FUTEX_WAIT macro.
2607 (__lll_robust_mutex_timedlock_wait): Rename to ...
2608 (__lll_robust_timedlock_wait): ... this. Add private argument.
2609 Use __NR_gettimeofday. Use LOAD_FUTEX_WAIT macro.
2610 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Include
2611 lowlevellock.h.
2612 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
2613 (pthread_barrier_wait): Use __lll_{lock,unlock}_* instead of
2614 __lll_mutex_{lock,unlock}_*.
2615 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Include
2616 lowlevellock.h and pthread-errnos.h.
2617 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
2618 FUTEX_CMP_REQUEUE, EINVAL): Remove.
2619 (__pthread_cond_broadcast): Use __lll_{lock,unlock}_* instead of
2620 __lll_mutex_{lock,unlock}_*.
2621 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Include
2622 lowlevellock.h and pthread-errnos.h.
2623 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE, EINVAL): Remove.
2624 (__pthread_cond_signal): Use __lll_{lock,unlock}_* instead of
2625 __lll_mutex_{lock,unlock}_*.
2626 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
2627 lowlevellock.h.
2628 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE): Remove.
2629 (__pthread_cond_timedwait): Use __lll_{lock,unlock}_* instead of
2630 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
2631 (__condvar_tw_cleanup): Likewise.
2632 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
2633 lowlevellock.h.
2634 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
2635 (__pthread_cond_wait): Use __lll_{lock,unlock}_* instead of
2636 __lll_mutex_{lock,unlock}_*.
2637 ( __condvar_w_cleanup): Likewise.
2638 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Include lowlevellock.h.
2639 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
2640 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Include
2641 lowlevellock.h.
2642 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
2643 (__pthread_rwlock_rdlock): Use __lll_{lock,unlock}_* instead of
2644 __lll_mutex_{lock,unlock}_*.
2645 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Include
2646 lowlevellock.h.
2647 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
2648 FUTEX_PRIVATE_FLAG): Remove.
2649 (pthread_rwlock_timedrdlock): Use __lll_{lock,unlock}_* instead of
2650 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
2651 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Include
2652 lowlevellock.h.
2653 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
2654 FUTEX_PRIVATE_FLAG): Remove.
2655 (pthread_rwlock_timedwrlock): Use __lll_{lock,unlock}_* instead of
2656 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
2657 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Include
2658 lowlevellock.h.
2659 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
2660 (__pthread_rwlock_unlock): Use __lll_{lock,unlock}_* instead of
2661 __lll_mutex_{lock,unlock}_*.
2662 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Include
2663 lowlevellock.h.
2664 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
2665 (__pthread_rwlock_wrlock): Use __lll_{lock,unlock}_* instead of
2666 __lll_mutex_{lock,unlock}_*.
2667 * sysdeps/unix/sysv/linux/sh/sem_post.S: Include lowlevellock.h.
2668 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
2669 (__new_sem_post): Use standard initial exec code sequences.
2670 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Include
2671 lowlevellock.h.
2672 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
2673 FUTEX_PRIVATE_FLAG): Remove.
2674 (sem_timedwait): Use __NR_gettimeofday. Use standard initial
2675 exec code sequences.
2676 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Include lowlevellock.h.
2677 (__new_sem_trywait): Use standard initial exec code sequences.
2678 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Include lowlevellock.h.
2679 (__new_sem_wait): Use standard initial exec code sequences.
2680
2681 2007-07-31 Anton Blanchard <anton@samba.org>
2682
2683 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
2684 Use __asm __volatile (__lll_acq_instr ::: "memory") instead of
2685 atomic_full_barrier.
2686
2687 2007-07-31 Jakub Jelinek <jakub@redhat.com>
2688
2689 * allocatestack.c (stack_cache_lock): Change type to int.
2690 (get_cached_stack, allocate_stack, __deallocate_stack,
2691 __make_stacks_executable, __find_thread_by_id, __nptl_setxid,
2692 __pthread_init_static_tls, __wait_lookup_done): Add LLL_PRIVATE
2693 as second argument to lll_lock and lll_unlock macros on
2694 stack_cache_lock.
2695 * pthread_create.c (__find_in_stack_list): Likewise.
2696 (start_thread): Similarly with pd->lock. Use lll_robust_dead
2697 macro instead of lll_robust_mutex_dead, pass LLL_SHARED to it
2698 as second argument.
2699 * descr.h (struct pthread): Change lock and setxid_futex field
2700 type to int.
2701 * old_pthread_cond_broadcast.c (__pthread_cond_broadcast_2_0): Use
2702 LLL_LOCK_INITIALIZER instead of LLL_MUTEX_LOCK_INITIALIZER.
2703 * old_pthread_cond_signal.c (__pthread_cond_signal_2_0): Likewise.
2704 * old_pthread_cond_timedwait.c (__pthread_cond_timedwait_2_0):
2705 Likewise.
2706 * old_pthread_cond_wait.c (__pthread_cond_wait_2_0): Likewise.
2707 * pthread_cond_init.c (__pthread_cond_init): Likewise.
2708 * pthreadP.h (__attr_list_lock): Change type to int.
2709 * pthread_attr_init.c (__attr_list_lock): Likewise.
2710 * pthread_barrier_destroy.c (pthread_barrier_destroy): Pass
2711 ibarrier->private ^ FUTEX_PRIVATE_FLAG as second argument to
2712 lll_{,un}lock.
2713 * pthread_barrier_wait.c (pthread_barrier_wait): Likewise and
2714 also for lll_futex_{wake,wait}.
2715 * pthread_barrier_init.c (pthread_barrier_init): Make iattr
2716 a pointer to const.
2717 * pthread_cond_broadcast.c (__pthread_cond_broadcast): Pass
2718 LLL_SHARED as second argument to lll_{,un}lock.
2719 * pthread_cond_destroy.c (__pthread_cond_destroy): Likewise.
2720 * pthread_cond_signal.c (__pthread_cond_singal): Likewise.
2721 * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
2722 * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait):
2723 Likewise.
2724 * pthread_getattr_np.c (pthread_getattr_np): Add LLL_PRIVATE
2725 as second argument to lll_{,un}lock macros on pd->lock.
2726 * pthread_getschedparam.c (__pthread_getschedparam): Likewise.
2727 * pthread_setschedparam.c (__pthread_setschedparam): Likewise.
2728 * pthread_setschedprio.c (pthread_setschedprio): Likewise.
2729 * tpp.c (__pthread_tpp_change_priority, __pthread_current_priority):
2730 Likewise.
2731 * sysdeps/pthread/createthread.c (do_clone, create_thread):
2732 Likewise.
2733 * pthread_once.c (once_lock): Change type to int.
2734 (__pthread_once): Pass LLL_PRIVATE as second argument to
2735 lll_{,un}lock macros on once_lock.
2736 * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Use
2737 lll_{,un}lock macros instead of lll_mutex_{,un}lock, pass
2738 rwlock->__data.__shared as second argument to them and similarly
2739 for lll_futex_w*.
2740 * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock):
2741 Likewise.
2742 * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock):
2743 Likewise.
2744 * pthread_rwlock_tryrdlock.c (__pthread_rwlock_tryrdlock): Likewise.
2745 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Likewise.
2746 * pthread_rwlock_unlock.c (__pthread_rwlock_unlock): Likewise.
2747 * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
2748 * sem_close.c (sem_close): Pass LLL_PRIVATE as second argument
2749 to lll_{,un}lock macros on __sem_mappings_lock.
2750 * sem_open.c (check_add_mapping): Likewise.
2751 (__sem_mappings_lock): Change type to int.
2752 * semaphoreP.h (__sem_mappings_lock): Likewise.
2753 * pthread_mutex_lock.c (LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
2754 LLL_ROBUST_MUTEX_LOCK): Use lll_{,try,robust_}lock macros
2755 instead of lll_*mutex_*, pass LLL_SHARED as last
2756 argument.
2757 (__pthread_mutex_lock): Use lll_unlock instead of lll_mutex_unlock,
2758 pass LLL_SHARED as last argument.
2759 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK,
2760 LLL_MUTEX_TRYLOCK, LLL_ROBUST_MUTEX_LOCK): Use
2761 lll_{cond_,cond_try,robust_cond}lock macros instead of lll_*mutex_*,
2762 pass LLL_SHARED as last argument.
2763 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
2764 lll_{timed,try,robust_timed,un}lock instead of lll_*mutex*, pass
2765 LLL_SHARED as last argument.
2766 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Similarly.
2767 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt):
2768 Similarly.
2769 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_lock,
2770 __libc_lock_lock_recursive, __libc_lock_unlock,
2771 __libc_lock_unlock_recursive): Pass LLL_PRIVATE as second
2772 argument to lll_{,un}lock.
2773 * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_lock,
2774 _IO_lock_unlock): Likewise.
2775 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Don't use
2776 compound literal.
2777 * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
2778 Pass LLL_PRIVATE as second argument to lll_{,un}lock macros on
2779 __fork_lock.
2780 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork,
2781 free_mem): Likewise.
2782 (__fork_lock): Change type to int.
2783 * sysdeps/unix/sysv/linux/fork.h (__fork_lock): Likewise.
2784 * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Pass
2785 isem->private ^ FUTEX_PRIVATE_FLAG as second argument to
2786 lll_futex_wake.
2787 * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
2788 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Likewise.
2789 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait_private):
2790 New function.
2791 (__lll_lock_wait, __lll_timedlock_wait): Add private argument and
2792 pass it through to lll_futex_*wait, only compile in when
2793 IS_IN_libpthread.
2794 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
2795 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): Add private
2796 argument and pass it through to lll_futex_*wait.
2797 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Renamed all
2798 lll_mutex_* resp. lll_robust_mutex_* macros to lll_* resp.
2799 lll_robust_*. Renamed all __lll_mutex_* resp. __lll_robust_mutex_*
2800 inline functions to __lll_* resp. __lll_robust_*.
2801 (LLL_MUTEX_LOCK_INITIALIZER): Remove.
2802 (lll_mutex_dead): Add private argument.
2803 (__lll_lock_wait_private): New prototype.
2804 (__lll_lock_wait, __lll_robust_lock_wait, __lll_lock_timedwait,
2805 __lll_robust_lock_timedwait): Add private argument to prototypes.
2806 (__lll_lock): Add private argument, if it is constant LLL_PRIVATE,
2807 call __lll_lock_wait_private, otherwise pass private to
2808 __lll_lock_wait.
2809 (__lll_robust_lock, __lll_cond_lock, __lll_timedlock,
2810 __lll_robust_timedlock): Add private argument, pass it to
2811 __lll_*wait functions.
2812 (__lll_unlock): Add private argument, if it is constant LLL_PRIVATE,
2813 call __lll_unlock_wake_private, otherwise pass private to
2814 __lll_unlock_wake.
2815 (__lll_robust_unlock): Add private argument, pass it to
2816 __lll_robust_unlock_wake.
2817 (lll_lock, lll_robust_lock, lll_cond_lock, lll_timedlock,
2818 lll_robust_timedlock, lll_unlock, lll_robust_unlock): Add private
2819 argument, pass it through to __lll_* inline function.
2820 (__lll_mutex_unlock_force, lll_mutex_unlock_force): Remove.
2821 (lll_lock_t): Remove.
2822 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
2823 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
2824 lll_cond_wake, lll_cond_broadcast): Remove.
2825 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2826 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2827 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2828 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
2829 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Allow including
2830 the header from assembler. Renamed all lll_mutex_* resp.
2831 lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
2832 (LOCK, FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP,
2833 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
2834 (LLL_MUTEX_LOCK_INITIALIZER, LLL_MUTEX_LOCK_INITIALIZER_LOCKED,
2835 LLL_MUTEX_LOCK_INITIALIZER_WAITERS): Remove.
2836 (__lll_mutex_lock_wait, __lll_mutex_timedlock_wait,
2837 __lll_mutex_unlock_wake, __lll_lock_wait, __lll_unlock_wake):
2838 Remove prototype.
2839 (__lll_trylock_asm, __lll_lock_asm_start, __lll_unlock_asm): Define.
2840 (lll_robust_trylock, lll_cond_trylock): Use LLL_LOCK_INITIALIZER*
2841 rather than LLL_MUTEX_LOCK_INITIALIZER* macros.
2842 (lll_trylock): Likewise, use __lll_trylock_asm, pass
2843 MULTIPLE_THREADS_OFFSET as another asm operand.
2844 (lll_lock): Add private argument, use __lll_lock_asm_start, pass
2845 MULTIPLE_THREADS_OFFSET as last asm operand, call
2846 __lll_lock_wait_private if private is constant LLL_PRIVATE,
2847 otherwise pass private as another argument to __lll_lock_wait.
2848 (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
2849 lll_timedlock, lll_robust_timedlock): Add private argument, pass
2850 private as another argument to __lll_*lock_wait call.
2851 (lll_unlock): Add private argument, use __lll_unlock_asm, pass
2852 MULTIPLE_THREADS_OFFSET as another asm operand, call
2853 __lll_unlock_wake_private if private is constant LLL_PRIVATE,
2854 otherwise pass private as another argument to __lll_unlock_wake.
2855 (lll_robust_unlock): Add private argument, pass private as another
2856 argument to __lll_unlock_wake.
2857 (lll_robust_dead): Add private argument, use __lll_private_flag
2858 macro.
2859 (lll_islocked): Use LLL_LOCK_INITIALIZER instead of
2860 LLL_MUTEX_LOCK_INITIALIZER.
2861 (lll_lock_t): Remove.
2862 (LLL_LOCK_INITIALIZER_WAITERS): Define.
2863 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
2864 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
2865 lll_cond_wake, lll_cond_broadcast): Remove.
2866 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2867 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Revert
2868 2007-05-2{3,9} changes.
2869 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Include
2870 kernel-features.h and lowlevellock.h.
2871 (LOAD_PRIVATE_FUTEX_WAIT): Define.
2872 (LOAD_FUTEX_WAIT): Rewritten.
2873 (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
2874 define.
2875 (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
2876 (__lll_mutex_lock_wait): Rename to ...
2877 (__lll_lock_wait): ... this. Take futex addr from %edx instead of
2878 %ecx, %ecx is now private argument. Don't compile in for libc.so.
2879 (__lll_mutex_timedlock_wait): Rename to ...
2880 (__lll_timedlock_wait): ... this. Use __NR_gettimeofday. %esi
2881 contains private argument. Don't compile in for libc.so.
2882 (__lll_mutex_unlock_wake): Rename to ...
2883 (__lll_unlock_wake): ... this. %ecx contains private argument.
2884 Don't compile in for libc.so.
2885 (__lll_timedwait_tid): Use __NR_gettimeofday.
2886 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Include
2887 kernel-features.h and lowlevellock.h.
2888 (LOAD_FUTEX_WAIT): Define.
2889 (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
2890 define.
2891 (__lll_robust_mutex_lock_wait): Rename to ...
2892 (__lll_robust_lock_wait): ... this. Futex addr is now in %edx
2893 argument, %ecx argument contains private. Use LOAD_FUTEX_WAIT
2894 macro.
2895 (__lll_robust_mutex_timedlock_wait): Rename to ...
2896 (__lll_robust_timedlock_wait): ... this. Use __NR_gettimeofday.
2897 %esi argument contains private, use LOAD_FUTEX_WAIT macro.
2898 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Include
2899 lowlevellock.h.
2900 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2901 (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
2902 PRIVATE(%ebx) ^ LLL_SHARED as private argument in %ecx to
2903 __lll_lock_wait and __lll_unlock_wake, pass MUTEX(%ebx) address
2904 to __lll_lock_wait in %edx.
2905 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
2906 Include lowlevellock.h and pthread-errnos.h.
2907 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
2908 FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
2909 (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*, pass
2910 cond_lock address in %edx rather than %ecx to __lll_lock_wait,
2911 pass LLL_SHARED in %ecx to both __lll_lock_wait and
2912 __lll_unlock_wake.
2913 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
2914 Include lowlevellock.h and pthread-errnos.h.
2915 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
2916 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
2917 (__pthread_cond_signal): 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_timedwait.S:
2922 Include lowlevellock.h.
2923 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
2924 Don't define.
2925 (__pthread_cond_timedwait): 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. Use __NR_gettimeofday.
2929 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
2930 Include lowlevellock.h.
2931 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2932 (__pthread_cond_wait, __condvar_w_cleanup): Rename __lll_mutex_*
2933 to __lll_*, pass cond_lock address in %edx rather than %ecx to
2934 __lll_lock_wait, pass LLL_SHARED in %ecx to both __lll_lock_wait
2935 and __lll_unlock_wake.
2936 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S:
2937 Include lowlevellock.h.
2938 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2939 (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*, pass
2940 MUTEX(%ebx) address in %edx rather than %ecx to
2941 __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
2942 and __lll_unlock_wake. Move return value from %ecx to %edx
2943 register.
2944 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2945 Include lowlevellock.h.
2946 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
2947 Don't define.
2948 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
2949 MUTEX(%ebp) address in %edx rather than %ecx to
2950 __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
2951 and __lll_unlock_wake. Move return value from %ecx to %edx
2952 register. Use __NR_gettimeofday.
2953 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2954 Include lowlevellock.h.
2955 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
2956 Don't define.
2957 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
2958 MUTEX(%ebp) address in %edx rather than %ecx to
2959 __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
2960 and __lll_unlock_wake. Move return value from %ecx to %edx
2961 register. Use __NR_gettimeofday.
2962 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
2963 Include lowlevellock.h.
2964 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2965 (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*, pass
2966 MUTEX(%edi) address in %edx rather than %ecx to
2967 __lll_lock_wait, pass PSHARED(%edi) in %ecx to both __lll_lock_wait
2968 and __lll_unlock_wake.
2969 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
2970 Include lowlevellock.h.
2971 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2972 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
2973 MUTEX(%ebx) address in %edx rather than %ecx to
2974 __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
2975 and __lll_unlock_wake. Move return value from %ecx to %edx
2976 register.
2977 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Include
2978 lowlevellock.h.
2979 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
2980 define.
2981 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Include lowlevellock.h.
2982 (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
2983 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Include
2984 lowlevellock.h.
2985 (LOCK, SYS_futex, SYS_gettimeofday, FUTEX_WAIT): Don't define.
2986 (sem_timedwait): Use __NR_gettimeofday.
2987 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Include
2988 lowlevellock.h.
2989 (LOCK): Don't define.
2990 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include
2991 lowlevellock.h.
2992 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
2993 * sysdeps/unix/sysv/linux/powerpc/sem_post.c: Wake only when there
2994 are waiters.
2995 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Revert
2996 2007-05-2{3,9} changes.
2997 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Include
2998 kernel-features.h and lowlevellock.h.
2999 (LOAD_PRIVATE_FUTEX_WAIT): Define.
3000 (LOAD_FUTEX_WAIT): Rewritten.
3001 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
3002 (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
3003 (__lll_mutex_lock_wait): Rename to ...
3004 (__lll_lock_wait): ... this. %esi is now private argument.
3005 Don't compile in for libc.so.
3006 (__lll_mutex_timedlock_wait): Rename to ...
3007 (__lll_timedlock_wait): ... this. %esi contains private argument.
3008 Don't compile in for libc.so.
3009 (__lll_mutex_unlock_wake): Rename to ...
3010 (__lll_unlock_wake): ... this. %esi contains private argument.
3011 Don't compile in for libc.so.
3012 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Include
3013 kernel-features.h and lowlevellock.h.
3014 (LOAD_FUTEX_WAIT): Define.
3015 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
3016 (__lll_robust_mutex_lock_wait): Rename to ...
3017 (__lll_robust_lock_wait): ... this. %esi argument contains private.
3018 Use LOAD_FUTEX_WAIT macro.
3019 (__lll_robust_mutex_timedlock_wait): Rename to ...
3020 (__lll_robust_timedlock_wait): ... this. %esi argument contains
3021 private, use LOAD_FUTEX_WAIT macro.
3022 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Include
3023 lowlevellock.h.
3024 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3025 (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
3026 PRIVATE(%rdi) ^ LLL_SHARED as private argument in %esi to
3027 __lll_lock_wait and __lll_unlock_wake.
3028 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S:
3029 Include lowlevellock.h and pthread-errnos.h.
3030 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
3031 FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
3032 (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*,
3033 pass LLL_SHARED in %esi to both __lll_lock_wait and
3034 __lll_unlock_wake.
3035 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S:
3036 Include lowlevellock.h and pthread-errnos.h.
3037 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
3038 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
3039 (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*,
3040 pass LLL_SHARED in %esi to both __lll_lock_wait and
3041 __lll_unlock_wake.
3042 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:
3043 Include lowlevellock.h.
3044 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3045 (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*,
3046 pass LLL_SHARED in %esi to both __lll_lock_wait and
3047 __lll_unlock_wake.
3048 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
3049 Include lowlevellock.h.
3050 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3051 (__pthread_cond_wait, __condvar_cleanup): Rename __lll_mutex_*
3052 to __lll_*, pass LLL_SHARED in %esi to both __lll_lock_wait
3053 and __lll_unlock_wake.
3054 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S:
3055 Include lowlevellock.h.
3056 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
3057 Don't define.
3058 (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*,
3059 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
3060 and __lll_unlock_wake.
3061 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
3062 Include lowlevellock.h.
3063 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
3064 Don't define.
3065 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
3066 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
3067 and __lll_unlock_wake.
3068 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3069 Include lowlevellock.h.
3070 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
3071 Don't define.
3072 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
3073 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
3074 and __lll_unlock_wake.
3075 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S:
3076 Include lowlevellock.h.
3077 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
3078 Don't define.
3079 (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*,
3080 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
3081 and __lll_unlock_wake.
3082 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S:
3083 Include lowlevellock.h.
3084 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
3085 Don't define.
3086 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
3087 pass PSHARED(%rdi) in %ecx to both __lll_lock_wait
3088 and __lll_unlock_wake.
3089 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Include
3090 lowlevellock.h.
3091 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
3092 define.
3093 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Include lowlevellock.h.
3094 (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
3095 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Include
3096 lowlevellock.h.
3097 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
3098 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Include
3099 lowlevellock.h.
3100 (LOCK): Don't define.
3101 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Include
3102 lowlevellock.h.
3103 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
3104 * sysdeps/unix/sysv/linux/sparc/internaltypes.h: New file.
3105 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_destroy.c: New file.
3106 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_init.c: New file.
3107 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_wait.c: New file.
3108 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
3109 (__lll_lock_wait_private): New function.
3110 (__lll_lock_wait, __lll_timedlock_wait): Add private argument, pass
3111 it to lll_futex_*wait. Don't compile in for libc.so.
3112 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c:
3113 Remove.
3114 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c
3115 (struct sparc_pthread_barrier): Remove.
3116 (pthread_barrier_wait): Use union sparc_pthread_barrier instead of
3117 struct sparc_pthread_barrier. Pass
3118 ibarrier->s.pshared ? LLL_SHARED : LLL_PRIVATE to lll_{,un}lock
3119 and lll_futex_wait macros.
3120 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
3121 Remove.
3122 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
3123 Include sparc pthread_barrier_wait.c instead of generic one.
3124
3125 2007-07-30 Jakub Jelinek <jakub@redhat.com>
3126
3127 * tst-rwlock14.c (do_test): Avoid warnings on 32-bit arches.
3128
3129 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
3130 (pthread_rwlock_timedrdlock): Copy futex retval to %esi rather than
3131 %ecx.
3132 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
3133 (pthread_rwlock_timedwrlock): Likewise.
3134 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
3135 (__pthread_rwlock_unlock): Fix MUTEX != 0 args to __lll_*.
3136
3137 2007-07-31 Jakub Jelinek <jakub@redhat.com>
3138
3139 * sysdeps/sparc/tls.h (tcbhead_t): Add private_futex field.
3140
3141 2007-07-26 Jakub Jelinek <jakub@redhat.com>
3142
3143 * tst-locale2.c (useless): Add return statement.
3144
3145 2007-07-24 Jakub Jelinek <jakub@redhat.com>
3146
3147 * allocatestack.c (__nptl_setxid, __wait_lookup_done): Replace
3148 lll_private_futex_* (*) with lll_futex_* (*, LLL_PRIVATE).
3149 * pthread_create.c (start_thread): Likewise.
3150 * init.c (sighandler_setxid): Likewise.
3151 * sysdeps/alpha/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3152 * sysdeps/ia64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3153 * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3154 * sysdeps/s390/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3155 * sysdeps/powerpc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3156 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3157 * sysdeps/sparc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3158 * sysdeps/sh/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3159 * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY, AIO_MISC_WAIT):
3160 Likewise.
3161 * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY, GAI_MISC_WAIT):
3162 Likewise.
3163 * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
3164 Likewise.
3165 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_waitzero,
3166 __rtld_notify): Likewise.
3167 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Likewise.
3168 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (clear_once_control,
3169 __pthread_once): Likewise.
3170 * sysdeps/unix/sysv/linux/alpha/pthread_once.c (clear_once_control,
3171 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
3172 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_PRIVATE_FLAG,
3173 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
3174 (lll_futex_wait): Add private argument, define as wrapper around
3175 lll_futex_timed_wait.
3176 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
3177 use __lll_private_flag macro.
3178 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
3179 __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
3180 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (clear_once_control,
3181 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
3182 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_PRIVATE_FLAG,
3183 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
3184 (lll_futex_wait): Add private argument, define as wrapper around
3185 lll_futex_timed_wait.
3186 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
3187 use __lll_private_flag macro.
3188 (__lll_mutex_unlock, __lll_robust_mutex_unlock, lll_wait_tid,
3189 __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
3190 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
3191 Define.
3192 (lll_futex_timed_wait, lll_futex_wake): Use it.
3193 (lll_private_futex_wait, lll_private_futex_timed_wait,
3194 lll_private_futex_wake): Removed.
3195 * sysdeps/unix/sysv/linux/s390/pthread_once.c (clear_once_control,
3196 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
3197 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_PRIVATE_FLAG,
3198 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
3199 (lll_futex_wait): Add private argument, define as wrapper around
3200 lll_futex_timed_wait.
3201 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
3202 use __lll_private_flag macro.
3203 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
3204 lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
3205 to lll_futex_*.
3206 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
3207 (lll_private_futex_wait, lll_private_futex_timed_wait,
3208 lll_private_futex_wake): Removed.
3209 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_private_flag):
3210 Fix !__ASSUME_PRIVATE_FUTEX non-constant private case.
3211 (lll_private_futex_wait, lll_private_futex_timed_wait,
3212 lll_private_futex_wake): Removed.
3213 * sysdeps/unix/sysv/linux/sparc/pthread_once.c (clear_once_control,
3214 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
3215 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_PRIVATE_FLAG,
3216 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
3217 (lll_futex_wait): Add private argument, define as wrapper around
3218 lll_futex_timed_wait.
3219 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
3220 use __lll_private_flag macro.
3221 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
3222 lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
3223 to lll_futex_*.
3224 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (__lll_private_flag):
3225 Define.
3226 (lll_futex_timed_wait, lll_futex_wake): Use it.
3227 (lll_private_futex_wait, lll_private_futex_timed_wait,
3228 lll_private_futex_wake): Removed.
3229
3230 2007-07-27 Jakub Jelinek <jakub@redhat.com>
3231
3232 * sysdeps/sparc/tls.h (tcbhead_t): Move gscope_flag to the end
3233 of the structure for sparc32.
3234
3235 2007-07-26 Aurelien Jarno <aurelien@aurel32.net>
3236
3237 * sysdeps/sparc/tls.h (tcbhead_t): Add gscope_flag.
3238
3239 2007-07-23 Ulrich Drepper <drepper@redhat.com>
3240
3241 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
3242 code used when private futexes are assumed.
3243 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3244 Likewise.
3245
3246 2007-07-23 Jakub Jelinek <jakub@redhat.com>
3247
3248 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
3249 (__lll_private_flag): Define.
3250 (lll_futex_wait): Define as a wrapper around lll_futex_timed_wait.
3251 (lll_futex_timed_wait, lll_futex_wake, lll_futex_wake_unlock): Use
3252 __lll_private_flag.
3253 (lll_private_futex_wait, lll_private_futex_timedwait,
3254 lll_private_futex_wake): Define as wrapper around non-_private
3255 macros.
3256 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
3257 (__lll_private_flag): Define.
3258 (lll_futex_timed_wait, lll_futex_wake): Use __lll_private_flag.
3259 (lll_private_futex_wait, lll_private_futex_timedwait,
3260 lll_private_futex_wake): Define as wrapper around non-_private
3261 macros.
3262
3263 2007-07-10 Steven Munroe <sjmunroe@us.ibm.com>
3264
3265 * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Add LLL_SHARED
3266 parameter to lll_futex_wait call.
3267 * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
3268
3269 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
3270 Replace lll_futex_wait with lll_private_futex_wait.
3271 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
3272 Add LLL_SHARED parameter to lll_futex_wake().
3273
3274 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define LLL_PRIVATE
3275 LLL_SHARED, lll_private_futex_wait, lll_private_futex_timed_wait and
3276 lll_private_futex_wake.
3277 (lll_futex_wait): Add private parameter. Adjust FUTEX_PRIVATE_FLAG
3278 bit from private parm before syscall.
3279 (lll_futex_timed_wait): Likewise.
3280 (lll_futex_wake): Likewise.
3281 (lll_futex_wake_unlock): Likewise.
3282 (lll_mutex_unlock): Add LLL_SHARED parm to lll_futex_wake call.
3283 (lll_robust_mutex_unlock): Likewise.
3284 (lll_mutex_unlock_force): Likewise.
3285 (lll_wait_tid): Add LLL_SHARED parm to lll_futex_wait call.
3286
3287 2007-07-23 Ulrich Drepper <drepper@redhat.com>
3288
3289 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
3290 compilation when unconditionally using private futexes.
3291 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
3292 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3293 Likewise.
3294 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
3295 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
3296
3297 2007-07-17 Jakub Jelinek <jakub@redhat.com>
3298
3299 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock_clear_flags2):
3300 Define.
3301
3302 2007-07-06 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3303
3304 * sysdeps/sh/tls.h: Include stdlib.h, list.h, sysdep.h and
3305 kernel-features.h.
3306
3307 2007-05-16 Roland McGrath <roland@redhat.com>
3308
3309 * init.c (__nptl_initial_report_events): New variable.
3310 (__pthread_initialize_minimal_internal): Initialize pd->report_events
3311 to that.
3312
3313 2007-06-22 Jakub Jelinek <jakub@redhat.com>
3314
3315 * pthread_getattr_np.c (pthread_getattr_np): Clear cpuset and
3316 cpusetsize if pthread_getaffinity_np failed with ENOSYS.
3317
3318 2007-06-19 Ulrich Drepper <drepper@redhat.com>
3319
3320 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Remove mrlock
3321 implementation.
3322
3323 2007-06-18 Ulrich Drepper <drepper@redhat.com>
3324
3325 * pthreadP.h: Define PTHREAD_MUTEX_TYPE.
3326 * phtread_mutex_lock.c: Use PTHREAD_MUTEX_TYPE.
3327 * pthread_mutex_timedlock.c: Likewise.
3328 * pthread_mutex_trylock.c: Likewise.
3329 * pthread_mutex_unlock.c: Likewise.
3330
3331 2007-06-17 Andreas Schwab <schwab@suse.de>
3332
3333 * sysdeps/pthread/pt-initfini.c: Tell gcc about the nonstandard
3334 sections.
3335
3336 2007-06-17 Ulrich Drepper <drepper@redhat.com>
3337
3338 * allocatestack.c (allocate_stack): Make code compile if
3339 __ASSUME_PRIVATE_FUTEX is set.
3340
3341 2007-06-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3342
3343 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S:
3344 (__pthread_rwlock_rdlock): Don't use non SH-3/4 instruction.
3345 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S:
3346 (__pthread_rwlock_wrlock): Likewise.
3347 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
3348 (pthread_rwlock_timedrdlock): Likewise.
3349 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
3350 (pthread_rwlock_timedwrlock): Likewise.
3351 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S:
3352 (__pthread_rwlock_unlock): Likewise.
3353
3354 2007-06-10 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3355
3356 * sysdeps/sh/tcb-offsets.sym: Add PRIVATE_FUTEX.
3357 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Include endian.h.
3358 Split __flags into __flags, __shared, __pad1 and __pad2.
3359 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Use private
3360 futexes if they are available.
3361 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Adjust so that change
3362 in libc-lowlevellock.S allow using private futexes.
3363 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
3364 FUTEX_PRIVATE_FLAG. Add additional parameter to lll_futex_wait,
3365 lll_futex_timed_wait and lll_futex_wake. Change lll_futex_wait
3366 to call lll_futex_timed_wait. Add lll_private_futex_wait,
3367 lll_private_futex_timed_wait and lll_private_futex_wake.
3368 (lll_robust_mutex_unlock): Fix typo.
3369 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Use private
3370 field in futex command setup.
3371 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Use
3372 COND_NWAITERS_SHIFT instead of COND_CLOCK_BITS.
3373 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
3374 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use private futexes
3375 if they are available. Remove clear_once_control.
3376 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Use private
3377 futexes if they are available.
3378 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
3379 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
3380 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
3381 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
3382 * sysdeps/unix/sysv/linux/sh/sem_post.S: Add private futex support.
3383 Wake only when there are waiters.
3384 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add private futex
3385 support. Indicate that there are waiters. Remove unnecessary
3386 extra cancellation test.
3387 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise. Removed
3388 left-over duplication of __sem_wait_cleanup.
3389
3390 2007-06-07 Ulrich Drepper <drepper@redhat.com>
3391
3392 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Add additional
3393 parameter to lll_futex_wait, lll_futex_timed_wait, and
3394 lll_futex_wake. Change lll_futex_wait to call lll_futex_timed_wait.
3395 Add lll_private_futex_wait, lll_private_futex_timed_wait, and
3396 lll_private_futex_wake.
3397 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
3398 * allocatestack.c: Adjust use of lll_futex_* macros.
3399 * init.c: Likewise.
3400 * lowlevellock.h: Likewise.
3401 * pthread_barrier_wait.c: Likewise.
3402 * pthread_cond_broadcast.c: Likewise.
3403 * pthread_cond_destroy.c: Likewise.
3404 * pthread_cond_signal.c: Likewise.
3405 * pthread_cond_timedwait.c: Likewise.
3406 * pthread_cond_wait.c: Likewise.
3407 * pthread_create.c: Likewise.
3408 * pthread_mutex_lock.c: Likewise.
3409 * pthread_mutex_setprioceiling.c: Likewise.
3410 * pthread_mutex_timedlock.c: Likewise.
3411 * pthread_mutex_unlock.c: Likewise.
3412 * pthread_rwlock_timedrdlock.c: Likewise.
3413 * pthread_rwlock_timedwrlock.c: Likewise.
3414 * pthread_rwlock_unlock.c: Likewise.
3415 * sysdeps/alpha/tls.h: Likewise.
3416 * sysdeps/i386/tls.h: Likewise.
3417 * sysdeps/ia64/tls.h: Likewise.
3418 * sysdeps/powerpc/tls.h: Likewise.
3419 * sysdeps/pthread/aio_misc.h: Likewise.
3420 * sysdeps/pthread/gai_misc.h: Likewise.
3421 * sysdeps/s390/tls.h: Likewise.
3422 * sysdeps/sh/tls.h: Likewise.
3423 * sysdeps/sparc/tls.h: Likewise.
3424 * sysdeps/unix/sysv/linux/fork.c: Likewise.
3425 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
3426 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: Likewise.
3427 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Likewise.
3428 * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
3429 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
3430 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
3431 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
3432 * sysdeps/unix/sysv/linux/sparc/pthread_once.c: Likewise.
3433 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c:
3434 Likewise.
3435 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: Likewise.
3436 * sysdeps/x86_64/tls.h: Likewise.
3437
3438 2007-05-29 Ulrich Drepper <drepper@redhat.com>
3439
3440 * pthread_getattr_np.c: No need to install a cancellation handler,
3441 this is no cancellation point.
3442 * pthread_getschedparam.c: Likewise.
3443 * pthread_setschedparam.c: Likewise.
3444 * pthread_setschedprio.c: Likewise.
3445 * sysdeps/unix/sysv/linux/lowlevellock.c: Remove all traces of
3446 lll_unlock_wake_cb.
3447 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
3448 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
3449 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
3450 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
3451 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
3452 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
3453 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
3454 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
3455 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
3456 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: Likewise.
3457 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
3458 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
3459
3460 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Checking
3461 whether there are more than one thread makes no sense here since
3462 we only call the slow path if the locks are taken.
3463 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Likewise.
3464
3465 * sysdeps/unix/sysv/linux/internaltypes.h: Introduce
3466 COND_NWAITERS_SHIFT.
3467 * pthread_cond_destroy.c: Use COND_NWAITERS_SHIFT instead of
3468 COND_CLOCK_BITS.
3469 * pthread_cond_init.c: Likewise.
3470 * pthread_cond_timedwait.c: Likewise.
3471 * pthread_cond_wait.c: Likewise.
3472 * pthread_condattr_getclock.c: Likewise.
3473 * pthread_condattr_setclock.c: Likewise.
3474 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Likewise.
3475 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3476 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
3477 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3478 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3479
3480 2007-05-28 Jakub Jelinek <jakub@redhat.com>
3481
3482 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c: Include
3483 unistd.h.
3484
3485 * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Use explicit
3486 insn suffix.
3487 (THREAD_GSCOPE_GET_FLAG): Remove.
3488 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Remove.
3489 * allocatestack.c (__wait_lookup_done): Revert 2007-05-24
3490 changes.
3491 * sysdeps/powerpc/tls.h (tcbhead_t): Remove gscope_flag.
3492 (THREAD_GSCOPE_GET_FLAG): Remove.
3493 (THREAD_GSCOPE_RESET_FLAG): Use THREAD_SELF->header.gscope_flag
3494 instead of THREAD_GSCOPE_GET_FLAG.
3495 (THREAD_GSCOPE_SET_FLAG): Likewise. Add atomic_write_barrier after
3496 it.
3497 * sysdeps/s390/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
3498 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
3499 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
3500 THREAD_GSCOPE_WAIT): Define.
3501 * sysdeps/sparc/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
3502 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
3503 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
3504 THREAD_GSCOPE_WAIT): Define.
3505 * sysdeps/sh/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/ia64/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
3514 2007-05-24 Richard Henderson <rth@redhat.com>
3515
3516 * descr.h (struct pthread): Add header.gscope_flag.
3517 * sysdeps/alpha/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
3522 2007-05-27 Ulrich Drepper <drepper@redhat.com>
3523
3524 * init.c: Make it compile with older kernel headers.
3525
3526 * tst-initializers1.c: Show through exit code which test failed.
3527
3528 * pthread_rwlock_init.c: Also initialize __shared field.
3529 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Split __flags
3530 element in rwlock structure into four byte elements. One of them is
3531 the new __shared element.
3532 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h [__WORDSIZE=32]:
3533 Likewise.
3534 [__WORDSIZE=64]: Renamed __pad1 element int rwlock structure to
3535 __shared, adjust names of other padding elements.
3536 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3537 * sysdeps/pthread/pthread.h: Adjust rwlock initializers.
3538 * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: Add PSHARED.
3539 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define
3540 FUTEX_PRIVATE_FLAG.
3541 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Change main
3542 futex to use private operations if possible.
3543 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
3544 Likewise.
3545 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3546 Likewise.
3547 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
3548 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
3549 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
3550 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
3551 Likewise.
3552 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
3553 Likewise.
3554 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
3555 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
3556
3557 2007-05-26 Ulrich Drepper <drepper@redhat.com>
3558
3559 * pthreadP.h (PTHREAD_RWLOCK_PREFER_READER_P): Define.
3560 * pthread_rwlock_rdlock.c: Use PTHREAD_RWLOCK_PREFER_READER_P.
3561 * pthread_rwlock_timedrdlock.c: Likewise.
3562 * pthread_rwlock_tryrdlock.c: Likewise.
3563
3564 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S (sem_trywait): Tiny
3565 optimization.
3566
3567 * sysdeps/unix/sysv/linux/sem_wait.c: Add missing break.
3568 * sysdeps/unix/sysv/linux/sem_timedwait.c: Removed left-over
3569 duplication of __sem_wait_cleanup.
3570
3571 * allocatestack.c: Revert last change.
3572 * init.c: Likewise.
3573 * sysdeps/i386/tls.h: Likewise.
3574 * sysdeps/x86_64/tls.h: Likewise.
3575 * descr.h [TLS_DTV_AT_TP] (struct pthread): Add private_futex field to
3576 header structure.
3577 * sysdeps/powerpc/tcb-offsets.sym: Add PRIVATE_FUTEX_OFFSET.
3578
3579 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_barrier):
3580 Add private field.
3581 * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: Add PRIVATE definition.
3582 * pthread_barrier_init.c: Set private flag if pshared and private
3583 futexes are supported.
3584 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Use
3585 private field in futex command setup.
3586 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
3587
3588 2007-05-25 Ulrich Drepper <drepper@redhat.com>
3589
3590 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Add private futex
3591 support.
3592 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
3593 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
3594 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
3595 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
3596 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
3597
3598 * semaphoreP.h: Declare __old_sem_init and __old_sem_wait.
3599 * sem_init.c (__new_sem_init): Rewrite to initialize all three
3600 fields in the structure.
3601 (__old_sem_init): New function.
3602 * sem_open.c: Initialize all fields of the structure.
3603 * sem_getvalue.c: Adjust for renamed element.
3604 * sysdeps/unix/sysv/linux/Makefile [subdir=nptl]
3605 (gen-as-const-headers): Add structsem.sym.
3606 * sysdeps/unix/sysv/linux/structsem.sym: New file.
3607 * sysdeps/unix/sysv/linux/internaltypes.h: Rename struct sem to
3608 struct new_sem. Add struct old_sem.
3609 * sysdeps/unix/sysv/linux/sem_post.c: Wake only when there are waiters.
3610 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
3611 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
3612 * sysdeps/unix/sysv/linux/sem_wait.c: Indicate that there are waiters.
3613 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
3614 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
3615 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
3616 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
3617 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
3618 * Makefile (tests): Add tst-sem10, tst-sem11, tst-sem12.
3619 * tst-sem10.c: New file.
3620 * tst-sem11.c: New file.
3621 * tst-sem12.c: New file.
3622 * tst-typesizes.c: Test struct new_sem and struct old_sem instead
3623 of struct sem.
3624
3625 2007-05-25 Ulrich Drepper <drepper@redhat.com>
3626 Jakub Jelinek <jakub@redhat.com>
3627
3628 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
3629 Move __pthread_enable_asynccancel right before futex syscall.
3630 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
3631 Likewise.
3632
3633 2007-05-24 Jakub Jelinek <jakub@redhat.com>
3634
3635 * sysdeps/i386/tls.h (THREAD_SET_PRIVATE_FUTEX,
3636 THREAD_COPY_PRIVATE_FUTEX): Define.
3637 * sysdeps/x86_64/tls.h (THREAD_SET_PRIVATE_FUTEX,
3638 THREAD_COPY_PRIVATE_FUTEX): Define.
3639 * allocatestack.c (allocate_stack): Use THREAD_COPY_PRIVATE_FUTEX.
3640 * init.c (__pthread_initialize_minimal_internal): Use
3641 THREAD_SET_PRIVATE_FUTEX.
3642
3643 * sysdeps/powerpc/tls.h (tcbhead_t): Add gscope_flag.
3644 (THREAD_GSCOPE_FLAG_UNUSED, THREAD_GSCOPE_FLAG_USED,
3645 THREAD_GSCOPE_FLAG_WAIT): Define.
3646 (THREAD_GSCOPE_GET_FLAG, THREAD_GSCOPE_SET_FLAG,
3647 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_WAIT): Define.
3648 * sysdeps/i386/tls.h (THREAD_GSCOPE_WAIT): Don't use
3649 PTR_DEMANGLE.
3650 (THREAD_GSCOPE_GET_FLAG): Define.
3651 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Define.
3652 * allocatestack.c (__wait_lookup_done): Use THREAD_GSCOPE_GET_FLAG
3653 instead of ->header.gscope_flag directly.
3654
3655 2007-05-23 Ulrich Drepper <drepper@redhat.com>
3656
3657 * init.c (__pthread_initialize_minimal_internal): Check whether
3658 private futexes are available.
3659 * allocatestack.c (allocate_stack): Copy private_futex field from
3660 current thread into the new stack.
3661 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Use private
3662 futexes if they are available.
3663 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise
3664 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Adjust so that change
3665 in libc-lowlevellock.S allow using private futexes.
3666 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
3667 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
3668 FUTEX_PRIVATE_FLAG.
3669 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
3670 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use private futexes
3671 if they are available.
3672 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
3673 * sysdeps/x86_64/tcb-offsets.sym: Add PRIVATE_FUTEX.
3674 * sysdeps/i386/tcb-offsets.sym: Likewise.
3675 * sysdeps/x86_64/tls.h (tcbhead_t): Add private_futex field.
3676 * sysdeps/i386/tls.h (tcbhead_t): Likewise.
3677
3678 2007-05-21 Ulrich Drepper <drepper@redhat.com>
3679
3680 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
3681 Remove ptr_wait_lookup_done again.
3682 * init.c (pthread_functions): Don't add .ptr_wait_lookup_done here.
3683 (__pthread_initialize_minimal_internal): Initialize
3684 _dl_wait_lookup_done pointer in _rtld_global directly.
3685 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
3686 Remove code to code _dl_wait_lookup_done.
3687 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_WAIT): The pointer is not
3688 encrypted for now.
3689
3690 2007-05-21 Jakub Jelinek <jakub@redhat.com>
3691
3692 * tst-robust9.c (do_test): Don't fail if ENABLE_PI and
3693 pthread_mutex_init failed with ENOTSUP.
3694
3695 2007-05-19 Ulrich Drepper <drepper@redhat.com>
3696
3697 * allocatestack.c (__wait_lookup_done): New function.
3698 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
3699 Add ptr_wait_lookup_done.
3700 * init.c (pthread_functions): Initialize .ptr_wait_lookup_done.
3701 * pthreadP.h: Declare __wait_lookup_done.
3702 * sysdeps/i386/tls.h (tcbhead_t): Add gscope_flag.
3703 Define macros to implement reference handling of global scope.
3704 * sysdeps/x86_64/tls.h: Likewise.
3705 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
3706 Initialize GL(dl_wait_lookup_done).
3707
3708 2007-05-17 Ulrich Drepper <drepper@redhat.com>
3709
3710 [BZ #4512]
3711 * pthread_mutex_lock.c: Preserve FUTEX_WAITERS bit when dead owner
3712 is detected.
3713 * pthread_mutex_timedlock.c: Likewise.
3714 * pthread_mutex_trylock.c: Likewise.
3715 Patch in part by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
3716
3717 * Makefile (tests): Add tst-robust9 and tst-robustpi9.
3718 * tst-robust9.c: New file.
3719 * tst-robustpi9.c: New file.
3720
3721 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Remove
3722 unnecessary extra cancellation test.
3723
3724 2007-05-14 Ulrich Drepper <drepper@redhat.com>
3725
3726 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Remove unnecessary
3727 extra cancellation test.
3728 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
3729
3730 2007-05-10 Ulrich Drepper <drepper@redhat.com>
3731
3732 * descr.h (struct pthread): Rearrange members to fill hole in
3733 64-bit layout.
3734
3735 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
3736 (__pthread_setaffinity_new): If syscall was successful and
3737 RESET_VGETCPU_CACHE is defined, use it before returning.
3738 * sysdeps/unix/sysv/linux/x86_64/pthread_setaffinity.c: New file.
3739
3740 2007-05-10 Jakub Jelinek <jakub@redhat.com>
3741
3742 [BZ #4455]
3743 * tst-align2.c: Include stackinfo.h.
3744 * tst-getpid1.c: Likewise.
3745
3746 2007-05-02 Carlos O'Donell <carlos@systemhalted.org>
3747
3748 [BZ #4455]
3749 * tst-align2.c (do_test): Add _STACK_GROWS_UP case.
3750 * tst-getpid1.c (do_test): Likewise.
3751
3752 [BZ #4456]
3753 * allocatestack.c (change_stack_perm): Add _STACK_GROWS_UP case.
3754 (allocate_stack): Likewise.
3755
3756 2007-05-07 Ulrich Drepper <drepper@redhat.com>
3757
3758 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
3759 (__lll_robust_lock_wait): Fix race caused by reloading of futex value.
3760 (__lll_robust_timedlock_wait): Likewise.
3761 Reported by Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>.
3762
3763 2007-05-06 Mike Frysinger <vapier@gentoo.org>
3764
3765 [BZ #4465]
3766 * tst-cancel-wrappers.sh: Set C["fdatasync"] to 1.
3767 * tst-cancel4.c (tf_fdatasync): New test.
3768
3769 2007-04-27 Ulrich Drepper <drepper@redhat.com>
3770
3771 [BZ #4392]
3772 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Treat error
3773 check mutexes like normal mutexes.
3774
3775 [BZ #4306]
3776 * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
3777 Initialize the whole sigevent structure to appease valgrind.
3778
3779 2007-04-25 Ulrich Drepper <drepper@redhat.com>
3780
3781 * sysdeps/x86_64/tls.h (tcbhead_t): Add vgetcpu_cache.
3782 * sysdeps/x86_64/tcb-offsets.sym: Add VGETCPU_CACHE_OFFSET.
3783
3784 2007-04-06 Ulrich Drepper <drepper@redhat.com>
3785
3786 * tst-locale1.c: Avoid warnings.
3787 * tst-locale2.c: Likewise.
3788
3789 2007-03-19 Steven Munroe <sjmunroe@us.ibm.com>
3790
3791 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
3792 (__lll_robust_trylock): Add MUTEX_HINT_ACQ to lwarx instruction.
3793
3794 2007-03-16 Jakub Jelinek <jakub@redhat.com>
3795
3796 * sysdeps/pthread/bits/libc-lock.h: Use __extern_inline and
3797 __extern_always_inline where appropriate.
3798 * sysdeps/pthread/pthread.h: Likewise.
3799
3800 2007-03-13 Richard Henderson <rth@redhat.com>
3801
3802 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Use two
3803 separate cfi regions for the two subsections.
3804
3805 2007-02-25 Ulrich Drepper <drepper@redhat.com>
3806
3807 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset refcntr in
3808 new thread, don't just decrement it.
3809 Patch by Suzuki K P <suzuki@in.ibm.com>.
3810
3811 2007-02-21 Ulrich Drepper <drepper@redhat.com>
3812
3813 * sysdeps/pthread/pthread-functions.h: Correct last patch, correct
3814 PTHFCT_CALL definition.
3815
3816 2007-02-18 Ulrich Drepper <drepper@redhat.com>
3817
3818 * sysdeps/pthread/pthread-functions.h: If PTR_DEMANGLE is not
3819 available, don't use it.
3820
3821 2007-02-09 Jakub Jelinek <jakub@redhat.com>
3822
3823 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
3824 (__lll_mutex_timedlock_wait): Use correct pointer when we don't
3825 call into the kernel to delay.
3826
3827 2007-01-18 Ulrich Drepper <drepper@redhat.com>
3828
3829 * tst-initializers1.c: We want to test the initializers as seen
3830 outside of libc, so undefined _LIBC.
3831
3832 * pthread_join.c (cleanup): Avoid warning.
3833
3834 2007-01-17 Ulrich Drepper <drepper@redhat.com>
3835
3836 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
3837 (__lll_timedwait_tid): Add unwind info.
3838
3839 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Don't just copy the
3840 function table, mangle the pointers.
3841 * sysdeps/pthread/pthread-functions.h: Define PTHFCT_CALL.
3842 * forward.c: Use PTHFCT_CALL and __libc_pthread_functions_init.
3843 * sysdeps/pthread/bits/libc-lock.h: When using __libc_pthread_functions
3844 demangle pointers before use.
3845 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Use PTHFCT_CALL to
3846 demangle pointer.
3847 * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
3848 * sysdeps/pthread/setxid.h: Likewise.
3849
3850 2007-01-12 Ulrich Drepper <drepper@redhat.com>
3851
3852 * tst-rwlock7.c: Show some more information in case of correct
3853 behavior.
3854
3855 2007-01-11 Ulrich Drepper <drepper@redhat.com>
3856
3857 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
3858 (lll_futex_timed_wait): Undo part of last change, don't negate
3859 return value.
3860
3861 2007-01-10 Ulrich Drepper <drepper@redhat.com>
3862
3863 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Cleanups. Define
3864 FUTEX_CMP_REQUEUE and lll_futex_requeue.
3865
3866 2006-12-28 David S. Miller <davem@davemloft.net>
3867
3868 * shlib-versions: Fix sparc64 linux target specification.
3869
3870 2007-01-10 Jakub Jelinek <jakub@redhat.com>
3871
3872 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
3873 Adjust include path for pthread_barrier_wait.c move.
3874
3875 2006-12-21 Jakub Jelinek <jakub@redhat.com>
3876
3877 * sysdeps/unix/sysv/linux/pthread_kill.c (pthread_kill): Make sure
3878 tid isn't reread from pd->tid in between ESRCH test and the syscall.
3879
3880 2006-12-06 Jakub Jelinek <jakub@redhat.com>
3881
3882 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Handle
3883 6 argument cancellable syscalls.
3884 (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
3885 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO): Handle
3886 6 argument cancellable syscalls.
3887 (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
3888
3889 2006-12-09 Ulrich Drepper <drepper@redhat.com>
3890
3891 * sysdeps/unix/sysv/linux/rtld-lowlevel.h
3892 (__rtld_mrlock_initialize): Add missing closing parenthesis.
3893
3894 2006-10-30 Jakub Jelinek <jakub@redhat.com>
3895
3896 * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
3897 __sync_lock_release instead of __sync_lock_release_si.
3898
3899 2006-10-29 Jakub Jelinek <jakub@redhat.com>
3900
3901 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (RTLD_SINGLE_THREAD_P):
3902 Define.
3903 (SINGLE_THREAD_P): Define to 1 if IS_IN_rtld.
3904 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Likewise.
3905 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
3906 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
3907 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
3908 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
3909 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
3910 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
3911 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
3912 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
3913 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
3914
3915 2006-10-27 Ulrich Drepper <drepper@redhat.com>
3916
3917 * sysdeps/pthread/pthread_barrier_wait.c: Move to...
3918 * pthread_barrier_wait.c: ...here.
3919 * sysdeps/pthread/pthread_cond_broadcast.c: Move to...
3920 * pthread_cond_broadcast.c: ...here.
3921 * sysdeps/pthread/pthread_cond_signal.c: Move to...
3922 * pthread_cond_signal.c: ...here.
3923 * sysdeps/pthread/pthread_cond_timedwait.c: Move to...
3924 * pthread_cond_timedwait.c: ...here.
3925 * sysdeps/pthread/pthread_cond_wait.c: Move to...
3926 * pthread_cond_wait.c: ...here.
3927 * sysdeps/pthread/pthread_once.c: Move to...
3928 * pthread_once.c: ...here.
3929 * sysdeps/pthread/pthread_rwlock_rdlock.c: Move to...
3930 * pthread_rwlock_rdlock.c: ...here.
3931 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Move to...
3932 * pthread_rwlock_timedrdlock.c: ...here.
3933 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Move to...
3934 * pthread_rwlock_timedwrlock.c: ...here.
3935 * sysdeps/pthread/pthread_rwlock_unlock.c: Move to...
3936 * pthread_rwlock_unlock.c: ...here.
3937 * sysdeps/pthread/pthread_rwlock_wrlock.c: Move to...
3938 * pthread_rwlock_wrlock.c: ...here.
3939 * sysdeps/pthread/pthread_spin_destroy.c: Move to...
3940 * pthread_spin_destroy.c: ...here.
3941 * sysdeps/pthread/pthread_spin_init.c: Move to...
3942 * pthread_spin_init.c: ...here.
3943 * sysdeps/pthread/pthread_spin_unlock.c: Move to...
3944 * pthread_spin_unlock.c: ...here.
3945 * sysdeps/pthread/pthread_getcpuclockid.c: Move to...
3946 * pthread_getcpuclockid.c: ...here.
3947
3948 * init.c: USE_TLS support is now always enabled.
3949 * tst-tls5.h: Likewise.
3950 * sysdeps/alpha/tls.h: Likewise.
3951 * sysdeps/i386/tls.h: Likewise.
3952 * sysdeps/ia64/tls.h: Likewise.
3953 * sysdeps/powerpc/tls.h: Likewise.
3954 * sysdeps/s390/tls.h: Likewise.
3955 * sysdeps/sh/tls.h: Likewise.
3956 * sysdeps/sparc/tls.h: Likewise.
3957 * sysdeps/x86_64/tls.h: Likewise.
3958
3959 2006-10-27 Jakub Jelinek <jakub@redhat.com>
3960
3961 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
3962 __rtld_mrlock_change): Update oldval if atomic compare and exchange
3963 failed.
3964
3965 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
3966 Define to THREAD_SELF->header.multiple_threads.
3967 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
3968 Likewise.
3969 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
3970 Likewise.
3971 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
3972 (SINGLE_THREAD_P): Likewise.
3973 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
3974 (SINGLE_THREAD_P): Likewise.
3975 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
3976 (SINGLE_THREAD_P): Likewise.
3977 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
3978 (SINGLE_THREAD_P): Likewise.
3979 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (SINGLE_THREAD_P):
3980 Likewise.
3981 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
3982 (SINGLE_THREAD_P): Likewise.
3983 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
3984 (SINGLE_THREAD_P): Likewise.
3985 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (SINGLE_THREAD_P):
3986 Likewise.
3987
3988 2006-10-26 Jakub Jelinek <jakub@redhat.com>
3989
3990 * pthread_attr_setstacksize.c (NEW_VERNUM): Define to GLIBC_2_3_3
3991 by default rather than 2_3_3.
3992
3993 2006-10-17 Jakub Jelinek <jakub@redhat.com>
3994
3995 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
3996 __rtld_mrlock_unlock, __rtld_mrlock_change, __rtld_mrlock_done): Use
3997 atomic_* instead of catomic_* macros.
3998
3999 2006-10-12 Ulrich Drepper <drepper@redhat.com>
4000
4001 [BZ #3285]
4002 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add SEM_VALUE_MAX.
4003 * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
4004 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
4005 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
4006 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
4007 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Remove SEM_VALUE_MAX.
4008 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
4009 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
4010 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
4011 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: Likewise.
4012 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
4013 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
4014 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
4015
4016 2006-10-11 Ulrich Drepper <drepper@redhat.com>
4017
4018 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add support for
4019 cancelable syscalls with six parameters.
4020
4021 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Use catomic_*
4022 operations instead of atomic_*.
4023
4024 2006-10-09 Ulrich Drepper <drepper@redhat.com>
4025
4026 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: New file..
4027
4028 2006-10-07 Ulrich Drepper <drepper@redhat.com>
4029
4030 * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: New file.
4031 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstack.c: New file.
4032 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c:
4033 New file.
4034 * pthread_attr_setstack.c: Allow overwriting the version number of the
4035 new symbol.
4036 * pthread_attr_setstacksize.c: Likewise.
4037 (__old_pthread_attr_setstacksize): If STACKSIZE_ADJUST is defined use
4038 it.
4039 * sysdeps/unix/sysv/linux/powerpc/Versions (libpthread): Add
4040 pthread_attr_setstack and pthread_attr_setstacksize to GLIBC_2.6.
4041
4042 2006-09-24 Ulrich Drepper <drepper@redhat.com>
4043
4044 [BZ #3251]
4045 * descr.h (ENQUEUE_MUTEX_BOTH): Add cast to avoid warning.
4046 Patch by Petr Baudis.
4047
4048 2006-09-18 Jakub Jelinek <jakub@redhat.com>
4049
4050 * tst-kill4.c (do_test): Explicitly set tf thread's stack size.
4051
4052 * tst-cancel2.c (tf): Loop as long as something was written.
4053
4054 2006-09-12 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4055
4056 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: For PI
4057 mutexes wake all mutexes.
4058 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Don't increment
4059 WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
4060 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4061
4062 2006-09-12 Ulrich Drepper <drepper@redhat.com>
4063
4064 * tst-cond22.c (tf): Slight changes to the pthread_cond_wait use
4065 to guarantee the thread is always canceled.
4066
4067 2006-09-08 Jakub Jelinek <jakub@redhat.com>
4068
4069 * tst-cond22.c: Include pthread.h instead of pthreadP.h.
4070 Include stdlib.h.
4071 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Only
4072 increase FUTEX if increasing WAKEUP_SEQ. Fix comment typo.
4073 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
4074 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4075 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4076
4077 2006-09-08 Ulrich Drepper <drepper@redhat.com>
4078
4079 [BZ #3123]
4080 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Don't
4081 increment WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
4082 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
4083 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4084 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4085 * Makefile (tests): Add tst-cond22.
4086 * tst-cond22.c: New file.
4087
4088 2006-09-05 Ulrich Drepper <drepper@redhat.com>
4089
4090 [BZ #3124]
4091 * descr.h (struct pthread): Add parent_cancelhandling.
4092 * sysdeps/pthread/createthread.c (create_thread): Pass parent
4093 cancelhandling value to child.
4094 * pthread_create.c (start_thread): If parent thread was canceled
4095 reset the SIGCANCEL mask.
4096 * Makefile (tests): Add tst-cancel25.
4097 * tst-cancel25.c: New file.
4098
4099 2006-09-05 Jakub Jelinek <jakub@redhat.com>
4100 Ulrich Drepper <drepper@redhat.com>
4101
4102 * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY): Don't decrement
4103 counterp if it is already zero.
4104 * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY): Likewise..
4105
4106 2006-03-04 Jakub Jelinek <jakub@redhat.com>
4107 Roland McGrath <roland@redhat.com>
4108
4109 * sysdeps/unix/sysv/linux/i386/lowlevellock.h
4110 (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
4111 LLL_STUB_UNWIND_INFO_3, LLL_STUB_UNWIND_INFO_4): Define.
4112 (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
4113 lll_robust_mutex_cond_lock, lll_mutex_timedlock,
4114 lll_robust_mutex_timedlock, lll_mutex_unlock,
4115 lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
4116 Add _L_*_ symbols around the subsection.
4117 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Add unwind info.
4118 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Likewise.
4119
4120 2006-03-03 Jakub Jelinek <jakub@redhat.com>
4121 Roland McGrath <roland@redhat.com>
4122
4123 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
4124 (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
4125 LLL_STUB_UNWIND_INFO_5, LLL_STUB_UNWIND_INFO_6): Define.
4126 (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
4127 lll_robust_mutex_cond_lock, lll_mutex_timedlock,
4128 lll_robust_mutex_timedlock, lll_mutex_unlock,
4129 lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
4130 Add _L_*_ symbols around the subsection.
4131 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Add unwind info.
4132 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
4133
4134 2006-08-31 Ulrich Drepper <drepper@redhat.com>
4135
4136 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Undo last
4137 change because it can disturb too much existing code. If real hard
4138 reader preference is needed we'll introduce another type.
4139 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
4140 (pthread_rwlock_timedwrlock): Likewise.
4141 * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
4142 Likewise.
4143
4144 2006-08-30 Ulrich Drepper <drepper@redhat.com>
4145
4146 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Respect
4147 reader preference.
4148 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
4149 (pthread_rwlock_timedwrlock): Likewise.
4150 * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
4151 Likewise.
4152
4153 2006-08-25 Jakub Jelinek <jakub@redhat.com>
4154
4155 * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libpthread):
4156 Only define ifdef SHARED.
4157
4158 2006-08-23 Ulrich Drepper <drepper@redhat.com>
4159
4160 * allocatestack.c (queue_stack): Move freeing of surplus stacks to...
4161 (free_stacks): ...here.
4162 (__free_stack_cache): New function.
4163 * pthreadP.h: Declare __free_stack_cache.
4164 * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
4165 ptr_freeres.
4166 * init.c (pthread_functions): Initialize ptr_freeres.
4167 * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libptread):
4168 New freeres function.
4169
4170 2006-07-30 Joseph S. Myers <joseph@codesourcery.com>
4171
4172 [BZ #3018]
4173 * Makefile (extra-objs): Add modules to extra-test-objs instead.
4174
4175 2006-08-20 Ulrich Drepper <drepper@redhat.com>
4176
4177 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
4178 _XOPEN_REALTIME_THREADS.
4179
4180 2006-08-15 Jakub Jelinek <jakub@redhat.com>
4181
4182 * sysdeps/unix/sysv/linux/clock_settime.c (INTERNAL_VSYSCALL): Use
4183 HAVE_CLOCK_GETRES_VSYSCALL as guard macro rather than
4184 HAVE_CLOCK_GETTIME_VSYSCALL.
4185 (maybe_syscall_settime_cpu): Use plain INTERNAL_VSYSCALL here.
4186
4187 2006-08-14 Jakub Jelinek <jakub@redhat.com>
4188
4189 * sysdeps/unix/sysv/linux/bits/posix_opt.h
4190 (_POSIX_THREAD_PRIO_PROTECT): Define to 200112L.
4191 * descr.h (struct priority_protection_data): New type.
4192 (struct pthread): Add tpp field.
4193 * pthreadP.h (PTHREAD_MUTEX_PP_NORMAL_NP,
4194 PTHREAD_MUTEX_PP_RECURSIVE_NP, PTHREAD_MUTEX_PP_ERRORCHECK_NP,
4195 PTHREAD_MUTEX_PP_ADAPTIVE_NP): New enum values.
4196 * pthread_mutex_init.c (__pthread_mutex_init): Handle non-robust
4197 TPP mutexes.
4198 * pthread_mutex_lock.c (__pthread_mutex_lock): Handle TPP mutexes.
4199 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Likewise.
4200 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Likewise.
4201 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Likewise.
4202 * tpp.c: New file.
4203 * pthread_setschedparam.c (__pthread_setschedparam): Handle priority
4204 boosted by TPP.
4205 * pthread_setschedprio.c (pthread_setschedprio): Likewise.
4206 * pthread_mutexattr_getprioceiling.c
4207 (pthread_mutexattr_getprioceiling): If ceiling is 0, ensure it is
4208 in the SCHED_FIFO priority range.
4209 * pthread_mutexattr_setprioceiling.c
4210 (pthread_mutexattr_setprioceiling): Fix prioceiling validation.
4211 * pthread_mutex_getprioceiling.c (pthread_mutex_getprioceiling): Fail
4212 if mutex is not TPP. Ceiling is now in __data.__lock.
4213 * pthread_mutex_setprioceiling.c: Include stdbool.h.
4214 (pthread_mutex_setprioceiling): Fix prioceiling validation. Ceiling
4215 is now in __data.__lock. Add locking.
4216 * pthread_create.c (__free_tcb): Free pd->tpp structure.
4217 * Makefile (libpthread-routines): Add tpp.
4218 (xtests): Add tst-mutexpp1, tst-mutexpp6 and tst-mutexpp10.
4219 * tst-tpp.h: New file.
4220 * tst-mutexpp1.c: New file.
4221 * tst-mutexpp6.c: New file.
4222 * tst-mutexpp10.c: New file.
4223 * tst-mutex1.c (TEST_FUNCTION): Don't redefine if already defined.
4224 * tst-mutex6.c (TEST_FUNCTION): Likewise.
4225
4226 2006-08-12 Ulrich Drepper <drepper@redhat.com>
4227
4228 [BZ #2843]
4229 * pthread_join.c (pthread_join): Account for self being canceled
4230 when checking for deadlocks.
4231 * tst-join5.c: Cleanups. Allow to be used in tst-join6.
4232 (tf1): Don't print anything after pthread_join returns, this would be
4233 another cancellation point.
4234 (tf2): Likewise.
4235 * tst-join6.c: New file.
4236 * Makefile (tests): Add tst-join6.
4237
4238 2006-08-03 Ulrich Drepper <drepper@redhat.com>
4239
4240 [BZ #2892]
4241 * pthread_setspecific.c (__pthread_setspecific): Check
4242 out-of-range index before checking for unused key.
4243
4244 * sysdeps/pthread/gai_misc.h: New file.
4245
4246 2006-08-01 Ulrich Drepper <drepper@redhat.com>
4247
4248 * sysdeps/unix/sysv/linux/i386/smp.h: New file. Old Linux-specific
4249 file. Don't use sysctl.
4250 * sysdeps/unix/sysv/linux/smp.h: Always assume SMP. Archs can
4251 overwrite the file if this is likely not true.
4252
4253 2006-07-31 Daniel Jacobowitz <dan@codesourcery.com>
4254
4255 * allocatestack.c (__reclaim_stacks): Reset the PID on cached stacks.
4256 * Makefile (tests): Add tst-getpid3.
4257 * tst-getpid3.c: New file.
4258
4259 2006-07-30 Roland McGrath <roland@redhat.com>
4260
4261 * Makefile (libpthread-routines): Add ptw-sigsuspend.
4262
4263 * sysdeps/unix/sysv/linux/i386/not-cancel.h
4264 (pause_not_cancel): New macro.
4265 (nanosleep_not_cancel): New macro.
4266 (sigsuspend_not_cancel): New macro.
4267 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
4268 nanosleep_not_cancel macro from <not-cancel.h>.
4269 * pthread_mutex_lock.c (__pthread_mutex_lock): Use pause_not_cancel
4270 macro from <not-cancel.h>.
4271
4272 2006-07-28 Ulrich Drepper <drepper@redhat.com>
4273 Jakub Jelinek <jakub@redhat.com>
4274
4275 * descr.h: Change ENQUEUE_MUTEX and DEQUEUE_MUTEX for bit 0
4276 notification of PI mutex. Add ENQUEUE_MUTEX_PI.
4277 * pthreadP.h: Define PTHREAD_MUTEX_PI_* macros for PI mutex types.
4278 * pthread_mutex_setprioceilining.c: Adjust for mutex type name change.
4279 * pthread_mutex_init.c: Add support for priority inheritance mutex.
4280 * pthread_mutex_lock.c: Likewise.
4281 * pthread_mutex_timedlock.c: Likewise.
4282 * pthread_mutex_trylock.c: Likewise.
4283 * pthread_mutex_unlock.c: Likewise.
4284 * sysdeps/pthread/pthread_cond_broadcast.c: For PI mutexes wake
4285 all mutexes.
4286 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.c: Likewise.
4287 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.c: Likewise.
4288 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: New file.
4289 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-header): Add
4290 pthread-pi-defines.sym.
4291 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_LOCK_PI,
4292 FUTEX_UNLOCK_PI, and FUTEX_TRYLOCK_PI.
4293 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
4294 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
4295 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
4296 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
4297 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
4298 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
4299 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
4300 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
4301 _POSIX_THREAD_PRIO_INHERIT to 200112L.
4302 * tst-mutex1.c: Adjust to allow use in PI mutex test.
4303 * tst-mutex2.c: Likewise.
4304 * tst-mutex3.c: Likewise.
4305 * tst-mutex4.c: Likewise.
4306 * tst-mutex5.c: Likewise.
4307 * tst-mutex6.c: Likewise.
4308 * tst-mutex7.c: Likewise.
4309 * tst-mutex7a.c: Likewise.
4310 * tst-mutex8.c: Likewise.
4311 * tst-mutex9.c: Likewise.
4312 * tst-robust1.c: Likewise.
4313 * tst-robust7.c: Likewise.
4314 * tst-robust8.c: Likewise.
4315 * tst-mutexpi1.c: New file.
4316 * tst-mutexpi2.c: New file.
4317 * tst-mutexpi3.c: New file.
4318 * tst-mutexpi4.c: New file.
4319 * tst-mutexpi5.c: New file.
4320 * tst-mutexpi6.c: New file.
4321 * tst-mutexpi7.c: New file.
4322 * tst-mutexpi7a.c: New file.
4323 * tst-mutexpi8.c: New file.
4324 * tst-mutexpi9.c: New file.
4325 * tst-robust1.c: New file.
4326 * tst-robust2.c: New file.
4327 * tst-robust3.c: New file.
4328 * tst-robust4.c: New file.
4329 * tst-robust5.c: New file.
4330 * tst-robust6.c: New file.
4331 * tst-robust7.c: New file.
4332 * tst-robust8.c: New file.
4333 * Makefile (tests): Add the new tests.
4334
4335 * pthread_create.c (start_thread): Add some casts to avoid warnings.
4336 * pthread_mutex_destroy.c: Remove unneeded label.
4337
4338 2006-07-01 Ulrich Drepper <drepper@redhat.com>
4339
4340 * pthread_mutex_init.c (__pthread_mutex_init): Move some
4341 computations to compile time.
4342
4343 2006-06-04 Ulrich Drepper <drepper@redhat.com>
4344
4345 * sysdeps/pthread/pthread.h: Add pthread_equal inline version.
4346
4347 2006-05-15 Ulrich Drepper <drepper@redhat.com>
4348
4349 * sysdeps/unix/sysv/linux/fork.h: Mark __fork_handlers as hidden.
4350
4351 2006-05-11 Ulrich Drepper <drepper@redhat.com>
4352
4353 * pthread_key_create.c (__pthread_key_create): Do away with
4354 __pthread_keys_lock.
4355
4356 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4357 (__kernel_cpumask_size): Mark as hidden.
4358 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
4359
4360 * sem_open.c (__sem_mappings_lock): Mark as hidden.
4361 * semaphoreP.h (__sem_mappings_lock): Likewise.
4362
4363 2006-05-10 Ulrich Drepper <drepper@redhat.com>
4364
4365 * pthread_atfork.c: Mark __dso_handle as hidden.
4366
4367 2006-05-09 Ulrich Drepper <drepper@redhat.com>
4368
4369 [BZ #2644]
4370 * sysdeps/pthread/unwind-forcedunwind.c: Different solution for
4371 the reload problem. Change the one path in pthread_cancel_init
4372 which causes the problem. Force gcc to reload. Simplify callers.
4373 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c
4374 (_Unwind_GetBSP): Undo last patch.
4375
4376 2006-05-07 Ulrich Drepper <drepper@redhat.com>
4377
4378 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: Make sure the
4379 function pointer is reloaded after pthread_cancel_init calls.
4380
4381 [BZ #2644]
4382 * sysdeps/pthread/unwind-forcedunwind.c: Make sure functions
4383 pointers are reloaded after pthread_cancel_init calls.
4384
4385 2006-05-01 Ulrich Drepper <drepper@redhat.com>
4386
4387 * sysdeps/pthread/allocalim.h (__libc_use_alloca): Mark with
4388 __always_inline.
4389
4390 2006-04-27 Ulrich Drepper <drepper@redhat.com>
4391
4392 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
4393 Allocate new object which is passed to timer_sigev_thread so that
4394 the timer can be deleted before the new thread is scheduled.
4395
4396 2006-04-26 Roland McGrath <roland@redhat.com>
4397
4398 * sysdeps/x86_64/tls.h: Include <asm/prctl.h> inside [! __ASSEMBLER__].
4399
4400 2006-04-08 Ulrich Drepper <drepper@redhat.com>
4401
4402 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove branch predicion
4403 suffix for conditional jumps.
4404 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
4405 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
4406 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
4407 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
4408 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
4409 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
4410
4411 * init.c (sigcancel_handler): Compare with correct PID even if the
4412 thread is in the middle of a fork call.
4413 (sighandler_setxid): Likewise.
4414 Reported by Suzuki K P <suzuki@in.ibm.com> .
4415
4416 2006-04-07 Jakub Jelinek <jakub@redhat.com>
4417
4418 * pthreadP.h (FUTEX_TID_MASK): Sync with kernel.
4419
4420 2006-04-06 Ulrich Drepper <drepper@redhat.com>
4421
4422 * pthread_getattr_np.c (pthread_getattr_np): Close fp if getrlimit
4423 fails [Coverity CID 105].
4424
4425 2006-04-05 Ulrich Drepper <drepper@redhat.com>
4426
4427 * sysdeps/pthread/pthread.h: Add nonnull attributes.
4428
4429 2006-04-03 Steven Munroe <sjmunroe@us.ibm.com>
4430
4431 [BZ #2505]
4432 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h [_ARCH_PWR4]:
4433 Define __lll_rel_instr using lwsync.
4434
4435 2006-03-27 Ulrich Drepper <drepper@redhat.com>
4436
4437 * allocatestack.c (allocate_stack): Always initialize robust_head.
4438 * descr.h: Define struct robust_list_head.
4439 (struct pthread): Use robust_list_head in robust mutex list definition.
4440 Adjust ENQUEUE_MUTEX and DEQUEUE_MUTEX.
4441 * init.c [!__ASSUME_SET_ROBUST_LIST] (__set_robust_list_avail): Define.
4442 (__pthread_initialize_minimal_internal): Register robust_list with
4443 the kernel.
4444 * pthreadP.h: Remove PRIVATE_ from PTHREAD_MUTEX_ROBUST_* names.
4445 Declare __set_robust_list_avail.
4446 * pthread_create.c (start_thread): Register robust_list of new thread.
4447 [!__ASSUME_SET_ROBUST_LIST]: If robust_list is not empty wake up
4448 waiters.
4449 * pthread_mutex_destroy.c: For robust mutexes don't look at the
4450 number of users, it's unreliable.
4451 * pthread_mutex_init.c: Allow use of pshared robust mutexes if
4452 set_robust_list syscall is available.
4453 * pthread_mutex_consistent.c: Adjust for PTHREAD_MUTEX_ROBUST_* rename.
4454 * pthread_mutex_lock.c: Simplify robust mutex code a bit.
4455 Set robust_head.list_op_pending before trying to lock a robust mutex.
4456 * pthread_mutex_timedlock.c: Likewise.
4457 * pthread_mutex_trylock.c: Likewise.
4458 * pthread_mutex_unlock.c: Likewise for unlocking.
4459 * Makefile (tests): Add tst-robust8.
4460 * tst-robust8.c: New file.
4461
4462 2006-03-08 Andreas Schwab <schwab@suse.de>
4463
4464 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h
4465 (DL_SYSINFO_IMPLEMENTATION): Add missing newline.
4466
4467 2006-03-05 Roland McGrath <roland@redhat.com>
4468
4469 * configure (libc_add_on): Disable add-on when $add_ons_automatic = yes
4470 and $config_os doesn't match *linux*.
4471
4472 2006-03-05 David S. Miller <davem@sunset.davemloft.net>
4473
4474 * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S:
4475 Use __syscall_error.
4476 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
4477 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: Likewise.
4478 * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: Likewise.
4479 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
4480 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: Likewise.
4481 * sysdeps/unix/sysv/linux/sparc/Makefile: New file.
4482
4483 2006-03-02 Ulrich Drepper <drepper@redhat.com>
4484
4485 * sysdeps/unix/sysv/linux/aio_misc.h: Various cleanups.
4486
4487 2006-03-01 Ulrich Drepper <drepper@redhat.com>
4488
4489 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
4490 (__lll_robust_lock_wait): Also set FUTEX_WAITERS bit if we got the
4491 mutex.
4492 (__lll_robust_timedlock_wait): Likewise.
4493 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S
4494 (__lll_robust_lock_wait): Likewise.
4495 (__lll_robust_timedlock_wait): Likewise.
4496 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
4497 (__lll_robust_lock_wait): Likewise.
4498 (__lll_robust_timedlock_wait): Likewise.
4499
4500 2006-03-01 Jakub Jelinek <jakub@redhat.com>
4501
4502 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_robust_mutex_dead,
4503 lll_robust_mutex_trylock, lll_robust_mutex_lock,
4504 lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
4505 lll_robust_mutex_unlock): Define.
4506 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
4507
4508 2006-02-28 H.J. Lu <hongjiu.lu@intel.com>
4509
4510 * sysdeps/unix/sysv/linux/ia64/clone2.S: Include <clone2.S>
4511 instead of <clone.S>.
4512
4513 2006-02-27 Jakub Jelinek <jakub@redhat.com>
4514
4515 * Makefile (libpthread-routines): Add
4516 pthread_mutexattr_[sg]etprotocol, pthread_mutexattr_[sg]etprioceiling
4517 and pthread_mutex_[sg]etprioceiling.
4518 * Versions (GLIBC_2.4): Export pthread_mutexattr_getprotocol,
4519 pthread_mutexattr_setprotocol, pthread_mutexattr_getprioceiling,
4520 pthread_mutexattr_setprioceiling, pthread_mutex_getprioceiling and
4521 pthread_mutex_setprioceiling.
4522 * sysdeps/pthread/pthread.h (PTHREAD_PRIO_NONE, PTHREAD_PRIO_INHERIT,
4523 PTHREAD_PRIO_PROTECT): New enum values.
4524 (pthread_mutexattr_getprotocol, pthread_mutexattr_setprotocol,
4525 pthread_mutexattr_getprioceiling, pthread_mutexattr_setprioceiling,
4526 pthread_mutex_getprioceiling, pthread_mutex_setprioceiling): New
4527 prototypes.
4528 * pthreadP.h (PTHREAD_MUTEX_PRIO_INHERIT_PRIVATE_NP,
4529 PTHREAD_MUTEX_PRIO_PROTECT_PRIVATE_NP): New enum values.
4530 (PTHREAD_MUTEX_PRIO_CEILING_SHIFT, PTHREAD_MUTEX_PRIO_CEILING_MASK):
4531 Define.
4532 (PTHREAD_MUTEXATTR_PROTOCOL_SHIFT, PTHREAD_MUTEXATTR_PROTOCOL_MASK,
4533 PTHREAD_MUTEXATTR_PRIO_CEILING_SHIFT,
4534 PTHREAD_MUTEXATTR_PRIO_CEILING_MASK): Define.
4535 (PTHREAD_MUTEXATTR_FLAG_BITS): Or in PTHREAD_MUTEXATTR_PROTOCOL_MASK
4536 and PTHREAD_MUTEXATTR_PRIO_CEILING_MASK.
4537 * pthread_mutex_init.c (__pthread_mutex_init): For the time being
4538 return ENOTSUP for PTHREAD_PRIO_INHERIT or PTHREAD_PRIO_PROTECT
4539 protocol mutexes.
4540 * pthread_mutex_getprioceiling.c: New file.
4541 * pthread_mutex_setprioceiling.c: New file.
4542 * pthread_mutexattr_getprioceiling.c: New file.
4543 * pthread_mutexattr_setprioceiling.c: New file.
4544 * pthread_mutexattr_getprotocol.c: New file.
4545 * pthread_mutexattr_setprotocol.c: New file.
4546
4547 2006-02-27 Daniel Jacobowitz <dan@codesourcery.com>
4548
4549 * sysdeps/unix/sysv/linux/aio_misc.h: Include <limits.h>.
4550
4551 2006-02-27 Roland McGrath <roland@redhat.com>
4552
4553 * sysdeps/pthread/Subdirs: List nptl here too.
4554 * configure (libc_add_on_canonical): New variable.
4555
4556 * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: Use #include_next.
4557
4558 * sysdeps/unix/sysv/linux/sleep.c: Use #include_next after #include of
4559 self to get main source tree's file.
4560 * sysdeps/unix/sysv/linux/alpha/clone.S: Likewise.
4561 * sysdeps/unix/sysv/linux/i386/clone.S: Likewise.
4562 * sysdeps/unix/sysv/linux/i386/vfork.S: Likewise.
4563 * sysdeps/unix/sysv/linux/ia64/clone2.S: Likewise.
4564 * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: Likewise.
4565 * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: Likewise.
4566 * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: Likewise.
4567 * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: Likewise.
4568 * sysdeps/unix/sysv/linux/sh/clone.S: Likewise.
4569 * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: Likewise.
4570 * sysdeps/unix/sysv/linux/sparc/sparc64/clone.S: Likewise.
4571 * sysdeps/unix/sysv/linux/x86_64/clone.S: Likewise.
4572 * sysdeps/unix/sysv/linux/x86_64/vfork.S: Likewise.
4573
4574 * Makefile: Use $(sysdirs) in vpath directive.
4575
4576 * sysdeps/pthread/Makefile (CFLAGS-libc-start.c): Variable removed.
4577 (CPPFLAGS-timer_routines.c): Likewise.
4578
4579 * Makeconfig (includes): Variable removed.
4580
4581 2006-02-26 Roland McGrath <roland@redhat.com>
4582
4583 * sysdeps/generic/pt-raise.c: Moved to ...
4584 * pt-raise.c: ... here.
4585 * sysdeps/generic/lowlevellock.h: Moved to ...
4586 * lowlevellock.h: ... here.
4587
4588 2006-02-23 Roland McGrath <roland@redhat.com>
4589
4590 * descr.h (struct pthread): Add final member `end_padding'.
4591 (PTHREAD_STRUCT_END_PADDING): Use it.
4592
4593 2006-02-20 Roland McGrath <roland@redhat.com>
4594
4595 * sysdeps/mips: Directory removed, saved in ports repository.
4596 * sysdeps/unix/sysv/linux/mips: Likewise.
4597
4598 2006-02-18 Ulrich Drepper <drepper@redhat.com>
4599
4600 * tst-robust1.c: Add second mutex to check that the mutex list is
4601 handled correctly.
4602
4603 2006-02-17 Jakub Jelinek <jakub@redhat.com>
4604
4605 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_mutex_dead,
4606 lll_robust_mutex_trylock, lll_robust_mutex_lock,
4607 lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
4608 lll_robust_mutex_unlock): New macros.
4609 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
4610 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
4611 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
4612 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
4613 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: New file.
4614
4615 2006-02-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4616
4617 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Add lll_robust_mutex_*
4618 definitions.
4619 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: New file.
4620
4621 2006-02-17 Ulrich Drepper <drepper@redhat.com>
4622
4623 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
4624 (lll_robust_mutex_unlock): Avoid unnecessary wakeups.
4625 * sysdeps/unix/sysv/linux/i386/lowlevellock.h
4626 (lll_robust_mutex_unlock): Likewise.
4627
4628 2006-02-13 Jakub Jelinek <jakub@redhat.com>
4629
4630 * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX):
4631 Set robust_list.__next rather than robust_list.
4632 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
4633 (__pthread_list_t): New typedef.
4634 (pthread_mutex_t): Replace __next and __prev fields with __list.
4635 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
4636 (__pthread_list_t): New typedef.
4637 (pthread_mutex_t): Replace __next and __prev fields with __list.
4638 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
4639 (__pthread_list_t, __pthread_slist_t): New typedefs.
4640 (pthread_mutex_t): Replace __next and __prev fields with __list.
4641 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
4642 (__pthread_list_t, __pthread_slist_t): New typedefs.
4643 (pthread_mutex_t): Replace __next and __prev fields with __list.
4644 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
4645 (__pthread_list_t, __pthread_slist_t): New typedefs.
4646 (pthread_mutex_t): Replace __next and __prev fields with __list.
4647 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h
4648 (__pthread_slist_t): New typedef.
4649 (pthread_mutex_t): Replace __next field with __list.
4650
4651 2006-02-15 Ulrich Drepper <drepper@redhat.com>
4652
4653 * pthreadP.h: Define PTHREAD_MUTEX_INCONSISTENT instead of
4654 PTHREAD_MUTEX_OWNERDEAD.
4655 (PTHREAD_MUTEX_ROBUST_PRIVATE_NP): Define as 16, not 256.
4656 Define FUTEX_WAITERS, FUTEX_OWNER_DIED, FUTEX_TID_MASK.
4657 * Makefile (libpthread-routines): Add lowlevelrobustlock.
4658 * pthread_create.c (start_thread): Very much simplify robust_list loop.
4659 * pthread_mutex_consistent.c: Inconsistent mutex have __owner now set
4660 to PTHREAD_MUTEX_INCONSISTENT.
4661 * pthread_mutex_destroy.c: Allow destroying of inconsistent mutexes.
4662 * pthread_mutex_lock.c: Reimplement robust mutex handling.
4663 * pthread_mutex_trylock.c: Likewise.
4664 * pthread_mutex_timedlock.c: Likewise.
4665 * pthread_mutex_unlock.c: Likewise.
4666 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
4667 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
4668 lowlevelrobustlock.sym.
4669 * sysdeps/unix/sysv/linux/lowlevelrobustlock.sym: New file.
4670 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add lll_robust_mutex_*
4671 definitions.
4672 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
4673 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: New file.
4674 * sysdeps/unix/sysv/linux/i386/i586/lowlevelrobustlock.S: New file.
4675 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrobustlock.S: New file.
4676 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: New file.
4677
4678 2006-02-12 Ulrich Drepper <drepper@redhat.com>
4679
4680 * allocatestack.c (allocate_stack): Initialize robust_list.
4681 * init.c (__pthread_initialize_minimal_internal): Likewise.
4682 * descr.h (struct xid_command): Pretty printing.
4683 (struct pthread): Use __pthread_list_t or __pthread_slist_t for
4684 robust_list. Adjust macros.
4685 * pthread_create.c (start_thread): Adjust robust_list handling.
4686 * phtread_mutex_unlock.c: Don't allow unlocking from any thread
4687 but the owner for all robust mutex types.
4688 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
4689 __pthread_list_t and __pthread_slist_t. Use them in pthread_mutex_t.
4690 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4691 * sysdeps/pthread/pthread.h: Adjust mutex initializers.
4692
4693 * sysdeps/unix/sysv/linux/i386/not-cancel.h: Define openat_not_cancel,
4694 openat_not_cancel_3, openat64_not_cancel, and openat64_not_cancel_3.
4695
4696 2006-02-08 Jakub Jelinek <jakub@redhat.com>
4697
4698 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait,
4699 lll_futex_timedwait, lll_wait_tid): Add "memory" clobber.
4700
4701 2006-01-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4702
4703 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_futex_wait):
4704 Return status.
4705 (lll_futex_timed_wait): Define.
4706
4707 2006-01-19 Ulrich Drepper <drepper@redhat.com>
4708
4709 * tst-cancel4.c: Test ppoll.
4710
4711 2006-01-18 Andreas Jaeger <aj@suse.de>
4712
4713 [BZ #2167]
4714 * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h
4715 (pthread_mutex_t): Follow changes for other archs. Based on patch
4716 by Jim Gifford <patches@jg555.com>.
4717
4718 2006-01-13 Richard Henderson <rth@redhat.com>
4719
4720 * sysdeps/alpha/tls.h (tcbhead_t): Rename member to __private.
4721
4722 2006-01-10 Roland McGrath <roland@redhat.com>
4723
4724 * sysdeps/alpha/jmpbuf-unwind.h: File moved to main source tree.
4725 * sysdeps/i386/jmpbuf-unwind.h: Likewise.
4726 * sysdeps/mips/jmpbuf-unwind.h: Likewise.
4727 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
4728 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
4729 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
4730 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
4731 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
4732 * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
4733 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
4734
4735 2006-01-09 Roland McGrath <roland@redhat.com>
4736
4737 * tst-initializers1-c89.c: New file.
4738 * tst-initializers1-c99.c: New file.
4739 * tst-initializers1-gnu89.c: New file.
4740 * tst-initializers1-gnu99.c: New file.
4741 * Makefile (tests): Add them.
4742 (CFLAGS-tst-initializers1-c89.c): New variable.
4743 (CFLAGS-tst-initializers1-c99.c): New variable.
4744 (CFLAGS-tst-initializers1-gnu89.c): New variable.
4745 (CFLAGS-tst-initializers1-gnu99.c): New variable.
4746
4747 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
4748 Use __extension__ on anonymous union definition.
4749 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4750 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4751 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4752 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4753 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4754
4755 2006-01-08 Jakub Jelinek <jakub@redhat.com>
4756
4757 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
4758 Don't give the union a name because it changes the mangled name.
4759 Instead name the struct for __data.
4760 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_mutex_t):
4761 Likewise.
4762 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_mutex_t):
4763 Likewise.
4764
4765 2006-01-09 Jakub Jelinek <jakub@redhat.com>
4766
4767 * sysdeps/sparc/sparc64/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Add
4768 stack bias to mc_ftp field.
4769
4770 2006-01-07 Ulrich Drepper <drepper@redhat.com>
4771
4772 * sysdeps/pthread/aio_misc.h (AIO_MISC_WAIT): Work around gcc
4773 being too clever and reloading the futex value where it shouldn't.
4774
4775 2006-01-06 Ulrich Drepper <drepper@redhat.com>
4776
4777 * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX): Use
4778 correct type.
4779
4780 2006-01-06 Jakub Jelinek <jakub@redhat.com>
4781
4782 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
4783 Add cfi directives.
4784
4785 2006-01-06 Ulrich Drepper <drepper@redhat.com>
4786
4787 * sysdeps/ia64/tls.h (tcbhead_t): Rename private member to __private.
4788 * sysdeps/ia64/tcb-offsets.sym: Adjust for private->__private
4789 rename in tcbhead_t.
4790
4791 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
4792 Don't give the union a name because it changes the mangled name.
4793 Instead name the struct for __data.
4794 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4795 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4796 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4797 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4798 * pthread_create.c (start_thread): Adjust robust mutex free loop.
4799 * descr.h (ENQUEUE_MUTEX, DEQUEUE_MUTEX): Adjust.
4800
4801 2006-01-05 Ulrich Drepper <drepper@redhat.com>
4802
4803 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
4804 Return status.
4805 (lll_futex_timed_wait): Define.
4806 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
4807 * sysdeps/pthread/aio_misc.h: New file.
4808
4809 2006-01-03 Joseph S. Myers <joseph@codesourcery.com>
4810
4811 * Makefile ($(objpfx)$(multidir)): Use mkdir -p.
4812
4813 2006-01-03 Steven Munroe <sjmunroe@us.ibm.com>
4814
4815 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
4816 (PSEUDO): Remove redundant cfi_startproc and cfi_endproc directives.
4817 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
4818
4819 2006-01-04 Ulrich Drepper <drepper@redhat.com>
4820
4821 * tst-cancel24.cc: Use C headers instead of C++ headers.
4822
4823 2006-01-03 Jakub Jelinek <jakub@redhat.com>
4824
4825 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Remove #error for
4826 sparc-linux configured glibc.
4827 (lll_futex_wake_unlock): Define to 1 for sparc-linux configured glibc.
4828 (__lll_mutex_trylock, __lll_mutex_cond_trylock, __lll_mutex_lock,
4829 __lll_mutex_cond_lock, __lll_mutex_timedlock): Use
4830 atomic_compare_and_exchange_val_24_acq instead of
4831 atomic_compare_and_exchange_val_acq.
4832 (lll_mutex_unlock, lll_mutex_unlock_force): Use atomic_exchange_24_rel
4833 instead of atomic_exchange_rel.
4834 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: New file.
4835 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c: New
4836 file.
4837 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c: New
4838 file.
4839 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: New file.
4840 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: New file.
4841 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: New file.
4842 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c: New file.
4843 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: New file.
4844 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
4845 New file.
4846 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
4847 New file.
4848 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: New file.
4849 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: New file.
4850 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c: New
4851 file.
4852 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_trywait.c: New
4853 file.
4854 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: New file.
4855
4856 2006-01-03 Ulrich Drepper <drepper@redhat.com>
4857
4858 * sysdeps/pthread/pthread.h [__WORDSIZE==64]: Don't use cast in
4859 mutex initializers.
4860
4861 2006-01-02 Jakub Jelinek <jakub@redhat.com>
4862
4863 * sysdeps/sparc/tls.h (tcbhead_t): Add pointer_guard field.
4864 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
4865 THREAD_COPY_POINTER_GUARD): Define.
4866 * sysdeps/sparc/tcb-offsets.sym (POINTER_GUARD): Define.
4867 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Revert 2005-12-27 changes.
4868
4869 2006-01-01 Ulrich Drepper <drepper@redhat.com>
4870
4871 * version.c: Update copyright year.
4872
4873 2005-12-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4874
4875 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Remove explicit
4876 .eh_frame section, use cfi_* directives.
4877 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Add cfi instrumentation.
4878
4879 2005-12-30 Ulrich Drepper <drepper@redhat.com>
4880
4881 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Undo last change for
4882 now.
4883
4884 2005-12-29 Ulrich Drepper <drepper@redhat.com>
4885
4886 * sysdeps/pthread/sigaction.c: Removed.
4887 * sigaction.c: New file.
4888 * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-sigaction.c.
4889
4890 2005-12-28 Ulrich Drepper <drepper@redhat.com>
4891
4892 * Makefile (tests): Add tst-signal7.
4893 * tst-signal7.c: New file.
4894
4895 2005-12-27 Roland McGrath <roland@redhat.com>
4896
4897 * sysdeps/x86_64/jmpbuf-unwind.h (_jmpbuf_sp): New inline function.
4898 (_JMPBUF_UNWINDS_ADJ): Use it, to PTR_DEMANGLE before comparison.
4899 * sysdeps/alpha/jmpbuf-unwind.h: Likewise.
4900 * sysdeps/i386/jmpbuf-unwind.h: Likewise.
4901 * sysdeps/mips/jmpbuf-unwind.h: Likewise.
4902 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
4903 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
4904 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
4905 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
4906 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
4907 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
4908
4909 2005-12-27 Jakub Jelinek <jakub@redhat.com>
4910
4911 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Add __next
4912 and __prev field to pthread_mutex_t.
4913 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4914 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4915 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4916 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4917 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Add __next field
4918 to pthread_mutex_t.
4919
4920 2005-12-26 Ulrich Drepper <drepper@redhat.com>
4921
4922 * pthreadP.h: Define PTHREAD_MUTEX_ROBUST_PRIVATE_NP,
4923 PTHREAD_MUTEX_ROBUST_PRIVATE_RECURSIVE_NP,
4924 PTHREAD_MUTEX_ROBUST_PRIVATE_ERRORCHECK_NP,
4925 PTHREAD_MUTEX_ROBUST_PRIVATE_ADAPTIVE_NP,
4926 PTHREAD_MUTEXATTR_FLAG_ROBUST, PTHREAD_MUTEXATTR_FLAG_PSHARED,
4927 and PTHREAD_MUTEXATTR_FLAG_BITS.
4928 * descr.h (struct pthread): Add robust_list field and define
4929 ENQUEUE_MUTEX and DEQUEUE_MUTEX macros.
4930 * pthread_mutexattr_getrobust.c: New file.
4931 * pthread_mutexattr_setrobust.c: New file.
4932 * pthread_mutex_consistent.c: New file.
4933 * sysdeps/pthread/pthread.h: Declare pthread_mutexattr_getrobust,
4934 pthread_mutexattr_setrobust, and pthread_mutex_consistent.
4935 Define PTHREAD_MUTEX_STALLED_NP and PTHREAD_MUTEX_ROBUST_NP.
4936 Adjust pthread_mutex_t initializers.
4937 * nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Add __next
4938 field to pthread_mutex_t.
4939 * nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Add __next
4940 and __prev field to pthread_mutex_t.
4941 * Versions [GLIBC_2.4]: Export pthread_mutexattr_getrobust_np,
4942 pthread_mutexattr_setrobust_np, and pthread_mutex_consistent_np.
4943 * pthread_mutexattr_getpshared.c: Use PTHREAD_MUTEXATTR_FLAG_PSHARED
4944 and PTHREAD_MUTEXATTR_FLAG_BITS macros instead of magic numbers.
4945 * pthread_mutexattr_gettype.c: Likewise.
4946 * pthread_mutexattr_setpshared.c: Likewise.
4947 * pthread_mutexattr_settype.c: Likewise.
4948 * pthread_mutex_init.c: Reject robust+pshared attribute for now.
4949 Initialize mutex kind according to robust flag.
4950 * pthread_mutex_lock.c: Implement local robust mutex.
4951 * pthread_mutex_timedlock.c: Likewise.
4952 * pthread_mutex_trylock.c: Likewise.
4953 * pthread_mutex_unlock.c: Likewise.
4954 * pthread_create.c (start_thread): Mark robust mutexes which remained
4955 locked as dead.
4956 * tst-robust1.c: New file.
4957 * tst-robust2.c: New file.
4958 * tst-robust3.c: New file.
4959 * tst-robust4.c: New file.
4960 * tst-robust5.c: New file.
4961 * tst-robust6.c: New file.
4962 * tst-robust7.c: New file.
4963 * Makefile (libpthread-routines): Add pthread_mutexattr_getrobust,
4964 pthread_mutexattr_setrobust, and pthread_mutex_consistent.
4965 (tests): Add tst-robust1, tst-robust2, tst-robust3, tst-robust4,
4966 tst-robust5, tst-robust6, and tst-robust7.
4967
4968 * tst-typesizes.c: New file.
4969 * Makefile (tests): Add tst-typesizes.
4970
4971 * tst-once3.c: More debug output.
4972
4973 2005-12-24 Ulrich Drepper <drepper@redhat.com>
4974
4975 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Add break
4976 missing after last change.
4977
4978 * version.c: Update copyright year.
4979
4980 2005-12-23 Ulrich Drepper <drepper@redhat.com>
4981
4982 * pthread_mutex_destroy.c: Set mutex type to an invalid value.
4983 * pthread_mutex_lock.c: Return EINVAL for invalid mutex type.
4984 * pthread_mutex_trylock.c: Likewise.
4985 * pthread_mutex_timedlock.c: Likewise.
4986 * pthread_mutex_unlock.c: Likewise.
4987
4988 2005-12-22 Roland McGrath <roland@redhat.com>
4989
4990 * sysdeps/pthread/sigaction.c: Use "" instead of <> to include self,
4991 so that #include_next's search location is not reset to the -I..
4992 directory where <nptl/...> can be found.
4993
4994 2005-12-22 Ulrich Drepper <drepper@redhat.com>
4995
4996 [BZ #1913]
4997 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
4998 Fix unwind info. Remove useless branch prediction prefix.
4999 * tst-cancel24.cc: New file.
5000 * Makefile: Add rules to build and run tst-cancel24.
5001
5002 2005-12-21 Roland McGrath <roland@redhat.com>
5003
5004 * libc-cancellation.c: Use <> rather than "" #includes.
5005 * pt-cleanup.c: Likewise.
5006 * pthread_create.c: Likewise.
5007 * pthread_join.c: Likewise.
5008 * pthread_timedjoin.c: Likewise.
5009 * pthread_tryjoin.c: Likewise.
5010 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Likewise.
5011 * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
5012 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
5013 * unwind.c: Likewise.
5014
5015 2005-12-19 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5016
5017 * sysdeps/sh/tcb-offsets.sym: Add POINTER_GUARD.
5018 * sysdeps/sh/tls.h (tcbhead_t): Remove private and add pointer_guard.
5019 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
5020 THREAD_COPY_POINTER_GUARD): Define.
5021
5022 2005-12-19 Jakub Jelinek <jakub@redhat.com>
5023
5024 * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): Make room for 2 uintptr_t's
5025 rather than one.
5026 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
5027 THREAD_COPY_POINTER_GUARD): Define.
5028 * sysdeps/powerpc/tcb-offsets.sym (POINTER_GUARD): Add.
5029 * sysdeps/powerpc/tls.h (tcbhead_t): Add pointer_guard field.
5030 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
5031 THREAD_COPY_POINTER_GUARD): Define.
5032 * sysdeps/s390/tcb-offsets.sym (STACK_GUARD): Add.
5033 * sysdeps/s390/tls.h (THREAD_GET_POINTER_GUARD,
5034 THREAD_SET_POINTER_GUARD, THREAD_COPY_POINTER_GUARD): Define.
5035 * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S (__ia64_longjmp):
5036 Use PTR_DEMANGLE for B0 if defined.
5037
5038 2005-12-17 Ulrich Drepper <drepper@redhat.com>
5039
5040 * pthread_create.c (__pthread_create_2_1): Use
5041 THREAD_COPY_POINTER_GUARD if available.
5042 * sysdeps/i386/tcb-offsets.sym: Add POINTER_GUARD.
5043 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
5044 * sysdeps/i386/tls.h (tcbhead_t): Add pointer_guard.
5045 Define THREAD_SET_POINTER_GUARD and THREAD_COPY_POINTER_GUARD.
5046 * sysdeps/x86_64/tls.h: Likewise.
5047
5048 2005-12-15 Roland McGrath <roland@redhat.com>
5049
5050 * sysdeps/unix/sysv/linux/mq_notify.c: Don't use sysdeps/generic.
5051
5052 2005-12-13 Ulrich Drepper <drepper@redhat.com>
5053
5054 * sysdeps/pthread/sigfillset.c: Adjust for files moved out of
5055 sysdeps/generic.
5056 * errno-loc.c: New file.
5057
5058 2005-12-12 Roland McGrath <roland@redhat.com>
5059
5060 * init.c (__pthread_initialize_minimal_internal): Do __static_tls_size
5061 adjustments before choosing stack size. Update minimum stack size
5062 calculation to match allocate_stack change.
5063
5064 2005-12-12 Ulrich Drepper <drepper@redhat.com>
5065
5066 * allocatestack.c (allocate_stack): Don't demand that there is an
5067 additional full page available on the stack beside guard, TLS, the
5068 minimum stack.
5069
5070 2005-11-24 Ulrich Drepper <drepper@redhat.com>
5071
5072 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
5073 (__cleanup_fct_attribute): Use __regparm__ not regparm.
5074
5075 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: When
5076 compiling 32-bit code we must define __cleanup_fct_attribute.
5077
5078 005-11-24 Jakub Jelinek <jakub@redhat.com>
5079
5080 [BZ #1920]
5081 * sysdeps/pthread/pthread.h (__pthread_unwind_next): Use
5082 __attribute__ instead of __attribute.
5083 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
5084 (__cleanup_fct_attribute): Likewise.
5085
5086 2005-11-17 Jakub Jelinek <jakub@redhat.com>
5087
5088 * sysdeps/pthread/unwind-forcedunwind.c (pthread_cancel_init): Put
5089 a write barrier before writing libgcc_s_getcfa.
5090
5091 2005-11-06 Ulrich Drepper <drepper@redhat.com>
5092
5093 * sysdeps/unix/sysv/linux/configure: Removed.
5094
5095 2005-11-05 Ulrich Drepper <drepper@redhat.com>
5096
5097 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Remove trace of
5098 optional init_array/fini_array support.
5099
5100 2005-10-24 Roland McGrath <roland@redhat.com>
5101
5102 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Remove unnecessary
5103 versioned_symbol use.
5104
5105 2005-10-16 Roland McGrath <roland@redhat.com>
5106
5107 * init.c (__pthread_initialize_minimal_internal): Even when using a
5108 compile-time default stack size, apply the minimum that allocate_stack
5109 will require, and round up to page size.
5110
5111 2005-10-10 Daniel Jacobowitz <dan@codesourcery.com>
5112
5113 * Makefile ($(test-modules)): Remove static pattern rule.
5114
5115 2005-10-14 Jakub Jelinek <jakub@redhat.com>
5116 Ulrich Drepper <drepper@redhat.com>
5117
5118 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix stack
5119 alignment in callback function.
5120 * Makefile: Add rules to build and run tst-align3.
5121 * tst-align3.c: New file.
5122
5123 2005-10-03 Jakub Jelinek <jakub@redhat.com>
5124
5125 * allocatestack.c (setxid_signal_thread): Add
5126 INTERNAL_SYSCALL_DECL (err).
5127
5128 2005-10-02 Jakub Jelinek <jakub@redhat.com>
5129
5130 * allocatestack.c (setxid_signal_thread): Need to use
5131 atomic_compare_and_exchange_bool_acq.
5132
5133 2005-10-01 Ulrich Drepper <drepper@redhat.com>
5134 Jakub Jelinek <jakub@redhat.com>
5135
5136 * descr.h: Define SETXID_BIT and SETXID_BITMASK. Adjust
5137 CANCEL_RESTMASK.
5138 (struct pthread): Move specific_used field to avoid padding.
5139 Add setxid_futex field.
5140 * init.c (sighandler_setxid): Reset setxid flag and release the
5141 setxid futex.
5142 * allocatestack.c (setxid_signal_thread): New function. Broken
5143 out of the bodies of the two loops in __nptl_setxid. For undetached
5144 threads check whether they are exiting and if yes, don't send a signal.
5145 (__nptl_setxid): Simplify loops by using setxid_signal_thread.
5146 * pthread_create.c (start_thread): For undetached threads, check
5147 whether setxid bit is set. If yes, wait until signal has been
5148 processed.
5149
5150 * allocatestack.c (STACK_VARIABLES): Initialize them.
5151 * pthread_create.c (__pthread_create_2_1): Initialize pd.
5152
5153 2004-09-02 Jakub Jelinek <jakub@redhat.com>
5154
5155 * pthread_cond_destroy.c (__pthread_cond_destroy): If there are
5156 waiters, awake all waiters on the associated mutex.
5157
5158 2005-09-22 Roland McGrath <roland@redhat.com>
5159
5160 * perf.c [__x86_64__] (HP_TIMING_NOW): New macro (copied from
5161 ../sysdeps/x86_64/hp-timing.h).
5162
5163 2005-08-29 Jakub Jelinek <jakub@redhat.com>
5164
5165 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_WAKE_OP,
5166 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5167 (lll_futex_wake_unlock): Define.
5168 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_WAKE_OP,
5169 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5170 (lll_futex_wake_unlock): Define.
5171 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_WAKE_OP,
5172 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5173 (lll_futex_wake_unlock): Define.
5174 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_WAKE_OP,
5175 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5176 (lll_futex_wake_unlock): Define.
5177 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_WAKE_OP,
5178 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5179 (lll_futex_wake_unlock): Define.
5180 * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal): Use
5181 lll_futex_wake_unlock.
5182 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
5183 (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5184 (__pthread_cond_signal): Use FUTEX_WAKE_OP.
5185 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
5186 (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5187 (__pthread_cond_signal): Use FUTEX_WAKE_OP.
5188
5189 2005-09-05 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5190
5191 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
5192 Fix typo in register name.
5193
5194 2005-08-23 Ulrich Drepper <drepper@redhat.com>
5195
5196 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
5197 Use __sigfillset. Document that sigfillset does the right thing wrt
5198 to SIGSETXID.
5199
5200 2005-07-11 Jakub Jelinek <jakub@redhat.com>
5201
5202 [BZ #1102]
5203 * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER,
5204 PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP,
5205 PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP,
5206 PTHREAD_MUTEX_ADAPTIVE_NP, PTHREAD_RWLOCK_INITIALIZER,
5207 PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP,
5208 PTHREAD_COND_INITIALIZER): Supply zeros for all fields
5209 in the structure.
5210 * Makefile (tests): Add tst-initializers1.
5211 (CFLAGS-tst-initializers1.c): Set.
5212 * tst-initializers1.c: New test.
5213
5214 2005-07-11 Jakub Jelinek <jakub@redhat.com>
5215
5216 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_rwlock_t):
5217 Make sure __flags are located at offset 48 from the start of the
5218 structure.
5219
5220 2005-07-02 Roland McGrath <roland@redhat.com>
5221
5222 * Makeconfig: Comment fix.
5223
5224 2005-07-05 Jakub Jelinek <jakub@redhat.com>
5225
5226 * descr.h (PTHREAD_STRUCT_END_PADDING): Define.
5227 * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): If PTHREAD_STRUCT_END_PADDING
5228 is smaller than 8 bytes, increase TLS_PRE_TCB_SIZE by 16 bytes.
5229 (THREAD_SYSINFO, THREAD_SELF, DB_THREAD_SELF): Don't assume
5230 TLS_PRE_TCB_SIZE is sizeof (struct pthread).
5231 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5232 * sysdeps/ia64/tcb-offsets.sym (PID, TID, MULTIPLE_THREADS_OFFSET):
5233 Use TLS_PRE_TCB_SIZE instead of sizeof (struct pthread).
5234 * sysdeps/unix/sysv/linux/ia64/createthread.c (TLS_VALUE): Don't
5235 assume TLS_PRE_TCB_SIZE is sizeof (struct pthread).
5236
5237 2005-06-25 Jakub Jelinek <jakub@redhat.com>
5238
5239 * sysdeps/i386/tls.h (tcbhead_t): Add stack_guard field.
5240 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5241 * sysdeps/x86_64/tls.h (tcbhead_t): Add sysinfo and stack_guard
5242 fields.
5243 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5244 * sysdeps/s390/tls.h (tcbhead_t): Add stack_guard
5245 field. Put in sysinfo field unconditionally.
5246 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5247 * sysdeps/powerpc/tls.h (tcbhead_t): Add stack_guard field.
5248 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5249 * sysdeps/sparc/tls.h (tcbhead_t): Add sysinfo and stack_guard
5250 fields.
5251 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5252 * pthread_create.c (__pthread_create_2_1): Use
5253 THREAD_COPY_STACK_GUARD macro.
5254 * Makefile: Add rules to build and run tst-stackguard1{,-static}
5255 tests.
5256 * tst-stackguard1.c: New file.
5257 * tst-stackguard1-static.c: New file.
5258
5259 2005-06-14 Alan Modra <amodra@bigpond.net.au>
5260
5261 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
5262 Invoke CGOTSETUP and CGOTRESTORE.
5263 (CGOTSETUP, CGOTRESTORE): Define.
5264
5265 2005-05-29 Richard Henderson <rth@redhat.com>
5266
5267 * tst-cancel4.c (WRITE_BUFFER_SIZE): New.
5268 (tf_write, tf_writev): Use it.
5269 (do_test): Use socketpair instead of pipe. Set SO_SNDBUF to
5270 the system minimum.
5271
5272 2005-05-23 Jakub Jelinek <jakub@redhat.com>
5273
5274 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
5275 [IS_IN_librt] (CENABLE, CDISABLE): Use JUMPTARGET instead of
5276 __librt_*_asynccancel@local.
5277
5278 2005-05-17 Alan Modra <amodra@bigpond.net.au>
5279
5280 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Delete
5281 all occurrences of JUMPTARGET. Instead append @local to labels.
5282
5283 2005-05-20 Jakub Jelinek <jakub@redhat.com>
5284
5285 * sysdeps/i386/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN): Define to
5286 size/alignment of struct pthread rather than tcbhead_t.
5287 * sysdeps/x86_64/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
5288 Likewise.
5289 * sysdeps/s390/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
5290 Likewise.
5291 * sysdeps/sparc/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
5292 Likewise.
5293
5294 2005-05-19 Richard Henderson <rth@redhat.com>
5295
5296 * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use
5297 __sync_val_compare_and_swap, not explicit _si variant.
5298 * sysdeps/ia64/pthread_spin_trylock.c (pthread_spin_trylock): Likewise.
5299
5300 2005-05-03 Ulrich Drepper <drepper@redhat.com>
5301
5302 [BZ #915]
5303 * sysdeps/pthread/pthread.h: Avoid empty initializers.
5304
5305 2005-05-03 Jakub Jelinek <jakub@redhat.com>
5306
5307 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Remove explicit
5308 .eh_frame section, use cfi_* directives.
5309
5310 2005-04-27 Jakub Jelinek <jakub@redhat.com>
5311
5312 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: Use <> instead
5313 of "" includes.
5314
5315 2005-04-27 Ulrich Drepper <drepper@redhat.com>
5316
5317 [BZ #1075]
5318 * tst-cancel17.c (do_test): Add arbitrary factor to make sure
5319 aio_write blocks.
5320
5321 2005-04-27 Roland McGrath <roland@redhat.com>
5322
5323 * Makefile (tests): Remove tst-clock2.
5324
5325 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Handle
5326 CLOCK_PROCESS_CPUTIME_ID and CLOCK_PROCESS_THREAD_ID specially,
5327 translating to the kernel clockid_t for our own process/thread clock.
5328
5329 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: New file.
5330
5331 2005-04-15 Jakub Jelinek <jakub@redhat.com>
5332
5333 * old_pthread_cond_init.c: Include <errno.h>.
5334 (__pthread_cond_init_2_0): Fail with EINVAL if COND_ATTR is
5335 process shared or uses clock other than CLOCK_REALTIME.
5336 * pthread_cond_init.c (__pthread_cond_init): Remove bogus comment.
5337
5338 2005-04-13 David S. Miller <davem@davemloft.net>
5339
5340 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: New file.
5341 * sysdeps/sparc/sparc64/clone.S: New file.
5342
5343 2005-04-05 Jakub Jelinek <jakub@redhat.com>
5344
5345 [BZ #1102]
5346 * sysdeps/pthread/pthread.h (__pthread_cleanup_routine): Use
5347 __inline instead of inline.
5348 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_routine): Likewise.
5349
5350 2005-03-31 Jakub Jelinek <jakub@redhat.com>
5351
5352 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Use
5353 functionally equivalent, but shorter instructions.
5354 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
5355 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
5356 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
5357 Likewise.
5358 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
5359 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
5360 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
5361 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
5362 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5363 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
5364 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
5365 Likewise.
5366 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
5367 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
5368 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
5369 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
5370 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
5371
5372 2005-03-28 Daniel Jacobowitz <dan@codesourcery.com>
5373
5374 * sysdeps/mips/Makefile: New file.
5375 * sysdeps/mips/nptl-sysdep.S: New file.
5376 * sysdeps/mips/tcb-offsets.sym: New file.
5377 * sysdeps/mips/pthread_spin_lock.S: New file.
5378 * sysdeps/mips/pthread_spin_trylock.S: New file.
5379 * sysdeps/mips/pthreaddef.h: New file.
5380 * sysdeps/mips/tls.h: New file.
5381 * sysdeps/mips/jmpbuf-unwind.h: New file.
5382 * sysdeps/unix/sysv/linux/mips/lowlevellock.h: New file.
5383 * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h: New file.
5384 * sysdeps/unix/sysv/linux/mips/bits/semaphore.h: New file.
5385 * sysdeps/unix/sysv/linux/mips/pthread_once.c: New file.
5386 * sysdeps/unix/sysv/linux/mips/fork.c: New file.
5387 * sysdeps/unix/sysv/linux/mips/pt-vfork.S: New file.
5388 * sysdeps/unix/sysv/linux/mips/vfork.S: New file.
5389 * sysdeps/unix/sysv/linux/mips/clone.S: New file.
5390 * sysdeps/unix/sysv/linux/mips/createthread.c: New file.
5391 * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: New file.
5392
5393 2005-03-23 Ulrich Drepper <drepper@redhat.com>
5394
5395 [BZ #1112]
5396 * pthread_create.c (__pthread_create_2_1): Rename syscall error
5397 variable to scerr.
5398
5399 2005-03-10 Jakub Jelinek <jakub@redhat.com>
5400
5401 * tst-getpid1.c (do_test): Align stack passed to clone{2,}.
5402
5403 2005-02-25 Roland McGrath <roland@redhat.com>
5404
5405 * alloca_cutoff.c: Correct license text.
5406 * tst-unload.c: Likewise.
5407 * sysdeps/pthread/allocalim.h: Likewise.
5408 * sysdeps/pthread/pt-initfini.c: Likewise.
5409 * sysdeps/pthread/bits/libc-lock.h: Likewise.
5410 * sysdeps/pthread/bits/sigthread.h: Likewise.
5411 * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
5412 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
5413
5414 2005-02-16 Roland McGrath <roland@redhat.com>
5415
5416 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
5417 Use unsigned int * for ptr_nthreads.
5418
5419 2005-02-14 Alan Modra <amodra@bigpond.net.au>
5420
5421 [BZ #721]
5422 * sysdeps/powerpc/tcb-offsets.sym (thread_offsetof): Redefine to suit
5423 gcc4.
5424
5425 2005-02-07 Richard Henderson <rth@redhat.com>
5426
5427 [BZ #787]
5428 * sysdeps/pthread/pthread.h (__sigsetjmp): Use pointer as first
5429 argument.
5430
5431 2004-11-03 Marcus Brinkmann <marcus@gnu.org>
5432
5433 * sysdeps/generic/lowlevellock.h (__generic_mutex_unlock): Fix
5434 order of arguments in invocation of atomic_add_zero.
5435
5436 2005-01-26 Jakub Jelinek <jakub@redhat.com>
5437
5438 [BZ #737]
5439 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S (__new_sem_trywait):
5440 Use direct %gs segment access or, if NO_TLS_DIRECT_SEG_REFS,
5441 at least gotntpoff relocation and addition.
5442 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
5443 Likewise.
5444 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
5445 Likewise.
5446 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
5447 Likewise.
5448
5449 2005-01-06 Ulrich Drepper <drepper@redhat.com>
5450
5451 * allocatestack.c (init_one_static_tls): Adjust initialization of DTV
5452 entry for static tls deallocation fix.
5453 * sysdeps/alpha/tls.h (dtv_t): Change pointer type to be struct which
5454 also contains information whether the memory pointed to is static
5455 TLS or not.
5456 * sysdeps/i386/tls.h: Likewise.
5457 * sysdeps/ia64/tls.h: Likewise.
5458 * sysdeps/powerpc/tls.h: Likewise.
5459 * sysdeps/s390/tls.h: Likewise.
5460 * sysdeps/sh/tls.h: Likewise.
5461 * sysdeps/sparc/tls.h: Likewise.
5462 * sysdeps/x86_64/tls.h: Likewise.
5463
5464 2004-12-27 Ulrich Drepper <drepper@redhat.com>
5465
5466 * init.c (__pthread_initialize_minimal_internal): Use __sigemptyset.
5467
5468 2004-12-21 Jakub Jelinek <jakub@redhat.com>
5469
5470 * sysdeps/i386/tls.h (CALL_THREAD_FCT): Maintain 16 byte alignment of
5471 %esp.
5472 * Makefile (tests): Add tst-align2.
5473 * tst-align2.c: New test.
5474 * sysdeps/i386/Makefile (CFLAGS-tst-align{,2}.c): Add
5475 -mpreferred-stack-boundary=4.
5476
5477 2004-12-18 Roland McGrath <roland@redhat.com>
5478
5479 * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h:
5480 New file removed withdrawn for the moment.
5481
5482 2004-12-17 Richard Henderson <rth@redhat.com>
5483
5484 * sysdeps/unix/sysv/linux/alpha/clone.S: New file.
5485 * sysdeps/alpha/tcb-offsets.sym (TID_OFFSET): New.
5486
5487 2004-12-16 Ulrich Drepper <drepper@redhat.com>
5488
5489 * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h: New file.
5490 Increased PTHREAD_STACK_MIN.
5491
5492 * tst-context1.c (stacks): Use bigger stack size.
5493
5494 2004-12-16 Jakub Jelinek <jakub@redhat.com>
5495
5496 * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: New file.
5497 * sysdeps/sparc/tcb-offsets.sym: Add TID.
5498
5499 2004-12-15 Jakub Jelinek <jakub@redhat.com>
5500
5501 * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: New file.
5502 * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: New file.
5503 * sysdeps/s390/tcb-offsets.sym (TID): Add.
5504
5505 2004-12-15 Ulrich Drepper <drepper@redhat.com>
5506
5507 * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: New file.
5508
5509 2004-12-14 Ulrich Drepper <drepper@redhat.com>
5510
5511 * sysdeps/powerpc/tcb-offsets.sym: Add TID.
5512 * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: New file.
5513
5514 * tst-getpid1.c: If child crashes, report this first. Print which
5515 signal.
5516
5517 2004-12-09 Ulrich Drepper <drepper@redhat.com>
5518
5519 * init.c (__pthread_initialize_minimal_internal): Also unblock
5520 SIGSETXID.
5521
5522 2004-12-01 Jakub Jelinek <jakub@redhat.com>
5523
5524 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_CPUTIME,
5525 _POSIX_THREAD_CPUTIME): Define to 0.
5526 * sysdeps/pthread/timer_create.c (timer_create): Remove unused code
5527 handling CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID.
5528 * sysdeps/pthread/timer_routines.c (__timer_signal_thread_pclk,
5529 __timer_signal_thread_tclk): Remove.
5530 (init_module): Remove their initialization.
5531 (thread_cleanup): Remove their cleanup assertions.
5532 * sysdeps/pthread/posix-timer.h (__timer_signal_thread_pclk,
5533 __timer_signal_thread_tclk): Remove.
5534 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Removed.
5535 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Removed.
5536 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Removed.
5537
5538 2004-12-07 Jakub Jelinek <jakub@redhat.com>
5539
5540 * sysdeps/ia64/tcb-offsets.sym (TID): Add.
5541 * sysdeps/unix/sysv/linux/ia64/clone2.S: New file.
5542
5543 * Makefile (tests): Add tst-getpid2.
5544 * tst-getpid1.c (TEST_CLONE_FLAGS): Define.
5545 (do_test): Use it. Use __clone2 instead of clone on ia64.
5546 * tst-getpid2.c: New test.
5547
5548 2004-12-07 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5549
5550 * sysdeps/unix/sysv/linux/sh/clone.S: New file.
5551
5552 2004-12-04 Ulrich Drepper <drepper@redhat.com>
5553
5554 * Makefile (tests): Add tst-getpid1.
5555 * tst-getpid1.c: New file.
5556 * sysdeps/unix/sysv/linux/i386/clone.S: New file.
5557 * sysdeps/unix/sysv/linux/x86_64/clone.S: New file.
5558
5559 2004-12-02 Roland McGrath <roland@redhat.com>
5560
5561 * Makefile (libpthread-nonshared): Variable removed.
5562 ($(objpfx)libpthread_nonshared.a): Target removed.
5563 ($(inst_libdir)/libpthread_nonshared.a): Likewise.
5564 These are now handled by generic magic from
5565 libpthread-static-only-routines being set.
5566
5567 2004-11-27 Ulrich Drepper <drepper@redhat.com>
5568
5569 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_PRIORITIZED_IO,
5570 _POSIX2_CHAR_TERM, _POSIX_THREAD_PRIO_INHERIT,
5571 _POSIX_THREAD_PRIO_PROTECT): Define.
5572 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
5573 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
5574 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
5575
5576 2004-11-26 Jakub Jelinek <jakub@redhat.com>
5577
5578 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_ADVISORY_INFO,
5579 _POSIX_SPORADIC_SERVER, _POSIX_THREAD_SPORADIC_SERVER, _POSIX_TRACE,
5580 _POSIX_TRACE_EVENT_FILTER, _POSIX_TRACE_INHERIT, _POSIX_TRACE_LOG,
5581 _POSIX_TYPED_MEMORY_OBJECTS, _POSIX_IPV6, _POSIX_RAW_SOCKETS): Define.
5582 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
5583 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
5584 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
5585
5586 2004-11-24 Ulrich Drepper <drepper@redhat.com>
5587
5588 * sysdeps/x86_64/Makefile [nptl]: Define CFLAGS-pthread_create.c.
5589
5590 * Makefile (libpthread-routines): Add pthread_setschedprio.
5591 * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setschedprio.
5592 * sysdeps/pthread/pthread.h: Declare pthread_setschedprio.
5593 * pthread_setschedprio.c: New file.
5594
5595 2004-11-20 Jakub Jelinek <jakub@redhat.com>
5596
5597 * pthread_create.c (pthread_cancel): Add PTHREAD_STATIC_FN_REQUIRE.
5598 * pthread_cancel.c (pthread_create): Likewise.
5599
5600 * Makefile (libpthread-routines): Add vars.
5601 * sysdeps/pthread/createthread.c (__pthread_multiple_threads): Remove.
5602 * init.c (__default_stacksize, __is_smp): Remove.
5603 * vars.c: New file.
5604 * pthreadP.h (__find_thread_by_id): If !SHARED, add weak_function
5605 and define a wrapper macro.
5606 (PTHREAD_STATIC_FN_REQUIRE): Define.
5607 * allocatestack.c (__find_thread_by_id): Undefine.
5608 * pthread_create (__pthread_keys): Remove.
5609 (pthread_mutex_lock, pthread_mutex_unlock, pthread_once,
5610 pthread_key_create, pthread_setspecific, pthread_getspecific): Add
5611 PTHREAD_STATIC_FN_REQUIRE.
5612
5613 2004-11-18 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5614
5615 * sysdeps/sh/tls.h (DB_THREAD_SELF): Set the correct bias
5616 parameter to REGISTER macro.
5617
5618 2004-11-17 Roland McGrath <roland@redhat.com>
5619
5620 * sysdeps/unix/sysv/linux/timer_routines.c (__start_helper_thread):
5621 Make sure SIGCANCEL is blocked as well.
5622
5623 2004-11-10 Jakub Jelinek <jakub@redhat.com>
5624
5625 * sysdeps/pthread/setxid.h: New file.
5626 * sysdeps/pthread/pthread-functions.h (HAVE_PTR__NPTL_SETXID): Remove.
5627 (struct xid_command): Add forward decl.
5628 (struct pthread_functions): Change return type of __nptl_setxid hook
5629 to int.
5630 * pthreadP.h (__nptl_setxid): Change return type to int.
5631 * allocatestack.c (__nptl_setxid): Call INTERNAL_SYSCALL_NCS in the
5632 calling thread, return its return value and set errno on failure.
5633 * descr.h (struct xid_command): Change id type to long array.
5634
5635 * Makefile: Add rules to build and test tst-setuid1 and
5636 tst-setuid1-static.
5637 * tst-setuid1.c: New test.
5638 * tst-setuid1-static.c: New test.
5639
5640 2004-11-10 Jakub Jelinek <jakub@redhat.com>
5641
5642 * Makefile (tests): Add tst-exit3.
5643 * tst-exit3.c: New test.
5644
5645 2004-11-09 Ulrich Drepper <drepper@redhat.com>
5646
5647 * Makefile (tests): Add tst-exit2.
5648 * tst-exit2.c: New file.
5649
5650 2004-11-09 Roland McGrath <roland@redhat.com>
5651
5652 [BZ #530]
5653 * sysdeps/pthread/createthread.c (do_clone): Increment __nptl_nthreads
5654 here, before calling clone.
5655 * pthread_create.c (start_thread): Don't do it here.
5656
5657 2004-11-02 Jakub Jelinek <jakub@redhat.com>
5658
5659 * sysdeps/unix/sysv/linux/smp.h: Include <errno.h>.
5660
5661 2004-10-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5662
5663 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
5664 Set ETIMEDOUT to errno when time is up. Tweak to avoid
5665 assembler warning.
5666
5667 2004-10-28 Jakub Jelinek <jakub@redhat.com>
5668
5669 * pthread_create.c (__pthread_create_2_1): Avoid leaking stacks
5670 if sched_priority is not between minprio and maxprio.
5671
5672 2004-10-25 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5673
5674 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
5675 (__pthread_cond_timedwait): Use clock_gettime syscall if exists.
5676
5677 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
5678 (__lll_mutex_timedlock_wait): Fix a bad branch condition.
5679
5680 2004-10-24 Ulrich Drepper <drepper@redhat.com>
5681
5682 * sysdeps/unix/sysv/linux/smp.h (is_smp_system): Use
5683 not-cancelable I/O functions.
5684
5685 2004-10-21 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5686
5687 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
5688 (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
5689 make sure 2 is stored in the futex and we looked at the old value.
5690 Fix a few other problems to return the correct value.
5691
5692 2004-10-14 Richard Henderson <rth@redhat.com>
5693
5694 * sysdeps/alpha/tcb-offsets.sym (thread_offsetof): Redefine to
5695 make gcc4 happy.
5696
5697 2004-10-06 Jakub Jelinek <jakub@redhat.com>
5698
5699 * sysdeps/unix/sysv/linux/jmp-unwind.c: Include pthreadP.h instead
5700 of pthread-functions.h and pthreaddef.h.
5701 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Likewise.
5702
5703 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
5704 Change __data.__nwaiters from int to unsigned int.
5705
5706 * tst-clock2.c (do_test): Don't fail if _POSIX_THREAD_CPUTIME == 0 and
5707 sysconf (_SC_THREAD_CPUTIME) returns negative value.
5708
5709 * allocatestack.c (__find_thread_by_id): Move attribute_hidden
5710 before return type.
5711
5712 * sysdeps/s390/jmpbuf-unwind.h: Include bits/wordsize.h.
5713 (JMPBUF_CFA_UNWINDS_ADJ): Subtract 96 resp. 160 bytes from CFA.
5714
5715 2004-10-06 Ulrich Drepper <drepper@redhat.com>
5716
5717 * tst-cancel4.c (tf_msgrcv): Check for failure in msgget. If the
5718 test fails, remove message queue.
5719 (tf_msgsnd): Likewise.
5720
5721 2004-10-05 Jakub Jelinek <jakub@redhat.com>
5722
5723 * tst-clock1.c: Change #ifdef to #if defined.
5724 * tst-clock2.c: Likewise.
5725 * tst-cond11.c: Likewise.
5726
5727 * sysdeps/pthread/timer_create.c (timer_create): Use
5728 defined _POSIX_CPUTIME && _POSIX_CPUTIME >= 0 instead of
5729 defined CLOCK_PROCESS_CPUTIME_ID #ifs and similarly for
5730 THREAD_CPUTIME.
5731
5732 2004-10-05 Jakub Jelinek <jakub@redhat.com>
5733
5734 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h (_POSIX_CPUTIME,
5735 _POSIX_THREAD_CPUTIME): Define to 0.
5736
5737 2004-10-04 Ulrich Drepper <drepper@redhat.com>
5738
5739 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Define _POSIX_CPUTIME
5740 and _POSIX_THREAD_CPUTIME to zero.
5741 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
5742 * tst-barrier2.c: Fix testing for POSIX feature.
5743 * tst-clock1.c: Likewise.
5744 * tst-clock2.c: Likewise.
5745 * tst-cond11.c: Likewise.
5746 * tst-cond4.c: Likewise.
5747 * tst-cond6.c: Likewise.
5748 * tst-flock2.c: Likewise.
5749 * tst-mutex4.c: Likewise.
5750 * tst-mutex9.c: Likewise.
5751 * tst-rwlock12.c: Likewise.
5752 * tst-rwlock4.c: Likewise.
5753 * tst-signal1.c: Likewise.
5754 * tst-spin2.c: Likewise.
5755 * sysdeps/pthread/posix-timer.h: Likewise.
5756 * sysdeps/pthread/timer_create.c: Likewise.
5757 * sysdeps/pthread/timer_routines.c: Likewise.
5758
5759 2004-10-01 Ulrich Drepper <drepper@redhat.com>
5760
5761 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
5762 (__lll_mutex_timedlock_wait): Address futex correctly.
5763
5764 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
5765 (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
5766 make sure 2 is stored in the futex and we looked at the old value.
5767 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
5768 (__lll_mutex_timedlock_wait): Likewise. Fix a few other problems
5769 which might very well made the code not working at all before.
5770 [BZ #417]
5771
5772 2004-09-28 Ulrich Drepper <drepper@redhat.com>
5773
5774 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
5775 allow SIGSETXID to be sent.
5776 * sysdeps/pthread/sigaction.c (__sigaction): Don't allow action
5777 for SIGSETXID to be defined.
5778 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
5779 SIGSETXID cannot be blocked.
5780
5781 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
5782 Add __extension__ to long long types.
5783 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5784 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5785 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5786 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5787 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
5788 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
5789 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5790
5791 2004-09-25 Ulrich Drepper <drepper@redhat.com>
5792
5793 * descr.h (struct pthread): Add stopped_start field.
5794 * sysdeps/pthread/createthread.c (create_thread): Set
5795 start_stopped flag in descriptor for new thread appropriately.
5796 * pthread_create.c (start_thread): Only take lock to be stopped on
5797 startup if stopped_start flag says so.
5798
5799 2004-09-24 Ulrich Drepper <drepper@redhat.com>
5800
5801 * pthread_create.c (__pthread_create_2_1): Remember whether thread
5802 is created detached and if yes, do not try to free the stack in case
5803 the thread creation failed.
5804 * sysdeps/pthread/createthread.c (do_clone): Free stack here if clone
5805 call fails. Don't depend on INTERNAL_SYSCALL_ERRNO return zero in
5806 case there has been no error. [BZ #405]
5807
5808 * pthread_create.c (start_thread): Don't wait for scheduler data
5809 etc to be set at the beginning of the function. The cancellation
5810 infrastructure must have been set up. And enable async
5811 cancellation before potentially going to sleep. [BZ #401]
5812
5813 2004-09-20 Ulrich Drepper <drepper@redhat.com>
5814
5815 * Versions: Remove exports for pthread_set*id_np functions.
5816 * sysdeps/pthread/pthread.h: Remove pthread_set*id_np prototypes
5817 for now.
5818 * Makefile: Don't build pthread_set*id code for now.
5819
5820 2004-09-19 Ulrich Drepper <drepper@redhat.com>
5821
5822 * sysdeps/unix/sysv/linux/allocrtsig.c: Allocate second signal for
5823 internal use.
5824 * allocatestack.c (__nptl_setxid): New function.
5825 * descr.h (struct xid_command): Define type.
5826 * init.c (pthread_functions): Add ptr__nptl_setxid initialization.
5827 (sighandler_setxid): New function.
5828 (__pthread_initialize_minimal): Register sighandler_setxid for
5829 SIGCANCEL.
5830 * pt-allocrtsig.c: Update comment.
5831 * pthreadP.h: Define SIGSETXID. Declare __xidcmd variable.
5832 Declare __nptl_setxid.
5833 * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_setxid.
5834 * sysdeps/pthread/pthread.h: Declare pthread_setgid_np,
5835 pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
5836 pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
5837 and pthread_setresuid_np.
5838 * pthread_setgid_np.c: New file.
5839 * pthread_setuid_np.c: New file.
5840 * pthread_setegid_np.c: New file.
5841 * pthread_seteuid_np.c: New file.
5842 * pthread_setregid_np.c: New file.
5843 * pthread_setreuid_np.c: New file.
5844 * pthread_setresgid_np.c: New file.
5845 * pthread_setresuid_np.c: New file.
5846 * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setgid_np,
5847 pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
5848 pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
5849 and pthread_setresuid_np.
5850 * Makefile (libpthread-routines): Add pthread_setuid, pthread_seteuid,
5851 pthread_setreuid, pthread_setresuid, pthread_setgid, pthread_setegid,
5852 pthread_setregid, and pthread_setresgid.
5853
5854 2004-09-18 Ulrich Drepper <drepper@redhat.com>
5855
5856 * allocatestack.c (allocate_stack): Return EAGAIN instead of
5857 ENOMEM when out of memory.
5858
5859 2004-09-10 Roland McGrath <roland@redhat.com>
5860
5861 [BZ #379]
5862 * allocatestack.c (allocate_stack): Remove [__ASSUME_CLONE_STOPPED]
5863 code, since we don't try to use the broken CLONE_STOPPED any more.
5864 * pthread_create.c (start_thread): Likewise.
5865
5866 2004-09-15 Richard Henderson <rth@redhat.com>
5867
5868 * sysdeps/unix/sysv/linux/alpha/vfork.S: Use libc_hidden_def.
5869
5870 2004-09-01 David Mosberger <davidm@hpl.hp.com>
5871
5872 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h
5873 (__libc_unwind_longjmp): Delete macro and declare as function.
5874 * sysdeps/unix/sysv/linux/ia64/Makefile (sysdep_routines): Mention
5875 __ia64_longjmp, sigstack_longjmp, and __sigstack_longjmp for
5876 nptl directory.
5877 * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S: New file.
5878 * sysdeps/unix/sysv/linux/ia64/__sigstack_longjmp.c: New file.
5879 * sysdeps/unix/sysv/linux/ia64/unwind_longjmp.c: New file.
5880
5881 2004-09-12 Ulrich Drepper <drepper@redhat.com>
5882
5883 * sysdeps/pthread/pthread.h: Make rwlock prototypes available also
5884 for __USE_XOPEN2K.
5885 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define rwlock
5886 types also for __USE_XOPEN2K.
5887 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
5888 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5889 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5890 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5891 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
5892 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5893 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5894 [BZ #320]
5895
5896 2004-09-08 Ulrich Drepper <drepper@redhat.com>
5897
5898 * sysdeps/pthread/pthread.h
5899 (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Make safe for C++.
5900 (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
5901 (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
5902 (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Likewise.
5903 [BZ #375]
5904
5905 2004-09-07 Ulrich Drepper <drepper@redhat.com>
5906
5907 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Allow
5908 PSEUDO to be used with . prefix.
5909
5910 * sysdeps/unix/sysv/linux/alpha/pthread_once.c (__pthread_once):
5911 Use atomic_increment instead of atomic_exchange_and_add.
5912 * sysdeps/unix/sysv/linux/sparc/pthread_once.c (__pthread_once):
5913 Likewise.
5914 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
5915 Likewise.
5916 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
5917 Likewise.
5918
5919 * allocatestack.c (allocate_stack): Use atomic_increment_val
5920 instead of atomic_exchange_and_add.
5921 * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Likewise.
5922 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
5923 Likewise.
5924 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
5925 Likewise.
5926
5927 * sysdeps/pthread/pthread.h (pthread_once): Remove __THROW since
5928 the initialization function might throw.
5929
5930 2005-09-05 Richard Henderson <rth@redhat.com>
5931
5932 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
5933 Move definition inside libpthread, libc, librt check. Provide
5934 definition for rtld.
5935
5936 2004-09-02 Ulrich Drepper <drepper@redhat.com>
5937
5938 * sysdeps/alpha/jmpbuf-unwind.h: Define __libc_unwind_longjmp.
5939 * sysdeps/i386/jmpbuf-unwind.h: Likewise
5940 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
5941 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
5942 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
5943 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
5944 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
5945 * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
5946 * unwind.c: Use it.
5947
5948 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
5949 Rename __data.__clock to __data.__nwaiters, make it unsigned int.
5950 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
5951 Likewise.
5952 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
5953 Decrement __nwaiters. If pthread_cond_destroy has been called and
5954 this is the last waiter, signal pthread_cond_destroy caller and
5955 avoid using the pthread_cond_t structure after unlock.
5956 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
5957 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5958 Read clock type from the least significant bits of __nwaiters instead
5959 of __clock.
5960 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5961 * sysdeps/unix/sysv/linux/internaltypes.h: Define COND_CLOCK_BITS.
5962
5963 2004-08-31 Jakub Jelinek <jakub@redhat.com>
5964
5965 [BZ #342]
5966 * Makefile (tests): Add tst-cond20 and tst-cond21.
5967 * tst-cond20.c: New test.
5968 * tst-cond21.c: New test.
5969 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
5970 (pthread_cond_t): Rename __data.__clock to __data.__nwaiters, make
5971 it unsigned int.
5972 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
5973 Likewise.
5974 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
5975 (pthread_cond_t): Likewise.
5976 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
5977 Likewise.
5978 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
5979 Likewise.
5980 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
5981 Likewise.
5982 * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_clock): Remove.
5983 (cond_nwaiters): New.
5984 (clock_bits): New.
5985 * pthread_cond_destroy.c (__pthread_cond_destroy): Return EBUSY
5986 if there are waiters not signalled yet.
5987 Wait until all already signalled waiters wake up.
5988 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Decrement
5989 __nwaiters. If pthread_cond_destroy has been called and this is the
5990 last waiter, signal pthread_cond_destroy caller and avoid using
5991 the pthread_cond_t structure after unlock.
5992 (__pthread_cond_wait): Increment __nwaiters in the beginning,
5993 decrement it when leaving. If pthread_cond_destroy has been called
5994 and this is the last waiter, signal pthread_cond_destroy caller.
5995 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
5996 Likewise. Read clock type from the least significant bits of
5997 __nwaiters instead of __clock.
5998 * pthread_condattr_setclock.c (pthread_condattr_setclock): Check
5999 whether clock ID can be encoded in COND_CLOCK_BITS bits.
6000 * pthread_condattr_getclock.c (pthread_condattr_getclock): Decode
6001 clock type just from the last COND_CLOCK_BITS bits of value.
6002 * pthread_cond_init.c (__pthread_cond_init): Initialize __nwaiters
6003 instead of __clock, just from second bit of condattr's value.
6004
6005 2004-08-30 Jakub Jelinek <jakub@redhat.com>
6006
6007 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Include
6008 bits/wordsize.h. Make the header match i386 header when __WORDSIZE
6009 != 64.
6010 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
6011
6012 2004-08-15 Roland McGrath <roland@frob.com>
6013
6014 * pthread_atfork.c: Update copyright terms including special exception
6015 for these trivial files, which are statically linked into executables
6016 that use dynamic linking for the significant library code.
6017
6018 2004-08-09 Jakub Jelinek <jakub@redhat.com>
6019
6020 * DESIGN-rwlock.txt: Add decreasing of nr_readers_queued to
6021 pthread_rwlock_rdlock.
6022 * sysdeps/pthread/pthread_rwlock_rdlock (__pthread_rwlock_rdlock):
6023 Decrease __nr_readers_queued after reacquiring lock.
6024 * sysdeps/pthread/pthread_rwlock_timedrdlock
6025 (pthread_rwlock_timedrdlock): Likewise.
6026 Reported by Bob Cook <bobcook47@hotmail.com>.
6027
6028 2004-08-11 Jakub Jelinek <jakub@redhat.com>
6029
6030 * tst-rwlock14.c (tf): Read main thread handle from *ARG
6031 before pthread_barrier_wait.
6032
6033 2004-08-07 Ulrich Drepper <drepper@redhat.com>
6034
6035 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
6036 Remove unnecessary exception handling data.
6037
6038 2004-07-23 Jakub Jelinek <jakub@redhat.com>
6039
6040 [BZ #284]
6041 * sysdeps/pthread/pthread.h (pthread_getcpuclockid): Use __clockid_t
6042 instead of clockid_t.
6043
6044 2004-07-21 Roland McGrath <roland@redhat.com>
6045
6046 * Makefile ($(objpfx)multidir.mk): Use $(make-target-directory).
6047
6048 2004-07-19 Roland McGrath <roland@redhat.com>
6049
6050 * tst-cancel4.c (tf_waitid): Use WEXITED flag bit if available.
6051
6052 2004-07-02 Roland McGrath <roland@redhat.com>
6053
6054 * configure: Don't exit.
6055
6056 2004-07-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6057
6058 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
6059 (__pthread_cond_timedwait): Check for invalid nanosecond in
6060 timeout value.
6061
6062 2004-07-07 Ulrich Drepper <drepper@redhat.com>
6063
6064 * Makefile: Add rules to build and run tst-fini1.
6065 * tst-fini1.c: New file.
6066 * tst-fini1mod.c: New file.
6067
6068 2004-07-05 Ulrich Drepper <drepper@redhat.com>
6069
6070 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define NO_CANCELLATION
6071 if no cancellation support is needed.
6072 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
6073 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
6074 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
6075 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
6076 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
6077 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
6078 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
6079 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
6080 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
6081
6082 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define __NR_futex
6083 only if not already defined.
6084
6085 2004-07-05 Jakub Jelinek <jakub@redhat.com>
6086
6087 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_unlock): Use
6088 constraint "m" instead of "0" for futex.
6089
6090 * shlib-versions: Add powerpc64-.*-linux.*.
6091
6092 2004-07-04 Jakub Jelinek <jakub@redhat.com>
6093
6094 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
6095 (pthread_rwlock_timedrdlock): Use cmpq instead of cmpl to check
6096 for valid tv_nsec.
6097 * tst-rwlock14.c (do_test): Test for invalid tv_nsec equal to
6098 1 billion and 64-bit tv_nsec which is valid when truncated to 32
6099 bits.
6100
6101 2004-06-29 Roland McGrath <roland@redhat.com>
6102
6103 * Banner: NPTL no longer has its own version number.
6104 * Makefile (nptl-version): Variable removed.
6105 * sysdeps/pthread/Makefile (CFLAGS-confstr.c): Set LIBPTHREAD_VERSION
6106 using $(version), the glibc version number.
6107
6108 2004-06-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6109
6110 * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
6111 Fix branch offset for a PLT entry.
6112 * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
6113 Likewise.
6114 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
6115 Likewise.
6116 * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
6117 Likewise.
6118 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait):
6119 Likewise.
6120
6121 2004-06-28 Jakub Jelinek <jakub@redhat.com>
6122
6123 * sysdeps/alpha/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define
6124 unconditionally.
6125
6126 2004-06-28 Jakub Jelinek <jakub@redhat.com>
6127
6128 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
6129 (pthread_rwlock_timedwrlock): Return EINVAL if tv_nsec is negative,
6130 instead of tv_sec.
6131 * sysdeps/pthread/pthread_rwlock_timedrdlock.c
6132 (pthread_rwlock_timedrdlock): Likewise.
6133
6134 2004-06-22 Jakub Jelinek <jakub@redhat.com>
6135
6136 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
6137 Set __r7 to val, not mutex.
6138
6139 2004-06-27 Ulrich Drepper <drepper@redhat.com>
6140
6141 * Makefile: Add rules to build tst-rwlock14.
6142 * tst-rwlock14.c: New file.
6143
6144 2004-06-24 Boris Hu <boris.hu@intel.com>
6145
6146 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Add timeout validation
6147 check.
6148 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
6149
6150 2004-06-19 Andreas Jaeger <aj@suse.de>
6151
6152 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix
6153 assembler in last patch.
6154
6155 2004-06-17 Ulrich Drepper <drepper@redhat.com>
6156
6157 * sysdeps/pthread/pthread_cond_timedwait.c
6158 (__pthread_cond_timedwait): Also check for negativ nanoseconds.
6159 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6160 (__pthread_cond_timedwait): Check for invalid nanosecond in
6161 timeout value.
6162 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6163 * tst-cond19.c: New file.
6164 * Makefile: Add rules to build and run tst-cond19.
6165
6166 2004-06-15 Steven Munroe <sjmunroe@us.ibm.com>
6167
6168 * tst-context1.c (GUARD_PATTERN): Defined.
6169 (tst_context_t): Define struct containing ucontext_t & guard words.
6170 (ctx): Declare as an array of tst_context_t.
6171 (fct): Verify uc_link & guard words are still valid.
6172 (tf): Initialize guard words in ctx. Adjust ctx refs for new struct.
6173
6174 2004-06-13 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6175
6176 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
6177 Add __data.__futex field, reshuffle __data.__clock.
6178 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
6179 (__pthread_cond_signal): Increment __futex at the same time as
6180 __wakeup_seq or __total_seq. Pass address of __futex instead of
6181 address of low 32-bits of __wakeup_seq to futex syscall.
6182 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
6183 (__pthread_cond_wait): Likewise. Pass __futex value from before
6184 releasing internal lock to FUTEX_WAIT.
6185 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
6186 (__pthread_cond_timedwait): Likewise.
6187 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
6188 (FUTEX_CMP_REQUEUE): Define.
6189 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
6190 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
6191 Pass __futex value from before the unlock and __futex address instead
6192 of address of low 32-bits of __wakeup_seq to futex syscall.
6193 Fallback to FUTEX_WAKE all on any errors.
6194
6195 2004-06-08 Jakub Jelinek <jakub@redhat.com>
6196
6197 * pthread_mutexattr_getpshared.c (pthread_mutex_getpshared): Fix
6198 comment typo.
6199 * pthread_mutexattr_gettype.c (pthread_mutexattr_gettype): Likewise.
6200 * pthread_mutexattr_init.c (__pthread_mutexattr_init): Likewise.
6201 * pthread_mutexattr_settype.c (__pthread_mutexattr_settype): Likewise.
6202 * pthread_mutexattr_setpshared.c (pthread_mutexattr_setpshared):
6203 Likewise. Reported by Bob Cook <bobcook47@hotmail.com>.
6204
6205 2004-06-11 Martin Schwidefsky <schwidefsky@de.ibm.com>
6206
6207 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_compare_and_swap):
6208 Add memory clobber to inline assembly.
6209 (__lll_mutex_trylock): Likewise.
6210 (__lll_mutex_cond_trylock): Likewise.
6211
6212 2004-06-07 Martin Schwidefsky <schwidefsky@de.ibm.com>
6213
6214 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
6215 Pass val argument as 6th system call argument in %r7.
6216
6217 2004-05-21 Jakub Jelinek <jakub@redhat.com>
6218
6219 * Makefile (tests): Add tst-cond16.
6220 * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_futex): Add.
6221 * pthread_cond_init.c (__pthread_cond_init): Clear __data.__futex.
6222 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
6223 Add __data.__futex field, reshuffle __data.__clock.
6224 * sysdeps/unix/sysv/linux/i386/pthread_cond_signal.S
6225 (__pthread_cond_signal): Increment __futex at the same time as
6226 __wakeup_seq or __total_seq. Pass address of __futex instead of
6227 address of low 32-bits of __wakeup_seq to futex syscall.
6228 * sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S
6229 (__pthread_cond_wait): Likewise. Pass __futex value from before
6230 releasing internal lock to FUTEX_WAIT.
6231 * sysdeps/unix/sysv/linux/i386/pthread_cond_timedwait.S
6232 (__pthread_cond_timedwait): Likewise.
6233 * sysdeps/unix/sysv/linux/i386/pthread_cond_broadcast.S
6234 (FUTEX_CMP_REQUEUE): Define.
6235 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
6236 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
6237 Pass __futex value from before the unlock and __futex address instead
6238 of address of low 32-bits of __wakeup_seq to futex syscall.
6239 Fallback to FUTEX_WAKE all on any errors.
6240 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_CMP_REQUEUE):
6241 Define.
6242 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
6243 internally. Return non-zero if error, zero if success.
6244 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
6245 Add __data.__futex field, reshuffle __data.__clock.
6246 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_CMP_REQUEUE):
6247 Define.
6248 (lll_futex_requeue): Add val argument, return 1 unconditionally
6249 for the time being.
6250 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
6251 Add __data.__futex field, reshuffle __data.__clock.
6252 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_CMP_REQUEUE):
6253 Define.
6254 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
6255 internally. Return non-zero if error, zero if success.
6256 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
6257 (pthread_cond_t): Add __data.__futex field, reshuffle __data.__clock.
6258 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_CMP_REQUEUE):
6259 Define.
6260 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
6261 internally. Return non-zero if error, zero if success.
6262 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
6263 Add __data.__futex field, reshuffle __data.__clock.
6264 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_CMP_REQUEUE):
6265 Define.
6266 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
6267 internally. Return non-zero if error, zero if success.
6268 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
6269 Add __data.__futex field, reshuffle __data.__clock.
6270 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
6271 Add __data.__futex field, reshuffle __data.__clock.
6272 * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal):
6273 Increment __futex at the same time as __wakeup_seq or __total_seq.
6274 Pass address of __futex instead of address of low 32-bits of
6275 __wakeup_seq to futex syscall.
6276 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
6277 Pass __futex value from before releasing internal lock
6278 to FUTEX_WAIT.
6279 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
6280 Likewise. Avoid unnecessary shadowing of variables.
6281 * sysdeps/pthread/pthread_cond_broadcast.c (__pthread_cond_broadcast):
6282 Set __futex to 2 * __total_seq. Pass __futex value from before the
6283 unlock and __futex address instead of address of low 32-bits of
6284 __wakeup_seq to futex_requeue macro, adjust for new return value
6285 meaning.
6286 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
6287 (__pthread_cond_signal): Increment __futex at the same time as
6288 __wakeup_seq or __total_seq. Pass address of __futex instead of
6289 address of low 32-bits of __wakeup_seq to futex syscall.
6290 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
6291 (__pthread_cond_wait): Likewise. Pass __futex value from before
6292 releasing internal lock to FUTEX_WAIT.
6293 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
6294 (__pthread_cond_timedwait): Likewise.
6295 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
6296 (FUTEX_CMP_REQUEUE): Define.
6297 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
6298 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
6299 Pass __futex value from before the unlock and __futex address instead
6300 of address of low 32-bits of __wakeup_seq to futex syscall.
6301 Fallback to FUTEX_WAKE all on any errors.
6302
6303 2004-06-03 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6304
6305 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_mutex_lock):
6306 Add nop to align the end of critical section.
6307 (lll_mutex_cond_lock, lll_mutex_timedlock): Likewise.
6308
6309 2004-06-01 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6310
6311 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
6312 Add __broadcast_seq field.
6313 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Mark
6314 all waiters as woken with woken_seq and bump broadcast counter.
6315 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use new
6316 __broadcast_seq. Increment __woken_seq correctly when cleanuped.
6317 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
6318 Comment typo fixes. Avoid returning -ETIMEDOUT.
6319
6320 2004-06-01 Ulrich Drepper <drepper@redhat.com>
6321
6322 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6323 (__condvar_tw_cleanup): Fix access to saved broadcast_seq value.
6324 Reported by Kaz Kojima.
6325
6326 2004-05-25 Jakub Jelinek <jakub@redhat.com>
6327
6328 * sysdeps/unix/sysv/linux/aio_misc.h: New file.
6329
6330 2004-05-21 Jakub Jelinek <jakub@redhat.com>
6331
6332 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Compare
6333 __broadcast_seq with bc_seq after acquiring internal lock instead of
6334 before it.
6335
6336 2004-05-18 Jakub Jelinek <jakub@redhat.com>
6337
6338 * Makefile (.NOTPARALLEL): Only serialize make check/xcheck, not
6339 compilation.
6340 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6341 (__pthread_cond_timedwait): Avoid returning -ETIMEDOUT.
6342 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
6343 (pthread_cond_t): Add __data.__broadcast_seq field.
6344 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
6345 (FRAME_SIZE): Define.
6346 (__pthread_cond_timedwait): Use it. Store/check broadcast_seq.
6347 Comment typo fixes.
6348 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S (FRAME_SIZE):
6349 Define.
6350 (__pthread_cond_wait): Use it. Store/check broadcast_seq. Comment
6351 typo fixes.
6352 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
6353 (__pthread_cond_broadcast): Increment broadcast_seq. Comment typo
6354 fixes.
6355
6356 2004-05-18 Ulrich Drepper <drepper@redhat.com>
6357
6358 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add broadcast_seq entry.
6359 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
6360 Add __broadcast_seq field.
6361 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6362 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6363 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
6364 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
6365 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6366 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Mark
6367 all waiters as woken with woken_seq and bump broadcast counter.
6368 * sysdeps/pthread/pthread_cond_broadcast.c: Likewise.
6369 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use new
6370 __broadcast_seq field.
6371 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6372 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
6373 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
6374 * pthread_cond_init.c: Initialize __broadcast_seq field.
6375 * Makefile (tests): Add tst-cond17 and tst-cond18.
6376 Add .NOTPARALLEL goal.
6377 * tst-cond16.c: New file. From Jakub.
6378 * tst-cond17.c: New file. From Jakub.
6379 * tst-cond18.c: New file. From Jakub.
6380
6381 2004-05-16 Ulrich Drepper <drepper@redhat.com>
6382
6383 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Correct some
6384 unwind info.
6385
6386 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
6387 Parametrize frame size. Correct some unwind info.
6388 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6389
6390 2004-05-04 Jakub Jelinek <jakub@redhat.com>
6391
6392 * tst-stack3.c: Note testing functionality beyond POSIX.
6393
6394 2004-05-04 Jakub Jelinek <jakub@redhat.com>
6395
6396 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (USE___THREAD):
6397 Change conditional from ifdef to if.
6398
6399 2004-04-23 Jakub Jelinek <jakub@redhat.com>
6400
6401 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SYSDEP_CANCEL_ERRNO,
6402 SYSDEP_CANCEL_ERROR): Define.
6403 (PSEUDO): Use it.
6404
6405 2004-05-01 Jakub Jelinek <jakub@redhat.com>
6406
6407 * Versions (libpthread): Remove __pthread_cleanup_upto@@GLIBC_PRIVATE.
6408
6409 2004-04-20 Jakub Jelinek <jakub@redhat.com>
6410
6411 * sem_unlink.c (sem_unlink): Change EPERM into EACCES.
6412
6413 2004-04-19 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6414
6415 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Add frame info.
6416 Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
6417 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Remove unneeded frame
6418 info. Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
6419
6420 2004-04-19 Ulrich Drepper <drepper@redhat.com>
6421
6422 * sysdeps/unix/sysv/linux/timer_routines.c: Make sure helper
6423 thread has all signals blocked.
6424
6425 2004-04-18 Andreas Jaeger <aj@suse.de>
6426
6427 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h
6428 (SEM_VALUE_MAX): Add missing brace.
6429
6430 2004-04-17 Jakub Jelinek <jakub@redhat.com>
6431
6432 * sysdeps/pthread/Makefile (tests): Add tst-mqueue8x
6433 in rt subdir.
6434 (CFLAGS-tst-mqueue8x.c): Add -fexceptions.
6435 * sysdeps/pthread/tst-mqueue8x.c: New test.
6436 * tst-cancel4.c: Update comment about message queues.
6437
6438 * sysdeps/pthread/timer_gettime.c (timer_gettime): For expired timer
6439 return it_value { 0, 0 }.
6440 * sysdeps/pthread/timer_create.c (timer_create): Handle SIGEV_NONE
6441 like SIGEV_SIGNAL.
6442 * sysdeps/pthread/timer_routines.c (thread_expire_timer): Remove
6443 assertion for SIGEV_NONE.
6444 (thread_attr_compare): Compare all attributes, not just a partial
6445 subset.
6446
6447 2004-04-17 Jakub Jelinek <jakub@redhat.com>
6448
6449 * sysdeps/unix/sysv/linux/mq_notify.c: Include stdlib.h.
6450
6451 2004-04-17 Ulrich Drepper <drepper@redhat.com>
6452
6453 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h (SEM_VALUE_MAX):
6454 Just use a plain number.
6455 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
6456 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
6457 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
6458 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
6459 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
6460 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
6461 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
6462
6463 2004-04-16 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6464
6465 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Remove unneeded
6466 frame info.
6467 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
6468
6469 2004-04-15 Jakub Jelinek <jakub@redhat.com>
6470
6471 * sysdeps/unix/sysv/linux/timer_routines.c: Include errno.h.
6472 (timer_helper_thread): Use inline rt_sigtimedwait syscall instead
6473 of calling sigwaitinfo.
6474
6475 2004-04-16 Ulrich Drepper <drepper@redhat.com>
6476
6477 * allocatestack.c (allocate_stack): Set reported_guardsize
6478 unconditionally.
6479 * pthread_getattr_np.c (pthread_getattr_np): Use
6480 reported_guardsize instead of guardsize.
6481 * descr.h (struct pthread): Add reported_guardsize field.
6482
6483 2004-04-13 Jakub Jelinek <jakub@redhat.com>
6484
6485 * sysdeps/unix/sysv/linux/mq_notify.c: Shut up GCC warning.
6486
6487 2004-04-12 Ulrich Drepper <drepper@redhat.com>
6488
6489 * sysdeps/unix/sysv/linux/mq-notify.c: New file.
6490
6491 2004-04-08 Jakub Jelinek <jakub@redhat.com>
6492
6493 * sysdeps/unix/sysv/linux/bits/local_lim.h (MQ_PRIO_MAX): Define.
6494 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h (MQ_PRIO_MAX): Define.
6495 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h (MQ_PRIO_MAX): Define.
6496 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h (MQ_PRIO_MAX): Define.
6497 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
6498 Define.
6499 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
6500 (_POSIX_MESSAGE_PASSING): Define.
6501 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h
6502 (_POSIX_MESSAGE_PASSING): Define.
6503 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h
6504 (_POSIX_MESSAGE_PASSING): Define.
6505
6506 2004-04-04 Ulrich Drepper <drepper@redhat.com>
6507
6508 * tst-context1.c (fct): Check whether correct stack is used.
6509
6510 2004-04-03 Ulrich Drepper <drepper@redhat.com>
6511
6512 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Never use
6513 matching constraints for asm mem parameters.
6514
6515 * tst-clock2.c (tf): Don't define unless needed.
6516
6517 2004-03-30 H.J. Lu <hongjiu.lu@intel.com>
6518
6519 * Makefile (link-libc-static): Use $(static-gnulib) instead of
6520 $(gnulib).
6521
6522 2004-03-30 Ulrich Drepper <drepper@redhat.com>
6523
6524 * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_deallocate_tsd.
6525 * init.c (pthread_functions): Add ptr__nptl_deallocate_tsd.
6526 * pthreadP.h: Declare __nptl_deallocate_tsd.
6527 * pthread_create.c (deallocate_tsd): Remove to __nptl_deallocate_tsd.
6528 Adjust caller.
6529
6530 * Makefile (tests): Add tst-tsd5.
6531 * tst-tsd5.c: New file.
6532
6533 2004-03-29 Ulrich Drepper <drepper@redhat.com>
6534
6535 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
6536 (__pthread_attr_setaffinity_old): Prepend GLIBC_ to version names
6537 is SHLIB_COMPAT check.
6538 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
6539 (__pthread_attr_getaffinity_old): Likewise.
6540 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
6541 (__pthread_getaffinity_old): Likewise.
6542 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
6543 (__pthread_setaffinity_old): Likewise.
6544
6545 2004-03-26 Ulrich Drepper <drepper@redhat.com>
6546
6547 * allocatestack.c (_make_stacks_executable): Call
6548 _dl_make_stack_executable first.
6549
6550 2004-03-24 Roland McGrath <roland@redhat.com>
6551
6552 * sysdeps/i386/pthread_spin_lock.c (pthread_spin_lock): Use "m"
6553 constraint instead of "0".
6554
6555 2004-03-24 Ulrich Drepper <drepper@redhat.com>
6556
6557 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
6558 (lll_mutex_cond_trylock): Define as wrapper around __lll_cond_trylock.
6559
6560 * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Reorganize
6561 code to avoid warning.
6562
6563 2004-03-24 Andreas Jaeger <aj@suse.de>
6564
6565 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
6566 (__pthread_attr_setaffinity_old): Remove const.
6567
6568 2004-03-23 Ulrich Drepper <drepper@redhat.com>
6569
6570 * sysdeps/unix/sysv/linux/smp.h: New file.
6571 * sysdeps/unix/sysv/linux/sh/smp.h: New file.
6572 * init.c: Define __is_smp.
6573 (__pthread_initialize_minimal_internal): Call is_smp_system to
6574 initialize __is_smp.
6575 * pthreadP.h: Declare __is_smp.
6576 Define MAX_ADAPTIVE_COUNT is necessary.
6577 * pthread_mutex_init.c: Add comment regarding __spins field.
6578 * pthread_mutex_lock.c: Implement adaptive mutex type.
6579 * pthread_mutex_timedlock.c: Likewise.
6580 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
6581 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
6582 Add __spins field.
6583 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
6584 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6585 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6586 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6587 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6588 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
6589 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6590 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define
6591 lll_mutex_cond_trylock.
6592 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6593 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6594 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6595 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
6596 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
6597 Define BUSY_WAIT_NOP.
6598 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6599 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6600
6601 * tst-mutex5.c: Add support for testing adaptive mutexes.
6602 * tst-mutex7.c: Likewise.
6603 * tst-mutex5a.c: New file.
6604 * tst-mutex7a.c: New file.
6605 * Makefile (tests): Add tst-mutex5a and tst-mutex7a.
6606
6607 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
6608 (__lll_mutex_timedlock_wait): Preserve r8 and r9 since the
6609 vgettimeofday call might destroy the content.
6610
6611 * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use hint
6612 @pause in the loop.
6613
6614 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
6615 No need to restrict type of ret. Make it int. Add comment.
6616
6617 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
6618 Remove unnecessary setne instruction.
6619
6620 2004-03-22 Jakub Jelinek <jakub@redhat.com>
6621
6622 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
6623 (__pthread_getaffinity_new): Use INT_MAX instead of UINT_MAX.
6624 * pthread_getattr_np.c (pthread_getattr_np): Double size every cycle.
6625 If realloc fails, break out of the loop.
6626
6627 2004-03-20 Andreas Jaeger <aj@suse.de>
6628
6629 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
6630 (__pthread_setaffinity_old): Fix interface.
6631 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
6632 (__pthread_getaffinity_old): Likewise.
6633
6634 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
6635 (__pthread_setaffinity_new): Remove duplicate declaration.
6636
6637 2004-03-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6638
6639 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Save
6640 the return value to a safe register.
6641 (CDISABLE): Set the function argument correctly.
6642
6643 2004-03-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6644
6645 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XCHG): Define.
6646 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
6647 Rewrite so that only one locked memory operation per round is needed.
6648 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
6649 (pthread_barrier_wait): After wakeup, release lock only when the
6650 last thread stopped using the barrier object.
6651 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
6652 (__pthread_cond_wait): Don't store mutex address if the current
6653 value is ~0l. Add correct cleanup support and unwind info.
6654 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
6655 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
6656 (__pthread_cond_broadcast): Don't use requeue for pshared condvars.
6657 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Update comment.
6658 * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
6659 Add correct cleanup support and unwind info.
6660 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
6661 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Add unwind
6662 information for syscall wrappers.
6663
6664 2004-03-18 Ulrich Drepper <drepper@redhat.com>
6665
6666 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
6667 cpusetsize field, remove next.
6668 * sysdeps/pthread/pthread.h (pthread_getaffinity_np): Add new second
6669 parameter for size of the CPU set.
6670 (pthread_setaffinity_np): Likewise.
6671 (pthread_attr_getaffinity_np): Likewise.
6672 (pthread_attr_setaffinity_np): Likewise.
6673 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: Implement
6674 interface change, keep compatibility code.
6675 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
6676 * sysdeps/unix/sysv/linux/pthread_getaffinity.c: Likewise.
6677 * sysdeps/unix/sysv/linux/pthread_setaffinity.c: Likewise.
6678 * pthreadP.h: Remove hidden_proto for pthread_getaffinity_np. Declare
6679 __pthread_getaffinity_np.
6680 * Versions: Add version for changed interfaces.
6681 * tst-attr3.c: Adjust test for interface change.
6682 * pthread_getattr_np.c: Query the kernel about the affinity mask with
6683 increasing buffer sizes.
6684 * pthread_attr_destroy.c: Remove unused list handling.
6685 * pthread_attr_init.c: Likewise.
6686
6687 2004-03-17 Roland McGrath <roland@redhat.com>
6688
6689 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Pass missing
6690 first argument to clock_getres so we ever enable kernel timers.
6691
6692 2004-03-15 Ulrich Weigand <uweigand@de.ibm.com>
6693
6694 * init.c (nptl_version): Add __attribute_used__ to nptl_version.
6695
6696 2004-03-12 Richard Henderson <rth@redhat.com>
6697
6698 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Propagate
6699 oldvalue from CENABLE to CDISABLE.
6700
6701 2004-03-12 Ulrich Drepper <drepper@redhat.com>
6702
6703 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define HOST_NAME_MAX.
6704 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
6705 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
6706 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
6707
6708 2004-03-11 Richard Henderson <rth@redhat.com>
6709
6710 * sysdeps/alpha/tcb-offsets.sym (PID_OFFSET): New.
6711 * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: Save/restore PID.
6712 * sysdeps/unix/sysv/linux/alpha/vfork.S: New file.
6713
6714 2004-03-11 Jakub Jelinek <jakub@redhat.com>
6715
6716 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Use jgnl
6717 instead of jnl instruction to jump to SYSCALL_ERROR_LABEL.
6718 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S (__vfork): Likewise.
6719
6720 2004-03-11 Jakub Jelinek <jakub@redhat.com>
6721
6722 * forward.c (__pthread_cond_broadcast_2_0,
6723 __pthread_cond_destroy_2_0, __pthread_cond_init_2_0,
6724 __pthread_cond_signal_2_0, __pthread_cond_wait_2_0,
6725 __pthread_cond_timedwait_2_0): Use return 0 as defaction instead of 0.
6726
6727 2004-03-11 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6728
6729 * sysdeps/sh/tcb-offsets.sym: Add PID.
6730 * sysdeps/unix/sysv/linux/sh/pt-vfork.S: Properly handle PID cache.
6731 * sysdeps/unix/sysv/linux/sh/vfork.S: New file.
6732
6733 2004-03-10 Ulrich Drepper <drepper@redhat.com>
6734
6735 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: No need to
6736 include <sysdep-cancel.h>, vfork is no cancellation point.
6737 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: Likewise.
6738 * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: Likewise.
6739 * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: Likewise.
6740
6741 2004-03-10 Jakub Jelinek <jakub@redhat.com>
6742
6743 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Add
6744 libc_hidden_def.
6745 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
6746 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
6747 Likewise.
6748 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S (__vfork):
6749 Likewise.
6750 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
6751 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
6752 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Include tcb-offsets.h.
6753 * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Use DO_CALL instead
6754 of DO_CALL_VIA_BREAK. Work around a gas problem.
6755
6756 * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: Remove.
6757 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: New file.
6758 * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: New file.
6759 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: New file.
6760 * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: New file.
6761 * sysdeps/powerpc/tcb-offsets.sym: Add PID.
6762
6763 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S (__vfork): Don't use
6764 a local register for saving old PID. Negate PID in parent upon exit.
6765
6766 * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: Include
6767 tcb-offsets.h.
6768 (__vfork): Negate PID if non-zero and set to INT_MIN if zero
6769 before syscall, set to the old value in the parent afterwards.
6770 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: New file.
6771 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: Include
6772 tcb-offsets.h.
6773 (__vfork): Negate PID if non-zero and set to INT_MIN if zero
6774 before syscall, set to the old value in the parent afterwards.
6775 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: New file.
6776 * sysdeps/s390/tcb-offsets.sym: Add PID.
6777
6778 * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: Remove.
6779 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: New file.
6780 * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S: New file.
6781 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: New file.
6782 * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: New file.
6783 * sysdeps/sparc/tcb-offsets.sym: Add PID.
6784
6785 2004-03-10 Andreas Schwab <schwab@suse.de>
6786
6787 * sysdeps/ia64/tcb-offsets.sym: Add PID.
6788 * sysdeps/unix/sysv/linux/ia64/vfork.S: New file.
6789 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Properly handle PID cache.
6790
6791 2004-03-09 Jakub Jelinek <jakub@redhat.com>
6792
6793 * tst-cancel20.c (do_one_test): Clear in_sh_body first.
6794 * tst-cancel21.c (do_one_test): Likewise.
6795 Reported by Gordon Jin <gordon.jin@intel.com>.
6796
6797 2004-02-09 Jakub Jelinek <jakub@redhat.com>
6798
6799 * sysdeps/unix/sysv/linux/i386/vfork.S (SAVE_PID): Negate PID
6800 if non-zero and set to INT_MIN if zero.
6801 * sysdeps/unix/sysv/linux/x86_64/vfork.S (SAVE_PID): Likewise.
6802 * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Include tcb-offsets.h.
6803 (SAVE_PID, RESTORE_PID): Define.
6804 (__vfork): Use it.
6805 * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: Include tcb-offsets.h.
6806 Use relative path to avoid including NPTL i386/vfork.S.
6807 (SAVE_PID, RESTORE_PID): Define.
6808 * sysdeps/unix/sysv/linux/raise.c: Include limits.h.
6809 (raise): Handle THREAD_SELF->pid INT_MIN the same as 0.
6810 * Makefile (tests): Add tst-vfork1, tst-vfork2, tst-vfork1x and
6811 tst-vfork2x.
6812 (tests-reverse): Add tst-vfork1x and tst-vfork2x.
6813 * tst-vfork1.c: New test.
6814 * tst-vfork2.c: New test.
6815 * tst-vfork1x.c: New test.
6816 * tst-vfork2x.c: New test.
6817
6818 2004-03-08 Ulrich Drepper <drepper@redhat.com>
6819
6820 * sysdeps/i386/tcb-offsets.sym: Add PID.
6821 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
6822 * sysdeps/unix/sysv/linux/i386/vfork.S: New file.
6823 * sysdeps/unix/sysv/linux/x86_64/vfork.S: New file.
6824
6825 2004-03-08 Steven Munroe <sjmunroe@us.ibm.com>
6826
6827 * sysdeps/unix/sysv/linux/powerpc/Versions: Remove leading tabs.
6828
6829 2004-03-08 H.J. Lu <hongjiu.lu@intel.com>
6830
6831 * sysdeps/s390/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
6832 _rtld_global_ro.
6833
6834 2004-03-07 Ulrich Drepper <drepper@redhat.com>
6835
6836 * sysdeps/ia64/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
6837 _rtld_global_ro.
6838
6839 * tst-once4.c: Remove unnecessary macro definition.
6840
6841 * tst-mutex7.c (do_test): Limit thread stack size.
6842 * tst-once2.c (do_test): Likewise.
6843 * tst-tls3.c (do_test): Likewise.
6844 * tst-tls1.c (do_test): Likewise.
6845 * tst-signal3.c (do_test): Likewise.
6846 * tst-kill6.c (do_test): Likewise.
6847 * tst-key4.c (do_test): Likewise.
6848 * tst-join4.c (do_test): Likewise.
6849 * tst-fork1.c (do_test): Likewise.
6850 * tst-context1.c (do_test): Likewise.
6851 * tst-cond2.c (do_test): Likewise.
6852 * tst-cond10.c (do_test): Likewise.
6853 * tst-clock2.c (do_test): Likewise.
6854 * tst-cancel10.c (do_test): Likewise.
6855 * tst-basic2.c (do_test): Likewise.
6856 * tst-barrier4.c (do_test): Likewise.
6857
6858 2004-03-05 Ulrich Drepper <drepper@redhat.com>
6859
6860 * sysdeps/i386/tls.h: Use GLRO instead of GL where appropriate.
6861
6862 2004-03-01 Ulrich Drepper <drepper@redhat.com>
6863
6864 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6865 (__pthread_cond_timedwait): Optimize wakeup test.
6866 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
6867 (__pthread_cond_wait): Likewise.
6868 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
6869 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
6870 Likewise.
6871
6872 2004-02-29 Ulrich Drepper <drepper@redhat.com>
6873
6874 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
6875 (__lll_mutex_lock_wait): Optimize a bit more. Just one copy of
6876 the atomic instruction needed.
6877 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
6878 (__lll_mutex_lock_wait): Likewise.
6879
6880 2004-02-28 Ulrich Drepper <drepper@redhat.com>
6881
6882 * Makefile (tests): Add tst-cond14 and tst-cond15.
6883 * tst-cond14.c: New file.
6884 * tst-cond15.c: New file.
6885
6886 2004-02-27 Ulrich Drepper <drepper@redhat.com>
6887
6888 * sysdeps/pthread/createthread.c (create_thread): Remove use of
6889 CLONE_STOPPED. We cannot use SIGCONT which means CLONE_STOPPED
6890 needs to be implemented differently to be useful.
6891
6892 2004-02-26 Ulrich Drepper <drepper@redhat.com>
6893
6894 * pthread_attr_setschedparam.c: Don't test priority against limits
6895 here. Set ATTR_FLAG_SCHED_SET flag.
6896 * pthread_attr_setschedpolicy.c: Set ATTR_FLAG_POLICY_SET flag.
6897 * pthread_create.c (__pthread_create_2_1): Copy scheduling attributes
6898 from parent thread to child. If attribute is used and scheduling
6899 parameters are not inherited, copy parameters from attribute or
6900 compute them. Check priority value.
6901 * pthread_getschedparam.c: If the parameters aren't known yet get
6902 them from the kernel.
6903 * pthread_setschedparam.c: Set ATTR_FLAG_SCHED_SET and
6904 ATTR_FLAG_POLICY_SET flag for thread.
6905 * sysdeps/unix/sysv/linux/internaltypes.h: Define ATTR_FLAG_SCHED_SET
6906 and ATTR_FLAG_POLICY_SET.
6907
6908 * sysdeps/pthread/createthread.c: Use tgkill if possible.
6909
6910 * pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr): Don't
6911 fail if stack address hasn't been set. Just return 0.
6912
6913 2004-02-25 Ulrich Drepper <drepper@redhat.com>
6914
6915 * Makefile (tests-nolibpthread): Add tst-unload. Don't link with
6916 libpthread for the files in this list.
6917 (CFLAGS-tst-unload): Removed.
6918 * tst-unload.c (do_test): Don't use complete path for
6919 LIBPHREAD_SO.
6920
6921 * Makefile: Define sonames for tst-tls5mod, tst-_res1mod1, and
6922 tst-_res1mod2.
6923
6924 2004-02-22 Ulrich Drepper <drepper@redhat.com>
6925
6926 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
6927 (__lll_mutex_lock_wait): Rewrite so that only one locked memory
6928 operation per round is needed.
6929 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
6930 (__lll_mutex_lock_wait): Likewise.
6931
6932 2004-02-20 Ulrich Drepper <drepper@redhat.com>
6933
6934 * tst-cancel9.c (cleanup): Don't print to stderr.
6935
6936 2004-02-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6937
6938 * sysdeps/sh/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Fix variable name.
6939
6940 2004-02-20 Jakub Jelinek <jakub@redhat.com>
6941
6942 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
6943 (__syscall_error_handler2): Call CDISABLE.
6944 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
6945 (__syscall_error_handler2): Call CDISABLE.
6946
6947 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
6948 Release lock before the loop, don't reacquire it.
6949
6950 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h (DL_ARGV_NOT_RELRO): Define.
6951
6952 2004-02-19 Andreas Schwab <schwab@suse.de>
6953
6954 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
6955 Fix last change.
6956
6957 2004-02-18 Ulrich Drepper <drepper@redhat.com>
6958
6959 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
6960 (pthread_barrier_wait): After wakeup, release lock only when the
6961 last thread stopped using the barrier object.
6962 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S
6963 (pthread_barrier_wait): Likewise.
6964 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
6965 Likewise.
6966 * Makefile (tests): Add tst-barrier4.
6967 * tst-barrier4.c: New file.
6968
6969 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6970 (__pthread_cond_timedwait): Perform timeout test while holding
6971 internal lock to prevent wakeup race.
6972 Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
6973 * sysdeps/pthread/pthread_cond_timedwait.c
6974 (__pthread_cond_timedwait): Likewise.
6975 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
6976 (__pthread_cond_timedwait): Likewise.
6977
6978 2004-02-18 Jakub Jelinek <jakub@redhat.com>
6979
6980 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S
6981 (__pthread_rwlock_unlock): Access WRITER as 32-bit value.
6982 * Makefile (tests): Add tst-rwlock13.
6983 * tst-rwlock13.c: New test.
6984
6985 2004-02-16 Ulrich Drepper <drepper@redhat.com>
6986
6987 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6988 (__condvar_tw_cleanup): Little optimization.
6989 Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
6990
6991 2004-02-16 Steven Munroe <sjmunroe@us.ibm.com>
6992
6993 * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: Replace libc with
6994 libpthread as "lib" parameter to SHLIB_COMPAT.
6995 (__novmx_siglongjmp): Fix typo in function name.
6996 (__novmx_longjmp): Fix typo in function name.
6997
6998 2004-02-13 Ulrich Drepper <drepper@redhat.com>
6999
7000 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Add a
7001 __builtin_expect.
7002
7003 * sysdeps/generic/pt-longjmp.c: Moved to...
7004 * sysdeps/pthread/pt-longjmp.c: ...here. New file.
7005
7006 2004-01-29 Steven Munroe <sjmunroe@us.ibm.com>
7007
7008 * Makefile (libpthread-routines): Add pt-cleanup.
7009 * pt-longjmp.c: Removed.
7010 * pt-cleanup.c: Copied __pthread_cleanup_upto to here. New file.
7011 * sysdeps/generic/pt-longjmp.c: Copied longjmp to here. New file.
7012 * sysdeps/unix/sysv/linux/powerpc/Versions: New file.
7013 Version longjmp, siglongjmp for GLIBC_2.3.4.
7014 * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: New File.
7015
7016 2004-02-13 Ulrich Drepper <drepper@redhat.com>
7017
7018 * sysdeps/pthread/pthread_cond_timedwait.c
7019 (__pthread_cond_timedwait): Optimize. Drop internal lock earlier.
7020 Reuse code. Add __builtin_expects.
7021
7022 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7023 (__pthread_cond_timedwait): Get internal lock in case timeout has
7024 passed before the futex syscall.
7025 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7026
7027 2004-01-20 Ulrich Drepper <drepper@redhat.com>
7028
7029 * allocatestack.c: Pretty printing.
7030
7031 * sysdeps/pthread/createthread.c (create_thread): Don't add
7032 CLONE_DETACHED bit if it is not necessary.
7033
7034 2004-01-16 Ulrich Drepper <drepper@redhat.com>
7035
7036 * pthread_getattr_np.c: Include ldsodefs.h.
7037
7038 2004-01-16 Richard Henderson <rth@redhat.com>
7039
7040 * allocatestack.c: Don't declare __libc_stack_end.
7041 * init.c (__pthread_initialize_minimal_internal): Likewise.
7042 * pthread_getattr_np.c (pthread_getattr_np): Likewise.
7043
7044 2004-01-15 Richard Henderson <rth@redhat.com>
7045
7046 * sysdeps/alpha/tls.h (tcbhead_t): Add private.
7047 (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE,
7048 TLS_PRE_TCB_SIZE, TLS_TCB_ALIGN, INSTALL_DTV, INSTALL_NEW_DTV,
7049 GET_DTV, THREAD_DTV, THREAD_SELF, DB_THREAD_SELF): Match ia64.
7050 (TLS_TCB_OFFSET, THREAD_ID, NO_TLS_OFFSET): Remove.
7051 (THREAD_GETMEM, THREAD_GETMEM_NC): Simplify.
7052 (THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
7053 * sysdeps/unix/sysv/linux/alpha/createthread.c (TLS_VALUE): Match ia64.
7054
7055 2004-01-14 Ulrich Drepper <drepper@redhat.com>
7056
7057 * init.c (pthread_functions): Make array const.
7058
7059 2004-01-13 Ulrich Drepper <drepper@redhat.com>
7060
7061 * allocatestack.c (__make_stacks_executable): Change interface.
7062 Check parameters. Pass parameter on to libc counterpart.
7063 * pthreadP.h: Change declaration.
7064
7065 2004-01-13 Richard Henderson <rth@redhat.com>
7066
7067 * pthread_attr_setstack.c (__old_pthread_attr_setstack): Use
7068 prototype form.
7069 * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize):
7070 Likewise.
7071
7072 * sysdeps/alpha/Makefile: New file.
7073 * sysdeps/alpha/tcb-offsets.sym: New file.
7074 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
7075 Use MULTIPLE_THREADS_OFFSET to implement !libpthread !libc version.
7076
7077 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Rewrite based
7078 on powerpc version.
7079
7080 2004-01-08 Jakub Jelinek <jakub@redhat.com>
7081
7082 * Makefile (tests): Add tst-backtrace1.
7083 * tst-backtrace1.c: New test.
7084
7085 2003-12-11 Ulrich Weigand <uweigand@de.ibm.com>
7086
7087 * sysdeps/alpha/tls.h (DB_THREAD_SELF): Pass bit size of thread
7088 register as second parameter to the REGISTER macro.
7089 * sysdeps/ia64/tls.h (DB_THREAD_SELF): Likewise.
7090 * sysdeps/powerpc/tls.h (DB_THREAD_SELF): Likewise.
7091 * sysdeps/sh/tls.h (DB_THREAD_SELF): Likewise.
7092 * sysdeps/sparc/tls.h (DB_THREAD_SELF): Likewise.
7093 * sysdeps/s390/tls.h (DB_THREAD_SELF): Pass __WORDSIZE as bit size
7094 of thread register as second parameter to REGISTER macro in 64 case.
7095
7096 2004-01-03 Ulrich Drepper <drepper@redhat.com>
7097
7098 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Removed.
7099 (CFLAGS-getpid.o): Defined.
7100 (CFLAGS-getpid.os): Defined.
7101
7102 2003-12-31 Ulrich Drepper <drepper@redhat.com>
7103
7104 * pthread_getattr_np.c (pthread_getattr_np): Make sure stack info
7105 returned for main thread does not overlap with any other VMA.
7106 Patch by Jakub Jelinek.
7107
7108 2003-12-29 Jakub Jelinek <jakub@redhat.com>
7109
7110 * tst-raise1.c: Include stdio.h.
7111
7112 2003-12-23 Jakub Jelinek <jakub@redhat.com>
7113
7114 * sysdeps/unix/sysv/linux/raise.c (raise): Protect pid = selftid
7115 setting with __ASSUME_TGKILL || defined __NR_tgkill.
7116 If pid is 0, set it to selftid.
7117 * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Make inline.
7118 Don't set self->pid but self->tid. If self->pid == 0 and self->tid
7119 != 0, return self->tid without doing a syscall.
7120 * descr.h (struct pthread): Move pid field after tid.
7121
7122 * Makefile (tests): Add tst-raise1.
7123 * tst-raise1.c: New file.
7124
7125 2003-12-23 Roland McGrath <roland@redhat.com>
7126
7127 * tst-oddstacklimit.c: New file.
7128 * Makefile (tests): Add it.
7129 (tst-oddstacklimit-ENV): New variable.
7130
7131 * init.c (__pthread_initialize_minimal_internal): Round stack rlimit
7132 value up to page size for __default_stacksize.
7133
7134 2003-12-21 Ulrich Drepper <drepper@redhat.com>
7135
7136 * Makefile (tests): Add tst-eintr5.
7137 * tst-eintr5.c: New file.
7138
7139 * eintr.c (eintr_source): Prevent sending signal to self.
7140
7141 * tst-eintr2.c (tf1): Improve error message.
7142
7143 2003-12-20 Ulrich Drepper <drepper@redhat.com>
7144
7145 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Define.
7146 * sysdeps/unix/sysv/linux/getpid.c: New file.
7147 * pthread_cancel.c: Add comment explaining use of PID field.
7148 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
7149 * pthread_getattr_np.c: Use abs() when comparing PID and TID fields.
7150 * sysdeps/unix/sysv/linux/fork.c: Negate PID field of parent
7151 temporarily to signal the field must not be relied on and updated
7152 by getpid().
7153 * sysdeps/unix/sysv/linux/pt-raise.c: Handle case where PID is
7154 temporarily negative.
7155 * sysdeps/unix/sysv/linux/raise.c: Likewise.
7156
7157 2003-12-19 Ulrich Drepper <drepper@redhat.com>
7158
7159 * eintr.c (setup_eintr): Add new parameter. Pass to thread function.
7160 (eintr_source): If ARG != NULL, use pthread_kill.
7161 * tst-eintr1.c: Adjust for this change.
7162 * tst-eintr2.c: Likewise.
7163 * Makefile (tests): Add tst-eintr3 and tst-eintr4.
7164 * tst-eintr3.c: New file.
7165 * tst-eintr4.c: New file.
7166
7167 2003-12-19 Jakub Jelinek <jakub@redhat.com>
7168
7169 * libc-cancellation.c (__libc_enable_asynccancel): Don't cancel
7170 if CANCELSTATE_BITMASK is set.
7171 * sysdeps/pthread/librt-cancellation.c (__librt_enable_asynccancel):
7172 Likewise.
7173
7174 * Makefile (tests): Add tst-cancel22 and tst-cancel23.
7175 (tests-reverse): Add tst-cancel23.
7176 * tst-cancel22.c: New test.
7177 * tst-cancel23.c: New test.
7178
7179 2003-12-18 Ulrich Drepper <drepper@redhat.com>
7180
7181 * tst-eintr1.c: Better error messages.
7182
7183 * Makefile (tests): Add tst-eintr2.
7184 * tst-eintr2.c: New file.
7185
7186 2003-12-18 Jakub Jelinek <jakub@redhat.com>
7187
7188 * Makefile (tests): Add tst-cancel21 and tst-cancelx21.
7189 (CFLAGS-tst-cancelx21.c): Set.
7190 * tst-cancel21.c: New test.
7191 * tst-cancelx21.c: New test.
7192
7193 * unwind.c (FRAME_LEFT): Add adj argument. Subtract it from each
7194 comparison operand.
7195 (unwind_stop): Use _JMPBUF_CFA_UNWINDS_ADJ macro instead of
7196 _JMPBUF_CFA_UNWINDS. Adjust FRAME_LEFT invocations.
7197 * pt-longjmp.c: Include jmpbuf-unwind.h.
7198 (__pthread_cleanup_upto): Use _JMPBUF_UNWINDS_ADJ macro instead of
7199 _JMPBUF_UNWINDS. Adjust compared pointers.
7200 * init.c (__pthread_initialize_minimal_internal): Initialize
7201 pd->stackblock_size.
7202 * sysdeps/pthread/jmpbuf-unwind.h: Removed.
7203 * sysdeps/alpha/jmpbuf-unwind.h: New file.
7204 * sysdeps/i386/jmpbuf-unwind.h: New file.
7205 * sysdeps/powerpc/jmpbuf-unwind.h: New file.
7206 * sysdeps/s390/jmpbuf-unwind.h: New file.
7207 * sysdeps/sh/jmpbuf-unwind.h: New file.
7208 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: New file.
7209 * sysdeps/x86_64/jmpbuf-unwind.h: New file.
7210 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Include stdint.h.
7211 (_JMPBUF_CFA_UNWINDS): Remove.
7212 (_JMPBUF_CFA_UNWINDS_ADJ, _JMPBUF_UNWINDS_ADJ): Define.
7213
7214 2003-12-12 Jakub Jelinek <jakub@redhat.com>
7215
7216 * Makefile (tests): Add tst-cancel20 and tst-cancelx20.
7217 (CFLAGS-tst-cancelx20.c): Set.
7218 * tst-cancel20.c: New test.
7219 * tst-cancelx20.c: New test.
7220
7221 2003-12-17 Ulrich Drepper <drepper@redhat.com>
7222
7223 * init.c (__pthread_initialize_minimal_internal): Don't treat
7224 architectures with separate register stack special here when
7225 computing default stack size.
7226
7227 2003-12-17 Roland McGrath <roland@redhat.com>
7228
7229 * Makefile (tst-cancelx7-ARGS): New variable.
7230 Reportd by Greg Schafer <gschafer@zip.com.au>.
7231
7232 2003-12-17 Jakub Jelinek <jakub@redhat.com>
7233
7234 * Makefile (tests): Add tst-stack3. Depend on $(objpfx)tst-stack3-mem.
7235 (generated): Add tst-stack3.mtrace and tst-stack3-mem.
7236 (tst-stack3-ENV): Set.
7237 ($(objpfx)tst-stack3-mem): New.
7238 * tst-stack3.c: New test.
7239
7240 2003-12-10 David Mosberger <davidm@hpl.hp.com>
7241
7242 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init_EPILOG_BEGINS):
7243 Add unwind directives. Drop unused .regstk directive.
7244 (_fini_EPILOG_BEGINS): Add unwind directives.
7245
7246 2003-12-11 Ulrich Drepper <drepper@redhat.com>
7247
7248 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
7249 Assume parameter is a pointer.
7250 (lll_futex_wake): Likewise.
7251 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_wait):
7252 Likewise.
7253 (lll_futex_wake): Likewise.
7254 Reported by Boris Hu.
7255 * sysdeps/unix/sysv/linux/unregister-atfork.c
7256 (__unregister_atfork): Pass pointer to refcntr to lll_futex_wait.
7257
7258 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Simplify a bit.
7259
7260 2003-12-10 Ulrich Drepper <drepper@redhat.com>
7261
7262 * sysdeps/pthread/bits/libc-lock.h (__rtld_lock_initialize): Define.
7263 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Call
7264 __rtld_lock_initialize for ld.so lock.
7265 Patch in part by Adam Li <adam.li@intel.com>.
7266
7267 2003-12-02 David Mosberger <davidm@hpl.hp.com>
7268
7269 * Makefile (link-libc-static): Remove -lgcc_eh---it's already mentioned
7270 in $(gnulib). Also, remove stale comment.
7271
7272 2003-11-12 David Mosberger <davidm@hpl.hp.com>
7273
7274 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Take
7275 advantage of new syscall stub and optimize accordingly.
7276
7277 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__NR_futex): Rename
7278 from SYS_futex, to match expectations of
7279 sysdep.h:DO_INLINE_SYSCALL.
7280 (lll_futex_clobbers): Remove.
7281 (lll_futex_timed_wait): Rewrite in terms of DO_INLINE_SYSCALL.
7282 (lll_futex_wake): Likewise.
7283 (lll_futex_requeue): Likewise.
7284 (__lll_mutex_trylock): Rewrite to a macro, so we can include this
7285 file before DO_INLINE_SYSCALL is defined (proposed by Jakub
7286 Jelinek).
7287 (__lll_mutex_lock): Likewise.
7288 (__lll_mutex_cond_lock): Likewise.
7289 (__lll_mutex_timed_lock): Likewise.
7290 (__lll_mutex_unlock): Likewise.
7291 (__lll_mutex_unlock_force): Likewise.
7292
7293 * sysdeps/ia64/tls.h: Move declaration of __thread_self up so it
7294 comes before the include of <sysdep.h>.
7295 (THREAD_SELF_SYSINFO): New macro.
7296 (THREAD_SYSINFO): Likewise.
7297 (INIT_SYSINFO): New macro.
7298 (TLS_INIT_TP): Call INIT_SYSINFO.
7299
7300 * sysdeps/ia64/tcb-offsets.sym: Add SYSINFO_OFFSET.
7301
7302 * sysdeps/pthread/createthread.c (create_thread): Use
7303 THREAD_SELF_SYSINFO and THREAD_SYSINFO instead of open code.
7304 * allocatestack.c (allocate_stack): Use THREAD_SYSINFO and
7305 THREAD_SELF_SYSINFO instead of open code.
7306 * sysdeps/i386/tls.h (THREAD_SELF_SYSINFO): New macro.
7307 (THREAD_SYSINFO): Likewise.
7308
7309 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: New file.
7310
7311 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Work around gas problem.
7312
7313 2003-12-06 Ulrich Drepper <drepper@redhat.com>
7314
7315 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Use .init_array
7316 instead of .init. Patch by David Mosberger.
7317
7318 2003-11-30 Thorsten Kukuk <kukuk@suse.de>
7319
7320 * sysdeps/pthread/configure.in: Remove broken declaration in C
7321 cleanup handling check.
7322
7323 2003-11-30 Andreas Jaeger <aj@suse.de>
7324
7325 * Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time).
7326 * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
7327 Likewise.
7328
7329 2003-11-27 Jakub Jelinek <jakub@redhat.com>
7330
7331 * sysdeps/unix/sysv/linux/internaltypes.h (ATTR_FLAG_OLDATTR): Define.
7332 * pthread_attr_destroy.c: Include shlib-compat.h.
7333 (__pthread_attr_destroy): Return immediately if ATTR_FLAG_OLDATTR
7334 is set in iattr->flags.
7335 * pthread_attr_init.c (__pthread_attr_init_2_0): Set ATTR_FLAG_OLDATTR.
7336
7337 2003-11-21 Jakub Jelinek <jakub@redhat.com>
7338
7339 * Makefile (distribute): Add tst-cleanup4aux.c.
7340
7341 * tst-cond12.c (prepare): Add prototype. Move after test-skeleton.c
7342 include.
7343
7344 2003-11-21 Ulrich Drepper <drepper@redhat.com>
7345
7346 * tst-cond12.c (do_test): If USE_COND_SIGNAL is defined, use
7347 pthread_cond_signal.
7348
7349 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Don't
7350 store mutex address if the current value is ~0l.
7351 * sysdeps/pthread/pthread_cond_timedwait.c
7352 (__pthread_cond_timedwait): Likewise.
7353 * sysdeps/pthread/pthread_cond_broadcast.c
7354 (__pthread_cond_broadcast): Don't use requeue for pshared
7355 condvars.
7356
7357 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
7358 (__pthread_cond_wait): Don't store mutex address if the current
7359 value is ~0l.
7360 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
7361 (__pthread_cond_timedwait): Likewise.
7362 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
7363 (__pthread_cond_broadcast): Don't use requeue for pshared
7364 condvars.
7365
7366 * pthread_cond_init.c (__pthread_cond_init): Initialize __mutex
7367 element with ~0l for pshared condvars, with NULL otherwise.
7368
7369 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
7370 (__pthread_cond_wait): Don't store mutex address if the current
7371 value is ~0l.
7372 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7373 (__pthread_cond_timedwait): Likewise.
7374 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
7375 (__pthread_cond_broadcast): Don't use requeue for pshared
7376 condvars.
7377
7378 * Makefile: Add rules to build and run tst-cond12 and tst-cond13.
7379 * tst-cond12.c: New file.
7380 * tst-cond13.c: New file.
7381
7382 2003-11-17 Ulrich Drepper <drepper@redhat.com>
7383
7384 * sysdeps/pthread/configure.in: Make missing forced unwind support
7385 fatal.
7386
7387 2003-11-11 Ulrich Drepper <drepper@redhat.com>
7388
7389 * pthreadP.h: Don't declare __pthread_unwind as weak inside libpthread.
7390
7391 2003-11-06 Ulrich Drepper <drepper@redhat.com>
7392
7393 * Makefile: Add magic to clean up correctly.
7394
7395 2003-11-05 Jakub Jelinek <jakub@redhat.com>
7396
7397 * unwind.c (FRAME_LEFT): Define.
7398 (unwind_stop): Handle old style cleanups here.
7399 (__pthread_unwind): Handle old style cleanups only if
7400 !HAVE_FORCED_UNWIND.
7401 * Makefile (tests): Add tst-cleanup4 and tst-cleanupx4.
7402 (CFLAGS-tst-cleanupx4.c): Add -fexceptions.
7403 ($(objpfx)tst-cleanup4): Depend on $(objpfx)tst-cleanup4aux.o.
7404 ($(objpfx)tst-cleanupx4): Likewise.
7405 * tst-cleanup4.c: New test.
7406 * tst-cleanup4aux.c: New.
7407 * tst-cleanupx4.c: New test.
7408
7409 2003-11-04 Ulrich Drepper <drepper@redhat.com>
7410
7411 * sysdeps/pthread/bits/stdio-lock.h: Use lll_*lock instead of
7412 lll_mutex_*lock macros to skip atomic operations on some archs.
7413
7414 2003-11-03 Ulrich Drepper <drepper@redhat.com>
7415
7416 * sysdeps/pthread/tst-timer.c (main): Initialize
7417 sigev2.sigev_value as well.
7418
7419 2003-10-15 Roland McGrath <roland@redhat.com>
7420
7421 * sysdeps/pthread/configure.in: Barf if visibility attribute support
7422 is missing.
7423 * sysdeps/pthread/configure: Regenerated.
7424
7425 2003-10-09 Kaz Kojima <kkojima@rr.iij4u.or.jp>
7426
7427 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Completely revamp the
7428 locking macros. No distinction between normal and mutex locking
7429 anymore.
7430 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Rewrite mutex locking.
7431 Merge bits from lowlevelmutex.S we still need.
7432 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Remove.
7433 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
7434 * sysdeps/unix/sysv/linux/sh/not-cancel.h: New file.
7435 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Adjust for
7436 new mutex implementation.
7437 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Likewise.
7438 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
7439 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7440 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
7441 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
7442 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
7443 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
7444 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
7445 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7446 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO): Also defined
7447 symbol for entry point to avoid cancellation.
7448
7449 2003-10-07 Jakub Jelinek <jakub@redhat.com>
7450
7451 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Backout 2003-10-02
7452 changes.
7453 (SAVE_OLDTYPE_0): Fix a typo.
7454
7455 2003-10-03 Ulrich Drepper <drepper@redhat.com>
7456
7457 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
7458 Check __sigsetjmp return value. Reported by Daniel Jacobowitz.
7459
7460 2003-10-02 Ulrich Drepper <drepper@redhat.com>
7461
7462 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (DOCARGS_1): Use
7463 correct offset.
7464
7465 2003-10-02 Jakub Jelinek <jakub@redhat.com>
7466
7467 * Makefile (tests): Add tst-cancel19.
7468 * tst-cancel19.c: New test.
7469
7470 2003-10-02 Ulrich Drepper <drepper@redhat.com>
7471
7472 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix saving and
7473 restoring of the old cancellation type.
7474
7475 2003-09-30 Jakub Jelinek <jakub@redhat.com>
7476
7477 * sysdeps/pthread/malloc-machine.h: Remove misleading comment.
7478
7479 2003-09-27 Wolfram Gloger <wg@malloc.de>
7480
7481 * sysdeps/pthread/malloc-machine.h: New file
7482
7483 2003-09-24 Roland McGrath <roland@redhat.com>
7484
7485 * allocatestack.c (__make_stacks_executable): Don't ignore return
7486 value from _dl_make_stack_executable.
7487
7488 2003-09-24 Ulrich Drepper <drepper@redhat.com>
7489
7490 * allocatestack.c (__make_stacks_executable): Also change
7491 permission of the currently unused stacks.
7492
7493 * allocatestack.c (change_stack_perm): Split out from
7494 __make_stacks_executable.
7495 (allocate_stack): If the required permission changed between the time
7496 we started preparing the stack and queueing it, change the permission.
7497 (__make_stacks_executable): Call change_stack_perm.
7498
7499 * Makefile: Build tst-execstack-mod locally.
7500 * tst-execstack-mod.c: New file.
7501
7502 2003-09-23 Jakub Jelinek <jakub@redhat.com>
7503
7504 * Makefile (tests): Only add tst-execstack if have-z-execstack is yes.
7505
7506 2003-09-23 Roland McGrath <roland@redhat.com>
7507
7508 * tst-execstack.c: New file.
7509 * Makefile (tests): Add it.
7510 ($(objpfx)tst-execstack, $(objpfx)tst-execstack.out): New targets.
7511 (LDFLAGS-tst-execstack): New variable.
7512
7513 * allocatestack.c (allocate_stack): Use GL(dl_stack_flags) to decide
7514 whether to use PROT_EXEC for stack mmap.
7515 (__make_stacks_executable): New function.
7516 * pthreadP.h: Declare it.
7517 * init.c (__pthread_initialize_minimal_internal): Set
7518 GL(dl_make_stack_executable_hook) to that.
7519
7520 2003-09-22 Ulrich Drepper <drepper@redhat.com>
7521
7522 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Adjust for latest
7523 recommendation from AMD re avoidance of lock prefix.
7524
7525 2003-09-22 Jakub Jelinek <jakub@redhat.com>
7526
7527 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait): Use
7528 lll_futex_timed_wait instead of lll_futex_wait.
7529 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Removed.
7530 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Removed.
7531 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: Removed.
7532 * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: Removed.
7533 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Removed.
7534 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Removed.
7535 * sysdeps/unix/sysv/linux/s390/sem_post.c: Removed.
7536 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Removed.
7537 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Include atomic.h.
7538 Completely revamp the locking macros. No distinction between
7539 normal and mutex locking anymore.
7540 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
7541 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock_wait,
7542 __lll_lock_timedwait): Fix prototypes.
7543 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_lock_wait,
7544 __lll_lock_timedwait): Likewise.
7545 (lll_mutex_lock, lll_mutex_cond_lock): Use _val instead of _bool
7546 macros, add __builtin_expect.
7547 (lll_mutex_timedlock): Likewise. Fix return value.
7548 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Removed.
7549 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: Removed.
7550 * sysdeps/unix/sysv/linux/i386/i586/lowlevelmutex.S: Removed.
7551 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: Removed.
7552 * sysdeps/unix/sysv/linux/i386/i686/lowlevelmutex.S: Removed.
7553 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: Removed.
7554 * sysdeps/unix/sysv/linux/lowlevelmutex.c: Removed.
7555 * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: Removed.
7556
7557 2003-09-22 Ulrich Drepper <drepper@redhat.com>
7558
7559 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
7560 (__lll_mutex_lock_wait): Minor optimization to avoid one atomic
7561 operation if possible.
7562
7563 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Don't play tricks
7564 like jumping over the lock prefix.
7565
7566 2003-09-21 Ulrich Drepper <drepper@redhat.com>
7567
7568 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Completely revamp the
7569 locking macros. No distinction between normal and mutex locking
7570 anymore.
7571 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
7572 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
7573 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
7574 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Rewrite mutex
7575 locking. Merge bits from lowlevelmutex.S we still need.
7576 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
7577 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
7578 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Removed.
7579 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Removed.
7580 * Makefile (routines): Remove libc-lowlevelmutex.
7581 (libpthread-rountines): Remove lowlevelmutex.
7582 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Adjust
7583 for new mutex implementation.
7584 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
7585 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7586 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7587 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
7588 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
7589 Likewise.
7590 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
7591 Likewise.
7592 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
7593 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
7594 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise
7595 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
7596 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7597 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7598 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
7599 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
7600 Likewise.
7601 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
7602 Likewise.
7603 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
7604 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
7605 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
7606 Don't use requeue.
7607 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
7608 * sysdeps/pthread/pthread_cond_signal.c: Don't use requeue.
7609
7610 2003-09-20 Ulrich Drepper <drepper@redhat.com>
7611
7612 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't match memory
7613 in parameters of asm with output parameters.
7614
7615 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Change
7616 type of DECR parameter to int.
7617 * pthreadP.h: Adjust prototype of __pthread_mutex_unlock_usercnt.
7618
7619 2003-09-18 Jakub Jelinek <jakub@redhat.com>
7620
7621 * tst-attr3.c (tf, do_test): Print stack start/end/size and
7622 guardsize for each thread.
7623
7624 2003-09-17 Jakub Jelinek <jakub@redhat.com>
7625
7626 * sysdeps/pthread/pthread.h (pthread_getattr_np): Clarify usage.
7627 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
7628 (pthread_attr_setaffinity_np): Handle cpuset == NULL.
7629
7630 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
7631 (pthread_attr_getaffinity_np): Don't segfault if iattr->cpuset is
7632 NULL.
7633 * pthread_getattr_np.c: Set cpuset using pthread_getaffinity_np.
7634 * pthreadP.h (pthread_getaffinity_np): Add hidden_proto.
7635 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
7636 (pthread_getaffinity_np): Add hidden_def.
7637
7638 * Makefile (tests): Add tst-attr3.
7639 * tst-attr3.c: New test.
7640
7641 * sysdeps/i386/Makefile (CFLAGS-tst-align.c): Remove.
7642
7643 2003-09-15 Jakub Jelinek <jakub@redhat.com>
7644
7645 * sysdeps/i386/Makefile (CFLAGS-pthread_create.c,
7646 CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
7647
7648 2003-09-17 Jakub Jelinek <jakub@redhat.com>
7649
7650 * Makefile (CFLAGS-tst-align.c): Add $(stack-align-test-flags).
7651 * tst-align.c: Include tst-stack-align.h.
7652 (tf, do_test): Use TEST_STACK_ALIGN macro.
7653
7654 2003-09-17 Ulrich Drepper <drepper@redhat.com>
7655
7656 * pthread_attr_init.c (__pthread_attr_init_2_0): Remove unused
7657 variable.
7658
7659 2003-09-16 Ulrich Drepper <drepper@redhat.com>
7660
7661 * pthread_getattr_np.c (pthread_getattr_np): Correctly fill in the
7662 stack-related values for the initial thread.
7663
7664 2003-09-15 Jakub Jelinek <jakub@redhat.com>
7665
7666 * Makefile (CFLAGS-pthread_once.c): Add $(uses-callbacks).
7667
7668 2003-09-11 Ulrich Drepper <drepper@redhat.com>
7669
7670 * pthread_mutex_lock.c: Minor code rearrangements.
7671
7672 2003-09-05 Roland McGrath <roland@redhat.com>
7673
7674 * pthread_create.c (__pthread_pthread_sizeof_descr): Removed.
7675 Instead, include ../nptl_db/db_info.c to do its magic.
7676 * pthread_key_create.c (__pthread_pthread_keys_max): Removed.
7677 (__pthread_pthread_key_2ndlevel_size): Likewise.
7678 * sysdeps/alpha/tls.h (DB_THREAD_SELF): New macro.
7679 * sysdeps/i386/tls.h (DB_THREAD_SELF): New macro.
7680 * sysdeps/ia64/tls.h (DB_THREAD_SELF): New macro.
7681 * sysdeps/powerpc/tls.h (DB_THREAD_SELF): New macro.
7682 * sysdeps/s390/tls.h (DB_THREAD_SELF): New macro.
7683 * sysdeps/sh/tls.h (DB_THREAD_SELF): New macro.
7684 * sysdeps/sparc/tls.h (DB_THREAD_SELF): New macro.
7685 * sysdeps/x86_64/tls.h (DB_THREAD_SELF): New macro.
7686 * sysdeps/alpha/td_ta_map_lwp2thr.c: File removed.
7687 * sysdeps/generic/td_ta_map_lwp2thr.c: File removed.
7688 * sysdeps/i386/td_ta_map_lwp2thr.c: File removed.
7689 * sysdeps/ia64/td_ta_map_lwp2thr.c: File removed.
7690 * sysdeps/powerpc/td_ta_map_lwp2thr.c: File removed.
7691 * sysdeps/s390/td_ta_map_lwp2thr.c: File removed.
7692 * sysdeps/sh/td_ta_map_lwp2thr.c: File removed.
7693 * sysdeps/sparc/td_ta_map_lwp2thr.c: File removed.
7694 * sysdeps/x86_64/td_ta_map_lwp2thr.c: File removed.
7695
7696 2003-09-08 Ulrich Drepper <drepper@redhat.com>
7697
7698 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Change type
7699 of pthread_t to be compatible with LT.
7700 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
7701 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
7702 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7703 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7704 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
7705 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7706 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
7707
7708 2003-09-04 Ulrich Drepper <drepper@redhat.com>
7709
7710 * sysdeps/unix/sysv/linux/i386/not-cancel.h (fcntl_not_cancel): Define.
7711
7712 2003-09-04 Jakub Jelinek <jakub@redhat.com>
7713
7714 * unwind-forcedunwind.c: Move to...
7715 * sysdeps/pthread/unwind-forcedunwind.c: ...here.
7716 (pthread_cancel_init): Use ARCH_CANCEL_INIT if defined.
7717 * sysdeps/pthread/jmpbuf-unwind.h: New file.
7718 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: New file.
7719 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: New file.
7720 * unwind.c: Include jmpbuf-unwind.h.
7721 (unwind_stop): Use _JMPBUF_CFA_UNWINDS macro.
7722
7723 2003-09-02 Jakub Jelinek <jakub@redhat.com>
7724
7725 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: New file.
7726 * sysdeps/unix/sysv/linux/ia64/Versions (libpthread): Export
7727 pthread_attr_setstack and pthread_attr_setstacksize @@GLIBC_2.3.3.
7728 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: New file.
7729 * sysdeps/unix/sysv/linux/alpha/Versions: New file.
7730 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: New file.
7731 * sysdeps/unix/sysv/linux/sparc/Versions: New file.
7732 * pthread_attr_setstack.c (__old_pthread_attr_setstack): New function.
7733 (pthread_attr_setstack): If PTHREAD_STACK_MIN != 16384, export
7734 as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.2.
7735 * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize): New
7736 function.
7737 (pthread_attr_setstacksize): If PTHREAD_STACK_MIN != 16384, export
7738 as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.1.
7739 * Makefile (tests): Add tst-stack2.
7740 * tst-stack2.c: New test.
7741 * tst-stack1.c: Include limits.h and sys/param.h.
7742 (do_test): Set size to MAX (4 * getpagesize (), PTHREAD_STACK_MIN).
7743
7744 * pthread_condattr_setpshared.c: Include errno.h.
7745 (pthread_condattr_setpshared): Return EINVAL if pshared
7746 is neither PTHREAD_PROCESS_PRIVATE nor PTHREAD_PROCESS_SHARED.
7747
7748 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Also
7749 defined symbol for entry point to avoid cancellation.
7750 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
7751 Likewise.
7752 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
7753 Likewise.
7754 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
7755 Likewise.
7756 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h (PSEUDO):
7757 Likewise.
7758 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
7759 Likewise.
7760 * sysdeps/unix/sysv/linux/i386/not-cancel.h (__open_nocancel,
7761 __close_nocancel, __read_nocancel, __write_nocancel,
7762 __waitpid_nocancel): Add attribute_hidden. If not in libc.so,
7763 libpthread.so or librt.so, define to corresponding function
7764 without _nocancel suffix.
7765 * sysdeps/unix/sysv/linux/s390/not-cancel.h: New file.
7766 * sysdeps/unix/sysv/linux/powerpc/not-cancel.h: New file.
7767 * sysdeps/unix/sysv/linux/sparc/not-cancel.h: New file.
7768
7769 * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: Fix a typo.
7770
7771 2003-09-02 Ulrich Drepper <drepper@redhat.com>
7772
7773 * sysdeps/unix/sysv/linux/i386/not-cancel.h: New file.
7774 * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: New file.
7775
7776 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Make sure the code
7777 in subsections has a symbol associated with it.
7778
7779 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Also
7780 defined symbol for entry point to avoid cancellation.
7781 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Likewise.
7782
7783 2003-09-01 Jakub Jelinek <jakub@redhat.com>
7784
7785 * Makefile (tests): Add tst-tls5.
7786 (module-names): Add tst-tls5mod{,a,b,c,d,e,f}.
7787 ($(objpfx)tst-tls5mod{,a,b,c,d,e,f}.so-no-z-defs): Set to yes.
7788 ($(objpfx)tst-tls5): New.
7789 ($(objpfx)tst-tls6.out): Likewise.
7790 (tests): Depend on $(objpfx)tst-tls6.out.
7791 * tst-tls3.c: Include stdint.h and pthreaddef.h.
7792 (do_test): Check pthread_self () return value alignment.
7793 * tst-tls3mod.c: Include stdint.h and pthreaddef.h.
7794 (tf): Check pthread_self () return value alignment.
7795 * tst-tls5.c: New test.
7796 * tst-tls5.h: New.
7797 * tst-tls5mod.c: New.
7798 * tst-tls5moda.c: New.
7799 * tst-tls5modb.c: New.
7800 * tst-tls5modc.c: New.
7801 * tst-tls5modd.c: New.
7802 * tst-tls5mode.c: New.
7803 * tst-tls5modf.c: New.
7804 * tst-tls6.sh: New test.
7805
7806 * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Add
7807 ptr___pthread_cond_timedwait and ptr___pthread_cond_timedwait_2_0.
7808 * init.c (pthread_functions): Initialize them.
7809 * forward.c (pthread_cond_timedwait@GLIBC_2.0,
7810 pthread_cond_timedwait@@GLIBC_2.3.2): New forwards.
7811 * Versions (libc): Export pthread_cond_timedwait@GLIBC_2.0,
7812 pthread_cond_timedwait@@GLIBC_2.3.2.
7813
7814 2003-09-01 Jakub Jelinek <jakub@redhat.com>
7815
7816 * sysdeps/unix/sysv/linux/alpha/timer_create.c: New file.
7817 * sysdeps/unix/sysv/linux/alpha/timer_delete.c: New file.
7818 * sysdeps/unix/sysv/linux/alpha/timer_getoverr.c: New file.
7819 * sysdeps/unix/sysv/linux/alpha/timer_gettime.c: New file.
7820 * sysdeps/unix/sysv/linux/alpha/timer_settime.c: New file.
7821 * sysdeps/unix/sysv/linux/alpha/Versions: New file.
7822
7823 * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
7824
7825 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Define
7826 _POSIX_THREAD_PRIORITY_SCHEDULING.
7827 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
7828
7829 2003-08-31 Ulrich Drepper <drepper@redhat.com>
7830
7831 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock): Avoid
7832 nested function, use static inline function from libio.h.
7833 Code by Richard Henderson.
7834
7835 * sysdeps/pthread/bits/libc-lock.h: Mark pthread_setcancelstate as
7836 weak.
7837
7838 2003-08-30 Jakub Jelinek <jakub@redhat.com>
7839
7840 * sysdeps/unix/sysv/linux/sparc/sparc64/Versions: New file.
7841 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_create.c: New file.
7842 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_delete.c: New file.
7843 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_getoverr.c: New file.
7844 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_gettime.c: New file.
7845 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_settime.c: New file.
7846 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
7847 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
7848 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: New file.
7849 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: New file.
7850 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: New file.
7851 * sysdeps/unix/sysv/linux/sparc/pthread_once.c: New file.
7852 * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: New file.
7853 * sysdeps/unix/sysv/linux/sparc/fork.c: New file.
7854 * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
7855 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: New file.
7856 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: New file.
7857 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: New file.
7858 * sysdeps/sparc/sparc32/pthread_spin_lock.c: New file.
7859 * sysdeps/sparc/sparc32/pthread_spin_trylock.c: New file.
7860 * sysdeps/sparc/sparc32/pthreaddef.h: New file.
7861 * sysdeps/sparc/sparc64/pthread_spin_lock.c: New file.
7862 * sysdeps/sparc/sparc64/pthread_spin_trylock.c: New file.
7863 * sysdeps/sparc/sparc64/pthread_spin_unlock.c: New file.
7864 * sysdeps/sparc/sparc64/pthreaddef.h: New file.
7865 * sysdeps/sparc/tls.h: New file.
7866 * sysdeps/sparc/tcb-offsets.sym: New file.
7867 * sysdeps/sparc/Makefile: New file.
7868 * sysdeps/sparc/td_ta_map_lwp2thr.c: New file.
7869 * init.c [__sparc__] (__NR_set_tid_address): Define.
7870
7871 2003-08-29 Jakub Jelinek <jakub@redhat.com>
7872
7873 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock,
7874 _IO_release_lock): Define.
7875
7876 2003-08-29 Jakub Jelinek <jakuB@redhat.com>
7877
7878 * tst-cancel4.c (tf_sigwait, tf_sigwaitinfo, tf_sigtimedwait): Add
7879 sigemptyset before sigaddset. Reported by jreiser@BitWagon.com.
7880
7881 2003-08-27 Ulrich Drepper <drepper@redhat.com>
7882
7883 * sysdeps/pthread/pthread.h (pthread_exit): Remove __THROW.
7884 (__pthread_cleanup_class): Add missing return types of member
7885 functions.
7886
7887 2003-08-26 Steven Munroe <sjmunroe@us.ibm.com>
7888
7889 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
7890 (lll_mutex_unlock_force): Add memory barrier between store and futex
7891 syscall.
7892
7893 2003-08-25 Ulrich Drepper <drepper@redhat.com>
7894
7895 * tst-cancel4.c (do_test): Also unlink tempfname and remove
7896 tempmsg in first loop.
7897
7898 2003-08-18 Ulrich Drepper <drepper@redhat.com>
7899
7900 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
7901 _POSIX_THREAD_PRIORITY_SCHEDULING.
7902 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
7903
7904 2003-08-07 Jakub Jelinek <jakub@redhat.com>
7905
7906 * sysdeps/pthread/bits/libc-lock.h [_LIBC && SHARED]
7907 (__rtld_lock_default_lock_recursive,
7908 __rtld_lock_default_unlock_recursive): Define.
7909 [_LIBC && SHARED] (__rtld_lock_lock_recursive,
7910 __rtld_lock_unlock_recursive): Define using
7911 GL(_dl_rtld_*lock_recursive).
7912 * init.c (__pthread_initialize_minimal_internal): Initialize
7913 _dl_rtld_lock_recursive and _dl_rtld_unlock_recursive.
7914 Lock GL(_dl_load_lock) the same number of times as
7915 GL(_dl_load_lock) using non-mt implementation was nested.
7916
7917 * pthreadP.h (__pthread_cleanup_upto): Add hidden_proto.
7918 * pt-longjmp.c (__pthread_cleanup_upto): Add hidden_def.
7919
7920 2003-08-06 Jakub Jelinek <jakub@redhat.com>
7921
7922 * tst-cancel17.c (do_test): Make len2 maximum of page size and
7923 PIPE_BUF.
7924
7925 2003-08-07 Jakub Jelinek <jakub@redhat.com>
7926
7927 * pthread_create.c (__pthread_create_2_0): Clear new_attr.cpuset.
7928
7929 2003-08-03 Jakub Jelinek <jakub@redhat.com>
7930
7931 * sysdeps/pthread/createthread.c (do_clone): Move error handling
7932 to first syscall error check. Move syscall error check for tkill
7933 into __ASSUME_CLONE_STOPPED #ifdef.
7934
7935 2003-08-02 Ulrich Drepper <drepper@redhat.com>
7936
7937 * sysdeps/pthread/createthread.c (do_clone): If __ASSUME_CLONE_STOPPED
7938 is not defined, do explicit synchronization.
7939 (create_thread): Do not lock pd->lock here. If __ASSUME_CLONE_STOPPED
7940 is not defined also unlock pd->lock for non-debugging case in case
7941 it is necessary.
7942 * pthread_create.c (start_thread): Always get and release pd->lock
7943 if __ASSUME_CLONE_STOPPED is not defined.
7944 (start_thread_debug): Removed. Adjust users.
7945 * allocatestack.c (allocate_stack): Always initialize lock if
7946 __ASSUME_CLONE_STOPPED is not defined.
7947 * Makefile (tests): Add tst-sched1.
7948 * tst-sched1.c: New file.
7949
7950 * sysdeps/pthread/createthread.c (do_clone): Only use
7951 sched_setschduler and pass correct parameters.
7952
7953 2003-07-31 Jakub Jelinek <jakub@redhat.com>
7954
7955 * sysdeps/pthread/pthread.h (pthread_attr_setstackaddr,
7956 pthread_attr_setstacksize): Change PTHREAD_STACK_SIZE to
7957 PTHREAD_STACK_MIN in comments.
7958
7959 2003-07-31 Jakub Jelinek <jakub@redhat.com>
7960
7961 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
7962 Shut up warnings if INTERNAL_SYSCALL_ERROR_P does not use its first
7963 argument.
7964 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Likewise.
7965 * pthread_condattr_setclock.c (pthread_condattr_setclock): Likewise.
7966 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Include pthreaddef.h.
7967 (__pthread_cleanup_upto): Fix prototype.
7968 (_longjmp_unwind): Adjust caller.
7969 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_timedlock):
7970 Change second argument to const struct pointer.
7971 * tst-sem8.c (main): Remove unused s2 and s3 variables.
7972 * tst-sem9.c (main): Likewise.
7973 * unwind.c: Include string.h for strlen prototype.
7974
7975 2003-07-31 Ulrich Drepper <drepper@redhat.com>
7976
7977 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7978 (__pthread_cond_timedwait): Don't use cmov unless HAVE_CMOV is defined.
7979 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S:
7980 Define HAVE_CMOV.
7981 Patch by Nicholas Miell <nmiell@attbi.com>.
7982
7983 2003-07-30 Jakub Jelinek <jakub@redhat.com>
7984
7985 * init.c (__pthread_initialize_minimal_internal): Initialize
7986 GL(dl_init_static_tls).
7987 * pthreadP.h (__pthread_init_static_tls): New prototype.
7988 * allocatestack.c (init_one_static_tls, __pthread_init_static_tls):
7989 New functions.
7990 * Makefile (tests): Add tst-tls4.
7991 (modules-names): Add tst-tls4moda and tst-tls4modb.
7992 ($(objpfx)tst-tls4): Link against libdl and libpthread.
7993 ($(objpfx)tst-tls4.out): Depend on tst-tls4moda.so and
7994 tst-tls4modb.so.
7995 * tst-tls4.c: New file.
7996 * tst-tls4moda.c: New file.
7997 * tst-tls4modb.c: New file.
7998
7999 2003-06-19 Daniel Jacobowitz <drow@mvista.com>
8000
8001 * sysdeps/pthread/timer_create.c (timer_create): Call timer_delref
8002 before __timer_dealloc.
8003 * sysdeps/pthread/timer_routines.c (__timer_thread_find_matching):
8004 Don't call list_unlink.
8005
8006 2003-07-29 Roland McGrath <roland@redhat.com>
8007
8008 * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
8009
8010 2003-07-25 Jakub Jelinek <jakub@redhat.com>
8011
8012 * tst-cancel17.c (do_test): Check if aio_cancel failed.
8013 Don't reuse struct aiocb A if it failed.
8014 Write fpathconf (fds[1], _PC_PIPE_BUF) + 2 bytes using aio_write,
8015 not just one byte, as that does not block.
8016
8017 2003-07-22 Jakub Jelinek <jakub@redhat.com>
8018
8019 * sysdeps/pthread/unwind-resume.c: New file.
8020 * sysdeps/pthread/Makefile (routines, shared-only-routines): Add
8021 unwind-resume in csu subdir.
8022 (CFLAGS-unwind-resume.c, CFLAGS-rt-unwind-resume.c): Compile with
8023 exceptions.
8024 (librt-sysdep_routines, librt-shared-only-routines): Add
8025 rt-unwind-resume.
8026 * sysdeps/pthread/rt-unwind-resume.c: New file.
8027 * unwind-forcedunwind.c: New file.
8028 * Makefile (libpthread-routines): Add unwind-forcedunwind.
8029 (libpthread-shared-only-routines): Likewise.
8030 (CFLAGS-unwind-forcedunwind.c): Compile with exceptions.
8031 * pthreadP.h (pthread_cancel_init): New prototype.
8032 * pthread_cancel.c (pthread_cancel): Call pthread_cancel_init.
8033
8034 * sysdeps/pthread/createthread.c (do_thread, create_thread): Make
8035 attr argument const struct pthread_attr *.
8036
8037 * res.c (__res_state): Return __resp.
8038 * descr.h: Include resolv.h.
8039 (struct pthread): Add res field.
8040 * pthread_create.c: Include resolv.h.
8041 (start_thread): Initialize __resp.
8042 * Makefile (tests): Add tst-_res1.
8043 (module-names): Add tst-_res1mod1, tst-_res1mod2.
8044 ($(objpfx)tst-_res1mod2.so): Depend on $(objpfx)tst-_res1mod1.so.
8045 ($(objpfx)tst-_res1): Depend on $(objpfx)tst-_res1mod2.so and
8046 libpthread.
8047 * tst-_res1.c: New file.
8048 * tst-_res1mod1.c: New file.
8049 * tst-_res1mod2.c: New file.
8050
8051 2003-07-21 Ulrich Drepper <drepper@redhat.com>
8052
8053 * sysdeps/pthread/createthread.c: Don't define CLONE_STOPPED.
8054
8055 * Makefile: Define various *-no-z-defs variables for test DSOs
8056 which has undefined symbols.
8057
8058 2003-07-21 Steven Munroe <sjmunroe@us.ibm.com>
8059
8060 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
8061 Retry if the stwcx fails to store once_control.
8062
8063 2003-07-20 Ulrich Drepper <drepper@redhat.com>
8064
8065 * Makefile (libpthread-routines): Add pthread_attr_getaffinity and
8066 pthread_attr_setaffinity.
8067 * Versions [libpthread] (GLIBC_2.3.3): Likewise.
8068 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: New file.
8069 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: New file.
8070 * pthread_attr_destroy.c: Free cpuset element if allocated.
8071 * pthread_create.c: Pass iattr as additional parameter to
8072 create_thread.
8073 * sysdeps/pthread/createthread.c: If attribute is provided and
8074 a new thread is created with affinity set or scheduling parameters,
8075 start thread with CLONE_STOPPED.
8076 * sysdeps/pthread/pthread.h: Declare pthread_attr_getaffinity and
8077 pthread_attr_setaffinity.
8078 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
8079 cpuset element.
8080
8081 2003-07-15 Ulrich Drepper <drepper@redhat.com>
8082
8083 * tst-tcancel-wrappers.sh: lseek and llseek are not cancelation points.
8084
8085 2003-07-14 Ulrich Drepper <drepper@redhat.com>
8086
8087 * sysdeps/pthread/configure.in: Require CFI directives also for
8088 ppc and s390.
8089
8090 2003-07-15 Jakub Jelinek <jakub@redhat.com>
8091
8092 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
8093 Add cfi directives.
8094
8095 2003-07-12 Kaz Kojima <kkojima@rr.iij4u.or.jp>
8096
8097 * sysdeps/sh/tcb-offsets.sym: Add RESULT, TID, CANCELHANDLING and
8098 CLEANUP_JMP_BUF.
8099 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use more
8100 registers as variables. Call __pthread_mutex_unlock_usercnt.
8101 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
8102 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Store TID
8103 not self pointer in __writer. Compare with TID to determine
8104 deadlocks.
8105 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
8106 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
8107 Likewise.
8108 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
8109 Likewise.
8110 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add cancellation support.
8111 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
8112 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Define all the nice
8113 macros also when compiling librt.
8114
8115 2003-07-11 Jakub Jelinek <jakub@redhat.com>
8116
8117 * Makefile (CFLAGS-pthread_once.c): Add -fexceptions
8118 -fasynchronous-unwind-tables.
8119 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
8120 (PSEUDO): Add cfi directives.
8121 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO):
8122 Likewise.
8123 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
8124 Likewise.
8125
8126 2003-07-08 Jakub Jelinek <jakub@redhat.com>
8127
8128 * pthreadP.h (__pthread_unwind_next, __pthread_register_cancel,
8129 __pthread_unregister_cancel): Add prototypes and hidden_proto.
8130 * unwind.c (__pthread_unwind_next): Add hidden_def.
8131 * cleanup.c (__pthread_register_cancel, __pthread_unregister_cancel):
8132 Likewise.
8133 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
8134 Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
8135 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
8136 Likewise.
8137 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
8138 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
8139 Likewise.
8140 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once): Use
8141 HIDDEN_JUMPTARGET to call __pthread_register_cancel,
8142 __pthread_unregister_cancel and __pthread_unwind_next.
8143
8144 2003-07-04 Jakub Jelinek <jakub@redhat.com>
8145
8146 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Use
8147 different symbol for the cancellation syscall wrapper and
8148 non-cancellation syscall wrapper.
8149 (PSEUDO_END): Define.
8150
8151 2003-07-05 Richard Henderson <rth@redhat.com>
8152
8153 * sysdeps/alpha/elf/pt-initfini.c: Avoid .ent/.end.
8154 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_wait,
8155 lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
8156 return actual return value from the syscall, not 0.
8157
8158 2003-07-07 Ulrich Drepper <drepper@redhat.com>
8159
8160 * descr.h (struct pthread): Add pid field.
8161 * allocatestack.c (allocate_stack): Initialize pid field in descriptor.
8162 (__reclaim_stacks): Likewise.
8163 * init.c (sigcancel_handler): If __ASSUME_CORRECT_SI_PID is defined
8164 also check for PID of the signal source.
8165 (__pthread_initialize_minimal_internal): Also initialize pid field
8166 of initial thread's descriptor.
8167 * pthread_cancel.c: Use tgkill instead of tkill if possible.
8168 * sysdeps/unix/sysv/linux/fork.c: Likewise.
8169 * sysdeps/unix/sysv/linux/pt-raise.c: Likewise.
8170 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
8171 * sysdeps/unix/sysv/linux/raise.c: Likewise.
8172
8173 2003-07-05 Ulrich Drepper <drepper@redhat.com>
8174
8175 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_push): Renamed.
8176 Fix use of parameter.
8177 (__libc_cleanup_pop): Likewise.
8178
8179 2003-07-04 Ulrich Drepper <drepper@redhat.com>
8180
8181 * init.c (sigcancel_handler): Change parameters to match handler
8182 for SA_SIGACTION. Check signal number and code to recognize
8183 invalid invocations.
8184
8185 2003-07-03 Roland McGrath <roland@redhat.com>
8186
8187 * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr):
8188 Apply sizeof (struct pthread) bias to r13 value.
8189
8190 2003-07-03 Ulrich Drepper <drepper@redhat.com>
8191
8192 * sysdeps/pthread/configure.in: Require CFI directives.
8193
8194 * sysdeps/pthread/librt-cancellation.c (__pthread_unwind): Remove
8195 definition.
8196 * pthreadP.h (__pthread_unwind): Add hidden_proto if used in
8197 libpthread compilation.
8198 * unwind.c (__pthread_unwind): Add hidden_def.
8199 * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_unwind.
8200
8201 2003-07-01 Ulrich Drepper <drepper@redhat.com>
8202
8203 * libc-cancellation.c (__libc_cleanup_routine): Define.
8204 * sysdeps/pthread/bits/libc-lock.h (__pthread_cleanup_push): Define.
8205 (__pthread_cleanup_pop): Define.
8206
8207 2003-07-01 Richard Henderson <rth@redhat.com>
8208
8209 * sysdeps/alpha/elf/pt-initfini.c: New file.
8210 * sysdeps/alpha/pthread_spin_lock.S: New file.
8211 * sysdeps/alpha/pthread_spin_trylock.S: New file.
8212 * sysdeps/alpha/pthreaddef.h: New file.
8213 * sysdeps/alpha/td_ta_map_lwp2thr.c: New file.
8214 * sysdeps/alpha/tls.h: New file.
8215 * sysdeps/unix/sysv/linux/alpha/Makefile: New file.
8216 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: New file.
8217 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: New file.
8218 * sysdeps/unix/sysv/linux/alpha/createthread.c: New file.
8219 * sysdeps/unix/sysv/linux/alpha/fork.c: New file.
8220 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: New file.
8221 * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: New file.
8222 * sysdeps/unix/sysv/linux/alpha/pthread_once.c: New file.
8223 * sysdeps/unix/sysv/linux/alpha/sem_post.c: New file.
8224 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
8225
8226 2003-07-01 Ulrich Drepper <drepper@redhat.com>
8227
8228 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Add correct
8229 cleanup support and unwind info.
8230
8231 2003-06-30 Ulrich Drepper <drepper@redhat.com>
8232
8233 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
8234 Use correct cleanup handler registration. Add unwind info.
8235 * sysdeps/unix/sysv/linux/unwindbuf.sym: New file.
8236 * sysdeps/unix/sysv/linux/Makefile: Add rule to build unwindbuf.h.
8237 * tst-once3.c: Add cleanup handler and check it is called.
8238 * tst-once4.c: Likewise.
8239 * tst-oncex3.c: New file.
8240 * tst-oncex4.c: New file.
8241 * Makefile: Add rules to build and run tst-oncex3 and tst-oncex4.
8242
8243 2003-06-29 Ulrich Drepper <drepper@redhat.com>
8244
8245 * sysdeps/pthread/configure.in: Check for C cleanup handling in gcc.
8246
8247 2003-06-27 Ulrich Drepper <drepper@redhat.com>
8248
8249 * tst-cancel4.c (tf_msgrcv): Use IPC_PRIVATE in msgget call.
8250 (tf_msgsnd): Likewise.
8251
8252 * tst-cancel4.c (tf_msgrcv): Strengthen test against valid
8253 premature returns a bit more.
8254
8255 2003-06-26 Ulrich Drepper <drepper@redhat.com>
8256
8257 * sysdeps/pthread/librt-cancellation.c: Move __pthread_unwind
8258 definition to the front.
8259
8260 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rename
8261 the cleanup functions to make the names unique. Fix dwarf opcode
8262 un unwind table.
8263 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Rename cleanup
8264 functions to make the names unique. Fix CFA offset for two blocks.
8265
8266 2003-06-25 Ulrich Drepper <drepper@redhat.com>
8267
8268 * sysdeps/pthread/pthread.h (class __pthread_cleanup_class): Add
8269 missing closing braces.
8270 Patch by Christophe Saout <christophe@saout.de>.
8271
8272 2003-06-24 Roland McGrath <roland@redhat.com>
8273
8274 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Typo fix.
8275
8276 2003-06-24 Ulrich Drepper <drepper@redhat.com>
8277
8278 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: New file.
8279 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: New file.
8280
8281 * pthreadP.h: Declare __find_thread_by_id.
8282 * allocatestack.c [HP_TIMING_AVAIL]: Define __find_thread_by_id.
8283 * pthread_clock_gettime.c: Allow using other thread's clock.
8284 * pthread_clock_settime.c: Likewise.
8285 * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
8286 * Makefile: Add rules to build and run tst-clock2.
8287 * tst-clock2.c: New file.
8288
8289 2003-06-23 Ulrich Drepper <drepper@redhat.com>
8290
8291 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rewrite
8292 to use exception-based cleanup handler.
8293 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8294
8295 * tst-cond8.c (ch): Announce that we are done.
8296
8297 * pthreadP.h (__pthread_mutex_cond_lock): Mark with internal_function.
8298
8299 * tst-cancel17.c (tf): Retry aio_suspend in case of EINTR.
8300 Also test aio_suspend with timeout value.
8301
8302 2003-06-22 Ulrich Drepper <drepper@redhat.com>
8303
8304 * pthreadP.h: Mark __pthread_mutex_unlock_usercnt also hidden.
8305 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Add
8306 attribute_hidden.
8307
8308 * pthreadP.h (__pthread_mutex_init_internal): Mark hidden.
8309 (__pthread_mutex_lock_internal): Likewise.
8310 (__pthread_mutex_unlock_internal): Likewise.
8311 (__pthread_mutex_unlock_usercnt): Declare.
8312 * pthread_mutex_destroy.c: Always fail if used in any way.
8313 * pthread_mutex_init.c: Update comment.
8314 * pthread_mutex_lock.c: If NO_INCR is not defined adjust __nusers.
8315 * pthread_mutex_timedlock.c: Adjust __nusers.
8316 * pthread_mutex_trylock.c: Adjust __nusers.
8317 * pthread_mutex_unlock.c: Old code is in __pthread_mutex_unlock_usercnt
8318 and public interfaces are wrapper with pass additional parameter.
8319 __pthread_mutex_unlock_usercnt does not adjust __nusers if second
8320 parameter zero.
8321 * tst-mutex8.c: New file.
8322 * Makefile (tests): Add tst-mutex8.
8323 * sysdeps/pthread/pthread_cond_timedwait.c: Call
8324 __pthread_mutex_unlock_usercnt.
8325 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
8326 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8327 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8328 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8329 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8330 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Define NO_INCR.
8331 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
8332 Add __nusers.
8333 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8334 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
8335 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
8336 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
8337 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
8338
8339 * pthread_mutex_lock.c: Don't store THREAD_ID in __owner, use TID.
8340 * pthread_mutex_timedlock.c: Likewise.
8341 * pthread_mutex_trylock.c: Adjust __nusers.
8342 * pthread_mutex_unlock.c: Compare with TID not THREAD_ID.
8343 * tst-mutex9.c: New file.
8344 * Makefile (tests): Add tst-mutex9.
8345 * sysdeps/i386/tls.h: Remove THREAD_ID definition.
8346 * sysdeps/ia64/tls.h: Likewise.
8347 * sysdeps/powerpc/tls.h: Likewise.
8348 * sysdeps/s390/tls.h: Likewise.
8349 * sysdeps/sh/tls.h: Likewise.
8350 * sysdeps/x86_64/tls.h: Likewise.
8351 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
8352 Change type of __owner.
8353 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8354 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
8355 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
8356 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
8357 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
8358
8359 2003-06-19 Jakub Jelinek <jakub@redhat.com>
8360
8361 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Move to...
8362 * sysdeps/unix/sysv/linux/sem_post.c: ...here.
8363
8364 * sysdeps/unix/sysv/linux/sem_post.c: Move to...
8365 * sysdeps/unix/sysv/linux/powerpc/sem_post.c: ... here. Pass nr + 1
8366 instead of nr to lll_futex_wake. Only set errno and return -1
8367 if err < 0.
8368
8369 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_wait,
8370 lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
8371 return actual return value from the syscall, not 0.
8372
8373 2003-06-18 Ulrich Drepper <drepper@redhat.com>
8374
8375 * tst-cancel4.c (tf_msgsnd): Don't always use 100 as the type,
8376 find a random value.
8377 (tf_msgrcv): Likewise. Also don't report msgrcv returns if
8378 errno==EIDRM.
8379
8380 * sysdeps/unix/sysv/linux/timer_settime.c: Add prototype for
8381 compat_timer_settime.
8382 * sysdeps/unix/sysv/linux/timer_gettime.c: Add prototype for
8383 compat_timer_gettime.
8384 * sysdeps/unix/sysv/linux/timer_getoverr.c: Add prototype for
8385 compat_timer_getoverrun.
8386 * sysdeps/unix/sysv/linux/timer_delete.c: Add prototype for
8387 compat_timer_delete.
8388
8389 * pthread_mutex_destroy.c (__pthread_mutex_destroy): For
8390 error-checking mutex detect busy mutexes.
8391
8392 2003-06-17 Ulrich Drepper <drepper@redhat.com>
8393
8394 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_mutex_lock):
8395 Add ax to clobber list.
8396 (lll_mutex_cond_lock): Likewise.
8397 (lll_mutex_unlock): Likewise.
8398 (lll_lock): Likewise.
8399 (lll_unlock): Likewise.
8400
8401 * Makefile: Add rules to build and run tst-cancel18 and tst-cancelx18.
8402 * tst-cancel18.c: New file.
8403 * tst-cancelx18.c: New file.
8404
8405 * tst-cancel4.c: Test connect, creat, msgrcv, msgsnd, sendmsg, sendto,
8406 and tcdrain.
8407
8408 * Makefile: Add rules to build and run tst-cancel17 and tst-cancel17x.
8409 * tst-cancel17.c: New file.
8410 * tst-cancelx17.c: New file.
8411
8412 * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
8413 * sysdeps/unix/sysv/linux/sigwait.c: New file.
8414 * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
8415
8416 * tst-cancel4.c: Test open, close, pread, pwrite, fsync, and msync.
8417
8418 2003-06-16 Jakub Jelinek <jakub@redhat.com>
8419
8420 * sysdeps/pthread/createthread.c (create_thread): Set
8421 header.multiple_threads unconditionally.
8422 * allocatestack.c (allocate_stack): Likewise.
8423 * descr.h (struct pthread): Add header.multiple_threads
8424 unconditionally.
8425 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (CENABLE, CDISABLE):
8426 Define for librt. #error if neither libpthread, libc nor librt.
8427 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (CENABLE, CDISABLE):
8428 Likewise.
8429 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (CENABLE,
8430 CDISABLE): Likewise.
8431 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (CENABLE,
8432 CDISABLE): Likewise.
8433 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (CENABLE,
8434 CDISABLE): Likewise.
8435 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (CENABLE,
8436 CDISABLE): Likewise. Access header.multiple_threads outside of
8437 libc and libpthread.
8438 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (CENABLE, CDISABLE):
8439 Likewise.
8440 * sysdeps/x86_64/tls.h (tcbhead_t): Add multiple_threads.
8441 * sysdeps/x86_64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define.
8442
8443 2003-06-17 Ulrich Drepper <drepper@redhat.com>
8444
8445 * tst-cancel4.c: Add tests for the socket and signal functions, pause.
8446 Also test early cancellation before the thread reaches the cancellation
8447 point.
8448
8449 * Makefile: Compile forward.c with exceptions.
8450
8451 * sysdeps/unix/sysv/linux/sleep.c: New file.
8452
8453 2003-06-16 Ulrich Drepper <drepper@redhat.com>
8454
8455 * Makefile: Add CFLAGS definition to compile function wrappers
8456 duplicated from libc with exceptions.
8457 * tst-cancel4.c: Also check cancellation handlers.
8458
8459 * Makefile: Add rules to build and run tst-cancel16 and
8460 tst-cancelx16. Add missing CFLAGS definitions.
8461 * tst-cancel16.c: New file.
8462 * tst-cancelx16.c: New file.
8463
8464 2003-06-15 Ulrich Drepper <drepper@redhat.com>
8465
8466 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
8467 (DL_SYSINFO_IMPLEMENTATION): Use CFI opcodes.
8468 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
8469 (DL_SYSINFO_IMPLEMENTATION): Likewise.
8470
8471 * pthreadP.h (LIBC_CANCEL_ASYNC): Also define for librt.
8472 (LIBC_CANCEL_RESET): Likewise.
8473 Declare __librt_enable_asynccancel and __librt_disable_asynccancel.
8474 * sysdeps/pthread/Makefile (librt-sysdep_routines): Add
8475 librt-cancellation.
8476 (CFLAGS-libcrt-cancellation.c): Define.
8477 * sysdeps/pthread/librt-cancellation.c: New file.
8478 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define all the nice
8479 macros also when compiling librt.
8480 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
8481 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
8482 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
8483 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
8484 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
8485 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
8486 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
8487
8488 * sysdeps/unix/sysv/linux/timer_create.c: Add prototype for
8489 compat_timer_create.
8490
8491 2003-06-14 Ulrich Drepper <drepper@redhat.com>
8492
8493 * sysdeps/pthread/posix-timer.h (timespec_compare): Always inline.
8494
8495 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
8496 __register_atfork.
8497 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
8498 Add libc_hidden_def.
8499
8500 2003-06-13 Roland McGrath <roland@redhat.com>
8501
8502 * sysdeps/x86_64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Pass FS
8503 constant from <sys/reg.h> to ps_get_thread_area, not register contents.
8504
8505 2003-06-11 Ulrich Drepper <drepper@redhat.com>
8506
8507 * allocatestack.c (queue_stack): Always inline.
8508 * ptreadhP.h (__do_cancel): Likewise.
8509
8510 2003-06-10 Jakub Jelinek <jakub@redhat.com>
8511
8512 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait): Fix
8513 a typo.
8514
8515 2003-06-10 Ulrich Drepper <drepper@redhat.com>
8516
8517 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
8518 (__pthread_cond_signal): Remove incorrect second addition for
8519 cond_lock!=0.
8520
8521 2003-06-09 Ulrich Drepper <drepper@redhat.com>
8522
8523 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
8524 (__pthread_cond_signal): Use correct futex pointer in
8525 __lll_mutex_lock_wait call.
8526
8527 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
8528 (__pthread_cond_signal): Some more tweaks to handle cond_lock!=0.
8529
8530 2003-06-08 Ulrich Drepper <drepper@redhat.com>
8531
8532 * sysdeps/unix/sysv/linux/s390/sem_wait.c (__new_sem_wait): Make
8533 cancelable.
8534 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
8535 Likewise.
8536
8537 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Remove
8538 hand-written CFI generation code. Since ENTRY/END also initiated
8539 CFI frames this caused two CFI sets to be generated.
8540
8541 2003-06-07 Ulrich Drepper <drepper@redhat.com>
8542
8543 * cleanup_routine.c: New file.
8544 * Versions (libpthread) [GLIBC_2.3.3]: Add __pthread_cleanup_routine.
8545 * sysdeps/pthread/pthread.h: Add support for fully exception-based
8546 cleanup handling.
8547 * Makefile (libpthread-routines): Add cleanup_routine.
8548 Add more CFLAGS variables to compile with exceptions. Add comments
8549 why which file needs unwind tables.
8550 (tests) [have-forced-unwind==yes]: Add tst-cancelx* and tst-cleanupx*
8551 tests.
8552 * tst-cancelx1.c: New file.
8553 * tst-cancelx2.c: New file.
8554 * tst-cancelx3.c: New file.
8555 * tst-cancelx4.c: New file.
8556 * tst-cancelx5.c: New file.
8557 * tst-cancelx6.c: New file.
8558 * tst-cancelx7.c: New file.
8559 * tst-cancelx8.c: New file.
8560 * tst-cancelx9.c: New file.
8561 * tst-cancelx10.c: New file.
8562 * tst-cancelx11.c: New file.
8563 * tst-cancelx12.c: New file.
8564 * tst-cancelx13.c: New file.
8565 * tst-cancelx14.c: New file.
8566 * tst-cancelx15.c: New file.
8567 * tst-cleanupx0.c: New file.
8568 * tst-cleanupx0.expect: New file.
8569 * tst-cleanupx1.c: New file.
8570 * tst-cleanupx2.c: New file.
8571 * tst-cleanupx3.c: New file.
8572
8573 * tst-cleanup0.c: Make standard compliant.
8574 * tst-cleanup1.c: Likewise.
8575
8576 * sysdeps/unix/sysv/linux/sem_timedwait.c: Add cancellation support.
8577 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
8578 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
8579 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
8580 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
8581 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
8582 * sysdeps/i386/tcb-offsets.sym: Add RESULT, CANCELHANDLING, and
8583 CLEANUP_JMP_BUF.
8584 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
8585 * tst-cancel12.c: New file.
8586 * tst-cancel13.c: New file.
8587 * tst-cancel14.c: New file.
8588 * tst-cancel15.c: New file.
8589 * Makefile (tests): Add tst-cancel12, tst-cancel13, tst-cancel14,
8590 and tst-cancel15.
8591
8592 * tst-cancel1.c: Add some comments.
8593
8594 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Compute relative
8595 timeout correctly.
8596
8597 2003-06-06 Ulrich Drepper <drepper@redhat.com>
8598
8599 * Makefile (CFLAGS-pthread_cancel.c): Define.
8600
8601 2003-06-05 Ulrich Drepper <drepper@redhat.com>
8602
8603 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_rwlock_t):
8604 Change type of __writer element to int.
8605 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8606 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
8607 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
8608 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
8609 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
8610 * sysdeps/i386/tcb-offsets.sym: Replace SELF entry with TID entry.
8611 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
8612 * pthread_rwlock_trywrlock.c: Store TID not self pointer in __writer.
8613 Compare with TID to determine deadlocks.
8614 * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
8615 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
8616 * sysdeps/pthread/pthread_rwlock_timedwrlock.: Likewise.
8617 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
8618 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
8619 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8620 Likewise.
8621 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8622 Likewise.
8623 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8624 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
8625 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
8626 Likewise.
8627 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
8628 Likewise.
8629 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
8630 * Makefile (tests): Add tst-rwlock12.
8631 * tst-rwlock12.c: New file.
8632
8633 2003-06-05 Jakub Jelinek <jakub@redhat.com>
8634
8635 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait,
8636 __lll_timedlock_wait, lll_unlock_wake_cb, __lll_timedwait_tid):
8637 Remove bogus hidden_proto.
8638 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
8639 Likewise.
8640 * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_lock,
8641 lll_unlock_wake_cb, ___lll_timedwait_tid): Likewise.
8642 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (___lll_mutex_lock,
8643 ___lll_mutex_timedlock): Likewise.
8644
8645 2003-06-04 Ulrich Drepper <drepper@redhat.com>
8646
8647 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
8648 (__pthread_cond_signal): Add some code to eventually handle
8649 cond_lock!=0.
8650
8651 2003-06-01 Ulrich Drepper <drepper@redhat.com>
8652
8653 * Makefile (tests): Add tst-exec4.
8654 (tst-exec4-ARGS): Define.
8655 * tst-exec4.c: New file.
8656
8657 2003-05-31 Ulrich Drepper <drepper@redhat.com>
8658
8659 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
8660 Also fail if tv_nsec < 0.
8661 (__lll_timedwait_tid): Likewise.
8662 * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
8663 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_timedwait_tid):
8664 Likewise.
8665 * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_timedwait_tid):
8666 Likewise.
8667 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (__lll_mutex_timedlock):
8668 Likewise.
8669 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
8670 Likewise.
8671 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_timedwait_tid):
8672 Likewise.
8673 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_timedwait_tid):
8674 Likewise.
8675
8676 * Makefile (tests): Add tst-sem8 and tst-sem9.
8677 * tst-sem8.c: New file.
8678 * tst-sem9.c: New file.
8679 * sem_open.c: Fix creation of in_use record if the file exists but
8680 no internal record.
8681
8682 * posix-timer.h: Remove old, unused timer_id2ptr and timer_ptr2id
8683 definitions.
8684
8685 * sysdeps/pthread/timer_create.c (timer_create): In case
8686 evp==NULL, assign timer ID to sival_ptr.
8687
8688 * descr.h (struct pthread_unwind_buf): Change type of prev element to
8689 struct pthread_unwind_buf *.
8690 (struct pthread): Likewise for cleanup_jmp_buf element.
8691
8692 * cleanup.c (__pthread_register_cancel): Add cast to avoid warning.
8693 * cleanup_defer.c (__pthread_register_cancel_defer): Likewise.
8694 * unwind.c (__pthread_unwind_next): Likewise.
8695
8696 2003-05-30 Ulrich Drepper <drepper@redhat.com>
8697
8698 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
8699 (lll_futex_timed_wait): Use int for futex value parameter.
8700 (lll_futex_wake): Likewise.
8701 (lll_futex_requeue): Likewise.
8702
8703 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
8704 Replace one memory operation with one register operation.
8705
8706 * tst-join4.c (do_test): Fix error message.
8707
8708 * tst-rwlock6.c (do_test): Use correct format specifier.
8709
8710 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
8711 (__lll_mutex_lock_wait): Replace one memory operation with one
8712 register operation.
8713 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S
8714 (__lll_mutex_lock_wait): Likewise.
8715
8716 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
8717 (__lll_mutex_cond_lock): Add one to value parameter of
8718 __lll_lock_wait to reflect reality in the futex syscall.
8719 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
8720 (lll_mutex_cond_lock): Likewise.
8721
8722 2003-05-30 Jakub Jelinek <jakub@redhat.com>
8723
8724 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_cond_lock):
8725 New function.
8726 (lll_mutex_cond_lock): Define.
8727
8728 2003-05-29 Ulrich Drepper <drepper@redhat.com>
8729
8730 * Makefile (tests): Add tst-signal6.
8731 * tst-signal6.c: New file.
8732
8733 * sysdeps/unix/sysv/linux/s390/lowlevellock.h
8734 (__lll_mutex_unlock_force): New function
8735 (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
8736
8737 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
8738 (__lll_mutex_unlock_force): New function.
8739 (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
8740
8741 * tst-rwlock7.c (do_test): Use correct format specifier.
8742
8743 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue):
8744 Find break parameter in correct asm argument.
8745
8746 2003-05-27 Jakub Jelinek <jakub@redhat.com>
8747
8748 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_clobbers):
8749 Remove out4.
8750 (lll_futex_requeue): Fix __o3 constraint, return negative errno if
8751 error occured.
8752 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
8753 Add __mutex.
8754 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_REQUEUE,
8755 lll_futex_requeue, lll_mutex_unlock_force): Define.
8756
8757 2003-05-30 Jakub Jelinek <jakub@redhat.com>
8758
8759 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
8760 (pthread_cond_t): Add __mutex.
8761 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_REQUEUE,
8762 lll_futex_requeue, lll_mutex_unlock_force): Define.
8763
8764 2003-05-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
8765
8766 * sysdeps/sh/tcb-offsets.sym: Define MUTEX_FUTEX.
8767 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
8768 Add __mutex field.
8769 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (SYSCALL_WITH_INST_PAD):
8770 Define.
8771 (lll_futex_wait, lll_futex_wake): Define.
8772 * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: New file.
8773 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Try using
8774 FUTEX_REQUEUE instead of FUTEX_WAIT.
8775 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
8776 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Remember
8777 mutex which was used in condvar structure. Call
8778 __pthread_mutex_cond_lock instead of __pthread_mutex_lock_internal.
8779 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
8780
8781 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Don't
8782 include tcb-offsets.h. Read wakeup value in locked region.
8783 Use the value of gbr register as THREAD_ID.
8784 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
8785 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
8786 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
8787
8788 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Remove futex related
8789 macros.
8790
8791 2003-05-28 Ulrich Drepper <drepper@redhat.com>
8792
8793 * sysdeps/pthread/pthread_cond_broadcast.c
8794 (__pthread_cond_broadcast): Fix typo: MAX_INT -> INT_MAX.
8795
8796 2003-05-26 Ulrich Drepper <drepper@redhat.com>
8797
8798 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Fix
8799 typo in register name.
8800 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use parameters
8801 correctly. Actually use requeue. Little optimization.
8802 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Store
8803 mutex address early. Handle cancellation state as 32-bit value.
8804 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8805 Remove unnecessary label.
8806
8807 2003-05-25 Ulrich Drepper <drepper@redhat.com>
8808
8809 * sysdeps/pthread/pthread_cond_broadcast.c: Try using FUTEX_REQUEUE
8810 instead of FUTEX_WAIT.
8811 * sysdeps/pthread/pthread_cond_signal.c: Likewise.
8812 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
8813 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
8814 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
8815 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
8816 * sysdeps/pthread/pthread_cond_timedwait.c: Remember mutex which was
8817 used in condvar structure. Call __pthread_mutex_cond_lock instead
8818 of __pthread_mutex_lock_internal.
8819 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8820 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8821 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
8822 (__condvar_cleanup): Always call __pthread_mutex_cond_lock.
8823 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8824 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8825 * sysdeps/unix/sysv/linux/Makefile (libpthread-sysdep_routines):
8826 Add pthread_mutex_cond_lock.
8827 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add dep_mutex.
8828 * sysdeps/unix/sysv/linux/pthread_cond_mutex_lock.c: New file.
8829 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define
8830 lll_mutex_cond_lock.
8831 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
8832 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
8833 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
8834 Add __mutex field.
8835 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8836 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
8837
8838 * sysdeps/i386/tcb-offsets.sym: Define MUTEX_FUTEX.
8839 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
8840
8841 * pthreadP.h: Declare __pthread_mutex_cond_lock.
8842 * pthread_mutex_lock.c: Define LLL_MUTEX_LOCK if not already defined.
8843 Use it instead of lll_mutex_lock. If __pthread_mutex_lock is a
8844 macro don't define aliases.
8845
8846 * cancellation.c: Remove __pthread_enable_asynccancel_2.
8847 * pthreadP.h: Remove declaration of __pthread_enable_asynccancel_2.
8848 * sysdeps/pthread/pthread_cond_timedwait.c: Use
8849 __pthread_enable_asynccancel instead of __pthread_enable_asynccancel_2.
8850 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8851 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8852 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
8853 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8854 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8855
8856 2003-05-17 Ulrich Drepper <drepper@redhat.com>
8857
8858 * sem_open.c: Fix one endless loop. Implement correct semantics
8859 wrt opening the same semaphore more then once.
8860 * sem_close.c: Adjust for sem_open change.
8861 * semaphoreP.h: Include <semaphore.h>. Define struct inuse_sem.
8862 Declare __sem_mappings, __sem_mappings_lock, __sem_search.
8863 * Makefile (tests): Add tst-sem7.
8864 * tst-sem7.c: New file.
8865
8866 2003-05-16 Roland McGrath <roland@redhat.com>
8867
8868 * sysdeps/unix/sysv/linux/register-atfork.c (libc_freeres_fn): Fix
8869 uninitialized variable braino.
8870
8871 2003-05-16 Ulrich Drepper <drepper@redhat.com>
8872
8873 * sysdeps/unix/sysv/linux/timer_gettime.c (timer_gettime): Correct
8874 test for syscall availability.
8875
8876 * sysdeps/unix/sysv/linux/timer_settime.c (timer_settime): Set
8877 __no_posix_timers to -1 if the syscalls don't exist.
8878
8879 * pthread_join.c (pthread_join): Set tid field of the joined
8880 thread to -1. This isn't necessary but helps to recognize some
8881 error conditions with almost no cost.
8882
8883 * allocatestack.c (FREE_P): Also negative values indicate an
8884 unused stack.
8885
8886 * unwind.c: Include <unistd.h>.
8887
8888 2003-05-14 Ulrich Drepper <drepper@redhat.com>
8889
8890 * Makefile ($(objpfx)$(multidir)): Add rule to create the directory.
8891
8892 2003-05-14 Jakub Jelinek <jakub@redhat.com>
8893
8894 * Makefile (crti-objs, crtn-objs): New variables.
8895 (omit-deps, extra-objs): Add crtn.
8896 ($(objpfx)libpthread.so): Depend on both crti and crtn
8897 and links to them in multidir.
8898 ($(objpfx)crtn.S, $(objpfx)crtn.o): New rules.
8899
8900 2003-05-12 Steven Munroe <sjmunroe@us.ibm.com>
8901
8902 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
8903 (lll_mutex_unlock): Use atomic_exchange_rel.
8904
8905 2003-05-11 Ulrich Drepper <drepper@redhat.com>
8906
8907 * cond-perf.c (cons): Add missing locking around setting of alldone.
8908
8909 2003-05-10 Ulrich Drepper <drepper@redhat.com>
8910
8911 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Remove futex
8912 related macros.
8913 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
8914
8915 2003-05-09 Ulrich Drepper <drepper@redhat.com>
8916
8917 * tst-sem6.c: New file.
8918 * Makefile (tests): Add tst-sem6.
8919
8920 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (___lll_mutex_unlock):
8921 Use atomic_exchange_rel instead of atomic_exchange.
8922 * sysdeps/unix/sysv/linux/lowlevellock.c (lll_unlock_wake_cb):
8923 Likewise.
8924
8925 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Improve quality of
8926 code for lll_futex_wait and lll_futex_wake in static apps. Use
8927 vsyscall is possible.
8928
8929 * sysdeps/unix/sysv/linux/pthread_getaffinity.c: New file.
8930 * sysdeps/unix/sysv/linux/pthread_setaffinity.c: New file.
8931 * sysdeps/pthread/pthread.h: Declare pthread_getaffinity_np and
8932 pthread_setaffinity_np.
8933 * Versions [libpthread] (GLIBC_2.3.3): Add pthread_getaffinity_np
8934 and pthread_setaffinity_np.
8935 * Makefile (libpthread-routines): Add pthread_getaffinity and
8936 pthread_setaffinity.
8937
8938 * allocatestack.c (allocate_stack): If ARCH_RETRY_MMAP is defined,
8939 use it in case mmap to allocate the stack fails.
8940 * sysdeps/unix/sysv/linux/x86_64/Makefile: Don't define
8941 ARCH_MAP_FLAGS here.
8942 * sysdeps/x86_64/pthreaddef.h: Define ARCH_MAP_FLAGS and
8943 ARCH_RETRY_MMAP.
8944
8945 2003-05-08 Ulrich Drepper <drepper@redhat.com>
8946
8947 * sysdeps/unix/sysv/linux/fork.c: Complete rewrite of the atfork
8948 handler implementation. It is now lockless in fork().
8949 * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
8950 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
8951 * sysdeps/unix/sysv/linux/fork.h: Don't include <link.h>. Don't
8952 declare the __fork_*_lists.
8953 (struct fork_handler): Include pointers to all three functions.
8954 Add next, refcntr and need_signal elements.
8955 (__fork_handlers): New declaration.
8956 (__register_atfork_malloc): Remove declaration.
8957 (HAVE_register_atfork_malloc): Remove definition.
8958 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove
8959 __pthread_child_handler variable.
8960 (__libc_pthread_init): Use __register_atfork instead of explicitly
8961 adding to the list.
8962 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define lll_futex_wait
8963 and lll_futex_wake.
8964 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
8965
8966 * unwind.c (unwind_cleanup): Print error message and then abort. This
8967 function must never be reached.
8968
8969 * cond-perf.c: New file.
8970
8971 2003-05-05 Ulrich Drepper <drepper@redhat.com>
8972
8973 * sysdeps/i386/tls.h (TLS_INIT_TP): Include \n in error message.
8974
8975 2003-05-04 Roland McGrath <roland@redhat.com>
8976
8977 * Makefile ($(objpfx)../libc.so): New target.
8978
8979 2003-05-02 Ulrich Drepper <drepper@redhat.com>
8980
8981 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
8982 (pthread_condattr_t): Size is only an int, don't use long for
8983 alignment.
8984 (pthread_mutexattr_t): Likewise.
8985 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8986 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
8987 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
8988
8989 2003-05-01 Ulrich Drepper <drepper@redhat.com>
8990
8991 * sysdeps/i386/tls.h: Define THREAD_ID.
8992 * sysdeps/ia64/tls.h: Likewise.
8993 * sysdeps/powerpc/tls.h: Likewise.
8994 * sysdeps/s390/tls.h: Likewise.
8995 * sysdeps/sh/tls.h: Likewise.
8996 * sysdeps/x86_64/tls.h: Likewise.
8997 * pthread_mutex_lock.c: Use THREAD_ID instead of THREAD_SELF to
8998 record ownership.
8999 * pthread_mutex_timedlock.c: Likewise.
9000 * pthread_mutex_trylock.c: Likewise.
9001 * pthread_mutex_unlock.c: Likewise.
9002 * pthread_rwlock_trywrlock.c: Likewise.
9003 * sysdeps/pthread/pthread_rwlocklock_rdlock.c: Likewise.
9004 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
9005 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
9006 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
9007
9008 * sysdeps/pthread/createthread.c (create_thread): Use CLONE_SYSVSEM
9009 flag.
9010
9011 2003-04-29 Jakub Jelinek <jakub@redhat.com>
9012
9013 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
9014 (__SIZEOF_PTHREAD_COND_T): Define to 48.
9015 (pthread_rwlock_t): Add 16 bytes of pad instead of 8 before __flags.
9016 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
9017 Make __align long long instead of long.
9018 (pthread_rwlock_t): Formatting.
9019 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
9020 (pthread_rwlock_t): Formatting.
9021 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
9022 (pthread_cond_t): Make __align long long instead of long.
9023 (pthread_rwlock_t): Move __flags field to the same position as in
9024 linuxthreads.
9025
9026 2003-04-30 Ulrich Drepper <drepper@redhat.com>
9027
9028 * tst-rwlock6.c (do_test): Use correct printf format specifiers.
9029 * tst-rwlock7.c (do_test): Likewise.
9030
9031 2003-04-26 Roland McGrath <roland@redhat.com>
9032
9033 * Makefile ($(test-modules)): Depend on $(common-objpfx)shlib.lds.
9034
9035 2003-04-22 Jakub Jelinek <jakub@redhat.com>
9036
9037 * allocatestack.c (TLS_TPADJ): Add TLS_PRE_TCB_SIZE instead of
9038 sizeof (struct pthread).
9039 (allocate_stack): Subtract TLS_PRE_TCB_SIZE bytes instead of
9040 1 struct pthread.
9041 * sysdeps/powerpc/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Define
9042 to 0.
9043 (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Define to alignment of
9044 struct pthread.
9045 (TLS_PRE_TCB_SIZE): Increase to cover tcbhead_t preceeded by pad
9046 to 32-bit bytes.
9047 (INSTALL_DTV, GET_DTV, THREAD_DTV): tcbhead_t is immediately before
9048 tcbp.
9049 (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Don't add TLS_TCB_SIZE
9050 unneccessarily.
9051 (NO_TLS_OFFSET): Define.
9052 * sysdeps/unix/sysv/linux/powerpc/createthread.c (TLS_VALUE): Don't
9053 add TLS_TCB_SIZE unnecessarily.
9054
9055 2003-04-22 Roland McGrath <roland@redhat.com>
9056
9057 * Makeconfig (shared-thread-library): Reverse link order to work
9058 around linker bug.
9059
9060 2003-04-22 Ulrich Drepper <drepper@redhat.com>
9061
9062 * semaphore.h: Fix typo in comment.
9063
9064 2003-04-21 Ulrich Drepper <drepper@redhat.com>
9065
9066 * sysdeps/pthread/sigfillset.c: New file.
9067
9068 * init.c (__pthread_initialize_minimal): Don't block SIGTIMER.
9069 * pthreadP.h: Make SIGTIMER and SIGCANCEL the same.
9070 * sysdeps/pthread/pthread_sigmask.c: Remove handling of SIGTIMER.
9071 * sysdeps/pthread/sigaction.c: Likewise.
9072 * sysdeps/pthread/sigprocmask.c: New file.
9073 * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): Define as
9074 __SIGRTMIN+1.
9075 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
9076 Block SIGTIMER. Also handle SI_TKILL events and terminate thread
9077 in this case.
9078
9079 2003-04-19 Ulrich Drepper <drepper@redhat.com>
9080
9081 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
9082 (DL_SYSINFO_IMPLEMENTATION): Add .eh_frame information.
9083
9084 * sysdeps/unix/sysv/linux/unregister-atfork.c
9085 (__unregister_atfork): Don't free memory not allocated dynamically.
9086
9087 * semaphore.h: Remove __THROW marker from cancellation points.
9088 * nptl/sysdeps/pthread/pthread.h: Likewise.
9089
9090 2003-04-18 Ulrich Drepper <drepper@redhat.com>
9091
9092 * sysdeps/pthread/pthread.h: Don't mark pthread_testcancel,
9093 pthread_cancel, pthread_setcancelstate, and pthread_setcanceltype with
9094 __THROW.
9095
9096 2003-04-16 Jakub Jelinek <jakub@redhat.com>
9097
9098 * tst-cancel4.c (do_test): Use %zd instead of %d when printing cnt.
9099
9100 2003-04-15 Roland McGrath <roland@redhat.com>
9101
9102 * forward.c (__pthread_unwind): Tweak to avoid warning.
9103
9104 2003-04-15 Ulrich Drepper <drepper@redhat.com>
9105
9106 * pthreadP.h: Move THREAD_ATOMIC_* replacements to the top.
9107
9108 2003-04-14 Ulrich Drepper <drepper@redhat.com>
9109
9110 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Don't
9111 overflow CFA advance instructions.
9112 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
9113
9114 2003-04-14 Jakub Jelinek <jakub@redhat.com>
9115
9116 * sysdeps/i386/tls.h: Rename LOCK to LOCK_PREFIX.
9117 * sysdeps/i386/pthread_spin_lock.c: Likewise.
9118 * sysdeps/x86_64/tls.h: Likewise. Define LOCK_PREFIX if not already
9119 defined.
9120
9121 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Use
9122 DW_CFA_advance_loc2 for .Laddl-.Lsubl.
9123 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
9124 DW_CFA_advance_loc for .Laddl-.Lsubl.
9125
9126 2003-04-13 Ulrich Drepper <drepper@redhat.com>
9127
9128 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Don't use
9129 position-independent unwind data for static libraries.
9130 Add missing unwind info. Add comments.
9131
9132 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Add unwind info.
9133 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
9134 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
9135 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9136
9137 2003-04-12 Ulrich Drepper <drepper@redhat.com>
9138
9139 * Makefile: Make sure all cancellation points are compiled with
9140 exception and asynchronous unwind tables.
9141
9142 * sysdeps/x86_64/tls.h (THREAD_SETMEM): Word around compiler bug
9143 which mishandles loading of global object addresses in PIC.
9144 (THREAD_SETMEM_NC): Likewise.
9145
9146 2003-04-11 Ulrich Drepper <drepper@redhat.com>
9147
9148 * pthread.h: Define new data structure for cleanup buffer. Declare
9149 new cleanup handler interfaces.
9150 * descr.h: Include <unwind.h> if necessary. Define pthread_unwind_buf.
9151 (struct pthread): Add cleanup_jmp_buf pointer. Define
9152 HAVE_CLEANUP_JMP_BUF and not HAVE_CANCELBUF.
9153 * pthreadP.h: Declare __pthread_unwind. Define __do_cancel to use
9154 it. Declare old cleanup handler installation functions.
9155 * cleanup.c: Rewrite. Install handler for unwind-based cleanup
9156 handling.
9157 * cleanup_defer.c: Likewise.
9158 * cleanup_compat.c: New file. Old cleanup code.
9159 * cleanup_def_compat.c: New file. Old cleanup code.
9160 * pthread_create.c (start_thread): Initialize cleanup_jmp_buf element
9161 if own thread descriptor.
9162 * unwind.c: New file.
9163 * forward.c: Add __pthread_unwind.
9164 * init.c (pthread_functions): Add __pthread_unwind.
9165 * sysdeps/pthread/pthread-functions.s (struct pthread_functions):
9166 Add ptr___pthread_unwind.
9167 * Versions [GLIBC_2.3.3] (libpthread): Export new cleanup handling
9168 and unwind function.
9169 * Makefile (libpthread-routines): Add cleanup_compat,
9170 cleanup_def_compat, and unwind. Define CFLAGS to enable unwind
9171 table generation if necessary.
9172 * version.c: Record whether unwind support is compiled in.
9173 * sysdeps/pthread/configure.in: Add checks for unwind unterfaces.
9174 * sysdeps/pthread/bits/libc-lock.h: Add prototypes of the old cleanup
9175 handler interfaces.
9176 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add quite a bit of
9177 complication to generate unwind information for syscall wrappers.
9178 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
9179 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
9180 __cleanup_fct_attribute.
9181
9182 * Makefile: Add rules to build and run tst-cleanup0.
9183 * tst-cleanup0.c: New file.
9184 * tst-cleanup0.expect: New file.
9185
9186 * pthread_create.c (deallocate_tsd): Don't take parameter. Adjust
9187 caller. Optimize to avoid often unecessary local variable.
9188
9189 2003-04-11 Roland McGrath <roland@redhat.com>
9190
9191 * Makefile ($(objpfx)multidir.mk): New target, generated makefile that
9192 sets variable `multidir'; include that.
9193 (generated): Add it.
9194 ($(objpfx)$(multidir)/crti.o): New target.
9195 [$(multidir) != .] (generated-dirs, extra-objs, omit-deps): Add it.
9196
9197 2003-04-11 Ulrich Drepper <drepper@redhat.com>
9198
9199 * tst-attr2.c (do_test): Add cast to avoid warning.
9200 * tst-mutex4.c (do_test): Likewise.
9201
9202 2003-04-10 Ulrich Drepper <drepper@redhat.com>
9203
9204 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset CPU clocks
9205 in child.
9206
9207 2003-04-09 Ulrich Drepper <drepper@redhat.com>
9208
9209 * Makefile (tests): Add tst-detach1.
9210 * tst-detach1.c: New file.
9211
9212 2003-04-08 Ulrich Drepper <drepper@redhat.com>
9213
9214 * sysdeps/pthread/pthread.h: Remove duplicate
9215 pthread_cleanup_{push,pop} definitions.
9216
9217 * tst-barrier2.c: Eliminate warnings.
9218 * tst-cancel4.c: Likewise.
9219 * tst-cond4.c: Likewise.
9220 * tst-cond6.c: Likewise.
9221 * tst-detach1.c: Likewise.
9222 * tst-rwlock4.c: Likewise.
9223 * tst-rwlock6.c: Likewise.
9224 * tst-rwlock7.c: Likewise.
9225 * tst-sem3.c: Likewise.
9226 * tst-spin2.c: Likewise.
9227 * tst-umask1.c: Likewise.
9228
9229 2003-04-07 Ulrich Drepper <drepper@redhat.com>
9230
9231 * pthread_detach.c (pthread_detach): Fix test for invalid TID.
9232
9233 2003-04-06 Ulrich Drepper <drepper@redhat.com>
9234
9235 * descr.h (struct pthread): Move cancelhandling member to the front.
9236
9237 2003-04-05 Ulrich Drepper <drepper@redhat.com>
9238
9239 * sysdeps/unix/sysv/linux/register-atfork.c: Define malloc_prepare,
9240 malloc_parent, and malloc_child statically.
9241 (__register_atfork_malloc): New function.
9242 (free_mem): Don't free any of the malloc_* variables on the list.
9243 * sysdeps/unix/sysv/linux/fork.h: Declare __register_atfork_malloc.
9244 Define HAVE_register_atfork_malloc.
9245
9246 2003-04-04 Ulrich Drepper <drepper@redhat.com>
9247
9248 * sysdeps/pthread/createthread.c (create_thread): Add some more
9249 comments explaining when to set multiple_threads and when not.
9250
9251 * pthreadP.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
9252 THREAD_ATOMIC_BIT_SET if not already defined.
9253 * sysdeps/i386/tls.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
9254 THREAD_ATOMIC_BIT_SET:
9255 * sysdeps/x86_64/tls.h: Likewise.
9256 * cleanup_defer.c (_pthread_cleanup_push_defer): Rewrite to use
9257 THREAD_ATOMIC_CMPXCHG_VAL.
9258 (_pthread_cleanup_pop_restore): Likewise.
9259 * cancellation.c (__pthread_enable_asynccancel): Likewise.
9260 (__pthread_enable_asynccancel_2): Likewise.
9261 (__pthread_disable_asynccancel): Likewise.
9262 * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
9263 (__libc_disable_asynccancel): Likewise.
9264 * init.c (sigcancel_handler): Likewise.
9265 * pthread_setcancelstate.c (__pthread_setcancelstate): Likewise.
9266 * pthread_setcanceltype.c (__pthread_setcanceltype): Likewise.
9267
9268 2003-04-03 Ulrich Drepper <drepper@redhat.com>
9269
9270 * init.c (sigcancel_handler): Don't set EXITING_BIT here.
9271 * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
9272 * pthreadP.h (__do_cancel): Set EXITING_BIT here.
9273 * Makefile (tests): Add tst-cancel11.
9274 * tst-cancel11.c: New file.
9275
9276 2003-04-01 Ulrich Drepper <drepper@redhat.com>
9277
9278 * pthread_create.c (deallocate_tsd): Clear/free memory after the last
9279 round, not the first. Use specific_used flag instead of local
9280 found_nonzero variable. Use THREAD_[SG]ETMEM where possible.
9281 (__free_tcb): Don't call deallocate_tsd here.
9282 (start_thread): Call deallocate_tsd here.
9283 * pthread_setspecific.c: Set specific_used flag really only when
9284 needed.
9285 * Makefile (tests): Add tst-tsd3.c and tst-tsd4.
9286 * tst-tsd3.c: New file.
9287 * tst-tsd4.c: New file.
9288
9289 2003-03-31 Ulrich Drepper <drepper@redhat.com>
9290
9291 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_mutex_lock):
9292 Use atomic_exchange_and_add instead of __lll_add.
9293 (__lll_mutex_timedlock): Likewise.
9294 Patch by Ian Wienand.
9295
9296 2003-03-24 Steven Munroe <sjmunroe@us.ibm.com>
9297
9298 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
9299 (SINGLE_THREAD_P): Fix typo.
9300 * tst-cancel-wrappers.sh: Handle '.'ed symbols.
9301
9302 2003-03-31 Ulrich Drepper <drepper@redhat.com>
9303
9304 * Makefile (tests): Add tst-align.
9305 * tst-align.c: New file.
9306 * sysdeps/i386/Makefile: Define CFLAGS-tst-align.
9307
9308 * sysdeps/i386/tls.h (CALL_THREAD_FCT): Align stack of called
9309 function correctly.
9310
9311 * tst-tsd2.c: Add casts to avoid warnings.
9312
9313 2003-03-30 Ulrich Drepper <drepper@redhat.com>
9314
9315 * descr.h (struct pthread): Move most often used elements to the front.
9316
9317 2003-03-29 Ulrich Drepper <drepper@redhat.com>
9318
9319 * Makefile (libpthread-routines): Add pthread_atfork.
9320 (libpthread-static-only-routines): Add pthread_atfork.
9321
9322 2003-03-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
9323
9324 * sysdeps/sh/tls.h: Include nptl/descr.h after the definition
9325 of TLS_DTV_AT_TP.
9326 (INSTALL_DTV): Add parens.
9327 (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
9328 Use passed descr instead of THREAD_SELF.
9329 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S
9330 (__lll_mutex_timedlock_wait): Correct expected value after
9331 spurious wakeup.
9332 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S:
9333 Release lock before waking up the waiters.
9334 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Correct exit
9335 criteria. Reorderstruct passed to cleanup handler. Fix
9336 handling of cancellation and failung pthread_mutex_unlock call.
9337 Use __pthread_enable_asynccancel_2 instead of
9338 __pthread_enable_asynccancel.
9339 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
9340 Return result of lock re-get if it fails.
9341 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Fix wrong argument
9342 for __pthread_cleanup_push.
9343 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Fix
9344 completely broken rwlock implementation.
9345 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
9346 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
9347 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
9348 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
9349 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
9350 * sysdeps/unix/sysv/linux/sh/sem_post.S: Fix error value. Use
9351 versioned_symbol macro.
9352 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Use versioned_symbol macro.
9353 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
9354
9355 2003-03-27 Ulrich Drepper <drepper@redhat.com>
9356
9357 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Don't declare
9358 __timer_helper_thread. Declare __start_helper_thread, __helper_once,
9359 and __helper_tid.
9360 (struct timer): Remove th and bar field.
9361 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Remove
9362 debugging code. Create only one helper thread.
9363 * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Don't kill
9364 helper thread.
9365 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
9366 Renamed. Define statically. Use thread info from siginfo.
9367 (__helper_once): New variable.
9368 (__helper_tid): New variable.
9369 (__reset_helper_control): New function.
9370 (__start_helper_thread): New function.
9371
9372 * pthread_create.c (start_thread): Don't use setjmp inside
9373 __builtin_expect to work around gcc bug.
9374
9375 * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Even if
9376 timer_delete syscall fails, but not with ENOSYS, set
9377 __no_posix_timers.
9378
9379 * sysdeps/unix/sysv/linux/timer_settime.c [!__ASSUME_POSIX_TIMERS]
9380 (timer_settime): Fix typo.
9381 * sysdeps/unix/sysv/linux/timer_getoverr.c
9382 [!__ASSUME_POSIX_TIMERS] (timer_getoverrun): Likewise.
9383
9384 2003-03-27 Jakub Jelinek <jakub@redhat.com>
9385
9386 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Fix
9387 offset of cleanupbuf.__prev.
9388
9389 2003-03-26 Jakub Jelinek <jakub@redhat.com>
9390
9391 * sysdeps/unix/sysv/linux/timer_getoverr.c: Fix typo in name
9392 of included file.
9393
9394 2003-03-26 Ulrich Drepper <drepper@redhat.com>
9395
9396 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): If EVP ==
9397 NULL provide default definition to syscall.
9398
9399 2003-03-25 Roland McGrath <roland@redhat.com>
9400
9401 * sysdeps/pthread/posix-timer.h (TIMER_MAX): Define if not defined.
9402 (timer_id2ptr): Fix typo.
9403
9404 2003-03-25 Ulrich Drepper <drepper@redhat.com>
9405
9406 * pthreadP.h: Define SIGCANCEL and SIGTIMER.
9407 * sysdeps/i386/pthreaddef.h: Remove SIGCANCEL definition.
9408 * sysdeps/ia64/pthreaddef.h: Likewise.
9409 * sysdeps/powerpc/pthreaddef.h: Likewise.
9410 * sysdeps/s390/pthreaddef.h: Likewise.
9411 * sysdeps/sh/pthreaddef.h: Likewise.
9412 * sysdeps/x86_64/pthreaddef.h: Likewise.
9413 * init.c (__pthread_initialize_minimal): Block SIGTIMER.
9414 * sysdeps/pthread/sigaction.c: Also prevent SIGTIMER handler from
9415 being changed.
9416 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
9417 SIGTIMER is not unblocked.
9418 * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): One more
9419 RT signal taken.
9420 * sysdeps/unix/sysv/linux/pthread_kill.c: Do not allow SIGTIMER to
9421 be send.
9422 * sysdeps/pthread/posix-timer.h (timer_id2ptr, timer_ptr2id): Just
9423 pass pointer through as ID.
9424 * sysdeps/unix/sysv/linux/bits/local_lim.h (TIMER_MAX): Removed.
9425 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: New file.
9426 * sysdeps/unix/sysv/linux/timer_create.c: New file.
9427 * sysdeps/unix/sysv/linux/timer_delete.c: New file.
9428 * sysdeps/unix/sysv/linux/timer_getoverr.c: New file.
9429 * sysdeps/unix/sysv/linux/timer_gettime.c: New file.
9430 * sysdeps/unix/sysv/linux/timer_routines.c: New file.
9431 * sysdeps/unix/sysv/linux/timer_settime.c: New file.
9432 * sysdeps/unix/sysv/linux/ia64/Versions: New file.
9433 * sysdeps/unix/sysv/linux/ia64/timer_create.c: New file.
9434 * sysdeps/unix/sysv/linux/ia64/timer_delete.c: New file.
9435 * sysdeps/unix/sysv/linux/ia64/timer_getoverr.c: New file.
9436 * sysdeps/unix/sysv/linux/ia64/timer_gettime.c: New file.
9437 * sysdeps/unix/sysv/linux/ia64/timer_settime.c: New file.
9438 * sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions: New file.
9439 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_create.c: New file.
9440 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_delete.c: New file.
9441 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_getoverr.c: New file.
9442 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_gettime.c: New file.
9443 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_settime.c: New file.
9444 * sysdeps/unix/sysv/linux/s390/s390-64/Versions: New file.
9445 * sysdeps/unix/sysv/linux/s390/s390-64/timer_create.c: New file.
9446 * sysdeps/unix/sysv/linux/s390/s390-64/timer_delete.c: New file.
9447 * sysdeps/unix/sysv/linux/s390/s390-64/timer_getoverr.c: New file.
9448 * sysdeps/unix/sysv/linux/s390/s390-64/timer_gettime.c: New file.
9449 * sysdeps/unix/sysv/linux/s390/s390-64/timer_settime.c: New file.
9450 * sysdeps/unix/sysv/linux/x86_64/Versions: New file.
9451 * sysdeps/unix/sysv/linux/x86_64/compat-timer.h: New file.
9452 * sysdeps/unix/sysv/linux/x86_64/timer_create.c: New file.
9453 * sysdeps/unix/sysv/linux/x86_64/timer_delete.c: New file.
9454 * sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c: New file.
9455 * sysdeps/unix/sysv/linux/x86_64/timer_gettime.c: New file.
9456 * sysdeps/unix/sysv/linux/x86_64/timer_settime.c: New file.
9457
9458 * pthreadP.h: Remove FRAME_LEFT definition.
9459 * cleanup.c (_pthread_cleanup_push): Don't check for reference to
9460 already left frame. Programs which have this problem are not POSIX
9461 compliant.
9462 * cleanup_defer.c (_pthread_cleanup_push_defer): Likewise.
9463
9464 2003-03-24 Ulrich Drepper <drepper@redhat.com>
9465
9466 * sysdeps/pthread/tst-timer.c: Check return values of the
9467 functions we test.
9468
9469 2003-03-23 Roland McGrath <roland@redhat.com>
9470
9471 * tst-tls3.c (do_test) [! HAVE___THREAD]: Don't test anything.
9472 * tst-tls3mod.c: Likewise.
9473 * tst-tls1.c: Likewise.
9474 * tst-tls2.c: Likewise.
9475
9476 * tst-mutex5.c (do_test): Unlock before destroy, otherwise we invoke
9477 undefined behavior.
9478
9479 * tst-join5.c (tf1, tf2): Add a cast.
9480
9481 * Makeconfig (includes): Append -I$(..)nptl to this variable.
9482
9483 * tst-barrier2.c (do_test) [! _POSIX_THREAD_PROCESS_SHARED]:
9484 Don't test anything.
9485 * tst-cond4.c: Likewise.
9486 * tst-cond6.c: Likewise.
9487 * tst-flock2.c: Likewise.
9488 * tst-mutex4.c: Likewise.
9489 * tst-rwlock4.c: Likewise.
9490 * tst-signal1.c: Likewise.
9491 * tst-spin2.c: Likewise.
9492 * tst-cond11.c [! _POSIX_CLOCK_SELECTION]: Likewise.
9493
9494 * tst-mutex4.c: Use test-skeleton.c.
9495 * tst-spin2.c: Likewise.
9496 * tst-sysconf.c: Likewise.
9497 * tst-barrier2.c: Likewise.
9498 * tst-cond4.c: Likewise.
9499 * tst-cond6.c: Likewise.
9500 * tst-rwlock4.c: Likewise.
9501 * tst-unload.c: Likewise.
9502 * tst-flock2.c (do_test): Use return instead of exit.
9503
9504 2003-03-22 Jakub Jelinek <jakub@redhat.com>
9505
9506 * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
9507
9508 2003-03-21 Ulrich Drepper <drepper@redhat.com>
9509
9510 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
9511 (__lll_mutex_trylock): Use atomic_compare_and_exchange_val_acq
9512 instead of __lll_compare_and_swap.
9513 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
9514 Likewise.
9515 Removed definition if __lll_compare_and_swap.
9516
9517 * cancellation.c: Adjust for new form of compare&exchange macros.
9518 * cleanup_defer.c: Likewise.
9519 * init.c: Likewise.
9520 * libc-cancellation.c: Likewise.
9521 * old_pthread_cond_broadcast.c: Likewise.
9522 * old_pthread_cond_signal.c: Likewise.
9523 * old_pthread_cond_timedwait.c: Likewise.
9524 * old_pthread_cond_wait.c: Likewise.
9525 * pthread_cancel.c: Likewise.
9526 * pthread_create.c: Likewise.
9527 * pthread_detach.c: Likewise.
9528 * pthread_join.c: Likewise.
9529 * pthread_key_delete.c: Likewise.
9530 * pthread_setcancelstate.c: Likewise.
9531 * pthread_setcanceltype.c: Likewise.
9532 * pthread_timedjoin.c: Likewise.
9533 * pthread_tryjoin.c: Likewise.
9534 * sysdeps/pthread/createthread.c: Likewise.
9535
9536 2003-03-20 Ulrich Drepper <drepper@redhat.com>
9537
9538 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Include <atomic.h>.
9539 Remove __lll_add, __lll_dec_if_positive, and __lll_test_and_set
9540 definitions. Replace uses with calls to atomic_* functions.
9541 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
9542 * sysdeps/unix/sysv/linux/lowlevellock.c: Replace __lll_add and
9543 __lll_test_and_set calls with atomic_exchange_and_add and
9544 atomic_exchange calls respectively.
9545 * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
9546 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
9547 * sysdeps/unix/sysv/linux/sem_trywait.c: Likewise.
9548 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
9549 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Likewise.
9550 * sysdeps/unix/sysv/linux/ia64/sem_port.c: Likewise.
9551 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
9552
9553 * allocatestack.c (allocate_stack): Assume atomic_exchange_and_add
9554 returns the old value.
9555
9556 2003-03-20 Martin Schwidefsky <sky@mschwid3.boeblingen.de.ibm.com>
9557
9558 * sysdeps/s390/pthread_spin_lock.c (pthread_spin_lock): Use type
9559 int for variable OLDVAL and correct inline assembler contraint.
9560 * sysdeps/s390/pthread_spin_trylock.c (pthread_spin_trylock): Use
9561 type int for variable OLD.
9562
9563 * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it
9564 only for s390-32.
9565 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
9566 (SINGLE_THREAD_P): Use global variable __local_multiple_threads
9567 instead of multiple_threads field in the TCB.
9568
9569 2003-03-19 Ulrich Drepper <drepper@redhat.com>
9570
9571 * sysdeps/i386/i686/bits/atomic.h: Removed.
9572 * sysdeps/i386/i586/bits/atomic.h: Removed.
9573 * sysdeps/i386/i486/bits/atomic.h: Removed. Moved to glibc.
9574 * sysdeps/x86_64/bits/atomic.h: Removed. Moved to glibc.
9575 * sysdeps/s390/bits/atomic.h: Removed. Moved to glibc.
9576 * sysdeps/sh/bits/atomic.h: Removed. Moved to glibc.
9577 * sysdeps/ia64/bits/atomic.h: Removed. Moved to glibc.
9578 * sysdeps/powerpc/bits/atomic.h: Removed. Moved to glibc.
9579 * atomic.h: Removed. Moved to glibc.
9580
9581 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Add
9582 support for clock selection.
9583
9584 * sysdeps/pthread/pthread_cond_broadcast.c: Release lock before
9585 signalling waiters.
9586
9587 2003-03-18 Roland McGrath <roland@redhat.com>
9588
9589 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
9590 Add __lll_rel_instr first. Add memory clobber.
9591 (lll_mutex_unlock): Use __lll_test_and_set.
9592 From Paul Mackerras <paulus@samba.org>.
9593
9594 * sysdeps/powerpc/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define
9595 unconditionally.
9596 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
9597 (SINGLE_THREAD_P): Add `header.' prefix.
9598 From Paul Mackerras <paulus@samba.org>.
9599
9600 * Versions (libpthread: GLIBC_2.3.2): Move pthread_tryjoin_np and
9601 pthread_timedjoin_np to ...
9602 (libpthread: GLIBC_2.3.3): ... here.
9603 (libpthread: GLIBC_2.2): Move pthread_barrierattr_getpshared there too.
9604
9605 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
9606 Avoid shadowing VAL variable.
9607
9608 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
9609 New macro.
9610
9611 2003-03-18 Ulrich Drepper <drepper@redhat.com>
9612
9613 * Makefile (tests): Add tst-cond11.
9614 * tst-cond11.c: New file.
9615
9616 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Reorder
9617 struct passed to cleanup handler to eliminate one more
9618 instruction.
9619 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9620
9621 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
9622 (pthrad_cond_t): Replace __unused field with __clock.
9623
9624 * sysdeps/pthread/pthread_cond_wait.c: Release condvar lock before
9625 waken all waiters in cleanup handler.
9626 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
9627 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
9628
9629 * pthread_condattr_getclock.c: New file.
9630 * pthread_condattr_setclock.c: New file.
9631 * sysdeps/pthread/pthread.h: Declare these new functions.
9632 * Versions [GLIBC_2.3.3] (libpthread): Add the new functions.
9633 * Makefile (libpthread-routines): Add the new functions.
9634 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_condattr):
9635 Renamed field to value. Document use of the bits.
9636 * pthread_condattr_getpshared.c: Adjust for struct pthread_condattr
9637 change.
9638 * pthread_condattr_setpshared.c: Likewise.
9639 * pthread_cond_init.c (__pthread_cond_init): Initialized __clock field.
9640 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add cond_clock symbol.
9641 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
9642 Add __clock field.
9643 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
9644 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
9645 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
9646 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
9647 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
9648 Implement clock selection.
9649 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
9650 * pthread-errnos.sym: Add ENOSYS.
9651 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
9652 _POSIX_CLOCK_SELECTION.
9653 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
9654
9655 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Remove
9656 invalid .size directive.
9657
9658 2003-03-17 Roland McGrath <roland@redhat.com>
9659
9660 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
9661 Formatting tweaks.
9662
9663 2003-03-17 Ulrich Drepper <drepper@redhat.com>
9664
9665 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Use __builtin_expect.
9666 Use __lll_add instead of spelling it out. Use protected symbol names.
9667 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Use __builtin_expect.
9668 Use __lll_add.
9669 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_compare_and_swap):
9670 Renamed from lll_compare_and_swap. Use new name where necessary.
9671 (__lll_add): Defined.
9672 (__lll_dec_if_positive): Defined.
9673 (__lll_test_and_set): Defined.
9674 * sysdeps/ia64/pthread_spin_init.c: Removed.
9675 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Removed.
9676 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Removed.
9677 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Removed.
9678 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Removed.
9679 * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: Removed.
9680 * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: Removed.
9681 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Removed.
9682 * sysdeps/ia64/bits/atomic.h: Add __builtin_expect where appropriate.
9683 * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
9684 __sync_lock_release_si.
9685 Patch by Jakub Jelinek.
9686
9687 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
9688 Fix timeout handling.
9689 (__lll_timedwait_tid): Likewise.
9690 (lll_unlock_wake_cb): Wake up other waiters if necessary.
9691 Patch by Jakub Jelinek.
9692
9693 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Pretty printing.
9694
9695 2003-03-17 Roland McGrath <roland@redhat.com>
9696
9697 PowerPC port contributed by Paul Mackerras <paulus@samba.org>.
9698 * sysdeps/pthread/pthread_spin_init.c: New file.
9699 * sysdeps/pthread/pthread_spin_unlock.c: New file.
9700 * sysdeps/powerpc/Makefile: New file.
9701 * sysdeps/powerpc/pthread_spin_lock.c: New file.
9702 * sysdeps/powerpc/pthread_spin_trylock.c: New file.
9703 * sysdeps/powerpc/pthreaddef.h: New file.
9704 * sysdeps/powerpc/tcb-offsets.sym: New file.
9705 * sysdeps/powerpc/td_ta_map_lwp2thr.c: New file.
9706 * sysdeps/powerpc/tls.h: New file.
9707 * sysdeps/powerpc/bits/atomic.h: New file.
9708 * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: New file.
9709 * sysdeps/unix/sysv/linux/libc-lowlevellock.c: New file.
9710 * sysdeps/unix/sysv/linux/lowlevellock.c: New file.
9711
9712 * sysdeps/unix/sysv/linux/lowlevelmutex.c: New file.
9713 * sysdeps/unix/sysv/linux/sem_post.c: New file.
9714 * sysdeps/unix/sysv/linux/sem_timedwait.c: New file.
9715 * sysdeps/unix/sysv/linux/sem_trywait.c: New file.
9716 * sysdeps/unix/sysv/linux/sem_wait.c: New file.
9717 * sysdeps/unix/sysv/linux/powerpc/Makefile: New file.
9718 * sysdeps/unix/sysv/linux/powerpc/createthread.c: New file.
9719 * sysdeps/unix/sysv/linux/powerpc/fork.c: New file.
9720 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: New file.
9721 * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: New file.
9722 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: New file.
9723 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: New file.
9724 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: New file.
9725 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
9726 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New file.
9727
9728 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Use __gettimeofday,
9729 not gettimeofday.
9730 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Likewise.
9731 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
9732 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Likewise.
9733 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Likewise.
9734 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
9735
9736 2003-03-17 Ulrich Drepper <drepper@redhat.com>
9737
9738 * sysdeps/pthread/pthread_cond_wait.c: Correct exit criteria.
9739 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
9740 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9741 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
9742 Patch by Ewald Snel <ewald@rambo.its.tudelft.nl>.
9743
9744 2003-03-16 Roland McGrath <roland@redhat.com>
9745
9746 * tst-fork4.c: Include <string.h>.
9747 * tst-signal2.c: Likewise.
9748 * tst-mutex5.c (do_test): exit -> return.
9749 * tst-mutex2.c: Include <stdlib.h>.
9750
9751 2003-03-16 Ulrich Drepper <drepper@redhat.com>
9752
9753 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
9754 (__lll_mutex_timedlock_wait): Correct expected value after
9755 spurious wakeup. Otherwise we would never wait again.
9756
9757 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Work around red
9758 zone versus inline asm stupidity. Use correct instructions.
9759
9760 * tst-rwlock6.c: Add some more status output.
9761
9762 2003-03-15 Roland McGrath <roland@redhat.com>
9763
9764 * sysdeps/pthread/configure.in: New file.
9765 * sysdeps/pthread/configure: New file (generated).
9766
9767 2003-03-15 Ulrich Drepper <drepper@redhat.com>
9768
9769 * allocatestack.c (allocate_stack): Store the exact stack size of
9770 user allocated stacks.
9771
9772 2003-03-15 Jakub Jelinek <jakub@redhat.com>
9773
9774 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
9775 (SINGLE_THREAD): Use `header' prefix instead of `header.data'.
9776 * sysdeps/sh/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
9777 * sysdeps/sh/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define.
9778 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
9779 Use `header.' prefix.
9780 * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
9781
9782 2003-03-15 Ulrich Drepper <drepper@redhat.com>
9783
9784 * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Don't use
9785 __builtin_frame_address, use stack pointer.
9786
9787 * sysdeps/unix/sysv/linux/jmp-unwind.c: Use CURRENT_STACK_FRAME
9788 instead of __builtin_frame_pointer.
9789
9790 2003-03-14 Ulrich Drepper <drepper@redhat.com>
9791
9792 * tst-basic1.c (do_test): Add cast to avoid warning.
9793 * tst-basic2.c (do_test): Likewise.
9794
9795 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use correct
9796 amount of stack correction.
9797
9798 * tst-fork4.c: Use test-skeleton.c.
9799
9800 2003-03-14 Roland McGrath <roland@redhat.com>
9801
9802 * init.c: Fix typo "#eli" for "#else".
9803
9804 2003-03-14 Steven Munroe <sjmunroe@us.ibm.com>
9805
9806 * allocatestack.c (__stack_user): Use hidden_data_def.
9807 * pthread_create.c (__pthread_keys): Likewise.
9808
9809 * init.c [__powerpc__] (__NR_set_tid_address): Define it.
9810
9811 2003-03-14 Roland McGrath <roland@redhat.com>
9812
9813 * tst-fork4.c: New file.
9814 * Makefile (tests): Add it.
9815
9816 * descr.h (struct pthread): Move the union out of [!TLS_DTV_AT_TP], so
9817 we always define the padding space.
9818 [!TLS_DTV_AT_TP]: Give tcbhead_t field a name, `header', since GCC
9819 stopped supporting its own extensions fully.
9820 [TLS_MULTIPLE_THREADS_IN_TCB]: Put `multiple_threads' inside a wrapper
9821 struct also called `header', so `header.multiple_threads' is the field
9822 name to use on all machines.
9823 * allocatestack.c (allocate_stack): Use `header.' prefix.
9824 * sysdeps/pthread/createthread.c (create_thread): Likewise.
9825 * pthread_create.c (__pthread_create_2_1): Likewise.
9826 * sysdeps/i386/tls.h (INSTALL_NEW_DTV, THREAD_DTV): Likewise.
9827 (THREAD_SELF): Likewise.
9828 * sysdeps/x86_64/tls.h: Likewise.
9829 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
9830 (SINGLE_THREAD_P): Likewise.
9831 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
9832 (SINGLE_THREAD_P): Likewise.
9833 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
9834 (SINGLE_THREAD_P): Likewise.
9835
9836 * sysdeps/s390/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Use REGS[18]
9837 value directly.
9838
9839 2003-03-14 Ulrich Drepper <drepper@redhat.com>
9840
9841 * pthread_create.c (start_thread): Use CALL_THREAD_FCT if defined.
9842 * sysdeps/i386/tls.h: Define CALL_THREAD_FCT.
9843
9844 * pthread_create.c (start_thread): setjmp is expected to return 0.
9845
9846 * sysdeps/x86_64/tls.h (THREAD_GETMEM): Mark asms volatile.
9847 (THREAD_GETMEM_NC): Likewise.
9848
9849 2003-03-13 Ulrich Drepper <drepper@redhat.com>
9850
9851 * allocatestack.c (allocate_stack): If MULTI_PAGE_ALIASING is defined
9852 and the size of the stack which must be allocated is a multiple,
9853 allocate one more page.
9854 * sysdeps/i386/i686/Makefile: Don't define COLORING_INCREMENT, but
9855 MULTI_PAGE_ALIASING.
9856
9857 2003-03-13 Roland McGrath <roland@redhat.com>
9858
9859 * pthread_create.c (start_thread): Set EXITING_BIT after the
9860 event-reporting (and destructors), not before.
9861
9862 2003-03-13 Jakub Jelinek <jakub@redhat.com>
9863
9864 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_timed_wait,
9865 lll_futex_wake): Declare register variables as long int instead of
9866 unsigned long int. Patch by Ian Wienand <ianw@gelato.unsw.edu.au>.
9867 Make syscall arguments clobbered by the syscall.
9868 (lll_futex_wait): Define using lll_futex_timed_wait.
9869
9870 * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Cast regs[13]
9871 to void *.
9872
9873 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Only declare and set
9874 PPID if [! NDEBUG].
9875
9876 * allocatestack.c (nptl_ncreated): Only declare if
9877 COLORING_INCREMENT != 0.
9878
9879 * pthreadP.h (__pthread_enable_asynccancel_2): New prototype.
9880 (__libc_enable_asynccancel_2): Remove prototype.
9881
9882 * sysdeps/unix/sysv/linux/ia64/fork.c (ARCH_FORK): Swap ptid and
9883 ctid to match kernel.
9884
9885 2003-03-12 Ulrich Drepper <drepper@redhat.com>
9886
9887 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add
9888 libc_multiple_threads.
9889 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Move definition of
9890 __libc_multiple_threads to...
9891 * sysdeps/unix/sysv/linux/libc_multiple_threads.c: ...here. New file.
9892
9893 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Remove unnecessary
9894 versioning.
9895 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
9896 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
9897
9898 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
9899 (__pthread_once_internal): Define.
9900
9901 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Use shlib-compat.h
9902 macros instead of .symver directly.
9903 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
9904 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
9905
9906 * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Include tcb-offsets.h.
9907 * sysdeps/x86_64/tcb-offsets.sym: New file.
9908 * sysdeps/x86_64/Makefile: New file.
9909
9910 * sysdeps/i386/tcb-offsets.sym: Add SELF.
9911 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use SELF
9912 to access own pthread_t in TCB.
9913 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
9914 Likewise.
9915 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
9916 Likewise.
9917 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
9918
9919 2003-03-12 Roland McGrath <roland@redhat.com>
9920
9921 * pthread-errnos.sym: New file.
9922 * Makefile (gen-as-const-headers): New variable, list that file.
9923 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include generated
9924 header <pthread-errnos.h> instead of defining errno values here.
9925 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
9926 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
9927 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
9928 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
9929 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
9930 Likewise.
9931 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
9932 Likewise.
9933 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
9934 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9935 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
9936 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
9937 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
9938 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
9939 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
9940 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
9941 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
9942 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
9943 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
9944 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
9945 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
9946 * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
9947 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
9948 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
9949 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
9950 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
9951 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
9952 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
9953 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
9954 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
9955 * sysdeps/i386/i486/pthread_spin_trylock.S: Likewise.
9956 * sysdeps/x86_64/pthread_spin_trylock.S: Likewise.
9957 * sysdeps/sh/pthread_spin_trylock.S: Likewise.
9958 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
9959 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
9960
9961 * sysdeps/unix/sysv/linux/fork.c: Add an assert to check that
9962 CLONE_CHILD_SETTID worked.
9963
9964 2003-03-12 Ulrich Drepper <drepper@redhat.com>
9965
9966 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: New
9967 file.
9968 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S: New
9969 file.
9970
9971 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
9972 (pthread_cond_t): Add padding.
9973
9974 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: New file.
9975 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: New file.
9976 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: New file.
9977
9978 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
9979 (__pthread_rwlock_timedwrlock): Add missing opcode suffix.
9980 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
9981 (__pthread_rwlock_timedrdlock): Likewise.
9982 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
9983 (__pthread_rwlock_wrlock): Likewise.
9984 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
9985 (__pthread_rwlock_rdlock): Likewise.
9986
9987 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: New file.
9988
9989 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Return
9990 result of lock re-get if it fails.
9991
9992 2003-03-11 Ulrich Drepper <drepper@redhat.com>
9993
9994 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Fix asm syntax.
9995 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
9996 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
9997 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
9998 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
9999 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
10000 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
10001 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
10002 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
10003 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
10004
10005 * sysdeps/x86_64/tls.h (THREAD_SELF, THREAD_GETMEM, THREAD_GETMEM_NC,
10006 THREAD_SETMEM, THREAD_SETMEM_NC): Correct asm syntax.
10007
10008 * allocatestack.c [! TLS_MULTIPLE_THREADS_IN_TCB] (allocate_stack):
10009 Initialize *__libc_multiple_threads_ptr not __libc_multiple_threads.
10010 * sysdeps/pthread/createthread.c [! TLS_MULTIPLE_THREADS_IN_TCB]
10011 (create_thread): Likewise.
10012 Define __pthread_multiple_threads and __libc_multiple_threads_ptr.
10013 * init.c (__pthread_initialize_minimal_internal): Initialize
10014 __libc_multiple_threads_ptr if necessary.
10015 * pthreadP.h: Adjust prototype for __libc_pthread_init. Declare
10016 __pthread_multiple_threads and __libc_multiple_threads_ptr.
10017 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Define
10018 __libc_multiple_threads.
10019 (__libc_pthread_init): Return pointer to __libc_pthread_init if
10020 necessary.
10021
10022 * sysdeps/i386/tls.h (THREAD_SETMEM): Fix one-byte variant.
10023 (THREAD_SETMEM_NC): Likewise.
10024
10025 * sysdeps/x86_64/pthread_spin_trylock.c: Removed.
10026 * sysdeps/x86_64/pthread_spin_trylock.S: New file.
10027 * sysdeps/x86_64/pthread_spin_unlock.c: Removed.
10028 * sysdeps/x86_64/pthread_spin_unlock.S: New file.
10029
10030 * sysdeps/i386/i486/pthread_spin_trylock.S (pthread_spin_trylock):
10031 Eliminate one entire instruction.
10032
10033 * cancellation.c (__pthread_enable_asynccancel_2): New function.
10034 * pthreadP.h: Declare __pthread_enable_asynccancel_2.
10035 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
10036 (__pthread_cond_timedwait): Use __pthread_enable_asynccancel_2
10037 instead of __pthread_enable_asynccancel.
10038 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
10039 (__pthread_cond_wait): Likewise.
10040 * sysdeps/pthread/pthread_cond_timedwait.c
10041 (__pthread_cond_timedwait): Likewise.
10042 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
10043
10044 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
10045 (__condvar_cleanup): Wake up all waiters in case we got signaled
10046 after being woken up but before disabling asynchronous
10047 cancellation.
10048 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
10049 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
10050 (__condvar_cleanup): Likewise.
10051
10052 * init.c (__NR_set_tid_address): If already defined, don't redefine.
10053 Make it an error if architecture has no #if case. Add x86-64.
10054
10055 * sysdeps/unix/sysv/linux/x86_64/Makefile: Add flags for
10056 pt-initfini.s generation.
10057
10058 * sysdeps/x86_64/tls.h: Include <asm/prctl.h>.
10059 (TLS_INIT_TP): Fix typo.
10060
10061 2003-03-11 Jakub Jelinek <jakub@redhat.com>
10062
10063 * sysdeps/ia64/bits/atomic.h (atomic_exchange_and_add): Swap 2nd and
10064 3rd argument of __arch_compare_and_exchange_{32,64}_val_acq.
10065
10066 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Include semaphore.h.
10067 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
10068 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Likewise.
10069 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Likewise.
10070 * sysdeps/unix/sysv/linux/s390/sem_post.c: Likewise.
10071 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
10072 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
10073 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
10074
10075 2003-03-11 Ulrich Drepper <drepper@redhat.com>
10076
10077 * sysdeps/pthread/pthread_cond_timedwait.c
10078 (__pthread_cond_timedwait): Return the result of the final
10079 locking. If it succeeds, the regular function return value.
10080
10081 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait):
10082 Return result of the final locking.
10083 * version.c (__nptl_main): Work around problems with the strange
10084 INTERNAL_SYSCALL macro on ppc32.
10085 * init.c (__pthread_initialize_minimal_internal): Unblock
10086 SIGCANCEL in case the parent blocked it.
10087 Reported by Paul Mackerras <paulus@samba.org>.
10088
10089 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: New file.
10090 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: New file.
10091 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: New file.
10092
10093 2003-03-11 Jakub Jelinek <jakub@redhat.com>
10094
10095 * sysdeps/pthread/pthread_cond_timedwait.c
10096 (__pthread_cond_timedwait): Unlock and fail if
10097 __pthread_mutex_unlock_internal failed.
10098
10099 * sysdeps/pthread/createthread.c (ARCH_CLONE): Define if not defined.
10100 (create_thread): Only assert PD->tcb != NULL under [TLS_TCB_AT_TP].
10101 Use ARCH_CLONE.
10102 * allocatestack.c (ALLOCATE_STACK_PARMS): New macro.
10103 [NEED_SEPARATE_REGISTER_STACK] (STACK_VARIABLES,
10104 STACK_VARIABLES_ARGS, STACK_VARIABLES_PARMS, ALLOCATE_STACK_PARMS,
10105 ALLOCATE_STACK): New macros.
10106 (TLS_TPADJ): New macro.
10107 (get_cached_stack, queue_stack, __deallocate_stack): Use TLS_TPADJ.
10108 (allocate_stack): Handle TLS_DTV_AT_TP and
10109 NEED_SEPARATE_REGISTER_STACK. Use TLS_TPADJ.
10110 * pthread_create.c (__pthread_create_2_1) [! TLS_TCB_AT_TP]:
10111 Don't set PD->self.
10112 * init.c [__ia64__] (__NR_set_tid_address): Define.
10113
10114 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: New file.
10115 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: New file.
10116 * sysdeps/unix/sysv/linux/ia64/fork.c: New file.
10117 * sysdeps/unix/sysv/linux/ia64/createthread.c: New file.
10118 * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: New file.
10119 * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: New file.
10120 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: New file.
10121 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: New file.
10122 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: New file.
10123 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
10124 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: New file.
10125 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: New file.
10126 * sysdeps/unix/sysv/linux/ia64/sem_post.c: New file.
10127 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: New file.
10128 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: New file.
10129 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: New file.
10130 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
10131 * sysdeps/ia64/bits/atomic.h: New file.
10132 * sysdeps/ia64/Makefile: New file.
10133 * sysdeps/ia64/pthread_spin_init.c: New file.
10134 * sysdeps/ia64/pthread_spin_lock.c: New file.
10135 * sysdeps/ia64/pthread_spin_trylock.c: New file.
10136 * sysdeps/ia64/pthread_spin_unlock.c: New file.
10137 * sysdeps/ia64/pthreaddef.h: New file.
10138 * sysdeps/ia64/tcb-offsets.sym: New file.
10139 * sysdeps/ia64/td_ta_map_lwp2thr.c: New file.
10140 * sysdeps/ia64/tls.h: New file.
10141
10142 * sysdeps/s390/pthreaddef.h (__exit_thread_inline): Pass 1 argument
10143 to syscall instead of no arguments.
10144
10145 2003-03-10 Ulrich Drepper <drepper@redhat.com>
10146
10147 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: New file.
10148 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: New file.
10149 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: New file.
10150 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: New file.
10151
10152 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Fix error value in
10153 unused code.
10154
10155 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: New file
10156
10157 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
10158 lowlevelbarrier.sym.
10159 * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: New file.
10160 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S:
10161 Include lowlevelbarrier.h and don't define offsets locally.
10162 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Likewise.
10163
10164 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
10165 (__lll_mutex_lock_wait): Reverse order of first two parameters.
10166 (__lll_mutex_timedlock_wait): Likewise.
10167 (lll_mutex_lock): Adjust asm for that.
10168 (lll_mutex_timedlock): Likewise. Mark cx, cc, r10 as clobbered.
10169 (lll_lock): Adjust asm for operand order change.
10170 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: New file.
10171 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: New file.
10172
10173 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_lock_wait):
10174 Reverse order of parameters.
10175 (__lll_timedwait_tid): Remove regparms attribute.
10176 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: New file.
10177 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: New file.
10178
10179 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
10180 (__lll_timedwait_tid): Remove one unnecessary instruction.
10181
10182 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Define
10183 __lll_mutex_timedlock_wait only for NOT_IN_libc.
10184 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Include
10185 lowlevelmutex.S.
10186
10187 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
10188 lll_unlock_wake_cb, __lll_wait_tid, and __lll_timedwait_tid only
10189 for NOT_IN_libc.
10190 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Include
10191 lowlevellock.S.
10192
10193 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Don't define
10194 LOCK is already defined. Don't define __lll_mutex_timedlock_wait
10195 for libc.so.
10196 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Only
10197 define LOCK here (if UP is not defined). The actual code is in
10198 lowlevelmutex.S.
10199
10200 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Don't define
10201 LOCK is already defined. Don't define lll_unlock_wake_cb and
10202 __lll_timedwait_tid for libc.so.
10203 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Only
10204 define LOCK here (if UP is not defined). The actual code is in
10205 lowlevellock.S.
10206
10207 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Not needed anymore.
10208 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: Likewise.
10209 * sysdeps/unix/sysv/linux/s390/sem_post.c: Include lowlevellock.h
10210 instead of lowlevelsem.h.
10211 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
10212 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
10213 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
10214
10215 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
10216 lowlevelrwlock.sym.
10217 * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: New file.
10218 * sysdeps/unix/sysv/linux/i386/lowlevelrwlock.h: Removed.
10219 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: Removed.
10220
10221 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_trylock): Fix
10222 register loading.
10223 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_trylock): Undo
10224 last changed. D'oh.
10225
10226 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: New file.
10227
10228 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove declaration
10229 of __libc_locking_needed.
10230 (lll_trylock): Initialize %eax to zero.
10231
10232 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Update
10233 pthread_cond_t definition.
10234
10235 2003-03-10 Roland McGrath <roland@redhat.com>
10236
10237 * sysdeps/unix/sysv/linux/lowlevelcond.sym: New file.
10238 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add it.
10239 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: File removed.
10240 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: Likewise.
10241 * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: Likewise.
10242
10243 * allocatestack.c (allocate_stack) [!TLS_MULTIPLE_THREADS_IN_TCB]:
10244 Instead of setting PD->multiple_threads, set globals
10245 __pthread_multiple_threads and __libc_multiple_threads.
10246 * sysdeps/pthread/createthread.c (create_thread): Likewise.
10247 * sysdeps/i386/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it.
10248 * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Likewise.
10249
10250 * descr.h (struct pthread): Conditionalize first member on
10251 [!TLS_DTV_AT_TP]. Replace the `header' member with an anonymous union
10252 containing an anonymous tcbhead_t. Move `list' member out.
10253 [TLS_MULTIPLE_THREADS_IN_TCB]: Define a `multiple_threads' member.
10254 * allocatestack.c: Remove use of `header.data.' prefix.
10255 * pthread_create.c: Likewise.
10256 * init.c (__pthread_initialize_minimal_internal): Likewise.
10257 * sysdeps/pthread/createthread.c (create_thread): Likewise.
10258 * sysdeps/i386/tls.h (INSTALL_DTV): Add parens.
10259 (THREAD_SELF, THREAD_DTV, INSTALL_NEW_DTV): No `header.data.' prefix.
10260 * sysdeps/x86_64/tls.h: Likewise.
10261 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
10262 (SINGLE_THREAD_P): Likewise.
10263 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
10264 (SINGLE_THREAD_P): Likewise.
10265 * sysdeps/i386/tls.h (tcbhead_t): Remove `list' member.
10266 * sysdeps/s390/tls.h (tcbhead_t): Likewise.
10267
10268 2003-03-09 Ulrich Drepper <drepper@redhat.com>
10269
10270 * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: New file.
10271
10272 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
10273 * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
10274
10275 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix many
10276 leftovers from the ia32 code.
10277
10278 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Remove unneccessary
10279 memory load.
10280 (clear_once_control): Don't load %esi.
10281
10282 * sysdeps/x86_64/tls.h: Remove all traces of segment descriptor
10283 handling.
10284
10285 * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
10286
10287 * sysdeps/unix/sysv/linux/s390/createthread.c: Moved to...
10288 * sysdeps/unix/sysv/linux/createthread.c: ...here.
10289
10290 * Makefile (tests): Add tst-cond10.
10291 * tst-cond10.c: New file.
10292
10293 2003-03-08 Ulrich Drepper <drepper@redhat.com>
10294
10295 * tst-tls2.c (do_test): Add TEMP_FAILURE_RETRY around sem_wait call.
10296 * tst-signal3.c (do_test): Likewise.
10297 * tst-sem5.c (do_test): Likewise.
10298 * tst-kill6.c (do_test): Likewise.
10299 * tst-tls3.c (do_test): Likewise. Include <errno.h>.
10300
10301 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use add/sub instead
10302 of inc/dec.
10303 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
10304 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise
10305 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
10306 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
10307 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
10308 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
10309 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
10310 Likewise.
10311 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
10312 Likewise.
10313 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
10314 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
10315 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10316 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
10317 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
10318 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
10319 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
10320 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
10321
10322 * allocatestack.c (allocate_stack): If mprotect() fails free the
10323 TLS memory.
10324
10325 2003-03-07 Ulrich Drepper <drepper@redhat.com>
10326
10327 * sysdeps/i386/i486/bits/atomic.h: Fix a few unused definitions.
10328
10329 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove all trace of
10330 lll_wake_tid. This was used only to work around kernel limits in
10331 the early days.
10332 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
10333 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Likewise.
10334 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
10335 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
10336
10337 * init.c (__static_tls_align_m1): Renamed from __static_tls_align.
10338 (__pthread_initialize_minimal_internal): Change initialization of
10339 __static_tls_align_m1 appropriately.
10340 * pthreadP.h (__static_tls_align_m1): Renamed from
10341 __static_tls_align.
10342 * allocatestack.c (allocate_stack): Use __static_tls_align_m1
10343 instead of __static_tls_align-1.
10344
10345 2003-03-04 Ulrich Drepper <drepper@redhat.com>
10346
10347 * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
10348
10349 * pthread_create.c: Define __pthread_keys using nocommon
10350 attribute, not by placing it explicitly in bss.
10351 Remove DEFINE_DEALLOC definition. Not needed anymore.
10352
10353 * allocatestack.c: Define ARCH_MAP_FLAGS if not already defined.
10354 Use it in mmap call to allocate stacks.
10355
10356 * sysdeps/pthread/createthread.c (create_thread): Fix comment.
10357
10358 * pthread_create.c (start_thread): Use THREAD_SETMEM to store
10359 result of the thread function.
10360
10361 2003-03-03 Ulrich Drepper <drepper@redhat.com>
10362
10363 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: Removed. The generic
10364 version is just fine.
10365
10366 * sysdeps/unix/sysv/linux/libc_pthread_init.c
10367 (__pthread_child_handler): Renamed from pthread_child_handler,
10368 exported, and marked hidden. Change all users.
10369 * sysdeps/unix/sysv/linux/register-atfork.c (free_mem): Do not
10370 free __pthread_child_handler from child list.
10371
10372 2003-03-03 Martin Schwidefsky <schwidefsky@de.ibm.com>
10373
10374 * atomic.h (atomic_exchange_and_add): Return newval, not oldval.
10375
10376 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
10377 Fix handling of cancellation and failing pthread_mutex_unlock call.
10378 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
10379 (__pthread_cond_wait): Likewise.
10380
10381 * sysdeps/pthread/pthread_rwlock_timedrdlock.c
10382 (pthread_rwlock_timedrdlock): Fix clobber of result variable by
10383 lll_futex_timed_wait call.
10384 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
10385 (pthread_rwlock_timedwrlock): Likewise.
10386
10387 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
10388 Don't define lll_unlock_wake_cb and ___lll_timedwait_tid in libc.so.
10389 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Remove XXX comments.
10390
10391 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Fix
10392 check of lll_futex_wake return value.
10393
10394 2003-03-03 Roland McGrath <roland@redhat.com>
10395
10396 * forward.c: Fix typo in __pthread_attr_init_2_0 compat_symbol decl.
10397
10398 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
10399 Argument to ptr___pthread_cleanup_upto is __jmp_buf, not jmp_buf.
10400 * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
10401
10402 2003-03-02 Ulrich Drepper <drepper@redhat.com>
10403
10404 * sysdeps/pthread/timer_create.c (timer_create): Return correct
10405 error for CPU clocks.
10406
10407 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
10408 _POSIX_MONOTONIC_CLOCK.
10409 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
10410
10411 * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
10412 recent kernels.
10413
10414 2003-03-01 Ulrich Drepper <drepper@redhat.com>
10415
10416 * descr.h (struct pthread): Move cleanup field to the front.
10417
10418 2003-03-01 Roland McGrath <roland@redhat.com>
10419
10420 * sem_open.c (sem_open): Braino fix.
10421
10422 2003-03-01 Ulrich Drepper <drepper@redhat.com>
10423
10424 * sysdeps/i386/tcb-offsets.sym: Add CLEANUP and CLEANUP_PREV.
10425 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Inline
10426 __pthread_cleanup_pop functionality.
10427 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10428
10429 * descr.h (struct pthread): Move tid field to the front now that
10430 it is often used.
10431
10432 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S
10433 (__lll_mutex_timedlock_wait): Remove.
10434 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
10435 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
10436 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
10437 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
10438 (lll_unlock_wake_cb): Don't save and restore %esi.
10439 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
10440 %esi.
10441 (__lll_timedwait_tid): Add alignment.
10442 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
10443 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
10444 %esi.
10445 (__lll_timedwait_tid): Removed.
10446 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
10447 (__pthread_cond_broadcast): Don't save, load, and restore %esi.
10448 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
10449 (pthread_barrier_wait): Don't save, load, and restore %esi for
10450 last thread.
10451 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
10452 (__pthread_cond_signal): Don't save, load, and restore %esi.
10453 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
10454 (__pthread_rwlock_unlock): Don't save, load, and restore %esi.
10455 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
10456 Don't save, load, and restore %esi.
10457
10458 2003-02-27 Ulrich Drepper <drepper@redhat.com>
10459
10460 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
10461 Release lock before waking up the waiters.
10462
10463 * tst-exit1.c (do_test): Don't start more than one thread in parallel.
10464
10465 * tst-rwlock9.c (writer_thread): Correct adding TIMEOUT.
10466 (reader_thread): Likewise.
10467
10468 * sysdeps/pthread/pthread_rwlock_unlock.c
10469 (__pthread_rwlock_unlock): Release internal lock early. Don't try
10470 to wake up readers if there are none.
10471
10472 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
10473 Release internal lock before wake threads.
10474
10475 2003-02-26 Ulrich Drepper <drepper@redhat.com>
10476
10477 * Makefile (tests): Add tst-rwlock10 and tst-rwlock11.
10478 * tst-rwlock8.c: Initialize lock with INIT. Allow INIT to be
10479 predefined.
10480 * tst-rwlock9.c: Likewise.
10481 * tst-rwlock10.c: New file.
10482 * tst-rwlock11.c: New file.
10483
10484 * Makefile (tests): Add tst-dlsym1.
10485 * tst-dlsym1.c: New file.
10486
10487 * init.c (__pthread_initialize_minimal_internal): Set
10488 GL(dl_error_catch_tsd) to __libc_dl_error_tsd.
10489 * Versions (libc:GLIBC_PRIVATE): Export __libc_dl_error_tsd.
10490
10491 2003-02-24 Ulrich Drepper <drepper@redhat.com>
10492
10493 * sem_open.c (sem_open): Fix handling of O_CREAT without O_EXCL.
10494
10495 * tst-cond2.c: Fix sychronization with child.
10496
10497 * tst-rwlock8.c (reader_thread): Remove unused variable.
10498
10499 * Makefile: Add rules to build and run tst-tls3.
10500 * tst-tls3.c: New file.
10501 * tst-tls3mod.c: New file.
10502
10503 * Makefile (tests): Add tst-rwlock8 and tst-rwlock9.
10504 * tst-rwlock8.c: New file.
10505 * tst-rwlock9.c: New file.
10506 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Fix
10507 complete broken rwlock implementation.
10508 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
10509 Likewise.
10510 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
10511 Likewise.
10512 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
10513 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
10514 * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
10515 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
10516 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
10517 * sysdeps/pthread/pthread_rwlock_unlock.c: Likewise.
10518 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
10519
10520 2003-02-23 Roland McGrath <roland@redhat.com>
10521
10522 * Makefile (nptl-version): Change regexp so case sensitivity is ok.
10523
10524 2003-02-23 Ulrich Drepper <drepper@redhat.com>
10525
10526 * Makefile (tests): Add tst-context1.
10527 * tst-context1.c: New file.
10528
10529 * Makefile (tests): Add tst-tls1 and tst-tls2.
10530 * tst-tls1.c: New file.
10531 * tst-tls2.c: New file.
10532
10533 * libc-cancellation.c (__libc_enable_asynccancel): Correct test
10534 for failed cmpxchg.
10535
10536 * pthread_create.c (start_thread): Set EXITING_BIT early.
10537
10538 * sysdeps/i386/tls.h (THREAD_GETMEM): Mark asm as volatile.
10539 (THREAD_GETMEM_NC): Likewise.
10540
10541 2003-02-22 Ulrich Drepper <drepper@redhat.com>
10542
10543 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Shave
10544 off 3 more bytes by using offset-less instructions when possible.
10545
10546 * Makefile: Add dependency for $(objpfx)version.d.
10547
10548 * eintr.c (eintr_source): Add unnecessary return but the compiler
10549 insists.
10550
10551 * tst-kill3.c: Include <unistd.h>.
10552
10553 2003-02-21 Roland McGrath <roland@redhat.com>
10554
10555 * pthread_create.c (start_thread): Call __libc_thread_freeres.
10556
10557 2003-02-21 Ulrich Drepper <drepper@redhat.com>
10558
10559 * Makefile (tests): Add tst-eintr1.
10560 (distribute): Add eintr.c.
10561 * tst-eintr1.c: New file.
10562 * eintr.c: New file.
10563
10564 * pthread_cancel.c (pthread_cancel): Use tkill directly.
10565
10566 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill):
10567 Disallow sending SIGCANCEL.
10568
10569 * Makefile (tests): Remove tst-basic7. Add tst-kill1, tst-kill2,
10570 tst-kill3, tst-kill4, tst-kill5, tst-kill6.
10571 * tst-kill1.c: New file.
10572 * tst-kill2.c: New file.
10573 * tst-kill3.c: New file.
10574 * tst-kill5.c: New file.
10575 * tst-kill6.c: New file.
10576 * tst-basic7.c: Renamed to...
10577 * tst-kill4.c: ...this.
10578
10579 2003-02-21 Roland McGrath <roland@redhat.com>
10580
10581 * Makefile (install-lib-ldscripts): New variable.
10582
10583 2003-02-21 Ulrich Drepper <drepper@redhat.com>
10584
10585 * pthreadP.h: Define INVALID_TD_P and INVALID_NOT_TERMINATED_TD_P.
10586 * pthread_cancel.c: Use INVALID_TD_P.
10587 * pthread_detach.c: Likewise.
10588 * pthread_getschedparam.c: Likewise.
10589 * pthread_setschedparam.c: Likewise.
10590 * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
10591 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
10592 * pthread_join.c: Use INVALID_NOT_TERMINATED_TD_P.
10593 * pthread_timedjoin.c: Likewise.
10594
10595 * tst-basic7.c: Include <signal.h>.
10596
10597 * pthread_join.c (pthread_join): Limited checking for invalid
10598 descriptors.
10599 * pthread_timedjoin.c (pthread_timedjoin_np): Likewise.
10600
10601 2003-02-20 Ulrich Drepper <drepper@redhat.com>
10602
10603 * pthread_create.c (deallocate_tsd): Reset found_nonzero at the
10604 beginning of the loop. Clear the entire first block of TSD.
10605 * Makefile (tests): Add tst-key4.
10606 * tst-key4.c: New file.
10607
10608 2003-02-18 Ulrich Drepper <drepper@redhat.com>
10609
10610 * Makefile (tests): Add tst-basic7.
10611 * tst-basic7.c: New file.
10612
10613 * pthread_create.c (deallocate_tsd): Mark as internal_function.
10614 Add some more __builtin_expect.
10615
10616 * pthreadP.h: Define dummy version of DEBUGGING_P.
10617
10618 2003-02-17 Ulrich Drepper <drepper@redhat.com>
10619
10620 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remnove
10621 _POSIX_THREAD_PRIORITY_SCHEDULING.
10622 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
10623 _XOPEN_REALTIME_THREADS.
10624 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
10625
10626 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): The
10627 kernel returns EINVAL for PID <= 0, work around it.
10628
10629 * Makefile (tests): Add tst-signal5.
10630 * tst-signal5.c: New file.
10631
10632 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
10633 and LOGIN_NAME_MAX.
10634
10635 * tst-cancel1.c (tf): Block all signals.
10636
10637 * Makefile (tests): Add tst-basic6.
10638 * tst-basic6.c: New file.
10639
10640 * tst-basic1.c: Add test for process ID.
10641
10642 * Makefile (tests): Add tst-cancel10.
10643 * tst-cancel10.c: New file.
10644
10645 * Makefile (tests): Add tst-signal4.
10646 * tst-signal4.c: New file.
10647
10648 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use
10649 __sigismember instead of sigismember. Add __builtin_expect.
10650
10651 2003-02-16 Ulrich Drepper <drepper@redhat.com>
10652
10653 * tst-attr1.c (do_test): Add tests for pthread_setcanceltype,
10654 pthread_setcancelstate, and pthread_rwlock_setpshared.
10655
10656 * tst-cancel7.c (do_test): Make sure the pid file exists before
10657 canceling the thread.
10658
10659 * tst-rwlock6.c: More pthread_rwlock_timedwrlock and
10660 pthread_rwlock_timedrdlock tests.
10661 * tst-rwlock7.c: More pthread_rwlock_timedwrlock tests.
10662 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
10663 Check for invalid tv_nsec field.
10664 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
10665 Likewise.
10666
10667 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Protect
10668 recursive mutex of overflow.
10669
10670 * tst-attr1.c (do_test): Add test for pthread_mutexattr_setpshared.
10671
10672 * libc-cancellation.c (__libc_enable_asynccancel): Rewrite to avoid
10673 going into an endless loop.
10674 * Makefile (tests): Add tst-cancel9.
10675 * tst-cancel9.c: New file.
10676
10677 * pthread_cancel.c (pthread_cancel): Use the result of __pthread_kill.
10678
10679 2003-02-15 Ulrich Drepper <drepper@redhat.com>
10680
10681 * tst-mutex5.c (do_test): Add more timedlock tests.
10682
10683 * tst-mutex2.c: Tests of trylock and unlock with ERROR mutexes.
10684 * tst-mutex3.c (do_test): Add tests for trylock with RECURSIVE mutexes.
10685
10686 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
10687 use INLINE_SYSCALL. Error number is returned, not -1.
10688
10689 * pthreadP.h: Mark declarations of __find_in_stack_list, __free_tcb,
10690 and __deallocate_stack with internal_function.
10691 * pthread_create.c: Adjust definitions appropriately.
10692 * allocatestack.c: Likewise.
10693
10694 * pthread_join.c: Add one more __builtin_expect.
10695 * pthread_timedjoin.c: Likewise.
10696
10697 * pthread_getspecific.c (__pthread_getspecific): Clear data->data
10698 not data of sequence number does not match.
10699 Add one __builtin_expect.
10700
10701 * Makefile (tests): Add tst-clock1.
10702 * tst-clock1.c: New file.
10703
10704 * pthread_setconcurrency.c (pthread_setconcurrency): Fail for
10705 negative arguments.
10706 * Makefile (tests): Add tst-basic5.
10707 * tst-basic5.c: New file.
10708
10709 2003-02-14 Ulrich Drepper <drepper@redhat.com>
10710
10711 * Makefile (tests): Add tst-basic4.
10712 * tst-basic4.c: New file.
10713
10714 * pthreadP.h: Add declaraction for __nptl_nthreads.
10715 * pthread_create.c: Define __nptl_nthreads
10716 (start_thread): Increment __nptl_nthreads at beginning. Decrement
10717 after thread is done. If then zero, call exit(0).
10718 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
10719 Add ptr_nthreads. Define HAVE_PTR_NTHREADS.
10720 * init.c (pthread_functions): Initialize ptr_nthreads.
10721 * allocatestack.c (nptl_nthreads): Remove definition and all uses.
10722 (__reclaim_stacks): Decrement __nptl_nthreads.
10723 * sysdeps/pthread/Makefile [$(subdir)==csu] (CFLAGS-libc-start.c):
10724 Define.
10725 * Makefile (tests): Add tst-basic3.
10726 * tst-basic3.c: New file.
10727
10728 * descr.h: Define CANCELING_BIT and CANCELING_BITMASK. Introduce
10729 after CANCELTYPE_BIT, move the other bits up. Update CANCEL_RESTMASK.
10730 * init.c (sigcancel_handler): Also set CANCELING_BITMASK bit in newval.
10731 * pthread_cancel.c (pthread_cancel): Likewise. Also set CANCELING_BIT
10732 if asynchronous canceling is enabled.
10733 * pthread_join.c (pthread_join): When recognizing circular joins,
10734 take into account the other thread might be already canceled.
10735 * Makefile (tests): Add tst-join5.
10736 * tst-join5.c: New file.
10737
10738 * Makefile (tests): Add tst-join4.
10739 * tst-join4.c: New file.
10740
10741 2003-02-13 Ulrich Drepper <drepper@redhat.com>
10742
10743 * tst-cond4.c (main): Add test of pthread_attr_getpshared.
10744
10745 2003-02-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
10746
10747 * sysdeps/s390/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM,
10748 THREAD_SETMEM_NC): Use passed descr instead of THREAD_SELF.
10749 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind): Avoid
10750 warning.
10751 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Include <sys/time.h>
10752 to avoid warning.
10753 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Return
10754 error if lll_futex_wake failed.
10755
10756 2003-02-13 Ulrich Drepper <drepper@redhat.com>
10757
10758 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Fix
10759 handling of cancellation and failung pthread_mutex_unlock call.
10760 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10761 * Makefile (tests): Add tst-cond8 and tst-cond9.
10762 * tst-cond8.c: New file.
10763 * tst-cond9.c: New file.
10764
10765 * tst-cond7.c (do_test): Unlock the mutex before canceling the thread.
10766
10767 * sysdeps/pthread/pthread.h: Add missing initializers. Protect
10768 non-standard initializers with __USE_GNU.
10769
10770 * Makefile (tests): Add tst-cleanup3.
10771 * tst-cleanup3.c: New file.
10772
10773 2003-02-12 Ulrich Drepper <drepper@redhat.com>
10774
10775 * Makefile (tests): Add tst-attr1 and tst-attr2.
10776 * tst-attr1.c: New file.
10777 * tst-attr2.c: New file.
10778
10779 * Makefile: Add rules to build and run tst-atfork2 test.
10780 * tst-atfork2.c: New file.
10781 * tst-atfork2mod.c: New file.
10782
10783 * sysdeps/unix/sysv/linux/unregister-atfork.c
10784 (__unregister_atfork): Free the memory allocated for the handlers
10785 after removing them from the lists.
10786
10787 * sysdeps/unix/sysv/linux/register-atfork.c: Define memeory
10788 cleanup function.
10789
10790 * tst-atfork1.c (do_test): Wait for the child we forked.
10791 Report error in child.
10792
10793 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Fix comment.
10794
10795 * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
10796
10797 2003-02-10 Ulrich Drepper <drepper@redhat.com>
10798
10799 * Makefile (tests): Add tst-cancel8.
10800 * tst-cancel8.c: New file.
10801
10802 * sysdeps/unix/sysv/linux/i386/pthread_once.S (clear_once_control): Fix
10803 clearing of control variable.
10804 * Makefile (tests): Add tst-once3 and tst-once4.
10805 * tst-once3.c: New file.
10806 * tst-once4.c: New file.
10807
10808 2003-02-08 kaz Kojima <kkojima@rr.iij4u.or.jp>
10809
10810 * sysdeps/sh/Makefile: New file.
10811 * sysdeps/sh/bits/atomic.h: New file.
10812 * sysdeps/sh/pthread_spin_init.c: New file.
10813 * sysdeps/sh/pthread_spin_lock.c: New file.
10814 * sysdeps/sh/pthread_spin_trylock.S: New file.
10815 * sysdeps/sh/pthread_spin_unlock.S: New file.
10816 * sysdeps/sh/pthreaddef.h: New file.
10817 * sysdeps/sh/tcb-offsets.sym: New file.
10818 * sysdeps/sh/td_ta_map_lwp2thr.c: New file.
10819 * sysdeps/sh/tls.h: New file.
10820 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: New file.
10821 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: New file.
10822 * sysdeps/unix/sysv/linux/sh/createthread.c: New file.
10823 * sysdeps/unix/sysv/linux/sh/fork.c: New file.
10824 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: New file.
10825 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: New file.
10826 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h: New file.
10827 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: New file.
10828 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: New file.
10829 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: New file.
10830 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: New file.
10831 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: New file.
10832 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
10833 * sysdeps/unix/sysv/linux/sh/pt-vfork.S: New file.
10834 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: New file.
10835 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: New file.
10836 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: New file.
10837 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: New file.
10838 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: New file.
10839 * sysdeps/unix/sysv/linux/sh/pthread_once.S: New file.
10840 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: New file.
10841 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: New file.
10842 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: New file.
10843 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: New file.
10844 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: New file.
10845 * sysdeps/unix/sysv/linux/sh/sem_post.S: New file.
10846 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: New file.
10847 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: New file.
10848 * sysdeps/unix/sysv/linux/sh/sem_wait.S: New file.
10849 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
10850
10851 2003-02-08 Ulrich Drepper <drepper@redhat.com>
10852
10853 * tst-cond2.c: Rearrange code to not rely on behavior undefined
10854 according to POSIX.
10855
10856 * tst-basic2.c (do_test): Lock mutex before creating the thread.
10857
10858 2003-02-07 Ulrich Drepper <drepper@redhat.com>
10859
10860 * sysdeps/x86_64/tls.h: Remove unnecessary macros, left over from x86.
10861 (TLS_GET_FS): New #define.
10862 (TLS_SET_FS): New #define.
10863 Correct value of __NR_set_thread_area.
10864
10865 * sysdeps/x86_64/td_ta_map_lwp2thr.c: New file.
10866
10867 2003-02-06 Ulrich Drepper <drepper@redhat.com>
10868
10869 * Makefile (tests): Add tst-popen1.
10870 * tst-popen1.c: New file.
10871
10872 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Remove wrong
10873 but inactive generalization.
10874 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10875 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
10876 Minor optimization, remove one instruction.
10877 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
10878
10879 2003-02-04 Martin Schwidefsky <schwidefsky@de.ibm.com>
10880
10881 * sysdeps/unix/sysv/linux/s390/fork.c: Correct order of parameters.
10882
10883 2003-01-31 Martin Schwidefsky <schwidefsky@de.ibm.com>
10884
10885 * init.c (__NR_set_tid_address): Add #ifdef for s390.
10886 * sysdeps/pthread/pthread_barrier_wait.c: New file.
10887 * sysdeps/pthread/pthread_cond_broadcast.c: New file.
10888 * sysdeps/pthread/pthread_cond_signal.c: New file.
10889 * sysdeps/pthread/pthread_cond_timedwait.c: New file.
10890 * sysdeps/pthread/pthread_cond_wait.c: New file.
10891 * sysdeps/pthread/pthread_rwlock_rdlock.c: New file.
10892 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: New file.
10893 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: New file.
10894 * sysdeps/pthread/pthread_rwlock_unlock.c: New file.
10895 * sysdeps/pthread/pthread_rwlock_wrlock.c: New file.
10896 * sysdeps/s390/Makefile: New file.
10897 * sysdeps/s390/bits/atomic.h: New file.
10898 * sysdeps/s390/pthread_spin_init.c: New file.
10899 * sysdeps/s390/pthread_spin_lock.c: New file.
10900 * sysdeps/s390/pthread_spin_trylock.c: New file.
10901 * sysdeps/s390/pthread_spin_unlock.c: New file.
10902 * sysdeps/s390/pthreaddef.h: New file.
10903 * sysdeps/s390/tcb-offsets.sym: New file.
10904 * sysdeps/s390/td_ta_map_lwp2thr.c: New file.
10905 * sysdeps/s390/tls.h: New file.
10906 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: New file.
10907 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: New file.
10908 * sysdeps/unix/sysv/linux/s390/createthread.c: New file.
10909 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: New file.
10910 * sysdeps/unix/sysv/linux/s390/fork.c: New file.
10911 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: New file.
10912 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
10913 * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: New file.
10914 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: New file.
10915 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: New file.
10916 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: New file.
10917 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: New file.
10918 * sysdeps/unix/sysv/linux/s390/pthread_once.c: New file.
10919 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: New file.
10920 * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: New file.
10921 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
10922 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
10923 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: New file.
10924 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
10925 * sysdeps/unix/sysv/linux/s390/sem_post.c: New file.
10926 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: New file.
10927 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
10928 * sysdeps/unix/sysv/linux/s390/sem_wait.c: New file.
10929
10930 2003-02-04 Ulrich Drepper <drepper@redhat.com>
10931
10932 * atomic.h: Add a couple more default implementations.
10933 (atomic_compare_and_exchange_acq): Use
10934 __arch_compare_and_exchange_32_acq in return value definition. It
10935 always exists.
10936 (atomic_bit_set): Renamed from atomic_set_bit.
10937 Add missing atomic_ prefixes.
10938
10939 * sysdeps/pthread/bits/libc-lock.h (__libc_once): In case no
10940 thread library is available, use correct value to mark initialized
10941 once variable.
10942
10943 2003-02-03 Ulrich Drepper <drepper@redhat.com>
10944
10945 * allocatestack.c (allocate_stack): Use __getpagesize instead of
10946 __sysconf to determine pagesize.
10947
10948 * pthread_create.c: Include <atomic.h>.
10949 * allocatestack.c (allocate_stack): Implement coloring of the
10950 allocated stack memory. Rename pagesize to pagesize_m1. It's the
10951 size minus one. Adjust users.
10952 * sysdeps/i386/i686/Makefile: New file.
10953
10954 2003-02-02 Ulrich Drepper <drepper@redhat.com>
10955
10956 * allocatestack.c: Improve comment throughout the file.
10957
10958 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
10959 (__lll_lock_wait): Add branch prediction.
10960 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
10961 (__lll_lock_wait): Likewise.
10962 (lll_unlock_wake_cb): Removed.
10963
10964 2003-01-31 Ulrich Drepper <drepper@redhat.com>
10965
10966 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Remove
10967 _POSIX_THREAD_PRIORITY_SCHEDULING.
10968
10969 2003-01-30 Jakub Jelinek <jakub@redhat.com>
10970
10971 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
10972 Fix return type of ptr___pthread_getspecific.
10973
10974 2003-01-29 Ulrich Drepper <drepper@redhat.com>
10975
10976 * Makefile (tests): Add tst-umask1.
10977 (tst-umask1-ARGS): Define.
10978 * tst-umask1.c: New file.
10979
10980 2003-01-28 Ulrich Drepper <drepper@redhat.com>
10981
10982 * Makefile (libpthread-routines): Remove lowlevelrwlock. Add
10983 pthread_rwlock_rdlock, pthread_rwlock_timedrdlock,
10984 pthread_rwlock_wrlock, pthread_rwlock_timedwrlock, and
10985 pthread_rwlock_unlock.
10986 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Removed
10987 * sysdeps/unix/sysv/linux/i386/i586/lowlevelrwlock.S: Removed
10988 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Removed
10989 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: New file.
10990 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
10991 New file.
10992 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: New file.
10993 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
10994 New file.
10995 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: New file.
10996 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_rdlock.S: New file.
10997 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedrdlock.S:
10998 New file.
10999 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_wrlock.S: New file.
11000 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedwrlock.S:
11001 New file.
11002 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_unlock.S: New file.
11003 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_rdlock.S: New file.
11004 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedrdlock.S:
11005 New file.
11006 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_wrlock.S: New file.
11007 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedwrlock.S:
11008 New file.
11009 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_unlock.S: New file.
11010
11011 * Makefile (libpthread-routines): Remove lowlevelcond and
11012 lowlevelsem. Add sem_wait, sem_trywait, sem_timedwait, sem_post,
11013 pthread_cond_wait, pthread_cond_timedwait, pthread_cond_signal,
11014 and pthread_cond_broadcast.
11015 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Removed
11016 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Removed
11017 * sysdeps/unix/sysv/linux/i386/i586/lowlevelsem.S: Removed
11018 * sysdeps/unix/sysv/linux/i386/i586/lowlevelcond.S: Removed
11019 * sysdeps/unix/sysv/linux/i386/i686/lowlevelsem.S: Removed
11020 * sysdeps/unix/sysv/linux/i386/i686/lowlevelcond.S: Removed
11021 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: New file.
11022 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: New file.
11023 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: New file.
11024 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: New file.
11025 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: New file.
11026 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: New file.
11027 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: New file.
11028 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: New file.
11029 * sysdeps/unix/sysv/linux/i386/i586/sem_wait.S: New file.
11030 * sysdeps/unix/sysv/linux/i386/i586/sem_trywait.S: New file.
11031 * sysdeps/unix/sysv/linux/i386/i586/sem_timedwait.S: New file.
11032 * sysdeps/unix/sysv/linux/i386/i586/sem_post.S: New file.
11033 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_wait.S: New file.
11034 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_timedwait.S: New file.
11035 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_signal.S: New file.
11036 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_broadcast.S: New file.
11037 * sysdeps/unix/sysv/linux/i386/i686/sem_wait.S: New file.
11038 * sysdeps/unix/sysv/linux/i386/i686/sem_trywait.S: New file.
11039 * sysdeps/unix/sysv/linux/i386/i686/sem_timedwait.S: New file.
11040 * sysdeps/unix/sysv/linux/i386/i686/sem_post.S: New file.
11041 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_wait.S: New file.
11042 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S: New file.
11043 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_signal.S: New file.
11044 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_broadcast.S: New file.
11045 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: New file.
11046
11047 * sysdeps/unix/sysv/linux/i386/createthread.c: Define
11048 PREPARE_CREATE and TLS_VALUE with x86-specific bits. All the rest
11049 of the code is moved to ...
11050 * sysdeps/pthread/createthread.c: ...here. New file.
11051
11052 2003-01-27 Ulrich Drepper <drepper@redhat.com>
11053
11054 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S
11055 (__new_sem_post): Clear %eax before returning.
11056 Reported by MAEDA Naoaki <maeda.naoaki@jp.fujitsu.com>.
11057
11058 * Makefile (tests): Add tst-cleanup2.
11059 * tst-cleanup2.c: New file.
11060
11061 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
11062 Interpret first parameter correctly.
11063
11064 2003-01-17 Ulrich Drepper <drepper@redhat.com>
11065
11066 * Makefile (headers): Add bits/semaphore.h.
11067
11068 2003-01-16 Jakub Jelinek <jakub@redhat.com>
11069
11070 * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize _head->sysinfo even
11071 if not SHARED.
11072
11073 2003-01-14 Ulrich Drepper <drepper@redhat.com>
11074
11075 * sem_open.c (sem_open): Return SEM_FAILED if existing semaphore
11076 must be used and mapping failed.
11077 Reported by Luke Elliott <luke.elliott@activfinancial.com>.
11078
11079 * Makefile (CFLAGS-pthread_self.os): Define this, not
11080 CFLAGS-pthread_self.c.
11081
11082 2003-01-13 Ulrich Drepper <drepper@redhat.com>
11083
11084 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Don't export
11085 lll_unlock_wake_cb.
11086
11087 * Makefile (libpthread-routines): Add version. Add rules to build
11088 version.os and banner.h.
11089 * version.c: New file.
11090
11091 2003-01-13 Jakub Jelinek <jakub@redhat.com>
11092
11093 * pthread_mutex_lock.c (__pthread_mutex_lock_internal): Make
11094 the alias unconditional.
11095 * pthread_mutex_unlock.c (__pthread_mutex_unlock_internal): Likewise.
11096
11097 2003-01-13 Ulrich Drepper <drepper@redhat.com>
11098
11099 * Makefile (CFLAGS-pthread_self.c): New definition.
11100
11101 2003-01-06 Jakub Jelinek <jakub@redhat.com>
11102
11103 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Add
11104 INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
11105 * sysdeps/unix/sysv/linux/raise.c (raise): Likewise.
11106 * init.c (__pthread_initialize_minimal_internal): Likewise.
11107
11108 2003-01-07 Jakub Jelinek <jakub@redhat.com>
11109
11110 * pthreadP.h (__pthread_cond_timedwait): Add prototype.
11111
11112 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
11113 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
11114 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
11115 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
11116 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
11117 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
11118
11119 2003-01-06 Jakub Jelinek <jakub@redhat.com>
11120
11121 * pthreadP.h (LIBC_CANCEL_HANDLED): Define.
11122 * pt-system.c (LIBC_CANCEL_HANDLED): Add.
11123 * tst-cancel-wrappers.sh: Remove all exceptions.
11124
11125 2003-01-05 Ulrich Drepper <drepper@redhat.com>
11126
11127 * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
11128 features. Reported by Marijn Ros <marijn@mad.scientist.com>.
11129
11130 * sysdeps/unix/sysv/linux/jmp-unwind.c: Include <pthread-functions.h>.
11131 Use __libc_pthread_functions array if SHARED.
11132
11133 * pthreadP.h: Move pthread_cond_2_0_t definition to...
11134 * sysdeps/unix/sysv/linux/internaltypes.h: ...here.
11135
11136 * sysdeps/pthread/bits/libc-lock.h (__libc_ptf_call): New #define.
11137 (__libc_rwlock_rdlock, __libc_rwlock_wrlock, __libc_rwlock_unlock,
11138 __libc_key_create, __libc_getspecific, __libc_setspecific): Use
11139 __libc_ptf_call instead of __libc_maybe_call.
11140 (PTF): New #define.
11141 (__libc_cleanup_region_start): Wrap function name with PTF call.
11142 (__libc_cleanup_region_end): Likewise.
11143 (__libc_cleanup_end): Likewise.
11144
11145 * pthread_getspecific.c: Add __pthread_getspecific_internal alias.
11146 * pthread_setspecific.c: Add __pthread_setspecific_internal alias.
11147 * pthread_key_create.c: Add __pthread_key_create_internal alias.
11148 * pthreadP.h: Add prototypes.
11149
11150 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Add
11151 __pthread_rwlock_rdlock, __pthread_rwlock_wrlock, and
11152 __pthread_rwlock_unlock aliases.
11153 * pthreadP.h: Add prototypes for new aliases.
11154
11155 * pthreadP.h (struct pthead_functions): Moved to...
11156 * sysdeps/pthread/pthread-functions.h: ...here. New file.
11157 * init.c (pthread_functions): Add initializers for new elements.
11158
11159 * cleanup_defer.c: Add __pthread_cleanup_push_defer and
11160 __pthread_cleanup_pop_restore aliases.
11161 * pthreadP.h: Add prototypes.
11162
11163 * cleanup.c: Rename _GI_pthread_cleanup_push to __pthread_cleanup_push
11164 and _GI_pthread_cleanup_pop to __pthread_cleanup_pop.
11165 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Adjust caller.
11166 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
11167 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
11168 * pthreadP.h: Adjust prototypes and callers.
11169
11170 2003-01-04 Ulrich Drepper <drepper@redhat.com>
11171
11172 * Makefile (tests): Add tst-cancel7.
11173 (tst-cancel7-ARGS): New variable.
11174 * tst-cancel7.c: New file.
11175
11176 * old_pthread_cond_broadcast.c: Optimize initialization a bit to work
11177 around gcc defficiencies.
11178 * old_pthread_cond_signal.c: Likewise.
11179 * old_pthread_cond_timedwait.c: Likewise.
11180 * old_pthread_cond_wait.c: Likewise.
11181
11182 * pthreadP.h (pthread_cond_2_0_t): Remove unneeded lock element.
11183
11184 2003-01-03 Ulrich Drepper <drepper@redhat.com>
11185
11186 * Makefile (tests): Add tst-cond7.
11187 * tst-cond7.c: New file.
11188
11189 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
11190 (condvar_cleanup): Get condvar address from the right place.
11191
11192 * atomic.h: Correct definitions of atomic_full_barrier,
11193 atomic_read_barrier, atomic_write_barrier.
11194
11195 * old_pthread_cond_broadcast.c: Make memory allocate and initialization
11196 race-free.
11197 * old_pthread_cond_signal.c: Likewise.
11198 * old_pthread_cond_timedwait.c: Likewise.
11199 * old_pthread_cond_wait.c: Likewise.
11200
11201 2003-01-03 Jakub Jelinek <jakub@redhat.com>
11202
11203 * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
11204
11205 2003-01-03 Ulrich Drepper <drepper@redhat.com>
11206
11207 * pthreadP.h (pthread_cond_2_0_t): New type.
11208 (struct pthread_functions): Use new type for 2.0 condvar callbacks.
11209 Use new type for the 2.0 condvar function prototypes.
11210 * forward.c: Use pthread_cond_2_0_t for 2.0 condvar functions.
11211 * old_pthread_cond_init.c: Use pthread_cond_2_0_t for condvar
11212 parameter.
11213 * old_pthread_cond_destroy.c: Likewise.
11214 * old_pthread_cond_broadcast.c: Likewise. Lock appropriately.
11215 * old_pthread_cond_signal.c: Likewise.
11216 * old_pthread_cond_timedwait.c: Likewise.
11217 * old_pthread_cond_wait.c: Likewise.
11218
11219 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
11220 (__pthread_cond_wait): Don't save cancellation mode and seq value
11221 in same location.
11222
11223 * herrno.c (__h_errno_location): Don't define as weak.
11224
11225 2003-01-02 Jakub Jelinek <jakub@redhat.com>
11226
11227 * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
11228 pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
11229 and pthread_cond_wait.
11230 * old_pthread_cond_broadcast.c (__old_pthread_cond_broadcast):
11231 Renamed to...
11232 (__pthread_cond_broadcast_2_0): ... this.
11233 * old_pthread_cond_destroy.c (__old_pthread_cond_destroy):
11234 Renamed to...
11235 (__pthread_cond_destroy_2_0): ... this.
11236 * old_pthread_cond_init.c (__old_pthread_cond_init):
11237 Renamed to...
11238 (__pthread_cond_init_2_0): ... this.
11239 * old_pthread_cond_signal.c (__old_pthread_cond_signal):
11240 Renamed to...
11241 (__pthread_cond_signal_2_0): ... this.
11242 * old_pthread_cond_wait.c (__old_pthread_cond_wait):
11243 Renamed to...
11244 (__pthread_cond_wait_2_0): ... this.
11245 * pthread_cond_destroy.c: Include shlib-compat.h.
11246 (pthread_cond_destroy): Change strong_alias into versioned_symbol.
11247 * pthread_cond_init.c: Include shlib-compat.h.
11248 (pthread_cond_init): Change strong_alias into versioned_symbol.
11249 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_cond_*
11250 fields to ptr___pthread_cond_* and add ptr___pthread_cond_*_2_0
11251 fields.
11252 (__pthread_cond_broadcast_2_0, __pthread_cond_destroy_2_0,
11253 __pthread_cond_init_2_0, __pthread_cond_signal_2_0,
11254 __pthread_cond_wait_2_0): New prototypes.
11255 (__old_pthread_cond_broadcast, __old_pthread_cond_destroy,
11256 __old_pthread_cond_init, __old_pthread_cond_signal,
11257 __old_pthread_cond_wait): Removed.
11258 * init.c: Include shlib-compat.h.
11259 (pthread_functions): Guard ptr___pthread_attr_init_2_0
11260 initialization with SHLIB_COMPAT (GLIBC_2_0, GLIBC_2_1).
11261 Rename ptr_pthread_cond_* to ptr___pthread_cond_*, initialize
11262 ptr___pthread_cond_*_2_0 fields.
11263 * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
11264 pthread_cond_*@GLIBC_2.0 compatibility symbols.
11265
11266 * sysdeps/pthread/sigaction.c (SIGCANCEL): Only define if
11267 LIBC_SIGACTION was not yet defined.
11268 [!defined LIBC_SIGACTION]: Define LIBC_SIGACTION, #include self.
11269 [!defined LIBC_SIGACTION] (__sigaction): New function and
11270 libc_hidden_weak.
11271 [!defined LIBC_SIGACTION] (sigaction): New weak_alias.
11272 [defined LIBC_SIGACTION]: #include_next <sigaction.c>.
11273
11274 2003-01-02 Jakub Jelinek <jakub@redhat.com>
11275
11276 * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
11277
11278 2003-01-02 Ulrich Drepper <drepper@redhat.com>
11279
11280 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
11281 New, larger type definition.
11282 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: New condvar
11283 implementation.
11284 * Versions [libpthread]: Add definitions for new pthread_cond_*
11285 interfaces for version GLIBC_2.3.2.
11286 * pthread_cond_init.c: Update initialization for new type definition.
11287 * Makefile (libpthread-routines): Remove pthread_cond_wait,
11288 pthread_cond_timedwait, pthread_cond_signal, and
11289 pthread_cond_broadcast. Add old_pthread_cond_init,
11290 old_pthread_cond_destroy, old_pthread_cond_wait,
11291 old_pthread_cond_timedwait, old_pthread_cond_signal, and
11292 old_pthread_cond_broadcast.
11293 * old_pthread_cond_broadcast.c: New file.
11294 * old_pthread_cond_destroy.c: New file.
11295 * old_pthread_cond_init.c: New file.
11296 * old_pthread_cond_signal.c: New file.
11297 * old_pthread_cond_timedwait.c: New file.
11298 * old_pthread_cond_wait.c: New file.
11299 * pthreadP.h: Add prototypes for the compatibility interfaces.
11300
11301 * pthread_cond_destroy.c: Don't include <errno.h>.
11302
11303 2003-01-01 Ulrich Drepper <drepper@redhat.com>
11304
11305 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Avoid
11306 unnecessary zero offset when addressing MUTEX.
11307
11308 2002-12-31 Ulrich Drepper <drepper@redhat.com>
11309
11310 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
11311 __register_atfork.
11312 * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
11313 for __register_atfork.
11314
11315 2002-12-31 Jakub Jelinek <jakub@redhat.com>
11316
11317 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use __ASSEMBLER__
11318 instead of ASSEMBLER test macro.
11319
11320 * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
11321 __libc_current_sigrtmax): Add libc_hidden_def.
11322
11323 * sysdeps/pthread/list.h: Remove assert.h include.
11324
11325 2002-12-31 Ulrich Drepper <drepper@redhat.com>
11326
11327 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Use
11328 __pthread_initialize_minimal_internal not
11329 __pthread_initialize_minimal.
11330
11331 2002-12-30 Ulrich Drepper <drepper@redhat.com>
11332
11333 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Mark
11334 __pthread_initialize_minimal as hidden.
11335
11336 * init.c (__pthread_initialize_minimal_internal): Don't mark as
11337 constructor.
11338
11339 2002-12-31 Jakub Jelinek <jakub@redhat.com>
11340
11341 * Makefile ($(inst_libdir)/libpthread.so): Depend on
11342 $(common-objpfx)format.lds, include that into the output script.
11343 Fix comment.
11344 (extra-B-pthread.so): Change linuxthreads/ into nptl/.
11345
11346 2002-12-28 Andreas Jaeger <aj@suse.de>
11347
11348 * sysdeps/unix/sysv/linux/xstatconv.c (xstat_conv): Adjust for
11349 nsec resolution changes.
11350 (xstat64_conv): Likewise.
11351 (xstat32_conv): Likewise.
11352 * sysdeps/unix/sysv/linux/kernel_stat.h: Add nsec resolution for
11353 struct kernel_stat.
11354 * sysdeps/unix/sysv/linux/bits/stat.h: Add nsec resolution for
11355 structs stat and stat64.
11356 * time/time.h (__timespec_defined): Define for __USE_MISC.
11357 * io/sys/stat.h [__USE_MISC]: Define __need_timespec for struct stat.
11358
11359 2002-12-30 Jakub Jelinek <jakub@redhat.com>
11360
11361 * forward.c (FORWARD2): Renamed from FORWARD3. Remove unused export
11362 argument.
11363 (pthread_attr_init_2_0, pthread_attr_init_2_1): Use FORWARD macro.
11364 (pthread_exit): Use strong_alias to avoid warnings.
11365 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_exit
11366 and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
11367 ptr___pthread_attr_init_2_*.
11368 * init.c (pthread_functions): Adjust.
11369
11370 2002-12-29 Ulrich Drepper <drepper@redhat.com>
11371
11372 * forward.c: Make all functions available by default again. It
11373 caused too much trouble.
11374
11375 * pt-siglongjmp.c: Removed.
11376
11377 2002-12-28 Jakub Jelinek <jakub@redhat.com>
11378
11379 * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
11380 (SYSINFO_OFFSET, MULTIPLE_THREADS_OFFSET): Remove.
11381 * sysdeps/i386/Makefile: New file.
11382 * sysdeps/i386/tcb-offsets.sym: New file.
11383 * sysdeps/pthread/tcb-offsets.h: New file.
11384 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
11385 Remove MULTIPLE_THREADS_OFFSET and SYSINFO_OFFSET checks.
11386
11387 * sysdeps/unix/sysv/linux/Versions [libc] (GLIBC_PRIVATE): Move
11388 __register_atfork...
11389 (GLIBC_2.3.2): ...here.
11390
11391 2002-12-28 Ulrich Drepper <drepper@redhat.com>
11392
11393 * sysdeps/pthread/pthread.h: Mark pthread_attr_getstackaddr and
11394 pthread_attr_setstackaddr with __attribute_deprecated__.
11395
11396 2002-12-27 Jakub Jelinek <jakub@redhat.com>
11397
11398 * pt-system.c (system): Remove cancellation handling.
11399 * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
11400 cancellation routines.
11401
11402 2002-12-28 Ulrich Drepper <drepper@redhat.com>
11403
11404 * descr.h: Include <dl-sysdep.h>.
11405 (struct pthread): Move header.data.list to the back of the struct.
11406 * sysdeps/i386/tls.h (tcbhead_t): Move list to the back of the struct.
11407 (MULTIPLE_THREADS_OFFSET): Adjust offset.
11408 (SYSINFO_OFFSEET): Likewise.
11409
11410 2002-12-27 Jakub Jelinek <jakub@redhat.com>
11411
11412 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h (USE_DL_SYSINFO):
11413 Define.
11414 (DL_SYSINFO_DEFAULT): Cast to uintptr_t to avoid warnings.
11415 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h (NEED_DL_SYSINFO,
11416 DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION): Define.
11417 (USE_DL_SYSINFO): Undef.
11418
11419 2002-12-22 Jakub Jelinek <jakub@redhat.com>
11420
11421 * Makefile (tests-reverse): Use $(objpfx)../libc.so instead of
11422 $(common-objpfx)libc.so.
11423 * tst-cancel4.c (tf_write, tf_writev): Increase buf sizes so that
11424 it is bigger than pipe buffer size even on arches with bigger
11425 page size.
11426 (tf_usleep): Cast usleep argument to useconds_t to avoid warnings.
11427
11428 2002-12-25 Ulrich Drepper <drepper@redhat.com>
11429
11430 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Implement
11431 correct errno access for case that USE___THREAD is not defined.
11432
11433 2002-12-24 Ulrich Drepper <drepper@redhat.com>
11434
11435 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Add missing #endif.
11436 Patch by Marijn Ros <marijn@mad.scientist.com>.
11437
11438 2002-12-22 Roland McGrath <roland@redhat.com>
11439
11440 * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
11441
11442 2002-12-20 Ulrich Drepper <drepper@redhat.com>
11443
11444 * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_inexpensive): Define.
11445
11446 2002-12-19 Ulrich Drepper <drepper@redhat.com>
11447
11448 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Don't define
11449 NEED_DL_SYSINFO since no processor < i686 had the sysenter opcode.
11450 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: New file.
11451
11452 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Use ENTER_KERNEL instead
11453 of int $0x80.
11454 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
11455 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Likewise.
11456 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Likewise.
11457 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
11458 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
11459 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Likewise.
11460 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Likewise.
11461 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
11462
11463 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add support for using
11464 sysenter.
11465 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
11466
11467 * sysdeps/i386/tls.h: Unconditionally include <dl-sysdep.h>.
11468
11469 * allocatestack.c (allocate_stack) [NEED_DL_SYSINFO]: Set sysinfo
11470 in new TCB.
11471 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Check
11472 that sysinfo is properly initialized.
11473 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define RTLD_PRIVATE_ERRNO
11474 to 1 only for ld.so.
11475
11476 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
11477 RTLD_CORRECT_DYNAMIC_WEAK.
11478
11479 2002-12-19 Jakub Jelinek <jakub@redhat.com>
11480
11481 * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
11482 Use return 0 as 6th argument to FORWARD4.
11483 * pthread_equal.c: Include pthreadP.h instead of pthread.h.
11484
11485 2002-12-18 Ulrich Drepper <drepper@redhat.com>
11486
11487 * descr.h (struct pthread) [NEED_DL_SYSINFO]: Add sysinfo member.
11488 * sysdeps/i386/tls.h (tcbhead_t): Add sysinfo member.
11489 Define SYSINFO_OFFSEET if NEED_DL_SYSINFO is defined.
11490 (INIT_SYSINFO): New #define.
11491 (TLS_TP_INIT): Use INIT_SYSINFO.
11492 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
11493 At test to make sure SYSINFO_OFFSET value is correct.
11494 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
11495
11496 2002-12-18 Jakub Jelinek <jakub@redhat.com>
11497
11498 * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
11499 * sysdeps/unix/sysv/linux/raise.c (gsignal): Add weak alias to raise.
11500 * Versions [libc: GLIBC_2.0]: Add pthread_attr_init.
11501 [libpthread: GLIBC_2.1]: Remove __pthread_rwlock_init,
11502 __pthread_rwlock_destroy, __pthread_rwlock_rdlock,
11503 __pthread_rwlock_wrlock, __pthread_rwlock_unlock,
11504 __pthread_rwlock_tryrdlock and __pthread_rwlock_trywrlock.
11505
11506 2002-12-18 Ulrich Drepper <drepper@redhat.com>
11507
11508 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use ENTER_KERNEL
11509 macro instead of using int $0x80 directly.
11510
11511 * sysdeps/pthread/bits/stdio-lock.h: New file.
11512 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: New file.
11513 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: New file.
11514 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: New file.
11515 * Makefile (routines): Add libc-lowlevelmutex.
11516
11517 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Remove
11518 __i686.get_pc_thunk.dx.
11519
11520 2002-12-17 Jakub Jelinek <jakub@redhat.com>
11521
11522 * Makefile (libpthread-shared-only-routines): Add pt-allocrtsig.
11523 (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
11524 ($(objpfx)tst-cancel-wrappers.out): New rule.
11525 * tst-cancel-wrappers.sh: New test.
11526 * tst-locale1.c: Include signal.h.
11527 (uselocale): Test static linking of __libc_current_sigrt*.
11528
11529 2002-12-17 Ulrich Drepper <drepper@redhat.com>
11530
11531 * Makefile (tests): Add tst-cancel6.
11532 * tst-cancel6.c: New file
11533
11534 2002-12-17 Jakub Jelinek <jakub@redhat.com>
11535
11536 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
11537 Define meaningfully for assembler as well.
11538 * pthreadP.h (struct pthread_functions): Remove
11539 ptr_pthread_attr_init field. Add ptr_pthread_attr_init_2_0
11540 and ptr_pthread_attr_init_2_1 fields.
11541 * init.c (pthread_functions): Initialize ptr_pthread_attr_init_2_0
11542 and ptr_pthread_attr_init_2_1 instead of ptr_pthread_attr_init.
11543 * forward.c (FORWARD4): Renamed from FORWARD3. Add export argument.
11544 (FORWARD3): Define using FORWARD4.
11545 (pthread_attr_init): Provide both @GLIBC_2.0 and @@GLIBC_2.1
11546 versions.
11547 * pt-system.c: Remove duplicate stdlib.h include.
11548
11549 2002-12-16 Ulrich Drepper <drepper@redhat.com>
11550
11551 * sem_init.c: Define sem_init@GLIBC_2.0.
11552 * sem_destroy.c: Define sem_destroy@GLIBC_2.0.
11553 * sem_getvalue.c: Define sem_getvalue@GLIBC_2.0.
11554
11555 * flockfile.c: Moved to...
11556 * sysdeps/pthread/flockfile.c: ...here. New file.
11557 * funlockfile.c: Moved to...
11558 * sysdeps/pthread/funlockfile.c: ...here. New file.
11559 * ftrylockfile.c: Moved to...
11560 * sysdeps/pthread/ftrylockfile.c: ...here. New file.
11561
11562 2002-12-16 Jakub Jelinek <jakub@redhat.com>
11563
11564 * libc-cancellation.c: Guard both function with
11565 #if !defined NOT_IN_libc.
11566 * Makefile (libpthread-routines): Use ptw-, not pt- prefix for the
11567 automatically provided pthread wrappers.
11568 * pthreadP.h (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define to
11569 CANCEL_* if IS_IN_libpthread and to dummy versions if not in libc
11570 nor in libpthread.
11571 * pt-open.c: Removed.
11572 * pt-fcntl.c: Removed.
11573 * pt-fsync.c: Removed.
11574 * pt-lseek.c: Removed.
11575 * pt-msgrcv.c: Removed.
11576 * pt-msgsnd.c: Removed.
11577 * pt-msync.c: Removed.
11578 * pt-nanosleep.c: Removed.
11579 * pt-open64.c: Removed.
11580 * pt-pause.c: Removed.
11581 * pt-pread.c: Removed.
11582 * pt-pread64.c: Removed.
11583 * pt-pwrite.c: Removed.
11584 * pt-pwrite64.c: Removed.
11585 * pt-read.c: Removed.
11586 * pt-recv.c: Removed.
11587 * pt-recvfrom.c: Removed.
11588 * pt-recvmsg.c: Removed.
11589 * pt-send.c: Removed.
11590 * pt-sendto.c: Removed.
11591 * pt-sigtimedwait.c: Removed.
11592 * pt-sigwait.c: Removed.
11593 * pt-wait.c: Removed.
11594 * pt-waitpid.c: Removed.
11595 * pt-write.c: Removed.
11596 * pt-accept.c: Removed.
11597 * pt-close.c: Removed.
11598 * pt-connect.c: Removed.
11599 * pt-lseek64.c: Removed.
11600 * pt-sendmsg.c: Removed.
11601 * pt-tcdrain.c: Removed.
11602
11603 2002-12-15 Ulrich Drepper <drepper@redhat.com>
11604
11605 * init.c (__pthread_initialize_minimal_internal): Renamed from
11606 __pthread_initialize_minimal. Make old name an alias. This
11607 converts a normal relocation into a relative relocation.
11608
11609 * pt-fcntl.c (__fcntl): Use fcntl64 syscall, not fcntl.
11610
11611 * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
11612 readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
11613 * Makefile (libpthread-routines): Remove pt-creat, pt-poll,
11614 pt-pselect, pt-readv, pt-select, pt-sigpause, pt-sigsuspend,
11615 pt-sigwaitinfo, pt-waitid, and pt-writev.
11616 * pt-creat.c: Removed.
11617 * pt-poll.c: Removed.
11618 * pt-pselect.c: Removed.
11619 * pt-readv.c: Removed.
11620 * pt-select.c: Removed.
11621 * pt-sigpause.c: Removed.
11622 * pt-sigsuspend.c: Removed.
11623 * pt-sigwaitinfo.c: Removed.
11624 * pt-waitid.c: Removed.
11625 * pt-writev.c: Removed.
11626
11627 * init.c (pthread_functions): New variable.
11628 (__pthread_initialize_minimal): Pass pointer to pthread_functions
11629 (or NULL) to __libc_pthread_init.
11630 * forward.c: Rewrite to use __libc:pthread_functions array to get
11631 function addresses.
11632 * sysdeps/unix/sysv/linux/fork.h: Remove __libc_pthread_init
11633 prototype.
11634 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
11635 Take new parameter. Copy content of variable pointed to by it
11636 to __libc_pthread_init.
11637
11638 * pthreadP.h (struct pthread_functions): New type.
11639 (__libc_pthread_init): Declare.
11640
11641 * pthread_attr_destroy.c: Add namespace protected alias.
11642 * pthread_attr_getdetachstate.c: Likewise.
11643 * pthread_attr_getinheritsched.c: Likewise.
11644 * pthread_attr_getschedparam.c: Likewise.
11645 * pthread_attr_getschedpolicy.c: Likewise.
11646 * pthread_attr_getscope.c: Likewise.
11647 * pthread_attr_setdetachstate.c: Likewise.
11648 * pthread_attr_setinheritsched.c: Likewise.
11649 * pthread_attr_setschedparam.c: Likewise.
11650 * pthread_attr_setschedpolicy.c: Likewise.
11651 * pthread_attr_setscope.c: Likewise.
11652 * pthread_cond_broadcast.c: Likewise.
11653 * pthread_cond_destroy.c: Likewise.
11654 * pthread_cond_init.c: Likewise.
11655 * pthread_cond_signal.c: Likewise.
11656 * pthread_cond_wait.c: Likewise.
11657 * pthread_condattr_destroy.c: Likewise.
11658 * pthread_condattr_init.c: Likewise.
11659 * pthread_equal.c: Likewise.
11660 * pthread_exit.c: Likewise.
11661 * pthread_getschedparam.c: Likewise.
11662 * pthread_self.c: Likewise.
11663 * pthread_setcancelstate.c: Likewise.
11664 * pthread_setschedparam.c: Likewise.
11665 * pthread_mutex_destroy.c: Likewise.
11666 * pthread_mutex_init.c: Likewise.
11667 * pthreadP.h: Add prototypes for the aliases.
11668
11669 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Set
11670 multiple_threads member in correct TCB to 1.
11671
11672 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define
11673 SINGLE_THREAD_P. If in libc or libpthread examine multiple_thread
11674 member of thread decriptor, otherwise return unconditionally 1.
11675
11676 2002-12-14 Ulrich Drepper <drepper@redhat.com>
11677
11678 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Changes folded into the
11679 regular Linux version. Remove file.
11680 * sysdeps/unix/sysv/linux/connect.S: Likewise. Remove file.
11681 * sysdeps/unix/sysv/linux/llseek.c: Likewise. Remove file.
11682 * sysdeps/unix/sysv/linux/msgrcv.c: Likewise. Remove file.
11683 * sysdeps/unix/sysv/linux/msgsnd.c: Likewise. Remove file.
11684 * sysdeps/unix/sysv/linux/open64.c: Likewise. Remove file.
11685 * sysdeps/unix/sysv/linux/poll.c: Likewise. Remove file.
11686 * sysdeps/unix/sysv/linux/pread.c: Likewise. Remove file.
11687 * sysdeps/unix/sysv/linux/pread64.c: Likewise. Remove file.
11688 * sysdeps/unix/sysv/linux/pselect.c: Likewise. Remove file.
11689 * sysdeps/unix/sysv/linux/pwrite.c: Likewise. Remove file.
11690 * sysdeps/unix/sysv/linux/pwrite64.c: Likewise. Remove file.
11691 * sysdeps/unix/sysv/linux/readv.c: Likewise. Remove file.
11692 * sysdeps/unix/sysv/linux/recv.S: Likewise. Remove file.
11693 * sysdeps/unix/sysv/linux/recvfrom.S: Likewise. Remove file.
11694 * sysdeps/unix/sysv/linux/recvmsg.S: Likewise. Remove file.
11695 * sysdeps/unix/sysv/linux/send.S: Likewise. Remove file.
11696 * sysdeps/unix/sysv/linux/sendmsg.S: Likewise. Remove file.
11697 * sysdeps/unix/sysv/linux/sendto.S: Likewise. Remove file.
11698 * sysdeps/unix/sysv/linux/sigpause.c: Likewise. Remove file.
11699 * sysdeps/unix/sysv/linux/sigsuspend.c: Likewise. Remove file.
11700 * sysdeps/unix/sysv/linux/sigtimedwait.c: Likewise. Remove file.
11701 * sysdeps/unix/sysv/linux/sigwait.c: Likewise. Remove file.
11702 * sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise. Remove file.
11703 * sysdeps/unix/sysv/linux/system.c: Likewise. Remove file.
11704 * sysdeps/unix/sysv/linux/tcdrain.c: Likewise. Remove file.
11705 * sysdeps/unix/sysv/linux/wait.c: Likewise. Remove file.
11706 * sysdeps/unix/sysv/linux/waitid.c: Likewise. Remove file.
11707 * sysdeps/unix/sysv/linux/waitpid.c: Likewise. Remove file.
11708 * sysdeps/unix/sysv/linux/writev.c: Likewise. Remove file.
11709 * sysdeps/unix/sysv/linux/i386/fcntl.c: Likewise. Remove file.
11710
11711 2002-12-14 Jakub Jelinek <jakub@redhat.com>
11712
11713 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
11714 * sysdeps/unix/sysv/linux/open.c: Removed.
11715 * sysdeps/unix/sysv/linux/fsync.c: Removed.
11716 * sysdeps/unix/sysv/linux/lseek.c: Removed.
11717 * sysdeps/unix/sysv/linux/msync.c: Removed.
11718 * sysdeps/unix/sysv/linux/read.c: Removed.
11719 * sysdeps/unix/sysv/linux/close.c: Removed.
11720 * sysdeps/unix/sysv/linux/creat.c: Removed.
11721 * sysdeps/unix/sysv/linux/nanosleep.c: Removed.
11722 * sysdeps/unix/sysv/linux/pause.c: Removed.
11723 * sysdeps/unix/sysv/linux/select.c: Removed.
11724 * sysdeps/unix/sysv/linux/write.c: Removed.
11725
11726 2002-12-14 Ulrich Drepper <drepper@redhat.com>
11727
11728 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Check multiple_threads
11729 element in TCB to see whether locking is needed.
11730
11731 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Check that
11732 MULTIPLE_THREADS_OFFSET value is correct.
11733
11734 * sysdeps/unix/sysv/linux/close.c: New file.
11735 * sysdeps/unix/sysv/linux/connect.S: New file.
11736 * sysdeps/unix/sysv/linux/creat.c: New file.
11737 * sysdeps/unix/sysv/linux/fsync.c: New file.
11738 * sysdeps/unix/sysv/linux/llseek.c: New file.
11739 * sysdeps/unix/sysv/linux/lseek.c: New file.
11740 * sysdeps/unix/sysv/linux/msgrcv.c: New file.
11741 * sysdeps/unix/sysv/linux/msgsnd.c: New file.
11742 * sysdeps/unix/sysv/linux/msync.c: New file.
11743 * sysdeps/unix/sysv/linux/nanosleep.c: New file.
11744 * sysdeps/unix/sysv/linux/open.c: New file.
11745 * sysdeps/unix/sysv/linux/open64.c: New file.
11746 * sysdeps/unix/sysv/linux/pause.c: New file.
11747 * sysdeps/unix/sysv/linux/poll.c: New file.
11748 * sysdeps/unix/sysv/linux/pread.c: New file.
11749 * sysdeps/unix/sysv/linux/pread64.c: New file.
11750 * sysdeps/unix/sysv/linux/pselect.c: New file.
11751 * sysdeps/unix/sysv/linux/pwrite.c: New file.
11752 * sysdeps/unix/sysv/linux/pwrite64.c: New file.
11753 * sysdeps/unix/sysv/linux/readv.c: New file.
11754 * sysdeps/unix/sysv/linux/recv.S: New file.
11755 * sysdeps/unix/sysv/linux/recvfrom.S: New file.
11756 * sysdeps/unix/sysv/linux/recvmsg.S: New file.
11757 * sysdeps/unix/sysv/linux/select.c: New file.
11758 * sysdeps/unix/sysv/linux/send.S: New file.
11759 * sysdeps/unix/sysv/linux/sendmsg.S: New file.
11760 * sysdeps/unix/sysv/linux/sendto.S: New file.
11761 * sysdeps/unix/sysv/linux/sigpause.c: New file.
11762 * sysdeps/unix/sysv/linux/sigsuspend.c: New file.
11763 * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
11764 * sysdeps/unix/sysv/linux/sigwait.c: New file.
11765 * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
11766 * sysdeps/unix/sysv/linux/system.c: New file.
11767 * sysdeps/unix/sysv/linux/tcdrain.c: New file.
11768 * sysdeps/unix/sysv/linux/wait.c: New file.
11769 * sysdeps/unix/sysv/linux/waitid.c: New file.
11770 * sysdeps/unix/sysv/linux/waitpid.c: New file.
11771 * sysdeps/unix/sysv/linux/writev.c: New file.
11772 * sysdeps/unix/sysv/linux/i386/fcntl.c: New file.
11773
11774 * pt-readv.c: Fix comment.
11775
11776 2002-12-14 Jakub Jelinek <jakub@redhat.com>
11777
11778 * tst-cleanup1.c: Include stdlib.h.
11779
11780 * tst-cancel5.c: New test.
11781 * Makefile (tests): Add tst-cancel5.
11782 (tst-cancel5): Link against libc.so libpthread.so in that order.
11783
11784 2002-12-13 Ulrich Drepper <drepper@redhat.com>
11785
11786 * forward.c (test_loaded): Prevent recursive calls.
11787
11788 * Makefile (routines): Add libc-cancellation.
11789 * libc-cancellation.c: New file.
11790 * descr.h (struct pthread): Add multiple_threads field.
11791 * allocatestack.c (allocate_stack): Initialize multiple_header field of
11792 new thread descriptor to 1.
11793 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread):
11794 Initialize multiple_thread field after successful thread creation.
11795 * cancellation.c (__do_cancel): Move to pthreadP.h.
11796 (__pthread_enable_asynccancel): Remove parameter from __do_cancel call.
11797 (__pthread_disable_asynccancel): Add internal_function attribute.
11798 * init.c (sigcancel_handler): Remove parameter from __do_cancel call.
11799 * pthread_setcancelstate.c: Likewise.
11800 * pthread_setcanceltype.c: Likewise.
11801 * pthread_exit.c: Likewise.
11802 * pthreadP.h (CANCELLATION_P): Likewise.
11803 (__do_cancel): Define as static inline.
11804 (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): New #defines.
11805 (__libc_enable_asynccancel, __libc_disable_asynccancel): New
11806 declarations.
11807 * sysdeps/i386/tls.h (tcbhead_t): Add list and multiple_threads
11808 fields. Define MULTIPLE_THREADS_OFFSET.
11809 * sysdeps/pthread/bits/libc-lock.h: Remove __libc_locking_needed
11810 declaration.
11811 * sysdeps/unix/sysv/linux/accept.S: New file.
11812 * sysdeps/unix/sysv/linux/read.c: New file.
11813 * sysdeps/unix/sysv/linux/write.c: New file.
11814 * sysdeps/unix/sysv/linux/i386/pt-socket.S: New file.
11815 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove definition and
11816 initialization of __libc_locking_needed.
11817 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't use
11818 __libc_locking_needed, use multiple_threads field in TCB.
11819 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
11820
11821 2002-12-12 Ulrich Drepper <drepper@redhat.com>
11822
11823 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: Use i486
11824 version.
11825 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: Likewise.
11826
11827 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Correct
11828 access to __libc_locking_needed for PIC.
11829
11830 2002-12-12 Jakub Jelinek <jakub@redhat.com>
11831
11832 * sysdeps/pthread/bits/libc-lock.h (__libc_locking_needed): Only
11833 declare for libc.so.
11834 (__libc_lock_init, __libc_lock_init_recursive): Change into comma
11835 expression.
11836 (__libc_lock_lock): Put into statement expression.
11837 (__libc_lock_unlock): Remove trailing semicolon.
11838 * sysdeps/unix/sysv/linux/fork.h (__libc_pthread_init): Fix typo.
11839
11840 2002-12-12 Roland McGrath <roland@redhat.com>
11841
11842 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use asm operand with
11843 "m" constraint to refer to __libc_locking_needed. Declare it here.
11844
11845 2002-12-12 Ulrich Drepper <drepper@redhat.com>
11846
11847 * sysdeps/unix/sysv/linux/fork-gen.c: Renamed to...
11848 * sysdeps/unix/sysv/linux/libc_pthread_init.c: ...this.
11849 Initialize __libc_locking_needed.
11850 * init.c (__pthread_initialize_minimal): Call __libc_pthread_init
11851 instead of __register_pthread_fork_handler.
11852 * sysdeps/pthread/bits/libc-lock.h: Declare __libc_locking_needed.
11853 * sysdeps/unix/sysv/linux/Makefile (sysdep_routimes): Replace
11854 fork-gen with libc_pthread_init.
11855 * sysdeps/unix/sysv/linux/Versions: Use __libc_pthread_init instead
11856 of __register_pthread_fork_handler.
11857 * sysdeps/unix/sysv/linux/fork.h: Declare __libc_pthread_init instead
11858 of __register_pthread_fork_handler.
11859 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use
11860 __libc_locking_needed to determine whether lock prefix can be avoided.
11861 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
11862
11863 2002-12-11 Ulrich Drepper <drepper@redhat.com>
11864
11865 * Makefile (tests): Add tst-cleanup1.
11866 * tst-cleanup1.c: New file.
11867 * cancellation.c (__cleanup_thread): Removed.
11868 (__do_cancel): Remove call to __cleanup_thread.
11869 * pthreadP.h: Remove __cleanup_thread prorotype.
11870
11871 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
11872 Remember function and argument even if cancellation handler
11873 function is not available.
11874 (__libc_cleanup_region_end): Execute registered function directly if
11875 pthread functions are not available.
11876 (__libc_cleanup_end): Likewise.
11877
11878 * init.c (__pthread_initialize_minimal): Fix initialization in
11879 static lib by preventing gcc from being too clever.
11880
11881 2002-12-10 Ulrich Drepper <drepper@redhat.com>
11882
11883 * init.c (__pthread_initialize_minimal): Remove unneccesary
11884 sigaddset call.
11885
11886 * Makefile (tests): We can run tst-locale2 now.
11887
11888 2002-12-09 Ulrich Drepper <drepper@redhat.com>
11889
11890 * Versions: Remove duplicated sigwait entry.
11891
11892 2002-12-08 Ulrich Drepper <drepper@redhat.com>
11893
11894 * pthreadP.h: Enable pthread_cleanup_{push,pop} optimizations only
11895 inside libpthread.
11896
11897 * pt-fcntl.c (__fcntl): Initialize oldtype to avoid warning.
11898
11899 * pthreadP.h: Declare __pthread_enable_asynccancel and
11900 __pthread_disable_asynccancel.
11901 (CANCEL_ASYNC): Use __pthread_enable_asynccancel.
11902 (CANCEL_RESET): Use __pthread_disable_asynccancel.
11903 * cancellation.c (__pthread_enable_asynccancel): New function.
11904 (__pthread_disable_asynccancel): New function.
11905 * pt-accept.c: Adjust for CANCEL_ASYNC and CANCEL_RESET change.
11906 * pt-close.c: Likewise.
11907 * pt-connect.c: Likewise.
11908 * pt-creat.c: Likewise.
11909 * pt-fcntl.c: Likewise.
11910 * pt-fsync.c: Likewise.
11911 * pt-lseek.c: Likewise.
11912 * pt-lseek64.c: Likewise.
11913 * pt-msgrcv.c: Likewise.
11914 * pt-msgsnd.c: Likewise.
11915 * pt-msync.c: Likewise.
11916 * pt-nanosleep.c: Likewise.
11917 * pt-open.c: Likewise.
11918 * pt-open64.c: Likewise.
11919 * pt-pause.c: Likewise.
11920 * pt-poll.c: Likewise.
11921 * pt-pread.c: Likewise.
11922 * pt-pread64.c: Likewise.
11923 * pt-pselect.c: Likewise.
11924 * pt-pwrite.c: Likewise.
11925 * pt-pwrite64.c: Likewise.
11926 * pt-read.c: Likewise.
11927 * pt-readv.c: Likewise.
11928 * pt-recv.c: Likewise.
11929 * pt-recvfrom.c: Likewise.
11930 * pt-recvmsg.c: Likewise.
11931 * pt-select.c: Likewise.
11932 * pt-send.c: Likewise.
11933 * pt-sendmsg.c: Likewise.
11934 * pt-sendto.c: Likewise.
11935 * pt-sigpause.c: Likewise.
11936 * pt-sigsuspend.c: Likewise.
11937 * pt-sigtimedwait.c: Likewise.
11938 * pt-sigwait.c: Likewise.
11939 * pt-sigwaitinfo.c: Likewise.
11940 * pt-system.c: Likewise.
11941 * pt-tcdrain.c: Likewise.
11942 * pt-wait.c: Likewise.
11943 * pt-waitid.c: Likewise.
11944 * pt-waitpid.c: Likewise.
11945 * pt-write.c: Likewise.
11946 * pt-writev.c: Likewise.
11947 * pthread_join.c: Likewise.
11948 * pthread_timedjoin.c: Likewise.
11949
11950 * pt-sigpause.c (sigsuspend): Call __sigsuspend.
11951 (__xpg_sigpause): New function.
11952 * Versions (libpthread:GLIBC_2.3.2): Add __xpg_sigpause.
11953
11954 2002-12-07 Ulrich Drepper <drepper@redhat.com>
11955
11956 * Makefile (CFLAGS-ftrylockfile.c): Add -D_IO_MTSAFE_IO.
11957
11958 * cleanup.c: Move declarations of _GI_pthread_cleanup_push and
11959 _GI_pthread_cleanup_pop to pthreadP.h.
11960
11961 * ftrylockfile.c: Use _IO_lock_trylock instead of
11962 pthread_mutex_trylock.
11963
11964 * pthreadP.h (CANCEL_ASYNC): Use __pthread_setcanceltype.
11965 (CANCEL_RESET): Likewise.
11966 (__pthread_setcanceltype_): Declare.
11967 (__pthread_mutex_lock_internal): Declare.
11968 (__pthread_mutex_unlock_internal): Declare.
11969 (__pthread_once_internal): Declare.
11970 (pthread_cleanup_push): Redefine using _GI_pthread_cleanup_push.
11971 (pthread_cleanup_pop): Redefine using _GI_pthread_cleanup_pop.
11972
11973 * pthread_cond_timedwait.c: Use INTUSE is calls to pthread_mutex_lock
11974 and pthread_mutex_unlock.
11975 * pthread_cond_wait.c: Likewise.
11976 * pthread_mutex_lock.c: Use INTDEF to define alias if needed.
11977 * pthread_mutex_unlock.c: Likewise.
11978
11979 * pthread_setcanceltype.c: Add additional alias
11980 __pthread_setcanceltype.
11981
11982 * sem_unlink.c (sem_unlink): Use __pthread_once with INTDEF.
11983 * sem_open.c (sem_open): Likewise.
11984 Use __libc_open, __libc_write, and __libc_close instead of
11985 open, write, and close respectively.
11986
11987 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_trylock_internal):
11988 Rewrite as statement expression since it must return a value.
11989
11990 * pthread_cancel.c: Use __pthread_kill instead of pthread_kill.
11991 * sysdeps/unix/sysv/linux/pthread_kill.c: Define additional alias
11992 __pthread_kill.
11993
11994 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Define additional
11995 alias __pthread_once_internal.
11996
11997 * sysdeps/unix/sysv/linux/raise.c: Use libc_hidden_def for raise.
11998
11999 2002-12-06 Ulrich Drepper <drepper@redhat.com>
12000
12001 * Makefile (tests): Add tst-stdio1 and tst-stdio2.
12002 * tst-stdio1.c: New file.
12003 * tst-stdio2.c: New file.
12004
12005 * init.c (__pthread_initialize_minimal): Correct INIT_LIST_HEAD use.
12006
12007 * Makefile (tests): Comment out tst-locale2 for now.
12008 (CFLAGS-flockfile.c, CFLAGS-funlockfile.c): Define to -D_IO_MTSAFE_IO.
12009
12010 * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-fork.c to
12011 -D_IO_MTSAFE_IO.
12012 * sysdeps/unix/sysv/linux/fork.c: Include <bits/stdio-lock.h>.
12013 Use _IO_lock_init instead of explicit assignment.
12014
12015 * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
12016 Define __libc_lock_* and __libc_lock_recursive macros with
12017 lowlevellock macros, not pthread mutexes.
12018
12019 * flockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_lock instead
12020 of pthread_mutex_lock.
12021 * funlockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_unlock
12022 instead of pthread_mutex_unlock.
12023
12024 2002-12-06 Roland McGrath <roland@redhat.com>
12025
12026 * allocatestack.c (__stack_user): Use uninitialized defn.
12027 * init.c (__pthread_initialize_minimal): Initialize it here.
12028
12029 2002-12-05 Roland McGrath <roland@redhat.com>
12030
12031 * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
12032 string.
12033 * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
12034
12035 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Add
12036 missing & here too.
12037
12038 2002-12-05 Ulrich Drepper <drepper@redhat.com>
12039
12040 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
12041 lowlevellock.
12042 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: New file.
12043 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: New file.
12044 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: New file.
12045 * sysdeps/pthread/bits/libc-lock.h: Use lowlevellock implementation
12046 for __libc_lock_* macros.
12047 * Makefile (routines): Add libc-lowlevellock.
12048
12049 2002-10-09 Roland McGrath <roland@redhat.com>
12050
12051 * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
12052 Under [__PIC__], call the function via the pointer fetched for
12053 comparison rather than a call by name that uses the PLT.
12054 (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
12055 (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
12056 (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
12057 (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
12058 (__libc_key_create, __libc_getspecific, __libc_setspecific): Use it.
12059
12060 2002-12-04 Roland McGrath <roland@redhat.com>
12061
12062 * forward.c (pthread_self): Use FORWARD3 macro to correct return type.
12063
12064 * sysdeps/i386/td_ta_map_lwp2thr.c: Moved from ../nptl_db.
12065 * sysdeps/generic/td_ta_map_lwp2thr.c: New file.
12066
12067 * pthread_create.c (start_thread): Add missing & on __nptl_last_event.
12068
12069 2002-12-04 Ulrich Drepper <drepper@redhat.com>
12070
12071 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Make pthread_t
12072 a completely opaque, non-integer type.
12073 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
12074
12075 2002-12-05 Jakub Jelinek <jakub@redhat.com>
12076
12077 * sysdeps/i386/tls.h: Include stdlib.h.
12078 * sysdeps/x86_64/tls.h: Likewise.
12079
12080 2002-12-04 Ulrich Drepper <drepper@redhat.com>
12081
12082 * Makefile (tests): Add tst-locale2.
12083 (tests-static): Likewise.
12084 * tst-locale2.c: New file.
12085
12086 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Mark asms as
12087 volatile and add memory clobbers to lock operations.
12088
12089 2002-12-03 Ulrich Drepper <drepper@redhat.com>
12090
12091 * sysdeps/i386/i686/bits/atomic.h: Use i486 version.
12092 * sysdeps/i386/i486/bits/atomic.h: New file.
12093 * sysdeps/i386/i586/bits/atomic.h: New file.
12094 * sysdeps/i386/i686/pthread_spin_trylock.S: Define HAVE_CMOV and
12095 include i486 version.
12096 * sysdeps/i386/i486/pthread_spin_trylock.S: New file.
12097 * sysdeps/i386/i586/pthread_spin_trylock.S: New file.
12098 Patch by Marijn Ros <marijn@mad.scientist.com>.
12099
12100 * allocatestack.c (get_cached_stack): Don't crash if we first
12101 found a stack with a larger size then needed.
12102 Reported by Hui Huang <hui.huang@sun.com>.
12103
12104 * Makefile (tests): Add tst-sysconf.
12105 * tst-sysconf.c: New file.
12106
12107 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine
12108 PTHREAD_THREADS_MAX.
12109
12110 2002-12-02 Roland McGrath <roland@redhat.com>
12111
12112 * pthreadP.h (__stack_user, __nptl_create_event, __nptl_death_event):
12113 Declare using hidden_proto instead of attribute_hidden, so there are
12114 non-.hidden static symbols for gdb to find.
12115 (__pthread_keys): Likewise.
12116 * events.c (__nptl_create_event, __nptl_death_event): Add hidden_def.
12117 * allocatestack.c (__stack_user): Likewise.
12118 * pthread_create.c (__pthread_keys): Likewise.
12119 (__nptl_threads_events, __nptl_last_event): Make these static instead
12120 of hidden.
12121 * pthread_key_create.c (__pthread_pthread_keys_max,
12122 __pthread_pthread_key_2ndlevel_size): Renamed from __linuxthreads_*.
12123
12124 2002-12-02 Ulrich Drepper <drepper@redhat.com>
12125
12126 * Makefile (tests): Add tst-locale1. If buid-static is yes link
12127 statically.
12128 * tst-locale1.c: New file.
12129
12130 * pthread_cond_timedwait.c: Include <stdlib.h>.
12131
12132 * Makefile (tests): Add tst-fork2 and tst-fork3.
12133 * tst-fork2.c: New file.
12134 * tst-fork3.c: New file.
12135
12136 2002-11-28 Ulrich Drepper <drepper@redhat.com>
12137
12138 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
12139
12140 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
12141 require it to 200112L.
12142
12143 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Use cmov
12144 instruction only if HAVE_CMOV is defined.
12145 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Define HAVE_CMOV.
12146
12147 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: New file.
12148
12149 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: New file.
12150
12151 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: New file.
12152
12153 * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: New file.
12154
12155 2002-11-27 Ulrich Drepper <drepper@redhat.com>
12156
12157 * sysdeps/x86_64/bits/atomic.h: New file.
12158
12159 * sysdeps/i386/i686/bits/atomic.h: Fix asm syntax for 8- and
12160 16-bit operations.
12161
12162 * sysdeps/unix/sysv/linux/raise.c (raise): Use INTERNAL_SYSCALL if
12163 possible since gettid cannot fail.
12164
12165 * sysdeps/x86_64/pthreaddef.h: New file.
12166
12167 * sysdeps/i386/pthreaddef.h (gettid): Removed.
12168
12169 * sysdeps/x86_64/pthread_spin_init.c: New file.
12170 * sysdeps/x86_64/pthread_spin_lock.c: New file.
12171 * sysdeps/x86_64/pthread_spin_trylock.c: New file.
12172 * sysdeps/x86_64/pthread_spin_unlock.c: New file.
12173
12174 * sysdeps/i386/i686/pthread_spin_trylock.S (pthread_spin_trylock):
12175 Add missing lock prefix. Minute optimization.
12176
12177 * tst-spin2.c (main): Also check successful trylock call.
12178
12179 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use correct
12180 syscall. Fix typo in case INTERNAL_SYSCALL is not used.
12181
12182 * sysdeps/i386/pthread_spin_destroy.c: Moved to...
12183 * sysdeps/pthread/pthread_spin_destroy.c: ...here. New file.
12184
12185 * sysdeps/i386/pthread_sigmask.c: Removed. Use the generic code.
12186 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Return correct
12187 value in case of an error. Add support for INTERNAL_SYSCALL.
12188
12189 * sysdeps/i386/pthread_sigmask.c (pthread_sigmask): Return correct
12190 value in case of an error.
12191
12192 * sysdeps/x86_64/tls.h: New file.
12193
12194 2002-11-26 Ulrich Drepper <drepper@redhat.com>
12195
12196 * sysdeps/i386/tls.h (THREAD_GETMEM_NC): Change interface. It now
12197 takes the array member name and the index as parameters.
12198 (THREAD_SETMEM_NC): Likewise.
12199 * pthread_getspecific.c: Use new THREAD_GETMEM_NC interface.
12200 * pthread_setspecific.c: Use new THREAD_GETMEM_NC and THREAD_SETMEM_NC
12201 interfaces.
12202
12203 * sysdeps/i386/tls.h (THREAD_SETMEM): Use size of member element
12204 to decide which code to use.
12205 (THREAD_SETMEM_NC): Likewise.
12206
12207 * allocatestack.c (queue_stack): Don't remove stack from list here.
12208 Do it in the caller. Correct condition to prematurely terminate
12209 loop to free stacks.
12210 (__deallocate_stack): Remove stack from list here.
12211
12212 2002-11-26 Ulrich Drepper <drepper@redhat.com>
12213
12214 * Makefile (tests): Add tst-stack1.
12215 * tst-stack1.c: New file.
12216
12217 * allocatestack.c (allocate_stack): Initialize the TCB on a user
12218 provided stack.
12219
12220 * pthread_attr_getstack.c: Return bottom of the thread area.
12221
12222 2002-11-25 Ulrich Drepper <drepper@redhat.com>
12223
12224 * Makefile (libpthread-routines): Add pt-allocrtsig and
12225 pthread_kill_other_threads.
12226 * pt-allocrtsig.c: New file.
12227 * pthread_kill_other_threads.c: New file.
12228 * sysdeps/unix/sysv/linux/allocrtsig.c: Add additional aliases for
12229 all three functions.
12230 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
12231 allocrtsig.
12232 * sysdeps/unix/sysv/linux/Versions (libc:GLIBC_PRIVATE): Export
12233 __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
12234 and __libc_allocate_rtsig_private.
12235 * Versions (libpthread): Export pthread_kill_other_threads_np,
12236 __libc_current_sigrtmin, and __libc_current_sigrtmax.
12237
12238 2002-11-24 Ulrich Drepper <drepper@redhat.com>
12239
12240 * allocatestack.c (allocate_stack): stackaddr in attribute points to
12241 the end of the stack. Adjust computations.
12242 When mprotect call fails dequeue stack and free it.
12243 * pthread_attr_setstack.c: Store top of the stack in stackaddr
12244 attribute.
12245 * pthread_getattr_np.c: Likewise.
12246
12247 * descr.h (IS_DETACHED): Add some more parenthesis to prevent
12248 surprises.
12249
12250 2002-11-23 Ulrich Drepper <drepper@redhat.com>
12251
12252 * sysdeps/pthread/pthread.h (pthread_self): __THROW must come before
12253 attribute definitions. Patch by Luca Barbieri <ldb@ldb.ods.org>.
12254
12255 2002-11-22 Ulrich Drepper <drepper@redhat.com>
12256
12257 * pthread_getspecific.c: Optimize access to first 2nd-level array.
12258 * pthread_setspecific.c: Likewise.
12259
12260 2002-11-21 Ulrich Drepper <drepper@redhat.com>
12261
12262 * sysdeps/unix/sysv/linux/i386/createthread.c: Remove CLONE_ flags
12263 definitions. Get them from the official place.
12264 * sysdeps/unix/sysv/linux/i386/fork.c: Likewise.
12265
12266 * sysdeps/unix/sysv/linux/i386/createthread.c: Update CLONE_* flags.
12267 Use new CLONE_ flags in clone() calls.
12268
12269 * sysdeps/unix/sysv/linux/fork.c: Use ARCH_FORK to actually fork.
12270 * sysdeps/unix/sysv/linux/i386/fork.c: New file.
12271
12272 * Versions: Add pthread_* functions for libc.
12273 * forward.c: New file.
12274
12275 * sysdeps/pthread/Makefile (libpthread-sysdeps_routines): Add
12276 errno-loc.
12277 * herrno.c: New file.
12278 * res.c: New file.
12279
12280 * Makefile (libpthread-routines): Remove sem_post, sem_wait,
12281 sem_trywait, and sem_timedwait. Add herrno and res.
12282 * sem_init.c: Don't initialize lock and waiters members.
12283 * sem_open.c: Likewise.
12284 * sem_post.c: Removed.
12285 * sem_wait.c: Removed.
12286 * sem_trywait.c: Removed.
12287 * sem_timedwait.c: Removed.
12288 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Complete rewrite.
12289 Includes full implementations of sem_post, sem_wait, sem_trywait,
12290 and sem_timedwait.
12291 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Adjust
12292 for new implementation.
12293 * sysdeps/unix/sysv/linux/internaltypes.h (struct sem): Remove lock
12294 and waiters fields.
12295
12296 * tst-sem3.c: Improve error message.
12297 * tst-signal3.c: Likewise.
12298
12299 * init.c (__pthread_initialize_minimal): Use set_tid_address syscall
12300 to tell the kernel about the termination futex and to initialize tid
12301 member. Don't initialize main_thread.
12302 * descr.h (struct pthread): Remove main_thread member.
12303 * cancelllation.c (__do_cancel): Remove code handling main thread.
12304 The main thread is not special anymore.
12305
12306 * allocatestack.c (__reclaim_stacks): Mark stacks as unused. Add
12307 size of the stacks to stack_cache_actsize.
12308
12309 * pt-readv.c: Add missing "defined".
12310 * pt-sigwait.c: Likewise.
12311 * pt-writev.c: Likewise.
12312
12313 2002-11-09 Ulrich Drepper <drepper@redhat.com>
12314
12315 * Versions: Export __connect from libpthread.
12316 Patch by Luca Barbieri <ldb@ldb.ods.org>.
12317
12318 * Makefile (libpthread-routines): Add pt-raise.
12319 * sysdeps/unix/sysv/linux/raise.c: New file.
12320 * sysdeps/unix/sysv/linux/pt-raise.c: New file.
12321 * sysdeps/generic/pt-raise.c: New file.
12322
12323 * pthread_cond_init.c: Initialize all data elements of the condvar
12324 structure. Patch by Luca Barbieri <ldb@ldb.ods.org>.
12325
12326 * pthread_attr_init.c: Actually implement 2.0 compatibility version.
12327 * pthread_create.c: Likewise.
12328
12329 * Makefile (tests): Add tst-key1, tst-key2, tst-key3.
12330 * tst-key1.c: New file.
12331 * tst-key2.c: New file.
12332 * tst-key3.c: New file.
12333
12334 * Versions: Export pthread_detach for version GLIBC_2.0.
12335 Reported by Saurabh Desai <sdesai@austin.ibm.com>.
12336
12337 2002-11-08 Ulrich Drepper <drepper@redhat.com>
12338
12339 * pthread_key_create.c: Terminate search after an unused key was found.
12340 Patch by Luca Barbieri <ldb@ldb.ods.org>.
12341
12342 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Return zero.
12343 Patch by Luca Barbieri <ldb@ldb.ods.org>.
12344
12345 2002-10-10 Ulrich Drepper <drepper@redhat.com>
12346
12347 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Use slow generic
12348 dynamic lookup for errno in PIC.
12349
12350 * allocatestack.c (get_cached_stack): Rearrange code slightly to
12351 release the stack lock as soon as possible.
12352 Call _dl_allocate_tls_init for TCB from the cache to re-initialize
12353 the static TLS block.
12354 (allocate_stack): Call _dl_allocate_tls_init for user-provided stack.
12355
12356 * cancellation.c: Renamed from cancelation.c.
12357 * Makefile: Adjust accordingly.
12358 * pthreadP.h (CANCELLATION_P): Renamed from CANCELATION_P.
12359 * cleanup_defer.c: Use CANCELLATION_P.
12360 * pthread_testcancel.c: Likewise.
12361 * descr.h: Fix spelling in comments.
12362 * init.c: Likewise.
12363 * pthread_getattr_np.c: Likewise.
12364 * pthread_getschedparam.c: Likewise.
12365 * pthread_setschedparam.c: Likewise.
12366 * Versions: Likewise.
12367
12368 * pt-pselect.c: New file.
12369 * Makefile (libpthread-routines): Add pt-pselect.
12370 * Versions: Add pselect.
12371
12372 * tst-cancel4.c: New file.
12373 * Makefile (tests): Add tst-cancel4.
12374
12375 2002-10-09 Ulrich Drepper <drepper@redhat.com>
12376
12377 * pthread_mutex_lock.c: Always record lock ownership.
12378 * pthread_mutex_timedlock.c: Likewise.
12379 * pthread_mutex_trylock.c: Likewise.
12380
12381 * pt-readv.c: New file.
12382 * pt-writev.c: New file.
12383 * pt-creat.c: New file.
12384 * pt-msgrcv.c: New file.
12385 * pt-msgsnd.c: New file.
12386 * pt-poll.c: New file.
12387 * pt-select.c: New file.
12388 * pt-sigpause.c: New file.
12389 * pt-sigsuspend.c: New file.
12390 * pt-sigwait.c: New file.
12391 * pt-sigwaitinfo.c: New file.
12392 * pt-waitid.c: New file.
12393 * Makefile (libpthread-routines): Add pt-readv, pt-writev, pt-creat,
12394 pt-msgrcv, pt-msgsnd, pt-poll, pt-select, pt-sigpause, pt-sigsuspend,
12395 pt-sigwait, pt-sigwaitinfo, and pt-waitid.
12396 * Versions: Add all the new functions.
12397
12398 * tst-exit1.c: New file.
12399 * Makefile (tests): Add tst-exit1.
12400
12401 * sem_timedwait.c: Minor optimization for more optimal fastpath.
12402
12403 2002-10-08 Ulrich Drepper <drepper@redhat.com>
12404
12405 * pt-fcntl.c: Only enable asynchronous cancellation for F_SETLKW.
12406
12407 * pthread_join.c: Enable asynchronous cancellation around lll_wait_tid
12408 call. pthread_join is an official cancellation point.
12409 * pthread_timedjoin.c: Likewise.
12410
12411 * pthread_cond_wait.c: Revert order in which internal lock are dropped
12412 and the condvar's mutex are retrieved.
12413 * pthread_cond_timedwait.c: Likewise.
12414 Reported by dice@saros.East.Sun.COM.
12415
12416 2002-10-07 Ulrich Drepper <drepper@redhat.com>
12417
12418 * pthreadP.h: Cut out all type definitions and move them...
12419 * sysdeps/unix/sysv/linux/internaltypes.h: ...here. New file.
12420 * pthreadP.h: Include <internaltypes.h>.
12421
12422 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Little
12423 performance tweaks.
12424
12425 * sem_trywait.c: Shuffle #includes around to get right order.
12426 * sem_timedwait.c: Likewise.
12427 * sem_post.c: Likewise.
12428 * sem_wait.c: Likewise.
12429
12430 * nptl 0.3 released.
12431
12432 * Makefile (tests): Add tst-signal3.
12433 * tst-signal3.c: New file.
12434
12435 2002-10-05 Ulrich Drepper <drepper@redhat.com>
12436
12437 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Tell the compiler that
12438 the asms modify the sem object.
12439 (__lll_sem_timedwait): Now takes struct sem* as first parameter.
12440
12441 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h (sem_t): Don't expose
12442 the actual members.
12443 * pthreadP.h (struct sem): New type. Actual semaphore type.
12444 * semaphoreP.h: Include pthreadP.h.
12445 * sem_getvalue.c: Adjust to sem_t change.
12446 * sem_init.c: Likewise.
12447 * sem_open.c: Likewise.
12448 * sem_post.c: Likewise.
12449 * sem_timedwait.c: Likewise.
12450 * sem_trywait.c: Likewise.
12451 * sem_wait.c: Likewise.
12452
12453 2002-10-04 Ulrich Drepper <drepper@redhat.com>
12454
12455 * Makefile (tests): Add tst-basic2, tst-exec1, tst-exec3, tst-exec3.
12456 * tst-basic2.c: New file.
12457 * tst-exec1.c: New file.
12458 * tst-exec2.c: New file.
12459 * tst-exec3.c: New file.
12460
12461 * tst-fork1.c: Remove extra */.
12462
12463 * nptl 0.2 released. The API for IA-32 is complete.